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

Unified Diff: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp

Issue 2623513005: Introduce Element::AttributeModificationParams (Closed)
Patch Set: Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
index c037066adc2f9b28cdf42d92ef91843f2e3554ed..8b7d3d5e3425bd9e2d031572dd665ad0d613bdb9 100644
--- a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
@@ -49,17 +49,16 @@ HTMLStyleElement* HTMLStyleElement::create(Document& document,
return new HTMLStyleElement(document, createdByParser);
}
-void HTMLStyleElement::parseAttribute(const QualifiedName& name,
- const AtomicString& oldValue,
- const AtomicString& value) {
- if (name == titleAttr && m_sheet && isInDocumentTree()) {
- m_sheet->setTitle(value);
- } else if (name == mediaAttr && isConnected() && document().isActive() &&
- m_sheet) {
- m_sheet->setMediaQueries(MediaQuerySet::create(value));
+void HTMLStyleElement::parseAttribute(
+ const AttributeModificationParams& params) {
+ if (params.name == titleAttr && m_sheet && isInDocumentTree()) {
+ m_sheet->setTitle(params.newValue);
+ } else if (params.name == mediaAttr && isConnected() &&
+ document().isActive() && m_sheet) {
+ m_sheet->setMediaQueries(MediaQuerySet::create(params.newValue));
document().styleEngine().mediaQueriesChangedInScope(treeScope());
} else {
- HTMLElement::parseAttribute(name, oldValue, value);
+ HTMLElement::parseAttribute(params);
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLStyleElement.h ('k') | third_party/WebKit/Source/core/html/HTMLTableCellElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698