Commit f435ee15 authored by dbates@webkit.org's avatar dbates@webkit.org

[iOS] Upstream WebCore and Tools miscellaneous changes

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

Reviewed by David Kilzer.

Source/WebCore:

* Configurations/Base.xcconfig:
* Configurations/WebCore.xcconfig:
* Configurations/WebCoreTestSupport.xcconfig:
* Configurations/iOS.xcconfig: Added.
* DerivedSources.make:
* English.lproj/Localizable.strings:
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Copied from Source/WebCore/editing/TextAffinity.h.
(WebCore::stringForPlaybackTargetAvailability):
(WebCore::WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent):
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h: Added.
(WebCore::WebKitPlaybackTargetAvailabilityEventInit::WebKitPlaybackTargetAvailabilityEventInit):
(WebCore::WebKitPlaybackTargetAvailabilityEvent::~WebKitPlaybackTargetAvailabilityEvent):
(WebCore::WebKitPlaybackTargetAvailabilityEvent::create):
(WebCore::WebKitPlaybackTargetAvailabilityEvent::availability):
* Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl: Copied from Source/WebCore/editing/DeleteButton.h.
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::canSuspend):
(WebCore::Geolocation::suspend):
(WebCore::Geolocation::resume):
(WebCore::Geolocation::resumeTimerFired):
(WebCore::Geolocation::resetAllGeolocationPermission):
(WebCore::Geolocation::stop):
(WebCore::Geolocation::setIsAllowed):
(WebCore::Geolocation::positionChanged):
(WebCore::Geolocation::setError):
* Modules/geolocation/Geolocation.h:
* Modules/geolocation/NavigatorGeolocation.cpp:
(WebCore::NavigatorGeolocation::resetAllGeolocationPermission):
* Modules/geolocation/NavigatorGeolocation.h:
* Modules/speech/SpeechSynthesis.cpp:
(WebCore::SpeechSynthesis::SpeechSynthesis):
(WebCore::SpeechSynthesis::speak):
* Modules/speech/SpeechSynthesis.h:
(WebCore::SpeechSynthesis::userGestureRequiredForSpeechStart):
(WebCore::SpeechSynthesis::removeBehaviorRestriction):
* Modules/webaudio/AudioContext.cpp:
* Modules/webaudio/AudioContext.h:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
* Modules/webdatabase/Database.cpp:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::performOpenAndVerify):
(WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded):
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::DatabaseContext):
(WebCore::DatabaseContext::databaseThread):
(WebCore::DatabaseContext::setPaused):
* Modules/webdatabase/DatabaseContext.h:
* Modules/webdatabase/DatabaseManagerClient.h:
* Modules/webdatabase/DatabaseTask.cpp:
(WebCore::DatabaseTask::performTask):
(WebCore::Database::DatabaseTransactionTask::shouldPerformWhilePaused):
* Modules/webdatabase/DatabaseTask.h:
* Modules/webdatabase/DatabaseThread.cpp:
(WebCore::DatabaseThread::DatabaseThread):
(WebCore::DatabaseThread::requestTermination):
(WebCore::DatabaseUnpauseTask::create):
(WebCore::DatabaseUnpauseTask::shouldPerformWhilePaused):
(WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
(WebCore::DatabaseUnpauseTask::doPerformTask):
(WebCore::DatabaseUnpauseTask::debugTaskName):
(WebCore::DatabaseThread::setPaused):
(WebCore::DatabaseThread::handlePausedQueue):
(WebCore::DatabaseThread::databaseThread):
* Modules/webdatabase/DatabaseThread.h:
* Modules/webdatabase/DatabaseTracker.cpp:
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::deleteOrigin):
(WebCore::DatabaseTracker::deleteDatabase):
(WebCore::DatabaseTracker::deleteDatabaseFile):
(WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
(WebCore::isZeroByteFile):
(WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
(WebCore::DatabaseTracker::openDatabaseMutex):
(WebCore::DatabaseTracker::emptyDatabaseFilesRemovalTaskWillBeScheduled):
(WebCore::DatabaseTracker::emptyDatabaseFilesRemovalTaskDidFinish):
(WebCore::DatabaseTracker::setDatabasesPaused):
* Modules/webdatabase/DatabaseTracker.h:
* Modules/webdatabase/SQLTransactionBackend.cpp:
(WebCore::SQLTransactionBackend::shouldPerformWhilePaused):
* Modules/webdatabase/SQLTransactionBackend.h:
* Resources/DictationPhraseWithAlternativesDot.png: Added.
* Resources/DictationPhraseWithAlternativesDot@2x.png: Added.
* Resources/SpellingDot.png: Added.
* Resources/SpellingDot@2x.png: Added.
* Resources/decrementArrow.tiff: Added.
* Resources/hScrollControl_left.png: Added.
* Resources/hScrollControl_middle.png: Added.
* Resources/hScrollControl_right.png: Added.
* Resources/incrementArrow.tiff: Added.
* Resources/markedLeft.png: Added.
* Resources/markedMiddle.png: Added.
* Resources/markedRight.png: Added.
* Resources/vScrollControl_bottom.png: Added.
* Resources/vScrollControl_middle.png: Added.
* Resources/vScrollControl_top.png: Added.
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/GCController.cpp:
(WebCore::GCController::garbageCollectNow):
(WebCore::GCController::releaseExecutableMemory):
* bindings/js/GCController.h:
* bindings/js/JSCallbackData.h:
(WebCore::JSCallbackData::~JSCallbackData):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::supportsProfiling):
(WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
(WebCore::JSDOMWindowBase::commonVM):
(WebCore::JSDOMWindowBase::commonVMExists):
(WebCore::JSDOMWindowBase::commonVMInternal):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::touch):
(WebCore::JSDOMWindow::touchList):
* bindings/js/JSDeviceOrientationEventCustom.cpp:
(WebCore::JSDeviceOrientationEvent::webkitCompassHeading):
(WebCore::JSDeviceOrientationEvent::webkitCompassAccuracy):
(WebCore::JSDeviceOrientationEvent::initDeviceOrientationEvent):
* bindings/js/JSMainThreadExecState.h:
* bindings/js/JSTouchCustom.cpp:
* bindings/js/JSTouchListCustom.cpp:
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::didContinue):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::initializeThreading):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::handlePause):
* bindings/js/ios/TouchConstructors.cpp: Added.
* bindings/objc/DOM.mm:
(WebCore::wkQuadFromFloatQuad):
(WebCore::kit):
(WebCore::min4):
(WebCore::max4):
(WebCore::emptyQuad):
(-[WKQuadObject initWithQuad:]):
(-[WKQuadObject quad]):
(-[WKQuadObject boundingBox]):
(-[DOMNode boundingBox]):
(-[DOMNode absoluteQuad]):
(-[DOMNode absoluteQuadAndInsideFixedPosition:]):
(-[DOMNode boundingBoxUsingTransforms]):
(-[DOMNode lineBoxQuads]):
(-[DOMNode _linkElement]):
(-[DOMNode hrefURL]):
(-[DOMNode hrefTarget]):
(-[DOMNode hrefFrame]):
(-[DOMNode hrefLabel]):
(-[DOMNode hrefTitle]):
(-[DOMNode boundingFrame]):
(-[DOMNode innerFrameQuad]):
(-[DOMNode computedFontSize]):
(-[DOMNode nextFocusNode]):
(-[DOMNode previousFocusNode]):
(-[DOMRange boundingBox]):
(-[DOMRange renderedImageForcingBlackText:renderedImageForcingBlackText:]):
(-[DOMElement _font]):
(-[DOMHTMLLinkElement _mediaQueryMatchesForOrientation:]):
(-[DOMHTMLLinkElement _mediaQueryMatches]):
* bindings/objc/DOMEvents.h:
* bindings/objc/DOMEvents.mm:
(kitClass):
* bindings/objc/DOMExtensions.h:
* bindings/objc/DOMHTML.mm:
(-[DOMHTMLElement scrollYOffset]):
(-[DOMHTMLElement setScrollXOffset:scrollYOffset:]):
(-[DOMHTMLElement setScrollXOffset:scrollYOffset:adjustForIOSCaret:]):
(-[DOMHTMLElement absolutePosition::::]):
(-[DOMHTMLInputElement _autocapitalizeType]):
(-[DOMHTMLTextAreaElement _autocapitalizeType]):
(-[DOMHTMLInputElement setValueWithChangeEvent:]):
(-[DOMHTMLInputElement setValueAsNumberWithChangeEvent:]):
* bindings/objc/DOMInternal.h:
* bindings/objc/DOMInternal.mm:
(wrapperCacheLock):
(getDOMWrapper):
(addDOMWrapper):
(removeDOMWrapper):
* bindings/objc/DOMPrivate.h:
* bindings/objc/DOMUIKitExtensions.h: Added.
* bindings/objc/DOMUIKitExtensions.mm: Added.
* bindings/objc/PublicDOMInterfaces.h:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeaderContentHeader):
(GenerateImplementationContentHeader):
(GenerateHeader):
(GenerateImplementation):
(GenerateCallbackImplementation):
* bindings/scripts/CodeGeneratorObjC.pm:
(ReadPublicInterfaces):
(GetClassName):
(IsCoreFoundationType):
(GetObjCType):
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
(WriteData):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/preprocessor.pm:
(applyPreprocessor):
* bridge/objc/objc_class.mm:
(JSC::Bindings::ObjcClass::fieldNamed):
* bridge/objc/objc_instance.mm:
* config.h:
* dom/Document.cpp:
(WebCore::Document::addAutoSizingNode):
* dom/Document.h:
* dom/Document.idl:
* dom/ios/TouchEvents.cpp: Added.
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyBlockStyle):
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapply):
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::inputText):
(WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/CompositeEditCommand.h:
* editing/DeleteButton.h:
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::enable):
(WebCore::DeleteButtonController::disable):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::doApply):
* editing/DeleteSelectionCommand.h:
* editing/EditAction.h:
* editing/EditCommand.h:
(WebCore::EditCommand::isInsertTextCommand):
* editing/EditingStyle.cpp:
* editing/Editor.cpp:
(WebCore::ClearTextCommand::ClearTextCommand):
(WebCore::ClearTextCommand::editingAction):
(WebCore::ClearTextCommand::CreateAndApply):
(WebCore::Editor::handleTextEvent):
(WebCore::Editor::clearText):
(WebCore::Editor::insertDictationPhrases):
(WebCore::Editor::setDictationPhrasesAsChildOfElement):
(WebCore::Editor::confirmMarkedText):
(WebCore::Editor::setTextAsChildOfElement):
(WebCore::Editor::notifyComponentsOnChangedSelection):
(WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping):
(WebCore::Editor::copy):
(WebCore::Editor::setBaseWritingDirection):
(WebCore::Editor::setComposition):
(WebCore::Editor::showSpellingGuessPanel):
(WebCore::Editor::markMisspellingsAfterTypingToWord):
(WebCore::Editor::markMisspellingsOrBadGrammar):
(WebCore::Editor::changeBackToReplacedString):
(WebCore::Editor::updateMarkersForWordsAffectedByEditing):
(WebCore::Editor::setIgnoreCompositionSelectionChange):
(WebCore::Editor::changeSelectionAfterCommand):
(WebCore::Editor::shouldChangeSelection):
(WebCore::Editor::respondToChangedSelection):
(WebCore::Editor::resolveTextCheckingTypeMask):
* editing/Editor.h:
* editing/EditorCommand.cpp:
(WebCore::executeClearText):
(WebCore::enabledCopy):
(WebCore::enabledCut):
(WebCore::enabledClearText):
(WebCore::createCommandMap):
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::modifyExtendingRight):
(WebCore::FrameSelection::modifyExtendingForward):
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingForward):
(WebCore::FrameSelection::modifyExtendingLeft):
(WebCore::FrameSelection::modifyExtendingBackward):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modifyMovingBackward):
(WebCore::FrameSelection::setSelectedRange):
(WebCore::FrameSelection::focusedOrActiveStateChanged):
(WebCore::FrameSelection::updateAppearance):
(WebCore::FrameSelection::shouldDeleteSelection):
(WebCore::FrameSelection::revealSelection):
(WebCore::FrameSelection::setSelectionFromNone):
(WebCore::FrameSelection::shouldChangeSelection):
(WebCore::FrameSelection::expandSelectionToElementContainingCaretSelection):
(WebCore::FrameSelection::elementRangeContainingCaretSelection):
(WebCore::FrameSelection::expandSelectionToWordContainingCaretSelection):
(WebCore::FrameSelection::wordRangeContainingCaretSelection):
(WebCore::FrameSelection::expandSelectionToStartOfWordContainingCaretSelection):
(WebCore::FrameSelection::characterInRelationToCaretSelection):
(WebCore::FrameSelection::characterBeforeCaretSelection):
(WebCore::FrameSelection::characterAfterCaretSelection):
(WebCore::FrameSelection::wordOffsetInRange):
(WebCore::FrameSelection::spaceFollowsWordInRange):
(WebCore::FrameSelection::selectionAtDocumentStart):
(WebCore::FrameSelection::selectionAtSentenceStart):
(WebCore::FrameSelection::selectionAtWordStart):
(WebCore::FrameSelection::rangeByMovingCurrentSelection):
(WebCore::FrameSelection::rangeByExtendingCurrentSelection):
(WebCore::FrameSelection::selectRangeOnElement):
(WebCore::FrameSelection::wordSelectionContainingCaretSelection):
(WebCore::FrameSelection::actualSelectionAtSentenceStart):
(WebCore::FrameSelection::rangeByAlteringCurrentSelection):
(WebCore::FrameSelection::clearCurrentSelection):
(WebCore::FrameSelection::setCaretBlinks):
(WebCore::FrameSelection::setCaretColor):
* editing/FrameSelection.h:
(WebCore::FrameSelection::suppressCloseTyping):
(WebCore::FrameSelection::restoreCloseTyping):
(WebCore::FrameSelection::setUpdateAppearanceEnabled):
(WebCore::FrameSelection::suppressScrolling):
(WebCore::FrameSelection::restoreScrolling):
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::doReapply):
* editing/InsertIntoTextNodeCommand.h:
* editing/InsertTextCommand.h:
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::doApply):
* editing/TextAffinity.h:
* editing/TextCheckingHelper.cpp:
* editing/TextGranularity.h:
* editing/TextIterator.cpp:
(WebCore::isRendererReplacedElement):
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping):
(WebCore::TypingCommand::markMisspellingsAfterTyping):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
(WebCore::FriendlyEditCommand::setEndingSelection):
(WebCore::TypingCommand::setEndingSelectionOnLastInsertCommand):
* editing/TypingCommand.h:
* editing/VisiblePosition.h:
(WebCore::operator<):
(WebCore::operator>):
(WebCore::operator<=):
(WebCore::operator>=):
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity):
(WebCore::VisibleSelection::adjustSelectionToAvoidCrossingEditingBoundaries):
* editing/VisibleUnits.cpp:
(WebCore::previousBoundary):
(WebCore::nextBoundary):
(WebCore::startOfDocument):
(WebCore::endOfDocument):
(WebCore::directionIsDownstream):
(WebCore::atBoundaryOfGranularity):
(WebCore::withinTextUnitOfGranularity):
(WebCore::nextCharacterBoundaryInDirection):
(WebCore::nextWordBoundaryInDirection):
(WebCore::nextSentenceBoundaryInDirection):
(WebCore::nextLineBoundaryInDirection):
(WebCore::nextParagraphBoundaryInDirection):
(WebCore::nextDocumentBoundaryInDirection):
(WebCore::positionOfNextBoundaryOfGranularity):
(WebCore::enclosingTextUnitOfGranularity):
(WebCore::distanceBetweenPositions):
(WebCore::wordRangeFromPosition):
(WebCore::closestWordBoundaryForPosition):
* editing/VisibleUnits.h:
* editing/ios/DictationCommandIOS.cpp: Added.
* editing/ios/DictationCommandIOS.h: Added.
(WebCore::DictationCommandIOS::create):
(WebCore::DictationCommandIOS::editingAction):
* editing/mac/FrameSelectionMac.mm:
(WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
* fileapi/AsyncFileStream.cpp:
* generate-export-file: Added.
* inspector/InspectorCounters.h:
* inspector/InspectorFrontendHost.h:
* make-export-file-generator:
* plugins/PluginPackage.h:
* plugins/PluginViewBase.h:
(WebCore::PluginViewBase::willProvidePluginLayer):
(WebCore::PluginViewBase::attachPluginLayer):
(WebCore::PluginViewBase::detachPluginLayer):
* style/StyleResolveForDocument.cpp:
(WebCore::Style::resolveForDocument):
* style/StyleResolveTree.cpp:
(WebCore::Style::elementImplicitVisibility):
* testing/Internals.cpp:
(WebCore::Internals::getCurrentCursorInfo):
(WebCore::Internals::isSelectPopupVisible):
* workers/WorkerThread.cpp:
(WebCore::WorkerThread::workerThread):

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* MigrateHeaders.make:

Tools:

* Scripts/check-for-inappropriate-objc-class-names:
* Scripts/check-for-webkit-framework-include-consistency:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6729a757
This diff is collapsed.
......@@ -21,6 +21,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "iOS.xcconfig"
CLANG_CXX_LANGUAGE_STANDARD = gnu++0x;
CLANG_CXX_LIBRARY = libc++;
CLANG_WARN_BOOL_CONVERSION = YES;
......@@ -56,6 +58,7 @@ GCC_WARN_64_TO_32_BIT_CONVERSION = $(GCC_WARN_64_TO_32_BIT_CONVERSION_$(CURRENT_
GCC_WARN_64_TO_32_BIT_CONVERSION_ = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION_armv7 = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION_armv7s = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION_arm64 = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION_i386 = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION_x86_64 = NO;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
......@@ -82,7 +85,10 @@ DEBUG_DEFINES_normal = NDEBUG;
DEBUG_DEFINES = $(DEBUG_DEFINES_$(CURRENT_VARIANT));
GCC_OPTIMIZATION_LEVEL = $(GCC_OPTIMIZATION_LEVEL_$(CURRENT_VARIANT));
GCC_OPTIMIZATION_LEVEL_normal = 2;
GCC_OPTIMIZATION_LEVEL_normal = $(GCC_OPTIMIZATION_LEVEL_normal_$(PLATFORM_NAME));
GCC_OPTIMIZATION_LEVEL_normal_iphoneos = 3;
GCC_OPTIMIZATION_LEVEL_normal_iphonesimulator = 3;
GCC_OPTIMIZATION_LEVEL_normal_macosx = 2;
GCC_OPTIMIZATION_LEVEL_debug = 0;
STRIP_INSTALLED_PRODUCT = $(STRIP_INSTALLED_PRODUCT_$(CURRENT_VARIANT));
......@@ -93,7 +99,9 @@ DEAD_CODE_STRIPPING_debug = NO;
DEAD_CODE_STRIPPING_normal = YES;
DEAD_CODE_STRIPPING = $(DEAD_CODE_STRIPPING_$(CURRENT_VARIANT));
SECTORDER_FLAGS = -Wl,-order_file,WebCore.order;
SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(PLATFORM_NAME));
SECTORDER_FLAGS_iphoneos = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebCore.order;
SECTORDER_FLAGS_macosx = -Wl,-order_file,WebCore.order;
WEBCORE_SQLITE3_HEADER_SEARCH_PATHS = $(NEXT_ROOT)/usr/local/include/WebCoreSQLite3;
SQLITE3_HEADER_SEARCH_PATHS = $(SQLITE3_HEADER_SEARCH_PATHS_$(PLATFORM_NAME));
......
......@@ -33,8 +33,9 @@ EXPORTED_SYMBOLS_FILE_arm64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCo
EXPORTED_SYMBOLS_FILE_i386 = $(EXPORTED_SYMBOLS_FILE_i386_$(PLATFORM_NAME));
EXPORTED_SYMBOLS_FILE_i386_iphonesimulator = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.i386.exp;
EXPORTED_SYMBOLS_FILE_i386_macosx = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.exp;
EXPORTED_SYMBOLS_FILE_ppc = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.exp;
EXPORTED_SYMBOLS_FILE_x86_64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.exp;
EXPORTED_SYMBOLS_FILE_x86_64 = $(EXPORTED_SYMBOLS_FILE_x86_64_$(PLATFORM_NAME));
EXPORTED_SYMBOLS_FILE_x86_64_iphonesimulator = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.x86_64.exp;
EXPORTED_SYMBOLS_FILE_x86_64_macosx = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/WebCore.LP64.exp;
GCC_PREFIX_HEADER = WebCorePrefix.h;
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS);
FRAMEWORK_SEARCH_PATHS = $(FRAMEWORK_SEARCH_PATHS_$(PLATFORM_NAME));
......@@ -51,7 +52,9 @@ OTHER_CPLUSPLUSFLAGS = $(OTHER_CFLAGS);
STAGED_FRAMEWORKS_SEARCH_PATH = $(STAGED_FRAMEWORKS_SEARCH_PATH_$(USE_STAGING_INSTALL_PATH));
STAGED_FRAMEWORKS_SEARCH_PATH_YES = $(NEXT_ROOT)$(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari;
HEADER_SEARCH_PATHS = ForwardingHeaders icu /usr/include/libxslt /usr/include/libxml2 "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore" "${BUILT_PRODUCTS_DIR}/usr/local/include" $(HEADER_SEARCH_PATHS);
WEBKITADDITIONS_HEADER_SEARCH_PATHS = $(BUILT_PRODUCTS_DIR)/usr/local/include/WebKitAdditions $(SDKROOT)/usr/local/include/WebKitAdditions;
HEADER_SEARCH_PATHS = ForwardingHeaders icu /usr/include/libxslt /usr/include/libxml2 $(SQLITE3_HEADER_SEARCH_PATHS) "${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore" "$(BUILT_PRODUCTS_DIR)/usr/local/include" $(WEBKITADDITIONS_HEADER_SEARCH_PATHS) $(HEADER_SEARCH_PATHS);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = $(INSTALL_PATH_$(PLATFORM_NAME));
INSTALL_PATH_iphoneos = $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks;
......@@ -68,8 +71,8 @@ INSTALLHDRS_SCRIPT_PHASE = YES;
PRODUCT_NAME = WebCore;
OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -allowable_client WebCoreTestSupport;
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework QuartzCore;
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_iphonesimulator) -framework IOSurface;
OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_BASE) -framework Accelerate -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework OpenGLES -framework QuartzCore -lMobileGestalt;
OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -allowable_client WebKit2 -framework IOSurface;
NORMAL_WEBCORE_FRAMEWORKS_DIR = $(NORMAL_WEBCORE_FRAMEWORKS_DIR_$(PLATFORM_NAME));
......@@ -102,10 +105,13 @@ PRODUCTION_FRAMEWORKS_DIR_macosx_USE_STAGING_INSTALL_PATH_YES = $(NEXT_ROOT)$(SY
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR = $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_$(CONFIGURATION));
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Release = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Debug = $(JAVASCRIPTCORE_PRIVATE_HEADERS_engineering);
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production = $(SDKROOT)$(PRODUCTION_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders;
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production = $(JAVASCRIPTCORE_PRIVATE_HEADERS_Production_$(PLATFORM_NAME));
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_iphoneos = $(SDKROOT)/$(SYSTEM_LIBRARY_DIR)/Frameworks/JavaScriptCore.framework/Headers;
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_iphonesimulator = $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_iphoneos);
JAVASCRIPTCORE_PRIVATE_HEADERS_DIR_Production_macosx = $(SDKROOT)$(PRODUCTION_FRAMEWORKS_DIR)/JavaScriptCore.framework/PrivateHeaders;
JAVASCRIPTCORE_PRIVATE_HEADERS_engineering = $(BUILT_PRODUCTS_DIR)/JavaScriptCore.framework/PrivateHeaders;
EXCLUDED_SOURCE_FILE_NAMES = $(EXCLUDED_SOURCE_FILE_NAMES_$(PLATFORM_NAME));
EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png Cursor.cpp CursorMac.mm EventHandlerMac.mm HTMLConverter.mm KillRingMac.mm PlatformEventFactoryMac.mm SSLKeyGeneratorMac.cpp SearchPopupMenuMac.mm ScrollingCoordinatorMac.mm ScrollingStateScrollingNodeMac.mm ScrollingTreeScrollingNodeMac.mm SharedTimerMac.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm;
EXCLUDED_SOURCE_FILE_NAMES_iphoneos = *.tiff *Cursor.png AccessibilityObjectMac.mm AXObjectCacheMac.mm ClipboardMac.mm ColorMac.mm Cursor.cpp CursorMac.mm EditorMac.mm EventHandlerMac.mm EventLoopMac.mm GeolocationServiceMac.mm GraphicsContext3DOpenGLES.cpp IconDatabase.cpp IconMac.mm KeyEventMac.mm KillRingMac.mm LocalCurrentGraphicsContext.mm MIMETypeRegistryMac.mm MediaPlayerPrivateQTKit.mm NSScrollerImpDetails.mm NetworkStateNotifierMac.cpp PasteboardMac.mm PlatformEventFactoryMac.mm PlatformMouseEventMac.mm PlatformPasteboardMac.mm PlatformScreenMac.mm PlatformSpeechSynthesizerMac.mm PluginMainThreadScheduler.cpp RunLoopMac.mm SSLKeyGeneratorMac.cpp ScrollingCoordinatorMac.mm ScrollingStateScrollingNodeMac.mm ScrollingTreeScrollingNodeMac.mm ScrollViewMac.mm ScrollbarThemeMac.mm SharedTimerMac.mm SoundMac.mm SystemTimeMac.cpp ThemeMac.mm ThreadCheck.mm WebAccessibilityObjectWrapperMac.mm WebCoreSystemInterface.mm WebCoreURLResponse.mm WebCoreView.m WebFontCache.mm WebVideoFullscreenController.mm WebVideoFullscreenHUDWindowController.mm WebWindowAnimation.mm WheelEventMac.mm WidgetMac.mm mac/LayerPool.mm DisplayRefreshMonitorMac.mm;
EXCLUDED_SOURCE_FILE_NAMES_iphonesimulator = $(EXCLUDED_SOURCE_FILE_NAMES_iphoneos);
EXCLUDED_SOURCE_FILE_NAMES_macosx = *IOS.h *IOS.cpp *IOS.mm KillRingNone.cpp WAKAppKitStubs.h WAKClipView.h WAKResponder.h WAKScrollView.h WAKView.h WAKViewPrivate.h WAKWindow.h WKContentObservation.h WKGraphics.h WKTypes.h WKUtilities.h WKView.h WKViewPrivate.h WebCoreThread.h WebCoreThreadMessage.h WebCoreThreadRun.h WebCoreThreadSystemInterface.h;
......@@ -26,10 +26,15 @@
PRIVATE_HEADERS_FOLDER_PATH = $(PRIVATE_HEADERS_FOLDER_PATH_$(CONFIGURATION));
PRIVATE_HEADERS_FOLDER_PATH_Debug = WebCoreTestSupport;
PRIVATE_HEADERS_FOLDER_PATH_Release = $(PRIVATE_HEADERS_FOLDER_PATH_Debug);
PRIVATE_HEADERS_FOLDER_PATH_Production = /usr/local/include/WebCoreTestSupport;
PRIVATE_HEADERS_FOLDER_PATH_Production = $(PRIVATE_HEADERS_FOLDER_PATH_Production_$(PLATFORM_NAME));
PRIVATE_HEADERS_FOLDER_PATH_Production_iphoneos = /usr/local/include/WebCoreTestSupport;
PRIVATE_HEADERS_FOLDER_PATH_Production_iphonesimulator = $(INDIGO_INSTALL_PATH_PREFIX)$(PRIVATE_HEADERS_FOLDER_PATH_Production_iphoneos);
PRIVATE_HEADERS_FOLDER_PATH_Production_macosx = /usr/local/include/WebCoreTestSupport;
INSTALL_PATH = $(INSTALL_PATH_$(CONFIGURATION));
INSTALL_PATH_Production = /usr/local/lib;
INSTALL_PATH = $(INSTALL_PATH_$(CONFIGURATION)_$(PLATFORM_NAME));
INSTALL_PATH_Production_iphoneos = /usr/local/lib;
INSTALL_PATH_Production_iphonesimulator = $(INDIGO_INSTALL_PATH_PREFIX)$(INSTALL_PATH_Production_iphoneos);
INSTALL_PATH_Production_macosx = /usr/local/lib;
SKIP_INSTALL = $(SKIP_INSTALL_$(FORCE_TOOL_INSTALL));
SKIP_INSTALL_ = YES;
......
#include "<DEVELOPER_DIR>/AppleInternal/XcodeConfig/AspenFamily.xcconfig"
......@@ -28,6 +28,7 @@
VPATH = \
$(WebCore) \
$(WebCore)/Modules/airplay \
$(WebCore)/Modules/encryptedmedia \
$(WebCore)/Modules/geolocation \
$(WebCore)/Modules/indexeddb \
......@@ -67,6 +68,7 @@ VPATH = \
#
BINDING_IDLS = \
$(WebCore)/Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl \
$(WebCore)/Modules/encryptedmedia/MediaKeyMessageEvent.idl \
$(WebCore)/Modules/encryptedmedia/MediaKeyNeededEvent.idl \
$(WebCore)/Modules/encryptedmedia/MediaKeySession.idl \
......@@ -304,9 +306,6 @@ BINDING_IDLS = \
$(WebCore)/dom/StringCallback.idl \
$(WebCore)/dom/Text.idl \
$(WebCore)/dom/TextEvent.idl \
$(WebCore)/dom/Touch.idl \
$(WebCore)/dom/TouchEvent.idl \
$(WebCore)/dom/TouchList.idl \
$(WebCore)/dom/TransitionEvent.idl \
$(WebCore)/dom/TreeWalker.idl \
$(WebCore)/dom/UIEvent.idl \
......@@ -719,6 +718,12 @@ ifneq ($(SDKROOT),)
SDK_FLAGS=-isysroot $(SDKROOT)
endif
ifeq ($(shell $(CC) -isysroot $(SDKROOT) -std=gnu++11 -x c++ -E -P -dM -F $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ' WTF_PLATFORM_IOS ' | cut -d' ' -f3), 1)
WTF_PLATFORM_IOS = 1
else
WTF_PLATFORM_IOS = 0
endif
ifeq ($(shell $(CC) -std=gnu++11 -x c++ -E -P -dM $(SDK_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" /dev/null | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1)
ENABLE_ORIENTATION_EVENTS = 1
endif
......@@ -727,6 +732,32 @@ ifeq ($(PLATFORM_FEATURE_DEFINES),)
PLATFORM_FEATURE_DEFINES = Configurations/FeatureDefines.xcconfig
endif
ifeq ($(WTF_PLATFORM_IOS), 1)
ADDITIONAL_BINDING_IDLS = \
GestureEvent.idl \
Touch.idl \
TouchEvent.idl \
TouchList.idl
BINDING_IDLS += $(ADDITIONAL_BINDING_IDLS)
all : $(ADDITIONAL_BINDING_IDLS:%.idl=JS%.h)
vpath %.idl $(BUILT_PRODUCTS_DIR)/usr/local/include $(SDKROOT)/usr/local/include
$(ADDITIONAL_BINDING_IDLS) : % : WebKitAdditions/%
cp $< .
else
BINDING_IDLS += \
$(WebCore)/dom/Touch.idl \
$(WebCore)/dom/TouchEvent.idl \
$(WebCore)/dom/TouchList.idl
endif
endif # MACOS
ifndef ENABLE_ORIENTATION_EVENTS
......@@ -1156,15 +1187,52 @@ CharsetData.cpp : platform/text/mac/make-charset-table.pl platform/text/mac/char
ifneq ($(ACTION),installhdrs)
ifeq ($(WTF_PLATFORM_IOS),1)
ifeq ($(findstring armv6,$(ARCHS)), armv6)
WEBCORE_EXPORT_FILES := $(WEBCORE_EXPORT_FILES) WebCore.LP64.armv6.exp
endif
ifeq ($(findstring armv7f,$(ARCHS)), armv7f)
WEBCORE_EXPORT_FILES := $(WEBCORE_EXPORT_FILES) WebCore.LP64.armv7f.exp
endif
ifeq ($(findstring armv7s,$(ARCHS)), armv7s)
WEBCORE_EXPORT_FILES := $(WEBCORE_EXPORT_FILES) WebCore.LP64.armv7s.exp
endif
ifeq ($(findstring armv7,$(ARCHS)), armv7)
WEBCORE_EXPORT_FILES := $(WEBCORE_EXPORT_FILES) WebCore.LP64.armv7.exp
endif
ifeq ($(findstring arm64,$(ARCHS)), arm64)
WEBCORE_EXPORT_FILES := $(WEBCORE_EXPORT_FILES) WebCore.LP64.arm64.exp
endif
ifeq ($(findstring i386,$(ARCHS)), i386)
WEBCORE_EXPORT_FILES := $(WEBCORE_EXPORT_FILES) WebCore.LP64.i386.exp
endif
ifeq ($(findstring x86_64,$(ARCHS)), x86_64)
WEBCORE_EXPORT_FILES := $(WEBCORE_EXPORT_FILES) WebCore.LP64.x86_64.exp
endif
all : $(WEBCORE_EXPORT_FILES)
WebCore.%.exp : generate-export-file WebCore.exp.in
$^ $@
# Switch NSRect, NSSize and NSPoint with their CG counterparts for the 64-bit exports file.
WebCore.LP64.%.exp : WebCore.%.exp
cat $^ | sed -e s/7_NSRect/6CGRect/ -e s/7_NSSize/6CGSize/ -e s/8_NSPoint/7CGPoint/ > $@
else
all : WebCore.exp WebCore.LP64.exp
WebCore.exp : $(BUILT_PRODUCTS_DIR)/WebCoreExportFileGenerator
$^ > $@
$^ | grep -v '^# ' | sed -e 's/^#//' > $@
# Switch NSRect, NSSize and NSPoint with their CG counterparts for the 64-bit exports file.
WebCore.LP64.exp : WebCore.exp
cat $^ | sed -e s/7_NSRect/6CGRect/ -e s/7_NSSize/6CGSize/ -e s/8_NSPoint/7CGPoint/ > $@
endif # WTF_PLATFORM_IOS
endif # installhdrs
# --------
......
......@@ -112,6 +112,12 @@
/* title for a multiple file chooser button used in HTML forms. This title should be as short as possible. */
"Choose Files" = "Choose Files";
/* PLATFORM(IOS) title for file button used in HTML forms for media files */
"Choose Media (Single)" = "Choose Photo";
/* PLATFORM(IOS) title for file button used in HTML5 forms for multiple media files */
"Choose Media (Multiple)" = "Choose Photos";
/* menu item in Recent Searches menu that empties menu's contents */
"Clear Recent Searches" = "Clear Recent Searches";
......@@ -157,6 +163,12 @@
/* Default writing direction context menu item */
"Default" = "Default";
/* PLATFORM(IOS) Undo action name */
"Delete (Undo action name)" = "Delete";
/* PLATFORM(IOS) Undo action name */
"Dictation (Undo action name)" = "Dictation";
/* text to display in <details> tag when it has no <summary> child */
"Details" = "Details";
......@@ -781,6 +793,12 @@
/* text to display in file button used in HTML forms when no files are selected and the button allows multiple files to be selected */
"no files selected" = "no files selected";
/* PLATFORM(IOS) text to display in file button used in HTML forms for media files when no media file is selected */
"no media selected (single)" = "no photo selected";
/* PLATFORM(IOS) text to display in file button used in HTML forms for media files when no media files are selected and the button allows multiple files to be selected */
"no media selected (multiple)" = "no photos selected";
/* HTTP result code string */
"no longer exists" = "no longer exists";
......
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "WebKitPlaybackTargetAvailabilityEvent.h"
#if ENABLE(IOS_AIRPLAY)
namespace WebCore {
static const AtomicString& stringForPlaybackTargetAvailability(bool available)
{
DEFINE_STATIC_LOCAL(AtomicString, availableString, ("available", AtomicString::ConstructFromLiteral));
DEFINE_STATIC_LOCAL(AtomicString, notAvailableString, ("not-available", AtomicString::ConstructFromLiteral));
return available ? availableString : notAvailableString;
}
WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent()
{
}
WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, bool available)
: Event(eventType, false, false)
, m_availability(stringForPlaybackTargetAvailability(available))
{
}
WebKitPlaybackTargetAvailabilityEvent::WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit& initializer)
: Event(eventType, initializer)
, m_availability(initializer.availability)
{
}
} // namespace WebCore
#endif // ENABLE(IOS_AIRPLAY)
/*
* Copyright (C) 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WebKitPlaybackTargetAvailabilityEvent_h
#define WebKitPlaybackTargetAvailabilityEvent_h
#if ENABLE(IOS_AIRPLAY)
#include "Event.h"
#include "EventNames.h"
namespace WebCore {
struct WebKitPlaybackTargetAvailabilityEventInit : public EventInit {
WebKitPlaybackTargetAvailabilityEventInit()
{
};
String availability;
};
class WebKitPlaybackTargetAvailabilityEvent : public Event {
public:
~WebKitPlaybackTargetAvailabilityEvent() { }
static PassRefPtr<WebKitPlaybackTargetAvailabilityEvent> create()
{
return adoptRef(new WebKitPlaybackTargetAvailabilityEvent);
}
static PassRefPtr<WebKitPlaybackTargetAvailabilityEvent> create(const AtomicString& eventType, bool available)
{
return adoptRef(new WebKitPlaybackTargetAvailabilityEvent(eventType, available));
}
static PassRefPtr<WebKitPlaybackTargetAvailabilityEvent> create(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit& initializer)
{
return adoptRef(new WebKitPlaybackTargetAvailabilityEvent(eventType, initializer));
}
String availability() const { return m_availability; }
virtual EventInterface eventInterface() const OVERRIDE { return WebKitPlaybackTargetAvailabilityEventInterfaceType; }
private:
WebKitPlaybackTargetAvailabilityEvent();
explicit WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, bool available);
WebKitPlaybackTargetAvailabilityEvent(const AtomicString& eventType, const WebKitPlaybackTargetAvailabilityEventInit&);
String m_availability;
};
} // namespace WebCore
#endif // ENABLE(IOS_AIRPLAY)
#endif // WebKitPlaybackTargetAvailabilityEvent_h
/*
* Copyright (C) 2013 Apple Inc. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
[
Conditional=IOS_AIRPLAY,
ConstructorTemplate=Event
] interface WebKitPlaybackTargetAvailabilityEvent : Event {
[InitializedByEventConstructor] readonly attribute DOMString availability;
};
......@@ -235,6 +235,11 @@ PassRefPtr<Geolocation> Geolocation::create(ScriptExecutionContext* context)
Geolocation::Geolocation(ScriptExecutionContext* context)
: ActiveDOMObject(context)
, m_allowGeolocation(Unknown)
#if PLATFORM(IOS)
, m_isSuspended(false)
, m_hasChangedPosition(false)
, m_resumeTimer(this, &Geolocation::resumeTimerFired)
#endif
{
}
......@@ -258,6 +263,123 @@ Page* Geolocation::page() const
return document() ? document()->page() : 0;
}
#if PLATFORM(IOS)
bool Geolocation::canSuspend() const
{
return !hasListeners();
}
void Geolocation::suspend(ReasonForSuspension reason)
{
// Allow pages that no longer have listeners to enter the page cache.
// Have them stop updating and reset geolocation permissions when the page is resumed.
if (reason == ActiveDOMObject::DocumentWillBecomeInactive) {
ASSERT(!hasListeners());
stop();
m_resetOnResume = true;
}
// Suspend GeoNotifier timeout timers.
if (hasListeners())
stopTimers();
m_isSuspended = true;
m_resumeTimer.stop();
ActiveDOMObject::suspend(reason);
}
void Geolocation::resume()
{
ASSERT(WebThreadIsLockedOrDisabled());
ActiveDOMObject::resume();
if (!m_resumeTimer.isActive())
m_resumeTimer.startOneShot(0);
}
void Geolocation::resumeTimerFired(Timer<Geolocation>*)
{
m_isSuspended = false;
if (m_resetOnResume) {
resetAllGeolocationPermission();
m_resetOnResume = false;
}
// Resume GeoNotifier timeout timers.
if (hasListeners()) {
GeoNotifierSet::const_iterator end = m_oneShots.end();
for (GeoNotifierSet::const_iterator it = m_oneShots.begin(); it != end; ++it)
(*it)->startTimerIfNeeded();
GeoNotifierVector watcherCopy;
m_watchers.getNotifiersVector(watcherCopy);
for (size_t i = 0; i < watcherCopy.size(); ++i)
watcherCopy[i]->startTimerIfNeeded();
}
if ((isAllowed() || isDenied()) && !m_pendingForPermissionNotifiers.isEmpty()) {
// The pending permission was granted while the object was suspended.
setIsAllowed(isAllowed());
ASSERT(!m_hasChangedPosition);
ASSERT(!m_errorWaitingForResume);
return;
}
if (isDenied() && hasListeners()) {
// The permission was revoked while the object was suspended.
setIsAllowed(false);
return;
}
if (m_hasChangedPosition) {
positionChanged();
m_hasChangedPosition = false;
}
if (m_errorWaitingForResume) {
handleError(m_errorWaitingForResume.get());
m_errorWaitingForResume = nullptr;
}
}
void Geolocation::resetAllGeolocationPermission()
{
if (m_isSuspended) {
m_resetOnResume = true;
return;
}
if (m_allowGeolocation == InProgress) {
Page* page = this->page();
if (page)
GeolocationController::from(page)->cancelPermissionRequest(this);
// This return is not technically correct as GeolocationController::cancelPermissionRequest() should have cleared the active request.
// Neither iOS nor OS X supports cancelPermissionRequest() (https://bugs.webkit.org/show_bug.cgi?id=89524), so we workaround that and let ongoing requests complete. :(
return;
}
// 1) Reset our own state.
stopUpdating();
m_allowGeolocation = Unknown;
m_hasChangedPosition = false;
m_errorWaitingForResume = nullptr;
// 2) Request new permission for the active notifiers.
stopTimers();
// Go over the one shot and re-request permission.
GeoNotifierSet::iterator end = m_oneShots.end();
for (GeoNotifierSet::iterator it = m_oneShots.begin(); it != end; ++it)
startRequest((*it).get());
// Go over the watchers and re-request permission.
GeoNotifierVector watcherCopy;
m_watchers.getNotifiersVector(watcherCopy);
for (size_t i = 0; i < watcherCopy.size(); ++i)
startRequest(watcherCopy[i].get());
}
#endif // PLATFORM(IOS)
void Geolocation::stop()
{
Page* page = this->page();
......@@ -267,6 +389,10 @@ void Geolocation::stop()
m_allowGeolocation = Unknown;
cancelAllRequests();
stopUpdating();
#if PLATFORM(IOS)
m_hasChangedPosition = false;
m_errorWaitingForResume = nullptr;
#endif // PLATFORM(IOS)
m_pendingForPermissionNotifiers.clear();
}
......@@ -429,6 +555,11 @@ void Geolocation::setIsAllowed(bool allowed)
// position.
m_allowGeolocation = allowed ? Yes : No;
#if PLATFORM(IOS)
if (m_isSuspended)
return;
#endif
// Permission request was made during the startRequest process
if (!m_pendingForPermissionNotifiers.isEmpty()) {
handlePendingPermissionNotifiers();
......@@ -441,6 +572,11 @@ void Geolocation::setIsAllowed(bool allowed)
error->setIsFatal(true);
handleError(error.get());
m_requestsAwaitingCachedPosition.clear();
#if PLATFORM(IOS)
m_hasChangedPosition = false;
m_errorWaitingForResume = nullptr;
#endif
return;
}
......@@ -620,11 +756,24 @@ void Geolocation::positionChanged()
// Stop all currently running timers.
stopTimers();
#if PLATFORM(IOS)
if (m_isSuspended) {
m_hasChangedPosition = true;
return;
}
#endif
makeSuccessCallbacks();
}
void Geolocation::setError(GeolocationError* error)
{
#if PLATFORM(IOS)
if (m_isSuspended) {
m_errorWaitingForResume = createPositionError(error);
return;
}
#endif
RefPtr<PositionError> positionError = createPositionError(error);
handleError(positionError.get());