| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. | 2 * Copyright (C) 2007, 2008, 2009 Apple Computer, Inc. |
| 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2010, 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 static inline RGBA32 getRGBABackgroundColor(StylePropertySet* style) | 383 static inline RGBA32 getRGBABackgroundColor(StylePropertySet* style) |
| 384 { | 384 { |
| 385 return cssValueToRGBA(style->getPropertyCSSValue(CSSPropertyBackgroundColor)
.get()); | 385 return cssValueToRGBA(style->getPropertyCSSValue(CSSPropertyBackgroundColor)
.get()); |
| 386 } | 386 } |
| 387 | 387 |
| 388 static int textAlignResolvingStartAndEnd(int textAlign, int direction) | 388 static int textAlignResolvingStartAndEnd(int textAlign, int direction) |
| 389 { | 389 { |
| 390 switch (textAlign) { | 390 switch (textAlign) { |
| 391 case CSSValueCenter: | 391 case CSSValueCenter: |
| 392 case CSSValueWebkitCenter: | |
| 393 return CSSValueCenter; | 392 return CSSValueCenter; |
| 394 case CSSValueJustify: | 393 case CSSValueJustify: |
| 395 return CSSValueJustify; | 394 return CSSValueJustify; |
| 396 case CSSValueLeft: | 395 case CSSValueLeft: |
| 397 case CSSValueWebkitLeft: | |
| 398 return CSSValueLeft; | 396 return CSSValueLeft; |
| 399 case CSSValueRight: | 397 case CSSValueRight: |
| 400 case CSSValueWebkitRight: | |
| 401 return CSSValueRight; | 398 return CSSValueRight; |
| 402 case CSSValueStart: | 399 case CSSValueStart: |
| 403 return direction != CSSValueRtl ? CSSValueLeft : CSSValueRight; | 400 return direction != CSSValueRtl ? CSSValueLeft : CSSValueRight; |
| 404 case CSSValueEnd: | 401 case CSSValueEnd: |
| 405 return direction == CSSValueRtl ? CSSValueRight : CSSValueLeft; | 402 return direction == CSSValueRtl ? CSSValueRight : CSSValueLeft; |
| 406 } | 403 } |
| 407 return CSSValueInvalid; | 404 return CSSValueInvalid; |
| 408 } | 405 } |
| 409 | 406 |
| 410 template<typename T> | 407 template<typename T> |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1550 { | 1547 { |
| 1551 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1548 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1552 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); | 1549 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); |
| 1553 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 1550 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
| 1554 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1551 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1555 } | 1552 } |
| 1556 return nullptr; | 1553 return nullptr; |
| 1557 } | 1554 } |
| 1558 | 1555 |
| 1559 } | 1556 } |
| OLD | NEW |