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

Side by Side Diff: Source/core/html/DocumentNameCollection.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/css/html.css ('k') | Source/core/html/HTMLAppletElement.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 // 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/DocumentNameCollection.h" 6 #include "core/html/DocumentNameCollection.h"
7 7
8 #include "core/html/HTMLEmbedElement.h" 8 #include "core/html/HTMLEmbedElement.h"
9 #include "core/html/HTMLObjectElement.h" 9 #include "core/html/HTMLObjectElement.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 DocumentNameCollection::DocumentNameCollection(ContainerNode& document, const At omicString& name) 13 DocumentNameCollection::DocumentNameCollection(ContainerNode& document, const At omicString& name)
14 : HTMLNameCollection(document, DocumentNamedItems, name) 14 : HTMLNameCollection(document, DocumentNamedItems, name)
15 { 15 {
16 } 16 }
17 17
18 bool DocumentNameCollection::elementMatches(const HTMLElement& element) const 18 bool DocumentNameCollection::elementMatches(const HTMLElement& element) const
19 { 19 {
20 // Match images, forms, applets, embeds, objects and iframes by name, 20 // Match images, forms, embeds, objects and iframes by name,
21 // applets and object by id, and images by id but only if they have 21 // object by id, and images by id but only if they have
22 // a name attribute (this very strange rule matches IE) 22 // a name attribute (this very strange rule matches IE)
23 if (isHTMLFormElement(element) || isHTMLIFrameElement(element) || (isHTMLEmb edElement(element) && toHTMLEmbedElement(element).isExposed())) 23 if (isHTMLFormElement(element) || isHTMLIFrameElement(element) || (isHTMLEmb edElement(element) && toHTMLEmbedElement(element).isExposed()))
24 return element.getNameAttribute() == m_name; 24 return element.getNameAttribute() == m_name;
25 if (isHTMLAppletElement(element) || (isHTMLObjectElement(element) && toHTMLO bjectElement(element).isExposed())) 25 if (isHTMLObjectElement(element) && toHTMLObjectElement(element).isExposed() )
26 return element.getNameAttribute() == m_name || element.getIdAttribute() == m_name; 26 return element.getNameAttribute() == m_name || element.getIdAttribute() == m_name;
27 if (isHTMLImageElement(element)) 27 if (isHTMLImageElement(element))
28 return element.getNameAttribute() == m_name || (element.getIdAttribute() == m_name && element.hasName()); 28 return element.getNameAttribute() == m_name || (element.getIdAttribute() == m_name && element.hasName());
29 return false; 29 return false;
30 } 30 }
31 31
32 } // namespace blink 32 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/html.css ('k') | Source/core/html/HTMLAppletElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698