Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: third_party/WebKit/Source/core/observer/ResizeObserverEntry.cpp

Issue 2305893002: Fix svg contentrect location (Closed)
Patch Set: forgot to fix c++ tests Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698