Bug 106268

Summary: HTMLTreeBuilder shouldn't keep a Document pointer
Product: WebKit Reporter: Adam Barth <abarth>
Component: New BugsAssignee: Adam Barth <abarth>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 106127    
Attachments:
Description Flags
Patch
none
Patch for landing none

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.