RESOLVED FIXED 87186
Add a Setting to make position:fixed form a new stacking context
https://bugs.webkit.org/show_bug.cgi?id=87186
Summary Add a Setting to make position:fixed form a new stacking context
James Robinson
Reported 2012-05-22 17:05:24 PDT
Add a Setting to make position:fixed form a new stacking context
Attachments
Patch (16.57 KB, patch)
2012-05-22 17:14 PDT, James Robinson
no flags
Patch for landing (16.67 KB, patch)
2012-05-23 14:08 PDT, James Robinson
no flags
James Robinson
Comment 1 2012-05-22 17:14:17 PDT
WebKit Review Bot
Comment 2 2012-05-22 17:18:26 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Adam Barth
Comment 3 2012-05-22 17:57:37 PDT
Comment on attachment 143407 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143407&action=review > Source/WebKit/chromium/public/WebSettings.h:153 > + virtual void setFixedPositionCreatesStackingContext(bool) = 0; Do you think we should alphabetize this list?
James Robinson
Comment 4 2012-05-22 18:20:34 PDT
Comment on attachment 143407 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143407&action=review >> Source/WebKit/chromium/public/WebSettings.h:153 >> + virtual void setFixedPositionCreatesStackingContext(bool) = 0; > > Do you think we should alphabetize this list? I don't know, I couldn't discern any existing organization in this list so I just added this to the end.
Adam Barth
Comment 5 2012-05-22 18:25:36 PDT
Ok. I can post an alphabetization patch after you land this one.
James Robinson
Comment 6 2012-05-22 18:40:40 PDT
WebKit Review Bot
Comment 7 2012-05-22 21:03:53 PDT
Re-opened since this is blocked by 87201
Kenneth Rohde Christiansen
Comment 8 2012-05-23 00:52:48 PDT
Comment on attachment 143407 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=143407&action=review > Source/WebCore/css/StyleResolver.cpp:2052 > #ifdef FIXED_POSITION_CREATES_STACKING_CONTEXT > || style->position() == FixedPosition > +#else > + || (style->position() == FixedPosition && e->document()->page()->settings()->fixedPositionCreatesStackingContext()) > #endif Why not just turn this on for Qt? Yael?
Kenneth Rohde Christiansen
Comment 9 2012-05-23 00:53:44 PDT
(In reply to comment #8) > (From update of attachment 143407 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=143407&action=review > > > Source/WebCore/css/StyleResolver.cpp:2052 > > #ifdef FIXED_POSITION_CREATES_STACKING_CONTEXT > > || style->position() == FixedPosition > > +#else > > + || (style->position() == FixedPosition && e->document()->page()->settings()->fixedPositionCreatesStackingContext()) > > #endif > > Why not just turn this on for Qt? Yael? I mean I believe we are the only ones using FIXED_POSIT... but I guess we can use the setting instead
Arvid Nilsson
Comment 10 2012-05-23 01:00:57 PDT
(In reply to comment #9) > (In reply to comment #8) > > (From update of attachment 143407 [details] [details]) > > View in context: https://bugs.webkit.org/attachment.cgi?id=143407&action=review > > > > > Source/WebCore/css/StyleResolver.cpp:2052 > > > #ifdef FIXED_POSITION_CREATES_STACKING_CONTEXT > > > || style->position() == FixedPosition > > > +#else > > > + || (style->position() == FixedPosition && e->document()->page()->settings()->fixedPositionCreatesStackingContext()) > > > #endif > > > > Why not just turn this on for Qt? Yael? > > I mean I believe we are the only ones using FIXED_POSIT... but I guess we can use the setting instead The BlackBerry port also opts in to FIXED_POSIT... these days. But we'd also be happy to use the setting instead.
James Robinson
Comment 11 2012-05-23 10:03:58 PDT
I think it'd be a good idea for other ports to move over to the Setting, but I'll leave that to decision up to them.
Yael
Comment 12 2012-05-23 12:46:20 PDT
(In reply to comment #8) > (From update of attachment 143407 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=143407&action=review > > > Source/WebCore/css/StyleResolver.cpp:2052 > > #ifdef FIXED_POSITION_CREATES_STACKING_CONTEXT > > || style->position() == FixedPosition > > +#else > > + || (style->position() == FixedPosition && e->document()->page()->settings()->fixedPositionCreatesStackingContext()) > > #endif > > Why not just turn this on for Qt? Yael? Please see https://bugs.webkit.org/show_bug.cgi?id=83980#c3
James Robinson
Comment 13 2012-05-23 12:50:16 PDT
In chromium we need to have this be a setting to verify compatibility issues. I think Simon's other comment is out of date, requiresCompositingForPosition() is aware of the acceleratedCompositingForFixedPositionEnabled compositing trigger which should cover this.
James Robinson
Comment 14 2012-05-23 14:08:14 PDT
Created attachment 143649 [details] Patch for landing
WebKit Review Bot
Comment 15 2012-05-23 16:13:32 PDT
Comment on attachment 143649 [details] Patch for landing Clearing flags on attachment: 143649 Committed r118263: <http://trac.webkit.org/changeset/118263>
WebKit Review Bot
Comment 16 2012-05-23 16:13:43 PDT
All reviewed patches have been landed. Closing bug.
Ádám Kallai
Comment 17 2012-05-24 02:07:21 PDT
This test fails on Qt. * fast/block/positioning/fixed-position-stacking-context.html Diff: --- /home/webkitbuildbot/slaves/release32bit-NRWT/buildslave/qt-linux-32-release-NRWT/build/layout-test-results/fast/block/positioning/fixed-position-stacking-context-expected.txt +++ /home/webkitbuildbot/slaves/release32bit-NRWT/buildslave/qt-linux-32-release-NRWT/build/layout-test-results/fast/block/positioning/fixed-position-stacking-context-actual.txt @@ -8,6 +8,6 @@ layer at (0,0) size 100x100 RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000] layer at (0,0) size 100x100 + RenderBlock (positioned) zI: 2 {DIV} at (0,0) size 100x100 [bgcolor=#008000] +layer at (0,0) size 100x100 RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000] -layer at (0,0) size 100x100 - RenderBlock (positioned) zI: 2 {DIV} at (0,0) size 100x100 [bgcolor=#008000] We got a red rectangle on Qt platform. Could you check it, please?
Kristóf Kosztyó
Comment 18 2012-05-24 04:04:51 PDT
I skipped the test in r118346: <http://trac.webkit.org/changeset/118346> to paint the bot green.
James Robinson
Comment 19 2012-05-24 10:15:34 PDT
(In reply to comment #17) > This test fails on Qt. > > * fast/block/positioning/fixed-position-stacking-context.html > > Diff: > > --- /home/webkitbuildbot/slaves/release32bit-NRWT/buildslave/qt-linux-32-release-NRWT/build/layout-test-results/fast/block/positioning/fixed-position-stacking-context-expected.txt > +++ /home/webkitbuildbot/slaves/release32bit-NRWT/buildslave/qt-linux-32-release-NRWT/build/layout-test-results/fast/block/positioning/fixed-position-stacking-context-actual.txt > @@ -8,6 +8,6 @@ > layer at (0,0) size 100x100 > RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000] > layer at (0,0) size 100x100 > + RenderBlock (positioned) zI: 2 {DIV} at (0,0) size 100x100 [bgcolor=#008000] > +layer at (0,0) size 100x100 > RenderBlock (positioned) zI: 1 {DIV} at (0,0) size 100x100 [bgcolor=#FF0000] > -layer at (0,0) size 100x100 > - RenderBlock (positioned) zI: 2 {DIV} at (0,0) size 100x100 [bgcolor=#008000] > > We got a red rectangle on Qt platform. Could you check it, please? Since you are using the #define to control this behavior instead of the Setting, you'll need Qt-specific baselines for this test.
Iain Merrick
Comment 20 2012-06-11 07:08:24 PDT
*** Bug 85067 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.