Changeset 109709 in webkit


Ignore:
Timestamp:
Mar 4, 2012 11:57:36 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r107551.
http://trac.webkit.org/changeset/107551
https://bugs.webkit.org/show_bug.cgi?id=80245

caused incorrect style sharing (Requested by kling on
#webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-03-04

  • css/CSSStyleSelector.cpp:

(WebCore::CSSStyleSelector::collectMatchingRulesForList):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r109706 r109709  
     12012-03-04  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r107551.
     4        http://trac.webkit.org/changeset/107551
     5        https://bugs.webkit.org/show_bug.cgi?id=80245
     6
     7        caused incorrect style sharing (Requested by kling on
     8        #webkit).
     9
     10        * css/CSSStyleSelector.cpp:
     11        (WebCore::CSSStyleSelector::collectMatchingRulesForList):
     12
    1132012-03-04  Luke Macpherson   <macpherson@chromium.org>
    214
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r109706 r109709  
    12491249    }
    12501250
    1251     if (element->fastGetAttribute(typeAttr) != m_element->fastGetAttribute(typeAttr))
    1252         return false;
    1253 
    1254     if (element->fastGetAttribute(readonlyAttr) != m_element->fastGetAttribute(readonlyAttr))
    1255         return false;
    1256 
    1257 
    12581251    return true;
    12591252}
     
    13051298    if (!!element->attributeStyle() != !!m_styledElement->attributeStyle())
    13061299        return false;
     1300    StylePropertySet* additionalAttributeStyleA = element->additionalAttributeStyle();
     1301    StylePropertySet* additionalAttributeStyleB = m_styledElement->additionalAttributeStyle();
     1302    if (!additionalAttributeStyleA != !additionalAttributeStyleB)
     1303        return false;
    13071304    if (element->isLink() != m_element->isLink())
    13081305        return false;
     
    13151312    if (element->focused() != m_element->focused())
    13161313        return false;
     1314    if (element->shadowPseudoId() != m_element->shadowPseudoId())
     1315        return false;
    13171316    if (element == element->document()->cssTarget())
    13181317        return false;
    13191318    if (m_element == m_element->document()->cssTarget())
    13201319        return false;
    1321     if (style->transitions() || style->animations())
     1320    if (element->getAttribute(typeAttr) != m_element->getAttribute(typeAttr))
    13221321        return false;
    1323     if (element->isLink() && m_elementLinkState != style->insideLink())
     1322    if (element->fastGetAttribute(XMLNames::langAttr) != m_element->fastGetAttribute(XMLNames::langAttr))
    13241323        return false;
    1325     if (element->shadowPseudoId() != m_element->shadowPseudoId())
     1324    if (element->fastGetAttribute(langAttr) != m_element->fastGetAttribute(langAttr))
    13261325        return false;
     1326    if (element->fastGetAttribute(readonlyAttr) != m_element->fastGetAttribute(readonlyAttr))
     1327        return false;
     1328    if (element->fastGetAttribute(cellpaddingAttr) != m_element->fastGetAttribute(cellpaddingAttr))
     1329        return false;
     1330
    13271331    if (element->hasID() && m_features.idsInRules.contains(element->idForStyleResolution().impl()))
    13281332        return false;
    1329     if (m_element->isFormControlElement() && !canShareStyleWithControl(element))
     1333
     1334#if ENABLE(STYLE_SCOPED)
     1335    if (element->hasScopedHTMLStyleChild())
     1336        return false;
     1337#endif
     1338
     1339    bool isControl = element->isFormControlElement();
     1340
     1341    if (isControl != m_element->isFormControlElement())
     1342        return false;
     1343
     1344    if (isControl && !canShareStyleWithControl(element))
     1345        return false;
     1346
     1347    if (style->transitions() || style->animations())
    13301348        return false;
    13311349
     
    13481366        return false;
    13491367
    1350     StylePropertySet* additionalAttributeStyleA = element->additionalAttributeStyle();
    1351     StylePropertySet* additionalAttributeStyleB = m_styledElement->additionalAttributeStyle();
    1352     if (!additionalAttributeStyleA != !additionalAttributeStyleB)
    1353         return false;
    1354 
    1355     if (element->fastGetAttribute(XMLNames::langAttr) != m_element->fastGetAttribute(XMLNames::langAttr))
    1356         return false;
    1357     if (element->fastGetAttribute(langAttr) != m_element->fastGetAttribute(langAttr))
    1358         return false;
    1359 
    13601368    if (element->attributeStyle() && !attributeStylesEqual(element->attributeStyle(), m_styledElement->attributeStyle()))
    13611369        return false;
     
    13641372        return false;
    13651373
    1366 #if ENABLE(STYLE_SCOPED)
    1367     if (element->hasScopedHTMLStyleChild())
     1374    if (element->isLink() && m_elementLinkState != style->insideLink())
    13681375        return false;
    1369 #endif
    13701376
    13711377    return true;
     
    22442250static inline bool isCommonAttributeSelectorAttribute(const QualifiedName& attribute)
    22452251{
    2246     // These are explicitly tested for equality in canShareStyleWithControl.
     2252    // These are explicitly tested for equality in canShareStyleWithElement.
    22472253    return attribute == typeAttr || attribute == readonlyAttr;
    22482254}
Note: See TracChangeset for help on using the changeset viewer.