| 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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1294 Position position = selection.start().downstream(); | 1294 Position position = selection.start().downstream(); |
| 1295 | 1295 |
| 1296 Node* node = position.deprecatedNode(); | 1296 Node* node = position.deprecatedNode(); |
| 1297 if (!node) | 1297 if (!node) |
| 1298 return NaturalWritingDirection; | 1298 return NaturalWritingDirection; |
| 1299 | 1299 |
| 1300 Position end; | 1300 Position end; |
| 1301 if (selection.isRange()) { | 1301 if (selection.isRange()) { |
| 1302 end = selection.end().upstream(); | 1302 end = selection.end().upstream(); |
| 1303 | 1303 |
| 1304 Node* pastLast = Range::create(end.document(), position.parentAnchoredEq
uivalent(), end.parentAnchoredEquivalent())->pastLastNode(); | 1304 ASSERT(end.document()); |
| 1305 Node* pastLast = Range::create(*end.document(), position.parentAnchoredE
quivalent(), end.parentAnchoredEquivalent())->pastLastNode(); |
| 1305 for (Node* n = node; n && n != pastLast; n = NodeTraversal::next(n)) { | 1306 for (Node* n = node; n && n != pastLast; n = NodeTraversal::next(n)) { |
| 1306 if (!n->isStyledElement()) | 1307 if (!n->isStyledElement()) |
| 1307 continue; | 1308 continue; |
| 1308 | 1309 |
| 1309 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclarat
ion::create(n); | 1310 RefPtr<CSSComputedStyleDeclaration> style = CSSComputedStyleDeclarat
ion::create(n); |
| 1310 RefPtr<CSSValue> unicodeBidi = style->getPropertyCSSValue(CSSPropert
yUnicodeBidi); | 1311 RefPtr<CSSValue> unicodeBidi = style->getPropertyCSSValue(CSSPropert
yUnicodeBidi); |
| 1311 if (!unicodeBidi || !unicodeBidi->isPrimitiveValue()) | 1312 if (!unicodeBidi || !unicodeBidi->isPrimitiveValue()) |
| 1312 continue; | 1313 continue; |
| 1313 | 1314 |
| 1314 CSSValueID unicodeBidiValue = toCSSPrimitiveValue(unicodeBidi.get())
->getValueID(); | 1315 CSSValueID unicodeBidiValue = toCSSPrimitiveValue(unicodeBidi.get())
->getValueID(); |
| (...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1652 { | 1653 { |
| 1653 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { | 1654 for (Node* ancestor = node; ancestor; ancestor = ancestor->parentNode()) { |
| 1654 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); | 1655 RefPtr<CSSComputedStyleDeclaration> ancestorStyle = CSSComputedStyleDecl
aration::create(ancestor); |
| 1655 if (!hasTransparentBackgroundColor(ancestorStyle.get())) | 1656 if (!hasTransparentBackgroundColor(ancestorStyle.get())) |
| 1656 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); | 1657 return ancestorStyle->getPropertyCSSValue(CSSPropertyBackgroundColor
); |
| 1657 } | 1658 } |
| 1658 return 0; | 1659 return 0; |
| 1659 } | 1660 } |
| 1660 | 1661 |
| 1661 } | 1662 } |
| OLD | NEW |