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

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

Issue 143453010: Have getElementsByClassName() / getElementsByTagName*() return an HTMLCollection (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/HTMLCollection.cpp ('k') | Source/web/WebHelperPluginImpl.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 /* 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 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 6 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
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 10 matching lines...) Expand all
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 */ 22 */
23 23
24 #include "config.h" 24 #include "config.h"
25 #include "core/html/HTMLObjectElement.h" 25 #include "core/html/HTMLObjectElement.h"
26 26
27 #include "HTMLNames.h" 27 #include "HTMLNames.h"
28 #include "bindings/v8/ScriptEventListener.h" 28 #include "bindings/v8/ScriptEventListener.h"
29 #include "core/dom/Attribute.h" 29 #include "core/dom/Attribute.h"
30 #include "core/dom/ElementTraversal.h" 30 #include "core/dom/ElementTraversal.h"
31 #include "core/dom/NodeList.h"
32 #include "core/dom/Text.h" 31 #include "core/dom/Text.h"
33 #include "core/dom/shadow/ShadowRoot.h" 32 #include "core/dom/shadow/ShadowRoot.h"
34 #include "core/events/ThreadLocalEventNames.h" 33 #include "core/events/ThreadLocalEventNames.h"
35 #include "core/fetch/ImageResource.h" 34 #include "core/fetch/ImageResource.h"
36 #include "core/html/FormDataList.h" 35 #include "core/html/FormDataList.h"
36 #include "core/html/HTMLCollection.h"
37 #include "core/html/HTMLDocument.h" 37 #include "core/html/HTMLDocument.h"
38 #include "core/html/HTMLImageLoader.h" 38 #include "core/html/HTMLImageLoader.h"
39 #include "core/html/HTMLMetaElement.h" 39 #include "core/html/HTMLMetaElement.h"
40 #include "core/html/HTMLParamElement.h" 40 #include "core/html/HTMLParamElement.h"
41 #include "core/html/parser/HTMLParserIdioms.h" 41 #include "core/html/parser/HTMLParserIdioms.h"
42 #include "core/frame/Settings.h" 42 #include "core/frame/Settings.h"
43 #include "core/plugins/PluginView.h" 43 #include "core/plugins/PluginView.h"
44 #include "core/rendering/RenderEmbeddedObject.h" 44 #include "core/rendering/RenderEmbeddedObject.h"
45 #include "platform/MIMETypeRegistry.h" 45 #include "platform/MIMETypeRegistry.h"
46 #include "platform/Widget.h" 46 #include "platform/Widget.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 // ActiveX classid. Treat this classid as valid only if OS X Server's unique 228 // ActiveX classid. Treat this classid as valid only if OS X Server's unique
229 // 'generator' meta tag is present. Only apply this quirk if there is no 229 // 'generator' meta tag is present. Only apply this quirk if there is no
230 // fallback content, which ensures the quirk will disable itself if Wiki 230 // fallback content, which ensures the quirk will disable itself if Wiki
231 // Server is updated to generate an alternate embed tag as fallback content. 231 // Server is updated to generate an alternate embed tag as fallback content.
232 if (!document().settings() 232 if (!document().settings()
233 || !document().settings()->needsSiteSpecificQuirks() 233 || !document().settings()->needsSiteSpecificQuirks()
234 || hasFallbackContent() 234 || hasFallbackContent()
235 || !equalIgnoringCase(classId(), "clsid:02BF25D5-8C17-4B23-BC80-D3488ABD DC6B")) 235 || !equalIgnoringCase(classId(), "clsid:02BF25D5-8C17-4B23-BC80-D3488ABD DC6B"))
236 return false; 236 return false;
237 237
238 RefPtr<NodeList> metaElements = document().getElementsByTagName(HTMLNames::m etaTag.localName()); 238 RefPtr<HTMLCollection> metaElements = document().getElementsByTagName(HTMLNa mes::metaTag.localName());
239 unsigned length = metaElements->length(); 239 unsigned length = metaElements->length();
240 for (unsigned i = 0; i < length; ++i) { 240 for (unsigned i = 0; i < length; ++i) {
241 ASSERT(metaElements->item(i)->isHTMLElement()); 241 ASSERT(metaElements->item(i)->isHTMLElement());
242 HTMLMetaElement* metaElement = toHTMLMetaElement(metaElements->item(i)); 242 HTMLMetaElement* metaElement = toHTMLMetaElement(metaElements->item(i));
243 if (equalIgnoringCase(metaElement->name(), "generator") && metaElement-> content().startsWith("Mac OS X Server Web Services Server", false)) 243 if (equalIgnoringCase(metaElement->name(), "generator") && metaElement-> content().startsWith("Mac OS X Server Web Services Server", false))
244 return true; 244 return true;
245 } 245 }
246 246
247 return false; 247 return false;
248 } 248 }
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 { 476 {
477 return fastHasAttribute(usemapAttr); 477 return fastHasAttribute(usemapAttr);
478 } 478 }
479 479
480 bool HTMLObjectElement::useFallbackContent() const 480 bool HTMLObjectElement::useFallbackContent() const
481 { 481 {
482 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 482 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
483 } 483 }
484 484
485 } 485 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLCollection.cpp ('k') | Source/web/WebHelperPluginImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698