WebGL: need error checking after texture uploads
https://bugs.webkit.org/show_bug.cgi?id=62902
rdar://problem/9640309

Reviewed by Brent Fulgham.

A followup to Darin's r167109. We need to also check for errors
in the texImage2D case.

This is difficult to reproducibly test because it would require
attempting to exhaust GPU memory.

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::compressedTexImage2D): Check for errors by calling
moveErrorsToSyntheticErrorList twice, once before and once after. If an error
occurred, explicitly mark the texture as invalid.
(WebCore::WebGLRenderingContext::texImage2DBase): Ditto.
* html/canvas/WebGLTexture.cpp:
(WebCore::WebGLTexture::markInvalid): If the LevelInfo exists for this
mipmap level, then set the valid flag to false. There is a chance that
a previous call to texImage2D succeeded for this level, but it's probably
better to assume that is now invalid.
* html/canvas/WebGLTexture.h: New markInvalid method.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix LLInt for sh4 architecture (broken since C stack merge).
https://bugs.webkit.org/show_bug.cgi?id=131532

Reviewed by Mark Lam.

This patch fixes build and also implements sh4 parts for initPCRelative and
setEntryAddress macros introduced in http://trac.webkit.org/changeset/167094.

* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* offlineasm/instructions.rb:
* offlineasm/sh4.rb:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
wk2-gtk does not display anything
https://bugs.webkit.org/show_bug.cgi?id=125558

Reviewed by Martin Robinson.

Remove fcntl call to set access mode flags on the duplicated files
descriptor. Those flags are ignored in Linux and make fcntl to
fail in FreeBSD. We should handle the case where the passed
protection is ReadOnly.
Thanks to Raphael Kubo da Costa who proposed the solution.

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::createHandle):
(WebKit::accessModeFile): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel rendering: WK1: Trail of cruft in redraw during animations.
https://bugs.webkit.org/show_bug.cgi?id=131525

Reviewed by Simon Fraser.

Use enclosing rect instead of snapping to make sure the repaint rect always
covers the dirty area when painting is requested in a non-compositing RenderView.
This only applies to WK1 as WK2 has compositing RenderView and the repainting
is managed by RenderLayerBacking.

This is a temporary solution until after ScrollView/FrameView/RenderView
is transitioned to device pixels. (tracked here: webkit.org/b/131526).

Source/WebCore:

Test: fast/repaint/hidpi-block-width-change-leaves-cruft.html

* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):

LayoutTests:

* fast/repaint/hidpi-block-width-change-leaves-cruft-expected.html: Added.
* fast/repaint/hidpi-block-width-change-leaves-cruft.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Prevent crash when exiting fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=131528

Reviewed by Jer Noble.

* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
Clean up the _scaleAnimation controller, not just the _fadeAnimation controller.
(-[WKFullScreenWindowController close]): If we are doing an immediate
close of the view, we need to stop animations so we avoid any
final timer events from interacting with invalid window handles.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
"playbackTime" parameter is not present in AudioProcessingEvent Interface as per W3C spec
https://bugs.webkit.org/show_bug.cgi?id=105518

Patch by Praveen R Jadhav <praveen.j@samsung.com> on 2014-04-11
Reviewed by Jer Noble.

Source/WebCore:

Attribute "playbackTime" in AudioProcessingEvent implemented to pass playback time of
audiobuffer associated with ScriptProcessorNode of the context.

Reference: https://codereview.chromium.org/210973002

Spec: http://www.w3.org/TR/webaudio/#AudioProcessingEvent

Test: webaudio/audioprocessingevent.html

* Modules/webaudio/AudioProcessingEvent.cpp:
(WebCore::AudioProcessingEvent::create):
(WebCore::AudioProcessingEvent::AudioProcessingEvent):
* Modules/webaudio/AudioProcessingEvent.h:
(WebCore::AudioProcessingEvent::playbackTime):
* Modules/webaudio/AudioProcessingEvent.idl:
* Modules/webaudio/ScriptProcessorNode.cpp:
(WebCore::ScriptProcessorNode::fireProcessEvent):

LayoutTests:

Test case added to check AudioProcessingEvent attributes.

* webaudio/audioprocessingevent-expected.txt: Added.
* webaudio/audioprocessingevent.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@167131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Shapes] inset args and radial args should serialize to the simplest form
https://bugs.webkit.org/show_bug.cgi?id=129825

Reviewed by Dirk Schulze.

Source/WebCore:

Modify inset serialization to omit components where possible. The insets simplify
according to the margin shorthand, while the corner radii simplify according to
the border-radius shorthand.

Modifying existing parsing tests.

* css/CSSBasicShapes.cpp:
(WebCore::buildInsetRadii): Add the necessary radii, omitting components where possible.
(WebCore::buildInsetString): Omit components where possible.

LayoutTests:

Modify tests to use the shortened inset serialization.

* animations/resources/animation-test-helpers.js: Accept shortened inset forms.
* css3/masking/clip-path-animation-expected.txt:
* css3/masking/clip-path-animation.html:
* fast/masking/parsing-clip-path-shape-expected.txt:
* fast/masking/parsing-clip-path-shape.html:
* fast/shapes/parsing/parsing-shape-lengths-expected.txt:
* fast/shapes/parsing/parsing-shape-lengths.html:
* fast/shapes/parsing/parsing-shape-outside-expected.txt:
* fast/shapes/parsing/parsing-test-utils.js:
* fast/shapes/shape-outside-floats/shape-outside-animation-expected.txt:
* fast/shapes/shape-outside-floats/shape-outside-animation.html:


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