external/Webkit.git
19 months agoProcess suppression should throttle scripted animations master
barraclough@apple.com [Wed, 15 May 2013 23:00:10 +0000 (23:00 +0000)]
Process suppression should throttle scripted animations
https://bugs.webkit.org/show_bug.cgi?id=115812

Reviewed by Simon Fraser.

<rdar://problem/13799726>

Source/WebCore:

* WebCore.exp.in:
    - Expose Page::setThrottled
* dom/Document.cpp:
(WebCore::Document::scriptedAnimationControllerSetThrottled):
(WebCore):
* dom/Document.h:
(Document):
    - Forwards to ScriptedAnimationController::setThrottled
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::setThrottled):
(WebCore):
* dom/ScriptedAnimationController.h:
    - Force use of a timer.
(ScriptedAnimationController):
* page/Page.cpp:
(WebCore::Page::setThrottled):
(WebCore):
* page/Page.h:
(Page):
    - When under throttling force the ScriptedAnimationController to use a timer.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setThrottled):
(WebKit):
* WebProcess/WebPage/WebPage.h:
(WebPage):
    - Added setThrottled, forwards to WebCore::Page.
* WebProcess/WebProcess.cpp:
(WebKit):
(WebKit::WebProcess::setProcessSuppressionEnabled):
* WebProcess/WebProcess.h:
(WebProcess):
    - Intercept calls to setProcessSuppressionEnabled, also mark all pages as being throttled.

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

19 months agoImplement run-in remove child cases.
igor.o@sisa.samsung.com [Wed, 15 May 2013 22:59:20 +0000 (22:59 +0000)]
Implement run-in remove child cases.
https://bugs.webkit.org/show_bug.cgi?id=86520

Move runin to original position when sibling element is destroyed.

Reviewed by David Hyatt.

Source/WebCore:

Tests: fast/runin/runin-remove-child-simple.html
       fast/runin/runin-sibling-inline.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::willBeDestroyed):
(WebCore::RenderBlock::moveRunInUnderSiblingBlockIfNeeded):
    If moveRunInUnderSiblingBlockIfNeeded is called when the sibling run-in block
    is being destroyed, it means that the run-in is moving to original position and
    we do not need to do nothing.

LayoutTests:

* fast/runin/runin-remove-child-simple-expected.txt: Added.
* fast/runin/runin-remove-child-simple.html: Added.
* fast/runin/runin-sibling-inline-expected.txt: Added.
* fast/runin/runin-sibling-inline.html: Added.

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

19 months agoRemove WebSocketHandshakeResponse class
andersca@apple.com [Wed, 15 May 2013 22:43:53 +0000 (22:43 +0000)]
Remove WebSocketHandshakeResponse class
https://bugs.webkit.org/show_bug.cgi?id=116190

Reviewed by Andreas Kling.

Just use ResourceResponse instead of WebSocketHandshakeResponse.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::serverWebSocketProtocol):
(WebCore::WebSocketHandshake::serverSetCookie):
(WebCore::WebSocketHandshake::serverSetCookie2):
(WebCore::WebSocketHandshake::serverUpgrade):
(WebCore::WebSocketHandshake::serverConnection):
(WebCore::WebSocketHandshake::serverWebSocketAccept):
(WebCore::WebSocketHandshake::serverHandshakeResponse):
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Modules/websockets/WebSocketHandshake.h:
* Modules/websockets/WebSocketHandshakeResponse.cpp: Removed.
* Modules/websockets/WebSocketHandshakeResponse.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::didReceiveWebSocketHandshakeResponse):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):

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

19 months ago[Mac] media engine may deliver NULL in-band "cue"
eric.carlson@apple.com [Wed, 15 May 2013 22:38:52 +0000 (22:38 +0000)]
[Mac] media engine may deliver NULL in-band "cue"
https://bugs.webkit.org/show_bug.cgi?id=116180

Reviewed by Jer Noble.

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCue): NULL check before logging cue count.

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

19 months agoList platforms that still use the legacy clipboard instead of just saying "not Mac"
darin@apple.com [Wed, 15 May 2013 22:01:35 +0000 (22:01 +0000)]
List platforms that still use the legacy clipboard instead of just saying "not Mac"
https://bugs.webkit.org/show_bug.cgi?id=116177

Reviewed by Andreas Kling.

* dom/Clipboard.h: Replaced the "!MAC || IOS" with a list of platforms still on the
legacy model.

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

19 months agoWKPageGetPluginInformationDisplayNameKey doesn't return the right key
andersca@apple.com [Wed, 15 May 2013 21:53:58 +0000 (21:53 +0000)]
WKPageGetPluginInformationDisplayNameKey doesn't return the right key
https://bugs.webkit.org/show_bug.cgi?id=116188

Reviewed by Andreas Kling.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetPluginInformationDisplayNameKey):

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

19 months agoWe should clear mainResource in DocumentLoader::cancelMainResourceLoad.
commit-queue@webkit.org [Wed, 15 May 2013 21:51:16 +0000 (21:51 +0000)]
We should clear mainResource in DocumentLoader::cancelMainResourceLoad.
https://bugs.webkit.org/show_bug.cgi?id=116119

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-05-15
Reviewed by Oliver Hunt.

MainResourceLoader::clearResource() was left out in r146239 when moving MainResourceLoader::cancel()
to DocumentLoader::cancelMainResourceLoad(), we need to add it back to make sure m_mainResource is
cleared when we cancel the loader.

No new tests needed.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::continueAfterNavigationPolicy):
(WebCore::DocumentLoader::cancelMainResourceLoad):
(WebCore::DocumentLoader::clearMainResource):
(WebCore):
* loader/DocumentLoader.h: add helper method clearMainResource()
(DocumentLoader):

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

19 months ago More fixing after WebProcessShim renaming in r149074.
ap@apple.com [Wed, 15 May 2013 21:42:03 +0000 (21:42 +0000)]
    More fixing after WebProcessShim renaming in r149074.

        * Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
        (WebContentServiceInitializer): Updated a comment to mention the shim by its new name.

        * WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme:
        Updated to insert the right shim.

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

19 months agoUnreviewed, rolling out r150051.
commit-queue@webkit.org [Wed, 15 May 2013 21:25:59 +0000 (21:25 +0000)]
Unreviewed, rolling out r150051.
http://trac.webkit.org/changeset/150051
https://bugs.webkit.org/show_bug.cgi?id=116186

Broke all JSC tests on Mac and the author is unresponsive
(Requested by rniwa on #webkit).

* JavaScriptCore.xcodeproj/project.pbxproj:

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

19 months ago[BlackBerry] When HTTP auth fails, only purge credentials that match the failed crede...
commit-queue@webkit.org [Wed, 15 May 2013 21:23:52 +0000 (21:23 +0000)]
[BlackBerry] When HTTP auth fails, only purge credentials that match the failed credentials
https://bugs.webkit.org/show_bug.cgi?id=116164

Patch by Joe Mason <jmason@blackberry.com> on 2013-05-15
Reviewed by Rob Buis.

Internal PR: 338490
Internally Reviewed By: Lyon Chen

When there are multiple HTTP requests in flight with the same bad credentials (common with
proxy auth if the user mistyped their password), the first 407 that's received will cause
the credentials to be purged and the password dialog to open for new credentials. This means
that all 407's received after this should only purge the credentials if they have not
already been updated from the dialog; otherwise they will be wiping out credentials that
haven't failed yet.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
(WebCore::NetworkJob::purgeCredentials):

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

19 months agoRemove savedTimeoutReg from JITStackFrame for sh4 base JIT.
commit-queue@webkit.org [Wed, 15 May 2013 21:17:24 +0000 (21:17 +0000)]
Remove savedTimeoutReg from JITStackFrame for sh4 base JIT.
https://bugs.webkit.org/show_bug.cgi?id=116143

Patch by Julien Brianceau <jbrianceau@nds.com> on 2013-05-15
Reviewed by Geoffrey Garen.

Since r148119, timeoutCheckRegister is removed from baseline JIT.
So we don't need to save r8 register in JITStackFrame anymore for sh4.

* jit/JITStubs.cpp:
* jit/JITStubs.h:
(JITStackFrame):

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

19 months agoAX: Use caching when requesting children object on iOS
cfleizach@apple.com [Wed, 15 May 2013 20:51:02 +0000 (20:51 +0000)]
AX: Use caching when requesting children object on iOS
https://bugs.webkit.org/show_bug.cgi?id=116112

Reviewed by David Kilzer.

Building up the children list in the AX hierarchy can be time consuming. On iOS, this
is now much more noticeable (I believe due to the way tables calculate their AX ignored flag).

We can speed everything up if we just cache the isIgnored() attribute while building up children.

* accessibility/AXObjectCache.cpp:
(WebCore::AXAttributeCacheEnabler::AXAttributeCacheEnabler):
(WebCore):
(WebCore::AXAttributeCacheEnabler::~AXAttributeCacheEnabler):
* accessibility/AXObjectCache.h:
(AXAttributeCacheEnabler):
(WebCore):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
(-[WebAccessibilityObjectWrapper accessibilityElementCount]):
(-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
(-[WebAccessibilityObjectWrapper indexOfAccessibilityElement:]):
(-[WebAccessibilityObjectWrapper accessibilityContainer]):

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

19 months ago <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Conso...
ap@apple.com [Wed, 15 May 2013 20:30:12 +0000 (20:30 +0000)]
    <rdar://problem/13902706> Lion: com.apple.tsm.uiserver sandbox error in Console when
        launching Safari

        Reviewed by Anders Carlsson.

        * WebProcess/com.apple.WebProcess.sb.in: Silence the violation.

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

19 months agoRemove WebSocketHandshakeRequest class
andersca@apple.com [Wed, 15 May 2013 20:22:29 +0000 (20:22 +0000)]
Remove WebSocketHandshakeRequest class
https://bugs.webkit.org/show_bug.cgi?id=116178

Reviewed by Andreas Kling.

Turns out WebSocketHandshakeRequest is just used by the web inspector, and there's no reason
why we can't just use a ResourceRequest instead.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/websockets/WebSocketChannel.cpp:
(WebCore::WebSocketChannel::didOpenSocketStream):
* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::clientHandshakeRequest):
* Modules/websockets/WebSocketHandshake.h:
(WebCore):
* Modules/websockets/WebSocketHandshakeRequest.cpp: Removed.
* Modules/websockets/WebSocketHandshakeRequest.h: Removed.
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
* inspector/InspectorInstrumentation.h:
(InspectorInstrumentation):
(WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.cpp:
(WebCore::InspectorResourceAgent::willSendWebSocketHandshakeRequest):
* inspector/InspectorResourceAgent.h:
(WebCore):
(InspectorResourceAgent):
* platform/network/HTTPRequest.cpp:
(WebCore):

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

19 months ago Try to fix iOS build.
darin@apple.com [Wed, 15 May 2013 20:20:02 +0000 (20:20 +0000)]
    Try to fix iOS build.

        * platform/Pasteboard.h: Fix #if so that we don't try to compile pasteboard name code
        on iOS.

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

19 months agoFrame::editor() should return a reference
andersca@apple.com [Wed, 15 May 2013 19:47:47 +0000 (19:47 +0000)]
Frame::editor() should return a reference
https://bugs.webkit.org/show_bug.cgi?id=116037

Reviewed by Darin Adler.

Source/WebCore:

A frame's editor can never be null. Change Frame::editor() to return a reference to reflect this.
Also, make Frame::m_editor a const member variable so nobody will accidentally set it to null.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasMisspelling):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(AXAttributeStringSetSpelling):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::cloneChildNodes):
* dom/Document.cpp:
(WebCore::acceptsEditingFocus):
(WebCore::Document::setFocusedNode):
(WebCore::command):
* editing/AlternativeTextController.cpp:
(WebCore::AlternativeTextController::timerFired):
(WebCore::AlternativeTextController::applyDictationAlternative):
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::unapply):
(WebCore::EditCommandComposition::reapply):
(WebCore::CompositeEditCommand::apply):
(WebCore::CompositeEditCommand::moveParagraphs):
* editing/DeleteButton.cpp:
(WebCore::DeleteButton::defaultEventHandler):
* editing/DeleteButtonController.cpp:
(WebCore::DeleteButtonController::show):
* editing/DeleteButtonController.h:
(WebCore::DeleteButtonControllerDisableScope::DeleteButtonControllerDisableScope):
(WebCore::DeleteButtonControllerDisableScope::~DeleteButtonControllerDisableScope):
* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::mergeParagraphs):
(WebCore::DeleteSelectionCommand::doApply):
* editing/EditCommand.cpp:
(WebCore::EditCommand::EditCommand):
* editing/EditingStyle.cpp:
(WebCore::StyleChange::StyleChange):
* editing/Editor.cpp:
(WebCore::Editor::markMisspellingsAfterTypingToWord):
* editing/EditorCommand.cpp:
(WebCore::applyCommandToFrame):
(WebCore::executeToggleStyle):
(WebCore::executeApplyParagraphStyle):
(WebCore::expandSelectionToGranularity):
(WebCore::stateStyle):
(WebCore::valueStyle):
(WebCore::executeCopy):
(WebCore::executeCut):
(WebCore::executeDefaultParagraphSeparator):
(WebCore::executeDelete):
(WebCore::executeDeleteBackward):
(WebCore::executeDeleteBackwardByDecomposingPreviousCharacter):
(WebCore::executeDeleteForward):
(WebCore::executeDeleteToBeginningOfLine):
(WebCore::executeDeleteToBeginningOfParagraph):
(WebCore::executeDeleteToEndOfLine):
(WebCore::executeDeleteToEndOfParagraph):
(WebCore::executeDeleteToMark):
(WebCore::executeDeleteWordBackward):
(WebCore::executeDeleteWordForward):
(WebCore::executeFindString):
(WebCore::executeForwardDelete):
(WebCore::executeIgnoreSpelling):
(WebCore::executeInsertNewline):
(WebCore::executeMakeTextWritingDirectionLeftToRight):
(WebCore::executeMakeTextWritingDirectionNatural):
(WebCore::executeMakeTextWritingDirectionRightToLeft):
(WebCore::executeToggleOverwrite):
(WebCore::executePaste):
(WebCore::executePasteGlobalSelection):
(WebCore::executePasteAndMatchStyle):
(WebCore::executePasteAsPlainText):
(WebCore::executeRedo):
(WebCore::executeRemoveFormat):
(WebCore::executeSelectToMark):
(WebCore::executeSetMark):
(WebCore::executeStyleWithCSS):
(WebCore::executeUseCSS):
(WebCore::executeSwapWithMark):
(WebCore::executeTakeFindStringFromSelection):
(WebCore::executeTranspose):
(WebCore::executeUndo):
(WebCore::executeYank):
(WebCore::executeYankAndSelect):
(WebCore::supportedCopyCut):
(WebCore::supportedPaste):
(WebCore::enabledVisibleSelection):
(WebCore::enabledVisibleSelectionAndMark):
(WebCore::enableCaretInEditableText):
(WebCore::enabledCopy):
(WebCore::enabledCut):
(WebCore::enabledInEditableText):
(WebCore::enabledDelete):
(WebCore::enabledPaste):
(WebCore::enabledRedo):
(WebCore::enabledTakeFindStringFromSelection):
(WebCore::enabledUndo):
(WebCore::stateOrderedList):
(WebCore::stateStyleWithCSS):
(WebCore::stateUnorderedList):
(WebCore::valueDefaultParagraphSeparator):
* editing/FrameSelection.cpp:
(WebCore::shouldAlwaysUseDirectionalSelection):
(WebCore::FrameSelection::setSelection):
(WebCore::FrameSelection::nextWordPositionForPlatform):
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingLeft):
(WebCore::FrameSelection::modify):
(WebCore::shouldStopBlinkingDueToTypingCommand):
(WebCore::FrameSelection::shouldDeleteSelection):
(WebCore::FrameSelection::shouldChangeSelection):
* editing/InsertTextCommand.cpp:
(WebCore::InsertTextCommand::doApply):
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheck):
* editing/SpellingCorrectionCommand.cpp:
* editing/TypingCommand.cpp:
(WebCore::TypingCommand::insertText):
(WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping):
(WebCore::TypingCommand::markMisspellingsAfterTyping):
(WebCore::TypingCommand::typingAddedToOpenCommand):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):
* editing/htmlediting.cpp:
(WebCore::createDefaultParagraphElement):
* editing/mac/EditorMac.mm:
(WebCore::Editor::pasteWithPasteboard):
* editing/markup.cpp:
(WebCore::createMarkup):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::endEditing):
* html/HTMLTextAreaElement.cpp:
(WebCore::HTMLTextAreaElement::subtreeHasChanged):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::didSetValueByUserEdit):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::closeURL):
(WebCore::FrameLoader::didOpenURL):
(WebCore::FrameLoader::clear):
* page/ContextMenuController.cpp:
(WebCore::insertUnicodeCharacter):
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::find):
* page/DragController.cpp:
(WebCore::DragController::dispatchTextInputEventFor):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::selectClosestWordFromMouseEvent):
(WebCore::EventHandler::handleMousePressEventSingleClick):
(WebCore::EventHandler::handlePasteGlobalSelection):
(WebCore::EventHandler::sendContextMenuEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::keyEvent):
(WebCore::EventHandler::defaultKeyboardEventHandler):
(WebCore::EventHandler::defaultTextInputEventHandler):
(WebCore::EventHandler::defaultBackspaceEventHandler):
* page/FocusController.cpp:
(WebCore::relinquishesEditingFocus):
* page/Frame.cpp:
(WebCore::Frame::rangeForPoint):
* page/Frame.h:
(Frame):
(WebCore::Frame::editor):
* page/Page.cpp:
(WebCore::Page::findString):
(WebCore::Page::findStringMatchingRanges):
(WebCore::Page::rangeOfString):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::setDeviceScaleFactor):
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::writeRange):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::asURL):
* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::getStringSelection):
(WebCore::Pasteboard::getDataSelection):
(WebCore::Pasteboard::writeSelectionForTypes):
(WebCore::writeURLForTypes):
(WebCore::Pasteboard::plainText):
(WebCore::documentFragmentWithRTF):
(WebCore::Pasteboard::documentFragment):
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::dictationAlternatives):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintTextMatchMarker):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::positionForPointWithInlineChildren):
* testing/Internals.cpp:
(WebCore::spellchecker):
(WebCore::Internals::resetToConsistentState):
(WebCore::Internals::hasSpellingMarker):
(WebCore::Internals::hasAutocorrectedMarker):
(WebCore::Internals::setContinuousSpellCheckingEnabled):
(WebCore::Internals::setAutomaticQuoteSubstitutionEnabled):
(WebCore::Internals::setAutomaticLinkDetectionEnabled):
(WebCore::Internals::setAutomaticDashSubstitutionEnabled):
(WebCore::Internals::setAutomaticTextReplacementEnabled):
(WebCore::Internals::setAutomaticSpellingCorrectionEnabled):
(WebCore::Internals::isOverwriteModeEnabled):
(WebCore::Internals::toggleOverwriteModeEnabled):
(WebCore::Internals::hasGrammarMarker):

Source/WebKit/blackberry:

* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
(WebCore::EditorClientBlackBerry::handleKeyboardEvent):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::elementHasContinuousSpellCheckingEnabled):
* WebKitSupport/InPageSearchManager.cpp:
(BlackBerry::WebKit::InPageSearchManager::findAndMarkText):
(BlackBerry::WebKit::InPageSearchManager::scopeStringMatches):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::selectedText):

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::executeCoreCommandByName):
(DumpRenderTreeSupportEfl::isCommandEnabled):
* WebCoreSupport/EditorClientEfl.cpp:
(WebCore::EditorClientEfl::respondToChangedSelection):
(WebCore::EditorClientEfl::handleEditingKeyboardEvent):
* ewk/ewk_frame.cpp:
(ewk_frame_editable_set):
(ewk_frame_selection_get):
(ewk_frame_text_search):
(ewk_frame_text_matches_mark):
(ewk_frame_text_matches_highlight_set):
(ewk_frame_text_matches_highlight_get):
* ewk/ewk_view.cpp:
(ewk_view_selection_get):
(ewk_view_editor_command_execute):

Source/WebKit/gtk:

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::paint):
* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::executeCoreCommandByName):
(DumpRenderTreeSupportGtk::isCommandEnabled):
* WebCoreSupport/EditorClientGtk.cpp:
(WebKit::EditorClient::respondToChangedSelection):
(WebKit::EditorClient::executePendingEditorCommands):
(WebKit::EditorClient::handleKeyboardEvent):
* WebCoreSupport/WebViewInputMethodFilter.cpp:
(WebKit::WebViewInputMethodFilter::canEdit):
(WebKit::WebViewInputMethodFilter::confirmCompositionText):
(WebKit::WebViewInputMethodFilter::confirmCurrentComposition):
(WebKit::WebViewInputMethodFilter::cancelCurrentComposition):
(WebKit::WebViewInputMethodFilter::setPreedit):
* webkit/webkitwebframe.cpp:
(webkit_web_frame_replace_selection):
* webkit/webkitwebview.cpp:
(getLocationForKeyboardGeneratedContextMenu):
(webkit_web_view_focus_in_event):
(webkit_web_view_real_select_all):
(webkit_web_view_real_cut_clipboard):
(webkit_web_view_real_copy_clipboard):
(webkit_web_view_real_undo):
(webkit_web_view_real_redo):
(webkit_web_view_real_paste_clipboard):
(webkit_web_view_set_highlight_text_matches):
(webkit_web_view_can_cut_clipboard):
(webkit_web_view_can_copy_clipboard):
(webkit_web_view_can_paste_clipboard):
(webkit_web_view_delete_selection):
(webkit_web_view_set_editable):
(webkit_web_view_can_undo):
(webkit_web_view_can_redo):

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _selectedString]):
(-[WebFrame _firstRectForDOMRange:]):
(-[WebFrame _markDOMRange]):
(-[WebFrame _insertParagraphSeparatorInQuotedContent]):
(-[WebFrame _setTypingStyle:withUndoAction:]):
(-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
* WebView/WebHTMLRepresentation.mm:
(-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
* WebView/WebHTMLView.mm:
(-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
(-[WebHTMLView _shouldDeleteRange:]):
(-[WebHTMLView _canEdit]):
(-[WebHTMLView _canEditRichly]):
(-[WebHTMLView _insertOrderedList]):
(-[WebHTMLView _insertUnorderedList]):
(-[WebHTMLView _canIncreaseSelectionListLevel]):
(-[WebHTMLView _canDecreaseSelectionListLevel]):
(-[WebHTMLView _increaseSelectionListLevel]):
(-[WebHTMLView _increaseSelectionListLevelOrdered]):
(-[WebHTMLView _increaseSelectionListLevelUnordered]):
(-[WebHTMLView _decreaseSelectionListLevel]):
(-[WebHTMLView Editor::coreCommandBySelector:]):
(-[WebHTMLView Editor::coreCommandByName:]):
(-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
(-[WebHTMLView becomeFirstResponder]):
(-[WebHTMLView _selectionStartFontAttributesAsRTF]):
(-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
(-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
(-[WebHTMLView checkSpelling:]):
(-[WebHTMLView showGuessPanel:]):
(-[WebHTMLView toggleBaseWritingDirection:]):
(-[WebHTMLView changeBaseWritingDirection:]):
(-[WebHTMLView _changeBaseWritingDirectionTo:]):
(-[WebHTMLView _updateFontPanel]):
(-[WebHTMLView markedRange]):
(-[WebHTMLView hasMarkedText]):
(-[WebHTMLView unmarkText]):
(-[WebHTMLView setMarkedText:selectedRange:]):
(-[WebHTMLView doCommandBySelector:]):
(-[WebHTMLView insertText:]):
(-[WebHTMLView _updateSelectionForInputManager]):
(-[WebHTMLView countMatchesForText:inDOMRange:options:limit:markMatches:]):
(-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
(-[WebHTMLView markedTextMatchesAreHighlighted]):
(-[WebHTMLView _findString:options:]):
* WebView/WebView.mm:
(-[WebView _executeCoreCommandByName:value:]):
(-[WebView editableDOMRangeForPoint:]):
(-[WebView setEditable:]):
(-[WebView deleteSelection]):
(-[WebView applyStyle:]):
(-[WebView typingAttributes]):
(-[WebView _simplifyMarkup:endNode:]):
(-[WebView handleAcceptedAlternativeText:]):

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::executeCoreCommandByName):
(DumpRenderTreeSupportQt::isCommandEnabled):
(DumpRenderTreeSupportQt::firstRectForCharacterRange):
* WebCoreSupport/EditorClientQt.cpp:
(WebCore::EditorClientQt::respondToChangedSelection):
(WebCore::EditorClientQt::registerUndoStep):
(WebCore::EditorClientQt::handleKeyboardEvent):
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::selectedText):
(QWebPageAdapter::selectedHtml):
(QWebPageAdapter::setContentEditable):

Source/WebKit/win:

* WebCoreSupport/WebContextMenuClient.cpp:
(WebContextMenuClient::searchWithGoogle):
* WebFrame.cpp:
(WebFrame::hasSpellingMarker):
(WebFrame::setTextDirection):
(WebFrame::selectedString):
(WebFrame::selectAll):
* WebView.cpp:
(WebView::execCommand):
(WebView::handleEditingKeyboardEvent):
(WebView::executeCoreCommandByName):
(WebView::selectedText):
(WebView::deleteEnabled):
(WebView::editingEnabled):
(WebView::replaceSelectionWithText):
(WebView::copy):
(WebView::cut):
(WebView::paste):
(WebView::copyURL):
(WebView::delete_):
(WebView::checkSpelling):
(WebView::showGuessPanel):
(WebView::clearUndoRedoOperations):
(WebView::prepareCandidateWindow):
(WebView::resetIME):
(WebView::updateSelectionForIME):
(WebView::onIMEComposition):
(WebView::onIMEEndComposition):
(WebView::onIMERequestCharPosition):
(WebView::onIMERequest):
(WebView::setCompositionForTesting):
(WebView::hasCompositionForTesting):
(WebView::confirmCompositionForTesting):
(WebView::compositionRangeForTesting):
(WebView::firstRectForCharacterRangeForTesting):
(WebView::selectedRangeForTesting):

Source/WebKit/wince:

* WebCoreSupport/EditorClientWinCE.cpp:
(WebKit::EditorClientWinCE::handleEditingKeyboardEvent):

Source/WebKit2:

* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::searchWithGoogle):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::updateGlobalSelection):
* WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp:
(WebKit::WebEditorClient::handleInputMethodKeydown):
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::executePendingEditorCommands):
(WebKit::WebEditorClient::handleKeyboardEvent):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::searchWithGoogle):
(WebKit::WebContextMenuClient::searchWithSpotlight):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::changeWordCase):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::selectionAsString):
(WebKit::WebFrame::setTextDirection):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
(WebKit::WebPage::executeEditingCommand):
(WebKit::WebPage::isEditingCommandEnabled):
(WebKit::WebPage::validateCommand):
(WebKit::WebPage::handleEditingKeyboardEvent):
(WebKit::WebPage::advanceToNextMisspelling):
(WebKit::WebPage::uppercaseWord):
(WebKit::WebPage::lowercaseWord):
(WebKit::WebPage::capitalizeWord):
(WebKit::WebPage::replaceSelectionWithText):
(WebKit::WebPage::handleAlternativeTextUIResult):
(WebKit::WebPage::setCompositionForTesting):
(WebKit::WebPage::hasCompositionForTesting):
(WebKit::WebPage::confirmCompositionForTesting):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::cancelComposition):
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::cancelComposition):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::executeKeypressCommandsInternal):
(WebKit::WebPage::handleEditingKeyboardEvent):
(WebKit::WebPage::setComposition):
(WebKit::WebPage::confirmComposition):
(WebKit::WebPage::cancelComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::firstRectForCharacterRange):
(WebKit::WebPage::readSelectionFromPasteboard):
(WebKit::WebPage::getStringSelectionForPasteboard):
(WebKit::WebPage::getDataSelectionForPasteboard):

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

19 months ago[Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
darin@apple.com [Wed, 15 May 2013 19:37:58 +0000 (19:37 +0000)]
[Mac] Make Clipboard class no longer polymorphic by removing the last virtual functions
https://bugs.webkit.org/show_bug.cgi?id=116166

Reviewed by Anders Carlsson.

* WebCore.exp.in: Add ~Clipboard since it's no longer a virtual function, but to the
non-iOS section, since iOS is still using the legacy version of Clipboard.

* dom/Clipboard.h: Mark items non-virtual, too. It's not implemented on Mac yet.

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

19 months agoRemove an overloaded strokeRect in <canvas>
commit-queue@webkit.org [Wed, 15 May 2013 19:37:07 +0000 (19:37 +0000)]
Remove an overloaded strokeRect in <canvas>
https://bugs.webkit.org/show_bug.cgi?id=116017

Patch by Dongseong Hwang <dongseong.hwang@intel.com> on 2013-05-15
Reviewed by Benjamin Poulain.

Source/WebCore:

The canvas spec [1] does not define strokeRect with 5 arguments, so this issue
remains only strokeRect with 4 arguments.

[1] http://www.w3.org/TR/2dcontext2/

Covered by existing tests: canvas/philip/tests/2d.missingargs.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::strokeRect):
* html/canvas/CanvasRenderingContext2D.h:
(CanvasRenderingContext2D):
* html/canvas/CanvasRenderingContext2D.idl:

LayoutTests:

canvas/philip/tests/2d.missingargs.html can cover
fast/canvas/canvas-overloads-strokeRect.html, so this patch removed it.

* fast/canvas/canvas-overloads-strokeRect-expected.txt: Removed.
* fast/canvas/canvas-overloads-strokeRect.html: Removed.
* fast/canvas/script-tests/canvas-overloads-strokeRect.js: Removed.
* fast/canvas/script-tests/canvas-strokeRect.js:

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

19 months ago[css3-text] text-decoration-line now accepts "blink" as valid value
bruno.abinader@basyskom.com [Wed, 15 May 2013 19:15:20 +0000 (19:15 +0000)]
[css3-text] text-decoration-line now accepts "blink" as valid value
https://bugs.webkit.org/show_bug.cgi?id=116104

Reviewed by Andreas Kling.

Source/WebCore:

As of November 13th 2012, the W3C specification has been updated to
accept "blink" as a valid property value in text-decoration-line. Though
accepting the value as valid, it is ignored as CSS Level 1
text-decoration property currently does.

Updated related layout tests to reflect changes in specification.

* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseTextDecoration):

LayoutTests:

Updated layout test results to reflect changes in specification.

* fast/css3-text/css3-text-decoration/getComputedStyle/getComputedStyle-text-decoration-line-expected.txt:
* fast/css3-text/css3-text-decoration/getComputedStyle/script-tests/getComputedStyle-text-decoration-line.js:
* fast/css3-text/css3-text-decoration/text-decoration-line-expected.html:
* fast/css3-text/css3-text-decoration/text-decoration-line.html:

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

19 months agoRevert http://trac.webkit.org/changeset/150047
simon.fraser@apple.com [Wed, 15 May 2013 19:12:21 +0000 (19:12 +0000)]
Revert http://trac.webkit.org/changeset/150047

It introduced unwanted behavioral differences between
Retina and non-Retina Mac hardware.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::requiresTiledLayer):
(WebCore::GraphicsLayerCA::computePixelAlignment):

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

19 months agoWebKit doesn't support MSVS2003 any more, remove preprocessor checks for older versions.
thakis@chromium.org [Wed, 15 May 2013 19:12:04 +0000 (19:12 +0000)]
WebKit doesn't support MSVS2003 any more, remove preprocessor checks for older versions.
https://bugs.webkit.org/show_bug.cgi?id=116157

Reviewed by Anders Carlsson.

Also remove a gcc3.2 workaround.

Merges parts of these two commits by the talented Nico Weber:
https://chromium.googlesource.com/chromium/blink/+/3677e2f47348daeff405a40b6f90fbdf0654c2f5
https://chromium.googlesource.com/chromium/blink/+/0fcd96c448dc30be1416dcc15713c53710c1a312

Source/JavaScriptCore:

* os-win32/inttypes.h:

Source/WTF:

* wtf/Alignment.h:
(WTF):
* wtf/Assertions.h:
* wtf/Atomics.h:
(WTF):
* wtf/Compiler.h:
* wtf/DateMath.cpp:
(WTF::getLocalTime):
* wtf/MathExtras.h:
* wtf/RefCountedLeakCounter.h:
(RefCountedLeakCounter):
* wtf/StaticConstructors.h:

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

19 months agoNeed a way for NPAPI plug-ins to open preference panes
andersca@apple.com [Wed, 15 May 2013 18:55:30 +0000 (18:55 +0000)]
Need a way for NPAPI plug-ins to open preference panes
https://bugs.webkit.org/show_bug.cgi?id=116173
<rdar://problem/13503848>

Reviewed by Sam Weinig.

* PluginProcess/PluginControllerProxy.h:
Add openPluginPreferencePane().

* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::openPluginPreferencePane):
Send OpenPluginPreferencePane to the UI process.

* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
Get the preference pane path.

* Shared/Plugins/PluginModuleInfo.h:
Add preferencePanePath member variable.

* UIProcess/Plugins/PluginProcessProxy.h:
Add openPluginPreferencePane message handler.

* UIProcess/Plugins/PluginProcessProxy.messages.in:
ADd OpenPluginPreferencePane message.

* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::openPluginPreferencePane):
Get the path to the preference pane and use LS to open it.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_GetValue):
Handle WKNVPlugInContainer.

* WebProcess/Plugins/Netscape/NetscapePlugin.h:
Add WKNVPlugInContainer member variable.

* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::NetscapePlugin::openPluginPreferencePane):
Call through to the plug-in controller.

(WebKit::NetscapePlugin::plugInContainer):
Create a WKNPAPIPlugInContainer object if necessary.

(WebKit::NetscapePlugin::platformDestroy):
Invalidate the WKNPAPIPlugInContainer object.

* WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.h:
New file with the protocol definition.

* WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainer.mm:
(-[WKNPAPIPlugInContainer dealloc]):
Assert that the plug-in is null (that we've been invalidated).

(-[WKNPAPIPlugInContainer _invalidate]):
Set the plug-in to null.

(-[WKNPAPIPlugInContainer openPlugInPreferencePane]):
Call through to the plug-in.

* WebProcess/Plugins/Netscape/mac/WKNPAPIPlugInContainerInternal.h:
New file with the interface declaration for the object that implements the protocol.

* WebProcess/Plugins/PluginController.h:
Add openPluginPreferencePane member function.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::openPluginPreferencePane):
Add stub; this should never be called since we always go through the UI process.

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

19 months ago [WK2][Mac] Split resetTextInputState into two functions
ap@apple.com [Wed, 15 May 2013 18:50:16 +0000 (18:50 +0000)]
    [WK2][Mac] Split resetTextInputState into two functions
        https://bugs.webkit.org/show_bug.cgi?id=116174

        Reviewed by Anders Carlsson.

        Splitting resetTextInputState into resetSecureInputState and
        notifyInputContextAboutDiscardedComposition, paving the way for a fix where these
        won't be happening simultaneously.

        * UIProcess/API/mac/PageClientImpl.h:
        * UIProcess/API/mac/PageClientImpl.mm:
        (WebKit::PageClientImpl::resetSecureInputState):
        (WebKit::PageClientImpl::notifyInputContextAboutDiscardedComposition):
        * UIProcess/API/mac/WKView.mm:
        (-[WKView resignFirstResponder]):
        (-[WKView _resetSecureInputState]):
        (-[WKView _notifyInputContextAboutDiscardedComposition]):
        * UIProcess/API/mac/WKViewInternal.h:
        * UIProcess/PageClient.h:
        * UIProcess/WebPageProxy.cpp:
        (WebKit::WebPageProxy::didCommitLoadForFrame):

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

19 months ago[Windows] Update various build tools to understand VS2010 environment.
bfulgham@apple.com [Wed, 15 May 2013 18:36:36 +0000 (18:36 +0000)]
[Windows] Update various build tools to understand VS2010 environment.
https://bugs.webkit.org/show_bug.cgi?id=116169.

Reviewed by Anders Carlsson.

* Scripts/build-api-tests: Identify VS2010 environment.
* Scripts/build-dumprendertree: Ditto.
* Scripts/build-webkit: Ditto.
* Scripts/webkitdirs.pm:
(dieIfWindowsPlatformSDKNotInstalled): Update to recognize a wider
range of acceptable SDK's.

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

19 months ago[GTK] Add padding to all public class structs for future expansion without breaking ABI
carlosgc@webkit.org [Wed, 15 May 2013 18:11:20 +0000 (18:11 +0000)]
[GTK] Add padding to all public class structs for future expansion without breaking ABI
https://bugs.webkit.org/show_bug.cgi?id=112565

Reviewed by Anders Carlsson.

Use 4 pointers for most of the classes that are unlikely to grow
and 8 for WebKitWebView and WebKitWebContext.

* UIProcess/API/gtk/WebKitBackForwardList.h:
(_WebKitBackForwardListClass):
* UIProcess/API/gtk/WebKitBackForwardListItem.h:
(_WebKitBackForwardListItemClass):
* UIProcess/API/gtk/WebKitContextMenu.h:
(_WebKitContextMenuClass):
* UIProcess/API/gtk/WebKitContextMenuItem.h:
(_WebKitContextMenuItemClass):
* UIProcess/API/gtk/WebKitCookieManager.h:
(_WebKitCookieManagerClass):
* UIProcess/API/gtk/WebKitDownload.h:
(_WebKitDownloadClass):
* UIProcess/API/gtk/WebKitFaviconDatabase.h:
(_WebKitFaviconDatabaseClass):
* UIProcess/API/gtk/WebKitFileChooserRequest.h:
(_WebKitFileChooserRequestClass):
* UIProcess/API/gtk/WebKitFindController.h:
(_WebKitFindControllerClass):
* UIProcess/API/gtk/WebKitFormSubmissionRequest.h:
(_WebKitFormSubmissionRequestClass):
* UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h:
(_WebKitGeolocationPermissionRequestClass):
* UIProcess/API/gtk/WebKitHitTestResult.h:
(_WebKitHitTestResultClass):
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
(_WebKitNavigationPolicyDecisionClass):
* UIProcess/API/gtk/WebKitPlugin.h:
(_WebKitPluginClass):
* UIProcess/API/gtk/WebKitPolicyDecision.h:
(_WebKitPolicyDecisionClass):
* UIProcess/API/gtk/WebKitPrintOperation.h:
(_WebKitPrintOperationClass):
* UIProcess/API/gtk/WebKitResponsePolicyDecision.h:
(_WebKitResponsePolicyDecisionClass):
* UIProcess/API/gtk/WebKitSecurityManager.h:
(_WebKitSecurityManagerClass):
* UIProcess/API/gtk/WebKitSettings.h:
(_WebKitSettingsClass):
* UIProcess/API/gtk/WebKitURIRequest.h:
(_WebKitURIRequestClass):
* UIProcess/API/gtk/WebKitURIResponse.h:
(_WebKitURIResponseClass):
* UIProcess/API/gtk/WebKitURISchemeRequest.h:
(_WebKitURISchemeRequestClass):
* UIProcess/API/gtk/WebKitWebContext.h:
(_WebKitWebContextClass):
* UIProcess/API/gtk/WebKitWebInspector.h:
(_WebKitWebInspectorClass):
* UIProcess/API/gtk/WebKitWebResource.h:
(_WebKitWebResourceClass):
* UIProcess/API/gtk/WebKitWebView.h:
(_WebKitWebViewClass):
* UIProcess/API/gtk/WebKitWebViewBase.h:
(_WebKitWebViewBaseClass):
* UIProcess/API/gtk/WebKitWebViewGroup.h:
(_WebKitWebViewGroupClass):
* UIProcess/API/gtk/WebKitWindowProperties.h:
(_WebKitWindowPropertiesClass):

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

19 months ago[Mac] Remove the ClipboardMac class and header file
darin@apple.com [Wed, 15 May 2013 17:24:03 +0000 (17:24 +0000)]
[Mac] Remove the ClipboardMac class and header file
https://bugs.webkit.org/show_bug.cgi?id=116165

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Remove ClipboardMac.h.
* editing/mac/EditorMac.mm: Import Clipboard.h rather than ClipboardMac.h.
* page/mac/EventHandlerMac.mm: Ditto.
* platform/mac/ClipboardMac.h: Removed.

* platform/mac/ClipboardMac.mm: Import Clipboard.h rather than ClipboardMac.h.
Deleted ClipboardMac constructor.

Source/WebKit/mac:

* WebCoreSupport/WebDragClient.mm: Import Clipboard.h instead of ClipboardMac.h.

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

19 months agoAllow http tests on Arch Linux
commit-queue@webkit.org [Wed, 15 May 2013 17:23:44 +0000 (17:23 +0000)]
Allow http tests on Arch Linux
https://bugs.webkit.org/show_bug.cgi?id=116155

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2013-05-15
Reviewed by Ryosuke Niwa.

Tools:

* Scripts/webkitpy/port/base.py:
(Port._is_arch_based): Added check for /etc/arch-release file.
(Port._apache_config_file_name_for_platform): Call the check.
* Scripts/webkitpy/port/port_testcase.py:
(test_linux_distro_detection): Testcase added.

LayoutTests:

* http/conf/archlinux-httpd.conf: Added.

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

19 months ago[Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any...
darin@apple.com [Wed, 15 May 2013 17:14:19 +0000 (17:14 +0000)]
[Mac] Change Clipboard::create functions so they don't use ClipboardMac::create any more
https://bugs.webkit.org/show_bug.cgi?id=116163

Reviewed by Anders Carlsson.

* dom/Clipboard.h: Made the file drag boolean default to false, better for most callers.

* platform/mac/ClipboardMac.mm: Remove #if ENABLE(DRAG_SUPPORT); that's always on for Mac
and it's not helpful to have the conditionals in here. It's helpful in cross-platform
source files.
(WebCore::Clipboard::create): Create a Pasteboard and then create a Clipboard with new.
Later could refactor to have the Pasteboard creation be platform-specific, and make these
functions platform-independent.
(WebCore::Clipboard::createForDragAndDrop): Ditto.
(WebCore::Clipboard::createForCopyAndPaste): Ditto.

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

19 months agoRemove a leftover v8 file from the watchlist
commit-queue@webkit.org [Wed, 15 May 2013 17:04:13 +0000 (17:04 +0000)]
Remove a leftover v8 file from the watchlist
https://bugs.webkit.org/show_bug.cgi?id=116158

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2013-05-15
Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/common/config/watchlist: Removed a v8 entry from the watchlist.

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

19 months ago[Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
darin@apple.com [Wed, 15 May 2013 17:02:25 +0000 (17:02 +0000)]
[Mac] Remove call to ClipboardMac::create from Editor::newGeneralClipboard
https://bugs.webkit.org/show_bug.cgi?id=116162

Reviewed by Andreas Kling.

* dom/Clipboard.h: Add createForCopyAndPaste function.

* editing/mac/EditorMac.mm:
(WebCore::Editor::newGeneralClipboard): Call createForCopyAndPaste.

* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createForCopyAndPaste): Added. Moved code here from
Editor::newGeneralClipboard.

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

19 months ago[Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
darin@apple.com [Wed, 15 May 2013 16:53:42 +0000 (16:53 +0000)]
[Mac] Remove call to ClipboardMac::create from EventHandler::createDraggingClipboard
https://bugs.webkit.org/show_bug.cgi?id=116161

Reviewed by Andreas Kling.

* dom/Clipboard.h: Added createForDragAndDrop function.

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingClipboard): Changed to use new Clipboard function
instead of ClipboardMac::create.

* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::createForDragAndDrop): Added. For now it does exactly what the
EventHandler::createDraggingClipboard function did, soon to be refactored better.

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

19 months agoConsolidate lists in WTF CMake files
paroga@webkit.org [Wed, 15 May 2013 16:48:32 +0000 (16:48 +0000)]
Consolidate lists in WTF CMake files
https://bugs.webkit.org/show_bug.cgi?id=116142

Reviewed by Martin Robinson.

Move common files into the CMakeLists.txt to avoid duplicating the list of files.
Also rebase the recently added GTK files to match the other CMake ports, since
the submitted patch was based on an older version of the source tree.

.:

* Source/cmake/OptionsGTK.cmake:

Source/WTF:

* wtf/CMakeLists.txt:
* wtf/PlatformBlackBerry.cmake:
* wtf/PlatformEfl.cmake:
* wtf/PlatformGTK.cmake:
* wtf/PlatformWinCE.cmake:

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

19 months ago[Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
darin@apple.com [Wed, 15 May 2013 16:44:20 +0000 (16:44 +0000)]
[Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
https://bugs.webkit.org/show_bug.cgi?id=116159

Reviewed by Andreas Kling.

Source/WebCore:

* dom/Clipboard.h:
(WebCore::Clipboard::pasteboard): Added. For clients that have a DOM clipboard
object and need to get to the Pasteboard platform abstraction.

* editing/Editor.cpp:
(WebCore::Editor::dispatchCPPEvent): Call writePasteboard instead of writeClipboard.
Our long term plan is to delete writeClipboard.

* platform/Pasteboard.h: Added writePasteboard function.
(WebCore::Pasteboard::name): Made this const.

* platform/mac/ClipboardMac.h: Deleted unneeded includes and forward declarations.
Deleted all the data members and the virtual destructor.

* platform/mac/ClipboardMac.mm: Deleted the many includes that are no longer needed.
Deleted the destructor, since it's now automatically generated. Deleted the comment
on an #endif since it's only a few source lines away from the #if.
(WebCore::ClipboardMac::ClipboardMac): Deleted the code to set the data members,
since they are no longer used.

* platform/mac/PasteboardMac.mm: Changed include to Clipboard.h instead of ClipboardMac.h.
(WebCore::Pasteboard::writePasteboard): Replaced writeClipboard with this.

Source/WebKit/mac:

* WebCoreSupport/WebDragClient.mm:
(WebDragClient::willPerformDragSourceAction): Changed to get the pasteboard name
without going through the ClipboardMac class.
(WebDragClient::startDrag): Ditto.

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

19 months agoWeb Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory...
commit-queue@webkit.org [Wed, 15 May 2013 16:40:05 +0000 (16:40 +0000)]
Web Inspector: Get rid of addNativeSnapshotChunk and HeapSnapshotChunk from Memory domain
https://bugs.webkit.org/show_bug.cgi?id=116144

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-05-15
Reviewed by Timothy Hatcher.

No new tests, no behavior change.

* inspector/Inspector.json:

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

19 months ago[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
jocelyn.turcotte@digia.com [Wed, 15 May 2013 16:31:13 +0000 (16:31 +0000)]
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
https://bugs.webkit.org/show_bug.cgi?id=116035

Reviewed by Allan Sandfeld Jensen.

Source/WebCore:

The previous fix only moved the crash location from WebKit down to QNetworkReplyHttpImpl
which expects its QNetworkAccessManager to still be alive.

Fix it by watching the QNetworkReply's destroyed() signal and avoid the dangling pointer
instead. The QNetworkReply doesn't need to be aborted in this case anyway.

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
(WebCore::QNetworkReplyWrapper::release):
(WebCore::QNetworkReplyWrapper::stopForwarding):
  Rename resetConnections to stopForwarding since not all connections are related
  to data forwarding to the client anymore.
(WebCore::QNetworkReplyWrapper::receiveMetaData):
(WebCore::QNetworkReplyWrapper::replyDestroyed):
(WebCore::QNetworkReplyWrapper::didReceiveFinished):
* platform/network/qt/QNetworkReplyHandler.h:
(QNetworkReplyWrapper):

Source/WebKit/qt:

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::networkReplyParentDidntChange): Change test to match the new expectation.
(tst_QWebPage::destroyQNAMBeforeAbortDoesntCrash):

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

19 months ago[Mac] Make Clipboard::declareAndWriteDragImage non-virtual
darin@apple.com [Wed, 15 May 2013 16:27:43 +0000 (16:27 +0000)]
[Mac] Make Clipboard::declareAndWriteDragImage non-virtual
https://bugs.webkit.org/show_bug.cgi?id=116156

Reviewed by Anders Carlsson.

* dom/Clipboard.h: Make declareAndWriteDragImage non-virtual for non-legacy.

* platform/Pasteboard.h:
(WebCore::Pasteboard::name): Added. Can be used in Mac platform code to do
pasteboard operations directly instead of through the Pasteboard class
functions. Not sure if we'll need it long term or not.

* platform/mac/ClipboardMac.h: Removed declareAndWriteDragImage function.

* platform/mac/ClipboardMac.mm:
(WebCore::Clipboard::declareAndWriteDragImage): Made this function a Clipboard
member instead of ClipboardMac.

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

19 months ago[curl] Remove version #if guards
commit-queue@webkit.org [Wed, 15 May 2013 16:22:14 +0000 (16:22 +0000)]
[curl] Remove version #if guards
https://bugs.webkit.org/show_bug.cgi?id=116152

Patch by Peter Gal <galpeter@inf.u-szeged.hu> on 2013-05-15
Reviewed by Brent Fulgham.

No tests required.

* platform/network/curl/ResourceHandleCurl.cpp:
(WebCore::ResourceHandle::platformSetDefersLoading): Removed version guard.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::writeCallback): Ditto.
(WebCore::headerCallback): Ditto.
(WebCore::readCallback): Ditto.
(WebCore::ResourceHandleManager::dispatchSynchronousJob): Ditto.
(WebCore::ResourceHandleManager::initializeHandle): Ditto.

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

19 months ago[GTK] Fails to build while generating gtkdoc
commit-queue@webkit.org [Wed, 15 May 2013 16:13:23 +0000 (16:13 +0000)]
[GTK] Fails to build while generating gtkdoc
https://bugs.webkit.org/show_bug.cgi?id=115612

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-05-15
Reviewed by Philippe Normand.

Fix typo in the prerequisites of docs-build.stamp.

* GNUmakefile.am:

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

19 months agoUnreviewed, fixing the current test-webkitpy failure.
zandobersek@gmail.com [Wed, 15 May 2013 16:11:32 +0000 (16:11 +0000)]
Unreviewed, fixing the current test-webkitpy failure.

* Scripts/webkitpy/port/mac_unittest.py:
(test_setup_environ_for_server): Adjusting the expected DYLD_INSERT_LIBRARIES environment variable value
in webkitpy.port.mac_unittest.test_setup_environ_for_server after r150089.

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

19 months agoRemove unnecessary dependecy on CoreFoundation from WebDatabaseManager
paroga@webkit.org [Wed, 15 May 2013 16:03:13 +0000 (16:03 +0000)]
Remove unnecessary dependecy on CoreFoundation from WebDatabaseManager
https://bugs.webkit.org/show_bug.cgi?id=115993

Reviewed by Anders Carlsson.

Using COMPropertyBag instead of CFDictionaryPropertyBag also reduces
the total lines of code needed for the same functionality.

* WebDatabaseManager.cpp:
(WebDatabaseManager::dispatchDidModifyDatabase):

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

19 months agoBUILD FIX (r150089): Make WebCoreTestShim build for iOS
ddkilzer@apple.com [Wed, 15 May 2013 15:51:27 +0000 (15:51 +0000)]
BUILD FIX (r150089): Make WebCoreTestShim build for iOS

* Configurations/WebCoreTestShim.xcconfig: Exclude
WebCoreTestShimLibrary.cpp when building for iOS.

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

19 months agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 15 May 2013 15:35:56 +0000 (15:35 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Removing two redundant flaky crasher expectations. Adjusting one expectation,
assigning it a mock bug modifier so the TestExpectations linting passes.

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

19 months agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 15 May 2013 15:28:42 +0000 (15:28 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Removing failure expectations for 7 CSS Regions and CSS Exclusions reftests.

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

19 months agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 15 May 2013 15:15:38 +0000 (15:15 +0000)]
Unreviewed GTK gardening.

* platform/gtk/fast/js/global-constructors-attributes-expected.txt: Rebaselining after r149845.

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

19 months agoUnreviewed GTK gardening.
zandobersek@gmail.com [Wed, 15 May 2013 15:09:30 +0000 (15:09 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Adding faillure expectations for two reftests that
started failing after r150025 and r150065.

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

19 months ago[CSSRegions] Implement offsetParent for elements inside named flow
commit-queue@webkit.org [Wed, 15 May 2013 10:54:24 +0000 (10:54 +0000)]
[CSSRegions] Implement offsetParent for elements inside named flow
https://bugs.webkit.org/show_bug.cgi?id=113276

Source/WebCore:

In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.
http://dev.w3.org/csswg/css-regions/#cssomview-offset-attributes

As a result of this change, the DumpRenderTree tool would crash in
WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent when running the selecting-text-through-different-region-flows.html
test. The RenderObjects inside a flow are attached to the RenderFlowThread. However, the RenderFlowThread is attached to the
RenderView directly, meaning that we are going to bypass the <body>'s RenderObject while iterating the parents.

Patch by Radu Stavila <stavila@adobe.com> on 2013-05-15
Reviewed by Darin Adler.

Tests: fast/regions/offsetParent-body-in-flow-thread.html
       fast/regions/offsetParent-in-flow-thread.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::offsetParent):

LayoutTests:

Patch by Radu Stavila <stavila@adobe.com> on 2013-05-15
Reviewed by Darin Adler.

In the offsetParent algorithm, the nearest ancestor search skips from the topmost named flow elements directly to the body element.

Added new test for offsetParent when body is flowed into a region.
Updated existing offsetParent test.

* fast/regions/offsetParent-body-in-flow-thread-expected.txt: Added.
* fast/regions/offsetParent-body-in-flow-thread.html: Added.
* fast/regions/offsetParent-in-flow-thread-expected.txt:
* fast/regions/offsetParent-in-flow-thread.html:

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

19 months ago[Mac] Make Clipboard::createDragImage non-virtual
darin@apple.com [Wed, 15 May 2013 09:43:18 +0000 (09:43 +0000)]
[Mac] Make Clipboard::createDragImage non-virtual
https://bugs.webkit.org/show_bug.cgi?id=116136

Reviewed by Benjamin Poulain.

* dom/Clipboard.h: Made createDragImage non-virtual for non-legacy.

* platform/mac/ClipboardMac.h: Removed frame argument from create function
and constructor. Removed createDragImage and dragNSImage. Removed m_frame
data member.

* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::ClipboardMac): Removed frame argument and code
to initialize m_frame.
(WebCore::Clipboard::createDragImage): Merged the createDragImage and
dragNSImage functions, since they were the same thing. Changed code to get
the frame from the drag image element. Made the createDragImage function
a Clipboard member instead of ClipboardMac.

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

19 months ago[WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
paroga@webkit.org [Wed, 15 May 2013 09:03:56 +0000 (09:03 +0000)]
[WINCE] Fix calls to GlyphPage::setGlyphDataForIndex()
https://bugs.webkit.org/show_bug.cgi?id=116137

Reviewed by Andreas Kling.

Use zero for the glyp when the fontData pointer is null.
This aligns GlyphPageTreeNodeWinCE with the other implementations
and makes all ASSERT() pass in setGlyphDataForIndex().

* platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
(WebCore::GlyphPage::fill):

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

19 months agoDo not bloat HTMLTokenizer with a giant inline InputStreamPreprocessor::peek
benjamin@webkit.org [Wed, 15 May 2013 08:28:43 +0000 (08:28 +0000)]
Do not bloat HTMLTokenizer with a giant inline InputStreamPreprocessor::peek
https://bugs.webkit.org/show_bug.cgi?id=116066

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-05-15
Reviewed by Ryosuke Niwa.

Merge https://chromium.googlesource.com/chromium/blink/+/45e0337b2f2db535ab08365f6e763a5015e4d990.

On x86_64, this removes 40kb from the binary. On my machine it is completely neutral on performance.

* html/parser/InputStreamPreprocessor.h:
(WebCore::InputStreamPreprocessor::peek):
(InputStreamPreprocessor):
(WebCore::InputStreamPreprocessor::advance):
(WebCore::InputStreamPreprocessor::skipNextNewLine):
(WebCore::InputStreamPreprocessor::reset):
(WebCore::InputStreamPreprocessor::processNextInputCharacter):

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

19 months agoRemove WTF_USE_PLATFORM_STRATEGIES
carlosgc@webkit.org [Wed, 15 May 2013 08:07:28 +0000 (08:07 +0000)]
Remove WTF_USE_PLATFORM_STRATEGIES
https://bugs.webkit.org/show_bug.cgi?id=114431

Reviewed by Darin Adler.

Source/WebCore:

* Modules/webdatabase/DatabaseManager.cpp:
(WebCore::DatabaseManager::DatabaseManager):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::suspendPostAttachCallbacks):
(WebCore::ContainerNode::resumePostAttachCallbacks):
* dom/VisitedLinkState.cpp:
(WebCore::VisitedLinkState::determineLinkStateSlowCase):
* loader/CookieJar.cpp:
(WebCore::cookies):
(WebCore::setCookies):
(WebCore::cookiesEnabled):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
* loader/HistoryController.cpp:
(WebCore::addVisitedLink):
* loader/LoaderStrategy.cpp:
* loader/LoaderStrategy.h:
* loader/ResourceLoadScheduler.cpp:
(WebCore::resourceLoadScheduler):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::releaseResources):
(WebCore::ResourceLoader::willSendRequest):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::load):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::performPostLoadActions):
* platform/CookiesStrategy.h:
* platform/DatabaseStrategy.cpp:
* platform/DatabaseStrategy.h:
* platform/PasteboardStrategy.h:
* platform/PlatformStrategies.cpp:
* platform/PlatformStrategies.h:
* platform/VisitedLinkStrategy.h:
* platform/mac/PasteboardMac.mm:
* platform/network/BlobRegistry.cpp:
(WebCore::blobRegistry):
* plugins/PluginData.cpp:
(WebCore::PluginData::initPlugins):
* plugins/PluginStrategy.h:
* storage/StorageNamespace.cpp:
(WebCore::StorageNamespace::localStorageNamespace):
(WebCore::StorageNamespace::transientLocalStorageNamespace):
(WebCore::StorageNamespace::sessionStorageNamespace):
* storage/StorageStrategy.cpp:
* storage/StorageStrategy.h:
* workers/SharedWorkerStrategy.h:

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataUseFeatures.in:

Source/WebKit2:

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):

Source/WTF:

* wtf/Platform.h:

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

19 months ago[curl] Add support for HttpOnly cookies
kadam@inf.u-szeged.hu [Wed, 15 May 2013 07:37:57 +0000 (07:37 +0000)]
[curl] Add support for HttpOnly cookies
https://bugs.webkit.org/show_bug.cgi?id=116102

Patch by Dávid Szabolcs <David.Szabolcs@stud.u-szeged.hu> on 2013-05-15
Reviewed by Brent Fulgham.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::addMatchingCurlCookie):
(WebCore::cookiesForSession):
(WebCore::cookiesForDOM):
(WebCore):
(WebCore::cookieRequestHeaderFieldValue):

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

19 months agoREGRESSION(r147548): Broken comboboxes
carlosgc@webkit.org [Wed, 15 May 2013 06:42:25 +0000 (06:42 +0000)]
REGRESSION(r147548): Broken comboboxes
https://bugs.webkit.org/show_bug.cgi?id=115475

Reviewed by Gustavo Noronha Silva.

The problem is that r147548 made the popup to be closed when a
blur event is received. Right before showing the popup the input
element is focused, so that after the the popup is shown the focus
event is emitted and the event handler is called again hiding the
popup.

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::menuListDefaultEventHandler): Check
element has lost the focus before closing the popup menu.

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

19 months agoPrinting in 1Password app is broken with screen fonts disabled
bdakin@apple.com [Wed, 15 May 2013 04:35:26 +0000 (04:35 +0000)]
Printing in 1Password app is broken with screen fonts disabled
https://bugs.webkit.org/show_bug.cgi?id=116133
-and corresponding-
<rdar://problem/13162981>

Reviewed by Anders Carlsson.

Source/WebKit/mac:

Return YES from [WebPreferences screenFontSubstitutionEnabled] for versions of the
1Password app that were linked on or before MountainLion.

* WebView/WebPreferences.mm:
(needsScreenFontsEnabledQuirk):
(-[WebPreferences screenFontSubstitutionEnabled]):

WebKitLibraries:

Need WKExecutableWasLinkedOnOrBeforeMountainLion() for this quirk.

* libWebKitSystemInterfaceLion.a:
* libWebKitSystemInterfaceMountainLion.a:

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

19 months ago[Mac] Move setDragImage from ClipboardMac to PasteboardMac
darin@apple.com [Wed, 15 May 2013 04:27:42 +0000 (04:27 +0000)]
[Mac] Move setDragImage from ClipboardMac to PasteboardMac
https://bugs.webkit.org/show_bug.cgi?id=116036

Reviewed by Anders Carlsson.

* dom/Clipboard.cpp:
(WebCore::Clipboard::~Clipboard): Stop loading the drag image when
the clipboard object is deallocated. It would be better if there was
a more-well-defined time to stop the load.
(WebCore::Clipboard::setDragImage): Added. Sets up a drag image
based on a CachedImage. This tells the image loader to load the image
and updates the drag image when the image arrives. Copied from the
code in ClipboardMac, but refactored to use a separate loader object.
(WebCore::Clipboard::setDragImageElement): Added. Sets up a drag image
based on an element.
(WebCore::Clipboard::updateDragImage): Added. Common code to update
drag image when a new one is set or when a drag image load completes.
(WebCore::DragImageLoader::create): Added.
(WebCore::DragImageLoader::DragImageLoader): Ditto.
(WebCore::DragImageLoader::startLoading): Ditto.
(WebCore::DragImageLoader::stopLoading): Ditto.
(WebCore::DragImageLoader::imageChanged): Ditto.

* dom/Clipboard.h: Made setDragImage and setDragImageElement non-virtual
for non-legacy. Added updateDragImage and m_dragImageLoader.

* platform/Pasteboard.h: Added setDragImage function.

* platform/mac/ClipboardMac.h: Removed CachedImageClient as a base class
for ClipboardMac. Removed setDragImage and setDragImageElement.

* platform/mac/ClipboardMac.mm: Removed setDragImage and setDragImageElement.
(WebCore::ClipboardMac::~ClipboardMac): Removed code to remove self as
client loading the drag image. This is now in the Clipboard base class.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::setDragImage): Added. Contains code moved here
from ClipboardMac.

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

19 months agoUse ElementTraversal in SelectorDataList::execute
rniwa@webkit.org [Wed, 15 May 2013 03:17:43 +0000 (03:17 +0000)]
Use ElementTraversal in SelectorDataList::execute
https://bugs.webkit.org/show_bug.cgi?id=116131

Reviewed by Darin Adler.

Use ElementTraversal::firstWithin and ElementTraversal::next to simplify the code.

* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::execute):

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

19 months agoFix build after r150090.
commit-queue@webkit.org [Wed, 15 May 2013 02:18:47 +0000 (02:18 +0000)]
Fix build after r150090.
https://bugs.webkit.org/show_bug.cgi?id=116129

Unreviewed build fix after r150090.

Patch by Jaehun Lim <ljaehun.lim@samsung.com> on 2013-05-14

* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

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

19 months ago[CSS Exclusions] Some layout tests fail to account for inline pixel snapping
hmuller@adobe.com [Wed, 15 May 2013 02:17:55 +0000 (02:17 +0000)]
[CSS Exclusions] Some layout tests fail to account for inline pixel snapping
https://bugs.webkit.org/show_bug.cgi?id=116115

Reviewed by Dirk Schulze.

Adjust the expected locations of spans to account for the fact that inline layout snaps boxes' logical top
and bottom to pixels, and the fact that line segment layout rounds the logical left and floors the logical
right of segments.

* fast/exclusions/shape-inside/shape-inside-polygon-layout.html: Use the quiet variable!
* fast/exclusions/shape-outside-floats/shape-outside-floats-diamond-margin-polygon-expected.txt:
* fast/exclusions/shape-outside-floats/shape-outside-floats-diamond-margin-polygon.html:
* fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html:
* fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html:

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

19 months ago[Windows, others] Unreviewed build fix after r150090.
bfulgham@apple.com [Wed, 15 May 2013 01:20:12 +0000 (01:20 +0000)]
[Windows, others] Unreviewed build fix after r150090.

* DumpRenderTree/TestRunner.cpp:
(getSecureEventInputIsEnabledCallback): IsSecureEventInputEnabled
doesn't exist on other platforms.

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

19 months ago[Windows] Expunge pthreads2VC.dll from DumpRenderTree Project
bfulgham@apple.com [Wed, 15 May 2013 01:00:26 +0000 (01:00 +0000)]
[Windows] Expunge pthreads2VC.dll from DumpRenderTree Project
https://bugs.webkit.org/show_bug.cgi?id=115889

Patch by Brent Fulgham <bfulgham@webkit.org> on 2013-05-14
Reviewed by Benjamin Poulain.

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props:
* DumpRenderTree/win/DumpRenderTreeCommon.vsprops:

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

19 months agoAdd a preference that can disable the fake SYSV SHM shim
commit-queue@webkit.org [Wed, 15 May 2013 00:27:36 +0000 (00:27 +0000)]
Add a preference that can disable the fake SYSV SHM shim
https://bugs.webkit.org/show_bug.cgi?id=116127
<rdar://problem/13810524>

Patch by Simon Cooper <scooper@apple.com> on 2013-05-14
Reviewed by Alexey Proskuryakov.

* PluginProcess/mac/PluginProcessShim.mm:
(WebKit::shim_disabled):
(WebKit::shim_shmdt):
(WebKit::shim_shmat):
(WebKit::shim_shmget):
(WebKit::shim_shmctl):

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

19 months ago[wk2] Not updating tiled backing coverage when main frame scrollability changes
timothy_horton@apple.com [Wed, 15 May 2013 00:18:02 +0000 (00:18 +0000)]
[wk2] Not updating tiled backing coverage when main frame scrollability changes
https://bugs.webkit.org/show_bug.cgi?id=116123
<rdar://problem/13836559>

Reviewed by Simon Fraser.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
Add updateMainFrameClipsToExposedRect.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
Remove m_clipsToExposedRect. We don't actually need it.

(WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged):
Call updateMainFrameClipsToExposedRect so that we can always update
tiled backing coverage and can factor out our calls to setClipsToExposedRect.

(WebKit::TiledCoreAnimationDrawingArea::updateMainFrameClipsToExposedRect):
Factor out setClipsToExposedRect calls to here, and also call
FrameView::adjustTiledBackingCoverage so that the FrameView's tiled
backing is informed to allow overdraw in the UI-process-scrolling case.

(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
Use updateMainFrameClipsToExposedRect.

Export FrameView::adjustTiledBackingCoverage.

* WebCore.exp.in:

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

19 months ago[Windows] Identify proper run environment for scripts.
bfulgham@apple.com [Wed, 15 May 2013 00:15:30 +0000 (00:15 +0000)]
[Windows] Identify proper run environment for scripts.
https://bugs.webkit.org/show_bug.cgi?id=116114

Reviewed by David Kilzer.

Determine (based on Visual Studio version) which path to use for
executables (bin versus bin32).

* Scripts/webkitdirs.pm:
(determineVisualStudioInstallDir): Added.
(determineVisualStudioVersion): Added.
(determineConfigurationProductDir): Modified to choose proper bin
or bin32 directory.
(visualStudioVersion): Added
(setupCygwinEnv): Modified to use new determineVisualStudioInstallDir

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

19 months ago[BlackBerry] Improve Fatfinger phase.
commit-queue@webkit.org [Tue, 14 May 2013 22:40:20 +0000 (22:40 +0000)]
[BlackBerry] Improve Fatfinger phase.
https://bugs.webkit.org/show_bug.cgi?id=107403

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-05-14
Reviewed by Rob Buis.

Internally reviewed by Genevieve Mak.
BlackBerry PR 324965.

Cache and reuse intersected nodes as long as hit position has not been
changed.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::hitTestResult):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::findBestPoint):
(BlackBerry::WebKit::FatFingers::findIntersectingRegions):
(BlackBerry::WebKit::FatFingers::getNodesFromRect):
* WebKitSupport/FatFingers.h:

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

19 months ago [Mac] Add tests for secure event input
ap@apple.com [Tue, 14 May 2013 22:20:51 +0000 (22:20 +0000)]
    [Mac] Add tests for secure event input
        https://bugs.webkit.org/show_bug.cgi?id=116121

        Reviewed by Mark Rowe.

        * editing/secure-input: Added.
        * editing/secure-input/password-input-changed-type-expected.txt: Added.
        * editing/secure-input/password-input-changed-type.html: Added.
        * editing/secure-input/password-input-focusing-expected.txt: Added.
        * editing/secure-input/password-input-focusing-to-different-frame-expected.txt: Added.
        * editing/secure-input/password-input-focusing-to-different-frame.html: Added.
        * editing/secure-input/password-input-focusing.html: Added.
        * editing/secure-input/removed-password-input-expected.txt: Added.
        * editing/secure-input/removed-password-input.html: Added.
        * editing/secure-input/reset-state-on-navigation-expected.txt: Added.
        * editing/secure-input/reset-state-on-navigation.html: Added.
        * editing/secure-input/resources: Added.
        * editing/secure-input/resources/reset-state-on-navigation-target.html: Added.
        * platform/efl/TestExpectations:
        * platform/gtk/TestExpectations:
        * platform/mac-wk2/TestExpectations:
        * platform/mac/TestExpectations:
        * platform/qt/TestExpectations:
        * platform/win/TestExpectations:
        * platform/wincairo/TestExpectations:

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

19 months ago [Mac] Add a testing shim for secure event input functions
ap@apple.com [Tue, 14 May 2013 22:08:53 +0000 (22:08 +0000)]
    [Mac] Add a testing shim for secure event input functions
        https://bugs.webkit.org/show_bug.cgi?id=116122

        Reviewed by Mark Rowe.

        Added a new target with a dynamic library that interposes secure event input functions.
        We need this to avoid interfering with user session state.

        * Configurations/WebCoreTestShim.xcconfig: Added.
        * WebCore.xcodeproj/project.pbxproj:
        * platform/mac/DynamicLinkerInterposing.h: Moved from Source/WebKit2/Shared/mac/DyldInterpose.h.
        * testing/WebCoreTestShimLibrary.cpp: Added.
        (shimEnableSecureEventInput):
        (shimDisableSecureEventInput):
        (shimIsSecureEventInputEnabled):

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

19 months agoGet rid of Gradient::getColor()
benjamin@webkit.org [Tue, 14 May 2013 21:14:51 +0000 (21:14 +0000)]
Get rid of Gradient::getColor()
https://bugs.webkit.org/show_bug.cgi?id=116089

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-05-14
Reviewed by Andreas Kling.

This code is now useless, remove it.

* html/canvas/CanvasGradient.h:
(CanvasGradient):
* platform/graphics/Gradient.cpp:
(WebCore::Gradient::Gradient):
(WebCore::Gradient::hash):
* platform/graphics/Gradient.h:
(Gradient):

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

19 months agoSource/WebCore: REGRESSION: united.com has overlapping elements and is broken by...
hyatt@apple.com [Tue, 14 May 2013 20:37:13 +0000 (20:37 +0000)]
Source/WebCore: REGRESSION: united.com has overlapping elements and is broken by flex box changes.
https://bugs.webkit.org/show_bug.cgi?id=115329
<rdar://problem/13690610>

The new flexbox spec says that flex-basis omitted in the flex shorthand defaults to
0 when flex-grow/shrink are set. This has undesirable behavior when objects don't
end up flexing at all, and it's something the spec is going to eventually address.

For now, though, to fix the regression, I'm making a targeted "hack" to deliberately
violate the spec, but to do so as minimally as possible. This hack detects if there
is infinite available space on a line, and if so, it treats a flex-basis of 0 like
auto.

This means that when height is constrained and set by a container, flexing will do
the right thing. Basically any time you end up actually flexing, the spec behavior
should happen. If you're just laying out at intrinsic sizes, though, and no flexing
is going to occur, we ignore a flex-basis of 0 and just use the child's normal size.

Note that widths don't have to be patched because the preferred logical widths
algorithm is broken right now and not checking flex-basis. If it did, we'd have seen
the same bug in the width direction.

This width issue is covered by https://bugs.webkit.org/show_bug.cgi?id=116117

Reviewed by Simon Fraser.

Added fast/flexbox/auto-height-with-flex.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
Make sure we return LayoutUnit::max when you have infinite free space and not
max - borderPadding.

(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild):
Only clear override size if it was set. Only mark for relayout if we did
an override size clear (i.e., if we were actually flexed). Add a new parameter,
hasInfiniteLineLength, that - if set - causes us to special case flex-basis:0
and treat it like flex-basis:auto.

(WebCore::RenderFlexibleBox::layoutFlexItems):
Define hasInfiniteLineLength and pass it to all the functions that need it.

(WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
Remove the code that marks for layout and does a layout so early. This code
is moving (and changing) to preferredMainAxisContentExtentForChild.

(WebCore::RenderFlexibleBox::computeNextFlexLine):
Computes whether or not we have infinite line length now.

(WebCore::RenderFlexibleBox::freezeViolations):
(WebCore::RenderFlexibleBox::resolveFlexibleLengths):
Propagate hasInfiniteLineLength through to preferredMainAxisContentExtentForChild.

* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):
Add hasInfiniteLineLength parameter to a bunch of functions.

LayoutTests: REGRESSION (r147261): Many overlaid elements on united.com's account page
https://bugs.webkit.org/show_bug.cgi?id=116107
<rdar://problem/13690610>

Reviewed by Simon Fraser.

* fast/flexbox/auto-height-with-flex-expected.html: Added.
* fast/flexbox/auto-height-with-flex.html: Added.

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

19 months agoAssertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDa...
akling@apple.com [Tue, 14 May 2013 20:22:52 +0000 (20:22 +0000)]
Assertion failure in GlyphPage::setGlyphDataForIndex: (!glyph || fontData == m_fontDataForAllGlyphs)
<http://webkit.org/b/116113>
<rdar://problem/13833790>

Reviewed by Dan Bernstein.

If we're filling a full GlyphPage with a SimpleFontData that is actually a composite font reference,
we need to make sure we have per-glyph font data pointers, since it may end up using them.

Added GlyphPage::mayUseMixedFontDataWhenFilling() which can be implemented by the platform to let
GlyphPageTreeNode know that it should allocate a full-sized GlyphPage for mixed font data pointers
in case the font is a composite font reference, or if there are CJK ideographs in the text.

This code can be made smarter, but that's outside the scope of this change.
Fixes heavy asserting on bots running unreleased software.

* platform/graphics/GlyphPage.h:
(GlyphPage):
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):
* platform/graphics/GlyphPageTreeNode.cpp:
(WebCore::GlyphPageTreeNode::initializePage):
* platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
(WebCore::shouldUseCoreText):
(WebCore::GlyphPage::mayUseMixedFontDataWhenFilling):

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

19 months agoHeap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
zoltan@webkit.org [Tue, 14 May 2013 20:09:17 +0000 (20:09 +0000)]
Heap-use-after-free in WebCore::RenderBox::exclusionShapeOutsideInfo
https://bugs.webkit.org/show_bug.cgi?id=115566

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-05-14
Reviewed by David Hyatt.

Source/WebCore:

When a portion of the render tree is being detached, anonymous blocks
will be combined as their children are deleted. In this process, the
anonymous block later in the tree is merged into the one preceeding it.
It can happen that the later block contains floats that the previous
block did not contain, and thus are not in the floating objects list for
the new block. This can result in the new block containing floats that
are not in it's floating objects list, but are in the floating objects
lists of siblings and parents. This can cause problems when the float
itself is deleted, since the deletion code assumes that if a float is not
in it's containing block's floating objects list, it isn't in any
floating objects list, causing dangling pointers in the floating objects
lists of the siblings and parents. In order to preserve this condition
(removing it has serious performance implications), we need to copy the
floating objects from the old block to the new block.  The float's
metrics will likely all be wrong, but since the new block is already
marked for layout, this will get fixed before anything gets displayed.

Test: fast/block/float/float-append-child-crash.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::moveAllChildrenIncludingFloatsTo): Copy
    floating objects list in addition to children.
(WebCore::RenderBlock::FloatingObject::clone): Added.
(WebCore::RenderBlock::removeChild): Use new method to copy children.
* rendering/RenderBlock.h:
(RenderBlock): Add method.

LayoutTests:

Cleaned up test from the fuzzer. Will only crash if run under a memory
checking tool like ASAN.

* fast/block/float/float-append-child-crash-expected.txt: Added.
* fast/block/float/float-append-child-crash.html: Added.

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

19 months agoUnreviewed, rolling out r150023.
commit-queue@webkit.org [Tue, 14 May 2013 19:57:51 +0000 (19:57 +0000)]
Unreviewed, rolling out r150023.
http://trac.webkit.org/changeset/150023
https://bugs.webkit.org/show_bug.cgi?id=116120

Causes table layout issues (Bug 116118) and crashes on
buildbot waterfall pages. (Requested by ddkilzer on #webkit).

Source/WebCore:

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::calcRowLogicalHeight):
* rendering/RenderTableSection.h:
(RenderTableSection):

LayoutTests:

* fast/css/vertical-align-baseline-rowspan-007-expected.html:
* fast/css/vertical-align-baseline-rowspan-007.htm:
* fast/css/vertical-align-baseline-rowspan-008-expected.html:
* fast/table/table-rowspan-height-distribution-in-rows.html: Removed.
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/qt/fast/table/table-rowspan-height-distribution-in-rows-expected.png: Removed.
* platform/qt/fast/table/table-rowspan-height-distribution-in-rows-expected.txt: Removed.
* platform/qt/tables/mozilla/bugs/bug17548-expected.png:
* platform/qt/tables/mozilla/bugs/bug17548-expected.txt:
* platform/qt/tables/mozilla/bugs/bug220536-expected.png:
* platform/qt/tables/mozilla/bugs/bug220536-expected.txt:
* platform/qt/tables/mozilla/bugs/bug7714-expected.png:
* platform/qt/tables/mozilla/bugs/bug7714-expected.txt:
* platform/qt/tables/mozilla/core/bloomberg-expected.png:
* platform/qt/tables/mozilla/core/bloomberg-expected.txt:
* platform/qt/tables/mozilla/other/test6-expected.png:
* platform/qt/tables/mozilla/other/test6-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug1010-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug1010-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug23847-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug58402-2-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug58402-2-expected.txt:
* platform/qt/tables/mozilla_expected_failures/bugs/bug6933-expected.png:
* platform/qt/tables/mozilla_expected_failures/bugs/bug6933-expected.txt:
* tables/mozilla/core/bloomberg-expected.txt:
* tables/mozilla_expected_failures/bugs/bug23847-expected.txt:

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

19 months ago[BlackBerry] Hook up frame render begin/end in PerformanceMonitor
commit-queue@webkit.org [Tue, 14 May 2013 19:39:39 +0000 (19:39 +0000)]
[BlackBerry] Hook up frame render begin/end in PerformanceMonitor
https://bugs.webkit.org/show_bug.cgi?id=116110

Patch by Andrew Lo <anlo@rim.com> on 2013-05-14
Reviewed by Rob Buis.

Internally reviewed by Jeff Rogers, Jonathan Jiang.
Internal PR 299155.

Mark frame render begin & end for BlackBerry performance monitoring
in blitVisibleContents.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::blitVisibleContents):

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

19 months agoSnapshotted plug-ins shadow tree should reset style inheritance
graouts@apple.com [Tue, 14 May 2013 18:03:11 +0000 (18:03 +0000)]
Snapshotted plug-ins shadow tree should reset style inheritance
https://bugs.webkit.org/show_bug.cgi?id=116098

Reset the styles such that only injected user-agent stylesheets affect
the rendering of snapshotted plug-ins' shadow content.

Reviewed by Darin Adler.

* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):

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

19 months ago[Windows] Switch to embedded manifest commands for launcher executables.
bfulgham@apple.com [Tue, 14 May 2013 17:57:12 +0000 (17:57 +0000)]
[Windows] Switch to embedded manifest commands for launcher executables.
https://bugs.webkit.org/show_bug.cgi?id=116109

Reviewed by Darin Adler.

* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj: Remove the
now-unused WinLauncher.exe.manifest file.
* WinLauncher/WinLauncher.vcxproj/WinLauncher.vcxproj.filters: Ditto.
* win/DLLLauncher/DLLLauncherMain.cpp: Add embedded manifest command
when building with VS2010 or newer.

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

19 months ago[Win] REGRESSION(r149944): mmap is not available on Windows
jocelyn.turcotte@digia.com [Tue, 14 May 2013 17:55:42 +0000 (17:55 +0000)]
[Win] REGRESSION(r149944): mmap is not available on Windows
https://bugs.webkit.org/show_bug.cgi?id=116015

Reviewed by Anders Carlsson.

Use fastAlloc/fastFree for platforms other than OS(DARWIN) where
using mmap is not necessary and maybe not available.

* Platform/CoreIPC/ArgumentEncoder.cpp:
(CoreIPC::allocBuffer):
(CoreIPC::freeBuffer):
(CoreIPC::ArgumentEncoder::~ArgumentEncoder):
(CoreIPC::ArgumentEncoder::grow):

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

19 months ago[CSSRegions] Improve hit testing for empty regions
mihnea@adobe.com [Tue, 14 May 2013 17:55:27 +0000 (17:55 +0000)]
[CSSRegions] Improve hit testing for empty regions
https://bugs.webkit.org/show_bug.cgi?id=115534

Reviewed by David Hyatt.

As a better follow up after WebKit bug https://bugs.webkit.org/show_bug.cgi?id=107752,
we can improve the code by not doing hit testing on the render flow thread object when
we are trying to hit test the render flow thread background. In this case, we should just bail out.
No new tests, covered by existing regions tests.

* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::nodeAtPoint):
(WebCore):
(WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
* rendering/RenderFlowThread.h:

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

19 months ago[Windows] Update ORWT to know about the Windows 8 SDK and Debug Tools.
bfulgham@apple.com [Tue, 14 May 2013 17:54:52 +0000 (17:54 +0000)]
[Windows] Update ORWT to know about the Windows 8 SDK and Debug Tools.
https://bugs.webkit.org/show_bug.cgi?id=116079

Reviewed by David Kilzer.

* Scripts/old-run-webkit-tests:
(setUpWindowsCrashLogSaving): Locate ntsd.exe and use it.

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

19 months ago[BlackBerry] Handle network errors when starting a new job
commit-queue@webkit.org [Tue, 14 May 2013 17:53:46 +0000 (17:53 +0000)]
[BlackBerry] Handle network errors when starting a new job
https://bugs.webkit.org/show_bug.cgi?id=116101

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-14
Reviewed by Rob Buis.

Make startJob() return a network status that can be used by the
caller to create a network error.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::initialize): createNetworkStream() should
always return a valid pointer so use an ASSERT instead of an early
return to make sure we have a valid stream.
(WebCore::NetworkJob::startNewJobWithRequest): Only return true if
the network job was started successfully.
* platform/network/blackberry/NetworkJob.h:
(NetworkJob): Make initialize method void instead of bool since it
can't fail.
* platform/network/blackberry/NetworkManager.cpp:
(WebCore::NetworkManager::startJob): Return a network error or
StatusSuccess.
* platform/network/blackberry/NetworkManager.h:
(NetworkManager):
* platform/network/blackberry/ResourceHandleBlackBerry.cpp:
(WebCore::ResourceHandle::start): Return true if job was started
successfully.
(WebCore::ResourceHandle::platformLoadResourceSynchronously):
Check return value of startJob and fill the ResourceError with the
network status returned to finish the load.

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

