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

Unified Diff: Source/core/rendering/RenderBoxModelObject.cpp

Issue 55783002: Introduce BorderImageLength and BorderImageLengthBox (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Moved BorderImageLength{,Box} to core/rendering/style Created 7 years, 1 month 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
« no previous file with comments | « Source/core/css/CSSToStyleMap.cpp ('k') | Source/core/rendering/style/BorderImageLength.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBoxModelObject.cpp
diff --git a/Source/core/rendering/RenderBoxModelObject.cpp b/Source/core/rendering/RenderBoxModelObject.cpp
index 072a4cfce33699283c81cfc7dc0389d869201c0a..91fbba82da3d68608e5ce861d9b97062c4e5bc93 100644
--- a/Source/core/rendering/RenderBoxModelObject.cpp
+++ b/Source/core/rendering/RenderBoxModelObject.cpp
@@ -1148,13 +1148,13 @@ void RenderBoxModelObject::calculateBackgroundImageGeometry(const FillLayer* fil
geometry.setDestOrigin(geometry.destRect().location());
}
-static LayoutUnit computeBorderImageSide(Length borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent, RenderView* renderView)
+static LayoutUnit computeBorderImageSide(const BorderImageLength& borderSlice, LayoutUnit borderSide, LayoutUnit imageSide, LayoutUnit boxExtent, RenderView* renderView)
{
- if (borderSlice.isRelative())
- return borderSlice.value() * borderSide;
- if (borderSlice.isAuto())
+ if (borderSlice.isNumber())
+ return borderSlice.number() * borderSide;
+ if (borderSlice.length().isAuto())
return imageSide;
- return valueForLength(borderSlice, boxExtent, renderView);
+ return valueForLength(borderSlice.length(), boxExtent, renderView);
}
bool RenderBoxModelObject::paintNinePieceImage(GraphicsContext* graphicsContext, const LayoutRect& rect, const RenderStyle* style,
« no previous file with comments | « Source/core/css/CSSToStyleMap.cpp ('k') | Source/core/rendering/style/BorderImageLength.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698