| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 4 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
| 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 6 * reserved. |
| 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 8 * |
| 8 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
| 11 * version 2 of the License, or (at your option) any later version. | 12 * version 2 of the License, or (at your option) any later version. |
| 12 * | 13 * |
| 13 * This library is distributed in the hope that it will be useful, | 14 * This library is distributed in the hope that it will be useful, |
| 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 HTMLAnchorElement::~HTMLAnchorElement() {} | 126 HTMLAnchorElement::~HTMLAnchorElement() {} |
| 126 | 127 |
| 127 DEFINE_TRACE(HTMLAnchorElement) { | 128 DEFINE_TRACE(HTMLAnchorElement) { |
| 128 visitor->trace(m_navigationHintSender); | 129 visitor->trace(m_navigationHintSender); |
| 129 HTMLElement::trace(visitor); | 130 HTMLElement::trace(visitor); |
| 130 } | 131 } |
| 131 | 132 |
| 132 bool HTMLAnchorElement::supportsFocus() const { | 133 bool HTMLAnchorElement::supportsFocus() const { |
| 133 if (hasEditableStyle(*this)) | 134 if (hasEditableStyle(*this)) |
| 134 return HTMLElement::supportsFocus(); | 135 return HTMLElement::supportsFocus(); |
| 135 // If not a link we should still be able to focus the element if it has tabInd
ex. | 136 // If not a link we should still be able to focus the element if it has |
| 137 // tabIndex. |
| 136 return isLink() || HTMLElement::supportsFocus(); | 138 return isLink() || HTMLElement::supportsFocus(); |
| 137 } | 139 } |
| 138 | 140 |
| 139 bool HTMLAnchorElement::matchesEnabledPseudoClass() const { | 141 bool HTMLAnchorElement::matchesEnabledPseudoClass() const { |
| 140 return isLink(); | 142 return isLink(); |
| 141 } | 143 } |
| 142 | 144 |
| 143 bool HTMLAnchorElement::shouldHaveFocusAppearance() const { | 145 bool HTMLAnchorElement::shouldHaveFocusAppearance() const { |
| 144 return !m_wasFocusedByMouse || HTMLElement::supportsFocus(); | 146 return !m_wasFocusedByMouse || HTMLElement::supportsFocus(); |
| 145 } | 147 } |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 389 |
| 388 LocalFrame* frame = document().frame(); | 390 LocalFrame* frame = document().frame(); |
| 389 if (!frame) | 391 if (!frame) |
| 390 return; | 392 return; |
| 391 | 393 |
| 392 StringBuilder url; | 394 StringBuilder url; |
| 393 url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr))); | 395 url.append(stripLeadingAndTrailingHTMLSpaces(fastGetAttribute(hrefAttr))); |
| 394 appendServerMapMousePosition(url, event); | 396 appendServerMapMousePosition(url, event); |
| 395 KURL completedURL = document().completeURL(url.toString()); | 397 KURL completedURL = document().completeURL(url.toString()); |
| 396 | 398 |
| 397 // Schedule the ping before the frame load. Prerender in Chrome may kill the r
enderer as soon as the navigation is | 399 // Schedule the ping before the frame load. Prerender in Chrome may kill the |
| 398 // sent out. | 400 // renderer as soon as the navigation is sent out. |
| 399 sendPings(completedURL); | 401 sendPings(completedURL); |
| 400 | 402 |
| 401 ResourceRequest request(completedURL); | 403 ResourceRequest request(completedURL); |
| 402 request.setUIStartTime(event->platformTimeStamp()); | 404 request.setUIStartTime(event->platformTimeStamp()); |
| 403 request.setInputPerfMetricReportPolicy( | 405 request.setInputPerfMetricReportPolicy( |
| 404 InputToLoadPerfMetricReportPolicy::ReportLink); | 406 InputToLoadPerfMetricReportPolicy::ReportLink); |
| 405 | 407 |
| 406 ReferrerPolicy policy; | 408 ReferrerPolicy policy; |
| 407 if (hasAttribute(referrerpolicyAttr) && | 409 if (hasAttribute(referrerpolicyAttr) && |
| 408 SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords( | 410 SecurityPolicy::referrerPolicyFromStringWithLegacyKeywords( |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 } | 474 } |
| 473 | 475 |
| 474 HTMLAnchorElement::NavigationHintSender* | 476 HTMLAnchorElement::NavigationHintSender* |
| 475 HTMLAnchorElement::ensureNavigationHintSender() { | 477 HTMLAnchorElement::ensureNavigationHintSender() { |
| 476 if (!m_navigationHintSender) | 478 if (!m_navigationHintSender) |
| 477 m_navigationHintSender = NavigationHintSender::create(this); | 479 m_navigationHintSender = NavigationHintSender::create(this); |
| 478 return m_navigationHintSender; | 480 return m_navigationHintSender; |
| 479 } | 481 } |
| 480 | 482 |
| 481 } // namespace blink | 483 } // namespace blink |
| OLD | NEW |