Title: [176388] trunk/Source/WebCore
Revision
176388
Author
[email protected]
Date
2014-11-20 00:43:25 -0800 (Thu, 20 Nov 2014)

Log Message

Remove "document has no sibling rules" optimization.
<https://webkit.org/b/138902>

Reviewed by Antti Koivisto.

We were keeping a document-level flag to track whether there are any
sibling rules in any active style sheets.

This information was used to do.. nothing.

* css/StyleResolver.h:
(WebCore::StyleResolver::usesSiblingRules): Deleted.
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
(WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
(WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
* dom/DocumentStyleSheetCollection.h:
(WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted.
(WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted.
* mathml/MathMLMathElement.cpp:
(WebCore::MathMLMathElement::insertedInto): Deleted.
* mathml/MathMLMathElement.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (176387 => 176388)


--- trunk/Source/WebCore/ChangeLog	2014-11-20 08:36:11 UTC (rev 176387)
+++ trunk/Source/WebCore/ChangeLog	2014-11-20 08:43:25 UTC (rev 176388)
@@ -1,5 +1,30 @@
 2014-11-20  Andreas Kling  <[email protected]>
 
+        Remove "document has no sibling rules" optimization.
+        <https://webkit.org/b/138902>
+
+        Reviewed by Antti Koivisto.
+
+        We were keeping a document-level flag to track whether there are any
+        sibling rules in any active style sheets.
+
+        This information was used to do.. nothing.
+
+        * css/StyleResolver.h:
+        (WebCore::StyleResolver::usesSiblingRules): Deleted.
+        * dom/DocumentStyleSheetCollection.cpp:
+        (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
+        (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
+        (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
+        * dom/DocumentStyleSheetCollection.h:
+        (WebCore::DocumentStyleSheetCollection::usesSiblingRules): Deleted.
+        (WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride): Deleted.
+        * mathml/MathMLMathElement.cpp:
+        (WebCore::MathMLMathElement::insertedInto): Deleted.
+        * mathml/MathMLMathElement.h:
+
+2014-11-20  Andreas Kling  <[email protected]>
+
         Caret renderer is always a RenderBlock.
         <https://webkit.org/b/138912>
 

Modified: trunk/Source/WebCore/css/StyleResolver.h (176387 => 176388)


--- trunk/Source/WebCore/css/StyleResolver.h	2014-11-20 08:36:11 UTC (rev 176387)
+++ trunk/Source/WebCore/css/StyleResolver.h	2014-11-20 08:43:25 UTC (rev 176388)
@@ -229,7 +229,6 @@
 
     bool checkRegionStyle(Element* regionElement);
 
-    bool usesSiblingRules() const { return !m_ruleSets.features().siblingRules.isEmpty(); }
     bool usesFirstLineRules() const { return m_ruleSets.features().usesFirstLineRules; }
     bool usesFirstLetterRules() const { return m_ruleSets.features().usesFirstLetterRules; }
     

Modified: trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp (176387 => 176388)


--- trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp	2014-11-20 08:36:11 UTC (rev 176387)
+++ trunk/Source/WebCore/dom/DocumentStyleSheetCollection.cpp	2014-11-20 08:43:25 UTC (rev 176388)
@@ -56,8 +56,6 @@
     , m_injectedStyleSheetCacheValid(false)
     , m_hadActiveLoadingStylesheet(false)
     , m_pendingUpdateType(NoUpdate)
-    , m_usesSiblingRules(false)
-    , m_usesSiblingRulesOverride(false)
     , m_usesFirstLineRules(false)
     , m_usesFirstLetterRules(false)
     , m_usesRemUnits(false)
@@ -68,7 +66,6 @@
 {
     // Delay resetting the flags until after next style recalc since unapplying the style may not work without these set (this is true at least with before/after).
     const StyleResolver& styleResolver = m_document.ensureStyleResolver();
-    m_usesSiblingRules = m_usesSiblingRules || styleResolver.usesSiblingRules();
     m_usesFirstLineRules = m_usesFirstLineRules || styleResolver.usesFirstLineRules();
     m_usesFirstLetterRules = m_usesFirstLetterRules || styleResolver.usesFirstLetterRules();
 }
@@ -76,7 +73,6 @@
 void DocumentStyleSheetCollection::resetCSSFeatureFlags()
 {
     const StyleResolver& styleResolver = m_document.ensureStyleResolver();
-    m_usesSiblingRules = styleResolver.usesSiblingRules();
     m_usesFirstLineRules = styleResolver.usesFirstLineRules();
     m_usesFirstLetterRules = styleResolver.usesFirstLetterRules();
 }

Modified: trunk/Source/WebCore/dom/DocumentStyleSheetCollection.h (176387 => 176388)


--- trunk/Source/WebCore/dom/DocumentStyleSheetCollection.h	2014-11-20 08:36:11 UTC (rev 176387)
+++ trunk/Source/WebCore/dom/DocumentStyleSheetCollection.h	2014-11-20 08:43:25 UTC (rev 176388)
@@ -101,8 +101,6 @@
 
     bool hasPendingSheets() const { return m_pendingStylesheets > 0; }
 
-    bool usesSiblingRules() const { return m_usesSiblingRules || m_usesSiblingRulesOverride; }
-    void setUsesSiblingRulesOverride(bool b) { m_usesSiblingRulesOverride = b; }
     bool usesFirstLineRules() const { return m_usesFirstLineRules; }
     bool usesFirstLetterRules() const { return m_usesFirstLetterRules; }
     bool usesRemUnits() const { return m_usesRemUnits; }
@@ -156,8 +154,6 @@
     String m_preferredStylesheetSetName;
     String m_selectedStylesheetSetName;
 
-    bool m_usesSiblingRules;
-    bool m_usesSiblingRulesOverride;
     bool m_usesFirstLineRules;
     bool m_usesFirstLetterRules;
     bool m_usesRemUnits;

Modified: trunk/Source/WebCore/mathml/MathMLMathElement.cpp (176387 => 176388)


--- trunk/Source/WebCore/mathml/MathMLMathElement.cpp	2014-11-20 08:36:11 UTC (rev 176387)
+++ trunk/Source/WebCore/mathml/MathMLMathElement.cpp	2014-11-20 08:43:25 UTC (rev 176388)
@@ -43,14 +43,6 @@
     return adoptRef(new MathMLMathElement(tagName, document));
 }
 
-Node::InsertionNotificationRequest MathMLMathElement::insertedInto(ContainerNode& insertionPoint)
-{
-    // There are sibling rules in the MathML default style.
-    if (insertionPoint.inDocument())
-        document().styleSheetCollection().setUsesSiblingRulesOverride(true);
-    return MathMLInlineContainerElement::insertedInto(insertionPoint);
-}
-
 RenderPtr<RenderElement> MathMLMathElement::createElementRenderer(PassRef<RenderStyle> style)
 {
     return createRenderer<RenderMathMLMath>(*this, WTF::move(style));

Modified: trunk/Source/WebCore/mathml/MathMLMathElement.h (176387 => 176388)


--- trunk/Source/WebCore/mathml/MathMLMathElement.h	2014-11-20 08:36:11 UTC (rev 176387)
+++ trunk/Source/WebCore/mathml/MathMLMathElement.h	2014-11-20 08:43:25 UTC (rev 176388)
@@ -39,7 +39,6 @@
 private:
     MathMLMathElement(const QualifiedName& tagName, Document&);
 
-    virtual InsertionNotificationRequest insertedInto(ContainerNode&) override;
     virtual RenderPtr<RenderElement> createElementRenderer(PassRef<RenderStyle>) override;
 };
     
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to