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

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

Issue 126443005: Use TreeScope::completeURL and baseURL instead of the Document versions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased again, passes tests Created 6 years, 11 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/HTMLLinkElement.cpp ('k') | Source/core/html/HTMLPlugInElement.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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 } 196 }
197 197
198 mapDataParamToSrc(&paramNames, &paramValues); 198 mapDataParamToSrc(&paramNames, &paramValues);
199 199
200 // HTML5 says that an object resource's URL is specified by the object's dat a 200 // HTML5 says that an object resource's URL is specified by the object's dat a
201 // attribute, not by a param element. However, for compatibility, allow the 201 // attribute, not by a param element. However, for compatibility, allow the
202 // resource's URL to be given by a param named "src", "movie", "code" or "ur l" 202 // resource's URL to be given by a param named "src", "movie", "code" or "ur l"
203 // if we know that resource points to a plug-in. 203 // if we know that resource points to a plug-in.
204 if (url.isEmpty() && !urlParameter.isEmpty()) { 204 if (url.isEmpty() && !urlParameter.isEmpty()) {
205 KURL completedURL = document().completeURL(urlParameter); 205 KURL completedURL = treeScope().completeURL(urlParameter);
206 bool useFallback; 206 bool useFallback;
207 if (shouldUsePlugin(completedURL, serviceType, false, useFallback)) 207 if (shouldUsePlugin(completedURL, serviceType, false, useFallback))
208 url = urlParameter; 208 url = urlParameter;
209 } 209 }
210 } 210 }
211 211
212 212
213 bool HTMLObjectElement::hasFallbackContent() const 213 bool HTMLObjectElement::hasFallbackContent() const
214 { 214 {
215 for (Node* child = firstChild(); child; child = child->nextSibling()) { 215 for (Node* child = firstChild(); child; child = child->nextSibling()) {
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 { 454 {
455 return fastHasAttribute(usemapAttr); 455 return fastHasAttribute(usemapAttr);
456 } 456 }
457 457
458 bool HTMLObjectElement::useFallbackContent() const 458 bool HTMLObjectElement::useFallbackContent() const
459 { 459 {
460 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent; 460 return HTMLPlugInElement::useFallbackContent() || m_useFallbackContent;
461 } 461 }
462 462
463 } 463 }
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLinkElement.cpp ('k') | Source/core/html/HTMLPlugInElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698