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

Unified Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp

Issue 1647313003: Continue converting to explicit LayoutUnit constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@explicitContstructors
Patch Set: Add TODO 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/svg/LayoutSVGRoot.cpp
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
index 708a8dc18ca6782163acfb6a0877c2077ca15e44..b5496403fdde5c3789f9d799c568bb407dc29dab 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -50,9 +50,9 @@ LayoutSVGRoot::LayoutSVGRoot(SVGElement* node)
{
LayoutSize intrinsicSize(calculateIntrinsicSize());
if (!intrinsicSize.width())
- intrinsicSize.setWidth(defaultWidth);
+ intrinsicSize.setWidth(LayoutUnit(defaultWidth));
if (!intrinsicSize.height())
- intrinsicSize.setHeight(defaultHeight);
+ intrinsicSize.setHeight(LayoutUnit(defaultHeight));
setIntrinsicSize(intrinsicSize);
}
@@ -117,7 +117,7 @@ LayoutUnit LayoutSVGRoot::computeReplacedLogicalWidth(ShouldComputePreferred sho
{
// When we're embedded through SVGImage (border-image/background-image/<html:img>/...) we're forced to resize to a specific size.
if (!m_containerSize.isEmpty())
- return m_containerSize.width();
+ return LayoutUnit(m_containerSize.width());
if (isEmbeddedThroughFrameContainingSVGDocument())
return containingBlock()->availableLogicalWidth();
@@ -129,7 +129,7 @@ LayoutUnit LayoutSVGRoot::computeReplacedLogicalHeight() const
{
// When we're embedded through SVGImage (border-image/background-image/<html:img>/...) we're forced to resize to a specific size.
if (!m_containerSize.isEmpty())
- return m_containerSize.height();
+ return LayoutUnit(m_containerSize.height());
if (isEmbeddedThroughFrameContainingSVGDocument())
return containingBlock()->availableLogicalHeight(IncludeMarginBorderPadding);

Powered by Google App Engine
This is Rietveld 408576698