[Webkit-unassigned] [Bug 90596] Move element/tag category query functions to a separate file

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 5 07:45:34 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=90596





--- Comment #13 from Kwang Yul Seo <skyul at company100.net>  2012-07-05 07:45:33 PST ---
(In reply to comment #12)
> (From update of attachment 150926 [details])
> I don't see the benefit of this change.  Currently, these functions are defined in the files that use them.  Do we achieve any code sharing with this change?

I wanted to move HTMLTreeBuilder::furthestBlockForFormattingElement(Element*) to HTMLElementStack. (Bug 90607). There is a FIXME comment:

// FIXME: This probably belongs on HTMLElementStack.
HTMLElementStack::ElementRecord* HTMLTreeBuilder::furthestBlockForFormattingElement(Element* formattingElement)

This method internally uses isSpecialNode(Node*).

After HTMLTreeBuilder::furthestBlockForFormattingElement(Element*) is moved to HTMLElementStack, both HTMLTreeBuilder and HTMLElementStack need to access isSpecialNode(Node*). 

So I moved isSpecialNode(Node*) to a separate file. Because isSpecialNode(Node*) depends on many other functions, I had to move them too.

I named the file HTMLParserCategory.h/cpp since these functions happen to be tag category query functions. Then I moved a few related functions too.

So this patch does not achieve much code sharing. The only code sharing it achieves is isSpecialNode(Node*).

If you think it is better to leave HTMLTreeBuilder::furthestBlockForFormattingElement(Element*) where it is, I'm okay with r-.

Thanks for you review.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list