-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add reflected IDL property for popup [popup 3/N]
This CL just adds a Reflected `popup` IDL attribute for the `popup` content attribute, plus associated testing. Note: some existing web_tests/WPTs had to be modified slightly, to avoid a namespace collision between global event handler content attributes that called a function called "popup()", and the new 'popup' content attribute. In those cases, the inline event handler runs with |this| set to the element, so 'popup()' evaluates to 'this.popup()' which is (now) an error due to the new 'popup' attribute. This might bode poorly for general web compat - we'll see. Bug: 1307772 Change-Id: I0218a1aa56f63c4965835b6457b3655bdf78aedd Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3556371 Auto-Submit: Mason Freed <masonf@chromium.org> Reviewed-by: David Baron <dbaron@chromium.org> Commit-Queue: David Baron <dbaron@chromium.org> Cr-Commit-Position: refs/heads/main@{#987017}
- Loading branch information
Mason Freed
authored and
Chromium LUCI CQ
committed
Mar 30, 2022
1 parent
5ebce23
commit 765f2ba
Showing
13 changed files
with
77 additions
and
28 deletions.
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
...s-grid-layout/setting-node-properties-to-null-during-layout-should-not-crash-expected.txt
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 +1,2 @@ | ||
CONSOLE MESSAGE: Found a 'popup' attribute with an invalid value. | ||
This test passes if it does not crash. |
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
14 changes: 7 additions & 7 deletions
14
third_party/blink/web_tests/fast/events/popup-blocked-from-fake-button-click.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,23 +1,23 @@ | ||
<html> | ||
<html> | ||
<head> | ||
<script src="../../resources/testharness.js"></script> | ||
<script src="../../resources/testharnessreport.js"></script> | ||
</head> | ||
<body> | ||
<button id="test" onclick="popup()" style="display:none"></button> | ||
<button id="test" onclick="openPopup()" style="display:none"></button> | ||
<div id="console"></div> | ||
<script> | ||
<script> | ||
var win; | ||
function popup() { | ||
function openPopup() { | ||
win = window.open("about:blank", "blank"); | ||
assert_equals(win, null); | ||
} | ||
|
||
if (window.testRunner) { | ||
testRunner.setPopupBlockingEnabled(true); | ||
} | ||
|
||
test(() => document.getElementById("test").click(), 'Fake button click'); | ||
</script> | ||
</body> | ||
</script> | ||
</body> | ||
</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
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