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

Issue 684213002: Return correct length for firstLetterLength. (Closed)

Created:
6 years, 1 month ago by dsinclair
Modified:
6 years, 1 month ago
CC:
blink-reviews, blink-reviews-rendering, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, zoltan1
Project:
blink
Visibility:
Public.

Description

Return correct length for firstLetterLength. Currently if the text passed into firstLetterLength has a length of 0 we will return a length of 1. This is wrong as we should be returning a length of 0. This CL fixes the code to check or the length and then fixes the caller to correctly handle the cases where needed the length to be 1 instead of the correct 0. Also, LayoutTests were added to show we correctly handle a <br> and <wbr> as the first character in the div when looking for the first-letter renderer. BUG=425008 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=184658

Patch Set 1 : #

Total comments: 2

Patch Set 2 : Rebase to master #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -5 lines) Patch
A LayoutTests/fast/css/first-letter-br-first-character.html View 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/first-letter-br-first-character-expected.html View 1 chunk +7 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/first-letter-wbr-first-character.html View 1 chunk +8 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/first-letter-wbr-first-character-expected.html View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/rendering/RenderBlock.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 6 chunks +13 lines, -5 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
dsinclair
PTAL.
6 years, 1 month ago (2014-10-29 15:52:53 UTC) #4
dsinclair
6 years, 1 month ago (2014-10-29 20:10:23 UTC) #6
leviw_travelin_and_unemployed
"Aswell" and "correclty" in description. LGTM. https://codereview.chromium.org/684213002/diff/40001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/684213002/diff/40001/Source/core/rendering/RenderBlock.cpp#newcode3736 Source/core/rendering/RenderBlock.cpp:3736: if (length || ...
6 years, 1 month ago (2014-10-29 20:26:52 UTC) #7
dsinclair
https://codereview.chromium.org/684213002/diff/40001/Source/core/rendering/RenderBlock.cpp File Source/core/rendering/RenderBlock.cpp (right): https://codereview.chromium.org/684213002/diff/40001/Source/core/rendering/RenderBlock.cpp#newcode3736 Source/core/rendering/RenderBlock.cpp:3736: if (length || (currChild->isBR() || (currChild->isText() && toRenderText(currChild)->isWordBreak()))) On ...
6 years, 1 month ago (2014-10-30 14:07:27 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684213002/80001
6 years, 1 month ago (2014-10-30 14:08:43 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/34385)
6 years, 1 month ago (2014-10-30 15:55:48 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/684213002/80001
6 years, 1 month ago (2014-10-30 15:58:40 UTC) #14
commit-bot: I haz the power
6 years, 1 month ago (2014-10-30 16:43:13 UTC) #15
Message was sent while issue was closed.
Committed patchset #3 (id:80001) as 184658

Powered by Google App Engine
This is Rietveld 408576698