Граф коммитов

59407 Коммитов

Автор SHA1 Сообщение Дата
Alexis Beingessner 9c4535798f Bug 1357545 - handle text-shadows/decorations with webrender (layers-free) r=jrmuizel
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
2017-06-19 10:58:28 -04:00
Wes Kocher c1383cebf3 Merge m-c to autoland, a=merge
MozReview-Commit-ID: KLrOCT1a7El
2017-08-17 16:23:45 -07:00
Wes Kocher 1d9f00cb8d Merge inbound to m-c a=merge
MozReview-Commit-ID: CQeEqtGlaXh
2017-08-17 16:16:51 -07:00
Gian-Carlo Pascutto f4a0bc4497 Bug 1386826 - Whitelist the objdir, so _tests gets covered. r=jmaher
MozReview-Commit-ID: 8SHk1Pfy37I

--HG--
extra : rebase_source : 3944e20e310dda395e67ba9b1e33747413dea84e
2017-08-16 19:03:09 +02:00
Wes Kocher e5f7ecb3d1 Backed out 2 changesets (bug 577824) for reftest failures in 577824.html a=backout CLOSED TREE
Backed out changeset 98f8d05483cf (bug 577824)
Backed out changeset 3b9a469ab1d6 (bug 577824)

MozReview-Commit-ID: HraTkt5uajG
2017-08-17 13:17:28 -07:00
Ethan Lin cf6417fa0a Bug 1390437 - Add NotifyInvalidation after EndTransaction for layers-free mode. r=kats
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
2017-08-15 16:54:12 +08:00
Wei-Cheng Pan 9be6672987 Bug 1390263 - Follow up for Bug 1357742. r=xidorn
MozReview-Commit-ID: CMQkpkmL9Cb

--HG--
extra : rebase_source : 08f87eb1a7a93d3055260dfb822ce16128b4ed02
2017-08-17 17:40:21 +08:00
Xidorn Quan 179961b3c9 Bug 1383845 - Enable tests disabled for bug 1383845. r=TYLin
MozReview-Commit-ID: Glao9d9PiUF

--HG--
extra : rebase_source : cfc70fcb350a7ee8e325ba1bda0bcdead62d786e
2017-08-17 10:51:59 +10:00
Cameron McCormack c8564a9ea5 Bug 1388113 - Hold on to pseudo-element atoms longer. r=bholley
MozReview-Commit-ID: 98eW8VwVFPT

--HG--
extra : rebase_source : dc0b80d9cc693da3abe858ba52d691416332dee7
2017-08-17 14:37:32 -04:00
Sebastian Hengst 7879c55451 Backed out changeset 5ea221b039d4 (bug 1363922) for bustage at layout/painting/FrameLayerBuilder.cpp:5863 (defined but unused). r=backout on a CLOSED TREE 2017-08-17 16:12:08 +02:00
Sebastian Hengst fb32ca19c4 Backed out changeset 189abf9f8d6d (bug 1363922) 2017-08-17 16:11:28 +02:00
Bas Schouten 9207223d59 Bug 1363922 - Part 2: Estimate scale of frames based on their PresShell resolution. r=mstange
MozReview-Commit-ID: 8f6T3PiPkF8
2017-08-17 15:45:31 +02:00
Bas Schouten fe49d64a98 Bug 1363922 - Part 1: Remember about the reference frame during BuildDisplayList for ScrollFrameHelper so GetScrolledRect can use it. r=mstange
MozReview-Commit-ID: 8GO6xuSH5xY
2017-08-17 15:45:30 +02:00
Carsten "Tomcat" Book 99aa3f8e70 Merge mozilla-central to mozilla-inbound 2017-08-17 13:13:10 +02:00
Nicholas Nethercote 025461bde7 Bug 1390428 (part 1) - Remove many nsXPIDLCString local variables. r=erahm.
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.)
2017-08-16 13:58:35 +10:00
Hiroyuki Ikezoe a30003cd17 Bug 1356241 - Return specified 'normal' value for column-gap computed value. r=dholbert
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
2017-08-17 08:56:00 +09:00
Hiroyuki Ikezoe 597905c94c Bug 1387973 - Modify transition test cases for {text,box}-shadow without color. r=birtles
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
2017-08-16 15:03:46 +09:00
Wes Kocher 366445521c Merge m-c to autoland, a=merge
MozReview-Commit-ID: DjSlrmDFfe3
2017-08-16 17:14:41 -07:00
Wes Kocher 9e13a44b54 Merge inbound to central, a=merge
MozReview-Commit-ID: GEfEDRZk5bo
2017-08-16 16:59:26 -07:00
Nazım Can Altınova 1112f60fcc Bug 1344314 - stylo: Add an aliasid field to CSS_PROP_ALIAS macro and include them to bindings r=manishearth
This field will be needed for servo side alias pref handling on the
next patch.

MozReview-Commit-ID: LyH2UwZEvMy

--HG--
extra : rebase_source : f3f921581a0cdcc9c63520b528bd0f1e12568958
2017-08-12 14:37:19 -07:00
Geoff Brown f735ed7396 Bug 1388883 - Ensure a fresh necko cache for each mochitest and reftest run; r=bc 2017-08-16 06:55:49 -06:00
Thomas Nguyen 33fb4a1505 Bug 1384493 - LoadStyleLink and LoadInlineStyle should use correct referrer policy. r=heycam
If the link element has referrerpolicy attribute, we should use policy in the
attribute with higher priority

MozReview-Commit-ID: GZZeRaoxPUw
2017-08-15 00:05:00 -04:00
Carsten "Tomcat" Book eea1986e03 merge mozilla-inbound to mozilla-central a=merge 2017-08-16 11:23:24 +02:00
Ting-Yu Lin 8093e51fed Bug 1382102 - Update mochitest expectation. r=emilio
MozReview-Commit-ID: FCLxWKZ5Qap

--HG--
extra : rebase_source : c9624c7cb9ad9b3edafe4882bb6703b8809041b1
2017-08-15 20:44:49 +08:00
Nicholas Nethercote a83fefd956 Bug 1390036 (part 1) - Remove most remaining uses of nsXPIDLString. r=erahm.
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
2017-08-11 18:31:22 +10:00
Wes Kocher be24aec8e9 Merge m-c to inbound a=merge
MozReview-Commit-ID: JqsSD85rE4W
2017-08-15 19:15:22 -07:00
Wes Kocher 7921644d1b Merge inbound to central, a=merge
MozReview-Commit-ID: 1DadhJTLBXN
2017-08-15 19:02:51 -07:00
Emilio Cobos Álvarez af1bc71c5d Bug 1390650: stylo: Remove some unused FFI functions. r=bholley,xidorn
MozReview-Commit-ID: K9fXGRmgkr4

--HG--
extra : rebase_source : 2428cd915b9d7f4b75b23df99e9d532034ff63a7
2017-08-15 23:21:30 +02:00
Jeremy Chen e3effad2d4 Bug 1387982 - re-enable filter tests in test_transitions_per_property.html. r=hiro
The reason of the previous failure is we wrongly use default color for drop-shadow
functions that without specified color component. Since this has been resolved in
bug 1388220, we can enable these two tests now.

MozReview-Commit-ID: C3bPcLYQwvW

--HG--
extra : rebase_source : c39d1465658e358110bdccb32649a7fdea4c562c
2017-08-16 10:54:18 +08:00
J. Ryan Stinnett 418161625f Bug 1390691 - Fix up Servo_StyleSet_MediumFeaturesChanged for Linux 32-bit ABI. r=manishearth
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: LY6z7lEKgOp

--HG--
extra : rebase_source : deb9739bd100e2162e7c93d6d45d7029d7793355
2017-08-15 17:10:13 -05:00
J. Ryan Stinnett f68386ce04 Bug 1390691 - Fix up Servo_TakeChangeHint for Linux 32-bit ABI. r=manishearth
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the caller will pass along space for the
struct return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: 6qqVVfU8Mb2

--HG--
extra : rebase_source : 825985977307b50ae8a80ab182e54a3f7b95eafc
2017-08-14 22:11:53 -05:00
J. Ryan Stinnett bdb91a3c76 Bug 1390691 - Fix up Gecko_CalcStyleDifference for Linux 32-bit ABI. r=manishearth
Bindgen bitfield enums don't work as return values with the Linux 32-bit ABI at
the moment because they wrap the value in a struct.

This causes the Rust side to believe the callee expects space for the struct
return value, while C++ believes it's just an integer value.

MozReview-Commit-ID: FRBqlZuMiAR

--HG--
extra : rebase_source : d1b2af4b965c000a5bd8e1792ae166cba5e152a9
2017-08-14 20:02:01 -05:00
J. Ryan Stinnett 7c022405a1 Bug 1390691 - Fix up Servo_StyleSet_Init for Linux 32-bit ABI. r=manishearth
Rust was treating this as returning an `Owned` types which uses a struct, while
C++ saw it as just a pointer.

This disagreement violates the Linux 32-bit ABI, and also the pointer was deemed
to be more correct anyway.

MozReview-Commit-ID: AQJkdU02vfh

--HG--
extra : rebase_source : d53d7a395944f65d71f14e540cc6d6bac4582187
2017-08-14 17:21:51 -05:00
Ehsan Akhgari 5cb2b76206 Bug 1390382 - Part 5 : Only call nsLayoutUtils::GetDisplayRootFrame() once per call to nsIFrame::SchedulePaint(); r=dholbert
nsLayoutUtils::GetDisplayRootFrame() can be quite expensive to call.
By calling this function one level higher (in callers and passing the return
value to callees), we can avoid calling it twice per call to SchedulePaint().
2017-08-15 18:57:16 -04:00
Ehsan Akhgari c3b6078856 Bug 1390382 - Part 4: Avoid recomputing the selection in nsCaret::SchedulePaint() when the caller has the information available; r=dholbert 2017-08-15 18:57:16 -04:00
Ehsan Akhgari 82df247868 Bug 1390382 - Part 3: Inline nsCaret::IsVisible(); r=dholbert 2017-08-15 18:57:15 -04:00
Ehsan Akhgari 77a5d8cdb7 Bug 1390382 - Part 2: Avoid recomputing the selection in Selection::IsVisible() when the caller has the information available; r=dholbert 2017-08-15 18:57:15 -04:00
Masayuki Nakano 1bbc0d5920 Bug 1387317 - part4: Make editor flag setters use new AddFlags() or RemoveFlags() if useful r=m_kato
MozReview-Commit-ID: EMDeGfK37Lx

