Commit 94374cb6 authored by Fredrik Söderqvist's avatar Fredrik Söderqvist Committed by Commit Bot

Add frame/root element accessor helpers to SVGImage

This abstracts away most of the accesses to the Page object, reducing
the amount of boilerplate a bit. It'll also make it easier to transition
away from the current Page/Document setup to allow sharing some code
with SVG resource documents.

Also add a LayoutRoot() for additional simplification.

Bug: 109212
Change-Id: I7db0e29cbe28cc31c1f1df0546a3266abf6141e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2544970Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#829157}
parent 56d2702c
...@@ -41,10 +41,13 @@ ...@@ -41,10 +41,13 @@
namespace blink { namespace blink {
class Document; class Document;
class LayoutSVGRoot;
class LocalFrame;
class Page; class Page;
class PaintController; class PaintController;
class SVGImageChromeClient; class SVGImageChromeClient;
class SVGImageForContainer; class SVGImageForContainer;
class SVGSVGElement;
struct IntrinsicSizingInfo; struct IntrinsicSizingInfo;
// SVGImage does not use Skia to draw images (as BitmapImage does) but instead // SVGImage does not use Skia to draw images (as BitmapImage does) but instead
...@@ -203,6 +206,10 @@ class CORE_EXPORT SVGImage final : public Image { ...@@ -203,6 +206,10 @@ class CORE_EXPORT SVGImage final : public Image {
void LoadCompleted(); void LoadCompleted();
void NotifyAsyncLoadCompleted(); void NotifyAsyncLoadCompleted();
LocalFrame* GetFrame() const;
SVGSVGElement* RootElement() const;
LayoutSVGRoot* LayoutRoot() const;
class SVGImageLocalFrameClient; class SVGImageLocalFrameClient;
Persistent<SVGImageChromeClient> chrome_client_; Persistent<SVGImageChromeClient> chrome_client_;
......
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