|
|
Chromium Code Reviews|
Created:
4 years, 8 months ago by Seigo Nonaka Modified:
4 years, 8 months ago Reviewers:
yosin_UTC9 CC:
blink-reviews, chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse our own grapheme boundary handling
This CL replaces the grapheme boundary detection
from ICU's implementation to our own.
By replacing with own implementation, we can support
latest Unicode spec without waiting ICU update.
For example, grapheme boundary for the recent complex
emoji sequence is now supported.
There is another benefit of new implementation. The
interface of new implementation does not require the
full continuous text buffer. This is good if the target
text crosses the Nodes.
BUG=594923
Committed: https://crrev.com/3d284a415f093a8e0ddbdd955f9f3ee5e11c2a57
Cr-Commit-Position: refs/heads/master@{#385720}
Patch Set 1 #Patch Set 2 : rebase #
Total comments: 1
Patch Set 3 : rebase #
Total comments: 10
Patch Set 4 : Addressing comments #Patch Set 5 : fix the crash? #Patch Set 6 : left TODO #
Messages
Total messages: 31 (15 generated)
Description was changed from ========== Replace Grapheme with our own BUG= ========== to ========== Replace grapheme boundary movement with our own implementation BUG=594923 ==========
nona@chromium.org changed reviewers: + yosin@chromium.org
Yosi-san, this is the last CL for grapheme boundary. Could you kindly take a look? Thank you.
https://codereview.chromium.org/1853033002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/EditingUtilities.cpp (right): https://codereview.chromium.org/1853033002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:574: int uncheckedPreviousOffset(const Node* node, int current) It seems make |uncheckedPreviousOffset()| and |uncheckNextOffset()| to work on grapheme is right approach. We need to introduce |PositionMoveType::GraphemeCluster| and make |{previous,next}PositionOf()| to call |unchecked{Previous,Next}Of()| to use them for |PositionMoveType::GraphemeCluster|, and, change |PositionMoveType::CodePoint| of |{previous,next}PositionOf()| to work on code point instead of calling |PositionMoveType::GraphemeCluster|.
To reduce confusion, I recommend rename - uncheckedNextOffset() to nextGraphmeBoundaryOf() - uncheckedPreviousOffset() to previousGraphmeBoundaryOf() first in another patch.
Patchset #3 (id:40001) has been deleted
Patchset #3 (id:60001) has been deleted
Description was changed from ========== Replace grapheme boundary movement with our own implementation BUG=594923 ========== to ========== Use our own grapheme boundary handling This CL replaces the grapheme boundary detection from ICU's implementation to our own. BUG=594923 ==========
Thank you for your review. I rebased for renaming CL. Could you kindly take an another look?
Could you add why we switch to use "our own grapheme boundary handling" in change description? https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/EditingUtilities.cpp (right): https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:574: int previousGraphemeBoundaryOf(const Node* node, int current) Could you add TODO comment that we need to support grapheme crossing |Node| boundary. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:581: text, current); nit: Could you make this call in one line to follow other parts? https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:599: if (!node->isTextNode()) Could you add TODO comment that we need to support grapheme crossing |Node| boundary. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:604: if (current >= (length - 1)) nit: We don't need to have parenthesis for |(length - 1)|. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:607: text, current); nit: Could you make this call in one line to follow other parts?
Description was changed from ========== Use our own grapheme boundary handling This CL replaces the grapheme boundary detection from ICU's implementation to our own. BUG=594923 ========== to ========== Use our own grapheme boundary handling This CL replaces the grapheme boundary detection from ICU's implementation to our own. By replacing with own implementation, we can support latest Unicode spec without waiting ICU update. For example, grapheme boundary for the recent complex emoji sequence is now supported. There is another benefit of new implementation. The interface of new implementation does not require the full continuous text buffer. This is good if the target text crosses the Nodes. BUG=594923 ==========
Thank you for your review. Please take an another look. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... File third_party/WebKit/Source/core/editing/EditingUtilities.cpp (right): https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:574: int previousGraphemeBoundaryOf(const Node* node, int current) On 2016/04/07 01:06:53, Yosi_UTC9 wrote: > Could you add TODO comment that we need to support grapheme crossing |Node| > boundary. Done. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:581: text, current); On 2016/04/07 01:06:53, Yosi_UTC9 wrote: > nit: Could you make this call in one line to follow other parts? Done. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:599: if (!node->isTextNode()) On 2016/04/07 01:06:53, Yosi_UTC9 wrote: > Could you add TODO comment that we need to support grapheme crossing |Node| > boundary. Done. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:604: if (current >= (length - 1)) On 2016/04/07 01:06:53, Yosi_UTC9 wrote: > nit: We don't need to have parenthesis for |(length - 1)|. Done. https://codereview.chromium.org/1853033002/diff/80001/third_party/WebKit/Sour... third_party/WebKit/Source/core/editing/EditingUtilities.cpp:607: text, current); On 2016/04/07 01:06:53, Yosi_UTC9 wrote: > nit: Could you make this call in one line to follow other parts? Done.
The CQ bit was checked by yosin@chromium.org
lgtm
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1853033002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1853033002/100001
The CQ bit was unchecked by yosin@chromium.org
Thank you for your review, but I'm sorry this cl is not ready for submit. This depends on https://codereview.chromium.org/1857633002/ I'm going to ping him. Thank you.
The CQ bit was checked by nona@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1853033002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1853033002/100001
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
Ugh, I'm sorry the failure looks real. I'm going to address it.
Patchset #6 (id:140001) has been deleted
Looks like https://codereview.chromium.org/1867793003/ is necessary for passing paste-multiline-text-input.html
The CQ bit was checked by nona@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from yosin@chromium.org Link to the patchset: https://codereview.chromium.org/1853033002/#ps160001 (title: "left TODO")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1853033002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1853033002/160001
Message was sent while issue was closed.
Description was changed from ========== Use our own grapheme boundary handling This CL replaces the grapheme boundary detection from ICU's implementation to our own. By replacing with own implementation, we can support latest Unicode spec without waiting ICU update. For example, grapheme boundary for the recent complex emoji sequence is now supported. There is another benefit of new implementation. The interface of new implementation does not require the full continuous text buffer. This is good if the target text crosses the Nodes. BUG=594923 ========== to ========== Use our own grapheme boundary handling This CL replaces the grapheme boundary detection from ICU's implementation to our own. By replacing with own implementation, we can support latest Unicode spec without waiting ICU update. For example, grapheme boundary for the recent complex emoji sequence is now supported. There is another benefit of new implementation. The interface of new implementation does not require the full continuous text buffer. This is good if the target text crosses the Nodes. BUG=594923 ==========
Message was sent while issue was closed.
Committed patchset #6 (id:160001)
Message was sent while issue was closed.
Description was changed from ========== Use our own grapheme boundary handling This CL replaces the grapheme boundary detection from ICU's implementation to our own. By replacing with own implementation, we can support latest Unicode spec without waiting ICU update. For example, grapheme boundary for the recent complex emoji sequence is now supported. There is another benefit of new implementation. The interface of new implementation does not require the full continuous text buffer. This is good if the target text crosses the Nodes. BUG=594923 ========== to ========== Use our own grapheme boundary handling This CL replaces the grapheme boundary detection from ICU's implementation to our own. By replacing with own implementation, we can support latest Unicode spec without waiting ICU update. For example, grapheme boundary for the recent complex emoji sequence is now supported. There is another benefit of new implementation. The interface of new implementation does not require the full continuous text buffer. This is good if the target text crosses the Nodes. BUG=594923 Committed: https://crrev.com/3d284a415f093a8e0ddbdd955f9f3ee5e11c2a57 Cr-Commit-Position: refs/heads/master@{#385720} ==========
Message was sent while issue was closed.
Patchset 6 (id:??) landed as https://crrev.com/3d284a415f093a8e0ddbdd955f9f3ee5e11c2a57 Cr-Commit-Position: refs/heads/master@{#385720} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
