| Differences between
and this patch
- a/Source/WebCore/ChangeLog +36 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2011-10-31  Fady Samuel  <fsamuel@chromium.org>
2
3
        When page scaling is in use position:fixed has incorrect results
4
        https://bugs.webkit.org/show_bug.cgi?id=68617
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        Add the option for position:fixed elements to be fixed to the frame
9
        instead of the layout rectangle of the document.
10
11
        Tests: fast/repaint/fixed-in-page-scale.html
12
               fast/repaint/fixed-right-bottom-in-page-scale.html
13
               fast/repaint/fixed-right-in-page-scale.html
14
15
        * page/FrameView.cpp:
16
        (WebCore::FrameView::reset):
17
        (WebCore::FrameView::scrollXForFixedPosition):
18
        (WebCore::FrameView::scrollYForFixedPosition):
19
          If position:fixed elements are relative to the frame, disregard the
20
          drag factor.
21
        (WebCore::FrameView::setLayoutFixedElementsRelativeToFrame):
22
        * page/FrameView.h:
23
        (WebCore::FrameView::layoutFixedElementsRelativeToFrame):
24
        * rendering/RenderBox.cpp:
25
        (WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
26
        (WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
27
          If position:fixed elements are relative to the frame, their container
28
          is the frame instead of the layout rect of the document. 
29
          This allows proper positioning of these elements to the right and
30
          bottom.
31
        * testing/Internals.cpp:
32
        (WebCore::Internals::setLayoutFixedElementsRelativeToFrame):
33
        * testing/Internals.h:
34
        * testing/Internals.idl:
35
          Allow enabling and disabling the new behavior in layout tests.
36
1
2011-10-31  Andreas Kling  <kling@webkit.org>
37
2011-10-31  Andreas Kling  <kling@webkit.org>
2
38
3
        CSSRule: Devirtualize insertedIntoParent()
39
        CSSRule: Devirtualize insertedIntoParent()
- a/Source/WebKit2/ChangeLog +10 lines
Lines 1-3 a/Source/WebKit2/ChangeLog_sec1
1
2011-10-31  Fady Samuel  <fsamuel@chromium.org>
2
3
        When page scaling is in use position:fixed has incorrect results
4
        https://bugs.webkit.org/show_bug.cgi?id=68617
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * win/WebKit2.def:
9
        * win/WebKit2CFLite.def:
10
1
2011-10-31  Andras Becsi  <andras.becsi@nokia.com>
11
2011-10-31  Andras Becsi  <andras.becsi@nokia.com>
2
12
3
        [Qt][WK2] Fix qmltests after r98460 added widgets dependency.
13
        [Qt][WK2] Fix qmltests after r98460 added widgets dependency.
- a/Source/WebCore/page/FrameView.cpp -4 / +17 lines
Lines 213-218 void FrameView::reset() a/Source/WebCore/page/FrameView.cpp_sec1
213
    m_cannotBlitToWindow = false;
213
    m_cannotBlitToWindow = false;
214
    m_isOverlapped = false;
214
    m_isOverlapped = false;
215
    m_contentIsOpaque = false;
215
    m_contentIsOpaque = false;
216
    m_layoutFixedElementsRelativeToFrame = false;
216
    m_borderX = 30;
217
    m_borderX = 30;
217
    m_borderY = 30;
218
    m_borderY = 30;
218
    m_layoutTimer.stop();
219
    m_layoutTimer.stop();
Lines 1387-1393 LayoutUnit FrameView::scrollXForFixedPosition() const a/Source/WebCore/page/FrameView.cpp_sec2
1387
    // When the page is scaled, the scaled "viewport" with respect to which fixed object are positioned
1388
    // When the page is scaled, the scaled "viewport" with respect to which fixed object are positioned
1388
    // doesn't move as fast as the content view, so that when the content is scrolled all the way to the
1389
    // doesn't move as fast as the content view, so that when the content is scrolled all the way to the
1389
    // end, the bottom of the scaled "viewport" touches the bottom of the real viewport.
1390
    // end, the bottom of the scaled "viewport" touches the bottom of the real viewport.
1390
    float dragFactor = (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX;
1391
    float dragFactor = layoutFixedElementsRelativeToFrame() ? 1 : (contentsWidth() - visibleContentWidth * frameScaleFactor) / maxX;
1391
1392
1392
    return x * dragFactor / frameScaleFactor;
1393
    return x * dragFactor / frameScaleFactor;
1393
}
1394
}
Lines 1395-1402 LayoutUnit FrameView::scrollXForFixedPosition() const a/Source/WebCore/page/FrameView.cpp_sec3
1395
LayoutUnit FrameView::scrollYForFixedPosition() const
1396
LayoutUnit FrameView::scrollYForFixedPosition() const
1396
{
1397
{
1397
    LayoutUnit visibleContentHeight = visibleContentRect().height();
1398
    LayoutUnit visibleContentHeight = visibleContentRect().height();
1398
1399
    LayoutUnit maxY = contentsHeight() - visibleContentHeight;
1399
    LayoutUnit maxY = contentsHeight() - visibleContentHeight;
1400
1400
    if (maxY == 0)
1401
    if (maxY == 0)
1401
        return 0;
1402
        return 0;
1402
1403
Lines 1418-1425 LayoutUnit FrameView::scrollYForFixedPosition() const a/Source/WebCore/page/FrameView.cpp_sec4
1418
        return y;
1419
        return y;
1419
1420
1420
    float frameScaleFactor = m_frame->frameScaleFactor();
1421
    float frameScaleFactor = m_frame->frameScaleFactor();
1421
    float dragFactor = (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY;
1422
    float dragFactor = layoutFixedElementsRelativeToFrame() ? 1 : (contentsHeight() - visibleContentHeight * frameScaleFactor) / maxY;
1422
1423
    return y * dragFactor / frameScaleFactor;
1423
    return y * dragFactor / frameScaleFactor;
1424
}
1424
}
1425
1425
Lines 1428-1433 LayoutSize FrameView::scrollOffsetForFixedPosition() const a/Source/WebCore/page/FrameView.cpp_sec5
1428
    return LayoutSize(scrollXForFixedPosition(), scrollYForFixedPosition());
1428
    return LayoutSize(scrollXForFixedPosition(), scrollYForFixedPosition());
1429
}
1429
}
1430
1430
1431
void FrameView::setLayoutFixedElementsRelativeToFrame(bool layoutFixedElementsRelativeToFrame)
1432
{
1433
    if (layoutFixedElementsRelativeToFrame == m_layoutFixedElementsRelativeToFrame)
1434
        return;
1435
1436
    m_layoutFixedElementsRelativeToFrame = layoutFixedElementsRelativeToFrame;
1437
1438
    if (!hasFixedObjects())
1439
        return;
1440
1441
    setNeedsLayout();
1442
}
1443
1431
LayoutPoint FrameView::currentMousePosition() const
1444
LayoutPoint FrameView::currentMousePosition() const
1432
{
1445
{
1433
    return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint();
1446
    return m_frame ? m_frame->eventHandler()->currentMousePosition() : IntPoint();
- a/Source/WebCore/page/FrameView.h -1 / +4 lines
Lines 195-200 public: a/Source/WebCore/page/FrameView.h_sec1
195
    LayoutUnit scrollYForFixedPosition() const;
195
    LayoutUnit scrollYForFixedPosition() const;
196
    LayoutSize scrollOffsetForFixedPosition() const;
196
    LayoutSize scrollOffsetForFixedPosition() const;
197
197
198
    bool layoutFixedElementsRelativeToFrame() const { return m_layoutFixedElementsRelativeToFrame; }
199
    void setLayoutFixedElementsRelativeToFrame(bool);
200
198
    void beginDeferredRepaints();
201
    void beginDeferredRepaints();
199
    void endDeferredRepaints();
202
    void endDeferredRepaints();
200
    void checkStopDelayingDeferredRepaints();
203
    void checkStopDelayingDeferredRepaints();
Lines 409-415 private: a/Source/WebCore/page/FrameView.h_sec2
409
    bool m_contentIsOpaque;
412
    bool m_contentIsOpaque;
410
    unsigned m_slowRepaintObjectCount;
413
    unsigned m_slowRepaintObjectCount;
411
    unsigned m_fixedObjectCount;
414
    unsigned m_fixedObjectCount;
412
415
    bool m_layoutFixedElementsRelativeToFrame;
413
    int m_borderX;
416
    int m_borderX;
414
    int m_borderY;
417
    int m_borderY;
415
418
- a/Source/WebCore/rendering/RenderBox.cpp +11 lines
Lines 2328-2333 void RenderBox::computeBlockDirectionMargins(RenderBlock* containingBlock) a/Source/WebCore/rendering/RenderBox.cpp_sec1
2328
int RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* region,
2328
int RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObject* containingBlock, RenderRegion* region,
2329
    LayoutUnit offsetFromLogicalTopOfFirstPage, bool checkForPerpendicularWritingMode) const
2329
    LayoutUnit offsetFromLogicalTopOfFirstPage, bool checkForPerpendicularWritingMode) const
2330
{
2330
{
2331
    // Container for position:fixed is the frame.
2332
    Frame* frame = view() ? view()->frame(): 0;
2333
    FrameView* frameView = view() ? view()->frameView() : 0;
2334
    if (style() && style()->position() == FixedPosition && frame && frameView && frameView->layoutFixedElementsRelativeToFrame())
2335
        return (view()->isHorizontalWritingMode() ? frameView->visibleWidth() : frameView->visibleHeight()) / frame->frameScaleFactor();
2336
2331
    if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())
2337
    if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())
2332
        return containingBlockLogicalHeightForPositioned(containingBlock, false);
2338
        return containingBlockLogicalHeightForPositioned(containingBlock, false);
2333
2339
Lines 2380-2385 int RenderBox::containingBlockLogicalWidthForPositioned(const RenderBoxModelObje a/Source/WebCore/rendering/RenderBox.cpp_sec2
2380
2386
2381
int RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode) const
2387
int RenderBox::containingBlockLogicalHeightForPositioned(const RenderBoxModelObject* containingBlock, bool checkForPerpendicularWritingMode) const
2382
{
2388
{
2389
    Frame* frame = view() ? view()->frame(): 0;
2390
    FrameView* frameView = view() ? view()->frameView() : 0;
2391
    if (style() && style()->position() == FixedPosition && frame && frameView->layoutFixedElementsRelativeToFrame())
2392
        return (view()->isHorizontalWritingMode() ? frameView->visibleHeight() : frameView->visibleWidth()) / frame->frameScaleFactor();
2393
2383
    if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())
2394
    if (checkForPerpendicularWritingMode && containingBlock->isHorizontalWritingMode() != isHorizontalWritingMode())
2384
        return containingBlockLogicalWidthForPositioned(containingBlock, 0, 0, false);
2395
        return containingBlockLogicalWidthForPositioned(containingBlock, 0, 0, false);
2385
2396
- a/Source/WebCore/testing/Internals.cpp +11 lines
Lines 484-487 unsigned Internals::lengthFromRange(Element* scope, const Range* range, Exceptio a/Source/WebCore/testing/Internals.cpp_sec1
484
    return length;
484
    return length;
485
}
485
}
486
486
487
void Internals::setLayoutFixedElementsRelativeToFrame(Document* document, bool enabled, ExceptionCode& ec)
488
{
489
    if (!document || !document->view()) {
490
        ec = INVALID_ACCESS_ERR;
491
        return;
492
    }
493
494
    FrameView* frameView = document->view();
495
    frameView->setLayoutFixedElementsRelativeToFrame(enabled);
496
}
497
487
}
498
}
- a/Source/WebCore/testing/Internals.h +1 lines
Lines 98-103 public: a/Source/WebCore/testing/Internals.h_sec1
98
    PassRefPtr<Range> rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&);
98
    PassRefPtr<Range> rangeFromLocationAndLength(Element* scope, int rangeLocation, int rangeLength, ExceptionCode&);
99
    unsigned locationFromRange(Element* scope, const Range*, ExceptionCode&);
99
    unsigned locationFromRange(Element* scope, const Range*, ExceptionCode&);
100
    unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
100
    unsigned lengthFromRange(Element* scope, const Range*, ExceptionCode&);
101
    void setLayoutFixedElementsRelativeToFrame(Document*, bool, ExceptionCode&);
101
102
102
    static const char* internalsId;
103
    static const char* internalsId;
103
104
- a/Source/WebCore/testing/Internals.idl +2 lines
Lines 72-77 module window { a/Source/WebCore/testing/Internals.idl_sec1
72
        Range rangeFromLocationAndLength(in Element scope, in long rangeLocation, in long rangeLength) raises (DOMException);
72
        Range rangeFromLocationAndLength(in Element scope, in long rangeLocation, in long rangeLength) raises (DOMException);
73
        unsigned long locationFromRange(in Element scope, in Range range) raises (DOMException);
73
        unsigned long locationFromRange(in Element scope, in Range range) raises (DOMException);
74
        unsigned long lengthFromRange(in Element scope, in Range range) raises (DOMException);
74
        unsigned long lengthFromRange(in Element scope, in Range range) raises (DOMException);
75
76
        void setLayoutFixedElementsRelativeToFrame(in Document document, in boolean enabled) raises(DOMException);
75
    };
77
    };
76
}
78
}
77
79
- a/Source/WebKit2/win/WebKit2.def +1 lines
Lines 168-173 EXPORTS a/Source/WebKit2/win/WebKit2.def_sec1
168
        ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
168
        ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
