Commit Graph

21886 Commits

Author SHA1 Message Date
Simon Giesecke
b5855b89fc Bug 1634281 - Remove unused nsDataHashtable.h includes. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D106007
2021-03-03 08:58:52 +00:00
Olli Pettay
bba6b348ae Bug 1689601, nested freeze/thaw, r=peterv
Non-SHIP bfcache seems to be rather complicated here, since it needs to explicitly store inner windows and what not.
SHIP should be able to handle this in a simpler way.
It is possible that some ordering needs still tweaking.

Differential Revision: https://phabricator.services.mozilla.com/D105360
2021-03-02 12:13:20 +00:00
Emilio Cobos Álvarez
c17b1c2e53 Bug 1695390 - Move extremum lengths to the individual Size / MaxSize types. r=boris
This will prevent growing them when introducing fit-content(<length>).

This can _almost_ be derived, if it wasn't because of the quirky stuff.
I think the macro is probably good enough for now but let me know if you
disagree.

Differential Revision: https://phabricator.services.mozilla.com/D106713
2021-03-02 12:11:35 +00:00
Brindusan Cristian
82efbb80e1 Backed out changeset be6d9849825d (bug 1695390) for wr failures in col-definite-max-size-001.html. CLOSED TREE 2021-03-02 13:41:40 +02:00
Mihai Alexandru Michis
87f481bf9a Backed out 16 changesets (bug 1689601) for causing cpp bustages in nsFrameLoader.
CLOSED TREE

Backed out changeset 6e5523a7210d (bug 1689601)
Backed out changeset 745eaa468c74 (bug 1689601)
Backed out changeset a594bd02b8b6 (bug 1689601)
Backed out changeset 0c5fe977ced6 (bug 1689601)
Backed out changeset 2fca23521891 (bug 1689601)
Backed out changeset 334aeb627855 (bug 1689601)
Backed out changeset 2b2081a15d67 (bug 1689601)
Backed out changeset 307bde43cc96 (bug 1689601)
Backed out changeset 04aadec67ce2 (bug 1689601)
Backed out changeset 701eccb34772 (bug 1689601)
Backed out changeset 278db692aa8b (bug 1689601)
Backed out changeset c261c243a64d (bug 1689601)
Backed out changeset 7e8022e5696a (bug 1689601)
Backed out changeset 6138bfc6c08d (bug 1689601)
Backed out changeset 63295b3a62d0 (bug 1689601)
Backed out changeset 6d02e59ddc51 (bug 1689601)
2021-03-02 13:15:10 +02:00
Emilio Cobos Álvarez
b5686164be Bug 1695390 - Move extremum lengths to the individual Size / MaxSize types. r=boris
This will prevent growing them when introducing fit-content(<length>).

This can _almost_ be derived, if it wasn't because of the quirky stuff.
I think the macro is probably good enough for now but let me know if you
disagree.

Differential Revision: https://phabricator.services.mozilla.com/D106713
2021-03-02 10:34:39 +00:00
Olli Pettay
9a08f751a4 Bug 1689601, nested freeze/thaw, r=peterv
Non-SHIP bfcache seems to be rather complicated here, since it needs to explicitly store inner windows and what not.
SHIP should be able to handle this in a simpler way.
It is possible that some ordering needs still tweaking.

Differential Revision: https://phabricator.services.mozilla.com/D105360
2021-03-02 09:44:13 +00:00
Hiroyuki Ikezoe
b7d077670b Bug 1678505 - s/VerticalScollDirection/VerticalScrollDirection/. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103411
2021-03-02 08:06:25 +00:00
Simon Giesecke
8ecfb38a41 Bug 1691913 - Remove uses of nsDataHashtable::GetValue. r=xpcom-reviewers,necko-reviewers,dragana,nika
GetValue is going to be removed in a subsequent patch. It is no longer needed,
because it can be replaced by functions already provided by nsBaseHashtable,
in particular Lookup and Contains.

Also, its name was confusing, since it specifically returns a pointer that
allows and is intended for modifying the entry within the hashtable, rather
than returning by-value. According to the naming rules to be set on
nsBaseHashtable, it would also needed to be renamed to "Lookup*. Removing
its uses saves this effort.

Differential Revision: https://phabricator.services.mozilla.com/D105476
2021-03-01 09:59:30 +00:00
Mats Palmgren
26330a08b1 Bug 1694459 - Deal with 'display:contents' style changes on <fieldset> descendants better where it affects which <legend> is the rendered legend. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106566
2021-03-01 03:42:41 +00:00
Csoregi Natalia
52a3b19a3d Merge autoland to mozilla-central. a=merge 2021-02-27 11:43:56 +02:00
Csoregi Natalia
b08394edf3 Backed out 11 changesets (bug 1678505) for causing crashes. a=backout
Backed out changeset 7cd5f2c1c3f4 (bug 1678505)
Backed out changeset 09f4c4093c07 (bug 1678505)
Backed out changeset 76e3f391b7dd (bug 1678505)
Backed out changeset 6a0e949d4a2d (bug 1678505)
Backed out changeset 69c7b98ac8f6 (bug 1678505)
Backed out changeset 63608c5df1b0 (bug 1678505)
Backed out changeset a4532c4a1768 (bug 1678505)
Backed out changeset 09aab64b89cd (bug 1678505)
Backed out changeset e832d2bfe7a6 (bug 1678505)
Backed out changeset e0898b4f9fe6 (bug 1678505)
Backed out changeset 04a759c327cd (bug 1678505)
2021-02-27 11:26:46 +02:00
Emilio Cobos Álvarez
b1199d9e09 Bug 1695314 - Frame constructor shouldn't use nsIFrame::IsFloating to determine whether it should create a float. r=TYLin
It should just look at the float style. This shouldn't be a behavior
change because SVG text should pass false for aCanBeFloated.

This unblocks bug 1690701 because checking the out of flow frame bit
here would be wrong (we're deciding whether the frame should be out of
flow so the bit isn't set yet).

Differential Revision: https://phabricator.services.mozilla.com/D106664
2021-02-26 20:03:24 +00:00
Simon Giesecke
0b443059fd Bug 1693306 - Simplify some uses of LookupOrInsertWith by GetOrInsertNew. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105479
2021-02-26 09:22:54 +00:00
Simon Giesecke
be7dc83fa6 Bug 1691913 - Mark nsBaseHashtable (and its subclasses') member functions nodiscard where appropriate. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D105474
2021-02-26 09:22:53 +00:00
Simon Giesecke
9af107a839 Bug 1691913 - Rename nsBaseHashtable::Put to InsertOrUpdate. r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
This makes the naming more consistent with other functions called
Insert and/or Update. Also, it removes the ambiguity whether
Put expects that an entry already exists or not, in particular because
it differed from nsTHashtable::PutEntry in that regard.

Differential Revision: https://phabricator.services.mozilla.com/D105473
2021-02-26 09:11:46 +00:00
Simon Giesecke
4f75368dcb Bug 1691913 - Rename nsBaseHashtable::GetOrInsert(With) to LookupOrInsert(With). r=xpcom-reviewers,necko-reviewers,jgilbert,dragana,nika
The functions should be called "Lookup" rather than "Get" because they return
a DataType& (rather than UserDataType).

Differential Revision: https://phabricator.services.mozilla.com/D105472
2021-02-26 09:11:45 +00:00
Hiroyuki Ikezoe
e21a249c77 Bug 1678505 - s/VerticalScollDirection/VerticalScrollDirection/. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D103411
2021-02-26 04:15:16 +00:00
Emilio Cobos Álvarez
249b7dc00a Bug 1691397 - Intrinsic sizes that depend on percentage-sized abspos ancestors should account for containing-block padding correctly. r=layout-reviewers,mats
Abspos boxes resolve against the pading box, and we were failing to
increase the percentage basis in that case if box-sizing was
content-box.

This is partially the cause of bug 1691374.

Differential Revision: https://phabricator.services.mozilla.com/D104389
2021-02-25 15:05:50 +00:00
Tim Nguyen
a6c8b320d3 Bug 1590884 - Extra small cleanups. DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D106278
2021-02-24 15:21:38 +00:00
Tim Nguyen
159428759d Bug 1590884 - Move XUL accesskey handling to DOM and remove nsXULLabelFrame. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D106233
2021-02-24 14:46:28 +00:00
Masayuki Nakano
1c60ca0e2c Bug 1691622 - part 12: Change the default unit of screenX/Y of synthesizeNativeMouseEvent from device pixels to CSS pixels r=smaug
For minimizing the previous patch changes, `scale`'s default value for
`screenX/Y` is treated as 1.0.  It means that `screenX/Y` are device
pixels by default, but `offsetX/Y` are in CSS pixels by default.  This
difference may make developers confused.  Therefore, we should align the
default unit of them to `screenPixelsPerCSSPixel`.  I.e., their default
unit becomes CSS pixels.

Differential Revision: https://phabricator.services.mozilla.com/D105929
2021-02-24 01:27:11 +00:00
Masayuki Nakano
876ef492b9 Bug 1691622 - part 11: Make mochitests stop using nsIDOMWindowUtils.sendNativeMouseEvent directly as far as possible r=smaug
For making the test framework/API change easier, such raw API shouldn't be
used directly.  Therefore, this patch makes tests using it directly stop
using it and use `synthesizeNativeMouseEvent` instead.

However, this patch does not fix `browser_touch_event_iframes.js` because
it accesses the API from `ContentTask`.  So, `EventUtils.js` isn't available
without larger change.

Note that this patch disables `test_bug596600.xhtml` because as I commented
in it, it's completely broken.  It depends on the race of next native event
loop and `waitForTick`, and this patch changes the result of the race.

Differential Revision: https://phabricator.services.mozilla.com/D105765
2021-02-24 01:27:11 +00:00
Masayuki Nakano
ef2253b4a1 Bug 1691622 - part 9: Make nsIWidget::SynthesizeNativeMouseEvent take an XP button ID and abstract message value r=smaug,geckoview-reviewers,agi,m_kato
Currently, it takes a raw native message value, but it makes JS content too
complicated.  And on Linux, it cannot synthesize non-primary button events
because GDK has only button press and release messages which dont' include
mouse button information.

For solving these problems, this patch creates a new abstract native message
as `nsIWidget::NativeMouseMessage` and makes each widget converts it to
a platform native message.

Additionally, this patch adds an argument to make it possible its callers
to specify pressing or releasing mouse button with a DOM mouse button value.

Note that the following patch adds new argument to
`synthesizeNativeEventMouse*` for mochitests and which will be tested by
new tests.

Differential Revision: https://phabricator.services.mozilla.com/D105763
2021-02-24 01:27:10 +00:00
Mike Hommey
2cfc4551be Bug 1694272 - Add missing #include for MakeScopeExit. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D106036
2021-02-22 22:56:01 +00:00
Simon Giesecke
7c931c97c4 Bug 1689218 - Rename nsBaseHashtable::GetAndRemove to Extract. r=necko-reviewers,dragana
First, it should be called "Lookup" rather than "Get" because it returns
DataType (rather than UserDataType), but that would still be confusing,
since as opposed to other Lookup* methods, it does not return a DataType&
(and obviously, it can't). So "Extract" seems to be a better name, cf.
mozilla::Maybe::extract.

Differential Revision: https://phabricator.services.mozilla.com/D105471
2021-02-22 12:07:48 +00:00
Simon Giesecke
c5f7800f35 Bug 1691913 - Rename nsClassHashtable::LookupOrAdd to GetOrInsertNew. r=xpcom-reviewers,nika
It should be called "Get" rather than "Lookup" because it returns
UserDataType. "Add" is called "Insert" in the other methods.

Differential Revision: https://phabricator.services.mozilla.com/D105470
2021-02-22 12:07:47 +00:00
Simon Giesecke
d2caea36fa Bug 1691894 - Simplify uses of WithEntryHandle that only use OrInsert(With) by using GetOrInsertWith. r=xpcom-reviewers,necko-reviewers,jgilbert,nika
Differential Revision: https://phabricator.services.mozilla.com/D104676
2021-02-22 12:07:46 +00:00
Henri Sivonen
9d6d02b341 Bug 1663931 - Avoid moving focus when changing iframe remoteness. r=nika,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D99215
2021-02-22 10:51:51 +00:00
Matt Woodrow
2b07ed805c Bug 1688813 - Draw position:fixed elements relative to the top-left of the document when using drawSnapshot. r=emilio,mstange
Differential Revision: https://phabricator.services.mozilla.com/D104935
2021-02-22 04:20:29 +00:00
Ting-Yu Lin
cf926779e7 Bug 1674302 Part 2 - Use StyleSizeOverrides to replace ComputeSizeFlag::UseAutoISize. r=dholbert
`UseAutoISize` flag is buggy when used on table flex items because it
never propagates to inner table frame.

Luckily, we can fix it by replacing the flag with StyleSizeOverrides
emplacing an 'auto' mStyleISize, because when computing the size, the
size overrides already propagates from table wrapper to inner table via
the following path:

  `nsTableWrapperFrame::ComputeSize()` [1] ->
  `nsTableWrapperFrame::ComputeAutoSize()` ->
  `nsTableWrapperFrame::InnerTableShrinkWrapISize()` ->
  `nsTableFrame::ComputeSize()`.

Part 3 is going to propagate the size overrides to inner table in
`nsTableWrapperFrame::CreateReflowInputForInnerTable()` during reflow.

This patch fixes the content size suggestion for table flex items.
Combining this patch with Part 3, we can fix those reftests in Part 4.

[1] In this patch, the table wrapper is still using nsContainerFrame's
ComputeSize(), but Part 3 is going to override it.

Differential Revision: https://phabricator.services.mozilla.com/D103438
2021-02-18 05:45:24 +00:00
Sean Feng
93ae22d5b9 Bug 1692350 - Implement a telemetry probe to collect page load data for documents that use lazyload r=emilio,chutten
Differential Revision: https://phabricator.services.mozilla.com/D104912
2021-02-17 22:25:02 +00:00
Mihai Alexandru Michis
8d0efc214f Backed out changeset 6a0dcd8f4e3e (bug 1692350) for causing crashes in WindowContext.
CLOSED TREE
2021-02-17 21:02:59 +02:00
Sean Feng
7917a71b50 Bug 1692350 - Implement a telemetry probe to collect page load data for documents that use lazyload r=emilio,chutten
Differential Revision: https://phabricator.services.mozilla.com/D104912
2021-02-17 17:17:52 +00:00
Boris Chiou
d9de5c2358 Bug 1690422 - Resolve {min|max}-content contribution with the preferred aspect ratio and the definite block size. r=TYLin
This is simliar with the previous patch, but we use
min-content/max-content for the inner div (i.e. child frame).

Perhaps we could remove the simliar implementation from
ComputeISizeValue(). However, I still keep it because it can avoid some
extra work when resolving {min|max}-content with aspect-ratio when
reflowing.

Differential Revision: https://phabricator.services.mozilla.com/D104476
2021-02-17 02:41:24 +00:00
Boris Chiou
181e91cf22 Bug 1690422 - Take box-sizing into account when computing the intrinsic size with the preferred aspect ratio. r=TYLin,mats
We resolve the auto value in IntrinsicForAxis by the ratio determining size
and the preferred aspect ratio. However, this should take
box-sizing into account when using aspect-ratio property.

Differential Revision: https://phabricator.services.mozilla.com/D104293
2021-02-17 02:41:24 +00:00
Dorel Luca
847a939bb4 Backed out changeset 56ce2feb53e7 (bug 1688813) for Browser-chrome failures in browser_panelUINotifications_multiWindow.js. CLOSED TREE 2021-02-16 12:36:20 +02:00
Matt Woodrow
cd814ab6a8 Bug 1688813 - Draw position:fixed elements relative to the top-left of the document when using drawSnapshot. r=emilio,mstange
Differential Revision: https://phabricator.services.mozilla.com/D104935
2021-02-16 07:38:51 +00:00
Gerald Squelart
2416d881e2 Bug 1691589 - Reduce reliance on GeckoProfiler.h when only labels (and maybe markers) are needed - r=necko-reviewers,geckoview-reviewers,sg,agi,florian
There are no code changes, only #include changes.
It was a fairly mechanical process: Search for all "AUTO_PROFILER_LABEL", and in each file, if only labels are used, convert "GeckoProfiler.h" into "ProfilerLabels.h" (or just add that last one where needed).
In some files, there were also some marker calls but no other profiler-related calls, in these cases "GeckoProfiler.h" was replaced with both "ProfilerLabels.h" and "ProfilerMarkers.h", which still helps in reducing the use of the all-encompassing "GeckoProfiler.h".

Differential Revision: https://phabricator.services.mozilla.com/D104588
2021-02-16 04:44:19 +00:00
Emilio Cobos Álvarez
5dfa54e505 Bug 1691256 - Don't reflow for background/border changes on xul appearance values. r=jfkthame
This is an optimization, but also papers about XUL widgets not dealing
particularly well with it.

Differential Revision: https://phabricator.services.mozilla.com/D105169
2021-02-15 13:19:32 +00:00
Sylvestre Ledru
b4f9be25d4 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers
Updated with clang-format version 11.0.1 (taskcluster-B6bdwSKDRF-luRQWXBuzpA)

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D105158
2021-02-15 08:49:20 +00:00
Emilio Cobos Álvarez
5a6d8228c8 Bug 1691858 - Minor cleanup of our @page rule setup. r=AlaskanEmily
Actually, there's not so much we can improve right now, in the sense
that:

 * We need the ::-moz-page-content pseudo-element to be able to set
 `display` on the page, since that's a style rule rather than a @page
 rule. We could get away without it.

 * Keeping the current code-path (slightly cleaned up) is less code, for
 now at least. We can have a separate code-path or what not that
 actually performs the @page rule selector-matching and what not if
 needed when we get to named pages or other page selectors. Selectors
 like :first should be pretty trivial to implement, actually.

We make some paged mode anon boxes non-inheriting anon boxes. This
allows us to share the styles and is generally nicer. They don't need to
inherit from anywhere.

We could remove the origin handling and don't look at UA rules or what
not, but it seems pretty harmless to do that.

We also fix the name of the pseudo-elements to match the capitalization.

Differential Revision: https://phabricator.services.mozilla.com/D104772
2021-02-12 15:42:38 +00:00
Simon Giesecke
f701c44a5c Bug 1691894 - Fix EntryHandle to only work with DataType rather than wrapping UserDataType. r=xpcom-reviewers,necko-reviewers,nika,jonco,valentin
Differential Revision: https://phabricator.services.mozilla.com/D104810
2021-02-12 15:25:40 +00:00
Butkovits Atila
2ec7c8684f Backed out changeset 80d28bc966b1 (bug 1691858) for causing failures on nsIFrame.cpp. CLOSED TREE 2021-02-12 00:10:31 +02:00
Emilio Cobos Álvarez
216b9a6afb Bug 1691858 - Minor cleanup of our @page rule setup. r=AlaskanEmily
Actually, there's not so much we can improve right now, in the sense
that:

 * We need the ::-moz-page-content pseudo-element to be able to set
 `display` on the page, since that's a style rule rather than a @page
 rule. We could get away without it.

 * Keeping the current code-path (slightly cleaned up) is less code, for
 now at least. We can have a separate code-path or what not that
 actually performs the @page rule selector-matching and what not if
 needed when we get to named pages or other page selectors. Selectors
 like :first should be pretty trivial to implement, actually.

We make some paged mode anon boxes non-inheriting anon boxes. This
allows us to share the styles and is generally nicer. They don't need to
inherit from anywhere.

We could remove the origin handling and don't look at UA rules or what
not, but it seems pretty harmless to do that.

We also fix the name of the pseudo-elements to match the capitalization.

Differential Revision: https://phabricator.services.mozilla.com/D104772
2021-02-11 20:52:25 +00:00
Barret Rennie
5bf6b5a218 Bug 1689261 - Remove TIME_TO_FIRST_INTERACTION_{NO_,}PRELOAD_MS probes r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104785
2021-02-11 18:21:04 +00:00
Barret Rennie
c7a1ab4559 Bug 1689261 - Remove LOAD_INPUT_EVENT_RESPONSE_{NO_,}PRELOAD_MS probes r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D104784
2021-02-11 18:21:04 +00:00
Emilio Cobos Álvarez
583206ebe8 Bug 1668995 - Respect scroll-behavior when scrolling to the #top anchor. r=botond
I have no idea why #top is special-cased here, but while it is, we
should make sure to scroll respecting scroll-behavior.

Do you know how to add a test for this? Though this change is trivial
:-)

Differential Revision: https://phabricator.services.mozilla.com/D104765
2021-02-11 01:59:40 +00:00
Boris Chiou
156c710d50 Bug 1667501 - Add an nsIFrame::IsFrameOfType bit to say whether frames support aspect-ratio. r=TYLin
aspect-ratio applies to all elements except inline boxes and internal ruby or
table boxes. So we should return false for inline frames, table internal frames
(i.e. except nsTableFrame and nsTableWrapperFrame), and ruby internal frames.

Also, we can drop ComputeSizeFlags::SkipAspectRatio because this frame
bit can replace this flag.

Note: it seems nsRubyBaseContainerFrame and nsRubyTextContainerFrame are
inline, so we return false for them.

This will be very useful when computing the intrinsic size because
IntrinsicForAxis() computes the intrinsic size for all descendant frames and
some of descendants may not support aspect-ratio. It's pretty hard to achieve
this by just adding a flag for this function.

Differential Revision: https://phabricator.services.mozilla.com/D104296
2021-02-11 00:19:58 +00:00
Kris Maglione
0ec4615244 Bug 1662840: Move overrideDPPX from nsIContentViewer to BrowsingContext. r=whimboo,remote-protocol-reviewers,mtigley,emilio
Differential Revision: https://phabricator.services.mozilla.com/D104001
2021-02-10 01:30:35 +00:00