Changeset 107193 in webkit


Ignore:
Timestamp:
Feb 9, 2012 1:03:38 AM (12 years ago)
Author:
kling@webkit.org
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):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r107191 r107193  
     12012-02-09  Andreas Kling  <awesomekling@apple.com>
     2
     3        REGRESSION(r53878): Input elements don't share their styles if the document contains no validity style rules.
     4        <http://webkit.org/b/69400>
     5
     6        Reviewed by Kent Tamura.
     7
     8        Don't reject style sharing candidates prematurely just because the document doesn't
     9        have any :valid or :invalid selectors.
     10
     11        * css/CSSStyleSelector.cpp:
     12        (WebCore::CSSStyleSelector::canShareStyleWithControl):
     13
    1142012-02-09  Kentaro Hara  <haraken@chromium.org>
    215
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r107185 r107193  
    11751175        return false;
    11761176
    1177     if (!m_element->document()->containsValidityStyleRules())
    1178         return false;
    1179 
    1180     bool willValidate = element->willValidate();
    1181 
    1182     if (willValidate != m_element->willValidate())
    1183         return false;
    1184 
    1185     if (willValidate && (element->isValidFormControlElement() != m_element->isValidFormControlElement()))
    1186         return false;
    1187 
    1188     if (element->isInRange() != m_element->isInRange())
    1189         return false;
    1190 
    1191     if (element->isOutOfRange() != m_element->isOutOfRange())
    1192         return false;
     1177    if (m_element->document()->containsValidityStyleRules()) {
     1178        bool willValidate = element->willValidate();
     1179
     1180        if (willValidate != m_element->willValidate())
     1181            return false;
     1182
     1183        if (willValidate && (element->isValidFormControlElement() != m_element->isValidFormControlElement()))
     1184            return false;
     1185
     1186        if (element->isInRange() != m_element->isInRange())
     1187            return false;
     1188
     1189        if (element->isOutOfRange() != m_element->isOutOfRange())
     1190            return false;
     1191    }
    11931192
    11941193    return true;
Note: See TracChangeset for help on using the changeset viewer.