Commit 769414f5 authored by ap@apple.com's avatar ap@apple.com

Result of focus-option-control-on-page.html depends on system preferences

https://bugs.webkit.org/show_bug.cgi?id=123304

Reviewed by Simon Fraser.

Source/WebKit/mac:

* WebView/WebView.mm: (-[WebView _retrieveKeyboardUIModeFromPreferences:]):
Read the preference from its correct domain. This doesn't affect behavior in practice
and isn't part of the fix, but it's a good opportunity to correct this code.

Source/WebKit2:

* UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
(-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
Read the preference from its correct domain. This doesn't affect behavior in practice
and isn't part of the fix, but it's a good opportunity to correct this code.

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
Override a preference that WebKit reads to decide what Tab does, so that current
user default doesn't affect tests.

* WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting):
Ditto.

LayoutTests:

* platform/mac/TestExpectations: Remove Pass/Failure expectations, this test
should always pass now.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158256 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 804fbc65
2013-10-29 Alexey Proskuryakov <ap@apple.com>
Result of focus-option-control-on-page.html depends on system preferences
https://bugs.webkit.org/show_bug.cgi?id=123304
Reviewed by Simon Fraser.
* platform/mac/TestExpectations: Remove Pass/Failure expectations, this test
should always pass now.
2013-10-29 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r154614): Opening and closing a picture on Facebook resets scroll position
......
......@@ -1273,8 +1273,6 @@ webkit.org/b/123282 compositing/regions/propagate-region-box-shadow-border-paddi
webkit.org/b/123250 plugins/destroy-during-npp-new-object-with-fallback-content.html [ Pass Failure ]
webkit.org/b/123304 platform/mac/fast/forms/focus-option-control-on-page.html [ Pass Failure ]
webkit.org/b/123370 [ Mavericks ] css3/filters/custom/composited/custom-filter-blend-modes.html [ Pass ImageOnlyFailure ]
webkit.org/b/123370 [ Mavericks ] css3/filters/custom/custom-filter-blend-modes.html [ Pass ImageOnlyFailure ]
webkit.org/b/123370 [ Mavericks ] css3/filters/custom/custom-filter-clamp-css-color-matrix.html [ Pass ImageOnlyFailure ]
......
2013-10-29 Alexey Proskuryakov <ap@apple.com>
Result of focus-option-control-on-page.html depends on system preferences
https://bugs.webkit.org/show_bug.cgi?id=123304
Reviewed by Simon Fraser.
* WebView/WebView.mm: (-[WebView _retrieveKeyboardUIModeFromPreferences:]):
Read the preference from its correct domain. This doesn't affect behavior in practice
and isn't part of the fix, but it's a good opportunity to correct this code.
2013-10-29 Jer Noble <jer.noble@apple.com>
[MSE] [Mac] Enable MediaSource on the Mac
......
......@@ -383,7 +383,6 @@ macro(yankAndSelect) \
#define KeyboardUIModeDidChangeNotification @"com.apple.KeyboardUIModeDidChange"
#define AppleKeyboardUIMode CFSTR("AppleKeyboardUIMode")
#define UniversalAccessDomain CFSTR("com.apple.universalaccess")
static BOOL s_didSetCacheModel;
static WebCacheModel s_cacheModel = WebCacheModelDocumentViewer;
......@@ -6533,16 +6532,16 @@ static inline uint64_t roundUpToPowerOf2(uint64_t num)
- (void)_retrieveKeyboardUIModeFromPreferences:(NSNotification *)notification
{
CFPreferencesAppSynchronize(UniversalAccessDomain);
CFPreferencesAppSynchronize(kCFPreferencesAnyApplication);
Boolean keyExistsAndHasValidFormat;
int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, UniversalAccessDomain, &keyExistsAndHasValidFormat);
// The keyboard access mode is reported by two bits:
// Bit 0 is set if feature is on
// Bit 1 is set if full keyboard access works for any control, not just text boxes and lists
int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, kCFPreferencesAnyApplication, &keyExistsAndHasValidFormat);
// The keyboard access mode has two bits:
// Bit 0 is set if user can set the focus to menus, the dock, and various windows using the keyboard.
// Bit 1 is set if controls other than text fields are included in the tab order (WebKit also always includes lists).
_private->_keyboardUIMode = (mode & 0x2) ? KeyboardAccessFull : KeyboardAccessDefault;
// check for tabbing to links
if ([_private->preferences tabsToLinks])
_private->_keyboardUIMode = (KeyboardUIMode)(_private->_keyboardUIMode | KeyboardAccessTabsToLinks);
......
2013-10-29 Alexey Proskuryakov <ap@apple.com>
Result of focus-option-control-on-page.html depends on system preferences
https://bugs.webkit.org/show_bug.cgi?id=123304
Reviewed by Simon Fraser.
* UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
(-[WKFullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
Read the preference from its correct domain. This doesn't affect behavior in practice
and isn't part of the fix, but it's a good opportunity to correct this code.
2013-10-29 Brady Eidson <beidson@apple.com>
Move IDBTransactionBackendLevelDB to generic IDBBackingStoreInterface
......
......@@ -30,7 +30,6 @@
NSString * const KeyboardUIModeDidChangeNotification = @"com.apple.KeyboardUIModeDidChange";
const CFStringRef AppleKeyboardUIMode = CFSTR("AppleKeyboardUIMode");
const CFStringRef UniversalAccessDomain = CFSTR("com.apple.universalaccess");
using namespace WebKit;
......@@ -47,14 +46,14 @@ using namespace WebKit;
{
BOOL oldValue = fullKeyboardAccessEnabled;
CFPreferencesAppSynchronize(UniversalAccessDomain);
CFPreferencesAppSynchronize(kCFPreferencesAnyApplication);
Boolean keyExistsAndHasValidFormat;
int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, UniversalAccessDomain, &keyExistsAndHasValidFormat);
int mode = CFPreferencesGetAppIntegerValue(AppleKeyboardUIMode, kCFPreferencesAnyApplication, &keyExistsAndHasValidFormat);
if (keyExistsAndHasValidFormat) {
// The keyboard access mode is reported by two bits:
// Bit 0 is set if feature is on
// Bit 1 is set if full keyboard access works for any control, not just text boxes and lists.
// The keyboard access mode has two bits:
// Bit 0 is set if user can set the focus to menus, the dock, and various windows using the keyboard.
// Bit 1 is set if controls other than text fields are included in the tab order (WebKit also always includes lists).
fullKeyboardAccessEnabled = (mode & 0x2);
}
......
2013-10-29 Alexey Proskuryakov <ap@apple.com>
Result of focus-option-control-on-page.html depends on system preferences
https://bugs.webkit.org/show_bug.cgi?id=123304
Reviewed by Simon Fraser.
* DumpRenderTree/mac/DumpRenderTree.mm: (setDefaultsToConsistentValuesForTesting):
Override a preference that WebKit reads to decide what Tab does, so that current
user default doesn't affect tests.
* WebKitTestRunner/mac/main.mm: (setDefaultsToConsistentValuesForTesting):
Ditto.
2013-10-29 Filip Pizlo <fpizlo@apple.com>
It should be possible to specify extra tests to run-javascriptcore-tests
......
......@@ -685,6 +685,7 @@ static void setDefaultsToConsistentValuesForTesting()
NSString *libraryPath = libraryPathForDumpRenderTree();
NSDictionary *dict = @{
@"AppleKeyboardUIMode": @1,
@"AppleMagnifiedMode": @YES,
@"AppleAntiAliasingThreshold": @4,
@"AppleFontSmoothing": @(NoFontSmoothing),
......
......@@ -30,6 +30,7 @@
static void setDefaultsToConsistentValuesForTesting()
{
NSDictionary *dict = @{
@"AppleKeyboardUIMode": @1,
@"AppleMagnifiedMode": @YES,
@"WebKitKerningAndLigaturesEnabledByDefault": @NO,
// FIXME: This is likely insufficient, as tests change (and don't reset) these settings via Internals.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment