Made AudioNode an EventTarget
https://bugs.webkit.org/show_bug.cgi?id=116871

Source/WebCore:

Merge: https://chromium.googlesource.com/chromium/blink/+/ef37484162ddb95d677dcfdcdd778ec60590928b

Reviewed by Darin Adler.

Tests: webaudio/audionode-expected.txt:
       webaudio/audionode.html:

Add the requisite boilerplate to allow AudioNode to become an EventTarget. Remove
all that same boilerplate from ScriptProcessorNode now that it's base class
is an EventTarget.

* Modules/webaudio/AudioNode.cpp:
(WebCore::AudioNode::interfaceName): Added boilerplate.
(WebCore::AudioNode::scriptExecutionContext): Return the AudioContext's context.
(WebCore::AudioNode::processIfNecessary): Whitespace.
* Modules/webaudio/AudioNode.h:
* Modules/webaudio/AudioNode.idl: Make AudioNode an EventTarget.
* Modules/webaudio/ScriptProcessorNode.cpp: Remove EventTarget boilerplate.
* Modules/webaudio/ScriptProcessorNode.h: Ditto.
* Modules/webaudio/ScriptProcessorNode.idl: Ditto.
* dom/EventTarget.h: Mark AudioNode as an EventTarget.
* dom/EventTargetFactory.in: Ditto.

LayoutTests:

Reviewed by Darin Adler.

* webaudio/audionode-expected.txt:
* webaudio/audionode.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150810 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Fix style issues in BlackBerry accelerated compositing backend
https://bugs.webkit.org/show_bug.cgi?id=116604

Reviewed by Carlos Garcia Campos.

Source/WebCore:

PR 273550, 99638

Remove the "get" prefix from getters in the WebKit- and compositing-
thread layer classes, as well as LayerRendererSurface. Clarify which
geometry-related getters return normalized device coordinates by adding
a comment.

Also remove dead code related to LayerData::m_holePunchClipRect, which
was part of an eventually disabled fix for video clipping in iframes,
PR 99638. Since we now use AC layers for iframes, the bug is no longer
reproducible, and the dead code will never need to be enabled again.

No change in behavior, no new tests.

* platform/graphics/blackberry/EGLImageLayerCompositingThreadClient.cpp:
(WebCore::EGLImageLayerCompositingThreadClient::drawTextures):
* platform/graphics/blackberry/LayerCompositingThread.cpp:
(WebCore::LayerCompositingThread::setDrawTransform):
(WebCore::LayerCompositingThread::transformedHolePunchRect):
(WebCore::LayerCompositingThread::drawTextures):
(WebCore::LayerCompositingThread::drawSurface):
* platform/graphics/blackberry/LayerCompositingThread.h:
(WebCore::LayerCompositingThread::sublayers): Removed "get" prefix
(LayerCompositingThread):
(WebCore::LayerCompositingThread::boundingBox): Renamed from "getDrawRect"
(WebCore::LayerCompositingThread::transformedBounds): Removed "get" prefix
(WebCore::LayerCompositingThread::transformedHolePunchRect): Removed "get" prefix
* platform/graphics/blackberry/LayerData.h:
(LayerData): Removed unused data member "m_holePunchClipRect"
* platform/graphics/blackberry/LayerFilterRenderer.cpp:
(WebCore::LayerFilterRenderer::applyActions):
* platform/graphics/blackberry/LayerRenderer.cpp:
(WebCore::LayerRenderer::compositeLayers):
(WebCore::LayerRenderer::drawDebugBorder):
(WebCore::LayerRenderer::drawHolePunchRect):
(WebCore::LayerRenderer::prepareFrameRecursive):
(WebCore::LayerRenderer::updateLayersRecursive):
(WebCore::collect3DPreservingLayers):
(WebCore::LayerRenderer::compositeLayersRecursive):
* platform/graphics/blackberry/LayerRendererSurface.cpp:
(WebCore::LayerRendererSurface::boundingBox):
* platform/graphics/blackberry/LayerRendererSurface.h:
(WebCore::LayerRendererSurface::boundingBox): Renamed from "drawRect" because that sounds like a verb, and this is a getter
* platform/graphics/blackberry/LayerWebKitThread.h:
(WebCore::LayerWebKitThread::sublayers): Removed "get" prefix
* platform/graphics/blackberry/VideoLayerWebKitThread.cpp:
(WebCore::VideoLayerWebKitThread::setHolePunchRect):
(WebCore::VideoLayerWebKitThread::boundsChanged):

Source/WebKit/blackberry:

Adapt to the removal of "get" prefix from getters in the WebKit- and
compositing-thread layer classes.

* Api/WebOverlay.cpp:
(BlackBerry::WebKit::WebOverlayPrivateCompositingThread::pixelViewportRect):
* Api/WebPageCompositor.cpp:
(BlackBerry::WebKit::WebPageCompositorPrivate::attachOverlays):
(BlackBerry::WebKit::WebPageCompositorPrivate::removeOverlay):
(BlackBerry::WebKit::WebPageCompositorPrivate::findFixedElementRect):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150817 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] GraphicsContext: add missing definitions.
https://bugs.webkit.org/show_bug.cgi?id=115515

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-05-28
Reviewed by Rob Buis.

* platform/graphics/GraphicsContext.h:
(Graphics):
Add definition for PlatformGraphicsContext.
* platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
Include RoundedRect.h

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150820 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix line endings in test added in r150602

Unreviewed.

* fast/css/text-overflow-ellipsis-behind-floats.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Crash in DumpRenderTree at com.apple.WebCore: WebCore::RenderTextTrackCue::repositionGenericCue + 154
https://bugs.webkit.org/show_bug.cgi?id=116882

Reviewed by Eric Carlson.

Remove an inappropriate assert. No cues coming through repositionGenericCue will be WebVTT ones.

* rendering/RenderTextTrackCue.cpp:
(WebCore::RenderTextTrackCue::repositionGenericCue):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150827 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Silence a few failures to get bot green.
https://bugs.webkit.org/show_bug.cgi?id=116564

* platform/win/TestExpectations: Disable some tests.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150830 268f45cc-cd09-0410-ab3c-d52691b4dbfc
r150199 is very wrong
https://bugs.webkit.org/show_bug.cgi?id=116876

JSValue needs to protect its internal JSValueRef.

Reviewed by Darin Adler.

* API/JSValue.mm:
(-[JSValue initWithValue:inContext:]):
(-[JSValue dealloc]):
* API/tests/testapi.mm: Added a simple test to make sure that we protect the
underlying JavaScript value across garbage collections.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150831 268f45cc-cd09-0410-ab3c-d52691b4dbfc
String(new Date(2010,10,1)) is wrong in KRAT, YAKT
https://bugs.webkit.org/show_bug.cgi?id=106750

Reviewed by Darin Adler.

First part of a fix, simplfy date handling code, instead of operating separately
on the UTC-standard and standard-DST offsets, just generate a combined UTC-local
offset (this is what we actually need, and what the OS gives us).

../JavaScriptCore: 

* runtime/JSDateMath.cpp:
(JSC::getLocalTimeOffset):
    - removed getUTCOffset, converted getDSTOffset -> getLocalTimeOffset
(JSC::gregorianDateTimeToMS):
(JSC::msToGregorianDateTime):
(JSC::parseDateFromNullTerminatedCharacters):
    - call getLocalTimeOffset instead of getUTCOffset/getDSTOffset
* runtime/VM.cpp:
(JSC::VM::resetDateCache):
    - removed cachedUTCOffset, converted DSTOffsetCache -> LocalTimeOffsetCache
* runtime/VM.h:
(JSC::LocalTimeOffsetCache::LocalTimeOffsetCache):
(JSC::LocalTimeOffsetCache::reset):
(LocalTimeOffsetCache):
    - removed cachedUTCOffset, converted DSTOffsetCache -> LocalTimeOffsetCache

../WTF: 

* wtf/DateMath.cpp:
(WTF::calculateUTCOffset):
(WTF::calculateDSTOffset):
    - made static, now not called from outside of this file.
(WTF::calculateLocalTimeOffset):
    - This combines the 2038 related adjustment from calculateDSTOffset with the
      maxUnixTime adjustment from calculateDSTOffsetSimple. Then, if HAVE(TM_GMTOFF)
      just call getLocalTime, if not use calculateUTCOffset/calculateDSTOffset.
(WTF::parseDateFromNullTerminatedCharacters):
    - call calculateLocalTimeOffset instead of calculateUTCOffset/calculateDSTOffset
* wtf/DateMath.h:
(WTF::LocalTimeOffset::LocalTimeOffset):
(LocalTimeOffset):
(WTF::LocalTimeOffset::operator==):
    - new struct type, a tuple of UTC-local offset & isDST flag.
    - replaced calculateUTCOffset/calculateDSTOffset with calculateLocalTimeOffset
