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

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

Issue 1291723004: Remove all support for <applet> handling in Chrome. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 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/HTMLTagNames.in ('k') | Source/core/html/parser/HTMLElementStack.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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/html/WindowNameCollection.h" 6 #include "core/html/WindowNameCollection.h"
7 7
8 #include "core/html/HTMLImageElement.h" 8 #include "core/html/HTMLImageElement.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 WindowNameCollection::WindowNameCollection(ContainerNode& document, const Atomic String& name) 12 WindowNameCollection::WindowNameCollection(ContainerNode& document, const Atomic String& name)
13 : HTMLNameCollection(document, WindowNamedItems, name) 13 : HTMLNameCollection(document, WindowNamedItems, name)
14 { 14 {
15 } 15 }
16 16
17 bool WindowNameCollection::elementMatches(const Element& element) const 17 bool WindowNameCollection::elementMatches(const Element& element) const
18 { 18 {
19 // Match only images, forms, applets, embeds and objects by name, 19 // Match only images, forms, embeds and objects by name,
20 // but anything by id 20 // but anything by id
21 if (isHTMLImageElement(element) 21 if (isHTMLImageElement(element)
22 || isHTMLFormElement(element) 22 || isHTMLFormElement(element)
23 || isHTMLAppletElement(element)
24 || isHTMLEmbedElement(element) 23 || isHTMLEmbedElement(element)
25 || isHTMLObjectElement(element)) { 24 || isHTMLObjectElement(element)) {
26 if (element.getNameAttribute() == m_name) 25 if (element.getNameAttribute() == m_name)
27 return true; 26 return true;
28 } 27 }
29 return element.getIdAttribute() == m_name; 28 return element.getIdAttribute() == m_name;
30 } 29 }
31 30
32 } // namespace blink 31 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTagNames.in ('k') | Source/core/html/parser/HTMLElementStack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698