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

Issue 1824143003: [All-In-One] Introduce BackspaceStateMachine (Closed)

Created:
4 years, 9 months ago by Seigo Nonaka
Modified:
4 years, 8 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce BackspaceStateMachine BackspaceStateMachine is for deleting complex unicode sequence by backspace key event. This CL only introduces surrogate pair handling. BUG=594920 R=yosin

Patch Set 1 : #

Total comments: 20

Patch Set 2 : Addressed comments #

Total comments: 12

Patch Set 3 : Addressed comments and update DEPS. #

Patch Set 4 : Rebased to HEAD #

Total comments: 6

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+303 lines, -23 lines) Patch
M third_party/WebKit/Source/core/DEPS View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 2 chunks +3 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/BackspaceStateMachine.h View 1 2 3 4 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp View 1 2 3 4 1 chunk +59 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/editing/BackspaceStateMachineTest.cpp View 1 2 1 chunk +81 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilities.cpp View 1 2 3 4 2 chunks +19 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp View 1 2 3 1 chunk +98 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.cpp View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutText.h View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutText.cpp View 1 2 3 4 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 16 (8 generated)
Seigo Nonaka
Hi Yoshi-san, could you kindly take a look? Thank you.
4 years, 9 months ago (2016-03-25 02:16:43 UTC) #6
yosin_UTC9
https://codereview.chromium.org/1824143003/diff/80001/third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp File third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp (right): https://codereview.chromium.org/1824143003/diff/80001/third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp#newcode21 third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp:21: ++mCodeUnitsToBeDeleted; It seems we should reset |mTrailSurogate| too. https://codereview.chromium.org/1824143003/diff/80001/third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp#newcode26 ...
4 years, 9 months ago (2016-03-25 04:37:23 UTC) #8
Seigo Nonaka
Thank you for your review. I addressed your comments. Please take another look. https://codereview.chromium.org/1824143003/diff/80001/third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp File ...
4 years, 9 months ago (2016-03-25 06:59:06 UTC) #9
Seigo Nonaka
Thank you for your review. I addressed your comments. Please take another look.
4 years, 9 months ago (2016-03-25 06:59:09 UTC) #10
yosin_UTC9
https://codereview.chromium.org/1824143003/diff/100001/third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp File third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp (right): https://codereview.chromium.org/1824143003/diff/100001/third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp#newcode7 third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp:7: #include <unicode/utf16.h> nit: s/<unicode/utf16.h>/"third_party/icu/source/common/unicode/utf16.h"/ We'll see what PRESUBMIT says. ...
4 years, 9 months ago (2016-03-25 10:01:05 UTC) #11
Seigo Nonaka
Thank you for your review. I addressed and rebased to head. Please take an another ...
4 years, 9 months ago (2016-03-25 10:26:33 UTC) #13
yosin_UTC9
Could split this patch into three and make this patch is "All-In-One" patch for reference ...
4 years, 9 months ago (2016-03-28 05:05:47 UTC) #15
Seigo Nonaka
4 years, 8 months ago (2016-03-28 07:28:12 UTC) #16
Thank you for your review. I'm going to upload separated CLs.

https://codereview.chromium.org/1824143003/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp (right):

https://codereview.chromium.org/1824143003/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/BackspaceStateMachine.cpp:11:
BackspaceStateMachine::BackspaceStateMachine()
On 2016/03/28 05:05:47, Yosi_UTC9 wrote:
> nit: s/{}/= default/

Done.

https://codereview.chromium.org/1824143003/diff/160001/third_party/WebKit/Sou...
File third_party/WebKit/Source/core/editing/EditingUtilities.cpp (right):

https://codereview.chromium.org/1824143003/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/EditingUtilities.cpp:561: {
On 2016/03/28 05:05:47, Yosi_UTC9 wrote:
> Could you add DCHECK_GE(current, 0)?

Done.

https://codereview.chromium.org/1824143003/diff/160001/third_party/WebKit/Sou...
third_party/WebKit/Source/core/editing/EditingUtilities.cpp:574: return current
- machine.finalizeAndGetCodeUnitCountToBeDeleted();
On 2016/03/28 05:05:47, Yosi_UTC9 wrote:
> Could you check |current| >= 0?
> 
> e.g.
> int amount = machine.finalizeAndGetCodeUnitCountToBeDeleted();
> DCHECK_GE(amount, 1);
> DCHECK_GE(current, amount);
> return current - amount;

Done.

Powered by Google App Engine
This is Rietveld 408576698