diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2020-06-02 11:55:46 +0300 |
---|---|---|
committer | win7-7 <win7-7@users.noreply.github.com> | 2020-06-02 11:55:46 +0300 |
commit | fb564353f2f8e9b4ba01e814c06bb29828099268 (patch) | |
tree | b3ad0991109bcd25f3e791b54c1bc896442b1a7e | |
parent | 4d373c1d360b29f94026b72c6f66e4ad313732cf (diff) | |
download | UXP-fb564353f2f8e9b4ba01e814c06bb29828099268.tar UXP-fb564353f2f8e9b4ba01e814c06bb29828099268.tar.gz UXP-fb564353f2f8e9b4ba01e814c06bb29828099268.tar.lz UXP-fb564353f2f8e9b4ba01e814c06bb29828099268.tar.xz UXP-fb564353f2f8e9b4ba01e814c06bb29828099268.zip |
issue #1575 - Fix the wrong position when we calculate the position for position:absolute child and add reftests
Use |GetUsedBorder| instead of |GetComputedBorder| when we calculate the position for position:absolute child.
-rw-r--r-- | layout/generic/nsAbsoluteContainingBlock.cpp | 4 | ||||
-rw-r--r-- | layout/reftests/table-bordercollapse/bug1379306-ref.html | 31 | ||||
-rw-r--r-- | layout/reftests/table-bordercollapse/bug1379306.html | 30 | ||||
-rw-r--r-- | layout/reftests/table-bordercollapse/reftest.list | 1 | ||||
-rw-r--r-- | layout/reftests/table-html/bug1379306-2-ref.html | 21 | ||||
-rw-r--r-- | layout/reftests/table-html/bug1379306-2.html | 21 | ||||
-rw-r--r-- | layout/reftests/table-html/bug1379306-3-ref.html | 23 | ||||
-rw-r--r-- | layout/reftests/table-html/bug1379306-3.html | 23 | ||||
-rw-r--r-- | layout/reftests/table-html/reftest.list | 2 |
9 files changed, 154 insertions, 2 deletions
diff --git a/layout/generic/nsAbsoluteContainingBlock.cpp b/layout/generic/nsAbsoluteContainingBlock.cpp index f444757e8..326468c07 100644 --- a/layout/generic/nsAbsoluteContainingBlock.cpp +++ b/layout/generic/nsAbsoluteContainingBlock.cpp @@ -658,8 +658,8 @@ nsAbsoluteContainingBlock::ReflowAbsoluteFrame(nsIFrame* aDelegat // Get the border values WritingMode outerWM = aReflowInput.GetWritingMode(); - const LogicalMargin border(outerWM, - aReflowInput.mStyleBorder->GetComputedBorder()); + const LogicalMargin border(outerWM, aDelegatingFrame->GetUsedBorder()); + LogicalMargin margin = kidReflowInput.ComputedLogicalMargin().ConvertTo(outerWM, wm); diff --git a/layout/reftests/table-bordercollapse/bug1379306-ref.html b/layout/reftests/table-bordercollapse/bug1379306-ref.html new file mode 100644 index 000000000..76c8ef813 --- /dev/null +++ b/layout/reftests/table-bordercollapse/bug1379306-ref.html @@ -0,0 +1,31 @@ +<!DOCTYPE html> +<title>Table Cell Testcase, bug 1379306</title> +<style> + table.collapse { + border-collapse: collapse; + } + td { + border: 20px solid #aaa; + width: 120px; + height: 150px; + } + .first { + background-color: #000; + position: absolute; + top: 20px; + left: 20px; + height: 10px; + width: 20px + } +</style> +<h1>Table Cell Testcase, bug 1379306</h1> + +<div style="position: relative;"> + <table class="collapse"> + <tr> + <td> + <div class="first"></div> + </td> + </tr> + </table> +</div>
\ No newline at end of file diff --git a/layout/reftests/table-bordercollapse/bug1379306.html b/layout/reftests/table-bordercollapse/bug1379306.html new file mode 100644 index 000000000..2d7f4bce4 --- /dev/null +++ b/layout/reftests/table-bordercollapse/bug1379306.html @@ -0,0 +1,30 @@ +<!DOCTYPE html> +<title>Table Cell Testcase, bug 1379306</title> +<style> + table.collapse { + border-collapse: collapse; + } + td { + border: 20px solid #aaa; + width: 120px; + height: 150px; + position: relative; + } + div { + background-color: #000; + position: absolute; + top: 0; + left: 0; + height: 10px; + width: 20px + } +</style> +<h1>Table Cell Testcase, bug 1379306</h1> + +<table class="collapse"> + <tr> + <td> + <div></div> + </td> + </tr> +</table>
\ No newline at end of file diff --git a/layout/reftests/table-bordercollapse/reftest.list b/layout/reftests/table-bordercollapse/reftest.list index 2610d202d..2cd93397e 100644 --- a/layout/reftests/table-bordercollapse/reftest.list +++ b/layout/reftests/table-bordercollapse/reftest.list @@ -3,6 +3,7 @@ == bug1375518-3.html bug1375518-ref.html == bug1375518-4.html bug1375518-4-ref.html == bug1375518-5.html bug1375518-5-ref.html +== bug1379306.html bug1379306-ref.html == bug1394226.html bug1394226-ref.html != bug1394226.html bug1394226-notref.html == bc_dyn_cell1.html bc_dyn_cell1_ref.html diff --git a/layout/reftests/table-html/bug1379306-2-ref.html b/layout/reftests/table-html/bug1379306-2-ref.html new file mode 100644 index 000000000..a02d92bb2 --- /dev/null +++ b/layout/reftests/table-html/bug1379306-2-ref.html @@ -0,0 +1,21 @@ +<!DOCTYPE HTML> +<title>Table Row Testcase, bug 1379306</title> +<style> + +table { background: yellow } +td { height: 50px; width: 200px; background: aqua; } +div { background: fuchsia; height: 10px; width: 20px } + +tr { position: relative; border: 30px solid blue; } +div { position: absolute; top: 0; left: 0 } + +</style> +<h1>Table Row Testcase, bug 1379306</h1> + +<table> + <tr> + <td> + <div></div> + </td> + </tr> +</table>
\ No newline at end of file diff --git a/layout/reftests/table-html/bug1379306-2.html b/layout/reftests/table-html/bug1379306-2.html new file mode 100644 index 000000000..f04d0219f --- /dev/null +++ b/layout/reftests/table-html/bug1379306-2.html @@ -0,0 +1,21 @@ +<!DOCTYPE HTML> +<title>Testcase, bug 1379306</title> +<style> + +table { background: yellow } +td { height: 50px; width: 200px; background: aqua; } +div { background: fuchsia; height: 10px; width: 20px } + +tr { position: relative; border: 10px solid blue } +div { position: absolute; top: 0; left: 0 } + +</style> +<h1>Table Row Testcase, bug 1379306</h1> + +<table> + <tr> + <td> + <div></div> + </td> + </tr> +</table>
\ No newline at end of file diff --git a/layout/reftests/table-html/bug1379306-3-ref.html b/layout/reftests/table-html/bug1379306-3-ref.html new file mode 100644 index 000000000..ffb70b46e --- /dev/null +++ b/layout/reftests/table-html/bug1379306-3-ref.html @@ -0,0 +1,23 @@ +<!DOCTYPE HTML> +<title>Testcase, bug 1379306</title> +<style> + +table { background: yellow } +td { height: 50px; width: 200px; background: aqua; } +div { background: fuchsia; height: 10px; width: 20px } + +tbody { position: relative; border: 30px solid blue } +div { position: absolute; top: 0; left: 0 } + +</style> +<h1>Table Row Group Testcase, bug 1379306</h1> + +<table> + <tbody> + <tr> + <td> + <div></div> + </td> + </tr> + </tbody> +</table>
\ No newline at end of file diff --git a/layout/reftests/table-html/bug1379306-3.html b/layout/reftests/table-html/bug1379306-3.html new file mode 100644 index 000000000..3192902ef --- /dev/null +++ b/layout/reftests/table-html/bug1379306-3.html @@ -0,0 +1,23 @@ +<!DOCTYPE HTML> +<title>Testcase, bug 1379306</title> +<style> + +table { background: yellow } +td { height: 50px; width: 200px; background: aqua; } +div { background: fuchsia; height: 10px; width: 20px } + +tbody { position: relative; border: 10px solid blue } +div { position: absolute; top: 0; left: 0 } + +</style> +<h1>Table Row Group Testcase, bug 1379306</h1> + +<table> + <tbody> + <tr> + <td> + <div></div> + </td> + </tr> + </tbody> +</table>
\ No newline at end of file diff --git a/layout/reftests/table-html/reftest.list b/layout/reftests/table-html/reftest.list index 362a96096..c3a4010ca 100644 --- a/layout/reftests/table-html/reftest.list +++ b/layout/reftests/table-html/reftest.list @@ -1,2 +1,4 @@ == cell-align-stopped-at-table-1-standards.html cell-align-stopped-at-table-1-standards-ref.html == cell-align-stopped-at-table-1-quirks.html cell-align-stopped-at-table-1-quirks-ref.html +== bug1379306-2.html bug1379306-2-ref.html +== bug1379306-3.html bug1379306-3-ref.html |