source: webkit/trunk/Source/WebCore/css/StyleSheet.h

Last change on this file was 279847, checked in by Simon Fraser, 4 years ago

Add a StyleSheets log channel and some logging
https://bugs.webkit.org/show_bug.cgi?id=227880

Reviewed by Alan Bujtas.

Source/WebCore:

Add some logging to help debug issues when pages dynamically build style sheets.

Also make Document loggable.

  • css/CSSStyleSheet.cpp:

(WebCore::CSSStyleSheet::insertRule):
(WebCore::CSSStyleSheet::deleteRule):
(WebCore::CSSStyleSheet::addRule):
(WebCore::CSSStyleSheet::debugDescription const):

  • css/CSSStyleSheet.h:
  • css/StyleSheet.cpp:

(WebCore::operator<<):

  • css/StyleSheet.h:
  • dom/Document.cpp:

(WebCore::Document::debugDescription const):
(WebCore::operator<<):

  • dom/Document.h:
  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::debugDescription const):

  • html/HTMLLinkElement.h:
  • platform/Logging.h:
  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::dumpProperties const):

  • platform/graphics/filters/FilterEffect.cpp:

(WebCore::FilterEffect::imageBufferResult):

  • style/StyleScope.cpp:

(WebCore::Style::Scope::addPendingSheet):
(WebCore::Style::Scope::addStyleSheetCandidateNode):
(WebCore::Style::Scope::collectActiveStyleSheets):
(WebCore::Style::Scope::updateActiveStyleSheets):

  • xml/XSLStyleSheet.h:
  • xml/XSLStyleSheetLibxslt.cpp:

(WebCore::XSLStyleSheet::debugDescription const):

Source/WTF:

Make it possible to feed Ref<> and RefPtr<> into TextStream.

  • wtf/text/TextStream.h:

(WTF::operator<<):

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1/*
2 * (C) 1999-2003 Lars Knoll ([email protected])
3 * Copyright (C) 2004, 2006, 2008, 2012 Apple Inc. All rights reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 */
20
21#pragma once
22
23#include "CSSParserMode.h"
24#include <wtf/Forward.h>
25#include <wtf/RefCounted.h>
26
27namespace WTF {
28class TextStream;
29}
30
31namespace WebCore {
32
33class CSSImportRule;
34class MediaList;
35class Node;
36class StyleSheet;
37
38class StyleSheet : public RefCounted<StyleSheet> {
39public:
40 virtual ~StyleSheet();
41
42 virtual bool disabled() const = 0;
43 virtual void setDisabled(bool) = 0;
44 virtual Node* ownerNode() const = 0;
45 virtual StyleSheet* parentStyleSheet() const { return 0; }
46 virtual String href() const = 0;
47 virtual String title() const = 0;
48 virtual MediaList* media() const { return 0; }
49 virtual String type() const = 0;
50
51 virtual CSSImportRule* ownerRule() const { return 0; }
52 virtual void clearOwnerNode() = 0;
53 virtual URL baseURL() const = 0;
54 virtual bool isLoading() const = 0;
55 virtual bool isCSSStyleSheet() const { return false; }
56 virtual bool isXSLStyleSheet() const { return false; }
57
58 virtual String debugDescription() const = 0;
59};
60
61TextStream& operator<<(TextStream&, const StyleSheet&);
62
63} // namespace WebCore
Note: See TracBrowser for help on using the repository browser.