Title: [106146] trunk
Revision
106146
Author
[email protected]
Date
2012-01-27 13:52:00 -0800 (Fri, 27 Jan 2012)

Log Message

Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
https://bugs.webkit.org/show_bug.cgi?id=76459

Reviewed by Darin Fisher.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

This should be a setting because it is independent of a particular frame and
should be preserved even if the mainframe changes.

Renamed (set)ShouldLayoutFixedElementsRelativeToFrame to
(set)FixedElementsLayoutRelativeToFrame due to the connotation
the word "should" may have in this context: If set,
position:fixed elements will ALWAYS be laid out relative to the frame.

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::reset):
(WebCore::FrameView::scrollXForFixedPosition):
(WebCore::FrameView::scrollYForFixedPosition):
(WebCore::FrameView::fixedElementsLayoutRelativeToFrame):
(WebCore):
* page/FrameView.h:
(FrameView):
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setFixedElementsLayoutRelativeToFrame):
(WebCore):
* page/Settings.h:
(Settings):
(WebCore::Settings::fixedElementsLayoutRelativeToFrame):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::fixedElementLaysOutRelativeToFrame):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
* rendering/RenderBox.h:
(RenderBox):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/chromium:

* public/WebSettings.h:
():
* public/WebView.h:
(WebView):
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setFixedElementsLayoutRelativeToFrame):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):
* src/WebViewImpl.cpp:
* src/WebViewImpl.h:
(WebViewImpl):

Source/WebKit2:

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

* fast/repaint/fixed-in-page-scale.html:
* fast/repaint/fixed-right-bottom-in-page-scale.html:
* fast/repaint/fixed-right-in-page-scale.html:

Modified Paths

Diff

Modified: trunk/ChangeLog (106145 => 106146)


--- trunk/ChangeLog	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/ChangeLog	2012-01-27 21:52:00 UTC (rev 106146)
@@ -1,3 +1,12 @@
+2012-01-27  Fady Samuel  <[email protected]>
+
+        Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
+        https://bugs.webkit.org/show_bug.cgi?id=76459
+
+        Reviewed by Darin Fisher.
+
+        * Source/autotools/symbols.filter:
+
 2012-01-26  Carlos Garcia Campos  <[email protected]>
 
         [GTK] Add basic printing support to WebKit2

Modified: trunk/LayoutTests/ChangeLog (106145 => 106146)


--- trunk/LayoutTests/ChangeLog	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/LayoutTests/ChangeLog	2012-01-27 21:52:00 UTC (rev 106146)
@@ -1,3 +1,14 @@
+2012-01-27  Fady Samuel  <[email protected]>
+
+        Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
+        https://bugs.webkit.org/show_bug.cgi?id=76459
+
+        Reviewed by Darin Fisher.
+
+        * fast/repaint/fixed-in-page-scale.html:
+        * fast/repaint/fixed-right-bottom-in-page-scale.html:
+        * fast/repaint/fixed-right-in-page-scale.html:
+
 2012-01-27  Greg Billock  <[email protected]>
 
         Update chromium-specific expectation for navigator-detached-no-crash layout test to include startActivity

Modified: trunk/LayoutTests/fast/repaint/fixed-in-page-scale.html (106145 => 106146)


--- trunk/LayoutTests/fast/repaint/fixed-in-page-scale.html	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/LayoutTests/fast/repaint/fixed-in-page-scale.html	2012-01-27 21:52:00 UTC (rev 106146)
@@ -9,7 +9,7 @@
     <script>
       window.enablePixelTesting = true;
       if (window.internals)
-          window.internals.settings.setShouldLayoutFixedElementsRelativeToFrame(true);
+          window.internals.settings.setFixedElementsLayoutRelativeToFrame(true);
 
       function scroll() {
           window.scrollTo(100,100);

Modified: trunk/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html (106145 => 106146)


--- trunk/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html	2012-01-27 21:52:00 UTC (rev 106146)
@@ -9,7 +9,7 @@
     <script>
       window.enablePixelTesting = true;
       if (window.internals)
-          window.internals.settings.setShouldLayoutFixedElementsRelativeToFrame(true);
+          window.internals.settings.setFixedElementsLayoutRelativeToFrame(true);
 
       function scroll() {
           window.scrollTo(100,100);

Modified: trunk/LayoutTests/fast/repaint/fixed-right-in-page-scale.html (106145 => 106146)


--- trunk/LayoutTests/fast/repaint/fixed-right-in-page-scale.html	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/LayoutTests/fast/repaint/fixed-right-in-page-scale.html	2012-01-27 21:52:00 UTC (rev 106146)
@@ -9,7 +9,7 @@
     <script>
       window.enablePixelTesting = true;
       if (window.internals)
-          window.internals.settings.setShouldLayoutFixedElementsRelativeToFrame(true);
+          window.internals.settings.setFixedElementsLayoutRelativeToFrame(true);
 
       function scroll() {
           window.scrollTo(100,100);

Modified: trunk/Source/WebCore/ChangeLog (106145 => 106146)


--- trunk/Source/WebCore/ChangeLog	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/ChangeLog	2012-01-27 21:52:00 UTC (rev 106146)
@@ -1,3 +1,47 @@
+2012-01-27  Fady Samuel  <[email protected]>
+
+        Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
+        https://bugs.webkit.org/show_bug.cgi?id=76459
+
+        Reviewed by Darin Fisher.
+
+        This should be a setting because it is independent of a particular frame and
+        should be preserved even if the mainframe changes.
+
+        Renamed (set)ShouldLayoutFixedElementsRelativeToFrame to 
+        (set)FixedElementsLayoutRelativeToFrame due to the connotation
+        the word "should" may have in this context: If set, 
+        position:fixed elements will ALWAYS be laid out relative to the frame.
+
+
+        * WebCore.exp.in:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::reset):
+        (WebCore::FrameView::scrollXForFixedPosition):
+        (WebCore::FrameView::scrollYForFixedPosition):
+        (WebCore::FrameView::fixedElementsLayoutRelativeToFrame):
+        (WebCore):
+        * page/FrameView.h:
+        (FrameView):
+        * page/Settings.cpp:
+        (WebCore::Settings::Settings):
+        (WebCore::Settings::setFixedElementsLayoutRelativeToFrame):
+        (WebCore):
+        * page/Settings.h:
+        (Settings):
+        (WebCore::Settings::fixedElementsLayoutRelativeToFrame):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::fixedElementLaysOutRelativeToFrame):
+        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
+        (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
+        * rendering/RenderBox.h:
+        (RenderBox):
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::setFixedElementsLayoutRelativeToFrame):
+        * testing/InternalSettings.h:
+        (InternalSettings):
+        * testing/InternalSettings.idl:
+
 2012-01-27  Kentaro Hara  <[email protected]>
 
         Support the [Supplemental] IDL for constants

Modified: trunk/Source/WebCore/WebCore.exp.in (106145 => 106146)


--- trunk/Source/WebCore/WebCore.exp.in	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-01-27 21:52:00 UTC (rev 106146)
@@ -957,6 +957,7 @@
 __ZN7WebCore8Settings19setShowDebugBordersEb
 __ZN7WebCore8Settings20setCursiveFontFamilyERKN3WTF12AtomicStringE11UScriptCode
 __ZN7WebCore8Settings20setFantasyFontFamilyERKN3WTF12AtomicStringE11UScriptCode
+__ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb
 __ZN7WebCore8Settings20setXSSAuditorEnabledEb
 __ZN7WebCore8Settings21mockScrollbarsEnabledEv
 __ZN7WebCore8Settings21setShowRepaintCounterEb
@@ -1054,7 +1055,6 @@
 __ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv
 __ZN7WebCore9FrameView38scrollPositionChangedViaPlatformWidgetEv
 __ZN7WebCore9FrameView38syncCompositingStateIncludingSubframesEv
-__ZN7WebCore9FrameView43setShouldLayoutFixedElementsRelativeToFrameEb
 __ZN7WebCore9FrameView6createEPNS_5FrameE
 __ZN7WebCore9FrameView6createEPNS_5FrameERKNS_7IntSizeE
 __ZN7WebCore9HTMLNames10listingTagE

Modified: trunk/Source/WebCore/page/FrameView.cpp (106145 => 106146)


--- trunk/Source/WebCore/page/FrameView.cpp	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/page/FrameView.cpp	2012-01-27 21:52:00 UTC (rev 106146)
@@ -218,7 +218,6 @@
     m_cannotBlitToWindow = false;
     m_isOverlapped = false;
     m_contentIsOpaque = false;
-    m_shouldLayoutFixedElementsRelativeToFrame = false;
     m_borderX = 30;
     m_borderY = 30;
     m_layoutTimer.stop();
@@ -1404,7 +1403,7 @@
     // When the page is scaled, the scaled "viewport" with respect to which fixed object are positioned
     // doesn't move as fast as the content view, so that when the content is scrolled all the way to the
     // end, the bottom of the scaled "viewport" touches the bottom of the real viewport.
-    float dragFactor = shouldLayoutFixedElementsRelativeToFrame() ? 1 : (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX;
+    float dragFactor = fixedElementsLayoutRelativeToFrame() ? 1 : (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX;
 
     return x * dragFactor / frameScaleFactor;
 }
@@ -1435,7 +1434,7 @@
         return y;
 
     float frameScaleFactor = m_frame->frameScaleFactor();
-    float dragFactor = shouldLayoutFixedElementsRelativeToFrame() ? 1 : (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY;
+    float dragFactor = fixedElementsLayoutRelativeToFrame() ? 1 : (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY;
     return y * dragFactor / frameScaleFactor;
 }
 
@@ -1444,18 +1443,15 @@
     return IntSize(scrollXForFixedPosition(), scrollYForFixedPosition());
 }
 
-void FrameView::setShouldLayoutFixedElementsRelativeToFrame(bool shouldLayoutFixedElementsRelativeToFrame)
+bool FrameView::fixedElementsLayoutRelativeToFrame() const
 {
-    if (shouldLayoutFixedElementsRelativeToFrame == m_shouldLayoutFixedElementsRelativeToFrame)
-        return;
+    ASSERT(m_frame);
+    if (!m_frame->settings())
+        return false;
 
-    m_shouldLayoutFixedElementsRelativeToFrame = shouldLayoutFixedElementsRelativeToFrame;
-
-    if (!hasFixedObjects())
-        return;
-
-    setNeedsLayout();
+    return m_frame->settings()->fixedElementsLayoutRelativeToFrame();
 }
+
 IntPoint FrameView::currentMousePosition() const
 {
     return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint();

Modified: trunk/Source/WebCore/page/FrameView.h (106145 => 106146)


--- trunk/Source/WebCore/page/FrameView.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/page/FrameView.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -196,8 +196,7 @@
     int scrollYForFixedPosition() const;
     IntSize scrollOffsetForFixedPosition() const;
 
-    bool shouldLayoutFixedElementsRelativeToFrame() const { return m_shouldLayoutFixedElementsRelativeToFrame; }
-    void setShouldLayoutFixedElementsRelativeToFrame(bool);
+    bool fixedElementsLayoutRelativeToFrame() const;
 
     void beginDeferredRepaints();
     void endDeferredRepaints();
@@ -412,7 +411,6 @@
     bool m_cannotBlitToWindow;
     bool m_isOverlapped;
     bool m_contentIsOpaque;
-    bool m_shouldLayoutFixedElementsRelativeToFrame;
     unsigned m_slowRepaintObjectCount;
     unsigned m_fixedObjectCount;
     int m_borderX;

Modified: trunk/Source/WebCore/page/Settings.cpp (106145 => 106146)


--- trunk/Source/WebCore/page/Settings.cpp	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/page/Settings.cpp	2012-01-27 21:52:00 UTC (rev 106146)
@@ -213,6 +213,7 @@
     , m_crossOriginCheckInGetMatchedCSSRulesDisabled(false)
     , m_forceCompositingMode(false)
     , m_shouldInjectUserScriptsInInitialEmptyDocument(false)
+    , m_fixedElementsLayoutRelativeToFrame(false)
     , m_allowDisplayOfInsecureContent(true)
     , m_allowRunningOfInsecureContent(true)
 #if ENABLE(SMOOTH_SCROLLING)
@@ -486,6 +487,11 @@
     m_page->userStyleSheetLocationChanged();
 }
 
+void Settings::setFixedElementsLayoutRelativeToFrame(bool fixedElementsLayoutRelativeToFrame)
+{
+    m_fixedElementsLayoutRelativeToFrame = fixedElementsLayoutRelativeToFrame;
+}
+
 void Settings::setShouldPrintBackgrounds(bool shouldPrintBackgrounds)
 {
     m_shouldPrintBackgrounds = shouldPrintBackgrounds;

Modified: trunk/Source/WebCore/page/Settings.h (106145 => 106146)


--- trunk/Source/WebCore/page/Settings.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/page/Settings.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -189,6 +189,9 @@
         void setUserStyleSheetLocation(const KURL&);
         const KURL& userStyleSheetLocation() const { return m_userStyleSheetLocation; }
 
+        void setFixedElementsLayoutRelativeToFrame(bool);
+        bool fixedElementsLayoutRelativeToFrame() const { return m_fixedElementsLayoutRelativeToFrame; }
+
         void setShouldPrintBackgrounds(bool);
         bool shouldPrintBackgrounds() const { return m_shouldPrintBackgrounds; }
 
@@ -632,6 +635,7 @@
         bool m_crossOriginCheckInGetMatchedCSSRulesDisabled : 1;
         bool m_forceCompositingMode : 1;
         bool m_shouldInjectUserScriptsInInitialEmptyDocument : 1;
+        bool m_fixedElementsLayoutRelativeToFrame : 1;
         bool m_allowDisplayOfInsecureContent : 1;
         bool m_allowRunningOfInsecureContent : 1;
 #if ENABLE(SMOOTH_SCROLLING)

Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (106145 => 106146)


--- trunk/Source/WebCore/rendering/RenderBox.cpp	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp	2012-01-27 21:52:00 UTC (rev 106146)
@@ -634,9 +634,9 @@
     return result;
 }
 
-bool RenderBox::shouldLayoutFixedElementRelativeToFrame(Frame* frame, FrameView* frameView) const
+bool RenderBox::fixedElementLaysOutRelativeToFrame(Frame* frame, FrameView* frameView) const
 {
-    return style() && style()->position() == FixedPosition && container()->isRenderView() && frame && frameView && frameView->shouldLayoutFixedElementsRelativeToFrame();
+    return style() && style()->position() == FixedPosition && container()->isRenderView() && frame && frameView && frameView->fixedElementsLayoutRelativeToFrame();
 }
 
 bool RenderBox::includeVerticalScrollbarSize() const
@@ -2308,7 +2308,7 @@
     // Container for position:fixed is the frame.
     Frame* frame = view() ? view()->frame(): 0;
     FrameView* frameView = view() ? view()->frameView() : 0;
-    if (shouldLayoutFixedElementRelativeToFrame(frame, frameView))
+    if (fixedElementLaysOutRelativeToFrame(frame, frameView))
         return (view()->isHorizontalWritingMode() ? frameView->visibleWidth() : frameView->visibleHeight()) / frame->frameScaleFactor();
 
     if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())
@@ -2365,7 +2365,7 @@
 {
     Frame* frame = view() ? view()->frame(): 0;
     FrameView* frameView = view() ? view()->frameView() : 0;
-    if (shouldLayoutFixedElementRelativeToFrame(frame, frameView))
+    if (fixedElementLaysOutRelativeToFrame(frame, frameView))
         return (view()->isHorizontalWritingMode() ? frameView->visibleHeight() : frameView->visibleWidth()) / frame->frameScaleFactor();
 
     if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())

Modified: trunk/Source/WebCore/rendering/RenderBox.h (106145 => 106146)


--- trunk/Source/WebCore/rendering/RenderBox.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/rendering/RenderBox.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -462,7 +462,7 @@
     void paintRootBoxFillLayers(const PaintInfo&);
 
 private:
-    bool shouldLayoutFixedElementRelativeToFrame(Frame*, FrameView*) const;
+    bool fixedElementLaysOutRelativeToFrame(Frame*, FrameView*) const;
 
     bool includeVerticalScrollbarSize() const;
     bool includeHorizontalScrollbarSize() const;

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (106145 => 106146)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2012-01-27 21:52:00 UTC (rev 106146)
@@ -235,10 +235,10 @@
     settings()->setPasswordEchoDurationInSeconds(durationInSeconds);
 }
 
-void InternalSettings::setShouldLayoutFixedElementsRelativeToFrame(bool enabled, ExceptionCode& ec)
+void InternalSettings::setFixedElementsLayoutRelativeToFrame(bool enabled, ExceptionCode& ec)
 {
     InternalSettingsGuardForFrameView();
-    frame()->view()->setShouldLayoutFixedElementsRelativeToFrame(enabled);
+    settings()->setFixedElementsLayoutRelativeToFrame(enabled);
 }
 
 void InternalSettings::setUnifiedTextCheckingEnabled(bool enabled, ExceptionCode& ec)

Modified: trunk/Source/WebCore/testing/InternalSettings.h (106145 => 106146)


--- trunk/Source/WebCore/testing/InternalSettings.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -58,7 +58,7 @@
     void setMockScrollbarsEnabled(bool enabled, ExceptionCode&);
     void setPasswordEchoEnabled(bool enabled, ExceptionCode&);
     void setPasswordEchoDurationInSeconds(double durationInSeconds, ExceptionCode&);
-    void setShouldLayoutFixedElementsRelativeToFrame(bool, ExceptionCode&);
+    void setFixedElementsLayoutRelativeToFrame(bool, ExceptionCode&);
     void setUnifiedTextCheckingEnabled(bool, ExceptionCode&);
     bool unifiedTextCheckingEnabled(ExceptionCode&);
     float pageScaleFactor(ExceptionCode&);

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (106145 => 106146)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2012-01-27 21:52:00 UTC (rev 106146)
@@ -39,7 +39,7 @@
         void setMockScrollbarsEnabled(in boolean enabled) raises(DOMException);
         void setPasswordEchoEnabled(in boolean enabled) raises(DOMException);
         void setPasswordEchoDurationInSeconds(in double durationInSeconds) raises(DOMException);
