GTK is definitely not thread-safe, and unless proven otherwise, I suspect the
other widgets aren't either.
Mutex the calls to get the system color stuff.
There are chances to make this more fine-grained moving the mutexes into the
specific widget code and when needed. That is more analysis work which I'm not
sure we should waste time on, since the chances on racing here seem quite
unlikely in practice (system colors are uncommon enough in content, I guess).
MozReview-Commit-ID: AOQQ2jtkgpx
nsTextFrame stores text as single byte character array if all characters are
less than U+0100. Although, this saves footprint, but retrieving and modifying
text needs converting cost. Therefore, if it's created for a text node in
<input> or <textarea>, it should store text as char16_t array.
MozReview-Commit-ID: 9Z82rketT7g
--HG--
extra : rebase_source : 59f59ac1488c21a57d95d253cc794a011d672c95
Current stylo uses LengthOrPercentage::Calc for interpolation between length and
percentage, but neither gecko nor stylo will support the calc value for
stroke-dasharray. (bug 1258270 / bug 1386967)
So current stylo will not animate this types.
In this bug, we make stroke-dasharray interpolation between length and
percentage as discrete type until we properly support calc() for stroke-dasharray
(bug 1258270 / bug 1386967), as a result, rendering results of this type
matches with gecko.
MozReview-Commit-ID: FBuJM254ZdS
--HG--
extra : rebase_source : 634435089e3a72c03d62a7e4d51195e03c68d5b6
This change ensures that HTML frames with SVG filters applied are given the
correct overflow regions so that they will display and invalidate correctly.
The bug that this commit fixes does not manifest in many cases since
often elements happen to be reflowed more than once when a document loads.
When that happened the bug would be masked because the filtered frame would be
given a size during the first reflow, and that would then make the overflow
calculations in subsequent reflows work. It was only in cases where the
filtered frame was only reflowed once (such as when dynamically inserting a
filtered element into the DOM using script) that the lack of a valid frame
size during the overflow calculations would result in bad overflow regions
being calculated.
MozReview-Commit-ID: 79lR27KRSym
--HG--
extra : rebase_source : 9df6ff87002f0af4abf0b97e2a084902d81f468c
Recording mask clips in the clip stack changes the value of TopmostClipId()
which confuses the code in ScrollingLayersHelper. The mask clip can be
thought of as an "out-of-band" clip that ScrollingLayersHelper doesn't
need to know about. This patch adds a mechanism for pushing such
"out-of-band" clips without touching the clip stack.
MozReview-Commit-ID: 8Zeqtigk0cj
--HG--
extra : rebase_source : 35176f3c9d98d186f78d7a0ff44845c7c3c9f67e
I've verified with the profiler that we use the parallel traversal for
loading a foreground tab, but not for a tab opened with ctrl-click.
MozReview-Commit-ID: 2SiVDlLLyah
This replaces our DrawTargetCapture hack with a similar but more powerful TextDrawTarget
hack. The old design had several limitations:
* It couldn't handle shadows
* It couldn't handle selections
* It couldn't handle font/color changes in a single text-run
* It couldn't handle decorations (underline, overline, line-through)
Mostly this was a consequence of the fact that it only modified the start and end
of the rendering algorithm, and therefore couldn't distinguish draw calls for different
parts of the text.
This new design is based on a similar principle as DrawTargetCapture, but also passes
down the TextDrawTarget in the drawing arguments, so that the drawing algorithm can
notify us of changes in phase (e.g. "now we're doing underlines"). This also lets us
directly pass data to TextDrawTarget when possible (as is done for shadows and selections).
In doing this, I also improved the logic copied from ContainsOnlyColoredGlyphs to handle
changes in font/color mid-text-run (which can happen because of font fallback).
The end result is:
* We handle all shadows natively
* We handle all selections natively
* We handle all decorations natively
* We handle font/color changes in a single text-run
* Although we still hackily intercept draw calls
* But we don't need to buffer commands, reducing total memcopies
In addition, this change integrates webrender's PushTextShadow and PushLine APIs,
which were designed for this use case. This is only done in the layerless path;
WebrenderTextLayer continues to be semantically limited, as we aren't actively
maintaining non-layers-free webrender anymore.
This also doesn't modify TextLayers, to minimize churn. In theory they can be
augmented to support the richer semantics that TextDrawTarget has, but there's
little motivation since the API is largely unused with this change.
MozReview-Commit-ID: 4IjTsSW335h
--HG--
extra : rebase_source : d69f69648ade5c7a8e6bb756f4b8ab9e2543e576
For layers-free mode, we still need to call NotifyInvalidation to trigger
FireDOMPaintEvent. It should be fine to pass an empty rect since we always
take full snapshot for WR.
MozReview-Commit-ID: EzzQi2C5aRQ
--HG--
extra : rebase_source : 81eb63698bd052615c42eebb392e7f771a59f36c
These are all easy cases where an nsXPIDLCString local variable is set via
getter_Copies() and then is only used in ways that nsCStrings can also be used
(i.e. no null checks or implicit conversions to |char*|).
In every case the patch trivially replaces the nsXPIDLCString with an
nsCString. (Also, there are a couple of unused nsXPIDLCString variables that
the patch simply removes.)
In the spec [1], computed value for column-gap is defined as
'as specified, with <length>s made absolute'.
[1] https://drafts.csswg.org/css-multicol-1/#column-gap
MozReview-Commit-ID: IO22V33z8pz
--HG--
extra : rebase_source : 63167965a0e89fd298df3a22a7c5e41ed34dd1e9
As for Gecko we can't interpolate between value with color and value without
color yet (bug 726550) so that transition does not happen for the cases.
As for Servo we can interpolate them but the results are wrong (bug 1390697).
MozReview-Commit-ID: 9T0ELBUP0pL
--HG--
extra : rebase_source : eb0ba751a2d0a1081a7883b7292da6f1d20e4caf
This field will be needed for servo side alias pref handling on the
next patch.
MozReview-Commit-ID: LyH2UwZEvMy
--HG--
extra : rebase_source : f3f921581a0cdcc9c63520b528bd0f1e12568958
CompareCacheHashEntry::mCrit[] is the only case where the nsXPIDLString-ness
was important. The patch adds an explicit SetIsVoid() call to that class's
constructor and changes some null checks to IsVoid() checks.
--HG--
extra : rebase_source : e68befcde4dd098bac2a550bc666eaf3bf1298d7