-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=95478 .: Patch by Bo Liu <boliu@chromium.org> on 2012-09-14 Reviewed by Adam Barth. Export WebCore::Settings::setImagesEnabled symbol. * Source/autotools/symbols.filter: Source/WebCore: Patch by Bo Liu <boliu@chromium.org> on 2012-09-14 Reviewed by Adam Barth. Store ImagesEnabled setting in CachedResourceLoader similar to AutoLoadImages. Move FrameLoaderClient::allowImage to after a CachedImage has been created and store the cache for reload if it is blocked. Make sure when image loads are deferred by either ImagesEnabled or LoadImagesAutomatically, onload is not called. Added ImagesEnabled to InternalSettings for layout tests. Tests: fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html * WebCore.exp.in: * loader/FrameLoader.cpp: (WebCore::FrameLoader::didBeginDocument): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::willSendRequest): * loader/cache/CachedImage.cpp: (WebCore::CachedImage::load): * loader/cache/CachedImage.h: * loader/cache/CachedResource.cpp: (WebCore::CachedResource::didAddClient): * loader/cache/CachedResource.h: (WebCore::CachedResource::stillNeedsLoad): * loader/cache/CachedResourceLoader.cpp: (WebCore::CachedResourceLoader::CachedResourceLoader): (WebCore::CachedResourceLoader::requestImage): (WebCore::CachedResourceLoader::canRequest): (WebCore::CachedResourceLoader::determineRevalidationPolicy): (WebCore::CachedResourceLoader::setAutoLoadImages): (WebCore): (WebCore::CachedResourceLoader::setImagesEnabled): (WebCore::CachedResourceLoader::shouldDeferImageLoad): (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred): * loader/cache/CachedResourceLoader.h: (CachedResourceLoader): (WebCore::CachedResourceLoader::imagesEnabled): * page/Settings.cpp: (WebCore::setImageLoadingSettings): (WebCore::Settings::Settings): (WebCore::Settings::setLoadsImagesAutomatically): (WebCore::Settings::imageLoadingSettingsTimerFired): (WebCore::Settings::setImagesEnabled): * page/Settings.h: (Settings): * testing/InternalSettings.cpp: (WebCore::InternalSettings::setImagesEnabled): (WebCore): * testing/InternalSettings.h: (InternalSettings): * testing/InternalSettings.idl: Source/WebKit2: Patch by Bo Liu <boliu@chromium.org> on 2012-09-14 Reviewed by Adam Barth. Export WebCore::Settings::setImagesEnabled symbol. * win/WebKit2.def: LayoutTests: Add tests to check autoLoadImages and imagesEnabled can block images and can reload them in place when setting is set to unblock. image-permissions tests are updated to reflect that onerror will no longer be called when images are blocked. Patch by Bo Liu <boliu@chromium.org> on 2012-09-14 Reviewed by Adam Barth. * fast/loader/display-image-unset-can-block-image-and-can-reload-in-place-expected.txt: Added. * fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html: Added. * fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place-expected.txt: Added. * fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html: Added. * platform/chromium/http/tests/permissionclient/image-permissions-expected.txt: * platform/chromium/permissionclient/image-permissions-expected.txt: * platform/chromium/permissionclient/image-permissions.html: * platform/chromium/permissionclient/resources/image.html: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
d0a50678