15c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)/* 25c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 35c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * (C) 1999 Antti Koivisto (koivisto@kde.org) 45c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * (C) 2001 Dirk Mueller (mueller@kde.org) 55c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 65c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012 Apple Inc. All rights reserved. 75c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 85c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9c0e19a689c8ac22cdc96b291a8d33a5d3b0b34a4Torne (Richard Coles) * Copyright (C) 2013 Google Inc. All rights reserved. 105c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 115c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * This library is free software; you can redistribute it and/or 125c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * modify it under the terms of the GNU Library General Public 135c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * License as published by the Free Software Foundation; either 145c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * version 2 of the License, or (at your option) any later version. 155c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 165c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * This library is distributed in the hope that it will be useful, 175c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * but WITHOUT ANY WARRANTY; without even the implied warranty of 185c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 195c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Library General Public License for more details. 205c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 215c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * You should have received a copy of the GNU Library General Public License 225c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * along with this library; see the file COPYING.LIB. If not, write to 235c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 245c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * Boston, MA 02110-1301, USA. 255c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) * 265c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) */ 275c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 285c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#ifndef DocumentStyleSheetCollection_h 295c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#define DocumentStyleSheetCollection_h 305c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 3109380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)#include "core/dom/TreeScopeStyleSheetCollection.h" 325c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 33c1847b1379d12d0e05df27436bf19a9b1bf12deaTorne (Richard Coles)namespace blink { 345c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 3509380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)class DocumentStyleSheetCollector; 369bbd2f5e390b01907d97ecffde80aa1b06113aacTorne (Richard Coles)class StyleEngine; 37c0e19a689c8ac22cdc96b291a8d33a5d3b0b34a4Torne (Richard Coles)class TreeScope; 385c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 3909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles)class DocumentStyleSheetCollection FINAL : public TreeScopeStyleSheetCollection { 4043e7502580f146aa5b3db8267ba6dbb5c733a489Torne (Richard Coles) WTF_MAKE_NONCOPYABLE(DocumentStyleSheetCollection); 4143e7502580f146aa5b3db8267ba6dbb5c733a489Torne (Richard Coles) WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; 425c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)public: 43197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch static PassOwnPtrWillBeRawPtr<DocumentStyleSheetCollection> create(TreeScope& treeScope) 44197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch { 45197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch return adoptPtrWillBeNoop(new DocumentStyleSheetCollection(treeScope)); 46197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch } 475c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 485d92fedcae5e801a8b224de090094f2d9df0b54aTorne (Richard Coles) void updateActiveStyleSheets(StyleEngine*, StyleResolverUpdateMode); 4909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) void collectStyleSheets(StyleEngine*, DocumentStyleSheetCollector&); 50e1f1df5f01594c0e62e751e4b46e779b85c2faa5Torne (Richard Coles) 5143e7502580f146aa5b3db8267ba6dbb5c733a489Torne (Richard Coles) virtual void trace(Visitor* visitor) OVERRIDE 5243e7502580f146aa5b3db8267ba6dbb5c733a489Torne (Richard Coles) { 5343e7502580f146aa5b3db8267ba6dbb5c733a489Torne (Richard Coles) TreeScopeStyleSheetCollection::trace(visitor); 5443e7502580f146aa5b3db8267ba6dbb5c733a489Torne (Richard Coles) } 5543e7502580f146aa5b3db8267ba6dbb5c733a489Torne (Richard Coles) 565c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)private: 57197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch explicit DocumentStyleSheetCollection(TreeScope&); 58197021e6b966cfb06891637935ef33fff06433d1Ben Murdoch 5909380295ba73501a205346becac22c6978e4671dTorne (Richard Coles) void collectStyleSheetsFromCandidates(StyleEngine*, DocumentStyleSheetCollector&); 605c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)}; 615c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 625c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)} 635c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 645c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles)#endif 655c87bf8b86a7c82ef50fb7a89697d8e02e2553beTorne (Richard Coles) 66