Commit Graph

1845 Commits

Author SHA1 Message Date
Miko Mynttinen
4818bf20d6 Bug 1546955 - Part 2: Make all display item constructors take nsDisplayListBuilder and frame as the first two parameters r=mattwoodrow
Depends on D28844

Differential Revision: https://phabricator.services.mozilla.com/D28846

--HG--
extra : moz-landing-system : lando
2019-05-05 21:45:31 +00:00
Miko Mynttinen
1d36aadb94 Bug 1546955 - Part 1: Invoke display item copy-constructors through MakeClone() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D28844

--HG--
extra : moz-landing-system : lando
2019-05-05 21:05:33 +00:00
Matt Woodrow
ca8d64ee34 Bug 1522455 - Position sticky can be handled by the compositor, so should be considered an async AGR. r=miko
Differential Revision: https://phabricator.services.mozilla.com/D29796

--HG--
extra : moz-landing-system : lando
2019-05-03 13:22:27 +00:00
Miko Mynttinen
85748ab45f Bug 1547420 - Handle bounds overflow in FrameLayerBuilder::PaintItems() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D29754

--HG--
extra : moz-landing-system : lando
2019-05-03 15:15:44 +00:00
Emilio Cobos Álvarez
b3863ed908 Bug 1547792 - AspectRatio should be a single ratio, not a size. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D29244

--HG--
extra : moz-landing-system : lando
2019-05-02 23:28:21 +00:00
Masayuki Nakano
c842b7b133 Bug 253889 - part 4: Finally, get rid of nsIPresShell r=emilio
And also this cleans up some legacy comments of PresShell users.

Differential Revision: https://phabricator.services.mozilla.com/D29313

--HG--
extra : moz-landing-system : lando
2019-05-01 02:28:59 +00:00
violet
96e3a70dc5 Bug 608812 - GetTransformForRendering() should have the same rounding behavior r=emilio
The comment in nsDisplayTransform::GetTransformForRendering() clearly
says that |aOutOrigin| should return the same offset as GetTransform().

GetTransform() will pass the offset to GetResultingTransformMatrix()
which will round it in many cases to avoid subpixel blurry rendering.

But GetTransformForRendering() doesn't take this rounding into account,
thus contradicting the intent described by the comment.

This rounding is important to keep subpixel behavior consistent with
or without webrender enabled. Currently, SVG will be rendered blurry
in some cases if it's at a subpixel position. After fixing the problem
in non-webrender case, the strange blur still occurs in webrender case.
It turns out to be caused by this inconsistency.

Differential Revision: https://phabricator.services.mozilla.com/D29495

--HG--
extra : moz-landing-system : lando
2019-05-01 15:20:31 +00:00
violet
3c2c9a686e Bug 608812 - Should snap subpixel value for outer svg and anon child r=longsonr
We should  snap subpixel value at nsDisplayTransform::GetResultingTransformMatrix
for outer svg and the anon child. This will solve blurry rendering for subpixel position
when webrender is __not__ enabled.

Differential Revision: https://phabricator.services.mozilla.com/D29344

--HG--
extra : moz-landing-system : lando
2019-05-01 17:53:32 +00:00
Matt Woodrow
5e7af24291 Bug 1547986 - Don't early return in PreProcessDisplayList if we need to re-link the display list on exit. r=miko
This early return is just an optimization to prevent the DAG from becoming too complex, and if we're keeping the list linked, then we know it won't be getting more complex on the current paint.
Future paints that actually modify the list will still take this path.

Differential Revision: https://phabricator.services.mozilla.com/D29408

--HG--
extra : moz-landing-system : lando
2019-05-01 17:34:45 +00:00
Emilio Cobos Álvarez
0593b77cc0 Bug 1547674 - Use rust types for gradient stops. r=boris
This doesn't clean up all that much, yet, but it's a step in the right
direction.

Differential Revision: https://phabricator.services.mozilla.com/D29168

--HG--
extra : moz-landing-system : lando
2019-04-30 20:37:54 +00:00
Matt Woodrow
450f1a6f89 Bug 1544948 - Skip merging display lists that we're sure can't have changed. r=miko
ComputeRebuildRegion sets ForceDescendIntoIfVisible on all modified frames and their ancestors,
so we can use this to detect if a display list might have modified children by looking for this
flag on the container item.

We still need to run PreProcessDisplayList on the list, so that we can remove items that belong
to a deleted frame, and build the old items array (including placeholders for the deleted items)
so that it matches our DAG.

If we wanted to skip serialization to the old items array, then we'd need to remove the deleted
item entries from the DAG too, including connecting predecessors of the deleted entry to entries
that have that deleted entry as their predecessor. That's hard to do in-place, so we leave
the empty entries in the old items list to act as placeholders until we next merge this list
properly.

Differential Revision: https://phabricator.services.mozilla.com/D27822

--HG--
extra : moz-landing-system : lando
2019-04-29 03:14:49 +00:00
Botond Ballo
990ed4ad66 Bug 1529892 - Limit the area of a fixed-position element that's painted to the displayport. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D28775

--HG--
extra : moz-landing-system : lando
2019-04-26 05:12:33 +00:00
Botond Ballo
798222c284 Bug 1529892 - Add a mochitest to check that the rendered area for a fixed-position element matches our expectations. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D28774

--HG--
extra : moz-landing-system : lando
2019-04-26 05:12:28 +00:00
Botond Ballo
f250152f55 Bug 1529892 - Use zooming pref rather than platform ifdef in OutOfFlowDisplayData::ComputeVisibleRectForFrame(). r=kats
Differential Revision: https://phabricator.services.mozilla.com/D28772

--HG--
extra : moz-landing-system : lando
2019-04-26 05:10:34 +00:00
Emilio Cobos Álvarez
11ea945833 Bug 1546697 - Use a consistent style for enum classes in layout. r=dholbert
Per the discussion in:

  https://groups.google.com/d/msg/mozilla.dev.platform/P79pwa9z5m8/iPYPAWPHCAAJ

They should be CamelCase, and that's what most of them already do. This converts
the rest, which are a few.

For the ones that already used `e` or `k` prefixes, I've mostly done:

 for file in $(rg Type::e layout | cut -d : -f 1 | sort | uniq); do sed -i 's#Type::e#Type::#g' $file; done

For the ones that used uppercase, I've removed the prefix if it was already in
the type name, and turn them into CamelCase.

Depends on D28680

Differential Revision: https://phabricator.services.mozilla.com/D28681

--HG--
extra : moz-landing-system : lando
2019-04-25 23:03:04 +00:00
Brindusan Cristian
f92b05e5f0 Merge inbound to mozilla-central. a=merge
--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
2019-04-25 00:54:01 +03:00
Miko Mynttinen
85b1e55dd4 Bug 1544798 - Do not paint items with empty truncated bounds in DebugPaintItem() r=kamidphish
Differential Revision: https://phabricator.services.mozilla.com/D28465

--HG--
extra : moz-landing-system : lando
2019-04-24 02:39:03 +00:00
Alexis Beingessner
8289701d8c Bug 1536121 - rearchitect the webrender display-list. r=gw
disclaimer: this isn't an *amazing* cleanup, but more of a major step that
unlocks the ability to do more minor cleanups and refinements. There's some
messy things and inconsistencies here and there, but we can hopefully iron
them out over time.

1. The primary change here is to move from
    struct { common_fields, enum(specific_fields) }
to
    enum (maybe_common_fields, specific_fields)

most notably this drops the common fields from a ton of things
that don't need them PopXXX, SetXXX, ClipChain, etc.

2. Additionally some types have had some redundant states shaved off,
for instance, rect no longer has *both* bounds and a clip_rect, as
the intersection of the two can be used. This was done a bit conservatively
as some adjustments will need to be done to the backend to fully eliminate
some states, and this can be done more incrementally.

2.5. As a minor side-effect of 2, we now early-reject some primitives whose
bounds and clip_rect are disjoint.

3. A HitTest display item has been added, which is just a Rect without
color. In addition to the minor space wins from this, this makes it much
easier to debug display lists

4. Adds a bunch of comments to the display list, making it easier to understand
things.

The end result of all these changes is a significantly smaller and easier to
understand display list. Especially on pages like gmail which have so many
clip chains. However this ultimately just makes text an even greater percentage
of pages (often 70-80%).

Differential Revision: https://phabricator.services.mozilla.com/D27439

