forked from mykmelez/gecko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1778526 [wpt PR 34729] - Fix async->manual rename in CSS, plus ad…
…d more testing, a=testonly Automatic update from web-platform-tests Fix async->manual rename in CSS, plus add more testing When [1] landed, it forgot to change the default CSS for `async` to `manual`. Clearly that indicates a lack of appearance testing, so this CL adds a WPT for the appearance of pop-ups. I also opened this issue to discuss the standard styling: openui/open-ui#561 In the meantime, this CL also refactors all of the test-assumed default styles for [popup] into popup-styles.css, so that if we change these in the future it won't be so painful. This CL also had to add code to the <selectmenu> positioning algorithm to remove any margin. I think that's the right way to handle this, but that does mean developer `margin` settings on a slotted listbox won't have any effect. That seems right, but I don't know for sure. [1] https://chromium-review.googlesource.com/c/chromium/src/+/3722345 Bug: 1307772 Change-Id: I4ecf7bee947e90e2abdcedb47b3d38c958abb2f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3749343 Reviewed-by: Joey Arhar <jarhar@chromium.org> Commit-Queue: Mason Freed <masonf@chromium.org> Cr-Commit-Position: refs/heads/main@{#1021422} -- wpt-commits: fe9314db9649f54fbbe71c911af71c0cc2ac06ae wpt-pr: 34729
- Loading branch information
1 parent
ec5d96b
commit 74bada4
Showing
19 changed files
with
112 additions
and
154 deletions.
There are no files selected for viewing
14 changes: 3 additions & 11 deletions
14
testing/web-platform/tests/html/semantics/popups/popup-animated-display-ref.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
testing/web-platform/tests/html/semantics/popups/popup-appearance-ref.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8" /> | ||
<title>Popup element appearance</title> | ||
<link rel="stylesheet" href="resources/popup-styles.css"> | ||
|
||
<style> | ||
.fake-pop-up {top: 100px;} | ||
#blank {left: -300px;} | ||
#auto {left: -100px;} | ||
#hint {left: 100px;} | ||
#manual {left: 300px;} | ||
</style> | ||
|
||
<p>There should be four pop-ups with similar appearance, and | ||
the word Unknown with no special styling.</p> | ||
<div class="fake-pop-up" id=blank>Blank</div> | ||
<div class="fake-pop-up" id=auto>Auto</div> | ||
<div class="fake-pop-up" id=hint><span>Hint</span></div> | ||
<div class="fake-pop-up" id=manual>Manual</div> | ||
<div class="not-a-pop-up!" id=unknown>Unknown</div> |
33 changes: 33 additions & 0 deletions
33
testing/web-platform/tests/html/semantics/popups/popup-appearance.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8" /> | ||
<title>Popup element appearance</title> | ||
<link rel="author" href="mailto:masonf@chromium.org"> | ||
<link rel=help href="https://open-ui.org/components/popup.research.explainer"> | ||
<link rel="match" href="popup-appearance-ref.tentative.html"> | ||
|
||
<style> | ||
[popup] {top: 100px} | ||
[popup=""] {left: -300px} | ||
[popup=auto] {left: -100px; } | ||
[popup=hint] {left: 100px; } | ||
[popup=manual] {left: 300px; } | ||
</style> | ||
|
||
<p>There should be four pop-ups with similar appearance, and | ||
the word Unknown with no special styling.</p> | ||
<div popup>Blank | ||
<div popup=auto>Auto</div> | ||
</div> | ||
<div popup=hint>Hint</div> | ||
<div popup=manual>Manual</div> | ||
<!-- This ensures unsupported popup values don't receive styling --> | ||
<div popup=unknown>Unknown</div> | ||
<script> | ||
document.querySelectorAll('[popup]').forEach(p => { | ||
try { | ||
p.showPopUp(); | ||
} catch { | ||
// The unknown popup should throw an error on .showPopUp(). | ||
} | ||
}); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 2 additions & 18 deletions
20
...ing/web-platform/tests/html/semantics/popups/popup-defaultopen-display-ref.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,6 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel=author href="mailto:masonf@chromium.org"> | ||
<link rel="stylesheet" href="resources/popup-styles.css"> | ||
|
||
<div>This is a popup, which should be open upon load</div> | ||
|
||
<style> | ||
div { | ||
/* Per spec: */ | ||
display: block; | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
/* Per settings in test file: */ | ||
width: fit-content; | ||
height: fit-content; | ||
border: 1px solid; | ||
padding: 1em; | ||
background: -internal-light-dark(white, black); | ||
color: -internal-light-dark(black, white); | ||
} | ||
</style> | ||
<div class="fake-pop-up">This is a popup, which should be open upon load</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 3 additions & 7 deletions
10
testing/web-platform/tests/html/semantics/popups/popup-hidden-display-ref.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,15 @@ | ||
<!DOCTYPE html> | ||
<meta charset="utf-8"> | ||
<link rel=author href="mailto:masonf@chromium.org"> | ||
<link rel="stylesheet" href="resources/popup-styles.css"> | ||
|
||
<div>This content should be visible</div> | ||
<div class=fake-pop-up>This content should be visible</div> | ||
|
||
<style> | ||
div { | ||
position: fixed; | ||
.fake-pop-up { | ||
top: 0; | ||
left: 0; | ||
width: 300px; | ||
height: 200px; | ||
padding: 1em; | ||
border: 1px solid; | ||
background: white; | ||
color: black; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 2 additions & 16 deletions
18
testing/web-platform/tests/html/semantics/popups/popup-open-display-ref.tentative.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.