Commit Graph

1196 Commits

Author SHA1 Message Date
Miko Mynttinen
896b0f3d84 Bug 1425078 - Remove nsDisplayList::AppendNewToTop and nsDisplayList::AppendNewToBottom r=mattwoodrow
MozReview-Commit-ID: E3neKT2sV4Q
2017-12-13 11:23:04 -06:00
Cosmin Sabou
3960483175 Backed out changeset 497efe3a096b (bug 1406231) for windows build bustages on build\build\src\obj-firefox\dist\include\mozilla/layers/ScrollingLayersHelper.h(48) r=backout on a CLOSED TREE 2017-12-08 13:04:05 +02:00
Alexis Beingessner
31cbc80cb8 Bug 1406231 - remove the TextLayer class, and all remaining traces of it. r=mattwoodrow
MozReview-Commit-ID: 5fmKfkO6hnO
2017-12-07 17:13:05 -05:00
Jeremy Chen
132974be3b 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
2017-12-06 17:18:07 +08:00
Jonathan Kew
b9a6064cba 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
5ef96b463f Bug 1418905 - Move nsRuleNode::ComputeCoordPercentCalc() into nsStyleCoord. r=heycam
MozReview-Commit-ID: GLLseBxhUiP
2017-11-20 14:05:19 +08:00
Ting-Yu Lin
25ad28cc7e 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
2017-11-15 17:55:36 +08:00
Jeremy Chen
16c248280c 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
2017-11-17 12:00:58 +08:00
Chris Peterson
c5d0841695 Bug 1416164 - Replace NS_POSTCONDITION with MOZ_ASSERT. r=froydnj
MozReview-Commit-ID: 9K3Ksf36uxr
2017-11-04 22:48:48 -07:00
Kartikaya Gupta
d364c56c74 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
6f6f634dcd 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
6d5c3e50c7 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
e31ce50d20 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
2544eb586c 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
616f910f82 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
d4b8a59d91 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
2017-09-27 16:50:15 +08:00
Markus Stange
b594685dda Bug 1414154 - Remove gfxContext::Set/GetFontSmoothingBackgroundColor and TextRunDrawParams::fontSmoothingBGColor. r=lsalzman
MozReview-Commit-ID: BXZP3maOJRi
2017-11-02 22:31:15 -04:00
Markus Stange
a2cbb75a70 Bug 1414147 - Move fontSmoothingBackgroundColor from nsStyleUserInterface to nsStyleFont / nsFont. r=dbaron
MozReview-Commit-ID: 7i0Sy50Badm
2017-11-02 17:48:44 -04:00
Jonathan Kew
0180c6fc88 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
15aab29cca 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
2017-09-27 16:55:11 +13:00
Lee Salzman
1fbbefb71f 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
f365063fa9 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
4811e19857 Bug 1403521 - Correct positioning of text-decoration lines in vertical writing modes. r=dholbert 2017-10-11 14:01:53 +01:00
Xidorn Quan
e3ed90a7c8 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
2017-09-13 14:30:58 +10:00
Nicholas Nethercote
7dbfdaf890 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
2017-10-03 09:05:19 +11:00
Alexis Beingessner
41c8b961e6 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
2017-10-04 13:49:51 -04:00
Alexis Beingessner
1c3c55828c Bug 1405927 - Remove TextLayer support from nsDisplayText. r=mattwoodrow
MozReview-Commit-ID: J1BDkXZdvnc
2017-10-04 13:49:51 -04:00
Kartikaya Gupta
d42b152e67 Bug 1405399 - Update due to API change in WR cset 75216e5. r=Gankro
MozReview-Commit-ID: GM8qA0MKaHv
2017-10-04 14:54:37 -04:00
Kartikaya Gupta
cbacb77052 Bug 1403915 - Remove the IsLayersFreeTransaction() machinery and assume it's always true. r=jrmuizel
MozReview-Commit-ID: 7FYVirQ5pal
2017-10-03 16:31:07 -04:00
David Major
f26d864ed9 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.
2017-09-28 13:27:01 -04:00
David Major
bb343e20a7 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
e294bce8d0 Bug 1403259 - TextDrawTarget: fallback on -webrender-text-stroke. r=jrmuizel
MozReview-Commit-ID: 9taTLk0RLQq
2017-09-26 14:12:12 -04:00
Alexis Beingessner
986029558c Bug 1400382 - Factor out text WebRenderCommand code to TextDrawTarget. r=mstange
MozReview-Commit-ID: EQtFvLQCT2U
2017-09-21 15:15:58 -04:00
Alexis Beingessner
4c657ebe03 Bug 1400382 - Replace explicit TextDrawTarget passing with cast-based system. r=mstange
MozReview-Commit-ID: EQtFvLQCT2U
2017-09-21 15:15:58 -04:00
Alexis Beingessner
965e218e6b 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
2017-09-20 20:11:12 -04:00
Morris Tseng
d7ade017fc 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
3c8f9ba825 Bug 1393031 - Remove unused nsTArray<WebRenderParentCommand>& parameter all over the place. r=jrmuizel 2017-09-20 13:36:53 +02:00
Jonathan Watt
b691d3e6b4 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
3423986d9b 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
92845bb45f Bug 1341009 - Convert nsReflowStatus::Reset() to nsReflowStatus::IsEmpty() assertion in ReflowText(). r=dholbert
MozReview-Commit-ID: Fa1Dq7xLP3n
2017-09-14 16:22:21 +08:00
Ting-Yu Lin
d93880e505 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
2017-09-13 18:00:25 +08:00
Alexis Beingessner
37cca34ec0 Bug 1399564 - properly thread through selection-specific decorations to WR. r=jrmuizel
MozReview-Commit-ID: 7prde0BsOFL
2017-09-13 13:25:42 -04:00
Sebastian Hengst
1c36da9196 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4dRrVdftJVy
2017-09-15 11:05:11 +02:00
Sebastian Hengst
fc53f3bd53 Backed out changeset f34a52244cf9 (bug 1393031) 2017-09-14 23:17:35 +02:00
Markus Stange
4e8606103a 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
e0fc009fac 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
2017-09-13 14:05:51 -04:00
Miko Mynttinen
1d15e14450 Bug 1359584 - Part 3: Improve nsDisplayItem const correctness and fix surrounding whitespace r=mstange
MozReview-Commit-ID: 3GkWiu6C4Zo
2017-08-24 17:09:44 +02:00
Miko Mynttinen
4401e3b079 Bug 1359584 - Part 1: Move mDisableSubpixelAA to nsDisplayItem r=mstange
MozReview-Commit-ID: 70169AFRmjq
2017-08-24 14:45:21 +02:00
Alexis Beingessner
98c96c6809 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
2017-09-12 16:50:44 -04:00
KuoE0
65d9db448f 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
2017-09-06 14:31:36 +08:00