Modified: trunk/Source/WebCore/ChangeLog (108355 => 108356)
--- trunk/Source/WebCore/ChangeLog 2012-02-21 16:14:19 UTC (rev 108355)
+++ trunk/Source/WebCore/ChangeLog 2012-02-21 16:17:03 UTC (rev 108356)
@@ -1,3 +1,19 @@
+2012-02-21 Alexander Pavlov <[email protected]>
+
+ Web Inspector: [SuggestBox] textPrompt.css disablement displays garbled suggest box
+ https://bugs.webkit.org/show_bug.cgi?id=79107
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/TextPrompt.js:
+ (WebInspector.TextPrompt.SuggestBox):
+ (WebInspector.TextPrompt.SuggestBox.prototype.get visible):
+ (WebInspector.TextPrompt.SuggestBox.prototype.hide):
+ (WebInspector.TextPrompt.SuggestBox.prototype.removeFromElement):
+ (WebInspector.TextPrompt.SuggestBox.prototype._completionsReady):
+ * inspector/front-end/textPrompt.css:
+ (.suggest-box):
+
2012-02-21 Yury Semikhatsky <[email protected]>
Web Inspector: timeline hangs on a page with deep chain of nested events.
Modified: trunk/Source/WebCore/inspector/front-end/TextPrompt.js (108355 => 108356)
--- trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2012-02-21 16:14:19 UTC (rev 108355)
+++ trunk/Source/WebCore/inspector/front-end/TextPrompt.js 2012-02-21 16:17:03 UTC (rev 108356)
@@ -927,8 +927,9 @@
window.addEventListener("scroll", this._boundOnScroll, true);
window.addEventListener("resize", this._boundOnResize, true);
- var bodyElement = inputElement.ownerDocument.body;
- this._element = bodyElement.createChild("div", "suggest-box " + (className || ""));
+ this._bodyElement = inputElement.ownerDocument.body;
+ this._element = inputElement.ownerDocument.createElement("div");
+ this._element.className = "suggest-box " + (className || "");
this._element.addEventListener("mousedown", this._onboxmousedown.bind(this), true);
this.containerElement = this._element.createChild("div", "container");
this.contentElement = this.containerElement.createChild("div", "content");
@@ -937,7 +938,7 @@
WebInspector.TextPrompt.SuggestBox.prototype = {
get visible()
{
- return this._element.hasStyleClass("visible");
+ return !!this._element.parentElement;
},
get hasSelection()
@@ -1020,7 +1021,7 @@
if (!this.visible)
return;
- this._element.removeStyleClass("visible");
+ this._element.parentElement.removeChild(this._element);
delete this._selectedElement;
},
@@ -1028,7 +1029,7 @@
{
window.removeEventListener("scroll", this._boundOnScroll, true);
window.removeEventListener("resize", this._boundOnResize, true);
- this._element.parentElement.removeChild(this._element);
+ this.hide();
},
/**
@@ -1225,7 +1226,8 @@
if (this._canShowBox(completions, canShowForSingleItem)) {
this._updateItems(completions, canShowForSingleItem);
this._updateBoxPosition(anchorBox);
- this._element.addStyleClass("visible");
+ if (!this.visible)
+ this._bodyElement.appendChild(this._element);
this._rememberRowCountPerViewport();
} else
this.hide();
Modified: trunk/Source/WebCore/inspector/front-end/textPrompt.css (108355 => 108356)
--- trunk/Source/WebCore/inspector/front-end/textPrompt.css 2012-02-21 16:14:19 UTC (rev 108355)
+++ trunk/Source/WebCore/inspector/front-end/textPrompt.css 2012-02-21 16:17:03 UTC (rev 108356)
@@ -31,16 +31,12 @@
.suggest-box {
position: absolute;
background-color: #FFFFFF;
- display: none;
+ display: block;
border: 1px solid black;
padding: 2px;
z-index: 100;
}
-.suggest-box.visible {
- display: block;
-}
-
.suggest-box .container {
position: absolute;
top: 0;