Commit graph

164 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
e70bbed0ba Bug 1928512 - Use opaque backstop color for page canvas background. r=dholbert, a=RyanVM
This restores behavior from before bug 1835864, effectively.

The top level image document's root element has transparent background.
Before that patch, we used to blend that with
GetDefaultBackgroundColorDraw(), which was white.

This should generally not change behavior, because the page frame itself
is white, but it does on PrintTargetWindows (probably a cairo bug?),
where it causes our page content clip not to apply.

In any case, restoring behavior here is trivial, so let's do that for
now, I'll file a follow-up bug for the underlying issue.

Differential Revision: https://phabricator.services.mozilla.com/D228514
2024-11-09 19:46:47 +00:00
Ting-Yu Lin
b518ef30fa Bug 1888535 Part 5 - Remove DISPLAY_REFLOW. r=layout-reviewers,emilio
It is used in `Reflow()` implementations.

Differential Revision: https://phabricator.services.mozilla.com/D206317
2024-04-02 19:03:05 +00:00
Ting-Yu Lin
5432f83374 Bug 1877850 Part 1 - Convert callers of ReflowInput physical size accessors to use logical ones. r=dholbert
ReflowInput's computed sizes and border&padding are stored in logical
coordinates, so accessing the physical version is slower [1]. This patch
converts as many callers as possible to use logical coordinates.

This patch doesn't change behavior.

[1] For example, accessing `ComputedWidth()` and `ComputedHeight()` needs two
`IsVertical()` check, but `GetPhysicalSize()` only needs one.

Differential Revision: https://phabricator.services.mozilla.com/D200237
2024-02-01 22:02:00 +00:00
Ting-Yu Lin
277889966a Bug 1865012 Part 3 - Remove FirstContinuation overrides for nsPageFrame and nsPageContentFrame. r=dholbert
The overrides were added in bug 1803861. With Part 1 , they are no longer
needed.

Actually, without this patch, the assertion "First descendent of
nsPageSequenceFrame should not have a previous continuation" in
`nsPageFrame::FirstContinuation` will be triggered when constructing frame tree,
because `nsSplittableFrame::SetPrevContinuation` now accesses
`FirstContinuation()`, but the parent-child relationship might not properly set
up yet.

Differential Revision: https://phabricator.services.mozilla.com/D197758
2024-01-23 23:15:02 +00:00
Norisz Fay
243c7ecbe4 Backed out 4 changesets (bug 1865012) for causing mochitest failure on test_gencontent.html CLOSED TREE
Backed out changeset 95d920859b91 (bug 1865012)
Backed out changeset 26f6c2765cb5 (bug 1865012)
Backed out changeset 30a3c356ebc9 (bug 1865012)
Backed out changeset 4fb71ff990ae (bug 1865012)
2024-01-23 02:17:49 +02:00
Ting-Yu Lin
47670119fc Bug 1865012 Part 3 - Remove FirstContinuation overrides for nsPageFrame and nsPageContentFrame. r=dholbert
The overrides were added in bug 1803861. With Part 1 , they are no longer
needed.

Actually, without this patch, the assertion "First descendent of
nsPageSequenceFrame should not have a previous continuation" in
`nsPageFrame::FirstContinuation` will be triggered when constructing frame tree,
because `nsSplittableFrame::SetPrevContinuation` now accesses
`FirstContinuation()`, but the parent-child relationship might not properly set
up yet.

Differential Revision: https://phabricator.services.mozilla.com/D197758
2024-01-22 19:50:49 +00:00
Iulian Moraru
3f0fbca095 Backed out 2 changesets (bug 1865172) for causing wpt failures on page-size-007-print.html. CLOSED TREE
Backed out changeset ab9a94d4c0bf (bug 1865172)
Backed out changeset 087e1d3a393f (bug 1865172)
2024-01-19 00:49:06 +02:00
Emily McDonough
f5d8f30a1f Bug 1865172 Part 1 - Use computed page value on first reflow for all pages that don't have a pushed page name r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D196895
2024-01-18 19:11:00 +00:00
Emily McDonough
544a1f7855 Bug 1859830 Part 1 - Apply resolved page style for :first @page, even if it has no specified page name r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D191767
2023-10-30 21:45:48 +00:00
Emily McDonough
f2355a52d5 Bug 1833471 Part 2 - Export @page pseudo-class flags to Gecko style code r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D178869
2023-06-21 23:37:46 +00:00
Norisz Fay
9e2d68a917 Backed out 3 changesets (bug 1833471) for causing failures on cssom-ruleTypeAndOrder.html, page-rule-declarations-000.html
Backed out changeset 69c9504ac848 (bug 1833471)
Backed out changeset e76595d749fb (bug 1833471)
Backed out changeset fd4e99d77a6b (bug 1833471)
2023-06-22 01:01:20 +03:00
Emily McDonough
332fa4dc43 Bug 1833471 Part 2 - Export @page pseudo-class flags to Gecko style code r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D178869
2023-06-21 19:02:23 +00:00
Narcis Beleuzu
15227435c3 Backed out 3 changesets (bug 1833471) for wpt failure on page-rule-declarations-000.html . CLOSED TREE
Backed out changeset 547eef705668 (bug 1833471)
Backed out changeset e21e18f3f729 (bug 1833471)
Backed out changeset 16164bf63457 (bug 1833471)
2023-06-21 11:24:49 +03:00
Emily McDonough
8d5d46116d Bug 1833471 Part 2 - Export @page pseudo-class flags to Gecko style code r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D178869
2023-06-21 02:13:01 +00:00
Emily McDonough
7b23072da6 Bug 1802238 - Don't allow using mixed page sizes when printing unless layout.css.allow-mixed-page-sizes is set r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D162920
2022-12-06 21:24:29 +00:00
Emily McDonough
7a576abe2d Bug 1803861 - Implement nsPageFrame::FirstContinuation and nsPageContentFrame::FirstContinuation with constant complexity r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D163759
2022-12-06 00:07:09 +00:00
Cristian Tuns
0d742750c8 Backed out changeset b5b515b2a259 (bug 1802238) for causing crashtest failures on 1683126.html CLOSED TREE 2022-12-01 20:53:37 -05:00
Emily McDonough
8df4aac0c0 Bug 1802238 - Don't allow using mixed page sizes when printing unless layout.css.allow-mixed-page-sizes is set r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D162920
2022-12-01 20:20:09 +00:00
Emily McDonough
d146c1f89b Bug 1740365 Part 1 - Use CSS page name when constructing nsPageContentFrames and computed page content style r=dholbert,emilio
This works with margin and page-size, though we can't properly test mixed
page-size yet due to limitations in both print preview testing (which does not
handle multiple pages) and paged reftests (which ignore page-size).

It may be appropriate to remove the @page { margin } propagation from Servo
after this change.

Differential Revision: https://phabricator.services.mozilla.com/D158227
2022-11-10 23:43:48 +00:00
Cosmin Sabou
9909a4a8bb Backed out 2 changesets (bug 1740365) for causing bp-hybrid bustages on PresShell.h. CLOSED TREE
Backed out changeset b52bc7d5cf65 (bug 1740365)
Backed out changeset 5ba5fdd07fe0 (bug 1740365)
2022-11-10 18:06:51 +02:00
Emily McDonough
3a6ac592fe Bug 1740365 Part 1 - Use CSS page name when constructing nsPageContentFrames and computed page content style r=dholbert,emilio
This works with margin and page-size, though we can't properly test mixed
page-size yet due to limitations in both print preview testing (which does not
handle multiple pages) and paged reftests (which ignore page-size).

It may be appropriate to remove the @page { margin } propagation from Servo
after this change.

Differential Revision: https://phabricator.services.mozilla.com/D158227
2022-11-10 15:30:39 +00:00
Ting-Yu Lin
f101e2077d Bug 1464761 Part 4 - Remove nsReflowStatus::mTruncated bit. r=dholbert
In the description of the mTruncated bit, its purpose is the same as calling
SetInlineLineBreakBeforeAndReset(). We've removed all its usages in previous
patches, so the bit is no longer needed.

Differential Revision: https://phabricator.services.mozilla.com/D151461
2022-07-27 21:55:18 +00:00
Ting-Yu Lin
efdf31a619 Bug 1780264 Part 2 - Remove ReflowInput::mStylePadding. r=emilio
While I'm here, rename the local variable `styleMargin` to `margin` to make the
naming consistent with the `padding` naming in this patch.

Differential Revision: https://phabricator.services.mozilla.com/D152203
2022-07-20 00:48:22 +00:00
Emilio Cobos Álvarez
27e31ed3bf Bug 1771571 - Fix include header mess between frame constructor / restyle manager. r=layout-reviewers,AlaskanEmily
RestyleManager includes nsPresContextInlines which includes
nsCSSFrameConstructor which includes RestyleManager.

Break the cycle, since turns out the later include is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D147560
2022-05-31 20:07:38 +00:00
Miko Mynttinen
017d02d0ff Bug 1714584 - Part 2: Remove nsDisplayList::RemoveBottom() r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138153
2022-02-22 23:42:18 +00:00
Miko Mynttinen
ddec6eef59 Bug 1714584 - Part 1: Decouple nsDisplayList internal list from nsDisplayItems r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138152
2022-02-22 23:42:18 +00:00
Norisz Fay
2121660ce9 Backed out 2 changesets (bug 1714584) per devs request for causing crashes a=backout
Backed out changeset 3baead3e079b (bug 1714584)
Backed out changeset a2da895a58ce (bug 1714584)
2022-02-22 16:41:57 +02:00
Miko Mynttinen
0bd7fc8c56 Bug 1714584 - Part 2: Remove nsDisplayList::RemoveBottom() r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138153
2022-02-22 00:44:25 +00:00
Miko Mynttinen
28474c7ad2 Bug 1714584 - Part 1: Decouple nsDisplayList internal list from nsDisplayItems r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D138152
2022-02-22 00:44:25 +00:00
Emily McDonough
7c9c0145a9 Bug 1732836 - Do not apply page scale twice when building display lists for paged content. r=mattwoodrow
This reverts the patch for bug 1720621.

This caused a conflict with the fix for bug 1722890, which fixed another case
of cutoff content when printing scaled. That fix should also cover the upscaled
case.

Differential Revision: https://phabricator.services.mozilla.com/D127594
2021-10-06 06:51:52 +00:00
Andi-Bogdan Postelnicu
9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Hiroyuki Ikezoe
a7785fcd55 Bug 1700245 - Introduce IsProperAncestorFrameCrossDocInProcess and use it in PruneDisplayListForExtraPage. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D120428
2021-07-27 10:47:40 +00:00
Hiroyuki Ikezoe
c59c278baa Bug 1700245 - Drop |aExtraPage| argument from PruneDisplayListForExtraPage. r=mattwoodrow
It's not used at all.

Differential Revision: https://phabricator.services.mozilla.com/D120427
2021-07-27 10:47:40 +00:00
Matt Woodrow
e082df56bb Bug 1720621 - Adjust display list building rect for page scale transform within nsPageContentFrame. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D120127
2021-07-20 01:21:31 +00:00
Emilio Cobos Álvarez
9f2318410c Bug 1714513 - Use ClipContentDescendants rather than ClipContainingBlockDescendants in nsPageContentFrame::BuildDisplayList. r=mattwoodrow
That way we guarantee to clip fixedpos boxes etc. This used to work
because this was further up the stack in nsPageFrame rather than
nsPageContentFrame:

  029a5e8fa8 (l6.262)

Differential Revision: https://phabricator.services.mozilla.com/D116857
2021-06-09 07:57:27 +00:00
Matt Woodrow
ca27c43537 Bug 1540737 - Use correct frame size when converting print logical coordinates into physical. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D114673
2021-05-19 01:11:31 +00:00
Csoregi Natalia
1f3f5df2ce Backed out 8 changesets (bug 1540737) for causing graphics crashes in Bug 1711718. a=backout
Backed out changeset 37628894ffd5 (bug 1540737)
Backed out changeset 4b5f53d5127b (bug 1540737)
Backed out changeset a73e041f1f1d (bug 1540737)
Backed out changeset 81f1a9d1a5e1 (bug 1540737)
Backed out changeset b3d0cc460b24 (bug 1540737)
Backed out changeset f929de495b87 (bug 1540737)
Backed out changeset 2f5b8369d061 (bug 1540737)
Backed out changeset b4c93d182ef4 (bug 1540737)
2021-05-18 19:06:20 +03:00
Matt Woodrow
5eef280c91 Bug 1540737 - Use correct frame size when converting print logical coordinates into physical. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D114673
2021-05-17 23:53:44 +00:00
Emily McDonough
b0ac9c9982 Bug 1710946 - Minor cleanup in nsPageContentFrame::Reflow r=dholbert
Avoid shadowing of the writing mode variable, make some variables const.

Differential Revision: https://phabricator.services.mozilla.com/D115025
2021-05-13 18:42:22 +00:00
Emilio Cobos Álvarez
3aa2544989 Bug 1700379 - Move code dealing with transform getters to the frame that we actually wrap its contents around. r=miko
This shouldn't change behavior, but simplifies the setup quite a bit, I
think.

Differential Revision: https://phabricator.services.mozilla.com/D109510
2021-05-04 18:46:44 +00:00
Alexandru Michis
6641f79c95 Backed out changeset 0229f8dc291a (bug 1700379) for causing failures in test_printpreview.xhtml
CLOSED TREE
2021-05-03 22:10:12 +03:00
Emilio Cobos Álvarez
baca44f241 Bug 1700379 - Move code dealing with transform getters to the frame that we actually wrap its contents around. r=miko
This shouldn't change behavior, but simplifies the setup quite a bit, I
think.

Differential Revision: https://phabricator.services.mozilla.com/D109510
2021-05-03 17:59:47 +00:00
Mats Palmgren
6b588acfa8 Bug 1689789 part 1 - Ensure we don't have any overflow areas for pdf.js content. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D103608
2021-02-05 19:39:31 +00:00
Mats Palmgren
f5f65add13 Bug 1655856 - Make nsPageContentFrame include its own border-box in its reported overflow-areas. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D98796
2020-12-06 14:52:44 +00:00
Mats Palmgren
a633f96fdf Bug 1678997 - [css-break] Only scrollable overflow should create new pages, not ink overflow. r=layout-reviewers,jfkthame
Per https://github.com/w3c/csswg-drafts/issues/4099

Differential Revision: https://phabricator.services.mozilla.com/D97875
2020-11-30 15:58:19 +00:00
Mats Palmgren
e94fd41033 Bug 1669333 - Make the fragmentation fallback code use logical coordinates. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D97864
2020-11-30 15:58:19 +00:00
Jonathan Kew
f49f629f5d Bug 1674027 - Check both width and height when computing shrink-to-fit scaling factor for pdf.js documents. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D95538
2020-11-03 19:29:47 +00:00
Razvan Maries
de6734558a Backed out changeset 3502941c9c34 (bug 1674027) for perma failures on nsPageContentFrame. CLOSED TREE 2020-11-03 20:49:12 +02:00
Jonathan Kew
c8bcc2df9f Bug 1674027 - Check both width and height when computing shrink-to-fit scaling factor for pdf.js documents. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D95538
2020-11-03 15:01:20 +00:00
Miko Mynttinen
96bcc0ad72 Bug 1640197 - Part 4: Create more pages for vertical overflow r=dholbert,mats
Depends on D90425

Differential Revision: https://phabricator.services.mozilla.com/D90426
2020-10-28 18:33:52 +00:00