WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
94271
Introduce a will-be-removed-from-tree notification in RenderObject
https://bugs.webkit.org/show_bug.cgi?id=94271
Summary
Introduce a will-be-removed-from-tree notification in RenderObject
Julien Chaffraix
Reported
2012-08-16 17:09:48 PDT
This is a follow-up of
bug 93874
that added the equivalent notification for insertion. This notification would help us properly invalidate on tree removal instead of relying on willBeDestroyed for most of the invalidations. willBeDestroyed will usually follow will-be-removed-from-tree but not always (there are cases where we move the renderer around, especially during splitting). This difference is likely the cause of some subtle bugs in rendering as we don't invalidate as expected in those cases, unless we implement some ad-hoc invalidation (f.e. markBoxForRelayoutAfterSplit in RenderBox).
Attachments
Proposed implementation 1, welcome any comment on the naming.
(9.82 KB, patch)
2012-08-16 17:28 PDT
,
Julien Chaffraix
no flags
Details
Formatted Diff
Diff
Patch for landing
(11.69 KB, patch)
2012-08-17 13:43 PDT
,
Julien Chaffraix
no flags
Details
Formatted Diff
Diff
Patch for landing
(11.71 KB, patch)
2012-08-20 10:28 PDT
,
Julien Chaffraix
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Julien Chaffraix
Comment 1
2012-08-16 17:28:05 PDT
Created
attachment 158956
[details]
Proposed implementation 1, welcome any comment on the naming.
Elliott Sprehn
Comment 2
2012-08-16 17:58:10 PDT
Comment on
attachment 158956
[details]
Proposed implementation 1, welcome any comment on the naming. View in context:
https://bugs.webkit.org/attachment.cgi?id=158956&action=review
> Source/WebCore/rendering/RenderObjectChildList.cpp:88 > + if (!owner->documentBeingDestroyed() && fullRemove)
Rename to notifyRenderer?
Abhishek Arya
Comment 3
2012-08-16 20:57:33 PDT
Comment on
attachment 158956
[details]
Proposed implementation 1, welcome any comment on the naming. View in context:
https://bugs.webkit.org/attachment.cgi?id=158956&action=review
We should make that notifyRenderer change as Elliot said in last comment. This matches
http://trac.webkit.org/changeset/125737
.
> Source/WebCore/rendering/RenderObject.cpp:2416 > + if (isBox())
Can this if be moved to RenderBox::willBeRemovedFromTree ? I suspect the ordering of the regions calls here will cause problem. Lets cc
mihnea@adobe.com
to confirm.
Mihnea Ovidenie
Comment 4
2012-08-17 00:41:00 PDT
(In reply to
comment #3
)
> (From update of
attachment 158956
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=158956&action=review
> > We should make that notifyRenderer change as Elliot said in last comment. This matches
http://trac.webkit.org/changeset/125737
. > > > Source/WebCore/rendering/RenderObject.cpp:2416 > > + if (isBox()) > > Can this if be moved to RenderBox::willBeRemovedFromTree ? I suspect the ordering of the regions calls here will cause problem. Lets cc
mihnea@adobe.com
to confirm.
The calls to clear the render box region info and render object region style can be performed in any order, as they are removing information for the same render object from 2 different data structures, which serve different purposes.
Abhishek Arya
Comment 5
2012-08-17 13:40:10 PDT
Comment on
attachment 158956
[details]
Proposed implementation 1, welcome any comment on the naming. View in context:
https://bugs.webkit.org/attachment.cgi?id=158956&action=review
>>> Source/WebCore/rendering/RenderObject.cpp:2416 >>> + if (isBox()) >> >> Can this if be moved to RenderBox::willBeRemovedFromTree ? I suspect the ordering of the regions calls here will cause problem. Lets cc
mihnea@adobe.com
to confirm. > > The calls to clear the render box region info and render object region style can be performed in any order, as they are removing information for the same render object from 2 different data structures, which serve different purposes.
Actually we shouldn't move to RenderBox since inRenderFlowThread() will be false most of the time. So, we should keep it the same way as it is.
Julien Chaffraix
Comment 6
2012-08-17 13:42:09 PDT
Comment on
attachment 158956
[details]
Proposed implementation 1, welcome any comment on the naming. View in context:
https://bugs.webkit.org/attachment.cgi?id=158956&action=review
>> Source/WebCore/rendering/RenderObjectChildList.cpp:88 >> + if (!owner->documentBeingDestroyed() && fullRemove) > > Rename to notifyRenderer?
Changed in the patch for landing. Thanks for the spotting that Elliot & Abhishek.
Julien Chaffraix
Comment 7
2012-08-17 13:43:00 PDT
Created
attachment 159193
[details]
Patch for landing
WebKit Review Bot
Comment 8
2012-08-17 14:59:24 PDT
Comment on
attachment 159193
[details]
Patch for landing Clearing flags on attachment: 159193 Committed
r125940
: <
http://trac.webkit.org/changeset/125940
>
WebKit Review Bot
Comment 9
2012-08-17 14:59:29 PDT
All reviewed patches have been landed. Closing bug.
WebKit Review Bot
Comment 10
2012-08-17 17:05:49 PDT
Re-opened since this is blocked by 94398
Julien Chaffraix
Comment 11
2012-08-17 18:51:33 PDT
The ASSERT in RenderObject::willBeRemoved was hit several times and the build bots caught that. It looks like we have the same issue as RenderObject::insertedIntoTree where the ASSERT would be nice but it would require fixing the rest of the code.
Julien Chaffraix
Comment 12
2012-08-20 10:00:14 PDT
(In reply to
comment #11
)
> The ASSERT in RenderObject::willBeRemoved was hit several times and the build bots caught that. It looks like we have the same issue as RenderObject::insertedIntoTree where the ASSERT would be nice but it would require fixing the rest of the code.
Per discussion with Abhishek, I will just land a new patch without the ASSERT as it wasn't required as part of this change (it would have been nice to have though).
Julien Chaffraix
Comment 13
2012-08-20 10:28:13 PDT
Created
attachment 159467
[details]
Patch for landing
WebKit Review Bot
Comment 14
2012-08-20 11:52:40 PDT
Comment on
attachment 159467
[details]
Patch for landing Clearing flags on attachment: 159467 Committed
r126048
: <
http://trac.webkit.org/changeset/126048
>
WebKit Review Bot
Comment 15
2012-08-20 11:52:45 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug