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

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

Issue 1885453002: Rename Node::treeScope() to Node::treeScopeOrDocument() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 8 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
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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value) 177 void HTMLAnchorElement::parseAttribute(const QualifiedName& name, const AtomicSt ring& oldValue, const AtomicString& value)
178 { 178 {
179 if (name == hrefAttr) { 179 if (name == hrefAttr) {
180 bool wasLink = isLink(); 180 bool wasLink = isLink();
181 setIsLink(!value.isNull()); 181 setIsLink(!value.isNull());
182 if (wasLink || isLink()) { 182 if (wasLink || isLink()) {
183 pseudoStateChanged(CSSSelector::PseudoLink); 183 pseudoStateChanged(CSSSelector::PseudoLink);
184 pseudoStateChanged(CSSSelector::PseudoVisited); 184 pseudoStateChanged(CSSSelector::PseudoVisited);
185 pseudoStateChanged(CSSSelector::PseudoAnyLink); 185 pseudoStateChanged(CSSSelector::PseudoAnyLink);
186 } 186 }
187 if (wasLink && !isLink() && treeScope().adjustedFocusedElement() == this ) { 187 if (wasLink && !isLink() && treeScopeOrDocument().adjustedFocusedElement () == this) {
188 // We might want to call blur(), but it's dangerous to dispatch 188 // We might want to call blur(), but it's dangerous to dispatch
189 // events here. 189 // events here.
190 document().setNeedsFocusedElementCheck(); 190 document().setNeedsFocusedElementCheck();
191 } 191 }
192 if (isLink()) { 192 if (isLink()) {
193 String parsedURL = stripLeadingAndTrailingHTMLSpaces(value); 193 String parsedURL = stripLeadingAndTrailingHTMLSpaces(value);
194 if (document().isDNSPrefetchEnabled()) { 194 if (document().isDNSPrefetchEnabled()) {
195 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "http s") || parsedURL.startsWith("//")) 195 if (protocolIs(parsedURL, "http") || protocolIs(parsedURL, "http s") || parsedURL.startsWith("//"))
196 prefetchDNS(document().completeURL(parsedURL).host()); 196 prefetchDNS(document().completeURL(parsedURL).host());
197 } 197 }
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 } 382 }
383 383
384 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint) 384 Node::InsertionNotificationRequest HTMLAnchorElement::insertedInto(ContainerNode * insertionPoint)
385 { 385 {
386 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int); 386 InsertionNotificationRequest request = HTMLElement::insertedInto(insertionPo int);
387 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr); 387 logAddElementIfIsolatedWorldAndInDocument("a", hrefAttr);
388 return request; 388 return request;
389 } 389 }
390 390
391 } // namespace blink 391 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698