Rename some AudioNodes
https://bugs.webkit.org/show_bug.cgi?id=99358

Reviewed by Daniel Bates.

Source/WebCore:

Here's a list of the node names, showing the changing ones:
    AudioBufferSourceNode
    MediaElementAudioSourceNode
    MediaStreamAudioSourceNode
    JavaScriptAudioNode ------------> ScriptProcessorNode
    RealtimeAnalyserNode ------------> AnalyserNode
    AudioGainNode ------------> GainNode
    DelayNode
    BiquadFilterNode
    AudioPannerNode ------------> PannerNode
    ConvolverNode
    AudioChannelSplitter ------------> ChannelSplitterNode
    AudioChannelMerger ------------> ChannelMergerNode
    DynamicsCompressorNode
    Oscillator ------------> OscillatorNode

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/webaudio/AnalyserNode.cpp: Renamed from Source/WebCore/Modules/webaudio/RealtimeAnalyserNode.cpp.
* Modules/webaudio/AnalyserNode.idl: Renamed from Source/WebCore/Modules/webaudio/RealtimeAnalyserNode.idl.
* Modules/webaudio/AudioBufferSourceNode.cpp:
(WebCore::AudioBufferSourceNode::setPannerNode):
* Modules/webaudio/AudioBufferSourceNode.h:
(AudioBufferSourceNode):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::createJavaScriptNode):
(WebCore::AudioContext::createPanner):
(WebCore::AudioContext::createAnalyser):
(WebCore::AudioContext::createGainNode):
(WebCore::AudioContext::createChannelSplitter):
(WebCore::AudioContext::createChannelMerger):
(WebCore::AudioContext::createOscillator):
* Modules/webaudio/AudioContext.h:
(WebCore):
(AudioContext):
* Modules/webaudio/AudioContext.idl:
* Modules/webaudio/ChannelMergerNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioChannelMerger.cpp.
* Modules/webaudio/ChannelMergerNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioChannelMerger.h.
(WebCore):
(ChannelMergerNode):
* Modules/webaudio/ChannelMergerNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioChannelMerger.idl.
* Modules/webaudio/ChannelSplitterNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioChannelSplitter.cpp.
* Modules/webaudio/ChannelSplitterNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioChannelSplitter.h.
(WebCore):
(ChannelSplitterNode):
* Modules/webaudio/ChannelSplitterNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioChannelSplitter.idl.
* Modules/webaudio/DOMWindowWebAudio.idl:
* Modules/webaudio/GainNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioGainNode.cpp.
* Modules/webaudio/GainNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioGainNode.h.
* Modules/webaudio/GainNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioGainNode.idl.
* Modules/webaudio/OscillatorNode.cpp: Renamed from Source/WebCore/Modules/webaudio/Oscillator.cpp.
* Modules/webaudio/OscillatorNode.h: Renamed from Source/WebCore/Modules/webaudio/Oscillator.h.
* Modules/webaudio/OscillatorNode.idl: Renamed from Source/WebCore/Modules/webaudio/Oscillator.idl.
* Modules/webaudio/PannerNode.cpp: Renamed from Source/WebCore/Modules/webaudio/AudioPannerNode.cpp.
* Modules/webaudio/PannerNode.h: Renamed from Source/WebCore/Modules/webaudio/AudioPannerNode.h.
(WebCore):
* Modules/webaudio/PannerNode.idl: Renamed from Source/WebCore/Modules/webaudio/AudioPannerNode.idl.
* Modules/webaudio/ScriptProcessorNode.cpp: Renamed from Source/WebCore/Modules/webaudio/JavaScriptAudioNode.cpp.
* Modules/webaudio/ScriptProcessorNode.h: Renamed from Source/WebCore/Modules/webaudio/JavaScriptAudioNode.h.
(WebCore):
* Modules/webaudio/ScriptProcessorNode.idl: Renamed from Source/WebCore/Modules/webaudio/JavaScriptAudioNode.idl.
* Modules/webaudio/WaveTable.cpp:
(WebCore::WaveTable::createSine):
(WebCore::WaveTable::createSquare):
(WebCore::WaveTable::createSawtooth):
(WebCore::WaveTable::createTriangle):
(WebCore::WaveTable::generateBasicWaveform):
* Target.pri:
* UseJSC.cmake:
* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSScriptProcessorNodeCustom.cpp: Renamed from Source/WebCore/bindings/js/JSJavaScriptAudioNodeCustom.cpp.
(WebCore):
(WebCore::JSScriptProcessorNode::visitChildren):
* dom/EventTarget.h:
(WebCore):
* dom/EventTargetFactory.in:

Tools:

* Scripts/do-webcore-rename:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
sendResourceLoadCallbacks() is poorly named
https://bugs.webkit.org/show_bug.cgi?id=99482

Reviewed by Alexey Proskuryakov.

In both CachedResource and ResourceLoader, rename sendResourceLoadCallbacks()
to shouldSendResourceLoadCallbacks() to better indicate that it is a simple getter.

No new tests, simple renaming.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
* loader/ResourceLoader.h:
(WebCore::ResourceLoader::shouldSendResourceLoadCallbacks):
* loader/cache/CachedResource.h:
(WebCore::CachedResource::shouldSendResourceLoadCallbacks):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131487 268f45cc-cd09-0410-ab3c-d52691b4dbfc
An feImage that tries to render itself should be stopped
https://bugs.webkit.org/show_bug.cgi?id=94652

Reviewed by Eric Seidel.

Source/WebCore:

An SVG feImage filter element will accept, as the src to render, an
SVG document that makes use of the feImage itself. This causes the
feImage to try to draw itself while already in the process of drawing
itself. Various problems arise from this. The invariant we wish to
maintain is that no element in the src tree of an feImage element
refers to that feImage.

This patch adds a flag to all FilterData objects that tracks whether or
not the filter is currently applying itself, and avoids applying the
filter recursively.

While it may seem better to catch this problem when the src is set, or
when the filter is built, that turns out to be challenging and
inefficient. Say we choose to test when the src atttribute is set. To
do so would require looking through all of the DOM nodes that will be
rendered for the src, finding all resources used, and checking if any
of them make use fo the feImage element that we are setting the source
for. The infrastructure is not in place to do that, and it would
involve walking a potentially very large portion of the DOM in order
to detect a very rare situation. Note that it is not enough just to
walk the DOM directly under the src; we also need to recursively follow any
resource links to see if they use the feImage (e.g. patterns or
masks or use or ...).

If we instead try to use the renderer node to find self referencing,
we need to recursively walk a potentially very large render tree,
tracing all resources in search of the feImage. This would need to be
done every time the filter is built, which is again a significant
overhead for a situation that is very unlikely to occur. And we do not
have methods that make it easy to find feImage filter effect nodes; they are
hidden behind filter resource nodes.

Hence the runtime check to catch the problem. The check must be in
FilterData and RenderSVGResourceFilter code because we must prevent
the destruction of the feImage when we encounter it recursively.

This patch also renames FilterData::builded to FilterData::isBuilt.

Test: svg/filters/feImage-self-referencing.html

* rendering/svg/RenderSVGResourceFilter.cpp:
(WebCore::ApplyingFilterEffectGuard): Guard to ensure that, in the future, we always
clear the isApplying flag even if the postApplyResource method returns early.
(WebCore::RenderSVGResourceFilter::applyResource): Do not apply a resource that is already applying and
rename builded to isBuilt.
(WebCore::RenderSVGResourceFilter::postApplyResource): Mark a resource as applying and clear after
it is done. Abort if a resource is already applying when the method begins. Rename builded to isBuilt.
(WebCore::RenderSVGResourceFilter::primitiveAttributeChanged): Rename builded to isBuilt.
* rendering/svg/RenderSVGResourceFilter.h:
(WebCore::FilterData::FilterData):
(FilterData): Add isApplying and rename builded to isBuilt.

LayoutTests:

Ref-test to verify that an feImage that tries to draw itself will not
crash. This test must be render in order to verify the result. Do not
convert to dumpAstext.

* svg/filters/feImage-self-referencing-expected.html: Added.
* svg/filters/feImage-self-referencing.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a new layer type for the page tiled cache layer
https://bugs.webkit.org/show_bug.cgi?id=99491

Reviewed by Dean Jackson.

In preparation for using tile cache layers in place of CATiledLayer,
add a new PlatformCALayer layer type LayerTypePageTileCacheLayer,
since the page tile cache will have some different behavior from
other tile cache layers.

Generalize code that was looking at LayerTypeTileCacheLayer to use
usesTileCacheLayer() if it applies to both types of tile caches.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::GraphicsLayerCA):
(WebCore::GraphicsLayerCA::recursiveCommitChanges): Show the tile
wash for tiled layers as well as layers with transforms (the tile
wash is just for debugging).
(WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
(WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
* platform/graphics/ca/PlatformCALayer.h:
(WebCore::PlatformCALayer::usesTileCacheLayer):
(PlatformCALayer):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::PlatformCALayer):
(PlatformCALayer::~PlatformCALayer):
(PlatformCALayer::tiledBacking):
* platform/graphics/mac/WebLayer.mm:
(drawLayerContents): Avoid double-drawing the repaint counter in tile cache layers.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=99254
Make ScrollingTree an actual tree of nodes, and have it reflect the 
ScrollingStateTree

Reviewed by Simon Fraser.

This patch finally makes the ScrollingTree over on the 
ScrollingThread aware of the changes that we have been making to the 
ScrollingStateTree.

First, it makes ScrollingTreeNode a much more generic class, similar 
to ScrollingStateNode. It is an abstract class and we will add other 
types of nodes such as ScrollingTreeFixedNodes that will inherit from 
this class. 

All of the scrolling functionality that was in ScrollingTreeNode has 
been moved to ScrollingTreeScrollingNode. And likewise, 
ScrollingTreeNodeMac has been re-named to 
ScrollingTreeScrollingNodeMac. 

And finally, instead of just updating and creating the root node, 
ScrollingTree now recurses through the whole ScrollingStateTree to 
create and update a full tree of nodes.

New files and moves files.
* WebCore.xcodeproj/project.pbxproj:

Add a getter for the children vector since we need to recurse it in 
ScrollingTree.
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::children):
(ScrollingStateNode):

m_rootNode is now a ScrollingTreeScrollingNode.
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree):

Instead of just updating the root node, call two new functions that 
will take care of updating the whole tree.
(WebCore::ScrollingTree::commitNewTreeState):

This function ecurses through the ScrollingStateTree and updates the 
corresponding ScrollingTreeNodes.
(WebCore::ScrollingTree::updateNodesFromStateNode):

This function takes the ScrollingStateTree's list of removed nodes 
and removes the corresponding nodes from the ScrollingTree. It will 
destroy the nodes after removing it as long as it's not the root 
node. I think it's the safest choice for now to never remove the root 
node. 
(WebCore::ScrollingTree::removeDestroyedNodes):

ScrollingTree now keeps a HashMap mapping ScrollingNodeIDs to 
ScrollingTreeNodes.
* page/scrolling/ScrollingTree.h:

All of the scrolling-related functionality has been moved from this 
class to new class ScrollingTreeScrollingNode. And some basic tree 
traversal functionality has been added.
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::ScrollingTreeNode):
(WebCore::ScrollingTreeNode::appendChild):
(WebCore::ScrollingTreeNode::removeChild):
* page/scrolling/ScrollingTreeNode.h:
(WebCore):
(ScrollingTreeNode):
(WebCore::ScrollingTreeNode::scrollingNodeID):
(WebCore::ScrollingTreeNode::setScrollingNodeID):
(WebCore::ScrollingTreeNode::parent):
(WebCore::ScrollingTreeNode::setParent):
(WebCore::ScrollingTreeNode::scrollingTree):

This class contains all of the scrolling-related work that used to be 
done in ScrollingTreeNode.
* page/scrolling/ScrollingTreeScrollingNode.cpp: Added.
(WebCore):
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::~ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::update):
* page/scrolling/ScrollingTreeScrollingNode.h: Added.
(WebCore):
(ScrollingTreeScrollingNode):
(WebCore::ScrollingTreeScrollingNode::shouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingTreeScrollingNode::viewportRect):
(WebCore::ScrollingTreeScrollingNode::contentsSize):
(WebCore::ScrollingTreeScrollingNode::horizontalScrollElasticity):
(WebCore::ScrollingTreeScrollingNode::verticalScrollElasticity):
(WebCore::ScrollingTreeScrollingNode::hasEnabledHorizontalScrollbar):
(WebCore::ScrollingTreeScrollingNode::hasEnabledVerticalScrollbar):
(WebCore::ScrollingTreeScrollingNode::canHaveScrollbars):
(WebCore::ScrollingTreeScrollingNode::scrollOrigin):

I noticed this whitespace error and had to fix it.
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::detachFromStateTree):

Include ScrollingTreeScrollingNodeMac.h instead of 
ScrollingTreeNodeMac.h
* page/scrolling/mac/ScrollingTreeMac.mm:

This class was just re-named.
* page/scrolling/mac/ScrollingTreeNodeMac.h: Removed.
* page/scrolling/mac/ScrollingTreeNodeMac.mm: Removed.
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h: Copied from page/scrolling/mac/ScrollingTreeNodeMac.h.
(ScrollingTreeScrollingNodeMac):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm: Copied from page/scrolling/mac/ScrollingTreeNodeMac.mm.
(WebCore::ScrollingTreeScrollingNode::create):
(WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
(WebCore::ScrollingTreeScrollingNodeMac::~ScrollingTreeScrollingNodeMac):
(WebCore::ScrollingTreeScrollingNodeMac::update):
(WebCore::ScrollingTreeScrollingNodeMac::handleWheelEvent):
(WebCore::ScrollingTreeScrollingNodeMac::allowsHorizontalStretching):
(WebCore::ScrollingTreeScrollingNodeMac::allowsVerticalStretching):
(WebCore::ScrollingTreeScrollingNodeMac::stretchAmount):
(WebCore::ScrollingTreeScrollingNodeMac::pinnedInDirection):
(WebCore::ScrollingTreeScrollingNodeMac::canScrollHorizontally):
(WebCore::ScrollingTreeScrollingNodeMac::canScrollVertically):
(WebCore::ScrollingTreeScrollingNodeMac::shouldRubberBandInDirection):
(WebCore::ScrollingTreeScrollingNodeMac::absoluteScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::immediateScrollBy):
(WebCore::ScrollingTreeScrollingNodeMac::immediateScrollByWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeMac::startSnapRubberbandTimer):
(WebCore::ScrollingTreeScrollingNodeMac::stopSnapRubberbandTimer):
(WebCore::ScrollingTreeScrollingNodeMac::scrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeScrollingNodeMac::minimumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
(WebCore::ScrollingTreeScrollingNodeMac::scrollBy):
(WebCore::ScrollingTreeScrollingNodeMac::scrollByWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeScrollingNodeMac::updateMainFramePinState):
(WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rebaseline 2 Chromium Mac test.
Small differences due to using MESA.

* platform/chromium-mac/platform/chromium/virtual/gpu/fast/hidpi/focus-rings-expected.png: Added.
* platform/chromium-mac/platform/chromium/virtual/gpu/fast/hidpi/video-controls-in-hidpi-expected.png: Added.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update indentation in *ResourceLoader headers to match modern WebKit style
https://bugs.webkit.org/show_bug.cgi?id=99487

Reviewed by Beth Dakin.

I'm going to be working on these classes and the indentation is driving me crazy.

* loader/MainResourceLoader.h:
(WebCore):
(MainResourceLoader):
(WebCore::MainResourceLoader::isLoadingMultipartContent):

* loader/NetscapePlugInStreamLoader.h:
(WebCore):
(NetscapePlugInStreamLoaderClient):
(WebCore::NetscapePlugInStreamLoaderClient::didFinishLoading):
(WebCore::NetscapePlugInStreamLoaderClient::wantsAllStreams):
(WebCore::NetscapePlugInStreamLoaderClient::~NetscapePlugInStreamLoaderClient):
(NetscapePlugInStreamLoader):

* loader/ResourceLoader.h:
(WebCore):
(ResourceLoader):
(WebCore::ResourceLoader::documentLoader):
(WebCore::ResourceLoader::originalRequest):
(WebCore::ResourceLoader::identifier):
(WebCore::ResourceLoader::didReceiveCachedMetadata):
(WebCore::ResourceLoader::willStopBufferingData):
(WebCore::ResourceLoader::shouldUseCredentialStorage):
(WebCore::ResourceLoader::didReceiveAuthenticationChallenge):
(WebCore::ResourceLoader::didCancelAuthenticationChallenge):
(WebCore::ResourceLoader::canAuthenticateAgainstProtectionSpace):
(WebCore::ResourceLoader::receivedCancellation):
(WebCore::ResourceLoader::url):
(WebCore::ResourceLoader::handle):
(WebCore::ResourceLoader::sendResourceLoadCallbacks):
(WebCore::ResourceLoader::reachedTerminalState):
(WebCore::ResourceLoader::request):
(WebCore::ResourceLoader::cancelled):
(WebCore::ResourceLoader::defersLoading):

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