diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/reftests/bugs/508816-1-ref.xul | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/reftests/bugs/508816-1-ref.xul')
-rw-r--r-- | layout/reftests/bugs/508816-1-ref.xul | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/layout/reftests/bugs/508816-1-ref.xul b/layout/reftests/bugs/508816-1-ref.xul new file mode 100644 index 000000000..7e86aadbf --- /dev/null +++ b/layout/reftests/bugs/508816-1-ref.xul @@ -0,0 +1,52 @@ +<?xml version="1.0"?> +<!DOCTYPE window> +<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="RTL overflow test" width="640px" height="480px" style="direction: rtl" onload="load()" class="reftest-wait"> + +<hbox style="max-width: 200px; border: 1px solid red;"> +<scrollbox id="sb" align="start" pack="start" orient="horizontal" flex="1"> + <button id="sb1" label="test1"/><button label="test2"/><button label="test3"/><button label="test4"/><button label="test5"/> +</scrollbox> +</hbox> + +<hbox style="max-width: 200px; border: 1px solid blue"> +<arrowscrollbox id="asb" align="start" pack="start" orient="horizontal" flex="1"> + <button id="asb1" label="test1"/><button label="test2"/><button label="test3"/><button label="test4"/><button label="test5"/> +</arrowscrollbox> +</hbox> + +<hbox style="max-width: 200px; border: 1px solid black"> +<hbox align="end" pack="end" flex="1"> + <button label="test1"/><button label="test2"/><button label="test3"/><button label="test4"/><button label="test5"/> +</hbox> +</hbox> + +<script type="text/javascript"> + <![CDATA[ + function load() { + // arrowscrollbox provides a helper ensureElementIsVisible method + document.getElementById("asb").ensureElementIsVisible(document.getElementById("asb1"), false); + + // scrollbox doesn't provide that, so we have to do the heavy lifting directly + var sb = document.getElementById("sb"); + var sb1 = document.getElementById("sb1"); + var rect = sb.getBoundingClientRect(); + var containerStart = rect.left; + var containerEnd = rect.right; + rect = sb1.getBoundingClientRect(); + var elementStart = rect.left; + var elementEnd = rect.right; + + var amountToScroll = 0; + if (elementStart < containerStart) { + amountToScroll = elementStart - containerStart; + } else if (elementEnd > containerEnd) { + amountToScroll = elementEnd - containerEnd; + } + sb.scrollLeft += amountToScroll; + + document.documentElement.removeAttribute("class"); + } + ]]> +</script> + +</window> |