Commit 4da1af80 authored by dbates@webkit.org's avatar dbates@webkit.org

[iOS] Upstream WebCore/page changes

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

Reviewed by Darin Adler.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.h:
(WebCore::EventNames::isGestureEventType): Added.
* page/AlternativeTextClient.h: Do not define WTF_USE_DICTATION_ALTERNATIVES when building for iOS.
* page/Chrome.cpp:
(WebCore::Chrome::Chrome):
(WebCore::Chrome::dispatchViewportPropertiesDidChange): Added; guarded by PLATFORM(IOS).
(WebCore::Chrome::setCursor): Make this an empty function when building for iOS.
(WebCore::Chrome::setCursorHiddenUntilMouseMoves): Ditto.
(WebCore::Chrome::didReceiveDocType): Added; iOS-specific.
* page/Chrome.h:
(WebCore::Chrome::setDispatchViewportDataDidChangeSuppressed): Added; guarded by PLATFORM(IOS).
* page/ChromeClient.h:
(WebCore::ChromeClient::didFlushCompositingLayers): Added; guarded by PLATFORM(IOS).
(WebCore::ChromeClient::fetchCustomFixedPositionLayoutRect): Added; guarded by PLATFORM(IOS).
(WebCore::ChromeClient::updateViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install): Added iOS-specific code.
(WebCore::DOMTimer::fired): Ditto.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow): Ditto.
(WebCore::DOMWindow::innerHeight): Ditto.
(WebCore::DOMWindow::innerWidth): Ditto.
(WebCore::DOMWindow::scrollX): Ditto.
(WebCore::DOMWindow::scrollY): Ditto.
(WebCore::DOMWindow::scrollBy): Ditto.
(WebCore::DOMWindow::scrollTo): Ditto.
(WebCore::DOMWindow::clearTimeout): Ditto.
(WebCore::DOMWindow::addEventListener): Ditto.
(WebCore::DOMWindow::incrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
(WebCore::DOMWindow::decrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
(WebCore::DOMWindow::resetAllGeolocationPermission): Added; Also added FIXME comment.
(WebCore::DOMWindow::removeEventListener): Added iOS-specific code.
(WebCore::DOMWindow::dispatchEvent): Modified to prevent dispatching duplicate pageshow and pagehide
events per <http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow>.
(WebCore::DOMWindow::removeAllEventListeners): Added iOS-specific code.
* page/DOMWindow.h:
* page/DOMWindow.idl: Added IOS_GESTURE_EVENTS-guarded attributes: ongesture{change, end, start}. Also
added IOS_TOUCH_EVENTS-guarded attributes: {Touch, TouchList}Constructor.
* page/EditorClient.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler): Added iOS-specific code.
(WebCore::EventHandler::clear): Ditto.
(WebCore::EventHandler::startPanScrolling): Make this an empty function when building for iOS.
(WebCore::EventHandler::handleMousePressEvent): Modified to invalidate a click when the clicked node is
null. Also, opt out of code for updating the scrollbars as UIKit manages scrollbars on iOS.
(WebCore::EventHandler::handleMouseMoveEvent): Opt of code for updating the scrollbars and cursor when building on iOS.
(WebCore::hitTestResultInFrame): Made this a file-local static function since it's only used in EventHandler.cpp.
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Added iOS-specific code.
* page/EventHandler.h:
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::Frame): Added iOS-specific code.
(WebCore::Frame::scrollOverflowLayer): Added; iOS-specific.
(WebCore::Frame::overflowAutoScrollTimerFired): Added; iOS-specific.
(WebCore::Frame::startOverflowAutoScroll): Added; iOS-specific.
(WebCore::Frame::checkOverflowScroll): Added; iOS-specific.
(WebCore::Frame::willDetachPage): Added iOS-specific code.
(WebCore::Frame::createView): Ditto.
(WebCore::Frame::setSelectionChangeCallbacksDisabled): Added; iOS-specific.
(WebCore::Frame::selectionChangeCallbacksDisabled): Added; iOS-specific.
* page/Frame.h:
(WebCore::Frame::timersPaused): Added; guarded by PLATFORM(IOS).
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): Added iOS-specific code.
(WebCore::FrameView::clear): Ditto.
(WebCore::FrameView::flushCompositingStateForThisFrame): Ditto.
(WebCore::FrameView::graphicsLayerForPlatformWidget): Added.
(WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Added.
(WebCore::FrameView::layout): Added iOS-specific code.
(WebCore::countRenderedCharactersInRenderObjectWithThreshold): Added; helper function used by FrameView::renderedCharactersExceed().
Also added FIXME comment.
(WebCore::FrameView::renderedCharactersExceed): Added.
(WebCore::FrameView::visibleContentsResized): Added iOS-specific code.
(WebCore::FrameView::adjustTiledBackingCoverage): Ditto.
(WebCore::FrameView::performPostLayoutTasks): Ditto.
(WebCore::FrameView::sendResizeEventIfNeeded): Ditto.
(WebCore::FrameView::paintContents): Added iOS-specific code. Also added FIXME comments.
(WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Added; iOS-specific.
(WebCore::FrameView::setCustomFixedPositionLayoutRect): Added; iOS-specific.
(WebCore::FrameView::updateFixedPositionLayoutRect): Added; iOS-specific.
* page/FrameView.h:
* page/Navigator.cpp:
(WebCore::Navigator::standalone): Added; iOS-specific.
* page/Navigator.h:
* page/Navigator.idl: Added WTF_PLATFORM_IOS-guarded attribute: standalone. Also added FIXME comment.
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform): Added iOS-specific code.
* page/Page.h:
(WebCore::Page::hasCustomHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
to remove this method.
(WebCore::Page::customHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
to remove this method.
* page/PageGroup.cpp:
(WebCore::PageGroup::removeVisitedLink): Added.
* page/PageGroup.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setScriptEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setStandalone): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAudioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::audioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setNetworkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::networkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::sharedNetworkInterfaceNameGlobal): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setNetworkInterfaceName): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::networkInterfaceName): Added; guarded by PLATFORM(IOS).
* page/Settings.h:
(WebCore::Settings::setMaxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
(WebCore::Settings::maxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
(WebCore::Settings::standalone): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::telephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setMediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::mediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setShouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::shouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setShouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::shouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAlwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::alwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAlwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::alwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
* page/Settings.in: Added IOS_AIRPLAY-guarded setting: mediaPlaybackAllowsAirPlay.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Added iOS-specific code and FIXME comment.
* page/ios/EventHandlerIOS.mm: Added.
* page/ios/FrameIOS.mm: Added.
* page/mac/ChromeMac.mm:
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair): Opt out of code when building for iOS.
(WebCore::Page::removeSchedulePair): Ditto.
* page/mac/SettingsMac.mm:
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Added iOS-specific code.
* page/mac/WebCoreFrameView.h:

Source/WebKit/ios:

* WebCoreSupport/WebChromeClientIOS.mm: Substitute ENABLE(IOS_TOUCH_EVENTS) for ENABLE(TOUCH_EVENTS).

Source/WebKit2:

* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm: Added.
* WebProcess/WebPage/WebPage.cpp: Include header <WebCore/HitTestResult.h>.

Source/WTF:

* wtf/FeatureDefines.h: Define ENABLE_IOS_TOUCH_EVENTS to be enabled by default
when building iOS with ENABLE(TOUCH_EVENTS).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e48b0339
2013-12-27 Daniel Bates <dabates@apple.com>
[iOS] Upstream WebCore/page changes
https://bugs.webkit.org/show_bug.cgi?id=126180
Reviewed by Darin Adler.
* wtf/FeatureDefines.h: Define ENABLE_IOS_TOUCH_EVENTS to be enabled by default
when building iOS with ENABLE(TOUCH_EVENTS).
2013-12-25 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Nix] Building with DRAG_SUPPORT enabled
......
......@@ -68,6 +68,10 @@
#define ENABLE_CSS_IMAGE_SET 1
#endif
#if !defined(ENABLE_CURSOR_SUPPORT)
#define ENABLE_CURSOR_SUPPORT 0
#endif
#if !defined(ENABLE_DISK_IMAGE_CACHE)
#define ENABLE_DISK_IMAGE_CACHE 1
#endif
......@@ -84,6 +88,10 @@
#define ENABLE_ICONDATABASE 0
#endif
#if !defined(ENABLE_LETTERPRESS)
#define ENABLE_LETTERPRESS 1
#endif
#if !defined(ENABLE_IOS_AUTOCORRECT_AND_AUTOCAPITALIZE)
#define ENABLE_IOS_AUTOCORRECT_AND_AUTOCAPITALIZE 1
#endif
......@@ -92,14 +100,14 @@
#define ENABLE_IOS_GESTURE_EVENTS 1
#endif
#if !defined(ENABLE_LETTERPRESS)
#define ENABLE_LETTERPRESS 1
#endif
#if !defined(ENABLE_IOS_TEXT_AUTOSIZING)
#define ENABLE_IOS_TEXT_AUTOSIZING 1
#endif
#if !defined(ENABLE_IOS_TOUCH_EVENTS)
#define ENABLE_IOS_TOUCH_EVENTS 1
#endif
#if !defined(ENABLE_METER_ELEMENT)
#define ENABLE_METER_ELEMENT 0
#endif
......@@ -430,6 +438,10 @@
#define ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED 0
#endif
#if !defined(ENABLE_CURSOR_SUPPORT)
#define ENABLE_CURSOR_SUPPORT 1
#endif
#if !defined(ENABLE_CUSTOM_SCHEME_HANDLER)
#define ENABLE_CUSTOM_SCHEME_HANDLER 0
#endif
......@@ -894,4 +906,8 @@
#error "ENABLE(REMOTE_INSPECTOR) requires ENABLE(INSPECTOR)"
#endif
#if ENABLE(IOS_TOUCH_EVENTS) && !ENABLE(TOUCH_EVENTS)
#error "ENABLE(IOS_TOUCH_EVENTS) requires ENABLE(TOUCH_EVENTS)"
#endif
#endif /* WTF_FeatureDefines_h */
2013-12-27 Daniel Bates <dabates@apple.com>
[iOS] Upstream WebCore/page changes
https://bugs.webkit.org/show_bug.cgi?id=126180
Reviewed by Darin Adler.
* WebCore.xcodeproj/project.pbxproj:
* dom/EventNames.h:
(WebCore::EventNames::isGestureEventType): Added.
* page/AlternativeTextClient.h: Do not define WTF_USE_DICTATION_ALTERNATIVES when building for iOS.
* page/Chrome.cpp:
(WebCore::Chrome::Chrome):
(WebCore::Chrome::dispatchViewportPropertiesDidChange): Added; guarded by PLATFORM(IOS).
(WebCore::Chrome::setCursor): Make this an empty function when building for iOS.
(WebCore::Chrome::setCursorHiddenUntilMouseMoves): Ditto.
(WebCore::Chrome::didReceiveDocType): Added; iOS-specific.
* page/Chrome.h:
(WebCore::Chrome::setDispatchViewportDataDidChangeSuppressed): Added; guarded by PLATFORM(IOS).
* page/ChromeClient.h:
(WebCore::ChromeClient::didFlushCompositingLayers): Added; guarded by PLATFORM(IOS).
(WebCore::ChromeClient::fetchCustomFixedPositionLayoutRect): Added; guarded by PLATFORM(IOS).
(WebCore::ChromeClient::updateViewportConstrainedLayers): Added; guarded by PLATFORM(IOS).
* page/DOMTimer.cpp:
(WebCore::DOMTimer::install): Added iOS-specific code.
(WebCore::DOMTimer::fired): Ditto.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::DOMWindow): Ditto.
(WebCore::DOMWindow::innerHeight): Ditto.
(WebCore::DOMWindow::innerWidth): Ditto.
(WebCore::DOMWindow::scrollX): Ditto.
(WebCore::DOMWindow::scrollY): Ditto.
(WebCore::DOMWindow::scrollBy): Ditto.
(WebCore::DOMWindow::scrollTo): Ditto.
(WebCore::DOMWindow::clearTimeout): Ditto.
(WebCore::DOMWindow::addEventListener): Ditto.
(WebCore::DOMWindow::incrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
(WebCore::DOMWindow::decrementScrollEventListenersCount): Added; guarded by PLATFORM(IOS).
(WebCore::DOMWindow::resetAllGeolocationPermission): Added; Also added FIXME comment.
(WebCore::DOMWindow::removeEventListener): Added iOS-specific code.
(WebCore::DOMWindow::dispatchEvent): Modified to prevent dispatching duplicate pageshow and pagehide
events per <http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#event-pageshow>.
(WebCore::DOMWindow::removeAllEventListeners): Added iOS-specific code.
* page/DOMWindow.h:
* page/DOMWindow.idl: Added IOS_GESTURE_EVENTS-guarded attributes: ongesture{change, end, start}. Also
added IOS_TOUCH_EVENTS-guarded attributes: {Touch, TouchList}Constructor.
* page/EditorClient.h:
* page/EventHandler.cpp:
(WebCore::EventHandler::EventHandler): Added iOS-specific code.
(WebCore::EventHandler::clear): Ditto.
(WebCore::EventHandler::startPanScrolling): Make this an empty function when building for iOS.
(WebCore::EventHandler::handleMousePressEvent): Modified to invalidate a click when the clicked node is
null. Also, opt out of code for updating the scrollbars as UIKit manages scrollbars on iOS.
(WebCore::EventHandler::handleMouseMoveEvent): Opt of code for updating the scrollbars and cursor when building on iOS.
(WebCore::hitTestResultInFrame): Made this a file-local static function since it's only used in EventHandler.cpp.
(WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled): Added iOS-specific code.
* page/EventHandler.h:
* page/FocusController.h:
* page/Frame.cpp:
(WebCore::Frame::Frame): Added iOS-specific code.
(WebCore::Frame::scrollOverflowLayer): Added; iOS-specific.
(WebCore::Frame::overflowAutoScrollTimerFired): Added; iOS-specific.
(WebCore::Frame::startOverflowAutoScroll): Added; iOS-specific.
(WebCore::Frame::checkOverflowScroll): Added; iOS-specific.
(WebCore::Frame::willDetachPage): Added iOS-specific code.
(WebCore::Frame::createView): Ditto.
(WebCore::Frame::setSelectionChangeCallbacksDisabled): Added; iOS-specific.
(WebCore::Frame::selectionChangeCallbacksDisabled): Added; iOS-specific.
* page/Frame.h:
(WebCore::Frame::timersPaused): Added; guarded by PLATFORM(IOS).
* page/FrameView.cpp:
(WebCore::FrameView::FrameView): Added iOS-specific code.
(WebCore::FrameView::clear): Ditto.
(WebCore::FrameView::flushCompositingStateForThisFrame): Ditto.
(WebCore::FrameView::graphicsLayerForPlatformWidget): Added.
(WebCore::FrameView::scheduleLayerFlushAllowingThrottling): Added.
(WebCore::FrameView::layout): Added iOS-specific code.
(WebCore::countRenderedCharactersInRenderObjectWithThreshold): Added; helper function used by FrameView::renderedCharactersExceed().
Also added FIXME comment.
(WebCore::FrameView::renderedCharactersExceed): Added.
(WebCore::FrameView::visibleContentsResized): Added iOS-specific code.
(WebCore::FrameView::adjustTiledBackingCoverage): Ditto.
(WebCore::FrameView::performPostLayoutTasks): Ditto.
(WebCore::FrameView::sendResizeEventIfNeeded): Ditto.
(WebCore::FrameView::paintContents): Added iOS-specific code. Also added FIXME comments.
(WebCore::FrameView::setUseCustomFixedPositionLayoutRect): Added; iOS-specific.
(WebCore::FrameView::setCustomFixedPositionLayoutRect): Added; iOS-specific.
(WebCore::FrameView::updateFixedPositionLayoutRect): Added; iOS-specific.
* page/FrameView.h:
* page/Navigator.cpp:
(WebCore::Navigator::standalone): Added; iOS-specific.
* page/Navigator.h:
* page/Navigator.idl: Added WTF_PLATFORM_IOS-guarded attribute: standalone. Also added FIXME comment.
* page/NavigatorBase.cpp:
(WebCore::NavigatorBase::platform): Added iOS-specific code.
* page/Page.h:
(WebCore::Page::hasCustomHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
to remove this method.
(WebCore::Page::customHTMLTokenizerTimeDelay): Added; guarded by PLATFORM(IOS). Also added FIXME comment
to remove this method.
* page/PageGroup.cpp:
(WebCore::PageGroup::removeVisitedLink): Added.
* page/PageGroup.h:
* page/Settings.cpp:
(WebCore::Settings::Settings):
(WebCore::Settings::setScriptEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setStandalone): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAudioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::audioSessionCategoryOverride): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setNetworkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::networkDataUsageTrackingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::sharedNetworkInterfaceNameGlobal): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setNetworkInterfaceName): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::networkInterfaceName): Added; guarded by PLATFORM(IOS).
* page/Settings.h:
(WebCore::Settings::setMaxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
(WebCore::Settings::maxParseDuration): Added; guarded by PLATFORM(IOS). Also added FIXME comment.
(WebCore::Settings::standalone): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setTelephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::telephoneNumberParsingEnabled): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setMediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::mediaDataLoadsAutomatically): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setShouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::shouldTransformsAffectOverflow): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setShouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::shouldDispatchJavaScriptWindowOnErrorEvents): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAlwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::alwaysUseBaselineOfPrimaryFont): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::setAlwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
(WebCore::Settings::alwaysUseAcceleratedOverflowScroll): Added; guarded by PLATFORM(IOS).
* page/Settings.in: Added IOS_AIRPLAY-guarded setting: mediaPlaybackAllowsAirPlay.
* page/animation/CSSPropertyAnimation.cpp:
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap): Added iOS-specific code and FIXME comment.
* page/ios/EventHandlerIOS.mm: Added.
* page/ios/FrameIOS.mm: Added.
* page/mac/ChromeMac.mm:
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair): Opt out of code when building for iOS.
(WebCore::Page::removeSchedulePair): Ditto.
* page/mac/SettingsMac.mm:
(WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault): Added iOS-specific code.
* page/mac/WebCoreFrameView.h:
2013-12-27 Gavin Barraclough <barraclough@apple.com>
Merge PageVisibilityState & ViewState::IsVisible in WebKit2
......@@ -5466,6 +5466,8 @@
CE057FA61220731100A476D5 /* DocumentMarkerController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE057FA41220731100A476D5 /* DocumentMarkerController.h */; settings = {ATTRIBUTES = (Private, ); }; };
CE08C3D1152B599A0021B8C2 /* AlternativeTextController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CE08C3CF152B599A0021B8C2 /* AlternativeTextController.cpp */; };
CE08C3D2152B599A0021B8C2 /* AlternativeTextController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */; settings = {ATTRIBUTES = (); }; };
FE6938B61045D67E008EABB6 /* EventHandlerIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */; };
FED13D3D0CEA936A00D89466 /* FrameIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = FED13D3B0CEA936A00D89466 /* FrameIOS.mm */; };
CE7B2DB31586ABAD0098B3FA /* AlternativeTextUIController.h in Headers */ = {isa = PBXBuildFile; fileRef = CE7B2DAF1586ABAD0098B3FA /* AlternativeTextUIController.h */; settings = {ATTRIBUTES = (Private, ); }; };
CE7B2DB41586ABAD0098B3FA /* AlternativeTextUIController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CE7B2DB01586ABAD0098B3FA /* AlternativeTextUIController.mm */; };
CE7B2DB51586ABAD0098B3FA /* TextAlternativeWithRange.h in Headers */ = {isa = PBXBuildFile; fileRef = CE7B2DB11586ABAD0098B3FA /* TextAlternativeWithRange.h */; settings = {ATTRIBUTES = (Private, ); }; };
......@@ -12621,6 +12623,8 @@
CE057FA41220731100A476D5 /* DocumentMarkerController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DocumentMarkerController.h; sourceTree = "<group>"; };
CE08C3CF152B599A0021B8C2 /* AlternativeTextController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AlternativeTextController.cpp; sourceTree = "<group>"; };
CE08C3D0152B599A0021B8C2 /* AlternativeTextController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlternativeTextController.h; sourceTree = "<group>"; };
FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EventHandlerIOS.mm; sourceTree = "<group>"; };
FED13D3B0CEA936A00D89466 /* FrameIOS.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FrameIOS.mm; sourceTree = "<group>"; };
CE5CB1B314EDAB6F00BB2795 /* EventSender.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventSender.h; sourceTree = "<group>"; };
CE7B2DAF1586ABAD0098B3FA /* AlternativeTextUIController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlternativeTextUIController.h; path = mac/AlternativeTextUIController.h; sourceTree = "<group>"; };
CE7B2DB01586ABAD0098B3FA /* AlternativeTextUIController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AlternativeTextUIController.mm; path = mac/AlternativeTextUIController.mm; sourceTree = "<group>"; };
......@@ -15731,6 +15735,7 @@
isa = PBXGroup;
children = (
316FE1060E6E1D8400BF6088 /* animation */,
18A6CD6F0D8F2025001DC3CE /* ios */,
93C09A820B064F05005ABD4D /* mac */,
1AF62EE114DA22A70041556C /* scrolling */,
8538F0000AD71770006A81D1 /* AbstractView.idl */,
......@@ -20538,6 +20543,15 @@
path = mediasource;
sourceTree = "<group>";
};
18A6CD6F0D8F2025001DC3CE /* ios */ = {
isa = PBXGroup;
children = (
FE6938B51045D67E008EABB6 /* EventHandlerIOS.mm */,
FED13D3B0CEA936A00D89466 /* FrameIOS.mm */,
);
path = ios;
sourceTree = "<group>";
};
CE79D68617F220ED00815C00 /* ios */ = {
isa = PBXGroup;
children = (
......@@ -26350,6 +26364,7 @@
850657010AAB4763002D15C0 /* DOMStyleSheet.mm in Sources */,
850657030AAB4763002D15C0 /* DOMStyleSheetList.mm in Sources */,
85ACA99D0A9B575900671E90 /* DOMText.mm in Sources */,
FED13D3D0CEA936A00D89466 /* FrameIOS.mm in Sources */,
933A14AA0B7D1D0900A53FFD /* DOMTextEvent.mm in Sources */,
188604B30F2E654A000B6443 /* DOMTimer.cpp in Sources */,
76FC2B0B12370DA0006A991A /* DOMTokenList.cpp in Sources */,
......@@ -28461,6 +28476,7 @@
49C7B9E51042D32F0009D447 /* WebGLTexture.cpp in Sources */,
0C3F1F5A10C8871200D72CE1 /* WebGLUniformLocation.cpp in Sources */,
77A17A7712F28642004E02F6 /* WebGLVertexArrayObjectOES.cpp in Sources */,
FE6938B61045D67E008EABB6 /* EventHandlerIOS.mm in Sources */,
31C0FF210E4CEB6E007D6FE5 /* WebKitAnimationEvent.cpp in Sources */,
976D6C7B122B8A3D001FD1F7 /* WebKitBlobBuilder.cpp in Sources */,
150B923915F08DC400E10986 /* WebKitCSSArrayFunctionValue.cpp in Sources */,
......@@ -290,6 +290,11 @@ public:
DOM_EVENT_NAMES_FOR_EACH(DOM_EVENT_NAMES_DECLARE)
#undef DOM_EVENT_NAMES_DECLARE
inline bool isGestureEventType(const AtomicString& eventType) const
{
return eventType == gesturestartEvent || eventType == gesturechangeEvent || eventType == gestureendEvent;
}
inline bool isTouchEventType(const AtomicString& eventType) const
{
return eventType == touchstartEvent
......
......@@ -31,10 +31,10 @@
#include <wtf/Vector.h>
#include <wtf/text/WTFString.h>
#if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
#if !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
// Some platforms provide UI for suggesting alternative dictation text.
#define WTF_USE_DICTATION_ALTERNATIVES 1
#endif // PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
#endif // !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
namespace WebCore {
......
......@@ -26,6 +26,7 @@
#include "DNS.h"
#include "DateTimeChooser.h"
#include "Document.h"
#include "DocumentType.h"
#include "FileIconLoader.h"
#include "FileChooser.h"
#include "FileList.h"
......@@ -65,6 +66,9 @@ Chrome::Chrome(Page& page, ChromeClient& client)
: m_page(page)
, m_client(client)
, m_displayID(0)
#if PLATFORM(IOS)
, m_isDispatchViewportDataDidChangeSuppressed(false)
#endif
{
}
......@@ -477,7 +481,7 @@ PassOwnPtr<ColorChooser> Chrome::createColorChooser(ColorChooserClient* client,
}
#endif
#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
#if ENABLE(DATE_AND_TIME_INPUT_TYPES) && !PLATFORM(IOS)
PassRefPtr<DateTimeChooser> Chrome::openDateTimeChooser(DateTimeChooserClient* client, const DateTimeChooserParameters& parameters)
{
notifyPopupOpeningObservers();
......@@ -498,17 +502,29 @@ void Chrome::loadIconForFiles(const Vector<String>& filenames, FileIconLoader* l
void Chrome::dispatchViewportPropertiesDidChange(const ViewportArguments& arguments) const
{
#if PLATFORM(IOS)
if (m_isDispatchViewportDataDidChangeSuppressed)
return;
#endif
m_client.dispatchViewportPropertiesDidChange(arguments);
}
void Chrome::setCursor(const Cursor& cursor)
{
#if ENABLE(CURSOR_SUPPORT)
m_client.setCursor(cursor);
#else
UNUSED_PARAM(cursor);
#endif
}
void Chrome::setCursorHiddenUntilMouseMoves(bool hiddenUntilMouseMoves)
{
#if ENABLE(CURSOR_SUPPORT)
m_client.setCursorHiddenUntilMouseMoves(hiddenUntilMouseMoves);
#else
UNUSED_PARAM(hiddenUntilMouseMoves);
#endif
}
#if ENABLE(REQUEST_ANIMATION_FRAME)
......@@ -602,6 +618,26 @@ bool Chrome::requiresFullscreenForVideoPlayback()
return m_client.requiresFullscreenForVideoPlayback();
}
#if PLATFORM(IOS)
// FIXME: Make argument, frame, a reference.
void Chrome::didReceiveDocType(Frame* frame)
{
ASSERT(frame);
if (!frame->isMainFrame())
return;
DocumentType* documentType = frame->document()->doctype();
if (!documentType) {
// FIXME: We should notify the client when <!DOCTYPE> is removed so that
// it can adjust the viewport accordingly. See <rdar://problem/15417894>.
return;
}
if (documentType->publicId().contains("xhtml mobile", false))
m_client.didReceiveMobileDocType();
}
#endif
void Chrome::registerPopupOpeningObserver(PopupOpeningObserver* observer)
{
ASSERT(observer);
......
......@@ -155,8 +155,9 @@ public:
#if ENABLE(INPUT_TYPE_COLOR)
PassOwnPtr<ColorChooser> createColorChooser(ColorChooserClient*, const Color& initialColor);
#endif
#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, const DateTimeChooserParameters&);
#if ENABLE(DATE_AND_TIME_INPUT_TYPES) && !PLATFORM(IOS)
PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, const DateTimeChooserParameters&)
#endif
void runOpenPanel(Frame*, PassRefPtr<FileChooser>);
......@@ -179,6 +180,13 @@ public:
PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
#if PLATFORM(IOS)
// FIXME: Can we come up with a better name for this setter?
void setDispatchViewportDataDidChangeSuppressed(bool dispatchViewportDataDidChangeSuppressed) { m_isDispatchViewportDataDidChangeSuppressed = dispatchViewportDataDidChangeSuppressed; }
void didReceiveDocType(Frame*);
#endif
void registerPopupOpeningObserver(PopupOpeningObserver*);
void unregisterPopupOpeningObserver(PopupOpeningObserver*);
......@@ -189,6 +197,9 @@ private:
ChromeClient& m_client;
PlatformDisplayID m_displayID;
Vector<PopupOpeningObserver*> m_popupOpeningObservers;
#if PLATFORM(IOS)
bool m_isDispatchViewportDataDidChangeSuppressed;
#endif
};
}
......
......@@ -40,6 +40,16 @@
#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
#if PLATFORM(IOS)
#include "PlatformLayer.h"
#define NSResponder WAKResponder
#ifndef __OBJC__
class WAKResponder;
#else
@class WAKResponder;
#endif
#endif
#if ENABLE(SQL_DATABASE)
#include "DatabaseDetails.h"
#endif
......@@ -62,14 +72,15 @@ class Geolocation;
class GraphicsContext3D;
class GraphicsLayer;
class GraphicsLayerFactory;
class HitTestResult;
class HTMLInputElement;
class HitTestResult;
class IntRect;
class NavigationAction;
class Node;
class Page;
class PopupMenuClient;
class SecurityOrigin;
class ViewportConstraints;
class Widget;
struct DateTimeChooserParameters;
......@@ -156,8 +167,10 @@ public:
virtual IntRect rootViewToScreen(const IntRect&) const = 0;
virtual PlatformPageClient platformPageClient() const = 0;
virtual void scrollbarsModeDidChange() const = 0;
#if ENABLE(CURSOR_SUPPORT)
virtual void setCursor(const Cursor&) = 0;
virtual void setCursorHiddenUntilMouseMoves(bool) = 0;
#endif
#if ENABLE(REQUEST_ANIMATION_FRAME) && !USE(REQUEST_ANIMATION_FRAME_TIMER)
virtual void scheduleAnimation() = 0;
#endif
......@@ -212,11 +225,46 @@ public:
virtual bool shouldReplaceWithGeneratedFileForUpload(const String& path, String& generatedFilename);
virtual String generateReplacementFile(const String& path);
#if ENABLE(IOS_TOUCH_EVENTS)
virtual void didPreventDefaultForEvent() = 0;
#endif
#if PLATFORM(IOS)
virtual void didReceiveMobileDocType() = 0;
virtual void setNeedsScrollNotifications(Frame*, bool) = 0;
virtual void observedContentChange(Frame*) = 0;
virtual void clearContentChangeObservers(Frame*) = 0;
virtual void notifyRevealedSelectionByScrollingFrame(Frame*) = 0;
enum LayoutType { NormalLayout, Scroll };
virtual void didLayout(LayoutType = NormalLayout) = 0;
virtual void didStartOverflowScroll() = 0;
virtual void didEndOverflowScroll() = 0;
// FIXME: Remove this functionality. This functionality was added to workaround an issue (<rdar://problem/5973875>)
// where the unconfirmed text in a text area would be removed when a person clicks in the text area before a
// suggestion is shown. We should fix this issue in <rdar://problem/5975559>.
virtual void suppressFormNotifications() = 0;
virtual void restoreFormNotifications() = 0;
virtual void didFlushCompositingLayers() { }
virtual bool fetchCustomFixedPositionLayoutRect(IntRect&) { return false; }
// FIXME: Use std::unique_ptr instead of OwnPtr.
virtual void updateViewportConstrainedLayers(HashMap<PlatformLayer*, OwnPtr<ViewportConstraints>>&, HashMap<PlatformLayer*, PlatformLayer*>&) { }
virtual void addOrUpdateScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer, const IntSize& scrollSize, bool allowHorizontalScrollbar, bool allowVerticalScrollbar) = 0;
virtual void removeScrollingLayer(Node*, PlatformLayer* scrollingLayer, PlatformLayer* contentsLayer) = 0;
virtual void webAppOrientationsUpdated() = 0;
#endif
#if ENABLE(INPUT_TYPE_COLOR)
virtual PassOwnPtr<ColorChooser> createColorChooser(ColorChooserClient*, const Color&) = 0;
#endif
#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
#if ENABLE(DATE_AND_TIME_INPUT_TYPES) && !PLATFORM(IOS)
virtual PassRefPtr<DateTimeChooser> openDateTimeChooser(DateTimeChooserClient*, const DateTimeChooserParameters&) = 0;
#endif
......
......@@ -35,6 +35,14 @@
#include <wtf/HashSet.h>
#include <wtf/StdLibExtras.h>
#if PLATFORM(IOS)
#include "Chrome.h"
#include "ChromeClient.h"
#include "Frame.h"
#include "Page.h"
#include "WKContentObservation.h"
#endif
namespace WebCore {
static const int maxIntervalForUserGestureForwarding = 1000; // One second matches Gecko.
......@@ -81,6 +89,16 @@ int DOMTimer::install(ScriptExecutionContext* context, PassOwnPtr<ScheduledActio
// The timer is deleted when context is deleted (DOMTimer::contextDestroyed) or explicitly via DOMTimer::removeById(),
// or if it is a one-time timer and it has fired (DOMTimer::fired).
DOMTimer* timer = new DOMTimer(context, action, timeout, singleShot);
#if PLATFORM(IOS)
if (context->isDocument()) {
Document& document = toDocument(*context);
bool didDeferTimeout = document.frame() && document.frame()->timersPaused();
if (!didDeferTimeout && timeout <= 100 && singleShot) {
WKSetObservedContentChange(WKContentIndeterminateChange);
WebThreadAddObservedContentModifier(timer); // Will only take affect if not already visibility change.
}
}
#endif
timer->suspendIfNeeded();
InspectorInstrumentation::didInstallTimer(context, timer->m_timeoutId, timeout, singleShot);
......@@ -104,6 +122,14 @@ void DOMTimer::removeById(ScriptExecutionContext* context, int timeoutId)
void DOMTimer::fired()
{
ScriptExecutionContext* context = scriptExecutionContext();
ASSERT(context);
#if PLATFORM(IOS)
Document* document = nullptr;
if (!context->isDocument()) {
document = toDocument(context);
ASSERT(!document->frame()->timersPaused());
}
#endif
timerNestingLevel = m_nestingLevel;
ASSERT(!isSuspended());
ASSERT(!context->activeDOMObjectsAreSuspended());
......@@ -136,8 +162,35 @@ void DOMTimer::fired()
// No access to member variables after this point.
delete this;
#if PLATFORM(IOS)
bool shouldReportLackOfChanges;
bool shouldBeginObservingChanges;
if (document) {
shouldReportLackOfChanges = WebThreadCountOfObservedContentModifiers() == 1;
shouldBeginObservingChanges = WebThreadContainsObservedContentModifier(this);
} else {
shouldReportLackOfChanges = false;
shouldBeginObservingChanges = false;
}
if (shouldBeginObservingChanges) {
WKBeginObservingContentChanges(false);
WebThreadRemoveObservedContentModifier(this);
}
#endif
action->execute(context);
#if PLATFORM(IOS)
if (shouldBeginObservingChanges) {
WKStopObservingContentChanges();
if (WKObservedContentChange() == WKContentVisibilityChange || shouldReportLackOfChanges)
if (document && document->page())
document->page()->chrome().client().observedContentChange(document->frame());
}
#endif
InspectorInstrumentation::didFireTimer(cookie);
timerNestingLevel = 0;
......
This diff is collapsed.
......@@ -397,10 +397,28 @@ namespace WebCore {
DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel);
#endif
#if ENABLE(IOS_GESTURE_EVENTS)
DEFINE_ATTRIBUTE_EVENT_LISTENER(gesturestart);
DEFINE_ATTRIBUTE_EVENT_LISTENER(gesturechange);
DEFINE_ATTRIBUTE_EVENT_LISTENER(gestureend);
#endif
#if ENABLE(WEB_TIMING)
Performance* performance() const;
#endif
#if PLATFORM(IOS)
void incrementScrollEventListenersCount();
void decrementScrollEventListenersCount();
unsigned scrollEventListenerCount() const { return m_scrollEventListenerCount; }
#endif
void resetAllGeolocationPermission();
#if ENABLE(IOS_TOUCH_EVENTS) || ENABLE(IOS_GESTURE_EVENTS)
bool hasTouchEventListeners() const { return m_touchEventListenerCount > 0; }
#endif
// FIXME: When this DOMWindow is no longer the active DOMWindow (i.e.,
// when its document is no longer the document that is displayed in its
// frame), we would like to zero out m_frame to avoid being confused
......@@ -457,6 +475,17 @@ namespace WebCore {
String m_status;
String m_defaultStatus;
enum PageStatus { PageStatusNone, PageStatusShown, PageStatusHidden };
PageStatus m_lastPageStatus;
#if PLATFORM(IOS)
unsigned m_scrollEventListenerCount;
#endif
#if ENABLE(IOS_TOUCH_EVENTS) || ENABLE(IOS_GESTURE_EVENTS)
unsigned m_touchEventListenerCount;
#endif
mutable RefPtr<Storage> m_sessionStorage;
mutable RefPtr<Storage> m_localStorage;
mutable RefPtr<DOMApplicationCache> m_applicationCache;
......
......@@ -285,6 +285,10 @@
[Conditional=TOUCH_EVENTS] attribute EventListener ontouchend;
[Conditional=TOUCH_EVENTS] attribute EventListener ontouchcancel;
[Conditional=IOS_GESTURE_EVENTS] attribute EventListener ongesturestart;
[Conditional=IOS_GESTURE_EVENTS] attribute EventListener ongesturechange;
[Conditional=IOS_GESTURE_EVENTS] attribute EventListener ongestureend;
[Conditional=DEVICE_ORIENTATION] attribute EventListener ondevicemotion;
[Conditional=DEVICE_ORIENTATION] attribute EventListener ondeviceorientation;
......@@ -308,6 +312,10 @@
// Mozilla has a separate XMLDocument object for XML documents.
// We just use Document for this.
attribute DocumentConstructor XMLDocument;
[Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchConstructor Touch; // Usable with the new operator
[Conditional=IOS_TOUCH_EVENTS, CustomGetter] attribute TouchListConstructor TouchList; // Usable with the new operator
[Conditional=BLOB] attribute DOMURLConstructor webkitURL; // FIXME: deprecate this.
attribute MutationObserverConstructor WebKitMutationObserver; // FIXME: Add metrics to determine when we can remove this.
[Conditional=INDEXED_DATABASE] attribute IDBCursorConstructor webkitIDBCursor;
......
......@@ -41,6 +41,11 @@ OBJC_CLASS NSString;
OBJC_CLASS NSURL;
#endif
#if PLATFORM(IOS)
OBJC_CLASS NSArray;
OBJC_CLASS NSDictionary;
#endif
namespace WebCore {