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

1193 Коммитов

Автор SHA1 Сообщение Дата
Jeremy Chen 548ee3ec09 Bug 1423509 - cleanup for BuildTextRunsScanner::SetupLineBreakerContext. r=jfkthame
The textBreakPoints variable and its related logic are copied from
BuildTextRunForFrames, however, they are not used in
SetupLineBreakerContext at all. Remove the variable allocation and the
unnecessary while loop.

MozReview-Commit-ID: 1AsA6V7aGMh

--HG--
extra : rebase_source : 408b1e4a44e7a7f41be9cafdb72392ed5f518f37
2017-12-06 17:18:07 +08:00
Jonathan Kew 1286a7aec2 Bug 1420161 - Add early-return codepaths to nsTextFrame::ReflowText and TrimTrailingWhiteSpace to optimize processing of frames containing only trimmable whitespace. r=mats 2017-11-27 11:24:51 +00:00
Ting-Yu Lin dc7e13b5d5 Bug 1418905 - Move nsRuleNode::ComputeCoordPercentCalc() into nsStyleCoord. r=heycam
MozReview-Commit-ID: GLLseBxhUiP

--HG--
extra : rebase_source : 2940610dbb5e81e463db82459a46a54eb693e5cb
2017-11-20 14:05:19 +08:00
Ting-Yu Lin 264402226f Bug 1417376 Part 3 - Pass nsPoint parameters by const references instead of values. r=mats
It's good to save some copy constructor calls.

MozReview-Commit-ID: 6TveqwkOvc0

--HG--
extra : rebase_source : 02e678f985c074f6c972cf8478e233aa5e4607db
2017-11-15 17:55:36 +08:00
Jeremy Chen 7387e4c386 Bug 1415581 - get the correct positions of explicit hyphens while calling PropertyProvider::GetHyphenationBreaks. r=jfkthame
In the current implementation, when hyphens property is set to auto, we do some
math to determine the index of text fragment, so we can check whether a character
is an explicit hyphen. However, the math calculation is not reliable, and it is
not easy to calculate the fragment index when there are more than one fragments
in a gfxTextRun, e.g., a paragraph which consists multiple inline elements.

In this patch, we simply use GetOriginalOffset() to get the position relative
to the current text fragment, and scan/detect explicit hyphens correctly.

MozReview-Commit-ID: JIg3tdpViRH

--HG--
extra : rebase_source : a6ac03914badd2f2dcd238186a6653e8660bc116
2017-11-17 12:00:58 +08:00
Chris Peterson edb82b8131 Bug 1416164 - Replace NS_POSTCONDITION with MOZ_ASSERT. r=froydnj
MozReview-Commit-ID: 9K3Ksf36uxr

--HG--
extra : rebase_source : c5574794ae0e0ce5e756bdbcc2601896d6916002
2017-11-04 22:48:48 -07:00
Kartikaya Gupta 00ef028ed3 Bug 1416267 - Update gfxContext matrix functions to avoid flip-flopping between float and double matrices. r=jrmuizel
The core of this change is in gfxContext.*:
- change gfxContext::CurrentMatrix() and gfxContext::SetMatrix() to
  return and take a Matrix respectively, instead of converting to
  and from a gfxMatrix (which uses doubles). These functions therefore
  will now match the native representation of the transform in gfxContext.
- add two new functions CurrentMatrixDouble() and SetMatrixDouble() that
  do what the old CurrentMatrix() and SetMatrix() used to do, i.e.
  convert between the float matrix and the double matrix.

The rest of the change is just updating the call sites to avoid round-
tripping between floats and doubles where possible. Call sites that are
hard to fix are migrated to the new XXXDouble functions which preserves
the existing behaviour.

MozReview-Commit-ID: 5sbBpLUus3U
2017-11-10 21:14:09 -05:00
Tommy Kuo d9b8b8aa04 Bug 1415214 - (Part 1) Fix the bound of the clip rect for drawing decoration lines. r=jfkthame
MozReview-Commit-ID: KoDvzqaCSGB
2017-11-10 16:45:19 +08:00
Phil Ringnalda ef24cfe9e6 Backed out 2 changesets (bug 1415214) for failures in 1415214.html
Backed out changeset 54a656b4c587 (bug 1415214)
Backed out changeset dbd2b14a7466 (bug 1415214)

MozReview-Commit-ID: 3NOHVkBjMVD
2017-11-09 22:46:22 -08:00
Tommy Kuo 1c4700db4c Bug 1415214 - (Part 1) Fix the bound of the clip rect for drawing decoration lines. r=jfkthame
MozReview-Commit-ID: L534I2s3xTi
2017-11-10 13:53:05 +08:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Mats Palmgren 25cd0c37f7 Bug 1400618 part 1 - Collect NAC / generated content and call DestroyAnonymousContent / UnbindFromTree on those after the frames are destroyed. r=bz
MozReview-Commit-ID: 2trDgeJPw25
2017-11-07 01:20:33 +01:00
KuoE0 0943404926 Bug 1399310 - (Part 1) Make `nsTextFrame::DrawTextRunAndDecorations` draw only in the range of the text. r=jfkthame
We create a clip region with the text length to make the decoration line
would be only drawn in the area. This allows the decoration line would
not be drawn multiple times when the text is being selected.

MozReview-Commit-ID: 4gjawk71eSu

--HG--
extra : rebase_source : 627fa77a2b6e17441d134255017762ebda92eaf6
2017-09-27 16:50:15 +08:00
Markus Stange 06a44912a5 Bug 1414154 - Remove gfxContext::Set/GetFontSmoothingBackgroundColor and TextRunDrawParams::fontSmoothingBGColor. r=lsalzman
MozReview-Commit-ID: BXZP3maOJRi

--HG--
extra : rebase_source : 5ba8b50835d98f78cdf854d914d61f5508edf6e3
2017-11-02 22:31:15 -04:00
Markus Stange f2f07fc63b Bug 1414147 - Move fontSmoothingBackgroundColor from nsStyleUserInterface to nsStyleFont / nsFont. r=dbaron
MozReview-Commit-ID: 7i0Sy50Badm

--HG--
extra : rebase_source : 28f36f191aa82a0ece87b412b59641f7dc061acf
2017-11-02 17:48:44 -04:00
Jonathan Kew 793b63713b Bug 1408612 - patch 1 - Use single-precision floats more consistently for glyph position computations when drawing text. r=jrmuizel 2017-10-24 09:59:09 +01:00
Matt Woodrow ext:(%2C%20Miko%20Mynttinen%20%3Cmikokm%40gmail.com%3E%2C%20Timothy%20Nikkel%20%3Ctnikkel%40gmail.com%3E) df083508bc Bug 1404181 - Part 4: Add code to save and restore changes made to display items during FrameLayerBuilder so that we can use them again. r=mstange
MozReview-Commit-ID: 23WqS2Xv3Qx

--HG--
extra : rebase_source : 37a7ecbb256df5a726363dd1c5478c94dd08d6ce
2017-09-27 16:55:11 +13:00
Lee Salzman 6235863fa6 Bug 1408481 - pass AA via GlyphOptions to WR PushGlyphs. r=gankro
MozReview-Commit-ID: LVieyPaaouc
2017-10-19 22:54:28 -04:00
Alexis Beingessner eeaa4695dc Bug 1406510 - rewrite TextDrawTarget to push directly into display list. r=jrmuizel
MozReview-Commit-ID: 7rPGlYmmgeg
2017-10-12 17:17:41 -04:00
Jonathan Kew 83bec7dacb Bug 1403521 - Correct positioning of text-decoration lines in vertical writing modes. r=dholbert 2017-10-11 14:01:53 +01:00
Xidorn Quan c84206e7ec Bug 1384691 - Unconditionally set mHasSelectionShadow when -moz-selection pseudo element is used. r=jfkthame
The HasAuthorSpecifiedRules check was from the initial implementation
of text-shadow support on ::-moz-selection in bug721750. There doesn't
seem to be anything mentioning why this check is necessary.

Also given text-shadow is inherited by default, it doesn't seems this
change would lead to any difference.

MozReview-Commit-ID: 6Qbotdxykwi

--HG--
extra : rebase_source : 8c9894f297e4013d42bd0d535bcc7a1310c6bccc
2017-09-13 14:30:58 +10:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Alexis Beingessner c0bfb121ad Bug 1405927 - Change PushGlyphs to take webrender formats. r=jrmuizel
Also cleans up a bunch of TextDrawTarget code as fallout.

This is a significant perf win for textFrames.

MozReview-Commit-ID: J1BDkXZdvnc

--HG--
extra : rebase_source : 5a0769a53cadb55a074cfe5d718e259401fa7028
2017-10-04 13:49:51 -04:00
Alexis Beingessner 03f40cdeed Bug 1405927 - Remove TextLayer support from nsDisplayText. r=mattwoodrow
MozReview-Commit-ID: J1BDkXZdvnc

--HG--
extra : rebase_source : 8c9f1e211cae636d219bb475bf2e07a4b14df6ef
2017-10-04 13:49:51 -04:00
Kartikaya Gupta 561b271b7d Bug 1405399 - Update due to API change in WR cset 75216e5. r=Gankro
MozReview-Commit-ID: GM8qA0MKaHv

--HG--
extra : rebase_source : cb8cddeab931e34ad5cc7392308f177970cdabde
2017-10-04 14:54:37 -04:00
Kartikaya Gupta dbe077b3f1 Bug 1403915 - Remove the IsLayersFreeTransaction() machinery and assume it's always true. r=jrmuizel
MozReview-Commit-ID: 7FYVirQ5pal

--HG--
extra : rebase_source : 4b33fba54776003b4f0d45b89be07916db1f2340
2017-10-03 16:31:07 -04:00
David Major c772f99f60 Bug 1403220 followup: Limit the PGO workaround to just where it's needed.
No rush merging this one around. Feel free to back this out if the crashes come back.

--HG--
extra : rebase_source : 5d850c0b739e8a47830a65da939241e495a1f7bf
2017-09-28 13:27:01 -04:00
David Major cb46df4d86 Bug 1403220 - De-optimize some font functions to work around an MSVC PGO crash. r+a=RyanVM 2017-09-27 10:17:00 -04:00
Alexis Beingessner cece98d71c Bug 1403259 - TextDrawTarget: fallback on -webrender-text-stroke. r=jrmuizel
MozReview-Commit-ID: 9taTLk0RLQq

--HG--
extra : rebase_source : 2c70334438ba9f59d030096656970362cbf0a7a2
2017-09-26 14:12:12 -04:00
Alexis Beingessner c9ae89e98d Bug 1400382 - Factor out text WebRenderCommand code to TextDrawTarget. r=mstange
MozReview-Commit-ID: EQtFvLQCT2U

--HG--
extra : rebase_source : 8774f6723250cbcb59eb62382b24767d9f9b8f75
2017-09-21 15:15:58 -04:00
Alexis Beingessner 9022c22b82 Bug 1400382 - Replace explicit TextDrawTarget passing with cast-based system. r=mstange
MozReview-Commit-ID: EQtFvLQCT2U

--HG--
extra : rebase_source : 1fff1b545c18d42403cf9c30172528e553a6af48
2017-09-21 15:15:58 -04:00
Alexis Beingessner d608afab8a Bug 1400382 - Defer TextDrawTarget analysis until GetLayerState. r=jrmuizel
This ensures the mutations TextOverflow does have already occured when we compute contents.

This also reverts my previous folded opacity patch, as this also handles that case.

MozReview-Commit-ID: 6A4F98GGHyL

--HG--
extra : rebase_source : 73c67ccf20f44ea808345a1146307fe9b9d9c3b1
2017-09-20 20:11:12 -04:00
Morris Tseng ce9b629335 Bug 1392200 - Add backface-visibility support for layers-free mode. r=kats
For layers-full mode, we set the backface-visibility to visible because
visibility would be handled by FLB and layers.

MozReview-Commit-ID: CUbeUabfC7K
2017-09-21 14:41:38 +08:00
Nicolas Silva 61546da339 Bug 1393031 - Remove unused nsTArray<WebRenderParentCommand>& parameter all over the place. r=jrmuizel 2017-09-20 13:36:53 +02:00
Jonathan Watt 107bd0b650 Bug 1399824, part 2 - Always use nsIFrame::AddStateBits instead of manual bit twiddling. r=xidorn
MozReview-Commit-ID: JoEiQQI2kZ5
2017-08-24 12:09:42 +01:00
Jonathan Watt 9d21fb29ff Bug 1399824, part 1 - Always use nsIFrame::RemoveStateBits instead of manual bit twiddling. r=xidorn
MozReview-Commit-ID: KynEge1U4aS
2017-08-24 10:55:28 +01:00
Ting-Yu Lin a4c8c11d14 Bug 1341009 - Convert nsReflowStatus::Reset() to nsReflowStatus::IsEmpty() assertion in ReflowText(). r=dholbert
MozReview-Commit-ID: Fa1Dq7xLP3n

--HG--
extra : rebase_source : 00fa0460f78b9fd81f8dba6291420f7ba40ed951
2017-09-14 16:22:21 +08:00
Ting-Yu Lin 2e869d8f3d Bug 1341009 - Add nsReflowStatus::IsEmpty() assertions to all nsIFrame::Reflow() methods and some reflow helpers, and remove unneeded Reset(). r=dholbert
nsReflowStatus::IsEmpty() assertions are added after DISPLAY_REFLOW in the
beginning of the Reflow().

A few Reflow() implementations have Reset() calls at the end which are left
in place by this patch (with an explanatory comment added to each). These
ending Reset()s are only needed for cases where a non-splittable frame
passes its own nsReflowStatus to a child's reflow method. Just in case the
child leaves a "not fully complete" value in the nsReflowStatus, the
non-splittable parent frame must clear out the nsReflowStatus before
returning, so that its own parent doesn't then try to split it.

MozReview-Commit-ID: 6Jj3jfMAqj4

