Ignore:
Timestamp:
Sep 17, 2013, 1:13:32 AM (12 years ago)
Author:
[email protected]
Message:

Move <style scoped> code behind ENABLE(STYLE_SCOPED)
<https://webkit.org/b/121018>

Reviewed by Darin Adler.

Move all the code for <style scoped> behind ENABLE(STYLE_SCOPED) guards.
It's not nice to clutter common codepaths with code that always executes
even though the feature is disabled at compile-time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r155496 r155931  
    464464    if (!parent || !parent->isStyledElement())
    465465        return 0;
     466#if ENABLE(STYLE_SCOPED)
    466467    if (parent->hasScopedHTMLStyleChild())
    467468        return 0;
     469#endif
    468470    StyledElement* p = static_cast<StyledElement*>(parent);
    469471    if (p->inlineStyle())
     
    655657    if (element->hasID() && m_ruleSets.features().idsInRules.contains(element->idForStyleResolution().impl()))
    656658        return false;
     659#if ENABLE(STYLE_SCOPED)
    657660    if (element->hasScopedHTMLStyleChild())
    658661        return false;
     662#endif
    659663
    660664    // FIXME: We should share style for option and optgroup whenever possible.
     
    740744    if (parentElementPreventsSharing(state.element()->parentElement()))
    741745        return 0;
     746#if ENABLE(STYLE_SCOPED)
    742747    if (state.styledElement()->hasScopedHTMLStyleChild())
    743748        return 0;
     749#endif
    744750    if (state.element() == state.document().cssTarget())
    745751        return 0;
Note: See TracChangeset for help on using the changeset viewer.