| 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 reserv
ed. |
| 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 6 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 PassRefPtr<HTMLAnchorElement> HTMLAnchorElement::create(const QualifiedName& tag
Name, Document& document) | 126 PassRefPtr<HTMLAnchorElement> HTMLAnchorElement::create(const QualifiedName& tag
Name, Document& document) |
| 127 { | 127 { |
| 128 return adoptRef(new HTMLAnchorElement(tagName, document)); | 128 return adoptRef(new HTMLAnchorElement(tagName, document)); |
| 129 } | 129 } |
| 130 | 130 |
| 131 HTMLAnchorElement::~HTMLAnchorElement() | 131 HTMLAnchorElement::~HTMLAnchorElement() |
| 132 { | 132 { |
| 133 clearRootEditableElementForSelectionOnMouseDown(); | 133 clearRootEditableElementForSelectionOnMouseDown(); |
| 134 } | 134 } |
| 135 | 135 |
| 136 // This function does not allow leading spaces before the port number. | |
| 137 static unsigned parsePortFromStringPosition(const String& value, unsigned portSt
art, unsigned& portEnd) | |
| 138 { | |
| 139 portEnd = portStart; | |
| 140 while (isASCIIDigit(value[portEnd])) | |
| 141 ++portEnd; | |
| 142 return value.substring(portStart, portEnd - portStart).toUInt(); | |
| 143 } | |
| 144 | |
| 145 bool HTMLAnchorElement::supportsFocus() const | 136 bool HTMLAnchorElement::supportsFocus() const |
| 146 { | 137 { |
| 147 if (rendererIsEditable()) | 138 if (rendererIsEditable()) |
| 148 return HTMLElement::supportsFocus(); | 139 return HTMLElement::supportsFocus(); |
| 149 // If not a link we should still be able to focus the element if it has tabI
ndex. | 140 // If not a link we should still be able to focus the element if it has tabI
ndex. |
| 150 return isLink() || HTMLElement::supportsFocus(); | 141 return isLink() || HTMLElement::supportsFocus(); |
| 151 } | 142 } |
| 152 | 143 |
| 153 bool HTMLAnchorElement::isMouseFocusable() const | 144 bool HTMLAnchorElement::isMouseFocusable() const |
| 154 { | 145 { |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 preconnectToURL(url, motivation); | 693 preconnectToURL(url, motivation); |
| 703 m_hasIssuedPreconnect = true; | 694 m_hasIssuedPreconnect = true; |
| 704 } | 695 } |
| 705 | 696 |
| 706 bool HTMLAnchorElement::isInteractiveContent() const | 697 bool HTMLAnchorElement::isInteractiveContent() const |
| 707 { | 698 { |
| 708 return true; | 699 return true; |
| 709 } | 700 } |
| 710 | 701 |
| 711 } | 702 } |
| OLD | NEW |