--HG--
extra : rebase_source : e1fe6a775ad97e16a6d7cc224634ff962ccb0fbf
2017-09-13 18:00:25 +08:00
Alexis Beingessner 952cdf7351 Bug 1399564 - properly thread through selection-specific decorations to WR. r=jrmuizel
MozReview-Commit-ID: 7prde0BsOFL

--HG--
extra : rebase_source : 188e7b75f7fc93ca2f87a8b3439696a28e3fb431
2017-09-13 13:25:42 -04:00
Sebastian Hengst ec66bbd3e1 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4dRrVdftJVy
2017-09-15 11:05:11 +02:00
Sebastian Hengst d27b05e04e Backed out changeset f34a52244cf9 (bug 1393031) 2017-09-14 23:17:35 +02:00
Markus Stange ae927d3f44 Bug 1387594 - Set the font smoothing background color based on the -moz-font-smoothing-background-color property. r=mattwoodrow
MozReview-Commit-ID: B3PVIvMswf8
2017-09-14 23:09:47 +02:00
Alexis Beingessner 6b38993c8b Bug 1399274 - Block invisible text optimizations when using WebRender. r=jrmuizel
Mostly just threading the TextDrawTarget deeper into the code to use a boolean.
A lot of places are trying to optimize away invisible text!

MozReview-Commit-ID: 89sDAwUv0HA

--HG--
extra : rebase_source : 8d800702232aec6626a33f2d6be893708d0bbfee
2017-09-13 14:05:51 -04:00
Miko Mynttinen 351756e478 Bug 1359584 - Part 3: Improve nsDisplayItem const correctness and fix surrounding whitespace r=mstange
MozReview-Commit-ID: 3GkWiu6C4Zo

--HG--
extra : rebase_source : 1423442cd723b8a052d183394dc5f5ef272a5272
2017-08-24 17:09:44 +02:00
Miko Mynttinen ce08697502 Bug 1359584 - Part 1: Move mDisableSubpixelAA to nsDisplayItem r=mstange
MozReview-Commit-ID: 70169AFRmjq

--HG--
extra : rebase_source : 9c46e40700430e8286ab8e5b2f986e660c293101
2017-08-24 14:45:21 +02:00
Alexis Beingessner 39e87f69a6 Bug 1395748 - Fix text selection shadow interaction. r=jrmuizel
Selections in gecko are used to hack in style changes to subsets of text frames.
Mostly this works fine because decorations don't care where they are, and
textRunFragments already exist to do style changes midFrame. However we mishandled
shadows because we were assuming they applied to the entire run, which isn't
the case when shadows are involved.

Applying shadows to everything was desirable because the way nsTextFrame is written,
it's difficult for us to associate the glyphs and decorations with a "range".
However the selections iterator provides a natural grouping, so we use that.

The result is that TextDrawTarget effectively becomes an array of what TextDrawTarget
used to be (now called SelectedTextRunFragment). Everything else is just fallout
of this change.

MozReview-Commit-ID: 5GWPruo6daW

--HG--
extra : rebase_source : 8e1c1d61e43151ee6651f8c6cfbcb0912262df56
2017-09-12 16:50:44 -04:00
KuoE0 e629f92818 Bug 1229979 - (Part 1) Make the color of decoration line shadow be as same as the color of the text shadow. r=jfkthame
Multi-color shadow is not allowed in spec. We could use the same color
of the text as the color of the decoration line when we paint the
shadow.

MozReview-Commit-ID: AK9NoseSE0h

--HG--
extra : rebase_source : 48a84e73a7ee76b615c255a440cbe119fa8f56f0
2017-09-06 14:31:36 +08:00
Sebastian Hengst d7fd3d4096 Backed out changeset 274175ce0863 (bug 1229979) for failing reftest layout/reftests/text-shadow/decorations-multiple-zorder.html, at least on Windows and Android. r=backout 2017-09-08 10:56:24 +02:00
KuoE0 a3a2484069 Bug 1229979 - (Part 1) Make the color of decoration line shadow be as same as the color of the text shadow. r=jfkthame
Multi-color shadow is not allowed in spec. We could use the same color
of the text as the color of the decoration line when we paint the
shadow.

MozReview-Commit-ID: AK9NoseSE0h

--HG--
extra : rebase_source : 12b0aa45f5dbb938a35271dcadaa664ae4a82c1e
2017-09-06 14:31:36 +08:00
Alexis Beingessner 3ce36bee8a Bug 1395729 - Disable frame merging for nsTextFrame. r=mattwoodrow
MozReview-Commit-ID: C0kq5IYgUMG

--HG--
extra : rebase_source : 554424e067dba4c5ed39712a51f48f79912e6e6a
2017-09-06 13:49:31 -04:00