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