Source/WebCore:
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2018 00:17:45 +0000 (00:17 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jul 2018 00:17:45 +0000 (00:17 +0000)
commitab5d60bbd5d5faafd5a0b00afe2e784e00c26da9
tree6a8c2b10c0fab104bcd3b1631366a82ac4356dc4
parent89f73f8bfe44143ce0bcfd700d5ac882485284a7
Source/WebCore:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the flush immediate transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

An immediate-paint transaction should force all the images which are pending
decoding to be repainted.

To do that, FrameView::paintControlTints() will be re-factored to a new
generic function such that it takes PaintInvalidationReasons. The new function
which is named 'traverseForPaintInvalidation' will traverse the render tree
for a specific PaintInvalidationReasons.

invalidateImagesWithAsyncDecodes() will stop the asynchronous decoding for
the underlying image and repaint all the clients which are waiting for the
decoding to finish.

* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didRemoveClient):
(WebCore::CachedImage::isClientWaitingForAsyncDecoding const):
(WebCore::CachedImage::addClientWaitingForAsyncDecoding):
(WebCore::CachedImage::removeAllClientsWaitingForAsyncDecoding):
(WebCore::CachedImage::allClientsRemoved):
(WebCore::CachedImage::clear):
(WebCore::CachedImage::createImage):
(WebCore::CachedImage::imageFrameAvailable):
(WebCore::CachedImage::addPendingImageDrawingClient): Deleted.
* loader/cache/CachedImage.h:
* page/FrameView.cpp:
(WebCore::FrameView::paintScrollCorner):
(WebCore::FrameView::updateControlTints):
(WebCore::FrameView::traverseForPaintInvalidation):
(WebCore::FrameView::adjustPageHeightDeprecated):
(WebCore::FrameView::paintControlTints): Deleted.
* page/FrameView.h:
* platform/ScrollView.cpp:
(WebCore::ScrollView::paint):
* platform/Scrollbar.cpp:
(WebCore::Scrollbar::paint):
* platform/graphics/BitmapImage.h:
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::GraphicsContext):
* platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::performingPaintInvalidation const):
(WebCore::GraphicsContext::invalidatingControlTints const):
(WebCore::GraphicsContext::invalidatingImagesWithAsyncDecodes const):
(WebCore::GraphicsContext::updatingControlTints const): Deleted.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintAreaElementFocusRing):
(WebCore::RenderImage::paintIntoRect):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintResizer):
(WebCore::RenderLayer::paintLayer):
* rendering/RenderScrollbar.cpp:
(WebCore::RenderScrollbar::paint):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
* testing/Internals.cpp:
(WebCore::Internals::invalidateControlTints):
(WebCore::Internals::paintControlTints): Deleted.
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

For immediate-paint transaction, we should force all the images which are
pending decoding to be repainted before building this transaction.

* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::updateControlTints):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::paint):
* WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

LayoutTests:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

The Internals API paintControlTints() is now renamed to invalidateControlTints()
to be consistent with the new enum values and with the new name of the
C++ function.

* fast/css/webkit-mask-crash-fieldset-legend.html:
* fast/css/webkit-mask-crash-figure.html:
* fast/css/webkit-mask-crash-table.html:
* fast/css/webkit-mask-crash-td-2.html:
* fast/css/webkit-mask-crash-td.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
28 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/css/webkit-mask-crash-fieldset-legend.html
LayoutTests/fast/css/webkit-mask-crash-figure.html
LayoutTests/fast/css/webkit-mask-crash-table.html
LayoutTests/fast/css/webkit-mask-crash-td-2.html
LayoutTests/fast/css/webkit-mask-crash-td.html
Source/WebCore/ChangeLog
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedImage.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/platform/ScrollView.cpp
Source/WebCore/platform/Scrollbar.cpp
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderImage.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/RenderScrollbar.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm
Source/WebKit/WebProcess/Plugins/PluginView.cpp
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm