Right after landing r138593 I've noticed a side effect. Something as easy as: webkit_web_view_new () webkit_web_view_set_view_mode (SOURCE); webkit_web_view_load_uri (); doesn't work, and the page is loaded in web mode. the problem is that at that point the main frame proxy hasn't been created yet. Since what we want is actually to change only the main frame view suorce mode, we could rename SetFrameInViewSourceMode to SetMainFrameInViewSourceMode and we don't need a frameID anymore. The code is also more simple.
Created attachment 180972 [details] Patch
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See http://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Attachment 180972 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit2/ChangeLog', u'Source/WebKit..." exit_code: 1 Source/WebKit2/WebProcess/WebPage/WebPage.h:794: The parameter name "inViewSourceMode" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebKit2/UIProcess/WebPageProxy.h:775: The parameter name "inViewSourceMode" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 180973 [details] Fix style issues
Committed r138622: <http://trac.webkit.org/changeset/138622>