Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(833)

Side by Side Diff: Source/core/html/HTMLAnchorElement.cpp

Issue 202893002: Replace elementHasLegalLinkAttribute() helper with virtual function (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take tkent's feedback into consideration Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLAppletElement.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 void HTMLAnchorElement::accessKeyAction(bool sendMouseEvents) 294 void HTMLAnchorElement::accessKeyAction(bool sendMouseEvents)
295 { 295 {
296 dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEv ents); 296 dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEv ents);
297 } 297 }
298 298
299 bool HTMLAnchorElement::isURLAttribute(const Attribute& attribute) const 299 bool HTMLAnchorElement::isURLAttribute(const Attribute& attribute) const
300 { 300 {
301 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu te(attribute); 301 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu te(attribute);
302 } 302 }
303 303
304 bool HTMLAnchorElement::hasLegalLinkAttribute(const QualifiedName& name) const
305 {
306 return name == hrefAttr || HTMLElement::hasLegalLinkAttribute(name);
307 }
308
304 bool HTMLAnchorElement::canStartSelection() const 309 bool HTMLAnchorElement::canStartSelection() const
305 { 310 {
306 // FIXME: We probably want this same behavior in SVGAElement too 311 // FIXME: We probably want this same behavior in SVGAElement too
307 if (!isLink()) 312 if (!isLink())
308 return HTMLElement::canStartSelection(); 313 return HTMLElement::canStartSelection();
309 return rendererIsEditable(); 314 return rendererIsEditable();
310 } 315 }
311 316
312 bool HTMLAnchorElement::draggable() const 317 bool HTMLAnchorElement::draggable() const
313 { 318 {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 preconnectToURL(url, motivation); 698 preconnectToURL(url, motivation);
694 m_hasIssuedPreconnect = true; 699 m_hasIssuedPreconnect = true;
695 } 700 }
696 701
697 bool HTMLAnchorElement::isInteractiveContent() const 702 bool HTMLAnchorElement::isInteractiveContent() const
698 { 703 {
699 return isLink(); 704 return isLink();
700 } 705 }
701 706
702 } 707 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAnchorElement.h ('k') | Source/core/html/HTMLAppletElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698