Closed
Bug 1082098
Opened 7 years ago
Closed 7 years ago
Unable to dynamically change scroll-behavior property
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: kip, Assigned: kip)
References
Details
Attachments
(2 files, 3 obsolete files)
Dynamic changes to the scroll-behavior property on html/body after pageload don't have an effect on whether anchor scrolling is smooth.
Assignee | ||
Comment 1•7 years ago
|
||
Please see Bug 1010538 Comment 103
Assignee | ||
Comment 2•7 years ago
|
||
- When the scroll-behavior CSS value changed, the nsChangeHint_NeutralChange hint was returned by nsStyleDisplay::CalcDifference. It now returns nsChangeHint_ReconstructFrame to ensure that the change takes effect. A part2 patch will be added with a test.
Assignee | ||
Comment 3•7 years ago
|
||
- scroll-behavior-8.html - Tests if dynamically changing the scroll-behavior css property on a div element takes effect after the page has been painted and reflowed. - scroll-behavior-9.html - Tests if dynamically changing the scroll-behavior on the body element takes effect after the page has been painted and reflowed.
Attachment #8510727 -
Flags: review?(roc)
Assignee | ||
Comment 4•7 years ago
|
||
- When the scroll-behavior CSS value changed, the nsChangeHint_NeutralChange hint was returned by nsStyleDisplay::CalcDifference. It now returns nsChangeHint_ReconstructFrame to ensure that the change takes effect. V2 Patch: - Adjusted commit message
Attachment #8510615 -
Attachment is obsolete: true
Attachment #8510730 -
Flags: review?(roc)
Attachment #8510727 -
Flags: review?(roc) → review+
Comment on attachment 8510730 [details] [diff] [review] Bug 1082098: Part 1 - Return correct change hint when scroll-behavior CSS value changes (V2 Patch) Review of attachment 8510730 [details] [diff] [review]: ----------------------------------------------------------------- This is OK, but I don't understand why it's needed. Can you explain?
Attachment #8510730 -
Flags: review?(roc)
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #5) > Comment on attachment 8510730 [details] [diff] [review] > Bug 1082098: Part 1 - Return correct change hint when scroll-behavior CSS > value changes (V2 Patch) > > Review of attachment 8510730 [details] [diff] [review]: > ----------------------------------------------------------------- > > This is OK, but I don't understand why it's needed. Can you explain? When scroll-behavior is changed, the nsChangeHint_NeutralChange was not sufficient to enter nsCSSFrameConstructor::PropagateScrollToViewport. By using the same hint as used when the overflow css property changes, nsChangeHint_ReconstructFrame, PropagateScrollToViewport will be called. The scroll-behavior css property is not expected to change often (the CSSOM-View DOM methods are likely to be used in those cases); however, if this does become common perhaps a faster-path might be worth while.
Assignee | ||
Comment 7•7 years ago
|
||
Pushed to try: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ca029b711a26
Assignee | ||
Comment 8•7 years ago
|
||
(In reply to :kip (Kearwood Gilbert) from comment #7) > Pushed to try: > > https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=ca029b711a26 Try is green...
Assignee | ||
Comment 9•7 years ago
|
||
(In reply to :kip (Kearwood Gilbert) from comment #6) > (In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #5) > > Comment on attachment 8510730 [details] [diff] [review] > > Bug 1082098: Part 1 - Return correct change hint when scroll-behavior CSS > > value changes (V2 Patch) > > > > Review of attachment 8510730 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > This is OK, but I don't understand why it's needed. Can you explain? > When scroll-behavior is changed, the nsChangeHint_NeutralChange was not > sufficient to enter nsCSSFrameConstructor::PropagateScrollToViewport. By > using the same hint as used when the overflow css property changes, > nsChangeHint_ReconstructFrame, PropagateScrollToViewport will be called. > > The scroll-behavior css property is not expected to change often (the > CSSOM-View DOM methods are likely to be used in those cases); however, if > this does become common perhaps a faster-path might be worth while. Missed the needinfo flag, adding it.
Flags: needinfo?(roc)
Comment on attachment 8510730 [details] [diff] [review] Bug 1082098: Part 1 - Return correct change hint when scroll-behavior CSS value changes (V2 Patch) Review of attachment 8510730 [details] [diff] [review]: ----------------------------------------------------------------- Please add a comment with your explanation of why this is needed.
Attachment #8510730 -
Flags: review+
Flags: needinfo?(roc)
Assignee | ||
Comment 11•7 years ago
|
||
- When the scroll-behavior CSS value changed, the nsChangeHint_NeutralChange hint was returned by nsStyleDisplay::CalcDifference. It now returns nsChangeHint_ReconstructFrame to ensure that the change takes effect. - When scroll-behavior is changed, the nsChangeHint_NeutralChange was not sufficient to enter nsCSSFrameConstructor::PropagateScrollToViewport. By using the same hint as used when the overflow css property changes, nsChangeHint_ReconstructFrame, PropagateScrollToViewport will be called. - The scroll-behavior css property is not expected to change often (the CSSOM-View DOM methods are likely to be used in those cases); however, if this does become common perhaps a faster-path might be worth while. V3 Patch - Added comment to commit message and code documenting why the nsChangeHint_ReconstructFrame is returned for scroll-behavior changes.
Attachment #8510730 -
Attachment is obsolete: true
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 12•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6cd46e671a9d https://hg.mozilla.org/integration/mozilla-inbound/rev/af957b6bf421
Keywords: checkin-needed
Comment 13•7 years ago
|
||
sorry had to back this out for test failures like https://treeherder.mozilla.org/ui/logviewer.html#?job_id=3389325&repo=mozilla-inbound
Assignee | ||
Comment 14•7 years ago
|
||
- scroll-behavior-8.html - Tests if dynamically changing the scroll-behavior css property on a div element takes effect after the page has been painted and reflowed. - scroll-behavior-9.html - Tests if dynamically changing the scroll-behavior on the body element takes effect after the page has been painted and reflowed. V2 Patch: - Increased the size of the scroll boxes to correct reftest failures on Windows XP. Reftest failures were due to inconsistent rendering of scrollbar drag handles when size of scroll box was exactly at the previous size.
Attachment #8510727 -
Attachment is obsolete: true
Assignee | ||
Comment 15•7 years ago
|
||
Pushed to try to re-test the reftest that had failed on Windows XP: https://treeherder.mozilla.org/ui/#/jobs?repo=try&revision=03651297787e (Came back green)
Assignee | ||
Comment 16•7 years ago
|
||
Comment on attachment 8513830 [details] [diff] [review] Bug 1082098: Part 2 - Tests (V2 Patch) Increased the size of the scroll boxes to accommodate rendering of Windows XP scroll bar drag handles. Need to review?
Attachment #8513830 -
Flags: review?(roc)
Attachment #8513830 -
Flags: review?(roc) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 17•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/07daf18bf013 https://hg.mozilla.org/integration/mozilla-inbound/rev/c13d91ae9f04
Keywords: checkin-needed
Comment 18•7 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/07daf18bf013 https://hg.mozilla.org/mozilla-central/rev/c13d91ae9f04
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in
before you can comment on or make changes to this bug.
Description
•