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

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

Issue 656723005: Use C++11 features in core/html (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: mike's comments Created 6 years, 1 month 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
« no previous file with comments | « Source/core/html/HTMLLinkElement.cpp ('k') | Source/core/html/HTMLMediaElement.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 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 ASSERT(isHTMLImageElement(curr)); 74 ASSERT(isHTMLImageElement(curr));
75 75
76 // The HTMLImageElement's useMap() value includes the '#' symbol at the beginning, 76 // The HTMLImageElement's useMap() value includes the '#' symbol at the beginning,
77 // which has to be stripped off. 77 // which has to be stripped off.
78 HTMLImageElement& imageElement = toHTMLImageElement(*curr); 78 HTMLImageElement& imageElement = toHTMLImageElement(*curr);
79 String useMapName = imageElement.getAttribute(usemapAttr).string().subst ring(1); 79 String useMapName = imageElement.getAttribute(usemapAttr).string().subst ring(1);
80 if (equalIgnoringCase(useMapName, m_name)) 80 if (equalIgnoringCase(useMapName, m_name))
81 return &imageElement; 81 return &imageElement;
82 } 82 }
83 83
84 return 0; 84 return nullptr;
85 } 85 }
86 86
87 void HTMLMapElement::parseAttribute(const QualifiedName& name, const AtomicStrin g& value) 87 void HTMLMapElement::parseAttribute(const QualifiedName& name, const AtomicStrin g& value)
88 { 88 {
89 // FIXME: This logic seems wrong for XML documents. 89 // FIXME: This logic seems wrong for XML documents.
90 // Either the id or name will be used depending on the order the attributes are parsed. 90 // Either the id or name will be used depending on the order the attributes are parsed.
91 91
92 if (isIdAttributeName(name) || name == nameAttr) { 92 if (isIdAttributeName(name) || name == nameAttr) {
93 if (isIdAttributeName(name)) { 93 if (isIdAttributeName(name)) {
94 // Call base class so that hasID bit gets set. 94 // Call base class so that hasID bit gets set.
(...skipping 29 matching lines...) Expand all
124 } 124 }
125 125
126 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint) 126 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint)
127 { 127 {
128 if (insertionPoint->inDocument()) 128 if (insertionPoint->inDocument())
129 treeScope().removeImageMap(this); 129 treeScope().removeImageMap(this);
130 HTMLElement::removedFrom(insertionPoint); 130 HTMLElement::removedFrom(insertionPoint);
131 } 131 }
132 132
133 } 133 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLinkElement.cpp ('k') | Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698