| Differences between
and this patch
- a/LayoutTests/ChangeLog +14 lines
Lines 1-3 a/LayoutTests/ChangeLog_sec1
1
2014-01-28  Radu Stavila  <stavila@adobe.com>
2
3
        [CSSRegions] Unable to scroll a scrollable container for regions using mouse wheel
4
        https://bugs.webkit.org/show_bug.cgi?id=123886
5
6
        Added tests for scrolling elements flowed into scrollable regions.
7
8
        Reviewed by Antti Koivisto.
9
10
        * fast/regions/wheel-scroll-abspos-expected.html: Added.
11
        * fast/regions/wheel-scroll-abspos.html: Added.
12
        * fast/regions/wheel-scroll-expected.html: Added.
13
        * fast/regions/wheel-scroll.html: Added.
14
1
2014-01-28  Jinwoo Song  <jinwoo7.song@samsung.com>
15
2014-01-28  Jinwoo Song  <jinwoo7.song@samsung.com>
2
16
3
        Unreviewed EFL gardening after r162972.
17
        Unreviewed EFL gardening after r162972.
- a/LayoutTests/fast/regions/wheel-scroll-abspos-expected.html +84 lines
Line 0 a/LayoutTests/fast/regions/wheel-scroll-abspos-expected.html_sec1
1
<!DOCTYPE html>
2
3
<style>
4
    body { font: 16px/16px monospace; }
5
6
    .region {
7
        border: 1px solid red;
8
        padding: 2px;
9
        width: 250px;
10
        height: 55px;
11
    }
12
13
    #region4 {
14
        height: 356px;
15
        position: absolute;
16
        left: 330px;
17
        top: 120px;
18
        border-width: thick;
19
    }
20
21
    p {
22
        margin: 0px;
23
    }
24
25
    #container {
26
        overflow: auto; 
27
        border: 3px solid blue;
28
        width: 270px;
29
        height: 100px; 
30
        padding: 10px;
31
    }
32
33
    .inner_scroll {
34
        height: 75px;
35
        border: 2px solid green;
36
        margin: 5px;
37
        overflow: scroll;
38
        padding: 5px;
39
    }
40
</style>
41
42
<script>
43
    onload = function() {
44
        if (window.eventSender) {
45
            eventSender.mouseMoveTo(150, 230);
46
            eventSender.continuousMouseScrollBy(0, -10000);
47
            eventSender.continuousMouseScrollBy(0, -10000);
48
            eventSender.mouseMoveTo(0, 0);
49
        }
50
    }
51
</script>
52
53
<body>
54
    <div>
55
        The text passes if everything can be scrolled normally using the mouse wheel: 
56
        <ul>
57
            <li>Scrolling inside the green div should work until it reaches the end and then the blue container should scroll.</li>
58
            <li>Scrolling inside the orange div should work until it reaches the end and then the blue container should NOT scroll because the region in which the orange div is flowed is absolutely positioned</li>
59
        </ul>
60
    </div>
61
62
    <div id="container">
63
        <div class="region">
64
            <p>Assume that there is enough content in the flow to fill the regions</p>
65
        </div>
66
        <div class="region">
67
            <div class="inner_scroll" style="height: 30px; margin-top: 0px;">
68
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
69
            </div>
70
        </div>
71
        <div class="region">
72
            <p style="margin-top: 1px">is less than the size of regions so that the container gets vertical</p>
73
        </div>
74
        <div class="region" id="region4">
75
            <p style="margin-top: 1px">scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container.</p>
76
            <div class="inner_scroll" style="border-color: orange;">
77
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
78
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
79
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
80
            </div>
81
            <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1.</p>
82
        </div>
83
    </div>
84
</body>
- a/LayoutTests/fast/regions/wheel-scroll-abspos.html +88 lines
Line 0 a/LayoutTests/fast/regions/wheel-scroll-abspos.html_sec1
1
<!DOCTYPE html>
2
3
<style>
4
    body { font: 16px/16px monospace; }
5
6
    .region {
7
        -webkit-flow-from: flow;
8
        width: 250px;
9
        height: 55px;
10
        border: 1px solid red;
11
        padding: 2px;
12
        overflow: visible;
13
    }
14
15
    #region4 {
16
        height: auto;
17
        position: absolute;
18
        left: 330px;
19
        top: 120px;
20
        border-width: thick;
21
    }
22
23
    #container {
24
        overflow: auto; 
25
        border: 3px solid blue; 
26
        height: 100px; 
27
        padding: 10px;
28
        width: 270px;
29
    }
30
31
    #article {
32
        -webkit-flow-into: flow;
33
    }
34
35
    .inner_scroll {
36
        height: 75px;
37
        border: 2px solid green;
38
        margin: 5px;
39
        overflow: scroll;
40
        padding: 5px;
41
    }
42
43
    p {
44
        margin: 0px;
45
    }
46
</style>
47
48
<script>
49
    onload = function() {
50
        if (window.eventSender) {
51
            eventSender.mouseMoveTo(150, 230);
52
            eventSender.continuousMouseScrollBy(0, -10000);
53
            eventSender.continuousMouseScrollBy(0, -10000);
54
            eventSender.mouseMoveTo(0, 0);
55
        }
56
    }
57
</script>
58
59
<body>
60
    <div>
61
        The text passes if everything can be scrolled normally using the mouse wheel: 
62
        <ul>
63
            <li>Scrolling inside the green div should work until it reaches the end and then the blue container should scroll.</li>
64
            <li>Scrolling inside the orange div should work until it reaches the end and then the blue container should NOT scroll because the region in which the orange div is flowed is absolutely positioned</li>
65
        </ul>
66
    </div>
67
68
    <div id="container">
69
        <!-- content to be flowed in regions -->
70
        <div id="article">
71
            <p>Assume that there is enough content in the flow to fill the regions</p>
72
            <div class="inner_scroll" style="height: 30px">
73
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
74
            </div>
75
            <p>is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. </p>
76
            <div class="inner_scroll" style="border-color: orange;">
77
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
78
            </div>
79
            <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1.</p>
80
        </div>
81
82
        <!-- regions that will fragment the content -->
83
        <div class="region"></div>
84
        <div class="region"></div>
85
        <div class="region"></div>
86
        <div class="region" id="region4"></div>
87
    </div>
88
</body>
- a/LayoutTests/fast/regions/wheel-scroll-expected.html +73 lines
Line 0 a/LayoutTests/fast/regions/wheel-scroll-expected.html_sec1
1
<!DOCTYPE html>
2
3
<style>
4
    body { font: 16px/16px monospace; }
5
6
    .region {
7
        border: 1px solid red;
8
        padding: 2px;
9
        width: 450px;
10
        height: 40px;
11
    }
12
13
    #region4 {
14
        height: 308px;
15
    }
16
17
    p {
18
        margin: 0px;
19
    }
20
21
    #container {
22
        overflow: auto; 
23
        border: 3px solid blue;
24
        width: 470px;
25
        height: 250px; 
26
        padding: 30px;
27
    }
28
29
    #inner_scroll {
30
        height: 75px;
31
        border: 2px solid green;
32
        margin: 5px;
33
        overflow: scroll;
34
        padding: 5px;
35
    }
36
</style>
37
38
<script>
39
    onload = function() {
40
        if (window.eventSender) {
41
            eventSender.mouseMoveTo(100, 300);
42
            eventSender.continuousMouseScrollBy(0, -10000);
43
            eventSender.mouseMoveTo(100, 100);
44
            eventSender.continuousMouseScrollBy(0, -10000);
45
            eventSender.mouseMoveTo(0, 0);
46
        }
47
    }
48
</script>
49
50
<body>
51
    <p><b>The text passes if everything can be scrolled normally using the mouse wheel. Scrolling inside the green div should work until it reaches the end and then the blue container should scroll.</b></p></br>
52
53
    <div id="container">
54
        <div class="region">
