| Summary: | CSS scroll snap: defining snap points on axis that does not scroll does not work properly | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Brent Fulgham <bfulgham> | ||||||||||
| Component: | Layout and Rendering | Assignee: | Brent Fulgham <bfulgham> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | bfulgham, buildbot, cmarcelo, commit-queue, jamesr, jonlee, luiz, rniwa, simon.fraser, tonikitoo, webkit-bug-importer | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | 528+ (Nightly build) | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Brent Fulgham
2015-06-16 20:46:00 PDT
Created attachment 254999 [details]
Patch
Comment on attachment 254999 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254999&action=review > Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp:119 > + if (snapOffsets.size() == 1 && !snapOffsets.first()) { > + snapOffsets.clear(); > + return; > + } Doesn't this miss the case where the content has a valid offset at 0? > LayoutTests/css3/scroll-snap/scroll-snap-mismatch.html:43 > + debug("Scroll-snap offsets for 'badHorizontalTarget': " + window.internals.scrollSnapOffsets(badHorizontalTarget)); > + > + var horizontalTarget = document.getElementById('horizontalTarget'); > + debug("Scroll-snap offsets for 'horizontalTarget': " + window.internals.scrollSnapOffsets(horizontalTarget)); I don't think you should really use debug() for actual output. You should be using shouldBe(). Comment on attachment 254999 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254999&action=review >> Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp:119 >> + } > > Doesn't this miss the case where the content has a valid offset at 0? I guess you could have some poorly authored markup where you really did specify a single offset at 0. I'll revise this to handle that case -- though the end result will be the gross behavior Jon found. >> LayoutTests/css3/scroll-snap/scroll-snap-mismatch.html:43 >> + debug("Scroll-snap offsets for 'horizontalTarget': " + window.internals.scrollSnapOffsets(horizontalTarget)); > > I don't think you should really use debug() for actual output. You should be using shouldBe(). Oh! I'll switch to that. Created attachment 255022 [details]
Patch
Comment on attachment 255022 [details] Patch Attachment 255022 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5163604022132736 New failing tests: css3/scroll-snap/scroll-snap-mismatch.html Created attachment 255025 [details]
Archive of layout-test-results from ews100 for mac-mavericks
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100 Port: mac-mavericks Platform: Mac OS X 10.9.5
Comment on attachment 255022 [details] Patch Attachment 255022 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/6072427691900928 New failing tests: css3/scroll-snap/scroll-snap-mismatch.html Created attachment 255026 [details]
Archive of layout-test-results from ews105 for mac-mavericks-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
(In reply to comment #9) > Created attachment 255026 [details] > Archive of layout-test-results from ews105 for mac-mavericks-wk2 > > The attached test failures were seen while running run-webkit-tests on the > mac-wk2-ews. > Bot: ews105 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5 I used improper syntax for "shouldBe()". I'll fix while landing. Committed r185658: <http://trac.webkit.org/changeset/185658> |