haikuwebkit/LayoutTests/compositing/ios/rasterization-scale-expecte...

3 lines
64 B
Plaintext
Raw Permalink Normal View History

[iOS WK2] Layer content blurry with nested perspective and transforms https://bugs.webkit.org/show_bug.cgi?id=169457 Source/WebCore: rdar://problem/29879484 Reviewed by Tim Horton. We set rasterizationScale on CALayers to the same values as contentsScale, to avoid blurry layers when CA rasterizes, which often happens with nested perspective transforms. However, in UI-side compositing, if the page is not zoomed, we never applied the rasterizationScale in the UI process. This happened because the PlatformCALayerRemote constructor set m_properties.contentsScale, but did not set the dirty bit that triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. The fix is to set this dirty bit. The rest of the changes are for testing. Internals now exposes layerIDForElement() for returns an internal (non-stable-across-loads) layerID, which can be passed to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary which the test can dump as JSON, or pull values out of. A few #pragma once cleanups also. Tests: compositing/ios/basic-layer-properties.html compositing/ios/rasterization-scale.html * testing/Internals.cpp: (WebCore::Internals::layerIDForElement): * testing/Internals.h: * testing/Internals.idl: Source/WebKit2: rdar://problem/29879484 Reviewed by Tim Horton. We set rasterizationScale on CALayers to the same values as contentsScale, to avoid blurry layers when CA rasterizes, which often happens with nested perspective transforms. However, in UI-side compositing, if the page is not zoomed, we never applied the rasterizationScale in the UI process. This happened because the PlatformCALayerRemote constructor set m_properties.contentsScale, but did not set the dirty bit that triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. The fix is to set this dirty bit. The rest of the changes are for testing. Internals now exposes layerIDForElement() for returns an internal (non-stable-across-loads) layerID, which can be passed to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary which the test can dump as JSON, or pull values out of. A few #pragma once cleanups also. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _propertiesOfLayerWithID:]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: (WebKit::RemoteLayerTreeDrawingAreaProxy::layerWithIDForTesting): * UIProcess/mac/RemoteLayerTreeHost.h: * UIProcess/mac/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::layerWithIDForTesting): * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: (WebKit::PlatformCALayerRemote::PlatformCALayerRemote): Tools: rdar://problem/29879484 Reviewed by Tim Horton. We set rasterizationScale on CALayers to the same values as contentsScale, to avoid blurry layers when CA rasterizes, which often happens with nested perspective transforms. However, in UI-side compositing, if the page is not zoomed, we never applied the rasterizationScale in the UI process. This happened because the PlatformCALayerRemote constructor set m_properties.contentsScale, but did not set the dirty bit that triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. The fix is to set this dirty bit. The rest of the changes are for testing. Internals now exposes layerIDForElement() for returns an internal (non-stable-across-loads) layerID, which can be passed to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary which the test can dump as JSON, or pull values out of. A few #pragma once cleanups also. * DumpRenderTree/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::propertiesOfLayerWithID): * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: * TestRunnerShared/UIScriptContext/UIScriptController.cpp: (WTR::UIScriptController::propertiesOfLayerWithID): * TestRunnerShared/UIScriptContext/UIScriptController.h: * WebKitTestRunner/ios/UIScriptControllerIOS.mm: (WTR::UIScriptController::propertiesOfLayerWithID): LayoutTests: Reviewed by Tim Horton. We set rasterizationScale on CALayers to the same values as contentsScale, to avoid blurry layers when CA rasterizes, which often happens with nested perspective transforms. However, in UI-side compositing, if the page is not zoomed, we never applied the rasterizationScale in the UI process. This happened because the PlatformCALayerRemote constructor set m_properties.contentsScale, but did not set the dirty bit that triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. The fix is to set this dirty bit. The rest of the changes are for testing. Internals now exposes layerIDForElement() for returns an internal (non-stable-across-loads) layerID, which can be passed to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary which the test can dump as JSON, or pull values out of. A few #pragma once cleanups also. * TestExpectations: * compositing/ios/basic-layer-properties-expected.txt: Added. * compositing/ios/basic-layer-properties.html: Added. * compositing/ios/rasterization-scale-expected.txt: Added. * compositing/ios/rasterization-scale.html: Added. * platform/ios-simulator-wk2/TestExpectations: Canonical link: https://commits.webkit.org/186473@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213719 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-10 19:07:13 +00:00
This text should not be blurry
rasterizationScale of layer is 2