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

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

Issue 1186823007: Code cleanup in core/html/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/FormAssociatedElement.cpp ('k') | Source/core/html/HTMLAppletElement.cpp » ('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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (isLink()) { 208 if (isLink()) {
209 String parsedURL = stripLeadingAndTrailingHTMLSpaces(value); 209 String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
210 if (document().isDNSPrefetchEnabled()) { 210 if (document().isDNSPrefetchEnabled()) {
211 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "http s") || parsedURL.startsWith("//")) 211 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "http s") || parsedURL.startsWith("//"))
212 prefetchDNS(document().completeURL(parsedURL).host()); 212 prefetchDNS(document().completeURL(parsedURL).host());
213 } 213 }
214 } 214 }
215 invalidateCachedVisitedLinkHash(); 215 invalidateCachedVisitedLinkHash();
216 } else if (name == nameAttr || name == titleAttr) { 216 } else if (name == nameAttr || name == titleAttr) {
217 // Do nothing. 217 // Do nothing.
218 } else if (name == relAttr) 218 } else if (name == relAttr) {
219 setRel(value); 219 setRel(value);
220 else 220 } else {
221 HTMLElement::parseAttribute(name, value); 221 HTMLElement::parseAttribute(name, value);
222 }
222 } 223 }
223 224
224 void HTMLAnchorElement::accessKeyAction(bool sendMouseEvents) 225 void HTMLAnchorElement::accessKeyAction(bool sendMouseEvents)
225 { 226 {
226 dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEv ents); 227 dispatchSimulatedClick(0, sendMouseEvents ? SendMouseUpDownEvents : SendNoEv ents);
227 } 228 }
228 229
229 bool HTMLAnchorElement::isURLAttribute(const Attribute& attribute) const 230 bool HTMLAnchorElement::isURLAttribute(const Attribute& attribute) const
230 { 231 {
231 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu te(attribute); 232 return attribute.name().localName() == hrefAttr || HTMLElement::isURLAttribu te(attribute);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 Vector<String> argv; 392 Vector<String> argv;
392 argv.append("a"); 393 argv.append("a");
393 argv.append(fastGetAttribute(hrefAttr)); 394 argv.append(fastGetAttribute(hrefAttr));
394 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); 395 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() );
395 } 396 }
396 } 397 }
397 return HTMLElement::insertedInto(insertionPoint); 398 return HTMLElement::insertedInto(insertionPoint);
398 } 399 }
399 400
400 } // namespace blink 401 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/FormAssociatedElement.cpp ('k') | Source/core/html/HTMLAppletElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698