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

Issue 342483002: The length of a TextIterator containing replaced element is at least 1 (Closed)

Created:
6 years, 6 months ago by reni
Modified:
6 years, 5 months ago
Reviewers:
tkent, yosin_UTC9
CC:
blink-reviews, yosin_UTC9
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

The length of a TextIterator containing replaced element is at least 1 When a TextIterator is created for a range that contains a replaced element then one ',' (comma) will surely be emitted. This way the length of the created TextIterator will be at least 1. In spite of this, the WebCore::PlainTextRange::createRangeFor method assumes that the length of the iterator only can be one if that one character is a newline. The patch fixes this wrong assumption. R=tkent@chromium.org BUG=385630 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177130

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressing yutak's review #

Patch Set 3 : Fix dummy whitespace issue. #

Total comments: 3

Patch Set 4 : Updated patch #

Total comments: 3

Patch Set 5 : Fix style issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -13 lines) Patch
A + LayoutTests/editing/execCommand/remove-format-iframe-in-button.html View 1 2 3 4 1 chunk +4 lines, -8 lines 0 comments Download
A + LayoutTests/editing/execCommand/remove-format-iframe-in-button-expected.txt View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/editing/inserting/insert-with-javascript-protocol-crash-expected.txt View 1 1 chunk +0 lines, -3 lines 0 comments Download
M Source/core/editing/PlainTextRange.cpp View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download
M Source/core/editing/TextIterator.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/editing/TextIterator.cpp View 1 2 3 4 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
reni
Although try-bots are red but it seems they are unrelated failures.
6 years, 6 months ago (2014-06-17 18:26:29 UTC) #1
tkent
+yutak, -tkent
6 years, 6 months ago (2014-06-17 23:49:49 UTC) #2
Yuta Kitamura
Mostly stylistic issues. https://codereview.chromium.org/342483002/diff/1/LayoutTests/editing/execCommand/remove-format-iframe-in-button.html File LayoutTests/editing/execCommand/remove-format-iframe-in-button.html (right): https://codereview.chromium.org/342483002/diff/1/LayoutTests/editing/execCommand/remove-format-iframe-in-button.html#newcode4 LayoutTests/editing/execCommand/remove-format-iframe-in-button.html:4: <script type="text/javascript"> I generally recommend NOT ...
6 years, 6 months ago (2014-06-18 03:14:38 UTC) #3
Yuta Kitamura
Also, the try runs are failing and need to be investigated.
6 years, 6 months ago (2014-06-18 03:15:18 UTC) #4
reni
Style issues are fixed. In the previous version only one test case failed (LayoutTests/editing/inserting/insert-with-javascript-protocol-crash.html) since ...
6 years, 6 months ago (2014-06-23 22:18:05 UTC) #5
reni
@yutak or @yosin: could you take a look at this, please? :)
6 years, 6 months ago (2014-06-26 07:23:10 UTC) #6
yosin_UTC9
Thanks for fixing bug! https://codereview.chromium.org/342483002/diff/40001/LayoutTests/editing/execCommand/remove-format-iframe-in-button.html File LayoutTests/editing/execCommand/remove-format-iframe-in-button.html (right): https://codereview.chromium.org/342483002/diff/40001/LayoutTests/editing/execCommand/remove-format-iframe-in-button.html#newcode13 LayoutTests/editing/execCommand/remove-format-iframe-in-button.html:13: Markup.dump("test"); Just document.body.textContent = 'PASS ...
6 years, 6 months ago (2014-06-26 08:49:11 UTC) #7
reni
@yosin: Thanks for the review! I've updated the patch as you suggested. The Windows bot ...
6 years, 6 months ago (2014-06-26 13:18:14 UTC) #8
yosin_UTC9
LGTM w/ small nits +tkent@ for OWNERS review. Please wait for OWNERS review for committing. ...
6 years, 5 months ago (2014-06-27 01:06:41 UTC) #9
tkent
rslgtm https://codereview.chromium.org/342483002/diff/60001/LayoutTests/editing/execCommand/remove-format-iframe-in-button.html File LayoutTests/editing/execCommand/remove-format-iframe-in-button.html (right): https://codereview.chromium.org/342483002/diff/60001/LayoutTests/editing/execCommand/remove-format-iframe-in-button.html#newcode9 LayoutTests/editing/execCommand/remove-format-iframe-in-button.html:9: document.designMode="on"; Put spaces around '='. https://codereview.chromium.org/342483002/diff/60001/Source/core/editing/PlainTextRange.cpp File Source/core/editing/PlainTextRange.cpp ...
6 years, 5 months ago (2014-06-27 05:02:43 UTC) #10
reni
The CQ bit was checked by rhodovan.u-szeged@partner.samsung.com
6 years, 5 months ago (2014-06-27 16:29:50 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rhodovan.u-szeged@partner.samsung.com/342483002/80001
6 years, 5 months ago (2014-06-27 16:30:21 UTC) #12
commit-bot: I haz the power
Change committed as 177130
6 years, 5 months ago (2014-06-27 20:38:39 UTC) #13
reni
6 years, 5 months ago (2014-06-27 20:51:03 UTC) #14
Message was sent while issue was closed.
@yosi, @tkent: thanks for the review!

Powered by Google App Engine
This is Rietveld 408576698