Commit graph

80 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
cb2a32d8af Bug 1823455 - Merge ScrollFrameHelper and nsHTMLScrollFrame. r=layout-reviewers,TYLin
Now that we've removed nsXULScrollFrame, ScrollFrameHelper can be
subsumed under nsHTMLScrollFrame.

I want to do this before making scrollbars non-XUL.

Renaming to mozilla::ScrollFrame is left for a follow-up bug.

Differential Revision: https://phabricator.services.mozilla.com/D173063
2023-03-22 13:06:40 +00:00
Emilio Cobos Álvarez
436767efeb Bug 1808077 - Shrink back ScrollFrameHelper. r=hiro
I was feeling back for adding the extra TimeStamp member and realized
that we don't really need mScrollFrame. Use the container_of hack to
avoid storing the extra pointer.

Depends on D166972

Differential Revision: https://phabricator.services.mozilla.com/D166973
2023-01-17 02:06:53 +00:00
Emilio Cobos Álvarez
de754f5576 Bug 1808077 - Tweak scroll anchoring heuristics. r=hiro
This patch tweaks our scroll-anchoring-disabling heuristic in two interesting
ways:

 * First, it introduces a time factor. What we want to detect is
   back-and-forth caused by a bogus page. Those are usually very fast to catch,
   so add a 500ms timeout to detect the adjustments.
   If we experimentally find out it's too low we can raise it.

 * Second, tweak the average distance to 2px rather than 3px. That makes it
   much harder to hit for legit pages (while it should still catch the cases
   we're interested in).

Factor the code into a helper struct since it getting a bit more complicated.

Differential Revision: https://phabricator.services.mozilla.com/D166972
2023-01-17 02:06:53 +00:00
Ting-Yu Lin
514d412f9b Bug 1799732 Part 3 - Convert FrameChildListID to enum class. r=emilio
This patch is first generated by the following script under gecko root folder.

```
#!/bin/bash

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "kPrincipalList" "FrameChildListID::Principal"
rename "kPopupList" "FrameChildListID::Popup"
rename "kCaptionList" "FrameChildListID::Caption"
rename "kColGroupList" "FrameChildListID::ColGroup"
rename "kAbsoluteList" "FrameChildListID::Absolute"
rename "kFixedList" "FrameChildListID::Fixed"
rename "kOverflowList" "FrameChildListID::Overflow"
rename "kOverflowContainersList" "FrameChildListID::OverflowContainers"
rename "kExcessOverflowContainersList" "FrameChildListID::ExcessOverflowContainers"
rename "kOverflowOutOfFlowList" "FrameChildListID::OverflowOutOfFlow"
rename "kFloatList" "FrameChildListID::Float"
rename "kBulletList" "FrameChildListID::Bullet"
rename "kPushedFloatsList" "FrameChildListID::PushedFloats"
rename "kBackdropList" "FrameChildListID::Backdrop"
rename "kNoReflowPrincipalList" "FrameChildListID::NoReflowPrincipal"
```

And then:
1. Manually fix `FrameChildListID` definition in nsFrameList.h.
2. Apply clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D161864
2022-11-12 04:38:53 +00:00
Ting-Yu Lin
c565d29604 Bug 1799732 Part 2 - Flatten the namespace for FrameChildList and co. by removing namespace layout. r=emilio
After moving FrameChildListID into mozilla namespace, `kPrincipalList` etc. are
also exposed in the mozilla namespace. In the next part, I'll convert
FrameChildListID enum into an enum class, so the naming pollution shouldn't be
an issue.

This patch has a nice side effect that it is now easier to remove all the
aliases of FrameChildListID (`kPrincipalList` etc.) defined in multiple places
since it is confusion to have the same thing written in different ways, e.g.
`nsIFrame::kPrincipalList`, `mozilla::layout::kPrincipalList`,
`FrameChildListID::kPrincipalList`, `kPrincipalList`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D161863
2022-11-12 04:38:53 +00:00
Noemi Erli
7c40c0e983 Backed out 3 changesets (bug 1799732) for causing build bustages in nsIFrame.cpp CLOSED TREE
Backed out changeset e559f9dbc76f (bug 1799732)
Backed out changeset c40fda7a8b0b (bug 1799732)
Backed out changeset 1f84bfb41ab8 (bug 1799732)
2022-11-12 02:16:45 +02:00
Ting-Yu Lin
192956df1b Bug 1799732 Part 3 - Convert FrameChildListID to enum class. r=emilio
This patch is first generated by the following script under gecko root folder.

```
#!/bin/bash

function rename() {
    echo "Renaming $1 to $2"
    rg -l "$1" | xargs sed -i -E -e s/"$1"/"$2"/g
}

rename "kPrincipalList" "FrameChildListID::Principal"
rename "kPopupList" "FrameChildListID::Popup"
rename "kCaptionList" "FrameChildListID::Caption"
rename "kColGroupList" "FrameChildListID::ColGroup"
rename "kAbsoluteList" "FrameChildListID::Absolute"
rename "kFixedList" "FrameChildListID::Fixed"
rename "kOverflowList" "FrameChildListID::Overflow"
rename "kOverflowContainersList" "FrameChildListID::OverflowContainers"
rename "kExcessOverflowContainersList" "FrameChildListID::ExcessOverflowContainers"
rename "kOverflowOutOfFlowList" "FrameChildListID::OverflowOutOfFlow"
rename "kFloatList" "FrameChildListID::Float"
rename "kBulletList" "FrameChildListID::Bullet"
rename "kPushedFloatsList" "FrameChildListID::PushedFloats"
rename "kBackdropList" "FrameChildListID::Backdrop"
rename "kNoReflowPrincipalList" "FrameChildListID::NoReflowPrincipal"
```

And then:
1. Manually fix `FrameChildListID` definition in nsFrameList.h.
2. Apply clang-format.

Differential Revision: https://phabricator.services.mozilla.com/D161864
2022-11-11 23:44:17 +00:00
Ting-Yu Lin
75940b1777 Bug 1799732 Part 2 - Flatten the namespace for FrameChildList and co. by removing namespace layout. r=emilio
After moving FrameChildListID into mozilla namespace, `kPrincipalList` etc. are
also exposed in the mozilla namespace. In the next part, I'll convert
FrameChildListID enum into an enum class, so the naming pollution shouldn't be
an issue.

This patch has a nice side effect that it is now easier to remove all the
aliases of FrameChildListID (`kPrincipalList` etc.) defined in multiple places
since it is confusion to have the same thing written in different ways, e.g.
`nsIFrame::kPrincipalList`, `mozilla::layout::kPrincipalList`,
`FrameChildListID::kPrincipalList`, `kPrincipalList`.

This patch doesn't change behavior.

Differential Revision: https://phabricator.services.mozilla.com/D161863
2022-11-11 23:44:16 +00:00
Hiroyuki Ikezoe
4977904f7f Bug 1789930 - Allow scroll anchoring during async scrolling animation triggered by user is in progress. r=emilio,botond
Scroll anchoring updates the scroll positions with ScrollOrigin::Relative, thus
it's properly merged into the in-progress animation.

Differential Revision: https://phabricator.services.mozilla.com/D156932
2022-09-12 04:59:38 +00:00
Timothy Nikkel
a87e2f808f Bug 1761239. Use an EnumSet for nsIScrollableFrame::IsScrollAnimating. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D141960
2022-03-26 02:22:57 +00:00
Emilio Cobos Álvarez
d0295b6c6f Bug 1738781 - Invalidate anchor after layout if we can find a better one. r=dholbert
This is _very_ similar to code Blink has dealing with
content-visibility: auto:

  https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/layout/scroll_anchor.cc;l=658-659;drc=fd8802b593110ea18a97ef044f8a40dd24a622ec

They don't have this problem on the original test-case because they
incorrectly invalidate the anchor when focus changes regardless of
whether the focus is a "priority element" per spec.

So I think this is a better, more consistent behavior over all.

Differential Revision: https://phabricator.services.mozilla.com/D130130
2021-11-02 10:59:50 +00:00
Mike Hommey
aec5c5347b Bug 1733034 - Fix unused*-variable warnings due to missing ifdefs. r=andi
dom/base/EventSource.cpp:59:22: error: unused variable 'gEventSourceLog' [-Werror,-Wunused-variable]
static LazyLogModule gEventSourceLog("EventSource");
                     ^
dom/xul/nsXULCommandDispatcher.cpp:35:22: error: unused variable 'gCommandLog' [-Werror,-Wunused-variable]
static LazyLogModule gCommandLog("nsXULCommandDispatcher");
                     ^
layout/generic/ScrollAnchorContainer.cpp:23:31: error: unused variable 'sAnchorLog' [-Werror,-Wunused-variable]
static mozilla::LazyLogModule sAnchorLog("scrollanchor");
                              ^
memory/replace/phc/PHC.cpp:308:15: error: unused variable 'kAllocJunk' [-Werror,-Wunused-const-variable]
const uint8_t kAllocJunk = 0xe4;
              ^

Differential Revision: https://phabricator.services.mozilla.com/D126866
2021-09-29 21:44:49 +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
Barret Rennie
2db5a81fea Bug 1663963 - Remove expired scroll anchor adjustment telemetry r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D89650
2020-09-10 00:52:39 +00:00
Razvan Maries
90b7948378 Backed out 2 changesets (bug 1663963, bug 1657188) for perma failures on browser_Telemetry_loadTimePreload.js. CLOSED TREE
Backed out changeset 643f16da7b99 (bug 1657188)
Backed out changeset 0c9661a5c8f9 (bug 1663963)
2020-09-10 03:48:48 +03:00
Barret Rennie
0bec7c3a9c Bug 1663963 - Remove expired scroll anchor adjustment telemetry r=rhunt
Differential Revision: https://phabricator.services.mozilla.com/D89650
2020-09-09 21:44:48 +00:00
Emilio Cobos Álvarez
f08a5f293b Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
And store that information in the scroll frame for the purposes of
avoiding scroll anchoring and scroll restoration.

Differential Revision: https://phabricator.services.mozilla.com/D85157
2020-08-02 16:58:29 +00:00
Cosmin Sabou
8aa0a2fcff Backed out 2 changesets (bug 1650502) for mochitest failures on test_frame_reconstruction.html. CLOSED TREE
Backed out changeset 1a4ce811fcab (bug 1650502)
Backed out changeset b21e76dcb485 (bug 1650502)
2020-08-02 19:50:05 +03:00
Emilio Cobos Álvarez
964bac7f10 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
And store that information in the scroll frame for the purposes of
avoiding scroll anchoring and scroll restoration.

Differential Revision: https://phabricator.services.mozilla.com/D85157
2020-08-02 15:20:55 +00:00
Andreea Pavel
cae88d4491 Backed out 2 changesets (bug 1650502) for failing android at test_frame_reconstruction.html on a CLOSED TREE
Backed out changeset 9b300d20df23 (bug 1650502)
Backed out changeset 1e87d4186672 (bug 1650502)
2020-08-01 02:54:36 +03:00
Emilio Cobos Álvarez
1ade3ecd63 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
And store that information in the scroll frame for the purposes of
avoiding scroll anchoring and scroll restoration.

Differential Revision: https://phabricator.services.mozilla.com/D85157
2020-07-31 20:33:01 +00:00
Ting-Yu Lin
fdc00547f6 Bug 1637130 - Rename visual overflow to ink overflow. r=dbaron
This patch is generated by:

```
# Rename the nsOverflowType enum.
rg -l "eVisualOverflow" layout/ gfx/ | xargs sed -i "s/eVisualOverflow/eInkOverflow/g"

# Rename and drop the "Get" prefix from various functions.
rg -l "GetVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowRect/InkOverflowRect/g"
rg -l "GetPreEffectsVisualOverflowRect" layout/ gfx/ | xargs sed -i "s/GetPreEffectsVisualOverflowRect/PreEffectsInkOverflowRect/g"
rg -l "GetVisualOverflowFromDeltas" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowFromDeltas/InkOverflowFromDeltas/g"
rg -l "GetScrollableOverflowRect" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowRect/ScrollableOverflowRect/g"

# Rename, drop the "Get" prefix, and change the suffix "Area" to "Rect"
# (because they return nsRect) for the two methods in nsLineBox.
rg -l "GetVisualOverflowArea" layout/ gfx/ | xargs sed -i "s/GetVisualOverflowArea/InkOverflowRect/g"
rg -l "GetScrollableOverflowArea" layout/ gfx/ | xargs sed -i "s/GetScrollableOverflowArea/ScrollableOverflowRect/g"

# Rename rest of the functions and variables.
rg -l "VisualOverflow" layout/ gfx/ | xargs sed -i "s/VisualOverflow/InkOverflow/g"
rg -l "visual overflow" layout/ gfx/ | xargs sed -i "s/visual overflow/ink overflow/g"
rg -l "visualOverflow" layout/ gfx/ | xargs sed -i "s/visualOverflow/inkOverflow/g"
rg -l "visOverflow" layout/ gfx/ | xargs sed -i "s/visOverflow/inkOverflow/g"
rg -l "vis-overflow" layout/ gfx/ python/ | xargs sed -i "s/vis-overflow/ink-overflow/g"

./mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D84231
2020-07-20 20:17:36 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kartikaya Gupta
5606d64a06 Bug 1645764 - Turn ANCHOR_LOG into a MOZ_LOG. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D79658
2020-06-15 12:38:27 +00:00
Kartikaya Gupta
7ac36807b1 Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
This patch is a fairly mechanical conversion. The old `nullptr` gets converted
to ScrollOrigin::NotSpecified, and all the other possible values get corresponding
values in the new ScrollOrigin enum. A few switch statements are introduced to
clean up big if statements, but other than that, additional cleanups will happen
in later patches.

Differential Revision: https://phabricator.services.mozilla.com/D78438
2020-06-05 09:37:51 +00:00
Daniel Holbert
7d4f598530 Bug 1639381: Add period and newline at the end of scroll-anchor logging statement. r=emilio
This change is for consistency with other similar logging, and to avoid getting
unrelated lines of logging concatenated together.

Calling this "DONTBUILD" because this is just a small tweak to an (opt-in)
debug logging string which probably doesn't get printed on TreeHerder, so
there's virtually no chance this could have an impact on any TreeHerder jobs.

Differential Revision: https://phabricator.services.mozilla.com/D76061
2020-05-19 23:15:10 +00:00
Emilio Cobos Álvarez
aa9d2c20c6 Bug 1538537 - When suppressing anchoring on an scrollframe, forward to the frame that actually maintains the anchor as needed. r=dholbert
The test-case is position-change-heuristic.html but with body and #space
having overflow: hidden, which makes it fail on Nightly.

Differential Revision: https://phabricator.services.mozilla.com/D75825
2020-05-19 23:57:23 +00:00
Ting-Yu Lin
162c8d3a67 Bug 1638928 Part 2 - Rename nsIFrame's GetChildLists() to ChildLists(). r=mats
This patch is generated by using my editor's rename functionality.

In the next patch, `nsIFrame::` prefix is going to be removed manually
from all the ChildLists() calls.

Differential Revision: https://phabricator.services.mozilla.com/D75893
2020-05-19 12:37:37 +00:00
Ting-Yu Lin
07b47bf217 Bug 1635319 Part 1 - Add nsIFrame::GetChildLists(), and use range-based for loops instead of ChildListIterator in layout/generic/. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D75652
2020-05-18 01:09:34 +00:00
Emilio Cobos Álvarez
072ca409e3 Bug 1630385 - Don't descend into scroll frames with a pre-existing anchor. r=dholbert
We can modify the scroll position without invalidating the anchor (that's kind
of the point, actually).

So it's possible (and ok) to end up with a frame which is already maintaining
an anchor but for which CanMaintainAnchor now returns false.

So if you have a scrollframe with a non-zero scroll position and select an
anchor for that scrollframe, and then try to select an anchor for an ancestor,
you don't want to dig into there.

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

--HG--
extra : moz-landing-system : lando
2020-04-15 23:13:00 +00:00
Emilio Cobos Álvarez
202a1619ad Bug 1520581 - Allow to select scroll anchors inside nested scroll frames. r=dholbert
As long as the nested scrollframe doesn't maintain an anchor itself.

This is important for pages which use overflow: hidden to contain large
parts of their scrollable content, see bug 1629237 for an example.

When calling InvalidateAnchor(), we may invalidate an ancestor anchor
itself, if we're not maintaining an anchor and our scrolled frame is
part of the anchor chain. This is important to maintain our state
properly.

I was going to add some assertion to this effect but it can fail when
fragmenting inlines already, so for now I've commented it out and filed
bug 1629280 for that. It's not great, but it cannot lead to a security
issue so we probably can fix it with time.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 20:58:14 +00:00
Simon Giesecke
8aa47bcfb7 Bug 1613985 - Use default for equivalent-to-default constructors/destructors in layout. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D66016

--HG--
extra : moz-landing-system : lando
2020-03-17 09:38:32 +00:00
Emilio Cobos Álvarez
e4106f7b64 Bug 1615955 - Suppress scroll anchoring when scroll offset is zero. r=dholbert
As per https://github.com/w3c/csswg-drafts/pull/4679.

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

--HG--
extra : moz-landing-system : lando
2020-02-22 20:08:22 +00:00
Emilio Cobos Álvarez
d13e046349 Bug 1584035 - Don't apply scroll anchoring adjustments if we have an ongoing APZ smooth scroll. r=dholbert
Same case as the other smooth-scrolling thingies, scroll anchoring is less
prioritary (and is disturbing) in that case.

Also fix the logging code (`WritingMode::DebugString` is no longer a thing).

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

--HG--
extra : moz-landing-system : lando
2020-02-12 18:56:43 +00:00
Emilio Cobos Álvarez
672ef887fb Bug 1592474 - Report a console warning when we disable scroll anchoring on a scroller. r=dholbert,flod
Depends on D51024

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

--HG--
extra : moz-landing-system : lando
2019-10-31 09:19:21 +00:00
Emilio Cobos Álvarez
f70cc8c005 Bug 1592474 - Add some heuristics to disable scroll anchoring in pathological cases. r=dholbert
The idea of these are not to penalize legit uses of scroll anchoring, and
catching pathological cases fast.

The current algorithm I thought of is just whether the average of all the
consecutive scroll anchoring adjustments is less than a given threshold.

If the average adjustment is close to zero and the user is not scrolling, it
means that we're not making much progress.

It is important that zero adjustments don't get counted, since those are common
during window resizes and don't have side-effects anyway.

Exact number may need tuning, let me know if you want it
nightly-and-early-beta-only for now or something.

Depends on D51038

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

--HG--
extra : moz-landing-system : lando
2019-10-31 09:25:08 +00:00
Emilio Cobos Álvarez
4510f3e34a Bug 1592474 - Share code between ScrollAnchorContainer::{Destroy,InvalidateAnchor}. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D51038

--HG--
extra : moz-landing-system : lando
2019-10-31 09:23:35 +00:00
Emilio Cobos Álvarez
5e0abce31f Bug 1588748 - Make an scroll anchoring assertion a release assert. r=dholbert
This should prevent this being exploitable, should this fire.

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

--HG--
extra : moz-landing-system : lando
2019-10-15 18:46:42 +00:00
Emilio Cobos Álvarez
bb4daeb401 Bug 1586909 - Process anchor suppressions even when ignoring adjustments. r=dholbert
Otherwise we may keep the scroll anchor around and we may try to anchor to it
later even though we should've really suppressed it completely.

Maybe we should just call InvalidateAnchor() unconditionally from that code
path, even if there are no suppressions pending...

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

--HG--
extra : moz-landing-system : lando
2019-10-07 22:47:15 +00:00
Sylvestre Ledru
f12b9fa5c3 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-06 18:29:55 +00:00
Emilio Cobos Álvarez
5906f23d74 Bug 1540203 - Tweak scroll anchor selection to allow to select everything but inline-fragmentable, non-text boxes. r=dholbert
Per the discussion in https://github.com/w3c/csswg-drafts/issues/4247.

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

--HG--
extra : moz-landing-system : lando
2019-09-13 22:26:48 +00:00
Emilio Cobos Álvarez
31c8224bf5 Bug 1561450 - Suppress scroll anchoring adjustments from scroll event listeners. r=dholbert
See https://github.com/w3c/csswg-drafts/issues/4239

This fixes what is in my opinion one of the biggest issues of scroll anchoring
as specified / currently implemented.

It's trivial to flush layout on a scroll handler and create scroll adjustments,
which in turn would trigger other scroll events to be fired. This situation,
which is what has happened in most of the scroll anchoring regressions I've
fixed, at best gets pages to get stuck in an infinite CPU loop. At worst, it
causes scrolling to be unusable because the page keeps reacting to scroll
events.

An alternative, slightly more elegant but not clear to me if 100% implementable
approach would be bug 1529702.

This should enormously reduce the need for scroll anchoring suppression
triggers[1], I'd think, which in turn would allow me to investigate removing
some of that complexity.

https://drafts.csswg.org/css-scroll-anchoring/#suppression-triggers

The setup to set / unset the boolean is a bit awkward but I couldn't come up
with anything better.

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

--HG--
extra : moz-landing-system : lando
2019-08-23 22:29:49 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Emilio Cobos Álvarez
937b1f9834 Bug 1566783 - Don't prevent PresShell::ScrollToAnchor() from working due to scroll anchoring adjustments that happen without the user scrolling. r=dholbert
We were bailing out because scroll anchoring adjustments can make this check
fail:

  * https://searchfox.org/mozilla-central/rev/22b330ecb3edba1536a54887060cbdd09db21c59/layout/base/PresShell.cpp#3194

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

--HG--
extra : moz-landing-system : lando
2019-07-20 15:02:35 +00:00
Emilio Cobos Álvarez
24c8f44f2d No bug - Fix -Werror multiline-comment warning in previous scroll anchoring log tweak. sigh
CLOSED TREE
2019-07-18 00:21:17 +02:00
Emilio Cobos Álvarez
77fcf48fbf No bug - tweak scroll anchoring logs. r=npotb 2019-07-18 00:03:47 +02:00
Emilio Cobos Álvarez
6ef01a0d95 Bug 1554572 - Don't apply scroll anchor adjustments if we're processing an async scroll animation. r=dholbert
Differential Revision: https://phabricator.services.mozilla.com/D38077

--HG--
extra : moz-landing-system : lando
2019-07-15 17:48:16 +00:00
Emilio Cobos Álvarez
1a121e2e21 Bug 1546027 - Don't apply scroll anchor adjustments if we're restoring our scroll position. r=dholbert
Since scroll position restoration is absolute, and we'll lose it as soon as we
apply any adjustment or do any other sort of scrolling.

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

--HG--
extra : moz-landing-system : lando
2019-07-15 17:46:11 +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
Masayuki Nakano
e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00