Bug 69400 - REGRESSION(r53878): Input elements don't share their styles if the document contains no validity style rules.
Summary: REGRESSION(r53878): Input elements don't share their styles if the document c...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-04 23:27 PDT by Kent Tamura
Modified: 2012-02-09 01:03 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.00 KB, patch)
2012-02-08 23:57 PST, Andreas Kling
tkent: review-
Details | Formatted Diff | Diff
Patch v2 (2.28 KB, patch)
2012-02-09 00:51 PST, Andreas Kling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.