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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 1656743002: Removing more implicit LayoutUnit construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index ca26c3a84ea164370ea571e173280d8176941f07..0b3c3d0d0653ab2533bc21f9cb9b304596400990 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -95,8 +95,8 @@ LayoutView::LayoutView(Document* document)
// init LayoutObject attributes
setInline(false);
- m_minPreferredLogicalWidth = 0;
- m_maxPreferredLogicalWidth = 0;
+ m_minPreferredLogicalWidth = LayoutUnit();
+ m_maxPreferredLogicalWidth = LayoutUnit();
setPreferredLogicalWidthsDirty(MarkOnlyThis);
@@ -163,12 +163,12 @@ void LayoutView::clearHitTestCache()
void LayoutView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, LogicalExtentComputedValues& computedValues) const
{
- computedValues.m_extent = viewLogicalHeightForBoxSizing();
+ computedValues.m_extent = LayoutUnit(viewLogicalHeightForBoxSizing());
}
void LayoutView::updateLogicalWidth()
{
- setLogicalWidth(viewLogicalWidthForBoxSizing());
+ setLogicalWidth(LayoutUnit(viewLogicalWidthForBoxSizing()));
}
bool LayoutView::isChildAllowed(LayoutObject* child, const ComputedStyle&) const
@@ -237,7 +237,7 @@ bool LayoutView::doingFullPaintInvalidation() const
void LayoutView::layout()
{
if (!document().paginated())
- setPageLogicalHeight(0);
+ setPageLogicalHeight(LayoutUnit());
if (pageLogicalHeight() && shouldUsePrintingLayout()) {
m_minPreferredLogicalWidth = m_maxPreferredLogicalWidth = logicalWidth();
@@ -904,7 +904,7 @@ LayoutUnit LayoutView::viewLogicalHeightForPercentages() const
{
if (shouldUsePrintingLayout())
return pageLogicalHeight();
- return viewLogicalHeight();
+ return LayoutUnit(viewLogicalHeight());
}
float LayoutView::zoomFactor() const

Powered by Google App Engine
This is Rietveld 408576698