Commit Graph

243 Commits

Author SHA1 Message Date
Jonathan Watt
db80f397f6 Bug 1058040, part 2 - Rename gfxTextContextPaint to SVGContextPaint and add some code comments. r=dholbert 2016-07-22 14:56:09 +01:00
Ting-Yu Lin
40fcd21b9a Bug 1277129 Part 7b - Rename various ReflowState variables to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -r "s/$1/$2/g" "{}" \;
}

rename "([[:alpha:]]*)([rR])eflowState(s?)" "\1\2eflowInput\3"

MozReview-Commit-ID: ITFO7uMTkSb

--HG--
extra : rebase_source : c91a2e174a0baec60c1b0111ac7636295004ab35
2016-07-21 18:36:39 +08:00
Ting-Yu Lin
4053c4c028 Bug 1277129 Part 5c - Rename nsHTMLReflowMetrics to ReflowOutput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename "nsHTMLReflowMetrics" "ReflowOutput"

MozReview-Commit-ID: 2HBb7DkooH5

--HG--
extra : rebase_source : acfa442a6483772fcb5748dc6f5e7072e599032a
2016-07-21 18:36:38 +08:00
Ting-Yu Lin
820f88de49 Bug 1277129 Part 1c - Rename nsHTMLReflowState to ReflowInput. r=dbaron
This patch is generated by the following script:

function rename() {
find .\
     -type f\
     ! -path "./obj*"\
     ! -path "./.git"\
     ! -path "./.hg"\
     \( -name "*.cpp" -or\
        -name "*.h" \)\
        -exec sed -i -e "s/$1/$2/g" "{}" \;
}

rename nsHTMLReflowState ReflowInput

MozReview-Commit-ID: 9r9vdVv1pXc

--HG--
extra : rebase_source : 623ec822996ba0ea0058dd137acf5a658cdea04a
2016-07-21 18:36:35 +08:00
cku
77db71816d Bug 1287705 - Part 2. Add more comments and construct PaintState in PaintTextParams. r=jfkthame
MozReview-Commit-ID: EzfOzRUU6PQ

--HG--
extra : rebase_source : 1a7b96239b0d90f4e58be358629a7e3987b674ba
2016-07-19 20:48:19 +08:00
Makoto Kato
fb90c3584f Bug 1203871 - Part 1. Add nsIFrame::GetCharacterRectsInRange. r=jfkthame
Masayuki suggests GetCharcterRectsInRange instead of first idea's API by part 2 implementation.

IME wants to need the width per character.  Now nsTextFrame/nsIFrmae has only API to get point of string.  So I want to add this method to calculate simply by comment #3.

