Rename shouldLayoutFixedElementsRelativeToFrame and make it a setting
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 21:52:00 +0000 (21:52 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 21:52:00 +0000 (21:52 +0000)
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:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106146 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/repaint/fixed-in-page-scale.html
LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html
LayoutTests/fast/repaint/fixed-right-in-page-scale.html
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/Settings.cpp
Source/WebCore/page/Settings.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebSettings.h
Source/WebKit/chromium/public/WebView.h
Source/WebKit/chromium/src/WebSettingsImpl.cpp
Source/WebKit/chromium/src/WebSettingsImpl.h
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter

index c96104f..649921c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-01-27  Fady Samuel  <fsamuel@chromium.org>
+
+        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  <cgarcia@igalia.com>
 
         [GTK] Add basic printing support to WebKit2
index dd830cc..74027c1 100644 (file)
@@ -1,3 +1,14 @@
+2012-01-27  Fady Samuel  <fsamuel@chromium.org>
+
+        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  <gbillock@google.com>
 
         Update chromium-specific expectation for navigator-detached-no-crash layout test to include startActivity
index b7657ef..b6fae56 100644 (file)
@@ -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);
index 9613849..be797e1 100644 (file)
@@ -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);
index a28c146..0b67de7 100644 (file)
@@ -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);
index 703b608..c16a464 100644 (file)
@@ -1,3 +1,47 @@
+2012-01-27  Fady Samuel  <fsamuel@chromium.org>
+
+        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  <haraken@chromium.org>
 
         Support the [Supplemental] IDL for constants
index 94f2610..78b29e8 100644 (file)
@@ -957,6 +957,7 @@ __ZN7WebCore8Settings19minDOMTimerIntervalEv
 __ZN7WebCore8Settings19setShowDebugBordersEb
 __ZN7WebCore8Settings20setCursiveFontFamilyERKN3WTF12AtomicStringE11UScriptCode
 __ZN7WebCore8Settings20setFantasyFontFamilyERKN3WTF12AtomicStringE11UScriptCode
+__ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb
 __ZN7WebCore8Settings20setXSSAuditorEnabledEb
 __ZN7WebCore8Settings21mockScrollbarsEnabledEv
 __ZN7WebCore8Settings21setShowRepaintCounterEb
@@ -1054,7 +1055,6 @@ __ZN7WebCore9FrameView29setShouldUpdateWhileOffscreenEb
 __ZN7WebCore9FrameView37updateLayoutAndStyleIfNeededRecursiveEv
 __ZN7WebCore9FrameView38scrollPositionChangedViaPlatformWidgetEv
 __ZN7WebCore9FrameView38syncCompositingStateIncludingSubframesEv
-__ZN7WebCore9FrameView43setShouldLayoutFixedElementsRelativeToFrameEb
 __ZN7WebCore9FrameView6createEPNS_5FrameE
 __ZN7WebCore9FrameView6createEPNS_5FrameERKNS_7IntSizeE
 __ZN7WebCore9HTMLNames10listingTagE
index 401d3f7..d26df80 100644 (file)
@@ -218,7 +218,6 @@ void FrameView::reset()
     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 @@ int FrameView::scrollXForFixedPosition() const
     // 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 @@ int FrameView::scrollYForFixedPosition() const
         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 @@ IntSize FrameView::scrollOffsetForFixedPosition() const
     return IntSize(scrollXForFixedPosition(), scrollYForFixedPosition());
 }
 
-void FrameView::setShouldLayoutFixedElementsRelativeToFrame(bool shouldLayoutFixedElementsRelativeToFrame)
+bool FrameView::fixedElementsLayoutRelativeToFrame() const
 {
-    if (shouldLayoutFixedElementsRelativeToFrame == m_shouldLayoutFixedElementsRelativeToFrame)
-        return;
-
-    m_shouldLayoutFixedElementsRelativeToFrame = shouldLayoutFixedElementsRelativeToFrame;
-
-    if (!hasFixedObjects())
-        return;
+    ASSERT(m_frame);
+    if (!m_frame->settings())
+        return false;
 
-    setNeedsLayout();
+    return m_frame->settings()->fixedElementsLayoutRelativeToFrame();
 }
+
 IntPoint FrameView::currentMousePosition() const
 {
     return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint();
index 184ab83..466a889 100644 (file)
@@ -196,8 +196,7 @@ public:
     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 @@ private:
     bool m_cannotBlitToWindow;
     bool m_isOverlapped;
     bool m_contentIsOpaque;
-    bool m_shouldLayoutFixedElementsRelativeToFrame;
     unsigned m_slowRepaintObjectCount;
     unsigned m_fixedObjectCount;
     int m_borderX;
index 9559793..1861660 100644 (file)
@@ -213,6 +213,7 @@ Settings::Settings(Page* page)
     , 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 @@ void Settings::setUserStyleSheetLocation(const KURL& userStyleSheetLocation)
     m_page->userStyleSheetLocationChanged();
 }
 
