Title: [289755] branches/safari-613-branch
- Revision
- 289755
- Author
- [email protected]
- Date
- 2022-02-14 12:49:48 -0800 (Mon, 14 Feb 2022)
Log Message
Cherry-pick r289686. rdar://problem/88689388
`contain:content` breaks fullscreen
https://bugs.webkit.org/show_bug.cgi?id=236470
<rdar://88689388>
Reviewed by Simon Fraser.
Source/WebCore:
Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
positioned descendants anchored (contained) to this layout container.
This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
do for other, "layout scope changing" properties, see canContainFixedPositionObjects).
Test: fullscreen/fullscreen-prevented-by-containment.html
* css/fullscreen.css:
(:-webkit-full-screen-ancestor:not(iframe)):
* css/parser/CSSParserContext.cpp:
(WebCore::CSSParserContext::CSSParserContext):
LayoutTests:
* fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
* fullscreen/fullscreen-prevented-by-containment.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-613-branch/LayoutTests/ChangeLog (289754 => 289755)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-02-14 20:49:44 UTC (rev 289754)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-02-14 20:49:48 UTC (rev 289755)
@@ -1,3 +1,46 @@
+2022-02-14 Russell Epstein <[email protected]>
+
+ Cherry-pick r289686. rdar://problem/88689388
+
+ `contain:content` breaks fullscreen
+ https://bugs.webkit.org/show_bug.cgi?id=236470
+ <rdar://88689388>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
+ positioned descendants anchored (contained) to this layout container.
+ This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
+ do for other, "layout scope changing" properties, see canContainFixedPositionObjects).
+
+ Test: fullscreen/fullscreen-prevented-by-containment.html
+
+ * css/fullscreen.css:
+ (:-webkit-full-screen-ancestor:not(iframe)):
+ * css/parser/CSSParserContext.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+
+ LayoutTests:
+
+ * fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
+ * fullscreen/fullscreen-prevented-by-containment.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-11 Alan Bujtas <[email protected]>
+
+ `contain:content` breaks fullscreen
+ https://bugs.webkit.org/show_bug.cgi?id=236470
+ <rdar://88689388>
+
+ Reviewed by Simon Fraser.
+
+ * fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
+ * fullscreen/fullscreen-prevented-by-containment.html: Added.
+
2022-02-10 Alan Coon <[email protected]>
Cherry-pick r288434. rdar://problem/56436745
Added: branches/safari-613-branch/LayoutTests/fullscreen/fullscreen-prevented-by-containment-expected.txt (0 => 289755)
--- branches/safari-613-branch/LayoutTests/fullscreen/fullscreen-prevented-by-containment-expected.txt (rev 0)
+++ branches/safari-613-branch/LayoutTests/fullscreen/fullscreen-prevented-by-containment-expected.txt 2022-02-14 20:49:48 UTC (rev 289755)
@@ -0,0 +1,4 @@
+This is the fullscreen element (click to activate)
+EVENT(webkitfullscreenchange) TEST(fullscreener.offsetWidth == window.innerWidth && fullscreener.offsetHeight == window.innerHeight) OK
+END OF TEST
+
Added: branches/safari-613-branch/LayoutTests/fullscreen/fullscreen-prevented-by-containment.html (0 => 289755)
--- branches/safari-613-branch/LayoutTests/fullscreen/fullscreen-prevented-by-containment.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/fullscreen/fullscreen-prevented-by-containment.html 2022-02-14 20:49:48 UTC (rev 289755)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<script src=""
+<style>
+.content-ancestor {
+ background-color: red;
+ height: 500px;
+ width: 500px;
+}
+.content {
+ contain: content;
+}
+
+#fullscreener {
+ background-color: green;
+}
+</style>
+<div class=content-ancestor>
+ <div class=content>
+ <div id=fullscreener>This is the fullscreen element (click to activate)</div>
+</div>
+<script>
+ if (window.testRunner) {
+ waitForEventTestAndEnd(document, 'webkitfullscreenchange', "fullscreener.offsetWidth == window.innerWidth && fullscreener.offsetHeight == window.innerHeight");
+ runWithKeyDown(function() {
+ fullscreener.webkitRequestFullScreen();
+ });
+ } else {
+ fullscreener.addEventListener('click', function () {
+ fullscreener.webkitRequestFullscreen();
+ }, false);
+ }
+</script>
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (289754 => 289755)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-02-14 20:49:44 UTC (rev 289754)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-02-14 20:49:48 UTC (rev 289755)
@@ -1,5 +1,57 @@
2022-02-14 Russell Epstein <[email protected]>
+ Cherry-pick r289686. rdar://problem/88689388
+
+ `contain:content` breaks fullscreen
+ https://bugs.webkit.org/show_bug.cgi?id=236470
+ <rdar://88689388>
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
+ positioned descendants anchored (contained) to this layout container.
+ This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
+ do for other, "layout scope changing" properties, see canContainFixedPositionObjects).
+
+ Test: fullscreen/fullscreen-prevented-by-containment.html
+
+ * css/fullscreen.css:
+ (:-webkit-full-screen-ancestor:not(iframe)):
+ * css/parser/CSSParserContext.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+
+ LayoutTests:
+
+ * fullscreen/fullscreen-prevented-by-containment-expected.txt: Added.
+ * fullscreen/fullscreen-prevented-by-containment.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-11 Alan Bujtas <[email protected]>
+
+ `contain:content` breaks fullscreen
+ https://bugs.webkit.org/show_bug.cgi?id=236470
+ <rdar://88689388>
+
+ Reviewed by Simon Fraser.
+
+ Paint/layout containment forms a containing block for fixed positioned block boxes. It makes all fixed
+ positioned descendants anchored (contained) to this layout container.
+ This patch enables fullscreen boxes break out of this non-ICB based layout scope (this is similar to what we
+ do for other, "layout scope changing" properties, see canContainFixedPositionObjects).
+
+ Test: fullscreen/fullscreen-prevented-by-containment.html
+
+ * css/fullscreen.css:
+ (:-webkit-full-screen-ancestor:not(iframe)):
+ * css/parser/CSSParserContext.cpp:
+ (WebCore::CSSParserContext::CSSParserContext):
+
+2022-02-14 Russell Epstein <[email protected]>
+
Cherry-pick r289682. rdar://problem/88843567
Unreviewed, reverting r289498.
Modified: branches/safari-613-branch/Source/WebCore/css/fullscreen.css (289754 => 289755)
--- branches/safari-613-branch/Source/WebCore/css/fullscreen.css 2022-02-14 20:49:44 UTC (rev 289754)
+++ branches/safari-613-branch/Source/WebCore/css/fullscreen.css 2022-02-14 20:49:48 UTC (rev 289755)
@@ -48,6 +48,7 @@
perspective: none !important;
-webkit-transform-style: flat !important;
overflow: visible !important;
+ contain: none !important;
}
video:-webkit-full-screen, audio:-webkit-full-screen {
Modified: branches/safari-613-branch/Source/WebCore/css/parser/CSSParserContext.cpp (289754 => 289755)
--- branches/safari-613-branch/Source/WebCore/css/parser/CSSParserContext.cpp 2022-02-14 20:49:44 UTC (rev 289754)
+++ branches/safari-613-branch/Source/WebCore/css/parser/CSSParserContext.cpp 2022-02-14 20:49:48 UTC (rev 289755)
@@ -51,6 +51,7 @@
individualTransformPropertiesEnabled = true;
focusVisibleEnabled = true;
inputSecurityEnabled = true;
+ containmentEnabled = true;
#if ENABLE(CSS_TRANSFORM_STYLE_OPTIMIZED_3D)
transformStyleOptimized3DEnabled = true;
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes