[Webkit-unassigned] [Bug 49275] Need WebKit2 mechanism for getting the visible page text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 9 13:54:12 PST 2010


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





--- Comment #3 from Darin Adler <darin at apple.com>  2010-11-09 13:54:12 PST ---
(From update of attachment 73408)
View in context: https://bugs.webkit.org/attachment.cgi?id=73408&action=review

> WebKit2/UIProcess/WebPageProxy.cpp:74
> +void invalidateCallbackMap(HashMap<uint64_t, RefPtr<T> >& map)

Could just use T in this template in the places you use RefPtr<T>. Would read nicer and work just as well.

> WebKit2/UIProcess/API/C/WKPage.cpp:333
> +void WKPageGetContentsAsString(WKPageRef pageRef, void *context, WKPageGetContentsAsStringFunction callback)

Should be void* instead of void *.

> WebKit2/WebProcess/WebPage/WebFrame.cpp:248
> +            WebFrame* webFrame = static_cast<WebFrameLoaderClient*>(child->loader()->client())->webFrame();
> +            builder.append(webFrame->contentsAsString());

Not sure this needs a local variable for webFrame.

> WebKit2/WebProcess/WebPage/WebFrame.cpp:250
> +            if (child->tree()->nextSibling())
> +                builder.append(' ');

I would suggest:

    if (!builder.isEmpty())
        builder.append(' ');

at the start of the loop instead of this code at the end of the loop.

> WebKit2/WebProcess/WebPage/WebFrame.cpp:254
> +        
> +        // FIXME: It may make sense to use toStringPreserveCapacity() here.
> +        return builder.toString();

The blank line here makes the paragraphing a little strange.

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