Fix the 32-bit build; make the open panel make a WK1 window.

* MiniBrowser/mac/AppDelegate.m:
(-[BrowserAppDelegate openDocument:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165752 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Provide preference to enable additional AVFoundation options
https://bugs.webkit.org/show_bug.cgi?id=130275

Reviewed by Eric Carlson.

../WebCore: 

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::doesHaveAttribute): Added.
* html/HTMLMediaElement.h:
* page/Settings.in: Add new attribute.
* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::doesHaveAttribute): Added stub to call private player object's
implementation of doesHaveAttribute.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::doesHaveAttribute):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::MediaPlayerPrivateAVFoundationCF::AVFWrapper::createAssetForURL): Check the <media> object,
and notify AVFoundationCF to use URI option if relevant.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Check the <media> object,
and notify AVFoundation to use URI option if relevant.

../WebKit/mac: 

* WebView/WebPreferenceKeysPrivate.h: Added new preference.
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]): Initialize preference to false.
(-[WebPreferences isInheritURIQueryComponentEnabled]): Added.
(-[WebPreferences setEnableInheritURIQueryComponent:]): Added.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Handle new preference.

../WebKit/win: 

* Interfaces/IWebPreferencesPrivate.idl: Added new preference.
* WebPreferenceKeysPrivate.h: Ditto.
* WebPreferences.cpp:
(WebPreferences::initializeDefaultSettings): Initialize preference to false.
(WebPreferences::isInheritURIQueryComponentEnabled): Added.
(WebPreferences::setEnableInheritURIQueryComponent): Added.
* WebPreferences.h:
* WebView.cpp:
(WebView::notifyPreferencesChanged): Handle new preference.

../WebKit2: 

* Shared/WebPreferencesStore.h: Added new preference.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetEnableInheritURIQueryComponent): Added.
(WKPreferencesGetEnableInheritURIQueryComponent): Added.
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Handle new preference.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: WebKitLegacy causes ASan build to fail
<rdar://problem/16344326>

Patch by David Farler <dfarler@apple.com> on 2014-03-17
Reviewed by David Kilzer.

* Configurations/DebugRelease.xcconfig: Remove $(inherited) from
OTHER_CFLAGS, OTHER_CPLUSPLUSFLAGS, OTHER_LDFLAGS to prevent
double complete ASAN flags.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add SPI for getting bundle parameters from the injected bundle
https://bugs.webkit.org/show_bug.cgi?id=130355

Reviewed by Dan Bernstein.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
(-[WKWebProcessBundleParameters initWithDictionary:]):
(-[WKWebProcessBundleParameters valueForKey:]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
(-[WKWebProcessPlugInController parameters]):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::InjectedBundle):
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::create):
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::bundleParameters):
(WebKit::InjectedBundle::platformInitialize):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: Reducing some code by using helper function ariaElementsFromAttribute
https://bugs.webkit.org/show_bug.cgi?id=130344

Reviewed by Chris Fleizach.

Change visibility of ariaElementsFromAttribute function from private to protected
so that other classes that derives from AccessibilityRenderObject can use it.

No new tests. No behaviour change.

* accessibility/AccessibilityRenderObject.h:
* accessibility/AccessibilityTableCell.cpp:
(WebCore::AccessibilityTableCell::columnHeaders):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unnecessary JSC::Handle null checks in bindings code.
<https://webkit.org/b/130356>

Use Handle::slot() directly instead of going through Handle::get().
This avoids null checking the HandleSlot, which isn't necessary here
anyway, and the code already assumes it'll never be null.

Reviewed by Gavin Barraclough.

* bindings/js/JSCSSRuleListCustom.cpp:
(WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
* bindings/js/JSCSSValueCustom.cpp:
(WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
(WebCore::JSCSSValueOwner::finalize):
* bindings/js/JSMutationObserverCustom.cpp:
(WebCore::JSMutationObserverOwner::isReachableFromOpaqueRoots):
* bindings/js/JSNodeCustom.cpp:
(WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
* bindings/js/JSNodeListCustom.cpp:
(WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
* bindings/js/JSTextTrackCueCustom.cpp:
(WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::finalize):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165757 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename WKThumbnailView to _WKThumbnailView
https://bugs.webkit.org/show_bug.cgi?id=130361

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
* UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
(-[_WKThumbnailView _didTakeSnapshot:]):
(-[_WKThumbnailView viewDidMoveToWindow]):
(-[_WKThumbnailView setScale:]):
(-[_WKThumbnailView setUsesSnapshot:]):
(-[_WKThumbnailView _setThumbnailLayer:]):
(-[_WKThumbnailView _thumbnailLayer]):
* UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setThumbnailView:]):
(-[WKView _thumbnailView]):
(-[WKView _updateThumbnailViewLayer]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
* WebKit2.xcodeproj/project.pbxproj:

* MigrateHeaders.make:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165758 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Standardize on start/length in text input IPC methods
https://bugs.webkit.org/show_bug.cgi?id=130359

Reviewed by Anders Carlsson.

Some IPC methods used start/length, and others use start/end. This was confusing.

While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
(I want to move this code to WebPage.cpp, where it could be shared with iOS and
other platforms, as it doesn't depend on Foundation much).

* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView setMarkedText:selectedRange:replacementRange:]):
(-[WKView attributedSubstringForProposedRange:actualRange:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::insertDictatedText):
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setComposition):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::convertToRange):
(WebKit::WebPage::firstRectForCharacterRange):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165759 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][CMake] Fix WebKit2 unused parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=130316

Reviewed by Martin Robinson.

* Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
* UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
* UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
* UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
* UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
* UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
* UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
* UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
* UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165760 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Rewrite WebHTMLConverter::_computedStringForNode in C++
https://bugs.webkit.org/show_bug.cgi?id=130274

Reviewed by Andreas Kling.

Rewrote WebHTMLConverter::_computedStringForNode as HTMLConverterCaches::propertyValueForNode.

* platform/mac/HTMLConverter.h: Removed unused caches.
* platform/mac/HTMLConverter.mm:
(HTMLConverterCaches::computedStylePropertyForElement): Added use const String& instead of String& on property name.
(HTMLConverterCaches::inlineStylePropertyForElement): Ditto.
(HTMLConverterCaches::propertyValueForNode): Renamed and rewritten from _computedStringForNode.
(-[WebHTMLConverter _stringForNode:property:]): Simply return the computed value instead of storing it in the cache
now that the computing the value is fast.
(-[WebHTMLConverter dealloc]):
(-[WebHTMLConverter init]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix 32-bit OS X build.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::platformInitialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] human readable language code for tracks
https://bugs.webkit.org/show_bug.cgi?id=124514

Reviewed by Martin Robinson.

.:

* Source/autotools/FindDependencies.m4: Add gstreamer-tag-1.0.
* Source/cmake/FindGStreamer.cmake: Same.
* Source/cmake/OptionsEfl.cmake: Same.
* Source/cmake/OptionsGTK.cmake: Same.

Source/WebCore:

* PlatformEfl.cmake: Add GSTREAMER_TAG_INCLUDE_DIRS and GSTREAMER_TAG_LIBRARIES.
* PlatformGTK.cmake: Same.
* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::getLanguageCode): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Use getLanguageCode() for languages instead of just getTag().


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165763 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK2: support data detectors driven action sheet..
https://bugs.webkit.org/show_bug.cgi?id=130362
<rdar://problem/16319711>

Reviewed by Benjamin Poulain.

* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showDataDetectorsSheet]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WebVTT] Extending WebVTT Rendering with Regions
https://bugs.webkit.org/show_bug.cgi?id=109822

Reviewed by Eric Carlson.

Merged from Blink (patch by Victor Carbune vcarbune@chromium.org):
https://chromium.googlesource.com/chromium/blink/+/0cdebc1d76d41bfcb9c4b022e54a4fbff132225d

No new tests, as this feature is not active in default builds. New tests will be added
in an upcoming bug.

* css/mediaControls.css:
(video::-webkit-media-text-track-region):
(video::-webkit-media-text-track-region-container):
(video::-webkit-media-text-track-region-container.scrolling):
(video::-webkit-media-text-track-display):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlTextTrackContainerElement::updateDisplay):
* html/track/TextTrack.cpp:
(WebCore::TextTrack::~TextTrack):
* html/track/TextTrackCue.cpp:
* html/track/TextTrackRegion.cpp:
(WebCore::TextTrackRegion::TextTrackRegion):
(WebCore::TextTrackRegion::textTrackCueContainerScrollingClass):
(WebCore::TextTrackRegion::textTrackCueContainerShadowPseudoId):
(WebCore::TextTrackRegion::textTrackRegionShadowPseudoId):
(WebCore::TextTrackRegion::appendTextTrackCueBox):
(WebCore::TextTrackRegion::displayLastTextTrackCueBox):
(WebCore::TextTrackRegion::willRemoveTextTrackCueBox):
(WebCore::TextTrackRegion::getDisplayTree):
(WebCore::TextTrackRegion::prepareRegionDisplayTree):
(WebCore::TextTrackRegion::startTimer):
(WebCore::TextTrackRegion::stopTimer):
(WebCore::TextTrackRegion::scrollTimerFired):
* html/track/TextTrackRegion.h:
(WebCore::TextTrackRegion::create):
(WebCore::TextTrackRegion::isScrollingRegion):
(WebCore::TextTrackRegion::ownerDocument):
* html/track/TextTrackRegion.idl:
* html/track/TextTrackRegionList.cpp:
(WebCore::TextTrackRegionList::getRegionById):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::~VTTCue):
(WebCore::VTTCue::setIsActive):
(WebCore::VTTCue::removeDisplayTree):
* html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::createNewRegion):
* rendering/RenderVTTCue.cpp:
(WebCore::RenderVTTCue::layout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165765 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Follow-up fix.

* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move convertToRange() helper to cross-platform WebPage.cpp
https://bugs.webkit.org/show_bug.cgi?id=130365

Reviewed by Tim Horton.

Also renamed it to rangeFromEditingLocationAndLength().

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::rangeFromEditingLocationAndLength):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::insertText):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::characterIndexForPoint):
(WebKit::WebPage::firstRectForCharacterRange):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165767 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] URTBF after r165755 for non Apple platforms, stub functions added.

* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::platformInitialize):
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::platformInitialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165768 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Undo some accidental Gtk changes from http://trac.webkit.org/changeset/165759

* UIProcess/WebPageProxy.cpp:
* WebProcess/WebPage/WebPage.messages.in:



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