Bug 64138 - Clean up RenderWidget::destroy() to share more code
Summary: Clean up RenderWidget::destroy() to share more code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-07 17:42 PDT by Simon Fraser (smfr)
Modified: 2011-07-08 17:43 PDT (History)
5 users (show)

See Also:


Attachments
Patch (38.32 KB, patch)
2011-07-08 16:55 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (38.28 KB, patch)
2011-07-08 17:24 PDT, Simon Fraser (smfr)
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2011-07-07 17:42:13 PDT
RenderWidget::destroy() has comments about not sharing more code with other classes. This needs cleaning up. It's a PITA to add code here.
Comment 1 Simon Fraser (smfr) 2011-07-08 16:55:37 PDT
Created attachment 100185 [details]
Patch
Comment 2 James Robinson 2011-07-08 17:07:06 PDT
Comment on attachment 100185 [details]
Patch

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

Looks great, just one question.

> Source/WebCore/rendering/RenderWidget.cpp:-142
> -    if (hasOverrideSize())
> -        setOverrideSize(-1);

this is different from what RenderBox::destroy() did, it did:
gOverrideSizeMap->remove(this)

are these equivalent?
Comment 3 Simon Fraser (smfr) 2011-07-08 17:20:30 PDT
Almost:

void RenderBox::setOverrideSize(int s)
{
    if (s == -1) {
        if (hasOverrideSize()) {
            setHasOverrideSize(false);
            gOverrideSizeMap->remove(this);
        }

I'll change RenderBox::willBeDestroyed() to call setOverrideSize(-1);
Comment 4 Simon Fraser (smfr) 2011-07-08 17:24:39 PDT
Created attachment 100189 [details]
Patch
Comment 5 Simon Fraser (smfr) 2011-07-08 17:25:27 PDT
Comment on attachment 100189 [details]
Patch

Transferring r+ from jamesr. New patch for the bots to chew on.
Comment 6 Simon Fraser (smfr) 2011-07-08 17:43:31 PDT
http://trac.webkit.org/changeset/90675