[GStreamer] GstBuffer ref race in WebKitWebAudioSrcLoop
https://bugs.webkit.org/show_bug.cgi?id=95833

Reviewed by Philippe Normand.

The render bus used in GStreamer's implementation of AudioDestination no longer
allocates memory for each of its channels. Rather than that, when looping, the
data is rendered into a channel-specific GstBuffer. Each buffer is then chained
to the appropriate GstPad, as has been the case before.

No new tests - there are tests covering this change but they are not yet working
on the GTK port or any other GStreamer implementation of Web Audio.

* platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
(_WebKitWebAudioSourcePrivate): Remove an unused member variable.
(webkit_web_audio_src_init): Remove an unnecessary line.
(webKitWebAudioSrcConstructed): Ditto.
(webKitWebAudioSrcLoop):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r128787): Fixed position div causes other elements to not update correctly
https://bugs.webkit.org/show_bug.cgi?id=98579

Reviewed by Beth Dakin.

Source/WebCore:

RenderLayers cache repaint rects which are computed relative to the repaint container.
Repaint containers depend on whether a RenderLayerBacking has its own backing store,
so if that changes, we need to recompute repaint rects for all descendants.

Test: compositing/repaint/requires-backing-repaint.html

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setRequiresOwnBackingStore):

LayoutTests:

Repaint test that scrolls an overflow element until its content layers overlap some
other composited element. Only the pixel result is interesting.

* compositing/repaint/requires-backing-repaint-expected.png: Added.
* compositing/repaint/requires-backing-repaint-expected.txt: Added.
* compositing/repaint/requires-backing-repaint.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed gardening, unskip a now passing test.

* platform/qt/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
in a column flexbox, input overflows the box when stretched
https://bugs.webkit.org/show_bug.cgi?id=99273

Reviewed by Ojan Vafai.

Source/WebCore:

Fix a bug where we didn't properly subtract padding and border when overriding the child size.
We didn't see this because of a performance optimization in RenderBox where we stretch children.
Also apply this performance optimization in new flexbox for form controls.

Test: css3/flexbox/stretch-input-in-column.html

* rendering/RenderBox.cpp:
(WebCore::flexboxChildHasStretchAlignment):
(WebCore::isStretchingVerticalFlexboxChild):
(WebCore::RenderBox::sizesLogicalWidthToFitContent): Apply performance optimization to form controls in new flexbox.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Properly subtract border and padding.

LayoutTests:

Add a ref test since we're testing form rendering. Make sure that we get the
right behavior without the performance optimization (e.g., in multiline flexbox).

* css3/flexbox/stretch-input-in-column-expected.html: Added.
* css3/flexbox/stretch-input-in-column.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131481 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove expected fails for tests that need rebaseline after http://trac.webkit.org/changeset/131358

Unreviewed gardening.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium/mac] Make spelling indicator HighDPI
https://bugs.webkit.org/show_bug.cgi?id=99417

Reviewed by Stephen White.

Source/WebCore:

This is the mac version of http://trac.webkit.org/changeset/130940
Since the mac and non-mac code are very similar again, merge the two
code paths again.

Covered by editing/spelling/(inline-spelling|grammar)-markers-hidpi.html

* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::drawLineForDocumentMarker):

LayoutTests:

New baselines.

* platform/chromium-mac/editing/spelling/inline-spelling-markers-hidpi-expected.png :
* platform/chromium-mac/editing/spelling/grammar-markers-hidpi-expected.png :


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused WTF_NEW_HASHMAP_ITERATORS_INTERFACE #define
https://bugs.webkit.org/show_bug.cgi?id=99367

Reviewed by James Robinson.

Does what it says on the tin.

* wtf/HashTraits.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Refactor TextureMapperShaderManager to be clearer
https://bugs.webkit.org/show_bug.cgi?id=86048

Reviewed by Martin Robinson.

Previous implementation of TextureMapperShaderManager was very verbose, calling for too
many casts and ambiguous ownership.
This refactor does the following:
1. TextureMapperShaderProgram is one class without subclasses.
2. Uniform/Attribute accessors are generated by special macros (TEXMAP_DECLARE_...) that
   generate both the C++ access function, as well as the GLSL name of the variable. This
   allows adding/removing variables from a shader without adding broiler-plate code like
   before.

After this change TextureMapperShaderManager has only one responsibility - dealing with
TextureMapperGL's built-in shaders and their lifecycle. Preparing filters etc. is done
in TextureMapperGL.

This is a refactor without new functionality. It has been verified to not break any existing
relevant test.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::TextureMapperGL::drawBorder):
(WebCore::TextureMapperGL::drawQuad):
(WebCore::TextureMapperGL::drawTextureRectangleARB):
(WebCore::TextureMapperGL::drawTexture):
(WebCore::TextureMapperGL::drawTextureWithAntialiasing):
(WebCore::TextureMapperGL::drawTexturedQuadWithProgram):
(WebCore::TextureMapperGL::beginClip):
    Use the MACRO-generated uniform accessors.

(WebCore):
(WebCore::keyForFilterType):
(WebCore::getPassesRequiredForFilter):
(WebCore::gauss):
(WebCore::gaussianKernel):
(WebCore::prepareFilterProgram):
(WebCore::TextureMapperGL::drawFiltered):
(WebCore::BitmapTextureGL::applyFilters):
    Move the filter logic to TextureMapperGL

* platform/graphics/texmap/TextureMapperShaderManager.cpp:
(WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
(WebCore::TextureMapperShaderProgram::getLocation):
(ShaderSpec):
(WebCore::ShaderSpec::ShaderSpec):
(WebCore::getShaderSpec):
(WebCore::TextureMapperShaderManager::TextureMapperShaderManager):
(WebCore::TextureMapperShaderManager::~TextureMapperShaderManager):
(WebCore::TextureMapperShaderManager::getShaderProgram):
* platform/graphics/texmap/TextureMapperShaderManager.h:
(WebCore):
(WebCore::TextureMapperShaderProgram::programID):
(WebCore::TextureMapperShaderProgram::context):
(WebCore::TextureMapperShaderProgram::create):
(TextureMapperShaderProgram):
(TextureMapperShaderManager):
    See description.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
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
Unreviewed.  Rolled DEPS.

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-16

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
MediaStream API: Add the chromium API for RTCDataChannel
https://bugs.webkit.org/show_bug.cgi?id=99435

Reviewed by Adam Barth.

Source/Platform:

Adding WebRTCDataChannel.

* Platform.gypi:
* chromium/public/WebRTCDataChannel.h: Added.
(WebCore):
(WebKit):
(WebRTCDataChannel):
(ExtraData):
(WebKit::WebRTCDataChannel::ExtraData::~ExtraData):
(WebKit::WebRTCDataChannel::WebRTCDataChannel):
(WebKit::WebRTCDataChannel::~WebRTCDataChannel):
(WebKit::WebRTCDataChannel::operator=):
(WebKit::WebRTCDataChannel::isNull):
* chromium/public/WebRTCPeerConnectionHandler.h:
(WebKit):
(WebRTCPeerConnectionHandler):
(WebKit::WebRTCPeerConnectionHandler::openDataChannel):
(WebKit::WebRTCPeerConnectionHandler::sendStringData):
(WebKit::WebRTCPeerConnectionHandler::sendRawData):
(WebKit::WebRTCPeerConnectionHandler::closeDataChannel):

Source/WebCore:

Adding WebRTCDataChannel.

Test: fast/mediastream/RTCPeerConnection-datachannel.html

* WebCore.gypi:
* platform/chromium/support/WebRTCDataChannel.cpp: Added.
(WebKit):
(ExtraDataContainer):
(WebKit::ExtraDataContainer::ExtraDataContainer):
(WebKit::ExtraDataContainer::extraData):
(WebKit::WebRTCDataChannel::WebRTCDataChannel):
(WebKit::WebRTCDataChannel::initialize):
(WebKit::WebRTCDataChannel::assign):
(WebKit::WebRTCDataChannel::reset):
(WebKit::WebRTCDataChannel::operator PassRefPtr<WebCore::RTCDataChannelDescriptor>):
(WebKit::WebRTCDataChannel::operator WebCore::RTCDataChannelDescriptor*):
(WebKit::WebRTCDataChannel::extraData):
(WebKit::WebRTCDataChannel::setExtraData):
(WebKit::WebRTCDataChannel::label):
(WebKit::WebRTCDataChannel::reliable):
(WebKit::WebRTCDataChannel::setBufferedAmount):
(WebKit::WebRTCDataChannel::readyStateChanged):
(WebKit::WebRTCDataChannel::dataArrived):
(WebKit::WebRTCDataChannel::error):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::negotiationNeeded):
(WebCore::RTCPeerConnectionHandlerChromium::didGenerateICECandidate):
(WebCore):
(WebCore::RTCPeerConnectionHandlerChromium::didChangeReadyState):
(WebCore::RTCPeerConnectionHandlerChromium::didChangeICEState):
(WebCore::RTCPeerConnectionHandlerChromium::didRemoveRemoteStream):

Source/WebKit/chromium:

Adding checks for RTCDataChannel.

* src/AssertMatchingEnums.cpp:

Tools:

Adding mock support for WebRTCDataChannel.

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(StringDataTask):
(StringDataTask::StringDataTask):
(CharPtrDataTask):
(CharPtrDataTask::CharPtrDataTask):
(DataChannelReadyStateTask):
(DataChannelReadyStateTask::DataChannelReadyStateTask):
(RTCPeerConnectionReadyStateTask):
(RTCPeerConnectionReadyStateTask::RTCPeerConnectionReadyStateTask):
(MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler):
(MockWebRTCPeerConnectionHandler::initialize):
(MockWebRTCPeerConnectionHandler::stop):
(MockWebRTCPeerConnectionHandler::openDataChannel):
(MockWebRTCPeerConnectionHandler::closeDataChannel):
(MockWebRTCPeerConnectionHandler::sendStringData):
(MockWebRTCPeerConnectionHandler::sendRawData):
* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h:
(MockWebRTCPeerConnectionHandler):

LayoutTests:

Adding tests for RTCDataChannel.

* fast/mediastream/RTCPeerConnection-datachannel-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-datachannel.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Android: Need a way to get appropriate font for some specific characters.
https://bugs.webkit.org/show_bug.cgi?id=67587

Reviewed by Adam Barth.

Source/WebCore:

Use the new Skia API SkGetFallbackFamilyNameForChar() to get the family name for individual characters.

No new tests. The following existing tests pass with the change:
fast/writing-mode/vertical-subst-font-vert-no-dflt.html
fast/dynamic/text-combine.html
fast/writing-mode/japanese-rl-text.html
fast/writing-mode/japanese-rl-selection.html
fast/writing-mode/japanese-lr-text.html
fast/repaint/japanese-rl-selection-repaint.html
fast/writing-mode/border-vertical-lr.html

* platform/graphics/chromium/FontCacheAndroid.cpp:
(WebCore::FontCache::getFontDataForCharacters):

Source/WebKit/chromium:

Define ENABLE_OPENTYPE_VERTICAL=1 on Android.

* features.gypi:

LayoutTests:

Removed unnecessary rebaselines.
Removed failure expectations for the tests now pass.
Added pixel only rebaselines for some of the above tests.

* platform/chromium-android/fast/repaint/japanese-rl-selection-repaint-expected.png: Added. New pixel rebaseline.
* platform/chromium-android/fast/writing-mode/japanese-lr-selection-expected.png: Removed. Unnecessary rebaseline.
* platform/chromium-android/fast/writing-mode/japanese-lr-selection-expected.txt: Removed. Unnecessary rebaseline.
* platform/chromium-android/fast/writing-mode/japanese-rl-selection-expected.png: Added. New pixel rebaseline.
* platform/chromium-android/fast/writing-mode/japanese-rl-text-with-broken-font-expected.png: Removed. Unnecessary rebaseline.
* platform/chromium/TestExpectations: Removed the failure expectations for the tests now pass.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove Platform.h include from the header files.
https://bugs.webkit.org/show_bug.cgi?id=98665

Patch by Dima Gorbik <dgorbik@apple.com> on 2012-10-16
Reviewed by Eric Seidel.

We don't want other clients that include WebKit headers to know about Platform.h.

Source/JavaScriptCore:

* API/tests/minidom.c:
* API/tests/testapi.c:

Source/WebCore:

No new tests.

* platform/MemoryPressureHandler.h:
* platform/graphics/filters/arm/FECompositeArithmeticNEON.h:
* platform/graphics/filters/arm/FEGaussianBlurNEON.h:
* platform/graphics/filters/arm/FELightingNEON.h:

Source/WTF:

* wtf/Assertions.h:
* wtf/MainThread.h:

Tools:

* DumpRenderTree/mac/MockGeolocationProvider.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@131496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
input[type=range] as a flex item renders thumb at wrong position
https://bugs.webkit.org/show_bug.cgi?id=98666

Reviewed by Ojan Vafai.

Source/WebCore:

Replace RenderSlider implementation with new flexbox and clean up the shadow DOM.
The previous code was trying to set the height to 100% and had a bunch of hacks in
the renderer code to set an explicit height. Using the new flexbox allows us to
remove these renderer hacks.

Test: css3/flexbox/flexitem-stretch-range.html

* css/html.css:
(input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container): Use new flexbox.
(input[type="range"]::-webkit-slider-runnable-track): Use new flexbox.
(input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-media-slider-thumb): Remove relative positioning since we're
no longer setting top/left in the layout code.
* css/mediaControlsChromium.css: Remove redundant styles and bottom: 1px hack.
* css/mediaControlsChromiumAndroid.css: Remove redundant styles and bottom: 1px hack.
* html/RangeInputType.cpp:
(WebCore::RangeInputType::listAttributeTargetChanged): We need to force a layout
since the height of the control should change when adding/removing a datalist.
* html/shadow/SliderThumbElement.cpp:
(WebCore::RenderSliderContainer::RenderSliderContainer): Use new flexbox.
(WebCore::RenderSliderContainer::computeLogicalHeight): Rather than setting style()->height() in layout, just compute the correct
height when asked.  If we have a datalist, we increase the height (same code as before).  If we're vertical,
we use the intrinsic size.
(WebCore::RenderSliderContainer::layout): Remove extra layout code, but handle the position of the thumb.
This used to be handled in the thumb's layout method, but I deleted that.
* html/shadow/SliderThumbElement.h:
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::RenderSlider): Use new flexbox.
(WebCore::RenderSlider::layout): Set the limiter size to the size of the thumb. This is necessary
for fast/css/unknown-pseudo-element-matching.html which tries to set the height of the thumb to 1px
and expects the input to also have a height of 1px.  It worked before because the height of the input
didn't depend on the height of its children.
* rendering/RenderSlider.h: Fix indentation.
(RenderSlider): Use new flexible box.

LayoutTests:

Changing the render tree to use RenderFlexibleBox instead of RenderDeprecatedFlexibleBox
and not using a RenderLayer unless noted otherwise.

* css3/flexbox/flexitem-stretch-range-expected.html: Added.
* css3/flexbox/flexitem-stretch-range.html: Added. New test to verify stretched flex item has the
thumb in the correct place.
* platform/chromium-linux/fast/dom/HTMLInputElement/input-slider-update-expected.txt:
* platform/chromium-linux/fast/dom/HTMLInputElement/input-slider-update-styled-expected.txt:
* platform/chromium-linux/fast/forms/box-shadow-override-expected.txt:
* platform/chromium-linux/fast/forms/datalist/input-appearance-range-with-datalist-expected.png: Changed the default height to
129px for vertical controls. This makes more sense than having a height of 100%.
* platform/chromium-linux/fast/forms/input-appearance-height-expected.txt:
* platform/chromium-linux/fast/forms/range/input-appearance-range-expected.png: The thumb now appears below the
focus ring. This matches other form controls like buttons and textareas.
* platform/chromium-linux/fast/forms/range/input-appearance-range-expected.txt:
* platform/chromium-linux/fast/forms/range/range-thumb-height-percentage-expected.txt:
* platform/chromium-linux/fast/forms/range/slider-padding-expected.txt:
* platform/chromium-linux/fast/forms/range/slider-thumb-shared-style-expected.txt:
* platform/chromium-linux/fast/forms/range/slider-thumb-stylability-expected.txt:
* platform/chromium-linux/fast/hidpi/video-controls-in-hidpi-expected.txt:
* platform/chromium-linux/fast/multicol/client-rects-expected.txt:
* platform/chromium-linux/fast/repaint/slider-thumb-drag-release-expected.txt:
* platform/chromium-linux/fast/repaint/slider-thumb-float-expected.txt:
* platform/chromium-linux/media/track/track-cue-rendering-vertical-expected.txt:
* platform/chromium-win/fast/layers/video-layer-expected.txt:
* platform/chromium-win/media/audio-controls-rendering-expected.txt:
* platform/chromium-win/media/audio-repaint-expected.txt:
* platform/chromium-win/media/controls-after-reload-expected.txt:
* platform/chromium-win/media/controls-strict-expected.txt:
* platform/chromium-win/media/controls-styling-expected.txt:
* platform/chromium-win/media/controls-styling-strict-expected.txt:
* platform/chromium-win/media/controls-without-preload-expected.txt:
* platform/chromium-win/media/media-controls-clone-expected.txt:
* platform/chromium-win/media/media-document-audio-repaint-expected.txt:
* platform/chromium-win/media/track/track-cue-rendering-horizontal-expected.txt:
* platform/chromium-win/media/video-controls-rendering-expected.txt:
* platform/chromium-win/media/video-display-toggle-expected.txt:
* platform/chromium-win/media/video-empty-source-expected.txt:
* platform/chromium-win/media/video-no-audio-expected.txt:
* platform/chromium-win/media/video-playing-and-pause-expected.txt:
* platform/chromium-win/media/video-zoom-controls-expected.txt:

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