55
            <p>Assume that there is enough content in the flow to fill the regions and the size of the </p>
56
        </div>
57
        <div class="region">
58
            <p style="margin-top: 1px">container is less than the size of regions so that the container gets vertical scrollbar.</p>
59
        </div>
60
        <div class="region">
61
            <p style="margin-top: 1px">Case1. If the mouse cursor is over the flow thread fragmented content inside a region,</p>
62
        </div>
63
        <div class="region" id="region4">
64
            <p style="margin-top: 1px">the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content.</p>
65
            <div id="inner_scroll">
66
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
67
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
68
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
69
            </div>
70
            <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2.</p>
71
        </div>
72
    </div>
73
</body>
- a/LayoutTests/fast/regions/wheel-scroll.html +76 lines
Line 0 a/LayoutTests/fast/regions/wheel-scroll.html_sec1
1
<!DOCTYPE html>
2
3
<style>
4
    body { font: 16px/16px monospace; }
5
6
    .region {
7
        -webkit-flow-from: flow;
8
        width: 450px;
9
        height: 40px;
10
        border: 1px solid red;
11
        padding: 2px;
12
    }
13
14
    #region4 {
15
        height: auto;
16
    }
17
18
    #container {
19
        overflow: auto; 
20
        border: 3px solid blue; 
21
        height: 250px; 
22
        padding: 30px;
23
        width: 470px;
24
    }
25
26
    #article {
27
        -webkit-flow-into: flow;
28
    }
29
30
    #inner_scroll {
31
        height: 75px;
32
        border: 2px solid green;
33
        margin: 5px;
34
        overflow: scroll;
35
        padding: 5px;
36
    }
37
38
    p {
39
        margin: 0px;
40
    }
41
</style>
42
43
<script>
44
    onload = function() {
45
        if (window.eventSender) {
46
            eventSender.mouseMoveTo(100, 300);
47
            eventSender.continuousMouseScrollBy(0, -10000);
48
            eventSender.mouseMoveTo(100, 100);
49
            eventSender.continuousMouseScrollBy(0, -10000);
50
            eventSender.mouseMoveTo(0, 0);
51
        }
52
    }
53
</script>
54
55
<body>
56
    <p><b>The text passes if everything can be scrolled normally using the mouse wheel. Scrolling inside the green div should work until it reaches the end and then the blue container should scroll.</b></p></br>
57
58
    <div id="container">
59
        <!-- content to be flowed in regions -->
60
        <div id="article">
61
            <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content.</p>
62
            <div id="inner_scroll">
63
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
64
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
65
                <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2. However, if the mouse is outside the flow thread content but still inside the container, then the user is able to scroll the container content. There *should be* a possibility to scroll the container content even when the mouse cursor is over the flow thread content in regions. (Case1)</p>
66
            </div>
67
            <p>Assume that there is enough content in the flow to fill the regions and the size of the container is less than the size of regions so that the container gets vertical scrollbar. Case1. If the mouse cursor is over the flow thread fragmented content inside a region, the user is unable to scroll the content inside the container. Case2.</p>
68
        </div>
69
70
        <!-- regions that will fragment the content -->
71
        <div class="region"></div>
72
        <div class="region"></div>
73
        <div class="region"></div>
74
        <div class="region" id="region4"></div>
75
    </div>
76
</body>
- a/Source/WebCore/ChangeLog +25 lines
Lines 1-3 a/Source/WebCore/ChangeLog_sec1
1
2014-01-28  Radu Stavila  <stavila@adobe.com>
2
3
        [CSSRegions] Unable to scroll a scrollable container for regions using mouse wheel
4
        https://bugs.webkit.org/show_bug.cgi?id=123886
5
6
        When an element flowed into a scrollable region is scrolled using the mouse wheel, the event 
7
        needs to be propagated to the region containing that element, on top of which the cursor
8
        is located.
9
10
        Reviewed by Antti Koivisto.
11
12
        Tests: fast/regions/wheel-scroll-abspos.html
13
               fast/regions/wheel-scroll.html
