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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 { | 286 { |
287 return getNameAttribute(); | 287 return getNameAttribute(); |
288 } | 288 } |
289 | 289 |
290 short HTMLAnchorElement::tabIndex() const | 290 short HTMLAnchorElement::tabIndex() const |
291 { | 291 { |
292 // Skip the supportsFocus check in HTMLElement. | 292 // Skip the supportsFocus check in HTMLElement. |
293 return Element::tabIndex(); | 293 return Element::tabIndex(); |
294 } | 294 } |
295 | 295 |
296 AtomicString HTMLAnchorElement::target() const | |
297 { | |
298 return getAttribute(targetAttr); | |
299 } | |
300 | |
301 bool HTMLAnchorElement::isLiveLink() const | 296 bool HTMLAnchorElement::isLiveLink() const |
302 { | 297 { |
303 return isLink() && !hasEditableStyle(); | 298 return isLink() && !hasEditableStyle(); |
304 } | 299 } |
305 | 300 |
306 void HTMLAnchorElement::sendPings(const KURL& destinationURL) | 301 void HTMLAnchorElement::sendPings(const KURL& destinationURL) |
307 { | 302 { |
308 const AtomicString& pingValue = getAttribute(pingAttr); | 303 const AtomicString& pingValue = getAttribute(pingAttr); |
309 if (pingValue.isNull() || !document().settings() || !document().settings()->
hyperlinkAuditingEnabled()) | 304 if (pingValue.isNull() || !document().settings() || !document().settings()->
hyperlinkAuditingEnabled()) |
310 return; | 305 return; |
(...skipping 28 matching lines...) Expand all Loading... |
339 String referrer = SecurityPolicy::generateReferrerHeader(document().
referrerPolicy(), completedURL, document().outgoingReferrer()); | 334 String referrer = SecurityPolicy::generateReferrerHeader(document().
referrerPolicy(), completedURL, document().outgoingReferrer()); |
340 if (!referrer.isEmpty()) | 335 if (!referrer.isEmpty()) |
341 request.setHTTPReferrer(Referrer(referrer, document().referrerPo
licy())); | 336 request.setHTTPReferrer(Referrer(referrer, document().referrerPo
licy())); |
342 } | 337 } |
343 | 338 |
344 bool isSameOrigin = completedURL.protocolIsData() || document().security
Origin()->canRequest(completedURL); | 339 bool isSameOrigin = completedURL.protocolIsData() || document().security
Origin()->canRequest(completedURL); |
345 const AtomicString& suggestedName = (isSameOrigin ? fastGetAttribute(dow
nloadAttr) : nullAtom); | 340 const AtomicString& suggestedName = (isSameOrigin ? fastGetAttribute(dow
nloadAttr) : nullAtom); |
346 | 341 |
347 frame->loader().client()->loadURLExternally(request, NavigationPolicyDow
nload, suggestedName); | 342 frame->loader().client()->loadURLExternally(request, NavigationPolicyDow
nload, suggestedName); |
348 } else { | 343 } else { |
349 FrameLoadRequest frameRequest(&document(), request, target()); | 344 FrameLoadRequest frameRequest(&document(), request, getAttribute(targetA
ttr)); |
350 frameRequest.setTriggeringEvent(event); | 345 frameRequest.setTriggeringEvent(event); |
351 if (hasRel(RelationNoReferrer)) | 346 if (hasRel(RelationNoReferrer)) |
352 frameRequest.setShouldSendReferrer(NeverSendReferrer); | 347 frameRequest.setShouldSendReferrer(NeverSendReferrer); |
353 frame->loader().load(frameRequest); | 348 frame->loader().load(frameRequest); |
354 } | 349 } |
355 } | 350 } |
356 | 351 |
357 bool isEnterKeyKeydownEvent(Event* event) | 352 bool isEnterKeyKeydownEvent(Event* event) |
358 { | 353 { |
359 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent()
&& toKeyboardEvent(event)->keyIdentifier() == "Enter"; | 354 return event->type() == EventTypeNames::keydown && event->isKeyboardEvent()
&& toKeyboardEvent(event)->keyIdentifier() == "Enter"; |
(...skipping 22 matching lines...) Expand all Loading... |
382 Vector<String> argv; | 377 Vector<String> argv; |
383 argv.append("a"); | 378 argv.append("a"); |
384 argv.append(fastGetAttribute(hrefAttr)); | 379 argv.append(fastGetAttribute(hrefAttr)); |
385 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); | 380 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data()
); |
386 } | 381 } |
387 } | 382 } |
388 return HTMLElement::insertedInto(insertionPoint); | 383 return HTMLElement::insertedInto(insertionPoint); |
389 } | 384 } |
390 | 385 |
391 } | 386 } |
OLD | NEW |