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

Unified Diff: Source/core/dom/StyleElement.cpp

Issue 975933002: Return reference from styleEngine() accessor. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.cpp ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/StyleElement.cpp
diff --git a/Source/core/dom/StyleElement.cpp b/Source/core/dom/StyleElement.cpp
index 6a39476395d310129cf768431827f0e06e18a0be..112e68c90e6f22b6d5112573090019d7d3cc1a94 100644
--- a/Source/core/dom/StyleElement.cpp
+++ b/Source/core/dom/StyleElement.cpp
@@ -68,7 +68,7 @@ void StyleElement::processStyleSheet(Document& document, Element* element)
ASSERT(element->inDocument());
m_registeredAsCandidate = true;
- document.styleEngine()->addStyleSheetCandidateNode(element, m_createdByParser);
+ document.styleEngine().addStyleSheetCandidateNode(element, m_createdByParser);
if (m_createdByParser)
return;
@@ -97,7 +97,7 @@ void StyleElement::removedFrom(Element* element, ContainerNode* insertionPoint)
Document& document = element->document();
if (m_registeredAsCandidate) {
- document.styleEngine()->removeStyleSheetCandidateNode(element, shadowRoot ? *toTreeScope(shadowRoot) : toTreeScope(document));
+ document.styleEngine().removeStyleSheetCandidateNode(element, shadowRoot ? *toTreeScope(shadowRoot) : toTreeScope(document));
m_registeredAsCandidate = false;
}
@@ -117,7 +117,7 @@ void StyleElement::clearDocumentData(Document& document, Element* element)
if (element->inDocument()) {
// HTMLLinkElement in shadow tree is not supported.
TreeScope& treeScope = isHTMLStyleElement(element) || isSVGStyleElement(element) ? element->treeScope() : element->document();
- document.styleEngine()->removeStyleSheetCandidateNode(element, treeScope);
+ document.styleEngine().removeStyleSheetCandidateNode(element, treeScope);
}
}
@@ -149,7 +149,7 @@ void StyleElement::clearSheet(Element* ownerElement)
ASSERT(m_sheet);
if (ownerElement && m_sheet->isLoading())
- ownerElement->document().styleEngine()->removePendingSheet(ownerElement);
+ ownerElement->document().styleEngine().removePendingSheet(ownerElement);
m_sheet.release()->clearOwnerNode();
}
@@ -193,7 +193,7 @@ void StyleElement::createSheet(Element* e, const String& text)
if (screenEval.eval(mediaQueries.get()) || printEval.eval(mediaQueries.get())) {
m_loading = true;
TextPosition startPosition = m_startPosition == TextPosition::belowRangePosition() ? TextPosition::minimumPosition() : m_startPosition;
- m_sheet = document.styleEngine()->createSheet(e, text, startPosition, m_createdByParser);
+ m_sheet = document.styleEngine().createSheet(e, text, startPosition, m_createdByParser);
m_sheet->setMediaQueries(mediaQueries.release());
m_loading = false;
}
@@ -215,13 +215,13 @@ bool StyleElement::sheetLoaded(Document& document)
if (isLoading())
return false;
- document.styleEngine()->removePendingSheet(m_sheet->ownerNode());
+ document.styleEngine().removePendingSheet(m_sheet->ownerNode());
return true;
}
void StyleElement::startLoadingDynamicSheet(Document& document)
{
- document.styleEngine()->addPendingSheet();
+ document.styleEngine().addPendingSheet();
}
DEFINE_TRACE(StyleElement)
« no previous file with comments | « Source/core/dom/ShadowTreeStyleSheetCollection.cpp ('k') | Source/core/dom/StyleEngine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698