OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> | 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
7 * Copyright (C) 2015 Google Inc. All rights reserved. | 7 * Copyright (C) 2015 Google Inc. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Lesser General Public | 10 * modify it under the terms of the GNU Lesser General Public |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 default: | 240 default: |
241 ASSERT_NOT_REACHED(); | 241 ASSERT_NOT_REACHED(); |
242 } | 242 } |
243 return zoomAdjustedPixelValue(position, style); | 243 return zoomAdjustedPixelValue(position, style); |
244 } | 244 } |
245 } | 245 } |
246 | 246 |
247 if (offset.isAuto()) | 247 if (offset.isAuto()) |
248 return cssValuePool().createIdentifierValue(CSSValueAuto); | 248 return cssValuePool().createIdentifierValue(CSSValueAuto); |
249 | 249 |
250 if (layoutObject) { | |
251 if (!opposite.isAuto() && layoutObject->isInFlowPositioned()) { | |
252 LayoutBlock* container = layoutObject->containingBlock(); | |
253 bool ltr = container->style()->isLeftToRightDirection(); | |
254 if ((propertyID == CSSPropertyLeft && !ltr) || (propertyID == CSSPro
pertyRight && ltr) || (propertyID == CSSPropertyBottom)) | |
255 return zoomAdjustedPixelValue(-opposite.pixels(), style); | |
256 } | |
257 } | |
258 return zoomAdjustedPixelValueForLength(offset, style); | 250 return zoomAdjustedPixelValueForLength(offset, style); |
259 } | 251 } |
260 | 252 |
261 static CSSBorderImageSliceValue* valueForNinePieceImageSlice(const NinePieceImag
e& image) | 253 static CSSBorderImageSliceValue* valueForNinePieceImageSlice(const NinePieceImag
e& image) |
262 { | 254 { |
263 // Create the slices. | 255 // Create the slices. |
264 CSSPrimitiveValue* top = nullptr; | 256 CSSPrimitiveValue* top = nullptr; |
265 CSSPrimitiveValue* right = nullptr; | 257 CSSPrimitiveValue* right = nullptr; |
266 CSSPrimitiveValue* bottom = nullptr; | 258 CSSPrimitiveValue* bottom = nullptr; |
267 CSSPrimitiveValue* left = nullptr; | 259 CSSPrimitiveValue* left = nullptr; |
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3008 case CSSPropertyAll: | 3000 case CSSPropertyAll: |
3009 return nullptr; | 3001 return nullptr; |
3010 default: | 3002 default: |
3011 break; | 3003 break; |
3012 } | 3004 } |
3013 ASSERT_NOT_REACHED(); | 3005 ASSERT_NOT_REACHED(); |
3014 return nullptr; | 3006 return nullptr; |
3015 } | 3007 } |
3016 | 3008 |
3017 } // namespace blink | 3009 } // namespace blink |
OLD | NEW |