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

Unified Diff: third_party/WebKit/Source/core/svg/SVGElement.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/svg/SVGElement.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGElement.cpp
index 9f3bfab09d1e1ce0d3f74bf11fb872f7bb6b978b..3fb5098a62785d758dacb9bca141bb46ccb93f31 100644
--- a/third_party/WebKit/Source/core/svg/SVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGElement.cpp
@@ -73,7 +73,7 @@ SVGElement::SVGElement(const QualifiedName& tagName, Document& document, Constru
SVGElement::~SVGElement()
{
- ASSERT(inShadowIncludingDocument() || !hasRelativeLengths());
+ ASSERT(isConnected() || !hasRelativeLengths());
}
void SVGElement::detach(const AttachContext& context)
@@ -110,7 +110,7 @@ void SVGElement::willRecalcStyle(StyleRecalcChange change)
void SVGElement::buildPendingResourcesIfNeeded()
{
Document& document = this->document();
- if (!needsPendingResourceHandling() || !inShadowIncludingDocument() || inUseShadowTree())
+ if (!needsPendingResourceHandling() || !isConnected() || inUseShadowTree())
return;
SVGDocumentExtensions& extensions = document.accessSVGExtensions();
@@ -286,7 +286,7 @@ Node::InsertionNotificationRequest SVGElement::insertedInto(ContainerNode* rootP
void SVGElement::removedFrom(ContainerNode* rootParent)
{
- bool wasInDocument = rootParent->inShadowIncludingDocument();
+ bool wasInDocument = rootParent->isConnected();
if (wasInDocument && hasRelativeLengths()) {
// The root of the subtree being removed should take itself out from its parent's relative
@@ -405,7 +405,7 @@ void SVGElement::updateRelativeLengthsInformation(bool clientHasRelativeLengths,
ASSERT(clientElement);
// If we're not yet in a document, this function will be called again from insertedInto(). Do nothing now.
- if (!inShadowIncludingDocument())
+ if (!isConnected())
return;
// An element wants to notify us that its own relative lengths state changed.
@@ -443,7 +443,7 @@ void SVGElement::updateRelativeLengthsInformation(bool clientHasRelativeLengths,
void SVGElement::invalidateRelativeLengthClients(SubtreeLayoutScope* layoutScope)
{
- if (!inShadowIncludingDocument())
+ if (!isConnected())
return;
ASSERT(!m_inRelativeLengthClientsInvalidation);
@@ -846,7 +846,7 @@ void SVGElement::svgAttributeChanged(const QualifiedName& attrName)
// Notify resources about id changes, this is important as we cache resources by id in SVGDocumentExtensions
if (object && object->isSVGResourceContainer())
toLayoutSVGResourceContainer(object)->idChanged();
- if (inShadowIncludingDocument())
+ if (isConnected())
buildPendingResourcesIfNeeded();
invalidateInstances();
return;
@@ -973,7 +973,7 @@ void SVGElement::invalidateInstances()
instance->setCorrespondingElement(0);
if (SVGUseElement* element = instance->correspondingUseElement()) {
- if (element->inShadowIncludingDocument())
+ if (element->isConnected())
element->invalidateShadowTree();
}
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGDocumentExtensions.cpp ('k') | third_party/WebKit/Source/core/svg/SVGFEImageElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698