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

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

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed html import issue. 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
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(m_sheet.get(), 60 document().styleEngine().mediaQueriesChangedInScope(treeScope());
61 FullStyleUpdate);
62 } else { 61 } else {
63 HTMLElement::parseAttribute(name, oldValue, value); 62 HTMLElement::parseAttribute(name, oldValue, value);
64 } 63 }
65 } 64 }
66 65
67 void HTMLStyleElement::finishParsingChildren() { 66 void HTMLStyleElement::finishParsingChildren() {
68 StyleElement::ProcessingResult result = 67 StyleElement::ProcessingResult result =
69 StyleElement::finishParsingChildren(*this); 68 StyleElement::finishParsingChildren(*this);
70 HTMLElement::finishParsingChildren(); 69 HTMLElement::finishParsingChildren();
71 if (result == StyleElement::ProcessingFatalError) 70 if (result == StyleElement::ProcessingFatalError)
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (CSSStyleSheet* styleSheet = sheet()) 138 if (CSSStyleSheet* styleSheet = sheet())
140 styleSheet->setDisabled(setDisabled); 139 styleSheet->setDisabled(setDisabled);
141 } 140 }
142 141
143 DEFINE_TRACE(HTMLStyleElement) { 142 DEFINE_TRACE(HTMLStyleElement) {
144 StyleElement::trace(visitor); 143 StyleElement::trace(visitor);
145 HTMLElement::trace(visitor); 144 HTMLElement::trace(visitor);
146 } 145 }
147 146
148 } // namespace blink 147 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLLinkElement.cpp ('k') | third_party/WebKit/Source/core/html/LinkStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698