[webkit-reviews] review granted: [Bug 194131] [WPE][GTK] Load events may occur in unexpected order when JS redirects page before subresource load finishes : [Attachment 364239] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 11 09:38:04 PDT 2019


Michael Catanzaro <mcatanzaro at igalia.com> has granted Carlos Garcia Campos
<cgarcia at igalia.com>'s request for review:
Bug 194131: [WPE][GTK] Load events may occur in unexpected order when JS
redirects page before subresource load finishes
https://bugs.webkit.org/show_bug.cgi?id=194131

Attachment 364239: Patch

https://bugs.webkit.org/attachment.cgi?id=364239&action=review




--- Comment #37 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 364239
  --> https://bugs.webkit.org/attachment.cgi?id=364239
Patch

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

> Source/WebKit/ChangeLog:17
> +	   (API::ViewClient::willStartLoad): Add willStartLoad() to
API::ViowClient

ViewClient

> Source/WebKit/UIProcess/PageLoadState.h:126
>      bool isLoading() const;
> +    bool isProvisional() const { return m_committedState.state ==
State::Provisional; }
> +    bool isCommitted() const { return m_committedState.state ==
State::Committed; }
> +    bool isFinished() const { return m_committedState.state ==
State::Finished; }

I think we should do this, because easy problems are unnecessarily hard if we
don't expose the load state of PageLoadState. (You can see my previous two
attempts at this fix.) It needs owner approval, though. This is the only part
of the patch that requires an owner. The rest is r=me.

> Tools/TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:247
> +    const char* uri = webkit_web_view_get_uri(webView);
> +    if (g_str_has_suffix(uri, "/normal"))
> +	   test->m_activeURI = uri;

Smart.


More information about the webkit-reviews mailing list