Skip to content

Commit

Permalink
Revert of Devtools: Cut color picker off at bottom instead of the top…
Browse files Browse the repository at this point in the history
… (patchset #1 id:1 of https://codereview.chromium.org/1816933002/ )

Reason for revert:
Breaks color picker with no easy fix: crbug.com/603811

Original issue's description:
> Devtools: Cut color picker off at bottom instead of the top
>
> When there is insufficent vertical space, the color picker is cut off at
> the top. This change fixes it at the top in these situations, allowing
> better usability of the color picker in these states.
>
> BUG=572101
>
> Committed: https://crrev.com/acc1963c73bc1e4dabf926d5f99d9323d2918016
> Cr-Commit-Position: refs/heads/master@{#386581}

[email protected]
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=572101

Review URL: https://codereview.chromium.org/1900033002

Cr-Commit-Position: refs/heads/master@{#388127}
  • Loading branch information
lisamuel authored and Commit bot committed Apr 19, 2016
1 parent 8c93cca commit 1b00494
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions front_end/elements/spectrum.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
width: 232px;
height: 240px;
-webkit-user-select: none;
/* Prevents the popover from jumping when focus() is called */
display: block !important;
}

:host(.palettes-enabled) {
Expand Down
2 changes: 1 addition & 1 deletion front_end/ui/Popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ WebInspector.Popover.prototype = {
}

this.element.className = WebInspector.Popover._classNamePrefix + " " + verticalAlignment + "-" + horizontalAlignment + "-arrow";
this.element.positionAt(newElementPosition.x, Math.max(0, newElementPosition.y - borderWidth), container);
this.element.positionAt(newElementPosition.x, newElementPosition.y - borderWidth, container);
this.element.style.width = newElementPosition.width + borderWidth * 2 + "px";
this.element.style.height = newElementPosition.height + borderWidth * 2 + "px";
},
Expand Down

0 comments on commit 1b00494

Please sign in to comment.