--HG--
extra : rebase_source : 8a2b4e809c608649fbb41edd32d2165db7e77516
2017-08-08 12:36:29 +09:00
Wes Kocher 3945278423 Merge m-c to autoland, a=merge
MozReview-Commit-ID: D96bIJACwZe
2017-08-15 19:16:12 -07:00
Bobby Holley 4a7d72d9bc Bug 1389300 - Don't mix style backend types in nsComputedDOMStyle. r=heycam
MozReview-Commit-ID: 8Decj2cxySY
2017-08-15 19:10:45 -07:00
Hiroyuki Ikezoe 5a58ca2a39 Bug 1387946 - Set/reset transition-property to cancel/create transition properly. r=birtles
These test cases rely on the behavior that different lengths repeated list can
not be transitioned on Gecko. But it's not clear the behavior is reasonable or
not.  The test cases here should not depend on the behavior.

MozReview-Commit-ID: 19vI0TFMzfN
2017-08-16 09:14:18 +09:00
Kartikaya Gupta 309c1ac3b0 Bug 1389139 - Add transforms for reflayer equivalents in the layers-free APZ world. r=jrmuizel
In normal gecko, RefLayer instances also have a transform, which needs
to be propagated to APZ in layers-free mode.

MozReview-Commit-ID: DaEyvpumG9F

--HG--
extra : rebase_source : 694dea8bdaa5a40cf52b2d3e99fdd4c335b6012c
2017-08-16 12:50:37 -04:00
Kartikaya Gupta cb97ff3374 Bug 1389139 - Add support for transform and perspective display items to layers-free APZ. r=jrmuizel
A basic sanity check here seems to produce the correct behaviour but I'm
not at all confident that this will always do the correct thing in more
complex cases or when perspectives are involved. However this is hard to
test and get working without the testing infrastructure up and running
so I'd rather land this simple code first and then dig into the more
complex cases once we have a way to catch regressions.

MozReview-Commit-ID: E4HytiZowEn

--HG--
extra : rebase_source : c7466092298aebf66926e8e0bdf58eb4651f0f19
2017-08-16 12:50:37 -04:00
Daisuke Akatsuka 55696f4e05 Bug 1382136 - Part 4: add a reftest for 'content' animation on pseudo element. r=hiro
'content' property shoud animate on pseudo element as well.
To confirm the animation, add a reftest.

MozReview-Commit-ID: 4hfx6PLThgZ
2017-08-15 20:51:55 +09:00
Carsten "Tomcat" Book a6ae5910bb Merge mozilla-central to autoland 2017-08-15 13:12:22 +02:00
Carsten "Tomcat" Book 6b36e00b7c merge mozilla-inbound to mozilla-central a=merge 2017-08-15 11:42:11 +02:00
Hiroyuki Ikezoe 67a09942e9 Bug 1387951 - Don't convert zero component value to 'auto' in clone__moz_image_region. r=boris
Currently Gecko treats 'auto' component value as zero for animation.

MozReview-Commit-ID: JBvTFzDw7Xy

--HG--
extra : rebase_source : 618e756bbbb66759eea50a8004740e737f8a94e1
2017-08-15 13:00:10 +09:00
Tobias Schneider 1106966bc4 Bug 1299848 - Rename test-async-print.html to test-async-paged.html. r=dholbert
--HG--
rename : layout/reftests/printing/test-async-print.html => layout/reftests/printing/test-async-paged.html
extra : rebase_source : 91f4e873c7e3747e7465b93d329111690ed2a7d2
2017-08-14 10:26:39 -07:00
Hiroyuki Ikezoe f072b091f2 Bug 1387939 - Enable test cases for interpolation between 'auto' and other values on stylo. r=boris
MozReview-Commit-ID: ExV5yoVVxBZ

--HG--
extra : rebase_source : 6c466fa5879b658da99501694090537625b3ee6b
2017-08-15 13:16:21 +09:00
Hiroyuki Ikezoe 3c1caa2959 Bug 1387949 - Make vertical-align animatable between percentage and percentage or length. r=birtles
MozReview-Commit-ID: 2ys36yj1zit

--HG--
extra : rebase_source : 3056e876910ca91c09218ef0284df0d46cbbb4d9
2017-08-15 10:16:31 +09:00