169
        ?removeShadowRoot@Element@WebCore@@QAEXXZ
169
        ?removeShadowRoot@Element@WebCore@@QAEXXZ
170
        ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
170
        ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
171
        ?setLayoutFixedElementsRelativeToFrame@FrameView@WebCore@@QAEX_N@Z
171
        ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
172
        ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
172
        ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
173
        ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
173
        ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
174
        ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
- a/Source/WebKit2/win/WebKit2CFLite.def +1 lines
Lines 159-164 EXPORTS a/Source/WebKit2/win/WebKit2CFLite.def_sec1
159
        ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
159
        ?rangeFromLocationAndLength@TextIterator@WebCore@@SA?AV?$PassRefPtr@VRange@WebCore@@@WTF@@PAVElement@2@HH_N@Z
160
        ?removeShadowRoot@Element@WebCore@@QAEXXZ
160
        ?removeShadowRoot@Element@WebCore@@QAEXXZ
161
        ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
161
        ?scrollElementToRect@FrameView@WebCore@@QAEXPAVElement@2@ABVIntRect@2@@Z
162
        ?setLayoutFixedElementsRelativeToFrame@FrameView@WebCore@@QAEX_N@Z
162
        ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
163
        ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
163
        ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
164
        ?setResourcesDataSizeLimitsFromInternals@InspectorController@WebCore@@QAEXHH@Z
164
        ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
165
        ?setScrollbarsSuppressed@ScrollView@WebCore@@QAEX_N0@Z
- a/LayoutTests/ChangeLog +17 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2011-10-31  Fady Samuel  <fsamuel@chromium.org>
2
3
        When page scaling is in use position:fixed has incorrect results
4
        https://bugs.webkit.org/show_bug.cgi?id=68617
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * fast/repaint/fixed-in-page-scale-expected.png: Added.
9
        * fast/repaint/fixed-in-page-scale-expected.txt: Added.
10
        * fast/repaint/fixed-in-page-scale.html: Added.
11
        * fast/repaint/fixed-right-bottom-in-page-scale-expected.png: Added.
12
        * fast/repaint/fixed-right-bottom-in-page-scale-expected.txt: Added.
13
        * fast/repaint/fixed-right-bottom-in-page-scale.html: Added.
14
        * fast/repaint/fixed-right-in-page-scale-expected.png: Added.
15
        * fast/repaint/fixed-right-in-page-scale-expected.txt: Added.
16
        * fast/repaint/fixed-right-in-page-scale.html: Added.
17
1
2011-10-31  Leandro Pereira  <leandro@profusion.mobi>
18
2011-10-31  Leandro Pereira  <leandro@profusion.mobi>
2
19
3
        [EFL] Unreviewed. Update Skipped list.
20
        [EFL] Unreviewed. Update Skipped list.
- a/LayoutTests/fast/repaint/fixed-in-page-scale-expected.txt +1 lines
Line 0 a/LayoutTests/fast/repaint/fixed-in-page-scale-expected.txt_sec1
1
- a/LayoutTests/fast/repaint/fixed-in-page-scale.html +54 lines
Line 0 a/LayoutTests/fast/repaint/fixed-in-page-scale.html_sec1
1
<html>
2
<head>
3
    <style>
4
        ::-webkit-scrollbar {
5
            width: 0px;
6
            height: 0px;
7
        }
8
    </style>
9
    <script>
10
      window.enablePixelTesting = true;
11
      if (window.internals)
12
          window.internals.setLayoutFixedElementsRelativeToFrame(document, true);
13
14
      function scroll() {
15
          window.scrollTo(100,100);
16
      }
17
18
      function scaleWithEventSender() {
19
          var scaleFactor = 2.0;
20
          var scaleOffset = 0;
21
          if (window.eventSender) {
22
             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
23
          }
24
      }
25
26
      function test() {
27
          scaleWithEventSender();
28
          scroll();
29
      }
30
    </script>
31
    <script src="../js/resources/js-test-pre.js"></script>
32
</head>
33
<body style="width:2000px; height:2000px; margin:0px;" onload="test();">
34
    <div style="position: fixed; top: -100px; left: -100px; z-index: 1">
35
        <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
36
        <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
37
38
        <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background:green;"></div>
39
        <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:black;"></div>
40
    </div>
41
42
    <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
43
    <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
44
    <div style="left:200px; top:0; width:100px; height:100px; position:absolute; background:blue;"></div>
45
46
    <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background: green;"></div>
47
    <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
48
    <div style="left:200px; top:100px; width:100px; height:100px; position:absolute; background:yellow;"></div>
