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

Unified Diff: third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp

Issue 2056303002: [Layout API] Use Document::layoutViewItem() in ViewportStyleResolver (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: changed both declarations to const ref as per rune Created 4 years, 6 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/css/CSSToLengthConversionData.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp b/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp
index f34b0ea19ac82159af6cfc063ceffb2302588a4e..8fe2a1719d832f8444a609060f6399f2eb11e9c6 100644
--- a/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp
+++ b/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp
@@ -31,7 +31,7 @@
#include "core/css/CSSToLengthConversionData.h"
#include "core/css/CSSHelper.h"
-#include "core/layout/LayoutView.h"
+#include "core/layout/api/LayoutViewItem.h"
#include "core/style/ComputedStyle.h"
namespace blink {
@@ -67,8 +67,8 @@ float CSSToLengthConversionData::FontSizes::ch() const
return m_font->getFontMetrics().zeroWidth();
}
-CSSToLengthConversionData::ViewportSize::ViewportSize(const LayoutView* layoutView)
- : m_size(layoutView ? layoutView->viewportSizeForViewportUnits() : DoubleSize())
+CSSToLengthConversionData::ViewportSize::ViewportSize(const LayoutViewItem& layoutViewItem)
+ : m_size(!layoutViewItem.isNull() ? layoutViewItem.viewportSizeForViewportUnits() : DoubleSize())
{
}
@@ -81,8 +81,8 @@ CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style,
ASSERT(m_style);
}
-CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style, const ComputedStyle* rootStyle, const LayoutView* layoutView, float zoom)
- : CSSToLengthConversionData(style, FontSizes(style, rootStyle), ViewportSize(layoutView), zoom)
+CSSToLengthConversionData::CSSToLengthConversionData(const ComputedStyle* style, const ComputedStyle* rootStyle, const LayoutViewItem& layoutViewItem, float zoom)
+ : CSSToLengthConversionData(style, FontSizes(style, rootStyle), ViewportSize(layoutViewItem), zoom)
{
}

Powered by Google App Engine
This is Rietveld 408576698