| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 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 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1018 continue; | 1018 continue; |
| 1019 | 1019 |
| 1020 // stop at style change | 1020 // stop at style change |
| 1021 if (r->style() != style) | 1021 if (r->style() != style) |
| 1022 break; | 1022 break; |
| 1023 | 1023 |
| 1024 // remember match | 1024 // remember match |
| 1025 startRenderer = r; | 1025 startRenderer = r; |
| 1026 } | 1026 } |
| 1027 | 1027 |
| 1028 return firstPositionInOrBeforeNode(startRenderer->node().handle().raw()); | 1028 return firstPositionInOrBeforeNode(startRenderer->node()); |
| 1029 } | 1029 } |
| 1030 | 1030 |
| 1031 static VisiblePosition endOfStyleRange(const VisiblePosition& visiblePos) | 1031 static VisiblePosition endOfStyleRange(const VisiblePosition& visiblePos) |
| 1032 { | 1032 { |
| 1033 RenderObject* renderer = visiblePos.deepEquivalent().deprecatedNode()->rende
rer(); | 1033 RenderObject* renderer = visiblePos.deepEquivalent().deprecatedNode()->rende
rer(); |
| 1034 RenderObject* endRenderer = renderer; | 1034 RenderObject* endRenderer = renderer; |
| 1035 RenderStyle* style = renderer->style(); | 1035 RenderStyle* style = renderer->style(); |
| 1036 | 1036 |
| 1037 // traverse forward by renderer to look for style change | 1037 // traverse forward by renderer to look for style change |
| 1038 for (RenderObject* r = renderer->nextInPreOrder(); r; r = r->nextInPreOrder(
)) { | 1038 for (RenderObject* r = renderer->nextInPreOrder(); r; r = r->nextInPreOrder(
)) { |
| 1039 // skip non-leaf nodes | 1039 // skip non-leaf nodes |
| 1040 if (r->firstChild()) | 1040 if (r->firstChild()) |
| 1041 continue; | 1041 continue; |
| 1042 | 1042 |
| 1043 // stop at style change | 1043 // stop at style change |
| 1044 if (r->style() != style) | 1044 if (r->style() != style) |
| 1045 break; | 1045 break; |
| 1046 | 1046 |
| 1047 // remember match | 1047 // remember match |
| 1048 endRenderer = r; | 1048 endRenderer = r; |
| 1049 } | 1049 } |
| 1050 | 1050 |
| 1051 return lastPositionInOrAfterNode(endRenderer->node().handle().raw()); | 1051 return lastPositionInOrAfterNode(endRenderer->node()); |
| 1052 } | 1052 } |
| 1053 | 1053 |
| 1054 VisiblePositionRange AccessibilityObject::styleRangeForPosition(const VisiblePos
ition& visiblePos) const | 1054 VisiblePositionRange AccessibilityObject::styleRangeForPosition(const VisiblePos
ition& visiblePos) const |
| 1055 { | 1055 { |
| 1056 if (visiblePos.isNull()) | 1056 if (visiblePos.isNull()) |
| 1057 return VisiblePositionRange(); | 1057 return VisiblePositionRange(); |
| 1058 | 1058 |
| 1059 return VisiblePositionRange(startOfStyleRange(visiblePos), endOfStyleRange(v
isiblePos)); | 1059 return VisiblePositionRange(startOfStyleRange(visiblePos), endOfStyleRange(v
isiblePos)); |
| 1060 } | 1060 } |
| 1061 | 1061 |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1329 | 1329 |
| 1330 for (AccessibilityObject* object = parentObject(); object; object = object->
parentObject()) { | 1330 for (AccessibilityObject* object = parentObject(); object; object = object->
parentObject()) { |
| 1331 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) | 1331 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) |
| 1332 return true; | 1332 return true; |
| 1333 } | 1333 } |
| 1334 | 1334 |
| 1335 return false; | 1335 return false; |
| 1336 } | 1336 } |
| 1337 | 1337 |
| 1338 } // namespace WebCore | 1338 } // namespace WebCore |
| OLD | NEW |