Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(299)

Side by Side Diff: third_party/WebKit/LayoutTests/css3/blending/isolation-isolate-simple.html

Issue 2047283002: Avoid touching z-index in StyleAdjuster by using an isStackingContext flag instead (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update old z-index stacking context test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <script src="../../resources/testharness.js"></script>
3 <head> 3 <script src="../../resources/testharnessreport.js"></script>
4
4 <style> 5 <style>
5 div { 6 div {
6 width: 10px; 7 width: 10px;
7 height: 10px; 8 height: 10px;
8 background: green; 9 background: green;
9 isolation:isolate; 10 isolation: isolate;
10 } 11 }
11 </style> 12 </style>
12 <!-- Isolation should create a stacking context. Test if "isolation:isolate" set s the zIndex to 0, instead of the default "auto" value. -->
13 <body>
14 <div id="isolator"></div>
15 <div id="isolator_accelerated" style="transform: translateZ(0)"></div>
16 13
17 <script src="../../resources/js-test.js"></script> 14 <div id="isolator"></div>
18 <script> 15 <div id="isolator_accelerated" style="transform: translateZ(0)"></div>
19 // Software path.
20 var zIndex = getComputedStyle(document.getElementById("isolator")).zInde x;
21 shouldBeZero(zIndex);
22 16
23 // Hardware path. 17 <script>
24 zIndex = getComputedStyle(document.getElementById("isolator_accelerated" )).zIndex; 18 test(() => {
25 shouldBeZero(zIndex); 19 // Force style recalc.
26 </script> 20 getComputedStyle(isolator).zIndex;
27 </body> 21 getComputedStyle(isolator_accelerated).zIndex;
28 </html> 22
23 assert_true(internals.isStackingContext(isolator), 'software path');
24 assert_true(internals.isStackingContext(isolator_accelerated), 'hardware path' );
rune 2016/06/09 09:10:25 I think we should avoid adding new internals APIs.
alancutter (OOO until 2018) 2016/06/10 04:59:30 Done. Removed the stacking context check from the
25 }, 'CSS isolation should create a stacking context');
26 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698