IDB: LevelDB backing store shouldn't know about IDBCursor or IDBCallbacks
https://bugs.webkit.org/show_bug.cgi?id=127708

Reviewed by Tim Horton.

Source/WebCore:

Move that knowledge to the IDBCursorBackendOperations inside the callback.

* Modules/indexeddb/IDBCursorBackendOperations.cpp:
(WebCore::CursorAdvanceOperation::perform):
(WebCore::CursorIterationOperation::perform):
* Modules/indexeddb/IDBCursorBackendOperations.h:

* Modules/indexeddb/IDBServerConnection.h:
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.cpp:
(WebCore::IDBServerConnectionLevelDB::cursorAdvance):
(WebCore::IDBServerConnectionLevelDB::cursorIterate):
* Modules/indexeddb/leveldb/IDBServerConnectionLevelDB.h:

Source/WebKit2:

Update to new callback signatures:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::cursorAdvance):
(WebKit::WebIDBServerConnection::cursorIterate):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162869 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] preload=none prevents play()
https://bugs.webkit.org/show_bug.cgi?id=127702

Reviewed by Jer Noble.

No new tests, covered by existing tests.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::potentiallyPlaying): Cleanup logic to make it simpler to understand,
    fix logic error introduced in r161973
(WebCore::HTMLMediaElement::updatePlayState): Conditionalize some iOS-only code on whether or not
    we are using the plug-in proxy.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162870 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] Remove restriction of negative values for inset parameters
https://bugs.webkit.org/show_bug.cgi?id=127704

Reviewed by Darin Adler.

Source/WebCore:

The latest version of CSS Shapes (http://www.w3.org/TR/css-shapes/) specification
doesn't contain any restriction of using negative values for the inset sizing.
I removed the restriction from the code and added testing for them.

Existing tests have been extended with the new cases.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseBasicShapeInset):

LayoutTests:

* fast/shapes/parsing/parsing-shape-lengths-expected.txt:
* fast/shapes/parsing/parsing-shape-lengths.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162871 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop the code generator from adding ENABLE() macros to Objective-C DOM headers
https://bugs.webkit.org/show_bug.cgi?id=127706

Reviewed by David Kilzer.

Instead of adding ENABLE() macros to generated Objective-C DOM
headers, which might become Public or Private headers, elide generated
code for disabled features.

* bindings/scripts/CodeGeneratorObjC.pm:
(GenerateInterface): Passed $defines to GenerateHeader.
(ConditionalIsEnabled): Checked if the given conditional is found in
$defines. Handled conditionals with '&' and '|'.
(GenerateHeader): Rather than calling GenerateConditionalString to
generate an "#if ENABLE(...)", called ConditionalIsEnabled() to see
whether we should generate code for the given constant, attribute, or
function.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162872 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement the _injectedBundleURL property
https://bugs.webkit.org/show_bug.cgi?id=127714

Reviewed by Tim Horton.

Properties declared in class categories need to be implemented. Do this
for the _injectedBundleURL property.

* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
(-[WKProcessClassConfiguration _injectedBundleURL]):
(-[WKProcessClassConfiguration _setInjectedBundleURL:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162873 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Feature Check all Protocol Generated Interfaces to get JSContext Inspection working
https://bugs.webkit.org/show_bug.cgi?id=127712

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-01-27
Reviewed by Timothy Hatcher.

Feature check protocol generated interfaces (e.g. FooAgent and registerFooObserver).
Also drive by handle a possible exception if a SourceCode's URL is null, which is possible.

* UserInterface/ApplicationCacheManager.js:
(WebInspector.ApplicationCacheManager):
(WebInspector.ApplicationCacheManager.prototype.initialize):
* UserInterface/CSSCompletions.js:
(WebInspector.CSSCompletions.requestCSSNameCompletions):
* UserInterface/CSSStyleManager.js:
(WebInspector.CSSStyleManager):
(WebInspector.CSSStyleManager.prototype.canForcePseudoClasses):
* UserInterface/DebuggerManager.js:
* UserInterface/FrameResourceManager.js:
(WebInspector.FrameResourceManager):
(WebInspector.FrameResourceManager.prototype.initialize):
* UserInterface/Main.js:
(WebInspector.loaded):
* UserInterface/ProfileManager.js:
(WebInspector.ProfileManager):
* UserInterface/StorageManager.js:
(WebInspector.StorageManager):
Type check generated interfaces.

(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Null check a SourceCode URL, which can be null for a Script with no URL.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162874 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused USE(OPENTYPE_SANITIZER) code.
<https://webkit.org/b/127710>

This code was only used by the Chromium port.

Reviewed by Darin Adler.

* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::ensureCustomFontData):
* platform/graphics/WOFFFileFormat.cpp:
* platform/graphics/WOFFFileFormat.h:
* platform/graphics/opentype/OpenTypeSanitizer.cpp: Removed.
* platform/graphics/opentype/OpenTypeSanitizer.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162875 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move underlying C++ objects to class extensions
https://bugs.webkit.org/show_bug.cgi?id=127716

Reviewed by Tim Horton.

This allows us to get at the internals without calling any Obj-C methods.

* UIProcess/API/Cocoa/WKProcessClass.mm:
* UIProcess/API/Cocoa/WKProcessClassInternal.h:
* UIProcess/API/ios/WKContentView.mm:
* UIProcess/API/ios/WKContentViewInternal.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Rename "IDBTransactionIdentifier" to be more general purpose
https://bugs.webkit.org/show_bug.cgi?id=127717

Reviewed by Tim Horton.

Global rename of IDBTransactionIdentifier to IDBIdentifier.

* DatabaseProcess/IndexedDB/IDBIdentifier.h: Renamed from Source/WebKit2/DatabaseProcess/IndexedDB/IDBTransactionIdentifier.h.

* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:

* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:

* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

* Shared/WebCrossThreadCopier.cpp:
* Shared/WebCrossThreadCopier.h:

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Conditional=BLOB from URL interface to Blob-related methods, to prepare for adding URL API
https://bugs.webkit.org/show_bug.cgi?id=127719

Reviewed by Sam Weinig.

* html/DOMURL.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162878 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Use callOnMainThread() not dispatch_async() in MediaPlayerPrivateAVFoundationObjC
https://bugs.webkit.org/show_bug.cgi?id=127701

Reviewed by Eric Carlson.

dispatch_async(dispatch_get_main_queue(), ...) used to be fine so long as the main
thread was also the web thread. But since that's not the case on iOS, we should be
using callOnMainThread() instead (because it dispatches to the web thread, not as
its name implies, the main thread).

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createWeakPtr):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
(WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
(-[WebCoreAVFMovieObserver legibleOutput:didOutputAttributedStrings:nativeSampleBuffers:forItemTime:]):
(-[WebCoreAVFMovieObserver outputSequenceWasFlushed:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForResponseToAuthenticationChallenge:]):
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crashes in RemoteScrollingCoordinatorProxy::rootScrollingNodeID

Reviewed by Simon Fraser.

* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
Null-check the root scrolling node, in case something scrolls before
we've made the first remote layer/scrolling tree commit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Scrub WebKit API headers of WTF macros
https://bugs.webkit.org/show_bug.cgi?id=127706

Reviewed by David Kilzer.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_INSPECTOR.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_INSPECTOR.
* bindings/objc/DOMEvents.h: Guarded include of
DOM{Gesture,Touch}Event.h with TARGET_OS_IPHONE, since those features
are always enabled on iOS.
* platform/graphics/mac/MediaPlayerProxy.h: Replaced PLATFORM(IOS) with
TARGET_OS_IPHONE and ensured ENABLE_IOS_AIRPLAY is defined.
* platform/ios/SystemMemory.h: Replaced PLATFORM(IOS) with
TARGET_OS_IPHONE.
* platform/ios/wak/WKGraphics.h: Replaced PLATFORM(IOS_SIMULATOR) with
TARGET_IPHONE_SIMULATOR.

Source/WebKit/ios:

* WebCoreSupport/WebMIMETypeRegistry.h: Changed PLATFORM(IOS) to
TARGET_OS_IPHONE.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_INSPECTOR.
* WebView/WebPreferenceKeysPrivate.h: Changed ENABLE(REMOTE_INSPECTOR)
to !defined(ENABLE_REMOTE_INSPECTOR) || ENABLE_REMOTE_INSPECTOR. We are
in a TARGET_OS_IPHONE block, and ENABLE_REMOTE_INSPECTOR is enabled by
default on iOS, so include this block unless the feature is explicitly
disabled.
* postprocess-headers.sh: Stopped processing ENABLE_IOS_TOUCH_EVENTS
and ENABLE_IOS_GESTURE_EVENTS. These are now defined in DOMEvents.h.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig: Added ENABLE_INSPECTOR.

Tools:

* Scripts/check-for-inappropriate-macros-in-external-headers: Modified
the regex to require a '(' after the macro name in order to be
considered a match. This prevents things like 'ENABLE_SOME_FEATURE'
from being flagged as an ENABLE() macro.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a WKContentView initializer that takes a WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=127718

Reviewed by Tim Horton.

This initializer will be used by WKWebView.

* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView initWithFrame:configuration:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Revert the parts of r162629 that add a new pluginLoadPolicy and the context menu item.

We're leaving the parts that make us use PDFPlugin instead of showing the blocked
plugin indicator intact, though.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::pluginLoadPolicy):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::PDFPlugin):
(WebKit::PDFPlugin::handleContextMenuEvent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
(WebKit::WebPage::canPluginHandleResponse):

* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed gardening, unskip now passing webgl tests on EFL port.

* platform/efl-wk2/TestExpectations:
* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update bindings test expectations after r162872

* bindings/scripts/test/ObjC/DOMTestInterface.h:
* bindings/scripts/test/ObjC/DOMTestObj.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Copy relevant code from the iOS version of WKView to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=127721

Reviewed by Dan Bernstein.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView setFrame:]):
(-[WKWebView setBounds:]):
(-[WKWebView scrollView]):
(-[WKWebView browsingContextController]):
(-[WKWebView contentView:contentsSizeDidChange:]):
(-[WKWebView contentViewDidCommitLoadForMainFrame:]):
(-[WKWebView contentViewDidReceiveMobileDocType:]):
(-[WKWebView contentView:didChangeViewportArgumentsSize:initialScale:minimumScale:maximumScale:allowsUserScaling:]):
(-[WKWebView viewportHandlerDidChangeScales:]):
(-[WKWebView viewportHandler:didChangeViewportSize:]):
(-[WKWebView viewForZoomingInScrollView:]):
(-[WKWebView scrollViewWillBeginZooming:withView:]):
(-[WKWebView _didFinishScroll]):
(-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
(-[WKWebView scrollViewDidEndDecelerating:]):
(-[WKWebView scrollViewDidScrollToTop:]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setDocumentScale:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Tests crashing on Windows after r162816.
https://bugs.webkit.org/show_bug.cgi?id=127703.

Reviewed by Alexey Proskuryakov.

* accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::enableAccessibility):
(WebCore::AXObjectCache::disableAccessibility):
* accessibility/AXObjectCache.h: Un-inline some methods so that they can be exported.
* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Remove variable export in favor of function export.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Unreviewed build fix. Add missing export symbol.

* WebCore.exp.in:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162888 268f45cc-cd09-0410-ab3c-d52691b4dbfc