Bug 109408 - Remove AttributeBase now that NEW_XML is gone
Summary: Remove AttributeBase now that NEW_XML is gone
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: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks: 107522
  Show dependency treegraph
 
Reported: 2013-02-11 01:05 PST by Eric Seidel (no email)
Modified: 2013-02-12 17:32 PST (History)
4 users (show)

See Also:


Attachments
Patch (4.06 KB, patch)
2013-02-11 01:07 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2013-02-11 01:05:00 PST
Remove AttributeBase now that NEW_XML is gone
Comment 1 Eric Seidel (no email) 2013-02-11 01:07:36 PST
Created attachment 187523 [details]
Patch
Comment 2 WebKit Review Bot 2013-02-11 08:54:05 PST
Comment on attachment 187523 [details]
Patch

Clearing flags on attachment: 187523

Committed r142480: <http://trac.webkit.org/changeset/142480>
Comment 3 WebKit Review Bot 2013-02-11 08:54:08 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Darin Adler 2013-02-11 08:59:41 PST
Comment on attachment 187523 [details]
Patch

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

> Source/WebCore/xml/parser/MarkupTokenBase.h:67
> +    class Attribute {
> +    public:
> +        class Range {
> +        public:
> +            int m_start;
> +            int m_end;
> +        };
> +
> +        Range m_nameRange;
> +        Range m_valueRange;
> +        WTF::Vector<UChar, 32> m_name;
> +        WTF::Vector<UChar, 32> m_value;
> +    };

The WTF:: prefixes here are not needed.

Also, I notice a WebKit coding style anti-pattern here. In WebKit we use private data members, not public ones. When we want something with private data, we use struct, not class, and we name the data members without "m_" prefixes. So in WebKit coding style this would be:

struct Attribute {
    struct Range {
        int start;
        int end;
    };
    Range nameRange;
    Range valueRange;
    Vector<UChar, 32> name;
    Vector<UChar, 32> value;
};
Comment 5 Eric Seidel (no email) 2013-02-11 09:09:01 PST
Agreed.  Happy to fix the style in a follow-up patch.
Comment 6 Eric Seidel (no email) 2013-02-11 10:57:55 PST
I looked at this this morning.  gonna wait to fix this until we've killed MarkupTokenBase so that we can use String and AtomicString in this file. (which it currently seems to be avoiding).
Comment 7 Eric Seidel (no email) 2013-02-12 17:32:34 PST
(In reply to comment #4)
> (From update of attachment 187523 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=187523&action=review
> The WTF:: prefixes here are not needed.
> 
> Also, I notice a WebKit coding style anti-pattern here. In WebKit we use private data members, not public ones. When we want something with private data, we use struct, not class, and we name the data members without "m_" prefixes. So in WebKit coding style this would be:

Fixed in bug 109638