[Webkit-unassigned] [Bug 40484] Add beforeScript (or equivalent) event to fire on inline scripts and inline stylesheets

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 26 11:46:12 PDT 2010


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


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #59805|review?                     |review+
               Flag|                            |




--- Comment #7 from Darin Adler <darin at apple.com>  2010-06-26 11:46:11 PST ---
(From update of attachment 59805)
>      BeforeLoadEvent \
> +	BeforeProcessEvent \
>      Blob \

There's a tab here, but the other lines use spaces.

> +const String& BeforeProcessEvent::text() const
> +{
> +    // FIXME - Return innerText for <style> elements and inline <script> elements, or the resource text for remote <script> elements
> +    static String* placeholder = new String;
> +    return *placeholder;
> +}

Can this really return const String& in all cases? Never needs to be a new string?

> +        return adoptRef(new BeforeProcessEvent());

No need for the parentheses here after the class name.

> +    void initBeforeProcessEvent(const AtomicString& type, bool canBubble, bool cancelable)
> +    {
> +        if (dispatched())
> +            return;
> +        
> +        initEvent(type, canBubble, cancelable);
> +    }

Why the dispatched() check? Doesn't initEvent already check that?

> +private:
> +    BeforeProcessEvent()
> +        : Event(eventNames().beforeprocessEvent, false, true)
> +    {}

Braces should be on separate lines.

> +        void initBeforeProcessEvent(in DOMString type,
> +                                 in boolean canBubble, 
> +                                 in boolean cancelable);

You should just put this all on one line. This indenting style isn't good, even if you copied it from another IDL file.

Otherwise looks OK. Seems fine to land.

-- 
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