[GTK] Missing DRT AccessibilityUIElement::addNotificationListener implementation
https://bugs.webkit.org/show_bug.cgi?id=119883

Tools:

Implemented the notification listener for AccessibilityUIElement. The signal is generated
by AXObjectCache::postPlatformNotification() and received by axObjectEventListener().
axObjectEventListener will then invoke JSObjectCallAsFunction() with the respective
callback function. The global callback function and callbacks for specific elements are
stored in a HashMap in AccessibilityCallbacksAtk.cpp.

Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2013-08-27
Reviewed by Chris Fleizach.

* DumpRenderTree/AccessibilityUIElement.h: Added a notification handler for GTK+
* DumpRenderTree/atk/AccessibilityCallbacks.h: Added addAccessibilityNotificationListener()
and removeAccessibilityNotificationListener()
* DumpRenderTree/atk/AccessibilityCallbacksAtk.cpp:
(axObjectEventListener): Call JS callback for global notification or for a specific element
(disconnectAccessibilityCallbacks): Only disconnect if logging is off and there is no
notification handler
(addAccessibilityNotificationHandler): Add notification listener to the list
(removeAccessibilityNotificationHandler): Remove notification listener from the list
* DumpRenderTree/atk/AccessibilityControllerAtk.cpp:
(AccessibilityController::setLogAccessibilityEvents): Set logging off before disconnecting
* DumpRenderTree/atk/AccessibilityNotificationHandlerAtk.cpp: Added.
(AccessibilityNotificationHandler::AccessibilityNotificationHandler): Create handler
(AccessibilityNotificationHandler::~AccessibilityNotificationHandler): Destroy handler.
Remove handler from the list and disconnect callbacks
(AccessibilityNotificationHandler::setNotificationFunctionCallback): Set the notification
callback and connect callbacks to signals
* DumpRenderTree/atk/AccessibilityNotificationHandlerAtk.h: Added.
(AccessibilityNotificationHandler::setPlatformElement): Set platform element
(AccessibilityNotificationHandler::platformElement): Get platform element
(AccessibilityNotificationHandler::notificationFunctionCallback): Get notification callback
* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::addNotificationListener): Create notification handler, set the
platform element and the notification callback
(AccessibilityUIElement::removeNotificationListener):
* DumpRenderTree/efl/CMakeLists.txt: Added AccessibilityNotificationHandlerAtk.cpp/h
* GNUmakefile.am: Added AccessibilityNotificationHandlerAtk.cpp/h

LayoutTests:

Unskipped the checkbox notification test in a11y and added the expected results.

Patch by Denis Nomiyama <d.nomiyama@samsung.com> on 2013-08-27
Reviewed by Chris Fleizach.

* platform/gtk/TestExpectations: Unskipped the checkbox notification test in a11y.
* platform/gtk/accessibility/aria-checkbox-sends-notification-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Missing null-check of parent renderer in WebCore::HTMLEmbedElement::rendererIsNeeded()
https://bugs.webkit.org/show_bug.cgi?id=120343

Reviewed by Darin Adler.

Source/WebCore:

Null-check the parent renderer of HTMLEmbedElement in WebCore::HTMLEmbedElement::rendererIsNeeded()
and early return.

Test: fast/html/HTMLEmbedElement_without_parent_renderer_assert_crash.html

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::rendererIsNeeded):

LayoutTests:

Test for the handling of null parent renderer.

* fast/html/HTMLEmbedElement_without_parent_renderer_assert_crash-expected.txt: Added.
* fast/html/HTMLEmbedElement_without_parent_renderer_assert_crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Soup] Add WebFrameNetworkingContext::webFrameLoaderClient() after r154490
https://bugs.webkit.org/show_bug.cgi?id=120353

Reviewed by Alexey Proskuryakov.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Better mutation and event assertions for descendant iterators
https://bugs.webkit.org/show_bug.cgi?id=120368

Reviewed by Andreas Kling.

Add mutation assertions to all functions.
Drop the no-event-dispatch assertion when the iterator reaches the end. This reduces need for iterator scoping
just to avoid assertions.

* dom/ChildIterator.h:
(WebCore::::domTreeHasMutated):
(WebCore::::operator):
(WebCore::=):
* dom/DescendantIterator.h:
(WebCore::::domTreeHasMutated):
(WebCore::::operator):
(WebCore::=):
* dom/Document.cpp:
(WebCore::Document::childrenChanged):
        
    Make idiomatic.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Rotate device from landscape to portrait during youtube streaming will cause device screen flash with video list page
https://bugs.webkit.org/show_bug.cgi?id=120364

