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

Unified Diff: sky/engine/core/html/HTMLStyleElement.cpp

Issue 789603003: Remove candidate tracking bit from <style>. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/core/html/HTMLStyleElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLStyleElement.cpp
diff --git a/sky/engine/core/html/HTMLStyleElement.cpp b/sky/engine/core/html/HTMLStyleElement.cpp
index 796fb7f6fe966fffd3567011c8767f6158decdf0..cfa8c56bdca0a07e90bb01fd3a11a808757e06ec 100644
--- a/sky/engine/core/html/HTMLStyleElement.cpp
+++ b/sky/engine/core/html/HTMLStyleElement.cpp
@@ -38,8 +38,6 @@ namespace blink {
inline HTMLStyleElement::HTMLStyleElement(Document& document)
: HTMLElement(HTMLNames::styleTag, document)
- , m_loading(false)
- , m_registeredAsCandidate(false)
{
}
@@ -89,10 +87,7 @@ void HTMLStyleElement::removedFrom(ContainerNode* insertionPoint)
TreeScope* containingScope = containingShadowRoot();
TreeScope& scope = containingScope ? *containingScope : insertionPoint->treeScope();
- if (m_registeredAsCandidate) {
- document().styleEngine()->removeStyleSheetCandidateNode(this, scopingNode, scope);
- m_registeredAsCandidate = false;
- }
+ document().styleEngine()->removeStyleSheetCandidateNode(this, scopingNode, scope);
RefPtr<CSSStyleSheet> removedSheet = m_sheet.get();
@@ -149,11 +144,9 @@ void HTMLStyleElement::createSheet()
MediaQueryEvaluator screenEval("screen", true);
MediaQueryEvaluator printEval("print", true);
if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.get())) {
- m_loading = true;
const String& text = textFromChildren();
m_sheet = document().styleEngine()->createSheet(this, text);
m_sheet->setMediaQueries(mediaQueries.release());
- m_loading = false;
}
document().styleResolverChanged();
@@ -177,7 +170,6 @@ void HTMLStyleElement::processStyleSheet()
ASSERT(inDocument());
- m_registeredAsCandidate = true;
document().styleEngine()->addStyleSheetCandidateNode(this, false);
process();
}
« no previous file with comments | « sky/engine/core/html/HTMLStyleElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698