Diff
Modified: trunk/Source/WebCore/ChangeLog (95346 => 95347)
--- trunk/Source/WebCore/ChangeLog 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebCore/ChangeLog 2011-09-17 01:12:48 UTC (rev 95347)
@@ -1,3 +1,18 @@
+2011-09-16 Simon Fraser <simon.fra...@apple.com>
+
+ Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
+ https://bugs.webkit.org/show_bug.cgi?id=68134
+
+ Reviewed by Sam Weinig.
+
+ Add a new setting to control whether the mock scrollbar theme is used.
+ This is a global setting, so that it can be set without having to
+ access a specific Settings object.
+
+ * page/Settings.h:
+ (WebCore::Settings::setMockScrollbarsEnabled):
+ (WebCore::Settings::mockScrollbarsEnabled):
+
2011-09-16 Ben Wells <benwe...@chromium.org>
Large canvas fills should not crash or create unnecessarily large image buffers
Modified: trunk/Source/WebCore/WebCore.exp.in (95346 => 95347)
--- trunk/Source/WebCore/WebCore.exp.in 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebCore/WebCore.exp.in 2011-09-17 01:12:48 UTC (rev 95347)
@@ -904,6 +904,7 @@
__ZN7WebCore8Settings23setUsesEncodingDetectorEb
__ZN7WebCore8Settings24setApplicationChromeModeEb
__ZN7WebCore8Settings24setDNSPrefetchingEnabledEb
+__ZN7WebCore8Settings24setMockScrollbarsEnabledEb
__ZN7WebCore8Settings24setTextAreasAreResizableEb
__ZN7WebCore8Settings25setDeveloperExtrasEnabledEb
__ZN7WebCore8Settings25setFrameFlatteningEnabledEb
Modified: trunk/Source/WebCore/page/Settings.cpp (95346 => 95347)
--- trunk/Source/WebCore/page/Settings.cpp 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebCore/page/Settings.cpp 2011-09-17 01:12:48 UTC (rev 95347)
@@ -79,6 +79,8 @@
bool Settings::gAVFoundationEnabled(false);
#endif
+bool Settings::gMockScrollbarsEnabled = false;
+
#if PLATFORM(WIN) || (OS(WINDOWS) && PLATFORM(WX))
bool Settings::gShouldUseHighResolutionTimers = true;
#endif
@@ -815,4 +817,14 @@
#endif
}
+void Settings::setMockScrollbarsEnabled(bool flag)
+{
+ gMockScrollbarsEnabled = flag;
+}
+
+bool Settings::mockScrollbarsEnabled()
+{
+ return gMockScrollbarsEnabled;
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/page/Settings.h (95346 => 95347)
--- trunk/Source/WebCore/page/Settings.h 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebCore/page/Settings.h 2011-09-17 01:12:48 UTC (rev 95347)
@@ -288,12 +288,6 @@
void setMaximumDecodedImageSize(size_t size) { m_maximumDecodedImageSize = size; }
size_t maximumDecodedImageSize() const { return m_maximumDecodedImageSize; }
-#if USE(SAFARI_THEME)
- // Windows debugging pref (global) for switching between the Aqua look and a native windows look.
- static void setShouldPaintNativeControls(bool);
- static bool shouldPaintNativeControls() { return gShouldPaintNativeControls; }
-#endif
-
void setAllowScriptsToCloseWindows(bool);
bool allowScriptsToCloseWindows() const { return m_allowScriptsToCloseWindows; }
@@ -470,6 +464,15 @@
void setPasswordEchoDurationInSeconds(double durationInSeconds) { m_passwordEchoDurationInSeconds = durationInSeconds; }
double passwordEchoDurationInSeconds() const { return m_passwordEchoDurationInSeconds; }
+#if USE(SAFARI_THEME)
+ // Windows debugging pref (global) for switching between the Aqua look and a native windows look.
+ static void setShouldPaintNativeControls(bool);
+ static bool shouldPaintNativeControls() { return gShouldPaintNativeControls; }
+#endif
+
+ static void setMockScrollbarsEnabled(bool flag);
+ static bool mockScrollbarsEnabled();
+
private:
Page* m_page;
@@ -598,6 +601,7 @@
#if USE(AVFOUNDATION)
static bool gAVFoundationEnabled;
#endif
+ static bool gMockScrollbarsEnabled;
double m_zoomAnimatorScale;
Modified: trunk/Source/WebKit/mac/ChangeLog (95346 => 95347)
--- trunk/Source/WebKit/mac/ChangeLog 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-09-17 01:12:48 UTC (rev 95347)
@@ -1,3 +1,18 @@
+2011-09-16 Simon Fraser <simon.fra...@apple.com>
+
+ Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
+ https://bugs.webkit.org/show_bug.cgi?id=68134
+
+ Reviewed by Sam Weinig.
+
+ Hook up a private preference that enables the mock scrollbar theme.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences mockScrollbarsEnabled]):
+ (-[WebPreferences setMockScrollbarsEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+
2011-09-15 Adam Barth <aba...@webkit.org>
Rename ENABLE(DATABASE) to ENABLE(SQL_DATABASE)
Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (95346 => 95347)
--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2011-09-17 01:12:48 UTC (rev 95347)
@@ -110,6 +110,7 @@
#define WebKitHixie76WebSocketProtocolEnabledKey @"WebKitHixie76WebSocketProtocolEnabled"
#define WebKitMediaPlaybackRequiresUserGesturePreferenceKey @"WebKitMediaPlaybackRequiresUserGesture"
#define WebKitMediaPlaybackAllowsInlinePreferenceKey @"WebKitMediaPlaybackAllowsInline"
+#define WebKitMockScrollbarsEnabledPreferenceKey @"WebKitMockScrollbarsEnabled"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (95346 => 95347)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2011-09-17 01:12:48 UTC (rev 95347)
@@ -1531,6 +1531,16 @@
[self _setBoolValue:flag forKey:WebKitMediaPlaybackAllowsInlinePreferenceKey];
}
+- (BOOL)mockScrollbarsEnabled
+{
+ return [self _boolValueForKey:WebKitMockScrollbarsEnabledPreferenceKey];
+}
+
+- (void)setMockScrollbarsEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitMockScrollbarsEnabledPreferenceKey];
+}
+
- (NSString *)pictographFontFamily
{
return [self _stringValueForKey: WebKitPictographFontPreferenceKey];
Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (95346 => 95347)
--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2011-09-17 01:12:48 UTC (rev 95347)
@@ -219,6 +219,10 @@
- (NSString *)pictographFontFamily;
- (void)setPictographFontFamily:(NSString *)family;
+// This is a global setting.
+- (BOOL)mockScrollbarsEnabled;
+- (void)setMockScrollbarsEnabled:(BOOL)flag;
+
// Other private methods
- (void)_postPreferencesChangedNotification;
- (void)_postPreferencesChangedAPINotification;
Modified: trunk/Source/WebKit2/ChangeLog (95346 => 95347)
--- trunk/Source/WebKit2/ChangeLog 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit2/ChangeLog 2011-09-17 01:12:48 UTC (rev 95347)
@@ -1,3 +1,20 @@
+2011-09-16 Simon Fraser <simon.fra...@apple.com>
+
+ Make custom scrollbar theme for use in DRT, to reduce pixel diffs between platforms
+ https://bugs.webkit.org/show_bug.cgi?id=68134
+
+ Reviewed by Sam Weinig.
+
+ Hook up a private preference that enables the mock scrollbar theme.
+
+ * Shared/WebPreferencesStore.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetMockScrollbarsEnabled):
+ (WKPreferencesGetMockScrollbarsEnabled):
+ * UIProcess/API/C/WKPreferencesPrivate.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2011-09-16 Mark Rowe <mr...@apple.com>
Stop installing source and header files in to WebKit2.framework after r95303.
Modified: trunk/Source/WebKit2/Shared/WebPreferencesStore.h (95346 => 95347)
--- trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit2/Shared/WebPreferencesStore.h 2011-09-17 01:12:48 UTC (rev 95347)
@@ -92,6 +92,7 @@
macro(MediaPlaybackAllowsInline, mediaPlaybackAllowsInline, Bool, bool, true) \
macro(InspectorStartsAttached, inspectorStartsAttached, Bool, bool, true) \
macro(ShowsToolTipOverTruncatedText, showsToolTipOverTruncatedText, Bool, bool, false) \
+ macro(MockScrollbarsEnabled, mockScrollbarsEnabled, Bool, bool, false) \
\
#define FOR_EACH_WEBKIT_DOUBLE_PREFERENCE(macro) \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (95346 => 95347)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2011-09-17 01:12:48 UTC (rev 95347)
@@ -611,3 +611,13 @@
{
return toImpl(preferencesRef)->showsToolTipOverTruncatedText();
}
+
+void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag)
+{
+ toImpl(preferencesRef)->setMockScrollbarsEnabled(flag);
+}
+
+bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->mockScrollbarsEnabled();
+}
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h (95346 => 95347)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h 2011-09-17 01:12:48 UTC (rev 95347)
@@ -144,6 +144,10 @@
WK_EXPORT void WKPreferencesSetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef, bool flag);
WK_EXPORT bool WKPreferencesGetShowsToolTipOverTruncatedText(WKPreferencesRef preferencesRef);
+// Defaults to false.
+WK_EXPORT void WKPreferencesSetMockScrollbarsEnabled(WKPreferencesRef preferencesRef, bool flag);
+WK_EXPORT bool WKPreferencesGetMockScrollbarsEnabled(WKPreferencesRef preferencesRef);
+
#ifdef __cplusplus
}
#endif
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (95346 => 95347)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2011-09-17 01:02:45 UTC (rev 95346)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2011-09-17 01:12:48 UTC (rev 95347)
@@ -1583,6 +1583,7 @@
settings->setWebGLEnabled(store.getBoolValueForKey(WebPreferencesKey::webGLEnabledKey()));
settings->setMediaPlaybackRequiresUserGesture(store.getBoolValueForKey(WebPreferencesKey::mediaPlaybackRequiresUserGestureKey()));
settings->setMediaPlaybackAllowsInline(store.getBoolValueForKey(WebPreferencesKey::mediaPlaybackAllowsInlineKey()));
+ settings->setMockScrollbarsEnabled(store.getBoolValueForKey(WebPreferencesKey::mockScrollbarsEnabledKey()));
#if ENABLE(SQL_DATABASE)
AbstractDatabase::setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));