Commit 3f69455f authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Remove ComputedStyle argument to SVGResourcesCache::ClientWasAddedToTree

It's always the ComputedStyle of the LayoutObject passed as the first
argument.

Bug: 1028063
Change-Id: I3f87f42ae51d5d6013b71989054e0594f55a283b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2083306Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#746386}
parent 3608445d
......@@ -84,7 +84,7 @@ void LayoutSVGContainer::UpdateLayout() {
void LayoutSVGContainer::AddChild(LayoutObject* child,
LayoutObject* before_child) {
LayoutSVGModelObject::AddChild(child, before_child);
SVGResourcesCache::ClientWasAddedToTree(*child, child->StyleRef());
SVGResourcesCache::ClientWasAddedToTree(*child);
bool should_isolate_descendants =
(child->IsBlendingAllowed() && child->StyleRef().HasBlendMode()) ||
......
......@@ -145,7 +145,7 @@ void LayoutSVGInline::StyleDidChange(StyleDifference diff,
void LayoutSVGInline::AddChild(LayoutObject* child,
LayoutObject* before_child) {
LayoutInline::AddChild(child, before_child);
SVGResourcesCache::ClientWasAddedToTree(*child, child->StyleRef());
SVGResourcesCache::ClientWasAddedToTree(*child);
if (LayoutSVGText* text_layout_object =
LayoutSVGText::LocateLayoutSVGTextAncestor(this))
......
......@@ -336,7 +336,7 @@ bool LayoutSVGRoot::IsChildAllowed(LayoutObject* child,
void LayoutSVGRoot::AddChild(LayoutObject* child, LayoutObject* before_child) {
LayoutReplaced::AddChild(child, before_child);
SVGResourcesCache::ClientWasAddedToTree(*child, child->StyleRef());
SVGResourcesCache::ClientWasAddedToTree(*child);
bool should_isolate_descendants =
(child->IsBlendingAllowed() && child->StyleRef().HasBlendMode()) ||
......@@ -383,7 +383,7 @@ void LayoutSVGRoot::DescendantIsolationRequirementsChanged(
void LayoutSVGRoot::InsertedIntoTree() {
LayoutReplaced::InsertedIntoTree();
SVGResourcesCache::ClientWasAddedToTree(*this, StyleRef());
SVGResourcesCache::ClientWasAddedToTree(*this);
}
void LayoutSVGRoot::WillBeRemovedFromTree() {
......
......@@ -428,7 +428,7 @@ bool LayoutSVGText::IsObjectBoundingBoxValid() const {
void LayoutSVGText::AddChild(LayoutObject* child, LayoutObject* before_child) {
LayoutSVGBlock::AddChild(child, before_child);
SVGResourcesCache::ClientWasAddedToTree(*child, child->StyleRef());
SVGResourcesCache::ClientWasAddedToTree(*child);
SubtreeChildWasAdded();
}
......
......@@ -194,8 +194,7 @@ void SVGResourcesCache::ResourceReferenceChanged(LayoutObject& layout_object) {
layout_object, true);
}
void SVGResourcesCache::ClientWasAddedToTree(LayoutObject& layout_object,
const ComputedStyle& new_style) {
void SVGResourcesCache::ClientWasAddedToTree(LayoutObject& layout_object) {
if (!layout_object.GetNode())
return;
LayoutSVGResourceContainer::MarkForLayoutAndParentResourceInvalidation(
......@@ -204,7 +203,8 @@ void SVGResourcesCache::ClientWasAddedToTree(LayoutObject& layout_object,
if (!LayoutObjectCanHaveResources(layout_object))
return;
SVGResourcesCache& cache = ResourcesCache(layout_object.GetDocument());
if (cache.AddResourcesFromLayoutObject(layout_object, new_style))
if (cache.AddResourcesFromLayoutObject(layout_object,
layout_object.StyleRef()))
layout_object.SetNeedsPaintPropertyUpdate();
}
......
......@@ -42,8 +42,7 @@ class SVGResourcesCache {
static SVGResources* CachedResourcesForLayoutObject(const LayoutObject&);
// Called from all SVG layoutObjects addChild() methods.
static void ClientWasAddedToTree(LayoutObject&,
const ComputedStyle& new_style);
static void ClientWasAddedToTree(LayoutObject&);
// Called from all SVG layoutObjects removeChild() methods.
static void ClientWillBeRemovedFromTree(LayoutObject&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment