Bug 105885

Summary: [WK2] Rename SetFrameInViewSourceMode to SetMainFrameInViewSourceMode
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, gustavo, mrobinson, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
Patch
none
Fix style issues mrobinson: review+

Description Carlos Garcia Campos 2012-12-31 06:04:44 PST
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.
Comment 1 Carlos Garcia Campos 2012-12-31 06:08:32 PST
Created attachment 180972 [details]
Patch
Comment 2 WebKit Review Bot 2012-12-31 06:10:46 PST
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
Comment 3 WebKit Review Bot 2012-12-31 06:11:10 PST
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.
Comment 4 Carlos Garcia Campos 2012-12-31 06:15:10 PST
Created attachment 180973 [details]
Fix style issues
Comment 5 Carlos Garcia Campos 2013-01-02 09:43:33 PST
Committed r138622: <http://trac.webkit.org/changeset/138622>