Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Issue 2517383002: Use the font height as caret height instead of the line height (Closed)

Created:
4 years ago by joone
Modified:
3 years, 11 months ago
Reviewers:
tkent, drott, kojii, yosin_UTC9
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, kojii, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use the font height as caret height instead of the line height The caret height should be calculated by using the FontMetrics instead of the selection height. BUG=588060 TEST=editing/caret/caret-height-multi-line.html Review-Url: https://codereview.chromium.org/2517383002 Cr-Commit-Position: refs/heads/master@{#442830} Committed: https://chromium.googlesource.com/chromium/src/+/c5291a0115a65797dbf7992c8aa47136db95ae6a

Patch Set 1 #

Patch Set 2 : fix rebase fail #

Total comments: 2

Patch Set 3 : Use of FontMetrics #

Patch Set 4 : Calculate the top using the bottom of the selection #

Patch Set 5 : Update TestExpectations #

Total comments: 3

Patch Set 6 : Use the style of computed font #

Patch Set 7 : Get caret height from an InlineBox before caret position #

Total comments: 1

Patch Set 8 : add support for RTL #

Patch Set 9 : add more tests #

Patch Set 10 : fix test fails #

Patch Set 11 : update comment #

Total comments: 12

Patch Set 12 : rebase on master and apply yosin's comments #

Patch Set 13 : fix test fail #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -3 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +27 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +96 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/VisibleUnits.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutText.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +15 lines, -2 lines 0 comments Download

Messages

Total messages: 123 (88 generated)
joone
yosin@ hi, could you review this CL?
4 years ago (2016-11-22 03:01:14 UTC) #10
yosin_UTC9
Caret rectangle should be calculated from font-size of inserted character instead of line height: http://crbug.com/588060 ...
4 years ago (2016-11-22 03:52:41 UTC) #11
joone
https://codereview.chromium.org/2517383002/diff/20001/third_party/WebKit/LayoutTests/TestExpectations File third_party/WebKit/LayoutTests/TestExpectations (right): https://codereview.chromium.org/2517383002/diff/20001/third_party/WebKit/LayoutTests/TestExpectations#newcode1725 third_party/WebKit/LayoutTests/TestExpectations:1725: crbug.com/581004 editing/deleting/delete-line-003.html [ NeedsRebaseline ] On 2016/11/22 03:52:41, Yosi_UTC9 ...
4 years ago (2016-11-22 22:46:05 UTC) #12
joone
On 2016/11/22 03:52:41, Yosi_UTC9 wrote: > Caret rectangle should be calculated from font-size of inserted ...
4 years ago (2016-11-22 23:32:26 UTC) #13
yosin_UTC9
On 2016/11/22 at 23:32:26, joone.hur wrote: > On 2016/11/22 03:52:41, Yosi_UTC9 wrote: > > Caret ...
4 years ago (2016-11-24 03:54:42 UTC) #14
joone
On 2016/11/24 03:54:42, Yosi_UTC9 wrote: > On 2016/11/22 at 23:32:26, joone.hur wrote: > > On ...
4 years ago (2016-11-29 07:36:34 UTC) #24
yosin_UTC9
+drott@, since he is an expert of InlineTextBox and font. Could you also change localCaretRectForEmptyElement() ...
4 years ago (2016-11-30 01:44:02 UTC) #35
joone
https://codereview.chromium.org/2517383002/diff/100001/third_party/WebKit/Source/core/layout/LayoutText.cpp File third_party/WebKit/Source/core/layout/LayoutText.cpp (right): https://codereview.chromium.org/2517383002/diff/100001/third_party/WebKit/Source/core/layout/LayoutText.cpp#newcode736 third_party/WebKit/Source/core/layout/LayoutText.cpp:736: int height = style()->font().primaryFont()->getFontMetrics().height(); On 2016/11/30 01:44:02, Yosi_UTC9 wrote: ...
4 years ago (2016-12-02 01:24:43 UTC) #45
yosin_UTC9
https://codereview.chromium.org/2517383002/diff/100001/third_party/WebKit/Source/core/layout/LayoutText.cpp File third_party/WebKit/Source/core/layout/LayoutText.cpp (right): https://codereview.chromium.org/2517383002/diff/100001/third_party/WebKit/Source/core/layout/LayoutText.cpp#newcode736 third_party/WebKit/Source/core/layout/LayoutText.cpp:736: int height = style()->font().primaryFont()->getFontMetrics().height(); On 2016/12/02 at 01:24:43, joone ...
4 years ago (2016-12-02 01:42:35 UTC) #46
joone
On 2016/12/02 01:42:35, Yosi_UTC9 wrote: > https://codereview.chromium.org/2517383002/diff/100001/third_party/WebKit/Source/core/layout/LayoutText.cpp > File third_party/WebKit/Source/core/layout/LayoutText.cpp (right): > > https://codereview.chromium.org/2517383002/diff/100001/third_party/WebKit/Source/core/layout/LayoutText.cpp#newcode736 > ...
4 years ago (2016-12-02 21:32:58 UTC) #48
yosin_UTC9
On 2016/12/02 at 21:32:58, joone.hur wrote: > On 2016/12/02 01:42:35, Yosi_UTC9 wrote: > > https://codereview.chromium.org/2517383002/diff/100001/third_party/WebKit/Source/core/layout/LayoutText.cpp ...
4 years ago (2016-12-07 05:34:28 UTC) #49
joone
On 2016/12/07 05:34:28, Yosi_UTC9 wrote: > On 2016/12/02 at 21:32:58, joone.hur wrote: > > On ...
4 years ago (2016-12-07 08:02:50 UTC) #50
yosin_UTC9
On 2016/12/07 at 08:02:50, joone.hur wrote: > On 2016/12/07 05:34:28, Yosi_UTC9 wrote: > > On ...
4 years ago (2016-12-07 09:01:58 UTC) #51
drott
Can we define/discuss/describe the desired behavior including font fallback first, perhaps in the bug description ...
4 years ago (2016-12-07 11:30:50 UTC) #52
joone
On 2016/12/07 09:01:58, Yosi_UTC9 wrote: > On 2016/12/07 at 08:02:50, joone.hur wrote: > > On ...
4 years ago (2016-12-07 23:24:32 UTC) #53
joone
On 2016/12/07 11:30:50, drott wrote: > Can we define/discuss/describe the desired behavior including font fallback ...
4 years ago (2016-12-07 23:29:03 UTC) #54
yosin_UTC9
On 2016/12/07 at 11:30:50, drott wrote: > Can we define/discuss/describe the desired behavior including font ...
4 years ago (2016-12-08 04:59:19 UTC) #55
yosin_UTC9
I've also updated issue 588060.
4 years ago (2016-12-08 05:00:00 UTC) #56
drott
Thanks for the details explaining the intended behavior and implications, that helped. > Regarding the ...
4 years ago (2016-12-08 08:21:41 UTC) #57
yosin_UTC9
On 2016/12/08 at 08:21:41, drott wrote: > Thanks for the details explaining the intended behavior ...
4 years ago (2016-12-08 09:30:36 UTC) #58
joone
On 2016/12/08 09:30:36, Yosi_UTC9 wrote: > On 2016/12/08 at 08:21:41, drott wrote: > > Thanks ...
4 years ago (2016-12-14 00:23:25 UTC) #65
drott
Thanks for the update, Joone. https://codereview.chromium.org/2517383002/diff/200001/third_party/WebKit/Source/core/layout/LayoutText.cpp File third_party/WebKit/Source/core/layout/LayoutText.cpp (right): https://codereview.chromium.org/2517383002/diff/200001/third_party/WebKit/Source/core/layout/LayoutText.cpp#newcode737 third_party/WebKit/Source/core/layout/LayoutText.cpp:737: if (box->prevLeafChild() && caretOffset ...
4 years ago (2016-12-14 16:42:22 UTC) #72
joone
On 2016/12/14 16:42:22, drott wrote: > Thanks for the update, Joone. > > https://codereview.chromium.org/2517383002/diff/200001/third_party/WebKit/Source/core/layout/LayoutText.cpp > ...
4 years ago (2016-12-17 01:15:29 UTC) #84
drott
On 2016/12/17 at 01:15:29, joone.hur wrote: > drott@ The latest CL considered RTL and added ...
4 years ago (2016-12-19 13:55:35 UTC) #87
joone
On 2016/12/19 13:55:35, drott wrote: > On 2016/12/17 at 01:15:29, joone.hur wrote: > > > ...
4 years ago (2016-12-20 00:02:53 UTC) #88
yosin_UTC9
Happy 2017! Sorry for late response. Now, I'm back in work. https://codereview.chromium.org/2517383002/diff/300001/third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html File third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html (right): ...
3 years, 11 months ago (2017-01-05 07:31:32 UTC) #97
joone
Happy new year too! I will update this CL once https://codereview.chromium.org/2616103003/ lands. Thanks! https://codereview.chromium.org/2517383002/diff/300001/third_party/WebKit/LayoutTests/editing/caret/caret-height-multi-line.html File ...
3 years, 11 months ago (2017-01-06 20:40:43 UTC) #98
joone
yosin@ please review the updated CL.
3 years, 11 months ago (2017-01-11 01:00:26 UTC) #107
yosin_UTC9
lgtm Thanks for doing this! And sorry for long latency due by my vacation.
3 years, 11 months ago (2017-01-11 01:21:32 UTC) #108
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2517383002/380001
3 years, 11 months ago (2017-01-11 05:59:21 UTC) #113
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/339237)
3 years, 11 months ago (2017-01-11 06:06:16 UTC) #115
joone
tkent@ could you review the change in LayoutText.cpp?
3 years, 11 months ago (2017-01-11 06:29:25 UTC) #117
tkent
lgtm
3 years, 11 months ago (2017-01-11 06:42:12 UTC) #118
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2517383002/380001
3 years, 11 months ago (2017-01-11 06:55:44 UTC) #120
commit-bot: I haz the power
3 years, 11 months ago (2017-01-11 07:00:48 UTC) #123
Message was sent while issue was closed.
Committed patchset #13 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/c5291a0115a65797dbf7992c8aa4...

Powered by Google App Engine
This is Rietveld 408576698