Xidorn Quan
c81ed5494f
Bug 1281099 part 1 - Convert some macros to functions to help later change. r=jfkthame
...
MozReview-Commit-ID: 2OS5eIsNAYN
--HG--
extra : rebase_source : 345e33f986aa950eb122c1cc7451c7a59a8f84cb
2016-06-21 17:21:09 +10:00
Xidorn Quan
c9fe7c3435
Bug 1186892 - Handle url strikeout separately from IME selection types. r=jfkthame
...
MozReview-Commit-ID: CVwoKiMOHj9
--HG--
extra : source : d3aa2bc573dd575f12a1e585792cfaf37a7f5659
2016-06-21 08:19:21 +10:00
Masayuki Nakano
9fdc31aea3
Bug 1278014 part.14 Rename SelectionType::SELECTION_URLSTRIKEOUT to SelectionType::eURLStrikeout r=smaug
...
MozReview-Commit-ID: 7AqeDbHxGE2
--HG--
extra : rebase_source : 2dada2c98e1186aa7f5699b8d11033eae50ba2c6
2016-06-09 20:58:56 +09:00
Masayuki Nakano
a0eb51f54d
Bug 1278014 part.13 Rename SelectionType::SELECTION_URLSECONDARY to SelectionType::eURLSecondary r=smaug
...
MozReview-Commit-ID: C2IW7nqjEkD
--HG--
extra : rebase_source : a64cd80650fe51dbc5586511ad8c3287a0ec3225
2016-06-09 20:47:48 +09:00
Masayuki Nakano
ebf3bc1862
Bug 1278014 part.12 Rename SelectionType::SELECTION_FIND to SelectionType::eFind r=smaug
...
MozReview-Commit-ID: BZxBnCDBghi
--HG--
extra : rebase_source : 099d1043c7e69f3c49a2d4e34190cbd7c4532107
2016-06-09 20:35:20 +09:00
Masayuki Nakano
10f047dba5
Bug 1278014 part.10 Rename SelectionType::SELECTION_IME_SELECTEDCONVERTEDTEXT to SelectionType::eIMESelectedClause r=smaug
...
MozReview-Commit-ID: 8v3mqcYorOI
--HG--
extra : rebase_source : a6823273c161eabbfa9e49e689154e547c14a106
2016-06-09 19:29:29 +09:00
Masayuki Nakano
aa3d2a6ce9
Bug 1278014 part.9 Rename SelectionType::SELECTION_IME_CONVERTEDTEXT to SelectionType::eIMEConvertedClause r=smaug
...
MozReview-Commit-ID: 5UNqhB2ZEcZ
--HG--
extra : rebase_source : 74d41ddf5496bdc50306bf916251df4f8d65a65b
2016-06-09 19:14:17 +09:00
Masayuki Nakano
ff86f10a4c
Bug 1278014 part.8 Rename SelectionType::SELECTION_IME_SELECTEDRAWTEXT to SelectionType::eIMESelectedRawClause r=smaug
...
MozReview-Commit-ID: DgprOxg87K6
--HG--
extra : rebase_source : 2f655353845292c4e8028f6e43f0dbbbfea11b68
2016-06-09 19:03:40 +09:00
Masayuki Nakano
569677d2f1
Bug 1278014 part.7 Rename SelectionType::SELECTION_IME_RAWINPUT to SelectionType::eIMERawClause r=smaug
...
MozReview-Commit-ID: BRe10Lyx5mt
--HG--
extra : rebase_source : e57239239fe8029040ce49faff9e37c5ad0b8305
2016-06-09 18:51:49 +09:00
Masayuki Nakano
a1636168ba
Bug 1278014 part.6 Rename SelectionType::SELECTION_SPELLCHECK to SelectionType::eSpellCheck r=smaug
...
MozReview-Commit-ID: 4n2jEVax37O
--HG--
extra : rebase_source : eb8c0dbedfeac83de330ccef874525dea355b52c
2016-06-09 18:37:36 +09:00
Masayuki Nakano
d960ef26d5
Bug 1278014 part.5 Rename SelectionType::SELECTION_NORMAL to SelectionType::eNormal r=smaug
...
MozReview-Commit-ID: AAdxTTKEvrk
--HG--
extra : rebase_source : 82e10db6b8b17d4f571625e34bb3c8f1905ef58a
2016-06-09 18:35:22 +09:00
Masayuki Nakano
b58c08cb8f
Bug 1278014 part.4 Rename SelectionType::SELECTION_NONE to SelectionType::eNone r=smaug
...
MozReview-Commit-ID: BRfzs8sColP
--HG--
extra : rebase_source : a5190cb20c263b01205e1ff75c76b2970c229b4e
2016-06-09 18:07:18 +09:00
Masayuki Nakano
581b9986bb
Bug 1278014 part.3 Define 2 constants for number of SelectionType and number of SelectionType except "none" r=smaug
...
This patch defines two constants kSelectionTypeCount and kPresentSelectionTypeCount. The former is same as nsISelectionController::NUM_SELECTIONTYPES. The latter is kSelectionTypeCount - 1 for excluding SELECTION_NONE. The latter is useful in some loops which handle all selection types except SELECTION_NONE.
Note that this patch fixes a bug of nsFrameSelection. That doesn't treat SELECTION_NONE as a selection (see the definition of index), however, it defines redundant item and doesn't use it actually. Additionally, it computes invalid selection type in each loop. Therefore, without this patch, debug build hits MOZ_ASSERT() in ToSelectionType(RawSelectionType).
Note that these constants are defined as anonymous enum because we cannot define as const (or static) even with extern. If we'd try to do it, it caused link error or not available in nsFrameSelection.cpp as constant value since they were not initialized if they were initialized in nsSelection.cpp. Therefore, these constants are defined as enum items but using "k" prefix.
MozReview-Commit-ID: H6sH7NBEXlE
--HG--
extra : rebase_source : fd517d5fc2e2d5dc2f96313e2802fd1719817af7
2016-06-11 11:12:26 +09: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
Carsten "Tomcat" Book
6439e7004c
merge mozilla-inbound to mozilla-central a=merge
2016-06-08 11:57:53 +02:00
Nicholas Nethercote
65989a693d
Bug 1278452 - Remove an unnecessary null check in layout/generic/. r=heycam.
...
mLineContainer is dereferenced shortly before and after the check, so it's
obviously not useful.
--HG--
extra : rebase_source : c8639197a10116e1251945f15edec6601a46265c
2016-06-07 14:45:38 +10:00
Xidorn Quan
2ee773aede
Bug 1277937 - Fix SELECTION_URLSTRIKEOUT. r=jfkthame
...
MozReview-Commit-ID: LumW94mTX4X
2016-06-07 16:12:15 -07:00
Xidorn Quan
1f74381c1c
Bug 1268342 part 3 - Treat orthogonal text frame as non-text frame when applying justification gap. r=jfkthame
...
Also correct the comment in ComputeJustification.
MozReview-Commit-ID: AWGGuupFLze
--HG--
extra : source : d0c6c36ab0770015a19134a9e2ec9652c171e46e
2016-05-30 09:24:18 +10:00
Xidorn Quan
3b26ebeeef
Bug 1275059 - Simple fix for this bug. r=jfkthame
...
MozReview-Commit-ID: IVScO6eV6RP
--HG--
extra : source : d60cc6ea7a92f144f4efdea382a84250f7dd2576
2016-05-25 09:54:37 +10: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
39f4a65281
Bug 1269971 - Part 4. Add text stroke into text mask; r=jfkthame
...
MozReview-Commit-ID: IkaLMEX5q0T
--HG--
extra : rebase_source : 14ef2f4e033121873cbb51e437c3e7690c963fdb
2016-05-13 00:09:05 +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
CJKu
ea85bf6191
Bug 1269971 - Part 1. Rename IsForGenerateGlyphPath to IsForGenerateGlyphMask; r=jfkthame
...
MozReview-Commit-ID: 80DZsEAvXxB
--HG--
extra : rebase_source : 2b6205ad119265679b28d06056c3b433aab445c8
2016-05-13 00:08:30 +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
Aryeh Gregor
f7bc47d59b
Bug 1193762 part 7 - Use .get() when assigning to variables; r=froydnj
...
Unlike when returning an nsCOMPtr in a ternary operator or passing to a
function, I used .get() here, since the operation is actually unsafe and
deserves to be marked explicitly.
2016-05-01 21:29:23 +03:00
CJKu
3acf2e463b
Bug 1266948 - text-decoration-color: currentcolor should not use value from -webkit-text-fill-color; r=jfkthame
...
MozReview-Commit-ID: 2SfENZieSzQ
--HG--
extra : rebase_source : 3880f8fd6ae18e9f4b1cbf0a2f5eff48c060548b
2016-04-26 23:56:44 +08: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
5f02c3cba1
Bug 1097499 part 12 - Handle spacing sensibly for text-combine-upright. r=jfkthame
...
MozReview-Commit-ID: DSBMUcccfNi
--HG--
extra : source : f03b556d12d5c28f7d8e3af3d7977470784eea76
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
Xidorn Quan
79d3a9f880
Bug 1097499 part 5 - Layout text combine upright. r=jfkthame
...
MozReview-Commit-ID: 2HnXJ8bEvJH
--HG--
extra : source : bb721afad795a27f30e5a25479a1fd5c346970a4
2016-04-22 09:18:41 +10:00
Jonathan Kew
c60f6a1ae4
Bug 1266391 - Introduce an enum class mozilla::unicode::Script, and use this instead of bare integers to specify script codes for better type checking. r=masayuki
2016-04-21 18:58:59 +01:00
Jonathan Kew
74a35a7eee
Bug 1265648 followup - Use an array of UniquePtr<> for mTextRunsToDelete. r=mats
2016-04-20 10:55:15 +01: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
Jonathan Kew
cb1c20b3c3
Bug 1265459 - Replace uses of nsAutoPtr<gfxTextRun> with UniquePtr, and let MakeTextRun and similar methods return a UniquePtr. r=jrmuizel
2016-04-19 17:13:28 +01:00
Markus Stange
0466d2c67d
Bug 1265568 - Don't require component alpha layers for text with -moz-osx-font-smoothing:grayscale. r=jfkthame,mattwoodrow
...
MozReview-Commit-ID: KujmkbgadPo
--HG--
extra : rebase_source : df1db96206175e846652f3d5b247978fb5005bd2
2016-04-18 19:41:50 -04:00
CJKu
f530904493
Bug 1261578 - Part 2. Correct text decoration color; r=jfkthame
...
MozReview-Commit-ID: LfZnmTnL5KY
--HG--
extra : rebase_source : 1bb95f3a8b59c2897f55e1f17ee8168366ca1cf5
2016-04-19 17:09:54 +08:00
CJKu
ecc0333324
Bug 1261578 - Part 1. Correct text color in selection range; r=jfkthame
...
MozReview-Commit-ID: 9gBWQ00MtNC
--HG--
extra : rebase_source : a0ad39cd6e887926ce6d633b49d1fd936d91a797
2016-04-19 17:09:42 +08: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
Mats Palmgren
d4dfb9f81d
Bug 645647 part 4 - Add an 'm' prefix to some members to follow our naming conventions. r=dholbert
2016-04-14 01:32:12 +02:00
Xidorn Quan
0a46b60739
Bug 1229743
part 2 - Fix up decoration rect computation for vertical-rl and sideways-lr. r=jfkthame
...
MozReview-Commit-ID: BjJ9jhmBy1X
--HG--
extra : rebase_source : 0e3ad2bf7269c2cbb3f4537444fa49a3c8d72bbe
2016-04-11 17:14:34 +10:00
Xidorn Quan
510f88e73a
Bug 1229743
part 1 - Simplify text decoration handling code with lambda function and range-based for loop. r=jfkthame
...
MozReview-Commit-ID: 4q2tetC74Ab
--HG--
extra : rebase_source : 475cae7237caa5bf5f807aba9be365d87400a1cc
2016-04-11 12:00:43 +10:00