Commit 2b2ffd95 authored by Fredrik Söderqvist's avatar Fredrik Söderqvist Committed by Commit Bot

Drop unnecessary Children() accessor from LayoutSVG{Container,Root}

Change-Id: I4187fdbbb265aab9d679781130c923936a4ad9b9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2494884
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820227}
parent cd21501f
...@@ -43,13 +43,13 @@ class LayoutSVGContainer : public LayoutSVGModelObject { ...@@ -43,13 +43,13 @@ class LayoutSVGContainer : public LayoutSVGModelObject {
LayoutObject* FirstChild() const { LayoutObject* FirstChild() const {
NOT_DESTROYED(); NOT_DESTROYED();
DCHECK_EQ(Children(), VirtualChildren()); DCHECK_EQ(&content_.Children(), VirtualChildren());
return Children()->FirstChild(); return content_.Children().FirstChild();
} }
LayoutObject* LastChild() const { LayoutObject* LastChild() const {
NOT_DESTROYED(); NOT_DESTROYED();
DCHECK_EQ(Children(), VirtualChildren()); DCHECK_EQ(&content_.Children(), VirtualChildren());
return Children()->LastChild(); return content_.Children().LastChild();
} }
void Paint(const PaintInfo&) const override; void Paint(const PaintInfo&) const override;
...@@ -82,11 +82,11 @@ class LayoutSVGContainer : public LayoutSVGModelObject { ...@@ -82,11 +82,11 @@ class LayoutSVGContainer : public LayoutSVGModelObject {
protected: protected:
LayoutObjectChildList* VirtualChildren() final { LayoutObjectChildList* VirtualChildren() final {
NOT_DESTROYED(); NOT_DESTROYED();
return Children(); return &content_.Children();
} }
const LayoutObjectChildList* VirtualChildren() const final { const LayoutObjectChildList* VirtualChildren() const final {
NOT_DESTROYED(); NOT_DESTROYED();
return Children(); return &content_.Children();
} }
SVGContentContainer& Content() { return content_; } SVGContentContainer& Content() { return content_; }
...@@ -119,15 +119,6 @@ class LayoutSVGContainer : public LayoutSVGModelObject { ...@@ -119,15 +119,6 @@ class LayoutSVGContainer : public LayoutSVGModelObject {
void DescendantIsolationRequirementsChanged(DescendantIsolationState) final; void DescendantIsolationRequirementsChanged(DescendantIsolationState) final;
private: private:
const LayoutObjectChildList* Children() const {
NOT_DESTROYED();
return &content_.Children();
}
LayoutObjectChildList* Children() {
NOT_DESTROYED();
return &content_.Children();
}
SVGContentContainer content_; SVGContentContainer content_;
// TODO(fs): Some of this state can move to the "child list" object. // TODO(fs): Some of this state can move to the "child list" object.
FloatRect object_bounding_box_; FloatRect object_bounding_box_;
......
...@@ -48,13 +48,13 @@ class CORE_EXPORT LayoutSVGRoot final : public LayoutReplaced { ...@@ -48,13 +48,13 @@ class CORE_EXPORT LayoutSVGRoot final : public LayoutReplaced {
LayoutObject* FirstChild() const { LayoutObject* FirstChild() const {
NOT_DESTROYED(); NOT_DESTROYED();
DCHECK_EQ(Children(), VirtualChildren()); DCHECK_EQ(&content_.Children(), VirtualChildren());
return Children()->FirstChild(); return content_.Children().FirstChild();
} }
LayoutObject* LastChild() const { LayoutObject* LastChild() const {
NOT_DESTROYED(); NOT_DESTROYED();
DCHECK_EQ(Children(), VirtualChildren()); DCHECK_EQ(&content_.Children(), VirtualChildren());
return Children()->LastChild(); return content_.Children().LastChild();
} }
bool IsLayoutSizeChanged() const { bool IsLayoutSizeChanged() const {
...@@ -123,22 +123,13 @@ class CORE_EXPORT LayoutSVGRoot final : public LayoutReplaced { ...@@ -123,22 +123,13 @@ class CORE_EXPORT LayoutSVGRoot final : public LayoutReplaced {
} }
LayoutRect ComputeContentsVisualOverflow() const; LayoutRect ComputeContentsVisualOverflow() const;
const LayoutObjectChildList* Children() const {
NOT_DESTROYED();
return &content_.Children();
}
LayoutObjectChildList* Children() {
NOT_DESTROYED();
return &content_.Children();
}
LayoutObjectChildList* VirtualChildren() override { LayoutObjectChildList* VirtualChildren() override {
NOT_DESTROYED(); NOT_DESTROYED();
return Children(); return &content_.Children();
} }
const LayoutObjectChildList* VirtualChildren() const override { const LayoutObjectChildList* VirtualChildren() const override {
NOT_DESTROYED(); NOT_DESTROYED();
return Children(); return &content_.Children();
} }
bool IsOfType(LayoutObjectType type) const override { bool IsOfType(LayoutObjectType type) const override {
......
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