Commit c7069938 authored by esprehn@chromium.org's avatar esprehn@chromium.org

Setting HTMLStyleElement should use RecalcStyleDeferred

Theres no reason to synchronously recalc style whenever you change the
media attribute of a <style>.

Review URL: https://codereview.chromium.org/205463002

git-svn-id: svn://svn.chromium.org/blink/trunk@169596 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 7e1e5f27
...@@ -76,8 +76,7 @@ void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicStr ...@@ -76,8 +76,7 @@ void HTMLStyleElement::parseAttribute(const QualifiedName& name, const AtomicStr
scopedAttributeChanged(!value.isNull()); scopedAttributeChanged(!value.isNull());
} else if (name == mediaAttr && inDocument() && document().isActive() && m_sheet) { } else if (name == mediaAttr && inDocument() && document().isActive() && m_sheet) {
m_sheet->setMediaQueries(MediaQuerySet::create(value)); m_sheet->setMediaQueries(MediaQuerySet::create(value));
// FIXME: This shold be RecalcStyleDeferred. document().modifiedStyleSheet(m_sheet.get(), RecalcStyleDeferred);
document().modifiedStyleSheet(m_sheet.get(), RecalcStyleImmediately);
} else { } else {
HTMLElement::parseAttribute(name, value); HTMLElement::parseAttribute(name, value);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment