Title: [107279] trunk/Source/WebCore
Revision
107279
Author
[email protected]
Date
2012-02-09 13:01:44 -0800 (Thu, 09 Feb 2012)

Log Message

Unreviewed, rolling out r107261.
http://trac.webkit.org/changeset/107261
https://bugs.webkit.org/show_bug.cgi?id=78274

It has regressed svg/W3C-SVG-1.1/styling-css-05-b.svg (using
lang() selectors) (Requested by jchaffraix on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-02-09

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::canShareStyleWithControl):
(WebCore::CSSStyleSelector::canShareStyleWithElement):
(WebCore::isCommonAttributeSelectorAttribute):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107278 => 107279)


--- trunk/Source/WebCore/ChangeLog	2012-02-09 20:49:34 UTC (rev 107278)
+++ trunk/Source/WebCore/ChangeLog	2012-02-09 21:01:44 UTC (rev 107279)
@@ -1,3 +1,17 @@
+2012-02-09  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r107261.
+        http://trac.webkit.org/changeset/107261
+        https://bugs.webkit.org/show_bug.cgi?id=78274
+
+        It has regressed svg/W3C-SVG-1.1/styling-css-05-b.svg (using
+        lang() selectors) (Requested by jchaffraix on #webkit).
+
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::canShareStyleWithControl):
+        (WebCore::CSSStyleSelector::canShareStyleWithElement):
+        (WebCore::isCommonAttributeSelectorAttribute):
+
 2012-02-09  Joshua Bell  <[email protected]>
 
         [Chromium] IndexedDB: IDBVersionChangeRequest V8 wrapper not generated as ActiveDOMObject

Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (107278 => 107279)


--- trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-02-09 20:49:34 UTC (rev 107278)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp	2012-02-09 21:01:44 UTC (rev 107279)
@@ -1190,13 +1190,6 @@
             return false;
     }
 
-    if (element->fastGetAttribute(typeAttr) != m_element->fastGetAttribute(typeAttr))
-        return false;
-
-    if (element->fastGetAttribute(readonlyAttr) != m_element->fastGetAttribute(readonlyAttr))
-        return false;
-
-
     return true;
 }
 
@@ -1242,6 +1235,10 @@
         return false;
     if (!!element->attributeStyle() != !!m_styledElement->attributeStyle())
         return false;
+    StylePropertySet* additionalAttributeStyleA = element->additionalAttributeStyle();
+    StylePropertySet* additionalAttributeStyleB = m_styledElement->additionalAttributeStyle();
+    if (!additionalAttributeStyleA != !additionalAttributeStyleB)
+        return false;
     if (element->isLink() != m_element->isLink())
         return false;
     if (style->affectedByUncommonAttributeSelectors())
@@ -1252,21 +1249,42 @@
         return false;
     if (element->focused() != m_element->focused())
         return false;
+    if (element->shadowPseudoId() != m_element->shadowPseudoId())
+        return false;
     if (element == element->document()->cssTarget())
         return false;
     if (m_element == m_element->document()->cssTarget())
         return false;
-    if (style->transitions() || style->animations())
+    if (element->getAttribute(typeAttr) != m_element->getAttribute(typeAttr))
         return false;
-    if (element->isLink() && m_elementLinkState != style->insideLink())
+    if (element->fastGetAttribute(XMLNames::langAttr) != m_element->fastGetAttribute(XMLNames::langAttr))
         return false;
-    if (element->shadowPseudoId() != m_element->shadowPseudoId())
+    if (element->fastGetAttribute(langAttr) != m_element->fastGetAttribute(langAttr))
         return false;
+    if (element->fastGetAttribute(readonlyAttr) != m_element->fastGetAttribute(readonlyAttr))
+        return false;
+    if (element->fastGetAttribute(cellpaddingAttr) != m_element->fastGetAttribute(cellpaddingAttr))
+        return false;
+
     if (element->hasID() && m_features.idsInRules.contains(element->idForStyleResolution().impl()))
         return false;
-    if (m_element->isFormControlElement() && !canShareStyleWithControl(element))
+
+#if ENABLE(STYLE_SCOPED)
+    if (element->hasScopedHTMLStyleChild())
         return false;
+#endif
 
+    bool isControl = element->isFormControlElement();
+
+    if (isControl != m_element->isFormControlElement())
+        return false;
+
+    if (isControl && !canShareStyleWithControl(element))
+        return false;
+
+    if (style->transitions() || style->animations())
+        return false;
+
 #if USE(ACCELERATED_COMPOSITING)
     // Turn off style sharing for elements that can gain layers for reasons outside of the style system.
     // See comments in RenderObject::setStyle().
@@ -1285,21 +1303,14 @@
     if (element->hasClass() && m_element->getAttribute(classAttr) != element->getAttribute(classAttr))
         return false;
 
-    StylePropertySet* additionalAttributeStyleA = element->additionalAttributeStyle();
-    StylePropertySet* additionalAttributeStyleB = m_styledElement->additionalAttributeStyle();
-    if (!additionalAttributeStyleA != !additionalAttributeStyleB)
-        return false;
-
     if (element->attributeStyle() && !attributeStylesEqual(element->attributeStyle(), m_styledElement->attributeStyle()))
         return false;
 
     if (additionalAttributeStyleA && !attributeStylesEqual(additionalAttributeStyleA, additionalAttributeStyleB))
         return false;
 
-#if ENABLE(STYLE_SCOPED)
-    if (element->hasScopedHTMLStyleChild())
+    if (element->isLink() && m_elementLinkState != style->insideLink())
         return false;
-#endif
 
     return true;
 }
@@ -2162,7 +2173,7 @@
 
 static inline bool isCommonAttributeSelectorAttribute(const QualifiedName& attribute)
 {
-    // These are explicitly tested for equality in canShareStyleWithControl.
+    // These are explicitly tested for equality in canShareStyleWithElement.
     return attribute == typeAttr || attribute == readonlyAttr;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to