[webkit-reviews] review granted: [Bug 79775] [GTK] Inconsistent state of WebKitWebView when replacing content in WebKit2 : [Attachment 129225] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 28 10:03:07 PST 2012


Martin Robinson <mrobinson at webkit.org> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 79775: [GTK] Inconsistent state of WebKitWebView when replacing content in
WebKit2
https://bugs.webkit.org/show_bug.cgi?id=79775

Attachment 129225: Patch
https://bugs.webkit.org/attachment.cgi?id=129225&action=review

------- Additional Comments from Martin Robinson <mrobinson at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=129225&action=review


Looks good. Please consider the minor cleanups below.

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:82
> +    NoReplaceContent,

NotReplacingContent?

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:703
> -    if (webView->priv->replacingContent) {
> +    if (webView->priv->replaceContentStatus == ReplacingContent) {
>	   if (loadEvent == WEBKIT_LOAD_FINISHED)
> -	       webView->priv->replacingContent = false;
> +	       webView->priv->replaceContentStatus = DidReplaceContent;
>	   return;
>      }
>  
> +    if (loadEvent == WEBKIT_LOAD_STARTED) {
> +	   if (webView->priv->replaceContentStatus == WillReplaceContent) {
> +	       webView->priv->replaceContentStatus = ReplacingContent;
> +	       return;
> +	   }
> +	   webView->priv->replaceContentStatus = NoReplaceContent;
> +    }

Mind moving this to a helper called updateReplaceContentStatus?

> Source/WebKit2/UIProcess/API/gtk/tests/WebViewTest.cpp:148
> +void WebViewTest::waitUntilTitleChanged(const char* expectedTitle)

Probably better to call this waitUntilTitleChangedTo.


More information about the webkit-reviews mailing list