Patch by Jacky Jiang <zhajiang@blackberry.com> on 2013-08-27
Reviewed by Rob Buis.
Internally reviewed by Arvid Nilsson.

Source/WebCore:

JIRA 461232
When rotating device from landscape mode to portrait mode, we updated
texture contents based on landscape mode front visibility and back
visibility on WebKit thread at the very beginning and the landscape mode
tiles wouldn't be able to cover the portrait mode screen which resulted
in the screen flash.
It's hard to compute front visibility information on WebKit thread because
it doesn't know where the layers will be on the screen. Therefore, the
front visibility won't be updated until the first time we draw textures
on compositing thread.
The patch traverses through LayerWebKitThread and LayerCompositingThread
and discards back visibility and front visibility respectively if there
is a pending orientation. In this way, we can pick up layerTilerPrefillRect
as visibleRect instead of the visibleRect from the stale visibilities
and add more tiles for uncovered screen when updating texture contents
on WebKit thread.
The patch also fixes a bug that we prune tiles based on the stale
m_requiredTextureSize in pruneTextures(). We should prune tiles based
on the updated pendingTextureSize instead.

* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::discardFrontVisibility):
* platform/graphics/blackberry/LayerCompositingThread.h:
* platform/graphics/blackberry/LayerCompositingThreadClient.h:
(WebCore::LayerCompositingThreadClient::discardFrontVisibility):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::discardFrontVisibility):
* platform/graphics/blackberry/LayerRenderer.h:
* platform/graphics/blackberry/LayerTiler.cpp:
(WebCore::LayerTiler::discardFrontVisibility):
(WebCore::LayerTiler::processTextureJob):
(WebCore::LayerTiler::pruneTextures):
(WebCore::LayerTiler::discardBackVisibility):
* platform/graphics/blackberry/LayerTiler.h:
* platform/graphics/blackberry/LayerWebKitThread.cpp:
(WebCore::LayerWebKitThread::discardBackVisibility):
* platform/graphics/blackberry/LayerWebKitThread.h:

Source/WebKit/blackberry:

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::setViewportSize):
(BlackBerry::WebKit::WebPagePrivate::discardLayerVisibilities):
(BlackBerry::WebKit::WebPagePrivate::discardFrontVisibilityCompositingThread):
* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::discardFrontVisibility):
* Api/WebPageCompositor_p.h:
* Api/WebPage_p.h:
* WebKitSupport/FrameLayers.cpp:
(BlackBerry::WebKit::FrameLayers::discardBackVisibility):
* WebKitSupport/FrameLayers.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
cell width / offsetTop incorrect
https://bugs.webkit.org/show_bug.cgi?id=11582

Reviewed by David Hyatt.

Source/WebCore:

The offsetTop and offsetLeft of sections, rows and cells should include the table's border. There are separate
problems with the offset[Top|Left] of table sections and the offsetLeft of rows which are covered under bugs 119020
and 119021 respectively - here we stick to just fixing the inclusion of the border as it doesn't require rebaselining
a lot of tests.

Test: fast/table/offset-top-includes-border.html

* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::layoutRows):

LayoutTests:

* fast/dom/Element/offsetTop-table-cell-expected.txt:
* fast/dom/Element/offsetTop-table-cell.html:
* fast/table/offset-top-includes-border-expected.txt: Added.
* fast/table/offset-top-includes-border.html: Added.
* platform/mac/editing/selection/5057506-2-expected.txt:
* platform/mac/editing/selection/5057506-expected.txt:
* platform/qt/editing/selection/5057506-2-expected.txt:
* platform/qt/editing/selection/5057506-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154702 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Debugger should have Continue to Here Context Menu
https://bugs.webkit.org/show_bug.cgi?id=120189

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-27
Reviewed by Timothy Hatcher.

When paused in the debugger and presenting a Context Menu in the
gutter, include a "Continue to Here" option. This requires a
script/line/column location combination.

* UserInterface/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype.continueToLocation):
* UserInterface/Resource.js:
(WebInspector.Resource.prototype.scriptForLocation):
* UserInterface/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.continueToLocation):
(WebInspector.SourceCodeTextEditor.prototype.textEditorGutterContextMenu):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NRWT on AppleWin port should delete semaphore lock files during cleanup tasks.
https://bugs.webkit.org/show_bug.cgi?id=120370.

Reviewed by Brent Fulgham.

* Scripts/webkitpy/port/win.py:
(WinPort.delete_sem_locks):
(WinPort.setup_test_run):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154704 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Replace currentTime() with monotonicallyIncreasingTime() in WebCore
https://bugs.webkit.org/show_bug.cgi?id=119958

Patch by Arunprasad Rajkumar <arurajku@cisco.com> on 2013-08-27
Reviewed by Alexey Proskuryakov.

WTF::currentTime() is prone to NTP and manual adjustments, so use
WTF::monotonicallyIncreasingTime() to measure elapsed time.

It is a continuation of r154201.

Source/WebCore:

* history/CachedPage.cpp:
(WebCore::CachedPage::CachedPage):
(WebCore::CachedPage::hasExpired):
* html/parser/HTMLParserScheduler.h:
(WebCore::HTMLParserScheduler::checkForYieldBeforeToken):
* loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::parse):
(WebCore::CrossOriginPreflightResultCacheItem::allowsRequest):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::setState):
* loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::incrementProgress):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didDraw):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::pruneLiveResourcesToSize):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::iconDatabaseSyncThread):
(WebCore::IconDatabase::syncThreadMainLoop):
(WebCore::IconDatabase::readFromDatabase):
(WebCore::IconDatabase::writeToDatabase):
(WebCore::IconDatabase::cleanupSyncThread):
* page/animation/AnimationBase.cpp:
(WebCore::AnimationBase::freezeAtTime):
* page/animation/AnimationController.cpp:
(WebCore::AnimationControllerPrivate::beginAnimationUpdateTime):
* platform/graphics/GraphicsLayerAnimation.cpp:
(WebCore::GraphicsLayerAnimation::computeTotalRunningTime):
(WebCore::GraphicsLayerAnimation::resume):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::createImageForTimeInRect):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
(WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::suspendAnimations):
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::currentTimeToMediaTime):
* platform/graphics/ca/mac/LayerPool.mm:
(WebCore::LayerPool::addLayer):
(WebCore::LayerPool::decayedCapacity):
(WebCore::LayerPool::pruneTimerFired):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(mediaTimeToCurrentTime):
* platform/graphics/ca/win/CACFLayerTreeHost.cpp:
(WebCore::CACFLayerTreeHost::notifyAnimationsStarted):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::printTree):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::addAnimation):
* platform/graphics/texmap/TextureMapperFPSCounter.cpp:
(WebCore::TextureMapperFPSCounter::TextureMapperFPSCounter):
(WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::addAnimation):
* platform/network/DNSResolveQueue.cpp:
(WebCore::DNSResolveQueue::isUsingProxy):
* plugins/win/PluginMessageThrottlerWin.cpp:
(WebCore::PluginMessageThrottlerWin::appendMessage):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::didPaintBacking):
(WebCore::RenderLayerCompositor::updateCompositingLayers):
* rendering/RenderProgress.cpp:
(WebCore::RenderProgress::animationProgress):
(WebCore::RenderProgress::updateAnimationState):
* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::elapsed):
(WebCore::SMILTimeContainer::begin):
(WebCore::SMILTimeContainer::pause):
(WebCore::SMILTimeContainer::resume):
(WebCore::SMILTimeContainer::setElapsed):

Source/WTF:

* wtf/CurrentTime.h: Edited comment.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154706 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clean ClassList and DOMSettableTokenList
https://bugs.webkit.org/show_bug.cgi?id=120344

Reviewed by Ryosuke Niwa.

This patch cleans ClassList and DOMSettableTokenList to make it simpler to update
SpaceSplitString:
- Move the implementation of virtual functions to the cpp file.
- Clean the #includes.
- Make the implemented pure virtual methods final.
- Make the element() accessor const.

* html/ClassList.cpp:
(WebCore::ClassList::create):
(WebCore::ClassList::element):
(WebCore::ClassList::value):
(WebCore::ClassList::setValue):
(WebCore::ClassList::classNames):
* html/ClassList.h:
* html/DOMSettableTokenList.cpp:
(WebCore::DOMSettableTokenList::create):
(WebCore::DOMSettableTokenList::ref):
(WebCore::DOMSettableTokenList::deref):
(WebCore::DOMSettableTokenList::length):
(WebCore::DOMSettableTokenList::value):
* html/DOMSettableTokenList.h:
* html/DOMTokenList.h:
(WebCore::DOMTokenList::element):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154707 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop using deleteAllValues in CClass
https://bugs.webkit.org/show_bug.cgi?id=120376

Reviewed by Andreas Kling.

* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::CClass):
(JSC::Bindings::CClass::~CClass):
(JSC::Bindings::CClass::methodNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_class.h:
* bridge/jsc/BridgeJSC.h:

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

* Plugins/Hosted/ProxyInstance.h:
* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyInstance::methodNamed):
(WebKit::ProxyInstance::fieldNamed):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/120117> AX: <noscript> contents are exposed as static text

Reviewed by Tim Horton.

Source/WebCore: 

If <noscript> is not being used (because there is script) then we need to ignore its contents for AX.

Test: accessibility/noscript-ignored.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addCanvasChildren):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren):

LayoutTests: 

* accessibility/noscript-ignored-expected.txt: Added.
* accessibility/noscript-ignored.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
100% cpu usage for "transition: opacity" animation
https://bugs.webkit.org/show_bug.cgi?id=120012

Reviewed by Noam Rosenthal.

Schedule animation timer after scheduling a layer flush. This way it
won't overwrite animation timer with "0", thus avoiding 100% cpu usage.

* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::scheduleAnimation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
No need for generalPasteboard (aside from "global selection mode")
https://bugs.webkit.org/show_bug.cgi?id=120367

Reviewed by Alexey Proskuryakov.

* editing/Editor.cpp:
(WebCore::Editor::pasteAsPlainTextBypassingDHTML):
(WebCore::Editor::dispatchCPPEvent):
(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::paste):
(WebCore::Editor::pasteAsPlainText):
(WebCore::Editor::copyURL):
(WebCore::Editor::copyImage):
Use Pasteboard::createForCopyAndPaste rather than the single general pasteboard
for editing operations.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154712 268f45cc-cd09-0410-ab3c-d52691b4dbfc
feImage fails if referenced node contains radialGradient declaration
https://bugs.webkit.org/show_bug.cgi?id=118735

Reviewed by Darin Adler.

Source/WebCore:

Only call parent's updateRelativeLengthsInformation for graphics elements.

Tests: svg/custom/feImage-pserver-with-percentage-expected.svg
       svg/custom/feImage-pserver-with-percentage.svg

* svg/SVGElement.cpp:
(WebCore::SVGElement::updateRelativeLengthsInformation):

LayoutTests:

Add testcase from bug with small adjustments.

* svg/custom/feImage-pserver-with-percentage-expected.svg: Added.
* svg/custom/feImage-pserver-with-percentage.svg: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154713 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Improve multicol intrinsic width calculation
https://bugs.webkit.org/show_bug.cgi?id=116677

Patch by Morten Stenshorne <mstensho@opera.com> on 2013-08-27
Reviewed by David Hyatt.

Source/WebCore:

Test: fast/css-intrinsic-dimensions/multicol.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computeIntrinsicLogicalWidths):
(WebCore::RenderBlock::adjustIntrinsicLogicalWidthsForColumns):
* rendering/RenderBlock.h:

LayoutTests:

* css3/unicode-bidi-isolate-basic.html: The expectation seems to
be that the columns should be as many as necessary and narrow as
possible, and that the multicol container's width should be that
of one column. The previous CSS didn't really ask for this,
although that's how it happened to be rendered without this fix.
* fast/css-intrinsic-dimensions/multicol-expected.txt: Added.
* fast/css-intrinsic-dimensions/multicol.html: Added.
* fast/multicol/positioned-with-constrained-height-expected.html: Copied from LayoutTests/fast/multicol/positioned-with-constrained-height.html.
* fast/multicol/positioned-with-constrained-height.html: Turn into a reftest.
* platform/efl/fast/multicol/positioned-with-constrained-height-expected.png: Removed.
* platform/efl/fast/multicol/positioned-with-constrained-height-expected.txt: Removed.
* platform/gtk/fast/multicol/positioned-with-constrained-height-expected.png: Removed.
* platform/gtk/fast/multicol/positioned-with-constrained-height-expected.txt: Removed.
* platform/mac/fast/multicol/positioned-with-constrained-height-expected.png: Removed.
* platform/mac/fast/multicol/positioned-with-constrained-height-expected.txt: Removed.
* platform/qt/fast/multicol/positioned-with-constrained-height-expected.png: Removed.
* platform/qt/fast/multicol/positioned-with-constrained-height-expected.txt: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make it less awkward to check if a Frame is the main Frame.
<https://webkit.org/b/120382>

Reviewed by Anders Carlsson.

Added Page::frameIsMainFrame(const Frame*) so code that wants to find out if a given
Frame is a Page's main frame doesn't have to do a manual pointer compare.

* page/Page.h:
(WebCore::Page::frameIsMainFrame):

    Added. Replaces (frame == &page->mainFrame()) idiom.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154715 268f45cc-cd09-0410-ab3c-d52691b4dbfc
svg/animations/svglengthlist-animation-3.html is flakey on Mac
http://webkit.org/b/120387

Marking this as flakey.

* platform/mac/TestExpectations:

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