nsIFilePicker.displaySpecialDirectory is a string that can be set to TmpD,
Desk, or any other special directory value. The real value of this directory
will be read in the parent process.
Without this change, we can end up asserting in ComputeVariablesData and
crashing in CSSVariableResolver::Resolve due to not finding any variable
declarations on the rules we matched, when we have content like in the
crashtest added here, i.e. variables inheriting into a pseudo like
::first-line and animations on the element inside the ::first-line.
We could solve this alternatively by removing the assertion and making
CSSVariableResolver::Resolve handle a null aDeclarations more gracefully,
but since we can save the effort of recomputing the Variables struct in
this case, we may as well.
MozReview-Commit-ID: 6l06ZF3WGsy
Took me more time than what I'd like to admit to figure this out.
MozReview-Commit-ID: FpphYwxAVC2
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
Say there's a single lag event, a GC or a busy loop, during which the user
types several characters.
Is this one (lag) event? Several (input) events?
We have INPUT_EVENT_RESPONSE_MS which will accumulate several lagged events in
this case. However, that is more of an indication of how users use Firefox than
how good we've been at eliminating sources of lag.
INPUT_EVENT_RESPONSE_COALESCED_MS records the coalesced time spend waiting for
responses to input events. So in this case it will record one value for the
entire duration of the lag.
MozReview-Commit-ID: H5rYnhwF0q3
--HG--
extra : rebase_source : b9be179dac6c6a007d2835b909ec4ce71a3f1c90
Probably GetAnimationCollection itself should assert against it, but that's a
bigger task right now...
MozReview-Commit-ID: JxFWXtgMAXy
--HG--
extra : rebase_source : 90ffd33e56dd8d285765bc7a06572b0ae229b5e7
The test case is supposed that transform transition runs on the compositor.
We can't enable this test until bug 1334036 is fixed.
MozReview-Commit-ID: 6zakBP7tjhs
--HG--
extra : rebase_source : ae4b0e80c5a655dc4ce27cc0945cb7cea2d0cab1
This is because it does ensure both, and some of the callers care about
size and some care about position.
MozReview-Commit-ID: 3e8II6Lf72X
--HG--
extra : transplant_source : %EE%5E%87%1D%AA%EB%B9%22%D9%D6%D2%9D6U%C4%2A%CA%A1r%E9
We use RestyleManager::mAnimationGeneration as the animation index of a
new created transition, and Element.getAnimations() uses this index to
sort the order of transitions. We increase mAnimationGeneration one per
restyle cycle if there is any non-animation update.
MozReview-Commit-ID: KmirBzI7CXi
--HG--
extra : rebase_source : 6a9001ea99f86c25b1d8d0a822b51b8753248bfb
Add MOZ_FORMAT_PRINTF to the definitions of PrintAsFormatString in
nsCSSRenderingBorders.h.
MozReview-Commit-ID: 9ZcSgNIPPhM
--HG--
extra : rebase_source : e2c3f86ac58835c0bdaf442f45fee25db99e52a6
We want to set style bits on `nsStyleContext` regardless of which engine is
providing the style source. The moves the bit set up to `SetStyleBits` which
runs for both sources.
MozReview-Commit-ID: 8N6oUyxz1Xs
This also puts the Gecko-drawing of the checkbox / radio frames inside
nsGfxRadioControlFrame and nsGfxCheckboxControlFrame behind the
MOZ_WIDGET_ANDROID pragma for now.
MozReview-Commit-ID: BEyRfEmwjZY
--HG--
extra : rebase_source : fe42a65f55d822a2c7babd95898ec7520cc01616
extra : source : 9e2440ee6715204e88c7ae709a96ef7e1f707bdc
This also happens to fix other bugs, like making display: contents pseudos
animatable, which weren't before.
MozReview-Commit-ID: LhwTPNbFvSZ
--HG--
extra : rebase_source : 785105b08d6bfa15ad257e61b769a263c6810ad0
Specifically:
* This patch uses a flag added in a prior patch to let us use the author's
chosen prefix (-webkit or -moz) when serializing. (We treat the -moz version
as a special case, because that makes it more straightforward to unsupport
-moz if/when we can.)
* This patch makes us share the linear-gradient() side-or-corner serialization
codepath when serializing points for -webkit-linear-gradient. (The
alternative is the -moz-linear-gradient codepath, which defaults to
serializing with percent values 0%/100% for sides & corners -- and raw
percentages are invalid in -webkit-linear-gradient(), so we can't share that
codepath.) Notably, we have to skip the "to " token that the
linear-gradient() codepath would normally print out -- that was a late
addition to the spec and so it only exists in the unprefixed modern syntax.
(Instead, -webkit-linear-gradient syntax is implicitly "from" the given
point).
MozReview-Commit-ID: 9Oqo8nG1XDU
--HG--
extra : rebase_source : b15218d9cd97d3371e89365fc472d0bcd2672861
This patch doesn't change our behavior -- we won't actually act on the new flag
until the next patch in this series.
MozReview-Commit-ID: EONsLM54eG1
--HG--
extra : rebase_source : cabd4a140d575794a8a656c47692bb9d3a02de88
This patch doesn't change our behavior -- we'll still produce the same serialization that we would've before.
MOTIVATION: A later patch will make us share this codepath to serialize into
-webkit-linear-gradient() syntax. That syntax uses the same representation for
points as unprefixed modern linear-gradient() (with box-side-or-corner keywords
"top", "right", etc.), but it does *not* use the word "to". So we'd like to
allow "to"-and-its-subsequent-space-character to be optional. Hence, this patch
groups the space together with "to", rather than as a prefix on the next token,
so that we can skip right to printing the point (without a leading space)
when we add support for -webkit-linear-gradient() serialization.
MozReview-Commit-ID: 5fCzx4NmpcC
--HG--
extra : rebase_source : 9f8b5c801b2f4352dd2ace3b79c40edb1795b361
nsStyleImage::ComputeActualCropRect may return false under 4 conditions
1. mType is not eStyleImageType_Image.
This function is design to be used when mType is eStyleImageType_Image.
Replace this 'if' check by MOZ_ASSERT.
2. nsStyleImage::GetImageData() returns nullptr
This function will return true if this image refers to a local-ref resource.
3. GetImage returns failure or does not return a valid imgIContainer.
It's possible. Please refers to the comment in imgReqestProxy::GetImage
at [1].
4. imageSize is empty
It's possible too. By giving a malformed image to a style image, we will hit
this condition. And this is right what we met in this bug.
Since ComputeActualCropRect may actaully return false, we should remove the
NS_ASSERTION that assume it will always return true.
[1]
https://hg.mozilla.org/mozilla-central/file/7f1f1559cd8d/image/imgRequestProxy.cpp#l513
MozReview-Commit-ID: KHTFQJjiLtT
--HG--
extra : rebase_source : c4e119dd250094115ab23c323ca49f9ebc296698
This renames ShouldClampMinSize to ShouldApplyAutoMinSize, which is more
accurate, and caches the value on the grid item for later use.
No functional changes other than that.
MozReview-Commit-ID: E1mvBZsMIxh
The COMPUTE_SIZE_SHRINK_WRAP flag inhibits stretching in the inline axis
which means the item won't shrink below its min-content size. In this
case min-width:0 should allow it to do that and since the column size is
smaller it should shrink, which in turn affects the measured block size.
MozReview-Commit-ID: AxQcMkYrxS5
The function uses document's default computed values if the parent style
is not specified.
MozReview-Commit-ID: ICd3phAi0C6
--HG--
extra : rebase_source : 343dee682096b75cd7f905db7207823f7e3624b5
It will be used to check whether the PropertyDeclarationBlock has 'inherit',
'initial' or 'unset'.
MozReview-Commit-ID: JxlxAJJSNJI
--HG--
extra : rebase_source : 99912dcbcfb39e2710e822b93c7933af79b5421b
Also this patch add nsIAtom as an argument to ResolveTransientStyle() to call
the new function ResolveServoTransientStyle easier. The only call site of the
ResolveTransientStyle() has already nsIAtom* there.
MozReview-Commit-ID: IwxqZbaCSpB
--HG--
extra : rebase_source : b94a3a8723fe53f38eb6144a5926dec3d7796e72
In nsCSSRenderingGradients the logic for handling many error conditions
and normalizing the gradient stops is shared between the paint path and
the WebRender path. WebRender now normalizes gradients and handles any
error conditions that it needs to. There are some conditions that are not
problems for it, like repeating radial gradients with stops below zero.
This commit undoes the work done in bug 1341101 to share this logic. Some
conditions were moved around in bug 1341101 to make things simpler, and
that has been undone. Now the paint path is identical to how it was
originally.
There is one exception, which is ResolveMidpoints which is kept between
both code paths. This should be safe.
MozReview-Commit-ID: LMhMNXNquXM
--HG--
extra : rebase_source : 2d389f76134671b6caa44a3b7370b1c786576bdc
extra : histedit_source : caf5d3a456cbb9987970783969d0eb2a424e7eca
The flush was added due to the overflow/underflow events causing recursion in some cases. But if the events aren't fired there is no point in doing this. The password manager test is changed to flush since it relies on showing/hiding tree columns but currently doesn't wait for a relayout before asking for cell information.
Add a Gecko side LengthParsingMode enum that matches the Servo version. This
will be used in a few Stylo glue APIs on the FFI boundary.
MozReview-Commit-ID: EuDlWc6ZiQ8
The nsBidi API requires the consumer to first call SetPara()
in order to perform bidi resolution and that resets the data
members, so there is no need to recreate nsBidi objects from
scratch each time we need to perform bidi resolution.
Having this API allows us to reuse this object across the
calls to nsBidiPresUtils members.
These can be run with:
./mach gtest Stylo.*
Note that running `./mach build` is required after modifying example.css
MozReview-Commit-ID: 8KvhYHgGLfD
--HG--
extra : rebase_source : 30adcc530e2e527b575868d5ff9fdf8cbbf59345
This patch:
- does s/var/let/ to upgrade to modern JS best-practices.
- Wraps some lines that are too long.
- Changes loops to "for (let foo of [...])" rather than foreach+function-pointer.
- Changes some copypasted cleanup code to use a loop instead (which will be especially useful in a forthcoming version of this test that'll add another thing to clean up).
MozReview-Commit-ID: DWK8jFbfqeB
This patch is just flipping some logic in a way that should produce the same
outcome, so it shouldn't affect behavior.
MozReview-Commit-ID: LM4HbJD3D9w
This patch shouldn't change our layout order or paint order for flex items
(though it will change our behavior for the better when an abspos child is
present, as discussed in bug 1345873).
This patch *will* change the tab-index behavior of flex items. Previously, the
default tab order would match the visual order (i.e. it would respect "order"),
because it depends on the frame tree, and we sorted the frame tree by
"order". Now, the tab-index will come from the DOM order (the unmodified frame
tree), as the spec requires.
MozReview-Commit-ID: 9OsqQX1sEn3
This patch just adds an optional codepath that isn't taken yet, so it shouldn't
affect our behavior. (The next patch in the series will make use of this new
codepath.)
Note: the large code-comment that this patch adds is taken mostly-verbatim from
some nsFlexContainerFrame.cpp code. (The original copy will be removed by the
next patch in this series, when we switch to take advantage of this new
mechanism.)
MozReview-Commit-ID: 9pkJ346rrXg
Connect the Servo types and functions for working with @page rules to Gecko.
This also adjusts the Stylo test expectations to match the current state with
@page support.
MozReview-Commit-ID: 513d05m51wK
--HG--
extra : rebase_source : aa92dc1ad4b3949418759b3893a918663ec6ee0c
Adds `ServoPageRule` for use as the CSSOM representation of @page rules parsed
by Servo.
MozReview-Commit-ID: 7AIErJmoZN
--HG--
extra : rebase_source : f47448b9053e6a49023799631ca1d36f058272f4
Extract a `CSSPageRule` base class from the existing Gecko `nsCSSPageRule`
class. This will be used in the next commit as the parent of a new
`ServoPageRule` for the Servo variant.
MozReview-Commit-ID: 1F3FWfVKH29
--HG--
extra : rebase_source : 5186cf2e233f3a757676a0127752faa8cc748cd4
test_page_parser.html tried to check parser behavior with a property that's not
allowed in an @page context, such as `position: absolute`. However, the test
forgot to apply the @page wrapper for this rule, so we weren't checking the
intended case after all.
MozReview-Commit-ID: LSd3aLwZAST
--HG--
extra : rebase_source : f841fcd1ae7e37eaa928e39e116cd9a6a5385f85
The debug code calls nsStyleContext::GetParent(), which is invalid in stylo.
Let's skip it.
MozReview-Commit-ID: 5opMaSuyoNr
--HG--
extra : rebase_source : e316b5d45ebe634a63ef0e44ed0b7183551551d4
They have generic names, and are potentially conflicting with
in-tree headers with the same name (which is true for at least port.h).
There aren't enough users of brotli to want to avoid LOCAL_INCLUDES
in the directories that use it.
--HG--
extra : rebase_source : 82531ac5961ad80e1b3d0c1484a2f146be194411
This patch does the following in addition to a simple move:
* change the type of the pointers from RefPtr to nsCOMPtr
* move it from mozilla::css namespace to mozilla
MozReview-Commit-ID: 72MYq6kWm4s
--HG--
extra : rebase_source : 400fe0d7cc422f22592c302cfd4e457830b77e3e
This only has overhead if the profiler is running, but it means that it has
the potential to skew restyle times in profiles.
We haven't measured the overhead of this, but it's probably non-zero, and at
the moment our profiling efforts are more focused on getting accurate times
than on getting useful information about restyling cost sources.
MozReview-Commit-ID: 3KmiiyGrxZH
--HG--
extra : rebase_source : df7047f1af5f36f7a1b3a18498d8eb5508ee0b93
Practical changes:
1) Some additional method arguments are nullable or optional, which
matches Chrome/WebKit. They make more sense non-nullable and
non-optional, but Chrome is afraid of the compat impact of changing.
2) Added [CEReactions] to deleteFromDocument().
MozReview-Commit-ID: Kg9EDubnEui
--HG--
extra : rebase_source : 1d47ee0b12b0b719159c326f789dd6e6b6000c8e
This patch does a few things:
a) Adds the resources location from the .app directory to the read whitelist
b) When it's a non-packaged build, mach run (and various mach tests) set an environment variable for the repo location which we allow reads from.
r=haik,froydnj
MozReview-Commit-ID: KNvAoUs5Ati
--HG--
extra : rebase_source : f637acff32fc8582732de932503dd696abc57877
Also update test_transitions_dynamic_changes.html because we don't
support "font" property for stylo now. According to its context and purpose, we
only need a property other than "text-indent", so it is not
necessary to use "font".
Besides, we don't support shorthand properties for transitions, so
test_transitions.html have two intermittents. Mark the expect number as
'*' until we fix shorthand properties for transitions.
MozReview-Commit-ID: HyuOV29AJ9a
--HG--
extra : rebase_source : b5d4bf2786bb590e16c06b7b93c95a38cabf1781
We need a utility method to get the AnimationCollection by dom::Element
and the pseudo element tag.
MozReview-Commit-ID: KCOY6EKFFX5
--HG--
extra : rebase_source : de1b9386d6324cfb4cee0d84b13a0b1af4aa5c12
We add these FFIs for retrieving the existing transitions, so we can
reduce the false alarms of triggering transitions from Servo:
1. Gecko_ElementTransitions_Length
2. Gecko_ElementTransitions_PropertyAt
3. Gecko_ElementTransitions_EndValueAt
MozReview-Commit-ID: 9eLd8fxmNd9
--HG--
extra : rebase_source : 0ea23dd7f48dbdc1f31a83244ab1dfaf1b20a321
Add one FFI, Gecko_ElementHasCSSTransitions, to check if there is any
transition in CSSTransitionCollection. This will be used to check if we need
to update transition and if we should compute the after-change style.
MozReview-Commit-ID: 7xP4SdxNp7g
--HG--
extra : rebase_source : dbc4941151835c2f1c3596a6baaef77b2198890c
Animation-only restyle should include both Animation and Transition
cascade levels.
MozReview-Commit-ID: Jo1sb5fGUC0
--HG--
extra : rebase_source : ddd7d796b93f9e7ced912ec4fa2eb79e7ba58784