|
|
Created:
4 years, 11 months ago by skobes Modified:
4 years, 11 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, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse "\uFEFF" instead of "." in WebInspector.ViewportControl's gap elements.
When the gap elements have height:0px, the "." text contributes to the
container's height, which produces strange effects during scrolling.
BUG=579444
Committed: https://crrev.com/2708759cc0028611c97f12a2adeb424c0747f6c4
Cr-Commit-Position: refs/heads/master@{#370878}
Patch Set 1 : #
Total comments: 4
Messages
Total messages: 16 (7 generated)
Patchset #1 (id:1) has been deleted
Description was changed from ========== Don't set text content of gap elements in WebInspector.ViewportControl. When the gap elements have height:0px, the text contributes to the container's height, which is not intended and produces strange effects during scrolling. It's also unclear why these elements need text in the first place. BUG=579444 ========== to ========== Use "\uFEFF" instead of "." in WebInspector.ViewportControl's gap elements. When the gap elements have height:0px, the "." text contributes to the container's height, which produces strange effects during scrolling. BUG=579444 ==========
skobes@chromium.org changed reviewers: + lushnikov@chromium.org
pfeldman@chromium.org changed reviewers: + pfeldman@chromium.org
https://codereview.chromium.org/1613703004/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js (left): https://codereview.chromium.org/1613703004/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js:40: this._topGapElement.textContent = "."; lushnikov@ says that "." was here to render selection that spans beyond the viewport prettier. and it seems it is no longer needed - either new selection rendering helped or other things changed over time. https://codereview.chromium.org/1613703004/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js:41: this._topGapElement.style.height = "0px"; how come it contributes to the height? - it has zero height.
https://codereview.chromium.org/1613703004/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js (left): https://codereview.chromium.org/1613703004/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js:40: this._topGapElement.textContent = "."; On 2016/01/22 01:37:34, pfeldman wrote: > lushnikov@ says that "." was here to render selection that spans beyond the > viewport prettier. and it seems it is no longer needed - either new selection > rendering helped or other things changed over time. I first tried eliminating the text content but inspector/console/console-viewport-selection.html failed. I think the range.intersectsNode calls in _updateSelectionModel depend on having non-empty text content. https://codereview.chromium.org/1613703004/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js:41: this._topGapElement.style.height = "0px"; On 2016/01/22 01:37:34, pfeldman wrote: > how come it contributes to the height? - it has zero height. The text content produces overflow which contributes to the container's height. Example: https://jsbin.com/zisowo/edit?html,output
> The text content produces overflow which contributes to the container's height. > Example: https://jsbin.com/zisowo/edit?html,output Is this scroll-specific behavior? Because it does not contribute to the container's height in this simple case: <div> <div style="height: 0;">A</div> <div style="height: 0;">B</div> </div>
On 2016/01/22 01:59:14, pfeldman wrote: > > The text content produces overflow which contributes to the container's > height. > > Example: https://jsbin.com/zisowo/edit?html,output > > Is this scroll-specific behavior? Because it does not contribute to the > container's height in this simple case: > > <div> > <div style="height: 0;">A</div> > <div style="height: 0;">B</div> > </div> There are multiple notions of height in layout. It won't contribute to element.offsetHeight, but it contributes to the height of the "layout overflow" returned by LayoutBox::layoutOverflowRect().
lgtm Thanks for following up and explanations.
The CQ bit was checked by skobes@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1613703004/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1613703004/20001
Message was sent while issue was closed.
Description was changed from ========== Use "\uFEFF" instead of "." in WebInspector.ViewportControl's gap elements. When the gap elements have height:0px, the "." text contributes to the container's height, which produces strange effects during scrolling. BUG=579444 ========== to ========== Use "\uFEFF" instead of "." in WebInspector.ViewportControl's gap elements. When the gap elements have height:0px, the "." text contributes to the container's height, which produces strange effects during scrolling. BUG=579444 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Use "\uFEFF" instead of "." in WebInspector.ViewportControl's gap elements. When the gap elements have height:0px, the "." text contributes to the container's height, which produces strange effects during scrolling. BUG=579444 ========== to ========== Use "\uFEFF" instead of "." in WebInspector.ViewportControl's gap elements. When the gap elements have height:0px, the "." text contributes to the container's height, which produces strange effects during scrolling. BUG=579444 Committed: https://crrev.com/2708759cc0028611c97f12a2adeb424c0747f6c4 Cr-Commit-Position: refs/heads/master@{#370878} ==========
Message was sent while issue was closed.
Patchset 1 (id:??) landed as https://crrev.com/2708759cc0028611c97f12a2adeb424c0747f6c4 Cr-Commit-Position: refs/heads/master@{#370878} |