Changeset 159932 in webkit
- Timestamp:
- Dec 2, 2013 6:19:10 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r159930 r159932 1 2013-12-02 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Crash at WebCore::commonTreeScope 4 https://bugs.webkit.org/show_bug.cgi?id=125042 5 6 Reviewed by Mario Sanchez Prada. 7 8 * platform/mac/accessibility/ordered-textmarker-crash-expected.txt: Added. 9 * platform/mac/accessibility/ordered-textmarker-crash.html: Added. 10 1 11 2013-12-02 Zan Dobersek <zdobersek@igalia.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r159931 r159932 1 2013-12-02 Chris Fleizach <cfleizach@apple.com> 2 3 AX: Crash at WebCore::commonTreeScope 4 https://bugs.webkit.org/show_bug.cgi?id=125042 5 6 Reviewed by Mario Sanchez Prada. 7 8 When an AX text marker that references a node in a detached document is used to create a text marker range, a crash occurs 9 because the method to determine commonTreeScopes does not account for when there are no common tree scopes. 10 11 Test: platform/mac/accessibility/ordered-textmarker-crash.html 12 13 * accessibility/AccessibilityObject.cpp: 14 (WebCore::AccessibilityObject::visiblePositionRangeForUnorderedPositions): 15 * dom/TreeScope.cpp: 16 (WebCore::commonTreeScope): 17 1 18 2013-12-02 Nick Diego Yamane <nick.yamane@openbossa.org> 2 19 -
trunk/Source/WebCore/accessibility/AccessibilityObject.cpp
r158914 r159932 650 650 return VisiblePositionRange(); 651 651 652 // If there's no common tree scope between positions, return early. 653 if (!commonTreeScope(visiblePos1.deepEquivalent().deprecatedNode(), visiblePos2.deepEquivalent().deprecatedNode())) 654 return VisiblePositionRange(); 655 652 656 VisiblePosition startPos; 653 657 VisiblePosition endPos; -
trunk/Source/WebCore/dom/TreeScope.cpp
r159489 r159932 426 426 for (; indexA > 0 && indexB > 0 && treeScopesA[indexA - 1] == treeScopesB[indexB - 1]; --indexA, --indexB) { } 427 427 428 // If the nodes had no common tree scope, return immediately. 429 if (indexA == treeScopesA.size()) 430 return nullptr; 431 428 432 return treeScopesA[indexA] == treeScopesB[indexB] ? treeScopesA[indexA] : nullptr; 429 433 }
Note: See TracChangeset
for help on using the changeset viewer.