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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1433103002: Use FocusParams in FocusController::setFocusedElement and Document::setFocusedElement arguments. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1447 // Implement the rule that "" and "top" both mean top of page as in other br owsers. 1447 // Implement the rule that "" and "top" both mean top of page as in other br owsers.
1448 if (!anchorNode && !(name.isEmpty() || equalIgnoringCase(name, "top"))) 1448 if (!anchorNode && !(name.isEmpty() || equalIgnoringCase(name, "top")))
1449 return false; 1449 return false;
1450 1450
1451 if (behavior == UrlFragmentScroll) 1451 if (behavior == UrlFragmentScroll)
1452 maintainScrollPositionAtAnchor(anchorNode ? static_cast<Node*>(anchorNod e) : m_frame->document()); 1452 maintainScrollPositionAtAnchor(anchorNode ? static_cast<Node*>(anchorNod e) : m_frame->document());
1453 1453
1454 // If the anchor accepts keyboard focus, move focus there to aid users relyi ng on keyboard navigation. 1454 // If the anchor accepts keyboard focus, move focus there to aid users relyi ng on keyboard navigation.
1455 // If anchorNode is not focusable, setFocusedElement() will still clear focu s, which matches the behavior of other browsers. 1455 // If anchorNode is not focusable, setFocusedElement() will still clear focu s, which matches the behavior of other browsers.
1456 if (anchorNode) 1456 if (anchorNode)
1457 m_frame->document()->setFocusedElement(anchorNode); 1457 m_frame->document()->setFocusedElement(anchorNode, FocusParams(Selection BehaviorOnFocus::None, WebFocusTypeNone, nullptr));
1458 1458
1459 return true; 1459 return true;
1460 } 1460 }
1461 1461
1462 void FrameView::maintainScrollPositionAtAnchor(Node* anchorNode) 1462 void FrameView::maintainScrollPositionAtAnchor(Node* anchorNode)
1463 { 1463 {
1464 ASSERT(anchorNode); 1464 ASSERT(anchorNode);
1465 m_scrollAnchor = anchorNode; 1465 m_scrollAnchor = anchorNode;
1466 1466
1467 // We need to update the layout tree before scrolling. 1467 // We need to update the layout tree before scrolling.
(...skipping 2567 matching lines...) Expand 10 before | Expand all | Expand 10 after
4035 } 4035 }
4036 4036
4037 bool FrameView::canThrottleRendering() const 4037 bool FrameView::canThrottleRendering() const
4038 { 4038 {
4039 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4039 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4040 return false; 4040 return false;
4041 return m_hiddenForThrottling && m_crossOriginForThrottling; 4041 return m_hiddenForThrottling && m_crossOriginForThrottling;
4042 } 4042 }
4043 4043
4044 } // namespace blink 4044 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/editing/FrameSelection.cpp ('k') | third_party/WebKit/Source/core/html/HTMLDialogElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698