1. 27 Dec, 2013 1 commit
    • dbates@webkit.org's avatar
      [iOS] Upstream WebCore/page changes · 4da1af80
      dbates@webkit.org authored
      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
      4da1af80
  2. 16 Apr, 2013 1 commit
    • ap@apple.com's avatar
      Remove unused AlternativeTextClient::dismissDictationAlternativeUI · e7b48f78
      ap@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=114598
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      Removing dead code.
      
      * WebCore.exp.in:
      * editing/mac/AlternativeTextUIController.h: Made dismissAlternatives() private.
      * page/AlternativeTextClient.h:
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebAlternativeTextClient.h:
      * WebCoreSupport/WebAlternativeTextClient.mm:
      * WebView/WebView.mm:
      * WebView/WebViewInternal.h:
      
      Source/WebKit2:
      
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::dictationAlternatives):
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
      * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e7b48f78
  3. 14 Jul, 2012 1 commit
    • mrowe@apple.com's avatar
      Make it explicit which code paths iOS should use when doing checks based on OS X versions. · e3cb3cf9
      mrowe@apple.com authored
      Rubber-stamped by David Kilzer.
      
      * WebCore.exp.in:
      * accessibility/AccessibilityList.h:
      * accessibility/AccessibilityTable.h:
      * accessibility/mac/AXObjectCacheMac.mm:
      * editing/mac/EditorMac.mm:
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      * page/AlternativeTextClient.h:
      * page/mac/SettingsMac.mm:
      * platform/LocalizedStrings.cpp:
      * platform/MemoryPressureHandler.cpp:
      * platform/audio/mac/AudioBusMac.mm:
      * platform/graphics/Gradient.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      * platform/graphics/ca/PlatformCALayer.h:
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      * platform/graphics/ca/mac/TileCache.mm:
      * platform/graphics/cg/GraphicsContextCG.cpp:
      * platform/graphics/cg/ImageBufferCG.cpp:
      * platform/graphics/cg/ImageBufferDataCG.h:
      * platform/graphics/cg/ImageCG.cpp:
      * platform/graphics/cg/ImageSourceCG.cpp:
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      * platform/graphics/mac/ComplexTextController.cpp:
      * platform/graphics/mac/ComplexTextControllerCoreText.mm:
      * platform/graphics/mac/FontCacheMac.mm:
      * platform/graphics/mac/FontCustomPlatformData.cpp:
      * platform/graphics/mac/FontMac.mm:
      * platform/graphics/mac/GraphicsContextMac.mm:
      * platform/graphics/mac/SimpleFontDataMac.mm:
      * platform/graphics/mac/WebLayer.h:
      * platform/graphics/mac/WebLayer.mm:
      * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
      * platform/mac/DisplaySleepDisabler.cpp:
      * platform/mac/DisplaySleepDisabler.h:
      * platform/mac/HTMLConverter.h:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/MemoryPressureHandlerMac.mm:
      * platform/mac/SharedTimerMac.mm:
      * platform/mac/SuddenTermination.mm:
      * platform/mac/WebFontCache.mm:
      * platform/network/Credential.h:
      * platform/network/ResourceHandle.h:
      * platform/network/cf/DNSCFNet.cpp:
      * platform/network/cf/ProxyServerCFNet.cpp:
      * platform/network/cf/ResourceRequest.h:
      * platform/network/cf/SocketStreamHandleCFNet.cpp:
      * platform/network/mac/AuthenticationMac.mm:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/network/mac/ResourceHandleMac.mm:
      * platform/network/mac/ResourceRequestMac.mm:
      * platform/network/mac/WebCoreURLResponse.mm:
      * platform/text/TextChecking.h:
      * platform/text/cf/HyphenationCF.cpp:
      * platform/text/mac/HyphenationMac.mm:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerCompositor.cpp:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e3cb3cf9
  4. 12 Jul, 2012 1 commit
    • mrowe@apple.com's avatar
      <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of... · d67332ee
      mrowe@apple.com authored
      <http://webkit.org/b/91015> Remove BUILDING_ON / TARGETING macros in favor of system availability macros
      
      This removal was handled by a script that translates the relevant macros in to the equivalent checks
      using the system availability macros.
      
      Reviewed by Filip Pizlo.
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * accessibility/AccessibilityList.h:
      * accessibility/AccessibilityTable.h:
      * accessibility/mac/AXObjectCacheMac.mm:
      * editing/mac/EditorMac.mm:
      * loader/MainResourceLoader.cpp:
      * loader/MainResourceLoader.h:
      * page/AlternativeTextClient.h:
      * page/ContextMenuController.cpp:
      * page/mac/SettingsMac.mm:
      * platform/LocalizedStrings.cpp:
      * platform/MemoryPressureHandler.cpp:
      * platform/audio/mac/AudioBusMac.mm:
      * platform/graphics/Gradient.h:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      * platform/graphics/ca/PlatformCALayer.h:
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      * platform/graphics/ca/mac/TileCache.mm:
      * platform/graphics/cg/GraphicsContextCG.cpp:
      * platform/graphics/cg/ImageBufferCG.cpp:
      * platform/graphics/cg/ImageBufferDataCG.cpp:
      * platform/graphics/cg/ImageBufferDataCG.h:
      * platform/graphics/cg/ImageCG.cpp:
      * platform/graphics/cg/ImageSourceCG.cpp:
      * platform/graphics/cg/PathCG.cpp:
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
      * platform/graphics/mac/ComplexTextController.cpp:
      * platform/graphics/mac/ComplexTextControllerCoreText.mm:
      * platform/graphics/mac/FontCacheMac.mm:
      * platform/graphics/mac/FontCustomPlatformData.cpp:
      * platform/graphics/mac/FontMac.mm:
      * platform/graphics/mac/GraphicsContextMac.mm:
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      * platform/graphics/mac/SimpleFontDataMac.mm:
      * platform/graphics/mac/WebLayer.h:
      * platform/graphics/mac/WebLayer.mm:
      * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
      * platform/mac/CursorMac.mm:
      * platform/mac/DisplaySleepDisabler.cpp:
      * platform/mac/DisplaySleepDisabler.h:
      * platform/mac/EmptyProtocolDefinitions.h:
      * platform/mac/HTMLConverter.h:
      * platform/mac/HTMLConverter.mm:
      * platform/mac/MemoryPressureHandlerMac.mm:
      * platform/mac/NSScrollerImpDetails.h:
      * platform/mac/PlatformEventFactoryMac.mm:
      * platform/mac/PopupMenuMac.mm:
      * platform/mac/ScrollAnimatorMac.mm:
      * platform/mac/ScrollElasticityController.mm:
      * platform/mac/SharedTimerMac.mm:
      * platform/mac/SuddenTermination.mm:
      * platform/mac/WebCoreFullScreenWindow.mm:
      * platform/mac/WebCoreNSCellExtras.h:
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      * platform/mac/WebFontCache.mm:
      * platform/mac/WebVideoFullscreenController.mm:
      * platform/mac/WebVideoFullscreenHUDWindowController.mm:
      * platform/network/Credential.h:
      * platform/network/ResourceHandle.h:
      * platform/network/cf/DNSCFNet.cpp:
      * platform/network/cf/ProxyServerCFNet.cpp:
      * platform/network/cf/ResourceRequest.h:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      * platform/network/cf/SocketStreamHandleCFNet.cpp:
      * platform/network/mac/AuthenticationMac.mm:
      * platform/network/mac/CookieStorageMac.mm:
      * platform/network/mac/ResourceHandleMac.mm:
      * platform/network/mac/ResourceRequestMac.mm:
      * platform/network/mac/WebCoreURLResponse.mm:
      * platform/text/TextChecking.h:
      * platform/text/cf/HyphenationCF.cpp:
      * platform/text/mac/HyphenationMac.mm:
      * rendering/RenderLayerBacking.cpp:
      * rendering/RenderLayerCompositor.cpp:
      * rendering/RenderThemeMac.mm:
      
      Source/WebKit/chromium:
      
      * src/mac/WebInputEventFactory.mm:
      
      Source/WebKit/mac:
      
      * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
      * Misc/WebKitErrors.m:
      * Misc/WebNSControlExtras.m:
      * Misc/WebNSFileManagerExtras.mm:
      * Plugins/Hosted/WebHostedNetscapePluginView.mm:
      * Plugins/WebBaseNetscapePluginView.mm:
      * Plugins/WebNetscapePluginView.mm:
      * WebCoreSupport/WebChromeClient.mm:
      * WebCoreSupport/WebEditorClient.mm:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      * WebCoreSupport/WebSystemInterface.mm:
      * WebView/WebClipView.mm:
      * WebView/WebDynamicScrollBarsView.mm:
      * WebView/WebFrameView.mm:
      * WebView/WebFullScreenController.mm:
      * WebView/WebHTMLView.mm:
      * WebView/WebHTMLViewInternal.h:
      * WebView/WebPDFDocumentExtras.mm:
      * WebView/WebPreferences.mm:
      * WebView/WebResourceInternal.h:
      * WebView/WebScriptDebugDelegate.h:
      * WebView/WebView.mm:
      * WebView/WebViewPrivate.h:
      
      Source/WebKit2:
      
      * Shared/DictionaryPopupInfo.cpp:
      * Shared/DictionaryPopupInfo.h:
      * Shared/mac/PasteboardTypes.mm:
      * Shared/mac/WebEventFactory.mm:
      * UIProcess/API/mac/PDFViewController.mm:
      * UIProcess/API/mac/PageClientImpl.mm:
      * UIProcess/API/mac/WKView.mm:
      * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
      * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
      * UIProcess/Launcher/mac/EnvironmentVariables.cpp:
      * UIProcess/Launcher/mac/EnvironmentVariables.h:
      * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
      * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
      * UIProcess/WebPageProxy.cpp:
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/mac/TextCheckerMac.mm:
      * UIProcess/mac/WKFullScreenWindowController.mm:
      * UIProcess/mac/WebContextMac.mm:
      * UIProcess/mac/WebPageProxyMac.mm:
      * WebKit2Prefix.h:
      * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
      * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
      * WebProcess/WebPage/WebPage.cpp:
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      * WebProcess/com.apple.WebProcess.sb.in:
      * WebProcess/mac/KeychainItemShimMethods.mm:
      * WebProcess/mac/SecItemShimMethods.mm:
      * WebProcess/mac/WebProcessMac.mm:
      * WebProcess/mac/WebProcessMainMac.mm:
      * WebProcess/mac/WebProcessShim.mm:
      
      Source/WTF:
      
      * wtf/Assertions.cpp:
      * wtf/FastMalloc.cpp:
      * wtf/Platform.h:
      * wtf/ThreadingPthreads.cpp:
      * wtf/unicode/icu/CollatorICU.cpp:
      
      Tools:
      
      * DumpRenderTree/cf/WebArchiveDumpSupport.cpp:
      * DumpRenderTree/mac/CheckedMalloc.cpp:
      * DumpRenderTree/mac/DumpRenderTree.mm:
      * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
      * DumpRenderTree/mac/LayoutTestControllerMac.mm:
      * DumpRenderTree/mac/TextInputController.m:
      * TestWebKitAPI/mac/InjectedBundleControllerMac.mm:
      * WebKitTestRunner/InjectedBundle/mac/ActivateFonts.mm:
      * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@122400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d67332ee
  5. 29 Jun, 2012 2 commits
    • tony@chromium.org's avatar
      Unreviewed, rolling out r121572. · 49348268
      tony@chromium.org authored
      http://trac.webkit.org/changeset/121572
      https://bugs.webkit.org/show_bug.cgi?id=90249
      
      Breaks Mac build since it depends on r121547, which was rolled
      out
      
      Source/WebCore:
      
      * WebCore.exp.in:
      * page/AlternativeTextClient.h:
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::populate):
      * platform/graphics/cg/ImageBufferDataCG.h:
      * platform/graphics/mac/GraphicsContextMac.mm:
      (WebCore::GraphicsContext::drawLineForDocumentMarker):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
      * platform/mac/WebCoreSystemInterface.h:
      * platform/network/Credential.h:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      (WebCore):
      (WebCore::initializeMaximumHTTPConnectionCountPerHost):
      * platform/text/TextChecking.h:
      (WebCore):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::containsPaintedContent):
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
      (WebKit::NPN_GetValue):
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      
      Source/WTF:
      
      * wtf/ThreadingPthreads.cpp:
      (WTF::initializeCurrentThreadInternal):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121578 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      49348268
    • eric@webkit.org's avatar
      Remove BUILDING_ON_LEOPARD now that no ports build on Leopard · 2d2297c1
      eric@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=90249
      
      Reviewed by Ryosuke Niwa.
      
      Source/WebCore:
      
      I don't think I quite got it all yet, but this is another step towards
      removing Leopard support in WebCore.
      
      * WebCore.exp.in:
      * page/AlternativeTextClient.h:
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::populate):
      * platform/graphics/cg/ImageBufferDataCG.h:
      * platform/graphics/mac/GraphicsContextMac.mm:
      (WebCore::GraphicsContext::drawLineForDocumentMarker):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::setClosedCaptionsVisible):
      * platform/mac/WebCoreSystemInterface.h:
      * platform/network/Credential.h:
      * platform/network/cf/ResourceRequestCFNet.cpp:
      (WebCore):
      (WebCore::initializeMaximumHTTPConnectionCountPerHost):
      * platform/text/TextChecking.h:
      (WebCore):
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::containsPaintedContent):
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
      (WebKit::NPN_GetValue):
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
      * WebProcess/WebCoreSupport/WebEditorClient.h:
      
      Source/WTF:
      
      * wtf/ThreadingPthreads.cpp:
      (WTF::initializeCurrentThreadInternal):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121572 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d2297c1
  6. 14 Jun, 2012 1 commit
    • jpu@apple.com's avatar
      Mark text with text alternative with blue underline. · e1c1a77e
      jpu@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=83047
      
      Reviewed by Enrica Casucci.
      
      Tests: platform/mac/editing/input/edit-dictated-text-with-alternative.html
             platform/mac/editing/input/insert-dictated-text.html
      
      This patch implements visual indication on dictated text with alternatives, and provides UI
      to show alternative text on OS X. Majority of the changes is for generalizing existing AlternativeTextController
      class to handle dictation alternatives. The two new classes, AlternativeTextUIController and
      TextAlternativeWithRange, are used by both WebKit and WK2. So WebCore seems to be the natural place
      for them.
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * editing/AlternativeTextController.cpp: Expanded exising class interface to support dictation alternatives.
      (DictationAlternativeDetails): Marker detail class for dictation alternative mark.
      (WebCore::DictationAlternativeDetails::create):
      (WebCore::DictationAlternativeDetails::dictationContext):
      (WebCore::DictationAlternativeDetails::DictationAlternativeDetails):
      (WebCore::markerTypesForAppliedDictationAlternative):
      (WebCore::AlternativeTextController::applyAlternativeTextToRange): Generalized existing applyAlternativeTextToRange() to handle dictation alternatives.
      (WebCore::AlternativeTextController::timerFired): Expanded existing code to handle dictation alternatives.
      (WebCore::AlternativeTextController::handleAlternativeTextUIResult): Expanded existing code to handle dictation alternatives.
      (WebCore::AlternativeTextController::respondToChangedSelection): Moved part of the function into respondToMarkerAtEndOfWord() to improve readability.
      (WebCore::AlternativeTextController::shouldStartTimerFor):
      (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
      (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
      (WebCore::AlternativeTextController::removeDictationAlternativesForMarker):
      (WebCore::AlternativeTextController::dictationAlternativesForMarker):
      (WebCore::AlternativeTextController::applyDictationAlternative):
      * editing/AlternativeTextController.h:
      * editing/Editor.cpp:
      (WebCore::Editor::notifyComponentsOnChangedSelection): Renamed existing respondToChangedSelection() function to avoid naming collision.
      (WebCore::Editor::appliedEditing):
      (WebCore::Editor::unappliedEditing):
      (WebCore::Editor::reappliedEditing):
      (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
      (WebCore::Editor::changeSelectionAfterCommand):
      (WebCore::Editor::respondToChangedSelection):
      (WebCore::Editor::dictationAlternativesForMarker):
      (WebCore::Editor::applyDictationAlternativelternative):
      * editing/Editor.h:
      * editing/FrameSelection.h:
      * editing/mac/AlternativeTextUIController.h: Added. WK1 and WK2 use this class to keep track of text alternatives objects.
      (AlternativeTextUIController):
      (WebCore::AlternativeTextUIController::AlternativeTextUIController):
      (AlernativeTextContextController):
      (WebCore::AlternativeTextUIController::AlernativeTextContextController::AlernativeTextContextController):
      * editing/mac/AlternativeTextUIController.mm: Added.
      (WebCore::AlternativeTextUIController::AlernativeTextContextController::addAlternatives):
      (WebCore::AlternativeTextUIController::AlernativeTextContextController::alternativesForContext):
      (WebCore::AlternativeTextUIController::AlernativeTextContextController::removeAlternativesForContext):
      (WebCore::AlternativeTextUIController::AlernativeTextContextController::clear):
      (WebCore::AlternativeTextUIController::addAlternatives):
      (WebCore::AlternativeTextUIController::alternativesForContext):
      (WebCore::AlternativeTextUIController::clear):
      (WebCore::AlternativeTextUIController::showAlternatives):
      (WebCore::AlternativeTextUIController::handleAcceptedAlternative):
      (WebCore::AlternativeTextUIController::dismissAlternatives):
      (WebCore::AlternativeTextUIController::removeAlternatives):
      * editing/mac/TextAlternativeWithRange.h: Added.  A simple struct to make it easier to pass around a pair of text alternatives object and range.
      * editing/mac/TextAlternativeWithRange.mm: Added.
      (WebCore::TextAlternativeWithRange::TextAlternativeWithRange):
      (WebCore::collectDictationTextAlternatives):
      * page/AlternativeTextClient.h:
      * page/ContextMenuController.cpp: Added code to show alternative dictated text in context menu.
      (WebCore::ContextMenuController::contextMenuItemSelected):
      (WebCore::ContextMenuController::populate):
      (WebCore::ContextMenuController::checkOrEnableIfNeeded):
      * platform/ContextMenuItem.h:
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::dictationAlternatives):
      * rendering/HitTestResult.h:
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paintDocumentMarker):
      
      Changes in WebKit include implementation of new functions declared in AlternativeTextClient,
      and logic for calling Editor::insertDictatedText() instead of Editor::insertText() when there's
      alternatives attached to the input string.
      
      * WebCoreSupport/CorrectionPanel.mm:
      (correctionIndicatorType):
      (CorrectionPanel::handleAcceptedReplacement):
      * WebCoreSupport/WebAlternativeTextClient.h:
      (WebAlternativeTextClient):
      * WebCoreSupport/WebAlternativeTextClient.mm:
      (WebAlternativeTextClient::showCorrectionAlternative):
      (WebAlternativeTextClient::dismissAlternative):
      (WebAlternativeTextClient::dismissAlternativeSoon):
      (WebAlternativeTextClient::recordAutocorrectionResponse):
      (WebAlternativeTextClient::removeDictationAlternatives):
      (WebAlternativeTextClient::showDictationAlternativeUI):
      (WebAlternativeTextClient::dismissDictationAlternativeUI):
      (WebAlternativeTextClient::dictationAlternatives):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView validAttributesForMarkedText]):
      (-[WebHTMLView insertText:]):
      * WebView/WebView.mm:
      (-[WebView handleAcceptedAlternativeText:]):
      (-[WebView _getWebCoreDictationAlternatives:fromTextAlternatives:]):
      (-[WebView _showDictationAlternativeUI:WebCore::forDictationContext:]):
      (-[WebView _dismissDictationAlternativeUI]):
      (-[WebView _removeDictationAlternatives:]):
      (-[WebView _dictationAlternatives:]):
      * WebView/WebViewData.h:
      * WebView/WebViewData.mm:
      (-[WebViewPrivate init]):
      * WebView/WebViewInternal.h:
      * WebView/WebViewPrivate.h:
      
      Changes in WebKit2 include implementation of new functions declared in AlternativeTextClient,
      and logic for calling Editor::insertDictatedText() instead of Editor::insertText() when there's
      alternatives attached to the input string.
      
      * Shared/API/c/WKContextMenuItemTypes.h:
      * Shared/API/c/WKSharedAPICast.h:
      * Shared/WebCoreArgumentCoders.cpp:
      * Shared/WebCoreArgumentCoders.h:
      * UIProcess/API/mac/PageClientImpl.h:
      * UIProcess/API/mac/PageClientImpl.mm:
      (WebKit::PageClientImpl::PageClientImpl):
      (WebKit::PageClientImpl::pageClosed):
      (WebKit::PageClientImpl::addDictationAlternatives):
      (WebKit::PageClientImpl::removeDictationAlternatives):
      (WebKit::PageClientImpl::showDictationAlternativeUI):
      (WebKit::PageClientImpl::dictationAlternatives):
      (WebKit::PageClientImpl::dismissDictationAlternativeUI):
      * UIProcess/API/mac/WKView.mm:
      (-[WKView insertText:replacementRange:]):
      (-[WKView validAttributesForMarkedText]):
      (-[WKView handleAcceptedAlternativeText:]):
      * UIProcess/API/mac/WKViewInternal.h:
      * UIProcess/PageClient.h:
      * UIProcess/WebPageProxy.cpp:
      (WebKit::WebPageProxy::showDictationAlternativeUI):
      (WebKit::WebPageProxy::dismissDictationAlternativeUI):
      (WebKit::WebPageProxy::removeDictationAlternatives):
      (WebKit::WebPageProxy::dictationAlternatives):
      * UIProcess/WebPageProxy.h:
      * UIProcess/WebPageProxy.messages.in:
      * UIProcess/mac/CorrectionPanel.mm:
      (correctionIndicatorType):
      (WebKit::CorrectionPanel::handleAcceptedReplacement):
      * UIProcess/mac/WebPageProxyMac.mm:
      (WebKit::WebPageProxy::insertDictatedText):
      * WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
      (WebAlternativeTextClient):
      * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
      (WebKit::WebAlternativeTextClient::showCorrectionAlternative):
      (WebKit::WebAlternativeTextClient::dismissAlternative):
      (WebKit::WebAlternativeTextClient::dismissAlternativeSoon):
      (WebKit::WebAlternativeTextClient::recordAutocorrectionResponse):
      (WebKit::WebAlternativeTextClient::removeDictationAlternatives):
      (WebKit::WebAlternativeTextClient::showDictationAlternativeUI):
      (WebKit::WebAlternativeTextClient::dismissDictationAlternativeUI):
      (WebKit::WebAlternativeTextClient::dictationAlternatives):
      * WebProcess/WebPage/WebPage.h:
      * WebProcess/WebPage/WebPage.messages.in:
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::insertDictatedText):
      
      * platform/mac-lion/Skipped:
      * platform/mac-snowleopard/Skipped:
      * platform/mac/editing/input/edit-dictated-text-with-alternative-expected.txt: Added.
      * platform/mac/editing/input/edit-dictated-text-with-alternative.html: Added.
      * platform/mac/editing/input/insert-dictated-text-expected.txt: Added.
      * platform/mac/editing/input/insert-dictated-text.html: Added.
      
      * DumpRenderTree/mac/TextInputController.m:
      (+[TextInputController isSelectorExcludedFromWebScript:]):
      (+[TextInputController webScriptNameForSelector:]):
      (-[TextInputController dictatedStringWithPrimaryString:alternative:alternativeOffset:alternativeLength:]):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1c1a77e
  7. 26 Apr, 2012 1 commit
    • jonlee@apple.com's avatar
      [WK2] AlternativeTextClient leaks when the page is destroyed · 25d14bc0
      jonlee@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=84307
      <rdar://problem/11328431>
      
      Reviewed by Enrica Casucci.
      
      Source/WebCore:
      
      * page/AlternativeTextClient.h: Add pageDestroyed() call, as in EditorClient.
      (AlternativeTextClient):
      * page/Page.cpp:
      (WebCore::Page::~Page): When the page is destroyed, notify the client if it exists.
      
      Source/WebKit/mac:
      
      * WebCoreSupport/WebAlternativeTextClient.h: Implement pageDestroyed(), as in EditorClient.
      (WebAlternativeTextClient):
      * WebCoreSupport/WebAlternativeTextClient.mm:
      (WebAlternativeTextClient::pageDestroyed): Deletes itself.
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Implement pageDestroyed(), as in EditorClient.
      (WebAlternativeTextClient):
      * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
      (WebKit::WebAlternativeTextClient::pageDestroyed): Deletes itself.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115369 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      25d14bc0
  8. 05 Apr, 2012 1 commit
    • jpu@apple.com's avatar
      2012-04-05 Jia Pu <jpu@apple.com> · 8d2f68b0
      jpu@apple.com authored
              Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
              https://bugs.webkit.org/show_bug.cgi?id=82970
      
              Reviewed by Enrica Casucci.
      
              Move correction panel related functions from WebEditorClient to the new WebAlternativeTextClient.
              See WebCore/ChangeLog for details.
      
              * UIProcess/API/gtk/PageClientImpl.cpp:
              * UIProcess/API/mac/PageClientImpl.h:
              (PageClientImpl):
              * UIProcess/API/mac/PageClientImpl.mm:
              (WebKit::PageClientImpl::recordAutocorrectionResponse):
              * UIProcess/API/qt/qquickwebview.cpp:
              * UIProcess/PageClient.h:
              (PageClient):
              * UIProcess/WebPageProxy.cpp:
              (WebKit::WebPageProxy::recordAutocorrectionResponse):
              * UIProcess/mac/CorrectionPanel.h:
              * UIProcess/mac/CorrectionPanel.mm:
              * WebKit2.xcodeproj/project.pbxproj:
              * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: Added.
              (WebKit):
              (WebKit::WebAlternativeTextClient::WebAlternativeTextClient):
              (WebKit::WebAlternativeTextClient::~WebAlternativeTextClient):
              (WebKit::WebAlternativeTextClient::showCorrectionAlternative):
              (WebKit::WebAlternativeTextClient::dismissAlternative):
              (WebKit::WebAlternativeTextClient::dismissAlternativeSoon):
              (WebKit::WebAlternativeTextClient::recordAutocorrectionResponse):
              * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Added.
              (WebKit):
              (WebAlternativeTextClient):
              * WebProcess/WebCoreSupport/WebEditorClient.h:
              * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
              (WebKit):
              * WebProcess/WebPage/WebPage.cpp:
              (WebKit::WebPage::WebPage):
      
      2012-04-05  Jia Pu  <jpu@apple.com>
      
              Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
              https://bugs.webkit.org/show_bug.cgi?id=82970
      
              Reviewed by Enrica Casucci.
      
              Move correction panel related functions from WebEditorClient to the new WebAlternativeTextClient.
              See WebCore/ChangeLog for details.
      
              * WebCoreSupport/CorrectionPanel.h:
              * WebCoreSupport/CorrectionPanel.mm:
              * WebCoreSupport/WebAlternativeTextClient.h: Added.
              (WebAlternativeTextClient):
              * WebCoreSupport/WebAlternativeTextClient.mm: Added.
              (WebAlternativeTextClient::WebAlternativeTextClient):
              (WebAlternativeTextClient::~WebAlternativeTextClient):
              (WebAlternativeTextClient::showCorrectionAlternative):
              (WebAlternativeTextClient::dismissAlternative):
              (WebAlternativeTextClient::dismissAlternativeSoon):
              (WebAlternativeTextClient::recordAutocorrectionResponse):
              * WebCoreSupport/WebEditorClient.h:
              * WebCoreSupport/WebEditorClient.mm:
              (WebEditorClient::~WebEditorClient):
              * WebView/WebView.mm:
              (-[WebView _commonInitializationWithFrameName:groupName:]):
      
      2012-04-05  Jia Pu  <jpu@apple.com>
      
              Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
              https://bugs.webkit.org/show_bug.cgi?id=82970
      
              Reviewed by Enrica Casucci.
      
              See WebCore/ChangeLog for details.
      
              * WebKit.xcodeproj/project.pbxproj:
      
      2012-04-05  Jia Pu  <jpu@apple.com>
      
              Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
              https://bugs.webkit.org/show_bug.cgi?id=82970
      
              Reviewed by Enrica Casucci.
      
              No new tests, since there's no change of functionality.
      
              The existing correction panel related functions in EditorClient are currently used only by OS X.
              We'd like to move them into separate AlternativeTextClient class to avoid using #ifdef's. This
              new client class will also hold dictation alternative related interface that we will add soon for
              bug 82503.
      
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * editing/AlternativeTextController.cpp: Changes in this file are all for calling functions in
                AlternativeTextClient instead of those in EditoClient.
              (WebCore::AlternativeTextController::show):
              (WebCore::AlternativeTextController::dismiss):
              (WebCore::AlternativeTextController::dismissSoon):
              (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
              (WebCore::AlternativeTextController::timerFired):
              (WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled):
              (WebCore::AlternativeTextController::alternativeTextClient):
              (WebCore):
              (WebCore::AlternativeTextController::editorClient):
              (WebCore::AlternativeTextController::textChecker):
              (WebCore::AlternativeTextController::recordAutocorrectionResponseReversed):
              (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
              * editing/AlternativeTextController.h:
              (WebCore):
              (AlternativeTextController):
              * editing/TextCheckingHelper.h:
              (WebCore):
              * loader/EmptyClients.h:
              (EmptyEditorClient):
              * page/AlternativeTextClient.h: Added.
              (WebCore):
              (AlternativeTextClient):
              (WebCore::AlternativeTextClient::~AlternativeTextClient):
              * page/EditorClient.h:
              (EditorClient):
              * page/Page.cpp:
              (WebCore::Page::Page):
              (WebCore::Page::PageClients::PageClients):
              * page/Page.h:
              (WebCore):
              (PageClients):
              (Page):
              (WebCore::Page::alternativeTextClient):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@113340 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8d2f68b0