For image-orientation property, we use methods of nsStyleImageOrientation
struct to create/set its computed value. Adding these binding functions
could let us reuse these methods for transferring computed values from Servo
side to Gecko.
The actual changes for the calling these binding functions to do the glue things
for Stylo is in a separate following patch, which should be pure Servo changes.
MozReview-Commit-ID: 9MuICVgdxNw
--HG--
extra : rebase_source : e1fbcc3445b7a1d1deb18d204f4b8f60d7356b08
Autoland should have prevented this. A bug is on file so it hopefully
won't happen again.
MozReview-Commit-ID: 1tN1lAyTLyE
--HG--
extra : rebase_source : 9377f92151e481446481fec263c39e369dab5246
In ensuring that this method does *not* re-use the existing style context if
aStyleType != eAll, I found it easy to miss this check in the multi-condition if
statement due to the way some, but not all, of the conditions are on one line.
I think this would be a little easier to read if this multi-line condition used
one line per condition.
MozReview-Commit-ID: 4UOAGhAndIV
--HG--
extra : rebase_source : 0798cf29d125227587d3cf42eba7352f1a6e40c6
There are currently no call sites of GetStyleContextWithoutAnimation
but there are a couple of places (including this patch series) where we would
like to use such a method, but without the flushing behavior.
This patch drops the flushing from GetStyleContextWithoutAnimation and
renames it to GetUnanimatedStyleContextNoFlush. It also makes a few other minor
tweaks:
* Adds the aStyleType parameter for consistency with GetStyleContextNoFlush and
GetStyleContext
* Moves the implementation of this method and GetStyleContextNoFlush to the
header file since they simply wrap DoGetStyleContextNoFlush.
* Changes the order of these declarations so that the more specialized method
comes later.
* Drops the comment describing the method since both the method name and the
inline definition should now make it obvious what it is doing.
(Actually making this method not return animation styles when it re-uses an
existing style context will happen in the next patch.)
MozReview-Commit-ID: JYeim4A9Imr
--HG--
extra : rebase_source : abf7c27c52dd6b0c20a2710d6d56f2fb3e146ccf
In the next patch we want to add a method called
GetUnanimatedStyleContextForElementNoFlush but that's much too long. Instead it
seems better to just drop 'ForElement' from all these methods since it should be
fairly obvious we are getting the style context for an element given that the
first argument is an element.
MozReview-Commit-ID: JQKaEuCKV2F
--HG--
extra : rebase_source : 3ba51f3b00d1ec7bc91102629d9c0abb88992fef
This fixes the failure of
layout/reftests/css-grid/grid-min-max-content-sizing-002.html with the
primary patch in bug 1308876 (which causes a child whose parent is dirty
to pick up the dirty bit from the parent only the first reflow of the
child if the parent reflows the child multiple times). A simplified
testcase for that failure is
https://bugzilla.mozilla.org/attachment.cgi?id=8849771 .
The failure was caused by an error in height calculation of the first
<x> in the test. The div that is the parent of that x has a definite
height (presumably due to rules in grid), and the x has a specified
height. The div gets three reflows: two measuring reflows (from
MinContentContribution and then from MaxContentContribution) and then a
final reflow from nsGridContainerFrame::ReflowInFlowChild. Prior to the
primary patch in this bug, the div was marked dirty on all three
reflows, but with it it is marked dirty only on the first. This means
that, without the block-resize flag, the div optimizes away the reflow
of its children, since ShouldReflowAllKids returns false because
IsBResize() is false, even though NS_FRAME_CONTAINS_RELATIVE_BSIZE is
correctly set.
In order to fix this, we need to make sure the BResize flag on the
reflow state in at least some cases (see the comments in the patch for
when, and for how the cases could be optimized in the future).
Note that:
* when the dirty bit is set on the grid container, the new behavior
(with the combination of the patches) is strictly more efficient than
the old, since we will sometimes do non-dirty reflows on the grid
items (with the b-resize flag)
* when the dirty bit is *not* set on the grid container, the new
behavior is less efficient than the old, since we will set the
b-resize flag when we did not do so before. However, this slowdown
fixes existing bugs such as the one in the reftest.
Given that I was able to construct a reftest that triggers the failure
without the changes from bug 1308876, I've moved this to a separate bug.
Without the patch, grid-measuring-reflow-resize-dynamic-001.html fails,
but grid-measuring-reflow-resize-static-001.html passes. With the patch
both tests pass. (And without the patch, doing a text zoom on the
dynamic test fixes the layout error.)
MozReview-Commit-ID: JQOdVTQIkU0
--HG--
extra : transplant_source : %8B%2ARO%3B%D0%7B%EC%C9_%B3%60Sp%F9T%14X%85%DC
In the new architecture of Quantum DOM, all timer callback need a
specified event target. So, we add the new document arg to Start
function to get the event target from it. And update all callers.
MozReview-Commit-ID: a482mukqGc
--HG--
extra : rebase_source : 36f9d47a4afd7c7113adf3f274656b694b8d0943
In the new architecture of Quantum DOM, all runnables need a name label.
So, we add the new string-label arg to Start function, and update all
callers.
MozReview-Commit-ID: G9LXFjtFcQv
--HG--
extra : rebase_source : a19b605013be56d01780c831d2a48ada8825b1c7
This patch makes nsRepeatService stop inheriting from nsITimerCallback.
We needed that inheritance for InitWithCallback, but we do not need it
for InitWithFuncCallback.
This patch also makes nsRepeatService singly-owned instead of being
refcounted, since we're left with only a single owning pointer.
MozReview-Commit-ID: Fl8beVC8kGH
--HG--
extra : rebase_source : 3b6223c8e4754a90d2fef460940fda4510310f95
There are scenarios where we have a TabParent in the UI process hooked up to
a PuppetWidget with a BasicLayerManager. Webextensions fall into this category.
In this scenario, the parent-side layer manager is not hooked up to
the compositor (that is, there is no entry in the CompositorBridge layer tree
state map for the layers id). However, the content-side still ends up creating
a ClientLayerManager or a WebRenderLayerManager, which expects the layers id to
be registered in the compositor. This results in brokenness (in the case of the
ClientLayerManager/PLayerTransaction) or crashes (in the case of WebRenderLayerManager/
PWebRenderBridge). Instead, this patch changes this scenario to have the content
process use a BasicLayerManager which seems safer.
MozReview-Commit-ID: 3f80aZrRrmD
--HG--
extra : rebase_source : 10ec78dd7daf1c1c889929f0d79e0b75675b4b05
Instead we can use the otherwise-unused function to check if initialization worked.
Technically, because of the way RenderFrame construction works, whether or not
initialization succeeds is exactly dependent on whether or not the frameloader is
non-null, so we could even just use that to check success. But this feels slightly
more readable/cleaner.
MozReview-Commit-ID: CGiIAA1h6V7
--HG--
extra : rebase_source : 2d4504f7d5fde3c394edca14fe01840c1738d197
There is already a GetLayersId function in RenderFrameParent.h that does the
exact same thing, and this private function is only used in one spot. Seems
unnecessary.
MozReview-Commit-ID: 6i7lwKQsSFM
--HG--
extra : rebase_source : 6cf688f6f4300bedffebfbb94d431deec0bff209
The FFI type conversion in AnimationValue::as_arc will check if the
parameter is nullptr or not. If it is, we will get a debug assertion, so
we shouldn't pass a nullptr into it.
MozReview-Commit-ID: KWko2ipJwbo
--HG--
extra : rebase_source : f3e284da008b6c3bb3c56eb26c485f825b1188a7
We will obsolete StyleAnimationValue in the future, and can treat
AnimationValue as a wrapper of RawServoAnimationValue to hide the FFIs
at that moment. For now, we still need both types, so it's better to make sure
they are mutually exclusive in AnimationValue. Therefore, let's add some
assertions.
Besides, I think those FFIs might do many things and it seems those methods
are not critical, so let's move them into the cpp file, so we can remove
some dependencies to avoid re-compiling so many files if someone needs
revise ServoBindings.h.
MozReview-Commit-ID: FJ1uTvEQ7NT
--HG--
extra : rebase_source : 8ef99c659f2721c8425364051db19b66536bccc6
The recommended Marionette preferences for use in automation are not so
useful when testing the browser itself. Many of the tests for Firefox
have highly specific requirements, and setting the recommended Marionette
preferences could for these mean a deterioration of test coverage.
The majority of test harnesses utilising Marionette use it to install
unsigned add-ons at runtime, and these preferences are not relevant in
this context.
To avoid an unfortunate and unintended regression in test coverage,
we skip using the recommended Marionette preferences when we test the
browser itself.
MozReview-Commit-ID: 4DeHZfQEX7d
--HG--
extra : rebase_source : bf31d336df7c4c28c04454338a912632087aa3ff
The assertion has been gone, three reftests in this patch
still fail but should be run now.
MozReview-Commit-ID: HKmPkcbaG7w
--HG--
extra : rebase_source : 8417b0192a7d49dd4f7f533ba5f09edce263b3db
scrollbars.css is the only sheet which is parsed as author level, but later
added as agent level in [1]. Add a new enum value so that it can be parsed
as author level in gecko (nsCSSParser::AgentRulesEnabled() will exclude it),
but servo can recognize it as agent level sheet when the sheet is created.
Delete UserRulesEnabled() because no one uses it.
[1] http://searchfox.org/mozilla-central/rev/7419b368156a6efa24777b21b0e5706be89a9c2f/layout/base/nsDocumentViewer.cpp#2326
MozReview-Commit-ID: 2lrV4ogfnHM
--HG--
extra : rebase_source : 9d80a146f2ec5629999076ea1587e7d36f06afe7
This seems like an existing bug. If the content specifies
attributeType="yer:opacity", we should not try to animate it as a CSS property.
This patch adds a namespace check before we try to animate as a CSS property.
MozReview-Commit-ID: 1LpBa23ddqX
--HG--
extra : rebase_source : c5a4edb4c48bfd6116e58d4ef3eb91384ee86bd5
This switches over layout's usage of PLArena to ArenaAllocator. This allows
us to build more files in unified sources and gets rid of various CONST masks.
MozReview-Commit-ID: Aaf3Dl2kaoz
Bug 731974 added this code to get more accurate timer callbacks back when the refresh driver was based on timers. It shouldn't be needed anymore now that the refresh driver is based on vsync.
This protects all accesses to the frame property table with a bit stored
on the frame. This means we avoid hashtable operations when asking
about frame properties on frames that have no properties.
The changes to RestyleManager, and the new HasSkippingBitCheck API, are
needed because RestyleManager depended on being able to ask for
properties on a deleted frame (knowing that the property in question
could not have been set on any new frames since the deleted frame was
destroyed), in order to use the destruction of the properties that
happens at frame destruction as a mechanism for learning that the frame
was destroyed. The changes there preserve the use of that mechanism,
although it becomes a bit uglier. The ugliness is well-deserved.
MozReview-Commit-ID: BScmDUlWq65
--HG--
extra : transplant_source : %95%A2%9B%A1M%1F%86%A8%E0%FF%7B%E4%83%24%83%16%BE%FA%08T
This makes it so that, given a |const nsIFrame*|, a caller can retrieve
properties but not set or remove them, but with an |nsIFrame*| all
operations are allowed. I believe this is sensible since properties act
as extended member variables for things that are needed rarely, and
these are the const-ness semantics of member variables.
This also avoids the need for const_cast<nsIFrame*> to cast away const
in the following patch, which guards property access with a frame state
bit.
MozReview-Commit-ID: IJ9JnGzdH51
--HG--
extra : transplant_source : %91%D6%C7%01hC%B3z%90%B6%93%93qcAK%CB%09%D6z
CLOSED TREE
Backed out changeset 941e0f9ff9a7 (bug 1351074)
Backed out changeset 4fdf3b87a70b (bug 1351074)
Backed out changeset 586428f69838 (bug 1351074)
reftest cannot use testing-common, so we should include AsyncSpellCheckTestHelper.jsm in reftest.jar.
MozReview-Commit-ID: KeyDLjc9AUI
--HG--
extra : rebase_source : 0c967b38faf506c2e93abc8707e27cfa5388de00
TESTING_JS_MODULES uses testing-common, not gre. So we should replace gre with testing-common for mochitest.
MozReview-Commit-ID: BqsS2D3IGR6
--HG--
extra : rebase_source : 2143fcdf33c428c82c6b2e00b542649b958aeccc
e10s-based <select> dropdowns behave differently from the old, non-e10s
version. Most notably, their .value isn't updated until the dropdown is closed
and the change confirmed (e.g. by hitting Enter). Since this test originally
hit ctrl+space at the end of each test, this would open up the dropdown and
effectively trigger the different behavior. Now, the test only hits ctrl+space
for <select multiple> elements.
MozReview-Commit-ID: G3toKNdRgC8
--HG--
rename : layout/forms/test/test_bug961363.html => layout/forms/test/test_select_key_navigation_bug961363.html
extra : rebase_source : 26e581ae7f72a1c993915de1bcf2a325d2d86583
When "font.name.*" is empty, it means "default", i.e., use the first font of "font.name-list.*".
In most cases, we don't need to change existing "font.name.*" handlers which refer "font.name-list.*". However, handlers which refer only "font.name.*", we need to add the code to refer "font.name-list.*" too.
MozReview-Commit-ID: B37y1Ld9Azg
--HG--
extra : rebase_source : f944893ff38d5f2072b5014dccf455045ddafd19
As a side effect of unifying url handling in part 1, url values in
unparsed property value and variable now works, thus this change.
MozReview-Commit-ID: JnZFU4JDMrN
--HG--
extra : rebase_source : 3dc5059801822f0f6beab051fb643f491d3bda18
This is necessary because if we pass in the import rule, we would need
to invoke Servo_ImportRule_GetSheet to get the child sheet. However,
Servo_ImportRule_GetSheet tries to lock the global rwlock with read
access, while Servo_CssRules_InsertRule has already locked the same
rwlock with write access for the CSSOM case.
Since the import rule itself is never needed in the code path, it is
easier to just pass in the child stylesheet.
MozReview-Commit-ID: 4njNyGniPIm
--HG--
extra : rebase_source : ad88929713fdc5a581addc044094fa8130125121
Meiryo has same glyph for both normal style and italic/oblique style. Therefore, if we will use it as default Japanese font, italic/oblique style won't be used in Japanese text. It's too bad for <em>, <i> and backward compatibility with MS PGothic.
This patch makes gfxDWriteFontList and gfxGDIFontList ignore italic style face(s) of Meiryo at creating Meiryo's font face list.
Note that in GDI mode, font names are localized. Therefore, we need to compare with both English name and Japanese name. However, in DirectWrite mode, face names are not localized. Therefore, it's enough to compare only with English face names.
MozReview-Commit-ID: 60tFxB0jcd
--HG--
extra : rebase_source : 45eb61403f97cd765de1b81c290c29632d8174e5
reftest cannot use testing-common, so we should include AsyncSpellCheckTestHelper.jsm in reftest.jar.
Previous fix has typo of chrome vs resource. It should be chrome://.
MozReview-Commit-ID: KeyDLjc9AUI
--HG--
extra : rebase_source : 5bf2e6f4105f3437fb3c88410a246e1b85b1bf1d
TESTING_JS_MODULES uses testing-common, not gre. So we should replace gre with testing-common for mochitest.
MozReview-Commit-ID: BqsS2D3IGR6
--HG--
extra : rebase_source : a8553684f8f106c1dfb6e2d9b51df7ebeb15275d
This makes the display-reflow information for
layout/reftests/w3c-css/submitted/css21/pagination/moz-css21-float-page-break-inside-avoid-4.html
more clear, since it means we include previously-omitted
inline-break-before statuses (not really inline in this case!), such as:
status=[Complete=Y,NIF=N,Truncated=N,Break=B,FirstLetter=N]
It was useful when debugging various tests for bug 1308876.
MozReview-Commit-ID: AL38FH6wuOa
--HG--
extra : transplant_source : 15%21%86%3C%1B%5C%C5s%7C9%26%FEo%B5%20%F7%E6%E4x
Currently, stylo doesn't have css-color-4 implementation. Set expected-fail for these tests.
--HG--
extra : rebase_source : 7740e267deed0482a25289704868cadd30e35e0f
These changes allow us to asynchronously load pre-loaded stylesheets, in a way
that's similar to ChromeUtils.compileScript. The new method returns a Promise
which resolves to the preloaded sheet once it's finished loading.
This will allow us to remove the last remaining use of synchronous channels in
moz-extension: URLs.
MozReview-Commit-ID: 7J52ff93YKT
--HG--
extra : rebase_source : 20fa013cdc7f5fbedb5ce671ede17765a2abbac2
The cleanup work includes:
part 1: make all methods 'const' for the abstract class of PropertyProvider.
part 2: make nsFontMetrics's StubPropertyProvider final.
part 3: make nsTextFrame's PropertyProvider final.
Make some methods 'const' and some variables 'mutable', so we could let all the
overridden methods stay const.
We also need to make the pass-in parameter of gfxFontGroup's GetHyphenWidth const.
Note that the comment of GetHyphenWidth seem outdated, so I fixed it as well.
part 4: make the member variables in nsTextFrame's PropertyProvider to be 'const'.
Make all the member variables 'const' except mStart, mLength,
mJustificationArrayStart, and mJustificationSpacings.
The static function AdvanceToNextTab is fixed since we only use 2 of the 4 parameters.
part 5: coding style fix for nsTextFrame's PropertyProvider.
MozReview-Commit-ID: 1kbWPwx27aQ
Per bug 1322570 comment 27, the debug code is only useful in Gecko-backed
style system. To prevent the assertion in nsStyleContext::GetParent() when
running stylo, run them only in gecko.
MozReview-Commit-ID: DOcJ3T7vS1J
--HG--
extra : rebase_source : 33fd6caaa4ada9530fe8d874b827d91ac355e0c1
The nsMathMLChar has SetStyleContext() that can change nsStyleContext. It's
not obvious how to get parent style context other than calling GetParent().
So white-list this case for now.
Fixed tests like layout/reftests/bugs/347348-1.xhtml.
MozReview-Commit-ID: JZU1IzcMxs8
--HG--
extra : rebase_source : 41880ffdc6064dd06e1cee6046a4cf64535d77b2
::first-letter is not support by stylo yet. (bug 1324618)
MozReview-Commit-ID: KwQk2jhn53c
--HG--
extra : rebase_source : 9bafad53a38fd11aae7be09780ee7680d9a40e1c
In stylo, nsStyleContext::GetParent() is not valid.
MozReview-Commit-ID: 5FbgUwobG3U
--HG--
extra : rebase_source : 47910f056eaf59af4e68276dd8e48b2a86634874
Per bug 1322570 comment 46, it's not easy to replace ComputedJustifyItems()
and UsedJustifySelf()'s internal nsStyleContext::GetParent() without
correctness penalty, so we use GetParentAllowServo() for now.
Also, fix the reftest.list added in bug 1334403 which incorrectly wrote test
page as reference page.
MozReview-Commit-ID: 6kAAWSFojd5
--HG--
extra : rebase_source : 2d03302115dd40281cec27bc18750b6933682855
Also, add GetParentAllowServo() to whitelist the usage in servo-backed style
system in subsequent parts so that we could revisit them later.
MozReview-Commit-ID: JthU18Ftx02
--HG--
extra : rebase_source : b8840adcc4959f96cd429db65584f3e83c09c597