Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1276)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/ViewportControl.js

Issue 1613703004: Use "\uFEFF" instead of "." in WebInspector.ViewportControl's gap elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698