mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Auto merge of #15904 - sendilkumarn:image-area, r=jdm
making image element areas good at finding areas <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #15884 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15904) <!-- Reviewable:end -->
This commit is contained in:
commit
c12b17d276
5 changed files with 74 additions and 9 deletions
|
@ -12960,12 +12960,24 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/img_find_non_sibling_map.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/img_find_non_sibling_map.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/img_multiple_request.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/img_multiple_request.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/img_no_panic_on_no_map.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/img_no_panic_on_no_map.html",
|
||||
{}
|
||||
]
|
||||
],
|
||||
"mozilla/img_width_height.html": [
|
||||
[
|
||||
"/_mozilla/mozilla/img_width_height.html",
|
||||
|
@ -25489,10 +25501,18 @@
|
|||
"3c4f36abed83367c851d943b1f25b8394de6fe75",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/img_find_non_sibling_map.html": [
|
||||
"d34100c4cc22adcaa1014095ba4b7b929b8e079d",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/img_multiple_request.html": [
|
||||
"0a6263ad87c9b3307f2dc694747b094a0517b79b",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/img_no_panic_on_no_map.html": [
|
||||
"be2ae22f4664b4577224ba6c7f3c4df8589c160a",
|
||||
"testharness"
|
||||
],
|
||||
"mozilla/img_width_height.html": [
|
||||
"37a04735261a6d2b36c3d529ce81eda46ed6967e",
|
||||
"testharness"
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for issue #15884</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<map name="img_map" id="img_map">
|
||||
<area shape="rect" coords="0,0,100,100">
|
||||
</map>
|
||||
<img usemap="#img_map" src="2x2.png" id="img">
|
||||
|
||||
<img usemap="#img_no_map" src="2x2.png" id="img_no">
|
||||
<script>
|
||||
var siblingTest = async_test("Image should find a non-sibling map");
|
||||
var img = document.getElementById('img');
|
||||
var img_clicked = false;
|
||||
img.onclick = siblingTest.step_func_done();
|
||||
document.addEventListener("DOMContentLoaded", siblingTest.step_func(function() {
|
||||
img.click();
|
||||
}));
|
||||
</script>
|
||||
</body>
|
18
tests/wpt/mozilla/tests/mozilla/img_no_panic_on_no_map.html
Normal file
18
tests/wpt/mozilla/tests/mozilla/img_no_panic_on_no_map.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>Test for issue #15884</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<img usemap="#img_no_map" src="2x2.png" id="img_no">
|
||||
<script>
|
||||
var noMapTest = async_test("Image should not panic when no map is found");
|
||||
var img_no = document.getElementById('img_no');
|
||||
var img_no_map_clicked = false;
|
||||
img_no.onclick = noMapTest.step_func_done();
|
||||
document.addEventListener("DOMContentLoaded", noMapTest.step(function() {
|
||||
img_no.click();
|
||||
}));
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue