Commit Graph
26 Commits
Author SHA1 Message Date
NotAlexNoyleandClaude Opus 5.5 dd391a4b2a layout: the GPU path's root displayport base is the daemon's — no longer replaced on every paint
cavekit-gpu-rendering.md R6 / T-527. nsLayoutUtils::PaintFrame asks the root scroll frame's
DecideScrollableLayer with aAllowCreateDisplayPort, and for the root content document that set the
displayport base to the composition size at the origin, in CSS px, on every paint. So the base the
daemon sets with jihad_layout_set_displayport2 (what the card shows, at the compositor's shift, in
layout device px: patch 0059) never reached a paint: a zoomed-in card's displayport covered only
what the margins and the clamp into the scrollable rect happened to reach. With no margins (the
daemon's first paint after a zoom, what the card shows only) desktop Wikipedia at 2.33 painted 660
of the 531..861 CSS px the card showed and the rest of the view stayed white (frame dumps,
2026-10-25: the painted edge at 1536 screen px, the aligned width of a base 1116 px wide at
resolution 1). On the GPU path, once the daemon has set the root's base
(nsLayoutUtils::JihadKeepsDisplayPortBase: the frame carries the shown size), the paint keeps it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 08:53:33 -05:00
NotAlexNoyleandClaude Fable 5.1 c3ea919c89 layout: the GPU path's root displayport and clip at a resolution — the base in layout device px at the card's shift (jihad_layout_set_displayport2), the scroll port as the root's display-list clip
T-524 (2026-10-24), found with the emulated finger on desktop Wikipedia (laid out 1116x1374, the card's
view 330 CSS px wide at a zoom of 2.33, 531 px from the engine's scroll, which has no sideways range):

1. GetDisplayPortFromMarginsData takes the root's base rect in layout device px: it scales it by the
   parent's resolution (1 for the root content document) and divides base + margins by the cumulative
   resolution. jihad_layout_set_displayport set the scroll port in CSS px as the base, so at 2.33 the
   1116 px base became 479 CSS px and the 165 px margins 71: the displayport ended 550 px from the
   engine's scroll, the card's right third was white at 2.33, two thirds at 2.71, all of it from 2.98.
   jihad_layout_set_displayport2 takes where the card's view sits (the compositor's shift) and makes
   the base what the card shows, at the shift, times the resolution, the margins times the resolution.
   The old entry calls it with no shift. The daemon passes the shift and sets the displayport again when
   the shift leaves the re-anchor margin or the zoom changes.

2. nsGfxScrollFrame divided the root content document's display-list clip by the resolution. Gecko's
   composition size for that root is the widget's device px; the GPU path's (CalculateCompositionSizeForFrame's
   Jihad branch) is the scroll port or what the card shows, in CSS px, so the clip became 479 CSS px wide
   at 2.33 and a tap on anything beyond it hit only <html> (the infobox's links). The port is the clip on
   the GPU path; the overscan rows are CSS px too.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-03 08:53:32 -05:00
NotAlexNoyle 3b3430dd03 gpu compositor: the root scroll frame's clip widened by the card's overscan
The GPU path's frame now carries rows above and below what the card shows, so the card has content
to pan into between frames and while the main thread is busy (it showed grey past a view-sized
frame's edges). jihad_layout_set_overscan(docshell, top, bottom) sets them (CSS px) as a frame
property on the root scroll frame; with JIHAD_GPU_COMPOSITOR its clip in BuildDisplayList is widened
by them (over the resolution, as the composition size is).
2026-11-03 08:53:31 -05:00
NotAlexNoyle 07bde00e35 gpu compositor: the card's scroll applied in the compositor; frame-sized surfaces; band frames on their own surface
T-502 (2026-10-18). Without APZ a scroll was a main-thread scroll: every step repainted the
newly exposed strip and re-uploaded the content layer. The daemon now sends the card's scroll
(jihad_offscreen_set_scroll) and AsyncCompositionManager applies it as an async transform on the
layer carrying the root content metrics, the way APZ would, with AlignFixedAndStickyLayers keeping
fixed and sticky layers still. For that, without APZ: root scroll metadata and the scrollport as a
scroll clip for a root scroll frame with a displayport (nsDisplayList, nsGfxScrollFrame), the
displayport set from layout (jihad_layout_set_displayport), and no intermediate surface for a
container under an axis-aligned scale+translate (Layers.cpp).

The Adreno 220 driver bins an FBO render by the current EGL surface's size: a 942-row frame in a
1400-row pbuffer lost its bottom 458 GL rows in some composites. The context's pbuffer is made the
frame's size (GLContextEGL::JihadUsePBufferOfSize) and the window targets with it. Scroll-only
frames (no composite request since the last composite) compose their bands stacked on their own
768x256 pbuffer and FBO, which stays current between band frames (the switch into it costs
11-13 ms); the rows kept are moved while the GPU works; one read takes the stack. A done-fd
(jihad_offscreen_set_done_fd) wakes the daemon the moment a job finishes. Nothing touches a job
after its hand-off.
2026-11-03 08:53:31 -05:00
MeladJM bb45d38314 Issue #2499 - Part 3: Add CSS clip overflow support with serialization fixes 2025-07-08 05:46:54 +08:00
Francis Dominic Fajardo d4a327c694 Issue #2765 - Follow-up: Fix UAF when returning the non-NAC style context from a frameless node 2025-06-28 11:05:45 +08:00
Francis Dominic Fajardo 37c462a7b3 Issue #2765 - Part 3: Make scrollbar width checks use the originating non-NAC style context 2025-06-26 22:59:55 +08:00
Francis Dominic Fajardo 0c5885b853 Issue #2765 - Part 1: Scrollbar width should be treated as a non-inherited property
Note: non-inherited properties are stored in "reset" style structs.

Previous implementation treats it as an inherited property, which
doesn't match the spec.

This also fixes the incorrect behavior when using the `unset` value
for this property by specifying SETVAL_UNSET_INITIAL in the mask.
2025-06-26 22:55:19 +08:00
Moonchild 11c9b60eba Issue #1925 - Convert half-corner index macros to an enum. 2024-08-02 08:01:01 +02:00
athenian200 b787af5702 Issue #1638 - Part 1: Put NPAPI code behind MOZ_ENABLE_NPAPI.
Adds --disable-npapi as an additional build option. The default is still to build in NPAPI compatibility, but with this flag, it's finally possible to build without pulling in GTK2 on systems that don't have the package.

This essentially ifdefs everything associated with NPAPI, following various Mozilla removal bugs.

Ref: BZ 1682030, BZ 1251202, BZ 1217665, BZ 1687239
2024-01-10 04:03:35 -06:00
Job Bautista b3cacb2c3a Issue #1916 - Part 1: Convert flags passed to ReflowChild, FinishReflowChild, etc into an enum class.
Backported from Mozilla bug 1571250.
2022-06-17 16:05:57 +08:00
Moonchild 44e35f67b4 Issue #1853 - Follow-up: extend attribution mapping to resize and corner
controls to allow themes to respond to scrollbar-width.

Also clean up the comments and whitespace a bit.
2022-04-08 00:57:11 +02:00
Moonchild e49b80dba7 Issue #1853 - Map scrollbar-width to an element attribute.
By mapping this to an attribute, this allows browser themes to respond to
the various available scrollbar width settings in CSS.
2022-04-08 00:40:49 +02:00
Moonchild ee86d3eb9c Issue #21 - Remove Telemetry plumbing and fix build.
Note this won't give working applications. Requires FE changes and
additional js module changes (next part).
2022-04-02 14:39:54 +02:00
Moonchild c05bca3168 Issue #1705 - Part 5: Implement scrollbar-width:none for all target platforms. 2021-01-08 14:15:50 +00:00
Moonchild 0e6a9cc60a Issue #1705 - Part 3: Rename ScrollbarStyles to ScrollStyles.
ScrollbarStyles contains values of overflow, (over)scroll-behavior, etc.
The only one which is marginally related to scroll _bars_ is overflow, which can
be used to hide scrollbar (by making an element not scrollable) or enforce the
scrollbar to display.

It makes more sense to be called ScrollStyles as it's mainly concerning behavior
of scrolling, not scrollbars. Also, with the addition of scrollbar width
properties, the current name can be confusing.
2021-01-06 16:31:36 +00:00
Moonchild 4681e04dc5 Issue #1705 - Part 2: Add a ShowScrollbar enum to be used in ScrollReflowInput.
Overflow properties have two purposes:
1. controlling whether the scrollbar should be shown;
2. controlling whether the content is scrollable.

However, with the scrollbar-width property being added, scrollability and
presence of a scrollbar are no longer tied together.
This patch makes a separation between the value of overflow and the presence of
a scrollbar by making it clear that for ScrollReflowInput, we only care about
whether scrollbar should be shown.
This should make it easier to write the logic involving presence of the
scrollbar based on webdev choice.
2021-01-06 12:48:38 +00:00
Moonchild ae2a160348 Issue #1053 - Part 2a: Remove android from /layout (partial)
This removes android code from base, build, forms, generic, inspector, style,
printing, tools and xul.
2020-12-26 10:16:55 +00:00
win7-7 130df5da4f Issue #1355 - Preemptively fix build bustage for 1409114 2020-05-08 15:22:22 +03:00
win7-7 f102e7f80d Issue #1355 - Store the dirty rect on the display list builder rather than passing it as a parameter to BuildDisplayList
Also fix build bustage for De-unified layout/xul in nsRootBoxFrame.cpp
2020-05-08 15:20:01 +03:00
wolfbeast 793da7dd62 Revert "Issue #1355 - Better way to create display items for column backgrounds"
This reverts commit 44c47c5038.
2020-02-26 20:51:22 +01:00
win7-7 44c47c5038 Issue #1355 - Better way to create display items for column backgrounds
Part 1: Remove current table item, as it's never set.

Part 2: Get rid of generic table painting code, and handle each class separately.

Part 4: Hoist outline skipping into col(group) frame code.

Part 5: Skip box-shadow for table column and column groups.

Part 6: Store column and column group backgrounds separately, and then append them before the rest of the table contents.

Part 7: Pass rects in display list coordinates to AppendBackgroundItemsToTop.

Part 8: Create column and column group background display items as part of the cell's BuildDisplayList.

Part 9: Used cached values instead of calling nsDisplayListBuilder::ToReferenceFrame when possible, since it can be expensive when the requested frame isn't the builder's current frame.

Part 10: Make sure we build display items for table parts where only the normal position is visible, since we may need to create background items for ancestors at that position.

Part 11: Create an AutoBuildingDisplayList when we create background items for table columns and column groups, so that we initialize the invalidation state correctly.
2020-02-25 00:17:54 +02:00
wolfbeast 3b2c342f38 Make sure we remove our RefreshDriver observers in CompleteAsyncScroll.
Follow-up to fdbac09596
2018-11-02 10:47:05 +01:00
wolfbeast fdbac09596 Ensure that the scroll frame deregisters its refresh driver observers (mAsyncScroll & mAsyncSmoothMSDScroll) before it's destroyed.
Tag #345
2018-10-31 18:47:29 +01:00
wolfbeast b7d9dad58e Remove MOZ_B2G leftovers and some dead B2G-only components. 2018-05-12 14:32:03 +02:00
Matt A. Tobin 5f8de423f1 Add m-esr52 at 52.6.0 2018-02-02 04:16:08 -05:00