mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 23:12:21 +00:00
Bug 1628804 - Ensure nsIFrame::ContentSize() returning non-negative sizes. r=dholbert,AlaskanEmily
Differential Revision: https://phabricator.services.mozilla.com/D70558 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
8d0d00e527
commit
6da8fe2e7f
21
layout/generic/crashtests/1628804.html
Normal file
21
layout/generic/crashtests/1628804.html
Normal file
@ -0,0 +1,21 @@
|
||||
<style>
|
||||
.c {
|
||||
box-decoration-break: clone;
|
||||
padding-bottom: 41vmax;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
go = () => {
|
||||
try { b.appendChild(a) } catch(e) { }
|
||||
}
|
||||
</script>
|
||||
<body onload=go()>
|
||||
<button style="columns: 72 0px">
|
||||
<dl style="columns: 1">
|
||||
<dd>-</dd>
|
||||
<dt id="b" style="float: left" class="c">x</dt>
|
||||
</dl>
|
||||
<dl>
|
||||
<map id="a">
|
||||
<canvas></canvas>
|
||||
<details open="">x</details>
|
@ -758,4 +758,5 @@ load 1618312.html
|
||||
load 1618564.html
|
||||
load 1625051-1.html
|
||||
load 1625051-2.html
|
||||
load 1628804.html
|
||||
load very-large-frameset.html
|
||||
|
@ -1023,7 +1023,11 @@ class nsIFrame : public nsQueryFrame {
|
||||
mozilla::LogicalSize ContentSize(mozilla::WritingMode aWritingMode) const {
|
||||
const auto bp = GetLogicalUsedBorderAndPadding(aWritingMode)
|
||||
.ApplySkipSides(GetLogicalSkipSides());
|
||||
return GetLogicalSize(aWritingMode) - bp.Size(aWritingMode);
|
||||
const auto size = GetLogicalSize(aWritingMode);
|
||||
return mozilla::LogicalSize(
|
||||
aWritingMode,
|
||||
std::max(0, size.ISize(aWritingMode) - bp.IStartEnd(aWritingMode)),
|
||||
std::max(0, size.BSize(aWritingMode) - bp.BStartEnd(aWritingMode)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user