Bug 106268 - HTMLTreeBuilder shouldn't keep a Document pointer
Summary: HTMLTreeBuilder shouldn't keep a Document pointer
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Barth
URL:
Keywords:
Depends on:
Blocks: 106127
  Show dependency treegraph
 
Reported: 2013-01-07 15:39 PST by Adam Barth
Modified: 2013-01-08 00:24 PST (History)
2 users (show)

See Also:


Attachments
Patch (8.30 KB, patch)
2013-01-07 15:42 PST, Adam Barth
no flags Details | Formatted Diff | Diff
Patch for landing (8.43 KB, patch)
2013-01-07 23:26 PST, Adam Barth
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Barth 2013-01-07 15:39:48 PST
HTMLTreeBuilder shouldn't keep a Document pointer
Comment 1 Adam Barth 2013-01-07 15:42:32 PST
Created attachment 181579 [details]
Patch
Comment 2 Eric Seidel (no email) 2013-01-07 15:53:11 PST
Comment on attachment 181579 [details]
Patch

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

> Source/WebCore/html/parser/HTMLTreeBuilder.cpp:326
> +    m_isAttached = false;

This appears to be a debug-only flag?

> Source/WebCore/html/parser/HTMLTreeBuilder.cpp:826
> -        if (!m_document->inQuirksMode() && m_tree.openElements()->inButtonScope(pTag))
> +        if (!m_tree.inQuirksMode() && m_tree.openElements()->inButtonScope(pTag))

I really like this change.
Comment 3 Adam Barth 2013-01-07 16:23:47 PST
(In reply to comment #2)
> (From update of attachment 181579 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=181579&action=review
> 
> > Source/WebCore/html/parser/HTMLTreeBuilder.cpp:326
> > +    m_isAttached = false;
> 
> This appears to be a debug-only flag?

Yes!  It is now.  I'll mark it as such.

> > Source/WebCore/html/parser/HTMLTreeBuilder.cpp:826
> > -        if (!m_document->inQuirksMode() && m_tree.openElements()->inButtonScope(pTag))
> > +        if (!m_tree.inQuirksMode() && m_tree.openElements()->inButtonScope(pTag))
> 
> I really like this change.

Thanks!
Comment 4 Adam Barth 2013-01-07 23:26:38 PST
Created attachment 181654 [details]
Patch for landing
Comment 5 WebKit Review Bot 2013-01-08 00:24:22 PST
Comment on attachment 181654 [details]
Patch for landing

Clearing flags on attachment: 181654

Committed r139042: <http://trac.webkit.org/changeset/139042>
Comment 6 WebKit Review Bot 2013-01-08 00:24:26 PST
All reviewed patches have been landed.  Closing bug.