| 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 | 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 6 * reserved. | 6 * reserved. |
| 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| 11 * License as published by the Free Software Foundation; either | 11 * License as published by the Free Software Foundation; either |
| 12 * 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. |
| 13 * | 13 * |
| 14 * 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, |
| 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 17 * Library General Public License for more details. | 17 * Library General Public License for more details. |
| 18 * | 18 * |
| 19 * You should have received a copy of the GNU Library General Public License | 19 * You should have received a copy of the GNU Library General Public License |
| 20 * along with this library; see the file COPYING.LIB. If not, write to | 20 * along with this library; see the file COPYING.LIB. If not, write to |
| 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 21 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 22 * Boston, MA 02110-1301, USA. | 22 * Boston, MA 02110-1301, USA. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #include "core/html/HTMLAnchorElement.h" | 25 #include "core/html/HTMLAnchorElement.h" |
| 26 | 26 |
| 27 #include "core/editing/EditingUtilities.h" | 27 #include "core/editing/EditingUtilities.h" |
| 28 #include "core/events/KeyboardEvent.h" | 28 #include "core/events/KeyboardEvent.h" |
| 29 #include "core/events/MouseEvent.h" | 29 #include "core/events/MouseEvent.h" |
| 30 #include "core/frame/FrameHost.h" | |
| 31 #include "core/frame/LocalFrameClient.h" | 30 #include "core/frame/LocalFrameClient.h" |
| 32 #include "core/frame/Settings.h" | 31 #include "core/frame/Settings.h" |
| 33 #include "core/frame/UseCounter.h" | 32 #include "core/frame/UseCounter.h" |
| 34 #include "core/html/HTMLImageElement.h" | 33 #include "core/html/HTMLImageElement.h" |
| 35 #include "core/html/parser/HTMLParserIdioms.h" | 34 #include "core/html/parser/HTMLParserIdioms.h" |
| 36 #include "core/layout/LayoutBox.h" | 35 #include "core/layout/LayoutBox.h" |
| 37 #include "core/loader/FrameLoadRequest.h" | 36 #include "core/loader/FrameLoadRequest.h" |
| 38 #include "core/loader/PingLoader.h" | 37 #include "core/loader/PingLoader.h" |
| 39 #include "core/page/ChromeClient.h" | 38 #include "core/page/ChromeClient.h" |
| 39 #include "core/page/Page.h" |
| 40 #include "platform/network/NetworkHints.h" | 40 #include "platform/network/NetworkHints.h" |
| 41 #include "platform/weborigin/SecurityPolicy.h" | 41 #include "platform/weborigin/SecurityPolicy.h" |
| 42 #include "public/platform/WebNavigationHintType.h" | 42 #include "public/platform/WebNavigationHintType.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 using namespace HTMLNames; | 46 using namespace HTMLNames; |
| 47 | 47 |
| 48 class HTMLAnchorElement::NavigationHintSender | 48 class HTMLAnchorElement::NavigationHintSender |
| 49 : public GarbageCollected<HTMLAnchorElement::NavigationHintSender> { | 49 : public GarbageCollected<HTMLAnchorElement::NavigationHintSender> { |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 return HTMLElement::isMouseFocusable(); | 171 return HTMLElement::isMouseFocusable(); |
| 172 } | 172 } |
| 173 | 173 |
| 174 bool HTMLAnchorElement::isKeyboardFocusable() const { | 174 bool HTMLAnchorElement::isKeyboardFocusable() const { |
| 175 DCHECK(document().isActive()); | 175 DCHECK(document().isActive()); |
| 176 | 176 |
| 177 if (isFocusable() && Element::supportsFocus()) | 177 if (isFocusable() && Element::supportsFocus()) |
| 178 return HTMLElement::isKeyboardFocusable(); | 178 return HTMLElement::isKeyboardFocusable(); |
| 179 | 179 |
| 180 if (isLink() && !document().frameHost()->chromeClient().tabsToLinks()) | 180 if (isLink() && !document().page()->chromeClient().tabsToLinks()) |
| 181 return false; | 181 return false; |
| 182 return HTMLElement::isKeyboardFocusable(); | 182 return HTMLElement::isKeyboardFocusable(); |
| 183 } | 183 } |
| 184 | 184 |
| 185 static void appendServerMapMousePosition(StringBuilder& url, Event* event) { | 185 static void appendServerMapMousePosition(StringBuilder& url, Event* event) { |
| 186 if (!event->isMouseEvent()) | 186 if (!event->isMouseEvent()) |
| 187 return; | 187 return; |
| 188 | 188 |
| 189 DCHECK(event->target()); | 189 DCHECK(event->target()); |
| 190 Node* target = event->target()->toNode(); | 190 Node* target = event->target()->toNode(); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 } | 482 } |
| 483 | 483 |
| 484 HTMLAnchorElement::NavigationHintSender* | 484 HTMLAnchorElement::NavigationHintSender* |
| 485 HTMLAnchorElement::ensureNavigationHintSender() { | 485 HTMLAnchorElement::ensureNavigationHintSender() { |
| 486 if (!m_navigationHintSender) | 486 if (!m_navigationHintSender) |
| 487 m_navigationHintSender = NavigationHintSender::create(this); | 487 m_navigationHintSender = NavigationHintSender::create(this); |
| 488 return m_navigationHintSender; | 488 return m_navigationHintSender; |
| 489 } | 489 } |
| 490 | 490 |
| 491 } // namespace blink | 491 } // namespace blink |
| OLD | NEW |