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

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

Issue 1858163002: Rename inDocument() to inShadowIncludingDocument() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/dom/StyleElement.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleElement.cpp b/third_party/WebKit/Source/core/dom/StyleElement.cpp
index dfc733e98b3075c4fb5fdc04df62cd9a378dcd70..b96cea5665cd39ae36e4f6143ce9c8ebdd476a16 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -65,7 +65,7 @@ StyleElement::ProcessingResult StyleElement::processStyleSheet(Document& documen
{
TRACE_EVENT0("blink", "StyleElement::processStyleSheet");
ASSERT(element);
- ASSERT(element->inDocument());
+ ASSERT(element->inShadowIncludingDocument());
m_registeredAsCandidate = true;
document.styleEngine().addStyleSheetCandidateNode(element);
@@ -77,7 +77,7 @@ StyleElement::ProcessingResult StyleElement::processStyleSheet(Document& documen
void StyleElement::insertedInto(Element* element, ContainerNode* insertionPoint)
{
- if (!insertionPoint->inDocument() || !element->isInShadowTree())
+ if (!insertionPoint->inShadowIncludingDocument() || !element->isInShadowTree())
return;
if (ShadowRoot* scope = element->containingShadowRoot())
scope->registerScopedHTMLStyleChild();
@@ -85,7 +85,7 @@ void StyleElement::insertedInto(Element* element, ContainerNode* insertionPoint)
void StyleElement::removedFrom(Element* element, ContainerNode* insertionPoint)
{
- if (!insertionPoint->inDocument())
+ if (!insertionPoint->inShadowIncludingDocument())
return;
ShadowRoot* shadowRoot = element->containingShadowRoot();
@@ -115,7 +115,7 @@ void StyleElement::clearDocumentData(Document& document, Element* element)
m_sheet->clearOwnerNode();
if (m_registeredAsCandidate) {
- ASSERT(element->inDocument());
+ ASSERT(element->inShadowIncludingDocument());
document.styleEngine().removeStyleSheetCandidateNode(element, element->treeScope());
m_registeredAsCandidate = false;
}
@@ -140,7 +140,7 @@ StyleElement::ProcessingResult StyleElement::finishParsingChildren(Element* elem
StyleElement::ProcessingResult StyleElement::process(Element* element)
{
- if (!element || !element->inDocument())
+ if (!element || !element->inShadowIncludingDocument())
return ProcessingSuccessful;
return createSheet(element, element->textFromChildren());
}
@@ -173,7 +173,7 @@ static bool shouldBypassMainWorldCSP(Element* element)
StyleElement::ProcessingResult StyleElement::createSheet(Element* e, const String& text)
{
ASSERT(e);
- ASSERT(e->inDocument());
+ ASSERT(e->inShadowIncludingDocument());
Document& document = e->document();
const ContentSecurityPolicy* csp = document.contentSecurityPolicy();
« no previous file with comments | « third_party/WebKit/Source/core/dom/SelectorQuery.cpp ('k') | third_party/WebKit/Source/core/dom/StyleEngine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698