Commit 52e99ca7 authored by Fredrik Söderqvist's avatar Fredrik Söderqvist Committed by Commit Bot

Remove non-static SVGDocumentExtensions::rootElement()

This is just an alias for documentElement(), which should preferably
only be used by the SVGDocument (DOM) property.

Change-Id: I2bae17b4efd30b5be6488166d511879eaa0196b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2509577
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822660}
parent c6dba38d
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
#include "third_party/blink/renderer/core/svg/animation/smil_time_container.h" #include "third_party/blink/renderer/core/svg/animation/smil_time_container.h"
#include "third_party/blink/renderer/core/svg/graphics/svg_image_chrome_client.h" #include "third_party/blink/renderer/core/svg/graphics/svg_image_chrome_client.h"
#include "third_party/blink/renderer/core/svg/svg_animated_preserve_aspect_ratio.h" #include "third_party/blink/renderer/core/svg/svg_animated_preserve_aspect_ratio.h"
#include "third_party/blink/renderer/core/svg/svg_document_extensions.h"
#include "third_party/blink/renderer/core/svg/svg_fe_image_element.h" #include "third_party/blink/renderer/core/svg/svg_fe_image_element.h"
#include "third_party/blink/renderer/core/svg/svg_image_element.h" #include "third_party/blink/renderer/core/svg/svg_image_element.h"
#include "third_party/blink/renderer/core/svg/svg_svg_element.h" #include "third_party/blink/renderer/core/svg/svg_svg_element.h"
...@@ -224,8 +223,8 @@ bool SVGImage::CurrentFrameHasSingleSecurityOrigin() const { ...@@ -224,8 +223,8 @@ bool SVGImage::CurrentFrameHasSingleSecurityOrigin() const {
CheckLoaded(); CheckLoaded();
SVGSVGElement* root_element = auto* root_element =
frame->GetDocument()->AccessSVGExtensions().rootElement(); DynamicTo<SVGSVGElement>(frame->GetDocument()->documentElement());
if (!root_element) if (!root_element)
return true; return true;
...@@ -252,7 +251,7 @@ static SVGSVGElement* SvgRootElement(Page* page) { ...@@ -252,7 +251,7 @@ static SVGSVGElement* SvgRootElement(Page* page) {
if (!page) if (!page)
return nullptr; return nullptr;
auto* frame = To<LocalFrame>(page->MainFrame()); auto* frame = To<LocalFrame>(page->MainFrame());
return frame->GetDocument()->AccessSVGExtensions().rootElement(); return DynamicTo<SVGSVGElement>(frame->GetDocument()->documentElement());
} }
LayoutSize SVGImage::ContainerSize() const { LayoutSize SVGImage::ContainerSize() const {
......
...@@ -157,11 +157,6 @@ SVGSVGElement* SVGDocumentExtensions::rootElement(const Document& document) { ...@@ -157,11 +157,6 @@ SVGSVGElement* SVGDocumentExtensions::rootElement(const Document& document) {
return DynamicTo<SVGSVGElement>(document.documentElement()); return DynamicTo<SVGSVGElement>(document.documentElement());
} }
SVGSVGElement* SVGDocumentExtensions::rootElement() const {
DCHECK(document_);
return rootElement(*document_);
}
void SVGDocumentExtensions::Trace(Visitor* visitor) const { void SVGDocumentExtensions::Trace(Visitor* visitor) const {
visitor->Trace(document_); visitor->Trace(document_);
visitor->Trace(time_containers_); visitor->Trace(time_containers_);
......
...@@ -69,7 +69,6 @@ class CORE_EXPORT SVGDocumentExtensions final ...@@ -69,7 +69,6 @@ class CORE_EXPORT SVGDocumentExtensions final
void UpdatePan(const FloatPoint& pos) const; void UpdatePan(const FloatPoint& pos) const;
static SVGSVGElement* rootElement(const Document&); static SVGSVGElement* rootElement(const Document&);
SVGSVGElement* rootElement() const;
void Trace(Visitor*) const; void Trace(Visitor*) const;
......
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