Changeset 241981 in webkit
- Timestamp:
- Feb 22, 2019 8:10:00 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r241980 r241981 1 2019-02-22 Devin Rousso <drousso@apple.com> 2 3 REGRESSION(r?): Web Inspector: Popovers have inset shadows 4 https://bugs.webkit.org/show_bug.cgi?id=192963 5 <rdar://problem/46888679> 6 7 Reviewed by Brian Burg. 8 9 * UserInterface/Views/Popover.js: 10 (WI.Popover.prototype._drawBackground): 11 (WI.Popover.prototype._drawBackground.isolate): Added. 12 * UserInterface/Views/Popover.css: 13 (.popover): 14 1 15 2019-02-22 Devin Rousso <drousso@apple.com> 2 16 -
trunk/Source/WebInspectorUI/UserInterface/Views/Popover.css
r230618 r241981 32 32 z-index: var(--z-index-popover); 33 33 34 --popover-text-color: black;35 34 --popover-background-color: var(--panel-background-color); 36 35 --popover-border-color: hsla(0, 0%, 0%, 0.25); -
trunk/Source/WebInspectorUI/UserInterface/Views/Popover.js
r240540 r241981 422 422 423 423 let context = document.getCSSCanvasContext("2d", "popover", scaledWidth, scaledHeight); 424 context.save();425 424 context.clearRect(0, 0, scaledWidth, scaledHeight); 426 context.shadowOffsetX = 1; 427 context.shadowOffsetY = 1; 428 context.shadowBlur = 5; 429 context.shadowColor = computedStyle.getPropertyValue("--popover-shadow-color").trim(); 430 context.scale(scaleFactor, scaleFactor); 431 432 // Clip the frame. 433 context.fillStyle = computedStyle.getPropertyValue("--popover-text-color").trim(); 434 this._drawFrame(context, bounds, this._edge, this._anchorPoint); 435 context.clip(); 436 437 // Panel background color fill. 438 context.fillStyle = computedStyle.getPropertyValue("--popover-background-color").trim(); 439 440 context.fillRect(0, 0, width, height); 441 442 // Stroke. 443 context.strokeStyle = computedStyle.getPropertyValue("--popover-border-color").trim(); 444 context.lineWidth = 2; 445 this._drawFrame(context, bounds, this._edge, this._anchorPoint); 446 context.stroke(); 447 context.restore(); 425 426 function isolate(callback) { 427 context.save(); 428 callback(); 429 context.restore(); 430 } 431 432 isolate(() => { 433 context.scale(scaleFactor, scaleFactor); 434 this._drawFrame(context, bounds, this._edge, this._anchorPoint); 435 436 isolate(() => { 437 context.shadowBlur = 4; 438 context.shadowColor = computedStyle.getPropertyValue("--popover-shadow-color").trim(); 439 440 context.strokeStyle = computedStyle.getPropertyValue("--popover-border-color").trim(); 441 context.lineWidth = 2; 442 context.stroke(); 443 }); 444 445 isolate(() => { 446 context.fillStyle = computedStyle.getPropertyValue("--popover-background-color").trim(); 447 context.fill(); 448 }); 449 }); 448 450 } 449 451
Note: See TracChangeset
for help on using the changeset viewer.