Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(285)

Unified Diff: Source/WebCore/page/FocusController.cpp

Issue 7714029: Merge 93514 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/frames/focus-controller-crash-change-event-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/FocusController.cpp
===================================================================
--- Source/WebCore/page/FocusController.cpp (revision 93693)
+++ Source/WebCore/page/FocusController.cpp (working copy)
@@ -246,7 +246,7 @@
document->updateLayoutIgnorePendingStylesheets();
- Node* node = findFocusableNodeAcrossTreeScope(direction, currentNode ? currentNode->treeScope() : document, currentNode, event);
+ RefPtr<Node> node = findFocusableNodeAcrossTreeScope(direction, currentNode ? currentNode->treeScope() : document, currentNode, event);
if (!node) {
// We didn't find a node to focus, so we should try to pass focus to Chrome.
@@ -259,7 +259,7 @@
// Chrome doesn't want focus, so we should wrap focus.
node = findFocusableNode(direction, m_page->mainFrame()->document(), 0, event);
- node = findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot(direction, node, event);
+ node = findFocusableNodeDecendingDownIntoFrameDocumentOrShadowRoot(direction, node.get(), event);
if (!node)
return false;
@@ -278,7 +278,7 @@
if (node->isFrameOwnerElement()) {
// We focus frames rather than frame owners.
// FIXME: We should not focus frames that have no scrollbars, as focusing them isn't useful to the user.
- HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(node);
+ HTMLFrameOwnerElement* owner = static_cast<HTMLFrameOwnerElement*>(node.get());
if (!owner->contentFrame())
return false;
@@ -301,13 +301,13 @@
setFocusedFrame(newDocument->frame());
if (caretBrowsing) {
- Position position = firstPositionInOrBeforeNode(node);
+ Position position = firstPositionInOrBeforeNode(node.get());
VisibleSelection newSelection(position, position, DOWNSTREAM);
if (frame->selection()->shouldChangeSelection(newSelection))
frame->selection()->setSelection(newSelection);
}
- static_cast<Element*>(node)->focus(false);
+ static_cast<Element*>(node.get())->focus(false);
return true;
}
« no previous file with comments | « LayoutTests/fast/frames/focus-controller-crash-change-event-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698