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

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

Issue 23890025: WIP (Introduce WTF::NonNullPtr<T>.) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/HTMLLabelElement.cpp ('k') | Source/core/page/FocusController.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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // Either the id or name will be used depending on the order the attributes are parsed. 103 // Either the id or name will be used depending on the order the attributes are parsed.
104 104
105 if (isIdAttributeName(name) || name == nameAttr) { 105 if (isIdAttributeName(name) || name == nameAttr) {
106 if (isIdAttributeName(name)) { 106 if (isIdAttributeName(name)) {
107 // Call base class so that hasID bit gets set. 107 // Call base class so that hasID bit gets set.
108 HTMLElement::parseAttribute(name, value); 108 HTMLElement::parseAttribute(name, value);
109 if (document().isHTMLDocument()) 109 if (document().isHTMLDocument())
110 return; 110 return;
111 } 111 }
112 if (inDocument()) 112 if (inDocument())
113 treeScope().removeImageMap(this); 113 treeScope()->removeImageMap(this);
114 String mapName = value; 114 String mapName = value;
115 if (mapName[0] == '#') 115 if (mapName[0] == '#')
116 mapName = mapName.substring(1); 116 mapName = mapName.substring(1);
117 m_name = document().isHTMLDocument() ? mapName.lower() : mapName; 117 m_name = document().isHTMLDocument() ? mapName.lower() : mapName;
118 if (inDocument()) 118 if (inDocument())
119 treeScope().addImageMap(this); 119 treeScope()->addImageMap(this);
120 120
121 return; 121 return;
122 } 122 }
123 123
124 HTMLElement::parseAttribute(name, value); 124 HTMLElement::parseAttribute(name, value);
125 } 125 }
126 126
127 PassRefPtr<HTMLCollection> HTMLMapElement::areas() 127 PassRefPtr<HTMLCollection> HTMLMapElement::areas()
128 { 128 {
129 return ensureCachedHTMLCollection(MapAreas); 129 return ensureCachedHTMLCollection(MapAreas);
130 } 130 }
131 131
132 Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode* i nsertionPoint) 132 Node::InsertionNotificationRequest HTMLMapElement::insertedInto(ContainerNode* i nsertionPoint)
133 { 133 {
134 if (insertionPoint->inDocument()) 134 if (insertionPoint->inDocument())
135 treeScope().addImageMap(this); 135 treeScope()->addImageMap(this);
136 return HTMLElement::insertedInto(insertionPoint); 136 return HTMLElement::insertedInto(insertionPoint);
137 } 137 }
138 138
139 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint) 139 void HTMLMapElement::removedFrom(ContainerNode* insertionPoint)
140 { 140 {
141 if (insertionPoint->inDocument()) 141 if (insertionPoint->inDocument())
142 treeScope().removeImageMap(this); 142 treeScope()->removeImageMap(this);
143 HTMLElement::removedFrom(insertionPoint); 143 HTMLElement::removedFrom(insertionPoint);
144 } 144 }
145 145
146 } 146 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLabelElement.cpp ('k') | Source/core/page/FocusController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698