[webkit-changes] [154090] trunk/LayoutTests

2013-08-14 Thread ap
Title: [154090] trunk/LayoutTests








Revision 154090
Author a...@apple.com
Date 2013-08-14 23:12:53 -0700 (Wed, 14 Aug 2013)


Log Message
Don't copy js-test-pre in cookies-test-pre
https://bugs.webkit.org/show_bug.cgi?id=119802

Reviewed by Sam Weinig.

* http/tests/cookies/resources/cookies-test-post.js:
* http/tests/cookies/resources/cookies-test-pre.js:

Modified Paths

trunk/LayoutTests/ChangeLog
trunk/LayoutTests/http/tests/cookies/resources/cookies-test-post.js
trunk/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js




Diff

Modified: trunk/LayoutTests/ChangeLog (154089 => 154090)

--- trunk/LayoutTests/ChangeLog	2013-08-15 05:14:04 UTC (rev 154089)
+++ trunk/LayoutTests/ChangeLog	2013-08-15 06:12:53 UTC (rev 154090)
@@ -1,3 +1,13 @@
+2013-08-14  Alexey Proskuryakov  
+
+Don't copy js-test-pre in cookies-test-pre
+https://bugs.webkit.org/show_bug.cgi?id=119802
+
+Reviewed by Sam Weinig.
+
+* http/tests/cookies/resources/cookies-test-post.js:
+* http/tests/cookies/resources/cookies-test-pre.js:
+
 2013-08-14  Ryuan Choi  
 
  [EFL] decoration of search type is different from other platforms


Modified: trunk/LayoutTests/http/tests/cookies/resources/cookies-test-post.js (154089 => 154090)

--- trunk/LayoutTests/http/tests/cookies/resources/cookies-test-post.js	2013-08-15 05:14:04 UTC (rev 154089)
+++ trunk/LayoutTests/http/tests/cookies/resources/cookies-test-post.js	2013-08-15 06:12:53 UTC (rev 154090)
@@ -1,5 +1,4 @@
-shouldBeTrue("successfullyParsed");
-debug('TEST COMPLETE');
+document.write("");
 
 // Make sure that we do not leak any cookies.
 clearCookies();


Modified: trunk/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js (154089 => 154090)

--- trunk/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js	2013-08-15 05:14:04 UTC (rev 154089)
+++ trunk/LayoutTests/http/tests/cookies/resources/cookies-test-pre.js	2013-08-15 06:12:53 UTC (rev 154090)
@@ -1,154 +1,5 @@
-if (window.testRunner)
-testRunner.dumpAsText();
+document.write("");
 
-function description(msg)
-{
-// For MSIE 6 compatibility
-var span = document.createElement("span");
-span.innerHTML = '' + msg + 'On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".';
-var description = document.getElementById("description");
-if (description.firstChild)
-description.replaceChild(span, description.firstChild);
-else
-description.appendChild(span);
-}
-
-function debug(msg)
-{
-var span = document.createElement("span");
-document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
-span.innerHTML = msg + '';
-}
-
-function escapeHTML(text)
-{
-return text.replace(/&/g, "&").replace(/PASS ' + escapeHTML(msg) + '');
-}
-
-function testFailed(msg)
-{
-debug('FAIL ' + escapeHTML(msg) + '');
-}
-
-function areArraysEqual(_a, _b)
-{
-if (_a.length !== _b.length)
-return false;
-for (var i = 0; i < _a.length; i++)
-if (_a[i] !== _b[i])
-return false;
-return true;
-}
-
-function isMinusZero(n)
-{
-// the only way to tell 0 from -0 in JS is the fact that 1/-0 is
-// -Infinity instead of Infinity
-return n === 0 && 1/n < 0;
-}
-
-function isResultCorrect(_actual, _expected)
-{
-if (_expected === 0)
-return _actual === _expected && (1/_actual) === (1/_expected);
-if (_actual === _expected)
-return true;
-if (typeof(_expected) == "number" && isNaN(_expected))
-return typeof(_actual) == "number" && isNaN(_actual);
-if (Object.prototype.toString.call(_expected) == Object.prototype.toString.call([]))
-return areArraysEqual(_actual, _expected);
-return false;
-}
-
-function stringify(v)
-{
-if (v === 0 && 1/v < 0)
-return "-0";
-else return "" + v;
-}
-
-function shouldBe(_a, _b)
-{
-if (typeof _a != "string" || typeof _b != "string")
-debug("WARN: shouldBe() expects string arguments");
-var exception;
-var _av;
-try {
-_av = eval(_a);
-} catch (e) {
-exception = e;
-}
-var _bv = eval(_b);
-
-if (exception)
-testFailed(_a + " should be " + _bv + ". Threw exception " + exception);
-else if (isResultCorrect(_av, _bv))
-testPassed(_a + " is " + _b);
-else if (typeof(_av) == typeof(_bv))
-testFailed(_a + " should be " + _bv + ". Was " + stringify(_av) + ".");
-else
-testFailed(_a + " should be " + _bv + " (of type " + typeof _bv + "). Was " + _av + " (of type " + typeof _av + ").");
-}
-
-function shouldBeTrue(_a) { shouldBe(_a, "true"); }
-function shouldBeFalse(_a) { shouldBe(_a, "false"); }
-function shouldBeNaN(_a) { shouldBe(_a, "NaN"); }
-function shouldBeNull(_a) { shouldBe(_a, "null"); }
-
-function shouldBeEqualToString(a, b)
-{
-var unevaledString = '"' + b.replace(/\\/g, "").replace(/"/g, "\"").replace(/\n/g, "

[webkit-changes] [154087] trunk/Source/WebCore

2013-08-14 Thread weinig
Title: [154087] trunk/Source/WebCore








Revision 154087
Author wei...@apple.com
Date 2013-08-14 17:53:02 -0700 (Wed, 14 Aug 2013)


Log Message
Update binding test results.  Follow up fix for 

* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::JSTestCallback):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp
trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp




Diff

Modified: trunk/Source/WebCore/ChangeLog (154086 => 154087)

--- trunk/Source/WebCore/ChangeLog	2013-08-15 00:45:01 UTC (rev 154086)
+++ trunk/Source/WebCore/ChangeLog	2013-08-15 00:53:02 UTC (rev 154087)
@@ -1,3 +1,12 @@
+2013-08-14  Sam Weinig  
+
+Update binding test results.  Follow up fix for 
+
+* bindings/scripts/test/JS/JSTestCallback.cpp:
+(WebCore::JSTestCallback::JSTestCallback):
+* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+(WebCore::jsTestMediaQueryListListenerPrototypeFunctionMethod):
+
 2013-08-14  Joseph Pecoraro  
 
  [Mac] No AutoreleasePool leaks when dragging image out of WebView


Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (154086 => 154087)

--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2013-08-15 00:45:01 UTC (rev 154086)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp	2013-08-15 00:53:02 UTC (rev 154087)
@@ -36,7 +36,8 @@
 namespace WebCore {
 
 JSTestCallback::JSTestCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
-: ActiveDOMCallback(globalObject->scriptExecutionContext())
+: TestCallback()
+, ActiveDOMCallback(globalObject->scriptExecutionContext())
 , m_data(new JSCallbackData(callback, globalObject))
 {
 }
@@ -55,6 +56,7 @@
 #endif
 }
 
+
 // Functions
 
 bool JSTestCallback::callbackWithNoParam()


Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp (154086 => 154087)

--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp	2013-08-15 00:45:01 UTC (rev 154086)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp	2013-08-15 00:53:02 UTC (rev 154087)
@@ -23,7 +23,7 @@
 
 #include "ExceptionCode.h"
 #include "JSDOMBinding.h"
-#include "MediaQueryListListener.h"
+#include "JSMediaQueryListListener.h"
 #include "TestMediaQueryListListener.h"
 #include 
 #include 
@@ -167,9 +167,9 @@
 TestMediaQueryListListener* impl = static_cast(castedThis->impl());
 if (exec->argumentCount() < 1)
 return throwVMError(exec, createNotEnoughArgumentsError(exec));
-RefPtr listener(MediaQueryListListener::create(ScriptValue(exec->vm(), exec->argument(0;
-if (exec->hadException())
-return JSValue::encode(jsUndefined());
+if (exec->argumentCount() <= 0 || !exec->argument(0).isFunction())
+return throwVMTypeError(exec);
+RefPtr listener = JSMediaQueryListListener::create(asObject(exec->argument(0)), castedThis->globalObject());
 impl->method(listener);
 return JSValue::encode(jsUndefined());
 }






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [154086] trunk/Source/WebCore

2013-08-14 Thread joepeck
Title: [154086] trunk/Source/WebCore








Revision 154086
Author joep...@webkit.org
Date 2013-08-14 17:45:01 -0700 (Wed, 14 Aug 2013)


Log Message
 [Mac] No AutoreleasePool leaks when dragging image out of WebView

Reviewed by Dan Bernstein.

This code was just running a block of code asynchronously using a
pthread. Convert this to use a dispatch block, which does provide
an autorelease pool so there are no leaks and ends up much simpler.

* platform/mac/FileSystemMac.mm:
(WebCore::setMetadataURL):

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/platform/mac/FileSystemMac.mm




Diff

Modified: trunk/Source/WebCore/ChangeLog (154085 => 154086)

--- trunk/Source/WebCore/ChangeLog	2013-08-15 00:43:19 UTC (rev 154085)
+++ trunk/Source/WebCore/ChangeLog	2013-08-15 00:45:01 UTC (rev 154086)
@@ -1,3 +1,16 @@
+2013-08-14  Joseph Pecoraro  
+
+ [Mac] No AutoreleasePool leaks when dragging image out of WebView
+
+Reviewed by Dan Bernstein.
+
+This code was just running a block of code asynchronously using a
+pthread. Convert this to use a dispatch block, which does provide
+an autorelease pool so there are no leaks and ends up much simpler.
+
+* platform/mac/FileSystemMac.mm:
+(WebCore::setMetadataURL):
+
 2013-08-14  Tim Horton  
 
 Un-inline dataLog dumpers for IntSize and IntPoint


Modified: trunk/Source/WebCore/platform/mac/FileSystemMac.mm (154085 => 154086)

--- trunk/Source/WebCore/platform/mac/FileSystemMac.mm	2013-08-15 00:43:19 UTC (rev 154085)
+++ trunk/Source/WebCore/platform/mac/FileSystemMac.mm	2013-08-15 00:45:01 UTC (rev 154086)
@@ -67,45 +67,19 @@
 return String::fromUTF8(temporaryFilePath.data());
 }
 
-typedef struct MetaDataInfo
-{
-String URLString;
-String referrer;
-String path;
-} MetaDataInfo;
-
-static void* setMetaData(void* context)
-{
-MetaDataInfo *info = (MetaDataInfo *)context;
-wkSetMetadataURL((NSString *)info->URLString, (NSString *)info->referrer, (NSString *)String::fromUTF8(fileSystemRepresentation(info->path).data()));
-
-delete info;
-
-return 0;
-}
-
 void setMetadataURL(String& URLString, const String& referrer, const String& path)
 {
 NSURL *URL = "" nil);
 if (URL)
 URLString = userVisibleString(URLByRemovingUserInfo(URL));
-
-// Spawn a background thread for WKSetMetadataURL because this function will not return until mds has
-// journaled the data we're're trying to set. Depending on what other I/O is going on, it can take some
-// time. 
-pthread_t tid;
-pthread_attr_t attr;
-pthread_attr_init(&attr);
-pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
-
-MetaDataInfo *info = new MetaDataInfo;
-
-info->URLString = URLString;
-info->referrer = referrer;
-info->path = path;
-
-pthread_create(&tid, &attr, setMetaData, info);
-pthread_attr_destroy(&attr);
+
+// Call WKSetMetadataURL on a background queue because it can take some time.
+NSString *URLStringCopy = URLString;
+NSString *referrerCopy = referrer;
+NSString *pathCopy = path;
+dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
+wkSetMetadataURL(URLStringCopy, referrerCopy, [NSString stringWithUTF8String:[pathCopy fileSystemRepresentation]]);
+});
 }
 
 #if !PLATFORM(IOS)






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [154085] trunk/Source/WebKit2

2013-08-14 Thread dino
Title: [154085] trunk/Source/WebKit2








Revision 154085
Author d...@apple.com
Date 2013-08-14 17:43:19 -0700 (Wed, 14 Aug 2013)


Log Message
 Allow primary plug-in detection to run more than once if necessary

Reviewed by Tim Horton.

We occasionally see cases where the primary plug-in detection runs before the plugins have been added
to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can
run an arbitrary number of times if it fails.

While here, also have the detection run if there has ever been a plugin in the page as opposed to any
current views. We may have snapshotted a plugin by now and deleted its view.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): initialise new members.
(WebKit::WebPage::addPluginView): Mark that we've seen a plugin.
(WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members.
(WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never
seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set
a timer to run again (maximum of two attempts at the moment).
* WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts
and m_hasSeenPlugin.

Modified Paths

trunk/Source/WebKit2/ChangeLog
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h




Diff

Modified: trunk/Source/WebKit2/ChangeLog (154084 => 154085)

--- trunk/Source/WebKit2/ChangeLog	2013-08-15 00:25:49 UTC (rev 154084)
+++ trunk/Source/WebKit2/ChangeLog	2013-08-15 00:43:19 UTC (rev 154085)
@@ -1,5 +1,28 @@
 2013-08-14  Dean Jackson  
 
+ Allow primary plug-in detection to run more than once if necessary
+
+Reviewed by Tim Horton.
+
+We occasionally see cases where the primary plug-in detection runs before the plugins have been added
+to the page, especially if they do so in response to a load event. Tweak the algorithm so that it can
+run an arbitrary number of times if it fails.
+
+While here, also have the detection run if there has ever been a plugin in the page as opposed to any
+current views. We may have snapshotted a plugin by now and deleted its view.
+
+* WebProcess/WebPage/WebPage.cpp:
+(WebKit::WebPage::WebPage): initialise new members.
+(WebKit::WebPage::addPluginView): Mark that we've seen a plugin.
+(WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset new members.
+(WebKit::WebPage::determinePrimarySnapshottedPlugIn): Exit early if we've never
+seen a plugin, rather than if we don't have any active views. Also, if we didn't find anything set
+a timer to run again (maximum of two attempts at the moment).
+* WebProcess/WebPage/WebPage.h: New members - m_numberOfPrimarySnapshotDetectionAttempts
+and m_hasSeenPlugin.
+
+2013-08-14  Dean Jackson  
+
  Add pluginView-related logging to WebPage
 
 Reviewed by Tim Horton.


Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (154084 => 154085)

--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-08-15 00:25:49 UTC (rev 154084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2013-08-15 00:43:19 UTC (rev 154085)
@@ -226,6 +226,7 @@
 
 WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
 : m_viewSize(parameters.viewSize)
+, m_hasSeenPlugin(false)
 , m_useFixedLayout(false)
 , m_drawsBackground(true)
 , m_drawsTransparentBackground(false)
@@ -240,6 +241,7 @@
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
 , m_readyToFindPrimarySnapshottedPlugin(false)
 , m_didFindPrimarySnapshottedPlugin(false)
+, m_numberOfPrimarySnapshotDetectionAttempts(0)
 , m_determinePrimarySnapshottedPlugInTimer(RunLoop::main(), this, &WebPage::determinePrimarySnapshottedPlugInTimerFired)
 #endif
 #if PLATFORM(MAC)
@@ -3066,6 +3068,7 @@
 ASSERT(!m_pluginViews.contains(pluginView));
 
 m_pluginViews.add(pluginView);
+m_hasSeenPlugin = true;
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
 LOG(Plugins, "Primary Plug-In Detection: triggering detection from addPluginView(%p)", pluginView);
 m_determinePrimarySnapshottedPlugInTimer.startOneShot(0);
@@ -4038,6 +4041,8 @@
 static float primarySnapshottedPlugInSearchBucketSize = 1.1;
 static int primarySnapshottedPlugInMinimumWidth = 400;
 static int primarySnapshottedPlugInMinimumHeight = 300;
+static unsigned maxPrimarySnapshottedPlugInDetectionAttempts = 2;
+static int deferredPrimarySnapshottedPlugInDetectionDelay = 3;
 
 #if ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC)
 void WebPage::determinePrimarySnapshottedPlugInTimerFired()
@@ -4063,8 +4068,8 @@
 return;
 }
 
-if (m_pluginViews.isEmpty()) {
-LOG(Plugins, "Primary Plug-In Detection: exiting - no plugin views.");
+if (!m_hasSeenPlugin) {
+LOG(Plugins, "Primary Plug-In Detection: exiting - we never

[webkit-changes] [154084] trunk

2013-08-14 Thread timothy_horton
Title: [154084] trunk








Revision 154084
Author timothy_hor...@apple.com
Date 2013-08-14 17:25:49 -0700 (Wed, 14 Aug 2013)


Log Message
Un-inline dataLog dumpers for IntSize and IntPoint
https://bugs.webkit.org/show_bug.cgi?id=119697

Reviewed by Sam Weinig.

.:

Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.

* Source/autotools/symbols.filter:

Source/WebCore:

Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/IntPoint.cpp: Added.
(WebCore::IntPoint::dump):
* platform/graphics/IntPoint.h:
* platform/graphics/IntSize.cpp: Added.
(WebCore::IntSize::dump):
* platform/graphics/IntSize.h:

Tools:

* TestWebKitAPI/GNUmakefile.am:

Modified Paths

trunk/ChangeLog
trunk/Source/WebCore/CMakeLists.txt
trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/GNUmakefile.list.am
trunk/Source/WebCore/Target.pri
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
trunk/Source/WebCore/platform/graphics/IntPoint.h
trunk/Source/WebCore/platform/graphics/IntSize.h
trunk/Source/autotools/symbols.filter
trunk/Tools/ChangeLog
trunk/Tools/TestWebKitAPI/GNUmakefile.am


Added Paths

trunk/Source/WebCore/platform/graphics/IntPoint.cpp
trunk/Source/WebCore/platform/graphics/IntSize.cpp




Diff

Modified: trunk/ChangeLog (154083 => 154084)

--- trunk/ChangeLog	2013-08-15 00:00:08 UTC (rev 154083)
+++ trunk/ChangeLog	2013-08-15 00:25:49 UTC (rev 154084)
@@ -1,3 +1,14 @@
+2013-08-14  Tim Horton  
+
+Un-inline dataLog dumpers for IntSize and IntPoint
+https://bugs.webkit.org/show_bug.cgi?id=119697
+
+Reviewed by Sam Weinig.
+
+Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.
+
+* Source/autotools/symbols.filter:
+
 2013-08-14  Martin Robinson  
 
 [GTK] [CMake] Add support for building TestWebKitAPI


Modified: trunk/Source/WebCore/CMakeLists.txt (154083 => 154084)

--- trunk/Source/WebCore/CMakeLists.txt	2013-08-15 00:00:08 UTC (rev 154083)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-08-15 00:25:49 UTC (rev 154084)
@@ -1919,7 +1919,9 @@
 platform/graphics/Image.cpp
 platform/graphics/ImageBuffer.cpp
 platform/graphics/ImageOrientation.cpp
+platform/graphics/IntPoint.cpp
 platform/graphics/IntRect.cpp
+platform/graphics/IntSize.cpp
 platform/graphics/MediaPlayer.cpp
 platform/graphics/Path.cpp
 platform/graphics/PathTraversalState.cpp


Modified: trunk/Source/WebCore/ChangeLog (154083 => 154084)

--- trunk/Source/WebCore/ChangeLog	2013-08-15 00:00:08 UTC (rev 154083)
+++ trunk/Source/WebCore/ChangeLog	2013-08-15 00:25:49 UTC (rev 154084)
@@ -1,3 +1,25 @@
+2013-08-14  Tim Horton  
+
+Un-inline dataLog dumpers for IntSize and IntPoint
+https://bugs.webkit.org/show_bug.cgi?id=119697
+
+Reviewed by Sam Weinig.
+
+Avoid regressing build performance by moving IntSize::dump and IntPoint::dump elsewhere.
+
+* CMakeLists.txt:
+* GNUmakefile.list.am:
+* Target.pri:
+* WebCore.vcxproj/WebCore.vcxproj:
+* WebCore.vcxproj/WebCore.vcxproj.filters:
+* WebCore.xcodeproj/project.pbxproj:
+* platform/graphics/IntPoint.cpp: Added.
+(WebCore::IntPoint::dump):
+* platform/graphics/IntPoint.h:
+* platform/graphics/IntSize.cpp: Added.
+(WebCore::IntSize::dump):
+* platform/graphics/IntSize.h:
+
 2013-08-14  Chris Fleizach  
 
  AX: WKView does not become first responder when the voiceover cursor lands on it


Modified: trunk/Source/WebCore/GNUmakefile.list.am (154083 => 154084)

--- trunk/Source/WebCore/GNUmakefile.list.am	2013-08-15 00:00:08 UTC (rev 154083)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2013-08-15 00:25:49 UTC (rev 154084)
@@ -5851,11 +5851,13 @@
 	Source/WebCore/platform/graphics/ImageSource.h \
 	Source/WebCore/platform/graphics/InbandTextTrackPrivate.h \
 	Source/WebCore/platform/graphics/InbandTextTrackPrivateClient.h \
+	Source/WebCore/platform/graphics/IntPoint.cpp \
 	Source/WebCore/platform/graphics/IntPoint.h \
 	Source/WebCore/platform/graphics/IntPointHash.h \
 	Source/WebCore/platform/graphics/IntRect.cpp \
 	Source/WebCore/platform/graphics/IntRect.h \
 	Source/WebCore/platform/graphics/IntRectExtent.h \
+	Source/WebCore/platform/graphics/IntSize.cpp \
 	Source/WebCore/platform/graphics/IntSize.h \
 	Source/WebCore/platform/graphics/IntSizeHash.h \
 	Source/WebCore/platform/graphics/LayoutBoxExtent.cpp \


Modified: trunk/Source/WebCore/Target.pri (154083 => 154084)

--- trunk/Source/WebCore/Target.pri	2013-08-15 00:00:08 UTC (rev 154083)
+++ trunk/Source/WebCore/Target.pri	2013-08-15 00

[webkit-changes] [154083] trunk/Source/WebCore

2013-08-14 Thread cfleizach
Title: [154083] trunk/Source/WebCore








Revision 154083
Author cfleiz...@apple.com
Date 2013-08-14 17:00:08 -0700 (Wed, 14 Aug 2013)


Log Message
 AX: WKView does not become first responder when the voiceover cursor lands on it

Reviewed by Tim Horton.

VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls. 
We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.

There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.

* accessibility/AccessibilityScrollView.cpp:
(WebCore::AccessibilityScrollView::canSetFocusAttribute):
(WebCore::AccessibilityScrollView::isFocused):
(WebCore::AccessibilityScrollView::setFocused):
* accessibility/AccessibilityScrollView.h:

Modified Paths

trunk/Source/WebCore/ChangeLog
trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp
trunk/Source/WebCore/accessibility/AccessibilityScrollView.h




Diff

Modified: trunk/Source/WebCore/ChangeLog (154082 => 154083)

--- trunk/Source/WebCore/ChangeLog	2013-08-14 23:59:01 UTC (rev 154082)
+++ trunk/Source/WebCore/ChangeLog	2013-08-15 00:00:08 UTC (rev 154083)
@@ -1,3 +1,20 @@
+2013-08-14  Chris Fleizach  
+
+ AX: WKView does not become first responder when the voiceover cursor lands on it
+
+Reviewed by Tim Horton.
+
+VoiceOver lands on Scroll views by default. It expects that the scroll view will be able to handle the focus calls. 
+We should forward scroll view focus requests to the web area to handle, which will trigger a becomeFirstResponder on WKView.
+
+There's not a great way to test this unfortunately, since it requires having focus comes from outside the webview into the webview.
+
+* accessibility/AccessibilityScrollView.cpp:
+(WebCore::AccessibilityScrollView::canSetFocusAttribute):
+(WebCore::AccessibilityScrollView::isFocused):
+(WebCore::AccessibilityScrollView::setFocused):
+* accessibility/AccessibilityScrollView.h:
+
 2013-08-14  Hans Muller  
 
 [CSS Exclusions] Minimal support for using an image to define a shape


Modified: trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp (154082 => 154083)

--- trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp	2013-08-14 23:59:01 UTC (rev 154082)
+++ trunk/Source/WebCore/accessibility/AccessibilityScrollView.cpp	2013-08-15 00:00:08 UTC (rev 154083)
@@ -86,6 +86,26 @@
 return m_scrollView;
 }
 
+bool AccessibilityScrollView::canSetFocusAttribute() const
+{
+if (AccessibilityObject* webArea = webAreaObject())
+return webArea->canSetFocusAttribute();
+return false;
+}
+
+bool AccessibilityScrollView::isFocused() const
+{
+if (AccessibilityObject* webArea = webAreaObject())
+return webArea->isFocused();
+return false;
+}
+
+void AccessibilityScrollView::setFocused(bool focused)
+{
+if (AccessibilityObject* webArea = webAreaObject())
+webArea->setFocused(focused);
+}
+
 void AccessibilityScrollView::updateChildrenIfNecessary()
 {
 if (m_childrenDirty)


Modified: trunk/Source/WebCore/accessibility/AccessibilityScrollView.h (154082 => 154083)

--- trunk/Source/WebCore/accessibility/AccessibilityScrollView.h	2013-08-14 23:59:01 UTC (rev 154082)
+++ trunk/Source/WebCore/accessibility/AccessibilityScrollView.h	2013-08-15 00:00:08 UTC (rev 154083)
@@ -64,6 +64,9 @@
 virtual void updateChildrenIfNecessary();
 virtual void setNeedsToUpdateChildren() { m_childrenDirty = true; }
 void updateScrollbars();
+virtual void setFocused(bool);
+virtual bool canSetFocusAttribute() const;
+virtual bool isFocused() const;
 
 virtual FrameView* documentFrameView() const;
 virtual LayoutRect elementRect() const;






___
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes


[webkit-changes] [154082] trunk/LayoutTests

2013-08-14 Thread cfleizach
Title: [154082] trunk/LayoutTests








Revision 154082
Author cfleiz...@apple.com
Date 2013-08-14 16:59:01 -0700 (Wed, 14 Aug 2013)


Log Message
 AX: Integrate layout tests from overflow bounding boxes are way too big; prevents VoiceOver taps from activating the right elements

Reviewed by Simon Fraser.

Add a layout test to ensure that transformed elements do not get offset twice when calculating their accessibility bounds.

* accessibility/transformed-bounds-expected.txt: Added.
* accessibility/transformed-bounds.html: Added.

Modified Paths

trunk/LayoutTests/ChangeLog


Added Paths

trunk/LayoutTests/accessibility/transformed-bounds-expected.txt
trunk/LayoutTests/accessibility/transformed-bounds.html




Diff

Modified: trunk/LayoutTests/ChangeLog (154081 => 154082)

--- trunk/LayoutTests/ChangeLog	2013-08-14 23:24:45 UTC (rev 154081)
+++ trunk/LayoutTests/ChangeLog	2013-08-14 23:59:01 UTC (rev 154082)
@@ -1,3 +1,14 @@
+2013-08-14  Chris Fleizach  
+
+ AX: Integrate layout tests from overflow bounding boxes are way too big; prevents VoiceOver taps from activating the right elements
+
+Reviewed by Simon Fraser.
+
+Add a layout test to ensure that transformed elements do not get offset twice when calculating their accessibility bounds.
+
+* accessibility/transformed-bounds-expected.txt: Added.
+* accessibility/transformed-bounds.html: Added.
+
 2013-08-14  Hans Muller  
 
 [CSS Exclusions] Minimal support for using an image to define a shape


Added: trunk/LayoutTests/accessibility/transformed-bounds-expected.txt (0 => 154082)

--- trunk/LayoutTests/accessibility/transformed-bounds-expected.txt	(rev 0)
+++ trunk/LayoutTests/accessibility/transformed-bounds-expected.txt	2013-08-14 23:59:01 UTC (rev 154082)
@@ -0,0 +1,12 @@
+Test
+This tests that if a view is in a transformed layer, the bounds will not be offset by the origin of the transformed layer.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS tab.width < 40 is true
+PASS tab.height < 30 is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+


Added: trunk/LayoutTests/accessibility/transformed-bounds.html (0 => 154082)

--- trunk/LayoutTests/accessibility/transformed-bounds.html	(rev 0)
+++ trunk/LayoutTests/accessibility/transformed-bounds.html	2013-08-14 23:59:01 UTC (rev 154082)
@@ -0,0 +1,92 @@
+
+
+
+
+
+.pills .button {
+display:inline-block;
+}
+
+.ipad .top-section {
+text-align:center
+}
+
+.pills {
+display:inline-block;
+margin:0 auto 10px;
+padding:0 15px;
+min-width:292px
+}
+
+.pills div {
+display:inline-block;
+}
+
+.swoosh-overlay .contents .row .item:not(.software) .card-container {
+-webkit-transform-origin-x:315px
+}
+
+.swoosh-overlay .contents .row .item .card-container {
+-webkit-transform-style:preserve-3d;
+position:absolute
+}
+
+.swoosh-overlay .item .card-back {
+position:absolute;
+width:630px;
+height:630px;
+-webkit-backface-visibility:hidden;
+-webkit-transform:rotatey(180deg)
+}
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+