Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js b/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js |
| index f1267fdb0aabc89492c21bdfa9f104a2831b86bb..ddb8a45fa8832a4ac66bf23f832ebf1435d421b1 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js |
| @@ -37,15 +37,18 @@ WebInspector.ViewportControl = function(provider) |
| this.element = createElement("div"); |
| this.element.style.overflow = "auto"; |
| this._topGapElement = this.element.createChild("div"); |
| - this._topGapElement.textContent = "."; |
|
pfeldman
2016/01/22 01:37:34
lushnikov@ says that "." was here to render select
skobes
2016/01/22 01:51:53
I first tried eliminating the text content but ins
|
| this._topGapElement.style.height = "0px"; |
|
pfeldman
2016/01/22 01:37:34
how come it contributes to the height? - it has ze
skobes
2016/01/22 01:51:53
The text content produces overflow which contribut
|
| this._topGapElement.style.color = "transparent"; |
| this._contentElement = this.element.createChild("div"); |
| this._bottomGapElement = this.element.createChild("div"); |
| - this._bottomGapElement.textContent = "."; |
| this._bottomGapElement.style.height = "0px"; |
| this._bottomGapElement.style.color = "transparent"; |
| + // Text content needed for range intersection checks in _updateSelectionModel. |
| + // Use Unicode ZERO WIDTH NO-BREAK SPACE, which avoids contributing any height to the element's layout overflow. |
| + this._topGapElement.textContent = "\uFEFF"; |
| + this._bottomGapElement.textContent = "\uFEFF"; |
| + |
| this._provider = provider; |
| this.element.addEventListener("scroll", this._onScroll.bind(this), false); |
| this.element.addEventListener("copy", this._onCopy.bind(this), false); |