diff options
author | Moonchild <moonchild@palemoon.org> | 2020-06-04 21:34:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-04 21:34:32 +0200 |
commit | fdb918dea124a6efaf0c86f6d5c2ab1b83013e40 (patch) | |
tree | 27659f0297a70f9c6db6c690d0fd84c13daec517 /layout | |
parent | 580cb677ddf87b51fefe7a3c5036091aee1deb0e (diff) | |
parent | fb564353f2f8e9b4ba01e814c06bb29828099268 (diff) | |
download | UXP-fdb918dea124a6efaf0c86f6d5c2ab1b83013e40.tar UXP-fdb918dea124a6efaf0c86f6d5c2ab1b83013e40.tar.gz UXP-fdb918dea124a6efaf0c86f6d5c2ab1b83013e40.tar.lz UXP-fdb918dea124a6efaf0c86f6d5c2ab1b83013e40.tar.xz UXP-fdb918dea124a6efaf0c86f6d5c2ab1b83013e40.zip |
Merge pull request #1576 from win7-7/1379306-pr
Fix the wrong position when we calculate the position for position:absolute child
Diffstat (limited to 'layout')
-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 |