| Index: third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp
|
| diff --git a/third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp b/third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp
|
| index e307b8d5e385706b0db70140eec35e6fd9872d6f..8d925bfc41fbe7ec8a5b0bc99c965472197bda6b 100644
|
| --- a/third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp
|
| +++ b/third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp
|
| @@ -5,7 +5,6 @@
|
| #include "core/observer/ResizeObserverEntry.h"
|
|
|
| #include "core/dom/ClientRect.h"
|
| -#include "core/dom/DOMRectReadOnly.h"
|
| #include "core/dom/Element.h"
|
| #include "core/layout/LayoutBox.h"
|
| #include "core/observer/ResizeObservation.h"
|
| @@ -17,6 +16,18 @@ class ResizeObservation;
|
| ResizeObserverEntry::ResizeObserverEntry(Element* target)
|
| : m_target(target)
|
| {
|
| + FloatSize size = FloatSize(ResizeObservation::getTargetSize(m_target));
|
| + FloatPoint location;
|
| + LayoutBox* layout = m_target ? m_target->layoutBox() : nullptr;
|
| + if (layout) {
|
| + location = FloatPoint(layout->paddingLeft(), layout->paddingTop());
|
| + }
|
| + m_contentRect = ClientRect::create(FloatRect(location, size));
|
| +}
|
| +
|
| +LayoutSize ResizeObserverEntry::contentSize() const
|
| +{
|
| + return LayoutSize(m_contentRect->width(), m_contentRect->height());
|
| }
|
|
|
| DEFINE_TRACE(ResizeObserverEntry)
|
|
|