Changeset 92966 in webkit
- Timestamp:
- Aug 12, 2011, 9:27:57 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r92961 r92966 1 2011-08-12 Abhishek Arya <inferno@chromium.org> 2 3 Crash in WebCore::editingIgnoresContent 4 https://bugs.webkit.org/show_bug.cgi?id=66125 5 6 Reviewed by Ryosuke Niwa. 7 8 Tests that we do not crash when we blow away the root 9 during the firing of selectstart event in selection. 10 11 * editing/selection/select-start-remove-root-crash-expected.txt: Added. 12 * editing/selection/select-start-remove-root-crash.html: Added. 13 1 14 2011-08-12 Yury Semikhatsky <yurys@chromium.org> 2 15 -
trunk/Source/WebCore/ChangeLog
r92964 r92966 1 2011-08-12 Abhishek Arya <inferno@chromium.org> 2 3 Crash in WebCore::editingIgnoresContent 4 https://bugs.webkit.org/show_bug.cgi?id=66125 5 6 Reviewed by Ryosuke Niwa. 7 8 RefPtr a few nodes in case they get blown away in 9 dispatchEvent calls. 10 11 Test: editing/selection/select-start-remove-root-crash.html 12 13 * editing/FrameSelection.cpp: 14 (WebCore::FrameSelection::selectAll): 15 * editing/ReplaceSelectionCommand.cpp: 16 (WebCore::ReplacementFragment::ReplacementFragment): 17 1 18 2011-08-11 Pavel Podivilov <podivilov@chromium.org> 2 19 -
trunk/Source/WebCore/editing/FrameSelection.cpp
r90591 r92966 1432 1432 } 1433 1433 1434 Node*root = 0;1434 RefPtr<Node> root = 0; 1435 1435 Node* selectStartTarget = 0; 1436 1436 if (isContentEditable()) { … … 1439 1439 selectStartTarget = shadowRoot->shadowAncestorNode(); 1440 1440 else 1441 selectStartTarget = root ;1441 selectStartTarget = root.get(); 1442 1442 } else { 1443 1443 root = m_selection.nonBoundaryShadowTreeRootNode(); … … 1455 1455 return; 1456 1456 1457 VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root ));1457 VisibleSelection newSelection(VisibleSelection::selectionFromContentsOfNode(root.get())); 1458 1458 1459 1459 if (shouldChangeSelection(newSelection)) -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r92695 r92966 140 140 return; 141 141 142 Element*editableRoot = selection.rootEditableElement();142 RefPtr<Element> editableRoot = selection.rootEditableElement(); 143 143 ASSERT(editableRoot); 144 144 if (!editableRoot) … … 155 155 } 156 156 157 Node*styleNode = selection.base().deprecatedNode();158 RefPtr<StyledElement> holder = insertFragmentForTestRendering(styleNode );157 RefPtr<Node> styleNode = selection.base().deprecatedNode(); 158 RefPtr<StyledElement> holder = insertFragmentForTestRendering(styleNode.get()); 159 159 if (!holder) { 160 160 removeInterchangeNodes(m_fragment.get()); … … 176 176 if (!m_fragment->firstChild()) 177 177 return; 178 holder = insertFragmentForTestRendering(styleNode );178 holder = insertFragmentForTestRendering(styleNode.get()); 179 179 } 180 180
Note:
See TracChangeset
for help on using the changeset viewer.