Bug 69400

Summary: REGRESSION(r53878): Input elements don't share their styles if the document contains no validity style rules.
Product: WebKit Reporter: Kent Tamura <tkent>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: adele, darin, kling, macpherson, menard, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
tkent: review-
Patch v2 none

Description Kent Tamura 2011-10-04 23:27:17 PDT
http://trac.webkit.org/changeset/53878 introduced an optimization to avoid form control validation.

               if (!m_element->document()->containsValidityStyleRules()) 
 	                return false; 
 
However, this code means that we don't share input element styles if the document contains no validity style rules.
Comment 1 Andreas Kling 2012-02-08 23:57:09 PST
Created attachment 126246 [details]
Patch
Comment 2 Kent Tamura 2012-02-09 00:03:42 PST
Comment on attachment 126246 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=126246&action=review

> Source/WebCore/css/CSSStyleSelector.cpp:1188
>      if (element->isInRange() != m_element->isInRange())
>          return false;

isInRange and isOutOfRange also belong to validity style rules. See SelectorChecker.cpp.
Comment 3 Andreas Kling 2012-02-09 00:51:29 PST
Created attachment 126254 [details]
Patch v2

Even less work in the common case, then  :)
Comment 4 Andreas Kling 2012-02-09 01:03:44 PST
Comment on attachment 126254 [details]
Patch v2

Clearing flags on attachment: 126254

Committed r107193: <http://trac.webkit.org/changeset/107193>
Comment 5 Andreas Kling 2012-02-09 01:03:52 PST
All reviewed patches have been landed.  Closing bug.