+void Settings::setFixedElementsLayoutRelativeToFrame(bool fixedElementsLayoutRelativeToFrame)
+{
+    m_fixedElementsLayoutRelativeToFrame = fixedElementsLayoutRelativeToFrame;
+}
+
 void Settings::setShouldPrintBackgrounds(bool shouldPrintBackgrounds)
 {
     m_shouldPrintBackgrounds = shouldPrintBackgrounds;
index d651520..8e4d91d 100644 (file)
@@ -189,6 +189,9 @@ namespace WebCore {
         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 @@ namespace WebCore {
         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)
index 2e2e215..836b312 100644 (file)
@@ -634,9 +634,9 @@ LayoutRect RenderBox::reflectedRect(const LayoutRect& r) const
     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 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo
     // 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 @@ LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxM
 {
     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())
index e00e1d8..d1637fa 100644 (file)
@@ -462,7 +462,7 @@ protected:
     void paintRootBoxFillLayers(const PaintInfo&);
 
 private:
-    bool shouldLayoutFixedElementRelativeToFrame(Frame*, FrameView*) const;
+    bool fixedElementLaysOutRelativeToFrame(Frame*, FrameView*) const;
 
     bool includeVerticalScrollbarSize() const;
     bool includeHorizontalScrollbarSize() const;
index e566cd0..a4dbb44 100644 (file)
@@ -235,10 +235,10 @@ void InternalSettings::setPasswordEchoDurationInSeconds(double durationInSeconds
     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)
index 21aa04a..be9328e 100644 (file)
@@ -58,7 +58,7 @@ public:
     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&);
index 71a7708..c2f5b2a 100644 (file)
@@ -39,7 +39,7 @@ module window {
         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);
index cbecc0c..c667e6f 100644 (file)
@@ -1,3 +1,23 @@
+2012-01-27  Fady Samuel  <fsamuel@chromium.org>
+
+        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  <scheib@chromium.org>
 
         Pointer Lock: Implement pointer interface
index cce47e2..08f1440 100644 (file)
@@ -85,6 +85,7 @@ public:
     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;
index c72b613..ed853e2 100644 (file)
@@ -242,13 +242,6 @@ public:
     // 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 --------------------------------------------------------
 
index 7733e26..bbc5752 100644 (file)
@@ -224,6 +224,11 @@ void WebSettingsImpl::setDNSPrefetchingEnabled(bool enabled)
     m_settings->setDNSPrefetchingEnabled(enabled);
 }
 
+void WebSettingsImpl::setFixedElementsLayoutRelativeToFrame(bool fixedElementsLayoutRelativeToFrame)
+{
+    m_settings->setFixedElementsLayoutRelativeToFrame(fixedElementsLayoutRelativeToFrame);
+}
+
 void WebSettingsImpl::setLocalStorageEnabled(bool enabled)
 {
     m_settings->setLocalStorageEnabled(enabled);
index cc70d13..533f27f 100644 (file)
@@ -77,6 +77,7 @@ public:
     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);
index dcccdb4..7fcc4e3 100644 (file)
@@ -2071,30 +2071,6 @@ void WebViewImpl::setDeviceScaleFactor(float scaleFactor)
     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())
index 459aa20..02bc5c9 100644 (file)
@@ -176,8 +176,6 @@ public:
 
     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;
index 2d1c67d..cb88ebf 100644 (file)
@@ -1,3 +1,13 @@
+2012-01-27  Fady Samuel  <fsamuel@chromium.org>
+
+        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  <mrobinson@igalia.com>
 
         Fix a compilation warning in a WebKit2 GTK+ API test.
index 983c90d..a1926a5 100644 (file)
@@ -175,7 +175,6 @@ EXPORTS
         ?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 @@ EXPORTS
         ?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
index d601436..384992d 100644 (file)
@@ -169,7 +169,6 @@ EXPORTS
         ?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 @@ EXPORTS
         ?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
index a476e49..1954092 100644 (file)
@@ -86,9 +86,9 @@ _ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE;
 _ZN7WebCore14ScrollableArea28setScrollOffsetFromInternalsERKNS_8IntPointE;
 _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
 _ZN7WebCore8Settings24setMockScrollbarsEnabledEb;
+_ZN7WebCore8Settings37setFixedElementsLayoutRelativeToFrameEb;
 _ZN7WebCore9FrameView17paintControlTintsEv;
 _ZN7WebCore9FrameView19scrollElementToRectEPNS_7ElementERKNS_7IntRectE;
-_ZN7WebCore9FrameView43setShouldLayoutFixedElementsRelativeToFrameEb;
 _ZN7WebCore24FrameDestructionObserverD2Ev;
 _ZN7WebCore24FrameDestructionObserverC2EPNS_5FrameE;
 _ZN7WebCore24FrameDestructionObserver12observeFrameEPNS_5FrameE;