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

Issue 1977083002: Move line/continuation specific parts of willBeDestroyed() into LayoutBlockFlow. (Closed)

Created:
4 years, 7 months ago by mstensho (USE GERRIT)
Modified:
4 years, 7 months ago
Reviewers:
eae, szager1, wkorman
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move line/continuation specific parts of willBeDestroyed() into LayoutBlockFlow. Also moved beingDestroyed() down to LayoutBlockFlow, since it was no longer called on other types. Note that dirtyLinesFromChangedChild() is now called regardless of the object having line boxes or not at the time of destruction. This should be safer and more correct. If we're an inline-block, for instance, we definitely want to notify our parent that we're going away, since that will affect the line box tree in the parent. I assume that the reason why this hasn't been a problem (use-after-free crashes, typically), is that the condition that previously could block this from happening is never true. Looks like line boxes are always deleted before we reach willBeDestroyed(). Added a TODO to investigate further. We hopefully don't need that code. BUG=302024 Committed: https://crrev.com/2266cecd4b7b660f4d4a494c6e61eaa8a2f8dc51 Cr-Commit-Position: refs/heads/master@{#393939}

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -44 lines) Patch
M third_party/WebKit/Source/core/layout/LayoutBlock.h View 1 chunk +0 lines, -2 lines 2 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 chunk +2 lines, -40 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.h View 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp View 2 chunks +48 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
mstensho (USE GERRIT)
4 years, 7 months ago (2016-05-15 21:10:51 UTC) #2
wkorman
lgtm
4 years, 7 months ago (2016-05-15 21:16:59 UTC) #3
eae
Very nice! LGTM
4 years, 7 months ago (2016-05-16 16:51:08 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1977083002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1977083002/1
4 years, 7 months ago (2016-05-16 16:51:53 UTC) #6
szager1
https://codereview.chromium.org/1977083002/diff/1/third_party/WebKit/Source/core/layout/LayoutBlock.h File third_party/WebKit/Source/core/layout/LayoutBlock.h (left): https://codereview.chromium.org/1977083002/diff/1/third_party/WebKit/Source/core/layout/LayoutBlock.h#oldcode127 third_party/WebKit/Source/core/layout/LayoutBlock.h:127: bool beingDestroyed() const { return m_beingDestroyed; } Sorry to ...
4 years, 7 months ago (2016-05-16 16:56:40 UTC) #7
mstensho (USE GERRIT)
https://codereview.chromium.org/1977083002/diff/1/third_party/WebKit/Source/core/layout/LayoutBlock.h File third_party/WebKit/Source/core/layout/LayoutBlock.h (left): https://codereview.chromium.org/1977083002/diff/1/third_party/WebKit/Source/core/layout/LayoutBlock.h#oldcode127 third_party/WebKit/Source/core/layout/LayoutBlock.h:127: bool beingDestroyed() const { return m_beingDestroyed; } On 2016/05/16 ...
4 years, 7 months ago (2016-05-16 17:57:27 UTC) #8
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 7 months ago (2016-05-16 21:35:41 UTC) #9
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/2266cecd4b7b660f4d4a494c6e61eaa8a2f8dc51 Cr-Commit-Position: refs/heads/master@{#393939}
4 years, 7 months ago (2016-05-16 21:37:10 UTC) #11
mstensho (USE GERRIT)
4 years, 7 months ago (2016-05-17 21:55:17 UTC) #12
Message was sent while issue was closed.
On 2016/05/16 17:57:27, mstensho wrote:
>
https://codereview.chromium.org/1977083002/diff/1/third_party/WebKit/Source/c...
> File third_party/WebKit/Source/core/layout/LayoutBlock.h (left):
> 
>
https://codereview.chromium.org/1977083002/diff/1/third_party/WebKit/Source/c...
> third_party/WebKit/Source/core/layout/LayoutBlock.h:127: bool beingDestroyed()
> const { return m_beingDestroyed; }
> On 2016/05/16 16:56:40, szager1 wrote:
> > Sorry to jump in here, but I don't like moving this method to
LayoutBlockFlow
> > while the bitfield is still defined on LayoutBlock.  Can we leave it here?
> 
> I moved it because the flag is now only set by LayoutBlockFlow, so it would
> always be false for other types of LayoutBlock - which kind of seemed
misleading
> and unuseful to me.
> 
> Also note that there's nothing unusual about having bitfields in LayoutBlock
> that are only used in subclasses, though. Establishing a bit field typically
> requires the size of an int, so keeping them all in LayoutBlock makes sense,
> when there are so few of them.
> 
> See m_hasMarkupTruncation, m_isSelfCollapsing,
> m_descendantsWithFloatsMarkedForLayout...

Whoops, this landed. szager: please let me know if you want this part reverted.

Powered by Google App Engine
This is Rietveld 408576698