-        void setShouldLayoutFixedElementsRelativeToFrame(in boolean enabled) raises(DOMException);
+        void setFixedElementsLayoutRelativeToFrame(in boolean enabled) raises(DOMException);
         void setUnifiedTextCheckingEnabled(in boolean enabled) raises (DOMException);
         boolean unifiedTextCheckingEnabled() raises (DOMException);
         float pageScaleFactor() raises(DOMException);

Modified: trunk/Source/WebKit/chromium/ChangeLog (106145 => 106146)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-01-27 21:52:00 UTC (rev 106146)
@@ -1,3 +1,23 @@
+2012-01-27  Fady Samuel  <[email protected]>
+
+        Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
+        https://bugs.webkit.org/show_bug.cgi?id=76459
+
+        Reviewed by Darin Fisher.
+
+        * public/WebSettings.h:
+        ():
+        * public/WebView.h:
+        (WebView):
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::setFixedElementsLayoutRelativeToFrame):
+        (WebKit):
+        * src/WebSettingsImpl.h:
+        (WebSettingsImpl):
+        * src/WebViewImpl.cpp:
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+
 2012-01-24  Vincent Scheib  <[email protected]>
 
         Pointer Lock: Implement pointer interface

Modified: trunk/Source/WebKit/chromium/public/WebSettings.h (106145 => 106146)


--- trunk/Source/WebKit/chromium/public/WebSettings.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit/chromium/public/WebSettings.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -85,6 +85,7 @@
     virtual void setJavaScriptCanAccessClipboard(bool) = 0;
     virtual void setXSSAuditorEnabled(bool) = 0;
     virtual void setDNSPrefetchingEnabled(bool) = 0;
+    virtual void setFixedElementsLayoutRelativeToFrame(bool) = 0;
     virtual void setLocalStorageEnabled(bool) = 0;
     virtual void setEditableLinkBehaviorNeverLive() = 0;
     virtual void setFrameFlatteningEnabled(bool) = 0;

Modified: trunk/Source/WebKit/chromium/public/WebView.h (106145 => 106146)


--- trunk/Source/WebKit/chromium/public/WebView.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit/chromium/public/WebView.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -242,14 +242,7 @@
     // Sets the ratio as computed by computeViewportAttributes.
     virtual void setDeviceScaleFactor(float) = 0;
 
-    // Indicates whether position:fixed elements should be laid out relative
-    // to the frame or relative to the page.
-    virtual bool shouldLayoutFixedElementsRelativeToFrame() const = 0;
 
-    // Sets the relative layout of position:fixed elements.
-    virtual void setShouldLayoutFixedElementsRelativeToFrame(bool) = 0;
-
-
     // Fixed Layout --------------------------------------------------------
 
     // In fixed layout mode, the layout of the page is independent of the

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp (106145 => 106146)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-01-27 21:52:00 UTC (rev 106146)
@@ -224,6 +224,11 @@
     m_settings->setDNSPrefetchingEnabled(enabled);
 }
 
+void WebSettingsImpl::setFixedElementsLayoutRelativeToFrame(bool fixedElementsLayoutRelativeToFrame)
+{
+    m_settings->setFixedElementsLayoutRelativeToFrame(fixedElementsLayoutRelativeToFrame);
+}
+
 void WebSettingsImpl::setLocalStorageEnabled(bool enabled)
 {
     m_settings->setLocalStorageEnabled(enabled);

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.h (106145 => 106146)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -77,6 +77,7 @@
     virtual void setJavaScriptCanAccessClipboard(bool);
     virtual void setXSSAuditorEnabled(bool);
     virtual void setDNSPrefetchingEnabled(bool);
+    virtual void setFixedElementsLayoutRelativeToFrame(bool);
     virtual void setLocalStorageEnabled(bool);
     virtual void setEditableLinkBehaviorNeverLive();
     virtual void setFrameFlatteningEnabled(bool);

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.cpp (106145 => 106146)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.cpp	2012-01-27 21:52:00 UTC (rev 106146)
@@ -2071,30 +2071,6 @@
     page()->setDeviceScaleFactor(scaleFactor);
 }
 
-bool WebViewImpl::shouldLayoutFixedElementsRelativeToFrame() const
-{
-    if (!page())
-        return false;
-
-    Frame* frame = page()->mainFrame();
-    if (!frame || !frame->view())
-        return false;
-
-    return frame->view()->shouldLayoutFixedElementsRelativeToFrame();
-}
-
-void WebViewImpl::setShouldLayoutFixedElementsRelativeToFrame(bool enable)
-{
-    if (!page())
-        return;
-
-    Frame* frame = page()->mainFrame();
-    if (!frame || !frame->view())
-        return;
-
-    frame->view()->setShouldLayoutFixedElementsRelativeToFrame(enable);
-}
-
 bool WebViewImpl::isFixedLayoutModeEnabled() const
 {
     if (!page())

Modified: trunk/Source/WebKit/chromium/src/WebViewImpl.h (106145 => 106146)


--- trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit/chromium/src/WebViewImpl.h	2012-01-27 21:52:00 UTC (rev 106146)
@@ -176,8 +176,6 @@
 
     virtual float deviceScaleFactor() const;
     virtual void setDeviceScaleFactor(float);
-    virtual bool shouldLayoutFixedElementsRelativeToFrame() const;
-    virtual void setShouldLayoutFixedElementsRelativeToFrame(bool);
     virtual bool isFixedLayoutModeEnabled() const;
     virtual void enableFixedLayoutMode(bool enable);
     virtual WebSize fixedLayoutSize() const;

Modified: trunk/Source/WebKit2/ChangeLog (106145 => 106146)


--- trunk/Source/WebKit2/ChangeLog	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit2/ChangeLog	2012-01-27 21:52:00 UTC (rev 106146)
@@ -1,3 +1,13 @@
+2012-01-27  Fady Samuel  <[email protected]>
+
+        Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
+        https://bugs.webkit.org/show_bug.cgi?id=76459
+
+        Reviewed by Darin Fisher.
+
+        * win/WebKit2.def:
+        * win/WebKit2CFLite.def:
+
 2012-01-27  Martin Robinson  <[email protected]>
 
         Fix a compilation warning in a WebKit2 GTK+ API test.

Modified: trunk/Source/WebKit2/win/WebKit2.def (106145 => 106146)


--- trunk/Source/WebKit2/win/WebKit2.def	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit2/win/WebKit2.def	2012-01-27 21:52:00 UTC (rev 106146)
@@ -175,7 +175,6 @@
         ?removeShadowRoot@Element@WebCore@@QAEXXZ
         ?scriptExecutionContext@JSDOMGlobalObject@WebCore@@QBEPAVScriptExecutionContext@2@XZ
         ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
-        ?setShouldLayoutFixedElementsRelativeToFrame@FrameView@WebCore@@QAEX_N@Z
         ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
         ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
         ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
@@ -186,6 +185,7 @@
         ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
         ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
+        ?setFixedElementsLayoutRelativeToFrame@Settings@WebCore@@QAEX_N@Z
         ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
         ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
         ?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z

Modified: trunk/Source/WebKit2/win/WebKit2CFLite.def (106145 => 106146)


--- trunk/Source/WebKit2/win/WebKit2CFLite.def	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/WebKit2/win/WebKit2CFLite.def	2012-01-27 21:52:00 UTC (rev 106146)
@@ -169,7 +169,6 @@
         ?removeShadowRoot@Element@WebCore@@QAEXXZ
         ?scriptExecutionContext@JSDOMGlobalObject@WebCore@@QBEPAVScriptExecutionContext@2@XZ
         ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
-        ?setShouldLayoutFixedElementsRelativeToFrame@FrameView@WebCore@@QAEX_N@Z
         ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
         ?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
         ?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
@@ -180,6 +179,7 @@
         ?setSuggestedValue@HTMLInputElement@WebCore@@QAEXABVString@WTF@@@Z
         ?settings@Document@WebCore@@QBEPAVSettings@2@XZ
         ?settings@Frame@WebCore@@QBEPAVSettings@2@XZ
+        ?setFixedElementsLayoutRelativeToFrame@Settings@WebCore@@QAEX_N@Z
         ?shadowRoot@Element@WebCore@@QBEPAVShadowRoot@2@XZ
         ?suggestedValue@HTMLInputElement@WebCore@@QBEABVString@WTF@@XZ
         ?toDocument@WebCore@@YAPAVDocument@1@VJSValue@JSC@@@Z

Modified: trunk/Source/autotools/symbols.filter (106145 => 106146)


--- trunk/Source/autotools/symbols.filter	2012-01-27 21:47:51 UTC (rev 106145)
+++ trunk/Source/autotools/symbols.filter	2012-01-27 21:52:00 UTC (rev 106146)
@@ -86,9 +86,9 @@
 _ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE;
 _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
 _ZN7WebCore8Settings24setMockScrollbarsEnabledEb;
+_ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb;
 _ZN7WebCore9FrameView17paintControlTintsEv;
 _ZN7WebCore9FrameView19scrollElementToRectEPNS_7ElementERKNS_7IntRectE;
-_ZN7WebCore9FrameView43setShouldLayoutFixedElementsRelativeToFrameEb;
 _ZN7WebCore24FrameDestructionObserverD2Ev;
 _ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE;
 _ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to