14
15
        * page/EventHandler.cpp:
16
        (WebCore::scrollNode):
17
        (WebCore::EventHandler::defaultWheelEventHandler):
18
        * rendering/RenderBox.cpp:
19
        (WebCore::RenderBox::scroll):
20
        (WebCore::RenderBox::scrollWithWheelEventLocation):
21
        * rendering/RenderBox.h:
22
        * rendering/RenderFlowThread.cpp:
23
        (WebCore::RenderFlowThread::regionFromAbsolutePointAndBox):
24
        * rendering/RenderFlowThread.h:
25
1
2014-01-29  Ryosuke Niwa  <rniwa@webkit.org>
26
2014-01-29  Ryosuke Niwa  <rniwa@webkit.org>
2
27
3
        Rename notifyRendererOfSelectionChange
28
        Rename notifyRendererOfSelectionChange
- a/Source/WebCore/page/EventHandler.cpp -4 / +5 lines
Lines 281-287 static inline ScrollGranularity wheelGranularityToScrollGranularity(unsigned del a/Source/WebCore/page/EventHandler.cpp_sec1
281
    }
281
    }
282
}
282
}
283
283
284
static inline bool scrollNode(float delta, ScrollGranularity granularity, ScrollDirection positiveDirection, ScrollDirection negativeDirection, Node* node, Element** stopElement)
284
static inline bool scrollNode(float delta, ScrollGranularity granularity, ScrollDirection positiveDirection, ScrollDirection negativeDirection, Node* node, Element** stopElement, const IntPoint& absolutePoint)
285
{
285
{
286
    if (!delta)
286
    if (!delta)
287
        return false;
287
        return false;
Lines 289-295 static inline bool scrollNode(float delta, ScrollGranularity granularity, Scroll a/Source/WebCore/page/EventHandler.cpp_sec2
289
        return false;
289
        return false;
290
    RenderBox* enclosingBox = node->renderer()->enclosingBox();
290
    RenderBox* enclosingBox = node->renderer()->enclosingBox();
291
    float absDelta = delta > 0 ? delta : -delta;
291
    float absDelta = delta > 0 ? delta : -delta;
292
    return enclosingBox->scroll(delta < 0 ? negativeDirection : positiveDirection, granularity, absDelta, stopElement);
292
293
    return enclosingBox->scrollWithWheelEventLocation(delta < 0 ? negativeDirection : positiveDirection, granularity, absDelta, enclosingBox, stopElement, absolutePoint);
293
}
294
}
294
295
295
#if (ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS))
296
#if (ENABLE(TOUCH_EVENTS) && !PLATFORM(IOS))
Lines 2612-2621 void EventHandler::defaultWheelEventHandler(Node* startNode, WheelEvent* wheelEv a/Source/WebCore/page/EventHandler.cpp_sec3
2612
    
2613
    
2613
    // Break up into two scrolls if we need to.  Diagonal movement on 
2614
    // Break up into two scrolls if we need to.  Diagonal movement on 
2614
    // a MacBook pro is an example of a 2-dimensional mouse wheel event (where both deltaX and deltaY can be set).
2615
    // a MacBook pro is an example of a 2-dimensional mouse wheel event (where both deltaX and deltaY can be set).
2615
    if (dominantDirection != DominantScrollDirectionVertical && scrollNode(wheelEvent->deltaX(), granularity, ScrollRight, ScrollLeft, startNode, &stopElement))
2616
    if (dominantDirection != DominantScrollDirectionVertical && scrollNode(wheelEvent->deltaX(), granularity, ScrollRight, ScrollLeft, startNode, &stopElement, roundedIntPoint(wheelEvent->absoluteLocation())))
2616
        wheelEvent->setDefaultHandled();
2617
        wheelEvent->setDefaultHandled();
2617
    
2618
    
2618
    if (dominantDirection != DominantScrollDirectionHorizontal && scrollNode(wheelEvent->deltaY(), granularity, ScrollDown, ScrollUp, startNode, &stopElement))
2619
    if (dominantDirection != DominantScrollDirectionHorizontal && scrollNode(wheelEvent->deltaY(), granularity, ScrollDown, ScrollUp, startNode, &stopElement, roundedIntPoint(wheelEvent->absoluteLocation())))
2619
        wheelEvent->setDefaultHandled();
2620
        wheelEvent->setDefaultHandled();
2620
    
2621
    
2621
    if (!m_latchedWheelEventElement)
2622
    if (!m_latchedWheelEventElement)
- a/Source/WebCore/rendering/RenderBox.cpp -3 / +33 lines
Lines 760-780 int RenderBox::instrinsicScrollbarLogicalWidth() const a/Source/WebCore/rendering/RenderBox.cpp_sec1
760
    return 0;
760
    return 0;
761
}
761
}
762
762
763
bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement)
763
bool RenderBox::scrollLayer(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement)
764
{
764
{
765
    RenderLayer* l = layer();
765
    RenderLayer* boxLayer = layer();
766
    if (l && l->scroll(direction, granularity, multiplier)) {
766
    if (boxLayer && boxLayer->scroll(direction, granularity, multiplier)) {
767
        if (stopElement)
767
        if (stopElement)
768
            *stopElement = element();
768
            *stopElement = element();
769
769
        return true;
770
        return true;
770
    }
771
    }
771
772
773
    return false;
774
}
775
776
bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity, float multiplier, Element** stopElement)
777
{
778
    if (scrollLayer(direction, granularity, multiplier, stopElement))
779
        return true;
780
772
    if (stopElement && *stopElement && *stopElement == element())
781
    if (stopElement && *stopElement && *stopElement == element())
773
        return true;
782
        return true;
774
783
775
    RenderBlock* b = containingBlock();
784
    RenderBlock* b = containingBlock();
776
    if (b && !b->isRenderView())
785
    if (b && !b->isRenderView())
777
        return b->scroll(direction, granularity, multiplier, stopElement);
786
        return b->scroll(direction, granularity, multiplier, stopElement);
787
788
    return false;
789
}
790
791
bool RenderBox::scrollWithWheelEventLocation(ScrollDirection direction, ScrollGranularity granularity, float multiplier, RenderBox* startBox, Element** stopElement, IntPoint absolutePoint)
792
{
793
    if (scrollLayer(direction, granularity, multiplier, stopElement))
794
        return true;
795
796
    if (stopElement && *stopElement && *stopElement == element())
797
        return true;
798
799
    RenderBlock* nextScrollBlock = containingBlock();
800
    if (nextScrollBlock && nextScrollBlock->isRenderNamedFlowThread()) {
801
        ASSERT(startBox);
802
        nextScrollBlock = toRenderFlowThread(nextScrollBlock)->regionFromAbsolutePointAndBox(absolutePoint, *startBox);
803
    }
804
805
    if (nextScrollBlock && !nextScrollBlock->isRenderView())
806
        return nextScrollBlock->scrollWithWheelEventLocation(direction, granularity, multiplier, startBox, stopElement, absolutePoint);
807
778
    return false;
808
    return false;
779
}
809
}
780
810
- a/Source/WebCore/rendering/RenderBox.h +3 lines
Lines 453-458 public: a/Source/WebCore/rendering/RenderBox.h_sec1
453
    int instrinsicScrollbarLogicalWidth() const;
453
    int instrinsicScrollbarLogicalWidth() const;
454
    int scrollbarLogicalHeight() const { return style().isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }
454
    int scrollbarLogicalHeight() const { return style().isHorizontalWritingMode() ? horizontalScrollbarHeight() : verticalScrollbarWidth(); }
455
    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
455
    virtual bool scroll(ScrollDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
456
    virtual bool scrollWithWheelEventLocation(ScrollDirection, ScrollGranularity, float multiplier, RenderBox* startBox, Element** stopElement, IntPoint absolutePoint);
456
    virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
457
    virtual bool logicalScroll(ScrollLogicalDirection, ScrollGranularity, float multiplier = 1, Element** stopElement = 0);
457
    bool canBeScrolledAndHasScrollableArea() const;
458
    bool canBeScrolledAndHasScrollableArea() const;
458
    virtual bool canBeProgramaticallyScrolled() const;
459
    virtual bool canBeProgramaticallyScrolled() const;
Lines 657-662 private: a/Source/WebCore/rendering/RenderBox.h_sec2
657
    void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const RenderStyle* oldStyle);
658
    void updateShapeOutsideInfoAfterStyleChange(const RenderStyle&, const RenderStyle* oldStyle);
658
#endif
659
#endif
659
660
661
    bool scrollLayer(ScrollDirection, ScrollGranularity, float multiplier, Element** stopElement);
662
660
    bool fixedElementLaysOutRelativeToFrame(const FrameView&) const;
663
    bool fixedElementLaysOutRelativeToFrame(const FrameView&) const;
661
664
662
    bool includeVerticalScrollbarSize() const;
665
    bool includeVerticalScrollbarSize() const;
- a/Source/WebCore/rendering/RenderFlowThread.cpp -1 / +23 lines
Lines 460-466 RenderRegion* RenderFlowThread::regionAtBlockOffset(const RenderBox* clampBox, L a/Source/WebCore/rendering/RenderFlowThread.cpp_sec1
460
        return region;
460
        return region;
461
    return region ? clampBox->clampToStartAndEndRegions(region) : 0;
461
    return region ? clampBox->clampToStartAndEndRegions(region) : 0;
462
}
462
}
463
    
463
464
RenderRegion* RenderFlowThread::regionFromAbsolutePointAndBox(const IntPoint& absolutePoint, const RenderBox& flowedBox)
465
{
466
    RenderRegion* startRegion = nullptr;
467
    RenderRegion* endRegion = nullptr;
468
    getRegionRangeForBox(&flowedBox, startRegion, endRegion);
469
470
    if (!startRegion)
471
        return nullptr;
472
473
    for (auto iter = m_regionList.find(startRegion), end = m_regionList.end(); iter != end; ++iter) {
474
        RenderRegion* region = *iter;
475
        IntRect regionAbsoluteRect(roundedIntPoint(region->localToAbsolute()), roundedIntSize(region->frameRect().size()));
476
        if (regionAbsoluteRect.contains(absolutePoint))
477
            return region;
478
479
        if (region == endRegion)
480
            break;
481
    }
482
483
    return nullptr;
484
}
485
464
LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const RenderBoxModelObject& boxModelObject, const LayoutPoint& startPoint)
486
LayoutPoint RenderFlowThread::adjustedPositionRelativeToOffsetParent(const RenderBoxModelObject& boxModelObject, const LayoutPoint& startPoint)
465
{
487
{
466
    LayoutPoint referencePoint = startPoint;
488
    LayoutPoint referencePoint = startPoint;
- a/Source/WebCore/rendering/RenderFlowThread.h +2 lines
Lines 115-120 public: a/Source/WebCore/rendering/RenderFlowThread.h_sec1
115
115
116
    RenderRegion* regionAtBlockOffset(const RenderBox*, LayoutUnit, bool extendLastRegion = false, RegionAutoGenerationPolicy = AllowRegionAutoGeneration);
116
    RenderRegion* regionAtBlockOffset(const RenderBox*, LayoutUnit, bool extendLastRegion = false, RegionAutoGenerationPolicy = AllowRegionAutoGeneration);
117
117
118
    RenderRegion* regionFromAbsolutePointAndBox(const IntPoint&, const RenderBox& flowedBox);
119
118
    bool regionsHaveUniformLogicalWidth() const { return m_regionsHaveUniformLogicalWidth; }
120
    bool regionsHaveUniformLogicalWidth() const { return m_regionsHaveUniformLogicalWidth; }
119
    bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLogicalHeight; }
121
    bool regionsHaveUniformLogicalHeight() const { return m_regionsHaveUniformLogicalHeight; }
120
122

Return to Bug 123886