Changeset 201727 in webkit
- Timestamp:
- Jun 6, 2016 1:58:19 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201725 r201727 1 2016-06-06 Antoine Quint <graouts@apple.com> 2 3 Position of WebGL <canvas> on iOS is incorrect with CSS borders 4 https://bugs.webkit.org/show_bug.cgi?id=156790 5 6 Reviewed by Simon Fraser. 7 8 Adding new tests checking that CSS border, box-shadow and padding properties used on a 9 WebGL <canvas> element correctly affect the position of the WebGL content. 10 11 * webgl/webgl-border-expected.html: Added. 12 * webgl/webgl-border.html: Added. 13 * webgl/webgl-box-shadow-expected.html: Added. 14 * webgl/webgl-box-shadow.html: Added. 15 * webgl/webgl-padding-expected.html: Added. 16 * webgl/webgl-padding.html: Added. 17 1 18 2016-06-06 Skachkov Oleksandr <gskachkov@gmail.com> 2 19 -
trunk/Source/WebKit2/ChangeLog
r201722 r201727 1 2016-06-06 Antoine Quint <graouts@apple.com> 2 3 Position of WebGL <canvas> on iOS is incorrect with CSS borders 4 https://bugs.webkit.org/show_bug.cgi?id=156790 5 6 Reviewed by Simon Fraser. 7 8 WebGL layers on iOS are hosted by a WKRemoteView, which applies a transform scaling 9 its content by the inverse of the device pixel ratio, which affects how positions are 10 applied to the WebGL layer. The container layer of the layer hosted by a WKRemoteView 11 then has an inverse transform applied to it in the PlatformCALayerRemoteCustom 12 constructor. However, the position of a CALayer is not affected by its transform. 13 14 The fix for <rdar://problem/18316542> should be specific to video, so we only apply the 15 scaling in the case of a LayerTypeAVPlayerLayer. 16 17 * UIProcess/ios/RemoteLayerTreeHostIOS.mm: 18 (-[WKRemoteView initWithFrame:contextID:]): 19 (WebKit::RemoteLayerTreeHost::createLayer): 20 (-[WKRemoteView initWithFrame:contextID:hostingDeviceScaleFactor:]): Deleted. 21 * WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm: 22 (WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom): 23 1 24 2016-06-06 Brady Eidson <beidson@apple.com> 2 25 -
trunk/Source/WebKit2/UIProcess/ios/RemoteLayerTreeHostIOS.mm
r200602 r201727 141 141 @implementation WKRemoteView 142 142 143 - (instancetype)initWithFrame:(CGRect)frame contextID:(uint32_t)contextID hostingDeviceScaleFactor:(float)scaleFactor144 { 145 if ((self = [super initWithFrame:frame])) {143 - (instancetype)initWithFrame:(CGRect)frame contextID:(uint32_t)contextID 144 { 145 if ((self = [super initWithFrame:frame])) 146 146 [[self layer] setContextId:contextID]; 147 // Invert the scale transform added in the WebProcess to fix <rdar://problem/18316542>.148 float inverseScale = 1 / scaleFactor;149 [[self layer] setTransform:CATransform3DMakeScale(inverseScale, inverseScale, 1)];150 }151 147 152 148 return self; … … 212 208 case PlatformCALayer::LayerTypeAVPlayerLayer: 213 209 case PlatformCALayer::LayerTypeWebGLLayer: 214 if (!m_isDebugLayerTreeHost) 215 view = adoptNS([[WKRemoteView alloc] initWithFrame:CGRectZero contextID:properties.hostingContextID hostingDeviceScaleFactor:properties.hostingDeviceScaleFactor]); 216 else 210 if (!m_isDebugLayerTreeHost) { 211 view = adoptNS([[WKRemoteView alloc] initWithFrame:CGRectZero contextID:properties.hostingContextID]); 212 if (properties.type == PlatformCALayer::LayerTypeAVPlayerLayer) { 213 // Invert the scale transform added in the WebProcess to fix <rdar://problem/18316542>. 214 float inverseScale = 1 / properties.hostingDeviceScaleFactor; 215 [[view layer] setTransform:CATransform3DMakeScale(inverseScale, inverseScale, 1)]; 216 } 217 } else 217 218 view = adoptNS([[WKCompositingView alloc] init]); 218 219 break; -
trunk/Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm
r185856 r201727 66 66 m_layerHostingContext = LayerHostingContext::createForExternalHostingProcess(); 67 67 #if PLATFORM(IOS) 68 float scaleFactor = context.deviceScaleFactor(); 69 // Set a scale factor here to make convertRect:toLayer:nil take scale factor into account. <rdar://problem/18316542>. 70 // This scale factor is inverted in the hosting process. 71 [customLayer setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)]; 68 if (layerType == LayerTypeAVPlayerLayer) { 69 float scaleFactor = context.deviceScaleFactor(); 70 // Set a scale factor here to make convertRect:toLayer:nil take scale factor into account. <rdar://problem/18316542>. 71 // This scale factor is inverted in the hosting process. 72 [customLayer setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)]; 73 } 72 74 #endif 73 75 break;
Note: See TracChangeset
for help on using the changeset viewer.