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

Issue 2650583003: Fix ::first-letter not to apply non-block containers (Closed)

Created:
3 years, 11 months ago by kojii
Modified:
3 years, 11 months ago
CC:
blink-reviews, blink-reviews-html_chromium.org, chromium-reviews, dglazkov+blink, dominicc (has gone to gerrit), tkent
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix ::first-letter not to apply non-block containers The CSS Pseudo-Elements[1] defines that ::first-line and ::first-letter only applies to block containers. Checking |isLayoutBlockFlow()| works in most cases. However, when |Element::createLayoutObject()| creates |LayoutObject| without using |LayoutObject::createObject()|, |isLayoutBlockFlow()| may conflict with the CSS display property. An example is to apply 'display: flex' to <fieldset> elements. This patch changes to check both |isLayoutBlockFlow()| and the CSS display property. The list of values of the 'display' property to be block containers is defined in CSS Display[2]. [1] https://drafts.csswg.org/css-pseudo-4/ [2] https://drafts.csswg.org/css-display/ BUG=675117 Review-Url: https://codereview.chromium.org/2650583003 Cr-Commit-Position: refs/heads/master@{#446287} Committed: https://chromium.googlesource.com/chromium/src/+/880301a7e70e48fd5eb46dc441f3d974ec4ae6bf

Patch Set 1 : Apply crrev.com/2373963002 to HTMLFieldSetElement #

Patch Set 2 : Fix StyleResolver::createPseudoElementIfNeeded #

Patch Set 3 : WIP #

Patch Set 4 : Fix ListItem, add test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -1 line) Patch
A third_party/WebKit/LayoutTests/fast/css/first-letter-to-non-block-container.html View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css/first-letter-to-non-block-container-expected.html View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutObject.h View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/style/ComputedStyle.h View 1 2 3 2 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (16 generated)
kojii
cbiesinger, could you mind to advise? PS1 fixes HTMLFieldSetElement::createLayoutObject, PS2 fixes StyleResolver.
3 years, 11 months ago (2017-01-23 06:56:31 UTC) #4
cbiesinger
You're asking which one I like better? I think we should get the input from ...
3 years, 11 months ago (2017-01-23 23:46:55 UTC) #6
rune
I'm not sure. The issue here is that the computed display does not reflect what ...
3 years, 11 months ago (2017-01-24 11:03:01 UTC) #7
kojii
+tkent@, this is related with forms. > I'm not sure. The issue here is that ...
3 years, 11 months ago (2017-01-24 13:06:26 UTC) #8
rune
On 2017/01/24 13:06:26, kojii wrote: > +tkent@, this is related with forms. > > > ...
3 years, 11 months ago (2017-01-24 14:59:51 UTC) #9
kojii
rune@, PTAL. > Yes. Or in general actually. I hope PS4 understood this correctly, please ...
3 years, 11 months ago (2017-01-26 04:55:18 UTC) #14
rune
On 2017/01/26 04:55:18, kojii wrote: > rune@, PTAL. > > > Yes. Or in general ...
3 years, 11 months ago (2017-01-26 08:55:07 UTC) #19
rune
lgtm, but Morten promised to take a look with his layout glasses on.
3 years, 11 months ago (2017-01-26 09:14:06 UTC) #21
mstensho (USE GERRIT)
lgtm
3 years, 11 months ago (2017-01-26 09:37:05 UTC) #22
kojii
Thank you all for prompt reviews!
3 years, 11 months ago (2017-01-26 09:49:21 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2650583003/60001
3 years, 11 months ago (2017-01-26 09:49:41 UTC) #25
commit-bot: I haz the power
3 years, 11 months ago (2017-01-26 09:54:53 UTC) #28
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as
https://chromium.googlesource.com/chromium/src/+/880301a7e70e48fd5eb46dc441f3...

Powered by Google App Engine
This is Rietveld 408576698