Changeset 81384 in webkit
- Timestamp:
- Mar 17, 2011 1:49:11 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r81375 r81384 1 2011-03-17 Ryosuke Niwa <rniwa@webkit.org> 2 3 Reviewed by Adele Peterson and Enrica Casucci. 4 5 Assert that editing does not ignore position's anchorNode if position is an offset in anchor 6 https://bugs.webkit.org/show_bug.cgi?id=56027 7 8 Debug build fix. 9 10 * dom/Element.cpp: 11 (WebCore::Element::updateFocusAppearance): "this" can be an input element so can't always instantiate 12 a position inside the node. Call firstPositionInOrBeforeNode instead. 13 * editing/ReplaceSelectionCommand.cpp: 14 (WebCore::positionAvoidingPrecedingNodes): Exit early when a node's content is ignored by editing instead 15 of just when the node is br. 16 * editing/htmlediting.cpp: 17 (WebCore::lastEditablePositionBeforePositionInRoot): The shadow ancestor node is usually an input element 18 so don't instantiate a position inside it. Call firstPositionInOrBeforeNode instead. 19 1 20 2011-03-17 Sheriff Bot <webkit.review.bot@gmail.com> 2 21 -
trunk/Source/WebCore/dom/Element.cpp
r80846 r81384 58 58 #include "WebKitAnimationList.h" 59 59 #include "XMLNames.h" 60 #include "htmlediting.h" 60 61 #include <wtf/text/CString.h> 61 62 … … 1555 1556 1556 1557 // FIXME: We should restore the previous selection if there is one. 1557 VisibleSelection newSelection = VisibleSelection(firstPositionIn Node(this), DOWNSTREAM);1558 VisibleSelection newSelection = VisibleSelection(firstPositionInOrBeforeNode(this), DOWNSTREAM); 1558 1559 1559 1560 if (frame->selection()->shouldChangeSelection(newSelection)) { -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r81295 r81384 111 111 { 112 112 // If we're already on a break, it's probably a placeholder and we shouldn't change our position. 113 if ( pos.deprecatedNode()->hasTagName(brTag))113 if (editingIgnoresContent(pos.deprecatedNode())) 114 114 return pos; 115 115 -
trunk/Source/WebCore/editing/htmlediting.cpp
r81374 r81384 301 301 302 302 Position p = position; 303 304 if (Node* shadowAncestor = p.deprecatedNode()->shadowAncestorNode()) 303 304 if (Node* shadowAncestor = p.deprecatedNode()->shadowAncestorNode()) { 305 305 if (shadowAncestor != p.deprecatedNode()) 306 p = firstPositionInNode(shadowAncestor); 306 p = firstPositionInOrBeforeNode(shadowAncestor); 307 } 307 308 308 309 while (p.deprecatedNode() && !isEditablePosition(p) && p.deprecatedNode()->isDescendantOf(highestRoot))
Note: See TracChangeset
for help on using the changeset viewer.