--HG--
extra : moz-landing-system : lando
2019-04-23 17:29:58 +00:00
Dorel Luca
0caaab0f1e Backed out 2 changesets (bug 1536121) for Reftest failures
Backed out changeset 0fc395a2ac71 (bug 1536121)
Backed out changeset 430032511561 (bug 1536121)

--HG--
extra : rebase_source : 95c710b24ec5b76da20ddb5573036c8c73873e9e
2019-04-23 10:05:14 +03:00
Alexis Beingessner
ee4e394f45 Bug 1536121 - rearchitect the webrender display-list. r=gw
disclaimer: this isn't an *amazing* cleanup, but more of a major step that
unlocks the ability to do more minor cleanups and refinements. There's some
messy things and inconsistencies here and there, but we can hopefully iron
them out over time.

1. The primary change here is to move from
    struct { common_fields, enum(specific_fields) }
to
    enum (maybe_common_fields, specific_fields)

most notably this drops the common fields from a ton of things
that don't need them PopXXX, SetXXX, ClipChain, etc.

2. Additionally some types have had some redundant states shaved off,
for instance, rect no longer has *both* bounds and a clip_rect, as
the intersection of the two can be used. This was done a bit conservatively
as some adjustments will need to be done to the backend to fully eliminate
some states, and this can be done more incrementally.

2.5. As a minor side-effect of 2, we now early-reject some primitives whose
bounds and clip_rect are disjoint.

3. A HitTest display item has been added, which is just a Rect without
color. In addition to the minor space wins from this, this makes it much
easier to debug display lists

4. Adds a bunch of comments to the display list, making it easier to understand
things.

The end result of all these changes is a significantly smaller and easier to
understand display list. Especially on pages like gmail which have so many
clip chains. However this ultimately just makes text an even greater percentage
of pages (often 70-80%).

Differential Revision: https://phabricator.services.mozilla.com/D27439

--HG--
extra : moz-landing-system : lando
2019-04-23 02:32:50 +00:00
Miko Mynttinen
84624b4a42 Bug 1540785 - Part 2: Devirtualize nsDisplayItemBase::GetPerFrameKey() r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D27580

--HG--
extra : moz-landing-system : lando
2019-04-22 19:58:01 +00:00
Miko Mynttinen
f579c8f5c5 Bug 1540785 - Part 1: Introduce nsDisplayItemBase r=mattwoodrow
***

Differential Revision: https://phabricator.services.mozilla.com/D27579

--HG--
extra : moz-landing-system : lando
2019-04-22 19:57:59 +00:00
Sylvestre Ledru
a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D28329

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Ryan Hunt
d6509bb237 Bug 1534395 - Rename TabChild to BrowserChild. r=nika
This commit renames TabChild to BrowserChild.

Differential Revision: https://phabricator.services.mozilla.com/D28135

--HG--
rename : dom/base/InProcessTabChildMessageManager.cpp => dom/base/InProcessBrowserChildMessageManager.cpp
rename : dom/base/InProcessTabChildMessageManager.h => dom/base/InProcessBrowserChildMessageManager.h
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabChild.h => dom/ipc/BrowserChild.h
extra : rebase_source : e7fcfb845a971a2760e73d517e24da18ce2551b5
extra : histedit_source : d1991334ccb107fe56e478865f22fd97b041a317
2019-04-09 17:39:01 -05:00
Alexis Beingessner
72aa57aea1 Bug 1544895 - revert back to old bad bounds to pick lesser evil for now. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D27965

--HG--
extra : moz-landing-system : lando
2019-04-18 13:03:28 +00:00
Dan Glastonbury
ea351adb8a Bug 1526972 - P8: Reset InInvalidSubtree when processing unrelated frames. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26141

--HG--
extra : moz-landing-system : lando
2019-04-18 02:41:33 +00:00
Dan Glastonbury
4c428d9c74 Bug 1526972 - P7: Move AutoBuildingDisplayList constructor into .cpp r=miko
Differential Revision: https://phabricator.services.mozilla.com/D26140

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:26 +00:00
Dan Glastonbury
def88697c2 Bug 1526972 - P6: Mark invalidated SubDocument frame as modified. r=miko,mattwoodrow
Depends on D24463

Differential Revision: https://phabricator.services.mozilla.com/D26139

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:24 +00:00
Dan Glastonbury
d28e1631fd Bug 1526972 - P5: Avoid HasModifiedFrame check for new nsDisplayItems. r=miko
aBuilder->InInvalidSubtree() tracks the modified state. Save the state
during construction of nsDisplayItem and use in ProcessItemFromNewList.

Depends on D24462

Differential Revision: https://phabricator.services.mozilla.com/D26138

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:22 +00:00
Dan Glastonbury
4bc88f78ba Bug 1526972 - P4: Limit AnyContentAncestorModified frame walk to frame of outer item. r=miko
Don't walk frame tree all the way to the root.

Depends on D24461

Differential Revision: https://phabricator.services.mozilla.com/D26137

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:20 +00:00
Dan Glastonbury
a3fd49025b Bug 1526972 - P3: De-virtualize HasDeletedFrame(). r=miko
To avoid expensive virtual dispatch in PreProcessDisplayList().

Depends on D24460

Differential Revision: https://phabricator.services.mozilla.com/D26136

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:17 +00:00
Dan Glastonbury
b8327e00aa Bug 1526972 - P2: Re-order mItem->CanBeReused()/mItem->HasDeletedFrame(). r=miko
To short-circuit the expensive call with a flag check.

Depends on D24459

Differential Revision: https://phabricator.services.mozilla.com/D26135

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:15 +00:00
Dan Glastonbury
d361d6bc8e Bug 1526972 - P1: Compress bool state into bit flags. r=miko
Also move to first cache-line (64-bytes) of nsDisplayItem to improve D-cache hit
when accessing mFrame, mItemFlags, etc.

Differential Revision: https://phabricator.services.mozilla.com/D26134

--HG--
extra : moz-landing-system : lando
2019-04-18 02:38:13 +00:00
Masayuki Nakano
f5737567dd Bug 1544343 - part 3: Make layout use mozilla::PresShell instead of nsIPresShell as far as possible r=emilio
This patch changes remaining things under `layout/`.  However, there are some
places which still need to use `nsIPresShell`.  That will be fixed in a
follow up bug.

Differential Revision: https://phabricator.services.mozilla.com/D27477

--HG--
extra : moz-landing-system : lando
2019-04-16 07:25:10 +00:00
Miko Mynttinen
49e63bdf19 Bug 1544583 - Change RDL list index to uint32_t r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D27623

--HG--
extra : moz-landing-system : lando
2019-04-15 23:16:30 +00:00
Alexis Beingessner
92010a39a6 Bug 1529992 - don't apply shadow adjustment to text bounds in gecko with WR r=mattwoodrow
And tell webrender to do them itself (they have fundamental mismatches in how they
define shadow bounds).

Differential Revision: https://phabricator.services.mozilla.com/D26845

--HG--
extra : moz-landing-system : lando
2019-04-15 23:13:47 +00:00
Daniel Varga
e452ed972c Backed out 2 changesets (bug 1529992) for reftest failure at http://10.0.2.2:8854/tests/layout/reftests/bugs/1529992-1.html == http://10.0.2.2:8854/tests/layout/reftests/bugs/1529992-1-ref.html. On a CLOSED TREE
Backed out changeset 87b64e169b1b (bug 1529992)
Backed out changeset ddf29d68efb2 (bug 1529992)
2019-04-15 23:22:29 +03:00
Alexis Beingessner
f901a109e4 Bug 1529992 - don't apply shadow adjustment to text bounds in gecko with WR r=mattwoodrow
And tell webrender to do them itself (they have fundamental mismatches in how they
define shadow bounds).

Differential Revision: https://phabricator.services.mozilla.com/D26845

--HG--
extra : moz-landing-system : lando
2019-04-15 17:25:26 +00:00
Kartikaya Gupta
25f7a03029 Bug 1543482 - Extract a helper to identify clip paths WR can handle without masks. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D27454

