| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |