Bug 80169

Summary: Create a method in Element to compare attributes with other Element
Product: WebKit Reporter: Caio Marcelo de Oliveira Filho <cmarcelo>
Component: New BugsAssignee: Caio Marcelo de Oliveira Filho <cmarcelo>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, kling, koivisto, pnormand, rniwa
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 75069    
Attachments:
Description Flags
Patch rniwa: review+

Description Caio Marcelo de Oliveira Filho 2012-03-02 10:12:10 PST
Create a method in Element to compare attributes with other Element
Comment 1 Caio Marcelo de Oliveira Filho 2012-03-02 10:18:19 PST
Created attachment 129918 [details]
Patch
Comment 2 Ryosuke Niwa 2012-03-02 10:26:19 PST
Comment on attachment 129918 [details]
Patch

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

> Source/WebCore/dom/Node.cpp:1775
> +    if (isElementNode() && !toElement(this)->hasEquivalentAttributes(toElement(other)))

Maybe we should an inline helper that takes Node* and returns false when its' not an element? That'll avoid having to cast nodes.

> Source/WebCore/editing/htmlediting.cpp:1161
> +    if (!firstElement->tagQName().matches(secondElement->tagQName()))

Can't we do firstElement->hasTagQName(secondElement->tagQName()) ? Maybe this is slower?
Comment 3 Ryosuke Niwa 2012-03-02 10:26:40 PST
This is a very nice refactoring!
Comment 4 Caio Marcelo de Oliveira Filho 2012-03-02 11:02:23 PST
Committed r109585: <http://trac.webkit.org/changeset/109585>
Comment 5 Philippe Normand 2012-03-02 11:33:02 PST
(In reply to comment #4)
> Committed r109585: <http://trac.webkit.org/changeset/109585>

Broke the GTK build :(
Comment 6 Philippe Normand 2012-03-02 11:37:48 PST
(In reply to comment #5)
> (In reply to comment #4)
> > Committed r109585: <http://trac.webkit.org/changeset/109585>
> 
> Broke the GTK build :(

Sorry it seems to be a false alarm, the 64-bit Release bot looks hosed, let's try a full clean build.