--HG--
extra : moz-landing-system : lando
2019-04-15 11:24:53 +00:00
Csoregi Natalia
612325227f Backed out 8 changesets (bug 1526972) for causing crashes (bug 1544406). a=backout
Backed out changeset 815543d81a1d (bug 1526972)
Backed out changeset a895c9028b31 (bug 1526972)
Backed out changeset 2ea2f8533078 (bug 1526972)
Backed out changeset 2fb940b13971 (bug 1526972)
Backed out changeset 8543b9d46521 (bug 1526972)
Backed out changeset ddd57e437228 (bug 1526972)
Backed out changeset 54b14df56e6f (bug 1526972)
Backed out changeset a59f06022a95 (bug 1526972)
2019-04-15 18:15:49 +03:00
Dan Glastonbury
a114224ced Bug 1526972 - P8: Reset InInvalidSubtree when processing unrelated frames. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D26141

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:21 +00:00
Dan Glastonbury
d0154f8169 Bug 1526972 - P7: Move AutoBuildingDisplayList constructor into .cpp r=miko
Differential Revision: https://phabricator.services.mozilla.com/D26140

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:19 +00:00
Dan Glastonbury
a161bca51c Bug 1526972 - P6: Mark invalidated SubDocument frame as modified. r=miko,mattwoodrow
Depends on D24463

Differential Revision: https://phabricator.services.mozilla.com/D26139

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:17 +00:00
Dan Glastonbury
fe78904f60 Bug 1526972 - P5: Avoid HasModifiedFrame check for new nsDisplayItems. r=miko
aBuilder->InInvalidSubtree() tracks the modified state. Save the state
during construction of nsDisplayItem and use in ProcessItemFromNewList.

Depends on D24462

Differential Revision: https://phabricator.services.mozilla.com/D26138

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:15 +00:00
Dan Glastonbury
ec2db657b0 Bug 1526972 - P4: Limit AnyContentAncestorModified frame walk to frame of outer item. r=miko
Don't walk frame tree all the way to the root.

Depends on D24461

Differential Revision: https://phabricator.services.mozilla.com/D26137

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:13 +00:00
Dan Glastonbury
821a5af7e1 Bug 1526972 - P3: De-virtualize HasDeletedFrame(). r=miko
To avoid expensive virtual dispatch in PreProcessDisplayList().

Depends on D24460

Differential Revision: https://phabricator.services.mozilla.com/D26136

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:11 +00:00
Dan Glastonbury
d6813ac163 Bug 1526972 - P2: Re-order mItem->CanBeReused()/mItem->HasDeletedFrame(). r=miko
To short-circuit the expensive call with a flag check.

Depends on D24459

Differential Revision: https://phabricator.services.mozilla.com/D26135

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:09 +00:00
Dan Glastonbury
a9319e3ae3 Bug 1526972 - P1: Compress bool state into bit flags. r=miko
Also move to first cache-line (64-bytes) of nsDisplayItem to improve D-cache hit
when accessing mFrame, mItemFlags, etc.

Differential Revision: https://phabricator.services.mozilla.com/D26134

--HG--
extra : moz-landing-system : lando
2019-04-15 00:23:07 +00:00
Kartikaya Gupta
937b89a55a Bug 1542019 - Split the dispatch-to-content flag into three. r=botond,hsivonen
This patch extracts two additional CompositorHitTestInfo flags from the
eDispatchToContent flag; eApzAwareListeners for elements that have
APZ-aware listeners, and eInactiveScrollframe for inactive scrollframe
or unlayerized scrollthumbs. The eDispatchToContent is then renamed to
eIrregularArea to reflect the fact that it is used for irregular-shaped
areas that require main-thread hit-testing.

Additionally, it is important to note that when using the non-WebRender
codepath, all three of these flags still end up gettings squashed into
the "dispatch to content" region on the EventRegions; when APZ
reconstructs a CompositorHitTestInfo it will turn anything in this
region back into an eIrregularArea. So this is a lossy round-trip
conversion for the non-WebRender case. However it should still result in
correct behaviour because the semantics of eIrregularArea result in APZ
relying on the main-thread to do hit-testing and so any APZ-aware
listeners and inactive scrollframes are also handled by the main-thread.

Differential Revision: https://phabricator.services.mozilla.com/D26440

--HG--
extra : moz-landing-system : lando
2019-04-11 13:31:53 +00:00
violet
ed94c070ef Bug 1543577 - Remove useless parameter aImageSize from nsLayoutUtils::DrawBackgroundImage r=emilio
aImageSize parameter is only used for SVG background image to pass the intrinsic size.
After bug 1524901, it becomes useless. Let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D27051

--HG--
extra : moz-landing-system : lando
2019-04-11 11:52:03 +00:00