This is as per spec, and causes failures once we enable the pref to expose
shorthands in the computed style. We need to decouple the "enabled-ness" from
the enumerable-ness, which we do by keeping two separate arrays, and leaving
ComputedStyleMap for the enumeration.
Differential Revision: https://phabricator.services.mozilla.com/D132266
-Wshadow warnings are not enabled globally, so these -Wno-shadow suppressions have no effect. I had intended to enable -Wshadow globally along with these suppressions in some directories (in bug 1272513), but that was blocked by other issues.
There are too many -Wshadow warnings (now over 2000) to realistically fix them all. We should remove all these unnecessary -Wno-shadow flags cluttering many moz.build files.
Differential Revision: https://phabricator.services.mozilla.com/D132289
Technically, `aContentArea` is not 100% wrong; its the content area of the outer
scroll frame, which contains the content area of the inner scrolled frame, the
padding, and the scrollbars. However, it should really be named
`aInsideBorderArea` as the caller names it. Otherwise, it is easy to cause
confusion with the content area of the inner scrolled frame.
Also, rename `aOldScrollArea` as well so that we use the term "scroll port"
consistently.
Differential Revision: https://phabricator.services.mozilla.com/D132445
Scrollbar's min and pref sizes won't change during reflow, so we can cache them
in ScrollReflowInput to save some repetitive computation in multiple
ReflowScrolledFrame() and TryLayout() calls.
This is also a preparation for Bug 1715112 because we can use the pref sizes to
compute the scrollbar-gutter size in ScrollReflowInput.
Differential Revision: https://phabricator.services.mozilla.com/D132443
It should be sufficient to call `SetScrollbarMediatorContent` once in
ScrollReflowInput's constructor, which is created in the beginning of
nsHTMLScrollFrame::Reflow(), instead of calling it repeatedly in multiple
TryLayout() calls.
Differential Revision: https://phabricator.services.mozilla.com/D132442
We've had some APIs passing ScrollReflowInput by reference while some others
using pointer. Let's unify them by using reference everywhere.
Differential Revision: https://phabricator.services.mozilla.com/D132441
They shouldn't be scattered in nsHTMLScrollFrame::Reflow(). Also, reorder these
assignment operations according to the member variables' appearance order in
ScrollReflowInput.
I also moved the constructor out of the class definition because it becomes a
large method, and I'm going to add `private:` section after the methods section
in a later patch.
Differential Revision: https://phabricator.services.mozilla.com/D132440
I considered removing this class initially, but it's actually a pretty
useful abstraction over the DateTimeFormat interface when used
specifically with Gecko. It applies the OS preferences and provides some
caching behavior.
Differential Revision: https://phabricator.services.mozilla.com/D131671
It's only meaningfully read in two places:
* WebRender fallback code.
* Some widget DEBUG-only code, which on Linux is ifdef'd and on Windows does
some rather sketchy things like sleeping for 30ms
So I think it should be ok to remove, since WR fallback has its own flashing
pref as well, IIUC.
Differential Revision: https://phabricator.services.mozilla.com/D132313
This is based off work by smurfd. But this patch doesn't support buttons
both at the left and right, which simplifies a lot the implementation.
Also, clean-up the existing env variables while at it.
Co-authored-by: Nicklas Boman <smurfd@gmail.com>
Differential Revision: https://phabricator.services.mozilla.com/D132073
Since spatial node indices are now stable across display lists,
we can include them in the interned data for clips.
This means that much of the code complexity related to clip
instances can be removed (though this is left for a follow
up patch once this has been in nightly for some time without
causing any regressions).
Long term, this means that clips are retained between display lists
along with their positioning information. We can take advantage of
this to cache state / dependencies about clips between different
display lists, which will eliminate some redundant clip work we
currently do every scene/frame build.
Differential Revision: https://phabricator.services.mozilla.com/D131962
Applying it to SVG-transformed frames is wrong, and causes us to
rasterize rather massive SVGs. This is consistent with the other CSS
3d transforms code, and our rendering of the test-case matches other
browsers.
Differential Revision: https://phabricator.services.mozilla.com/D132040
We have other code to make sure that options themselves are in-flow, so
we really want abspos boxes not to escape the select element.
Other browsers don't allow having out-of-flow option children at all
(they seem to force descendants to be in-flow). However that seems
fairly more complicated to implement, and I don't think it particularly
matters how we deal with this as long as we deal with it in a
sorta-reasonable way.
Differential Revision: https://phabricator.services.mozilla.com/D131785
We have other code to make sure that options themselves are in-flow, so
we really want abspos boxes not to escape the select element.
Other browsers don't allow having out-of-flow option children at all
(they seem to force descendants to be in-flow). However that seems
fairly more complicated to implement, and I don't think it particularly
matters how we deal with this as long as we deal with it in a
sorta-reasonable way.
Differential Revision: https://phabricator.services.mozilla.com/D131785
This was a subtle behavior change in bug 1739464. The early-return here:
https://hg.mozilla.org/mozilla-central/rev/2fb74c67b0c5#l11.40
Meant we also bailed out from user font prioritization for system fonts.
It's unclear whether that's really the best behavior but since the
intention of the regressing patch was not to change behavior, preserving
the old behavior seems better.
Differential Revision: https://phabricator.services.mozilla.com/D131899
Given the compat reports in bug 1484928, I don't think it's worth
keeping the current behavior.
Our behavior should match other browsers now. Rather than making
content: url() work everywhere even for otherwise-replaced elements,
just special-case this since that's what other browsers seem to do.
Differential Revision: https://phabricator.services.mozilla.com/D131797
.fallback is always the default font for the lang group unless we're a
system font (in which case it's "none").
The only reason we need that is because we need to react to
language changes (which affect the initial font).
Simplify the model a bit doing the language lookup in gfxTextRun (this
should avoid allocating a few nsStyleFont structs too.
Depends on D130732
Differential Revision: https://phabricator.services.mozilla.com/D131312
This seems like more sensible behavior. We have another use of
only_generic(), but that affects font sizing and other browsers agree
with us there:
<div style="font-family: monospace">Should be 13px</div>
<div style="font-family: something, monospace">Should be 16px</div>
So not touching that one.
Differential Revision: https://phabricator.services.mozilla.com/D130732