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

Issue 177093016: Fix crash in ApplyStyleCommand::applyRelativeFontStyleChange() (Closed)

Created:
6 years, 10 months ago by Inactive
Modified:
6 years, 10 months ago
CC:
blink-reviews
Visibility:
Public.

Description

Fix crash in ApplyStyleCommand::applyRelativeFontStyleChange() Fix crash in ApplyStyleCommand::applyRelativeFontStyleChange(). The issue was that we would traverse the DOM tree past the beyondEnd under some circumstances and thus NodeTraversal::next() would return null unexpectedly. This CL adds a check to make sure startNode != beyondEnd before traversing to avoid the problem. This CL also adds a few more assertions to catch similar issues more easily in the future. R=leviw@chromium.org, adamk BUG=345950 TEST=editing/style/apply-style-crash2.html Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=167845

Patch Set 1 #

Total comments: 3

Patch Set 2 : Reduce layout test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -3 lines) Patch
A LayoutTests/editing/style/apply-style-crash2.html View 1 1 chunk +25 lines, -0 lines 0 comments Download
A + LayoutTests/editing/style/apply-style-crash2-expected.txt View 1 1 chunk +0 lines, -1 line 0 comments Download
M Source/core/editing/ApplyStyleCommand.cpp View 2 chunks +13 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Inactive
https://codereview.chromium.org/177093016/diff/1/Source/core/editing/ApplyStyleCommand.cpp File Source/core/editing/ApplyStyleCommand.cpp (right): https://codereview.chromium.org/177093016/diff/1/Source/core/editing/ApplyStyleCommand.cpp#newcode370 Source/core/editing/ApplyStyleCommand.cpp:370: startNode = NodeTraversal::next(*startNode); This traverses past beyondEnd if startNode ...
6 years, 10 months ago (2014-02-25 15:00:41 UTC) #1
leviw_travelin_and_unemployed
The code change lgtm. The test needs some work. https://codereview.chromium.org/177093016/diff/1/LayoutTests/editing/style/apply-style-crash2.html File LayoutTests/editing/style/apply-style-crash2.html (right): https://codereview.chromium.org/177093016/diff/1/LayoutTests/editing/style/apply-style-crash2.html#newcode11 LayoutTests/editing/style/apply-style-crash2.html:11: ...
6 years, 10 months ago (2014-02-25 18:45:35 UTC) #2
Inactive
https://codereview.chromium.org/177093016/diff/1/LayoutTests/editing/style/apply-style-crash2.html File LayoutTests/editing/style/apply-style-crash2.html (right): https://codereview.chromium.org/177093016/diff/1/LayoutTests/editing/style/apply-style-crash2.html#newcode11 LayoutTests/editing/style/apply-style-crash2.html:11: "el0=document.createElement('input');", On 2014/02/25 18:45:36, Levi wrote: > This could ...
6 years, 10 months ago (2014-02-25 20:38:54 UTC) #3
leviw_travelin_and_unemployed
Totally better. Thank you :) lgtm.
6 years, 10 months ago (2014-02-25 21:06:14 UTC) #4
Inactive
The CQ bit was checked by ch.dumez@samsung.com
6 years, 10 months ago (2014-02-25 21:09:01 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/177093016/10001
6 years, 10 months ago (2014-02-25 21:09:06 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/177093016/10001
6 years, 10 months ago (2014-02-25 23:04:01 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ch.dumez@samsung.com/177093016/10001
6 years, 10 months ago (2014-02-25 23:23:30 UTC) #8
Inactive
6 years, 10 months ago (2014-02-26 02:30:24 UTC) #9
Message was sent while issue was closed.
Committed patchset #2 manually as r167845 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698