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

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

Issue 2149893003: Rename Node::inShadowIncludingDocument() to Node::isConnected() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 4 years, 5 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 8346091bdad678adb8b6d0fd9e9e3d1c0159a647..8b379886e2075cd2ca5b994def791e4178b1528c 100644
--- a/third_party/WebKit/Source/core/dom/StyleElement.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleElement.cpp
@@ -61,7 +61,7 @@ StyleElement::ProcessingResult StyleElement::processStyleSheet(Document& documen
{
TRACE_EVENT0("blink", "StyleElement::processStyleSheet");
DCHECK(element);
- DCHECK(element->inShadowIncludingDocument());
+ DCHECK(element->isConnected());
m_registeredAsCandidate = true;
document.styleEngine().addStyleSheetCandidateNode(element);
@@ -73,7 +73,7 @@ StyleElement::ProcessingResult StyleElement::processStyleSheet(Document& documen
void StyleElement::insertedInto(Element* element, ContainerNode* insertionPoint)
{
- if (!insertionPoint->inShadowIncludingDocument() || !element->isInShadowTree())
+ if (!insertionPoint->isConnected() || !element->isInShadowTree())
return;
if (ShadowRoot* scope = element->containingShadowRoot())
scope->registerScopedHTMLStyleChild();
@@ -81,7 +81,7 @@ void StyleElement::insertedInto(Element* element, ContainerNode* insertionPoint)
void StyleElement::removedFrom(Element* element, ContainerNode* insertionPoint)
{
- if (!insertionPoint->inShadowIncludingDocument())
+ if (!insertionPoint->isConnected())
return;
ShadowRoot* shadowRoot = element->containingShadowRoot();
@@ -111,7 +111,7 @@ void StyleElement::clearDocumentData(Document& document, Element* element)
m_sheet->clearOwnerNode();
if (m_registeredAsCandidate) {
- DCHECK(element->inShadowIncludingDocument());
+ DCHECK(element->isConnected());
document.styleEngine().removeStyleSheetCandidateNode(element, element->treeScope());
m_registeredAsCandidate = false;
}
@@ -136,7 +136,7 @@ StyleElement::ProcessingResult StyleElement::finishParsingChildren(Element* elem
StyleElement::ProcessingResult StyleElement::process(Element* element)
{
- if (!element || !element->inShadowIncludingDocument())
+ if (!element || !element->isConnected())
return ProcessingSuccessful;
return createSheet(element, element->textFromChildren());
}
@@ -169,7 +169,7 @@ static bool shouldBypassMainWorldCSP(Element* element)
StyleElement::ProcessingResult StyleElement::createSheet(Element* e, const String& text)
{
DCHECK(e);
- DCHECK(e->inShadowIncludingDocument());
+ DCHECK(e->isConnected());
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