Title: [107193] trunk/Source/WebCore
- Revision
- 107193
- Author
- [email protected]
- Date
- 2012-02-09 01:03:38 -0800 (Thu, 09 Feb 2012)
Log Message
REGRESSION(r53878): Input elements don't share their styles if the document contains no validity style rules.
<http://webkit.org/b/69400>
Reviewed by Kent Tamura.
Don't reject style sharing candidates prematurely just because the document doesn't
have any :valid or :invalid selectors.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::canShareStyleWithControl):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (107192 => 107193)
--- trunk/Source/WebCore/ChangeLog 2012-02-09 09:03:31 UTC (rev 107192)
+++ trunk/Source/WebCore/ChangeLog 2012-02-09 09:03:38 UTC (rev 107193)
@@ -1,3 +1,16 @@
+2012-02-09 Andreas Kling <[email protected]>
+
+ REGRESSION(r53878): Input elements don't share their styles if the document contains no validity style rules.
+ <http://webkit.org/b/69400>
+
+ Reviewed by Kent Tamura.
+
+ Don't reject style sharing candidates prematurely just because the document doesn't
+ have any :valid or :invalid selectors.
+
+ * css/CSSStyleSelector.cpp:
+ (WebCore::CSSStyleSelector::canShareStyleWithControl):
+
2012-02-09 Kentaro Hara <[email protected]>
Unreviewed. Fixed typo in the following files. [TreatUndefinedAs] => [TreatAsUndefined].
Modified: trunk/Source/WebCore/css/CSSStyleSelector.cpp (107192 => 107193)
--- trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-02-09 09:03:31 UTC (rev 107192)
+++ trunk/Source/WebCore/css/CSSStyleSelector.cpp 2012-02-09 09:03:38 UTC (rev 107193)
@@ -1174,23 +1174,22 @@
if (element->isDefaultButtonForForm() != m_element->isDefaultButtonForForm())
return false;
- if (!m_element->document()->containsValidityStyleRules())
- return false;
+ if (m_element->document()->containsValidityStyleRules()) {
+ bool willValidate = element->willValidate();
- bool willValidate = element->willValidate();
+ if (willValidate != m_element->willValidate())
+ return false;
- if (willValidate != m_element->willValidate())
- return false;
+ if (willValidate && (element->isValidFormControlElement() != m_element->isValidFormControlElement()))
+ return false;
- if (willValidate && (element->isValidFormControlElement() != m_element->isValidFormControlElement()))
- return false;
+ if (element->isInRange() != m_element->isInRange())
+ return false;
- if (element->isInRange() != m_element->isInRange())
- return false;
+ if (element->isOutOfRange() != m_element->isOutOfRange())
+ return false;
+ }
- if (element->isOutOfRange() != m_element->isOutOfRange())
- return false;
-
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes