Title: [228654] releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI
Revision
228654
Author
carlo...@webkit.org
Date
2018-02-19 03:50:37 -0800 (Mon, 19 Feb 2018)

Log Message

Merge r228232 - Web Inspector: Styles: completion popover doesn't hide when switching panels
https://bugs.webkit.org/show_bug.cgi?id=182464
<rdar://problem/37202763>

Reviewed by Timothy Hatcher.

Hide completion popover by triggering blur event on the focused text field.
Removing text fields from the DOM tree would hide the completion popovers as well,
but switching sidebar panels doesn't remove them from the DOM.

* UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
(WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
* UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
(WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
* UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
(WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
* UserInterface/Views/SpreadsheetStyleProperty.js:
(WI.SpreadsheetStyleProperty.prototype.hidden):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/ChangeLog (228653 => 228654)


--- releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/ChangeLog	2018-02-19 11:50:32 UTC (rev 228653)
+++ releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/ChangeLog	2018-02-19 11:50:37 UTC (rev 228654)
@@ -1,3 +1,24 @@
+2018-02-07  Nikita Vasilyev  <nvasil...@apple.com>
+
+        Web Inspector: Styles: completion popover doesn't hide when switching panels
+        https://bugs.webkit.org/show_bug.cgi?id=182464
+        <rdar://problem/37202763>
+
+        Reviewed by Timothy Hatcher.
+
+        Hide completion popover by triggering blur event on the focused text field.
+        Removing text fields from the DOM tree would hide the completion popovers as well,
+        but switching sidebar panels doesn't remove them from the DOM.
+
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js:
+        (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.hidden):
+        * UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js:
+        (WI.SpreadsheetCSSStyleDeclarationSection.prototype.hidden):
+        * UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js:
+        (WI.SpreadsheetRulesStyleDetailsPanel.prototype.hidden):
+        * UserInterface/Views/SpreadsheetStyleProperty.js:
+        (WI.SpreadsheetStyleProperty.prototype.hidden):
+
 2018-02-06  Nikita Vasilyev  <nvasil...@apple.com>
 
         Web Inspector: Rename String.prototype.trimEnd to avoid conflicts with native trimEnd

Modified: releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js (228653 => 228654)


--- releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js	2018-02-19 11:50:32 UTC (rev 228653)
+++ releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js	2018-02-19 11:50:37 UTC (rev 228654)
@@ -105,6 +105,12 @@
             propertyView.detached();
     }
 
+    hidden()
+    {
+        for (let propertyView of this._propertyViews)
+            propertyView.hidden();
+    }
+
     get style()
     {
         return this._style;

Modified: releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js (228653 => 228654)


--- releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2018-02-19 11:50:32 UTC (rev 228653)
+++ releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection.js	2018-02-19 11:50:37 UTC (rev 228654)
@@ -119,6 +119,11 @@
             this.startEditingRuleSelector();
     }
 
+    hidden()
+    {
+        this._propertiesEditor.hidden();
+    }
+
     startEditingRuleSelector()
     {
         if (!this._selectorElement) {

Modified: releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js (228653 => 228654)


--- releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js	2018-02-19 11:50:32 UTC (rev 228653)
+++ releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetRulesStyleDetailsPanel.js	2018-02-19 11:50:37 UTC (rev 228654)
@@ -147,6 +147,14 @@
         super.refresh(significantChange);
     }
 
+    hidden()
+    {
+        for (let section of this._sections)
+            section.hidden();
+
+        super.hidden();
+    }
+
     scrollToSectionAndHighlightProperty(property)
     {
         if (!this._visible) {

Modified: releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js (228653 => 228654)


--- releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2018-02-19 11:50:32 UTC (rev 228653)
+++ releases/WebKitGTK/webkit-2.20/Source/WebInspectorUI/UserInterface/Views/SpreadsheetStyleProperty.js	2018-02-19 11:50:37 UTC (rev 228654)
@@ -74,6 +74,14 @@
             this._valueTextField.detached();
     }
 
+    hidden()
+    {
+        if (this._nameTextField && this._nameTextField.editing)
+            this._nameTextField.element.blur();
+        else if (this._valueTextField && this._valueTextField.editing)
+            this._valueTextField.element.blur();
+    }
+
     highlight()
     {
         this._element.classList.add("highlighted");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to