Title: [96619] trunk/Source/WebKit2
- Revision
- 96619
- Author
- [email protected]
- Date
- 2011-10-04 11:15:42 -0700 (Tue, 04 Oct 2011)
Log Message
WKPreferences should allow control of application chrome mode
https://bugs.webkit.org/show_bug.cgi?id=69344
Reviewed by Dan Bernstein.
* Shared/WebPreferencesStore.h: Add application chrome mode setting to FOR_EACH_WEBKIT_BOOL_PREFERENCE().
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetApplicationChromeModeEnabled): Added.
(WKPreferencesGetApplicationChromeModeEnabled): Added.
* UIProcess/API/C/WKPreferencesPrivate.h: Added WKPreferencesSetApplicationChromeModeEnabled() and WKPreferencesGetApplicationChromeModeEnabled().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Set application chrome mode setting.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (96618 => 96619)
--- trunk/Source/WebKit2/ChangeLog 2011-10-04 18:15:30 UTC (rev 96618)
+++ trunk/Source/WebKit2/ChangeLog 2011-10-04 18:15:42 UTC (rev 96619)
@@ -1,3 +1,21 @@
+2011-10-04 Jeff Miller <[email protected]>
+
+ WKPreferences should allow control of application chrome mode
+ https://bugs.webkit.org/show_bug.cgi?id=69344
+
+ Reviewed by Dan Bernstein.
+
+ * Shared/WebPreferencesStore.h: Add application chrome mode setting to FOR_EACH_WEBKIT_BOOL_PREFERENCE().
+
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetApplicationChromeModeEnabled): Added.
+ (WKPreferencesGetApplicationChromeModeEnabled): Added.
+
+ * UIProcess/API/C/WKPreferencesPrivate.h: Added WKPreferencesSetApplicationChromeModeEnabled() and WKPreferencesGetApplicationChromeModeEnabled().
+
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences): Set application chrome mode setting.
+
2011-10-04 Carlos Garcia Campos <[email protected]>
[GTK] Implement default error pages in WebKit2 GTK+ API
Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (96618 => 96619)
--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2011-10-04 18:15:30 UTC (rev 96618)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2011-10-04 18:15:42 UTC (rev 96619)
@@ -94,6 +94,7 @@
macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false) \
macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false) \
macro(WebAudioEnabled, webAudioEnabled, Bool, bool, false) \
+ macro(ApplicationChromeModeEnabled, applicationChromeMode, Bool, bool, false) \
\
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (96618 => 96619)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2011-10-04 18:15:30 UTC (rev 96618)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2011-10-04 18:15:42 UTC (rev 96619)
@@ -631,3 +631,13 @@
{
return toImpl(preferencesRef)->webAudioEnabled();
}
+
+void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setApplicationChromeModeEnabled(enabled);
+}
+
+bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->applicationChromeMode();
+}
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (96618 => 96619)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2011-10-04 18:15:30 UTC (rev 96618)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2011-10-04 18:15:42 UTC (rev 96619)
@@ -147,6 +147,10 @@
// Defaults to false.
WK_EXPORT void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef);
+
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetApplicationChromeModeEnabled(WKPreferencesRef preferencesRef);
#ifdef __cplusplus
}
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (96618 => 96619)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2011-10-04 18:15:30 UTC (rev 96618)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2011-10-04 18:15:42 UTC (rev 96619)
@@ -1682,6 +1682,8 @@
settings->setWebAudioEnabled(store.getBoolValueForKey(WebPreferencesKey::webAudioEnabledKey()));
#endif
+ settings->setApplicationChromeMode(store.getBoolValueForKey(WebPreferencesKey::applicationChromeModeKey()));
+
platformPreferencesDidChange(store);
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes