Changeset 213719 in webkit
- Timestamp:
- Mar 10, 2017, 11:07:13 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 5 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r213713 r213719 1 2017-03-09 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Layer content blurry with nested perspective and transforms 4 https://bugs.webkit.org/show_bug.cgi?id=169457 5 6 Reviewed by Tim Horton. 7 8 We set rasterizationScale on CALayers to the same values as contentsScale, to 9 avoid blurry layers when CA rasterizes, which often happens with nested perspective 10 transforms. 11 12 However, in UI-side compositing, if the page is not zoomed, we never applied the 13 rasterizationScale in the UI process. This happened because the PlatformCALayerRemote 14 constructor set m_properties.contentsScale, but did not set the dirty bit that 15 triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. 16 The fix is to set this dirty bit. 17 18 The rest of the changes are for testing. Internals now exposes layerIDForElement() 19 for returns an internal (non-stable-across-loads) layerID, which can be passed 20 to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects 21 the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary 22 which the test can dump as JSON, or pull values out of. 23 24 A few #pragma once cleanups also. 25 26 * TestExpectations: 27 * compositing/ios/basic-layer-properties-expected.txt: Added. 28 * compositing/ios/basic-layer-properties.html: Added. 29 * compositing/ios/rasterization-scale-expected.txt: Added. 30 * compositing/ios/rasterization-scale.html: Added. 31 * platform/ios-simulator-wk2/TestExpectations: 32 1 33 2017-03-10 Javier Fernandez <jfernandez@igalia.com> 2 34 -
trunk/LayoutTests/TestExpectations
r213671 r213719 7 7 #////////////////////////////////////////////////////////////////////////////////////////// 8 8 9 compositing/ios [ Skip ] 9 10 css3/touch-action [ Skip ] 10 11 accessibility/ios-simulator [ Skip ] -
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
r213590 r213719 7 7 #////////////////////////////////////////////////////////////////////////////////////////// 8 8 9 compositing/ios [ Pass ] 9 10 fast/history/ios [ Pass ] 10 11 fast/scrolling/ios [ Pass ] -
trunk/Source/WebCore/ChangeLog
r213715 r213719 1 2017-03-09 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Layer content blurry with nested perspective and transforms 4 https://bugs.webkit.org/show_bug.cgi?id=169457 5 rdar://problem/29879484 6 7 Reviewed by Tim Horton. 8 9 We set rasterizationScale on CALayers to the same values as contentsScale, to 10 avoid blurry layers when CA rasterizes, which often happens with nested perspective 11 transforms. 12 13 However, in UI-side compositing, if the page is not zoomed, we never applied the 14 rasterizationScale in the UI process. This happened because the PlatformCALayerRemote 15 constructor set m_properties.contentsScale, but did not set the dirty bit that 16 triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. 17 The fix is to set this dirty bit. 18 19 The rest of the changes are for testing. Internals now exposes layerIDForElement() 20 for returns an internal (non-stable-across-loads) layerID, which can be passed 21 to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects 22 the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary 23 which the test can dump as JSON, or pull values out of. 24 25 A few #pragma once cleanups also. 26 27 Tests: compositing/ios/basic-layer-properties.html 28 compositing/ios/rasterization-scale.html 29 30 * testing/Internals.cpp: 31 (WebCore::Internals::layerIDForElement): 32 * testing/Internals.h: 33 * testing/Internals.idl: 34 1 35 2017-03-10 Commit Queue <commit-queue@webkit.org> 2 36 -
trunk/Source/WebCore/testing/Internals.cpp
r213519 r213719 2150 2150 } 2151 2151 2152 ExceptionOr<uint64_t> Internals::layerIDForElement(Element& element) 2153 { 2154 Document* document = contextDocument(); 2155 if (!document || !document->frame()) 2156 return Exception { INVALID_ACCESS_ERR }; 2157 2158 if (!element.renderer() || !element.renderer()->hasLayer()) 2159 return Exception { NOT_FOUND_ERR }; 2160 2161 auto& layerModelObject = downcast<RenderLayerModelObject>(*element.renderer()); 2162 if (!layerModelObject.layer()->isComposited()) 2163 return Exception { NOT_FOUND_ERR }; 2164 2165 auto* backing = layerModelObject.layer()->backing(); 2166 return backing->graphicsLayer()->primaryLayerID(); 2167 } 2168 2152 2169 ExceptionOr<String> Internals::repaintRectsAsText() const 2153 2170 { -
trunk/Source/WebCore/testing/Internals.h
r213473 r213719 275 275 }; 276 276 ExceptionOr<String> layerTreeAsText(Document&, unsigned short flags) const; 277 ExceptionOr<uint64_t> layerIDForElement(Element&); 277 278 ExceptionOr<String> repaintRectsAsText() const; 278 279 ExceptionOr<String> scrollingStateTreeAsText() const; -
trunk/Source/WebCore/testing/Internals.idl
r213473 r213719 261 261 [MayThrowException] DOMString layerTreeAsText(Document document, optional unsigned short flags = 0); 262 262 263 [MayThrowException] unsigned long long layerIDForElement(Element element); 264 263 265 [MayThrowException] DOMString scrollingStateTreeAsText(); 264 266 [MayThrowException] DOMString mainThreadScrollingReasons(); // FIXME: rename to synchronousScrollingReasons(). -
trunk/Source/WebKit2/ChangeLog
r213715 r213719 1 2017-03-09 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Layer content blurry with nested perspective and transforms 4 https://bugs.webkit.org/show_bug.cgi?id=169457 5 rdar://problem/29879484 6 7 Reviewed by Tim Horton. 8 9 We set rasterizationScale on CALayers to the same values as contentsScale, to 10 avoid blurry layers when CA rasterizes, which often happens with nested perspective 11 transforms. 12 13 However, in UI-side compositing, if the page is not zoomed, we never applied the 14 rasterizationScale in the UI process. This happened because the PlatformCALayerRemote 15 constructor set m_properties.contentsScale, but did not set the dirty bit that 16 triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. 17 The fix is to set this dirty bit. 18 19 The rest of the changes are for testing. Internals now exposes layerIDForElement() 20 for returns an internal (non-stable-across-loads) layerID, which can be passed 21 to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects 22 the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary 23 which the test can dump as JSON, or pull values out of. 24 25 A few #pragma once cleanups also. 26 27 * UIProcess/API/Cocoa/WKWebView.mm: 28 (-[WKWebView _propertiesOfLayerWithID:]): 29 * UIProcess/API/Cocoa/WKWebViewPrivate.h: 30 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h: 31 * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm: 32 (WebKit::RemoteLayerTreeDrawingAreaProxy::layerWithIDForTesting): 33 * UIProcess/mac/RemoteLayerTreeHost.h: 34 * UIProcess/mac/RemoteLayerTreeHost.mm: 35 (WebKit::RemoteLayerTreeHost::layerWithIDForTesting): 36 * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp: 37 (WebKit::PlatformCALayerRemote::PlatformCALayerRemote): 38 1 39 2017-03-10 Commit Queue <commit-queue@webkit.org> 2 40 -
trunk/Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h
r209369 r213719 24 24 */ 25 25 26 #ifndef RemoteLayerTreePropertyApplier_h 27 #define RemoteLayerTreePropertyApplier_h 26 #pragma once 28 27 29 28 #include "LayerRepresentation.h" … … 45 44 46 45 } // namespace WebKit 47 48 #endif // RemoteLayerTreePropertyApplier_h -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm
r213686 r213719 5155 5155 } 5156 5156 5157 - (NSDictionary *)_propertiesOfLayerWithID:(unsigned long long)layerID 5158 { 5159 CALayer* layer = asLayer(downcast<WebKit::RemoteLayerTreeDrawingAreaProxy>(*_page->drawingArea()).layerWithIDForTesting(layerID)); 5160 if (!layer) 5161 return nil; 5162 5163 return @{ 5164 @"bounds" : @{ 5165 @"x" : @(layer.bounds.origin.x), 5166 @"y" : @(layer.bounds.origin.x), 5167 @"width" : @(layer.bounds.size.width), 5168 @"height" : @(layer.bounds.size.height), 5169 5170 }, 5171 @"position" : @{ 5172 @"x" : @(layer.position.x), 5173 @"y" : @(layer.position.y), 5174 }, 5175 @"zPosition" : @(layer.zPosition), 5176 @"anchorPoint" : @{ 5177 @"x" : @(layer.anchorPoint.x), 5178 @"y" : @(layer.anchorPoint.y), 5179 }, 5180 @"anchorPointZ" : @(layer.anchorPointZ), 5181 @"transform" : @{ 5182 @"m11" : @(layer.transform.m11), 5183 @"m12" : @(layer.transform.m12), 5184 @"m13" : @(layer.transform.m13), 5185 @"m14" : @(layer.transform.m14), 5186 5187 @"m21" : @(layer.transform.m21), 5188 @"m22" : @(layer.transform.m22), 5189 @"m23" : @(layer.transform.m23), 5190 @"m24" : @(layer.transform.m24), 5191 5192 @"m31" : @(layer.transform.m31), 5193 @"m32" : @(layer.transform.m32), 5194 @"m33" : @(layer.transform.m33), 5195 @"m34" : @(layer.transform.m34), 5196 5197 @"m41" : @(layer.transform.m41), 5198 @"m42" : @(layer.transform.m42), 5199 @"m43" : @(layer.transform.m43), 5200 @"m44" : @(layer.transform.m44), 5201 }, 5202 @"sublayerTransform" : @{ 5203 @"m11" : @(layer.sublayerTransform.m11), 5204 @"m12" : @(layer.sublayerTransform.m12), 5205 @"m13" : @(layer.sublayerTransform.m13), 5206 @"m14" : @(layer.sublayerTransform.m14), 5207 5208 @"m21" : @(layer.sublayerTransform.m21), 5209 @"m22" : @(layer.sublayerTransform.m22), 5210 @"m23" : @(layer.sublayerTransform.m23), 5211 @"m24" : @(layer.sublayerTransform.m24), 5212 5213 @"m31" : @(layer.sublayerTransform.m31), 5214 @"m32" : @(layer.sublayerTransform.m32), 5215 @"m33" : @(layer.sublayerTransform.m33), 5216 @"m34" : @(layer.sublayerTransform.m34), 5217 5218 @"m41" : @(layer.sublayerTransform.m41), 5219 @"m42" : @(layer.sublayerTransform.m42), 5220 @"m43" : @(layer.sublayerTransform.m43), 5221 @"m44" : @(layer.sublayerTransform.m44), 5222 }, 5223 5224 @"hidden" : @(layer.hidden), 5225 @"doubleSided" : @(layer.doubleSided), 5226 @"masksToBounds" : @(layer.masksToBounds), 5227 @"contentsScale" : @(layer.contentsScale), 5228 @"rasterizationScale" : @(layer.rasterizationScale), 5229 @"opaque" : @(layer.opaque), 5230 @"opacity" : @(layer.opacity), 5231 }; 5232 } 5233 5157 5234 #endif // PLATFORM(IOS) 5158 5235 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
r213683 r213719 313 313 @property (nonatomic, readonly) NSNumber *_stableStateOverride WK_API_AVAILABLE(ios(WK_IOS_TBA)); 314 314 315 - (NSDictionary *)_propertiesOfLayerWithID:(unsigned long long)layerID WK_API_AVAILABLE(ios(WK_IOS_TBA)); 316 315 317 - (void)_simulateDataInteractionEntered:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA)); 316 318 - (void)_simulateDataInteractionUpdated:(id)info WK_API_AVAILABLE(ios(WK_IOS_TBA)); -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h
r212312 r213719 24 24 */ 25 25 26 #ifndef RemoteLayerTreeDrawingAreaProxy_h 27 #define RemoteLayerTreeDrawingAreaProxy_h 26 #pragma once 28 27 29 28 #include "DrawingAreaProxy.h" … … 58 57 59 58 bool isAlwaysOnLoggingAllowed() const; 59 60 LayerOrView* layerWithIDForTesting(uint64_t) const; 60 61 61 62 private: … … 120 121 121 122 SPECIALIZE_TYPE_TRAITS_DRAWING_AREA_PROXY(RemoteLayerTreeDrawingAreaProxy, DrawingAreaTypeRemoteLayerTree) 122 123 #endif // RemoteLayerTreeDrawingAreaProxy_h -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm
r212312 r213719 479 479 } 480 480 481 LayerOrView* RemoteLayerTreeDrawingAreaProxy::layerWithIDForTesting(uint64_t layerID) const 482 { 483 return m_remoteLayerTreeHost.layerWithIDForTesting(layerID); 484 } 485 481 486 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.h
r209369 r213719 24 24 */ 25 25 26 #ifndef RemoteLayerTreeHost_h 27 #define RemoteLayerTreeHost_h 26 #pragma once 28 27 29 28 #include "LayerRepresentation.h" … … 72 71 void mapAllIOSurfaceBackingStore(); 73 72 73 LayerOrView* layerWithIDForTesting(uint64_t) const; 74 74 75 private: 75 76 LayerOrView *createLayer(const RemoteLayerTreeTransaction::LayerCreationProperties&, const RemoteLayerTreeTransaction::LayerProperties*); … … 86 87 87 88 } // namespace WebKit 88 89 #endif // RemoteLayerTreeHost_h -
trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeHost.mm
r212312 r213719 205 205 } 206 206 207 LayerOrView* RemoteLayerTreeHost::layerWithIDForTesting(uint64_t layerID) const 208 { 209 return getLayer(layerID); 210 } 211 207 212 static NSString* const WKLayerIDPropertyKey = @"WKLayerID"; 208 213 -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp
r212776 r213719 77 77 , m_context(&context) 78 78 { 79 if (owner) 79 if (owner) { 80 80 m_properties.contentsScale = owner->platformCALayerDeviceScaleFactor(); 81 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::ContentsScaleChanged); 82 } 81 83 } 82 84 -
trunk/Tools/ChangeLog
r213715 r213719 1 2017-03-09 Simon Fraser <simon.fraser@apple.com> 2 3 [iOS WK2] Layer content blurry with nested perspective and transforms 4 https://bugs.webkit.org/show_bug.cgi?id=169457 5 rdar://problem/29879484 6 7 Reviewed by Tim Horton. 8 9 We set rasterizationScale on CALayers to the same values as contentsScale, to 10 avoid blurry layers when CA rasterizes, which often happens with nested perspective 11 transforms. 12 13 However, in UI-side compositing, if the page is not zoomed, we never applied the 14 rasterizationScale in the UI process. This happened because the PlatformCALayerRemote 15 constructor set m_properties.contentsScale, but did not set the dirty bit that 16 triggers the application of contentsScale and rasterizationScale in RemoteLayerTreePropertyApplier. 17 The fix is to set this dirty bit. 18 19 The rest of the changes are for testing. Internals now exposes layerIDForElement() 20 for returns an internal (non-stable-across-loads) layerID, which can be passed 21 to UIScriptController.propertiesOfLayerWithID() in the UI process, which inspects 22 the built layer (UIView) hierarchy. propertiesOfLayerWithID() returns a dictionary 23 which the test can dump as JSON, or pull values out of. 24 25 A few #pragma once cleanups also. 26 27 * DumpRenderTree/ios/UIScriptControllerIOS.mm: 28 (WTR::UIScriptController::propertiesOfLayerWithID): 29 * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl: 30 * TestRunnerShared/UIScriptContext/UIScriptController.cpp: 31 (WTR::UIScriptController::propertiesOfLayerWithID): 32 * TestRunnerShared/UIScriptContext/UIScriptController.h: 33 * WebKitTestRunner/ios/UIScriptControllerIOS.mm: 34 (WTR::UIScriptController::propertiesOfLayerWithID): 35 1 36 2017-03-10 Commit Queue <commit-queue@webkit.org> 2 37 -
trunk/Tools/DumpRenderTree/ios/UIScriptControllerIOS.mm
r212459 r213719 295 295 } 296 296 297 JSObjectRef UIScriptController::propertiesOfLayerWithID(uint64_t layerID) const 298 { 299 return nullptr; 300 } 301 297 302 void UIScriptController::retrieveSpeakSelectionContent(JSValueRef) 298 303 { -
trunk/Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
r212459 r213719 218 218 readonly attribute DOMString scrollingTreeAsText; 219 219 220 object propertiesOfLayerWithID(unsigned long long layerID); 221 220 222 void retrieveSpeakSelectionContent(object callback); 221 223 readonly attribute DOMString accessibilitySpeakSelectionContent; -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.cpp
r212459 r213719 341 341 } 342 342 343 JSObjectRef UIScriptController::propertiesOfLayerWithID(uint64_t layerID) const 344 { 345 return nullptr; 346 } 347 343 348 void UIScriptController::platformSetDidStartFormControlInteractionCallback() 344 349 { -
trunk/Tools/TestRunnerShared/UIScriptContext/UIScriptController.h
r212459 r213719 141 141 JSRetainPtr<JSStringRef> scrollingTreeAsText() const; 142 142 143 JSObjectRef propertiesOfLayerWithID(uint64_t layerID) const; 144 143 145 void uiScriptComplete(JSStringRef result); 144 146 -
trunk/Tools/WebKitTestRunner/ios/UIScriptControllerIOS.mm
r212459 r213719 549 549 } 550 550 551 JSObjectRef UIScriptController::propertiesOfLayerWithID(uint64_t layerID) const 552 { 553 return JSValueToObject(m_context->jsContext(), [JSValue valueWithObject:[TestController::singleton().mainWebView()->platformView() _propertiesOfLayerWithID:layerID] inContext:[JSContext contextWithJSGlobalContextRef:m_context->jsContext()]].JSValueRef, nullptr); 554 } 555 551 556 void UIScriptController::removeViewFromWindow(JSValueRef callback) 552 557 {
Note:
See TracChangeset
for help on using the changeset viewer.