AX: accessibility data table heuristics fail on this jQuery table
https://bugs.webkit.org/show_bug.cgi?id=129369

Reviewed by Mario Sanchez Prada.

Source/WebCore: 

Updated accessibility/table-detection.html

If a table uses display style of table-row-group, the RenderTable gets disassociated from the HTMLTableElement.
We can find that element in a different way by asking for the parent of the first table section.

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::activeDescendant):
    This method was accessing an object's element unsafely and this table change exposed the issue.
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::tableElement):
(WebCore::AccessibilityTable::isDataTable):
* accessibility/AccessibilityTable.h:

LayoutTests: 

* accessibility/table-detection.html:
* platform/mac/accessibility/table-detection-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165535 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] WebKit gets stalled when trying to play a stream
https://bugs.webkit.org/show_bug.cgi?id=125926

Patch by Andres Gomez <agomez@igalia.com> on 2014-03-13
Reviewed by Eric Carlson.

Added new test for checking the playback on Icecast/Shoutcast
streamed media.

* http/tests/media/media-play-stream-chunked-icy-expected.txt: Added.
* http/tests/media/media-play-stream-chunked-icy.html: Added.
* http/tests/media/resources/create-id3-db.php: Added.
* http/tests/media/resources/serve-video.php: Added support for
chunked streams and Icecast/Shoutcast headers.
* http/tests/resources/dir-helpers.php: Added.
* http/tests/resources/portabilityLayer.php: Added a couple of new
fallback functions when they are not available in old PHP
versions.
* media/content/metadata.db: Added.
* media/content/silence.mp3: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The scrolledContentOffset method should handle the hasOverflowClip check
https://bugs.webkit.org/show_bug.cgi?id=130028

Patch by Radu Stavila <stavila@adobe.com> on 2014-03-13
Reviewed by Antti Koivisto.

Before this patch, every call to RenderBox::scrolledContentOffset was guarded by the
hasOverflowClip check, because the scrolledContentOffset method would ASSERT(hasOverflowClip()).
This was simplified by moving the hasOverflowClip check inside the scrolledContentOffset method
and returning (0, 0) for elements that do not clip the overflow.

No new tests needed, just a refactor.

* editing/VisibleUnits.cpp:
(WebCore::absoluteLineDirectionPointToLocalPointInBlock):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::paintObject):
(WebCore::RenderBlock::selectionGapRectsForRepaint):
(WebCore::RenderBlock::paintSelection):
(WebCore::RenderBlock::nodeAtPoint):
(WebCore::RenderBlock::offsetForContents):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::scrolledContentOffset):
(WebCore::RenderBox::offsetFromContainer):
* rendering/RenderInline.cpp:
(WebCore::RenderInline::offsetFromContainer):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::mapLayerClipRectsToFragmentationLayer):
(WebCore::RenderLayer::calculateClipRects):
* rendering/RenderNamedFlowThread.cpp:
(WebCore::RenderNamedFlowThread::decorationsClipRectForBoxInNamedFlowFragment):
* rendering/RenderObject.cpp:
(WebCore::RenderObject::mapLocalToContainer):
(WebCore::RenderObject::pushMappingToContainer):
(WebCore::RenderObject::mapAbsoluteToLocalPoint):
(WebCore::RenderObject::offsetFromContainer):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::hitInnerTextElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165537 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] "Tools/jhbuild/jhbuild-wrapper --gtk" build fails even after running Tools/gtk/install-dependencies due to missing proper libxml2 python bindings
https://bugs.webkit.org/show_bug.cgi?id=130092

Patch by Andres Gomez <agomez@igalia.com> on 2014-03-13
Reviewed by Csaba Osztrogonác.

Added "python-dev" as dependency for deb based distros. It is
already present for rpm based distros. This dependency will allow
libxml2 to generate its python bindings, needed by gtk-doc.

* gtk/install-dependencies:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the !ENABLE(SQL_DATABASE) build
https://bugs.webkit.org/show_bug.cgi?id=130130

Patch by Laszlo Vidacs <lvidacs.u-szeged@partner.samsung.com> on 2014-03-13
Reviewed by Csaba Osztrogonác.

Add missing #ifdef guard to typedef.

* UIProcess/API/C/WKDatabaseManager.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165539 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel rendering: Nested layers with subpixel accumulation paint to wrong position.
https://bugs.webkit.org/show_bug.cgi?id=130153

Patch by Zalan Bujtas <zalan@apple.com> on 2014-03-13
Reviewed by Simon Fraser.

Subpixels (fractional device pixels here) can accumulate through nested layers. Subpixels
need to be propagated through the layer tree so that painting coordinates match layout coordinates.

Compositing case: (absolute positioning, 2x display)
parent layer pos(0.3, 0.3) -> floored painting position (0, 0)
child layer pos(10.2, 10.2) -> layout offset from parent (10.2, 10.2),
but the actual painting offset is (10.5, 10.5) as the result of parent flooring.

Non-compositing case: (absolute positioning, 2x display)
parent layer pos(0.3, 0.3) -> GraphicsContext is translated to (0, 0).
child layer pos(10.2, 10.2) -> layout offset from parent (10.2, 10.2)
but the GraphicsContext's offset is (10.5, 10.5) as the result of the parent's translate.

In both cases, without the subpixel adjustment, we'd paint the current layer at (10.0, 10.0)
after flooring, while its painting position is actually (10.5, 10.5).
Subpixels do accumulate through nested layers.

Source/WebCore:

Tests: compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation.html
       fast/layers/hidpi-nested-layers-with-subpixel-accumulation.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerByApplyingTransform):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
* rendering/RenderLayerBacking.h:
(WebCore::RenderLayerBacking::devicePixelFractionFromRenderer):

LayoutTests:

* compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation-expected.html: Added.
* compositing/hidpi-nested-compositing-layers-with-subpixel-accumulation.html: Added.
* fast/layers/hidpi-nested-layers-with-subpixel-accumulation-expected.html: Added.
* fast/layers/hidpi-nested-layers-with-subpixel-accumulation.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165540 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] build-webkit shouldn't show error message when ninja isn't installed
https://bugs.webkit.org/show_bug.cgi?id=130129

Patch by Jozsef Berta <jberta.u-szeged@partner.samsung.com> on 2014-03-13
Reviewed by Csaba Osztrogonác.

* Scripts/webkitdirs.pm:
(canUseNinja): Redirecting stderr to /dev/null

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove StyleResolver::State::m_parentNode
https://bugs.webkit.org/show_bug.cgi?id=130194

Reviewed by Andreas Kling.

This variable was the "parent" node where the style was being inherited from, not the actual parent.
The code would also recompute it even though the call sites generally know the rendering parent already.

If we consistently pass parent style to StyleResolver::styleForElement we won't need the variable and
the associated code. We also get rid of one more client of NodeRenderingTraversal.

* css/MediaQueryMatcher.cpp:
(WebCore::MediaQueryMatcher::prepareEvaluator):
* css/SVGCSSStyleSelector.cpp:
(WebCore::StyleResolver::applySVGProperty):
* css/StyleMedia.cpp:
(WebCore::StyleMedia::matchMedium):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::State::clear):
(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::State::initForStyleResolve):
(WebCore::StyleResolver::applyProperty):
* css/StyleResolver.h:
(WebCore::StyleResolver::document):
(WebCore::StyleResolver::State::State):
* dom/Element.cpp:
(WebCore::Element::customStyleForRenderer):
        
    Add parentStyle parameter.

* dom/Element.h:
* dom/PseudoElement.cpp:
(WebCore::PseudoElement::customStyleForRenderer):
* dom/PseudoElement.h:
* html/HTMLOptGroupElement.cpp:
(WebCore::HTMLOptGroupElement::didAttachRenderers):
(WebCore::HTMLOptGroupElement::updateNonRenderStyle):
(WebCore::HTMLOptGroupElement::customStyleForRenderer):
* html/HTMLOptGroupElement.h:
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::didAttachRenderers):
(WebCore::HTMLOptionElement::updateNonRenderStyle):
(WebCore::HTMLOptionElement::customStyleForRenderer):
* html/HTMLOptionElement.h:
* html/HTMLTitleElement.cpp:
(WebCore::HTMLTitleElement::textWithDirection):
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlInnerElement::customStyleForRenderer):
(WebCore::TextControlInnerTextElement::customStyleForRenderer):
* html/shadow/TextControlInnerElements.h:
* rendering/RenderNamedFlowFragment.cpp:
(WebCore::RenderNamedFlowFragment::computeStyleInRegion):
(WebCore::RenderNamedFlowFragment::computeChildrenStyleInRegion):
(WebCore::RenderNamedFlowFragment::setRegionObjectsRegionStyle):
* rendering/RenderNamedFlowFragment.h:
* style/StyleResolveTree.cpp:
(WebCore::Style::styleForElement):
        
    This used to be Element::styleForRenderer. It is now a standalone static.

(WebCore::Style::elementInsideRegionNeedsRenderer):
(WebCore::Style::createRendererIfNeeded):
(WebCore::Style::resolveLocal):
* svg/SVGElement.cpp:
(WebCore::SVGElement::customStyleForRenderer):
* svg/SVGElement.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix iOS build.

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



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Optimize hasTagName when called on an HTMLElement
https://bugs.webkit.org/show_bug.cgi?id=130090

Reviewed by Antti Koivisto.

Added new hasTagName functions that have the efficiency of hasLocalName.
but are safe.

Now we can always use hasTagName, and we'll get a compile time error if
we try to use an SVG tag name with an HTML element. All call sites that
use the more specific tag name types are more efficient, and call sites
that have a specific pointer type will get even more efficient checking
that is exactly what we used to get by calling hasLocalName.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasTagName): Cast explicitly to Element
since Node::hasTagName no longer works on a general QualifiedName.
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::isDescendantOfElementType): Use
more specific type, RenderElement, so we can call hasTagName on Element
instead of Node; eliminates an unnecessary branch.

* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets): Use
new for loop and full words for variable names. Also use nullptr instead
of 0. Call toHTMLElement and toSVGElement in code that checks hasTagName
since it's already checking isHTMLElement and isSVGElement.

* dom/Element.cpp:
(WebCore::attrNodeListMap): Use NeverDestroyed and put the vectors into
the map rather than putting pointers to a vector into the map.
(WebCore::attrNodeListForElement): Take a reference rather than a pointer,
and update for the change above.
(WebCore::ensureAttrNodeListForElement): Ditto.
(WebCore::removeAttrNodeListForElement): Ditto.
(WebCore::findAttrNodeInList): Ditto.
(WebCore::Element::isFocusable): Use ancestorsOfType<HTMLCanvasElement>
to fine the canvas rather than a hand-written loop.
(WebCore::Element::attrNodeList): Update for above changes.
(WebCore::Element::setAttributeNode): Ditto.
(WebCore::Element::attrIfExists): Ditto.
(WebCore::Element::ensureAttr): Ditto.
(WebCore::Element::detachAttrNodeFromElementWithValue): Ditto.
(WebCore::Element::detachAllAttrNodesFromElement): Ditto.

* dom/Element.h: Removed the overload of hasLocalName that takes a
QualifiedName and ignores the non-local-name parts of it. Callers should
use hasTagName instead, now that it's optimized appropriately. Added
overloads of hasTagName for all the specific qualified name types. It's
more efficient to use the Node versions of these functions rather than
using QualifiedName::matches to do the check. Removed the hasTagName and
hasLocalName functions from the Node class; the only convenience functions
needed in Node are the specific checks for tags from HTML, MathML, and SVG,
not the general purpose ones.

* dom/Node.h: Removed hasLocalName and replaced the single hasTagName
that takes a QualifiedName with three faster ones that take HTML, MathML,
and SVG qualified names instead. Also updated to use nullptr instead of 0.

* dom/PositionIterator.cpp: Added now-needed include.
* dom/Text.cpp: Ditto.

* dom/make_names.pl:
(printHeaderHead): Renamed an argument for clarity and added a definitions
argument, which is where we insert the classes derived from QualifiedName.
(printCppHead): Renamed an argument for clarity.
(printTypeHelpers): Use hasTagName rather than hasLocalName, since the
former is now optimized to be the same as what the latter was.
(printNamesHeaderFile): Define a class derived from QualifiedName that can
be used at compile time to avoid having to check the namespace.
(printNamesCppFile): Use the new more-specific type as needed.

* editing/ApplyStyleCommand.cpp:
(WebCore::isLegacyAppleStyleSpan): Use hasTagName instead of hasLocalName,
and references instead of pointers.
(WebCore::ApplyStyleCommand::ApplyStyleCommand): Removed uneeded explicit
construction of a smart pointer.
(WebCore::ApplyStyleCommand::shouldApplyInlineStyleToRun): Updated to use
the enclosingElementWithTag function by its new name.

* editing/Editor.cpp:
(WebCore::Editor::selectionUnorderedListState): Updated to use the
enclosingElementWithTag function by its new name.
(WebCore::Editor::selectionOrderedListState): Ditto.

* editing/InsertListCommand.cpp:
(WebCore::InsertListCommand::doApply): Use a more-specific type for the list tag.
(WebCore::InsertListCommand::doApplyForSingleParagraph): Ditto.
* editing/InsertListCommand.h: Ditto.

* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::serializeNodesWithNamespaces): Added an explicit
cast to Element in the loop that is already guarded by an isElementNode check.
Also use a modern C++ for loop.

* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
Updated to use the enclosingElementWithTag function by its new name.
(WebCore::ReplaceSelectionCommand::removeUnrenderedTextNodesAtEnds): Ditto.
(WebCore::ReplaceSelectionCommand::positionAtEndOfInsertedContent): Ditto.

* editing/TypingCommand.cpp: Added now-needed includes.
* editing/VisibleUnits.cpp: Ditto.

* editing/htmlediting.cpp:
(WebCore::enclosingElementWithTag): Changed to return an Element instead of a Node,
since nodes other than elements do not have tags.
* editing/htmlediting.h: Ditto.

* editing/mac/EditorMac.mm:
(WebCore::Editor::adjustedSelectionRange): Updated to use the enclosingElementWithTag
function by its new name.
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::appendText): Ditto.
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization): Ditto.
(WebCore::highestAncestorToWrapMarkup): Ditto.
(WebCore::createMarkupInternal): Ditto.
(WebCore::createContextualFragment): Ditto. Use hasTagName instead of hasLocalName,
since the former is now optimized to be the same as the latter was before.

* html/HTMLCollection.cpp:
(WebCore::isMatchingElement): Use hasTagName instead of hasLocalName,
since the former is now optimized to be the same as the latter was before.
(WebCore::nameShouldBeVisibleInDocumentAll): Ditto.
* html/HTMLElement.cpp:
(WebCore::HTMLElement::ieForbidsInsertHTML): Ditto.
(WebCore::unicodeBidiAttributeForDirAuto): Ditto.
(WebCore::HTMLElement::parseBorderWidthAttribute): Ditto.
(WebCore::HTMLElement::setInnerHTML): Ditto.
(WebCore::shouldProhibitSetInnerOuterText): Ditto. Added this to share code between
setInnerText and setOuterText.
(WebCore::HTMLElement::setInnerText): Ditto.
(WebCore::HTMLElement::setOuterText): Ditto.
(WebCore::HTMLElement::rendererIsNeeded): Ditto.
(WebCore::HTMLElement::createElementRenderer): Ditto.

* html/HTMLElement.h: Added hasTagName, which hides the one inherited from Element
and takes the more-specific HTMLQualifiedName type. This means we don't need to check
the namespace at runtime because it's known at compile time. Also put the
implementation of Node::hasTagName for HTMLQualifiedName into this header.

* html/HTMLObjectElement.cpp:
(WebCore::isRecognizedTagName): Updated for change in return type of
HTMLNames::getHTMLTags.

* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::add): Use hasTagName inastead of hasLocalName.
(WebCore::HTMLSelectElement::value): Use isHTMLOptionElement instead of hasTagName.
Also use a new style for loop and emptyString() instead of "".
(WebCore::HTMLSelectElement::setValue): Ditto.
(WebCore::HTMLSelectElement::setLength): Ditto.
(WebCore::HTMLSelectElement::searchOptionsForValue): Ditto.
(WebCore::HTMLSelectElement::restoreFormControlState): Ditto.

* html/HTMLTableColElement.cpp:
(WebCore::HTMLTableColElement::additionalPresentationAttributeStyle): Use hasTagName
instead of hasLocalName.

* html/HTMLTableRowsCollection.cpp:
(WebCore::isInSection): Updated to use hasTagName and take a reference.
(WebCore::HTMLTableRowsCollection::rowAfter): Pass a reference.

* html/parser/HTMLConstructionSite.cpp: Added now-needed include.

* html/parser/HTMLTreeBuilder.cpp:
(WebCore::createCaseMap): Updated to return a map rather than filling one in, and to
be flxible about the type of the table being used.
(WebCore::adjustSVGTagNameCase): Updated to use NeverDestroyed.
(WebCore::adjustAttributes): Added new helper so we can share more code. Updated
template argument names for clarity.
(WebCore::adjustSVGAttributes): Marked this inline, since it just turns around and
calls a single non-inline function.
(WebCore::adjustMathMLAttributes): Ditto.
(WebCore::addNamesWithPrefix): Changed to take argument by reference instead of pointer.
(WebCore::createForeignAttributesMap): Added. Factors out the map creation from the
function below.
(WebCore::adjustForeignAttributes): Updated for above changes.
(WebCore::HTMLTreeBuilder::processStartTagForInBody): Updated to pass reference.
(WebCore::HTMLTreeBuilder::processTokenInForeignContent): Ditto.

* inspector/InspectorStyleSheet.cpp: Added now-needed include.

* mathml/MathMLElement.h: Added hasTagName, which hides the one inherited from Element
and takes the more-specific MathMLQualifiedName type. This means we don't need to check
the namespace at runtime because it's known at compile time. Also put the
implementation of Node::hasTagName for MathMLQualifiedName into this header.

* mathml/MathMLInlineContainerElement.cpp:
(WebCore::MathMLInlineContainerElement::createElementRenderer): Use hasTagName.

* mathml/MathMLSelectElement.cpp:
(WebCore::MathMLSelectElement::attributeChanged): Use hasTagName.
(WebCore::MathMLSelectElement::getSelectedActionChildAndIndex): Ditto.
(WebCore::MathMLSelectElement::getSelectedActionChild): Ditto.
(WebCore::MathMLSelectElement::getSelectedSemanticsChild): Ditto.
(WebCore::MathMLSelectElement::updateSelectedChild): Ditto.
* mathml/MathMLTextElement.cpp:
(WebCore::MathMLTextElement::createElementRenderer): Ditto.
(WebCore::MathMLTextElement::childShouldCreateRenderer): Ditto.

* platform/mac/HTMLConverter.mm: Added now-needed include.
* rendering/RenderBlockFlow.cpp: Ditto.

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): Use hasTagName.
* rendering/RenderElement.cpp:
(WebCore::RenderElement::rendererForRootBackground): Ditto.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer): Ditto.

* rendering/RenderReplaced.cpp: Added now-needed include.

* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::RenderMathMLScripts): Use hasTagName.
* rendering/mathml/RenderMathMLUnderOver.cpp:
(WebCore::RenderMathMLUnderOver::RenderMathMLUnderOver): Ditto.

* svg/SVGElement.h: Added hasTagName, which hides the one inherited from Element
and takes the more-specific SVGQualifiedName type. This means we don't need to check
the namespace at runtime because it's known at compile time. Also put the
implementation of Node::hasTagName for SVGQualifiedName into this header.

* svg/SVGFontFaceSrcElement.cpp:
(WebCore::SVGFontFaceSrcElement::childrenChanged): Use isSVGFontFaceElement instead
of calling hasTagName.

* svg/SVGUseElement.cpp:
(WebCore::isDirectReference): Changed to take a reference and a more specific type.
(WebCore::SVGUseElement::toClipPath): Added a type cast.
(WebCore::SVGUseElement::rendererClipChild): Use more specific types so we don't
need a type cast.

* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::parseDocumentFragment): Added explicit calls to this
unusual call site that has a good reason to use hasLocalName instead of hasTagName.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165544 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Remove unused callId parameter from evaluateInWebInspector
https://bugs.webkit.org/show_bug.cgi?id=129744

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

* inspector/agents/InspectorAgent.cpp:
(Inspector::InspectorAgent::enable):
(Inspector::InspectorAgent::evaluateForTestInFrontend):
* inspector/agents/InspectorAgent.h:
* inspector/protocol/InspectorDomain.json:

Source/WebCore:

* WebCore.exp.in:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::evaluateForTestInFrontend):
* inspector/InspectorController.h:

Source/WebInspectorUI:

* UserInterface/Protocol/InspectorJSBackendCommands.js:
* UserInterface/Protocol/InspectorObserver.js:
(WebInspector.InspectorObserver.prototype.evaluateForTestInFrontend):

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::evaluateInWebInspector):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Source/WebKit/gtk:

* webkit/webkitwebinspector.cpp:
(webkit_web_inspector_execute_script):
* webkit/webkitwebinspectorprivate.h:

Source/WebKit/mac:

* WebInspector/WebInspector.mm:
(-[WebInspector evaluateInFrontend:script:]):
* WebInspector/WebInspectorPrivate.h:

Source/WebKit/win:

* WebInspector.cpp:
(WebInspector::evaluateInFrontend):
* WebInspector.h:

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
(WKBundleInspectorEvaluateScriptForTest):
* WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::evaluateScriptForTest):
* WebProcess/WebPage/WebInspector.h:

Tools:

* DumpRenderTree/TestRunner.cpp:
(evaluateInWebInspectorCallback):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/efl/TestRunnerEfl.cpp:
(TestRunner::evaluateInWebInspector):
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
(TestRunner::evaluateInWebInspector):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::evaluateInWebInspector):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::evaluateInWebInspector):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::evaluateInWebInspector):
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

* inspector/inspector-test.js:
(runTest): Stop passing a dummy argument to TestRunner.evaluateInWebInspector.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165545 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid copy-prone idiom "for (auto item : collection)"
https://bugs.webkit.org/show_bug.cgi?id=129990

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* heap/CodeBlockSet.h:
(JSC::CodeBlockSet::iterate): Use auto& to be sure we don't copy by accident.
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchBreakpointActionLog): Use auto* to
make explicit that we are iterating through pointers.
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound): Ditto.
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe): Ditto.
* inspector/agents/InspectorDebuggerAgent.cpp:
(Inspector::InspectorDebuggerAgent::removeBreakpoint): Use auto&, and also
get rid of an unneeded local variable.

Source/WebCore:

Most of these changes have no effect. A few of them get rid of unwanted
copying of the items as we iterate them. Found these with the command
'git grep "for (auto .*:"' or the equivalent.

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::IDBKeyData): Use auto& to avoid copying the keys.
(WebCore::IDBKeyData::maybeCreateIDBKey): Ditto.
(WebCore::IDBKeyData::isolatedCopy): Ditto.

* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches): Use auto*
to make explicit the fact that these are pointers. Stop using "it" for
a variable that is not an iterator. Get rid of unneeded local variables
for the collections themselves.

* dom/NodeRareData.h:
(WebCore::NodeListsNodeData::adoptDocument): Use auto& to make sure we
don't do any unnecessary copying. Stop using "it" for a variable that
is not an iterator.

* html/HTMLTableRowsCollection.cpp:
(WebCore::HTMLTableRowsCollection::lastRow): Use auto* to be explicit
that these are pointers.
* inspector/InspectorNodeFinder.cpp:
(WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal): Ditto.
* page/ios/FrameIOS.mm:
(WebCore::Frame::interpretationsForCurrentRoot): Ditto. Also got rid of
an unnecessary local variable.

* platform/FileChooser.cpp:
(WebCore::FileChooser::chooseFiles): Use auto&. Also fix a FIXME.
(WebCore::FileChooser::chooseMediaFiles): Ditto.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::naturalSize): Use auto&.

* rendering/RenderIterator.h: Changed include from RenderObject.h to
RenderElement.h; iterators are based on RenderElement now.

* rendering/svg/RenderSVGResource.cpp:
(WebCore::removeFromCacheAndInvalidateDependencies): Use auto*.

* rendering/svg/RenderSVGResourceContainer.cpp:
(WebCore::RenderSVGResourceContainer::markAllClientsForInvalidation): Use auto*.
(WebCore::RenderSVGResourceContainer::markAllClientLayersForInvalidation): Ditto.
(WebCore::RenderSVGResourceContainer::registerResource): Ditto.

* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::layoutChildren): Updated to use a more specific
type, to use auto* instead of of auto, and to eliminate the slightly sloppily
capitalized and not-so-slightly ungrammatical notlayoutedObjects.
(WebCore::SVGRenderSupport::applyStrokeStyleToContext): Use auto&.
(WebCore::SVGRenderSupport::updateMaskedAncestorShouldIsolateBlending): Use auto*.

* rendering/svg/SVGResourcesCycleSolver.cpp:
(WebCore::SVGResourcesCycleSolver::resourceContainsCycles): Use auto*.
(WebCore::SVGResourcesCycleSolver::resolveCycles): Ditto. Also lineageOfType.

* svg/SVGAnimateMotionElement.cpp:
(WebCore::SVGAnimateMotionElement::applyResultsToTarget): Use auto*.
* svg/SVGPathElement.cpp:
(WebCore::SVGPathElement::invalidateMPathDependencies): Ditto.

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _documentFragmentWithNodesAsParagraphs:]):
Use auto*. Also removed uneeded ASSERT_NO_EXCEPTION, which is already
the default without specifying it explicitly.

Source/WebKit2:

* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
even though the type is a scalar. This does no harm and makes it easier
to spot uses that trigger unnecessary copying with grep.
(WebKit::RemoteLayerTreeTransaction::decode): Ditto.
(WebKit::dumpChangedLayers): Ditto.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::visitedLinkStateChanged): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix release build.

* css/MediaQueryMatcher.cpp:
* css/StyleMedia.cpp:
* html/HTMLTitleElement.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165547 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't send synchronous resize events when FrameView has auto-sizing enabled.
<https://webkit.org/b/130198>
<rdar://problem/15991333>

Reviewed by Dan Bernstein.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Webkit not building on XCode 5.1 due to garbage collection no longer being supported
https://bugs.webkit.org/show_bug.cgi?id=130087

Patch by Radu Stavila <stavila@adobe.com> on 2014-03-13
Reviewed by Mark Rowe.

Disable garbage collection on macosx when not using internal SDK.

Source/JavaScriptCore:

* Configurations/Base.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig:

Source/WebCore:

No new tests required.

* Configurations/Base.xcconfig:

Source/WebKit/mac:

* Configurations/Base.xcconfig:

Source/WebKit2:

* Configurations/Base.xcconfig:

Source/WTF:

* Configurations/Base.xcconfig:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Close the connection when we fail to read from the socket for any unhandled error
https://bugs.webkit.org/show_bug.cgi?id=130191

Reviewed by Martin Robinson.

We currently show an error message, but we should close the
connection avoid entering an infinite loop. Also provide more
information in the error message to help when debugging the issue.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::readyReadHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Sync media playback with now playing
https://bugs.webkit.org/show_bug.cgi?id=130172

Reviewed by Jer Noble.
        
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::play): Move clientWillBeginPlayback to
    playInternal so it is called every time playback begins.
(WebCore::HTMLMediaElement::playInternal): Call clientWillBeginPlayback.
(WebCore::HTMLMediaElement::pause): Move clientWillPausePlayback to
    playInternal so it is called every time playback begins.
(WebCore::HTMLMediaElement::playInternal): Call clientWillPausePlayback.
(WebCore::HTMLMediaElement::mediaSessionTitle): New. Return the 'title' attribute,
    or currenSrc if that is empty.
* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::mediaSessionDuration): Return duration.
(WebCore::HTMLMediaElement::mediaSessionCurrentTime): Return current time.

* platform/audio/MediaSession.cpp:
(WebCore::MediaSession::clientWillPausePlayback): New, passthrough to the
    media element.
(WebCore::MediaSession::title): Ditto.
(WebCore::MediaSession::duration): Ditto.
(WebCore::MediaSession::currentTime): Ditto.
* platform/audio/MediaSession.h:
(WebCore::MediaSessionClient::mediaSessionTitle):
(WebCore::MediaSessionClient::mediaSessionDuration):
(WebCore::MediaSessionClient::mediaSessionCurrentTime):

* platform/audio/MediaSessionManager.cpp:
(WebCore::MediaSessionManager::MediaSessionManager): Initialize m_activeSession.
(WebCore::MediaSessionManager::removeSession): Set m_activeSession if the session
    being removed is currently active.
(WebCore::MediaSessionManager::sessionWillBeginPlayback): Set m_activeSession.
* platform/audio/MediaSessionManager.h:
(WebCore::MediaSessionManager::sessionWillEndPlayback):
(WebCore::MediaSessionManager::setCurrentSession):
(WebCore::MediaSessionManager::currentSession):

* platform/audio/ios/MediaSessionManagerIOS.h:
* platform/audio/ios/MediaSessionManagerIOS.mm:
(WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Call updateNowPlayingInfo. 
(WebCore::MediaSessionManageriOS::sessionWillEndPlayback): Ditto.
(WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Update MPNowPlayingInfoCenter
    with the current media item's title, duration, and current time.
(-[WebMediaSessionHelper initWithCallback:]): Turn on deliver of remote control
    events, even though we don't respond to them yet, or Now Playing won't work.


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