| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 } | 282 } |
| 283 | 283 |
| 284 bool HTMLAnchorElement::hasRel(uint32_t relation) const | 284 bool HTMLAnchorElement::hasRel(uint32_t relation) const |
| 285 { | 285 { |
| 286 return m_linkRelations & relation; | 286 return m_linkRelations & relation; |
| 287 } | 287 } |
| 288 | 288 |
| 289 void HTMLAnchorElement::setRel(const AtomicString& value) | 289 void HTMLAnchorElement::setRel(const AtomicString& value) |
| 290 { | 290 { |
| 291 m_linkRelations = 0; | 291 m_linkRelations = 0; |
| 292 SpaceSplitString newLinkRelations(value, true); | 292 SpaceSplitString newLinkRelations(value, SpaceSplitString::ShouldFoldCase); |
| 293 // FIXME: Add link relations as they are implemented | 293 // FIXME: Add link relations as they are implemented |
| 294 if (newLinkRelations.contains("noreferrer")) | 294 if (newLinkRelations.contains("noreferrer")) |
| 295 m_linkRelations |= RelationNoReferrer; | 295 m_linkRelations |= RelationNoReferrer; |
| 296 } | 296 } |
| 297 | 297 |
| 298 const AtomicString& HTMLAnchorElement::name() const | 298 const AtomicString& HTMLAnchorElement::name() const |
| 299 { | 299 { |
| 300 return getNameAttribute(); | 300 return getNameAttribute(); |
| 301 } | 301 } |
| 302 | 302 |
| 303 short HTMLAnchorElement::tabIndex() const | 303 short HTMLAnchorElement::tabIndex() const |
| 304 { | 304 { |
| 305 // Skip the supportsFocus check in HTMLElement. | 305 // Skip the supportsFocus check in HTMLElement. |
| 306 return Element::tabIndex(); | 306 return Element::tabIndex(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 bool HTMLAnchorElement::isLiveLink() const | 309 bool HTMLAnchorElement::isLiveLink() const |
| 310 { | 310 { |
| 311 return isLink() && !hasEditableStyle(); | 311 return isLink() && !hasEditableStyle(); |
| 312 } | 312 } |
| 313 | 313 |
| 314 void HTMLAnchorElement::sendPings(const KURL& destinationURL) const | 314 void HTMLAnchorElement::sendPings(const KURL& destinationURL) const |
| 315 { | 315 { |
| 316 const AtomicString& pingValue = getAttribute(pingAttr); | 316 const AtomicString& pingValue = getAttribute(pingAttr); |
| 317 if (pingValue.isNull() || !document().settings() || !document().settings()->
hyperlinkAuditingEnabled()) | 317 if (pingValue.isNull() || !document().settings() || !document().settings()->
hyperlinkAuditingEnabled()) |
| 318 return; | 318 return; |
| 319 | 319 |
| 320 UseCounter::count(document(), UseCounter::HTMLAnchorElementPingAttribute); | 320 UseCounter::count(document(), UseCounter::HTMLAnchorElementPingAttribute); |
| 321 | 321 |
| 322 SpaceSplitString pingURLs(pingValue, false); | 322 SpaceSplitString pingURLs(pingValue, SpaceSplitString::ShouldNotFoldCase); |
| 323 for (unsigned i = 0; i < pingURLs.size(); i++) | 323 for (unsigned i = 0; i < pingURLs.size(); i++) |
| 324 PingLoader::sendLinkAuditPing(document().frame(), document().completeURL
(pingURLs[i]), destinationURL); | 324 PingLoader::sendLinkAuditPing(document().frame(), document().completeURL
(pingURLs[i]), destinationURL); |
| 325 } | 325 } |
| 326 | 326 |
| 327 void HTMLAnchorElement::handleClick(Event* event) | 327 void HTMLAnchorElement::handleClick(Event* event) |
| 328 { | 328 { |
| 329 event->setDefaultHandled(); | 329 event->setDefaultHandled(); |
| 330 | 330 |
| 331 LocalFrame* frame = document().frame(); | 331 LocalFrame* frame = document().frame(); |
| 332 if (!frame) | 332 if (!frame) |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 Vector<String> argv; | 388 Vector<String> argv; |
| 389 argv.append("a"); | 389 argv.append("a"); |
| 390 argv.append(fastGetAttribute(hrefAttr)); | 390 argv.append(fastGetAttribute(hrefAttr)); |
| 391 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); | 391 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); |
| 392 } | 392 } |
| 393 } | 393 } |
| 394 return HTMLElement::insertedInto(insertionPoint); | 394 return HTMLElement::insertedInto(insertionPoint); |
| 395 } | 395 } |
| 396 | 396 |
| 397 } | 397 } |
| OLD | NEW |