WebKit-https.git
8 years agoRevert another erroneous change.
rniwa@webkit.org [Sun, 26 May 2013 04:31:13 +0000 (04:31 +0000)]
Revert another erroneous change.

* Scripts/webkitpy/tool/commands/newcommitbot.py:
(NewCommitBot.next_work_item):

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

8 years agoRevert an erroneous change.
rniwa@webkit.org [Sun, 26 May 2013 04:13:33 +0000 (04:13 +0000)]
Revert an erroneous change.

* Scripts/webkitpy/tool/commands/sheriffbot.py:
(SheriffBot):

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

8 years agoSome build fixes for WKR and webkitbot.
rniwa@webkit.org [Sun, 26 May 2013 03:39:30 +0000 (03:39 +0000)]
Some build fixes for WKR and webkitbot.

* Scripts/webkitpy/tool/bot/ircbot_unittest.py:
(IRCBotTest.test_help):
* Scripts/webkitpy/tool/commands/newcommitbot.py:
(Agent):
(Agent.__init__):
(Agent.name):
(NewCommitBot):
(NewCommitBot.begin_work_queue):
(NewCommitBot.next_work_item):
* Scripts/webkitpy/tool/commands/sheriffbot.py:
(SheriffBot):

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

8 years agoDon't instantiate ChildNodeLists just to get a child count.
akling@apple.com [Sun, 26 May 2013 03:29:12 +0000 (03:29 +0000)]
Don't instantiate ChildNodeLists just to get a child count.
<http://webkit.org/b/116776>

Reviewed by Ryosuke Niwa.

Use ContainerNode::childNodeCount() instead of Node::childNodes()->length().

* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::mergeEndWithNextIfIdentical):

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

8 years agoTeach webkitbot and WKR how to respond to yt?
rniwa@webkit.org [Sun, 26 May 2013 02:57:51 +0000 (02:57 +0000)]
Teach webkitbot and WKR how to respond to yt?
https://bugs.webkit.org/show_bug.cgi?id=116775

Reviewed by Andreas Kling.

* Scripts/webkitpy/tool/bot/irc_command.py:
(Hi): Fixed the usage string.
(Hi.execute): Made it more generic so that it works in WKR.
(YouThere): Added.
(YouThere.execute): Added.
* Scripts/webkitpy/tool/commands/newcommitbot.py:

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

8 years agoPluginDocument::pluginNode() should be pluginElement() instead.
akling@apple.com [Sun, 26 May 2013 02:48:46 +0000 (02:48 +0000)]
PluginDocument::pluginNode() should be pluginElement() instead.
<http://webkit.org/b/116774>

Reviewed by Anders Carlsson.

Source/WebCore:

Make PluginDocument hand out a HTMLPlugInElement* instead of a Node*.

* dom/Document.cpp:
(WebCore::eventTargetNodeForDocument):
* html/PluginDocument.h:
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure):
(WebCore::PluginDocument::pluginWidget):
(WebCore::PluginDocument::setPluginElement):
(WebCore::PluginDocument::detach):

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::focusedPluginViewForFrame):

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

8 years agoRemove Document::getFocusableNodes().
akling@apple.com [Sun, 26 May 2013 02:27:32 +0000 (02:27 +0000)]
Remove Document::getFocusableNodes().
<http://webkit.org/b/116773>

Reviewed by Joseph Pecoraro.

Source/WebCore:

This was added in r42191 and there are no remaining clients of the API.

* dom/Document.cpp:
* dom/Document.h:
* WebCore.exp.in:

Source/WebKit/mac:

Remove the private _focusableNodes API on DOMDocument, it has no clients.

* DOM/WebDOMOperations.mm:
* DOM/WebDOMOperationsPrivate.h:

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

8 years agoTry to fix the EFL build.
simon.fraser@apple.com [Sun, 26 May 2013 02:22:58 +0000 (02:22 +0000)]
Try to fix the EFL build.

* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::setPageVisibility):

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

8 years agoMove Node::focusDelegate() to Element.
akling@apple.com [Sun, 26 May 2013 02:22:04 +0000 (02:22 +0000)]
Move Node::focusDelegate() to Element.
<http://webkit.org/b/116768>

Reviewed by Anders Carlsson.

Only Element can be a focus delegate (it's currently only ever HTMLInputElement actually)
so move Node::focusDelegate() to Element. Sprinkled isElementNode() checks as needed.

* dom/Node.cpp:
* dom/Node.h:
* dom/Element.h:
* dom/Element.cpp:
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::focusDelegate):
* html/shadow/SliderThumbElement.h:
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isFocused):
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintSliderThumb):

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

8 years agoPath: clean up addPathForRoundedRect()
commit-queue@webkit.org [Sun, 26 May 2013 00:51:00 +0000 (00:51 +0000)]
Path: clean up addPathForRoundedRect()
https://bugs.webkit.org/show_bug.cgi?id=116765

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-05-25
Reviewed by Andreas Kling.

Reorganize code that is a bit redundant.

No new tests, no behavior change.

* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):

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

8 years agoUnprefix Page Visibility API
simon.fraser@apple.com [Sat, 25 May 2013 23:56:01 +0000 (23:56 +0000)]
Unprefix Page Visibility API
https://bugs.webkit.org/show_bug.cgi?id=102340

Source/WebCore:

Reviewed by Tim Horton.

Remove prefixes from the document properties, and the visibilitychanged event.

Rename the "preview" state to "unloaded". The "unloaded" state is never
reached yet (see https://bugs.webkit.org/show_bug.cgi?id=116769).

Add some comments to places where we should update the visibility state
when going in and out of the page cache, but cannot safely do so yet.

Tested by existing Page Visibility tests.

* dom/Document.cpp:
(WebCore::Document::pageVisibilityState):
(WebCore::Document::visibilityState):
(WebCore::Document::hidden):
(WebCore::Document::dispatchVisibilityStateChangeEvent):
* dom/Document.h:
* dom/Document.idl:
* dom/EventNames.h:
* history/CachedFrame.cpp:
(WebCore::CachedFrameBase::restore):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::stopLoading):
* page/Page.cpp:
(WebCore::Page::setVisibilityState):
* page/PageVisibilityState.cpp:
(WebCore::pageVisibilityStateString):
* page/PageVisibilityState.h:

Source/WebKit/efl:

Reviewed by Tim Horton.

Rename "preview" state to "unloaded" state.

* WebCoreSupport/AssertMatchingEnums.cpp:
* ewk/ewk_view.h:

Source/WebKit/mac:

Reviewed by Tim Horton.

Renaming of the "preview" state to "unloaded".

* WebView/WebView.mm:
* WebView/WebViewPrivate.h:

Source/WebKit2:

Reviewed by Tim Horton.

Renaming of the "preview" state to "unloaded".

* Shared/API/c/WKPageVisibilityTypes.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toPageVisibilityState):

Tools:

Reviewed by Tim Horton.

Rename "preview" state to "unloaded" state, and adjust the tests
to test for it.

* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setPageVisibility):
* TestWebKitAPI/Tests/WebKit2/PageVisibilityState.cpp:
(TestWebKitAPI::setPageVisibilityStateWithEvalContinuation):
(TestWebKitAPI::didRunStep2StateChangeHiddenToPrerender):
(TestWebKitAPI::didRunStep3StateChangePrerenderToUnloaded):
(TestWebKitAPI::didRunStep4InStateUnloaded):
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.html:
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPageVisibility):

LayoutTests:

Reviewed by Tim Horton.

Remove prefixes, adjust to state name changes.

* fast/events/page-visibility-iframe-delete-test.html:
* fast/events/page-visibility-iframe-move-test-expected.txt:
* fast/events/page-visibility-iframe-move-test.html:
* fast/events/page-visibility-iframe-propagation-test-expected.txt:
* fast/events/page-visibility-iframe-propagation-test.html:
* fast/events/page-visibility-null-view-expected.txt:
* fast/events/page-visibility-null-view.html:
* fast/events/page-visibility-transition-test-expected.txt:
* fast/events/page-visibility-transition-test.html:

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

8 years agoWe broke (-2^31/-1)|0 in the DFG
fpizlo@apple.com [Sat, 25 May 2013 23:31:20 +0000 (23:31 +0000)]
We broke (-2^31/-1)|0 in the DFG
https://bugs.webkit.org/show_bug.cgi?id=116767

Source/JavaScriptCore:

Reviewed by Andreas Kling.

The bug is that we were assuming that in the -2^31 case, we already had -2^31
in the result register. This was a wrong assumption.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileIntegerArithDivForX86):

LayoutTests:

Reviewed by Andreas Kling.

* fast/js/dfg-div-by-neg1-and-then-or-zero-interesting-reg-alloc-expected.txt: Added.
* fast/js/dfg-div-by-neg1-and-then-or-zero-interesting-reg-alloc.html: Added.
* fast/js/dfg-div-by-zero-and-then-or-zero-interesting-reg-alloc-expected.txt: Added.
* fast/js/dfg-div-by-zero-and-then-or-zero-interesting-reg-alloc.html: Added.
* fast/js/dfg-div-neg2tothe31-by-one-and-then-or-zero-with-interesting-reg-alloc-expected.txt: Added.
* fast/js/dfg-div-neg2tothe31-by-one-and-then-or-zero-with-interesting-reg-alloc.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/dfg-div-by-neg1-and-then-or-zero-interesting-reg-alloc.js: Added.
(foo):
* fast/js/script-tests/dfg-div-by-zero-and-then-or-zero-interesting-reg-alloc.js: Added.
(foo):
* fast/js/script-tests/dfg-div-neg2tothe31-by-one-and-then-or-zero-with-interesting-reg-alloc.js: Added.
(foo):

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

8 years agoUpdated expected results after r150688.
mitz@apple.com [Sat, 25 May 2013 23:13:15 +0000 (23:13 +0000)]
Updated expected results after r150688.

Reviewed by Andreas Kling.

* http/tests/globalhistory/history-delegate-basic-refresh-redirect-expected.txt: Now shows
the URL that performed the client redirect, as expected.

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

8 years agoMove Node::isMouseFocusable() to Element.
akling@apple.com [Sat, 25 May 2013 23:09:29 +0000 (23:09 +0000)]
Move Node::isMouseFocusable() to Element.
<http://webkit.org/b/116762>

Reviewed by Anders Carlsson.

Source/WebCore:

Node::isMouseFocusable() would just return isFocusable(), which is never true for a non-Element
since Node::supportsFocus() always returns false. So move it to Element!

* dom/Node.h:
* dom/Node.cpp:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isMouseFocusable):

    Moved here from Node.

* editing/FrameSelection.cpp:
(WebCore::FrameSelection::setFocusedNodeIfNeeded):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):

    Walk up the parent chain with parentOrShadowHostElement() instead of parentOrShadowHostNode().
    Removed a misleading no-op hunk about mouse-focusable ShadowRoots, since ShadowRoots are not
    Elements and thus cannot be mouse-focusable.

* page/TouchAdjustment.cpp:
(WebCore::TouchAdjustment::nodeRespondsToTapGesture):

    Check that the Node is an Element before asking if it's mouse-focusable.

* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLInputElement.h:
* html/HTMLMediaElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.h:
* html/shadow/ClearButtonElement.h:
* html/shadow/TextControlInnerElements.h:
* svg/SVGAElement.h:
* svg/SVGStyledElement.h:

    Sprinkle OVERRIDE.

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::highlightPotentialActivation):

    Check that the potentially activated Node is an Element before asking if it's mouse-focusable.

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

8 years agoREGRESSION: WebProcess is terminated when all Safari windows are closed.
akling@apple.com [Sat, 25 May 2013 21:34:26 +0000 (21:34 +0000)]
REGRESSION: WebProcess is terminated when all Safari windows are closed.
<rdar://problem/13990901>
<http://webkit.org/b/116766>

Reviewed by Alexey Proskuryakov.

When closing the last page, only disconnect the web process if we're using a network process.
Otherwise there might be session state in the web process getting lost.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):

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

8 years agoWebFrameProxy::didFailLoad clears frame title for no apparent reason
commit-queue@webkit.org [Sat, 25 May 2013 18:35:45 +0000 (18:35 +0000)]
WebFrameProxy::didFailLoad clears frame title for no apparent reason
https://bugs.webkit.org/show_bug.cgi?id=116655

Patch by Santosh Mahto <santosh.ma@samsung.com> on 2013-05-25
Reviewed by Alexey Proskuryakov.

* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didFailLoad):

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

8 years ago<rdar://problem/13924889> -webView:didPerformClientRedirectFromURL:toURL:inFrame...
mitz@apple.com [Sat, 25 May 2013 17:57:19 +0000 (17:57 +0000)]
<rdar://problem/13924889> -webView:didPerformClientRedirectFromURL:toURL:inFrame: should be given the redirecting URL as the “from” URL
https://bugs.webkit.org/show_bug.cgi?id=116733

Reviewed by Adele Peterson.

By the time the history controller calls updateGlobalHistoryRedirectLinks(), the document
loader already reflects the destination URL. In order to be able to provide the immediate
source URL to the delegate, we make WebFrame track a URL and provisional URL, updating them
in response to FrameLoader callbacks in exactly the same way WebFrameProxy maintains its
m_url and m_provisionalURL member variables.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Update
provisionalURL.
(WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Update url.
(WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
(WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
(WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
(WebFrameLoaderClient::dispatchDidStartProvisionalLoad): Update provisionalURL.
(WebFrameLoaderClient::dispatchDidCommitLoad): Update URL and provisionalURL.
(WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Clear provisionalURL.
(WebFrameLoaderClient::dispatchDidFailLoad): Added an assertion.
(WebFrameLoaderClient::dispatchDidFinishLoad): Ditto.
(WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): Pass the last committed URL as the
source, rather than clientRedirectSourceForHistory().
* WebView/WebFrameInternal.h: Added url and provisionalURL ivars to WebFramePrivate.

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

8 years agoMove Node::isKeyboardFocusable() to Element.
akling@apple.com [Sat, 25 May 2013 12:02:35 +0000 (12:02 +0000)]
Move Node::isKeyboardFocusable() to Element.
<http://webkit.org/b/116761>

Reviewed by Antti Koivisto.

Only Elements can be keyboard-focusable. Move the base isKeyboardFocusable() implementation to Element
and sprinkle OVERRIDE on subclass overrides.
FocusController gets some temporary type checks that will go away as that code moves to dealing in
Elements instead of Node.

* dom/Node.h:
* dom/Node.cpp:
* dom/Element.h:
* dom/Element.cpp:
(WebCore::Element::isKeyboardFocusable):

    Move isKeyboardFocusable() from Node to Element.

* page/FocusController.cpp:
(WebCore::isNonFocusableShadowHost):
(WebCore::isFocusableShadowHost):
(WebCore::shouldVisit):
(WebCore::FocusController::advanceFocusInDocumentOrder):

    Check that the inspected Node is an Element before querying isKeyboardFocusable().

* html/HTMLAnchorElement.h:
* html/HTMLAreaElement.h:
* html/HTMLFormControlElement.h:
* html/HTMLFrameOwnerElement.h:
* html/HTMLInputElement.h:
* html/HTMLPlugInElement.h:
* html/HTMLSelectElement.h:
* html/HTMLTextAreaElement.h:
* svg/SVGAElement.h:
* svg/SVGStyledElement.h:

    Sprinkle OVERRIDE.

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

8 years agoBegin moving "focus" state logic from Node to Element.
akling@apple.com [Sat, 25 May 2013 10:27:37 +0000 (10:27 +0000)]
Begin moving "focus" state logic from Node to Element.
<http://webkit.org/b/116760>

Reviewed by Antti Koivisto.

Only Elements can be focused, so merge the "focus" state logic from Node and ContainerNode
and move it into Element. There's a lot more iceberg under this tip, but we'll be starting
with setFocus(bool) and focused().

* dom/Node.h:
* dom/ContainerNode.cpp:
* dom/ContainerNode.h:
* dom/Element.cpp:
(WebCore::Element::isUserActionElementFocused):
(WebCore::Element::setFocus):
* dom/Element.h:
(WebCore::Element::focused):
* dom/Node.cpp:

    Move focused() and setFocus(bool) from Node/ContainerNode to Element.

* dom/Document.cpp:
(WebCore::Document::setFocusedNode):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchMouseEvent):

    Check if the inspected Node is an Element before asking if it's focused.

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

8 years agoDirect pattern compositing breaks when no-repeat is set on a large layer
noam.rosenthal@nokia.com [Sat, 25 May 2013 09:51:25 +0000 (09:51 +0000)]
Direct pattern compositing breaks when no-repeat is set on a large layer
https://bugs.webkit.org/show_bug.cgi?id=116140

Source/WebCore:

Reviewed by Antti Koivisto.

In some cases the directly composited background color logic overrides the layer's
contentsRect, which results in wrong rendering of tiled images.
This patch makes sure that the background image is applied after the solid color,
which ensures the correct contentsRect.

Test: compositing/patterns/direct-pattern-compositing-contain-no-repeat.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):

LayoutTests:

Added a ref-test to make sure that direct pattern compositing works well with no-repeat
in a particular geometry.

Reviewed by Antti Koivisto.

* compositing/patterns/direct-pattern-compositing-contain-no-repeat-expected.html: Added.
* compositing/patterns/direct-pattern-compositing-contain-no-repeat.html: Added.

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

8 years agoMove "hover" state logic from Node to Element.
akling@apple.com [Sat, 25 May 2013 09:16:30 +0000 (09:16 +0000)]
Move "hover" state logic from Node to Element.
<http://webkit.org/b/116757>

Reviewed by Antti Koivisto.

Resolve a 7 year old FIXME by merging the "hover" state logic from Node and ContainerNode
and moving it all to Element instead.

* dom/Node.cpp:
(WebCore::Node::detach):
* dom/Element.cpp:
(WebCore::Element::detach):

    Move Document::hoveredNodeDetached() call from Node::detach() to Element::detach().

(WebCore::Element::isUserActionElementHovered):
(WebCore::Element::setHovered):
* dom/Element.h:
(WebCore::Element::hovered):

    Moved here from Node/ContainerNode.

* dom/UserActionElementSet.h:
(WebCore::UserActionElementSet::setHovered):
(WebCore::UserActionElementSet::setFlags):

    Make setHovered() take an Element* instead of a Node*. I'd like to do this will all
    of these methods eventually, so added a setFlags() helper with the tighter type.

* html/HTMLLabelElement.h:
* html/shadow/SpinButtonElement.h:

    Sprinkle OVERRIDE on setHovered() overrides.

* dom/Document.cpp:
(WebCore::Document::updateHoverActiveState):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::isHovered):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::isHovered):

    Check if the inspected Node is an element before asking if it's hovered.

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

8 years agoDocument::formController() should return a reference.
akling@apple.com [Sat, 25 May 2013 09:08:38 +0000 (09:08 +0000)]
Document::formController() should return a reference.
<http://webkit.org/b/116758>

Reviewed by Antti Koivisto.

The formController() is created on demand, so return a reference instead.

* dom/Document.h:
* dom/Document.cpp:
(WebCore::Document::formController):
(WebCore::Document::setStateForNewFormElements):
* html/HTMLFormControlElementWithState.cpp:
(WebCore::HTMLFormControlElementWithState::HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::~HTMLFormControlElementWithState):
(WebCore::HTMLFormControlElementWithState::didMoveToNewDocument):
(WebCore::HTMLFormControlElementWithState::finishParsingChildren):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::~HTMLFormElement):
(WebCore::HTMLFormElement::finishParsingChildren):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::~HTMLInputElement):
(WebCore::HTMLInputElement::didMoveToNewDocument):
(WebCore::HTMLInputElement::checkedRadioButtons):

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

8 years agoReducing CSS code duplication in declaration list error recovery
sergio@webkit.org [Sat, 25 May 2013 08:29:42 +0000 (08:29 +0000)]
Reducing CSS code duplication in declaration list error recovery
https://bugs.webkit.org/show_bug.cgi?id=115157

Reviewed by Andreas Kling.

From Blink r148974 by <serya@chromium.org>

Refactor "invalid_block_list error | /* empty */" in a new
decl_list_recovery rule that allows to remove 4 redundant rules.

No new test required as we're just refactoring code, no new behaviour.

* css/CSSGrammar.y.in:

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

8 years ago[Qt][GTK] Build fix after r150669
commit-queue@webkit.org [Sat, 25 May 2013 04:20:37 +0000 (04:20 +0000)]
[Qt][GTK] Build fix after r150669
https://bugs.webkit.org/show_bug.cgi?id=116751

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-05-24
Reviewed by Christophe Dumez.

* GNUmakefile.list.am:
* Target.pri:
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::getEditorCommandsForKeyEvent):

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

8 years ago[EFL] Remove obsolete Page forward declaration from InspectorClientEfl.h
commit-queue@webkit.org [Sat, 25 May 2013 04:01:55 +0000 (04:01 +0000)]
[EFL] Remove obsolete Page forward declaration from InspectorClientEfl.h
https://bugs.webkit.org/show_bug.cgi?id=116752

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-05-24
Reviewed by Christophe Dumez.

* WebCoreSupport/InspectorClientEfl.h:

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

8 years ago[EFL] Build fix after r150669
commit-queue@webkit.org [Sat, 25 May 2013 02:19:12 +0000 (02:19 +0000)]
[EFL] Build fix after r150669
https://bugs.webkit.org/show_bug.cgi?id=116750

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-05-24
Reviewed by Anders Carlsson.

* CMakeLists.txt:
* WebProcess/Battery/WebBatteryManager.cpp:
(WebKit::WebBatteryManager::registerWebPage):
(WebKit::WebBatteryManager::unregisterWebPage):
* WebProcess/NetworkInfo/WebNetworkInfoManager.cpp:
(WebKit::WebNetworkInfoManager::registerWebPage):
(WebKit::WebNetworkInfoManager::unregisterWebPage):
(WebKit::WebNetworkInfoManager::bandwidth):
(WebKit::WebNetworkInfoManager::metered):
* WebProcess/WebCoreSupport/WebVibrationClient.cpp:
(WebKit::WebVibrationClient::vibrate):
(WebKit::WebVibrationClient::cancelVibration):
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::didReceiveURIRequestData):
(WebKit::WebSoupRequestManager::send):

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

8 years agoUnreviewed change to get Windows bots green. Disable a number
bfulgham@apple.com [Sat, 25 May 2013 01:28:01 +0000 (01:28 +0000)]
Unreviewed change to get Windows bots green.  Disable a number
of crashes and failures.  Crashes are tracked under
https://bugs.webkit.org/show_bug.cgi?id=116562, failures under
https://bugs.webkit.org/show_bug.cgi?id=116564.

* platform/win/TestExpectations:

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

8 years agoUnreviewed build fix. Don't use new NRWT logic needed
bfulgham@apple.com [Sat, 25 May 2013 01:18:56 +0000 (01:18 +0000)]
Unreviewed build fix. Don't use new NRWT logic needed
by Windows yet. Activate (and fix test) when we cut over.

* Scripts/webkitpy/port/driver.py:
(Driver._setup_environ_for_driver):
(Driver._start):

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

8 years agoInline TCMalloc_Central_FreeList's RemoveRange and FetchFromSpansSafe
benjamin@webkit.org [Sat, 25 May 2013 01:12:22 +0000 (01:12 +0000)]
Inline TCMalloc_Central_FreeList's RemoveRange and FetchFromSpansSafe
https://bugs.webkit.org/show_bug.cgi?id=116700

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

The two functions only have one call site each.

* wtf/FastMalloc.cpp:
(WTF::TCMalloc_Central_FreeList::RemoveRange):
(WTF::TCMalloc_Central_FreeList::FetchFromSpansSafe):

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

8 years agoBuild fix after r150664.
rniwa@webkit.org [Sat, 25 May 2013 01:02:48 +0000 (01:02 +0000)]
Build fix after r150664.

* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore):

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

8 years agoFixing invalid block recovery in some declaration list.
commit-queue@webkit.org [Sat, 25 May 2013 00:49:39 +0000 (00:49 +0000)]
Fixing invalid block recovery in some declaration list.
https://bugs.webkit.org/show_bug.cgi?id=115159

Patch by Sergio Villar Senin <svillar@igalia.com> on 2013-05-24
Reviewed by Darin Adler.

From Blink r148889 by <serya@chromium.org>

Source/WebCore:

Improves the detection of some invalid block declarations inside a
declaration list. This allows the parser not to completely discard
a whole declaration list that contains an invalid block. In
particular grammar failed in tests 8, 12, 13, 15, 16 and 17 in the
new test added by this change.

Test: fast/css/parsing-invalid-block-recovery.html

* css/CSSGrammar.y.in:

LayoutTests:

* fast/css/parsing-invalid-block-recovery-expected.txt: Added.
* fast/css/parsing-invalid-block-recovery.html: Added.

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

8 years agoDidFirstFlushForHeaderLayer can be called too soon on pages that redirect
bdakin@apple.com [Sat, 25 May 2013 00:48:37 +0000 (00:48 +0000)]
DidFirstFlushForHeaderLayer can be called too soon on pages that redirect
https://bugs.webkit.org/show_bug.cgi?id=116749
-and corresponding-
<rdar://problem/13886753>

Reviewed by Simon Fraser.

Only start m_paintRelatedMilestonesTimer if we have actually painted.
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

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

8 years ago[Windows] Expose database storage and cache locations via preferences.
bfulgham@apple.com [Sat, 25 May 2013 00:19:40 +0000 (00:19 +0000)]
[Windows] Expose database storage and cache locations via preferences.
https://bugs.webkit.org/show_bug.cgi?id=116729

Reviewed by Tim Horton.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in: Export
three symbols needed to implement the feature.

Source/WebKit/win:

* WebDatabaseManager.cpp: Update to check preferences for the
desired location of the database store.
(databasesDirectory): Added.
(WebKitInitializeWebDatabasesIfNecessary): Use new databasesDirectory
method to determine what system path to use for file storage.
* WebKit.vcproj/WebKitExports.def.in: Export three symbols
needed to implement the feature.
* WebView.cpp: Update to check preferences for the desired location
of the various caches used by WebKit.
(WebView::setCacheModel): Update to check preferences for URL cache
storage.
(WebKitSetApplicationCachePathIfNecessary): Update to check
preferences for ccache storage.

Tools:

Update DumpRenderTree to use CFPreferences to control where WebKit
stores its local databases, URL caches, etc.

* DumpRenderTree/win/DumpRenderTree.cpp:
(libraryPathForDumpRenderTree): Added.
(dllLauncherEntryPoint): Set up DRT-specific cache locations.
* Scripts/webkitpy/port/base.py:
(Port._driver_tempdir): Added (to allow port-specific overload).
(Port._driver_tempdir_for_environment): Ditto
* Scripts/webkitpy/port/driver.py:
(Driver._setup_environ_for_driver): Use new overload to set
environment variable.
(Driver._start): Use new overload for temp directory location.
* Scripts/webkitpy/port/win.py:
(WinPort._driver_tempdir_for_environment): New overload to supply
Windows path to DumpRenderTree environment (while still using
cygwin paths for internal operations.

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

8 years agoMessageSender shouldn't be a class template
andersca@apple.com [Sat, 25 May 2013 00:17:20 +0000 (00:17 +0000)]
MessageSender shouldn't be a class template
https://bugs.webkit.org/show_bug.cgi?id=116743

Reviewed by Andreas Kling.

Change MessageSender to be a proper abstract base class. Subclasses of MessageSender must
implement messageSenderConnection() as well as messageSenderDestinationID().

This reduces code size and will allow us to be more flexible with MessageSender in the future.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):
(WebKit::NetworkResourceLoader::messageSenderConnection):
(WebKit):
(WebKit::NetworkResourceLoader::messageSenderDestinationID):
* NetworkProcess/NetworkResourceLoader.h:
(NetworkResourceLoader):
* NetworkProcess/mac/DiskCacheMonitor.h:
(DiskCacheMonitor):
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::messageSenderConnection):
(WebKit::DiskCacheMonitor::messageSenderDestinationID):
(WebKit):
* Platform/CoreIPC/MessageSender.h:
(CoreIPC):
(MessageSender):
(CoreIPC::MessageSender::send):
(CoreIPC::MessageSender::sendSync):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::messageSenderConnection):
(WebKit):
(WebKit::ChildProcess::messageSenderDestinationID):
* Shared/ChildProcess.h:
(ChildProcess):
* Shared/Downloads/Download.cpp:
(WebKit::Download::messageSenderConnection):
(WebKit):
(WebKit::Download::messageSenderDestinationID):
* Shared/Downloads/Download.h:
(Download):
* Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm:
(WebKit::CustomProtocolManager::initialize):
* Shared/WebConnection.h:
(WebConnection):
* Shared/mac/SecItemShim.cpp:
(WebKit::sendSecItemRequest):
* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::hasValidConnection):
(WebKit::WebConnectionToWebProcess::messageSenderConnection):
(WebKit::WebConnectionToWebProcess::messageSenderDestinationID):
* UIProcess/WebConnectionToWebProcess.h:
(WebConnectionToWebProcess):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::registerWebPage):
(WebKit::WebGeolocationManager::unregisterWebPage):
* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
(WebKit::WebIconDatabaseProxy::retainIconForPageURL):
(WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
(WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
(WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
(WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
(WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::postMessage):
(WebKit::InjectedBundle::postSynchronousMessage):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::messageSenderConnection):
(WebKit::WebResourceLoader::messageSenderDestinationID):
* WebProcess/Network/WebResourceLoader.h:
(WebResourceLoader):
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show):
(WebKit::WebNotificationManager::cancel):
(WebKit::WebNotificationManager::clearNotifications):
(WebKit::WebNotificationManager::didDestroyNotification):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::writeItemsToPasteboard):
* WebProcess/Plugins/PluginProcessConnectionManager.cpp:
(WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
* WebProcess/Storage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::~StorageAreaMap):
(WebKit::StorageAreaMap::setItem):
(WebKit::StorageAreaMap::removeItem):
(WebKit::StorageAreaMap::clear):
(WebKit::StorageAreaMap::loadValuesIfNeeded):
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::hasValidConnection):
(WebKit::WebConnectionToUIProcess::messageSenderConnection):
(WebKit::WebConnectionToUIProcess::messageSenderDestinationID):
* WebProcess/WebConnectionToUIProcess.h:
(WebConnectionToUIProcess):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::windowRect):
(WebKit::WebChromeClient::focusedFrameChanged):
(WebKit::WebChromeClient::createWindow):
(WebKit::WebChromeClient::toolbarsVisible):
(WebKit::WebChromeClient::statusbarVisible):
(WebKit::WebChromeClient::menubarVisible):
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::shouldInterruptJavaScript):
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebColorChooser.cpp:
(WebKit::WebColorChooser::WebColorChooser):
(WebKit::WebColorChooser::setSelectedColor):
(WebKit::WebColorChooser::endChooser):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidReceiveIcon):
(WebKit::WebFrameLoaderClient::updateGlobalHistory):
(WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
(WebKit::WebFrameLoaderClient::setTitle):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::populatePluginCache):
(WebKit::WebPlatformStrategies::getTypes):
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::getPathnamesForType):
(WebKit::WebPlatformStrategies::stringForType):
(WebKit::WebPlatformStrategies::copy):
(WebKit::WebPlatformStrategies::changeCount):
(WebKit::WebPlatformStrategies::uniqueName):
(WebKit::WebPlatformStrategies::color):
(WebKit::WebPlatformStrategies::url):
(WebKit::WebPlatformStrategies::addTypes):
(WebKit::WebPlatformStrategies::setTypes):
(WebKit::WebPlatformStrategies::setBufferForType):
(WebKit::WebPlatformStrategies::setPathnamesForType):
(WebKit::WebPlatformStrategies::setStringForType):
* WebProcess/WebCoreSupport/WebPopupMenu.cpp:
(WebKit::WebPopupMenu::show):
(WebKit::WebPopupMenu::hide):
* WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
(WebKit::WebSearchPopupMenu::saveRecentSearches):
(WebKit::WebSearchPopupMenu::loadRecentSearches):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::sendDidReceiveEvent):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):
(WebKit::WebBackForwardListProxy::itemAtIndex):
(WebKit::WebBackForwardListProxy::backListCount):
(WebKit::WebBackForwardListProxy::forwardListCount):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::createInspectorPage):
(WebKit::WebInspector::didClose):
(WebKit::WebInspector::bringToFront):
(WebKit::WebInspector::inspectedURLChanged):
(WebKit::WebInspector::save):
(WebKit::WebInspector::append):
(WebKit::WebInspector::attachBottom):
(WebKit::WebInspector::attachRight):
(WebKit::WebInspector::detach):
(WebKit::WebInspector::setAttachedWindowHeight):
(WebKit::WebInspector::setAttachedWindowWidth):
(WebKit::WebInspector::setToolbarHeight):
(WebKit::WebInspector::updateDockingAvailability):
(WebKit::WebInspector::sendMessageToRemoteFrontend):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::messageSenderConnection):
(WebKit):
(WebKit::WebPage::messageSenderDestinationID):
* WebProcess/WebPage/WebPage.h:
(WebPage):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::executeKeypressCommandsInternal):
(WebKit::WebPage::handleEditingKeyboardEvent):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::shouldTerminate):

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

8 years agoRemove using namespace std from Mac WebKit1
andersca@apple.com [Fri, 24 May 2013 23:52:21 +0000 (23:52 +0000)]
Remove using namespace std from Mac WebKit1
https://bugs.webkit.org/show_bug.cgi?id=116747

Reviewed by Sam Weinig.

Use explicit std:: qualifiers instead.

* History/BinaryPropertyList.cpp:
(IntegerArray::deletedValueSize):
(BinaryPropertyListPlan::invalidObjectReference):
(bytesNeeded):
* History/WebHistory.mm:
(-[WebHistoryPrivate orderedLastVisitedDays]):
(WebHistoryWriter::WebHistoryWriter):
* History/WebHistoryItem.mm:
(-[WebHistoryItem initFromDictionaryRepresentation:]):
* Plugins/Hosted/NetscapePluginHostManager.mm:
(WebKit::NetscapePluginHostManager::instantiatePlugin):
* Plugins/Hosted/NetscapePluginHostProxy.mm:
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject):
(WebKit::NetscapePluginInstanceProxy::wheelEvent):
(WebKit::NetscapePluginInstanceProxy::print):
(WebKit::NetscapePluginInstanceProxy::snapshot):
(WebKit::NetscapePluginInstanceProxy::loadURL):
(WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::invoke):
(WebKit::ProxyInstance::supportsInvokeDefaultMethod):
(WebKit::ProxyInstance::supportsConstruct):
(WebKit::ProxyInstance::getPropertyNames):
(WebKit::ProxyInstance::methodNamed):
(WebKit::ProxyInstance::fieldNamed):
(WebKit::ProxyInstance::fieldValue):
(WebKit::ProxyInstance::setFieldValue):
* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage supportsExtension:]):
(-[WebBasePluginPackage MIMETypeForExtension:]):
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::deliverData):
* Plugins/WebNetscapePluginView.mm:
(PluginTimer::start):
(-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebFrame.mm:
* WebView/WebHTMLView.mm:
(-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
* WebView/WebTextCompletionController.mm:
(-[WebTextCompletionController _placePopupWindow:]):

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

8 years agoFix Windows build.
andersca@apple.com [Fri, 24 May 2013 23:46:04 +0000 (23:46 +0000)]
Fix Windows build.

* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:

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

8 years agoAnimated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
timothy_horton@apple.com [Fri, 24 May 2013 23:37:12 +0000 (23:37 +0000)]
Animated GIFs don't repaint after TiledCoreAnimationDrawingArea un-suspends painting
https://bugs.webkit.org/show_bug.cgi?id=116744
<rdar://problem/13973514>

Reviewed by Simon Fraser.

* WebCore.exp.in: Export FrameView::resumeAnimatingImages.
* page/FrameView.cpp:
(WebCore::FrameView::setIsInWindow):
(WebCore::FrameView::resumeAnimatingImages):
Factor the code to restart animated images out of frameView::setIsInWindow.

* page/FrameView.h:
(FrameView):

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::resumePainting):
Force WebCore to repaint animated images when painting is resumed.

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

8 years agoMove history property list writer to WebKit
andersca@apple.com [Fri, 24 May 2013 23:30:36 +0000 (23:30 +0000)]
Move history property list writer to WebKit
https://bugs.webkit.org/show_bug.cgi?id=116746

Reviewed by Tim Horton.

Source/WebCore:

Remove files from the Xcode project and remove symbols that now live in WebKit.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

Source/WebKit:

Add files to the Xcode project.

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Move WebCore history files to WebKit since they're only used by WebKit now.

* History/BinaryPropertyList.cpp: Renamed from Source/WebCore/platform/cf/BinaryPropertyList.cpp.
* History/BinaryPropertyList.h: Renamed from Source/WebCore/platform/cf/BinaryPropertyList.h.
* History/HistoryPropertyList.cpp: Renamed from Source/WebCore/history/cf/HistoryPropertyList.cpp.
* History/HistoryPropertyList.h: Renamed from Source/WebCore/history/cf/HistoryPropertyList.h.
* History/WebHistory.mm:

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

8 years agoGlobal constructors exposed in worker environment have wrong attributes
ch.dumez@sisa.samsung.com [Fri, 24 May 2013 23:15:47 +0000 (23:15 +0000)]
Global constructors exposed in worker environment have wrong attributes
https://bugs.webkit.org/show_bug.cgi?id=116708

Reviewed by Geoffrey Garen.

Source/WebCore:

Fix JSC bindings generator so that Global constructors exposed in worker environment
have the following attributes:
{ [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true }

This is now consistent with global constructors on DOMWindow and with the Web IDL
specification:
http://dev.w3.org/2006/webapi/WebIDL/#es-interfaces

Test: fast/js/global-constructors-attributes-worker.html

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateAttributesHashTable):

LayoutTests:

Add fast/js/global-constructors-attributes-worker.html test case to check the
global constructors attributers in the worker environment.

* fast/js/global-constructors-attributes-expected.txt:
* fast/js/global-constructors-attributes-worker-expected.txt: Added.
* fast/js/global-constructors-attributes-worker.html: Added.
* fast/js/global-constructors-attributes.html:
* fast/js/script-tests/global-constructors-attributes.js: Make sure script usable
in a Worker and stop reporting the "constructor" property as a global constructor.
* platform/efl/fast/js/global-constructors-attributes-expected.txt:
* platform/efl/fast/js/global-constructors-attributes-worker-expected.txt: Added.
* platform/gtk/fast/js/global-constructors-attributes-expected.txt:
* platform/mac-lion/fast/js/global-constructors-attributes-expected.txt:
* platform/qt/fast/js/global-constructors-attributes-expected.txt:

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

8 years agoRemove custom code for webkitAudioContext global constructor getter
ch.dumez@sisa.samsung.com [Fri, 24 May 2013 22:57:29 +0000 (22:57 +0000)]
Remove custom code for webkitAudioContext global constructor getter
https://bugs.webkit.org/show_bug.cgi?id=116530

Reviewed by Geoffrey Garen.

Source/WebCore:

Get rid of custom code for webkitAudioContext global constructor getter. The
global DOMWindow attribute is now automatically generated by leveraging support
for [EnabledAtRuntime] extended attribute and the existing methods in
RuntimeEnabledFeatures class.

No new tests, no behavior change.

* GNUmakefile.list.am: Remove JSDOMWindowWebAudioCustom.*.
* Modules/webaudio/AudioContext.idl:
Remove [NoInterfaceObject] extended attribute so that the global constructor is
automatically generated instead of automatically added. Add [EnabledAtRuntime]
extended attribute since this global constructor can be disabled at runtime and
so that we can getter rid of the [CustomGetter] for the corresponding global
constructor. Use [InterfaceName] extended attribute so that the interface name
matches the global constructor on DOMWindow (webkitAudioContext).

* Target.pri: Remove JSDOMWindowWebAudioCustom.*.
* UseJSC.cmake: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.exp.in: Export additional symbol.
* WebCore.order: Export additional symbol.
* WebCore.vcproj/WebCore.vcproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.vcxproj/WebCore.vcxproj.filters: Remove JSDOMWindowWebAudioCustom.*.
* WebCore.xcodeproj/project.pbxproj: Remove JSDOMWindowWebAudioCustom.*.
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAudioEnabled):
* bindings/js/JSBindingsAllInOne.cpp: Remove JSDOMWindowWebAudioCustom.*.
* bindings/js/JSDOMWindowWebAudioCustom.cpp: Removed. We no longer need any custom code for
the WebAudio global constructor getter because we use [EnabledAtRuntime] support in the
bindings generator now.
* page/DOMWindow.idl: Remove global constructor for AudioContext as it is now automatically
generated.
* page/Settings.in: Remove webAudioEnabled setting as we use the existing setting
in RuntimeEnabledFeatures now.

Source/WebKit/efl:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setWebAudioEnabled):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* ewk/ewk_view.cpp:
(_Ewk_View_Private_Data):
(_ewk_view_priv_new):
* ewk/ewk_view.h: Remove public API to toggle Web Audio support as it is no longer
a view specific feature.

Source/WebKit/gtk:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* webkit/webkitwebview.cpp:
(webkit_web_view_update_settings):
(webkit_web_view_settings_notify):

Source/WebKit/mac:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/qt:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* Api/qwebsettings.cpp:
(QWebSettingsPrivate::apply):

Source/WebKit/win:

Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.

* WebView.cpp:
(WebView::notifyPreferencesChanged):

Source/WebKit2:

Use RuntimeEnabledFeatures instead of WebCore Settings to toggle Web Audio support.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Update EFL's DumpRenderTree to use DumpRenderTreeSupport to toggle
WebAudio feature instead of public ewk_view API since that API was
removed.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::overridePreference):

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

8 years agoMake team.html have each contributor's area of expertise
commit-queue@webkit.org [Fri, 24 May 2013 22:34:52 +0000 (22:34 +0000)]
Make team.html have each contributor's area of expertise
https://bugs.webkit.org/show_bug.cgi?id=116737

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-05-24
Reviewed by Benjamin Poulain.

Tools:

* Scripts/webkitpy/common/config/contributors.json:
Add expertise to each contributor, taken from http://trac.webkit.org/wiki/WebKit%20Team

Changed formatting of the file because the lines are getting way to
long, and I generated this, so it's easier if the formatting of the
file is regular.

Websites/webkit.org:

* team.html:
Update to use the new expertise field in contributors.json.

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

8 years agoRemove unused code to read/write history
andersca@apple.com [Fri, 24 May 2013 22:05:57 +0000 (22:05 +0000)]
Remove unused code to read/write history
https://bugs.webkit.org/show_bug.cgi?id=116738

Reviewed by Brent Fulgham.

* Interfaces/IWebHistory.idl:
Replace loadFromURL and saveToURL with unused1/unused2.

* Interfaces/IWebHistoryPrivate.idl:
Replace data with unused1.

* WebHistory.cpp:
Remove history loading/saving code.

(WebHistory::unused1):
(WebHistory::unused2):
Add implementations.

* WebHistory.h:
(WebHistory):

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

8 years agoWe broke !(0/0)
fpizlo@apple.com [Fri, 24 May 2013 22:00:21 +0000 (22:00 +0000)]
We broke !(0/0)
https://bugs.webkit.org/show_bug.cgi?id=116736

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createLogicalNot):
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::pureToBoolean):

Source/WTF:

* wtf/MathExtras.h:
(isNotZeroAndOrdered):
(isZeroOrUnordered):

LayoutTests:

* fast/js/constant-fold-not-nan.html: Added.
* fast/js/constant-fold-not-nan-expected.txt: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/constant-fold-not-nan.js: Added.

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

8 years ago[AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
commit-queue@webkit.org [Fri, 24 May 2013 20:26:00 +0000 (20:26 +0000)]
[AC] Needs to be guarded by USE(ACCELERATED_COMPOSITING)
https://bugs.webkit.org/show_bug.cgi?id=116712

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-05-24
Reviewed by Andreas Kling.

renderView is used when ACCELERATED_COMPOSITING is enabled.
So, this patch allows it to be guarded by USE(ACCELERATED_COMPOSITING).

No new tests, no behavior change.

* page/FrameView.cpp:
(WebCore::FrameView::setFrameRect):

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

8 years agoREGRESSION (r150215): broke a test case in inspector/console/console-css-warnings...
sergio@webkit.org [Fri, 24 May 2013 20:07:02 +0000 (20:07 +0000)]
REGRESSION (r150215): broke a test case in inspector/console/console-css-warnings.html
https://bugs.webkit.org/show_bug.cgi?id=116731

Reviewed by Ryosuke Niwa.

The mentioned revision removed a layering violation added just to
support some IE7 hack. That was removed but the test case
supporting it was left untouched, remove it.

* inspector/console/console-css-warnings-expected.txt:
* inspector/console/console-css-warnings.html:

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

8 years ago[WK2] Spelling tests gardening
g.czajkowski@samsung.com [Fri, 24 May 2013 19:43:41 +0000 (19:43 +0000)]
[WK2] Spelling tests gardening
https://bugs.webkit.org/show_bug.cgi?id=116718

Unreviewed gardening.

The most spelling tests are skipped for wk2 platforms and they have deprecated comments.
Move the tests from global wk2/TestExpectations to the ports' TestExpectations as
the core spellchecking implementation is delivered for wk2.
This change will allow to run spelling tests easier and using [ Pass ] keyword
in TestExpectations won't be needed.

* platform/efl-wk2/TestExpectations:
* platform/gtk-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* platform/qt-5.0-wk2/TestExpectations:
* platform/wk2/TestExpectations:

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

8 years agoAdd more lines to the context during Dictionary lookups
commit-queue@webkit.org [Fri, 24 May 2013 19:41:37 +0000 (19:41 +0000)]
Add more lines to the context during Dictionary lookups
https://bugs.webkit.org/show_bug.cgi?id=115256

Patch by Thomas Deniau <deniau@apple.com> on 2013-05-24
Reviewed by Ryosuke Niwa.

Source/WebCore:

No new tests - no new functionality.

* WebCore.exp.in: Export a few methods in VisibleUnits needed to be able
to call previousLinePosition(), nextLinePosition(), startOfLine() and
endOfLine() in WebPageMac.mm when determining the context while looking
up a dictionary definition. These symbols used to be exported for iOS
only, export them on the desktop too.

Source/WebKit2:

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performDictionaryLookupAtLocation):
Instead of using the current paragraph as the context (which stops at
line breaks), get a few lines before and after the point, so that the
context contains at least four lines in each direction.
This way the Dictionary will be able to look up things that extend past
the current line.

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

8 years agoRemove PagePopup code
andersca@apple.com [Fri, 24 May 2013 19:07:02 +0000 (19:07 +0000)]
Remove PagePopup code
https://bugs.webkit.org/show_bug.cgi?id=116732

Reviewed by Andreas Kling.

.:

* Source/cmakeconfig.h.cmake:
Remove ENABLE_PAGE_POPUP.

Source/WebCore:

Remove all page popup code.

* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:
* dom/ContextFeatures.cpp:
* dom/ContextFeatures.h:
* loader/EmptyClients.h:
* page/ChromeClient.h:
* page/DOMWindowPagePopup.cpp: Removed.
* page/DOMWindowPagePopup.h: Removed.
* page/DOMWindowPagePopup.idl: Removed.
* page/PagePopup.h: Removed.
* page/PagePopupClient.cpp: Removed.
* page/PagePopupClient.h: Removed.
* page/PagePopupController.cpp: Removed.
* page/PagePopupController.h: Removed.
* page/PagePopupController.idl: Removed.
* page/PagePopupDriver.h: Removed.
* testing/Internals.cpp:
(WebCore::Internals::resetToConsistentState):
(WebCore):
* testing/Internals.h:
(WebCore):
(Internals):
* testing/Internals.idl:
* testing/MockPagePopupDriver.cpp: Removed.
* testing/MockPagePopupDriver.h: Removed.

Source/WebKit/blackberry:

* WebCoreSupport/AboutDataEnableFeatures.in:
Remove PAGE_POPUP.

Source/WTF:

Remove ENABLE_PAGE_POPUP.

* wtf/FeatureDefines.h:

LayoutTests:

Remove tests that relied on the mock page popup driver.

* fast/forms/date/no-page-popup-controller-expected.txt: Removed.
* fast/forms/date/no-page-popup-controller.html: Removed.
* fast/forms/resources/picker-common.js: Removed.
* fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings-expected.txt: Removed.
* fast/forms/time-multiple-fields/time-multiple-fields-open-picker-key-bindings.html: Removed.

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

8 years agoMac: Set the default audio buffer size to a large value for <video> elements.
jer.noble@apple.com [Fri, 24 May 2013 18:54:23 +0000 (18:54 +0000)]
Mac: Set the default audio buffer size to a large value for <video> elements.
https://bugs.webkit.org/show_bug.cgi?id=116342

Source/WebCore:

Reviewed by Eric Carlson.
Roll-in rubber stamped by Eric Carlson.

To enable power savings by waking up the audio hardware less often, set the
requested buffer frame size to a large value, such as 4096. Since this results
in approximately 100ms worth of buffer, set the buffer size to a much lower
value when playing WebAudio, which is much more sensitive to latency than video
or audio elements.

Introduce a new class, AudioSessionManager, as well as a helper class,
AudioSessionManagerToken. Audio elements, video elements, and WebAudio destination
nodes will create and retain a token, and release the token in their destructor.
This allows the AudioSessionManager to track how many of what type of audio-
generating objects are in existence.

This requires implementing AudioSession for Mac platforms. Move the implementation
for retrieving the hardware sample rate and setting the buffer duration into
AudioSessionMac from AudioDestinationMac, to be shared with AudioSessionManagerMac.

Change the AudioSession method preferredBufferLength() into preferredBufferSize(),
as the callers really want to specify a buffer size, not a buffer duration. On iOS,
where the available API requires a duration, perform the conversion from duration to
size on behalf of the caller.

However, since the original version of this patch caused media test
failures on the Mac ML and Lion bots, only enable the buffer size
change for OS X > ML.

* html/HTMLMediaElement.h:  Add a AudioSessionManagerToken member.
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the token.
* platform/audio/AudioSession.cpp:
(WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
(WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength.
* platform/audio/AudioSession.h:
* platform/audio/AudioSessionManager.cpp:
(AudioSessionManagerToken::create): Simple factory method.
(AudioSessionManagerToken::AudioSessionManagerToken): Call AudioSessionManager::incrementCount().
(AudioSessionManagerToken::~AudioSessionManagerToken): Call AudioSessionManager::decrementCount().
(AudioSessionManager::sharedManager): Simple singleton method.
(AudioSessionManager::AudioSessionManager): Simple constructor.
(AudioSessionManager::has): Return whether the type is present.
(AudioSessionManager::incrementCount): Increment, then call updateSessionState()
(AudioSessionManager::decrementCount): Decrement, then call updateSessionState()
(AudioSessionManager::updateSessionState): Stub, does nothing.
* platform/audio/AudioSessionManager.h:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestinationIOS::configure): Call setPreferredBufferSize() instead of setPreferredBufferLength()
* platform/audio/ios/AudioSessionIOS.mm:
(WebCore::AudioSession::preferredBufferSize): Renamed from preferredBufferLength.
(WebCore::AudioSession::setPreferredBufferSize): Renamed from setPreferredBufferLength
* platform/audio/mac/AudioDestinationMac.cpp:
(WebCore::AudioDestination::hardwareSampleRate): Call AudioSession::sampleRate().
(WebCore::AudioDestinationMac::AudioDestinationMac): Create the AudioSessionManagerToken.
(WebCore::AudioDestinationMac::configure): Do not set the buffer size (this is done in AudioSessionManagerMac).
* platform/audio/mac/AudioDestinationMac.h:
* platform/audio/mac/AudioSessionMac.cpp: Added.
(WebCore::defaultDevice): Added, returns the default audio device.
(WebCore::AudioSession::AudioSession): Simple constructor.
(WebCore::AudioSession::~AudioSession): Simple destructor.
(WebCore::AudioSession::category): Stub, unimplemented.
(WebCore::AudioSession::setCategory): Ditto.
(WebCore::AudioSession::categoryOverride): Ditto.
(WebCore::AudioSession::setCategoryOverride): Ditto.
(WebCore::AudioSession::numberOfOutputChannels): Ditto.
(WebCore::AudioSession::setActive): Ditto.
(WebCore::AudioSession::sampleRate): Use the HAL to return the default audio device sample rate.
(WebCore::AudioSession::preferredBufferSize): Return the current HAL setting.
(WebCore::AudioSession::setPreferredBufferSize): Set the buffer size.
* platform/audio/mac/AudioSessionManagerMac.cpp:
(AudioSessionManager::updateSessionState): Set the buffer size depending on what audio outputs are present.
* WebCore.xcodeproj/project.pbxproj: Add the new files to the project.

Source/WTF:

Reviewed by Eric Carlson.

* wtf/Platform.h: Add a WTF_USE_AUDIO_SESSION setting.

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

8 years agoIntermittent crash when typing in Address Bar
andersca@apple.com [Fri, 24 May 2013 18:09:09 +0000 (18:09 +0000)]
Intermittent crash when typing in Address Bar
https://bugs.webkit.org/show_bug.cgi?id=116728
<rdar://problem/13976781>

Reviewed by Sam Weinig.

If a web process connection has been removed from the storage manager because we disconnected it
since there were no more active pages associated with the web process, we'll fail to find it here
so just return early instead of crashing.

* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::destroyStorageMap):

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

8 years agoPath: upstream the missing bits from the BlackBerry port
commit-queue@webkit.org [Fri, 24 May 2013 17:28:38 +0000 (17:28 +0000)]
Path: upstream the missing bits from the BlackBerry port
https://bugs.webkit.org/show_bug.cgi?id=116658

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-05-24
Reviewed by Xan Lopez.

PathBlackBerry was upstreamed a while ago (r144612) but a few bits
were missing from the cross-platform code.

* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):
* platform/graphics/Path.h:
(Graphics):
(Path):

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

8 years agoImprove loader/go-back-cached-main-resource.html test
commit-queue@webkit.org [Fri, 24 May 2013 17:16:24 +0000 (17:16 +0000)]
Improve loader/go-back-cached-main-resource.html test
https://bugs.webkit.org/show_bug.cgi?id=116709

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-05-24
Reviewed by Alexey Proskuryakov.

It is only needed to register the listeners on the initial load as they
are already present when restoring from page cache. Modified the test to
use event.persisted property to know if we are handling the first load
in order to register the listeners only once.

* loader/resources/first-page.html: Rename registerListeners() function
to a more accurate name didShowPage() and use event.persisted to
register the listeners only in the first load.
* loader/resources/other-page.html: Ditto.

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

8 years ago[sh4] Optimize LLINT generated code and fix few bugs in baseline JIT.
commit-queue@webkit.org [Fri, 24 May 2013 16:46:10 +0000 (16:46 +0000)]
[sh4] Optimize LLINT generated code and fix few bugs in baseline JIT.
https://bugs.webkit.org/show_bug.cgi?id=116716

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

* assembler/MacroAssemblerSH4.h:
(JSC::MacroAssemblerSH4::mul32): Cosmetic changes.
(JSC::MacroAssemblerSH4::convertInt32ToDouble): Absolute address was not dereferenced.
(JSC::MacroAssemblerSH4::branch32): Absolute address was not dereferenced.
(JSC::MacroAssemblerSH4::revertJumpReplacementToBranchPtrWithPatch): Use all 32 bits of pointer for revertJump call.
* assembler/SH4Assembler.h:
(JSC::SH4Assembler::revertJump): Use changePCrelativeAddress to patch the whole pointer.
(JSC::SH4Assembler::linkJump): Cosmetic change.
* offlineasm/sh4.rb: Optimize LLINT generated code.

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

8 years agoWebProcess is crashing on http://achicu.github.io/css-presentation when direct patter...
commit-queue@webkit.org [Fri, 24 May 2013 16:34:46 +0000 (16:34 +0000)]
WebProcess is crashing on achicu.github.io/css-presentation when direct pattern compositing is enabled
https://bugs.webkit.org/show_bug.cgi?id=115135

Patch by Noam Rosenthal <noam@webkit.org> on 2013-05-24
Reviewed by Antti Koivisto.

Source/WebCore:

Issue is invoked when there is a visibility:hidden layer with a non-compositable
background image (e.g. a radial gradient).
The layer is treated as a no-contents layer because of its visibility, however
updateDirectlyCompositedBackgroundImage() later mistakenly treats it as a layer
with direct background-image compositing.

Fixed by returning early from updating directly composited contents for layers
with hidden contents.

Test: compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDirectlyCompositedContents):
(WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
(WebCore::RenderLayerBacking::paintsChildren):
(WebCore::RenderLayerBacking::isDirectlyCompositedImage):

LayoutTests:

Added a ref-test that makes sure that a layer with a hidden radial gradient does not
cause the web process to crash.

* compositing/patterns/direct-pattern-compositing-hidden-radial-gradient-expected.html: Added.
* compositing/patterns/direct-pattern-compositing-hidden-radial-gradient.html: Added.

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

8 years agoRefactor shouldAddBorderPaddingMargin()
robert@webkit.org [Fri, 24 May 2013 16:18:16 +0000 (16:18 +0000)]
Refactor shouldAddBorderPaddingMargin()
https://bugs.webkit.org/show_bug.cgi?id=98803

Reviewed by Ryosuke Niwa.

Make this helper function less clever-stupid in its misguided sacrifice of intelligibility
for the sake of concision.

No new tests, refactoring.

* rendering/RenderBlockLineLayout.cpp:
(WebCore::shouldAddBorderPaddingMargin):
(WebCore::inlineLogicalWidth):

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

8 years ago[BlackBerry] Fix bad type warning in InputHandler log.
mifenton@rim.com [Fri, 24 May 2013 15:51:18 +0000 (15:51 +0000)]
[BlackBerry] Fix bad type warning in InputHandler log.
https://bugs.webkit.org/show_bug.cgi?id=116720

Reviewed by Carlos Garcia Campos.

Fix warning in inputLog string.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::handleKeyboardInput):

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

8 years agoUpdate WTF::Vector pretty printers
commit-queue@webkit.org [Fri, 24 May 2013 14:48:21 +0000 (14:48 +0000)]
Update WTF::Vector pretty printers
https://bugs.webkit.org/show_bug.cgi?id=116719

Patch by Simon Pena <simon.pena@samsung.com> on 2013-05-24
Reviewed by Anders Carlsson.

After r148891, WTF::Vector pretty printers were left outdated, as
the WTF::Vector was made to extend a VectorBuffer, instead of keeping
one as a member. This patch updates the pretty printers so they work
again.

* gdb/webkit.py:
(WTFVectorPrinter.children):
(WTFVectorPrinter.to_string):

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

8 years ago[Qt] Unreviewed gardening. Update qt-5.0-wk2 expected pictures after r150506.
zarvai@inf.u-szeged.hu [Fri, 24 May 2013 14:20:35 +0000 (14:20 +0000)]
[Qt] Unreviewed gardening. Update qt-5.0-wk2 expected pictures after r150506.

Patch by Gabor Abraham <abrhm@inf.u-szeged.hu> on 2013-05-24

* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-in-attr-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-in2-attr-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-scale-attr-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-xChannelSelector-attr-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-dom-yChannelSelector-attr-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in-prop-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-in2-prop-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-scale-prop-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-xChannelSelector-prop-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEDisplacementMapElement-svgdom-yChannelSelector-prop-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEImageElement-dom-preserveAspectRatio-attr-expected.png:
* platform/qt-5.0-wk2/svg/dynamic-updates/SVGFEImageElement-svgdom-preserveAspectRatio-prop-expected.png:
* platform/qt-5.0-wk2/svg/filters/feImage-animated-transform-on-target-rect-expected.png:
* platform/qt-5.0-wk2/svg/filters/feImage-late-indirect-update-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-reference-invalidation-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-add-to-document-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-attribute-change-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-attribute-change-with-use-indirection-2-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-attribute-change-with-use-indirection-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-changes-id-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-id-change-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-inline-style-change-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-property-change-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-reappend-to-document-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-remove-from-document-expected.png: Added.
* platform/qt-5.0-wk2/svg/filters/feImage-target-style-change-expected.png: Added.

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

8 years ago[Qt] Unreviewed gardening. Skip failing tests.
kadam@inf.u-szeged.hu [Fri, 24 May 2013 13:25:51 +0000 (13:25 +0000)]
[Qt] Unreviewed gardening. Skip failing tests.

* platform/qt-5.0-wk2/TestExpectations: Move http/tests/security/cross-frame-access-put.html to qt/TestExpectations.
* platform/qt/TestExpectations: Skip fast/frames/detach-frame-during-focus.html after r146523.

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

8 years ago[BlackBerry] Respect tabindex when using form controls.
mifenton@rim.com [Fri, 24 May 2013 12:47:18 +0000 (12:47 +0000)]
[BlackBerry] Respect tabindex when using form controls.
https://bugs.webkit.org/show_bug.cgi?id=116676

Reviewed by Xan Lopez.

PR 337419.

Update form control navigation tracking to take tabindex
order into account when calculating next and previous nodes.

The order to follow is tab index 1 - N, followed by all items
without a tab index or tab index 0 in rendering order to match
with standard desktop behavior.

Internally Reviewed by Genevieve Mak and Nima Ghanavatian.

* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::updateFormState):

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

8 years agoUpdate prepareConsistentTestingEnvironment to use a non-deprecated API.
sfalken@apple.com [Fri, 24 May 2013 08:41:00 +0000 (08:41 +0000)]
Update prepareConsistentTestingEnvironment to use a non-deprecated API.
https://bugs.webkit.org/show_bug.cgi?id=116710

Reviewed by Mark Rowe.

* DumpRenderTree/mac/DumpRenderTree.mm:
(prepareConsistentTestingEnvironment): Use beginActivityWithOptions instead of beginSuspensionOfSystemBehaviors.

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

8 years ago[BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
commit-queue@webkit.org [Fri, 24 May 2013 08:05:49 +0000 (08:05 +0000)]
[BlackBerry] DRT - crashed on GraphicsContext3D::makeContextCurrent
https://bugs.webkit.org/show_bug.cgi?id=116654

Patch by Xiaobo Wang <xiaobwang@blackberry.com> on 2013-05-24
Reviewed by Carlos Garcia Campos.

PR 331552.
Internally reviewed and amended by Arvid Nilsson.

No new tests, this patch is to fix DRT crashes in fast/canvas/webgl.
The instance of GraphicsContext3D has already been destroyed but
WebGLLayerWebKitThread is not aware of that. This is because compositor
layer of the WebGL graphics context was referenced outside the context.
So when destructing GraphicsContext3D the compositing layer was not
destructed.
Fix by setting m_webGLContext to 0 when destructing GrapthicsContext3D
after releasing the compositor layer, so that it won't be de-referenced
again later.

* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::~GraphicsContext3D):
* platform/graphics/blackberry/WebGLLayerWebKitThread.cpp:
(WebCore::WebGLLayerWebKitThread::~WebGLLayerWebKitThread):
(WebCore::WebGLLayerWebKitThread::webGLContextDestroyed):
(WebCore):
* platform/graphics/blackberry/WebGLLayerWebKitThread.h:
(WebGLLayerWebKitThread):

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

8 years ago[BlackBerry] Remove SKIA leftovers from WebPage.cpp
commit-queue@webkit.org [Fri, 24 May 2013 07:32:54 +0000 (07:32 +0000)]
[BlackBerry] Remove SKIA leftovers from WebPage.cpp
https://bugs.webkit.org/show_bug.cgi?id=116656

Patch by Jeff Rogers <jrogers@rim.com> on 2013-05-24
Reviewed by Rob Buis.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setLoadState):

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

8 years agoTyping in Safari's unified field causes unnecessary web content repaints.
akling@apple.com [Fri, 24 May 2013 07:12:19 +0000 (07:12 +0000)]
Typing in Safari's unified field causes unnecessary web content repaints.
<http://webkit.org/b/116703>

Reviewed by Andy Estes.

Source/WebCore:

Break out an alternate version of Page::markAllMatchesForText() that only counts the number of times
a string occurs in the page, but doesn't try to mark the occurrences.
This allows Safari to count matches for the 'Find "foo" on This Page' functionality in the unified
location bar without causing tile repaints.

* WebCore.exp.in:
* page/Page.h:
* page/Page.cpp:
(WebCore::Page::findMatchesForText):
(WebCore::Page::markAllMatchesForText):
(WebCore::Page::countFindMatches):

    Renamed markAllMatchesForText() to findMatchesForText() and gave it a boolean parameter to control whether
    matches should be marked or not. countFindMatches() is the new helper that doesn't mark.

Source/WebKit2:

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::countStringMatches):

    Call WebCore::Page::countMatchesForText() instead of markAllMatchesForText(). If the search string
    is found inside the page content, the renderer containing that text will no longer be repainted.

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

8 years agoAdd back a failing test expectation on fast/canvas/webgl/object-deletion-behaviour...
rniwa@webkit.org [Fri, 24 May 2013 07:05:01 +0000 (07:05 +0000)]
Add back a failing test expectation on fast/canvas/webgl/object-deletion-behaviour.html
after r150558 on Lion Debug WK1.

* platform/mac-wk2/TestExpectations:
* platform/mac/TestExpectations:

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

8 years agohttps://bugs.webkit.org/show_bug.cgi?id=116702
bdakin@apple.com [Fri, 24 May 2013 07:02:26 +0000 (07:02 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=116702
REGRESSION (r150399): Scrollbar missing for all overflow scroll
-and corresponding-
<rdar://problem/13963712>

Reviewed by Simon Fraser.

This was a silly copy-paste error.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::scrollbarAnimationsAreSuppressed):

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

8 years agoCLoop llint backend should not use the d8 register as scratch register
commit-queue@webkit.org [Fri, 24 May 2013 06:56:30 +0000 (06:56 +0000)]
CLoop llint backend should not use the d8 register as scratch register
https://bugs.webkit.org/show_bug.cgi?id=116019

Patch by Peter Wang <peter.wang@torchmobile.com.cn> on 2013-05-23
Reviewed by Csaba Osztrogonác.

* offlineasm/cloop.rb:

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

8 years ago[BlackBerry] Need to suspend/resume RootLayerCommit when the application becomes...
commit-queue@webkit.org [Fri, 24 May 2013 06:26:26 +0000 (06:26 +0000)]
[BlackBerry] Need to suspend/resume RootLayerCommit when the application becomes inactive/active
https://bugs.webkit.org/show_bug.cgi?id=115245

Patch by Xiaobo Wang <xiaobwang@blackberry.com> on 2013-05-23
Reviewed by Rob Buis.

PR 330917.
Internally reviewed by Arvid Nilsson.

1. Suspend/resumeRootLayerCommit when notified app activation state
change.
2. Schedule root layer commit in resumeRootLayerCommit() to explicitly
start root layer commit timer, so that there's a commit even if
BackingStore got disabled/removed.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::notifyAppActivationStateChange):
(BlackBerry::WebKit::WebPagePrivate::resumeRootLayerCommit):

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

8 years ago[BlackBerry] Need to forward the opener frame url to client when creating a new window
commit-queue@webkit.org [Fri, 24 May 2013 06:23:20 +0000 (06:23 +0000)]
[BlackBerry] Need to forward the opener frame url to client when creating a new window
https://bugs.webkit.org/show_bug.cgi?id=116566

Patch by Andy Chen <andchen@blackberry.com> on 2013-05-23
Reviewed by Rob Buis.

PR 337935
Internally reviewed by Arvid Nilsson.
When creating a new window, forward the opener frame url to client.

* Api/WebPageClient.h:
* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::createWindow):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchCreatePage):

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

8 years ago[WinCairo] Build fails to link.
commit-queue@webkit.org [Fri, 24 May 2013 06:20:19 +0000 (06:20 +0000)]
[WinCairo] Build fails to link.
https://bugs.webkit.org/show_bug.cgi?id=116671

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-05-23
Reviewed by Brent Fulgham.

* page/FrameView.h: Added guard for ACCELERATED_COMPOSITING.

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

8 years agoAdd missing dependencies to deps script.
lauro.neto@openbossa.org [Fri, 24 May 2013 06:15:13 +0000 (06:15 +0000)]
Add missing dependencies to deps script.

[GTK] Missing packages in install-dependencies script.
https://bugs.webkit.org/show_bug.cgi?id=116632

Reviewed by Martin Robinson.

* gtk/install-dependencies:

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

8 years ago[BlackBerry] Compositor API change: Don't pass the unused "viewport" parameter.
commit-queue@webkit.org [Fri, 24 May 2013 06:07:56 +0000 (06:07 +0000)]
[BlackBerry] Compositor API change: Don't pass the unused "viewport" parameter.
https://bugs.webkit.org/show_bug.cgi?id=116545
Internal PR 189775

Patch by Jakob Petsovits <jpetsovits@blackberry.com> on 2013-05-23
Reviewed by Rob Buis.

Also change the name of the "documentContents" parameter
to the more descriptive "documentSrcRect".

* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::render):
(BlackBerry::WebKit::WebPageCompositor::render):
* Api/WebPageCompositor.h:
* Api/WebPageCompositor_p.h:
(WebPageCompositorPrivate):

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

8 years ago[WK2][EFL][QT] Build break after r150610
ossy@webkit.org [Fri, 24 May 2013 05:14:54 +0000 (05:14 +0000)]
[WK2][EFL][QT] Build break after r150610
https://bugs.webkit.org/show_bug.cgi?id=116699

Patch by Ryuan Choi <ryuan.choi@samsung.com> on 2013-05-23
Reviewed by Csaba Osztrogonác.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin): Initialized pluginProcessSandboxPolicy.

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

8 years ago[Windows] Rolling back r150600 as it breaks the VS2010 builds.
bfulgham@apple.com [Fri, 24 May 2013 01:33:04 +0000 (01:33 +0000)]
[Windows] Rolling back r150600 as it breaks the VS2010 builds.

* wtf/StackBounds.cpp: Rollback.

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

8 years agoShim Flash plug-in to allow its updater to run
andersca@apple.com [Fri, 24 May 2013 00:43:10 +0000 (00:43 +0000)]
Shim Flash plug-in to allow its updater to run
https://bugs.webkit.org/show_bug.cgi?id=116692
<rdar://problem/13938510>

Reviewed by Sam Weinig.

* PluginProcess/PluginProcess.h:
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::replacedNSConcreteTask_launch):
(WebKit::initializeCocoaOverrides):
Patch -[NSConcreteTask launch] to call PluginProcess::launchProcess.

(WebKit::PluginProcess::launchProcess):
Send a LaunchProcess message to the UI process.

* UIProcess/Plugins/PluginProcessProxy.cpp:
* UIProcess/Plugins/PluginProcessProxy.h:
Remove PluginProcessProxy::didReceiveMessage.

(PluginProcessProxy):
* UIProcess/Plugins/PluginProcessProxy.messages.in:
Add LaunchProcess message and remove LegacyReceiver attribute.

* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::isFlashUpdater):
Helper function to determine whether the process is the flash updater.

(WebKit::shouldLaunchProcess):
Return whether we should launch this process.

(WebKit::PluginProcessProxy::launchProcess):
Determine if we should launch this process and then do so.

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

8 years ago[Windows] Unreviewed change for NRWT support.
bfulgham@apple.com [Fri, 24 May 2013 00:41:30 +0000 (00:41 +0000)]
[Windows] Unreviewed change for NRWT support.

* Scripts/webkitpy/port/win.py:
(WinPort.default_child_processes): Added a default implementation
that limits NRWT to a single instance.

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

8 years agoUnreviewed. Modify WebCore for AppleWin 2010 production build.
roger_fong@apple.com [Fri, 24 May 2013 00:03:08 +0000 (00:03 +0000)]
Unreviewed. Modify WebCore for AppleWin 2010 production build.

* WebCore.vcxproj/WebCoreGenerated.make:
(WebCore::AXObjectCache::frameLoadingEventPlatformNotification):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:

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

8 years ago[EFL] Rebaseline after r150593
commit-queue@webkit.org [Thu, 23 May 2013 23:44:51 +0000 (23:44 +0000)]
[EFL] Rebaseline after r150593
https://bugs.webkit.org/show_bug.cgi?id=116695

Unreviewed gardening.

Moved some editing tests from execCommand into pasteboard.

Patch by Seokju Kwon <seokju.kwon@gmail.com> on 2013-05-23

* platform/efl/TestExpectations:

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

8 years agoMake Math.imul tests run quicker, and fix some other bugs.
fpizlo@apple.com [Thu, 23 May 2013 23:22:23 +0000 (23:22 +0000)]
Make Math.imul tests run quicker, and fix some other bugs.

Rubber stampted by Oliver Hunt.

Also make tests not call print().

* fast/js/regress/script-tests/cell-argument.js:
* fast/js/regress/script-tests/imul-double-only.js:
(f):
* fast/js/regress/script-tests/imul-int-only.js:
(f):
* fast/js/regress/script-tests/imul-mixed.js:
(f):
* fast/js/regress/script-tests/object-closure-call.js:

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

8 years agoRemove meaningless "test_uses_apache" from Python test cases.
rniwa@webkit.org [Thu, 23 May 2013 23:00:57 +0000 (23:00 +0000)]
Remove meaningless "test_uses_apache" from Python test cases.
https://bugs.webkit.org/show_bug.cgi?id=38756

Patch by Brent Fulgham <bfulgham@apple.com> on 2013-05-23
Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.test_driver_cmd_line): Remove the meaningless
"test_uses_apache" test case from the Python test infrastructure.
It was hard-coded to true, even though not all ports use
Apache.

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

8 years agoWe need to clear main resource when detaching DocumentLoader from the frame.
commit-queue@webkit.org [Thu, 23 May 2013 21:17:43 +0000 (21:17 +0000)]
We need to clear main resource when detaching DocumentLoader from the frame.
https://bugs.webkit.org/show_bug.cgi?id=116680

Normally, when we detach the documentLoader in DocumentLoader::detachFromFrame, main resource is also cleared
in stopLoading().  There is possibility that main resource not being cleared, and this could cause crash later
since docLoader could still receive resource callbacks.  To avoid that, we can remove docLoader from main resource's
client set in detachFromFrame.

Patch by Yongjun Zhang <yongjun_zhang@apple.com> on 2013-05-23
Reviewed by Brady Eidson.

No new tests, this doesn't happen on OS X.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::detachFromFrame):
(WebCore::DocumentLoader::clearMainResource):
* loader/cache/CachedResource.h: make hasClient accessible publicly.
(WebCore::CachedResource::hasClient):
(CachedResource):

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

8 years ago[Windows] Update new-run-webkit-tests for Windows port.
bfulgham@apple.com [Thu, 23 May 2013 20:59:48 +0000 (20:59 +0000)]
[Windows] Update new-run-webkit-tests for Windows port.
https://bugs.webkit.org/show_bug.cgi?id=38756

Patch by Brent Fulgham <bfulgham@webkit.org> on 2013-05-23
Reviewed by Ryosuke Niwa.

* Scripts/new-run-webkit-httpd:
(run): Switch from 'chromium' to 'win'
* Scripts/webkitpy/port/win.py:
(WinPort): Add support methods for lighttpd server.
(WinPort._uses_apache):
(WinPort._path_to_lighttpd):
(WinPort._path_to_lighttpd_modules):
(WinPort._path_to_lighttpd_php):

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

8 years agoassertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
commit-queue@webkit.org [Thu, 23 May 2013 20:56:00 +0000 (20:56 +0000)]
assertion failed: !node || node->isElementNode() in WebCore::RenderBlock::clone
https://bugs.webkit.org/show_bug.cgi?id=116614

Patch by Mihai Maerean <mmaerean@adobe.com> on 2013-05-23
Reviewed by David Hyatt.

Source/WebCore:

Add a test for flow threads so they don't end up being cloned in region based multi columns with columns:1 where
the only child has column-span:all.

Test: fast/multicol/newmulticol/direct-child-column-span-all.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):

LayoutTests:

* fast/multicol/newmulticol/direct-child-column-span-all-expected.txt: Added.
* fast/multicol/newmulticol/direct-child-column-span-all.html: Added.

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

8 years agoDon't run all plug-ins unsandboxed
andersca@apple.com [Thu, 23 May 2013 20:48:51 +0000 (20:48 +0000)]
Don't run all plug-ins unsandboxed
https://bugs.webkit.org/show_bug.cgi?id=116690
<rdar://problem/13975569>

Reviewed by Jessie Berlin.

Remove debugging code.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::findPlugin):

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

8 years agoCrash in convertMainResourceLoadToDownload when downloading file by option-return
andersca@apple.com [Thu, 23 May 2013 20:08:21 +0000 (20:08 +0000)]
Crash in convertMainResourceLoadToDownload when downloading file by option-return
https://bugs.webkit.org/show_bug.cgi?id=116451

Reviewed by Andreas Kling.

Source/WebCore:

Handle MainResourceLoader being null here which will happen when loading a cached main resource.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::continueAfterContentPolicy):

Source/WebKit/mac:

If the main resource loader is null, create a new download instead since there's no existing loader to convert.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::convertMainResourceLoadToDownload):

Source/WebKit2:

If the main resource loader is null, create a new download instead since there's no existing loader to convert.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::convertMainResourceLoadToDownload):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::convertMainResourceLoadToDownload):

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

8 years agoRemove a stale test expectation.
rniwa@webkit.org [Thu, 23 May 2013 19:56:14 +0000 (19:56 +0000)]
Remove a stale test expectation.

* platform/wk2/TestExpectations:

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

8 years agoUpdate Mac test expectations for the bug 85408 as bugs 116398 and 116477 have been...
rniwa@webkit.org [Thu, 23 May 2013 19:49:13 +0000 (19:49 +0000)]
Update Mac test expectations for the bug 85408 as bugs 116398 and 116477 have been merged into it.

* platform/mac/TestExpectations:

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

8 years agoKURL::createCFURL() should return a RetainPtr<CFURLRef>
benjamin@webkit.org [Thu, 23 May 2013 19:46:05 +0000 (19:46 +0000)]
KURL::createCFURL() should return a RetainPtr<CFURLRef>
https://bugs.webkit.org/show_bug.cgi?id=116644

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

For consistency with the other createCFType() APIs in WebKit, KURL should
return a RetainPtr<> instead of raw +1 CFURLRef.

No leak were discovered while making this change.

* platform/KURL.h:
* platform/cf/KURLCFNet.cpp:
(WebCore):
(WebCore::createCFURLFromBuffer):
(WebCore::KURL::createCFURL):
(WebCore::KURL::fileSystemPath):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createAssetForURL):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setURLForRect):
* platform/mac/KURLMac.mm:
(WebCore):
(WebCore::KURL::operator NSURL *):
(WebCore::KURL::createCFURL):
* platform/network/cf/CookieJarCFNet.cpp:
(WebCore::setCookiesFromDOM):
(WebCore::cookiesForDOM):
(WebCore::cookieRequestHeaderFieldValue):
(WebCore::getRawCookies):
(WebCore::deleteCookie):
* platform/network/cf/DNSCFNet.cpp:
(WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
* platform/network/cf/ProxyServerCFNet.cpp:
(WebCore::addProxyServersForURL):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
* platform/network/cf/ResourceResponseCFNet.cpp:
(WebCore::ResourceResponse::cfURLResponse):
* platform/network/cf/SocketStreamHandleCFNet.cpp:
(WebCore::SocketStreamHandle::SocketStreamHandle):

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

8 years agoAdd back failing test expectations for the bugs 88672 and 89528 after r150558 and...
rniwa@webkit.org [Thu, 23 May 2013 19:42:58 +0000 (19:42 +0000)]
Add back failing test expectations for the bugs 88672 and 89528 after r150558 and r150559 on Lion.

* platform/mac/TestExpectations:

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

8 years agofast/workers/storage/use-same-database-in-page-and-workers.html times out on the...
rniwa@webkit.org [Thu, 23 May 2013 19:37:55 +0000 (19:37 +0000)]
fast/workers/storage/use-same-database-in-page-and-workers.html times out on the lion bots
https://bugs.webkit.org/show_bug.cgi?id=81618

Add back the flaky test failure on Mac.

* platform/mac/TestExpectations:

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

8 years agoUse correct stack size on Solaris and OpenBSD
paroga@webkit.org [Thu, 23 May 2013 19:19:10 +0000 (19:19 +0000)]
Use correct stack size on Solaris and OpenBSD
https://bugs.webkit.org/show_bug.cgi?id=114978

Reviewed by Oliver Hunt.

Original patch by David Hill <david@wmol.com>.

Use stack_t.ss_size for getting the size of the stack.

* wtf/Platform.h:
* wtf/StackBounds.cpp:
(WTF):
(WTF::StackBounds::initialize):

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

8 years agoThe ellipsis in a text overflow should not avoid floats
robert@webkit.org [Thu, 23 May 2013 18:55:53 +0000 (18:55 +0000)]
The ellipsis in a text overflow should not avoid floats
https://bugs.webkit.org/show_bug.cgi?id=115746

Reviewed by David Hyatt.

Source/WebCore:

When placing an ellipsis for text overflow we shouldn't avoid any floats on the line.
That is to say, if there is a float in the box we overflow we should let our no-wrap text,
including the ellipsis, render inside the float just as we would if overflow was hidden but
a text-overflow rendering had not been specified.

Test: fast/css/text-overflow-ellipsis-behind-floats.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::checkLinesForTextOverflow):

LayoutTests:

* fast/css/text-overflow-ellipsis-behind-floats-expected.html: Added.
* fast/css/text-overflow-ellipsis-behind-floats.html: Added.
* fast/css/text-overflow-ellipsis-full-truncate-rtl-expected.html:
* fast/css/text-overflow-ellipsis-full-truncate-rtl.html:
  Change this test to expect the text to cross into the floating input element
  and render the ellipsis at the left extreme of the element. The previous expected
  rendering relied on the incorrect premise that an overflow ellipsis should avoid
  floated elements.

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

8 years ago[WIN] Implement correct detection of stack size
paroga@webkit.org [Thu, 23 May 2013 18:51:00 +0000 (18:51 +0000)]
[WIN] Implement correct detection of stack size
https://bugs.webkit.org/show_bug.cgi?id=116661

Reviewed by Oliver Hunt.

* wtf/StackBounds.cpp:
(WTF):
(WTF::StackBounds::initialize):

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

8 years ago <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding
ap@apple.com [Thu, 23 May 2013 18:49:57 +0000 (18:49 +0000)]
    <rdar://problem/13849260> Sandbox violations reading .CFUserTextEncoding

        Reviewed by Dan Bernstein.

        * WebProcess/com.apple.WebProcess.sb.in: Allow this.

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

8 years ago[Lion] [WK2] compositing/overflow/overflow-compositing-descendant.html
rniwa@webkit.org [Thu, 23 May 2013 18:30:34 +0000 (18:30 +0000)]
[Lion] [WK2] compositing/overflow/overflow-compositing-descendant.html
https://bugs.webkit.org/show_bug.cgi?id=116684

Add a timeout/failure test expectation. Also update the expected result since the first frame
of the video must be shown in this test.

* platform/mac-wk2/TestExpectations:
* platform/mac/compositing/overflow/overflow-compositing-descendant-expected.png:

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

8 years agoMove posix_spawn onto a zero delay timer
barraclough@apple.com [Thu, 23 May 2013 18:03:02 +0000 (18:03 +0000)]
Move posix_spawn onto a zero delay timer
https://bugs.webkit.org/show_bug.cgi?id=116682

Reviewed by Anders Carlson.

<rdar://problem/13973468>

* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(ReexecInfo):
    - struct to hold info from the XPC message.
(WebKit::reexec):
    - moved call to posix_spawn out to this helper.
(WebKit::reexecCallBack):
    - calls reexec.
(WebKit::XPCServiceEventHandler):
    - removed call to posix_spawn; schedule a call to reexecCallBack.

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

8 years agoFix loader/go-back-cached-main-resource.html test
commit-queue@webkit.org [Thu, 23 May 2013 17:52:52 +0000 (17:52 +0000)]
Fix loader/go-back-cached-main-resource.html test
https://bugs.webkit.org/show_bug.cgi?id=116670

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-05-23
Reviewed by Alexey Proskuryakov.

The page does not get an onload when being restored from page cache. The
test case case is modified to handle pageshow event instead.

* loader/go-back-cached-main-resource.html: Wait for the third
'first-page' message to finish the test.
* loader/resources/first-page.html: Use onpageshow instead of onload.
* loader/resources/other-page.html: Ditto.

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

8 years agoSeveral editing tests that copy & paste slow down Mac WK2 EWS
rniwa@webkit.org [Thu, 23 May 2013 17:50:03 +0000 (17:50 +0000)]
Several editing tests that copy & paste slow down Mac WK2 EWS
https://bugs.webkit.org/show_bug.cgi?id=116681

Reviewed by Anders Carlsson.

Move editing tests that trigger copy and paste from execCommand into pasteboard.
Since NWRT uses a single instance of WebKitTestRunner to run tests in single directory,
this should mitigate the issue for now.

In the long term, we should really mock out the clipboard in WebKitTestRunner.

* editing/execCommand/4128080-2-expected.txt: Removed.
* editing/execCommand/4128080-2.html: Removed.
* editing/execCommand/5939887-expected.txt: Removed.
* editing/execCommand/5939887.html: Removed.
* editing/execCommand/copy-without-selection-expected.txt: Removed.
* editing/execCommand/copy-without-selection.html: Removed.
* editing/execCommand/paste-2.html: Removed.
* editing/pasteboard/copy-cut-paste-events-fired-when-disabled-expected.txt: Copied from LayoutTests/editing/execCommand/5939887-expected.txt.
* editing/pasteboard/copy-cut-paste-events-fired-when-disabled.html: Copied from LayoutTests/editing/execCommand/5939887.html.
* editing/pasteboard/copy-inside-h1-preserves-h1-expected.txt: Copied from LayoutTests/editing/execCommand/4128080-2-expected.txt.
* editing/pasteboard/copy-inside-h1-preserves-h1.html: Copied from LayoutTests/editing/execCommand/4128080-2.html.
* editing/pasteboard/copy-without-selection-expected.txt: Copied from LayoutTests/editing/execCommand/copy-without-selection-expected.txt.
* editing/pasteboard/copy-without-selection.html: Copied from LayoutTests/editing/execCommand/copy-without-selection.html.
* editing/pasteboard/paste-2.html: Copied from LayoutTests/editing/execCommand/paste-2.html.
* platform/gtk/editing/execCommand/paste-2-expected.png: Removed.
* platform/gtk/editing/execCommand/paste-2-expected.txt: Removed.
* platform/gtk/editing/pasteboard/paste-2-expected.png: Copied from LayoutTests/platform/gtk/editing/execCommand/paste-2-expected.png.
* platform/gtk/editing/pasteboard/paste-2-expected.txt: Copied from LayoutTests/platform/gtk/editing/execCommand/paste-2-expected.txt.
* platform/mac/editing/execCommand/paste-2-expected.png: Removed.
* platform/mac/editing/execCommand/paste-2-expected.txt: Removed.
* platform/mac/editing/pasteboard/paste-2-expected.png: Copied from LayoutTests/platform/mac/editing/execCommand/paste-2-expected.png.
* platform/mac/editing/pasteboard/paste-2-expected.txt: Copied from LayoutTests/platform/mac/editing/execCommand/paste-2-expected.txt.
* platform/qt/editing/execCommand/paste-2-expected.png: Removed.
* platform/qt/editing/execCommand/paste-2-expected.txt: Removed.
* platform/qt/editing/pasteboard/paste-2-expected.png: Copied from LayoutTests/platform/qt/editing/execCommand/paste-2-expected.png.
* platform/qt/editing/pasteboard/paste-2-expected.txt: Copied from LayoutTests/platform/qt/editing/execCommand/paste-2-expected.txt.

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

8 years agoMake default bug links in buildbot clickable
paroga@webkit.org [Thu, 23 May 2013 17:49:45 +0000 (17:49 +0000)]
Make default bug links in buildbot clickable
https://bugs.webkit.org/show_bug.cgi?id=116673

Reviewed by Ryosuke Niwa.

Use changecommentlink of html.WebStatus to make the links clickable.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:

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

8 years agoEWS bubbles need more space
paroga@webkit.org [Thu, 23 May 2013 17:17:19 +0000 (17:17 +0000)]
EWS bubbles need more space
https://bugs.webkit.org/show_bug.cgi?id=116675

Reviewed by Andreas Kling.

* template/en/custom/attachment/list.html.tmpl:

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