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

Unified Diff: Source/core/css/CSSComputedStyleDeclaration.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/core.gypi ('k') | Source/core/css/CSSToStyleMap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSComputedStyleDeclaration.cpp
diff --git a/Source/core/css/CSSComputedStyleDeclaration.cpp b/Source/core/css/CSSComputedStyleDeclaration.cpp
index 708de220aae6ce962794c098d1eeae3b709b2c27..81714c4b7c8ab1bb70b0c7103bd51828474c1392 100644
--- a/Source/core/css/CSSComputedStyleDeclaration.cpp
+++ b/Source/core/css/CSSComputedStyleDeclaration.cpp
@@ -461,7 +461,7 @@ static PassRefPtr<CSSBorderImageSliceValue> valueForNinePieceImageSlice(const Ni
return CSSBorderImageSliceValue::create(cssValuePool().createValue(quad.release()), image.fill());
}
-static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox& box, const RenderStyle* style)
+static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const BorderImageLengthBox& box, const RenderStyle* style)
{
// Create the slices.
RefPtr<CSSPrimitiveValue> top;
@@ -469,37 +469,37 @@ static PassRefPtr<CSSPrimitiveValue> valueForNinePieceImageQuad(const LengthBox&
RefPtr<CSSPrimitiveValue> bottom;
RefPtr<CSSPrimitiveValue> left;
- if (box.top().isRelative())
- top = cssValuePool().createValue(box.top().value(), CSSPrimitiveValue::CSS_NUMBER);
+ if (box.top().isNumber())
+ top = cssValuePool().createValue(box.top().number(), CSSPrimitiveValue::CSS_NUMBER);
else
- top = cssValuePool().createValue(box.top(), style);
+ top = cssValuePool().createValue(box.top().length(), style);
if (box.right() == box.top() && box.bottom() == box.top() && box.left() == box.top()) {
right = top;
bottom = top;
left = top;
} else {
- if (box.right().isRelative())
- right = cssValuePool().createValue(box.right().value(), CSSPrimitiveValue::CSS_NUMBER);
+ if (box.right().isNumber())
+ right = cssValuePool().createValue(box.right().number(), CSSPrimitiveValue::CSS_NUMBER);
else
- right = cssValuePool().createValue(box.right(), style);
+ right = cssValuePool().createValue(box.right().length(), style);
if (box.bottom() == box.top() && box.right() == box.left()) {
bottom = top;
left = right;
} else {
- if (box.bottom().isRelative())
- bottom = cssValuePool().createValue(box.bottom().value(), CSSPrimitiveValue::CSS_NUMBER);
+ if (box.bottom().isNumber())
+ bottom = cssValuePool().createValue(box.bottom().number(), CSSPrimitiveValue::CSS_NUMBER);
else
- bottom = cssValuePool().createValue(box.bottom(), style);
+ bottom = cssValuePool().createValue(box.bottom().length(), style);
if (box.left() == box.right())
left = right;
else {
- if (box.left().isRelative())
- left = cssValuePool().createValue(box.left().value(), CSSPrimitiveValue::CSS_NUMBER);
+ if (box.left().isNumber())
+ left = cssValuePool().createValue(box.left().number(), CSSPrimitiveValue::CSS_NUMBER);
else
- left = cssValuePool().createValue(box.left(), style);
+ left = cssValuePool().createValue(box.left().length(), style);
}
}
}
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/css/CSSToStyleMap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698