[Webkit-unassigned] [Bug 146953] Negative scroll snap repeat values cause web process to hang indefinitely

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jul 14 18:43:10 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=146953

Simon Fraser (smfr) <simon.fraser at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #256816|review?                     |review+, commit-queue-
              Flags|                            |

--- Comment #3 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 256816
  --> https://bugs.webkit.org/attachment.cgi?id=256816
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=256816&action=review

> Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp:90
> +    LayoutUnit repeatOffset = points ? valueForLength(points->repeatOffset, viewSize) : LayoutUnit(1.0f);

LayoutUnit(1.0f) should be LayoutUnit::fromPixel(1)

> Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp:92
> +    if (repeatOffset.toFloat() < 1.0f)
> +        repeatOffset = LayoutUnit(1.0f);

repeatOffset = std::min<LayoutUnit>(repeatOffset, 1);

> LayoutTests/css3/scroll-snap/scroll-snap-negative-repeat.html:39
> +        <style>
> +            #gallery {
> +                height: 400px;
> +                width: 400px;
> +                overflow-x: hidden;
> +                overflow-y: auto;
> +                -webkit-overflow-scrolling: touch;
> +                -webkit-scroll-snap-type: mandatory;
> +                -webkit-scroll-snap-points-y: repeat(-400px);
> +                margin: 0;
> +                padding: 0;
> +            }
> +
> +            .colorBox {
> +                width: 400px;
> +                height: 400px;
> +            }
> +
> +            #item0 { background-color: red; }
> +            #item1 { background-color: green; }
> +            #item2 { background-color: blue; }
> +            #item3 { background-color: aqua; }
> +            #item4 { background-color: yellow; }
> +            #item5 { background-color: fuchsia; }
> +        </style>
> +        <script src="../../resources/js-test-pre.js"></script>
> +    </head>
> +    <body>
> +        <div id="gallery">
> +            <div id="item0" class="colorBox"></div>
> +            <div id="item1" class="colorBox"></div>
> +            <div id="item2" class="colorBox"></div>
> +            <div id="item3" class="colorBox"></div>
> +            <div id="item4" class="colorBox"></div>
> +            <div id="item5" class="colorBox"></div>
> +        </div>

Not sure that any of this is needed. Can't you just have body { -webkit-scroll-snap-type: mandatory; -webkit-scroll-snap-points-y: repeat(-400px); }

> LayoutTests/css3/scroll-snap/scroll-snap-subpixel-repeat.html:10
> +                -webkit-overflow-scrolling: touch;

Remove this.

> LayoutTests/css3/scroll-snap/scroll-snap-subpixel-repeat.html:34
> +                testRunner.waitUntilDone();

Not sure why the test needs to be async.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150715/6e0fdce2/attachment.html>


More information about the webkit-unassigned mailing list