* wtf/GregorianDateTime.cpp:
(WTF::GregorianDateTime::setToCurrentLocalTime):
    - call calculateLocalTimeOffset instead of calculateUTCOffset/calculateDSTOffset



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build fix after r150833

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
A CR/LF combination was lost in the file, combining two symbols.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150834 268f45cc-cd09-0410-ab3c-d52691b4dbfc
String(new Date(2010,10,1)) is wrong in KRAT, YAKT
https://bugs.webkit.org/show_bug.cgi?id=106750

Reviewed by Darin Adler.

* runtime/JSDateMath.cpp:
(JSC::msToGregorianDateTime):
    - Additional review comment fix.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150835 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: WKView is unable to set AXFocused to YES and does not handle keyboard events as expected
https://bugs.webkit.org/show_bug.cgi?id=116756

Reviewed by Tim Horton.

If AXFocused is set to true, but the WebView is not the first responder, then the call will
not do anything. This change asks the Chrome to make the WebView the first responder before
trying to set focus within the page.

Was not able to make a test, it requires on interplay between areas outside the web view.

* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Create a html/forms subdirectory and move FileIconLoader there
https://bugs.webkit.org/show_bug.cgi?id=116880

Reviewed by Jessie Berlin.

A lot (if not the majority) of files in html/ are forms related, so it makes sense to begin splitting
them out into a separate subdirectory, html/forms.

Begin my moving FileIconLoader from platform to html/forms. It is related to HTML forms (it's only used by
the file upload element), and is not really a platform abstraction so it doesn't belong in platform.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* html/forms/FileIconLoader.cpp: Renamed from Source/WebCore/platform/FileIconLoader.cpp.
* html/forms/FileIconLoader.h: Renamed from Source/WebCore/platform/FileIconLoader.h.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150837 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rendering suppression extension tokens shouldn't be 0, should handle overflow
https://bugs.webkit.org/show_bug.cgi?id=116886
<rdar://problem/14004474>

Reviewed by Darin Adler.

Don't use invalid HashSet values as tokens, and ensure that
we're not already using a token before returning it.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::extendIncrementalRenderingSuppression):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build fix.  Remove ?byteCompile symbol that
is no longer accessible during link.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Put correct byteCompile symbol in file. Previous version
had an extra 'i' appended to the end.

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreExports.def:
* JavaScriptCore.vcxproj/JavaScriptCoreExportGenerator/JavaScriptCoreExports.def.in:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150842 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/js/date-DST-time-cusps.html fails after http://trac.webkit.org/changeset/150833
https://bugs.webkit.org/show_bug.cgi?id=116895

Unreviewed, add failing test expectation.

* TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150848 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] More attempts to make the bot green.

* platform/win/TestExpectations: Exclude another two flaky tests.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150849 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] NRWT reports failure for 'mac' test cases.
https://bugs.webkit.org/show_bug.cgi?id=116698

Reviewed by Ryosuke Niwa.

The Windows port falls back to the Mac port for many test results,
and so adds the mac and mac-wk2 to its set of fallbacks.
Unfortunately, NRWT thinks that this means that tests in these
folders should be executed, resulting in many failures on
Windows.

This change overloads the '_tests_for_other_platforms' method
to return a subset of the result fallback list so that we do
not attempt to execute Mac tests on Windows.

* Scripts/webkitpy/port/base.py:
(Port.test_search_path): Added. Defaults to just calling the
baseline_search_path method, which is how most ports behave.
(Port._test_for_other_platforms): Modified to call the new
test_search_path method.

* Scripts/webkitpy/port/win.py:
(WinPort.test_search_path): Added custom overload. Strips
out mac-specific test paths.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150850 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Many CSS2.1 tests fail under NRWT.
https://bugs.webkit.org/show_bug.cgi?id=75707

Patch by Brent Fulgham <bfulgham@webkit.org> on 2013-05-28
Reviewed by Darin Adler.

* DumpRenderTree/win/DumpRenderTree.cpp:
(findFontFallback): Added
(addFontFallbackIfPresent): Added
(removeFontFallbackIfPresent): Added
(runTest): Set up/remove font fallbacks when needed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@150851 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Many css2.1 tests fail on Apple's Windows port.
https://bugs.webkit.org/show_bug.cgi?id=75707

Reviewed by Darin Adler.

* WebKit.vcproj/WebKitExports.def.in: Export the
WebCore::directoryName method for DRT use.



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