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

Issue 672953002: Convert first letter into a pseudo element. (Closed)

Created:
6 years, 2 months ago by dsinclair
Modified:
6 years, 1 month ago
CC:
aandrey+blink_chromium.org, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-dom_chromium.org, blink-reviews-rendering, caseq+blink_chromium.org, devtools-reviews_chromium.org, dglazkov+blink, eae+blinkwatch, ed+blinkwatch_opera.com, eustas+blink_chromium.org, jchaffraix+rendering, leviw+renderwatch, loislo+blink_chromium.org, lushnikov+blink_chromium.org, malch+blink_chromium.org, paulirish+reviews_chromium.org, pdr+renderingwatchlist_chromium.org, pfeldman+blink_chromium.org, rwlbuis, rune+blink, sergeyv+blink_chromium.org, sof, vsevik+blink_chromium.org, yurys+blink_chromium.org, zoltan1
Project:
blink
Visibility:
Public.

Description

Convert first letter into a pseudo element. This is a reland of first letter as a psuedo element after the revert in r184113. Currently, first letter renderers are created and destroyed through the updateFirstLetters() call in RenderBlock. This has, historically, been problematic as we may miss places where the call was required, leading to accessing invalid memory. This CL converts the first letter code to use a PseudoElement for the first-letter instead of creating classes during layout. With the PseudoElement implementation the two tests which are currently in LayoutTests/fast/css/first-letter-removed-added.html work as expected. BUG=391288 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185405

Patch Set 1 #

Patch Set 2 : Rebase to master #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 20

Patch Set 5 : #

Patch Set 6 : #

Patch Set 7 : #

Total comments: 6

