Changeset 120991 in webkit
- Timestamp:
- Jun 21, 2012, 7:02:38 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r120990 r120991 1 2012-06-21 Shinya Kawanaka <shinyak@chromium.org> 2 3 [Shadow][Editing] Assertion in VisibleSelection::adjuseSelectionToAvoidCrossingBoundaries() is triggered. 4 https://bugs.webkit.org/show_bug.cgi?id=89081 5 6 Reviewed by Ryosuke Niwa. 7 8 * editing/shadow/adjusting-editing-boundary-with-table-in-shadow-expected.txt: Added. 9 * editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html: Added. 10 1 11 2012-06-21 Gregg Tavares <gman@google.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r120988 r120991 1 2012-06-21 Shinya Kawanaka <shinyak@chromium.org> 2 3 [Shadow][Editing] Assertion in VisibleSelection::adjuseSelectionToAvoidCrossingBoundaries() is triggered. 4 https://bugs.webkit.org/show_bug.cgi?id=89081 5 6 Reviewed by Ryosuke Niwa. 7 8 firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot did not 9 consider a case that an argument hiehestRoot can be in Shadow DOM. So when adjusting selection to 10 avoid crossing editing boundaries, VisiblePosition can break shadow boundaries, and it causes 11 an assertion trigger. 12 13 By this patch, firstEditablePositionAfterPositionInRoot and lastEditablePositionBeforePositionInRoot will 14 adjust position to the tree scope of highestRoot instead of its parent tree scope. 15 16 Test: editing/shadow/adjusting-editing-boundary-with-table-in-shadow.html 17 18 * editing/htmlediting.cpp: 19 (WebCore::firstEditablePositionAfterPositionInRoot): 20 (WebCore::lastEditablePositionBeforePositionInRoot): 21 1 22 2012-06-21 Andrey Kosyakov <caseq@chromium.org> 2 23 -
trunk/Source/WebCore/editing/htmlediting.cpp
r120896 r120991 260 260 261 261 Position p = position; 262 263 if (Node* shadowAncestor = p.deprecatedNode()->shadowAncestorNode()) 264 if (shadowAncestor != p.deprecatedNode()) 265 p = positionAfterNode(shadowAncestor); 266 262 263 if (position.deprecatedNode()->treeScope() != highestRoot->treeScope()) { 264 Node* shadowAncestor = highestRoot->treeScope()->ancestorInThisScope(p.deprecatedNode()); 265 if (!shadowAncestor) 266 return VisiblePosition(); 267 268 p = positionAfterNode(shadowAncestor); 269 } 270 267 271 while (p.deprecatedNode() && !isEditablePosition(p) && p.deprecatedNode()->isDescendantOf(highestRoot)) 268 272 p = isAtomicNode(p.deprecatedNode()) ? positionInParentAfterNode(p.deprecatedNode()) : nextVisuallyDistinctCandidate(p); … … 282 286 Position p = position; 283 287 284 if (Node* shadowAncestor = p.deprecatedNode()->shadowAncestorNode()) { 285 if (shadowAncestor != p.deprecatedNode()) 286 p = firstPositionInOrBeforeNode(shadowAncestor); 288 if (position.deprecatedNode()->treeScope() != highestRoot->treeScope()) { 289 Node* shadowAncestor = highestRoot->treeScope()->ancestorInThisScope(p.deprecatedNode()); 290 if (!shadowAncestor) 291 return VisiblePosition(); 292 293 p = firstPositionInOrBeforeNode(shadowAncestor); 287 294 } 288 295
Note:
See TracChangeset
for help on using the changeset viewer.