When page scaling is in use position:fixed has incorrect results
authorfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Dec 2011 00:04:46 +0000 (00:04 +0000)
committerfsamuel@chromium.org <fsamuel@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 3 Dec 2011 00:04:46 +0000 (00:04 +0000)
https://bugs.webkit.org/show_bug.cgi?id=68617

Reviewed by Simon Fraser.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

Add the option for position:fixed elements to be fixed to the frame
instead of the layout rectangle of the document.

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

* WebCore.exp.in:
* page/FrameView.cpp:
(WebCore::FrameView::reset):
(WebCore::FrameView::scrollXForFixedPosition):
(WebCore::FrameView::scrollYForFixedPosition):
  If position:fixed elements are relative to the frame, disregard the
  drag factor.
(WebCore::FrameView::setShouldLayoutFixedElementsRelativeToFrame):
* page/FrameView.h:
(WebCore::FrameView::shouldLayoutFixedElementsRelativeToFrame):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::shouldLayoutFixedElementRelativeToFrame):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
  If position:fixed elements are relative to the frame, their container
  is the frame instead of the layout rect of the document.
  This allows proper positioning of these elements to the right and
  bottom.
* rendering/RenderBox.h:
* testing/Internals.cpp:
(WebCore::Internals::setShouldLayoutFixedElementsRelativeToFrame):
* testing/Internals.h:
* testing/Internals.idl:
  Allow enabling and disabling the new behavior in layout tests.

Source/WebKit2:

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

LayoutTests:

* fast/repaint/fixed-in-page-scale-expected.png: Added.
* fast/repaint/fixed-in-page-scale-expected.txt: Added.
* fast/repaint/fixed-in-page-scale.html: Added.
* fast/repaint/fixed-right-bottom-in-page-scale-expected.png: Added.
* fast/repaint/fixed-right-bottom-in-page-scale-expected.txt: Added.
* fast/repaint/fixed-right-bottom-in-page-scale.html: Added.
* fast/repaint/fixed-right-in-page-scale-expected.png: Added.
* fast/repaint/fixed-right-in-page-scale-expected.txt: Added.
* fast/repaint/fixed-right-in-page-scale.html: Added.

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

24 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/repaint/fixed-in-page-scale-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-in-page-scale-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-in-page-scale.html [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.png [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.txt [new file with mode: 0644]
LayoutTests/fast/repaint/fixed-right-in-page-scale.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/WebKit2/win/WebKit2CFLite.def
Source/autotools/symbols.filter

index 9a60363..6403a89 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-12-02  Fady Samuel  <fsamuel@chromium.org>
+
+        When page scaling is in use position:fixed has incorrect results
+        https://bugs.webkit.org/show_bug.cgi?id=68617
+
+        Reviewed by Simon Fraser.
+
+        * Source/autotools/symbols.filter:
+
 2011-12-02  Martin Robinson  <mrobinson@igalia.com>
 
         Try to fix the GTK+ debug bot. As discussed with other GTK+
index 5d2e45e..9b1e003 100644 (file)
@@ -1,3 +1,20 @@
+2011-12-02  Fady Samuel  <fsamuel@chromium.org>
+
+        When page scaling is in use position:fixed has incorrect results
+        https://bugs.webkit.org/show_bug.cgi?id=68617
+
+        Reviewed by Simon Fraser.
+
+        * fast/repaint/fixed-in-page-scale-expected.png: Added.
+        * fast/repaint/fixed-in-page-scale-expected.txt: Added.
+        * fast/repaint/fixed-in-page-scale.html: Added.
+        * fast/repaint/fixed-right-bottom-in-page-scale-expected.png: Added.
+        * fast/repaint/fixed-right-bottom-in-page-scale-expected.txt: Added.
+        * fast/repaint/fixed-right-bottom-in-page-scale.html: Added.
+        * fast/repaint/fixed-right-in-page-scale-expected.png: Added.
+        * fast/repaint/fixed-right-in-page-scale-expected.txt: Added.
+        * fast/repaint/fixed-right-in-page-scale.html: Added.
+
 2011-12-02  Vincent Scheib  <scheib@chromium.org>
 
         [Chromium] Marking svg/W3C-SVG-1.1/fonts-elem-04-b.svg flaky for text
diff --git a/LayoutTests/fast/repaint/fixed-in-page-scale-expected.png b/LayoutTests/fast/repaint/fixed-in-page-scale-expected.png
new file mode 100644 (file)
index 0000000..3235399
Binary files /dev/null and b/LayoutTests/fast/repaint/fixed-in-page-scale-expected.png differ
diff --git a/LayoutTests/fast/repaint/fixed-in-page-scale-expected.txt b/LayoutTests/fast/repaint/fixed-in-page-scale-expected.txt
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/LayoutTests/fast/repaint/fixed-in-page-scale.html b/LayoutTests/fast/repaint/fixed-in-page-scale.html
new file mode 100644 (file)
index 0000000..a95c572
--- /dev/null
@@ -0,0 +1,54 @@
+<html>
+<head>
+    <style>
+        ::-webkit-scrollbar {
+            width: 0px;
+            height: 0px;
+        }
+    </style>
+    <script>
+      window.enablePixelTesting = true;
+      if (window.internals)
+          window.internals.setShouldLayoutFixedElementsRelativeToFrame(document, true);
+
+      function scroll() {
+          window.scrollTo(100,100);
+      }
+
+      function scaleWithEventSender() {
+          var scaleFactor = 2.0;
+          var scaleOffset = 0;
+          if (window.eventSender) {
+             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
+          }
+      }
+
+      function test() {
+          scaleWithEventSender();
+          scroll();
+      }
+    </script>
+    <script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body style="width:2000px; height:2000px; margin:0px;" onload="test();">
+    <div style="position: fixed; top: -100px; left: -100px; z-index: 1">
+        <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
+        <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
+
+        <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background:green;"></div>
+        <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:black;"></div>
+    </div>
+
+    <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
+    <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
+    <div style="left:200px; top:0; width:100px; height:100px; position:absolute; background:blue;"></div>
+
+    <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background: green;"></div>
+    <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
+    <div style="left:200px; top:100px; width:100px; height:100px; position:absolute; background:yellow;"></div>
+
+    <div style="left:0; top:200px; width:100px; height:100px; position:absolute; background:blue;"></div>
+    <div style="left:100px; top:200px; width:100px; height:100px; position:absolute; background:yellow;"></div>
+    <div style="left:200px; top:200px; width:100px; height:100px; position:absolute; background:green;"></div>
+</body>
+</html>
diff --git a/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.png b/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.png
new file mode 100644 (file)
index 0000000..725f5af
Binary files /dev/null and b/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.png differ
diff --git a/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.txt b/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.txt
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html b/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html
new file mode 100644 (file)
index 0000000..12fc45a
--- /dev/null
@@ -0,0 +1,43 @@
+<html>
+<head>
+    <style>
+        ::-webkit-scrollbar {
+            width: 0px;
+            height: 0px;
+        }
+    </style>
+    <script>
+      window.enablePixelTesting = true;
+      if (window.internals)
+          window.internals.setShouldLayoutFixedElementsRelativeToFrame(document, true);
+
+      function scroll() {
+          window.scrollTo(100,100);
+      }
+
+      function scaleWithEventSender() {
+          var scaleFactor = 2.0;
+          var scaleOffset = 0;
+          if (window.eventSender) {
+             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
+          }
+      }
+
+      function test() {
+          document.body.style.width = (document.body.clientWidth + 100) + "px";
+          scaleWithEventSender();
+          scroll();
+      }
+    </script>
+    <script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body style="height: 2000px; width: 2000px; margin:0px;" onload="test();">
+    <div style="position: fixed; bottom: 100px; right: 100px; z-index: 1">
+        <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:black;"></div>
+        <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
+
+        <div style="left:0px; top:100px; width:100px; height:100px; position:absolute; background:yellow;"></div>
+        <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
+    </div>
+</body>
+</html>
diff --git a/LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.png b/LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.png
new file mode 100644 (file)
index 0000000..01e3e0e
Binary files /dev/null and b/LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.png differ
diff --git a/LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.txt b/LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.txt
new file mode 100644 (file)
index 0000000..8b13789
--- /dev/null
@@ -0,0 +1 @@
+
diff --git a/LayoutTests/fast/repaint/fixed-right-in-page-scale.html b/LayoutTests/fast/repaint/fixed-right-in-page-scale.html
new file mode 100644 (file)
index 0000000..90383e8
--- /dev/null
@@ -0,0 +1,56 @@
+<html>
+<head>
+    <style>
+        ::-webkit-scrollbar {
+            width: 0px;
+            height: 0px;
+        }
+    </style>
+    <script>
+      window.enablePixelTesting = true;
+      if (window.internals)
+          window.internals.setShouldLayoutFixedElementsRelativeToFrame(document, true);
+
+      function scroll() {
+          window.scrollTo(100,100);
+      }
+
+      function scaleWithEventSender() {
+          var scaleFactor = 2.0;
+          var scaleOffset = 0;
+          if (window.eventSender) {
+             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
+          }
+      }
+
+      function test() {
+          scaleWithEventSender();
+          scroll();
+      }
+    </script>
+    <script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body style="height:2000px; width: 2000px; margin:0px;" onload="test();">
+    <div style="position: fixed; top: -100px; right: 100px; z-index: 1">
+        <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
+        <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
+
+        <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background:black;"></div>
+        <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
+    </div>
+    <div style="position: absolute; width:300px; height:300px; top: 0px; left: 300px" id="grid">
+        <div style="float:left; width:100px; height:100px; background:yellow;"></div>
+        <div style="float:left; width:100px; height:100px; background:green;"></div>
+        <div style="float:left; width:100px; height:100px; background:blue;"></div>
+
+        <div style="float:left; width:100px; height:100px; background: green;"></div>
+        <div style="float:left; width:100px; height:100px; background:blue;"></div>
+        <div style="float:left; width:100px; height:100px; background:yellow;"></div>
+
+        <div style="float:left; width:100px; height:100px; background:blue;"></div>
+        <div style="float:left; width:100px; height:100px; background:yellow;"></div>
+        <div style="float:left; width:100px; height:100px; background:green;"></div>
+    </div>
+    <div id="console"></div>
+</body>
+</html>
index 73002f4..35999e6 100644 (file)
@@ -1,3 +1,42 @@
+2011-12-02  Fady Samuel  <fsamuel@chromium.org>
+
+        When page scaling is in use position:fixed has incorrect results
+        https://bugs.webkit.org/show_bug.cgi?id=68617
+
+        Reviewed by Simon Fraser.
+
+        Add the option for position:fixed elements to be fixed to the frame
+        instead of the layout rectangle of the document.
+
+        Tests: fast/repaint/fixed-in-page-scale.html
+               fast/repaint/fixed-right-bottom-in-page-scale.html
+               fast/repaint/fixed-right-in-page-scale.html
+
+        * WebCore.exp.in:
+        * page/FrameView.cpp:
+        (WebCore::FrameView::reset):
+        (WebCore::FrameView::scrollXForFixedPosition):
+        (WebCore::FrameView::scrollYForFixedPosition):
+          If position:fixed elements are relative to the frame, disregard the
+          drag factor.
+        (WebCore::FrameView::setShouldLayoutFixedElementsRelativeToFrame):
+        * page/FrameView.h:
+        (WebCore::FrameView::shouldLayoutFixedElementsRelativeToFrame):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::shouldLayoutFixedElementRelativeToFrame):
+        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
+        (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
+          If position:fixed elements are relative to the frame, their container
+          is the frame instead of the layout rect of the document. 
+          This allows proper positioning of these elements to the right and
+          bottom.
+        * rendering/RenderBox.h:
+        * testing/Internals.cpp:
+        (WebCore::Internals::setShouldLayoutFixedElementsRelativeToFrame):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+          Allow enabling and disabling the new behavior in layout tests.
+
 2011-12-02  Benjamin Poulain  <bpoulain@apple.com>
 
         Build fix for SubresourceLoader when building with Core Foundation
index 5943bab..d1a98d1 100644 (file)
@@ -1028,6 +1028,7 @@ __ZN7WebCore9FrameView17setScrollPositionERKNS_8IntPointE
 __ZN7WebCore9FrameView17setTracksRepaintsEb
 __ZN7WebCore9FrameView18updateControlTintsEv
 __ZN7WebCore9FrameView19scrollElementToRectEPNS_7ElementERKNS_7IntRectE
+__ZN7WebCore9FrameView43setShouldLayoutFixedElementsRelativeToFrameEb
 __ZN7WebCore9FrameView20enterCompositingModeEv
 __ZN7WebCore9FrameView21flushDeferredRepaintsEv
 __ZN7WebCore9FrameView22setBaseBackgroundColorERKNS_5ColorE
index 543c8a8..218b1b8 100644 (file)
@@ -217,6 +217,7 @@ void FrameView::reset()
     m_cannotBlitToWindow = false;
     m_isOverlapped = false;
     m_contentIsOpaque = false;
+    m_shouldLayoutFixedElementsRelativeToFrame = false;
     m_borderX = 30;
     m_borderY = 30;
     m_layoutTimer.stop();
@@ -1394,7 +1395,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 = (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX;
+    float dragFactor = shouldLayoutFixedElementsRelativeToFrame() ? 1 : (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX;
 
     return x * dragFactor / frameScaleFactor;
 }
@@ -1425,8 +1426,7 @@ int FrameView::scrollYForFixedPosition() const
         return y;
 
     float frameScaleFactor = m_frame->frameScaleFactor();
-    float dragFactor = (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY;
-
+    float dragFactor = shouldLayoutFixedElementsRelativeToFrame() ? 1 : (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY;
     return y * dragFactor / frameScaleFactor;
 }
 
@@ -1435,6 +1435,18 @@ IntSize FrameView::scrollOffsetForFixedPosition() const
     return IntSize(scrollXForFixedPosition(), scrollYForFixedPosition());
 }
 
+void FrameView::setShouldLayoutFixedElementsRelativeToFrame(bool shouldLayoutFixedElementsRelativeToFrame)
+{
+    if (shouldLayoutFixedElementsRelativeToFrame == m_shouldLayoutFixedElementsRelativeToFrame)
+        return;
+
+    m_shouldLayoutFixedElementsRelativeToFrame = shouldLayoutFixedElementsRelativeToFrame;
+
+    if (!hasFixedObjects())
+        return;
+
+    setNeedsLayout();
+}
 IntPoint FrameView::currentMousePosition() const
 {
     return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint();
index 7c4c894..dcd6d33 100644 (file)
@@ -196,6 +196,9 @@ public:
     int scrollYForFixedPosition() const;
     IntSize scrollOffsetForFixedPosition() const;
 
+    bool shouldLayoutFixedElementsRelativeToFrame() const { return m_shouldLayoutFixedElementsRelativeToFrame; }
+    void setShouldLayoutFixedElementsRelativeToFrame(bool);
+
     void beginDeferredRepaints();
     void endDeferredRepaints();
     void checkStopDelayingDeferredRepaints();
@@ -411,9 +414,9 @@ private:
     bool m_cannotBlitToWindow;
     bool m_isOverlapped;
     bool m_contentIsOpaque;
+    bool m_shouldLayoutFixedElementsRelativeToFrame;
     unsigned m_slowRepaintObjectCount;
     unsigned m_fixedObjectCount;
-
     int m_borderX;
     int m_borderY;
 
index bce02ce..b9c25d6 100644 (file)
@@ -631,6 +631,11 @@ LayoutRect RenderBox::reflectedRect(const LayoutRect& r) const
     return result;
 }
 
+bool RenderBox::shouldLayoutFixedElementRelativeToFrame(Frame* frame, FrameView* frameView) const
+{
+    return style() && style()->position() == FixedPosition && container()->isRenderView() && frame && frameView && frameView->shouldLayoutFixedElementsRelativeToFrame();
+}
+
 bool RenderBox::includeVerticalScrollbarSize() const
 {
     return hasOverflowClip() && !layer()->hasOverlayScrollbars()
@@ -2317,6 +2322,12 @@ void RenderBox::computeBlockDirectionMargins(RenderBlock* containingBlock)
 LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* region,
     LayoutUnit offsetFromLogicalTopOfFirstPage, bool checkForPerpendicularWritingMode) const
 {
+    // Container for position:fixed is the frame.
+    Frame* frame = view() ? view()->frame(): 0;
+    FrameView* frameView = view() ? view()->frameView() : 0;
+    if (shouldLayoutFixedElementRelativeToFrame(frame, frameView))
+        return (view()->isHorizontalWritingMode() ? frameView->visibleWidth() : frameView->visibleHeight()) / frame->frameScaleFactor();
+
     if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())
         return containingBlockLogicalHeightForPositioned(containingBlock, false);
 
@@ -2369,6 +2380,11 @@ LayoutUnit RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxMo
 
 LayoutUnit RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode) const
 {
+    Frame* frame = view() ? view()->frame(): 0;
+    FrameView* frameView = view() ? view()->frameView() : 0;
+    if (shouldLayoutFixedElementRelativeToFrame(frame, frameView))
+        return (view()->isHorizontalWritingMode() ? frameView->visibleHeight() : frameView->visibleWidth()) / frame->frameScaleFactor();
+
     if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())
         return containingBlockLogicalWidthForPositioned(containingBlock, 0, 0, false);
 
index bc1ffd9..e4eef65 100644 (file)
@@ -462,6 +462,8 @@ protected:
     void paintRootBoxFillLayers(const PaintInfo&);
 
 private:
+    bool shouldLayoutFixedElementRelativeToFrame(Frame*, FrameView*) const;
+
     bool includeVerticalScrollbarSize() const;
     bool includeHorizontalScrollbarSize() const;
 
index d5ab788..9f5136f 100644 (file)
@@ -577,6 +577,17 @@ unsigned Internals::lengthFromRange(Element* scope, const Range* range, Exceptio
     return length;
 }
 
+void Internals::setShouldLayoutFixedElementsRelativeToFrame(Document* document, bool enabled, ExceptionCode& ec)
+{
+    if (!document || !document->view()) {
+        ec = INVALID_ACCESS_ERR;
+        return;
+    }
+
+    FrameView* frameView = document->view();
+    frameView->setShouldLayoutFixedElementsRelativeToFrame(enabled);
+}
+
 void Internals::setUnifiedTextCheckingEnabled(Document* document, bool enabled, ExceptionCode& ec)
 {
     if (!document || !document->frame() || !document->frame()->settings()) {
index b909d70..28efb4e 100644 (file)
@@ -104,6 +104,7 @@ public:
     PassRefPtr<Range> rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&);
     unsigned locationFromRange(Element* scope, const Range*, ExceptionCode&);
     unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
+    void setShouldLayoutFixedElementsRelativeToFrame(Document*, bool, ExceptionCode&);
 
     void setUnifiedTextCheckingEnabled(Document*, bool, ExceptionCode&);
     bool unifiedTextCheckingEnabled(Document*, ExceptionCode&);
index ccc892c..f66bb56 100644 (file)
@@ -77,6 +77,7 @@ module window {
         unsigned long locationFromRange(in Element scope, in Range range) raises (DOMException);
         unsigned long lengthFromRange(in Element scope, in Range range) raises (DOMException);
 
+        void setShouldLayoutFixedElementsRelativeToFrame(in Document document, in boolean enabled) raises(DOMException);
         void setUnifiedTextCheckingEnabled(in Document document, in boolean enabled) raises (DOMException);
         boolean unifiedTextCheckingEnabled(in Document document) raises (DOMException);
     };
index db0d4a9..54979f3 100644 (file)
@@ -1,3 +1,13 @@
+2011-12-02  Fady Samuel  <fsamuel@chromium.org>
+
+        When page scaling is in use position:fixed has incorrect results
+        https://bugs.webkit.org/show_bug.cgi?id=68617
+
+        Reviewed by Simon Fraser.
+
+        * win/WebKit2.def:
+        * win/WebKit2CFLite.def:
+
 2011-12-02  Alexey Proskuryakov  <ap@apple.com>
 
         Update sandbox rules
index 489d597..b46f159 100644 (file)
@@ -169,6 +169,7 @@ EXPORTS
         ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
         ?removeShadowRoot@Element@WebCore@@QAEXXZ
         ?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
         ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z
index 3065bd8..e57dcdb 100644 (file)
@@ -162,6 +162,7 @@ EXPORTS
         ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
         ?removeShadowRoot@Element@WebCore@@QAEXXZ
         ?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
         ?setPagination@Page@WebCore@@QAEXABUPagination@12@@Z
index 4387ca9..40cb78b 100644 (file)
@@ -83,6 +83,7 @@ _ZN7WebCore10ScrollView23setScrollbarsSuppressedEbb;
 _ZN7WebCore8Settings24setMockScrollbarsEnabledEb;
 _ZN7WebCore9FrameView17paintControlTintsEv;
 _ZN7WebCore9FrameView19scrollElementToRectEPNS_7ElementERKNS_7IntRectE;
+_ZN7WebCore9FrameView43setShouldLayoutFixedElementsRelativeToFrameEb;
 local:
 _Z*;
 cti*;