Patch Set 8 : Rebase to master #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+833 lines, -558 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +61 lines, -1 line 0 comments Download
M LayoutTests/fast/css/dynamic-class-pseudo-elements.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/css/dynamic-class-pseudo-elements-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
A LayoutTests/fast/css/first-letter.html View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -0 lines 0 comments Download
A LayoutTests/fast/css/first-letter-expected.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +12 lines, -0 lines 0 comments Download
M LayoutTests/fast/css/first-letter-removed-added.html View 2 chunks +2 lines, -2 lines 0 comments Download
M LayoutTests/fast/css/first-letter-removed-added-expected.txt View 3 chunks +4 lines, -4 lines 0 comments Download
M Source/core/core.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/css/resolver/StyleResolver.cpp View 1 2 3 4 5 6 7 4 chunks +16 lines, -3 lines 0 comments Download
M Source/core/dom/Element.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Element.cpp View 1 2 3 4 7 chunks +45 lines, -1 line 0 comments Download
M Source/core/dom/ElementRareData.h View 5 chunks +11 lines, -1 line 0 comments Download
M Source/core/dom/ElementRareData.cpp View 2 chunks +2 lines, -1 line 0 comments Download
A Source/core/dom/FirstLetterPseudoElement.h View 1 2 3 4 5 6 7 8 1 chunk +77 lines, -0 lines 0 comments Download
A Source/core/dom/FirstLetterPseudoElement.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +309 lines, -0 lines 0 comments Download
M Source/core/dom/Node.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Node.cpp View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/dom/Position.cpp View 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/dom/PseudoElement.h View 3 chunks +12 lines, -8 lines 0 comments Download
M Source/core/dom/PseudoElement.cpp View 5 chunks +11 lines, -4 lines 0 comments Download
M Source/core/dom/RenderTreeBuilder.h View 2 chunks +4 lines, -19 lines 0 comments Download
M Source/core/dom/RenderTreeBuilder.cpp View 5 chunks +35 lines, -5 lines 0 comments Download
M Source/core/editing/TextIterator.cpp View 1 2 3 4 5 chunks +103 lines, -94 lines 0 comments Download
M Source/core/inspector/InspectorCSSAgent.cpp View 1 2 1 chunk +16 lines, -10 lines 0 comments Download
M Source/core/rendering/HitTestResult.h View 2 chunks +0 lines, -2 lines 0 comments Download
M Source/core/rendering/HitTestResult.cpp View 7 chunks +1 line, -12 lines 0 comments Download
M Source/core/rendering/RenderBlock.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +0 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +0 lines, -257 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.h View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M Source/core/rendering/RenderBoxModelObject.cpp View 3 chunks +0 lines, -28 lines 0 comments Download
M Source/core/rendering/RenderObject.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderObject.cpp View 1 2 3 4 5 6 7 2 chunks +3 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderObjectChildList.cpp View 1 2 1 chunk +9 lines, -7 lines 0 comments Download
M Source/core/rendering/RenderTableCell.cpp View 1 2 3 4 5 6 7 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderTextFragment.h View 1 2 4 chunks +20 lines, -11 lines 0 comments Download
M Source/core/rendering/RenderTextFragment.cpp View 1 2 6 chunks +51 lines, -67 lines 0 comments Download
M Source/core/rendering/RenderTreeAsText.cpp View 1 2 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 35 (12 generated)
dsinclair
PTAL. I've worked through the clusterfuzz issues, and I think this is ready for re-landing. ...
6 years, 1 month ago (2014-11-11 21:07:37 UTC) #4
leviw_travelin_and_unemployed
Dang! What a patch! https://codereview.chromium.org/672953002/diff/100001/Source/core/dom/FirstLetterPseudoElement.cpp File Source/core/dom/FirstLetterPseudoElement.cpp (right): https://codereview.chromium.org/672953002/diff/100001/Source/core/dom/FirstLetterPseudoElement.cpp#newcode1 Source/core/dom/FirstLetterPseudoElement.cpp:1: /* You should be able ...
6 years, 1 month ago (2014-11-11 21:22:04 UTC) #6
dsinclair
https://codereview.chromium.org/672953002/diff/100001/Source/core/dom/FirstLetterPseudoElement.cpp File Source/core/dom/FirstLetterPseudoElement.cpp (right): https://codereview.chromium.org/672953002/diff/100001/Source/core/dom/FirstLetterPseudoElement.cpp#newcode1 Source/core/dom/FirstLetterPseudoElement.cpp:1: /* On 2014/11/11 21:22:04, leviw wrote: > You should ...
6 years, 1 month ago (2014-11-11 21:24:32 UTC) #7
leviw_travelin_and_unemployed
On 2014/11/11 at 21:24:32, dsinclair wrote: > https://codereview.chromium.org/672953002/diff/100001/Source/core/dom/FirstLetterPseudoElement.cpp > File Source/core/dom/FirstLetterPseudoElement.cpp (right): > > https://codereview.chromium.org/672953002/diff/100001/Source/core/dom/FirstLetterPseudoElement.cpp#newcode1 ...
6 years, 1 month ago (2014-11-11 21:30:02 UTC) #8
Julien - ping for review
It's a big patch so someone else should look at it. I haven't seen anything ...
6 years, 1 month ago (2014-11-12 21:58:51 UTC) #9
rune
I've looked a bit at the style resolving, and have a question about style inheritance ...
6 years, 1 month ago (2014-11-13 09:12:08 UTC) #11
dsinclair
https://codereview.chromium.org/672953002/diff/100001/LayoutTests/fast/css/dynamic-class-pseudo-elements.html File LayoutTests/fast/css/dynamic-class-pseudo-elements.html (right): https://codereview.chromium.org/672953002/diff/100001/LayoutTests/fast/css/dynamic-class-pseudo-elements.html#newcode84 LayoutTests/fast/css/dynamic-class-pseudo-elements.html:84: shouldBe("internals.updateStyleAndReturnAffectedElementCount()", "10"); On 2014/11/13 09:12:08, rune wrote: > There ...
6 years, 1 month ago (2014-11-13 17:55:36 UTC) #12
dsinclair
On 2014/11/13 09:12:08, rune wrote: > I've looked a bit at the style resolving, and ...
6 years, 1 month ago (2014-11-13 17:57:37 UTC) #13
rune
On 2014/11/13 at 17:57:37, dsinclair wrote: > On 2014/11/13 09:12:08, rune wrote: > > <style> ...
6 years, 1 month ago (2014-11-13 18:21:10 UTC) #14
rune
On 2014/11/13 at 18:21:10, rune wrote: > On 2014/11/13 at 17:57:37, dsinclair wrote: > > ...
6 years, 1 month ago (2014-11-13 18:25:12 UTC) #15
dsinclair
On 2014/11/13 18:25:12, rune wrote: > On 2014/11/13 at 18:21:10, rune wrote: > > On ...
6 years, 1 month ago (2014-11-13 18:32:26 UTC) #16
dsinclair
On 2014/11/13 09:12:08, rune wrote: > I've looked a bit at the style resolving, and ...
6 years, 1 month ago (2014-11-13 21:04:30 UTC) #17
dsinclair
Ok, the style regression is on ToT. I filed crbug.com/433334 to track it down. I ...
6 years, 1 month ago (2014-11-14 16:01:07 UTC) #18
Julien - ping for review
lgtm! http://fc08.deviantart.net/fs70/f/2012/144/9/9/rock_on__by_midzmedia-d50wnk5.jpg https://codereview.chromium.org/672953002/diff/160001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/672953002/diff/160001/Source/core/dom/Element.cpp#newcode2529 Source/core/dom/Element.cpp:2529: // incorrect results due to setting the ...
6 years, 1 month ago (2014-11-14 19:31:00 UTC) #19
dsinclair
https://codereview.chromium.org/672953002/diff/160001/Source/core/dom/Element.cpp File Source/core/dom/Element.cpp (right): https://codereview.chromium.org/672953002/diff/160001/Source/core/dom/Element.cpp#newcode2529 Source/core/dom/Element.cpp:2529: // incorrect results due to setting the first letter ...
6 years, 1 month ago (2014-11-14 20:17:39 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672953002/200001
6 years, 1 month ago (2014-11-14 20:18:45 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/33015) mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/30944) linux_gpu ...
6 years, 1 month ago (2014-11-14 20:29:50 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672953002/220001
6 years, 1 month ago (2014-11-14 20:45:37 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/33022) linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/33711)
6 years, 1 month ago (2014-11-14 20:56:58 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672953002/240001
6 years, 1 month ago (2014-11-14 21:12:32 UTC) #30
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/36612)
6 years, 1 month ago (2014-11-14 23:01:35 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672953002/260001
6 years, 1 month ago (2014-11-15 02:38:03 UTC) #34
commit-bot: I haz the power
6 years, 1 month ago (2014-11-15 04:42:13 UTC) #35
Message was sent while issue was closed.
Committed patchset #12 (id:260001) as 185405

Powered by Google App Engine
This is Rietveld 408576698