| Index: third_party/WebKit/Source/core/dom/ResizeObservation.cpp
|
| diff --git a/third_party/WebKit/Source/core/dom/ResizeObservation.cpp b/third_party/WebKit/Source/core/dom/ResizeObservation.cpp
|
| index d1d201479c5f77e45fb80d4ce6f80e8849bfbcce..916aa3297d4cb518781bf904d9942aa4e2262dff 100644
|
| --- a/third_party/WebKit/Source/core/dom/ResizeObservation.cpp
|
| +++ b/third_party/WebKit/Source/core/dom/ResizeObservation.cpp
|
| @@ -38,14 +38,15 @@ size_t ResizeObservation::TargetDepth() {
|
|
|
| LayoutSize ResizeObservation::ComputeTargetSize() const {
|
| if (target_) {
|
| - if (target_->IsSVGElement() &&
|
| - ToSVGElement(target_)->IsSVGGraphicsElement()) {
|
| - SVGGraphicsElement& svg = ToSVGGraphicsElement(*target_);
|
| - return LayoutSize(svg.GetBBox().Size());
|
| + if (LayoutObject* layout_object = target_->GetLayoutObject()) {
|
| + if (target_->IsSVGElement() &&
|
| + ToSVGElement(target_)->IsSVGGraphicsElement()) {
|
| + SVGGraphicsElement& svg = ToSVGGraphicsElement(*target_);
|
| + return LayoutSize(svg.GetBBox().Size());
|
| + }
|
| + if (layout_object->IsBox())
|
| + return ToLayoutBox(layout_object)->ContentSize();
|
| }
|
| - LayoutBox* layout = target_->GetLayoutBox();
|
| - if (layout)
|
| - return layout->ContentSize();
|
| }
|
| return LayoutSize();
|
| }
|
|
|