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 8d925bfc41fbe7ec8a5b0bc99c965472197bda6b..49d951ae560b009fceda4eff5ff362503bb043ca 100644 |
--- a/third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp |
+++ b/third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp |
@@ -11,23 +11,13 @@ |
namespace blink { |
-class ResizeObservation; |
-ResizeObserverEntry::ResizeObserverEntry(Element* target) |
+ResizeObserverEntry::ResizeObserverEntry(Element* target, const LayoutRect& contentRect) |
: 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()); |
+ m_contentRect = ClientRect::create(FloatRect( |
+ FloatPoint(contentRect.location()), |
+ FloatSize(contentRect.size()))); |
} |
DEFINE_TRACE(ResizeObserverEntry) |