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 } |
250 return zoomAdjustedPixelValueForLength(offset, style); | 258 return zoomAdjustedPixelValueForLength(offset, style); |
251 } | 259 } |
252 | 260 |
253 static CSSBorderImageSliceValue* valueForNinePieceImageSlice(const NinePieceImag
e& image) | 261 static CSSBorderImageSliceValue* valueForNinePieceImageSlice(const NinePieceImag
e& image) |
254 { | 262 { |
255 // Create the slices. | 263 // Create the slices. |
256 CSSPrimitiveValue* top = nullptr; | 264 CSSPrimitiveValue* top = nullptr; |
257 CSSPrimitiveValue* right = nullptr; | 265 CSSPrimitiveValue* right = nullptr; |
258 CSSPrimitiveValue* bottom = nullptr; | 266 CSSPrimitiveValue* bottom = nullptr; |
259 CSSPrimitiveValue* left = nullptr; | 267 CSSPrimitiveValue* left = nullptr; |
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3000 case CSSPropertyAll: | 3008 case CSSPropertyAll: |
3001 return nullptr; | 3009 return nullptr; |
3002 default: | 3010 default: |
3003 break; | 3011 break; |
3004 } | 3012 } |
3005 ASSERT_NOT_REACHED(); | 3013 ASSERT_NOT_REACHED(); |
3006 return nullptr; | 3014 return nullptr; |
3007 } | 3015 } |
3008 | 3016 |
3009 } // namespace blink | 3017 } // namespace blink |
OLD | NEW |