Changeset 118263 in webkit
- Timestamp:
- May 23, 2012 4:14:13 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r118261 r118263 1 2012-05-23 James Robinson <jamesr@chromium.org> 2 3 Add a Setting to make position:fixed form a new stacking context 4 https://bugs.webkit.org/show_bug.cgi?id=87186 5 6 Reviewed by Adam Barth. 7 8 Adds layout tests that confirm we don't creates stacking contexts for position:fixed by default, but we do when 9 the fixedPositionCreatesStackingContext Setting is true. 10 11 Qt and Blackberry will need different expectations since they set this via an #ifdef 12 13 * fast/block/positioning/fixed-position-stacking-context-expected.png: Added. 14 * fast/block/positioning/fixed-position-stacking-context-expected.txt: Added. 15 * fast/block/positioning/fixed-position-stacking-context.html: Added. 16 * fast/block/positioning/fixed-position-stacking-context2-expected.png: Added. 17 * fast/block/positioning/fixed-position-stacking-context2-expected.txt: Added. 18 * fast/block/positioning/fixed-position-stacking-context2.html: Added. 19 1 20 2012-05-23 James Robinson <jamesr@chromium.org> 2 21 -
trunk/Source/WebCore/ChangeLog
r118254 r118263 1 2012-05-23 James Robinson <jamesr@chromium.org> 2 3 Add a Setting to make position:fixed form a new stacking context 4 https://bugs.webkit.org/show_bug.cgi?id=87186 5 6 Reviewed by Adam Barth. 7 8 position:fixed elements form a new stacking context in several mobile WebKit ports and in the Qt port always. To 9 be consistent across devices, we want to try turning it on everywhere. This will likely cause compatibility 10 issues, so we need a runtime setting in order to stage the change carefully. 11 12 Tests: fast/block/positioning/fixed-position-stacking-context.html 13 fast/block/positioning/fixed-position-stacking-context2.html 14 15 * css/StyleResolver.cpp: 16 (WebCore::StyleResolver::collectMatchingRulesForList): 17 * page/Settings.cpp: 18 (WebCore::Settings::Settings): 19 * page/Settings.h: 20 (WebCore::Settings::setFixedPositionCreatesStackingContext): 21 (WebCore::Settings::fixedPositionCreatesStackingContext): 22 (Settings): 23 * testing/InternalSettings.cpp: 24 (WebCore::InternalSettings::InternalSettings): 25 (WebCore::InternalSettings::restoreTo): 26 (WebCore::InternalSettings::setFixedPositionCreatesStackingContext): 27 (WebCore): 28 * testing/InternalSettings.h: 29 (InternalSettings): 30 * testing/InternalSettings.idl: 31 1 32 2012-05-23 Michael Nordman <michaeln@google.com> 2 33 -
trunk/Source/WebCore/css/StyleResolver.cpp
r118194 r118263 2048 2048 #ifdef FIXED_POSITION_CREATES_STACKING_CONTEXT 2049 2049 || style->position() == FixedPosition 2050 #else 2051 || (style->position() == FixedPosition && e && e->document()->page()->settings()->fixedPositionCreatesStackingContext()) 2050 2052 #endif 2051 2053 #if ENABLE(OVERFLOW_SCROLLING) -
trunk/Source/WebCore/page/Settings.cpp
r118116 r118263 269 269 , m_requestAnimationFrameEnabled(true) 270 270 , m_needsDidFinishLoadOrderQuirk(false) 271 , m_fixedPositionCreatesStackingContext(false) 271 272 , m_loadsImagesAutomaticallyTimer(this, &Settings::loadsImagesAutomaticallyTimerFired) 272 273 , m_incrementalRenderingSuppressionTimeoutInSeconds(defaultIncrementalRenderingSuppressionTimeoutInSeconds) -
trunk/Source/WebCore/page/Settings.h
r118116 r118263 570 570 void setNeedsDidFinishLoadOrderQuirk(bool needsQuirk) { m_needsDidFinishLoadOrderQuirk = needsQuirk; } 571 571 bool needsDidFinishLoadOrderQuirk() const { return m_needsDidFinishLoadOrderQuirk; } 572 573 void setFixedPositionCreatesStackingContext(bool creates) { m_fixedPositionCreatesStackingContext = creates; } 574 bool fixedPositionCreatesStackingContext() const { return m_fixedPositionCreatesStackingContext; } 572 575 573 576 #if USE(JSC) … … 739 742 bool m_needsDidFinishLoadOrderQuirk : 1; 740 743 744 bool m_fixedPositionCreatesStackingContext : 1; 745 741 746 Timer<Settings> m_loadsImagesAutomaticallyTimer; 742 747 void loadsImagesAutomaticallyTimerFired(Timer<Settings>*); -
trunk/Source/WebCore/testing/InternalSettings.cpp
r118116 r118263 100 100 #endif 101 101 , m_originalEditingBehavior(settings()->editingBehaviorType()) 102 , m_originalFixedPositionCreatesStackingContext(settings()->fixedPositionCreatesStackingContext()) 102 103 { 103 104 } … … 112 113 #endif 113 114 settings->setEditingBehaviorType(m_originalEditingBehavior); 115 settings->setFixedPositionCreatesStackingContext(m_originalFixedPositionCreatesStackingContext); 114 116 } 115 117 … … 345 347 } 346 348 347 } 349 void InternalSettings::setFixedPositionCreatesStackingContext(bool creates, ExceptionCode& ec) 350 { 351 InternalSettingsGuardForFrameView(); 352 settings()->setFixedPositionCreatesStackingContext(creates); 353 } 354 355 } -
trunk/Source/WebCore/testing/InternalSettings.h
r118116 r118263 77 77 void setMediaPlaybackRequiresUserGesture(bool, ExceptionCode&); 78 78 void setEditingBehavior(const String&, ExceptionCode&); 79 void setFixedPositionCreatesStackingContext(bool, ExceptionCode&); 79 80 80 81 void restoreTo(Settings*); … … 94 95 #endif 95 96 EditingBehaviorType m_originalEditingBehavior; 97 bool m_originalFixedPositionCreatesStackingContext; 96 98 }; 97 99 -
trunk/Source/WebCore/testing/InternalSettings.idl
r118116 r118263 55 55 void setMediaPlaybackRequiresUserGesture(in boolean enabled) raises(DOMException); 56 56 void setEditingBehavior(in DOMString behavior) raises(DOMException); 57 void setFixedPositionCreatesStackingContext(in boolean creates) raises(DOMException); 57 58 }; 58 59 } -
trunk/Source/WebKit/chromium/ChangeLog
r118261 r118263 1 2012-05-23 James Robinson <jamesr@chromium.org> 2 3 Add a Setting to make position:fixed form a new stacking context 4 https://bugs.webkit.org/show_bug.cgi?id=87186 5 6 Reviewed by Adam Barth. 7 8 * public/WebSettings.h: 9 * src/WebSettingsImpl.cpp: 10 (WebKit::WebSettingsImpl::setFixedPositionCreatesStackingContext): 11 (WebKit): 12 * src/WebSettingsImpl.h: 13 (WebSettingsImpl): 14 1 15 2012-05-23 James Robinson <jamesr@chromium.org> 2 16 -
trunk/Source/WebKit/chromium/public/WebSettings.h
r118116 r118263 152 152 virtual void setDefaultTileSize(WebSize) = 0; 153 153 virtual void setMaxUntiledLayerSize(WebSize) = 0; 154 virtual void setFixedPositionCreatesStackingContext(bool) = 0; 154 155 155 156 -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp
r118116 r118263 587 587 } 588 588 589 void WebSettingsImpl::setFixedPositionCreatesStackingContext(bool creates) 590 { 591 m_settings->setFixedPositionCreatesStackingContext(creates); 592 } 593 589 594 void WebSettingsImpl::setViewportEnabled(bool enabled) 590 595 { -
trunk/Source/WebKit/chromium/src/WebSettingsImpl.h
r118116 r118263 143 143 virtual void setPartialSwapEnabled(bool); 144 144 virtual void setThreadedAnimationEnabled(bool); 145 virtual void setFixedPositionCreatesStackingContext(bool); 145 146 virtual void setViewportEnabled(bool); 146 147 virtual void setMediaPlaybackRequiresUserGesture(bool);
Note: See TracChangeset
for help on using the changeset viewer.