Title: [134984] trunk/Source/WebCore
- Revision
- 134984
- Author
- akl...@apple.com
- Date
- 2012-11-16 12:23:14 -0800 (Fri, 16 Nov 2012)
Log Message
StyleResolver: Only input elements need equal "readonly" attribute for style sharing.
<http://webkit.org/b/102536>
Reviewed by Antti Koivisto.
Move the comparison of the "readonly" attribute into canShareStyleWithControl() since it's only
relevant for sharing style between <input> elements.
Also skip attribute comparisons for form control elements that share the same ElementAttributeData.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::canShareStyleWithControl):
(WebCore::haveIdenticalStyleAffectingAttributes):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (134983 => 134984)
--- trunk/Source/WebCore/ChangeLog 2012-11-16 20:21:39 UTC (rev 134983)
+++ trunk/Source/WebCore/ChangeLog 2012-11-16 20:23:14 UTC (rev 134984)
@@ -1,3 +1,19 @@
+2012-11-16 Andreas Kling <akl...@apple.com>
+
+ StyleResolver: Only input elements need equal "readonly" attribute for style sharing.
+ <http://webkit.org/b/102536>
+
+ Reviewed by Antti Koivisto.
+
+ Move the comparison of the "readonly" attribute into canShareStyleWithControl() since it's only
+ relevant for sharing style between <input> elements.
+
+ Also skip attribute comparisons for form control elements that share the same ElementAttributeData.
+
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::canShareStyleWithControl):
+ (WebCore::haveIdenticalStyleAffectingAttributes):
+
2012-11-16 Sheriff Bot <webkit.review....@gmail.com>
Unreviewed, rolling out r134867.
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (134983 => 134984)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-16 20:21:39 UTC (rev 134983)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2012-11-16 20:23:14 UTC (rev 134984)
@@ -1083,8 +1083,12 @@
if (!thisInputElement || !otherInputElement)
return false;
- if (thisInputElement->fastGetAttribute(typeAttr) != otherInputElement->fastGetAttribute(typeAttr))
- return false;
+ if (thisInputElement->attributeData() != otherInputElement->attributeData()) {
+ if (thisInputElement->fastGetAttribute(typeAttr) != otherInputElement->fastGetAttribute(typeAttr))
+ return false;
+ if (thisInputElement->fastGetAttribute(readonlyAttr) != otherInputElement->fastGetAttribute(readonlyAttr))
+ return false;
+ }
if (thisInputElement->isAutofilled() != otherInputElement->isAutofilled())
return false;
@@ -1160,8 +1164,6 @@
return false;
if (a->fastGetAttribute(langAttr) != b->fastGetAttribute(langAttr))
return false;
- if (a->fastGetAttribute(readonlyAttr) != b->fastGetAttribute(readonlyAttr))
- return false;
// FIXME: This is probably not necessary.
if (a->fastGetAttribute(cellpaddingAttr) != b->fastGetAttribute(cellpaddingAttr))
return false;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes