Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rearrange directionality algorithm functions
- Loading branch information
1 parent
cb34e5c
commit 7d6d1c0
Showing
9 changed files
with
141 additions
and
95 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
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
38 changes: 38 additions & 0 deletions
38
...-tests/html/semantics/forms/attributes-common-to-form-controls/dirname-rtl-inherited.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,38 @@ | ||
<!DOCTYPE html> | ||
<meta charset=utf-8> | ||
<title>Submitting element directionality: the dirname attribute</title> | ||
<link rel="author" title="Kolupaev Dmitry" href="mailto:dmitry.klpv@gmail.com"> | ||
<link rel=help href="https://html.spec.whatwg.org/multipage/#submitting-element-directionality:-the-dirname-attribute"> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<div id="log"></div> | ||
<div dir="rtl"> | ||
<form action="dirname-ltr-iframe.html" method=get target="iframe"> | ||
<p><label>Comment: <input type=text name="comment" dirname="comment.dir" required/></label></p> | ||
<p><button type=submit>Post Comment</button></p> | ||
</form> | ||
</div> | ||
<iframe name="iframe"></iframe> | ||
<script> | ||
function getParameterByName(name) { | ||
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); | ||
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), | ||
results = regex.exec(document.querySelector("iframe").contentWindow.location.search); | ||
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); | ||
} | ||
|
||
var t = async_test("submit element directionality"); | ||
document.querySelector("input").value = "foobar"; | ||
document.querySelector("button").click(); | ||
|
||
var iframe = document.querySelector("iframe"); | ||
iframe.onload = t.step_func(function() { | ||
// The initial about:blank load event can be fired before the form navigation occurs. | ||
// See https://github.com/whatwg/html/issues/490 for more information. | ||
if(iframe.contentWindow.location.href == "about:blank") { return; } | ||
|
||
assert_equals(getParameterByName("comment.dir"), "rtl"); | ||
|
||
t.done(); | ||
}); | ||
</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