[Qt] Improve the handling of mock geolocation, device orientation and motion clients

Reviewed by Tor Arne Vestbø.

The mock versions of these web facing features should be instantiated when
running in DumpRenderTree only. In order for them to work, no extra Qt modules
such as QtLocation are actually needed.

This patch decouples enabling device orientation/motion and geolocation from
the underlying Qt modules and makes them available in developer builds
(!production_build) and backed by mock backends when running in drt.

So if the Qt 5 modules are available, they'll be used (unless drtRun). For
developers the web facing features are always enabled (although requests will
time out) and the mock backends are enabled inside DRT, allowing for the layout
tests to run with less dependencies.

In addition this also enables the mock device motion client, which was
previously never instantiated.

.:

* Source/widgetsapi.pri:

Source/WebCore:

* Target.pri:
* WebCore.pri:

Source/WebKit:

* WebKit1.pri:
* WebKit1.pro:

Source/WebKit/qt:

* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebFrameAdapter::_q_orientationChanged):
* WebCoreSupport/QWebFrameAdapter.h:
* WebCoreSupport/QWebPageAdapter.cpp:
(QWebPageAdapter::initializeWebCorePage):
* WebCoreSupport/QWebPageAdapter.h:
* WidgetApi/qwebframe.cpp:
(QWebFrame::QWebFrame):
* WidgetApi/qwebpage.cpp:
(QWebPage::setFeaturePermission):

Source/WebKit2:

* Target.pri:
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformInitializeWebProcess):
* UIProcess/qt/WebGeolocationProviderQt.cpp:
* WebKit2.pri:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):

Tools:

* qmake/mkspecs/features/features.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145805 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Synchronize layers only if the layer has been changed.
https://bugs.webkit.org/show_bug.cgi?id=112095

Patch by No'am Rosenthal <noam@webkit.org> on 2013-03-14
Reviewed by Allan Sandfeld Jensen.

A regression was introduced in r144787, causing an infinite IPC commitState/renderNextFrame
loop.
This patch fixes this by making sure we only commit layer states that have actual pending
changes.

No new tests, this is an optimization.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
(CoordinatedGraphicsLayerState):
(WebCore::CoordinatedGraphicsLayerState::hasPendingChanges):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145806 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Flame Chart. Support scroll and zoom with help of mouse wheel.
https://bugs.webkit.org/show_bug.cgi?id=112337

Reviewed by Yury Semikhatsky.

New member variable _xOffset were introduced.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart):
(WebInspector.FlameChart.prototype._onMouseMove):
(WebInspector.FlameChart.prototype._adjustXOffset):
(WebInspector.FlameChart.prototype._adjustXScale):
(WebInspector.FlameChart.prototype._onMouseWheel):
(WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
(WebInspector.FlameChart.prototype.onResize):
(WebInspector.FlameChart.prototype.draw):
(WebInspector.FlameChart.prototype._scheduleUpdate):
(WebInspector.FlameChart.prototype.update):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145807 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Wrong ASSERT in AudioDestinationGstreamer::stop
https://bugs.webkit.org/show_bug.cgi?id=112344

Patch by Xan Lopez <xlopez@igalia.com> on 2013-03-14
Reviewed by Philippe Normand.

Correct erroneous ASSERT, we want both member variables to exist.

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::stop):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: do not aggregate non-main thread timeline events, handle them in a generic fashion
https://bugs.webkit.org/show_bug.cgi?id=112172

Reviewed by Vsevolod Vlasov.

- build nested event trees for non-main thread events similar to how it's done on the main thread;
- drop aggregation logic for Rasterize events;
- extract time conversion logic so that it may be reused in TimelineTraceEventProcessor.

* English.lproj/localizedStrings.js: drive-by: drop duplicate line.
* inspector/InspectorTimelineAgent.cpp:
(WebCore::TimelineTimeConverter::reset):
(WebCore):
(WebCore::InspectorTimelineAgent::pushGCEventRecords):
(WebCore::InspectorTimelineAgent::start):
(WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
(WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::appendRecord):
(WebCore::InspectorTimelineAgent::sendEvent):
(WebCore::InspectorTimelineAgent::timestamp):
* inspector/InspectorTimelineAgent.h:
(TimelineTimeConverter):
(WebCore::TimelineTimeConverter::TimelineTimeConverter):
(WebCore::TimelineTimeConverter::fromMonotonicallyIncreasingTime):
(WebCore):
(InspectorTimelineAgent):
(WebCore::InspectorTimelineAgent::timeConverter):
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createBackgroundRecord):
(WebCore):
* inspector/TimelineRecordFactory.h:
(TimelineRecordFactory):
* inspector/TimelineTraceEventProcessor.cpp:
(WebCore::TimelineRecordStack::TimelineRecordStack):
(WebCore):
(WebCore::TimelineRecordStack::addScopedRecord):
(WebCore::TimelineRecordStack::closeScopedRecord):
(WebCore::TimelineRecordStack::addInstantRecord):
(WebCore::TimelineRecordStack::isOpenRecordOfType):
(WebCore::TimelineRecordStack::send):
(WebCore::TimelineTraceEventProcessor::TimelineTraceEventProcessor):
(WebCore::TimelineTraceEventProcessor::onBeginFrame):
(WebCore::TimelineTraceEventProcessor::onRasterTaskBegin):
(WebCore::TimelineTraceEventProcessor::onRasterTaskEnd):
(WebCore::TimelineTraceEventProcessor::createRecord):
* inspector/TimelineTraceEventProcessor.h:
(TimelineRecordStack):
(WebCore::TimelineRecordStack::Entry::Entry):
(Entry):
(WebCore::TimelineRecordStack::TimelineRecordStack):
(WebCore):
(WebCore::TimelineTraceEventProcessor::TimelineThreadState::TimelineThreadState):
(TimelineThreadState):
(TimelineTraceEventProcessor):
(WebCore::TimelineTraceEventProcessor::TraceEvent::TraceEvent):
(WebCore::TimelineTraceEventProcessor::TraceEvent::isNull):
(WebCore::TimelineTraceEventProcessor::threadState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145809 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Add support for tiled shadow blur
https://bugs.webkit.org/show_bug.cgi?id=90082

Reviewed by Noam Rosenthal.

Use the optimized ShadowBlur::drawRectShadow as long as we do not
have a rotating transform. Such a transform would go through the
slow path in ShadowBlur anyway, and would end up using a transformed
TransparencyLayer with an alphaMap which causes scaling artifacts
for us.

Tested by fast/canvas/canvas-scale-fillRect-shadow.html
and fast/canvas/canvas-transforms-fillRect-shadow.html

* platform/graphics/ShadowBlur.cpp:
(WebCore::ShadowBlur::drawInsetShadowWithTiling):
    Handle scaling transforms when shadows ignore transforms.
(WebCore::ShadowBlur::drawRectShadowWithTiling):
    Ditto.
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::fillRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Stopping playback of html5 media when receiving a higher priority audio event needs implementation
https://bugs.webkit.org/show_bug.cgi?id=91611

Source/WebCore:

React to REQUEST_STATE GStreamer message to stop the pipeline when
a higher priority stream is played. When this happens, states are
updated accordingly.

A method was added in the MediaPlayer class and internals to allow
the the test runner to simulate an audio interruption.

Patch by Xabier Rodriguez Calvar <calvaris@igalia.com> on 2013-03-14
Reviewed by Philippe Normand.

Test: media/media-higher-prio-audio-stream.html

* platform/graphics/MediaPlayer.h:
* platform/graphics/MediaPlayer.cpp:
(WebCore):
(MediaPlayer):
(WebCore::MediaPlayer::simulateAudioInterruption): New method
delegating an audio interruption to the private backend to
simulate the use-case where an external application needs
exclusive access to the audio device.
* platform/graphics/MediaPlayerPrivate.h:
(MediaPlayerPrivateInterface):
(WebCore::MediaPlayerPrivateInterface::simulateAudioInterruption):
Added default empty method in the common private header.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore):
(WebCore::MediaPlayerPrivateGStreamer::createAudioSink):
(WebCore::setAudioStreamPropertiesCallback): Hooked to child-added
signal on the audio sink, delegates on setAudioStreamProperties.
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
Sets the audio stream properties.
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
Initializes the new attribute.
(WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
Disconnects autoaudiosink signal.
(WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
Changed logging.
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Reacting to
the REQUEST_STATE message.
(WebCore::MediaPlayerPrivateGStreamer::simulateAudioInterruption):
Added. Injects the REQUEST_STATE message to the pipeline.
(WebCore::MediaPlayerPrivateGStreamer::updateStates): Updating the
playback state if REQUEST_STATE.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
(MediaPlayerPrivateGStreamer): Added new method and attribute.
* testing/Internals.h:
* testing/Internals.idl:
* testing/Internals.cpp:
(WebCore):
(WebCore::Internals::simulateAudioInterruption): Added to call the
method to stop the element because of a higher prio stream at the
tests.

LayoutTests:

Created test, expected result and updated other ports
expectations.

Patch by Xabier Rodriguez Calvar <calvaris@igalia.com> on 2013-03-14
Reviewed by Philippe Normand.

* media/media-higher-prio-audio-stream-expected.txt: Added.
* media/media-higher-prio-audio-stream.html: Added.
* platform/chromium/TestExpectations: Skipped the new test.
* platform/mac/TestExpectations: Skipped the new test.
* platform/qt/TestExpectations: Skipped the new test for Mac and
Win.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145811 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] Add an API for adding and removing user style sheets from a page group
https://bugs.webkit.org/show_bug.cgi?id=110728

Patch by Jinwoo Song <jinwoo7.song@samsung.com> on 2013-03-14
Reviewed by Gyuyoung Kim.

Source/WebKit2:

This patch implements EwkPageGroup API to provide the interface of WKPageGroup. Using the EwkPageGroup,
applications may create the views with a page group for the specific identifier. Also, this patch
encapsulates the APIs WKPageGroupAddUserStyleSheet and WKPageGroupRemoveAllUserStyleSheets behind
the EwkPageGroup class for adding and removing user style sheets from a page group. WKArrayCreateWithEinaList()
is added as a generic WKArray creation API from Eina_List.

* PlatformEfl.cmake:
* UIProcess/API/C/efl/WKView.cpp:
(createWKView):
* UIProcess/API/efl/EWebKit2.h:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::createEvasObject):
* UIProcess/API/efl/EwkView.h:
(EwkView::ewkPageGroup):
(EwkView):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_smart_add):
(ewk_view_page_group_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
(EWK2UnitTest::EWK2UnitTestBase::setWebView):
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):

Tools:

Use the page group to create the view object.

* MiniBrowser/efl/main.c:
(window_create):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Disable DRT on Windows

Reviewed by Jocelyn Turcotte.

We don't run and maintain DRT on Windows, so let's not try to maintain the build of it.

* qmake/mkspecs/features/configure.prf:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145813 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] GraphicsContext3D: implement ImageExtractor::extractImage()
https://bugs.webkit.org/show_bug.cgi?id=112242

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-14
Reviewed by Rob Buis.

In r136282 GraphicsContext3D::getImageData() was refactored in a
new class called ImageExtractor.

This patch implements the necessary changes for the BlackBerry
port, which is still using the old API.

* platform/graphics/GraphicsContext3D.h:
(ImageExtractor):
* platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::~ImageExtractor):
(WebCore):
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145814 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fixed styles pane visibility when docked to right.
https://bugs.webkit.org/show_bug.cgi?id=112348

Patch by Vladislav Kaznacheev <kaznacheev@chromium.org> on 2013-03-14
Reviewed by Pavel Feldman.

* inspector/front-end/ElementsPanel.js:
(WebInspector.ElementsPanel.prototype._splitVertically):
* inspector/front-end/SidebarPane.js:
(WebInspector.SidebarPane.prototype.setExpandCallback):
(WebInspector.SidebarPaneTitle):
(WebInspector.SidebarTabbedPane.prototype.addPane):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145815 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: keep deprecated function stubs in InspectorFrontendHost.
https://bugs.webkit.org/show_bug.cgi?id=112347

Reviewed by Vsevolod Vlasov.

In order to open older front-ends in newer hosts, we need to keep stubs
for deprecated functions. Longer term, we need to wrap all calls to InspectorFrontendHost in the front-end.

* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::canInspectWorkers):
(WebCore):
(WebCore::InspectorFrontendHost::hiddenPanels):
* inspector/InspectorFrontendHost.h:
(InspectorFrontendHost):
* inspector/InspectorFrontendHost.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145816 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Not reviewed: chromium expectations updated.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace static_casts with to* helper functions.
https://bugs.webkit.org/show_bug.cgi?id=112296

Reviewed by Kentaro Hara.

to* helper functions are preferred over static_cast calls since they
help to catch bad casts easily on the testing infrastructure.

Source/WebCore:

* accessibility/AXObjectCache.cpp:
(WebCore::nodeHasRole):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::hasAttribute):
(WebCore::AccessibilityObject::getAttribute):
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::anchorElement):
(WebCore::AccessibilityRenderObject::helpText):
(WebCore::AccessibilityRenderObject::checkboxOrRadioRect):
(WebCore::AccessibilityRenderObject::titleUIElement):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
(WebCore::AccessibilityRenderObject::accessKey):
(WebCore::AccessibilityRenderObject::setElementAttributeValue):
(WebCore::AccessibilityRenderObject::setValue):
(WebCore::AccessibilityRenderObject::activeDescendant):
(WebCore::AccessibilityRenderObject::handleActiveDescendantChanged):
(WebCore::AccessibilityRenderObject::correspondingLabelForControlElement):
(WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
(WebCore::AccessibilityRenderObject::setAccessibleName):
(WebCore::AccessibilityRenderObject::stringRoleForMSAA):
* bindings/gobject/WebKitDOMBinding.cpp:
(WebKit::createWrapper):
* bindings/js/JSClipboardCustom.cpp:
(WebCore::JSClipboard::setDragImage):
* bindings/js/JSElementCustom.cpp:
(WebCore::toJSNewlyCreated):
* bindings/js/JSNodeCustom.cpp:
(WebCore::createWrapperInline):
* bindings/v8/custom/V8ClipboardCustom.cpp:
(WebCore::V8Clipboard::setDragImageMethodCustom):
* bindings/v8/custom/V8ElementCustom.cpp:
(WebCore::wrap):
* bindings/v8/custom/V8NodeCustom.cpp:
(WebCore::wrap):
* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::recalcStyle):
(WebCore::Document::setFocusedNode):
(WebCore::Document::updateFocusAppearanceTimerFired):
* dom/DocumentStyleSheetCollection.cpp:
(WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
* dom/Element.cpp:
(WebCore::Element::offsetParent):
(WebCore::Element::boundsInRootViewSpace):
(WebCore::Element::getBoundingClientRect):
(WebCore::Element::recalcStyle):
(WebCore::Element::computeInheritedLanguage):
(WebCore::Element::lastElementChild):
* dom/LiveNodeList.cpp:
(WebCore::LiveNodeList::namedItem):
* dom/Node.cpp:
(WebCore::Node::dumpStatistics):
(WebCore::Node::normalize):
(WebCore::Node::rootEditableElement):
(WebCore::Node::isDefaultNamespace):
(WebCore::Node::ancestorElement):
(WebCore::appendAttributeDesc):
* dom/Position.cpp:
(WebCore::Position::element):
* dom/Range.cpp:
(WebCore::Range::getBorderAndTextQuads):
* dom/SelectorQuery.cpp:
(WebCore::SelectorDataList::queryFirst):
(WebCore::SelectorDataList::execute):
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::recalcStyle):
* dom/StaticHashSetNodeList.cpp:
(WebCore::StaticHashSetNodeList::namedItem):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
(WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
(WebCore::ApplyStyleCommand::mergeStartWithPreviousIfIdentical):
(WebCore::ApplyStyleCommand::surroundNodeRangeWithElement):
* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToBodyElement):
* editing/FrameSelection.cpp:
(WebCore::removingNodeRemovesPosition):
* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::outdentParagraph):
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::entityMaskForText):
(WebCore::MarkupAccumulator::appendStartMarkup):
(WebCore::MarkupAccumulator::appendEndMarkup):
* editing/ModifySelectionListLevel.cpp:
(WebCore::IncreaseSelectionListLevelCommand::doApply):
* editing/ReplaceSelectionCommand.cpp:
(WebCore::haveSameTagName):
(WebCore::handleStyleSpansBeforeInsertion):
(WebCore::ReplaceSelectionCommand::doApply):
* editing/SplitTextNodeContainingElementCommand.cpp:
(WebCore::SplitTextNodeContainingElementCommand::doApply):
* editing/TextIterator.cpp:
(WebCore::TextIterator::advance):
* editing/htmlediting.cpp:
(WebCore::unsplittableElementForPosition):
(WebCore::enclosingTableCell):
* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::wrapWithNode):
(WebCore::createMarkupInternal):
(WebCore::createFragmentFromMarkupWithContext):
(WebCore::isPlainTextMarkup):
(WebCore::createFragmentFromText):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::insertAdjacentElement):
(WebCore::contextElementForInsertion):
* html/HTMLFormControlElement.cpp:
(WebCore::focusPostAttach):
(WebCore::updateFromElementCallback):
* html/HTMLFormElement.cpp:
(WebCore::submitElementFromEvent):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::updateDocNamedItem):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::updateSnapshotInfo):
* html/HTMLViewSourceDocument.cpp:
(WebCore::HTMLViewSourceDocument::addRange):
* html/parser/HTMLTreeBuilder.cpp:
(WebCore::closestFormAncestor):
* html/shadow/MediaControlElementTypes.cpp:
(WebCore::toParentMediaElement):
* html/shadow/TextFieldDecorationElement.h:
(WebCore::toTextFieldDecorationElement):
* inspector/DOMPatchSupport.cpp:
(WebCore::DOMPatchSupport::createDigest):
* inspector/InspectorDOMAgent.cpp:
(WebCore::InspectorDOMAgent::buildObjectForNode):
(WebCore::InspectorDOMAgent::didInvalidateStyleAttr):
* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::inlineStyleSheetText):
* mathml/MathMLElement.h:
(WebCore::toMathMLElement):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::populate):
* page/DragController.cpp:
(WebCore::elementUnderMouse):
(WebCore::DragController::startDrag):
* page/FocusController.cpp:
(WebCore::FocusController::advanceFocusInDocumentOrder):
* page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
* page/FrameView.cpp:
(WebCore::FrameView::updateWidget):
* page/SpatialNavigation.cpp:
(WebCore::rectToAbsoluteCoordinates):
* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::sendTransitionEvent):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::KeyframeAnimation):
(WebCore::KeyframeAnimation::sendAnimationEvent):
* platform/efl/RenderThemeEfl.cpp:
(WebCore::RenderThemeEfl::paintMediaFullscreenButton):
(WebCore::RenderThemeEfl::paintMediaMuteButton):
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::buildReferenceFilter):
* rendering/svg/RenderSVGViewportContainer.cpp:
(WebCore::RenderSVGViewportContainer::calcViewport):
* svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::getElementById):
* svg/SVGUseElement.cpp:
(WebCore::isDisallowedElement):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::buildPendingResource):
* xml/XPathStep.cpp:
(WebCore::XPath::nodeMatchesBasicTest):
* xml/parser/XMLDocumentParserQt.cpp:
(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::parseEndElement):

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::webContext):
(BlackBerry::WebKit::WebPagePrivate::handleMouseEvent):
(BlackBerry::WebKit::WebPage::setNodeFocus):
(BlackBerry::WebKit::WebPagePrivate::adjustFullScreenElementDimensionsIfNeeded):
* WebCoreSupport/EditorClientBlackBerry.cpp:
(WebCore::EditorClientBlackBerry::shouldSpellCheckFocusedField):
(WebCore::EditorClientBlackBerry::shouldChangeSelectedRange):
* WebKitSupport/BackingStoreClient.cpp:
(BlackBerry::WebKit::BackingStoreClient::absoluteRect):
* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::toTextControlElement):
(BlackBerry::WebKit::DOMSupport::selectionContainerElement):
* WebKitSupport/FatFingers.cpp:
(BlackBerry::WebKit::FatFingers::getRelevantInfoFromCachedHitTest):
(BlackBerry::WebKit::FatFingers::setSuccessfulFatFingersResult):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::focusedNodeChanged):
(BlackBerry::WebKit::InputHandler::willOpenPopupForNode):
* WebKitSupport/SelectionHandler.cpp:
(BlackBerry::WebKit::SelectionHandler::inputNodeOverridesTouch):
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::elementForTapHighlight):

Source/WebKit/chromium:

* src/WebDocument.cpp:
(WebKit::WebDocument::images):
* src/WebElement.cpp:
(WebKit::WebElement::operator PassRefPtr<Element>):
* src/WebPageSerializer.cpp:
(WebCore::retrieveResourcesForFrame):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setFocus):
(WebKit::WebViewImpl::clearFocusedNode):
(WebKit::WebViewImpl::scrollFocusedNodeIntoView):
(WebKit::WebViewImpl::scrollFocusedNodeIntoRect):

Source/WebKit/gtk:

* webkit/webkitwebview.cpp:
(webkit_web_view_query_tooltip):

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm:
(applyAppleDictionaryApplicationQuirkNonInlinePart):
* WebView/WebHTMLRepresentation.mm:
(searchForLabelsBeforeElement):

Source/WebKit/qt:

* Api/qwebelement.cpp:
(QWebElement::firstChild):
(QWebElement::lastChild):
(QWebElement::nextSibling):
(QWebElement::previousSibling):
(QWebElementCollection::at):
(QWebElementCollection::toList):
* WebCoreSupport/QWebFrameAdapter.cpp:
(QWebHitTestResultPrivate::elementForInnerNode):

Source/WebKit/win:

* WebView.cpp:
(WebView::enterFullscreenForNode):

Source/WebKit2:

* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::elementBounds):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormElements):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: nuke bottom up CPU profile calculation on backend
https://bugs.webkit.org/show_bug.cgi?id=112351

Reviewed by Pavel Feldman.

Removed code that builds bottom-up CPU profile on the inspector
backend. Bottom-up view is already built on the front-end from
the top-down profile data.

* bindings/js/ScriptProfile.cpp:
* bindings/js/ScriptProfile.h:
(ScriptProfile):
* bindings/v8/ScriptProfile.cpp:
(WebCore::ScriptProfile::buildInspectorObjectForHead):
* bindings/v8/ScriptProfile.h:
(ScriptProfile):
* inspector/Inspector.json:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getCPUProfile):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145819 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a mode to ResourceLoader that takes SharedBuffers instead of raw pointers and lengths.
<rdar://problem/13416953> and https://bugs.webkit.org/show_bug.cgi?id=112310

Reviewed by Andy Estes.

No new tests (No independently testable change in behavior).

Many of the tested platforms deliver data buffers to their ResourceHandles from objects
that encapsulate a data buffer such as NSData (Mac), CFDataRef (CF), or QByteArray (qt).

If those platforms also augmented SharedBuffer to wrap their native object (which Mac/CF do)
and there existed ResourceLoader callbacks to take that SharedBuffer instead of char* + length,
then many resource loads could avoid a useless copy.

At least on Mac, there are some extremely important behind-the-scenes optimizations for NS/CFData
that will be a more important win than simply avoiding a copy.

This patch adds that SharedBuffer-based callback with the hope that all platforms could find a
way to use a buffer-encapsulating object going forward, and we could therefore deprecate the
char* + length version of didReceiveData.

* platform/network/ResourceHandleClient.h:
(WebCore::ResourceHandleClient::didReceiveBuffer): Add a didReceiveBuffer callback that takes
  a SharedBuffer object. The default implementation passes raw bytes + length to didReceiveData.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::addDataOrBuffer): Replacing addData(), optionally adding the data from
  either a data+length or SharedBuffer
(WebCore::ResourceLoader::didReceiveData): Pipe to didReceiveDataOrBuffer.
(WebCore::ResourceLoader::didReceiveBuffer): Pipe to didReceiveDataOrBuffer.
(WebCore::ResourceLoader::didReceiveDataOrBuffer): Single chokepoint for receiving data.
* loader/ResourceLoader.h: Add OVERRIDE to all of the ResourceHandleClient methods to help
  catch future mistakes. Remove "virtual" from methods that didn't need it. Make "addData" into
  "addDataOrBuffer" and make it private.

* loader/NetscapePlugInStreamLoader.cpp:
(WebCore::NetscapePlugInStreamLoader::didReceiveData): Pipe to didReceiveDataOrBuffer.
(WebCore::NetscapePlugInStreamLoader::didReceiveBuffer): Pipe to didReceiveDataOrBuffer.
(WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer): Single chokepoint for receiving data.
* loader/NetscapePlugInStreamLoader.h:

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveData): Pipe to didReceiveDataOrBuffer.
(WebCore::SubresourceLoader::didReceiveBuffer): Pipe to didReceiveDataOrBuffer.
(WebCore::SubresourceLoader::didReceiveDataOrBuffer): Single chokepoint for receiving data. Also,
  rely on ResourceLoader's base implementation for notifying the ResourceLoadNotifier.
* loader/SubresourceLoader.h:

* loader/ResourceBuffer.cpp:
(WebCore::ResourceBuffer::append): Add a mode that appends a SharedBuffer.
* loader/ResourceBuffer.h:

* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::maybeTransferPlatformData): Fix a bug where appending data to a CFData-backed
  SharedBuffer would re-enter maybeTransferPlatformData and blow out the stack.

* platform/network/mac/ResourceHandleMac.mm:
(-[WebCoreResourceHandleAsDelegate connection:didReceiveData:lengthReceived:]): Send a wrapped NSData
  to didReceiveBuffer() instead of sending its char* and length to didReceiveData()

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r145305) Performance: 1.3% mac-release-10.6-webkit-latest/intl2/times/t change after rev 145300
https://bugs.webkit.org/show_bug.cgi?id=112125

Reviewed by Julien Chaffraix.

When detecting cases where a loaded image may need to move up into the padding created by the row's baseline
we don't need to do anything if the row doesn't have a baseline yet.

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::layout):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed flakiness fix following r145727: filter out coalescing records while dumping timeline record structure.

* inspector/timeline/timeline-receive-response-event.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145823 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Histogram leveldb open errors.
https://bugs.webkit.org/show_bug.cgi?id=112307

Reviewed by Tony Chang.

No new tests, I don't know if there's a good way to test histograms.

* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::LevelDBDatabase::open):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145824 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in DumpRenderTree at com.apple.WebCore: WebCore::CaptionUserPreferences::captionPreferencesChanged + 185
https://bugs.webkit.org/show_bug.cgi?id=112051

Reviewed by Eric Carlson.

No new tests; fixes a crash during media/video-controls-captions-trackmenu.html.

Instead of relying on a registration system which can fail when an element's document does not have a page,
Elements will register for captionPreferencesChanged() notifications directly with their owning Document.
CaptionUserPreferences, in turn, will notify all Documents in its PageGroup, rather than only directly
registered listeners.

* dom/Document.cpp:
(WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Added. Notify the CaptionUserPreferences that someone
    is interested in captionPreferencesChanged notfications.
(WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Added.
(WebCore::Document::captionPreferencesChanged): Added. Pass to all registered elements.
* dom/Document.h:
* dom/Element.h:
(WebCore::Element::captionPreferencesChanged): Added. Empty; intended
    to be overridden by subclasses.
* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage): Initialize m_needsCaptionPreferenceChanged member.
(WebCore::CachedPage::restore): Call captionPreferencesChanged() if necessary.
* history/CachedPage.h:
(WebCore::CachedPage::markForCaptionPreferencesChanged): Set the m_needsCaptionPreferenceChanged member.
* history/PageCache.cpp:
(WebCore::PageCache::markPagesForCaptionPreferencesChanged): Pass to every CachedPage.
* history/PageCache.h:
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement): Register with the Document.
(WebCore::HTMLMediaElement::~HTMLMediaElement): Unregister with same.
(WebCore::HTMLMediaElement::attach): Remove previous registration call.
* html/HTMLMediaElement.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the
    PageGroup.
* page/CaptionUserPreferences.h:
(WebCore::CaptionUserPreferences::setInterestedInCaptionPreferenceChanges):
    Empty; intended to be overridden by subclasses.
* page/CaptionUserPreferencesMac.h:
* page/CaptionUserPreferencesMac.mm:
(WebCore::CaptionUserPreferencesMac::setInterestedInCaptionPreferenceChanges):
    Renamed from registerForPreferencesChangedCallbacks().
(WebCore::CaptionUserPreferencesMac::captionPreferencesChanged):
    Replace call to havePreferenceChangeListeners() with m_listeningForPreferenceChanges.
* page/Page.cpp:
(WebCore::Page::captionPreferencesChanged):
    Pass to every contained Document.
* page/Page.h:
* page/CaptionUserPreferences.cpp:
(WebCore::CaptionUserPreferences::captionPreferencesChanged): Pass to the PageGroup.
* page/CaptionUserPreferences.h:
* page/PageGroup.cpp:
(WebCore::PageGroup::captionPreferencesChanged): Pass to every page, as well as pages in the PageCache.
* page/PageGroup.h:

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