Bug 183187 - Remove RenderElement::s_affectsParentBlock
Summary: Remove RenderElement::s_affectsParentBlock
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-02-27 15:24 PST by zalan
Modified: 2018-02-28 08:31 PST (History)
7 users (show)

See Also:


Attachments
Patch (3.71 KB, patch)
2018-02-27 16:19 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (3.84 KB, patch)
2018-02-27 19:22 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (4.06 KB, patch)
2018-02-28 07:56 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2018-02-27 15:24:46 PST
This is a hack to track state change between styleWillChange and styleDidChange.
Comment 1 Radar WebKit Bug Importer 2018-02-27 16:14:09 PST
<rdar://problem/37961079>
Comment 2 zalan 2018-02-27 16:19:46 PST
Created attachment 334712 [details]
Patch
Comment 3 zalan 2018-02-27 19:22:10 PST
Created attachment 334724 [details]
Patch
Comment 4 Frédéric Wang (:fredw) 2018-02-28 07:15:55 PST
Comment on attachment 334724 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=334724&action=review

> Source/WebCore/rendering/RenderElement.cpp:-97
> -bool RenderElement::s_affectsParentBlock = false;

Any reason why you do the removal of s_noLongerAffectsParentBlock in the separate bug 183196? Or it's just to be careful and do smaller changes?

> Source/WebCore/rendering/RenderElement.cpp:-773
> -        s_affectsParentBlock = false;

Normally you should remove braces per https://webkit.org/code-style-guidelines/#braces-one-line although I understand this else will eventually go away.

> Source/WebCore/rendering/RenderElement.cpp:812
> +        && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline())) {

I wonder whether keeping a local affectsParentBlock variable would help making the meaning of this big conditional more explicit or whether the comment is enough.
Comment 5 Antti Koivisto 2018-02-28 07:19:23 PST
r=me
Comment 6 zalan 2018-02-28 07:30:35 PST
(In reply to Frédéric Wang (:fredw) from comment #4)
> Comment on attachment 334724 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=334724&action=review
> 
> > Source/WebCore/rendering/RenderElement.cpp:-97
> > -bool RenderElement::s_affectsParentBlock = false;
> 
> Any reason why you do the removal of s_noLongerAffectsParentBlock in the
> separate bug 183196? Or it's just to be careful and do smaller changes?
> 
just being careful (moving the s_noLongerAffectsParentBlock needs a bit more work since it has a bit of a dependency)

> > Source/WebCore/rendering/RenderElement.cpp:-773
> > -        s_affectsParentBlock = false;
> 
> Normally you should remove braces per
> https://webkit.org/code-style-guidelines/#braces-one-line although I
> understand this else will eventually go away.
Yeah, I'll remove the braces anyway.

> 
> > Source/WebCore/rendering/RenderElement.cpp:812
> > +        && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline())) {
> 
> I wonder whether keeping a local affectsParentBlock variable would help
> making the meaning of this big conditional more explicit or whether the
> comment is enough.
I was thinking about that too but for some reason I decided not to. but now I am leaning towards having the variable there.
Comment 7 zalan 2018-02-28 07:53:50 PST
(In reply to zalan from comment #6)
> (In reply to Frédéric Wang (:fredw) from comment #4)
> > Comment on attachment 334724 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=334724&action=review
> > 
> > > Source/WebCore/rendering/RenderElement.cpp:-97
> > > -bool RenderElement::s_affectsParentBlock = false;
> > 
> > Any reason why you do the removal of s_noLongerAffectsParentBlock in the
> > separate bug 183196? Or it's just to be careful and do smaller changes?
> > 
> just being careful (moving the s_noLongerAffectsParentBlock needs a bit more
> work since it has a bit of a dependency)
> 
> > > Source/WebCore/rendering/RenderElement.cpp:-773
> > > -        s_affectsParentBlock = false;
> > 
> > Normally you should remove braces per
> > https://webkit.org/code-style-guidelines/#braces-one-line although I
> > understand this else will eventually go away.
> Yeah, I'll remove the braces anyway.
> 
> > 
> > > Source/WebCore/rendering/RenderElement.cpp:812
> > > +        && parent() && (parent()->isRenderBlockFlow() || parent()->isRenderInline())) {
> > 
> > I wonder whether keeping a local affectsParentBlock variable would help
> > making the meaning of this big conditional more explicit or whether the
> > comment is enough.
> I was thinking about that too but for some reason I decided not to. but now
> I am leaning towards having the variable there.
Though this is all temporary anyway since the point of this exercise is to move the mutation logic to the tree updater.
Comment 8 zalan 2018-02-28 07:56:04 PST
Created attachment 334744 [details]
Patch
Comment 9 WebKit Commit Bot 2018-02-28 08:31:38 PST
Comment on attachment 334744 [details]
Patch

Clearing flags on attachment: 334744

Committed r229091: <https://trac.webkit.org/changeset/229091>
Comment 10 WebKit Commit Bot 2018-02-28 08:31:39 PST
All reviewed patches have been landed.  Closing bug.