1. 21 Aug, 2013 2 commits
  2. 20 Aug, 2013 2 commits
    • psolanki@apple.com's avatar
      <https://webkit.org/b/120029> Document::markers() should return a reference · 469f39e9
      psolanki@apple.com authored
      Reviewed by Andreas Kling.
      
      Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
      m_markers as const and initialize it in member initialization.
      
      Source/WebCore:
      
      * dom/Document.cpp:
      (WebCore::Document::Document):
      * dom/Document.h:
      (WebCore::Document::markers):
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::isSpellingMarkerAllowed):
      (WebCore::AlternativeTextController::applyAlternativeTextToRange):
      (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
      (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
      (WebCore::AlternativeTextController::respondToChangedSelection):
      (WebCore::AlternativeTextController::respondToAppliedEditing):
      (WebCore::AlternativeTextController::respondToUnappliedEditing):
      (WebCore::AlternativeTextController::markReversed):
      (WebCore::AlternativeTextController::markCorrection):
      (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
      (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
      (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult):
      (WebCore::AlternativeTextController::applyDictationAlternative):
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
      * editing/DictationCommand.cpp:
      (WebCore::DictationMarkerSupplier::addMarkersToTextNode):
      * editing/Editor.cpp:
      (WebCore::Editor::ignoreSpelling):
      (WebCore::Editor::learnSpelling):
      (WebCore::Editor::advanceToNextMisspelling):
      (WebCore::Editor::clearMisspellingsAndBadGrammar):
      (WebCore::Editor::markAndReplaceFor):
      (WebCore::Editor::changeBackToReplacedString):
      (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
      (WebCore::Editor::countMatchesForText):
      (WebCore::Editor::setMarkedTextMatchesAreHighlighted):
      (WebCore::Editor::respondToChangedSelection):
      (WebCore::Editor::selectionStartHasMarkerFor):
      * editing/SpellChecker.cpp:
      (WebCore::SpellChecker::didCheckSucceed):
      * editing/SplitTextNodeCommand.cpp:
      (WebCore::SplitTextNodeCommand::doApply):
      (WebCore::SplitTextNodeCommand::doUnapply):
      * editing/TextCheckingHelper.cpp:
      (WebCore::TextCheckingHelper::findFirstMisspelling):
      (WebCore::TextCheckingHelper::findFirstGrammarDetail):
      * page/FrameView.cpp:
      (WebCore::FrameView::getTickmarks):
      (WebCore::FrameView::paintContents):
      * page/Page.cpp:
      (WebCore::Page::unmarkAllTextMatches):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::spellingToolTip):
      (WebCore::HitTestResult::replacedString):
      (WebCore::HitTestResult::dictationAlternatives):
      * rendering/InlineTextBox.cpp:
      (WebCore::InlineTextBox::paintDocumentMarkers):
      * rendering/svg/SVGInlineFlowBox.cpp:
      (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
      * testing/Internals.cpp:
      (WebCore::Internals::markerCountForNode):
      (WebCore::Internals::markerAt):
      (WebCore::Internals::addTextMatchMarker):
      
      Source/WebKit/blackberry:
      
      * WebKitSupport/InPageSearchManager.cpp:
      (BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
      (BlackBerry::WebKit::InPageSearchManager::setActiveMatchAndMarker):
      (BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
      (BlackBerry::WebKit::InputHandler::addAttributedTextMarker):
      (BlackBerry::WebKit::InputHandler::removeAttributedTextMarker):
      
      Source/WebKit/efl:
      
      * ewk/ewk_frame.cpp:
      (ewk_frame_text_matches_unmark_all):
      (ewk_frame_text_matches_nth_pos_get):
      
      Source/WebKit/mac:
      
      * WebView/WebFrame.mm:
      (-[WebFrame _unmarkAllBadGrammar]):
      (-[WebFrame _unmarkAllMisspellings]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView unmarkAllTextMatches]):
      (-[WebHTMLView rectsForTextMatches]):
      
      Source/WebKit/win:
      
      * WebFrame.cpp:
      (WebFrame::unmarkAllMisspellings):
      (WebFrame::unmarkAllBadGrammar):
      * WebView.cpp:
      (WebView::rectsForTextMatches):
      
      Source/WebKit2:
      
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::FindController::rectsForTextMatches):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::unmarkAllMisspellings):
      (WebKit::WebPage::unmarkAllBadGrammar):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      469f39e9
    • rniwa@webkit.org's avatar
      <https://webkit.org/b/120049> Delete code for Snow Leopard · 3feac41c
      rniwa@webkit.org authored
      Reviewed by Benjamin Poulain.
      
      Source/WebCore:
      
      Delete all the code for Mac OS 10.6. Nobody builds on Snow Leopard at this point.
      
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * editing/mac/EditorMac.mm:
      (WebCore::Editor::pasteWithPasteboard):
      * page/ContextMenuController.cpp:
      (WebCore::ContextMenuController::populate):
      * platform/LocalizedStrings.cpp:
      (WebCore::truncatedStringForLookupMenuItem):
      (WebCore::contextMenuItemTagSearchWeb):
      (WebCore::contextMenuItemTagLookUpInDictionary):
      * platform/MemoryPressureHandler.cpp:
      * platform/audio/mac/AudioBusMac.mm:
      (WebCore::AudioBus::loadPlatformResource):
      * platform/graphics/ca/GraphicsLayerCA.cpp:
      (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
      * platform/graphics/ca/PlatformCALayer.h:
      * platform/graphics/ca/mac/PlatformCALayerMac.mm:
      (PlatformCALayer::acceleratesDrawing):
      (PlatformCALayer::setAcceleratesDrawing):
      (PlatformCALayer::contentsScale):
      (PlatformCALayer::setContentsScale):
      (PlatformCALayer::synchronouslyDisplayTilesInRect):
      * platform/graphics/ca/mac/TileController.mm:
      (WebCore::TileController::setScale):
      (WebCore::TileController::setAcceleratesDrawing):
      (WebCore::TileController::createTileLayer):
      * platform/graphics/cg/ImageBufferDataCG.cpp:
      (WebCore::ImageBufferData::getData):
      (WebCore::ImageBufferData::putData):
      * platform/graphics/cg/ImageBufferDataCG.h:
      * platform/graphics/cg/PathCG.cpp:
      (WebCore::Path::platformAddPathForRoundedRect):
      * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
      (WebCore::FontPlatformData::FontPlatformData):
      (WebCore::FontPlatformData::setFont):
      * platform/graphics/mac/FontMac.mm:
      (WebCore::showGlyphsWithAdvances):
      * platform/graphics/mac/GraphicsContextMac.mm:
      (WebCore::GraphicsContext::drawLineForDocumentMarker):
      * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
      (WebCore::MediaPlayerPrivateQTKit::createQTMovie):
      (WebCore::MediaPlayerPrivateQTKit::layerHostChanged):
      * platform/graphics/mac/WebLayer.mm:
      (drawLayerContents):
      * platform/mac/CursorMac.mm:
      (WebCore::Cursor::ensurePlatformCursor):
      * platform/mac/EmptyProtocolDefinitions.h: Removed.
      * platform/mac/MemoryPressureHandlerMac.mm:
      (WebCore::MemoryPressureHandler::releaseMemory):
      * platform/mac/NSScrollerImpDetails.h:
      * platform/mac/PlatformEventFactoryMac.mm:
      (WebCore::momentumPhaseForEvent):
      (WebCore::phaseForEvent):
      * platform/mac/ScrollAnimatorMac.mm:
      * platform/mac/SharedTimerMac.mm:
      * platform/mac/WebCoreSystemInterface.h:
      * platform/mac/WebCoreSystemInterface.mm:
      * platform/network/mac/ResourceHandleMac.mm:
      * platform/network/mac/ResourceRequestMac.mm:
      (WebCore::ResourceRequest::doUpdateResourceRequest):
      (WebCore::ResourceRequest::doUpdatePlatformRequest):
      * platform/text/cf/HyphenationCF.cpp:
      * platform/text/mac/HyphenationMac.mm: Removed.
      * rendering/RenderLayerBacking.cpp:
      (WebCore::RenderLayerBacking::containsPaintedContent):
      * rendering/RenderThemeMac.mm:
      (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused):
      
      Source/WebKit/mac:
      
      * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
      (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
      (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
      * Misc/WebNSControlExtras.m:
      (-[NSControl sizeToFitAndAdjustWindowHeight]):
      * Misc/WebNSFileManagerExtras.mm:
      * WebCoreSupport/WebEditorClient.mm:
      (WebEditorClient::shouldEraseMarkersAfterChangeSelection):
      (WebEditorClient::getGuessesForWord):
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (WebFrameLoaderClient::dispatchDidLayout):
      (WebFrameLoaderClient::provisionalLoadStarted):
      * WebCoreSupport/WebSystemInterface.mm:
      (InitWebCoreSystemInterface):
      * WebKitPrefix.h:
      * WebView/WebDynamicScrollBarsView.mm:
      (-[WebDynamicScrollBarsView scrollWheel:]):
      * WebView/WebFullScreenController.mm:
      (convertRectToScreen):
      (-[WebFullScreenController finishedEnterFullScreenAnimation:]):
      (-[WebFullScreenController exitFullScreen]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
      (-[WebHTMLView removeMouseMovedObserver]):
      (-[WebHTMLView windowDidBecomeKey:]):
      (-[WebHTMLView windowDidResignKey:]):
      * WebView/WebView.mm:
      (-[WebView _deviceScaleFactor]):
      
      Source/WebKit2:
      
      * NetworkProcess/mac/NetworkProcessMac.mm:
      (WebKit::overrideSystemProxies):
      (WebKit::NetworkProcess::platformInitializeNetworkProcess):
      * WebKit2Prefix.h:
      
      Source/WTF:
      
      * wtf/FastMalloc.cpp:
      (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
      * wtf/FeatureDefines.h:
      * wtf/Platform.h:
      
      Tools:
      
      * DumpRenderTree/mac/CheckedMalloc.cpp:
      (protectionOfRegion):
      (makeLargeMallocFailSilently):
      * DumpRenderTree/mac/DumpRenderTree.mm:
      (resetDefaultsToConsistentValues):
      * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
      (-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
      * DumpRenderTree/mac/FrameLoadDelegate.mm:
      (testPathFromURL):
      (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]):
      * DumpRenderTree/mac/LayoutTestHelper.m:
      * DumpRenderTree/mac/TestRunnerMac.mm:
      * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
      (WTR::InjectedBundle::platformInitialize):
      * WebKitTestRunner/InjectedBundle/mac/InjectedBundlePageMac.mm:
      (WTR::testPathFromURL):
      (WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3feac41c
  3. 19 Aug, 2013 4 commits
    • psolanki@apple.com's avatar
      <https://webkit.org/b/120019> Document::visitedLinkState() should return a reference · 8a36933a
      psolanki@apple.com authored
      Reviewed by Andreas Kling.
      
      Document::m_visitedLinkState is never NULL so we can just return a reference. Also make it a const.
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::State::initElement):
      * dom/Document.h:
      (WebCore::Document::visitedLinkState):
      * history/CachedPage.cpp:
      (WebCore::CachedPage::restore):
      * page/Page.cpp:
      (WebCore::Page::allVisitedStateChanged):
      (WebCore::Page::visitedStateChanged):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154291 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a36933a
    • psolanki@apple.com's avatar
      <https://webkit.org/b/119918> Frame::selection() should return a reference · 87ae63d7
      psolanki@apple.com authored
      Reviewed by Darin Adler.
      
      m_selection is never NULL so return a reference from Frame::selection(). Also removed some
      unnecessary null checks and assert diff ts exposed as a result.
      
      Source/WebCore:
      
      * accessibility/AccessibilityRenderObject.cpp:
      (WebCore::AccessibilityRenderObject::selection):
      (WebCore::AccessibilityRenderObject::setSelectedTextRange):
      (WebCore::AccessibilityRenderObject::isFocused):
      (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
      (WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
      * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
      (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]):
      (-[WebAccessibilityObjectWrapper accessibilityMoveSelectionToMarker:]):
      (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
      (-[WebAccessibilityObjectWrapper _convertToDOMRange:]):
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
      (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):
      * css/SelectorChecker.cpp:
      (WebCore::SelectorChecker::isFrameFocused):
      * dom/CharacterData.cpp:
      (WebCore::CharacterData::setDataAndUpdate):
      * dom/Document.cpp:
      (WebCore::Document::nodeChildrenWillBeRemoved):
      (WebCore::Document::nodeWillBeRemoved):
      * dom/Element.cpp:
      (WebCore::Element::updateFocusAppearance):
      * editing/AlternativeTextController.cpp:
      (WebCore::AlternativeTextController::stopPendingCorrection):
      (WebCore::AlternativeTextController::applyAlternativeTextToRange):
      (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate):
      (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
      (WebCore::AlternativeTextController::timerFired):
      (WebCore::AlternativeTextController::respondToChangedSelection):
      * editing/DeleteButtonController.cpp:
      (WebCore::DeleteButtonController::respondToChangedSelection):
      (WebCore::DeleteButtonController::enable):
      (WebCore::DeleteButtonController::deleteTarget):
      * editing/DeleteSelectionCommand.cpp:
      (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete):
      * editing/DictationCommand.cpp:
      (WebCore::DictationCommand::insertText):
      * editing/EditCommand.cpp:
      (WebCore::EditCommand::EditCommand):
      * editing/EditingStyle.cpp:
      (WebCore::EditingStyle::mergeTypingStyle):
      * editing/Editor.cpp:
      (WebCore::Editor::selectionForCommand):
      (WebCore::Editor::canEdit):
      (WebCore::Editor::canEditRichly):
      (WebCore::Editor::canDHTMLCut):
      (WebCore::Editor::canDHTMLCopy):
      (WebCore::Editor::canCopy):
      (WebCore::Editor::canDelete):
      (WebCore::Editor::canSmartCopyOrDelete):
      (WebCore::Editor::deleteWithDirection):
      (WebCore::Editor::deleteSelectionWithSmartDelete):
      (WebCore::Editor::replaceSelectionWithFragment):
      (WebCore::Editor::selectedRange):
      (WebCore::Editor::tryDHTMLCopy):
      (WebCore::Editor::tryDHTMLCut):
      (WebCore::Editor::hasBidiSelection):
      (WebCore::Editor::selectionUnorderedListState):
      (WebCore::Editor::selectionOrderedListState):
      (WebCore::Editor::increaseSelectionListLevel):
      (WebCore::Editor::increaseSelectionListLevelOrdered):
      (WebCore::Editor::increaseSelectionListLevelUnordered):
      (WebCore::Editor::decreaseSelectionListLevel):
      (WebCore::Editor::findEventTargetFromSelection):
      (WebCore::Editor::applyStyle):
      (WebCore::Editor::applyParagraphStyle):
      (WebCore::Editor::applyStyleToSelection):
      (WebCore::Editor::applyParagraphStyleToSelection):
      (WebCore::Editor::selectionStartHasStyle):
      (WebCore::Editor::selectionHasStyle):
      (WebCore::Editor::selectionStartCSSPropertyValue):
      (WebCore::Editor::appliedEditing):
      (WebCore::Editor::insertTextWithoutSendingTextEvent):
      (WebCore::Editor::insertLineBreak):
      (WebCore::Editor::insertParagraphSeparator):
      (WebCore::Editor::cut):
      (WebCore::Editor::copy):
      (WebCore::Editor::paste):
      (WebCore::Editor::baseWritingDirectionForSelectionStart):
      (WebCore::Editor::selectComposition):
      (WebCore::Editor::setComposition):
      (WebCore::Editor::ignoreSpelling):
      (WebCore::Editor::learnSpelling):
      (WebCore::Editor::advanceToNextMisspelling):
      (WebCore::Editor::misspelledWordAtCaretOrRange):
      (WebCore::Editor::isSelectionUngrammatical):
      (WebCore::Editor::guessesForMisspelledOrUngrammatical):
      (WebCore::Editor::markMisspellingsAfterTypingToWord):
      (WebCore::Editor::isSpellCheckingEnabledInFocusedNode):
      (WebCore::Editor::markAndReplaceFor):
      (WebCore::Editor::updateMarkersForWordsAffectedByEditing):
      (WebCore::Editor::revealSelectionAfterEditingOperation):
      (WebCore::Editor::getCompositionSelection):
      (WebCore::Editor::transpose):
      (WebCore::Editor::changeSelectionAfterCommand):
      (WebCore::Editor::selectedText):
      (WebCore::Editor::computeAndSetTypingStyle):
      (WebCore::Editor::findString):
      (WebCore::Editor::respondToChangedSelection):
      (WebCore::Editor::selectionStartHasMarkerFor):
      (WebCore::Editor::toggleOverwriteModeEnabled):
      * editing/EditorCommand.cpp:
      (WebCore::executeToggleStyleInList):
      (WebCore::expandSelectionToGranularity):
      (WebCore::stateTextWritingDirection):
      (WebCore::executeDelete):
      (WebCore::executeDeleteToMark):
      (WebCore::executeMoveBackward):
      (WebCore::executeMoveBackwardAndModifySelection):
      (WebCore::executeMoveDown):
      (WebCore::executeMoveDownAndModifySelection):
      (WebCore::executeMoveForward):
      (WebCore::executeMoveForwardAndModifySelection):
      (WebCore::executeMoveLeft):
      (WebCore::executeMoveLeftAndModifySelection):
      (WebCore::executeMovePageDown):
      (WebCore::executeMovePageDownAndModifySelection):
      (WebCore::executeMovePageUp):
      (WebCore::executeMovePageUpAndModifySelection):
      (WebCore::executeMoveRight):
      (WebCore::executeMoveRightAndModifySelection):
      (WebCore::executeMoveToBeginningOfDocument):
      (WebCore::executeMoveToBeginningOfDocumentAndModifySelection):
      (WebCore::executeMoveToBeginningOfLine):
      (WebCore::executeMoveToBeginningOfLineAndModifySelection):
      (WebCore::executeMoveToBeginningOfParagraph):
      (WebCore::executeMoveToBeginningOfParagraphAndModifySelection):
      (WebCore::executeMoveToBeginningOfSentence):
      (WebCore::executeMoveToBeginningOfSentenceAndModifySelection):
      (WebCore::executeMoveToEndOfDocument):
      (WebCore::executeMoveToEndOfDocumentAndModifySelection):
      (WebCore::executeMoveToEndOfSentence):
      (WebCore::executeMoveToEndOfSentenceAndModifySelection):
      (WebCore::executeMoveToEndOfLine):
      (WebCore::executeMoveToEndOfLineAndModifySelection):
      (WebCore::executeMoveToEndOfParagraph):
      (WebCore::executeMoveToEndOfParagraphAndModifySelection):
      (WebCore::executeMoveParagraphBackwardAndModifySelection):
      (WebCore::executeMoveParagraphForwardAndModifySelection):
      (WebCore::executeMoveUp):
      (WebCore::executeMoveUpAndModifySelection):
      (WebCore::executeMoveWordBackward):
      (WebCore::executeMoveWordBackwardAndModifySelection):
      (WebCore::executeMoveWordForward):
      (WebCore::executeMoveWordForwardAndModifySelection):
      (WebCore::executeMoveWordLeft):
      (WebCore::executeMoveWordLeftAndModifySelection):
      (WebCore::executeMoveWordRight):
      (WebCore::executeMoveWordRightAndModifySelection):
      (WebCore::executeMoveToLeftEndOfLine):
      (WebCore::executeMoveToLeftEndOfLineAndModifySelection):
      (WebCore::executeMoveToRightEndOfLine):
      (WebCore::executeMoveToRightEndOfLineAndModifySelection):
      (WebCore::executeSelectAll):
      (WebCore::executeSelectToMark):
      (WebCore::executeSetMark):
      (WebCore::executeSwapWithMark):
      (WebCore::executeUnselect):
      (WebCore::enabledInRichlyEditableText):
      (WebCore::enabledRangeInEditableText):
      (WebCore::enabledRangeInRichlyEditableText):
      (WebCore::valueFormatBlock):
      * editing/FrameSelection.cpp:
      (WebCore::FrameSelection::setSelection):
      (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected):
      * editing/InsertLineBreakCommand.cpp:
      (WebCore::InsertLineBreakCommand::doApply):
      * editing/InsertTextCommand.cpp:
      (WebCore::InsertTextCommand::doApply):
      * editing/ModifySelectionListLevel.cpp:
      (WebCore::IncreaseSelectionListLevelCommand::canIncreaseSelectionListLevel):
      (WebCore::DecreaseSelectionListLevelCommand::canDecreaseSelectionListLevel):
      * editing/RemoveFormatCommand.cpp:
      (WebCore::RemoveFormatCommand::doApply):
      * editing/ReplaceSelectionCommand.cpp:
      (WebCore::ReplaceSelectionCommand::doApply):
      * editing/SetSelectionCommand.cpp:
      (WebCore::SetSelectionCommand::doApply):
      (WebCore::SetSelectionCommand::doUnapply):
      * editing/SpellingCorrectionCommand.cpp:
      (WebCore::SpellingCorrectionCommand::doApply):
      * editing/TextInsertionBaseCommand.cpp:
      (WebCore::TextInsertionBaseCommand::applyTextInsertionCommand):
      * editing/TypingCommand.cpp:
      (WebCore::TypingCommand::deleteSelection):
      (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection):
      (WebCore::TypingCommand::insertText):
      (WebCore::TypingCommand::deleteKeyPressed):
      (WebCore::TypingCommand::forwardDeleteKeyPressed):
      * editing/ios/EditorIOS.mm:
      (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
      (WebCore::styleForSelectionStart):
      (WebCore::Editor::fontForSelection):
      * editing/mac/EditorMac.mm:
      (WebCore::styleForSelectionStart):
      (WebCore::Editor::fontForSelection):
      (WebCore::Editor::canCopyExcludingStandaloneImages):
      (WebCore::Editor::readSelectionFromPasteboard):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::defaultEventHandler):
      (WebCore::HTMLAnchorElement::setActive):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::updateFocusAppearance):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::updateFocusAppearance):
      (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent):
      * html/HTMLTextFormControlElement.cpp:
      (WebCore::HTMLTextFormControlElement::setSelectionRange):
      (WebCore::HTMLTextFormControlElement::computeSelectionStart):
      (WebCore::HTMLTextFormControlElement::computeSelectionEnd):
      (WebCore::HTMLTextFormControlElement::computeSelectionDirection):
      (WebCore::HTMLTextFormControlElement::selectionChanged):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::clear):
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::createFromSelection):
      * page/ContextMenuController.cpp:
      (WebCore::insertUnicodeCharacter):
      (WebCore::ContextMenuController::contextMenuItemSelected):
      (WebCore::selectionContainsPossibleWord):
      (WebCore::ContextMenuController::populate):
      (WebCore::ContextMenuController::checkOrEnableIfNeeded):
      * page/DOMSelection.cpp:
      (WebCore::selectionShadowAncestor):
      (WebCore::DOMSelection::visibleSelection):
      (WebCore::DOMSelection::isCollapsed):
      (WebCore::DOMSelection::type):
      (WebCore::DOMSelection::rangeCount):
      (WebCore::DOMSelection::collapse):
      (WebCore::DOMSelection::collapseToEnd):
      (WebCore::DOMSelection::collapseToStart):
      (WebCore::DOMSelection::empty):
      (WebCore::DOMSelection::setBaseAndExtent):
      (WebCore::DOMSelection::setPosition):
      (WebCore::DOMSelection::modify):
      (WebCore::DOMSelection::extend):
      (WebCore::DOMSelection::getRangeAt):
      (WebCore::DOMSelection::removeAllRanges):
      (WebCore::DOMSelection::addRange):
      (WebCore::DOMSelection::deleteFromDocument):
      (WebCore::DOMSelection::containsNode):
      (WebCore::DOMSelection::toString):
      * page/DragController.cpp:
      (WebCore::DragController::dragIsMove):
      (WebCore::setSelectionToDragCaret):
      (WebCore::DragController::concludeEditDrag):
      (WebCore::DragController::draggableElement):
      (WebCore::selectElement):
      (WebCore::dragLocForSelectionDrag):
      (WebCore::DragController::startDrag):
      * page/DragController.h:
      * page/EventHandler.cpp:
      (WebCore::setSelectionIfNeeded):
      (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
      (WebCore::EventHandler::handleMousePressEventDoubleClick):
      (WebCore::EventHandler::handleMousePressEventSingleClick):
      (WebCore::EventHandler::updateSelectionForMouseDrag):
      (WebCore::EventHandler::lostMouseCapture):
      (WebCore::EventHandler::handleMouseReleaseEvent):
      (WebCore::nodeIsNotBeingEdited):
      (WebCore::EventHandler::selectCursor):
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::handleMouseDoubleClickEvent):
      (WebCore::EventHandler::dispatchMouseEvent):
      (WebCore::EventHandler::sendContextMenuEvent):
      (WebCore::EventHandler::sendContextMenuEventForKey):
      (WebCore::handleKeyboardSelectionMovement):
      (WebCore::EventHandler::handleDrag):
      * page/FocusController.cpp:
      (WebCore::FocusController::setFocusedFrame):
      (WebCore::FocusController::setFocused):
      (WebCore::FocusController::advanceFocusInDocumentOrder):
      (WebCore::clearSelectionIfNeeded):
      (WebCore::FocusController::setActive):
      * page/Frame.cpp:
      (WebCore::Frame::dragImageForSelection):
      * page/Frame.h:
      (WebCore::Frame::selection):
      * page/FrameView.cpp:
      (WebCore::FrameView::performPostLayoutTasks):
      (WebCore::FrameView::paintContentsForSnapshot):
      * page/Page.cpp:
      (WebCore::Page::findString):
      (WebCore::Page::findStringMatchingRanges):
      (WebCore::Page::selection):
      * page/mac/FrameMac.mm:
      (WebCore::Frame::dragImageForSelection):
      * page/mac/FrameSnapshottingMac.mm:
      (WebCore::selectionImage):
      * page/win/FrameWin.cpp:
      (WebCore::imageFromSelection):
      (WebCore::Frame::dragImageForSelection):
      * platform/ios/PasteboardIOS.mm:
      (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
      * rendering/HitTestResult.cpp:
      (WebCore::HitTestResult::isSelected):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::paintCaret):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::paintAreaElementFocusRing):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollTo):
      * rendering/RenderListBox.cpp:
      (WebCore::RenderListBox::paintItemForeground):
      (WebCore::RenderListBox::paintItemBackground):
      * rendering/RenderObject.cpp:
      (WebCore::RenderObject::selectionBackgroundColor):
      (WebCore::RenderObject::selectionColor):
      * rendering/RenderTextControlSingleLine.cpp:
      (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged):
      * rendering/RenderTheme.cpp:
      (WebCore::RenderTheme::isFocused):
      * rendering/RenderThemeWin.cpp:
      (WebCore::RenderThemeWin::adjustSearchFieldStyle):
      * rendering/RenderTreeAsText.cpp:
      (WebCore::writeSelection):
      * rendering/RenderView.cpp:
      (WebCore::RenderView::setSelection):
      * svg/SVGSVGElement.cpp:
      (WebCore::SVGSVGElement::deselectAll):
      * svg/SVGTextContentElement.cpp:
      (WebCore::SVGTextContentElement::selectSubString):
      * testing/Internals.cpp:
      (WebCore::Internals::absoluteCaretBounds):
      (WebCore::Internals::selectionBounds):
      
      Source/WebKit/blackberry:
      
      * Api/InRegionScroller.cpp:
      (BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
      * WebKitSupport/DatePickerClient.cpp:
      (BlackBerry::WebKit::DatePickerClient::setValueAndClosePopup):
      * WebKitSupport/InPageSearchManager.cpp:
      (BlackBerry::WebKit::InPageSearchManager::findNextString):
      (BlackBerry::WebKit::InPageSearchManager::clearTextMatches):
      * WebKitSupport/InputHandler.cpp:
      (BlackBerry::WebKit::InputHandler::focusedNodeChanged):
      (BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
      (BlackBerry::WebKit::InputHandler::setElementUnfocused):
      (BlackBerry::WebKit::InputHandler::setInputModeEnabled):
      (BlackBerry::WebKit::InputHandler::setElementFocused):
      (BlackBerry::WebKit::InputHandler::openDatePopup):
      (BlackBerry::WebKit::InputHandler::ensureFocusTextElementVisible):
      (BlackBerry::WebKit::InputHandler::selectionPosition):
      (BlackBerry::WebKit::InputHandler::setSelection):
      (BlackBerry::WebKit::InputHandler::deleteSelection):
      (BlackBerry::WebKit::InputHandler::setRelativeCursorPosition):
      * WebKitSupport/SelectionHandler.cpp:
      (BlackBerry::WebKit::SelectionHandler::cancelSelection):
      (BlackBerry::WebKit::SelectionHandler::shouldUpdateSelectionOrCaretForPoint):
      (BlackBerry::WebKit::SelectionHandler::setCaretPosition):
      (BlackBerry::WebKit::SelectionHandler::extendSelectionToFieldBoundary):
      (BlackBerry::WebKit::SelectionHandler::updateOrHandleInputSelection):
      (BlackBerry::WebKit::SelectionHandler::setSelection):
      (BlackBerry::WebKit::SelectionHandler::startCaretViewportRect):
      (BlackBerry::WebKit::SelectionHandler::selectNextParagraph):
      (BlackBerry::WebKit::SelectionHandler::expandSelectionToGranularity):
      (BlackBerry::WebKit::SelectionHandler::selectObject):
      (BlackBerry::WebKit::directionOfEnclosingBlock):
      (BlackBerry::WebKit::SelectionHandler::selectionPositionChanged):
      (BlackBerry::WebKit::SelectionHandler::notifyCaretPositionChangedIfNeeded):
      (BlackBerry::WebKit::SelectionHandler::caretPositionChanged):
      (BlackBerry::WebKit::SelectionHandler::selectionContains):
      * WebKitSupport/SpellingHandler.cpp:
      (BlackBerry::WebKit::SpellingHandler::spellCheckTextBlock):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::selectionRectangle):
      (DumpRenderTreeSupportEfl::firstRectForCharacterRange):
      (DumpRenderTreeSupportEfl::selectedRange):
      * WebCoreSupport/EditorClientEfl.cpp:
      (WebCore::EditorClientEfl::handleEditingKeyboardEvent):
      * ewk/ewk_frame.cpp:
      (ewk_frame_text_selection_type_get):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/ChromeClientGtk.cpp:
      (WebKit::ChromeClient::paint):
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::firstRectForCharacterRange):
      (DumpRenderTreeSupportGtk::selectedRange):
      (DumpRenderTreeSupportGtk::rectangleForSelection):
      * WebCoreSupport/EditorClientGtk.cpp:
      (WebKit::collapseSelection):
      (WebKit::setSelectionPrimaryClipboardIfNeeded):
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_get_range_for_word_around_caret):
      * webkit/webkitwebview.cpp:
      (getLocationForKeyboardGeneratedContextMenu):
      
      Source/WebKit/mac:
      
      * Plugins/WebPluginController.mm:
      * WebView/WebFrame.mm:
      (-[WebFrame _hasSelection]):
      (-[WebFrame _rangeByAlteringCurrentSelection:FrameSelection::direction:granularity:]):
      (-[WebFrame _selectionGranularity]):
      (-[WebFrame _convertToNSRange:]):
      (-[WebFrame _convertToDOMRange:]):
      (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
      (-[WebFrame _typingStyle]):
      (-[WebFrame _selectedNSRange]):
      (-[WebFrame _selectNSRange:]):
      (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
      (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
      * WebView/WebHTMLRepresentation.mm:
      (-[WebHTMLRepresentation currentForm]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView readSelectionFromPasteboard:]):
      (-[WebHTMLView _selectedRange]):
      (-[WebHTMLView _hasSelection]):
      (-[WebHTMLView _hasSelectionOrInsertionPoint]):
      (-[WebHTMLView _hasInsertionPoint]):
      (-[WebHTMLView _isEditable]):
      (-[WebHTMLView jumpToSelection:]):
      (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
      (-[WebHTMLView maintainsInactiveSelection]):
      (isTextInput):
      (isInPasswordField):
      (-[WebHTMLView centerSelectionInVisibleArea:]):
      (-[WebHTMLView _canSmartCopyOrDelete]):
      (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
      (-[WebHTMLView _updateSelectionForInputManager]):
      (-[WebHTMLView selectionRect]):
      (-[WebHTMLView selectionTextRects]):
      (-[WebHTMLView selectionImageRect]):
      (-[WebHTMLView selectAll]):
      (-[WebHTMLView deselectAll]):
      (-[WebHTMLView selectedAttributedString]):
      * WebView/WebTextCompletionController.mm:
      (-[WebTextCompletionController doCompletion]):
      * WebView/WebView.mm:
      (-[WebView setSelectedDOMRange:affinity:]):
      (-[WebView selectedDOMRange]):
      (-[WebView selectionAffinity]):
      (-[WebView setEditable:]):
      (-[WebView _selectionIsCaret]):
      (-[WebView _selectionIsAll]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::selectedRange):
      (DumpRenderTreeSupportQt::firstRectForCharacterRange):
      * WebCoreSupport/EditorClientQt.cpp:
      (WebCore::EditorClientQt::respondToChangedSelection):
      (WebCore::EditorClientQt::handleKeyboardEvent):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::hasSelection):
      (QWebPageAdapter::selectedText):
      (QWebPageAdapter::findText):
      (QWebPageAdapter::inputMethodEvent):
      (QWebPageAdapter::inputMethodQuery):
      
      Source/WebKit/win:
      
      * WebFrame.cpp:
      (WebFrame::currentForm):
      * WebView.cpp:
      (WebView::updateFocusedAndActiveState):
      (WebView::selectionRect):
      (WebView::centerSelectionInVisibleArea):
      (WebView::hasSelectedRange):
      (WebView::replaceSelectionWithText):
      (WebView::clearSelection):
      (WebView::prepareCandidateWindow):
      (WebView::onIMERequestCharPosition):
      (WebView::onIMERequestReconvertString):
      (WebView::firstRectForCharacterRangeForTesting):
      (WebView::selectedRangeForTesting):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/EditorClientWinCE.cpp:
      (WebKit::EditorClientWinCE::handleEditingKeyboardEvent):
      
      Source/WebKit2:
      
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::updateGlobalSelection):
      * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
      (WebKit::collapseSelection):
      (WebKit::WebEditorClient::updateGlobalSelection):
      * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
      (WebKit::WebContextMenuClient::lookUpInDictionary):
      (WebKit::WebContextMenuClient::searchWithSpotlight):
      * WebProcess/WebPage/FindController.cpp:
      (WebKit::frameWithSelection):
      (WebKit::FindController::updateFindUIAfterPageScroll):
      (WebKit::FindController::getFindIndicatorBitmapAndRect):
      (WebKit::FindController::getImageForFindMatch):
      (WebKit::FindController::selectFindMatch):
      (WebKit::FindController::updateFindIndicator):
      (WebKit::FindController::drawRect):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::editorState):
      (WebKit::WebPage::scaledSnapshotWithOptions):
      (WebKit::WebPage::centerSelectionInVisibleArea):
      (WebKit::frameWithSelection):
      (WebKit::WebPage::clearSelection):
      (WebKit::WebPage::confirmComposition):
      (WebKit::WebPage::setComposition):
      (WebKit::WebPage::currentSelectionAsRange):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::setComposition):
      (WebKit::WebPage::insertText):
      (WebKit::WebPage::insertDictatedText):
      (WebKit::WebPage::getMarkedRange):
      (WebKit::WebPage::getSelectedRange):
      (WebKit::WebPage::getAttributedSubstringFromRange):
      (WebKit::WebPage::characterIndexForPoint):
      (WebKit::convertToRange):
      (WebKit::WebPage::performDictionaryLookupAtLocation):
      (WebKit::WebPage::readSelectionFromPasteboard):
      (WebKit::WebPage::getStringSelectionForPasteboard):
      (WebKit::WebPage::getDataSelectionForPasteboard):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154286 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      87ae63d7
    • akling@apple.com's avatar
      <https://webkit.org/b/120000> Chrome::client() should return a reference. · fedaa63f
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Chrome::m_client should never be null.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      fedaa63f
    • akling@apple.com's avatar
      <https://webkit.org/b/119997> Page::progress() should return a reference. · eb67e0ad
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Page::m_progress is never null.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eb67e0ad
  4. 18 Aug, 2013 1 commit
    • darin@apple.com's avatar
      <https://webkit.org/b/119949> Factor Clipboard into drag and non-drag parts · ec40fe3e
      darin@apple.com authored
      Reviewed by Sam Weinig.
      
      * dom/Clipboard.cpp:
      (WebCore::Clipboard::Clipboard): Move the ClipboardType argument to go after the pasteboard.
      Initialize strings more efficiently. Put drag-specific data members inside an if statement.
      Replace m_clipboardType with m_forDrag.
      (WebCore::Clipboard::createForCopyAndPaste): Moved function up to be close to constructor.
      Removed explicit clipboard type since constructor now defaults to copy and paste style.
      (WebCore::Clipboard::setAccessPolicy): Tweaked comment.
      (WebCore::Clipboard::getData): Put drag-specific code inside #if ENABLE(DRAG_SUPPORT).
      (WebCore::Clipboard::setData): Ditto.
      (WebCore::Clipboard::files): Ditto.
      (WebCore::Clipboard::dropEffect): Added trivial non-drag versions of these functions to
      be used when !ENABLE(DRAG_SUPPORT).
      (WebCore::Clipboard::setDropEffect): Ditto.
      (WebCore::Clipboard::effectAllowed): Ditto.
      (WebCore::Clipboard::setEffectAllowed): Ditto.
      (WebCore::Clipboard::createForDragAndDrop): Renamed Clipboard::create that takes DragData
      to this, and kep the overload that does not as well. Made the DragData argument a const&.
      (WebCore::Clipboard::canSetDragImage): Moved down here since it is drag-specific.
      (WebCore::Clipboard::updateDragImage): Use m_shouldUpdateDragImage directly insted of
      calling a dragStarted function.
      (WebCore::dragOpFromIEOp): Moved this function down here to the drag-specific section.
      (WebCore::IEOpFromDragOp): Ditto.
      (WebCore::Clipboard::sourceOperation): Ditto.
      (WebCore::Clipboard::destinationOperation): Ditto.
      (WebCore::Clipboard::setSourceOperation): Ditto.
      (WebCore::Clipboard::setDestinationOperation): Ditto.
      
      * dom/Clipboard.h: Removed unneeded include of "Node.h" and added and removed forward
      class declarations as required. Removed non-helpful comment. Made ClipboardType a private
      implementation detail. Moved functions that are not part of the DOM API down to a separate
      section lower down in the class, and sorted the functions to match the order they appear
      in the IDL file. Removed isForCopyAndPaste and isForDragAndDrop. Changed dropEffect and
      effectAllowed to not be inlined. Moved the long comment before canSetDragImage into the
      implementation since it's an implementation detail. Since this class is no longer polymorphic,
      use only private, not protected. Make m_dragImageElement an Element, not a Node.
      
      * dom/Clipboard.idl: Removed flags to tell bindings how to deal with null strings, since
      these string properties can never return null strings anyway.
      
      * page/DragController.cpp:
      (WebCore::DragController::dragExited): Updated to call the new createForDragAndDrop function.
      (WebCore::DragController::performDrag): Ditto.
      (WebCore::DragController::tryDHTMLDrag): Ditto.
      
      * platform/mac/ClipboardMac.mm: Added now-needed include of Element.h since Clipboard.h no
      longer includes it.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154260 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ec40fe3e
  5. 17 Aug, 2013 11 commits
    • antti@apple.com's avatar
      <https://webkit.org/b/119959> Add TextNodeTraversal · adb7e129
      antti@apple.com authored
      Reviewed by Andreas Kling.
      
      Add TextNodeTraversal for cleaner and more compact traversal of Text nodes.
              
      Use it where appropriate.
      
      * WebCore.xcodeproj/project.pbxproj:
      * dom/Attr.cpp:
      (WebCore::Attr::childrenChanged):
      * dom/NodeTraversal.h:
      (WebCore::NodeTraversal::next):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::scriptContent):
      * dom/Text.cpp:
      (WebCore::Text::wholeText):
      * dom/Text.h:
      (WebCore::toText):
      * dom/TextNodeTraversal.cpp: Added.
      (WebCore::TextNodeTraversal::appendContents):
      (WebCore::TextNodeTraversal::contentsAsString):
              
          Helpers for getting text content of a subtree.
      
      * dom/TextNodeTraversal.h: Added.
      (WebCore::TextNodeTraversal::firstTextChildTemplate):
      (WebCore::TextNodeTraversal::firstChild):
      (WebCore::TextNodeTraversal::firstTextWithinTemplate):
      (WebCore::TextNodeTraversal::firstWithin):
      (WebCore::TextNodeTraversal::traverseNextTextTemplate):
      (WebCore::TextNodeTraversal::next):
      (WebCore::TextNodeTraversal::nextSibling):
      * editing/ApplyStyleCommand.cpp:
      (WebCore::ApplyStyleCommand::joinChildTextNodes):
      * html/HTMLTextAreaElement.cpp:
      (WebCore::HTMLTextAreaElement::defaultValue):
      (WebCore::HTMLTextAreaElement::setDefaultValue):
      * html/HTMLTitleElement.cpp:
      (WebCore::HTMLTitleElement::text):
      * html/track/TextTrackCue.cpp:
      (WebCore::TextTrackCue::determineTextDirection):
      * page/Frame.cpp:
      (WebCore::Frame::searchForLabelsAboveCell):
      * xml/XPathUtil.cpp:
      (WebCore::XPath::stringValue):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      adb7e129
    • akling@apple.com's avatar
      <https://webkit.org/b/119957> Page::contextMenuController() should return a reference. · c6d7b3a8
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Page::m_contextMenuController is never null.
      
      * page/Page.h:
      (WebCore::Page::contextMenuController):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154239 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c6d7b3a8
    • akling@apple.com's avatar
      <https://webkit.org/b/119954> Page::dragCaretController() should return a reference. · b5297527
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Page::m_dragCaretController is never null.
      
      * dom/Document.cpp:
      (WebCore::Document::nodeChildrenWillBeRemoved):
      (WebCore::Document::nodeWillBeRemoved):
      * page/DragController.cpp:
      (WebCore::DragController::cancelDrag):
      (WebCore::DragController::dragEnded):
      (WebCore::DragController::tryDocumentDrag):
      (WebCore::DragController::dispatchTextInputEventFor):
      (WebCore::DragController::concludeEditDrag):
      (WebCore::DragController::placeDragCaret):
      * page/Page.h:
      (WebCore::Page::dragCaretController):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::paintCaret):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5297527
    • akling@apple.com's avatar
      <https://webkit.org/b/119952> Simplify Editor's back-pointer to the Frame. · 976b412f
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      Remove Editor's inheritance from FrameDestructionObserver. Editor is owned by Frame and
      has no interest in observing frame destruction since its own destruction will soon follow.
      
      Editor::m_frame is now a reference instead of a pointer. Removed some null checking.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154237 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      976b412f
    • akling@apple.com's avatar
      <https://webkit.org/b/119950> Remove unused EditorClient::frameWillDetachPage() callback. · eba835d0
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      This callback was only used by the Chromium port.
      
      * editing/Editor.h:
      * editing/Editor.cpp:
      
          Remove override of FrameDestructionObserver::willDetachPage().
      
      * page/EditorClient.h:
      
          Remove frameWillDetachPage(). This is repeated in every EditorClient subclass.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154235 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      eba835d0
    • darin@apple.com's avatar
      <https://webkit.org/b/119948> Change drag-specific clipboard writing in... · 6535ea23
      darin@apple.com authored
      <https://webkit.org/b/119948> Change drag-specific clipboard writing in DragController to go straight to Pasteboard, not forward through Clipboard
      
      Reviewed by Andreas Kling.
      
      * dom/Clipboard.cpp: Removed writeRange, writePlainText, and writeURL functions.
      All three are just unneeded forwarding to pasteboard.
      * dom/Clipboard.h: Ditto.
      
      * page/DragController.cpp:
      (WebCore::DragController::startDrag): Move the logic in here. Later we might
      want to straighten this out a bit, perhaps using functions in Editor, but it's
      not much code so fine to just have it here for now.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154231 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6535ea23
    • darin@apple.com's avatar
      <https://webkit.org/b/119946> Move some code used only by EventHandler from... · ce2f2365
      darin@apple.com authored
      <https://webkit.org/b/119946> Move some code used only by EventHandler from Clipboard to EventHandler
      
      Reviewed by Andreas Kling.
      
      Later it would be good to move this all to DragController, but there is no reason to have
      these functions as member functions of the DOM-exposed Clipboard class.
      
      * dom/Clipboard.cpp: Deleted hasFileOfType, hasStringOfType, convertDropZoneOperationToDragOperation,
      convertDragOperationToDropZoneOperation.
      * dom/Clipboard.h: Ditto.
      
      * page/EventHandler.cpp:
      (WebCore::convertDropZoneOperationToDragOperation): Moved here.
      (WebCore::convertDragOperationToDropZoneOperation): Moved here. Also changed to use ASCIILiteral.
      (WebCore::hasFileOfType): Moved here and made a free function instead of a member function. Removed
      canReadTypes check because Clipboard::files already takes care of that.
      (WebCore::hasStringOfType): Moved here and made a free function instead of a member function.
      Added a check for the null string because HashSet::contains will not work on a null string.
      (WebCore::hasDropZoneType): Moved here and made a free function instead of a member function.
      (WebCore::findDropZone): Call the hasDropZoneType function instead of Clipboard::hasDropZoneType.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ce2f2365
    • darin@apple.com's avatar
      <https://webkit.org/b/119943> Clean up the Document class a bit · c92518a5
      darin@apple.com authored
      Reviewed by Antti Koivisto.
      
      * dom/Document.cpp:
      (WebCore::Document::~Document): Fixed typo in comment.
      (WebCore::Document::suggestedMIMEType): Use ASCIILiteral for literals.
      Also name local variable just loader rather than documentLoader.
      (WebCore::Document::updateTitle): Call loader rather than going indirectly
      through frame to get to the loader.
      (WebCore::Document::setTitleElement): Fixed formatting (add braces).
      (WebCore::Document::removeTitle): Iterate elements instead of nodes.
      (WebCore::Document::isPageBoxVisible): Use ensureStyleResolver to call
      styleForPage to avoid the need for a simple forwarding function. Also
      eliminated local variable to increase clarity.
      (WebCore::Document::pageSizeAndMarginsInPixels): Use ensureStyleResolver
      to call styleForPage to avoid the need for a simple forwarding function.
      (WebCore::Document::setIsViewSource): Renamed a local variable.
      
      * dom/Document.h: Removed unneeded childNeedsAndNotInStyleRecalc and
      styleForPage functions.
      
      * loader/FrameLoader.cpp: Removed unnneeded setTitle function.
      * loader/FrameLoader.h: Ditto.
      
      * page/PrintContext.cpp:
      (WebCore::PrintContext::pageProperty): Use ensureStyleResolver to call
      styleForPage to avoid the need for a simple forwarding function.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154228 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c92518a5
    • darin@apple.com's avatar
      <https://webkit.org/b/119942> Remove unnecessary uses of Element::ownerDocument · a9232041
      darin@apple.com authored
      Reviewed by Andreas Kling.
      
      The Element::document is a simpler faster alternative to Element::ownerDocument.
      The only behavior difference between the two is that ownerDocument returns 0 when
      called on a Document.
      
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::supportsFocus): Call document instead of ownerDocument.
      (WebCore::HTMLMediaElement::mediaPlayerOwningDocument): Removed null checking of
      document and call to ownerDocument, since ownerDocument will never return non-null
      if document returns null.
      (WebCore::HTMLMediaElement::mediaPlayerSawUnsupportedTracks): Call document instead
      of ownerDocument.
      
      * inspector/DOMEditor.cpp:
      (WebCore::DOMEditor::SetOuterHTMLAction::perform): Call document instead of ownerDocument.
      
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::InspectorCSSAgent::getMatchedStylesForNode): Call document instead of ownerDocument.
      (WebCore::InspectorCSSAgent::forcePseudoState): Call document instead of ownerDocument.
      (WebCore::InspectorCSSAgent::resetPseudoStates): Call document instead of ownerDocument.
      
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::setOuterHTML): Call document instead of expression that
      does the same thing in a roundabout way.
      (WebCore::InspectorDOMAgent::focusNode): Call document instead of ownerDocument.
      (WebCore::InspectorDOMAgent::resolveNode): Call document instead of expression that
      does the same thing in a roundabout way.
      
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag): Call document instead of ownerDocument.
      
      * svg/SVGElementInstance.cpp:
      (WebCore::SVGElementInstance::ownerDocument): Call document instead of ownerDocument.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154225 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a9232041
    • darin@apple.com's avatar
      <https://webkit.org/b/119941> Make Page::dragController return a reference · a5e48bb2
      darin@apple.com authored
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * page/Page.h:
      (WebCore::Page::dragController): Return a reference instead of a pointer.
      
      * page/DragController.cpp:
      (WebCore::DragController::concludeEditDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::eventMayStartDrag):
      (WebCore::EventHandler::updateDragSourceActionsAllowed):
      (WebCore::EventHandler::handleDrag):
      * page/mac/EventHandlerMac.mm:
      (WebCore::EventHandler::passSubframeEventToSubframe):
      Updated call sites.
      
      Source/WebKit/gtk:
      
      * webkit/webkitwebview.cpp:
      (dragExitedCallback):
      (webkit_web_view_drag_motion):
      (webkit_web_view_drag_data_received):
      (webkit_web_view_drag_drop):
      Updated call sites.
      
      Source/WebKit/mac:
      
      * WebView/WebFrameView.mm:
      (-[WebFrameView _setDocumentView:]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
      (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
      * WebView/WebView.mm:
      (-[WebView _setInitiatedDrag:]):
      (-[WebView draggingEntered:]):
      (-[WebView draggingUpdated:]):
      (-[WebView draggingExited:]):
      (-[WebView performDragOperation:]):
      (-[WebView moveDragCaretToPoint:]):
      (-[WebView removeDragCaret]):
      Updated call sites.
      
      Source/WebKit/qt:
      
      * WebCoreSupport/DragClientQt.cpp:
      (WebCore::DragClientQt::startDrag):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (QWebPageAdapter::dragEntered):
      (QWebPageAdapter::dragLeaveEvent):
      (QWebPageAdapter::dragUpdated):
      (QWebPageAdapter::performDrag):
      Updated call sites.
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebDragClient.cpp:
      (WebDragClient::startDrag):
      * WebView.cpp:
      (WebView::keyStateToDragOperation):
      (WebView::DragEnter):
      (WebView::DragOver):
      (WebView::DragLeave):
      (WebView::Drop):
      Updated call sites.
      
      Source/WebKit2:
      
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::performDragControllerAction):
      (WebKit::WebPage::dragEnded):
      Updated call sites.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154224 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5e48bb2
    • akling@apple.com's avatar
      <https://webkit.org/b/119903> Make Settings ref-counted (and let Frame keep a ref!) · 17523501
      akling@apple.com authored
      Reviewed by Geoff Garen.
      
      Let Frame hold a RefPtr<Settings> so Frame::settings() isn't forced to go through Page.
      It now also returns a reference, as it can never be null.
      
      Removed 8.8 million lines of null-checking as a result.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      17523501
  6. 16 Aug, 2013 5 commits
    • commit-queue@webkit.org's avatar
      <https://webkit.org/b/119785> Replace currentTime() with monotonicallyIncreasingTime() in WebCore · a5f446ab
      commit-queue@webkit.org authored
      Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-16
      Reviewed by Alexey Proskuryakov.
      
      Source/WebCore:
      
      WTF::currentTime() is prone to DST changes and NTP adjustments, so use
      WTF::monotonicallyIncreasingTime() to measure elapsed time.
      
      * Modules/filesystem/FileWriter.cpp:
      (WebCore::FileWriter::didWrite):
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::elapsedTime):
      (WebCore::Document::resetLastHandledUserGestureTimestamp):
      * dom/Element.cpp:
      (WebCore::Element::setActive):
      * fileapi/FileReader.cpp:
      (WebCore::FileReader::didReceiveData):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::HTMLMediaElement):
      (WebCore::HTMLMediaElement::startProgressEventTimer):
      (WebCore::HTMLMediaElement::progressEventTimerFired):
      (WebCore::HTMLMediaElement::refreshCachedTime):
      (WebCore::HTMLMediaElement::invalidateCachedTime):
      (WebCore::HTMLMediaElement::currentTime):
      (WebCore::HTMLMediaElement::startPlaybackProgressTimer):
      (WebCore::HTMLMediaElement::scheduleTimeupdateEvent):
      * html/HTMLMediaElement.h:
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::documentHadRecentUserGesture):
      * html/MediaController.cpp:
      (MediaController::scheduleTimeupdateEvent):
      * html/parser/HTMLDocumentParser.cpp:
      (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
      * html/parser/HTMLParserScheduler.h:
      (WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
      * inspector/InspectorCSSAgent.cpp:
      (WebCore::SelectorProfile::SelectorProfile):
      (WebCore::SelectorProfile::totalMatchingTimeMs):
      (WebCore::SelectorProfile::startSelector):
      (WebCore::SelectorProfile::commitSelector):
      (WebCore::SelectorProfile::commitSelectorTime):
      * inspector/InspectorProfilerAgent.cpp:
      (WebCore::InspectorProfilerAgent::willProcessTask):
      (WebCore::InspectorProfilerAgent::didProcessTask):
      * inspector/InspectorTimelineAgent.cpp:
      (WebCore::InspectorTimelineAgent::timestamp):
      * inspector/TimelineTraceEventProcessor.cpp:
      (WebCore::TimelineTraceEventProcessor::processEventOnAnyThread):
      * page/FrameView.cpp:
      (WebCore::FrameView::adjustedDeferredRepaintDelay):
      (WebCore::FrameView::paintContents):
      * platform/ClockGeneric.cpp:
      (ClockGeneric::now):
      * platform/ScrollAnimatorNone.cpp:
      (WebCore::ScrollAnimatorNone::scroll):
      (WebCore::ScrollAnimatorNone::animationTimerFired):
      * platform/graphics/cg/ImageBufferCG.cpp:
      (WebCore::ImageBuffer::ImageBuffer):
      (WebCore::ImageBuffer::flushContextIfNecessary):
      (WebCore::ImageBuffer::flushContext):
      (WebCore::ImageBuffer::copyNativeImage):
      
      Source/WTF:
      
      WTF::currentTime() is prone to DST changes and NTP adjustments, so use
      WTF::monotonicallyIncreasingTime() to measure elapsed time.
      
      * wtf/CurrentTime.h:
      (WTF::monotonicallyIncreasingTimeMS): Added mille second version of monotonic time API.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5f446ab
    • psolanki@apple.com's avatar
      <https://webkit.org/b/119852> Frame::scriptController() should return a reference · c5b5dad7
      psolanki@apple.com authored
      Reviewed by Andreas Kling.
      
      m_script is never NULL so we can just return a reference. Also remove some pointless null
      checks as a result of doing this.
      
      Source/WebCore:
      
      * Modules/websockets/WebSocket.cpp:
      (WebCore::WebSocket::connect):
      * bindings/js/JSDOMWindowBase.cpp:
      (WebCore::toJS):
      (WebCore::toJSDOMWindow):
      * bindings/js/JSDOMWindowShell.cpp:
      (WebCore::toJS):
      (WebCore::toJSDOMWindowShell):
      * bindings/js/JSEventListener.cpp:
      (WebCore::JSEventListener::handleEvent):
      * bindings/js/JSLazyEventListener.cpp:
      (WebCore::JSLazyEventListener::initializeJSFunction):
      * bindings/js/PageScriptDebugServer.cpp:
      (WebCore::PageScriptDebugServer::setJavaScriptPaused):
      * bindings/js/ScheduledAction.cpp:
      (WebCore::ScheduledAction::execute):
      * bindings/js/ScriptCachedFrameData.cpp:
      (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
      (WebCore::ScriptCachedFrameData::restore):
      * bindings/js/ScriptEventListener.cpp:
      (WebCore::createAttributeEventListener):
      (WebCore::eventListenerHandlerScriptState):
      * bindings/js/ScriptState.cpp:
      (WebCore::mainWorldScriptState):
      (WebCore::scriptStateFromNode):
      (WebCore::scriptStateFromPage):
      * bindings/objc/DOM.mm:
      (-[DOMNode JSC::Bindings::]):
      * bindings/objc/DOMInternal.mm:
      (-[WebScriptObject _initializeScriptDOMNodeImp]):
      * dom/Document.cpp:
      (WebCore::Document::disableEval):
      (WebCore::Document::ensurePlugInsInjectedScript):
      * dom/ScriptElement.cpp:
      (WebCore::ScriptElement::prepareScript):
      (WebCore::ScriptElement::executeScript):
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::restore):
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::createRenderer):
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::rendererIsNeeded):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::controls):
      * html/HTMLPlugInElement.cpp:
      (WebCore::HTMLPlugInElement::getInstance):
      (WebCore::HTMLPlugInElement::getNPObject):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
      * html/parser/HTMLParserOptions.cpp:
      (WebCore::HTMLParserOptions::HTMLParserOptions):
      * inspector/InspectorAgent.cpp:
      (WebCore::InspectorAgent::didClearWindowObjectInWorld):
      * inspector/InspectorClient.cpp:
      (WebCore::InspectorClient::doDispatchMessageOnFrontendPage):
      * inspector/InspectorFrontendClientLocal.cpp:
      (WebCore::InspectorFrontendClientLocal::evaluateAsBoolean):
      (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::evaluateInOverlay):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::getScriptExecutionStatus):
      (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
      * inspector/PageRuntimeAgent.cpp:
      (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
      * loader/DocumentWriter.cpp:
      (WebCore::DocumentWriter::begin):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::urlSelected):
      (WebCore::FrameLoader::submitForm):
      (WebCore::FrameLoader::cancelAndClear):
      (WebCore::FrameLoader::clear):
      (WebCore::FrameLoader::prepareForCachedPageRestore):
      (WebCore::FrameLoader::dispatchDidClearWindowObjectsInAllWorlds):
      (WebCore::FrameLoader::dispatchDidClearWindowObjectInWorld):
      * loader/SubframeLoader.cpp:
      (WebCore::SubframeLoader::requestFrame):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::canRequest):
      * page/EventSource.cpp:
      (WebCore::EventSource::create):
      * page/Frame.cpp:
      (WebCore::Frame::willDetachPage):
      * page/Frame.h:
      (WebCore::Frame::script):
      * page/Navigator.cpp:
      (WebCore::shouldHideFourDot):
      * page/Page.cpp:
      (WebCore::Page::setDebugger):
      * platform/graphics/wince/MediaPlayerProxy.cpp:
      (WebCore::WebMediaPlayerProxy::pluginInstance):
      (WebCore::WebMediaPlayerProxy::invokeMethod):
      * plugins/PluginView.cpp:
      (WebCore::PluginView::~PluginView):
      (WebCore::PluginView::performRequest):
      (WebCore::PluginView::load):
      (WebCore::PluginView::bindingInstance):
      (WebCore::PluginView::getValue):
      * plugins/efl/PluginViewEfl.cpp:
      (WebCore::PluginView::platformGetValue):
      * xml/XMLHttpRequest.cpp:
      (WebCore::XMLHttpRequest::open):
      * xml/XMLTreeViewer.cpp:
      (WebCore::XMLTreeViewer::transformDocumentToTreeView):
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::load):
      (BlackBerry::WebKit::WebPagePrivate::executeJavaScript):
      (BlackBerry::WebKit::WebPagePrivate::executeJavaScriptInIsolatedWorld):
      (BlackBerry::WebKit::WebPage::executeJavaScriptFunction):
      (BlackBerry::WebKit::WebPage::globalContext):
      * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
      (WebCore::FrameLoaderClientBlackBerry::dispatchDidClearWindowObjectInWorld):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::evaluateScriptInIsolatedWorld):
      (DumpRenderTreeSupportEfl::globalContextRefForFrame):
      * WebCoreSupport/FrameLoaderClientEfl.cpp:
      (WebCore::FrameLoaderClientEfl::dispatchDidClearWindowObjectInWorld):
      * ewk/ewk_frame.cpp:
      (ewk_frame_script_execute):
      * ewk/ewk_view.cpp:
      (ewk_view_js_object_add):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      (WebKit::FrameLoaderClient::dispatchDidClearWindowObjectInWorld):
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_get_global_context):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_execute_script):
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::cleanup):
      (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
      (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
      (WebKit::NetscapePluginInstanceProxy::evaluate):
      (WebKit::NetscapePluginInstanceProxy::invoke):
      (WebKit::NetscapePluginInstanceProxy::invokeDefault):
      (WebKit::NetscapePluginInstanceProxy::construct):
      (WebKit::NetscapePluginInstanceProxy::getProperty):
      (WebKit::NetscapePluginInstanceProxy::setProperty):
      (WebKit::NetscapePluginInstanceProxy::removeProperty):
      (WebKit::NetscapePluginInstanceProxy::hasProperty):
      (WebKit::NetscapePluginInstanceProxy::hasMethod):
      (WebKit::NetscapePluginInstanceProxy::enumerate):
      (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
      * Plugins/WebNetscapePluginView.mm:
      (-[WebNetscapePluginView getVariable:value:]):
      (-[WebNetscapePluginView _destroyPlugin]):
      * Plugins/WebPluginController.mm:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      * WebCoreSupport/WebInspectorClient.mm:
      (WebInspectorFrontendClient::save):
      (WebInspectorFrontendClient::append):
      * WebView/WebFrame.mm:
      (-[WebFrame _attachScriptDebugger]):
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
      (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
      (-[WebFrame _globalContextForScriptWorld:]):
      (-[WebFrame jsWrapperForNode:inScriptWorld:]):
      (-[WebFrame windowObject]):
      (-[WebFrame globalContext]):
      (-[WebFrame javaScriptContext]):
      * WebView/WebScriptDebugger.mm:
      (WebScriptDebugger::initGlobalCallFrame):
      (WebScriptDebugger::callEvent):
      * WebView/WebView.mm:
      (-[WebView windowScriptObject]):
      (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
      
      Source/WebKit/qt:
      
      * Api/qwebelement.cpp:
      (setupScriptContext):
      (QWebElement::evaluateJavaScript):
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::evaluateScriptInIsolatedWorld):
      * WebCoreSupport/QWebFrameAdapter.cpp:
      (QWebFrameAdapter::evaluateJavaScript):
      (QWebFrameAdapter::addToJavaScriptWindowObject):
      
      Source/WebKit/win:
      
      * WebFrame.cpp:
      (WebFrame::globalContext):
      (WebFrame::globalContextForScriptWorld):
      (WebFrame::dispatchDidClearWindowObjectInWorld):
      (WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
      * WebView.cpp:
      (WebView::stringByEvaluatingJavaScriptFromString):
      
      Source/WebKit2:
      
      * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
      (WebKit::NPRuntimeObjectMap::globalObject):
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::PluginView::performJavaScriptURLRequest):
      (WebKit::PluginView::windowScriptNPObject):
      (WebKit::PluginView::pluginElementNPObject):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::jsContext):
      (WebKit::WebFrame::jsContextForWorld):
      (WebKit::WebFrame::jsWrapperForWorld):
      * WebProcess/WebPage/WebInspector.cpp:
      (WebKit::WebInspector::didSave):
      (WebKit::WebInspector::didAppend):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::runJavaScriptInMainFrame):
      
      Tools:
      
      * DumpRenderTree/blackberry/DumpRenderTree.cpp:
      (BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c5b5dad7
    • akling@apple.com's avatar
      <https://webkit.org/b/119893> FrameView::frame() should return a reference. · 618f96f2
      akling@apple.com authored
      Reviewed by Antti Koivisto.
      
      FrameView::m_frame was only ever null for a brief moment during CachedFrame teardown.
      Leave it alone instead, and update the assertion that depended on this behavior.
      This enables us to make FrameView::frame() return a Frame&, exposing a ton of
      unnecessary null checks.
      
      * history/CachedFrame.cpp:
      (WebCore::CachedFrame::destroy):
      
          Remove call to FrameView::clearFrame() that was the only way to get a null
          FrameView::m_frame. Immediately followed by a call to CachedFrame::clear() where
          the FrameView would get destroyed anyway.
      
      (WebCore::CachedFrame::clear):
      
          Update an assertion to support the case where the Document's Frame pointer has
          been cleared out and CachedFrame is still clinging to the FrameView.
      
      * history/CachedPage.h:
      
          Made CachedPage::destroy() private as it was only called by ~CachedPage().
      
      * /:
      
          Frame* FrameView::frame() => Frame& FrameView::frame()
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154184 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      618f96f2
    • akling@apple.com's avatar
      <https://webkit.org/b/119866> Frame::eventHandler() should return a reference. · d18f79bb
      akling@apple.com authored
      Reviewed by Anders Carlsson.
      
      Frame::m_eventHandler is never null.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d18f79bb
    • antti@apple.com's avatar
      <https://webkit.org/b/119865> Parent pointer and shadow root host pointer should not be shared · f269b27a
      antti@apple.com authored
      Reviewed by Andreas Kling.
      
      Node::m_parentOrShadowHostNode is currently used both as the parent pointer for regular nodes and as the host
      pointer for ShadowRoots. This is confusing. It is also slow as it introduces a branch to all code paths that 
      want to traverse ancestors normally, without leaving the shadow trees. This is much more popular than
      traversing through.
              
      This patch makes the Node have a pure parent pointer only and adds the host element pointer as a separate
      member in ShadowRoot. This eliminates the ShadowRoot test branch from Node::parentNode() as the pointer is
      now always null in the root node.
              
      ShadowRoot grows by a pointer. This is not significant as there are few ShadowRoots compared to Nodes.
      
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::pushParentShadowRoot):
      (WebCore::StyleResolver::popParentShadowRoot):
      * dom/Attr.cpp:
      (WebCore::Attr::createTextChild):
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::ComposedShadowTreeWalker::traverseParentBackToShadowRootOrHost):
      * dom/ContainerNode.cpp:
      (WebCore::ContainerNode::insertBeforeCommon):
      (WebCore::ContainerNode::removeBetween):
      * dom/ContainerNodeAlgorithms.cpp:
      (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::appendChildToContainer):
      (WebCore::Private::addChildNodesToDeletionQueue):
      * dom/Document.h:
      (WebCore::Node::Node):
      * dom/Element.cpp:
      (WebCore::Element::addShadowRoot):
      (WebCore::Element::removeShadowRoot):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::releasePseudoElement):
      * dom/EventPathWalker.cpp:
      (WebCore::EventPathWalker::moveToParent):
      * dom/EventRetargeter.cpp:
      (WebCore::determineDispatchBehavior):
      * dom/EventRetargeter.h:
      (WebCore::EventRetargeter::eventTargetRespectingTargetRules):
      * dom/Node.cpp:
      (WebCore::Node::shadowHost):
      (WebCore::Node::deprecatedShadowAncestorNode):
      (WebCore::Node::parentOrShadowHostElement):
      * dom/Node.h:
      (WebCore::Node::hasTreeSharedParent):
              
          Shadow host elements refs the ShadowRoot. There is no reason to use TreeShared to keep it alive.
      
      (WebCore::Node::setParentNode):
      (WebCore::Node::parentNode):
      (WebCore::Node::parentNodeGuaranteedHostFree):
      * dom/PseudoElement.cpp:
      (WebCore::PseudoElement::PseudoElement):
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::ShadowRoot):
      (WebCore::ShadowRoot::setInnerHTML):
      (WebCore::ShadowRoot::setApplyAuthorStyles):
      (WebCore::ShadowRoot::setResetStyleInheritance):
      * dom/ShadowRoot.h:
              
          Rename host() -> hostElement() for clarity.
      
      (WebCore::Node::parentOrShadowHostNode):
      * dom/Text.cpp:
      (WebCore::isSVGShadowText):
      * dom/TreeScope.cpp:
      (WebCore::TreeScope::focusedElement):
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::ensureDistribution):
      * html/shadow/InsertionPoint.cpp:
      (WebCore::InsertionPoint::insertedInto):
      (WebCore::InsertionPoint::removedFrom):
      (WebCore::InsertionPoint::parseAttribute):
      * page/DragController.cpp:
      (WebCore::asFileInput):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::instanceAssociatedWithShadowTreeElement):
      * page/FocusController.cpp:
      (WebCore::FocusNavigationScope::owner):
      * rendering/RenderBlock.cpp:
      (WebCore::RenderBlock::hasLineIfEmpty):
      * rendering/RenderLayer.cpp:
      (WebCore::rendererForScrollbar):
      * svg/SVGElementInstance.h:
      (WebCore::SVGElementInstance::setParentNode):
                  
          Renamed so it works with appendChildToContainer template.
      
      * svg/SVGStyledElement.cpp:
      (WebCore::SVGStyledElement::title):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154165 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f269b27a
  7. 15 Aug, 2013 6 commits
    • andersca@apple.com's avatar
      <https://webkit.org/b/119859> Frame::loader() should return a reference · df550b96
      andersca@apple.com authored
      Reviewed by Andreas Kling.
      
      Source/WebCore:
      
      * Modules/websockets/WebSocketChannel.cpp:
      (WebCore::WebSocketChannel::willOpenSocketStream):
      * WebCore.xcodeproj/project.pbxproj:
      * accessibility/AccessibilityObject.cpp:
      (WebCore::AccessibilityObject::press):
      * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
      (-[WebAccessibilityObjectWrapper remoteAccessibilityParentObject]):
      * bindings/ScriptControllerBase.cpp:
      (WebCore::ScriptController::canExecuteScripts):
      * bindings/js/ScriptController.cpp:
      (WebCore::ScriptController::initScript):
      * css/CSSFontSelector.cpp:
      (WebCore::CSSFontSelector::beginLoadTimerFired):
      * dom/DOMImplementation.cpp:
      (WebCore::DOMImplementation::createDocument):
      * dom/Document.cpp:
      (WebCore::Document::Document):
      (WebCore::Document::setVisualUpdatesAllowed):
      (WebCore::Document::updateTitle):
      (WebCore::Document::open):
      (WebCore::Document::explicitClose):
      (WebCore::Document::implicitClose):
      (WebCore::Document::userAgent):
      (WebCore::Document::canNavigate):
      (WebCore::Document::processHttpEquiv):
      (WebCore::Document::referrer):
      (WebCore::Document::documentDidResumeFromPageCache):
      (WebCore::Document::openSearchDescriptionURL):
      (WebCore::Document::finishedParsing):
      (WebCore::Document::addIconURL):
      (WebCore::Document::initSecurityContext):
      (WebCore::Document::updateURLForPushOrReplaceState):
      (WebCore::Document::loadEventDelayTimerFired):
      (WebCore::Document::loader):
      (WebCore::Document::decrementActiveParserCount):
      * history/CachedFrame.cpp:
      (WebCore::CachedFrameBase::CachedFrameBase):
      (WebCore::CachedFrameBase::restore):
      (WebCore::CachedFrame::CachedFrame):
      (WebCore::CachedFrame::open):
      (WebCore::CachedFrame::destroy):
      * history/PageCache.cpp:
      (WebCore::logCanCacheFrameDecision):
      (WebCore::logCanCachePageDecision):
      (WebCore::PageCache::canCachePageContainingThisFrame):
      (WebCore::PageCache::canCache):
      * html/HTMLAnchorElement.cpp:
      (WebCore::HTMLAnchorElement::handleClick):
      * html/HTMLAppletElement.cpp:
      (WebCore::HTMLAppletElement::updateWidget):
      * html/HTMLElement.cpp:
      (WebCore::HTMLElement::rendererIsNeeded):
      * html/HTMLEmbedElement.cpp:
      (WebCore::HTMLEmbedElement::updateWidget):
      * html/HTMLFormElement.cpp:
      (WebCore::HTMLFormElement::prepareForSubmission):
      (WebCore::HTMLFormElement::submit):
      * html/HTMLFrameElementBase.cpp:
      (WebCore::HTMLFrameElementBase::openURL):
      * html/HTMLFrameOwnerElement.cpp:
      (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
      * html/HTMLFrameSetElement.cpp:
      (WebCore::HTMLFrameSetElement::insertedInto):
      (WebCore::HTMLFrameSetElement::removedFrom):
      * html/HTMLHtmlElement.cpp:
      (WebCore::HTMLHtmlElement::insertedByParser):
      * html/HTMLMediaElement.cpp:
      (WebCore::HTMLMediaElement::createRenderer):
      (WebCore::HTMLMediaElement::attach):
      (WebCore::HTMLMediaElement::loadResource):
      (WebCore::HTMLMediaElement::getPluginProxyParams):
      (WebCore::HTMLMediaElement::createMediaPlayerProxy):
      (WebCore::HTMLMediaElement::updateWidget):
      (WebCore::HTMLMediaElement::mediaPlayerReferrer):
      (WebCore::HTMLMediaElement::mediaPlayerUserAgent):
      * html/HTMLObjectElement.cpp:
      (WebCore::HTMLObjectElement::parametersForPlugin):
      (WebCore::HTMLObjectElement::updateWidget):
      * html/HTMLPlugInImageElement.cpp:
      (WebCore::HTMLPlugInImageElement::isImageType):
      (WebCore::HTMLPlugInImageElement::wouldLoadAsNetscapePlugin):
      (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
      * html/HTMLVideoElement.cpp:
      (WebCore::HTMLVideoElement::setDisplayMode):
      * html/ImageDocument.cpp:
      (WebCore::ImageDocumentParser::appendBytes):
      (WebCore::ImageDocumentParser::finish):
      (WebCore::ImageDocument::createDocumentStructure):
      * html/MediaDocument.cpp:
      (WebCore::MediaDocumentParser::createDocumentStructure):
      * html/PluginDocument.cpp:
      (WebCore::PluginDocumentParser::createDocumentStructure):
      (WebCore::PluginDocumentParser::appendBytes):
      (WebCore::PluginDocument::detach):
      (WebCore::PluginDocument::cancelManualPluginLoad):
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore::WebGLRenderingContext::create):
      (WebCore::WebGLRenderingContext::loseContextImpl):
      (WebCore::WebGLRenderingContext::maybeRestoreContext):
      * html/parser/HTMLConstructionSite.cpp:
      (WebCore::HTMLConstructionSite::dispatchDocumentElementAvailableIfNeeded):
      (WebCore::HTMLConstructionSite::insertHTMLBodyElement):
      * html/parser/HTMLParserOptions.cpp:
      (WebCore::HTMLParserOptions::HTMLParserOptions):
      * html/parser/XSSAuditor.cpp:
      (WebCore::XSSAuditor::init):
      * html/parser/XSSAuditorDelegate.cpp:
      (WebCore::XSSAuditorDelegate::generateViolationReport):
      (WebCore::XSSAuditorDelegate::didBlockScript):
      * inspector/InspectorApplicationCacheAgent.cpp:
      (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
      (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
      * inspector/InspectorFrontendClientLocal.cpp:
      (WebCore::InspectorFrontendClientLocal::openInNewTab):
      * inspector/InspectorFrontendHost.cpp:
      (WebCore::InspectorFrontendHost::loadResourceSynchronously):
      * inspector/InspectorOverlay.cpp:
      (WebCore::InspectorOverlay::overlayPage):
      * inspector/InspectorPageAgent.cpp:
      (WebCore::InspectorPageAgent::mainResourceContent):
      (WebCore::InspectorPageAgent::reload):
      (WebCore::InspectorPageAgent::navigate):
      (WebCore::allResourcesURLsForFrame):
      (WebCore::InspectorPageAgent::searchInResource):
      (WebCore::InspectorPageAgent::assertDocumentLoader):
      (WebCore::InspectorPageAgent::buildObjectForFrame):
      * inspector/InspectorResourceAgent.cpp:
      (WebCore::InspectorResourceAgent::didFailLoading):
      * loader/CookieJar.cpp:
      (WebCore::networkingContext):
      * loader/DocumentLoader.cpp:
      (WebCore::DocumentLoader::frameLoader):
      (WebCore::DocumentLoader::document):
      (WebCore::DocumentLoader::stopLoading):
      (WebCore::DocumentLoader::removeSubresourceLoader):
      (WebCore::DocumentLoader::subresourceLoaderFinishedLoadingOnePart):
      (WebCore::DocumentLoader::iconLoadDecisionAvailable):
      (WebCore::DocumentLoader::continueIconLoadWithDecision):
      * loader/DocumentThreadableLoader.cpp:
      (WebCore::DocumentThreadableLoader::didReceiveResponse):
      (WebCore::DocumentThreadableLoader::didFinishLoading):
      (WebCore::DocumentThreadableLoader::didFail):
      (WebCore::DocumentThreadableLoader::preflightFailure):
      (WebCore::DocumentThreadableLoader::loadRequest):
      * loader/DocumentWriter.cpp:
      (WebCore::DocumentWriter::replaceDocument):
      (WebCore::DocumentWriter::createDocument):
      (WebCore::DocumentWriter::begin):
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::~FrameLoader):
      (WebCore::FrameLoader::allChildrenAreComplete):
      (WebCore::FrameLoader::allAncestorsAreComplete):
      (WebCore::FrameLoader::loadURLIntoChildFrame):
      (WebCore::FrameLoader::outgoingReferrer):
      (WebCore::FrameLoader::setOpener):
      (WebCore::FrameLoader::completed):
      (WebCore::FrameLoader::started):
      (WebCore::FrameLoader::loadFrameRequest):
      (WebCore::FrameLoader::loadURL):
      (WebCore::FrameLoader::load):
      (WebCore::FrameLoader::loadWithDocumentLoader):
      (WebCore::FrameLoader::stopAllLoaders):
      (WebCore::FrameLoader::closeOldDataSources):
      (WebCore::FrameLoader::subframeIsLoading):
      (WebCore::FrameLoader::subresourceCachePolicy):
      (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
      (WebCore::FrameLoader::detachChildren):
      (WebCore::FrameLoader::checkLoadComplete):
      (WebCore::FrameLoader::detachFromParent):
      (WebCore::FrameLoader::loadPostRequest):
      (WebCore::FrameLoader::loadResourceSynchronously):
      (WebCore::FrameLoader::shouldClose):
      (WebCore::FrameLoader::handleBeforeUnloadEvent):
      (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
      (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
      (WebCore::createWindow):
      * loader/HistoryController.cpp:
      (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
      (WebCore::HistoryController::restoreScrollPositionAndViewState):
      (WebCore::HistoryController::saveDocumentState):
      (WebCore::HistoryController::saveDocumentAndScrollState):
      (WebCore::isAssociatedToRequestedHistoryItem):
      (WebCore::HistoryController::restoreDocumentState):
      (WebCore::HistoryController::shouldStopLoadingForHistoryItem):
      (WebCore::HistoryController::goToItem):
      (WebCore::HistoryController::updateForBackForwardNavigation):
      (WebCore::HistoryController::updateForReload):
      (WebCore::HistoryController::updateForStandardLoad):
      (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
      (WebCore::HistoryController::updateForClientRedirect):
      (WebCore::HistoryController::updateForCommit):
      (WebCore::HistoryController::recursiveUpdateForCommit):
      (WebCore::HistoryController::updateForSameDocumentNavigation):
      (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
      (WebCore::HistoryController::initializeItem):
      (WebCore::HistoryController::createItemTree):
      (WebCore::HistoryController::recursiveSetProvisionalItem):
      (WebCore::HistoryController::recursiveGoToItem):
      (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
      (WebCore::HistoryController::updateCurrentItem):
      (WebCore::HistoryController::pushState):
      (WebCore::HistoryController::replaceState):
      * loader/ImageLoader.cpp:
      (WebCore::pageIsBeingDismissed):
      * loader/MixedContentChecker.cpp:
      (WebCore::MixedContentChecker::client):
      * loader/NavigationScheduler.cpp:
      (WebCore::ScheduledURLNavigation::fire):
      (WebCore::ScheduledURLNavigation::didStartTimer):
      (WebCore::ScheduledURLNavigation::didStopTimer):
      (WebCore::ScheduledRedirect::shouldStartTimer):
      (WebCore::ScheduledRedirect::fire):
      (WebCore::ScheduledRefresh::fire):
      (WebCore::ScheduledHistoryNavigation::fire):
      (WebCore::ScheduledFormSubmission::fire):
      (WebCore::ScheduledFormSubmission::didStartTimer):
      (WebCore::ScheduledFormSubmission::didStopTimer):
      (WebCore::NavigationScheduler::mustLockBackForwardList):
      (WebCore::NavigationScheduler::scheduleLocationChange):
      (WebCore::NavigationScheduler::scheduleFormSubmission):
      (WebCore::NavigationScheduler::scheduleRefresh):
      (WebCore::NavigationScheduler::schedule):
      * loader/PingLoader.cpp:
      (WebCore::PingLoader::loadImage):
      (WebCore::PingLoader::sendPing):
      (WebCore::PingLoader::sendViolationReport):
      (WebCore::PingLoader::PingLoader):
      * loader/PolicyChecker.cpp:
      (WebCore::PolicyChecker::checkNavigationPolicy):
      (WebCore::PolicyChecker::checkNewWindowPolicy):
      (WebCore::PolicyChecker::checkContentPolicy):
      (WebCore::PolicyChecker::cancelCheck):
      (WebCore::PolicyChecker::stopCheck):
      (WebCore::PolicyChecker::cannotShowMIMEType):
      (WebCore::PolicyChecker::continueLoadAfterWillSubmitForm):
      (WebCore::PolicyChecker::continueAfterNavigationPolicy):
      (WebCore::PolicyChecker::continueAfterNewWindowPolicy):
      (WebCore::PolicyChecker::handleUnimplementablePolicy):
      * loader/ProgressTracker.cpp:
      (WebCore::ProgressTracker::progressStarted):
      (WebCore::ProgressTracker::progressCompleted):
      (WebCore::ProgressTracker::finalProgressComplete):
      (WebCore::ProgressTracker::incrementProgress):
      (WebCore::ProgressTracker::progressHeartbeatTimerFired):
      * loader/ResourceLoadNotifier.cpp:
      (WebCore::ResourceLoadNotifier::didReceiveAuthenticationChallenge):
      (WebCore::ResourceLoadNotifier::didCancelAuthenticationChallenge):
      (WebCore::ResourceLoadNotifier::willSendRequest):
      (WebCore::ResourceLoadNotifier::didFailToLoad):
      (WebCore::ResourceLoadNotifier::assignIdentifierToInitialRequest):
      (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
      (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
      (WebCore::ResourceLoadNotifier::dispatchDidReceiveData):
      (WebCore::ResourceLoadNotifier::dispatchDidFinishLoading):
      (WebCore::ResourceLoadNotifier::dispatchDidFailLoading):
      * loader/ResourceLoader.cpp:
      (WebCore::ResourceLoader::ResourceLoader):
      (WebCore::ResourceLoader::start):
      (WebCore::ResourceLoader::frameLoader):
      (WebCore::ResourceLoader::willSendRequest):
      * loader/SubframeLoader.cpp:
      (WebCore::SubframeLoader::pluginIsLoadable):
      (WebCore::SubframeLoader::loadMediaPlayerProxyPlugin):
      (WebCore::SubframeLoader::createJavaAppletWidget):
      (WebCore::SubframeLoader::loadOrRedirectSubframe):
      (WebCore::SubframeLoader::loadSubframe):
      (WebCore::SubframeLoader::allowPlugins):
      (WebCore::SubframeLoader::shouldUsePlugin):
      (WebCore::SubframeLoader::loadPlugin):
      * loader/appcache/ApplicationCacheGroup.cpp:
      (WebCore::ApplicationCacheGroup::selectCache):
      (WebCore::ApplicationCacheGroup::selectCacheWithoutManifestURL):
      (WebCore::ApplicationCacheGroup::update):
      (WebCore::ApplicationCacheGroup::createResourceHandle):
      (WebCore::ApplicationCacheGroup::didReceiveResponse):
      (WebCore::ApplicationCacheGroup::didFinishLoading):
      (WebCore::ApplicationCacheGroup::didFail):
      (WebCore::ApplicationCacheGroup::addEntry):
      (WebCore::CallCacheListenerTask::performTask):
      (WebCore::ApplicationCacheGroup::postListenerTask):
      * loader/appcache/DOMApplicationCache.cpp:
      (WebCore::DOMApplicationCache::applicationCacheHost):
      * loader/archive/cf/LegacyWebArchive.cpp:
      (WebCore::LegacyWebArchive::create):
      (WebCore::LegacyWebArchive::createFromSelection):
      * loader/cache/CachedResource.cpp:
      (WebCore::CachedResource::addAdditionalRequestHeaders):
      (WebCore::CachedResource::load):
      * loader/cache/CachedResourceLoader.cpp:
      (WebCore::CachedResourceLoader::requestImage):
      (WebCore::CachedResourceLoader::checkInsecureContent):
      (WebCore::CachedResourceLoader::canRequest):
      (WebCore::CachedResourceLoader::shouldContinueAfterNotifyingLoadedFromMemoryCache):
      (WebCore::CachedResourceLoader::requestResource):
      (WebCore::CachedResourceLoader::clientDefersImage):
      (WebCore::CachedResourceLoader::cachePolicy):
      (WebCore::CachedResourceLoader::loadDone):
      * loader/icon/IconController.cpp:
      (WebCore::IconController::commitToDatabase):
      (WebCore::IconController::startLoader):
      (WebCore::IconController::continueLoadWithDecision):
      * loader/icon/IconLoader.cpp:
      (WebCore::IconLoader::startLoading):
      (WebCore::IconLoader::notifyFinished):
      * page/Chrome.cpp:
      (WebCore::canRunModalIfDuringPageDismissal):
      * page/ContextMenuController.cpp:
      (WebCore::openNewWindow):
      (WebCore::ContextMenuController::contextMenuItemSelected):
      (WebCore::ContextMenuController::populate):
      (WebCore::ContextMenuController::checkOrEnableIfNeeded):
      * page/DOMWindow.cpp:
      (WebCore::DOMWindow::dispatchAllPendingBeforeUnloadEvents):
      (WebCore::DOMWindow::postMessageTimerFired):
      (WebCore::DOMWindow::close):
      (WebCore::DOMWindow::print):
      (WebCore::DOMWindow::stop):
      (WebCore::DOMWindow::setName):
      (WebCore::DOMWindow::opener):
      (WebCore::DOMWindow::dispatchLoadEvent):
      (WebCore::DOMWindow::setLocation):
      (WebCore::DOMWindow::createWindow):
      (WebCore::DOMWindow::open):
      * page/DOMWindowExtension.cpp:
      (WebCore::DOMWindowExtension::disconnectFrameForPageCache):
      (WebCore::DOMWindowExtension::reconnectFrameFromPageCache):
      (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
      (WebCore::DOMWindowExtension::willDestroyGlobalObjectInFrame):
      (WebCore::DOMWindowExtension::willDetachGlobalObjectFromFrame):
      * page/DragController.cpp:
      (WebCore::DragController::performDrag):
      * page/EventHandler.cpp:
      (WebCore::EventHandler::handleMousePressEvent):
      (WebCore::EventHandler::keyEvent):
      * page/Frame.cpp:
      (WebCore::Frame::~Frame):
      (WebCore::Frame::setView):
      (WebCore::Frame::injectUserScripts):
      (WebCore::Frame::willDetachPage):
      * page/Frame.h:
      (WebCore::Frame::loader):
      * page/FrameView.cpp:
      (WebCore::FrameView::mediaType):
      (WebCore::FrameView::setFixedVisibleContentRect):
      (WebCore::FrameView::shouldUseLoadTimeDeferredRepaintDelay):
      (WebCore::FrameView::performPostLayoutTasks):
      (WebCore::FrameView::autoSizeIfEnabled):
      (WebCore::FrameView::scrollTo):
      (WebCore::FrameView::shouldSuspendScrollAnimations):
      (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
      (WebCore::FrameView::wheelEvent):
      (WebCore::FrameView::firePaintRelatedMilestones):
      * page/History.cpp:
      (WebCore::History::stateInternal):
      (WebCore::History::stateObjectAdded):
      * page/Location.cpp:
      (WebCore::Location::setLocation):
      * page/Navigator.cpp:
      (WebCore::Navigator::userAgent):
      * page/Page.cpp:
      (WebCore::Page::goToItem):
      (WebCore::Page::refreshPlugins):
      (WebCore::Page::setDefersLoading):
      (WebCore::Page::setMemoryCacheClientCallsEnabled):
      (WebCore::Page::addRelevantRepaintedObject):
      * page/Performance.cpp:
      (WebCore::Performance::now):
      * page/PerformanceNavigation.cpp:
      (WebCore::PerformanceNavigation::type):
      (WebCore::PerformanceNavigation::redirectCount):
      * page/PerformanceResourceTiming.cpp:
      (WebCore::monotonicTimeToDocumentMilliseconds):
      * page/mac/PageMac.cpp:
      (WebCore::Page::addSchedulePair):
      (WebCore::Page::removeSchedulePair):
      * platform/ios/PasteboardIOS.mm:
      (WebCore::documentFragmentWithImageResource):
      (WebCore::documentFragmentWithRTF):
      (WebCore::Pasteboard::documentFragmentForPasteboardItemAtIndex):
      * platform/mac/HTMLConverter.mm:
      (-[WebHTMLConverter _addAttachmentForElement:URL:needsParagraph:usePlaceholder:]):
      (-[WebHTMLConverter _loadFromDOMRange]):
      * platform/mac/PasteboardMac.mm:
      (WebCore::documentFragmentWithImageResource):
      (WebCore::documentFragmentWithRTF):
      (WebCore::fragmentFromWebArchive):
      * plugins/DOMMimeType.cpp:
      (WebCore::DOMMimeType::enabledPlugin):
      * rendering/RenderLayer.cpp:
      (WebCore::RenderLayer::scrollTo):
      * svg/SVGAElement.cpp:
      (WebCore::SVGAElement::defaultEventHandler):
      * svg/graphics/SVGImage.cpp:
      (WebCore::SVGImage::~SVGImage):
      (WebCore::SVGImage::dataChanged):
      * testing/Internals.cpp:
      (WebCore::Internals::formControlStateOfPreviousHistoryItem):
      (WebCore::Internals::setFormControlStateOfPreviousHistoryItem):
      (WebCore::Internals::getReferencedFilePaths):
      (WebCore::Internals::forceReload):
      * xml/XSLTProcessorLibxslt.cpp:
      (WebCore::docLoaderFunc):
      * xml/parser/XMLDocumentParserLibxml2.cpp:
      (WebCore::openFunc):
      (WebCore::XMLDocumentParser::startElementNs):
      
      Source/WebKit/blackberry:
      
      * Api/WebPage.cpp:
      (BlackBerry::WebKit::WebPagePrivate::load):
      (BlackBerry::WebKit::WebPagePrivate::loadString):
      (BlackBerry::WebKit::WebPagePrivate::stopCurrentLoad):
      (BlackBerry::WebKit::closeURLRecursively):
      (BlackBerry::WebKit::WebPage::dispatchBeforeUnloadEvent):
      (BlackBerry::WebKit::WebPagePrivate::shouldSendResizeEvent):
      (BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
      (BlackBerry::WebKit::WebPage::reload):
      (BlackBerry::WebKit::WebPage::reloadFromCache):
      (BlackBerry::WebKit::WebPage::textEncoding):
      (BlackBerry::WebKit::WebPage::forcedTextEncoding):
      (BlackBerry::WebKit::WebPage::setForcedTextEncoding):
      (BlackBerry::WebKit::WebPage::title):
      * WebCoreSupport/ChromeClientBlackBerry.cpp:
      (WebCore::ChromeClientBlackBerry::createWindow):
      * WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
      (WebCore::FrameLoaderClientBlackBerry::dispatchDidChangeLocationWithinPage):
      (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForResponse):
      (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNavigationAction):
      (WebCore::FrameLoaderClientBlackBerry::delayPolicyCheckUntilFragmentExists):
      (WebCore::FrameLoaderClientBlackBerry::dispatchDecidePolicyForNewWindowAction):
      (WebCore::FrameLoaderClientBlackBerry::createPlugin):
      (WebCore::FrameLoaderClientBlackBerry::receivedData):
      (WebCore::FrameLoaderClientBlackBerry::createDocumentLoader):
      (WebCore::FrameLoaderClientBlackBerry::dispatchDidCommitLoad):
      (WebCore::FrameLoaderClientBlackBerry::dispatchDidFailProvisionalLoad):
      (WebCore::FrameLoaderClientBlackBerry::dispatchWillSubmitForm):
      (WebCore::FrameLoaderClientBlackBerry::createFrame):
      (WebCore::FrameLoaderClientBlackBerry::dispatchDidLayout):
      (WebCore::FrameLoaderClientBlackBerry::dispatchWillSendRequest):
      (WebCore::FrameLoaderClientBlackBerry::restoreViewState):
      (WebCore::FrameLoaderClientBlackBerry::startDownload):
      (WebCore::FrameLoaderClientBlackBerry::canCachePage):
      (WebCore::FrameLoaderClientBlackBerry::didRestoreFromPageCache):
      * WebKitSupport/PagePopup.cpp:
      (BlackBerry::WebKit::PagePopup::initialize):
      
      Source/WebKit/efl:
      
      * WebCoreSupport/ChromeClientEfl.cpp:
      (kit):
      * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
      (DumpRenderTreeSupportEfl::callShouldCloseOnWebView):
      (DumpRenderTreeSupportEfl::clearOpener):
      (DumpRenderTreeSupportEfl::frameChildren):
      (DumpRenderTreeSupportEfl::responseMimeType):
      (DumpRenderTreeSupportEfl::provisionalURL):
      * WebCoreSupport/FrameLoaderClientEfl.cpp:
      (WebCore::FrameLoaderClientEfl::callPolicyFunction):
      (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNewWindowAction):
      (WebCore::FrameLoaderClientEfl::dispatchDecidePolicyForNavigationAction):
      (WebCore::FrameLoaderClientEfl::updateGlobalHistoryRedirectLinks):
      (WebCore::FrameLoaderClientEfl::updateGlobalHistory):
      * ewk/ewk_frame.cpp:
      (_ewk_frame_loader_efl_get):
      (_ewk_frame_smart_del):
      (_ewk_frame_contents_set_internal):
      (ewk_frame_stop):
      (ewk_frame_reload):
      (ewk_frame_reload_full):
      (ewk_frame_child_add):
      * ewk/ewk_view.cpp:
      (ewk_view_frame_focused_get):
      (ewk_view_setting_user_agent_set):
      (ewk_view_setting_encoding_custom_get):
      (ewk_view_setting_encoding_custom_set):
      
      Source/WebKit/gtk:
      
      * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
      (DumpRenderTreeSupportGtk::clearOpener):
      (DumpRenderTreeSupportGtk::shouldClose):
      * WebCoreSupport/FrameLoaderClientGtk.cpp:
      (WebKit::FrameLoaderClient::dispatchWillSubmitForm):
      (WebKit::FrameLoaderClient::committedLoad):
      (WebKit::FrameLoaderClient::dispatchDecidePolicyForResponse):
      (WebKit::FrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
      (WebKit::FrameLoaderClient::dispatchDecidePolicyForNavigationAction):
      (WebKit::FrameLoaderClient::createFrame):
      (WebKit::FrameLoaderClient::dispatchDidCommitLoad):
      * webkit/webkitwebframe.cpp:
      (webkit_web_frame_finalize):
      (webkit_web_frame_load_uri):
      (webkit_web_frame_load_data):
      (webkit_web_frame_load_request):
      (webkit_web_frame_stop_loading):
      (webkit_web_frame_reload):
      (webkit_web_frame_get_data_source):
      (webkit_web_frame_get_provisional_data_source):
      (webkit_web_frame_get_response_mime_type):
      (webkit_web_frame_get_network_response):
      (WebKit::kit):
      * webkit/webkitwebpolicydecision.cpp:
      (webkit_web_policy_decision_use):
      (webkit_web_policy_decision_ignore):
      (webkit_web_policy_decision_download):
      * webkit/webkitwebview.cpp:
      (webkit_web_view_dispose):
      (webkit_web_view_reload):
      (webkit_web_view_reload_bypass_cache):
      (webkit_web_view_stop_loading):
      (webkit_web_view_can_show_mime_type):
      (webkit_web_view_set_custom_encoding):
      (webkit_web_view_get_custom_encoding):
      (webkit_web_view_get_subresources):
      
      Source/WebKit/mac:
      
      * Plugins/Hosted/HostedNetscapePluginStream.mm:
      (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
      * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
      (WebKit::NetscapePluginInstanceProxy::performRequest):
      (WebKit::NetscapePluginInstanceProxy::loadRequest):
      * Plugins/Hosted/WebHostedNetscapePluginView.mm:
      (-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
      * Plugins/WebBaseNetscapePluginView.mm:
      (-[WebBaseNetscapePluginView requestWithURLCString:]):
      * Plugins/WebNetscapePluginStream.mm:
      (WebNetscapePluginStream::WebNetscapePluginStream):
      * Plugins/WebNetscapePluginView.mm:
      (-[WebNetscapePluginView loadStream]):
      (-[WebNetscapePluginView pluginView:receivedResponse:]):
      (-[WebNetscapePluginView loadPluginRequest:]):
      (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
      * Plugins/WebPluginController.mm:
      * WebCoreSupport/WebFrameLoaderClient.mm:
      (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
      (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
      (WebFrameLoaderClient::dispatchWillSubmitForm):
      (WebFrameLoaderClient::updateGlobalHistory):
      (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
      (WebFrameLoaderClient::restoreViewState):
      (WebFrameLoaderClient::transitionToCommittedForNewPage):
      (WebFrameLoaderClient::createFrame):
      * WebCoreSupport/WebFrameNetworkingContext.mm:
      (WebFrameNetworkingContext::blockedError):
      * WebCoreSupport/WebPlatformStrategies.mm:
      (WebPlatformStrategies::getPluginInfo):
      * WebView/WebFrame.mm:
      (kit):
      (-[WebFrame _dataSource]):
      (-[WebFrame _canProvideDocumentSource]):
      (-[WebFrame _commitData:]):
      (-[WebFrame _firstLayoutDone]):
      (-[WebFrame _loadType]):
      (-[WebFrame _cacheabilityDictionary]):
      (-[WebFrame _clearOpener]):
      (-[WebFrame provisionalDataSource]):
      (-[WebFrame dataSource]):
      (-[WebFrame loadRequest:]):
      (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
      (-[WebFrame loadArchive:]):
      (-[WebFrame stopLoading]):
      (-[WebFrame reload]):
      (-[WebFrame reloadFromOrigin]):
      * WebView/WebHTMLRepresentation.mm:
      (-[WebHTMLRepresentation receivedData:withDataSource:]):
      * WebView/WebHTMLView.mm:
      (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
      * WebView/WebPDFView.mm:
      (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
      * WebView/WebRenderLayer.mm:
      (-[WebRenderLayer initWithWebFrame:]):
      * WebView/WebRenderNode.mm:
      (-[WebRenderNode _initWithCoreFrame:]):
      * WebView/WebView.mm:
      (-[WebView _close]):
      (-[WebView _loadBackForwardListFromOtherView:]):
      (-[WebView _cachedResponseForURL:]):
      (-[WebView setCustomTextEncodingName:]):
      (-[WebView shouldClose]):
      
      Source/WebKit/qt:
      
      * WebCoreSupport/ChromeClientQt.cpp:
      (WebCore::ChromeClientQt::closeWindowSoon):
      * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
      (DumpRenderTreeSupportQt::shouldClose):
      (DumpRenderTreeSupportQt::responseMimeType):
      (DumpRenderTreeSupportQt::clearOpener):
      (DumpRenderTreeSupportQt::thirdPartyCookiePolicyAllows):
      (DumpRenderTreeSupportQt::setAlternateHtml):
      * WebCoreSupport/FrameLoaderClientQt.cpp:
      (WebCore::FrameLoaderClientQt::callPolicyFunction):
      (WebCore::FrameLoaderClientQt::dispatchDidStartProvisionalLoad):
      (WebCore::FrameLoaderClientQt::updateGlobalHistory):
      (WebCore::FrameLoaderClientQt::updateGlobalHistoryRedirectLinks):
      (WebCore::FrameLoaderClientQt::callErrorPageExtension):
      (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNewWindowAction):
      (WebCore::FrameLoaderClientQt::dispatchDecidePolicyForNavigationAction):
      (WebCore::FrameLoaderClientQt::startDownload):
      (WebCore::FrameLoaderClientQt::createFrame):
      (WebCore::FrameLoaderClientQt::objectContentType):
      * WebCoreSupport/QWebFrameAdapter.cpp:
      (QWebFrameAdapter::load):
      (QWebFrameAdapter::setContent):
      (QWebFrameAdapter::setHtml):
      (QWebFrameAdapter::kit):
      (QWebFrameAdapter::title):
      (QWebFrameAdapter::clearCoreFrame):
      * WebCoreSupport/QWebPageAdapter.cpp:
      (frameLoadRequest):
      (openNewWindow):
      (QWebPageAdapter::triggerAction):
      (QWebPageAdapter::currentFrame):
      
      Source/WebKit/win:
      
      * WebCoreSupport/WebContextMenuClient.cpp:
      (WebContextMenuClient::searchWithGoogle):
      * WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebFrameLoaderClient::updateGlobalHistory):
      (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
      (WebFrameLoaderClient::savePlatformDataToCachedFrame):
      (WebFrameLoaderClient::createFrame):
      (WebFrameLoaderClient::dispatchDidFailToStartPlugin):
      * WebCoreSupport/WebFrameNetworkingContext.cpp:
      (WebFrameNetworkingContext::blockedError):
      (WebFrameNetworkingContext::referrer):
      * WebElementPropertyBag.cpp:
      (WebElementPropertyBag::Read):
      * WebFrame.cpp:
      (kit):
      (WebFrame::reloadFromOrigin):
      (WebFrame::loadRequest):
      (WebFrame::loadData):
      (WebFrame::dataSource):
      (WebFrame::provisionalDataSource):
      (WebFrame::stopLoading):
      (WebFrame::reload):
      (WebFrame::firstLayoutDone):
      (WebFrame::loadType):
      (WebFrame::clearOpener):
      (WebFrame::dispatchWillSubmitForm):
      (WebFrame::receivedPolicyDecision):
      (WebFrame::dispatchDecidePolicyForResponse):
      (WebFrame::dispatchDecidePolicyForNewWindowAction):
      (WebFrame::dispatchDecidePolicyForNavigationAction):
      (WebFrame::createJavaAppletWidget):
      * WebFramePolicyListener.cpp:
      (WebFramePolicyListener::receivedPolicyDecision):
      * WebView.cpp:
      (WebView::close):
      (WebView::canShowMIMEType):
      (WebView::setCustomTextEncodingName):
      (WebView::loadBackForwardListFromOtherView):
      (WebView::shouldClose):
      
      Source/WebKit/wince:
      
      * WebCoreSupport/FrameLoaderClientWinCE.cpp:
      (WebKit::FrameLoaderClientWinCE::dispatchDecidePolicyForResponse):
      (WebKit::FrameLoaderClientWinCE::dispatchDecidePolicyForNewWindowAction):
      (WebKit::FrameLoaderClientWinCE::dispatchDecidePolicyForNavigationAction):
      (WebKit::FrameLoaderClientWinCE::dispatchWillSubmitForm):
      * WebCoreSupport/FrameNetworkingContextWinCE.cpp:
      (WebKit::FrameNetworkingContextWinCE::referrer):
      * WebView.cpp:
      (WebView::createFrame):
      (WebView::load):
      (WebView::reload):
      (WebView::stop):
      
      Source/WebKit2:
      
      * Shared/WebRenderLayer.cpp:
      (WebKit::WebRenderLayer::create):
      * Shared/WebRenderObject.cpp:
      (WebKit::WebRenderObject::create):
      * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
      (WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
      * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
      (WKBundleFrameGetFrameLoadState):
      (WKBundleFrameClearOpener):
      (WKBundleFrameCallShouldCloseOnWebView):
      * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
      (WebKit::InjectedBundleNodeHandle::documentFrame):
      (WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
      (WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
      * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
      (WebKit::InjectedBundleDOMWindowExtension::frame):
      * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
      (WebKit::InjectedBundleHitTestResult::frame):
      (WebKit::InjectedBundleHitTestResult::targetFrame):
      * WebProcess/Plugins/PDF/PDFPlugin.mm:
      (WebKit::PDFPlugin::clickedLink):
      * WebProcess/Plugins/PluginView.cpp:
      (WebKit::webPage):
      (WebKit::PluginView::didFailToInitializePlugin):
      (WebKit::PluginView::performFrameLoadURLRequest):
      (WebKit::PluginView::userAgent):
      (WebKit::PluginView::loadURL):
      (WebKit::PluginView::cancelManualStreamLoad):
      (WebKit::PluginView::proxiesForURL):
      * WebProcess/WebCoreSupport/WebChromeClient.cpp:
      (WebKit::WebChromeClient::focusedElementChanged):
      (WebKit::WebChromeClient::focusedFrameChanged):
      (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
      (WebKit::WebChromeClient::closeWindowSoon):
      (WebKit::WebChromeClient::runJavaScriptAlert):
      (WebKit::WebChromeClient::runJavaScriptConfirm):
      (WebKit::WebChromeClient::runJavaScriptPrompt):
      (WebKit::WebChromeClient::unavailablePluginButtonClicked):
      (WebKit::WebChromeClient::print):
      (WebKit::WebChromeClient::exceededDatabaseQuota):
      (WebKit::WebChromeClient::runOpenPanel):
      * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
      (WebKit::WebContextMenuClient::searchWithGoogle):
      * WebProcess/WebCoreSupport/WebEditorClient.cpp:
      (WebKit::WebEditorClient::textFieldDidBeginEditing):
      (WebKit::WebEditorClient::textFieldDidEndEditing):
      (WebKit::WebEditorClient::textDidChangeInTextField):
      (WebKit::WebEditorClient::textDidChangeInTextArea):
      (WebKit::WebEditorClient::doTextFieldCommandFromEvent):
      (WebKit::WebEditorClient::textWillBeDeletedInTextField):
      * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
      (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
      (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
      (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
      (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
      (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
      (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
      (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
      (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
      (WebKit::WebFrameLoaderClient::updateGlobalHistory):
      (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
      (WebKit::WebFrameLoaderClient::restoreViewState):
      (WebKit::WebFrameLoaderClient::createFrame):
      (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
      (WebKit::WebFrameLoaderClient::objectContentType):
      * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
      (WebKit::WebPlatformStrategies::getPluginInfo):
      * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
      (WebKit::WebFrameNetworkingContext::blockedError):
      * WebProcess/WebPage/WebFrame.cpp:
      (WebKit::WebFrame::didReceivePolicyDecision):
      (WebKit::WebFrame::startDownload):
      (WebKit::WebFrame::source):
      (WebKit::WebFrame::contentsAsString):
      (WebKit::WebFrame::url):
      (WebKit::WebFrame::parentFrame):
      (WebKit::WebFrame::childFrames):
      (WebKit::WebFrame::stopLoading):
      (WebKit::WebFrame::frameForContext):
      (WebKit::WebFrame::provisionalURL):
      (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
      (WebKit::WebFrame::mimeTypeForResourceWithURL):
      (WebKit::WebFrameFilter::shouldIncludeSubframe):
      * WebProcess/WebPage/WebPage.cpp:
      (WebKit::WebPage::createPlugin):
      (WebKit::WebPage::close):
      (WebKit::WebPage::tryClose):
      (WebKit::WebPage::loadURLRequest):
      (WebKit::WebPage::loadDataImpl):
      (WebKit::WebPage::linkClicked):
      (WebKit::WebPage::stopLoadingFrame):
      (WebKit::WebPage::stopLoading):
      (WebKit::WebPage::reload):
      (WebKit::WebPage::tryRestoreScrollPosition):
      (WebKit::WebPage::getMainResourceDataOfFrame):
      (WebKit::resourceDataForFrame):
      (WebKit::shouldReuseCommittedSandboxExtension):
      (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
      (WebKit::WebPage::hasLocalDataForURL):
      (WebKit::WebPage::setCustomTextEncodingName):
      (WebKit::WebPage::canPluginHandleResponse):
      (WebKit::WebPage::canShowMIMEType):
      (WebKit::WebPage::didCommitLoad):
      * WebProcess/WebPage/mac/WebPageMac.mm:
      (WebKit::WebPage::platformHasLocalDataForURL):
      (WebKit::cachedResponseForURL):
      * WebProcess/WebProcess.cpp:
      (WebKit::WebProcess::downloadRequest):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154142 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      df550b96
    • rniwa@webkit.org's avatar
      Qt minimum build fix after r154116. · 7bd5a339
      rniwa@webkit.org authored
      * page/FrameView.cpp:
      (WebCore::FrameView::sendResizeEventIfNeeded):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7bd5a339
    • fpizlo@apple.com's avatar
      Typed arrays should be rewritten · 0e0d9312
      fpizlo@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119064
      
      .: 
      
      Reviewed by Oliver Hunt.
      
      Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
      
      * Source/autotools/symbols.filter:
      
      Source/JavaScriptCore: 
      
      Reviewed by Oliver Hunt.
              
      Typed arrays were previously deficient in several major ways:
              
      - They were defined separately in WebCore and in the jsc shell. The two
        implementations were different, and the jsc shell one was basically wrong.
        The WebCore one was quite awful, also.
              
      - Typed arrays were not visible to the JIT except through some weird hooks.
        For example, the JIT could not ask "what is the Structure that this typed
        array would have if I just allocated it from this global object". Also,
        it was difficult to wire any of the typed array intrinsics, because most
        of the functionality wasn't visible anywhere in JSC.
              
      - Typed array allocation was brain-dead. Allocating a typed array involved
        two JS objects, two GC weak handles, and three malloc allocations.
              
      - Neutering. It involved keeping tabs on all native views but not the view
        wrappers, even though the native views can autoneuter just by asking the
        buffer if it was neutered anytime you touch them; while the JS view
        wrappers are the ones that you really want to reach out to.
              
      - Common case-ing. Most typed arrays have one buffer and one view, and
        usually nobody touches the buffer. Yet we created all of that stuff
        anyway, using data structures optimized for the case where you had a lot
        of views.
              
      - Semantic goofs. Typed arrays should, in the future, behave like ES
        features rather than DOM features, for example when it comes to exceptions.
        Firefox already does this and I agree with them.
              
      This patch cleanses our codebase of these sins:
              
      - Typed arrays are almost entirely defined in JSC. Only the lifecycle
        management of native references to buffers is left to WebCore.
              
      - Allocating a typed array requires either two GC allocations (a cell and a
        copied storage vector) or one GC allocation, a malloc allocation, and a
        weak handle (a cell and a malloc'd storage vector, plus a finalizer for the
        latter). The latter is only used for oversize arrays. Remember that before
        it was 7 allocations no matter what.
              
      - Typed arrays require just 4 words of overhead: Structure*, Butterfly*,
        mode/length, void* vector. Before it was a lot more than that - remember,
        there were five additional objects that did absolutely nothing for anybody.
              
      - Native views aren't tracked by the buffer, or by the wrappers. They are
        transient. In the future we'll probably switch to not even having them be
        malloc'd.
              
      - Native array buffers have an efficient way of tracking all of their JS view
        wrappers, both for neutering, and for lifecycle management. The GC
        special-cases native array buffers. This saves a bunch of grief; for example
        it means that a JS view wrapper can refer to its buffer via the butterfly,
        which would be dead by the time we went to finalize.
              
      - Typed array semantics now match Firefox, which also happens to be where the
        standards are going. The discussion on webkit-dev seemed to confirm that
        Chrome is also heading in this direction. This includes making
        Uint8ClampedArray not a subtype of Uint8Array, and getting rid of
        ArrayBufferView as a JS-visible construct.
              
      This is up to a 10x speed-up on programs that allocate a lot of typed arrays.
      It's a 1% speed-up on Octane. It also opens up a bunch of possibilities for
      further typed array optimizations in the JSC JITs, including inlining typed
      array allocation, inlining more of the accessors, reducing the cost of type
      checks, etc.
              
      An additional property of this patch is that typed arrays are mostly
      implemented using templates. This deduplicates a bunch of code, but does mean
      that we need some hacks for exporting s_info's of template classes. See
      JSGenericTypedArrayView.h and JSTypedArrays.cpp. Those hacks are fairly
      low-impact compared to code duplication.
              
      Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * GNUmakefile.list.am:
      * JSCTypedArrayStubs.h: Removed.
      * JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
      * JavaScriptCore.xcodeproj/project.pbxproj:
      * Target.pri:
      * bytecode/ByValInfo.h:
      (JSC::hasOptimizableIndexingForClassInfo):
      (JSC::jitArrayModeForClassInfo):
      (JSC::typedArrayTypeForJITArrayMode):
      * bytecode/SpeculatedType.cpp:
      (JSC::speculationFromClassInfo):
      * dfg/DFGArrayMode.cpp:
      (JSC::DFG::toTypedArrayType):
      * dfg/DFGArrayMode.h:
      (JSC::DFG::ArrayMode::typedArrayType):
      * dfg/DFGSpeculativeJIT.cpp:
      (JSC::DFG::SpeculativeJIT::checkArray):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForIntTypedArray):
      (JSC::DFG::SpeculativeJIT::compileGetByValOnFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compilePutByValForFloatTypedArray):
      (JSC::DFG::SpeculativeJIT::compileGetIndexedPropertyStorage):
      (JSC::DFG::SpeculativeJIT::compileGetArrayLength):
      * dfg/DFGSpeculativeJIT.h:
      * dfg/DFGSpeculativeJIT32_64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * dfg/DFGSpeculativeJIT64.cpp:
      (JSC::DFG::SpeculativeJIT::compile):
      * heap/CopyToken.h:
      * heap/DeferGC.h:
      (JSC::DeferGCForAWhile::DeferGCForAWhile):
      (JSC::DeferGCForAWhile::~DeferGCForAWhile):
      * heap/GCIncomingRefCounted.h: Added.
      (JSC::GCIncomingRefCounted::GCIncomingRefCounted):
      (JSC::GCIncomingRefCounted::~GCIncomingRefCounted):
      (JSC::GCIncomingRefCounted::numberOfIncomingReferences):
      (JSC::GCIncomingRefCounted::incomingReferenceAt):
      (JSC::GCIncomingRefCounted::singletonFlag):
      (JSC::GCIncomingRefCounted::hasVectorOfCells):
      (JSC::GCIncomingRefCounted::hasAnyIncoming):
      (JSC::GCIncomingRefCounted::hasSingleton):
      (JSC::GCIncomingRefCounted::singleton):
      (JSC::GCIncomingRefCounted::vectorOfCells):
      * heap/GCIncomingRefCountedInlines.h: Added.
      (JSC::::addIncomingReference):
      (JSC::::filterIncomingReferences):
      * heap/GCIncomingRefCountedSet.h: Added.
      (JSC::GCIncomingRefCountedSet::size):
      * heap/GCIncomingRefCountedSetInlines.h: Added.
      (JSC::::GCIncomingRefCountedSet):
      (JSC::::~GCIncomingRefCountedSet):
      (JSC::::addReference):
      (JSC::::sweep):
      (JSC::::removeAll):
      (JSC::::removeDead):
      * heap/Heap.cpp:
      (JSC::Heap::addReference):
      (JSC::Heap::extraSize):
      (JSC::Heap::size):
      (JSC::Heap::capacity):
      (JSC::Heap::collect):
      (JSC::Heap::decrementDeferralDepth):
      (JSC::Heap::decrementDeferralDepthAndGCIfNeeded):
      * heap/Heap.h:
      * interpreter/CallFrame.h:
      (JSC::ExecState::dataViewTable):
      * jit/JIT.h:
      * jit/JITPropertyAccess.cpp:
      (JSC::JIT::privateCompileGetByVal):
      (JSC::JIT::privateCompilePutByVal):
      (JSC::JIT::emitIntTypedArrayGetByVal):
      (JSC::JIT::emitFloatTypedArrayGetByVal):
      (JSC::JIT::emitIntTypedArrayPutByVal):
      (JSC::JIT::emitFloatTypedArrayPutByVal):
      * jsc.cpp:
      (GlobalObject::finishCreation):
      * runtime/ArrayBuffer.cpp:
      (JSC::ArrayBuffer::transfer):
      * runtime/ArrayBuffer.h:
      (JSC::ArrayBuffer::createAdopted):
      (JSC::ArrayBuffer::ArrayBuffer):
      (JSC::ArrayBuffer::gcSizeEstimateInBytes):
      (JSC::ArrayBuffer::pin):
      (JSC::ArrayBuffer::unpin):
      (JSC::ArrayBufferContents::tryAllocate):
      * runtime/ArrayBufferView.cpp:
      (JSC::ArrayBufferView::ArrayBufferView):
      (JSC::ArrayBufferView::~ArrayBufferView):
      (JSC::ArrayBufferView::setNeuterable):
      * runtime/ArrayBufferView.h:
      (JSC::ArrayBufferView::isNeutered):
      (JSC::ArrayBufferView::buffer):
      (JSC::ArrayBufferView::baseAddress):
      (JSC::ArrayBufferView::byteOffset):
      (JSC::ArrayBufferView::verifySubRange):
      (JSC::ArrayBufferView::clampOffsetAndNumElements):
      (JSC::ArrayBufferView::calculateOffsetAndLength):
      * runtime/ClassInfo.h:
      * runtime/CommonIdentifiers.h:
      * runtime/DataView.cpp: Added.
      (JSC::DataView::DataView):
      (JSC::DataView::create):
      (JSC::DataView::wrap):
      * runtime/DataView.h: Added.
      (JSC::DataView::byteLength):
      (JSC::DataView::getType):
      (JSC::DataView::get):
      (JSC::DataView::set):
      * runtime/Float32Array.h:
      * runtime/Float64Array.h:
      * runtime/GenericTypedArrayView.h: Added.
      (JSC::GenericTypedArrayView::data):
      (JSC::GenericTypedArrayView::set):
      (JSC::GenericTypedArrayView::setRange):
      (JSC::GenericTypedArrayView::zeroRange):
      (JSC::GenericTypedArrayView::zeroFill):
      (JSC::GenericTypedArrayView::length):
      (JSC::GenericTypedArrayView::byteLength):
      (JSC::GenericTypedArrayView::item):
      (JSC::GenericTypedArrayView::checkInboundData):
      (JSC::GenericTypedArrayView::getType):
      * runtime/GenericTypedArrayViewInlines.h: Added.
      (JSC::::GenericTypedArrayView):
      (JSC::::create):
      (JSC::::createUninitialized):
      (JSC::::subarray):
      (JSC::::wrap):
      * runtime/IndexingHeader.h:
      (JSC::IndexingHeader::arrayBuffer):
      (JSC::IndexingHeader::setArrayBuffer):
      * runtime/Int16Array.h:
      * runtime/Int32Array.h:
      * runtime/Int8Array.h:
      * runtime/JSArrayBuffer.cpp: Added.
      (JSC::JSArrayBuffer::JSArrayBuffer):
      (JSC::JSArrayBuffer::finishCreation):
      (JSC::JSArrayBuffer::create):
      (JSC::JSArrayBuffer::createStructure):
      (JSC::JSArrayBuffer::getOwnPropertySlot):
      (JSC::JSArrayBuffer::getOwnPropertyDescriptor):
      (JSC::JSArrayBuffer::put):
      (JSC::JSArrayBuffer::defineOwnProperty):
      (JSC::JSArrayBuffer::deleteProperty):
      (JSC::JSArrayBuffer::getOwnNonIndexPropertyNames):
      * runtime/JSArrayBuffer.h: Added.
      (JSC::JSArrayBuffer::impl):
      (JSC::toArrayBuffer):
      * runtime/JSArrayBufferConstructor.cpp: Added.
      (JSC::JSArrayBufferConstructor::JSArrayBufferConstructor):
      (JSC::JSArrayBufferConstructor::finishCreation):
      (JSC::JSArrayBufferConstructor::create):
      (JSC::JSArrayBufferConstructor::createStructure):
      (JSC::constructArrayBuffer):
      (JSC::JSArrayBufferConstructor::getConstructData):
      (JSC::JSArrayBufferConstructor::getCallData):
      * runtime/JSArrayBufferConstructor.h: Added.
      * runtime/JSArrayBufferPrototype.cpp: Added.
      (JSC::arrayBufferProtoFuncSlice):
      (JSC::JSArrayBufferPrototype::JSArrayBufferPrototype):
      (JSC::JSArrayBufferPrototype::finishCreation):
      (JSC::JSArrayBufferPrototype::create):
      (JSC::JSArrayBufferPrototype::createStructure):
      * runtime/JSArrayBufferPrototype.h: Added.
      * runtime/JSArrayBufferView.cpp: Added.
      (JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
      (JSC::JSArrayBufferView::JSArrayBufferView):
      (JSC::JSArrayBufferView::finishCreation):
      (JSC::JSArrayBufferView::getOwnPropertySlot):
      (JSC::JSArrayBufferView::getOwnPropertyDescriptor):
      (JSC::JSArrayBufferView::put):
      (JSC::JSArrayBufferView::defineOwnProperty):
      (JSC::JSArrayBufferView::deleteProperty):
      (JSC::JSArrayBufferView::getOwnNonIndexPropertyNames):
      (JSC::JSArrayBufferView::finalize):
      * runtime/JSArrayBufferView.h: Added.
      (JSC::JSArrayBufferView::sizeOf):
      (JSC::JSArrayBufferView::ConstructionContext::operator!):
      (JSC::JSArrayBufferView::ConstructionContext::structure):
      (JSC::JSArrayBufferView::ConstructionContext::vector):
      (JSC::JSArrayBufferView::ConstructionContext::length):
      (JSC::JSArrayBufferView::ConstructionContext::mode):
      (JSC::JSArrayBufferView::ConstructionContext::butterfly):
      (JSC::JSArrayBufferView::mode):
      (JSC::JSArrayBufferView::vector):
      (JSC::JSArrayBufferView::length):
      (JSC::JSArrayBufferView::offsetOfVector):
      (JSC::JSArrayBufferView::offsetOfLength):
      (JSC::JSArrayBufferView::offsetOfMode):
      * runtime/JSArrayBufferViewInlines.h: Added.
      (JSC::JSArrayBufferView::slowDownAndWasteMemoryIfNecessary):
      (JSC::JSArrayBufferView::buffer):
      (JSC::JSArrayBufferView::impl):
      (JSC::JSArrayBufferView::neuter):
      (JSC::JSArrayBufferView::byteOffset):
      * runtime/JSCell.cpp:
      (JSC::JSCell::slowDownAndWasteMemory):
      (JSC::JSCell::getTypedArrayImpl):
      * runtime/JSCell.h:
      * runtime/JSDataView.cpp: Added.
      (JSC::JSDataView::JSDataView):
      (JSC::JSDataView::create):
      (JSC::JSDataView::createUninitialized):
      (JSC::JSDataView::set):
      (JSC::JSDataView::typedImpl):
      (JSC::JSDataView::getOwnPropertySlot):
      (JSC::JSDataView::getOwnPropertyDescriptor):
      (JSC::JSDataView::slowDownAndWasteMemory):
      (JSC::JSDataView::getTypedArrayImpl):
      (JSC::JSDataView::createStructure):
      * runtime/JSDataView.h: Added.
      * runtime/JSDataViewPrototype.cpp: Added.
      (JSC::JSDataViewPrototype::JSDataViewPrototype):
      (JSC::JSDataViewPrototype::create):
      (JSC::JSDataViewPrototype::createStructure):
      (JSC::JSDataViewPrototype::getOwnPropertySlot):
      (JSC::JSDataViewPrototype::getOwnPropertyDescriptor):
      (JSC::getData):
      (JSC::setData):
      (JSC::dataViewProtoFuncGetInt8):
      (JSC::dataViewProtoFuncGetInt16):
      (JSC::dataViewProtoFuncGetInt32):
      (JSC::dataViewProtoFuncGetUint8):
      (JSC::dataViewProtoFuncGetUint16):
      (JSC::dataViewProtoFuncGetUint32):
      (JSC::dataViewProtoFuncGetFloat32):
      (JSC::dataViewProtoFuncGetFloat64):
      (JSC::dataViewProtoFuncSetInt8):
      (JSC::dataViewProtoFuncSetInt16):
      (JSC::dataViewProtoFuncSetInt32):
      (JSC::dataViewProtoFuncSetUint8):
      (JSC::dataViewProtoFuncSetUint16):
      (JSC::dataViewProtoFuncSetUint32):
      (JSC::dataViewProtoFuncSetFloat32):
      (JSC::dataViewProtoFuncSetFloat64):
      * runtime/JSDataViewPrototype.h: Added.
      * runtime/JSFloat32Array.h: Added.
      * runtime/JSFloat64Array.h: Added.
      * runtime/JSGenericTypedArrayView.h: Added.
      (JSC::JSGenericTypedArrayView::byteLength):
      (JSC::JSGenericTypedArrayView::byteSize):
      (JSC::JSGenericTypedArrayView::typedVector):
      (JSC::JSGenericTypedArrayView::canGetIndexQuickly):
      (JSC::JSGenericTypedArrayView::canSetIndexQuickly):
      (JSC::JSGenericTypedArrayView::getIndexQuicklyAsNativeValue):
      (JSC::JSGenericTypedArrayView::getIndexQuicklyAsDouble):
      (JSC::JSGenericTypedArrayView::getIndexQuickly):
      (JSC::JSGenericTypedArrayView::setIndexQuicklyToNativeValue):
      (JSC::JSGenericTypedArrayView::setIndexQuicklyToDouble):
      (JSC::JSGenericTypedArrayView::setIndexQuickly):
      (JSC::JSGenericTypedArrayView::canAccessRangeQuickly):
      (JSC::JSGenericTypedArrayView::typedImpl):
      (JSC::JSGenericTypedArrayView::createStructure):
      (JSC::JSGenericTypedArrayView::info):
      (JSC::toNativeTypedView):
      * runtime/JSGenericTypedArrayViewConstructor.h: Added.
      * runtime/JSGenericTypedArrayViewConstructorInlines.h: Added.
      (JSC::::JSGenericTypedArrayViewConstructor):
      (JSC::::finishCreation):
      (JSC::::create):
      (JSC::::createStructure):
      (JSC::constructGenericTypedArrayView):
      (JSC::::getConstructData):
      (JSC::::getCallData):
      * runtime/JSGenericTypedArrayViewInlines.h: Added.
      (JSC::::JSGenericTypedArrayView):
      (JSC::::create):
      (JSC::::createUninitialized):
      (JSC::::validateRange):
      (JSC::::setWithSpecificType):
      (JSC::::set):
      (JSC::::getOwnPropertySlot):
      (JSC::::getOwnPropertyDescriptor):
      (JSC::::put):
      (JSC::::defineOwnProperty):
      (JSC::::deleteProperty):
      (JSC::::getOwnPropertySlotByIndex):
      (JSC::::putByIndex):
      (JSC::::deletePropertyByIndex):
      (JSC::::getOwnNonIndexPropertyNames):
      (JSC::::getOwnPropertyNames):
      (JSC::::visitChildren):
      (JSC::::copyBackingStore):
      (JSC::::slowDownAndWasteMemory):
      (JSC::::getTypedArrayImpl):
      * runtime/JSGenericTypedArrayViewPrototype.h: Added.
      * runtime/JSGenericTypedArrayViewPrototypeInlines.h: Added.
      (JSC::genericTypedArrayViewProtoFuncSet):
      (JSC::genericTypedArrayViewProtoFuncSubarray):
      (JSC::::JSGenericTypedArrayViewPrototype):
      (JSC::::finishCreation):
      (JSC::::create):
      (JSC::::createStructure):
      * runtime/JSGlobalObject.cpp:
      (JSC::JSGlobalObject::reset):
      (JSC::JSGlobalObject::visitChildren):
      * runtime/JSGlobalObject.h:
      (JSC::JSGlobalObject::arrayBufferPrototype):
      (JSC::JSGlobalObject::arrayBufferStructure):
      (JSC::JSGlobalObject::typedArrayStructure):
      * runtime/JSInt16Array.h: Added.
      * runtime/JSInt32Array.h: Added.
      * runtime/JSInt8Array.h: Added.
      * runtime/JSTypedArrayConstructors.cpp: Added.
      * runtime/JSTypedArrayConstructors.h: Added.
      * runtime/JSTypedArrayPrototypes.cpp: Added.
      * runtime/JSTypedArrayPrototypes.h: Added.
      * runtime/JSTypedArrays.cpp: Added.
      * runtime/JSTypedArrays.h: Added.
      * runtime/JSUint16Array.h: Added.
      * runtime/JSUint32Array.h: Added.
      * runtime/JSUint8Array.h: Added.
      * runtime/JSUint8ClampedArray.h: Added.
      * runtime/Operations.h:
      * runtime/Options.h:
      * runtime/SimpleTypedArrayController.cpp: Added.
      (JSC::SimpleTypedArrayController::SimpleTypedArrayController):
      (JSC::SimpleTypedArrayController::~SimpleTypedArrayController):
      (JSC::SimpleTypedArrayController::toJS):
      * runtime/SimpleTypedArrayController.h: Added.
      * runtime/Structure.h:
      (JSC::Structure::couldHaveIndexingHeader):
      * runtime/StructureInlines.h:
      (JSC::Structure::hasIndexingHeader):
      * runtime/TypedArrayAdaptors.h: Added.
      (JSC::IntegralTypedArrayAdaptor::toNative):
      (JSC::IntegralTypedArrayAdaptor::toJSValue):
      (JSC::IntegralTypedArrayAdaptor::toDouble):
      (JSC::FloatTypedArrayAdaptor::toNative):
      (JSC::FloatTypedArrayAdaptor::toJSValue):
      (JSC::FloatTypedArrayAdaptor::toDouble):
      (JSC::Uint8ClampedAdaptor::toNative):
      (JSC::Uint8ClampedAdaptor::toJSValue):
      (JSC::Uint8ClampedAdaptor::toDouble):
      (JSC::Uint8ClampedAdaptor::clamp):
      * runtime/TypedArrayController.cpp: Added.
      (JSC::TypedArrayController::TypedArrayController):
      (JSC::TypedArrayController::~TypedArrayController):
      * runtime/TypedArrayController.h: Added.
      * runtime/TypedArrayDescriptor.h: Removed.
      * runtime/TypedArrayInlines.h: Added.
      * runtime/TypedArrayType.cpp: Added.
      (JSC::classInfoForType):
      (WTF::printInternal):
      * runtime/TypedArrayType.h: Added.
      (JSC::toIndex):
      (JSC::isTypedView):
      (JSC::elementSize):
      (JSC::isInt):
      (JSC::isFloat):
      (JSC::isSigned):
      (JSC::isClamped):
      * runtime/TypedArrays.h: Added.
      * runtime/Uint16Array.h:
      * runtime/Uint32Array.h:
      * runtime/Uint8Array.h:
      * runtime/Uint8ClampedArray.h:
      * runtime/VM.cpp:
      (JSC::VM::VM):
      (JSC::VM::~VM):
      * runtime/VM.h:
      
      Source/WebCore: 
      
      Reviewed by Oliver Hunt.
      
      Typed arrays are now implemented in JavaScriptCore, and WebCore is merely a
      client of them. There is only one layering violation: WebCore installs a
      WebCoreTypedArrayController on VM, which makes the
      ArrayBuffer<->JSArrayBuffer relationship resemble DOM wrappers. By default,
      JSC makes the ownership go one way; the JSArrayBuffer keeps the ArrayBuffer
      alive but if ArrayBuffer is kept alive from native code then the
      JSArrayByffer may die. WebCoreTypedArrayController will keep the
      JSArrayBuffer alive if the ArrayBuffer is in the opaque root set.
              
      To make non-JSDOMWrappers behave like DOM wrappers, a bunch of code is
      changed to make most references to wrappers refer to JSObject* rather than
      JSDOMWrapper*.
              
      Array buffer views are now transient; the JS array buffer view wrappers
      don't own them or keep them alive. This required a bunch of changes to make
      bindings code use RefPtr<ArrayBufferView> to hold onto their views.
              
      Also there is a bunch of new code to make JSC-provided array buffers and
      views obey the toJS/to<ClassName> idiom for wrapping and unwrapping.
              
      Finally, the DataView API is now completely different: the JSDataView
      provides the same user-visible JS API but using its own internal magic; the
      C++ code that uses DataView now uses a rather different API that is not
      aware of usual DOM semantics, since it's in JSC and not WebCore. It's
      equally useful for all of WebCore's purposes, but some code had to change
      to adapt the new conventions.
              
      Some tests have been changed or rebased due to changes in behavior, that
      bring us into conformance with where the standards are going and allow us to
      match Firefox behavior.
      
      Automake work and some additional GTK changes courtesy of
      Zan Dobersek <zdobersek@igalia.com>.
              
      Additional Qt changes courtesy of Arunprasad Rajkumar <arurajku@cisco.com>.
      
      * CMakeLists.txt:
      * DerivedSources.make:
      * ForwardingHeaders/runtime/DataView.h: Added.
      * ForwardingHeaders/runtime/JSArrayBuffer.h: Added.
      * ForwardingHeaders/runtime/JSArrayBufferView.h: Added.
      * ForwardingHeaders/runtime/JSDataView.h: Added.
      * ForwardingHeaders/runtime/JSTypedArrays.h: Added.
      * ForwardingHeaders/runtime/TypedArrayController.h: Added.
      * ForwardingHeaders/runtime/TypedArrayInlines.h: Added.
      * ForwardingHeaders/runtime/TypedArrays.h: Added.
      * GNUmakefile.list.am:
      * Modules/webaudio/RealtimeAnalyser.h:
      * Target.pri:
      * UseJSC.cmake:
      * WebCore.exp.in:
      * WebCore.vcxproj/WebCore.vcxproj:
      * WebCore.xcodeproj/project.pbxproj:
      * bindings/js/DOMWrapperWorld.h:
      * bindings/js/JSArrayBufferCustom.cpp: Removed.
      * bindings/js/JSArrayBufferViewHelper.h: Removed.
      * bindings/js/JSAudioContextCustom.cpp:
      * bindings/js/JSBindingsAllInOne.cpp:
      * bindings/js/JSBlobCustom.cpp:
      * bindings/js/JSCSSRuleCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSCSSValueCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSCryptoCustom.cpp:
      (WebCore::JSCrypto::getRandomValues):
      * bindings/js/JSDOMBinding.h:
      (WebCore::wrapperOwner):
      (WebCore::wrapperContext):
      (WebCore::getInlineCachedWrapper):
      (WebCore::setInlineCachedWrapper):
      (WebCore::clearInlineCachedWrapper):
      (WebCore::getCachedWrapper):
      (WebCore::cacheWrapper):
      (WebCore::uncacheWrapper):
      (WebCore::wrap):
      (WebCore::toJS):
      (WebCore::toArrayBufferView):
      (WebCore::toInt8Array):
      (WebCore::toInt16Array):
      (WebCore::toInt32Array):
      (WebCore::toUint8Array):
      (WebCore::toUint8ClampedArray):
      (WebCore::toUint16Array):
      (WebCore::toUint32Array):
      (WebCore::toFloat32Array):
      (WebCore::toFloat64Array):
      (WebCore::toDataView):
      * bindings/js/JSDataViewCustom.cpp: Removed.
      * bindings/js/JSDictionary.cpp:
      * bindings/js/JSDictionary.h:
      * bindings/js/JSDocumentCustom.cpp:
      (WebCore::JSDocument::location):
      (WebCore::toJS):
      * bindings/js/JSEventCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSFileReaderCustom.cpp:
      * bindings/js/JSHTMLCollectionCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSHTMLTemplateElementCustom.cpp:
      (WebCore::JSHTMLTemplateElement::content):
      * bindings/js/JSImageDataCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSInjectedScriptHostCustom.cpp:
      * bindings/js/JSMessageEventCustom.cpp:
      * bindings/js/JSMessagePortCustom.cpp:
      * bindings/js/JSSVGPathSegCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSStyleSheetCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSTrackCustom.cpp:
      (WebCore::toJS):
      * bindings/js/JSWebGLRenderingContextCustom.cpp:
      * bindings/js/JSXMLHttpRequestCustom.cpp:
      (WebCore::JSXMLHttpRequest::send):
      * bindings/js/SerializedScriptValue.cpp:
      (WebCore::SerializedScriptValue::transferArrayBuffers):
      * bindings/js/WebCoreJSClientData.h:
      (WebCore::initNormalWorldClientData):
      * bindings/js/WebCoreTypedArrayController.cpp: Added.
      (WebCore::WebCoreTypedArrayController::WebCoreTypedArrayController):
      (WebCore::WebCoreTypedArrayController::~WebCoreTypedArrayController):
      (WebCore::WebCoreTypedArrayController::toJS):
      (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
      (WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
      * bindings/js/WebCoreTypedArrayController.h: Added.
      (WebCore::WebCoreTypedArrayController::wrapperOwner):
      * bindings/scripts/CodeGenerator.pm:
      (ForAllParents):
      (ParseInterface):
      (SkipIncludeHeader):
      (IsTypedArrayType):
      (IsWrapperType):
      * bindings/scripts/CodeGeneratorJS.pm:
      (AddIncludesForType):
      (GenerateHeader):
      (GenerateImplementation):
      (GenerateParametersCheck):
      (GetNativeType):
      (JSValueToNative):
      (NativeToJSValue):
      (GenerateConstructorDefinition):
      (GenerateConstructorHelperMethods):
      * fileapi/WebKitBlobBuilder.cpp:
      (WebCore::BlobBuilder::append):
      * fileapi/WebKitBlobBuilder.h:
      * html/canvas/ArrayBuffer.idl: Removed.
      * html/canvas/ArrayBufferView.idl: Removed.
      * html/canvas/DataView.cpp: Removed.
      * html/canvas/DataView.h: Removed.
      * html/canvas/DataView.idl: Removed.
      * html/canvas/Float32Array.idl: Removed.
      * html/canvas/Float64Array.idl: Removed.
      * html/canvas/Int16Array.idl: Removed.
      * html/canvas/Int32Array.idl: Removed.
      * html/canvas/Int8Array.idl: Removed.
      * html/canvas/Uint16Array.idl: Removed.
      * html/canvas/Uint32Array.idl: Removed.
      * html/canvas/Uint8Array.idl: Removed.
      * html/canvas/Uint8ClampedArray.idl: Removed.
      * html/canvas/WebGLRenderingContext.cpp:
      (WebCore::WebGLRenderingContext::readPixels):
      (WebCore::WebGLRenderingContext::validateTexFuncData):
      * page/Crypto.cpp:
      * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
      (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
      (WebCore::MediaPlayerPrivateAVFoundationObjC::extractKeyURIKeyIDAndCertificateFromInitData):
      * platform/graphics/filters/FECustomFilter.h:
      * platform/graphics/filters/FEGaussianBlur.cpp:
      * platform/graphics/filters/FilterEffect.cpp:
      * testing/MockCDM.cpp:
      
      Source/WebKit2: 
      
      Reviewed by Oliver Hunt.
              
      You don't need to include JSUint8Array anymore if you just want to
      unwrap one; JSDOMBinding gives you all of the things you need.
      
      * WebProcess/InjectedBundle/InjectedBundle.cpp:
      
      Source/WTF: 
      
      Reviewed by Oliver Hunt.
              
      - Added the notion of a reference counted object that can be marked Deferred,
        which is like a special-purpose upref.
              
      - Added a common byte flipper.
      
      Automake work courtesy of Zan Dobersek <zdobersek@igalia.com>.
      
      * GNUmakefile.list.am:
      * WTF.xcodeproj/project.pbxproj:
      * wtf/DeferrableRefCounted.h: Added.
      (WTF::DeferrableRefCountedBase::ref):
      (WTF::DeferrableRefCountedBase::hasOneRef):
      (WTF::DeferrableRefCountedBase::refCount):
      (WTF::DeferrableRefCountedBase::isDeferred):
      (WTF::DeferrableRefCountedBase::DeferrableRefCountedBase):
      (WTF::DeferrableRefCountedBase::~DeferrableRefCountedBase):
      (WTF::DeferrableRefCountedBase::derefBase):
      (WTF::DeferrableRefCountedBase::setIsDeferredBase):
      (WTF::DeferrableRefCounted::deref):
      (WTF::DeferrableRefCounted::setIsDeferred):
      (WTF::DeferrableRefCounted::DeferrableRefCounted):
      (WTF::DeferrableRefCounted::~DeferrableRefCounted):
      * wtf/FlipBytes.h: Added.
      (WTF::needToFlipBytesIfLittleEndian):
      (WTF::flipBytes):
      (WTF::flipBytesIfLittleEndian):
      
      LayoutTests: 
      
      Reviewed by Oliver Hunt.
      
      * fast/canvas/webgl/array-set-invalid-arguments-expected.txt:
      * fast/canvas/webgl/array-set-out-of-bounds-expected.txt:
      * fast/canvas/webgl/array-unit-tests-expected.txt:
      * fast/canvas/webgl/array-unit-tests.html:
      * fast/canvas/webgl/data-view-crash-expected.txt:
      * fast/canvas/webgl/script-tests/arraybuffer-transfer-of-control.js:
      (checkView):
      * fast/dom/call-a-constructor-as-a-function-expected.txt:
      * fast/dom/call-a-constructor-as-a-function.html:
      * fast/js/constructor-length.html:
      * fast/js/global-constructors-attributes-dedicated-worker-expected.txt:
      * fast/js/global-constructors-attributes-expected.txt:
      * fast/js/global-constructors-attributes-shared-worker-expected.txt:
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-huge-long-lived.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-large-long-lived.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-buffer.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived-expected.txt: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc-long-lived.html: Added.
      * fast/js/regress/ArrayBuffer-Int8Array-alloc.html: Added.
      * fast/js/regress/Int32Array-Int8Array-view-alloc-expected.txt: Added.
      * fast/js/regress/Int32Array-Int8Array-view-alloc.html: Added.
      * fast/js/regress/Int32Array-alloc-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-huge-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-huge-long-lived-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-huge-long-lived.html: Added.
      * fast/js/regress/Int32Array-alloc-huge.html: Added.
      * fast/js/regress/Int32Array-alloc-large-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-large-long-lived-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-large-long-lived.html: Added.
      * fast/js/regress/Int32Array-alloc-large.html: Added.
      * fast/js/regress/Int32Array-alloc-long-lived-expected.txt: Added.
      * fast/js/regress/Int32Array-alloc-long-lived.html: Added.
      * fast/js/regress/Int32Array-alloc.html: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-huge-long-lived.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-large-long-lived.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived-buffer.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc-long-lived.js: Added.
      * fast/js/regress/script-tests/ArrayBuffer-Int8Array-alloc.js: Added.
      * fast/js/regress/script-tests/Int32Array-Int8Array-view-alloc.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-huge-long-lived.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-huge.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-large-long-lived.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-large.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc-long-lived.js: Added.
      * fast/js/regress/script-tests/Int32Array-alloc.js: Added.
      * platform/mac/fast/js/constructor-length-expected.txt:
      * webgl/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
      * webgl/resources/webgl_test_files/conformance/typedarrays/data-view-test.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0e0d9312
    • akling@apple.com's avatar
      <https://webkit.org/b/119826> Page::focusController() should return a reference. · 8825ce75
      akling@apple.com authored
      Reviewed by Anders Carlsson.
      
      Page::focusController() is never null so make it return a reference.
      Some unnecessary checks were removed as a result.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8825ce75
    • timothy_horton@apple.com's avatar
      FrameView should have an isMainFrameView() · cef709c0
      timothy_horton@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119435
      
      Reviewed by Simon Fraser.
      
      No new tests, just refactoring.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::FrameView):
      (WebCore::FrameView::isMainFrameView):
      (WebCore::FrameView::setFrameRect):
      (WebCore::FrameView::createScrollbar):
      (WebCore::FrameView::applyOverflowToViewport):
      (WebCore::FrameView::setHeaderHeight):
      (WebCore::FrameView::setFooterHeight):
      (WebCore::FrameView::minimumScrollPosition):
      (WebCore::FrameView::maximumScrollPosition):
      (WebCore::FrameView::performPostLayoutTasks):
      (WebCore::FrameView::sendResizeEventIfNeeded):
      (WebCore::FrameView::pagination):
      (WebCore::FrameView::visibleContentScaleFactor):
      (WebCore::FrameView::setVisibleScrollerThumbRect):
      (WebCore::FrameView::scrollbarStyleChanged):
      (WebCore::FrameView::paintScrollCorner):
      (WebCore::FrameView::paintScrollbar):
      (WebCore::FrameView::paintOverhangAreas):
      * page/FrameView.h:
      Add isMainFrameView and adopt it wherever we were previously checking if
      the FrameView's frame was the same as its page's main frame.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154116 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cef709c0
    • antti@apple.com's avatar
      <https://webkit.org/b/119834> Remove ElementShadow · 64d69393
      antti@apple.com authored
      Reviewed by Anders Carlsson.
      
      It is 1:1 with ShadowRoot and has virtually no functionality. What little there is can be moved to ShadowRoot or Element.
      
      * CMakeLists.txt:
      * GNUmakefile.list.am:
      * Target.pri:
      * WebCore.exp.in:
      * WebCore.xcodeproj/project.pbxproj:
      * css/StyleResolver.cpp:
      (WebCore::StyleResolver::locateCousinList):
      * css/StyleScopeResolver.cpp:
      (WebCore::StyleScopeResolver::styleSharingCandidateMatchesHostRules):
      (WebCore::StyleScopeResolver::matchHostRules):
      * dom/ComposedShadowTreeWalker.cpp:
      (WebCore::nodeCanBeDistributed):
      (WebCore::ComposedShadowTreeWalker::traverseChild):
      * dom/ContainerNode.cpp:
      (WebCore::childAttachedAllowedWhenAttachingChildren):
      * dom/ContainerNodeAlgorithms.cpp:
      (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromDocument):
      (WebCore::ChildNodeRemovalNotifier::notifyDescendantRemovedFromTree):
      (WebCore::assertConnectedSubrameCountIsConsistent):
      * dom/ContainerNodeAlgorithms.h:
      (WebCore::ChildFrameDisconnector::collectFrameOwners):
      * dom/DOMAllInOne.cpp:
      * dom/Document.cpp:
      * dom/Element.cpp:
      (WebCore::Element::~Element):
      (WebCore::Element::attach):
      (WebCore::Element::detach):
      (WebCore::Element::shadowRoot):
      (WebCore::Element::didAffectSelector):
      (WebCore::Element::addShadowRoot):
      (WebCore::Element::removeShadowRoot):
              
          Move addShadowRoot and removeShadowRoot here from ElementShadow.
      
      (WebCore::Element::createShadowRoot):
      (WebCore::Element::authorShadowRoot):
      (WebCore::Element::userAgentShadowRoot):
      (WebCore::Element::ensureUserAgentShadowRoot):
      (WebCore::Element::childrenChanged):
      (WebCore::Element::removeAllEventListeners):
      * dom/Element.h:
      (WebCore::isShadowHost):
      * dom/ElementRareData.h:
      (WebCore::ElementRareData::clearShadowRoot):
      (WebCore::ElementRareData::shadowRoot):
      (WebCore::ElementRareData::setShadowRoot):
      (WebCore::ElementRareData::~ElementRareData):
      * dom/ElementShadow.cpp: Removed.
      * dom/ElementShadow.h: Removed.
      * dom/EventDispatcher.cpp:
      * dom/EventPathWalker.cpp:
      (WebCore::EventPathWalker::moveToParent):
      * dom/Node.cpp:
      (WebCore::Node::needsShadowTreeWalkerSlow):
      * dom/NodeRenderingContext.cpp:
      * dom/NodeRenderingContext.h:
      * dom/ShadowRoot.cpp:
      (WebCore::ShadowRoot::attach):
      (WebCore::ShadowRoot::detach):
              
          Move attached() tests from ElementShadow.
      
      (WebCore::ShadowRoot::childrenChanged):
      (WebCore::ShadowRoot::removeAllEventListeners):
              
          Move here from ElementShadow.
      
      * dom/ShadowRoot.h:
      (WebCore::Node::shadowRoot):
      * dom/TreeScopeAdopter.cpp:
      * html/ColorInputType.cpp:
      (WebCore::ColorInputType::createShadowSubtree):
      * html/FileInputType.cpp:
      (WebCore::FileInputType::createShadowSubtree):
      (WebCore::FileInputType::disabledAttributeChanged):
      (WebCore::FileInputType::multipleAttributeChanged):
      * html/HTMLFormControlElement.cpp:
      * html/HTMLImageElement.cpp:
      (WebCore::HTMLImageElement::canStartSelection):
      * html/HTMLInputElement.cpp:
      (WebCore::HTMLInputElement::updateType):
      * html/HTMLKeygenElement.cpp:
      * html/HTMLMediaElement.cpp:
      * html/HTMLTextAreaElement.cpp:
      * html/InputType.cpp:
      * html/RangeInputType.cpp:
      (WebCore::RangeInputType::handleMouseDownEvent):
      (WebCore::RangeInputType::createShadowSubtree):
      * html/TextFieldInputType.cpp:
      (WebCore::TextFieldInputType::createShadowSubtree):
      * html/ValidationMessage.cpp:
      * html/shadow/ContentDistributor.cpp:
      (WebCore::ContentDistributor::distribute):
      (WebCore::ContentDistributor::ensureDistribution):
      * html/shadow/ContentDistributor.h:
      (WebCore::ContentDistributor::isValid):
      * html/shadow/InsertionPoint.cpp:
      (WebCore::InsertionPoint::childrenChanged):
      (WebCore::InsertionPoint::insertedInto):
      (WebCore::InsertionPoint::removedFrom):
      (WebCore::resolveReprojection):
      * html/shadow/InsertionPoint.h:
      (WebCore::shadowRootOfParentForDistribution):
      * html/shadow/SliderThumbElement.cpp:
      * inspector/InspectorDOMAgent.cpp:
      (WebCore::InspectorDOMAgent::unbind):
      (WebCore::InspectorDOMAgent::buildObjectForNode):
      * page/FocusController.cpp:
      (WebCore::FocusNavigationScope::focusNavigationScopeOwnedByShadowHost):
      * rendering/RenderFileUploadControl.cpp:
      (WebCore::RenderFileUploadControl::uploadButton):
      * rendering/RenderTheme.cpp:
      * style/StyleResolveTree.cpp:
      (WebCore::Style::resolveTree):
      * svg/SVGTRefElement.cpp:
      (WebCore::SVGTRefElement::updateReferencedText):
      (WebCore::SVGTRefElement::detachTarget):
      * svg/SVGUseElement.cpp:
      (WebCore::SVGUseElement::clearResourceReferences):
      (WebCore::SVGUseElement::buildShadowAndInstanceTree):
      (WebCore::SVGUseElement::buildShadowTree):
      * testing/Internals.cpp:
      (WebCore::Internals::ensureShadowRoot):
      (WebCore::Internals::shadowRoot):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154106 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      64d69393
  8. 14 Aug, 2013 2 commits
    • gyuyoung.kim@samsung.com's avatar
      [CSS] Introduce new structure to pass image orientation values. · 0d92f4d6
      gyuyoung.kim@samsung.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119418
      
      Reviewed by Beth Dakin.
      
      Add a ImageOrientationDescription struct in order to reduce count of argument for
      image orientation.
      
      No new tests, no behavior change.
      
      * html/HTMLCanvasElement.cpp:
      (WebCore::HTMLCanvasElement::paint):
      * page/DragController.cpp:
      (WebCore::DragController::doImageDrag):
      * page/Frame.cpp:
      (WebCore::Frame::nodeImage):
      (WebCore::Frame::dragImageForSelection):
      * platform/DragImage.h:
      * platform/blackberry/DragImageBlackBerry.cpp:
      (WebCore::createDragImageFromImage):
      * platform/efl/DragImageEfl.cpp:
      (WebCore::createDragImageFromImage):
      * platform/graphics/BitmapImage.cpp:
      (WebCore::BitmapImage::updateSize):
      * platform/graphics/BitmapImage.h:
      * platform/graphics/GraphicsContext.cpp:
      (WebCore::GraphicsContext::drawImage):
      * platform/graphics/GraphicsContext.h:
      * platform/graphics/Image.cpp:
      (WebCore::Image::draw):
      * platform/graphics/Image.h:
      * platform/graphics/ImageOrientation.h:
      (WebCore::ImageOrientationDescription::ImageOrientationDescription):
      (WebCore::ImageOrientationDescription::respectImageOrientation):
      (WebCore::ImageOrientationDescription::imageOrientation):
      * platform/graphics/ImageSource.cpp:
      (WebCore::ImageSource::size):
      (WebCore::ImageSource::frameSizeAtIndex):
      * platform/graphics/ImageSource.h:
      * platform/graphics/blackberry/ImageBlackBerry.cpp:
      (WebCore::BitmapImage::draw):
      * platform/graphics/cairo/BitmapImageCairo.cpp:
      (WebCore::BitmapImage::draw):
      * platform/graphics/cairo/ImageBufferCairo.cpp:
      (WebCore::ImageBuffer::draw):
      * platform/graphics/cg/BitmapImageCG.cpp:
      (WebCore::BitmapImage::draw):
      * platform/graphics/cg/ImageSourceCG.cpp:
      (WebCore::ImageSource::frameSizeAtIndex):
      (WebCore::ImageSource::size):
      (WebCore::ImageSource::frameBytesAtIndex):
      * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
      (WebCore::MediaPlayerPrivateGStreamerBase::paint):
      * platform/graphics/qt/ImageBufferQt.cpp:
      (WebCore::ImageBuffer::draw):
      * platform/graphics/wince/ImageBufferWinCE.cpp:
      (WebCore::ImageBuffer::draw):
      * platform/gtk/ClipboardGtk.cpp:
      (WebCore::Clipboard::createDragImage):
      * platform/gtk/DragImageGtk.cpp:
      (WebCore::createDragImageFromImage):
      * platform/mac/DragImageMac.mm:
      (WebCore::createDragImageFromImage):
      * platform/qt/ClipboardQt.cpp:
      (WebCore::Clipboard::createDragImage):
      * platform/qt/DragImageQt.cpp:
      (WebCore::createDragImageFromImage):
      * platform/win/ClipboardWin.cpp:
      (WebCore::Clipboard::createDragImage):
      * platform/win/DragImageCGWin.cpp:
      (WebCore::createDragImageFromImage):
      * platform/win/DragImageCairoWin.cpp:
      (WebCore::createDragImageFromImage):
      * rendering/RenderEmbeddedObject.cpp:
      (WebCore::RenderEmbeddedObject::paintSnapshotImage):
      * rendering/RenderImage.cpp:
      (WebCore::RenderImage::paintReplaced):
      (WebCore::RenderImage::paintIntoRect):
      * rendering/RenderSnapshottedPlugIn.cpp:
      (WebCore::RenderSnapshottedPlugIn::paintSnapshot):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d92f4d6
    • allan.jensen@digia.com's avatar
      ASSERT(m_frame->view() == this) fails · 970a0bfa
      allan.jensen@digia.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119015
      
      Reviewed by Simon Fraser.
      
      Introduced the method fixedLayoutSizeChanged and made it chack if the view
      is attached to the frame before issuing contentsResized.
      
      * page/FrameView.cpp:
      (WebCore::FrameView::fixedLayoutSizeChanged):
      * page/FrameView.h:
      * platform/ScrollView.cpp:
      (WebCore::ScrollView::setFixedLayoutSize):
      (WebCore::ScrollView::setUseFixedLayout):
      (WebCore::ScrollView::fixedLayoutSizeChanged):
      * platform/ScrollView.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154045 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      970a0bfa
  9. 13 Aug, 2013 5 commits
  10. 12 Aug, 2013 2 commits
    • darin@apple.com's avatar
      Move Clipboard::declareAndWriteDragImage to DragController · 5ae15617
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=117683
      
      Reviewed by Brent Fulgham.
      
      * dom/Clipboard.h: Removed declareAndWriteDragImage.
      
      * page/DragController.cpp:
      (WebCore::selectImageBeforeDragging): Half of the old prepareClipboardForImageDrag
      is now refactored into this function.
      (WebCore::DragController::startDrag): Where we called prepareClipboardForImageDrag,
      instead call selectImageBeforeDragging and declareAndWriteDragImage. This is needed
      because declareAndWriteDragImage needs to be a member function, for Mac at least.
      
      * page/DragController.h: Added declareAndWriteDragImage.
      
      * page/efl/DragControllerEfl.cpp:
      (WebCore::DragController::declareAndWriteDragImage): Added empty placeholder.
      It would be better to delete this file rather than having these placeholders.
      I don't think EFL actually has drag support, and it makes work to have to keep
      source files up to date that are really unused.
      
      * page/gtk/DragControllerGtk.cpp:
      (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
      * page/mac/DragControllerMac.mm:
      (WebCore::DragController::declareAndWriteDragImage): Added. Calls to DragClient, which
      does the work.
      * page/qt/DragControllerQt.cpp:
      (WebCore::DragController::declareAndWriteDragImage): Added. Calls Pasteboard::writeImage.
      * page/win/DragControllerWin.cpp:
      (WebCore::DragController::declareAndWriteDragImage): Added. Uses Pasteboard functions to
      do the work.
      
      * platform/Clipboard.h: Changed the pasteboard function to return a non-const reference.
      For now, it's not clear what const will mean for pasteboards, and it's currently not
      possible to write to a const pasteboard, which we need to do in the new
      DragController::declareAndWriteDragImage functions.
      
      * platform/Pasteboard.h: Added a new writeMarkup function, implemented only for Windows
      at this time.
      
      * platform/efl/ClipboardEfl.cpp: Deleted declareAndWriteDragImage.
      * platform/gtk/ClipboardGtk.cpp: Ditto.
      * platform/ios/ClipboardIOS.h: Ditto.
      * platform/ios/ClipboardIOS.mm: Ditto.
      * platform/mac/ClipboardMac.mm: Ditto.
      * platform/qt/ClipboardQt.cpp: Ditto.
      * platform/win/ClipboardWin.cpp: Ditto.
      
      * platform/win/PasteboardWin.cpp:
      (WebCore::Pasteboard::writePlainTextToDataObject): Took out a pointless line of code.
      (WebCore::Pasteboard::writeMarkup): Added. Currently implemented only for Windows.
      This factors out a significant piece of DragController::declareAndWriteDragImage,
      and will probably be handy for other platforms later.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5ae15617
    • bdakin@apple.com's avatar
      The LayoutMilestones didLayout callback should only fire for the main frame · 7ce7e1b1
      bdakin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=119457
      
      Reviewed by Sam Weinig.
      
      Source/WebCore: 
      
      This patch makes it so that FrameLoader::didLayout(LayoutMilestones) is only ever 
      called for the main frame. Technically this will change existing API for 
      didFirstVisuallyNonEmptyLayoutInFrame and didFirstLayoutInFrame. Clients used to 
      be able to register for those callbacks for any frame they wanted, however, now 
      they will only ever get the callback when it applies to the main frame. We think 
      that this is acceptable since we don’t know of any clients that ever used those 
      APIs for a non-main frame. This change also makes nothing but sense for the 
      didLayout(LayoutMilestones) callback, since that is a Page-level concept, so it 
      should only fire for the main frame.
      
      Only call didLayout for the main frame.
      * dom/Document.cpp:
      (WebCore::Document::setVisualUpdatesAllowed):
      
      Assert that this is the main frame.
      * loader/FrameLoader.cpp:
      (WebCore::FrameLoader::didLayout):
      
      Only call didLayout for the main frame.
      * page/FrameView.cpp:
      (WebCore::FrameView::performPostLayoutTasks):
      
      Tools: 
      
      Now that the didLayout callback only fires for the main frame, we want to make 
      sure it will fire even when all of the content is in a subframe.
      
      * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
      * TestWebKitAPI/Tests/WebKit2/LayoutMilestonesWithAllContentInFrame.cpp: Added.
      (TestWebKitAPI::didLayout):
      (TestWebKitAPI::TEST):
      * TestWebKitAPI/Tests/WebKit2/all-content-in-one-iframe.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@153958 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ce7e1b1