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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
179 case CSSPropertyBottom: | 179 case CSSPropertyBottom: |
180 offset = style.bottom(); | 180 offset = style.bottom(); |
181 opposite = style.top(); | 181 opposite = style.top(); |
182 break; | 182 break; |
183 default: | 183 default: |
184 return nullptr; | 184 return nullptr; |
185 } | 185 } |
186 | 186 |
187 if (offset.hasPercent() && layoutObject && layoutObject->isBox() && layoutOb ject->isPositioned()) { | 187 if (offset.hasPercent() && layoutObject && layoutObject->isBox() && layoutOb ject->isPositioned()) { |
188 LayoutUnit containingBlockSize = (propertyID == CSSPropertyLeft || prope rtyID == CSSPropertyRight) ? | 188 LayoutUnit containingBlockSize = (propertyID == CSSPropertyLeft || prope rtyID == CSSPropertyRight) ? |
189 toLayoutBox(layoutObject)->containingBlockLogicalWidthForContent() : | 189 toLayoutBox(layoutObject)->containingBlockLogicalWidthForGetComputed Style() : |
esprehn
2016/04/14 18:43:09
this is used in multiple other places in CSSValueM
Deokjin Kim
2016/04/20 13:42:09
On PS#7 this change is not needed anymore because
| |
190 toLayoutBox(layoutObject)->containingBlockLogicalHeightForGetCompute dStyle(); | 190 toLayoutBox(layoutObject)->containingBlockLogicalHeightForGetCompute dStyle(); |
191 return zoomAdjustedPixelValue(valueForLength(offset, containingBlockSize ), style); | 191 return zoomAdjustedPixelValue(valueForLength(offset, containingBlockSize ), style); |
192 } | 192 } |
193 | 193 |
194 if (offset.isAuto() && layoutObject) { | 194 if (offset.isAuto() && layoutObject) { |
195 // If the property applies to a positioned element and the resolved valu e of the display | 195 // If the property applies to a positioned element and the resolved valu e of the display |
196 // property is not none, the resolved value is the used value. | 196 // property is not none, the resolved value is the used value. |
197 if (layoutObject->isInFlowPositioned()) { | 197 if (layoutObject->isInFlowPositioned()) { |
198 // If e.g. left is auto and right is not auto, then left's computed value is negative right. | 198 // If e.g. left is auto and right is not auto, then left's computed value is negative right. |
199 // So we get the opposite length unit and see if it is auto. | 199 // So we get the opposite length unit and see if it is auto. |
(...skipping 2631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2831 case CSSPropertyAll: | 2831 case CSSPropertyAll: |
2832 return nullptr; | 2832 return nullptr; |
2833 default: | 2833 default: |
2834 break; | 2834 break; |
2835 } | 2835 } |
2836 ASSERT_NOT_REACHED(); | 2836 ASSERT_NOT_REACHED(); |
2837 return nullptr; | 2837 return nullptr; |
2838 } | 2838 } |
2839 | 2839 |
2840 } // namespace blink | 2840 } // namespace blink |
OLD | NEW |