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. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. |
4 * All rights reserved. | 4 * All rights reserved. |
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> | 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> |
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. | 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. |
8 * Copyright (C) 2015 Google Inc. All rights reserved. | 8 * Copyright (C) 2015 Google Inc. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 } | 172 } |
173 | 173 |
174 static CSSValue* ValueForFillSourceType(EMaskSourceType type) { | 174 static CSSValue* ValueForFillSourceType(EMaskSourceType type) { |
175 switch (type) { | 175 switch (type) { |
176 case kMaskAlpha: | 176 case kMaskAlpha: |
177 return CSSIdentifierValue::Create(CSSValueAlpha); | 177 return CSSIdentifierValue::Create(CSSValueAlpha); |
178 case kMaskLuminance: | 178 case kMaskLuminance: |
179 return CSSIdentifierValue::Create(CSSValueLuminance); | 179 return CSSIdentifierValue::Create(CSSValueLuminance); |
180 } | 180 } |
181 | 181 |
182 ASSERT_NOT_REACHED(); | 182 NOTREACHED(); |
183 | 183 |
184 return nullptr; | 184 return nullptr; |
185 } | 185 } |
186 | 186 |
187 static CSSValue* ValueForPositionOffset(const ComputedStyle& style, | 187 static CSSValue* ValueForPositionOffset(const ComputedStyle& style, |
188 CSSPropertyID property_id, | 188 CSSPropertyID property_id, |
189 const LayoutObject* layout_object) { | 189 const LayoutObject* layout_object) { |
190 Length offset, opposite; | 190 Length offset, opposite; |
191 switch (property_id) { | 191 switch (property_id) { |
192 case CSSPropertyLeft: | 192 case CSSPropertyLeft: |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 break; | 277 break; |
278 case CSSPropertyRight: | 278 case CSSPropertyRight: |
279 position = container->ClientWidth() - layout_box->MarginRight() - | 279 position = container->ClientWidth() - layout_box->MarginRight() - |
280 (layout_box->OffsetWidth() + client_offset.Width()); | 280 (layout_box->OffsetWidth() + client_offset.Width()); |
281 break; | 281 break; |
282 case CSSPropertyBottom: | 282 case CSSPropertyBottom: |
283 position = container->ClientHeight() - layout_box->MarginBottom() - | 283 position = container->ClientHeight() - layout_box->MarginBottom() - |
284 (layout_box->OffsetHeight() + client_offset.Height()); | 284 (layout_box->OffsetHeight() + client_offset.Height()); |
285 break; | 285 break; |
286 default: | 286 default: |
287 ASSERT_NOT_REACHED(); | 287 NOTREACHED(); |
288 } | 288 } |
289 return ZoomAdjustedPixelValue(position, style); | 289 return ZoomAdjustedPixelValue(position, style); |
290 } | 290 } |
291 } | 291 } |
292 | 292 |
293 if (offset.IsAuto()) | 293 if (offset.IsAuto()) |
294 return CSSIdentifierValue::Create(CSSValueAuto); | 294 return CSSIdentifierValue::Create(CSSValueAuto); |
295 | 295 |
296 return ZoomAdjustedPixelValueForLength(offset, style); | 296 return ZoomAdjustedPixelValueForLength(offset, style); |
297 } | 297 } |
(...skipping 3447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3745 case CSSPropertyAll: | 3745 case CSSPropertyAll: |
3746 return nullptr; | 3746 return nullptr; |
3747 default: | 3747 default: |
3748 break; | 3748 break; |
3749 } | 3749 } |
3750 NOTREACHED(); | 3750 NOTREACHED(); |
3751 return nullptr; | 3751 return nullptr; |
3752 } | 3752 } |
3753 | 3753 |
3754 } // namespace blink | 3754 } // namespace blink |
OLD | NEW |