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

Side by Side Diff: Source/WebCore/html/HTMLImageLoader.cpp

Issue 13650009: Remove Dashboard support and supporting files. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compiler error due to misspelling in code "Dashbard" Created 7 years, 8 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/WebCore/html/HTMLEmbedElement.cpp ('k') | Source/WebCore/html/canvas/CanvasGradient.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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return; 55 return;
56 56
57 bool errorOccurred = image()->errorOccurred(); 57 bool errorOccurred = image()->errorOccurred();
58 if (!errorOccurred && image()->response().httpStatusCode() >= 400) 58 if (!errorOccurred && image()->response().httpStatusCode() >= 400)
59 errorOccurred = element()->hasTagName(HTMLNames::objectTag); // An <obje ct> considers a 404 to be an error and should fire onerror. 59 errorOccurred = element()->hasTagName(HTMLNames::objectTag); // An <obje ct> considers a 404 to be an error and should fire onerror.
60 element()->dispatchEvent(Event::create(errorOccurred ? eventNames().errorEve nt : eventNames().loadEvent, false, false)); 60 element()->dispatchEvent(Event::create(errorOccurred ? eventNames().errorEve nt : eventNames().loadEvent, false, false));
61 } 61 }
62 62
63 String HTMLImageLoader::sourceURI(const AtomicString& attr) const 63 String HTMLImageLoader::sourceURI(const AtomicString& attr) const
64 { 64 {
65 #if ENABLE(DASHBOARD_SUPPORT)
66 Settings* settings = element()->document()->settings();
67 if (settings && settings->usesDashboardBackwardCompatibilityMode() && attr.l ength() > 7 && attr.startsWith("url(\"") && attr.endsWith("\")"))
68 return attr.string().substring(5, attr.length() - 7);
69 #endif
70
71 return stripLeadingAndTrailingHTMLSpaces(attr); 65 return stripLeadingAndTrailingHTMLSpaces(attr);
72 } 66 }
73 67
74 void HTMLImageLoader::notifyFinished(CachedResource*) 68 void HTMLImageLoader::notifyFinished(CachedResource*)
75 { 69 {
76 CachedImage* cachedImage = image(); 70 CachedImage* cachedImage = image();
77 71
78 RefPtr<Element> element = this->element(); 72 RefPtr<Element> element = this->element();
79 ImageLoader::notifyFinished(cachedImage); 73 ImageLoader::notifyFinished(cachedImage);
80 74
81 bool loadError = cachedImage->errorOccurred() || cachedImage->response().htt pStatusCode() >= 400; 75 bool loadError = cachedImage->errorOccurred() || cachedImage->response().htt pStatusCode() >= 400;
82 #if USE(JSC) 76 #if USE(JSC)
83 if (!loadError) { 77 if (!loadError) {
84 if (!element->inDocument()) { 78 if (!element->inDocument()) {
85 JSC::JSGlobalData* globalData = JSDOMWindowBase::commonJSGlobalData( ); 79 JSC::JSGlobalData* globalData = JSDOMWindowBase::commonJSGlobalData( );
86 JSC::JSLockHolder lock(globalData); 80 JSC::JSLockHolder lock(globalData);
87 globalData->heap.reportExtraMemoryCost(cachedImage->encodedSize()); 81 globalData->heap.reportExtraMemoryCost(cachedImage->encodedSize());
88 } 82 }
89 } 83 }
90 #endif 84 #endif
91 85
92 if (loadError && element->hasTagName(HTMLNames::objectTag)) 86 if (loadError && element->hasTagName(HTMLNames::objectTag))
93 static_cast<HTMLObjectElement*>(element.get())->renderFallbackContent(); 87 static_cast<HTMLObjectElement*>(element.get())->renderFallbackContent();
94 } 88 }
95 89
96 } 90 }
OLDNEW
« no previous file with comments | « Source/WebCore/html/HTMLEmbedElement.cpp ('k') | Source/WebCore/html/canvas/CanvasGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698