Text style is always resolved via ServoStyleSet::ResolveStyleForText, either
from the frame constructor initially, or from
ServoRestyleManager::ProcessPostTraversalForText.
So text-only adjustments should go there instead. Since that doesn't call into
cascade(), all the code that passes `pseudo` there is dead code we can remove.
MozReview-Commit-ID: jpbBYpLlUL
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
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
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>
This also moves the NoteStyleSheetsChanged to RecordStylesheetChange, which
makes more sense, and stopped special-casing author styles, since it's not
needed now.
MozReview-Commit-ID: 9WKFa0JxqlU
--HG--
extra : rebase_source : 5803620c98309bd2fbb542158e69ef3ddcee9a4b
This allows us to run SMIL tests that include a combination of additive and
non-additive animation.
MozReview-Commit-ID: 2uVN184h7Ge
--HG--
extra : rebase_source : f6a3dc70e20c09cbfdb8cc3149e2820575866b89
We will use this later in this patch series to simplify the creation of SMIL's
ValueWrapper objects.
MozReview-Commit-ID: 7EF9CN2SdwQ
--HG--
extra : rebase_source : e7cf5adc4c3f72dcc4b99625a8d0cb1a2d17f7d4
We will use this type later in this patch series in nsSMILCSSProperty so this
patch moves it to a separate file so it can be re-used.
MozReview-Commit-ID: 4Z7YbsQ9xz4
--HG--
extra : rebase_source : 0f6f7248d1a4dfc77360829f3a0e6ed263f156db
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
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
Image loading status can be accessed in main thread only, so we can not use
nsStyleImage::IsLoaded in nsStyleBorder::CalcDifference, which might be executed
on a background thread.
The drawback of this change is we may paint a border-image, once, even before it
was actually loaded, which is a waste, because we have nothing to draw yet.
PS:
We did not check nsStyleImage::IsLoaded in both background-image and mask-image's
CalcDifference.
MozReview-Commit-ID: 5knH6dZziL8
--HG--
extra : rebase_source : 8e854960bfec130fe06e57b5e898651814e7f36e