RenderLayerCompositor doesn't properly clip graphics layer sizes
https://bugs.webkit.org/show_bug.cgi?id=80372

Reviewed by Simon Fraser.

Source/WebCore:

To find the bounds for a composited layer, calculateCompositedBounds
iterates through all non-composited child layers using z-order and
normal flow lists. This does not preserve clipping from ancestor
layers, because a clipping ancestor layer can end up as a sibling to
its clipped descendent because it is not a stacking context.

Fix by explicitly checking cached clip roots.

Test: compositing/clip-child-by-non-stacking-ancestor.html

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::localClipRect):
(WebCore):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::repaintOnCompositingChange):
(WebCore::RenderLayerCompositor::calculateCompositedBounds):

LayoutTests:

Update several baselines due to smaller backing sizes.

* compositing/clip-child-by-non-stacking-ancestor-expected.txt: Added.
* compositing/clip-child-by-non-stacking-ancestor.html: Added.
* compositing/geometry/clip-expected.txt:
* compositing/images/clip-on-directly-composited-image-expected.txt:
* compositing/overflow/clip-descendents-expected.txt:
* platform/chromium-win/compositing/images/clip-on-directly-composited-image-expected.txt: Removed.
* platform/chromium-win/compositing/overflow/clip-descendents-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111456 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r111442.
http://trac.webkit.org/changeset/111442
https://bugs.webkit.org/show_bug.cgi?id=81711

Causes crashes and image mismatches in canvas tests (Requested
by leviw on #webkit).

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

Source/WebCore: 

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::HTMLCanvasElement):
(WebCore::HTMLCanvasElement::reset):
(WebCore::HTMLCanvasElement::createImageBuffer):
(WebCore::HTMLCanvasElement::clearCopiedImage):
* html/HTMLCanvasElement.h:
(HTMLCanvasElement):
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
(WebCore::CanvasRenderingContext2D::unwindStateStack):
(WebCore::CanvasRenderingContext2D::reset):

LayoutTests: 

* fast/canvas/canvas-resize-after-paint-without-layout-expected.txt: Removed.
* fast/canvas/canvas-resize-after-paint-without-layout.html: Removed.
* platform/chromium-linux/fast/canvas/canvas-resize-after-paint-without-layout-expected.png: Removed.
* platform/chromium-linux/fast/canvas/setWidthResetAfterForcedRender-expected.png:
* platform/chromium-linux/platform/chromium/virtual/gpu/fast/canvas/canvas-resize-after-paint-without-layout-expected.png: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111458 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Adding additional possible test expectations for span-as-immediate-child-property-removal and
span-as-immediate-columns-child-removal, since the test expectations are now all over the board.

* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use CSSPrimitiveValue::convertToLength() to handle CSSPropertyWebkitBoxReflect and in createGridTrackBreadth.
https://bugs.webkit.org/show_bug.cgi?id=81633

Reviewed by Andreas Kling.

No new tests / refactoring only.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::collectMatchingRulesForList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Updating and coalescing test expectations for nested-fragment-parser-crash.

* platform/chromium-linux-x86/fast/parser: Removed.
* platform/chromium-linux-x86/fast/parser/nested-fragment-parser-crash-expected.txt: Removed.
* platform/chromium-linux/fast/parser/nested-fragment-parser-crash-expected.txt: Removed.
* platform/chromium-mac-leopard/fast/parser/nested-fragment-parser-crash-expected.txt: Removed.
* platform/chromium-mac-snowleopard/fast/parser/nested-fragment-parser-crash-expected.txt: Removed.
* platform/chromium-win-vista/fast/parser: Removed.
* platform/chromium-win-vista/fast/parser/nested-fragment-parser-crash-expected.txt: Removed.
* platform/chromium-win-xp/fast/parser: Removed.
* platform/chromium-win-xp/fast/parser/nested-fragment-parser-crash-expected.txt: Removed.
* platform/chromium-win/fast/parser/nested-fragment-parser-crash-expected.txt: Removed.
* platform/chromium/fast/parser/nested-fragment-parser-crash-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111461 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable LTCG on Windows to avoid out of process space errors while linking
https://bugs.webkit.org/show_bug.cgi?id=81714

Reviewed by Jessie Berlin.

* win/tools/vsprops/production.vsprops:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111462 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Sandboxed PluginProcess should use private temporary and cache directories
        https://bugs.webkit.org/show_bug.cgi?id=81702
        <rdar://problem/10792047>

        Reviewed by Anders Carlsson.

        * Platform/Module.h:
        * Platform/mac/ModuleMac.mm:
        (WebKit::Module::bundleIdentifier):
        Expose plug-in's bundle identifier.

        * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Some unerlated fixes to make
        networking functional on my testing platforms. These serveices are already allowed for
        WebProcess.

        * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm:
        (readSandboxProfile): Unrelated fix - I've been made to rename the profile file, but
        didn't update where it's read from!
        (WKN_EnterSandbox): Add a suffix to user directories.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111463 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Address review comment for WebProcess side, too.

        * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): There is no need for
        path to be in static storage, setenv will copy the value.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows (make based) build fix.
<rdar://problem/11069015>

* JavaScriptCore.vcproj/JavaScriptCore.make: devenv /rebuild doesn't work with JavaScriptCore.vcproj. Use /clean and /build instead.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated Mac expected results for this test. <http://webkit.org/b/81705> tracks the fact that
r111416 broke it.

* platform/mac/fast/dom/prototype-inheritance-2-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Marking full-screen-restrictions as timing out on Windows. It was previously marked as slow,
but all recent tests either passed or timed out.

* platform/chromium/test_expectations.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111467 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Updated expected results for this test after r110409.

* platform/mac/fast/hidpi/video-controls-in-hidpi-expected.txt:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
visual word movement: crashes on CSS generated content.
https://bugs.webkit.org/show_bug.cgi?id=81581

Reviewed by Ryosuke Niwa.

Source/WebCore:

Check for null pointer when referencing box->renderer()->node() in previousRootInlineBox and nextRootInlineBox.

Test: editing/selection/move-by-word-visually-crash-test-css-generated-content.html

* editing/visible_units.cpp:
(WebCore::previousRootInlineBox):
(WebCore::nextRootInlineBox):

LayoutTests:

* editing/selection/move-by-word-visually-crash-test-css-generated-content-expected.txt: Added.
* editing/selection/move-by-word-visually-crash-test-css-generated-content.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111469 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r111453.
http://trac.webkit.org/changeset/111453
https://bugs.webkit.org/show_bug.cgi?id=81600

still broken

* Scripts/webkitpy/layout_tests/port/server_process.py:
(ServerProcess._reset):
(ServerProcess.handle_interrupt):
(ServerProcess.write):
(ServerProcess._check_for_crash):
(ServerProcess._handle_timeout):
(ServerProcess._check_for_abort):
(ServerProcess._read):
(ServerProcess.stop):
(ServerProcess):
(ServerProcess.set_crashed):
* Scripts/webkitpy/layout_tests/port/server_process_unittest.py:
(TrivialMockPort.is_crash_reporter):
(TestServerProcess.test_broken_pipe):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort._read_image_diff):
(WebKitDriver.has_crashed):
(WebKitDriver._check_for_driver_crash):
(WebKitDriver):
(WebKitDriver._detected_crash):
(WebKitDriver._subprocess_crashed):
(WebKitDriver._crashed_process_name):
(WebKitDriver.run_test):
(WebKitDriver._read_block):
* Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
(MockServerProcess.__init__):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a per-ScrollableArea tile cache base class
https://bugs.webkit.org/show_bug.cgi?id=81694

Reviewed by Sam Weinig.

Add an abstract base class, TiledBacking, that can be used to inform tile caches about changed
state in scrollable areas (such as the currently visible rect, whether the page is active or not, etc).

Make TileCache inherit from TiledBacking and port updating the visible rect over to this new mechanism.

* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::tiledBacking):
(WebCore):
* page/FrameView.h:
(FrameView):
* platform/ScrollableArea.h:
(WebCore):
(ScrollableArea):
(WebCore::ScrollableArea::tiledBacking):
* platform/graphics/GraphicsLayer.h:
(WebCore):
(WebCore::GraphicsLayer::tiledBacking):
* platform/graphics/TiledBacking.h: Added.
(WebCore):
(TiledBacking):
(WebCore::TiledBacking::~TiledBacking):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::tiledBacking):
* platform/graphics/ca/GraphicsLayerCA.h:
(GraphicsLayerCA):
* platform/graphics/ca/PlatformCALayer.h:
(PlatformCALayer):
* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::tiledBacking):
* platform/graphics/ca/mac/TileCache.h:
(TileCache):
* platform/graphics/ca/mac/WebTileCacheLayer.h:
(WebCore):
* platform/graphics/ca/mac/WebTileCacheLayer.mm:
(-[WebTileCacheLayer WebCore::]):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::tiledBacking):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::frameViewDidScroll):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111471 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip move-by-word-visually-crash-test-css-generated-content.html introduced in r111469
because isWordTextBreak or setEditingBehavior is not implemented.

* platform/gtk/Skipped:
* platform/qt/Skipped:
* platform/wk2/Skipped:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111472 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Perf-o-matic: don't query datastore to generate chart API urls
https://bugs.webkit.org/show_bug.cgi?id=81499

Reviewed by Hajime Morita.

Parse json text to extract timestamps and test values instead of iterating
through the data store.

* Websites/webkit-perf.appspot.com/create_handler.py:
(CreateHandler.post):
* Websites/webkit-perf.appspot.com/models.py:
(Runs._timestamp_and_value_from_json_entry):
(Runs):
(Runs.to_json):
(Runs.chart_params):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111473 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move webaudio to Modules/webaudio/
https://bugs.webkit.org/show_bug.cgi?id=81541

Patch by Mark Pilgrim <pilgrim@chromium.org> on 2012-03-20
Reviewed by Kentaro Hara.

No new tests, all existing tests pass.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.am:
* GNUmakefile.list.am:
* Modules/webaudio: Added.
* Modules/webaudio/AsyncAudioDecoder.cpp: Copied from Source/WebCore/webaudio/AsyncAudioDecoder.cpp.
* Modules/webaudio/AsyncAudioDecoder.h: Copied from Source/WebCore/webaudio/AsyncAudioDecoder.h.
* Modules/webaudio/AudioBasicProcessorNode.cpp: Copied from Source/WebCore/webaudio/AudioBasicProcessorNode.cpp.
* Modules/webaudio/AudioBasicProcessorNode.h: Copied from Source/WebCore/webaudio/AudioBasicProcessorNode.h.
* Modules/webaudio/AudioBuffer.cpp: Copied from Source/WebCore/webaudio/AudioBuffer.cpp.
* Modules/webaudio/AudioBuffer.h: Copied from Source/WebCore/webaudio/AudioBuffer.h.
* Modules/webaudio/AudioBuffer.idl: Copied from Source/WebCore/webaudio/AudioBuffer.idl.
* Modules/webaudio/AudioBufferCallback.h: Copied from Source/WebCore/webaudio/AudioBufferCallback.h.
* Modules/webaudio/AudioBufferCallback.idl: Copied from Source/WebCore/webaudio/AudioBufferCallback.idl.
* Modules/webaudio/AudioBufferSourceNode.cpp: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.cpp.
* Modules/webaudio/AudioBufferSourceNode.h: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.h.
* Modules/webaudio/AudioBufferSourceNode.idl: Copied from Source/WebCore/webaudio/AudioBufferSourceNode.idl.
* Modules/webaudio/AudioChannelMerger.cpp: Copied from Source/WebCore/webaudio/AudioChannelMerger.cpp.
* Modules/webaudio/AudioChannelMerger.h: Copied from Source/WebCore/webaudio/AudioChannelMerger.h.
* Modules/webaudio/AudioChannelMerger.idl: Copied from Source/WebCore/webaudio/AudioChannelMerger.idl.
* Modules/webaudio/AudioChannelSplitter.cpp: Copied from Source/WebCore/webaudio/AudioChannelSplitter.cpp.
* Modules/webaudio/AudioChannelSplitter.h: Copied from Source/WebCore/webaudio/AudioChannelSplitter.h.
* Modules/webaudio/AudioChannelSplitter.idl: Copied from Source/WebCore/webaudio/AudioChannelSplitter.idl.
* Modules/webaudio/AudioContext.cpp: Copied from Source/WebCore/webaudio/AudioContext.cpp.
* Modules/webaudio/AudioContext.h: Copied from Source/WebCore/webaudio/AudioContext.h.
* Modules/webaudio/AudioContext.idl: Copied from Source/WebCore/webaudio/AudioContext.idl.
* Modules/webaudio/AudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/AudioDestinationNode.cpp.
* Modules/webaudio/AudioDestinationNode.h: Copied from Source/WebCore/webaudio/AudioDestinationNode.h.
* Modules/webaudio/AudioDestinationNode.idl: Copied from Source/WebCore/webaudio/AudioDestinationNode.idl.
* Modules/webaudio/AudioGain.h: Copied from Source/WebCore/webaudio/AudioGain.h.
* Modules/webaudio/AudioGain.idl: Copied from Source/WebCore/webaudio/AudioGain.idl.
* Modules/webaudio/AudioGainNode.cpp: Copied from Source/WebCore/webaudio/AudioGainNode.cpp.
* Modules/webaudio/AudioGainNode.h: Copied from Source/WebCore/webaudio/AudioGainNode.h.
* Modules/webaudio/AudioGainNode.idl: Copied from Source/WebCore/webaudio/AudioGainNode.idl.
* Modules/webaudio/AudioListener.cpp: Copied from Source/WebCore/webaudio/AudioListener.cpp.
* Modules/webaudio/AudioListener.h: Copied from Source/WebCore/webaudio/AudioListener.h.
* Modules/webaudio/AudioListener.idl: Copied from Source/WebCore/webaudio/AudioListener.idl.
* Modules/webaudio/AudioNode.cpp: Copied from Source/WebCore/webaudio/AudioNode.cpp.
* Modules/webaudio/AudioNode.h: Copied from Source/WebCore/webaudio/AudioNode.h.
* Modules/webaudio/AudioNode.idl: Copied from Source/WebCore/webaudio/AudioNode.idl.
* Modules/webaudio/AudioNodeInput.cpp: Copied from Source/WebCore/webaudio/AudioNodeInput.cpp.
* Modules/webaudio/AudioNodeInput.h: Copied from Source/WebCore/webaudio/AudioNodeInput.h.
* Modules/webaudio/AudioNodeOutput.cpp: Copied from Source/WebCore/webaudio/AudioNodeOutput.cpp.
* Modules/webaudio/AudioNodeOutput.h: Copied from Source/WebCore/webaudio/AudioNodeOutput.h.
* Modules/webaudio/AudioPannerNode.cpp: Copied from Source/WebCore/webaudio/AudioPannerNode.cpp.
* Modules/webaudio/AudioPannerNode.h: Copied from Source/WebCore/webaudio/AudioPannerNode.h.
* Modules/webaudio/AudioPannerNode.idl: Copied from Source/WebCore/webaudio/AudioPannerNode.idl.
* Modules/webaudio/AudioParam.cpp: Copied from Source/WebCore/webaudio/AudioParam.cpp.
* Modules/webaudio/AudioParam.h: Copied from Source/WebCore/webaudio/AudioParam.h.
* Modules/webaudio/AudioParam.idl: Copied from Source/WebCore/webaudio/AudioParam.idl.
* Modules/webaudio/AudioParamTimeline.cpp: Copied from Source/WebCore/webaudio/AudioParamTimeline.cpp.
* Modules/webaudio/AudioParamTimeline.h: Copied from Source/WebCore/webaudio/AudioParamTimeline.h.
* Modules/webaudio/AudioProcessingEvent.cpp: Copied from Source/WebCore/webaudio/AudioProcessingEvent.cpp.
* Modules/webaudio/AudioProcessingEvent.h: Copied from Source/WebCore/webaudio/AudioProcessingEvent.h.
* Modules/webaudio/AudioProcessingEvent.idl: Copied from Source/WebCore/webaudio/AudioProcessingEvent.idl.
* Modules/webaudio/AudioSourceNode.h: Copied from Source/WebCore/webaudio/AudioSourceNode.h.
* Modules/webaudio/AudioSourceNode.idl: Copied from Source/WebCore/webaudio/AudioSourceNode.idl.
* Modules/webaudio/BiquadDSPKernel.cpp: Copied from Source/WebCore/webaudio/BiquadDSPKernel.cpp.
* Modules/webaudio/BiquadDSPKernel.h: Copied from Source/WebCore/webaudio/BiquadDSPKernel.h.
* Modules/webaudio/BiquadFilterNode.cpp: Copied from Source/WebCore/webaudio/BiquadFilterNode.cpp.
* Modules/webaudio/BiquadFilterNode.h: Copied from Source/WebCore/webaudio/BiquadFilterNode.h.
* Modules/webaudio/BiquadFilterNode.idl: Copied from Source/WebCore/webaudio/BiquadFilterNode.idl.
* Modules/webaudio/BiquadProcessor.cpp: Copied from Source/WebCore/webaudio/BiquadProcessor.cpp.
* Modules/webaudio/BiquadProcessor.h: Copied from Source/WebCore/webaudio/BiquadProcessor.h.
* Modules/webaudio/ConvolverNode.cpp: Copied from Source/WebCore/webaudio/ConvolverNode.cpp.
* Modules/webaudio/ConvolverNode.h: Copied from Source/WebCore/webaudio/ConvolverNode.h.
* Modules/webaudio/ConvolverNode.idl: Copied from Source/WebCore/webaudio/ConvolverNode.idl.
* Modules/webaudio/DOMWindowWebAudio.idl: Copied from Source/WebCore/webaudio/DOMWindowWebAudio.idl.
* Modules/webaudio/DefaultAudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/DefaultAudioDestinationNode.cpp.
* Modules/webaudio/DefaultAudioDestinationNode.h: Copied from Source/WebCore/webaudio/DefaultAudioDestinationNode.h.
* Modules/webaudio/DelayDSPKernel.cpp: Copied from Source/WebCore/webaudio/DelayDSPKernel.cpp.
* Modules/webaudio/DelayDSPKernel.h: Copied from Source/WebCore/webaudio/DelayDSPKernel.h.
* Modules/webaudio/DelayNode.cpp: Copied from Source/WebCore/webaudio/DelayNode.cpp.
* Modules/webaudio/DelayNode.h: Copied from Source/WebCore/webaudio/DelayNode.h.
* Modules/webaudio/DelayNode.idl: Copied from Source/WebCore/webaudio/DelayNode.idl.
* Modules/webaudio/DelayProcessor.cpp: Copied from Source/WebCore/webaudio/DelayProcessor.cpp.
* Modules/webaudio/DelayProcessor.h: Copied from Source/WebCore/webaudio/DelayProcessor.h.
* Modules/webaudio/DynamicsCompressorNode.cpp: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.cpp.
* Modules/webaudio/DynamicsCompressorNode.h: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.h.
* Modules/webaudio/DynamicsCompressorNode.idl: Copied from Source/WebCore/webaudio/DynamicsCompressorNode.idl.
* Modules/webaudio/HighPass2FilterNode.cpp: Copied from Source/WebCore/webaudio/HighPass2FilterNode.cpp.
* Modules/webaudio/HighPass2FilterNode.h: Copied from Source/WebCore/webaudio/HighPass2FilterNode.h.
* Modules/webaudio/HighPass2FilterNode.idl: Copied from Source/WebCore/webaudio/HighPass2FilterNode.idl.
* Modules/webaudio/JavaScriptAudioNode.cpp: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.cpp.
* Modules/webaudio/JavaScriptAudioNode.h: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.h.
* Modules/webaudio/JavaScriptAudioNode.idl: Copied from Source/WebCore/webaudio/JavaScriptAudioNode.idl.
* Modules/webaudio/LowPass2FilterNode.cpp: Copied from Source/WebCore/webaudio/LowPass2FilterNode.cpp.
* Modules/webaudio/LowPass2FilterNode.h: Copied from Source/WebCore/webaudio/LowPass2FilterNode.h.
* Modules/webaudio/LowPass2FilterNode.idl: Copied from Source/WebCore/webaudio/LowPass2FilterNode.idl.
* Modules/webaudio/MediaElementAudioSourceNode.cpp: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.cpp.
* Modules/webaudio/MediaElementAudioSourceNode.h: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.h.
* Modules/webaudio/MediaElementAudioSourceNode.idl: Copied from Source/WebCore/webaudio/MediaElementAudioSourceNode.idl.
* Modules/webaudio/OfflineAudioCompletionEvent.cpp: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.cpp.
* Modules/webaudio/OfflineAudioCompletionEvent.h: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.h.
* Modules/webaudio/OfflineAudioCompletionEvent.idl: Copied from Source/WebCore/webaudio/OfflineAudioCompletionEvent.idl.
* Modules/webaudio/OfflineAudioDestinationNode.cpp: Copied from Source/WebCore/webaudio/OfflineAudioDestinationNode.cpp.
* Modules/webaudio/OfflineAudioDestinationNode.h: Copied from Source/WebCore/webaudio/OfflineAudioDestinationNode.h.
* Modules/webaudio/RealtimeAnalyser.cpp: Copied from Source/WebCore/webaudio/RealtimeAnalyser.cpp.
* Modules/webaudio/RealtimeAnalyser.h: Copied from Source/WebCore/webaudio/RealtimeAnalyser.h.
* Modules/webaudio/RealtimeAnalyserNode.cpp: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.cpp.
* Modules/webaudio/RealtimeAnalyserNode.h: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.h.
* Modules/webaudio/RealtimeAnalyserNode.idl: Copied from Source/WebCore/webaudio/RealtimeAnalyserNode.idl.
* Modules/webaudio/WaveShaperDSPKernel.cpp: Copied from Source/WebCore/webaudio/WaveShaperDSPKernel.cpp.
* Modules/webaudio/WaveShaperDSPKernel.h: Copied from Source/WebCore/webaudio/WaveShaperDSPKernel.h.
* Modules/webaudio/WaveShaperNode.cpp: Copied from Source/WebCore/webaudio/WaveShaperNode.cpp.
* Modules/webaudio/WaveShaperNode.h: Copied from Source/WebCore/webaudio/WaveShaperNode.h.
* Modules/webaudio/WaveShaperNode.idl: Copied from Source/WebCore/webaudio/WaveShaperNode.idl.
* Modules/webaudio/WaveShaperProcessor.cpp: Copied from Source/WebCore/webaudio/WaveShaperProcessor.cpp.
* Modules/webaudio/WaveShaperProcessor.h: Copied from Source/WebCore/webaudio/WaveShaperProcessor.h.
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* WebCore.pri:
* WebCore.xcodeproj/project.pbxproj:
* webaudio/AsyncAudioDecoder.cpp: Removed.
* webaudio/AsyncAudioDecoder.h: Removed.
* webaudio/AudioBasicProcessorNode.cpp: Removed.
* webaudio/AudioBasicProcessorNode.h: Removed.
* webaudio/AudioBuffer.cpp: Removed.
* webaudio/AudioBuffer.h: Removed.
* webaudio/AudioBuffer.idl: Removed.
* webaudio/AudioBufferCallback.h: Removed.
* webaudio/AudioBufferCallback.idl: Removed.
* webaudio/AudioBufferSourceNode.cpp: Removed.
* webaudio/AudioBufferSourceNode.h: Removed.
* webaudio/AudioBufferSourceNode.idl: Removed.
* webaudio/AudioChannelMerger.cpp: Removed.
* webaudio/AudioChannelMerger.h: Removed.
* webaudio/AudioChannelMerger.idl: Removed.
* webaudio/AudioChannelSplitter.cpp: Removed.
* webaudio/AudioChannelSplitter.h: Removed.
* webaudio/AudioChannelSplitter.idl: Removed.
* webaudio/AudioContext.cpp: Removed.
* webaudio/AudioContext.h: Removed.
* webaudio/AudioContext.idl: Removed.
* webaudio/AudioDestinationNode.cpp: Removed.
* webaudio/AudioDestinationNode.h: Removed.
* webaudio/AudioDestinationNode.idl: Removed.
* webaudio/AudioGain.h: Removed.
* webaudio/AudioGain.idl: Removed.
* webaudio/AudioGainNode.cpp: Removed.
* webaudio/AudioGainNode.h: Removed.
* webaudio/AudioGainNode.idl: Removed.
* webaudio/AudioListener.cpp: Removed.
* webaudio/AudioListener.h: Removed.
* webaudio/AudioListener.idl: Removed.
* webaudio/AudioNode.cpp: Removed.
* webaudio/AudioNode.h: Removed.
* webaudio/AudioNode.idl: Removed.
* webaudio/AudioNodeInput.cpp: Removed.
* webaudio/AudioNodeInput.h: Removed.
* webaudio/AudioNodeOutput.cpp: Removed.
* webaudio/AudioNodeOutput.h: Removed.
* webaudio/AudioPannerNode.cpp: Removed.
* webaudio/AudioPannerNode.h: Removed.
* webaudio/AudioPannerNode.idl: Removed.
* webaudio/AudioParam.cpp: Removed.
* webaudio/AudioParam.h: Removed.
* webaudio/AudioParam.idl: Removed.
* webaudio/AudioParamTimeline.cpp: Removed.
* webaudio/AudioParamTimeline.h: Removed.
* webaudio/AudioProcessingEvent.cpp: Removed.
* webaudio/AudioProcessingEvent.h: Removed.
* webaudio/AudioProcessingEvent.idl: Removed.
* webaudio/AudioSourceNode.h: Removed.
* webaudio/AudioSourceNode.idl: Removed.
* webaudio/BiquadDSPKernel.cpp: Removed.
* webaudio/BiquadDSPKernel.h: Removed.
* webaudio/BiquadFilterNode.cpp: Removed.
* webaudio/BiquadFilterNode.h: Removed.
* webaudio/BiquadFilterNode.idl: Removed.
* webaudio/BiquadProcessor.cpp: Removed.
* webaudio/BiquadProcessor.h: Removed.
* webaudio/ConvolverNode.cpp: Removed.
* webaudio/ConvolverNode.h: Removed.
* webaudio/ConvolverNode.idl: Removed.
* webaudio/DOMWindowWebAudio.idl: Removed.
* webaudio/DefaultAudioDestinationNode.cpp: Removed.
* webaudio/DefaultAudioDestinationNode.h: Removed.
* webaudio/DelayDSPKernel.cpp: Removed.
* webaudio/DelayDSPKernel.h: Removed.
* webaudio/DelayNode.cpp: Removed.
* webaudio/DelayNode.h: Removed.
* webaudio/DelayNode.idl: Removed.
* webaudio/DelayProcessor.cpp: Removed.
* webaudio/DelayProcessor.h: Removed.
* webaudio/DynamicsCompressorNode.cpp: Removed.
* webaudio/DynamicsCompressorNode.h: Removed.
* webaudio/DynamicsCompressorNode.idl: Removed.
* webaudio/HighPass2FilterNode.cpp: Removed.
* webaudio/HighPass2FilterNode.h: Removed.
* webaudio/HighPass2FilterNode.idl: Removed.
* webaudio/JavaScriptAudioNode.cpp: Removed.
* webaudio/JavaScriptAudioNode.h: Removed.
* webaudio/JavaScriptAudioNode.idl: Removed.
* webaudio/LowPass2FilterNode.cpp: Removed.
* webaudio/LowPass2FilterNode.h: Removed.
* webaudio/LowPass2FilterNode.idl: Removed.
* webaudio/MediaElementAudioSourceNode.cpp: Removed.
* webaudio/MediaElementAudioSourceNode.h: Removed.
* webaudio/MediaElementAudioSourceNode.idl: Removed.
* webaudio/OfflineAudioCompletionEvent.cpp: Removed.
* webaudio/OfflineAudioCompletionEvent.h: Removed.
* webaudio/OfflineAudioCompletionEvent.idl: Removed.
* webaudio/OfflineAudioDestinationNode.cpp: Removed.
* webaudio/OfflineAudioDestinationNode.h: Removed.
* webaudio/RealtimeAnalyser.cpp: Removed.
* webaudio/RealtimeAnalyser.h: Removed.
* webaudio/RealtimeAnalyserNode.cpp: Removed.
* webaudio/RealtimeAnalyserNode.h: Removed.
* webaudio/RealtimeAnalyserNode.idl: Removed.
* webaudio/WaveShaperDSPKernel.cpp: Removed.
* webaudio/WaveShaperDSPKernel.h: Removed.
* webaudio/WaveShaperNode.cpp: Removed.
* webaudio/WaveShaperNode.h: Removed.
* webaudio/WaveShaperNode.idl: Removed.
* webaudio/WaveShaperProcessor.cpp: Removed.
* webaudio/WaveShaperProcessor.h: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Restrict access to notifications for unique origins and file URLs with no local file access
https://bugs.webkit.org/show_bug.cgi?id=79704
<rdar://problem/10912430>

