[GTK] Add glib as a dependency to build glib-networking
https://bugs.webkit.org/show_bug.cgi?id=85181

Reviewed by Martin Robinson.

* gtk/jhbuild.modules:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed.  Rolled DEPS.


* DEPS:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose a flag so that fullscreen video on android can work with FULLSCREEN_API
https://bugs.webkit.org/show_bug.cgi?id=84414

Patch by Min Qin <qinmin@google.com> on 2012-04-30
Reviewed by Darin Fisher.

Source/WebCore:

No tests, just exposing the flag, and will be used by android later.
Sorry, there is a merge error during the previous commit, resolved now

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::setControls):
(WebCore):
(WebCore::MediaPlayer::enterFullscreen):
(WebCore::MediaPlayer::exitFullscreen):
* platform/graphics/MediaPlayer.h:
(MediaPlayer):
* platform/graphics/MediaPlayerPrivate.h:
(MediaPlayerPrivateInterface):
(WebCore::MediaPlayerPrivateInterface::enterFullscreen):

Source/WebKit/chromium:

On android, the fullscreen video was implemented by passing a java
surfaceView to an android mediaplayer class.
The implementation of that logic should happen in WebKit::WebMediaPlayer.
This change makes it possble for WebViewImpl::enterFullScreenForElement()
to call WebMediaPlayer->enterFullscreen(), thus solving the issue.

Sorry, there is a merge error during the previous commit, resolved now

No new tests. This just exposes the flag so later it can be used by android.

* features.gypi:
* public/WebMediaPlayer.h:
(WebMediaPlayer):
(WebKit::WebMediaPlayer::enterFullscreen):
(WebKit::WebMediaPlayer::exitFullscreen):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit):
(WebKit::WebMediaPlayerClientImpl::enterFullscreen):
(WebKit::WebMediaPlayerClientImpl::exitFullscreen):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::enterFullScreenForElement):
(WebKit::WebViewImpl::exitFullScreenForElement):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WTF::bind should work with blocks
https://bugs.webkit.org/show_bug.cgi?id=85227

Reviewed by Sam Weinig.

Add a block type FunctionWrapper specialization.

* wtf/Functional.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Add a proper license to FindSqlite.cmake.
https://bugs.webkit.org/show_bug.cgi?id=84901

Reviewed by Daniel Bates.

FindSqlite.cmake referenced COPYING-CMAKE-SCRIPTS, which was
supposed to contain its license. This file, however, was not
imported with FindSqlite.cmake into the tree.

Add it from kdelibs (where the Find file came from) at git
revision [1]. Also worth mentioning is that Alexander Neundorf
added Gilles Caulier as the script author in revision [2].

[1] https://projects.kde.org/projects/kde/kdelibs/repository/revisions/c27925edf98b9952aeada677dfc74ce9c809c48a
[2] https://projects.kde.org/projects/kde/kdelibs/repository/revisions/14d0a92e04e1a200d6e58397e57a29194a0819cf

* Source/cmake/FindSqlite.cmake:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a barrier-style dispatch member function to ScrollingThread
https://bugs.webkit.org/show_bug.cgi?id=85228

Reviewed by Sam Weinig.

Add a ScrollingThread::dispatchBarrier function which takes a WTF::Function and dispatches it to the main thread
once all the currently scheduled scrolling thread functions have run. This is to be used for synchronization between the
scrolling thread and the main thread.

* page/scrolling/ScrollingThread.cpp:
(WebCore::callFunctionOnMainThread):
(WebCore):
(WebCore::ScrollingThread::dispatchBarrier):
* page/scrolling/ScrollingThread.h:
(ScrollingThread):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove BlobBuilder
https://bugs.webkit.org/show_bug.cgi?id=84036

Reviewed by Anders Carlsson.

Source/WebCore: 

* GNUmakefile.am:
* fileapi/WebKitBlobBuilder.idl:
* page/DOMWindow.idl:
* workers/WorkerContext.idl:
Make exposing the WebKitBlobBuilder JS object conditional on a new
ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac,
but do for everyone else.

Source/WebKit/chromium: 

* features.gypi:
Keep WebKitBlobBuilder enabled for Chromium, since it has shipped it.

Tools: 

* Scripts/build-webkit:
* qmake/mkspecs/features/features.prf:
Make exposing the WebKitBlobBuilder JS object conditional on a new
ENABLE_LEGACY_WEBKIT_BLOB_BUILDER flag. Don't enable this for the Mac,
but do for everyone else.

LayoutTests: 

* fast/js/constructor-length.html:
* platform/mac/fast/js/constructor-length-expected.txt:
Remove WebKitBlobBuilder from this test, as it is not exposed on all platforms,
and add Blob, which is.

* platform/mac/Skipped:
Skip fast/files/blob-builder-crash.html, since we no longer support WebKitBlobBuilder.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Remove positioned float code.
https://bugs.webkit.org/show_bug.cgi?id=84795

Reviewed by Dan Bernstein.

Backout r92004 and some pieces from r91702.

Test: fast/block/float/positioned-float-crash.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EFloat):
* css/CSSValueKeywords.in:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::RenderBlock):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::addOverflowFromFloats):
(WebCore::RenderBlock::layoutBlockChild):
(WebCore::RenderBlock::simplifiedLayout):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::positionNewFloats):
(WebCore::RenderBlock::clearFloats):
(WebCore::RenderBlock::FloatingObjects::clear):
(WebCore::RenderBlock::FloatingObjects::increaseObjectsCount):
(WebCore::RenderBlock::FloatingObjects::decreaseObjectsCount):
* rendering/RenderBlock.h:
(RenderBlock):
(WebCore::RenderBlock::forceLayoutInlineChildren):
(FloatingObject):
(WebCore::RenderBlock::FloatingObject::FloatingObject):
(WebCore::RenderBlock::hasOverhangingFloats):
(WebCore::RenderBlock::FloatingObjects::FloatingObjects):
(FloatingObjects):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateBoxModelInfoFromStyle):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderDeprecatedFlexibleBox.h:
(RenderDeprecatedFlexibleBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlexibleBox.h:
(RenderFlexibleBox):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateScrollbarsAfterLayout):
* rendering/style/RenderStyleConstants.h:

LayoutTests: Remove positioned float code.
https://bugs.webkit.org/show_bug.cgi?id=84795

Reviewed by Dan Bernstein.

* fast/block/float/positioned-float-crash-expected.txt: Added.
* fast/block/float/positioned-float-crash.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add String::startsWith() and endsWith() for string literals
https://bugs.webkit.org/show_bug.cgi?id=85154

Reviewed by Darin Adler.

Source/WebCore: 

Update WebCore to use the simpler startsWith() and endsWith() taking
a UChar.

* css/CSSParser.cpp:
(WebCore::CSSParser::markPropertyEnd):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::parseKeyString):
* editing/markup.cpp:
(WebCore::createFragmentFromText):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::addSubresourceAttributeURLs):
* html/HTMLTextFormControlElement.cpp:
(WebCore::HTMLTextFormControlElement::setInnerTextValue):
* inspector/ContentSearchUtils.cpp:
(WebCore::ContentSearchUtils::getRegularExpressionMatchesByLines):
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::SetPropertyTextAction::redo):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::substituteMIMETypeFromPluginDatabase):
* loader/appcache/ManifestParser.cpp:
(WebCore::parseManifest):
* platform/blackberry/CookieManager.cpp:
(WebCore::CookieManager::shouldRejectForSecurityReason):
* platform/posix/FileSystemPOSIX.cpp:
(WebCore::pathByAppendingComponent):
* plugins/PluginDatabase.cpp:
(WebCore::PluginDatabase::findPlugin):
* svg/SVGStopElement.cpp:
(WebCore::SVGStopElement::parseAttribute):
* svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseOffsetValue):
(WebCore::SVGSMILElement::parseCondition):

Source/WebKit/blackberry: 

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::elementPatternMatches):

Source/WebKit2: 

Update WebKit2 to use String::endsWith(UChar).

* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::pathExtension):

Source/WTF: 

When invoking StringImpl::startsWidth() or StringImpl::endsWith() with
a string literal, a new String was constructed implicitly, allocating
a new StringImpl and copying the characters for the operation.

This patch adds a version of those methods for single characters and
string literals.
This allows us to avoid allocating memory and use the characters in place,
and it permits some extra shortcuts in the implementation.

* wtf/text/AtomicString.h:
(WTF::AtomicString::startsWith):
(AtomicString):
(WTF::AtomicString::endsWith):
* wtf/text/StringImpl.cpp:
(WTF::equalInner):
(WTF):
(WTF::StringImpl::startsWith):
(WTF::StringImpl::endsWith):
* wtf/text/StringImpl.h:
(WTF::StringImpl::startsWith):
(StringImpl):
(WTF::StringImpl::endsWith):
* wtf/text/WTFString.h:
(WTF::String::startsWith):
(String):
(WTF::String::endsWith):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8][JSC] Remove hard-coded "Not enough arguments" errors
https://bugs.webkit.org/show_bug.cgi?id=85207

Reviewed by Sam Weinig.

In bug 85022 and bug 85097, we implemented
createNotEnoughArgumentsError() in JSC and
V8Proxy::throwNotEnoughArgumentsError() in V8 and partially
removed hard-coded "Not enough arguments" errors.
This patch removes hard-coded "Not enough arguments"
errors by using the helper methods.

No tests. No change in behavior.

* bindings/js/JSAudioContextCustom.cpp:
(WebCore::JSAudioContextConstructor::constructJSAudioContext):
* bindings/js/JSSVGLengthCustom.cpp:
(WebCore::JSSVGLength::convertToSpecifiedUnits):
* bindings/js/JSWebSocketCustom.cpp:
(WebCore::JSWebSocketConstructor::constructJSWebSocket):
(WebCore::JSWebSocket::send):
* bindings/js/JSXMLHttpRequestCustom.cpp:
(WebCore::JSXMLHttpRequest::open):
* bindings/v8/ScriptController.cpp:
(WebCore::setValueAndClosePopupCallback):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8SVGLengthCustom.cpp:
(WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
(WebCore::V8WebSocket::sendCallback):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::openCallback):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Put all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING)
https://bugs.webkit.org/show_bug.cgi?id=85232

Reviewed by Sam Weinig.

Stop pretending that TiledCoreAnimationDrawingArea works without threaded scrolling.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea):
(WebKit::dispatchBackToMainThread):
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
(WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay):
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code
https://bugs.webkit.org/show_bug.cgi?id=85222

Reviewed by Eric Seidel.

Update platform code to use the pixel snapped values for painting rects
to line up with device pixels and change platform specific hit testing
code to use roundedPoint as hit testing is still mostly done on integer
bounds.

Source/WebCore: 

No new tests, no change in functionality.

* platform/qt/RenderThemeQt.cpp:
(WebCore::RenderThemeQt::paintMediaVolumeSliderTrack):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenuWin::paint):
* rendering/RenderThemeChromiumSkia.cpp:
(WebCore::RenderThemeChromiumSkia::paintSearchFieldCancelButton):
(WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsDecoration):
(WebCore::RenderThemeChromiumSkia::paintSearchFieldResultsButton):

Source/WebKit/gtk: 

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::mouseDidMoveOverElement):
* webkit/webkithittestresult.cpp:
(WebKit::kit):
* webkit/webkitwebview.cpp:
(getLocationForKeyboardGeneratedContextMenu):
(webkit_web_view_query_tooltip):

Source/WebKit2: 

* WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
(WebKit::WebPopupMenu::setUpPlatformData):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebGLRenderingContext methods should throw TypeError for not enough arguments
https://bugs.webkit.org/show_bug.cgi?id=84787

Reviewed by Kenneth Russell.

Currently, WebGLRenderingcontext methods implement
"Not enough arguments" error as SyntaxError. The Web IDL
spec requires that it should be TypeError:
http://www.w3.org/TR/WebIDL/#dfn-overload-resolution-algorithm

This patch changes SyntaxError to TypeError.

Source/WebCore:

I wanted to confirm the behavior of Firefox and Opera,
but they do not implement WebGL yet.

Test: fast/canvas/webgl/webgl-exceptions.html

* bindings/js/JSWebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::JSWebGLRenderingContext::getAttachedShaders):
(WebCore::JSWebGLRenderingContext::getExtension):
(WebCore::JSWebGLRenderingContext::getFramebufferAttachmentParameter):
(WebCore::JSWebGLRenderingContext::getParameter):
(WebCore::JSWebGLRenderingContext::getProgramParameter):
(WebCore::JSWebGLRenderingContext::getShaderParameter):
(WebCore::JSWebGLRenderingContext::getUniform):
(WebCore::dataFunctionf):
(WebCore::dataFunctioni):
(WebCore::dataFunctionMatrix):
* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
(WebCore::getObjectParameter):
(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):
(WebCore::V8WebGLRenderingContext::getExtensionCallback):
(WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):
(WebCore::V8WebGLRenderingContext::getParameterCallback):
(WebCore::V8WebGLRenderingContext::getProgramParameterCallback):
(WebCore::V8WebGLRenderingContext::getShaderParameterCallback):
(WebCore::V8WebGLRenderingContext::getUniformCallback):
(WebCore::vertexAttribAndUniformHelperf):
(WebCore::uniformHelperi):
(WebCore::uniformMatrixHelper):

LayoutTests:

* fast/canvas/webgl/webgl-exceptions-expected.txt: Added.
* fast/canvas/webgl/webgl-exceptions.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove an erroneous assertion after r115655.

* runtime/NumberPrototype.cpp:
(JSC::toUStringWithRadix):


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

* Shared/DrawingAreaInfo.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix ALL the build failures!

* UIProcess/API/mac/WKView.mm:
(-[WKView WebKit::]):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a way to asynchronously call a function once the scroll position of a page has been updated
https://bugs.webkit.org/show_bug.cgi?id=85237

Reviewed by Sam Weinig.

Source/WebCore:

* WebCore.exp.in:
Export functions needed by WebKit2.

* page/scrolling/ScrollingCoordinator.h:
Make commitTreeStateIfNeeded public.

Source/WebKit2:

Add DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition, which will call the given function object after
making sure that the scroll position has been updated correctly. This is important for TiledCoreAnimationDrawingArea,
which updates the scrolling position asynchronously.

* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
Since scroll position updates are synchronous by default, just call function directly.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
Commit the layer tree state and then use ScrollingThread::dispatchBarrier to make sure that the function is called when any
scroll position changes have been made. If possible, freeze the layer tree to make sure that the update is atomic.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Arguments object resets attributes on redefinition of a parameter
https://bugs.webkit.org/show_bug.cgi?id=84994

Rubber stamped by Oliver Hunt.

Source/JavaScriptCore: 

There is a bug that we always re-add the original property before
redefinition, doing so in a way that will reset the attributes
without checking configurability.

* runtime/Arguments.cpp:
(JSC::Arguments::defineOwnProperty):
    - Only instantiate the property once - do not re-add if
      it has already been added, or if it has been deleted.

LayoutTests: 

* fast/js/arguments-expected.txt:
* fast/js/script-tests/arguments.js:
    - Added test cases.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Remove Webkit/chromium/public/WebReferrerPolicy.h thunk.
https://bugs.webkit.org/show_bug.cgi?id=84552

After http://codereview.chromium.org/10139023/ lands, this thunk is no
longer needed.

Reviewed by Adam Barth.

* WebKit.gyp:
* public/WebReferrerPolicy.h: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position
https://bugs.webkit.org/show_bug.cgi?id=85240
<rdar://problem/11286609>

Reviewed by Sam Weinig.

Source/WebCore:

The call to updateMainFrameScrollPosition was added to make the WebKit2 find overlay work, since it relies
on scroll position updates being synchronous. Change the find code in WebKit2 to handle asynchronous scroll
position updates and remove the call to updateMainFrameScrollPosition.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::requestScrollPositionUpdate):

Source/WebKit2:

The find machinery should cope with asynchronous scroll position updates.

* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
Split the code that handles updating the find indicator and find overlay out into a separate function.

(WebKit::FindController::findString):
Call updateFindUIAfterPageScroll once we know that the scroll position has been updated.

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