49
50
    <div style="left:0; top:200px; width:100px; height:100px; position:absolute; background:blue;"></div>
51
    <div style="left:100px; top:200px; width:100px; height:100px; position:absolute; background:yellow;"></div>
52
    <div style="left:200px; top:200px; width:100px; height:100px; position:absolute; background:green;"></div>
53
</body>
54
</html>
- a/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.txt +1 lines
Line 0 a/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale-expected.txt_sec1
1
- a/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html +43 lines
Line 0 a/LayoutTests/fast/repaint/fixed-right-bottom-in-page-scale.html_sec1
1
<html>
2
<head>
3
    <style>
4
        ::-webkit-scrollbar {
5
            width: 0px;
6
            height: 0px;
7
        }
8
    </style>
9
    <script>
10
      window.enablePixelTesting = true;
11
      if (window.internals)
12
          window.internals.setLayoutFixedElementsRelativeToFrame(document, true);
13
14
      function scroll() {
15
          window.scrollTo(100,100);
16
      }
17
18
      function scaleWithEventSender() {
19
          var scaleFactor = 2.0;
20
          var scaleOffset = 0;
21
          if (window.eventSender) {
22
             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
23
          }
24
      }
25
26
      function test() {
27
          document.body.style.width = (document.body.clientWidth + 100) + "px";
28
          scaleWithEventSender();
29
          scroll();
30
      }
31
    </script>
32
    <script src="../js/resources/js-test-pre.js"></script>
33
</head>
34
<body style="height: 2000px; width: 2000px; margin:0px;" onload="test();">
35
    <div style="position: fixed; bottom: 100px; right: 100px; z-index: 1">
36
        <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:black;"></div>
37
        <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
38
39
        <div style="left:0px; top:100px; width:100px; height:100px; position:absolute; background:yellow;"></div>
40
        <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
41
    </div>
42
</body>
43
</html>
- a/LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.txt +1 lines
Line 0 a/LayoutTests/fast/repaint/fixed-right-in-page-scale-expected.txt_sec1
1
- a/LayoutTests/fast/repaint/fixed-right-in-page-scale.html +56 lines
Line 0 a/LayoutTests/fast/repaint/fixed-right-in-page-scale.html_sec1
1
<html>
2
<head>
3
    <style>
4
        ::-webkit-scrollbar {
5
            width: 0px;
6
            height: 0px;
7
        }
8
    </style>
9
    <script>
10
      window.enablePixelTesting = true;
11
      if (window.internals)
12
          window.internals.setLayoutFixedElementsRelativeToFrame(document, true);
13
14
      function scroll() {
15
          window.scrollTo(100,100);
16
      }
17
18
      function scaleWithEventSender() {
19
          var scaleFactor = 2.0;
20
          var scaleOffset = 0;
21
          if (window.eventSender) {
22
             eventSender.scalePageBy(scaleFactor, scaleOffset, scaleOffset);
23
          }
24
      }
25
26
      function test() {
27
          scaleWithEventSender();
28
          scroll();
29
      }
30
    </script>
31
    <script src="../js/resources/js-test-pre.js"></script>
32
</head>
33
<body style="height:2000px; width: 2000px; margin:0px;" onload="test();">
34
    <div style="position: fixed; top: -100px; right: 100px; z-index: 1">
35
        <div style="left:0; top:0; width:100px; height:100px; position:absolute; background:yellow;"></div>
36
        <div style="left:100px; top:0; width:100px; height:100px; position:absolute; background:green;"></div>
37
38
        <div style="left:0; top:100px; width:100px; height:100px; position:absolute; background:black;"></div>
39
        <div style="left:100px; top:100px; width:100px; height:100px; position:absolute; background:blue;"></div>
40
    </div>
41
    <div style="position: absolute; width:300px; height:300px; top: 0px; left: 300px" id="grid">
42
        <div style="float:left; width:100px; height:100px; background:yellow;"></div>
43
        <div style="float:left; width:100px; height:100px; background:green;"></div>
44
        <div style="float:left; width:100px; height:100px; background:blue;"></div>
45
46
        <div style="float:left; width:100px; height:100px; background: green;"></div>
47
        <div style="float:left; width:100px; height:100px; background:blue;"></div>
48
        <div style="float:left; width:100px; height:100px; background:yellow;"></div>
49
50
        <div style="float:left; width:100px; height:100px; background:blue;"></div>
51
        <div style="float:left; width:100px; height:100px; background:yellow;"></div>
52
        <div style="float:left; width:100px; height:100px; background:green;"></div>
53
    </div>
54
    <div id="console"></div>
55
</body>
56
</html>

Return to Bug 68617