Reviewed by Adam Barth.

Source/WebCore:

Before checking or requesting permissions, we look at whether we can show notifications based on
the security context. If not, we short circuit and do not forward the request to the client.

* notifications/Notification.cpp:
(WebCore::Notification::Notification): Fix a bug where creating a notification goes through slightly
different logic for checking permissions than when checking permissions through the
notification center.
* notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::checkPermission): Check to see if the origin can show notifications.
(WebCore::NotificationCenter::requestPermission): If we know whether an origin can show notifications,
we asynchronously call the callback with that decision. Otherwise we ask the client.

Add new variable in the notification center to keep track of pending callbacks when we short-circuit
requestPermission().
* notifications/NotificationCenter.h:
(NotificationRequestCallback): Add new private class encapsulating the callback.
* notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::requestTimedOut): Remove the request from the set of pending callbacks.
(WebCore::NotificationCenter::NotificationRequest::createAndStartTimer): Because this is used when we already
know the decision, and are not asking the client to decide, we can immediately trigger a one-shot timer
to invoke the callback.
(WebCore::NotificationCenter::NotificationRequest::NotificationRequest):
(WebCore::NotificationCenter::NotificationRequest::startTimer):
(WebCore::NotificationCenter::NotificationRequest::timerFired): Invoke the callback and tell the notification
center.
* page/SecurityOrigin.h: Add new toRawString() method to return the string representation of the origin,
regardless of any restrictions that might otherwise cause toString() to return "null".
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::canShowNotifications): Added to return a tri-state regarding whether we know
the origin can show notifications. If the origin is unique, we never let it show. If the origin has
universal access, we always let it show. Otherwise the client should be asked.
(WebCore::SecurityOrigin::toString): Refactor to use toRawString().
(WebCore::SecurityOrigin::toRawString):

Added FIXME's regarding the naming of enforceFilePathSeparation().
* dom/Document.cpp:
(WebCore::Document::initSecurityContext): Also, tab reformatting.

* WebCore.exp.in: Export toRawString().

Source/WebKit2:

In the specific case where a file URL has restricted file access and is denied universal access,
SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin.
The cached table of permissions held by the notification manager will typically not have an entry for
the toString() representation of these file URLs, which is "null", since that can also cover unique
origins, and it is possible that the client will want different permissions between the two types.

It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup.

* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::policyForOrigin):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@111476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Because we might short-circuit permission calls, some of these tests need to be rewritten
to take that factor into account. There's no mac support of notifications right now (see 79492),
so updating test expectations for now and tracking as a regression in 81697.

* platform/chromium/test_expectations.txt:

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