19 months ago[Mac] captions menu is not positioned correctly in full-screen
graouts@apple.com [Tue, 14 May 2013 17:44:37 +0000 (17:44 +0000)]
[Mac] captions menu is not positioned correctly in full-screen
https://bugs.webkit.org/show_bug.cgi?id=116103

Update the positioning properties of the captions menu in full-screen
following the fix for https://webkit.org/b/115968.

Reviewed by Darin Adler.

* css/fullscreenQuickTime.css:
(video:-webkit-full-screen::-webkit-media-controls-closed-captions-container):
Add 50px to the bottom position since we're now positioned relative to the
media element, and use a calc() command to be right-aligned to the captions
icon in the media controller. The max-width and max-height properties follow
the same technique used for the non-full-screen mode.

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

19 months ago[GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into...
zandobersek@gmail.com [Tue, 14 May 2013 17:40:53 +0000 (17:40 +0000)]
[GTK] Move generated ColorData.cpp, WebKitFontFamilyNames.(cpp|h) build targets into libPlatform
https://bugs.webkit.org/show_bug.cgi?id=115921

Reviewed by Gustavo Noronha Silva.

.:

* GNUmakefile.am: Add GENSOURCES_PLATFORM, platform_built_sources variables.

Source/Platform:

* GNUmakefile.am: Move the ANGLE include directories under the new platform_cppflags variable,
adding the DerivedSources/Platform directory. Add the generated sources' build targets to libPlatform
under nodist_libPlatform_la_SOURCES. Add platform_cppflags to the list of libPlatformGtk CPPFLAGS.
Add generation rules for the ColorData.cpp and WebKitFontFamilyNames.(cpp|h) source files, now generated
into the DerivedSources/Platform directory.

Source/WebCore:

No new tests - no new functionality.

* GNUmakefile.am: Add platform_cppflags to the list of CPPFLAGS for libWebCoreSVG, libWebCore,
libWebCorePlatform, libWebCoreGtk. Remove generation rules for ColorData.cpp and WebKitFontFamilyNames.(cpp|h).
* GNUmakefile.list.am: Include the ColorData.cpp and WebKitFontFamilyNames.(cpp|h) build targers under
platform_built_sources.
* bindings/gobject/GNUmakefile.am: Add platform_cppflags to the list of libWebCoreDOM CPPFLAGS.

Source/WebKit/gtk:

* GNUmakefile.am: Add platform_cppflags to the list of CPPFLAGS for libwebkit2gtk, libWebCoreGtk2,
libPlatformGtk2 and WebKitPluginProcess.

Source/WebKit2:

* GNUmakefile.am: Add platform_cppflags to the list of libwebkit2gtk CPPFLAGS.

Tools:

* GNUmakefile.am: Add platform_cppflags to the list of CPPFLAGS for libWebCoreInternals and DumpRenderTree.
* TestWebKitAPI/GNUmakefile.am: Add platform_cppflags to the list of TestGtk CPPFLAGS.

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

19 months ago[GTK] libPlatform, libPlatformGtk must depend on the related GNUmakefiles
zandobersek@gmail.com [Tue, 14 May 2013 17:31:35 +0000 (17:31 +0000)]
[GTK] libPlatform, libPlatformGtk must depend on the related GNUmakefiles
https://bugs.webkit.org/show_bug.cgi?id=115937

Reviewed by Martin Robinson.

Source/Platform:

* GNUmakefile.am: Set up an artifical dependency so that libPlatform and libPlatformGtk
libraries take into account any changes in this GNUmakefile.am and the GNUmakefile.list.am
located under Source/WebCore. The latter is included due to all the build targets for the
two libraries being listed there.

Source/WebCore:

No new tests - no new functionality.

* GNUmakefile.am: Fix typos in two libraries' names - Webcore -> WebCore.

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

19 months agoRemoving Attr can delete a wrong Attribute in ElementData
rniwa@webkit.org [Tue, 14 May 2013 16:52:30 +0000 (16:52 +0000)]
Removing Attr can delete a wrong Attribute in ElementData
https://bugs.webkit.org/show_bug.cgi?id=116077

Source/WebCore:

Reviewed by Benjamin Poulain.

Merge https://chromium.googlesource.com/chromium/blink/+/e861452a292e185501e48940305947aa6a4e23c2
after simplifying and renaming functions to be more WebKit style.

The XML parser can produce elements with attributes whose names have
distinct prefixes, but the same expanded name. When one of these
attributes is put up for adoption, it may be its similarly named
sibling that is removed from its owner element. As a result the
original owner hangs onto the adopted attribute, despite the fact that
it is now in a different document. Sometimes it's just hard to let go.

Test: fast/dom/adopt-attribute-crash.svg

* dom/Element.cpp:
(WebCore::Element::setAttributeNode):
(WebCore::Element::removeAttributeNode):
(WebCore::ElementData::getAttributeItemIndex):
* dom/Element.h:
(ElementData):
(Element):

LayoutTests:

Reviewed by Benjamin Poulain.

Add a regression test by importing
https://chromium.googlesource.com/chromium/blink/+/e861452a292e185501e48940305947aa6a4e23c2

* fast/dom/adopt-attribute-crash-expected.txt: Added.
* fast/dom/adopt-attribute-crash.svg: Added.

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

19 months ago[BlackBerry] Use requestAnimationFrame for animations
commit-queue@webkit.org [Tue, 14 May 2013 16:17:09 +0000 (16:17 +0000)]
[BlackBerry] Use requestAnimationFrame for animations
https://bugs.webkit.org/show_bug.cgi?id=115896

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-14
Reviewed by Rob Buis.

Source/WebKit/blackberry:

Make WebPagePrivate a
BlackBerry::Platform::AnimationFrameRateClient and use it to
schedule animations.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::animationFrameChanged):
(BlackBerry::WebKit::WebPagePrivate::scheduleAnimation):
(BlackBerry::WebKit::WebPagePrivate::startRefreshAnimationClient):
(BlackBerry::WebKit::WebPagePrivate::stopRefreshAnimationClient):
(BlackBerry::WebKit::WebPagePrivate::handleServiceScriptedAnimationsOnMainThread):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore):
(WebCore::ChromeClientBlackBerry::scheduleAnimation):
* WebCoreSupport/ChromeClientBlackBerry.h:
(ChromeClientBlackBerry):

Source/WTF:

* wtf/Platform.h: Disable REQUEST_ANIMATION_FRAME_TIMER and
WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR for BlackBerry
port.

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

19 months agoRemove ::-webkit-distributed()
antti@apple.com [Tue, 14 May 2013 15:59:14 +0000 (15:59 +0000)]
Remove ::-webkit-distributed()
https://bugs.webkit.org/show_bug.cgi?id=116106

Reviewed by Andreas Kling.

This experimental Shadow DOM selector code is unused and has no owner.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded):
(WebCore::CSSParser::rewriteSpecifiersWithElementName):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::CSSParserSelector):
* css/CSSParserValues.h:
(CSSParserSelector):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::nameToPseudoTypeMap):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
* css/CSSSelectorList.cpp:
* css/CSSSelectorList.h:
(CSSSelectorList):
* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::resetAuthorStyle):
* css/DocumentRuleSets.h:
(DocumentRuleSets):
* css/ElementRuleCollector.cpp:
(WebCore::ElementRuleCollector::matchAuthorRules):
* css/ElementRuleCollector.h:
(ElementRuleCollector):
* css/RuleSet.cpp:
(WebCore::RuleSet::addChildRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::match):
* css/SelectorFilter.cpp:
(WebCore::SelectorFilter::collectIdentifierHashes):
* html/shadow/InsertionPoint.cpp:
* html/shadow/InsertionPoint.h:

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

19 months agoRemove RenderTheme::supportsCalendarPicker
commit-queue@webkit.org [Tue, 14 May 2013 14:29:57 +0000 (14:29 +0000)]
Remove RenderTheme::supportsCalendarPicker
https://bugs.webkit.org/show_bug.cgi?id=116068

Patch by Daker Fernandes Pinheiro <daker.pinheiro@openbossa.org> on 2013-05-14
Reviewed by Benjamin Poulain.

No new tests needed because it doesn't affect behaviour.

This method was never overrided by any platform
and always leaded to the same behaviour.
The code which depended on it was also removed.

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(WebCore::BaseMultipleFieldsDateAndTimeInputType::createShadowSubtree):
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updatePickerIndicatorVisibility):
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType):
* page/ChromeClient.h:
(ChromeClient):
* rendering/RenderTheme.h:

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

19 months ago[WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
jocelyn.turcotte@digia.com [Tue, 14 May 2013 12:54:06 +0000 (12:54 +0000)]
[WK2][Win] Fix ASSERT(DeleteTimerQueueTimer...)
https://bugs.webkit.org/show_bug.cgi?id=116039

Reviewed by Benjamin Poulain.

According to the documentation, DeleteTimerQueueTimer can be expected to return
false with an ERROR_IO_PENDING error when called from the timer's callback.

* Platform/win/WorkQueueWin.cpp:
(WorkQueue::timerCallback):

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

19 months agoModify checkLayout to receive the log container as an optional parameter
abucur@adobe.com [Tue, 14 May 2013 12:51:59 +0000 (12:51 +0000)]
Modify checkLayout to receive the log container as an optional parameter
https://bugs.webkit.org/show_bug.cgi?id=112793

Reviewed by Darin Adler.

Add a way to specify the container manually for checkLayout. This is helpful to measure regions for nested
named flows (and probably other cases as well).

* resources/check-layout.js: Added an optional parameter to window.checkLayout.

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

19 months ago[GStreamer] cannot seek after video finished
kbalazs@webkit.org [Tue, 14 May 2013 12:49:06 +0000 (12:49 +0000)]
[GStreamer] cannot seek after video finished
https://bugs.webkit.org/show_bug.cgi?id=114044

Patch by Balazs Kelemen <b.kelemen@sisa.samsung.com> on 2013-04-30
Reviewed by Philippe Normand.

Source/WebCore:

Test: media/video-seek-after-end.html

Reland without wrong assertion. If seek is called after didEnd the pipeline
state will not be in GST_STATE_NULL yet but it is not a problem because we handle that.

Rework the seeking logic to be able to seek after reseting the pipeline.
In addition to solve the actual problem this patch supposed to make seeking
more robust and correct.
The previous implementation tried to hide the complexity of asynchronous operations
on the pipeline. It did not handle the GST_MESSAGE_ASYNC_DONE message from the bus
but instead reported the seek as finished when it saw an asynchronous pending state
(GST_STATE_CHANGE_ASYNC) which could happen way before the seek is really done.
Now we pay attention to the GST_MESSAGE_ASYNC_DONE message to track the status of seeks.
Seeks are not the only operations executed asynchronously, changing the pipeling state is
similar. It means a seek can overlap with onother ongoing asynchronous operation.
This change address this by introducing an invariant for seeks, which is that we only request
a seek if there are no other ongoing asynchronous operations and the pipeline state is either
paused or playing (which is recommended anyway according to GStreamer's documentation).
This way we can be sure that the time when we get the next GST_MESSAGE_ASYNC_DONE message the
seek has been completed.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::toGstClockTime): Factored time conversation into a helper.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):

(WebCore::MediaPlayerPrivateGStreamer::playbackPosition): The position might not be available
if the pipeline still has a pending state. As a workaround, if we are right after a seek we can
use the seek time. Avoiding this situation would be possible by not allowing any asynchronous
operation to overlap. I believe it would add a lot more complexity so I decided to rather introduce
this workaround. Otherwise those overlapping operations are handled fine by GStreamer.

(WebCore::MediaPlayerPrivateGStreamer::prepareToPlay): Do not reset internal state variables.
This function called when there is an intent to restart playback but it does not actually restart it.
(WebCore::MediaPlayerPrivateGStreamer::currentTime): Just removed a staling newline.
(WebCore::MediaPlayerPrivateGStreamer::seek): Take a look to the pipeline state and act upon that.
If there is an ongoing asynchronous operation make the seek pending, otherwise do it now.
Now we handle overlapping seeks as well because I saw that it can happen in some tests.
Added an early return for live streams as it doesn't makes sense to try seeking in them.

(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Handle GST_MESSAGE_ASYNC_DONE and some refactoring.
(WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Only handle seeks in the pending case, the rest is
now handled in asyncStateChangeDone.
(WebCore::MediaPlayerPrivateGStreamer::cacheDuration): Do not reset the m_mediaDurationKnown if the pipeline
has an asynchronous pending state because it would fail. It does actually happen when we get a duration message
after restarting the pipeline and it would result in restarting playback from the start. It seems to be a bug
in GStreamer that it sends the duration message too early. Also sanitized this function by merging redundant branches.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer):

LayoutTests:

* media/video-seek-after-end-expected.txt: Added.
* media/video-seek-after-end.html: Added.

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

19 months agoEllipsis text is placed to wrong position, when the truncated text is fully cut off...
commit-queue@webkit.org [Tue, 14 May 2013 12:27:03 +0000 (12:27 +0000)]
Ellipsis text is placed to wrong position, when the truncated text is fully cut off in RTL direction.
https://bugs.webkit.org/show_bug.cgi?id=115858

Patch by Zalan Bujtas <zalan@apple.com> on 2013-05-14
Reviewed by Darin Adler.

Source/WebCore:

Take text direction into account to calculate ellipsis position in case of
full truncation.

Test: fast/css/text-overflow-ellipsis-full-truncate-rtl.html

* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::placeEllipsisBox):

LayoutTests:

* fast/css/text-overflow-ellipsis-full-truncate-rtl-expected.html: Added.
* fast/css/text-overflow-ellipsis-full-truncate-rtl.html: Added.

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

19 months agoRemove unused "type" field from DictionaryPopupInfo
ap@apple.com [Tue, 14 May 2013 11:37:46 +0000 (11:37 +0000)]
Remove unused "type" field from DictionaryPopupInfo
https://bugs.webkit.org/show_bug.cgi?id=116011

Reviewed by Darin Adler.

It is unused, and furthermore, PDFPlugin sets it incorrectly anyway.

* Shared/DictionaryPopupInfo.cpp:
(WebKit::DictionaryPopupInfo::encode):
(WebKit::DictionaryPopupInfo::decode):
* Shared/DictionaryPopupInfo.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::showDefinitionForAttributedString):
* WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
(WebKit::WebContextMenuClient::lookUpInDictionary):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):

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

19 months ago[WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
michael.bruning@digia.com [Tue, 14 May 2013 11:32:01 +0000 (11:32 +0000)]
[WK2] Make WebPageProxy use deviceScaleFactor() in creationParameters().
https://bugs.webkit.org/show_bug.cgi?id=110218

Reviewed by Darin Adler.

Make the WebPageProxy::creationParameters use the accessor
deviceScaleFactor() instead of using m_intrinsicDeviceScaleFactor
directly. This will restore the custom device scale factor when
reattaching to the WebProcess after a crash.

Moreover, it will enable the Qt and ELF ports to use the
existing C API for overriding the device scale factor instead
of using the WebPageProxy directly or adding new C API to set
the intrinsic device scale factor.

* UIProcess/API/efl/EwkView.cpp:
(EwkView::setDeviceScaleFactor):
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):

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

19 months ago[BlackBerry] Implement platform strategies
commit-queue@webkit.org [Tue, 14 May 2013 10:12:35 +0000 (10:12 +0000)]
[BlackBerry] Implement platform strategies
https://bugs.webkit.org/show_bug.cgi?id=112162

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-14
Reviewed by Rob Buis.

Source/WebCore:

This is just a refactoring, covered by existing tests.

* CMakeLists.txt: Move PlatformStrategies.cpp from platform
specific makefiles to the global one now that all platforms using
cmake implement platform strategies.
* PlatformBlackBerry.cmake:
* PlatformEfl.cmake:
* PlatformWinCE.cmake:
* loader/CookieJar.cpp: Remove the preprocessor error that is not
needed anymore.
* loader/blackberry/CookieJarBlackBerry.cpp: Removed.
* platform/network/blackberry/CookieJarBlackBerry.cpp: Added.
(WebCore):
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::cookiesEnabled):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostname):
(WebCore::deleteAllCookies):
* plugins/blackberry/PluginDataBlackBerry.cpp: Removed.

Source/WebKit:

* PlatformBlackBerry.cmake: Add new files to compilation.

Source/WebKit/blackberry:

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::globalInitialize): Initialize platform
strategies.
* WebCoreSupport/PlatformStrategiesBlackBerry.cpp: Added.
(PlatformStrategiesBlackBerry::initialize):
(PlatformStrategiesBlackBerry::PlatformStrategiesBlackBerry):
(PlatformStrategiesBlackBerry::createCookiesStrategy):
(PlatformStrategiesBlackBerry::createDatabaseStrategy):
(PlatformStrategiesBlackBerry::createLoaderStrategy):
(PlatformStrategiesBlackBerry::createPasteboardStrategy):
(PlatformStrategiesBlackBerry::createPluginStrategy):
(PlatformStrategiesBlackBerry::createSharedWorkerStrategy):
(PlatformStrategiesBlackBerry::createStorageStrategy):
(PlatformStrategiesBlackBerry::createVisitedLinkStrategy):
(PlatformStrategiesBlackBerry::cookiesForDOM):
(PlatformStrategiesBlackBerry::setCookiesFromDOM):
(PlatformStrategiesBlackBerry::cookiesEnabled):
(PlatformStrategiesBlackBerry::cookieRequestHeaderFieldValue):
(PlatformStrategiesBlackBerry::getRawCookies):
(PlatformStrategiesBlackBerry::deleteCookie):
(PlatformStrategiesBlackBerry::refreshPlugins):
(PlatformStrategiesBlackBerry::getPluginInfo):
(PlatformStrategiesBlackBerry::isLinkVisited):
(PlatformStrategiesBlackBerry::addVisitedLink):
* WebCoreSupport/PlatformStrategiesBlackBerry.h: Added.
(PlatformStrategiesBlackBerry):

Source/WTF:

* wtf/Platform.h: Add BlackBerry platform to the list of platforms
using platform strategies.

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

19 months ago[Qt] Unreviewed gardening.
zarvai@inf.u-szeged.hu [Tue, 14 May 2013 09:23:19 +0000 (09:23 +0000)]
[Qt] Unreviewed gardening.

* platform/qt/TestExpectations: Skip test using disabled feature.
* platform/qt/http/tests/security/cross-frame-access-put-expected.txt: Rebaselining after r149869.

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

19 months ago[BlackBerry] Crash due to an assert in FrameView::doDeferredRepaints
commit-queue@webkit.org [Tue, 14 May 2013 08:52:57 +0000 (08:52 +0000)]
[BlackBerry] Crash due to an assert in FrameView::doDeferredRepaints
https://bugs.webkit.org/show_bug.cgi?id=115412

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-05-14
Reviewed by Rob Buis.

PR 115412

The problem is that we are calling
updateLayoutAndStyleIfNeededRecursive() (because of
zoomToInitialScaleOnLoad) from ChomeClient::layoutUpdated()
callback which is not expected. It's expected to be called right
before painting, and not right after painting. Even if a new
layout is not done, updateLayoutAndStyleIfNeededRecursive() calls
flushDeferredRepaints() and it's possible that this is called in
the middle of a beginDeferredRepaints() and endDeferredRepaints()
apparently.
In general only BackingStore should call
updateLayoutAndStyleIfNeededRecursive before painting, and a simple
layout is enough in all other cases like resizing. This patch renames
requestLayoutIfNeeded as updateLayoutAndStyleIfNeededRecursive to
make more obvious what it does, and adds layoutIfNeeded that calls
layout. The former is used by the BackingStore and the latter by
WebPage.

* Api/BackingStore.cpp:
(BlackBerry::WebKit::BackingStorePrivate::resumeScreenUpdates):
(BlackBerry::WebKit::BackingStorePrivate::requestLayoutIfNeeded):
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::zoomAboutPoint):
(BlackBerry::WebKit::WebPagePrivate::updateLayoutAndStyleIfNeededRecursive):
(BlackBerry::WebKit::WebPagePrivate::layoutIfNeeded):
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::overflowExceedsContentsSize):
(BlackBerry::WebKit::WebPagePrivate::zoomToInitialScaleOnLoad):
(BlackBerry::WebKit::WebPagePrivate::webContext):
(BlackBerry::WebKit::WebPagePrivate::zoomAnimationFinished):
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPage::setDefaultLayoutSize):
(BlackBerry::WebKit::WebPagePrivate::rootLayerCommitTimerFired):
* Api/WebPage_p.h:
(WebPagePrivate):

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

19 months ago[EFL] Unreviewed EFL gardening
commit-queue@webkit.org [Tue, 14 May 2013 08:49:56 +0000 (08:49 +0000)]
[EFL] Unreviewed EFL gardening
https://bugs.webkit.org/show_bug.cgi?id=116090

Unreviewed EFL gardening.

Rebaseline after r155023.

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2013-05-14

* platform/efl/TestExpectations:
* platform/efl/fast/table/007-expected.png:
* platform/efl/fast/table/007-expected.txt:
* platform/efl/fast/table/colspanMinWidth-expected.png:
* platform/efl/fast/table/colspanMinWidth-expected.txt:
* platform/efl/fast/table/spanOverlapRepaint-expected.png:
* platform/efl/fast/table/spanOverlapRepaint-expected.txt:
* platform/efl/fast/table/table-rowspan-height-distribution-in-rows-expected.txt: Added.
* platform/efl/tables/mozilla/bugs/bug13169-expected.png:
* platform/efl/tables/mozilla/bugs/bug13169-expected.txt: Added.
* platform/efl/tables/mozilla/bugs/bug133756-1-expected.txt:
* platform/efl/tables/mozilla/bugs/bug133756-2-expected.png:
* platform/efl/tables/mozilla/bugs/bug133756-2-expected.txt:
* platform/efl/tables/mozilla/bugs/bug17138-expected.png:
* platform/efl/tables/mozilla/bugs/bug17138-expected.txt:
* platform/efl/tables/mozilla/bugs/bug17548-expected.png:
* platform/efl/tables/mozilla/bugs/bug17548-expected.txt:
* platform/efl/tables/mozilla/bugs/bug220536-expected.png:
* platform/efl/tables/mozilla/bugs/bug220536-expected.txt:
* platform/efl/tables/mozilla/bugs/bug6304-expected.png:
* platform/efl/tables/mozilla/bugs/bug6304-expected.txt:
* platform/efl/tables/mozilla/bugs/bug73321-expected.txt: Renamed from LayoutTests/platform/efl-wk2/tables/mozilla/bugs/bug73321-expected.txt.
* platform/efl/tables/mozilla/bugs/bug7714-expected.txt:
* platform/efl/tables/mozilla/bugs/bug8858-expected.txt:
* platform/efl/tables/mozilla/core/bloomberg-expected.png:
* platform/efl/tables/mozilla/core/bloomberg-expected.txt:
* platform/efl/tables/mozilla/core/cell_heights-expected.txt:
* platform/efl/tables/mozilla/other/test6-expected.png:
* platform/efl/tables/mozilla/other/test6-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug1010-expected.png:
* platform/efl/tables/mozilla_expected_failures/bugs/bug1010-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug131020-3-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug23847-expected.png:
* platform/efl/tables/mozilla_expected_failures/bugs/bug23847-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug58402-2-expected.png:
* platform/efl/tables/mozilla_expected_failures/bugs/bug58402-2-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug65372-expected.png:
* platform/efl/tables/mozilla_expected_failures/bugs/bug65372-expected.txt:
* platform/efl/tables/mozilla_expected_failures/bugs/bug6933-expected.txt:

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

19 months agoThe tests marked with the comment "WebKitTestRunner needs to sanitize file urls in...
commit-queue@webkit.org [Tue, 14 May 2013 08:40:17 +0000 (08:40 +0000)]
The tests marked with the comment "WebKitTestRunner needs to sanitize file urls in the output"
run successfully with WebKitTestRunner.  They should not be skipped.
https://bugs.webkit.org/show_bug.cgi?id=116083

Patch by Alex Christensen <achristensen@apple.com> on 2013-05-14
Reviewed by Darin Adler.

* platform/wk2/TestExpectations:
Unskip tests.

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

19 months ago[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
jocelyn.turcotte@digia.com [Tue, 14 May 2013 08:31:16 +0000 (08:31 +0000)]
[Qt] Fix a crash under ~PingLoader when the QNAM on the page has been destroyed.
https://bugs.webkit.org/show_bug.cgi?id=116035

Reviewed by Simon Hausmann.

Source/WebCore:

Reproduced with arora which does destroy the QNetworkAccessManager in some situations.
The problem is that PingLoader can still be pending meanwhile, holding a ResourceHandle
with a dangling pointer to a QNetworkReply destroyed with the QNetworkAccessManager.

* platform/network/qt/QNetworkReplyHandler.cpp:
(WebCore::QNetworkReplyWrapper::QNetworkReplyWrapper):
  Set the parent to 0 like we did before the introduction of QNetworkReplyWrapper.
(WebCore::QNetworkReplyWrapper::release):

Source/WebKit/qt:

* tests/qwebpage/tst_qwebpage.cpp:
(tst_QWebPage::networkReplyParentChanged):

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

19 months agoMake -[WebNavigationData url] the destination of the navigation
mitz@apple.com [Tue, 14 May 2013 06:52:50 +0000 (06:52 +0000)]
Make -[WebNavigationData url] the destination of the navigation
https://bugs.webkit.org/show_bug.cgi?id=114904

Reviewed by Dave Kilzer.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory): Initialize the WebNavigationData with the
current URL, not the original request URL.

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

19 months ago[Mac] update in-band caption attributes
eric.carlson@apple.com [Tue, 14 May 2013 05:42:07 +0000 (05:42 +0000)]
[Mac] update in-band caption attributes
https://bugs.webkit.org/show_bug.cgi?id=116057

Reviewed by Dean Jackson.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::updateCueFromCueData): Copy highlight color.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties): "highlight" color sets the cue
    background, "background" color sets the cue container background.
* html/track/TextTrackCueGeneric.h:

* platform/graphics/InbandTextTrackPrivateClient.h:

* platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes): Process "highlight" color.

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

19 months agoBUILD FIX (r150049): Fix RetainPtr<> type in PasteboardIOS.mm
ddkilzer@apple.com [Tue, 14 May 2013 04:09:27 +0000 (04:09 +0000)]
BUILD FIX (r150049): Fix RetainPtr<> type in PasteboardIOS.mm

* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::writeImage): Use RetainPtr<CFStringRef>
instead of RetainPtr<NSString>.

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

19 months agoRemove platform/graphic's Generator
benjamin@webkit.org [Tue, 14 May 2013 04:04:36 +0000 (04:04 +0000)]
Remove platform/graphic's Generator
https://bugs.webkit.org/show_bug.cgi?id=116084

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-05-13
Reviewed by Darin Adler.

The Generator no longer abstract anything useful, its only
implementation is Gradient.

* GNUmakefile.list.am:
* WebCore.exp.in:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/GeneratedImage.h:
* platform/graphics/Generator.h: Removed.
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::draw):
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h:
(WebCore::GeneratorGeneratedImage::create):
(WebCore::GeneratorGeneratedImage::GeneratorGeneratedImage):
(GeneratorGeneratedImage):
* platform/graphics/Gradient.h:
(WebCore):
(Gradient):
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::fillRect):
* platform/graphics/GraphicsContext.h:
(WebCore):
(GraphicsContext):

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