That is, change all uses of StyleComplexColor to just StyleColor.
Differential Revision: https://phabricator.services.mozilla.com/D25977
--HG--
rename : layout/style/StyleComplexColor.cpp => layout/style/StyleColor.cpp
rename : layout/style/StyleComplexColor.h => layout/style/StyleColorInlines.h
extra : moz-landing-system : lando
This testcase triggers a case which I hoped I wouldn't need to handle: The
presence of a shadow root in the tree already by the time our compatibility mode
changes.
Just invalidate ShadowRoot data when this happens the same way we invalidate the
document style data.
Differential Revision: https://phabricator.services.mozilla.com/D25928
--HG--
extra : moz-landing-system : lando
A lot of files include `nsIPresShell.h` even though currently they don't
need it. This patch removes the unnecessary inclusions.
Differential Revision: https://phabricator.services.mozilla.com/D25744
--HG--
extra : moz-landing-system : lando
A lot of files include `nsIPresShell.h` even though currently they don't
need it. This patch removes the unnecessary inclusions.
Differential Revision: https://phabricator.services.mozilla.com/D25744
--HG--
extra : moz-landing-system : lando
Changes:
- skipped problematic tests in crashtest suite on windows10-aarch64
- removed unnecessary pixel fuzzy values from previous iterations of greening tests
Differential Revision: https://phabricator.services.mozilla.com/D25714
--HG--
extra : moz-landing-system : lando
`nsPresContext` should use `mozilla::PresShell` directly instead of
`nsIPresShell`. This patch makes it.
Unfortunately, `nsPresContext` and `nsIFrame` have `PresShell()`. Therefore,
we cannot use `PresShell*` in its methods so that this patch uses `mozilla::`
namespace prefix.
It might be better to rename them as `PresShellPtr()` in another bug.
Differential Revision: https://phabricator.services.mozilla.com/D25721
--HG--
extra : moz-landing-system : lando
TEST 18 of layout/style/test/test_font_loading_api.html is fragile on Android in the sense
that adding a new mochitest in an irrelevant directory (e.g. layout/svg/test)
might cause a failure rate close to 50%. See Comment 34 in Bug 1455824.
Increasing SimpleTest.requestLongerTimeout() doesn't make much difference, see
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c954cc8621372252a500fe1db04fb06edd636d9c.
Comment 43 and 44 from Testing team suggested the drastical failure increasing
is probably only related to different task grouping when a new testcase is added
elsewhere.
We should probably disable it now on Android platform, because it might cause
false-negative and confusion when someone lands an unrelated mochitest in
an irrelevant directory.
Differential Revision: https://phabricator.services.mozilla.com/D25718
--HG--
extra : moz-landing-system : lando
This is the last step to be able to call matchMedia on display: none iframes.
This is green, except for some startup preference query tests that I'm going to
address in a blocking bug (making LangGroupFontPrefs global, basically).
The setup is similar to the ShadowRoot one, except we don't eagerly keep the
StyleSet around up-to-date, we only fill it if it ever had a pres context.
Differential Revision: https://phabricator.services.mozilla.com/D23903
--HG--
extra : moz-landing-system : lando
nsUnicodeProperties.h includes into ICU, which has implicit int
truncation, so quarantine this include out of problematic headers.
Depends on D25498
Differential Revision: https://phabricator.services.mozilla.com/D25499
--HG--
extra : moz-landing-system : lando
As discussed on IRC, fixed is only used for prefs right now, and:
* We already copy the fixed size to the monospace font.
* We already serialize the fixed family as "monospace" in the style system.
So it already works somewhat inconsistently. Making it an alias makes it
work consistently.
Differential Revision: https://phabricator.services.mozilla.com/D24288
--HG--
extra : moz-landing-system : lando
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.
As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.
The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).
Differential Revision: https://phabricator.services.mozilla.com/D24272
--HG--
extra : moz-landing-system : lando
As discussed on IRC, fixed is only used for prefs right now, and:
* We already copy the fixed size to the monospace font.
* We already serialize the fixed family as "monospace" in the style system.
So it already works somewhat inconsistently. Making it an alias makes it
work consistently.
Differential Revision: https://phabricator.services.mozilla.com/D24288
--HG--
extra : moz-landing-system : lando
To be more similar between Rust and C++. This introduces GenericFontFamily and
exposes that plus FontFamilyNameSyntax to C++, using that where appropriate
instead of plain uint8_t as we were doing.
As a follow-up, as discussed on IRC with Jonathan, we can remove the -moz-fixed
family, and turn it just into an alias of Monospace.
The only non-trivial change is the MatchType changes, but they're ok I think.
The code already assumed at most one CSS generic, and the struct still takes 8
bits. I've verified that the relevant tests are passing (though try is closed).
Differential Revision: https://phabricator.services.mozilla.com/D24272
--HG--
extra : moz-landing-system : lando
This depends on https://github.com/eqrion/cbindgen/pull/308. Other than that,
this should be ready to go.
There's still a bit more magic than what I'd like to eventually. I should be
able to make cbindgen not rename types if it doesn't know about them, or
something.
But this removes most of the manual binding function implementations (all but
the ones that are declared via macros, which cbindgen doesn't see across).
I need to give up on the _Drop functions taking an Owned<T> because of
instantiation order fiasco. In order to define DefaultDelete I need Owned to be
complete, but I cannot do it after including the generated file since some
declarations already instantiate the specialization. Oh well.
Differential Revision: https://phabricator.services.mozilla.com/D24798
--HG--
rename : servo/components/style/cbindgen.toml => servo/ports/geckolib/cbindgen.toml
extra : moz-landing-system : lando
Each user agent style sheet has a unique URLExtraData object containing
its URL, but since they are refcounted objects, we can't share them
easily across processes. Rather than adding support for copying them
into a shared memory buffer like we will do with the Rust objects, here
we just set up a static array of URLExtraData objects per UA style
sheet. The array will be filled in in a later patch.
Rust UrlExtraData objects, once they are transformed into their
sharable form and copied into the shared memory buffer, will reference
them by an index.
Depends on D17181
Differential Revision: https://phabricator.services.mozilla.com/D17182
--HG--
extra : moz-landing-system : lando
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.
Additonally, "shell" is unclear ("docshell" vs. "presshell"). Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.
Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.
Differential Revision: https://phabricator.services.mozilla.com/D25338
--HG--
extra : moz-landing-system : lando
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it. This causes include-hell which blocks the following fix.
Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.
Differential Revision: https://phabricator.services.mozilla.com/D25333
--HG--
extra : moz-landing-system : lando
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.
This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.
Differential Revision: https://phabricator.services.mozilla.com/D25332
--HG--
extra : moz-landing-system : lando
This makes `Document::GetShell()` return `PresShell*` instead of `nsIPresShell`.
Additonally, "shell" is unclear ("docshell" vs. "presshell"). Therefore, this
also renames `Document::GetShell()` to `Document::GetPresShell()`.
Similarly, some other method names of `Document` are also renamed from
`*Shell*` to `*PresShell*`.
Differential Revision: https://phabricator.services.mozilla.com/D25338
--HG--
extra : moz-landing-system : lando
`*Inlines.h` shouldn't be included by another header file, but `nsPresContext.h`
does it. This causes include-hell which blocks the following fix.
Additionally, it causes an include hell between `PresShell.h` vs.
`nsIPresShell.h` and `nsPresContext.h if `Document.h` includes `PresShell.h`.
Therefore, this patch also solves this include hell with adding
`nsPresContextInlines.h`.
Differential Revision: https://phabricator.services.mozilla.com/D25333
--HG--
extra : moz-landing-system : lando
If `Document::GetShell()` returns `PresShell*` rather than `nsIPresShell`, it's
a good step to deCOMTaminate `PresShell`.
This patch makes `Document.h` stop including `nsIPresShell.h` since
`nsIPresShell.h` includes `Document.h` indirectly and that causes bustage
when we make `Document::GetShell()` return `PresShell*`.
Differential Revision: https://phabricator.services.mozilla.com/D25332
--HG--
extra : moz-landing-system : lando
They're only used in forms.css, and only for some anonymous content, which are
not content-accessible in the first place.
The only place where this could be exposed is calling
getComputedStyle(input, "::placeholder"), so I think this should be pretty safe,
but I've added a pref just in case.
While at it, also derive the Parse implementation. Less code is better.
Differential Revision: https://phabricator.services.mozilla.com/D25118
--HG--
extra : moz-landing-system : lando
LLVM doesn't manage to use any fast code for froundf, so use NSToIntRound
instead, which is probably what we should be using anyway for consistency.
Differential Revision: https://phabricator.services.mozilla.com/D25049
--HG--
extra : moz-landing-system : lando
I kept it building the most straight-forward way possible (pub use) because it
seems to me that bindings is not a bad name, and we should probably move
structs.rs to be bindings.rs rather than the other way around.
But that's a different bug in any case, need to think more about it.
Differential Revision: https://phabricator.services.mozilla.com/D24713
--HG--
extra : moz-landing-system : lando