This ensures they're clamped on Animated -> sRGB conversion, and in the
future we'll have to implement different color spaces so we'll need to
use it anyways.
Differential Revision: https://phabricator.services.mozilla.com/D149792
This removes HTMLMenuItemElement and all the code and tests preffed off
by dom.menuitem.enabled.
The HTML parser changes are the result of applying the previous patch.
Differential Revision: https://phabricator.services.mozilla.com/D149979
nsImageGeometryMixin is used to redraw images with sync decoding. Without it,
if we paint an image with non-sync decoding, we won't know that it will be
drawn differently with sync decoding and so don't have a mechanism to include
it in the invalid region.
Currently the main situation where we draw images with non-sync decoding and
then with sync decoding is during reftests. If we unconditionally use sync
decoding during reftests we don't have to worry about the situation where we
switch. This will let us resolve the problems associated with nsImageGeometryMixin.
Differential Revision: https://phabricator.services.mozilla.com/D149657
This ensures they're clamped on Animated -> sRGB conversion, and in the
future we'll have to implement different color spaces so we'll need to
use it anyways.
Differential Revision: https://phabricator.services.mozilla.com/D149792
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.
ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.
Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.
Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.
Differential Revision: https://phabricator.services.mozilla.com/D149508
Add an implementation of CSS `contain: style`. This introduces two new
data structures, the ContainStyleScope and ContainStyleScopeManager.
ContainStyleScope manages one `contain: style` "world" which has its own
counter and quote lists. The contents of these lists depend on their
parent scopes, but are not affected by their children.
ContainStyleScopeManager manages a tree of scopes starting at a root
scope which is outside of any `contain: style` element.
Scopes are stored in a hash table that is keyed off of the nsIContent
which establishes the `contain: style` scope. When modifying quote or
content lists, the ContainStyleScopeManager is responsible for finding
the appropriate `contain: style` scope to modify.
Perhaps the most complex part of this is that counters and quotes have
read access to the state of counters and quotes that are in ancestor
`contain: style` scopes. In the case of counters, USE nodes that are at
the beginning of counter lists might have a counter scope that starts in
an ancestor `contain: style` scope. When nsCounterNode::SetScope() is
called, the code may look upward in the `contain: style` scope tree to
find the start of the counter scope. In the case of quotes, the first
node in the quote list must look for the state of quotes in ancestor
`contain: style` scopes.
Differential Revision: https://phabricator.services.mozilla.com/D149508
Right now we rely on the menulist to be injected by hand in all the
relevant windows. Instead create it lazily, making the select code more
standalone.
The DevTools window was missing it, for example.
Differential Revision: https://phabricator.services.mozilla.com/D149620
As the comment in the moved hunk said, a floating first letter frame's
incomplete status means that there is more content to be reflowed on the line.
If the block containing the floating first letter has `break-inside:avoid`
style, the old code would call `SetInlineLineBreakBeforeAndReset()`, and the
block's parent frame would misinterpret the status as "this block needs to be
push to the next fragment" even if we are *not* in a paginated environment.
Hence the assertion "Shouldn't be incomplete if availableBSize is
UNCONSTRAINED."
To fix this bug, we can reset the float's reflow status for a first letter frame
before checking `ShouldAvoidBreakInside`.
Differential Revision: https://phabricator.services.mozilla.com/D149712
This patch doesn't affect behavior; it's dead-code removal.
UpdateForFrameBackground is never called, and hence can be removed.
The member-var that it conditionally set, mPartHasFixedBackground, can be
assumed to be always false, and hence can be removed.
The same struct's other member-var, mDrawsBackground, is irrelevant since it's
only checked in combination with mPartHasFixedBackground, and hence can be
removed. And with that, the local variable invalidateForAttachmentFixed can
be removed as well.
This all seems to be code that's obsoleted by our (long-ago) move to using
display lists to draw tables.
Differential Revision: https://phabricator.services.mozilla.com/D149680
This patch doesn't change behavior.
I was initially going to promote this param to be const (which is an
improvement that's unlocked by earlier patches this series), but in doing so
I realized the param is entirely unnecessary. So, let's just remove it.
Differential Revision: https://phabricator.services.mozilla.com/D149678
This patch doesn't change behavior; it's just a const-correctness fix.
Thanks to previous patches in this series, PaintStyleImageLayerWithSC's arg can
become const, so let's make that change and opportunistically make the same
change to the variables that callers pass in, where possible.
Differential Revision: https://phabricator.services.mozilla.com/D149677
This patch doesn't change behavior; it's just a const-correctness fix.
This patch doesn't have any directly relation to the previous patch in this
series, but it's required for the next patch in this series.
Differential Revision: https://phabricator.services.mozilla.com/D149675
This patch does not change behavior; it's just a const-correctness fix.
This patch was prompted by the desire to add "const" to a ComputedStyle*
variable in a place where we happen to call DetermineBackgroundColor. To do
that, I have to adjust DetermineBackgroundColor to accept a const arg; and that
in turn requires GetBackgroundColor to accept a const arg, which in turn
requires IsTransparent to require a const arg. Hence, fixing all three APIs
here.
I'll opportunistically add 'const' labels at callsites for these APIs in the
next patch in this series.
Differential Revision: https://phabricator.services.mozilla.com/D149674
This patch doesn't change behavior.
The renamed function is only called once, in FindBackground, and it's used to
essentially determine whether that function should return true for aForFrame
(i.e. whether aForFrame "has a meaningful background" per the FindBackground
documentation).
Hopefully the new name is a bit clearer than "FindElementBackground". I'm not
worrying too much about having the perfect name/documentation, since there's
only one caller; but suggestions for even-better names/wording are welcome.
Differential Revision: https://phabricator.services.mozilla.com/D149339
This patch doesn't change behavior.
This is similar to the previous patch in this series, but now for
FindBackgroundFrame().
Differential Revision: https://phabricator.services.mozilla.com/D149338
This patch doesn't change behavior.
Before this patch, the FindBackground API returns a bool to indicate
success/failure, and sets its outparam to a non-null pointer-value on success.
This patch simplifies the API by just promoting the promoting the outparam to
be the actual return value, with nullptr as a sentinel value to indicate
failure.
(This patch adds some braces to affected/contextual if statements, too, to
match our coding style guide.)
Differential Revision: https://phabricator.services.mozilla.com/D149337
This patch does not change behavior.
This change is per our "Foo.cpp should have Foo.h as its first include"
convention, which helps us ensure that the header (nsCSSRendering.h in this
case) has all of the includes/declarations that it needs to compile properly on
its own, and doesn't have a fragile requirement that some other header must
always be included before it.
Differential Revision: https://phabricator.services.mozilla.com/D149336
nsImageGeometryMixin is used to redraw images with sync decoding. Without it,
if we paint an image with non-sync decoding, we won't know that it will be
drawn differently with sync decoding and so don't have a mechanism to include
it in the invalid region.
Currently the main situation where we draw images with non-sync decoding and
then with sync decoding is during reftests. If we unconditionally use sync
decoding during reftests we don't have to worry about the situation where we
switch. This will let us resolve the problems associated with nsImageGeometryMixin.
Differential Revision: https://phabricator.services.mozilla.com/D149657
Implements showing a "Paste" popup at the last mouse position (which
overlapped the browser window) when a certain custom event is received.
Creating and dispatchting that event is implemented in one of the
following parts.
Differential Revision: https://phabricator.services.mozilla.com/D135333
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.
Differential Revision: https://phabricator.services.mozilla.com/D149030
This applies a fix that is present in Skia's HW luminosity blend mode to its
CPU pipeline so that the luminosity mode no longer divides by zero, thus avoiding
infs and nans.
Differential Revision: https://phabricator.services.mozilla.com/D149030
With this, a relatively positioned element e.g. being offset to the left
should not decrease the scrollport size. For this, overflow area calculation
for relatively positioned elements must behave like
`nsIFrame::GetActualAndNormalOverflowAreasRelativeToParent`. We aren't
using the function directly since it's meant to be called post-reflow, and
we want to report it correctly during reflow in the first place.
Differential Revision: https://phabricator.services.mozilla.com/D149156
We're seeing a lot of null crashes here. Maybe we're running script since
we last checked mPrintObject and the printer was disconnected or
something along those lines, so just add a null check.
Differential Revision: https://phabricator.services.mozilla.com/D149387
This in-out parameter business used to be necessary (bug 1249279), but
we don't propagate the new widget scale to remote documents (which are
the common case now) and we seem to be doing just fine without that, so
I'm not sure why this would be needed anymore.
Also simplify some unit conversions while at it.
Differential Revision: https://phabricator.services.mozilla.com/D149032
Note this patch only prevents "break-inside:avoid" flex containers from being
broken when they are not at the top of their current page/column. When they are
at the top of their current page/column, this patch fails to help since
`nsContainerFrame::ShouldAvoidBreakInside()` returns `false` via the
`mIsTopOfPage` check. This is essentially bug 793686.
Differential Revision: https://phabricator.services.mozilla.com/D149318
Basically, animation-timeline could be
1. auto
2. none
3. <timeline-name>
We extend the <timeline-name> to cover both @scroll-timeline rule and
scroll-timeline-name property. We check @scroll-timeline rule first. If
it doesn't exist, we check scroll-timeline-name of the element itself,
the previous silbings, and their ancestors.
Differential Revision: https://phabricator.services.mozilla.com/D146358
This is reasonably straight-forward and should allow us change the
desired behavior on platforms if / when we need.
Also, this adds tests for the feature by using the relevant float pref
(though we can't easily assert the full-zoom behavior because it changes
the size of the reftest window itself).
Differential Revision: https://phabricator.services.mozilla.com/D148902
Now that cbindgen and rust support const generics, it seems more simple.
This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.
Differential Revision: https://phabricator.services.mozilla.com/D148847
This is reasonably straight-forward and should allow us change the
desired behavior on platforms if / when we need.
Also, this adds tests for the feature by using the relevant float pref
(though we can't easily assert the full-zoom behavior because it changes
the size of the reftest window itself).
Differential Revision: https://phabricator.services.mozilla.com/D148902
Now that cbindgen and rust support const generics, it seems more simple.
This centralizes all the relevant font constants etc in rust and avoids
conversions when going from rust to C++ and vice versa.
Differential Revision: https://phabricator.services.mozilla.com/D148847
This patch is based on Mats Palmgren's idea bug 1599159 comment 0.
When a child block frame reports inline-break-before status after being
reflowed, its size in the returned reflow output shouldn't matter because the
parent is expected to push it to the next page/column [1].
Here is the detail of the debug assertion if the workaround in fieldset frame is
removed. In nsBlockReflowContext::ReflowBlock(), it sets mReflowOutput::BSize()
to 0xdeadbeef, which is a negative number in 32-bits integer. Without the early
break of the loop in nsBlockFrame::ReflowBlockFrame(), then later in the loop we
are going to pass the negative block-size to
BlockReflowState::GetFloatAvailableSpaceForBSize(), which triggers a `aBSize>=0`
assertion further down in the callstack in nsFloatManager::GetFlowArea().
layout/reftests/pagination/fieldset-00G.html can trigger the above assertion
after removing the workaround in fieldset frame.
I don't expect this patch will change the behavior even if there are some float
elements interacting with this block. Without the early breaking out of the
loop, we still end up in [1].
[1] https://searchfox.org/mozilla-central/rev/ace2c59e6c56b2dcba25af1aa8903a5e7f9a5857/layout/generic/nsBlockFrame.cpp#4026-4035
Differential Revision: https://phabricator.services.mozilla.com/D148815
The biggest set of APIs from ns[T]StringObsolete which are still heavily used
are the string searching APIs. It appears the intention was for these to be
replaced by the `FindInReadable` APIs, however that doesn't appear to have
happened.
In addition, the APIs have some quirks around their handling of mixed character
widths. These APIs generally supported both narrow strings and the native
string type, probably because char16_t string literals weren't available until
c++11. Finally they also used easy-to-confuse unlabeled boolean and integer
optional arguments to control behaviour.
These patches do the following major changes to the searching APIs:
1. The ASCII case-insensitive search method was split out as
LowerCaseFindASCII, rather than using a boolean. This should be less
error-prone and more explicit, and allows the method to continue to use
narrow string literals for all string types (as only ASCII is supported).
2. The other [R]Find methods were restricted to only support arguments with
matching character types. I considered adding a FindASCII method which would
use narrow string literals for both wide and narrow strings but it would've
been the same amount of work as changing all of the literals to unicode
literals.
This ends up being the bulk of the changes in the patch.
3. All find methods were re-implemented using std::basic_string_view's find
algorithm or stl algorithms to reduce code complexity, and avoid the need to
carry around the logic from nsStringObsolete.cpp.
4. The implementations were moved to nsTStringRepr.cpp.
5. An overload of Find was added to try to catch callers which previously
called `Find(..., false)` or `Find(..., true)` to set case-sensitivity, due
to booleans normally implicitly coercing to `index_type`. This should
probably be removed at some point, but may be useful during the transition.
Differential Revision: https://phabricator.services.mozilla.com/D148300
This type was introduced in c++17, and can be used as a convenient standard
medium for passing around borrowed substring references. It can be implicitly
converted to from string literals and `const char_type*`, meaning that after
this change it can be used as a convenient catch-all type to replace seperate
overloads for `const self_type&`, `const char_type*` and `const
char_type(&)[N]`.
std::basic_string_view also provides standard implementations of some
algorithms which will be convenient for code cleanup in later parts of this
bug.
Differential Revision: https://phabricator.services.mozilla.com/D148297
This includes two versions of the function, one which takes an already-computed
page size to avoid computing this multiple times for a caller, and the other
which computes this value itself for convenience.
Differential Revision: https://phabricator.services.mozilla.com/D146601
This includes two versions of the function, one which takes an already-computed
page size to avoid computing this multiple times for a caller, and the other
which computes this value itself for convenience.
Differential Revision: https://phabricator.services.mozilla.com/D146601
GTK already did this, sorta, in a platform-specific way: by hacking in the
scale factor in the CSS screen code. I think this is cleaner, since we have a
centralized place to compute the full zoom in nsPresContext, and that code path
is fairly well tested.
This also would make it trivial to make this text zoom rather than full zoom in
the future, if we wanted (which is probably _technically_ more correct, even
though less pretty less pretty).
This also allows us to remove some hacks where we were undoing the text scale
factor on Linux (since stuff like scrollbars already ignore full zoom).
Depends on D148675
Differential Revision: https://phabricator.services.mozilla.com/D148676
This is mostly an optimization since html/body can't have shadow roots
and we only care about comparing the fullscreen element against those,
but it also avoids the problematic codepath.
The issue is that we call UpdateViewportScrollStylesOverride() in the
middle of UnbindFromTree when the DOM state isn't quite stable.
Before my patch, we only did that once the top layer stack is empty, but
now we do it once for each element we pop, which means that we might hit
this codepath with a fullscreen element mid-unbind.
The following patch fixes it but this seemed worth doing anyways.
Differential Revision: https://phabricator.services.mozilla.com/D148491
Add a dom/base/rust crate called just "dom" where we can share these.
Most of the changes are automatic:
s/mozilla::EventStates/mozilla::dom::ElementState/
s/EventStates/ElementState/
s/NS_EVENT_STATE_/ElementState::/
s/NS_DOCUMENT_STATE_/DocumentState::/
And so on. This requires a new cbindgen version to avoid ugly casts for
large shifts.
Differential Revision: https://phabricator.services.mozilla.com/D148537
If the tooltip node and the target node are in different documents, we'd
use the tooltip's CSS-to-dev-pixel scale to convert.
This is basically bug 1756323 but for XUL, I thought we wouldn't have
cross-document zoom like that but apparently I was wrong...
Differential Revision: https://phabricator.services.mozilla.com/D148402
The TODO comment (removed here) was correct that we could/should be using
BehavesLikeInitialValueOnBlockAxis instead of explicit `auto` / `none` checks
(since any value that behaves like the initial value will have the same
semantics as far as this code is concerned, in terms of not generating a
meaningful transferred constraint).
The explicit `minBSize == 0 check **is still needed** (or at least, it's still
useful), since 0 is trivially uninteresting as a transferred lower-bound, so
it's valid to exclude it from the guarded logic (and 0 is not handled by the
BehavesLikeInitialValueOnBlockAxis() check). In this patch I broaden it to
check IsDefinitelyZero(), though (to include 0%).
Hopefully the new code-comment and lambda make these checks clearer.
Differential Revision: https://phabricator.services.mozilla.com/D148079
This is the only meaningful consumer of
ServoCSSParser::GetParsingEnvironment right now, but seems worth fixing
before other folks add more.
Differential Revision: https://phabricator.services.mozilla.com/D148145
Instead, have the menu popup frame call SetWindowMouseTransparent (since
it needs to anyways to deal with dynamic changes).
Differential Revision: https://phabricator.services.mozilla.com/D148211
DONTBUILD because this is just a code-comment change.
In particular, in this patch...
- I'm removing an XXXldb one-liner todo-comment which was suggesting something
that we in fact now do. (At the time that this comment was added, we only
checked `presContext->IsPaginated()`[1] and did not check for unconstrained
available-bsize, but now we do.)
- I'm rewording the remaining comment for clarity and to fix some typos.
- I'm adding a reference to bug 1772383 which (now) covers the issue that the
comment is alluding to.
[1] https://searchfox.org/mozilla-central/diff/31f1898810f733c40bfe3fd4b25295885feb2e39/layout/tables/nsTableFrame.cpp#2734
Differential Revision: https://phabricator.services.mozilla.com/D148148
This stylesheet uses the html namespace by default so it never matches.
Plus scrollbars already have cursor: default via scrollbars.css
Depends on D147687
Differential Revision: https://phabricator.services.mozilla.com/D147688
Just need to pass the resizeWidth/Height down into SurfaceFromElement for html image elements so we can ask for a frame of the right size from the image.
We have to annotate the new test that I add as failing, just like all of the existing tests, because we don't yet support the resizeQuality option, so we fail that part of the test and pass all of the rest of it. The part that we are fixing here passes.
Differential Revision: https://phabricator.services.mozilla.com/D147739
I noticed this while debugging some underinvalidation with the patch on
bug 1381071.
This doesn't change behavior effectively, since the style frame should
always have the element's style, but it allows us to not need style
resolution for:
* display: contents
* Any element before we flush layout for the first time.
So it seems worth it.
Differential Revision: https://phabricator.services.mozilla.com/D147556
Also bug 1216483
The problem was that GetNextPrevLineFromeBlockFrame correctly identified the target frame but in case it was a flex/grid container, PeekOffsetForLine didn't accept it as a valid result due to a missing line iterator.
There was an existing case which handled this similarly for a table target, drilling into a first child with line iterator, but it was also incomplete.
Extended the drill condition for flex/grid and made the drilling algorithm more robust to be able to also crawl siblings and skip non-selectable elements (e.g. :before pseudoelement, contenteditable="false")
Differential Revision: https://phabricator.services.mozilla.com/D147752
This can happen when there is a long nested chain of backdrop-filters
and float inaccuracies cause the final capture primitive to be culled.
Differential Revision: https://phabricator.services.mozilla.com/D147704
RestyleManager includes nsPresContextInlines which includes
nsCSSFrameConstructor which includes RestyleManager.
Break the cycle, since turns out the later include is not needed.
Differential Revision: https://phabricator.services.mozilla.com/D147560
It's currently computes the corresponding editing host from the focus node of
`Selection` with climbing up the DOM tree. So, it does not just return a stored
element. Therefore, some callers use it multiple times. For avoiding it, we
should rename it to explain that it computes the editing host.
Note that I think that we should make it takes a node to compute editing host
without `Selection` for solving the case of no selection ranges. Therefore,
I don't like to include more information into the name.
Differential Revision: https://phabricator.services.mozilla.com/D147504
It was only needed so that we could assert with TypeId::of::<T> that we
don't have duplicate values except for an exception.
Instead, fix the exception and remove the bound.
Differential Revision: https://phabricator.services.mozilla.com/D147669
This reuses our existing undisplayed style generation, but in a
per-document rather than per-nsComputedDOMStyle object, which means that
we can avoid re-resolving styles of elements in display: none subtrees
much more often.
This brings the test-case in the bug to par with other browsers or
better, and is much simpler than the initial approach I tried back in
the day.
Differential Revision: https://phabricator.services.mozilla.com/D147547
Based on the retriggers on Try, the test seems to always fail on this platform.
So let's mark it as failing instead of skipped, so that we find out if this
issue becomes fixed at some point.
Differential Revision: https://phabricator.services.mozilla.com/D147554
None of the consumer need to mutate styles, and this saves some ugly
const_casting on the next patch.
Doesn't change behavior.
Differential Revision: https://phabricator.services.mozilla.com/D147555
After bug 1730284 we don't use it for throttling iframes, so the only
remaining use the test-only nsIDOMWindowUtils.paintCount. None of the
tests using it rely on the empty transaction case, so we should be able
to just remove this.
Differential Revision: https://phabricator.services.mozilla.com/D146589
Not a fan of this, I'd rather not do this... A potential, maybe less
hacky alternative, would be to resolve text-indent by truncating rather
than rounding. That would effectively round down the 0.01px to zero.
Differential Revision: https://phabricator.services.mozilla.com/D146993
This eliminates the need to determine when WebRender will apply opacity without a
filter, since it will now always apply opacity correctly for both tiled and untiled
images.
Differential Revision: https://phabricator.services.mozilla.com/D147102
After bug 1730284 we don't use it for throttling iframes, so the only
remaining use the test-only nsIDOMWindowUtils.paintCount. None of the
tests using it rely on the empty transaction case, so we should be able
to just remove this.
Differential Revision: https://phabricator.services.mozilla.com/D146589
This is more likely to be understandable by developers, matches other
browsers more closely (see bug comments), and seems more in-line with
what we do for OOP iframes.
Add a pref to not do this throttling at all (which would match Chrome),
though this is probably good enough for now.
Differential Revision: https://phabricator.services.mozilla.com/D146574
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.
Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.
Differential Revision: https://phabricator.services.mozilla.com/D147092
Captions should be relatively-positioned (other browsers support this as
well). This ensures we correctly save their normal positions and thus
that the sticky scroll container knows how to reposition them correctly.
Avoid registering inner table frames with the sticky scroll container to
make the assertion sound in cases of sticky-positioned tables.
Differential Revision: https://phabricator.services.mozilla.com/D147092
I realized my fix in bug 1769512 (using IsEmpty()) wasn't quite correct
in this case, because IntersectionObserver preserves edge-inclusive
intersections.
Differential Revision: https://phabricator.services.mozilla.com/D147078
This does not change anything as everywhere that uses ConvertImageRendererToDrawFlags goes through DrawImageInternal in nsLayoutUtils.cpp which adds the flag already. The next patch needs it though.
Depends on D146775
Differential Revision: https://phabricator.services.mozilla.com/D146776
This makes the context-value option for stroke width and dash properties in SVG glyphs work
consistently in non-1.0 devicePixelRatio situations (e.g. browser zoom, high-dpi displays).
Differential Revision: https://phabricator.services.mozilla.com/D146886
This avoids exposing printer names to potentially compromised content processes.
The changes in bug 1770211 mean that we no longer create platform specific
nsIDeviceContextSpec instances in the content process, so we no longer need
the printer name to instantiate an nsDeviceContextSpecWin there.
Differential Revision: https://phabricator.services.mozilla.com/D146868
This avoids exposing the path to potentially compromised content processes.
The roundtripping of the toFileName value from RemotePrintJobParent's
mPrintSettings to the content process and then back to
RemotePrintJobParent::InitializePrintDevice was silly anyway.
Differential Revision: https://phabricator.services.mozilla.com/D146867
This change allows us to remove the `FullZoom` multiplier and fixes text
bounds caclulations in a zoomed page.
Testing: The current browser scroll/bounds tests pass (with the
exception of fission iframes which were already broken).
Differential Revision: https://phabricator.services.mozilla.com/D146507
This makes the context-value option for stroke width and dash properties in SVG glyphs work
consistently in non-1.0 devicePixelRatio situations (e.g. browser zoom, high-dpi displays).
Differential Revision: https://phabricator.services.mozilla.com/D146886
This toggles the gfx.canvas.accelerated pref for Linux nightly builds. This also
adds necessary fuzz to prevent reftest failures from showing up.
Differential Revision: https://phabricator.services.mozilla.com/D146762
visibility: hidden still goes into BuildDisplayListForChild (because
children might be visible), but the child itself might not be visible.
Differential Revision: https://phabricator.services.mozilla.com/D122117
Since bug 1766192, we do `snap-scope` based on the snapped target point, so
the destination is no longer needed.
Depends on D146870
Differential Revision: https://phabricator.services.mozilla.com/D146871
This toggles the gfx.canvas.accelerated pref for Linux nightly builds. This also
adds necessary fuzz to prevent reftest failures from showing up.
Differential Revision: https://phabricator.services.mozilla.com/D146762
skip-ink-multiline-position.html's annotation was added in bug 1705826, for
what was at-the-time a known and very common category of intermittent
test-failures on Win7 (with downloadable fonts mysteriously failing to render,
in pretty much any test that uses a downloadable font).
Based on the disappearance of intermittent-failure reports on bug 1499459, it
looks like this category of intermittent-failure has gone away entirely
(possibly due to some architectural change like WebRender), so we don't need to
skip that test (or any other test that was disabled for this reason) anymore.
Explaining the other change in this patch, for 1673510-1.html: this test's
annotation didn't directly reference this bug, but its comment ("test font
doesn't load reliably on win7") sounds like it was annotated for this exact
same issue. However: it does actually still fail on Win7, if I remove the
skip-if annotation; but it appears to fail for a new/different reason. I spun
that off as bug 1770273, which I've referenced in reftest.list for this test.
Differential Revision: https://phabricator.services.mozilla.com/D146832
These should be trivial fixes for the most part, just fixing assumptions
for constructable stylesheets which have no owner node. Since Gecko
internally also has the concept of "associated document", let's just use
that.
We don't have the authored text around for these. We could keep it
around but I'd kinda prefer we didn't have to just for devtools, since
it seems to me we already need to deal with rules not being there
(imagine e.g. an empty style element with all the rules inserted via
script with insertRule()). So returning the empty string should be
reasonable for now...
Writing some tests now...
Differential Revision: https://phabricator.services.mozilla.com/D146682
Without this patch, the test case, floats-aspect-ratio-001.html, hangs because:
1. The initial float available space is correct, and its size is 100px x 50px.
And the bfc element is "width: auto; height: auto; aspect-ratio: 1/1;".
So its width and height depend on the available space.
2. And then, we try to get a new available area based on the height of
the bfc element (note: its size is 100px x 100px). However, we get an
invalid zero-width float available area which is occupied by the element
with float:right (i.e. the pink one), in the first band, and the size of
float available space is 0px x 100px. This makes the size of bfc element
become 0px x 0px when checking `FloatAvoidingBlockFitsInAvailSpace()`.
So it always fits in this float available area. And because we get two
different available areas in the first band (i.e. same `aBCoord`), so we
don't go into the break condition, and contine to get a new
`childReflowInput`, and then go to the next iteration.
3. In the 2nd loop, we try to get a new float available space by the
height of the bfc element (note: its size is 0px x 0px now because
the width of current float available space is 0px), so the
new float available space is 100px x 0px, and the bfc element fits in
this available area, but again, we have two different available
areas, so we still don't go into the break condition. Instead, we use
the new available area to compute the childReflowInput for the next
iteration, and now the size of the bfc element becomes 100px x 100px.
And then we go back to the state of (2).
4. So the bfc element enters a resize oscillation due to the invalid
float available space together with the aspect-ratio and auto sizes
(i.e. "widht: auto; height: auto;") I think. And the invalid float
available space also let |AvailableSpaceShrunk()| be unexpected because
we hit an assertion: "ASSERTION: available space should not grow on the
start side and shrink on the end side".
A possible way is to make sure we get a suitable float available area for
`floatAvoidingBlock`, so this can avoid the bfc element from entering
a resize oscillation.
Note:
1. bfc means block-formatting-context, and its variable name is
`floatAvoidingBlock` in nsBlockFrame.cpp.
2. We don't need to check zere or positive inline size for the float
available space because `AvailableSpaceShrunk()` should make sure we
leave the loop properly.
See https://phabricator.services.mozilla.com/D145524#4766290 for the
the example when the inline size is exactly zero.
Besides, we also fix contain-inline-size-bfc-floats-001.html with this
patch.
Differential Revision: https://phabricator.services.mozilla.com/D145524
Constraining only the pref size is almost fine. We also need to
constrain the anchor size when we're sized to the popup.
Differential Revision: https://phabricator.services.mozilla.com/D146809
Since bug 1659432 landed, we no longer keep the nsPrintJob around across print
settings changes, only replacing the nsPrintData. Now that we throw away
everything on a settings change it doesn't make sense to have code that was
written for juggling nsPrintData objects. That code was just making things
difficult to understand.
Differential Revision: https://phabricator.services.mozilla.com/D146718
The comments and structure of this code no longer made much sense after the
last 20 years of churn, including those made in bug 1659432 and bug 1552785.
Differential Revision: https://phabricator.services.mozilla.com/D146717
The comments and structure of this code no longer made much sense after the
last 20 years of churn, including those made in bug 1659432 and bug 1552785.
Differential Revision: https://phabricator.services.mozilla.com/D146717
ReflowFinished can happen with scripts allowed, so make sure not to
synchronously fire events, as they can fire content microtasks which
could destroy the frame.
Differential Revision: https://phabricator.services.mozilla.com/D146668
After bug 1768278 and bug 1767815 there's no more uses of the cliprounded value
in the tree (also it causes artifacts on HiDPI screens so we probably don't
want new usages).
The "sheet" value is unused, and the other values other than "default" and
"none" are only derived from "default", so they don't need to be exposed in the
style system.
Differential Revision: https://phabricator.services.mozilla.com/D145821