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

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

Issue 610683002: Revert of Support for :enabled selector on Anchor & Area elements (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/css/SelectorChecker.cpp ('k') | no next file » | 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 } 188 }
189 189
190 void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value) 190 void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& value)
191 { 191 {
192 if (name == hrefAttr) { 192 if (name == hrefAttr) {
193 bool wasLink = isLink(); 193 bool wasLink = isLink();
194 setIsLink(!value.isNull()); 194 setIsLink(!value.isNull());
195 if (wasLink || isLink()) { 195 if (wasLink || isLink()) {
196 pseudoStateChanged(CSSSelector::PseudoLink); 196 pseudoStateChanged(CSSSelector::PseudoLink);
197 pseudoStateChanged(CSSSelector::PseudoVisited); 197 pseudoStateChanged(CSSSelector::PseudoVisited);
198 if (wasLink != isLink())
199 pseudoStateChanged(CSSSelector::PseudoEnabled);
200 } 198 }
201 if (wasLink && !isLink() && treeScope().adjustedFocusedElement() == this ) { 199 if (wasLink && !isLink() && treeScope().adjustedFocusedElement() == this ) {
202 // We might want to call blur(), but it's dangerous to dispatch 200 // We might want to call blur(), but it's dangerous to dispatch
203 // events here. 201 // events here.
204 document().setNeedsFocusedElementCheck(); 202 document().setNeedsFocusedElementCheck();
205 } 203 }
206 if (isLink()) { 204 if (isLink()) {
207 String parsedURL = stripLeadingAndTrailingHTMLSpaces(value); 205 String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
208 if (document().isDNSPrefetchEnabled()) { 206 if (document().isDNSPrefetchEnabled()) {
209 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "http s") || parsedURL.startsWith("//")) 207 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "http s") || parsedURL.startsWith("//"))
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 Vector<String> argv; 391 Vector<String> argv;
394 argv.append("a"); 392 argv.append("a");
395 argv.append(fastGetAttribute(hrefAttr)); 393 argv.append(fastGetAttribute(hrefAttr));
396 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() ); 394 activityLogger->logEvent("blinkAddElement", argv.size(), argv.data() );
397 } 395 }
398 } 396 }
399 return HTMLElement::insertedInto(insertionPoint); 397 return HTMLElement::insertedInto(insertionPoint);
400 } 398 }
401 399
402 } 400 }
OLDNEW
« no previous file with comments | « Source/core/css/SelectorChecker.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698