Title: [109709] trunk/Source/WebCore
- Revision
- 109709
- Author
- [email protected]
- Date
- 2012-03-04 23:57:36 -0800 (Sun, 04 Mar 2012)
Log Message
Unreviewed, rolling out r107551.
http://trac.webkit.org/changeset/107551
https://bugs.webkit.org/show_bug.cgi?id=80245
caused incorrect style sharing (Requested by kling on
#webkit).
Patch by Sheriff Bot <[email protected]> on 2012-03-04
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (109708 => 109709)
--- trunk/Source/WebCore/ChangeLog 2012-03-05 07:56:04 UTC (rev 109708)
+++ trunk/Source/WebCore/ChangeLog 2012-03-05 07:57:36 UTC (rev 109709)
@@ -1,3 +1,15 @@
+2012-03-04 Sheriff Bot <[email protected]>
+
+ Unreviewed, rolling out r107551.
+ http://trac.webkit.org/changeset/107551
+ https://bugs.webkit.org/show_bug.cgi?id=80245
+
+ caused incorrect style sharing (Requested by kling on
+ #webkit).
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::collectMatchingRulesForList):
+
2012-03-04 Luke Macpherson <[email protected]>
Remove unused macro HANDLE_INHERIT_AND_INITIAL_AND_PRIMITIVE_WITH_VALUE.
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (109708 => 109709)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-05 07:56:04 UTC (rev 109708)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-03-05 07:57:36 UTC (rev 109709)
@@ -1248,13 +1248,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;
}
@@ -1304,6 +1297,10 @@
#endif
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())
@@ -1314,21 +1311,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().
@@ -1347,26 +1365,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->fastGetAttribute(XMLNames::langAttr) != m_element->fastGetAttribute(XMLNames::langAttr))
- return false;
- if (element->fastGetAttribute(langAttr) != m_element->fastGetAttribute(langAttr))
- 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;
}
@@ -2243,7 +2249,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