Title: [223051] trunk/Source/WebKit
- Revision
- 223051
- Author
- [email protected]
- Date
- 2017-10-09 10:54:31 -0700 (Mon, 09 Oct 2017)
Log Message
Incorrect fullscreen animation when element has a transform.
https://bugs.webkit.org/show_bug.cgi?id=177558
rdar://problem/29603741
Patch by Jeremy Jones <[email protected]> on 2017-10-09
Reviewed by Jer Noble.
Use a bit of code from element fullscreen to do this correctly for video fullscreen.
The key is to get the absolute quad from the renderer. This will work for scaling,
But since we still take the bounding box, it won't work for rotations.
* WebProcess/cocoa/VideoFullscreenManager.mm:
(WebKit::inlineVideoFrame):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (223050 => 223051)
--- trunk/Source/WebKit/ChangeLog 2017-10-09 17:27:15 UTC (rev 223050)
+++ trunk/Source/WebKit/ChangeLog 2017-10-09 17:54:31 UTC (rev 223051)
@@ -1,3 +1,18 @@
+2017-10-09 Jeremy Jones <[email protected]>
+
+ Incorrect fullscreen animation when element has a transform.
+ https://bugs.webkit.org/show_bug.cgi?id=177558
+ rdar://problem/29603741
+
+ Reviewed by Jer Noble.
+
+ Use a bit of code from element fullscreen to do this correctly for video fullscreen.
+ The key is to get the absolute quad from the renderer. This will work for scaling,
+ But since we still take the bounding box, it won't work for rotations.
+
+ * WebProcess/cocoa/VideoFullscreenManager.mm:
+ (WebKit::inlineVideoFrame):
+
2017-10-09 Robin Morisset <[email protected]>
Make the names of the options consistent
Modified: trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm (223050 => 223051)
--- trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2017-10-09 17:27:15 UTC (rev 223050)
+++ trunk/Source/WebKit/WebProcess/cocoa/VideoFullscreenManager.mm 2017-10-09 17:54:31 UTC (rev 223051)
@@ -60,6 +60,13 @@
auto* renderer = element.renderer();
if (!renderer)
return { };
+
+ if (renderer->hasLayer() && renderer->enclosingLayer()->isComposited()) {
+ FloatQuad contentsBox = static_cast<FloatRect>(renderer->enclosingLayer()->backing()->contentsBox());
+ contentsBox = renderer->localToAbsoluteQuad(contentsBox);
+ return element.document().view()->contentsToRootView(contentsBox.enclosingBoundingBox());
+ }
+
auto rect = renderer->videoBox();
rect.moveBy(renderer->absoluteBoundingBoxRect().location());
return element.document().view()->contentsToRootView(rect);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes