Web Inspector: Adjust toolbar labels position
https://bugs.webkit.org/show_bug.cgi?id=113805

Patch by Alexei Filippov <alph@chromium.org> on 2013-04-02
Reviewed by Pavel Feldman.

Move the labels 1px up to make them centered.
Also fix font centering in native memory distribution snapshot.

* inspector/front-end/inspector.css:
(.toolbar-label):
* inspector/front-end/nativeMemoryProfiler.css:
(.native-snapshot-view .data-grid td):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147474 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Encapsulate SetEmbedderData/GetEmbedderData
https://bugs.webkit.org/show_bug.cgi?id=113331

Patch by John J. Barton <johnjbarton@chromium.org> on 2013-04-02
Reviewed by Pavel Feldman.

Refactor to encapsulate uses of V8 Set/GetEmbedderData together
with uses of V8 Set/GetAlignedPointerInEmbedderData since these
functions operate on the same underyling array in V8.

* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::setContextDebugId):
(WebCore::ScriptController::contextDebugId):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::setInjectedScriptContextDebugId):
* bindings/v8/V8PerContextData.cpp:
(WebCore::V8PerContextDebugData::setContextDebugData):
(WebCore):
(WebCore::V8PerContextDebugData::contextDebugId):
(WebCore::V8PerContextDebugData::createDebugData):
(WebCore::V8PerContextDebugData::getDebugData):
(WebCore::V8PerContextDebugData::setDebugData):
* bindings/v8/V8PerContextData.h:
(V8PerContextDebugData):
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147475 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        <rdar://problem/13551119> [WK2] Crashes in NetworkProcess when canceling loads
        https://bugs.webkit.org/show_bug.cgi?id=113803

        Reviewed by Darin Adler.

        Stop using a delegate proxy. It hasn't been needed in years, and the extra layer
        just adds bugs.

        This specific issue gets fixed because connection retains its delegate is retained,
        but a proxy does not.

        * WebCore.exp.in:
        * platform/network/ResourceHandle.h:
        * platform/network/ResourceHandleInternal.h:
        * platform/network/mac/ResourceHandleMac.mm:
        (WebCore::ResourceHandle::start):
        (WebCore::ResourceHandle::releaseDelegate):
        (WebCore::ResourceHandle::platformLoadResourceSynchronously):
        Removed code that was dealing with delegate proxy.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147476 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Initialize all fields in WebFilterOperation
https://bugs.webkit.org/show_bug.cgi?id=113807

Reviewed by James Robinson.

* chromium/public/WebFilterOperation.h:
(WebKit::WebFilterOperation::WebFilterOperation):
* chromium/src/WebFilterOperation.cpp:
(WebKit::WebFilterOperation::WebFilterOperation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147477 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Make Source Frame & status bar a layout boundary
https://bugs.webkit.org/show_bug.cgi?id=112353

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-04-02
Reviewed by Pavel Feldman.

No new tests: no change in behaviour.

- Add View.markAsLayoutBoundary method to mark a view as a layout
boundary. This will force this view to autoupdate its height to actual
pixel value.
- Mark both CodeMirrorTextEditor and DefaultTextEditor as a layout
boundary.
- Mark main-status-bar element with a layout-boundary class.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor):
* inspector/front-end/DefaultTextEditor.js:
* inspector/front-end/View.js:
(WebInspector.View.prototype.markAsLayoutBoundary):
(WebInspector.View.prototype._processWillShow):
(WebInspector.View.prototype._processWasShown):
(WebInspector.View.prototype._processOnResize):
* inspector/front-end/inspector.css:
(.layout-boundary):
* inspector/front-end/inspector.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147478 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline svg/as-image/image-respects-pageScaleFactor expectations

Unreviewed rebaseline of test expectations.

* platform/chromium-linux/svg/as-image/image-respects-pageScaleFactor-expected.png:
* platform/chromium-mac-lion/svg/as-image/image-respects-pageScaleFactor-expected.png:
* platform/chromium-mac-snowleopard/svg/as-image/image-respects-pageScaleFactor-expected.png:
* platform/chromium-mac/svg/as-image/image-respects-pageScaleFactor-expected.png:
* platform/chromium-win/svg/as-image/image-respects-pageScaleFactor-expected.png:
* platform/chromium-win/svg/as-image/image-respects-pageScaleFactor-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147479 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r147464.
http://trac.webkit.org/changeset/147464
https://bugs.webkit.org/show_bug.cgi?id=113812

JSSQLResultSet.cpp:131:24: error: implicit conversion loses
integer precision: 'int64_t' (aka 'long long') to 'int'
[-Werror,-Wshorten-64-to-32] (Requested by xenon on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-04-02

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjAttrWithGetterException):
(WebCore::jsTestObjStringAttrWithGetterException):
(WebCore::jsTestObjWithScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjNullableDoubleAttribute):
(WebCore::jsTestObjNullableLongAttribute):
(WebCore::jsTestObjNullableBooleanAttribute):
(WebCore::jsTestObjNullableStringAttribute):
(WebCore::jsTestObjNullableLongSettableAttribute):
(WebCore::jsTestObjNullableStringValue):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::jsTestTypedefsAttrWithGetterException):
(WebCore::jsTestTypedefsStringAttrWithGetterException):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Provide a user default that can be used to disable docking of the Web Inspector.

The user default is "WebKit Web Inspector Setting - inspectorAttachDisabled".

https://webkit.org/b/113779
rdar://problem/13446021

Reviewed by Joseph Pecoraro.

Source/WebKit/cf:

* WebCoreSupport/WebInspectorClientCF.cpp:
(WebInspectorClient::inspectorAttachDisabled): Added.
(WebInspectorClient::setInspectorAttachDisabled): Added.

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h:
(WebInspectorClient::inspectorAttachDisabled): Added.
(WebInspectorClient::setInspectorAttachDisabled): Added.

* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::didResizeMainFrame):
(-[WebInspectorWindowController window]):
(-[WebInspectorWindowController showWindow:]):
Check inspectorAttachDisabled() in places where we attach or update the dock button.

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.h:
(WebInspectorClient::inspectorAttachDisabled): Added.
(WebInspectorClient::setInspectorAttachDisabled): Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disable running tests on the MAC WK2 EWS queue.
        
Unreviewed.
        
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(MacWK2EWS):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147483 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Regions] Remove font-smoothing from fast/regions/region-style-inline-background-color.html
https://bugs.webkit.org/show_bug.cgi?id=113814

Reviewed by James Robinson.

The test uses font smoothing and makes the test fail on Chromium Mountain Lion. This happens
because of how regions handle overflow and clipping. For now, disable the font smoothing in
the test.

* fast/regions/region-style-inline-background-color-expected.html:
* fast/regions/region-style-inline-background-color.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [Mac] Remove WKCreateNSURLConnectionDelegateProxy
        https://bugs.webkit.org/show_bug.cgi?id=113810

        Reviewed by Anders Carlsson.

        This WKSI function is not used any more.

        * WebCore.exp.in:
        * platform/mac/WebCoreSystemInterface.h:
        * platform/mac/WebCoreSystemInterface.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147485 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix css style for CC button on android
https://bugs.webkit.org/show_bug.cgi?id=113815

Patch by Min Qin <qinmin@chromium.org> on 2013-04-02
Reviewed by Adam Barth.

The default CC button size is 16px as defined in mediaControls.css. Android should use 35px.
This change fixed that problem.
Also fixed a problem that r142947 does not change the display of fullscreen button to -webkit-flex
Android does not run media layout tests currently. Will fix the test expectations when layout tests are run in content shell.

* css/mediaControlsChromiumAndroid.css:
(video::-webkit-media-controls-fullscreen-button):
(audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147486 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rebaseline overflowHidden.html's test results after r147245.

Unreviewed.

The patch r147245 (https://bugs.webkit.org/show_bug.cgi?id=106143) updated results for

Patch by Benjamin Poulain <bpoulain@apple.com> on 2013-04-02
Reviewed by Tony Chang.
Chromium, but not for the other platforms.

The new results on Mac, EFL and Win match the common reference.

* platform/efl/fast/table/overflowHidden-expected.txt: Removed.
* platform/mac/fast/table/overflowHidden-expected.txt: Removed.
* platform/win-7sp0/fast/table: Removed.
* platform/win-7sp0/fast/table/overflowHidden-expected.txt: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147488 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WKContextSetInvalidMessageFunction
https://bugs.webkit.org/show_bug.cgi?id=113820
<rdar://problem/12679817>

Reviewed by Tim Horton.

* UIProcess/API/C/WKContext.cpp:
(WKContextSetInvalidMessageFunction):
Call WebContext::didReceiveInvalidMessage.

* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setInvalidMessageCallback):
Set the global variable.

(WebKit::WebContext::didReceiveInvalidMessage):
Construct a message name string and call the invalid message callback.

* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveInvalidMessage):
Call WebContext::didReceiveInvalidMessage.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147489 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] Memory leaks in MediaPlayerPrivateGStreamer
https://bugs.webkit.org/show_bug.cgi?id=113762

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-04-02
Reviewed by Philippe Normand.

Don't leak strings returned by gst_element_get_name() and
gst_missing_plugin_message_get_installer_detail().

No new tests. No change in behavior.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147490 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for using ARM FFT in WebAudio
https://bugs.webkit.org/show_bug.cgi?id=109755

Reviewed by Chris Rogers.

Source/WebCore:

No new tests.

* WebCore.gyp/WebCore.gyp: Add dependency on openmax_dl when use_openmax_dl_fft is enabled.
* WebCore.gypi: Add source FFTFrameOpenMAXDLAndroid.cpp
* platform/audio/AudioArray.h:
(WebCore::AudioArray::allocate): Need 32-byte aligntment with the
OpenMAX DL FFT.
* platform/audio/FFTFrame.h:
(FFTFrame): Support OpenMAX DL FFT
* platform/audio/FFTFrameStub.cpp: Support OpenMAX DL FFT
* platform/audio/chromium/FFTFrameOpenMAXDLAndroid.cpp: Added.  Implements the
necessary interface using the OpenMAX DL FFT routines.
(WebCore):
(WebCore::FFTFrame::FFTFrame):
(WebCore::FFTFrame::initialize):
(WebCore::FFTFrame::cleanup):
(WebCore::FFTFrame::~FFTFrame):
(WebCore::FFTFrame::multiply):
(WebCore::FFTFrame::doFFT):
(WebCore::FFTFrame::doInverseFFT):
(WebCore::FFTFrame::realData):
(WebCore::FFTFrame::imagData):
(WebCore::FFTFrame::contextForSize):

Source/WebKit/chromium:

* features.gypi: Support building with the OpenMAX DL FFT.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/dom/HTMLImageElement/image-alt-text.html and fast/dom/HTMLInputElement/input-image-alt-text.html are failing
https://bugs.webkit.org/show_bug.cgi?id=94198

Reviewed by Darin Adler.

Source/WebCore:

Fix alt text not being displayed for img elements or input of type
"image" due to insufficient size. imageSizeForError() was adding
padding for the alt text but setImageSizeForAltText() was not. The
issue was occurring in paintReplaced() because the contentWidth() /
contentHeight() would be exactly the same size as the alt text.
However, paintReplaced() first draws an outline rect where the
image should be and then reduces the usable width / height for the
alt text by 2 so that the text does not get printed over the rect
borders. However, after decreasing the usable width / height, there
is no longer enough space to draw the text.

No new tests, already covered by existing tests.

* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText): Add padding to the text size
so that the alt text can still be drawn, despite the outline rect
borders. Such padding was already used in imageSizeForError(). Also use
ceilf() for the value returned by Font::width() instead of truncating it.
This is needed because we need to fit the whole text in the image and this
may not be the case if we truncate.
(WebCore::RenderImage::paintReplaced):

LayoutTests:

Rebaseline several test cases that have better result now and add those
tests to TestExpectations for other ports since they will need a
rebaseline.

* platform/chromium/TestExpectations:
* platform/efl/fast/block/float/002-expected.png:
* platform/efl/fast/block/float/017-expected.png:
* platform/efl/fast/dom/HTMLImageElement/image-alt-text-expected.png:
* platform/efl/fast/dom/HTMLImageElement/image-alt-text-expected.txt:
* platform/efl/fast/dom/HTMLInputElement/input-image-alt-text-expected.png:
* platform/efl/fast/dom/HTMLInputElement/input-image-alt-text-expected.txt:
* platform/efl/fast/encoding/utf-16-big-endian-expected.png:
* platform/efl/fast/encoding/utf-16-big-endian-expected.txt:
* platform/efl/fast/encoding/utf-16-little-endian-expected.png:
* platform/efl/fast/encoding/utf-16-little-endian-expected.txt:
* platform/efl/fast/flexbox/023-expected.png:
* platform/efl/fast/flexbox/024-expected.png:
* platform/efl/fast/forms/input-value-expected.png:
* platform/efl/fast/forms/input-value-expected.txt:
* platform/efl/fast/invalid/012-expected.png:
* platform/efl/fast/lists/inlineBoxWrapperNullCheck-expected.png:
* platform/efl/fast/lists/inlineBoxWrapperNullCheck-expected.txt:
* platform/efl/fast/parser/comment-in-script-expected.png:
* platform/efl/fast/text/whitespace/normal-after-nowrap-breaking-expected.png:
* platform/efl/tables/mozilla/bugs/bug2997-expected.png:
* platform/efl/tables/mozilla/collapsing_borders/bug41262-3-expected.png:
* platform/efl/tables/mozilla/collapsing_borders/bug41262-3-expected.txt:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Upstream AudioDestinationIOS.
https://bugs.webkit.org/show_bug.cgi?id=113806

Reviewed by Eric Carlson.

Upstream AudioDestinationIOS from the iOS repository.

* WebCore.xcodeproj/project.pbxproj:
* platform/audio/ios/AudioDestinationIOS.cpp: Added.
(WebCore::audioDestinations):
(WebCore::AudioDestination::create):
(WebCore::AudioDestination::hardwareSampleRate):
(WebCore::AudioDestination::maxChannelCount):
(WebCore::AudioDestinationIOS::AudioDestinationIOS):
(WebCore::AudioDestinationIOS::~AudioDestinationIOS):
(WebCore::AudioDestinationIOS::configure):
(WebCore::AudioDestinationIOS::audioDestinationInterruptionListener):
(WebCore::AudioDestinationIOS::initializeAudioSession):
(WebCore::AudioDestinationIOS::start):
(WebCore::AudioDestinationIOS::stop):
(WebCore::AudioDestinationIOS::beganAudioInterruption):
(WebCore::AudioDestinationIOS::endedAudioInterruption):
(WebCore::AudioDestinationIOS::render):
(WebCore::AudioDestinationIOS::inputProc):
(WebCore::AudioDestinationIOS::frameSizeChangedProc):
* platform/audio/ios/AudioDestinationIOS.h: Added.
(AudioDestinationIOS):
(WebCore::AudioDestinationIOS::isPlaying):
(WebCore::AudioDestinationIOS::sampleRate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add platform AudioSession and iOS platform-specific code.
https://bugs.webkit.org/show_bug.cgi?id=113813
<rdar://problem/11701792>

Reviewed by Eric Carlson.

Replace the deprecated AudioToolbox AudioSession APIs with the new AVAudioSession API.
To protect against exposing platform specific intrinsics to cross-platform code, add a
platform generic class AudioSession, with port-specific implementations. A default
implementation is provided.

Add a new listener interface to receive interruption notifications:
* platform/audio/AudioSessionListener.h: Added.
(WebCore::AudioSessionListener::AudioSessionListener):
(WebCore::AudioSessionListener::~AudioSessionListener):

Add a platform generic AudioSession class:
* platform/audio/AudioSession.cpp: Added.
(AudioSession::sharedSession): AudioSession is a singleton object, and this is its accessor.
(AudioSession::addListener): Add the parameter to the listeners set.
(AudioSession::removeListener): Remove the parameter from the listers set.
(AudioSession::beganAudioInterruption): Iterate over the parameters.
(AudioSession::endedAudioInterruption): Ditto.
(AudioSession::AudioSession): Empty stub.
(AudioSession::~AudioSession): Ditto.
(AudioSession::setCategory): Ditto.
(AudioSession::category): Ditto.
(AudioSession::sampleRate): Ditto.
(AudioSession::numberOfOutputChannels): Ditto.
(AudioSession::setActive): Ditto.
(AudioSession::preferredBufferDuration): Ditto.
(AudioSession::setPreferredBufferDuration): Ditto.
* platform/audio/AudioSession.h: Added.

Add IOS-specific AudioSession implementation:
* platform/audio/ios/AudioSessionIOS.mm: Added.
(-[WebAudioSessionHelper initWithCallback:WebCore::]): Register for interruption notifications.
(-[WebAudioSessionHelper dealloc]): Unregister for interruption notifications.
(-[WebAudioSessionHelper interruption:]): Pass to AudioSession.
(WebCore::AudioSessionPrivate::AudioSessionPrivate): Private storage for AudioSessionIOS.
(WebCore::AudioSession::AudioSession): Create AudioSessionPrivate and WebAudioSessionHelper.
(WebCore::AudioSession::~AudioSession): Simple destructor.
(WebCore::AudioSession::setCategory): Check the current categoryOverride, and refuse to overwrite
    "MediaPlayback" with "AmbientSound".
(WebCore::AudioSession::setCategoryOverride): Simple setter.
(WebCore::AudioSession::categoryOverride): Simple getter.
(WebCore::AudioSession::category): Pass to AVAudioSession.
(WebCore::AudioSession::sampleRate): Ditto.
(WebCore::AudioSession::numberOfOutputChannels): Ditto.
(WebCore::AudioSession::setActive): Ditto.
(WebCore::AudioSession::preferredBufferDuration): Ditto.
(WebCore::AudioSession::setPreferredBufferDuration): Ditto.

Use the new AudioSession class in place of explicit AudioToolbox or AVAudioSession calls:
* platform/audio/ios/AudioDestinationIOS.cpp:
(WebCore::AudioDestination::hardwareSampleRate): Pass to AudioSession.
(WebCore::AudioDestination::maxChannelCount): Ditto.
(WebCore::AudioDestinationIOS::AudioDestinationIOS): Register for listeners and activate.
(WebCore::AudioDestinationIOS::~AudioDestinationIOS): Unregister and deactivate.
(WebCore::AudioDestinationIOS::configure): Use AudioSession to set the buffer length.
* platform/audio/ios/AudioDestinationIOS.h:

Add the new files to the project:
* WebCore.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@147494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exclusions] refactor shape-outside code to use isFloatingWithShapeOutside() helper method
https://bugs.webkit.org/show_bug.cgi?id=113799

Patch by Bem Jones-Bey <bjonesbe@adobe.com> on 2013-04-02
Reviewed by Dirk Schulze.

When reviewing my patch for bug 110349, Julien mentioned that the
common test for floating with shape outside should be factored out.
This patch does that.

No new functionality, so no new tests.

* rendering/ExclusionShapeOutsideInfo.cpp:
(WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Use helper method.
* rendering/RenderBox.h:
(WebCore::RenderBox::exclusionShapeOutsideInfo): Ditto.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::shouldBeNormalFlowOnly): Ditto.
* rendering/RenderObject.h:
(WebCore::RenderObject::hasPaintOffset):  Ditto.
(WebCore::RenderObject::isFloatingWithShapeOutside): Add method to
    encapsulate the common test.

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