Title: [241981] trunk/Source/WebInspectorUI
Revision
241981
Author
[email protected]
Date
2019-02-22 20:10:00 -0800 (Fri, 22 Feb 2019)

Log Message

REGRESSION(r?): Web Inspector: Popovers have inset shadows
https://bugs.webkit.org/show_bug.cgi?id=192963
<rdar://problem/46888679>

Reviewed by Brian Burg.

* UserInterface/Views/Popover.js:
(WI.Popover.prototype._drawBackground):
(WI.Popover.prototype._drawBackground.isolate): Added.
* UserInterface/Views/Popover.css:
(.popover):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (241980 => 241981)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-02-23 04:07:58 UTC (rev 241980)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-02-23 04:10:00 UTC (rev 241981)
@@ -1,5 +1,19 @@
 2019-02-22  Devin Rousso  <[email protected]>
 
+        REGRESSION(r?): Web Inspector: Popovers have inset shadows
+        https://bugs.webkit.org/show_bug.cgi?id=192963
+        <rdar://problem/46888679>
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Views/Popover.js:
+        (WI.Popover.prototype._drawBackground):
+        (WI.Popover.prototype._drawBackground.isolate): Added.
+        * UserInterface/Views/Popover.css:
+        (.popover):
+
+2019-02-22  Devin Rousso  <[email protected]>
+
         Web Inspector: Styles Redesign: clicking CSS property or selector should always select its text
         https://bugs.webkit.org/show_bug.cgi?id=180791
         <rdar://problem/36038366>

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Popover.css (241980 => 241981)


--- trunk/Source/WebInspectorUI/UserInterface/Views/Popover.css	2019-02-23 04:07:58 UTC (rev 241980)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Popover.css	2019-02-23 04:10:00 UTC (rev 241981)
@@ -31,7 +31,6 @@
     pointer-events: none;
     z-index: var(--z-index-popover);
 
-    --popover-text-color: black;
     --popover-background-color: var(--panel-background-color);
     --popover-border-color: hsla(0, 0%, 0%, 0.25);
     --popover-shadow-color: hsla(0, 0%, 0%, 0.5);

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/Popover.js (241980 => 241981)


--- trunk/Source/WebInspectorUI/UserInterface/Views/Popover.js	2019-02-23 04:07:58 UTC (rev 241980)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/Popover.js	2019-02-23 04:10:00 UTC (rev 241981)
@@ -421,30 +421,32 @@
         let computedStyle = window.getComputedStyle(this._element, null);
 
         let context = document.getCSSCanvasContext("2d", "popover", scaledWidth, scaledHeight);
-        context.save();
         context.clearRect(0, 0, scaledWidth, scaledHeight);
-        context.shadowOffsetX = 1;
-        context.shadowOffsetY = 1;
-        context.shadowBlur = 5;
-        context.shadowColor = computedStyle.getPropertyValue("--popover-shadow-color").trim();
-        context.scale(scaleFactor, scaleFactor);
 
-        // Clip the frame.
-        context.fillStyle = computedStyle.getPropertyValue("--popover-text-color").trim();
-        this._drawFrame(context, bounds, this._edge, this._anchorPoint);
-        context.clip();
+        function isolate(callback) {
+            context.save();
+            callback();
+            context.restore();
+        }
 
-        // Panel background color fill.
-        context.fillStyle = computedStyle.getPropertyValue("--popover-background-color").trim();
+        isolate(() => {
+            context.scale(scaleFactor, scaleFactor);
+            this._drawFrame(context, bounds, this._edge, this._anchorPoint);
 
-        context.fillRect(0, 0, width, height);
+            isolate(() => {
+                context.shadowBlur = 4;
+                context.shadowColor = computedStyle.getPropertyValue("--popover-shadow-color").trim();
 
-        // Stroke.
-        context.strokeStyle = computedStyle.getPropertyValue("--popover-border-color").trim();
-        context.lineWidth = 2;
-        this._drawFrame(context, bounds, this._edge, this._anchorPoint);
-        context.stroke();
-        context.restore();
+                context.strokeStyle = computedStyle.getPropertyValue("--popover-border-color").trim();
+                context.lineWidth = 2;
+                context.stroke();
+            });
+
+            isolate(() => {
+                context.fillStyle = computedStyle.getPropertyValue("--popover-background-color").trim();
+                context.fill();
+            });
+        });
     }
 
     _bestMetricsForEdge(preferredSize, targetFrame, containerFrame, edge)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to