Bug 79777 - [GTK] Ignore resources while replacing content in WebKit2 GTK+ API
Summary: [GTK] Ignore resources while replacing content in WebKit2 GTK+ API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 79667 79775
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-28 04:15 PST by Carlos Garcia Campos
Modified: 2012-04-19 23:45 PDT (History)
2 users (show)

See Also:


Attachments
Patch (10.76 KB, patch)
2012-02-28 04:21 PST, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
Updated patch (10.81 KB, patch)
2012-03-15 12:41 PDT, Carlos Garcia Campos
pnormand: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2012-02-28 04:15:28 PST
The same way we ignore load events and progress, resources should be ignored too.
Comment 1 Carlos Garcia Campos 2012-02-28 04:21:01 PST
Created attachment 129229 [details]
Patch
Comment 2 Philippe Normand 2012-03-15 01:57:57 PDT
Comment on attachment 129229 [details]
Patch

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

> Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:891
> +    if (priv->replaceContentStatus == ReplacingContent || priv->replaceContentStatus == DidReplaceContent)
> +        return 0;

I see this code used in 4 places. Can it be moved to a function?
Comment 3 Carlos Garcia Campos 2012-03-15 02:04:09 PDT
(In reply to comment #2)
> (From update of attachment 129229 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=129229&action=review
> 
> > Source/WebKit2/UIProcess/API/gtk/WebKitWebView.cpp:891
> > +    if (priv->replaceContentStatus == ReplacingContent || priv->replaceContentStatus == DidReplaceContent)
> > +        return 0;
> 
> I see this code used in 4 places. Can it be moved to a function?

Sure!
Comment 4 Carlos Garcia Campos 2012-03-15 12:41:22 PDT
Created attachment 132104 [details]
Updated patch

Rebased to apply on current git master and added helper function as phil suggested.
Comment 5 Carlos Garcia Campos 2012-03-27 05:45:34 PDT
Patches blocking this bug landed already.
Comment 6 Philippe Normand 2012-04-19 16:02:56 PDT
Comment on attachment 132104 [details]
Updated patch

Alright, looks good to me! Sorry for the review delay :(
Comment 7 Carlos Garcia Campos 2012-04-19 23:42:25 PDT
(In reply to comment #6)
> (From update of attachment 132104 [details])
> Alright, looks good to me! Sorry for the review delay :(

No problem, thanks for reviewing :-)
Comment 8 Carlos Garcia Campos 2012-04-19 23:45:07 PDT
Committed r114719: <http://trac.webkit.org/changeset/114719>