Changeset 154284 in webkit


Ignore:
Timestamp:
Aug 19, 2013 10:42:47 AM (11 years ago)
Author:
Antti Koivisto
Message:

<https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing

Reviewed by Dan Bernstein.

  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r154283 r154284  
     12013-08-19  Antti Koivisto  <antti@apple.com>
     2
     3        <https://webkit.org/b/120014> REGRESSION(r154268): Some stylesheet media attribute tests failing
     4
     5        Reviewed by Dan Bernstein.
     6
     7        * html/HTMLStyleElement.cpp:
     8        (WebCore::HTMLStyleElement::parseAttribute): Always set the media on InlineStyleSheetOwner.
     9
    1102013-08-19  Chris Fleizach  <cfleizach@apple.com>
    211
  • trunk/Source/WebCore/html/HTMLStyleElement.cpp

    r154271 r154284  
    7777    else if (name == scopedAttr && ContextFeatures::styleScopedEnabled(document()))
    7878        scopedAttributeChanged(!value.isNull());
    79     else if (name == mediaAttr && inDocument() && document()->renderer() && sheet()) {
     79    else if (name == mediaAttr) {
    8080        m_styleSheetOwner.setMedia(value);
    81         sheet()->setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(value));
    82         document()->styleResolverChanged(RecalcStyleImmediately);
     81        if (sheet()) {
     82            sheet()->setMediaQueries(MediaQuerySet::createAllowingDescriptionSyntax(value));
     83            if (inDocument() && document()->renderer())
     84                document()->styleResolverChanged(RecalcStyleImmediately);
     85        }
    8386    } else if (name == typeAttr)
    8487        m_styleSheetOwner.setContentType(value);
Note: See TracChangeset for help on using the changeset viewer.