In WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp the GTK+ API is used to create errors.
Created attachment 107302 [details] Patch Move common code to webcore so that it can be shared between wk1 and wk2.
Comment on attachment 107302 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=107302&action=review Looks good, but we need to guard the duplicated enum. > Source/WebCore/platform/gtk/ErrorsGtk.h:57 > +enum NetworkError { > + NetworkErrorFailed = 399, > + NetworkErrorTransport = 300, > + NetworkErrorUnknownProtocol = 301, > + NetworkErrorCancelled = 302, > + NetworkErrorFileDoesNotExist = 303 > +}; > + > +// Sync'd with Mac's WebKit Errors. > +enum PolicyError { > + PolicyErrorFailed = 199, > + PolicyErrorCannotShowMimeType = 100, > + PolicyErrorCannotShowURL = 101, > + PolicyErrorFrameLoadInterruptedByPolicyChange = 102, > + PolicyErrorCannotUseRestrictedPort = 103 > +}; > + > +enum PluginError { > + PluginErrorFailed = 299, > + PluginErrorCannotFindPlugin = 200, > + PluginErrorCannotLoadPlugin = 201, > + PluginErrorJavaUnavailable = 202, > + PluginErrorConnectionCancelled = 203, > + PluginErrorWillHandleLoad = 204 > +}; Since you are duplicating this enum from WebKit you shoud use the approach in Source/WebKit/WebCoreSupport/AssertMatchingEnums.cpp to sure they stay in sync. Because some of these lines are so long, it's my opinion that it helps readability to not line them up. Please consider unaligning them.
Created attachment 107833 [details] Updated patch
Attachment 107833 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit/gtk/WebCoreSupport/AssertMatchingEnums.cpp:33: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 12 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 107835 [details] Fix coding style issues
Comment on attachment 107835 [details] Fix coding style issues Nice cleanup!
Committed r95521: <http://trac.webkit.org/changeset/95521>