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

Side by Side Diff: Source/WebCore/loader/cache/CachedImage.cpp

Issue 14188008: Move Data uri handling into WebCore Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 setCustomAcceptHeader(); 72 setCustomAcceptHeader();
73 } 73 }
74 74
75 CachedImage::~CachedImage() 75 CachedImage::~CachedImage()
76 { 76 {
77 clearImage(); 77 clearImage();
78 } 78 }
79 79
80 void CachedImage::load(CachedResourceLoader* cachedResourceLoader, const Resourc eLoaderOptions& options) 80 void CachedImage::load(CachedResourceLoader* cachedResourceLoader, const Resourc eLoaderOptions& options)
81 { 81 {
82 if (!cachedResourceLoader || cachedResourceLoader->autoLoadImages()) 82 if (!cachedResourceLoader || cachedResourceLoader->autoLoadImages() || m_res ourceRequest.url().protocolIsData())
83 CachedResource::load(cachedResourceLoader, options); 83 CachedResource::load(cachedResourceLoader, options);
84 else 84 else
85 setLoading(false); 85 setLoading(false);
86 } 86 }
87 87
88 void CachedImage::didAddClient(CachedResourceClient* c) 88 void CachedImage::didAddClient(CachedResourceClient* c)
89 { 89 {
90 if (m_data && !m_image && !errorOccurred()) { 90 if (m_data && !m_image && !errorOccurred()) {
91 createImage(); 91 createImage();
92 m_image->setData(m_data->sharedBuffer(), true); 92 m_image->setData(m_data->sharedBuffer(), true);
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 bool CachedImage::currentFrameKnownToBeOpaque(const RenderObject* renderer) 473 bool CachedImage::currentFrameKnownToBeOpaque(const RenderObject* renderer)
474 { 474 {
475 Image* image = imageForRenderer(renderer); 475 Image* image = imageForRenderer(renderer);
476 if (image->isBitmapImage()) 476 if (image->isBitmapImage())
477 image->nativeImageForCurrentFrame(); // force decode 477 image->nativeImageForCurrentFrame(); // force decode
478 return image->currentFrameKnownToBeOpaque(); 478 return image->currentFrameKnownToBeOpaque();
479 } 479 }
480 480
481 } // namespace WebCore 481 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/loader/ResourceLoader.cpp ('k') | Source/WebCore/platform/network/ResourceHandle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698