If no text frame,  I would like to return error due to no character.  (Caller shouldn't call this API on non-text frame.)

MozReview-Commit-ID: LQHUTzhnGn

--HG--
extra : rebase_source : bc495493c7be73afb05489ad2169e8dcdd6e6da4
extra : histedit_source : e54a7c3bfb100765317a0c8a83b432d5f706ffe1
2016-06-23 12:02:14 +01:00
Masayuki Nakano
00591135a4 Bug 1278014 part.2 Define mozilla::SelectionType as an enum class and use it instead of RawSelectionType as far as possible r=smaug
This patch defines mozilla::SelectionType as an enum class.  This is safer than nsISelectionController::SELECTION_* since setting illegal value to its variable is checked at build time.  So, as far as possible, this should be used everywhere (but of course, this isn't available in scriptable interfaces).

And also this implements some useful methods for managing SelectionType and RawSelectionType which are implemented in layout/nsSelection.cpp because nsISelectionController is implemented by both PresShell and nsTextEditorState.  Therefore, implementing one of them may make hard to find them.  On the other hand, nsSelection.cpp is a better file name to look for them.

Note that this patch creates mozilla::Selection::RawType() for binding.  Native code should keep using Selection::Type() but the binding code needs to use RawType() due to impossible to convert from SelectionType to RawSelectionType without explicit cast.

MozReview-Commit-ID: 81vX7A0hHQN

--HG--
extra : rebase_source : d9f88e217c713c60d1c2578ce6421c73ccba8650
2016-06-11 11:06:37 +09:00
Masayuki Nakano
17f667a2e2 Bug 1278014 part.1 Rename SelectionType in nsISelectionController.idl to mozilla::RawSelectionType r=smaug
mozilla::SelectionType will be an enum class. Therefore, we need to rename SelectionType with a word "raw" since it's a type for raw nsISelectionController::SELECTION_*.

MozReview-Commit-ID: K8SO0bbpv0Y

--HG--
extra : rebase_source : 56e3ac852657ef4795d718d2da09b16903c2e66c
2016-06-07 22:42:06 +09:00
CJKu
3e44bcb79b Bug 1269971 - Part 7. Clean out unused things created in bug 759568; r=jfkthame
MozReview-Commit-ID: 4spLj1fgthI

--HG--
extra : rebase_source : 02261090faab2c37cf5e9c35b223832ec3af59cf
2016-05-13 00:09:39 +08:00
CJKu
31d52bc0c4 Bug 1269971 - Part 3. Handle selection text color and selection backgrond painting; r=jfkthame
MozReview-Commit-ID: CQmqiCmvygr

--HG--
extra : rebase_source : 271b8d2aae82c02678637bcbbb3a77bc7c5b43f8
2016-05-13 00:08:53 +08:00
CJKu
b901424670 Bug 1269971 - Part 2. From ClipBackgroundByText to GenerateAndPushTextMask; r=jfkthame,mtseng
MozReview-Commit-ID: 1PK2Huytq3i

--HG--
extra : rebase_source : 71f3e70694d874d5d575b12f882980544b1931e2
2016-05-13 00:08:41 +08:00
Matt Woodrow
47cde44daf Bug 1243610 - Refactor UpdateOverflow to separate out local overflow from that contributed by descendants. r=dbaron 2016-05-04 12:27:43 +12:00
Jeremy Chen
f7a19af3e7 Bug 1248708 - Part2.2: render -webkit-text-stroke property. r=jfkthame 2016-04-23 01:40:39 +08:00
Xidorn Quan
f819b73b7b Bug 1097499 part 14 - Draw emphasis marks properly for text-combine-upright. r=jfkthame
MozReview-Commit-ID: 2bHWXxZDVGk

--HG--
extra : source : 492cd1cb7e3bc5e776042fddc2a656ec9160a2a9
2016-04-22 09:18:41 +10:00
Xidorn Quan
e775e87790 Bug 1097499 part 13 - Draw decoration line properly for text-combine-upright. r=jfkthame
MozReview-Commit-ID: AymG09nvxh1

--HG--
extra : source : 579ca910016a1af95bb36b66d2ceb309d40288d3
2016-04-22 09:18:41 +10:00
Xidorn Quan
d8f6beea61 Bug 1097499 part 9 - Transform full-width characters to non-full-width correspondents for combined text. r=jfkthame
MozReview-Commit-ID: CXntBz9HPJu

--HG--
extra : source : 950029490bd0f6d5900140693e8ab193a9efe543
2016-04-22 09:18:41 +10:00
Jonathan Kew
97936698fe Bug 1265648 - Remove the global nsTextFrameTextRunCache, as it no longer serves any useful purpose. r=mats 2016-04-20 10:54:43 +01:00
CJKu
45fda349c6 Bug 759568 - Part 3. Render text-selection beneath background image; r=jfkthame
MozReview-Commit-ID: 3VUGqyJOX8Q
2016-04-14 16:28:07 +08:00
CJKu
2afb6ec588 Bug 759568 - Part 2. Render background-clip:text; r=jfkthame
MozReview-Commit-ID: HQHBe7OioWs
2016-04-14 16:28:07 +08:00
Carsten "Tomcat" Book
48bbe10c12 Backed out changeset 6a2e62e8c861 (bug 759568) 2016-04-14 08:57:41 +02:00
Carsten "Tomcat" Book
9447faf13b Backed out changeset e9fc67d8b0fa (bug 759568) 2016-04-14 08:57:39 +02:00
CJKu
61564fb540 Bug 759568 - Part 3. Render text-selection beneath background image; r=jfkthame
MozReview-Commit-ID: 3VUGqyJOX8Q
2016-04-14 12:45:38 +08:00
CJKu
3edbcce808 Bug 759568 - Part 2. Render background-clip:text; r=jfkthame
MozReview-Commit-ID: HQHBe7OioWs
2016-04-14 12:45:38 +08:00
Sebastian Hengst
c9828de0c3 Backed out changeset e64951d74d2a (bug 759568) 2016-04-12 17:55:44 +02:00
Sebastian Hengst
1942339f7b Backed out changeset 21551ed8f1e1 (bug 759568) 2016-04-12 17:55:36 +02:00
CJKu
7c3766dbb4 Bug 759568 - Part 3. Render text-selection beneath background image; r=jfkthame
MozReview-Commit-ID: 3VUGqyJOX8Q
2016-04-12 21:58:22 +08:00
CJKu
70f4e828d2 Bug 759568 - Part 2. Render background-clip:text; r=jfkthame
MozReview-Commit-ID: HQHBe7OioWs
2016-04-12 21:58:22 +08:00
Xidorn Quan
d0fc466aa2 Bug 1258636 part 2 - Use struct to pass params for nsTextFrame::PaintDecorationLine. r=jfkthame
MozReview-Commit-ID: CICgNSPRrLM

--HG--
extra : rebase_source : 2901710ea2806a98b3520dc729c4f4d4ba2d56b2
2016-03-22 17:42:18 +08:00
Ting-Yu Lin
02389a3aba Bug 1251519 Part 1 - Remove nsTextFrameBase as an nsFrame alias. r=mats
Bug 655877 Part 20 made this deliberately to let nsTextFrame
QueryFrame-able. https://hg.mozilla.org/mozilla-central/rev/d8c6025c0881

But other types like nsPlaceholderFrame or nsBulletFrame are also
implemented QureyFrame, which do not have this inheritance indirection.
I guess it was for historical reason, and can be removed safely.

MozReview-Commit-ID: CPeQvpKzEKh

--HG--
extra : rebase_source : 86e784648cab3982ff16b3d45a312b98cd963841
2016-03-10 17:38:31 +08:00
Xidorn Quan
b022cd37f8 Bug 1251995 part 7 - Use struct to pass params for nsTextFrame::Paint*Shadow functions. r=jfkthame
MozReview-Commit-ID: 5Wa9U0Ile4L

--HG--
extra : source : 95464b236e0e5c52495445a94301791a25668094
2016-03-08 15:56:18 +08:00
Xidorn Quan
40f8859cc1 Bug 1251995 part 6 - Use struct to pass params for nsTextFrame::PaintText* functions. r=jfkthame
MozReview-Commit-ID: NTEUm8TY8N

--HG--
extra : source : d1f1d14ddf9df26f07a28a36e54216b8ad6ff5fb
2016-03-08 15:56:18 +08:00
Xidorn Quan
e1002ffcb3 Bug 1251995 part 5 - Unify units of dirty rect used for painting text frame. r=jfkthame
MozReview-Commit-ID: BK7j6y7lBV3

--HG--
extra : source : 4403438493793ddfa7356cab2438d050f8a66da1
2016-03-08 15:56:18 +08:00
Xidorn Quan
8ade98d572 Bug 1251995 part 4 - Use struct to pass params for nsTextFrame::DrawText* functions. r=jfkthame
MozReview-Commit-ID: LYshkPDrqYl

--HG--
extra : source : 5de24f7944a12e0d20ca83b4b2eceeaf56fc5efd
2016-03-08 15:56:18 +08:00
Xidorn Quan
b3ea3fa801 Bug 1251995 part 2 - Add gfxTextRun::Range to replace parameter pairs like (offset, length) and (start, end). r=jfkthame
Although this makes some places more complicated, code should generally
be simpler and clearer. It could slightly improve performance on x64 for
functions with more than four parameters, since it makes more data be
passed via registers rather than the stack.

MozReview-Commit-ID: D0GM2Jyrr6W

--HG--
extra : source : bd88a2e478e23edf1845f724a32fef908c8cc007
2016-03-08 15:56:18 +08:00
Carsten "Tomcat" Book
b9f86983b1 Backed out changeset bf004c055beb (bug 1251995) 2016-03-07 12:18:19 +01:00
Carsten "Tomcat" Book
f30e50acc7 Backed out changeset 9b31d6fb1fcb (bug 1251995) 2016-03-07 12:18:16 +01:00
Carsten "Tomcat" Book
26ad32ef03 Backed out changeset ac1d42c669be (bug 1251995) 2016-03-07 12:18:14 +01:00
Carsten "Tomcat" Book
cf20e3d145 Backed out changeset c36e12ded845 (bug 1251995) 2016-03-07 12:18:13 +01:00
Carsten "Tomcat" Book
128137c7a9 Backed out changeset 734559c25cb1 (bug 1251995) 2016-03-07 12:18:11 +01:00
Xidorn Quan
e64f114346 Bug 1251995 part 7 - Use struct to pass params for nsTextFrame::Paint*Shadow functions. r=jfkthame
MozReview-Commit-ID: 5Wa9U0Ile4L

--HG--
extra : rebase_source : a568bb94fd7d51ed5308e2a1e13c308b67b143f2
2016-03-02 09:41:43 +08:00
Xidorn Quan
a6408cb861 Bug 1251995 part 6 - Use struct to pass params for nsTextFrame::PaintText* functions. r=jfkthame
MozReview-Commit-ID: NTEUm8TY8N

--HG--
extra : rebase_source : 134dd6abcb3cbc61f61b9466be5675b1a0436684
2016-03-01 17:43:06 +08:00
Xidorn Quan
0a4c762195 Bug 1251995 part 5 - Unify units of dirty rect used for painting text frame. r=jfkthame
MozReview-Commit-ID: BK7j6y7lBV3

--HG--
extra : rebase_source : 38b5544d3e572927b64d8066a61bfa9711400199
2016-03-01 16:28:27 +08:00
Xidorn Quan
0f327ddc56 Bug 1251995 part 4 - Use struct to pass params for nsTextFrame::DrawText* functions. r=jfkthame
MozReview-Commit-ID: LYshkPDrqYl

--HG--
extra : rebase_source : 9047819828a41df693fe9e8c663bd2113644ae7a
2016-03-02 13:27:17 +08:00
Xidorn Quan
8e3206382b Bug 1251995 part 2 - Add gfxTextRun::Range to replace parameter pairs like (offset, length) and (start, end). r=jfkthame
Although this makes some places more complicated, code should generally
be simpler and clearer. It could slightly improve performance on x64 for
functions with more than four parameters, since it makes more data be
passed via registers rather than the stack.

MozReview-Commit-ID: D0GM2Jyrr6W

--HG--
extra : rebase_source : 29961e56b5fe14b244046b3dc52b1f922c206218
2016-02-29 16:50:17 +08:00
Mats Palmgren
b0439e98c3 Bug 1246405 - Declare mTextRun earlier to avoid alignment spill on 64-bit architectures. r=roc 2016-02-08 17:35:01 +01:00
Birunthan Mohanathas
d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Phil Ringnalda
d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas
373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Xidorn Quan
0b71314608 Bug 1230034 part 3 - Move some frame property declaration around. r=dbaron
--HG--
extra : source : d67dd26db9f0349d2e8ef71f8def9fad7856fe1e
2016-01-28 14:23:59 +11:00
Nicholas Nethercote
06e901cb9f Bug 1231550 - Use DrawTarget instead of gfxContext and/or nsRenderingContext in many places in font/text code. r=jfkthame.
AutoTextRun now only needs a DrawTarget instead of an nsRenderingContext, and
similar nsRenderingContext/gfxContext-to-DrawTarget replacements can be
propagated a long way up the call graph. This patch replaces 93 occurrences of
nsRenderingContext and 135 occurrences of gfxContext with DrawTarget; that's
13% of them.

The patch is mostly plumbing changes. A couple of not-entirely-plumbing
changes:

- It adds a comment about the null check in
  gfxGlyphExtents::GetTightGlyphExtentsAppUnits().

- A couple of functions simply had an unused gfxContext or nsRenderingContext
  parameter removed, e.g. SetLineBreaks().

--HG--
extra : rebase_source : 8f56994bb4d254a86788b17ab2864ebc758a7e6b
2015-12-15 13:56:41 -08:00