forked from mirrors/gecko-dev
Bug 1819468 - Do not propagate page names from subclasses of block frames r=dholbert
Remove some related now-default pref setting in printing crashtests.list while we're here. Differential Revision: https://phabricator.services.mozilla.com/D172342
This commit is contained in:
parent
efccf56a7a
commit
c0c82e4fc5
4 changed files with 54 additions and 6 deletions
|
|
@ -9516,10 +9516,17 @@ inline void nsCSSFrameConstructor::ConstructFramesFromItemList(
|
||||||
VerifyGridFlexContainerChildren(aParentFrame, aFrameList);
|
VerifyGridFlexContainerChildren(aParentFrame, aFrameList);
|
||||||
|
|
||||||
// Calculate and propagate page-name values for each frame in the frame list.
|
// Calculate and propagate page-name values for each frame in the frame list.
|
||||||
// This will be affected by https://bugzilla.mozilla.org/1782597
|
// We do not want to compute and propagate page-name values from frames that
|
||||||
|
// are children of any subclasses of block frames, but not actually a block
|
||||||
|
// frame. The page-name property does not apply to frames which cannot create
|
||||||
|
// class A breakpoints (currently no subclass of BlockFrame can). Because the
|
||||||
|
// property does not apply, those children also cannot propagate page-name
|
||||||
|
// values.
|
||||||
|
// This assumption helps avoid unnecessarily handling page-names for frames
|
||||||
|
// such as form controls, which also avoids bug 1819468.
|
||||||
if (aState.mPresContext->IsPaginated() &&
|
if (aState.mPresContext->IsPaginated() &&
|
||||||
StaticPrefs::layout_css_named_pages_enabled() &&
|
StaticPrefs::layout_css_named_pages_enabled() &&
|
||||||
aParentFrame->IsBlockFrameOrSubclass()) {
|
aParentFrame->IsBlockFrame()) {
|
||||||
// Set the start/end page values while iterating the frame list, to walk
|
// Set the start/end page values while iterating the frame list, to walk
|
||||||
// up the frame tree only once after iterating the frame list.
|
// up the frame tree only once after iterating the frame list.
|
||||||
// This also avoids extra property lookups on these frames.
|
// This also avoids extra property lookups on these frames.
|
||||||
|
|
@ -9604,7 +9611,7 @@ inline void nsCSSFrameConstructor::ConstructFramesFromItemList(
|
||||||
// frame that is not a block frame.
|
// frame that is not a block frame.
|
||||||
for (nsContainerFrame* ancestorFrame = aParentFrame;
|
for (nsContainerFrame* ancestorFrame = aParentFrame;
|
||||||
(startPageValue || endPageValue) && ancestorFrame &&
|
(startPageValue || endPageValue) && ancestorFrame &&
|
||||||
ancestorFrame->IsBlockFrameOrSubclass();
|
ancestorFrame->IsBlockFrame();
|
||||||
ancestorFrame = ancestorFrame->GetParent()) {
|
ancestorFrame = ancestorFrame->GetParent()) {
|
||||||
MOZ_ASSERT(!ancestorFrame->GetPrevInFlow(),
|
MOZ_ASSERT(!ancestorFrame->GetPrevInFlow(),
|
||||||
"Should not have fragmentation yet");
|
"Should not have fragmentation yet");
|
||||||
|
|
|
||||||
21
layout/printing/crashtests/1819468-1.html
Normal file
21
layout/printing/crashtests/1819468-1.html
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
.c {
|
||||||
|
break-after: page;
|
||||||
|
page: Rotated;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
b.insertAdjacentHTML("afterBegin", a.innerHTML)
|
||||||
|
SpecialPowers.wrap(window).printPreview()?.close()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<audio>
|
||||||
|
<optgroup id="a">
|
||||||
|
<option class="c">a</option>
|
||||||
|
</audio>
|
||||||
|
<menu style="max-height: 0em">
|
||||||
|
<menu id="b"></menu>
|
||||||
|
</menu>
|
||||||
|
<select class="c">
|
||||||
18
layout/printing/crashtests/1819468-2.html
Normal file
18
layout/printing/crashtests/1819468-2.html
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<style>
|
||||||
|
.c {
|
||||||
|
break-after: page;
|
||||||
|
page: Rotated;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<script>
|
||||||
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
|
SpecialPowers.wrap(window).printPreview()?.close()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
<menu style="max-height: 0em">
|
||||||
|
<menu id="b">
|
||||||
|
<option class="c">a</option>
|
||||||
|
</menu>
|
||||||
|
</menu>
|
||||||
|
<select class="c">
|
||||||
|
|
@ -7,6 +7,8 @@ skip-if(Android) load 1663722.html
|
||||||
skip-if(Android) load 1671503.html
|
skip-if(Android) load 1671503.html
|
||||||
load 1748277.html # Bug 1751260
|
load 1748277.html # Bug 1751260
|
||||||
load 1758199-1.html
|
load 1758199-1.html
|
||||||
pref(layout.css.named-pages.enabled,true) load 1804571.html
|
load 1804571.html
|
||||||
pref(layout.css.named-pages.enabled,true) load 1804798.html
|
load 1804798.html
|
||||||
pref(layout.css.named-pages.enabled,true) load 1804794.html
|
load 1804794.html
|
||||||
|
load 1819468-1.html
|
||||||
|
load 1819468-2.html
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue