|
|
Created:
4 years, 3 months ago by skobes Modified:
4 years, 3 months ago CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org, ojan Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix console viewport test failures with scroll anchoring.
Update defaultConsoleRowHeight to account for the 1px border, and grow a visible
item instead of an offscreen one when testing setStickToBottom.
See bug for detailed analysis.
BUG=624534
Committed: https://crrev.com/9f69ce15656df3f06add00f591f68e36348027f6
Cr-Commit-Position: refs/heads/master@{#418681}
Patch Set 1 #Patch Set 2 : Add comment. #
Total comments: 6
Messages
Total messages: 29 (16 generated)
The CQ bit was checked by skobes@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
skobes@chromium.org changed reviewers: + dgozman@chromium.org, ymalik@chromium.org
dgozman@chromium.org changed reviewers: + luoe@chromium.org, lushnikov@chromium.org
Over to lushnikov/luoe.
Description was changed from ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for padding in #console-prompt, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 ========== to ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for padding in .console-message, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/09/09 22:57:44, dgozman wrote: > Over to lushnikov/luoe. The reasoning in the bug, comment #13 looks sound to me. That extra 1px likely comes from the border-bottom on console-message-wrapper. Since the 19px value is no longer synced with consoleView.css, I would update the comment to reflect this change. Otherwise, LGTM!
Description was changed from ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for padding in .console-message, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 ========== to ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for the 1px border, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 ==========
On 2016/09/12 17:56:59, luoe wrote: > The reasoning in the bug, comment #13 looks sound to me. That extra 1px likely > comes from the border-bottom on console-message-wrapper. > > Since the 19px value is no longer synced with consoleView.css, I would update > the comment to reflect this change. Otherwise, LGTM! Updated comment.
https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:91: viewport._contentElement.lastChild.innerText = "More than 2 lines: foo\n\nbar"; how does scroll anchoring picks a node to anchor? Consider the following scenario: 1. log window object in console 2. log multiple messages after window object: for (var i = 0; i < 100; ++i) console.log(i); 3. expand window object Expected: scroll didn't change
https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:91: viewport._contentElement.lastChild.innerText = "More than 2 lines: foo\n\nbar"; On 2016/09/12 20:18:39, lushnikov wrote: > how does scroll anchoring picks a node to anchor? > Consider the following scenario: > > 1. log window object in console > 2. log multiple messages after window object: for (var i = 0; i < 100; ++i) > console.log(i); > 3. expand window object > > Expected: scroll didn't change Roughly, it will pick the first visible element. If the window object is inside the viewport when it is expanded, the scroll position won't change.
The CQ bit was checked by skobes@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:91: viewport._contentElement.lastChild.innerText = "More than 2 lines: foo\n\nbar"; I still don't understand how the change helps to make the test pass. Does scroll anchoring pick the first non-modified node?
https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:91: viewport._contentElement.lastChild.innerText = "More than 2 lines: foo\n\nbar"; skobes@, on second thought, I'm a bit uncertain, too. When the first visible message is the anchor and an unseen message above it grows, the content moves down and anchoring *would jump down with it. However, SANACLAP should suppress the snap because the content height changes, so it won't jump. Then, we are no longer at the bottom and the test should pass. Is this the case?
https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html (right): https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:91: viewport._contentElement.lastChild.innerText = "More than 2 lines: foo\n\nbar"; On 2016/09/13 01:30:38, luoe wrote: > When the first visible message is the anchor and an unseen message above it > grows, the content moves down and anchoring *would jump down with it. However, > SANACLAP should suppress the snap because the content height changes, so it > won't jump. Then, we are no longer at the bottom and the test should pass. SANACLAP doesn't trigger because no CSS properties have changed, except on the gap top and bottom gap elements which are not ancestors of the anchor node. https://codereview.chromium.org/2317343006/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html:91: viewport._contentElement.lastChild.innerText = "More than 2 lines: foo\n\nbar"; On 2016/09/13 00:09:21, lushnikov wrote: > I still don't understand how the change helps to make the test pass. Does scroll > anchoring pick the first non-modified node? What I observe is that when we set innerText for the second time (on line 97), the content element has 13 children (log messages) but the first seven of these are above the viewport. So, we anchor inside viewport._contentElement.children[7], which moves down if a preceding message is modified. I'm not sure exactly why the first seven messages are above the viewport at this point.
got it, lgtm
The CQ bit was checked by skobes@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from luoe@chromium.org Link to the patchset: https://codereview.chromium.org/2317343006/#ps20001 (title: "Add comment.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for the 1px border, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 ========== to ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for the 1px border, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for the 1px border, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 ========== to ========== Fix console viewport test failures with scroll anchoring. Update defaultConsoleRowHeight to account for the 1px border, and grow a visible item instead of an offscreen one when testing setStickToBottom. See bug for detailed analysis. BUG=624534 Committed: https://crrev.com/9f69ce15656df3f06add00f591f68e36348027f6 Cr-Commit-Position: refs/heads/master@{#418681} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/9f69ce15656df3f06add00f591f68e36348027f6 Cr-Commit-Position: refs/heads/master@{#418681} |