Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp

Issue 2554193002: Make sure media query results are re-collected. (Closed)
Patch Set: Rebased Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngineTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2010 Apple Inc. All rights reserved.
6 * (C) 2007 Rob Buis (buis@kde.org) 6 * (C) 2007 Rob Buis (buis@kde.org)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 } 50 }
51 51
52 void HTMLStyleElement::parseAttribute(const QualifiedName& name, 52 void HTMLStyleElement::parseAttribute(const QualifiedName& name,
53 const AtomicString& oldValue, 53 const AtomicString& oldValue,
54 const AtomicString& value) { 54 const AtomicString& value) {
55 if (name == titleAttr && m_sheet && isInDocumentTree()) { 55 if (name == titleAttr && m_sheet && isInDocumentTree()) {
56 m_sheet->setTitle(value); 56 m_sheet->setTitle(value);
57 } else if (name == mediaAttr && isConnected() && document().isActive() && 57 } else if (name == mediaAttr && isConnected() && document().isActive() &&
58 m_sheet) { 58 m_sheet) {
59 m_sheet->setMediaQueries(MediaQuerySet::create(value)); 59 m_sheet->setMediaQueries(MediaQuerySet::create(value));
60 document().styleEngine().setNeedsActiveStyleUpdate(treeScope()); 60 document().styleEngine().mediaQueriesChangedInScope(treeScope());
61 // TODO(rune@opera.com): resolverChanged() can be removed once stylesheet 61 // TODO(rune@opera.com): resolverChanged() can be removed once stylesheet
62 // updates are async. https://crbug.com/567021 62 // updates are async. https://crbug.com/567021
63 document().styleEngine().resolverChanged(FullStyleUpdate); 63 document().styleEngine().resolverChanged(FullStyleUpdate);
64 } else { 64 } else {
65 HTMLElement::parseAttribute(name, oldValue, value); 65 HTMLElement::parseAttribute(name, oldValue, value);
66 } 66 }
67 } 67 }
68 68
69 void HTMLStyleElement::finishParsingChildren() { 69 void HTMLStyleElement::finishParsingChildren() {
70 StyleElement::ProcessingResult result = 70 StyleElement::ProcessingResult result =
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (CSSStyleSheet* styleSheet = sheet()) 141 if (CSSStyleSheet* styleSheet = sheet())
142 styleSheet->setDisabled(setDisabled); 142 styleSheet->setDisabled(setDisabled);
143 } 143 }
144 144
145 DEFINE_TRACE(HTMLStyleElement) { 145 DEFINE_TRACE(HTMLStyleElement) {
146 StyleElement::trace(visitor); 146 StyleElement::trace(visitor);
147 HTMLElement::trace(visitor); 147 HTMLElement::trace(visitor);
148 } 148 }
149 149
150 } // namespace blink 150 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngineTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698