Bug 70047 - [Qt][WK2] WebViews are emitting loadFailed for "private" error codes
Summary: [Qt][WK2] WebViews are emitting loadFailed for "private" error codes
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jesus Sanchez-Palencia
Keywords: Qt, QtTriaged
Depends on:
Reported: 2011-10-13 12:46 PDT by Jesus Sanchez-Palencia
Modified: 2011-10-13 14:15 PDT (History)
3 users (show)

See Also:

Patch (1.85 KB, patch)
2011-10-13 12:57 PDT, Jesus Sanchez-Palencia
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesus Sanchez-Palencia 2011-10-13 12:46:43 PDT
Both QDesktopWebView and QTouchWebView are emitting loadFailed for all sort of errors. This includes errors like the ones defined in Source/WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp, which are private since their domain is "WebKit" and whose error codes are not exposed anywhere in our API.

We should filter these by not emitting this signal for private errors since there is no way for the users of our API to check them (no enums...). They could be exposed but I believe it would just pollute our API as this sort of errors are more related to WebKit internals than to user's actions or decisions.
Comment 1 Jesus Sanchez-Palencia 2011-10-13 12:57:12 PDT
Created attachment 110890 [details]
Comment 2 Kenneth Rohde Christiansen 2011-10-13 12:59:53 PDT
Comment on attachment 110890 [details]

Possible to test this?
Comment 3 Jesus Sanchez-Palencia 2011-10-13 13:20:43 PDT
(In reply to comment #2)
> (From update of attachment 110890 [details])
> Possible to test this?

I don't think so =/.
Maybe only if the test rely on private stuff... but I'm not sure it makes sense. The good thing about this patch is that if anyone ever thinks these errors should emit loadFailed it's easy to remove those lines. Plus, other ports do the same on their FrameLoaderClient implementation in WebKit1 and we ourselves used to do the same in FrameLoaderClientQt::shouldFallBack. So I guess we are safe here...

Can I land it, Kenneth?
Comment 4 Kenneth Rohde Christiansen 2011-10-13 14:04:22 PDT
Comment 5 Jesus Sanchez-Palencia 2011-10-13 14:15:33 PDT
Comment on attachment 110890 [details]

Clearing flags on attachment: 110890

Committed r97398: <http://trac.webkit.org/changeset/97398>
Comment 6 Jesus Sanchez-Palencia 2011-10-13 14:15:41 PDT
All reviewed patches have been landed.  Closing bug.