Web Inspector: Flash views with red outline on initial layout
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2018 03:26:57 +0000 (03:26 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Oct 2018 03:26:57 +0000 (03:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191048

Reviewed by Devin Rousso.

* UserInterface/Views/View.js:
(WI.View.prototype._layoutSubtree):
(WI.View.prototype._drawLayoutFlashingOutline):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/View.js

index e377075..8f47d5f 100644 (file)
@@ -1,3 +1,14 @@
+2018-10-29  Nikita Vasilyev  <nvasilyev@apple.com>
+
+        Web Inspector: Flash views with red outline on initial layout
+        https://bugs.webkit.org/show_bug.cgi?id=191048
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/View.js:
+        (WI.View.prototype._layoutSubtree):
+        (WI.View.prototype._drawLayoutFlashingOutline):
+
 2018-10-29  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Canvas: show warning when path moves offscreen
index 96b3c3f..ce64d01 100644 (file)
@@ -266,6 +266,7 @@ WI.View = class View extends WI.Object
     {
         this._dirty = false;
         this._dirtyDescendantsCount = 0;
+        let isInitialLayout = !this._didInitialLayout;
 
         if (!this._didInitialLayout) {
             this.initialLayout();
@@ -278,7 +279,7 @@ WI.View = class View extends WI.Object
         this.layout();
 
         if (WI.settings.enableLayoutFlashing.value)
-            this._drawLayoutFlashingOutline();
+            this._drawLayoutFlashingOutline(isInitialLayout);
 
         for (let view of this._subviews) {
             view._setLayoutReason(this._layoutReason);
@@ -296,14 +297,15 @@ WI.View = class View extends WI.Object
         this._layoutReason = layoutReason || WI.View.LayoutReason.Dirty;
     }
 
-    _drawLayoutFlashingOutline()
+    _drawLayoutFlashingOutline(isInitialLayout)
     {
         if (this._layoutFlashingTimeout)
             clearTimeout(this._layoutFlashingTimeout);
         else
             this._layoutFlashingPreviousOutline = this._element.style.outline;
 
-        this._element.style.outline = "1px solid hsla(39, 100%, 51%, 0.8)";
+        let hue = isInitialLayout ? 20 : 40;
+        this._element.style.outline = `1px solid hsla(${hue}, 100%, 51%, 0.8)`;
 
         this._layoutFlashingTimeout = setTimeout(() => {
             if (this._element)