[Qt] Assertion in RenderObject::offsetFromAncestorContainer
https://bugs.webkit.org/show_bug.cgi?id=93845

Reviewed by Kenneth Rohde Christiansen.

Do not attempt to clip using layers that are not containers of the renderer.

* page/GestureTapHighlighter.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125433 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Rounding error somewhere when translating CompositingLayer 's for in-region scrolling
https://bugs.webkit.org/show_bug.cgi?id=93848
PR #190986

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>

Patch adds a WebKit thread setScrollPosition-like API to InRegionScroller.
It fixes a mismatch we had of setting a layer's scroll positing directly via
::setScrollPosition on the UI thread, but dispatching a coalesceable
scrollBy(delta) message to WebKit thread.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::InRegionScroller::setScrollPositionCompositingThread):
Changed the API name to match other thread specific methods naming.
(WebKit):
(BlackBerry::WebKit::InRegionScroller::setScrollPositionWebKitThread):
Added a setScrollPosition-like method to InRegionScroller public API. Used
together with its UI-thread counterpart, it can fix some rounding
errors we have due to mixing ::setScrollPosition and ::scrollBy methods.
(BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionCompositingThread):
Method renamed. See reasons above.
(BlackBerry::WebKit::InRegionScrollerPrivate::setScrollPositionWebKitThread):
Calls fowards the call to ::setLayerScrollPosition (below).
(BlackBerry::WebKit::InRegionScrollerPrivate::setLayerScrollPosition):
Sets the scroll position of a given RenderLayer.
* Api/InRegionScroller.h:
(InRegionScroller):
* Api/InRegionScroller_p.h:
(WebCore):
(InRegionScrollerPrivate):
* WebKitSupport/InRegionScrollableArea.cpp:
(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):
Cache the RenderLayer object associated to a given scrollable area
instead of its LayerCompositingThread. This way we can use it for
scrolling from both Compositing/UI and WebKit threads.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125434 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Hardware accelerated scrolling of <select> content
https://bugs.webkit.org/show_bug.cgi?id=93856

Reviewed by Rob Buis.
Patch by Antonio Gomes <agomes@rim.com>

Internally reviewed by Matthew Staikos.

* Resources/blackberry/selectControlBlackBerry.css: add -webkit-overflow-scrolling: touch (EOM).
(.select-area):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125435 268f45cc-cd09-0410-ab3c-d52691b4dbfc
FrameLoader::receivedMainResourceError doesn't handle GET cancellations well.
https://bugs.webkit.org/show_bug.cgi?id=93850

Patch by Mike West <mkwst@chromium.org> on 2012-08-13
Reviewed by Adam Barth.

'FrameLoader::cancel' should reset the loader's state, and it mostly
does. In the case of a GET form submission, however, the submitted form
URL that's stored doesn't match the URL that's requested (query string).
This leads to the loader getting a bit confused about what's going on,
and not clearing the stored form submission URL.

This patch moves to storing the form submission's actual request URL
as opposed to the form action URL.

None of the current tests should break, and when issue 93777 lands, it
won't be broken either.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
    Switched to using 'FormSubmission::requestURL', as that matches the
    URL that's actually requested during a form submission via GET.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r125430.
http://trac.webkit.org/changeset/125430
https://bugs.webkit.org/show_bug.cgi?id=93881

Caused css2.1/t1604-c541-word-sp-00-b-a.html to regress on Mac
builds (Requested by mwenge on #webkit).

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

Source/WebCore:

* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advance):
* platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp:
(WebCore::HarfBuzzShaperBase::isWordEnd):
* platform/graphics/harfbuzz/HarfBuzzShaperBase.h:
(HarfBuzzShaperBase):
(WebCore::HarfBuzzShaperBase::isCodepointSpace):
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::ComplexTextController::adjustGlyphsAndAdvances):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::LineBreaker::nextLineBreak):
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):

LayoutTests:

* css2.1/20110323/c541-word-sp-001-expected.html: Removed.
* css2.1/20110323/c541-word-sp-001.htm: Removed.
* css2.1/20110323/word-spacing-characters-002-expected.html: Removed.
* css2.1/20110323/word-spacing-characters-002.htm: Removed.
* css2.1/20110323/word-spacing-characters-003-expected.html: Removed.
* css2.1/20110323/word-spacing-characters-003.htm: Removed.
* css2.1/20110323/word-spacing-remove-space-001-expected.html: Removed.
* css2.1/20110323/word-spacing-remove-space-001.htm: Removed.
* css2.1/20110323/word-spacing-remove-space-002-expected.html: Removed.
* css2.1/20110323/word-spacing-remove-space-002.htm: Removed.
* css2.1/20110323/word-spacing-remove-space-003-expected.html: Removed.
* css2.1/20110323/word-spacing-remove-space-003.htm: Removed.
* css2.1/20110323/word-spacing-remove-space-004-expected.html: Removed.
* css2.1/20110323/word-spacing-remove-space-004.htm: Removed.
* css2.1/20110323/word-spacing-remove-space-005-expected.html: Removed.
* css2.1/20110323/word-spacing-remove-space-005.htm: Removed.
* css2.1/20110323/word-spacing-remove-space-006-expected.html: Removed.
* css2.1/20110323/word-spacing-remove-space-006.htm: Removed.
* css2.1/t1604-c541-word-sp-01-b-a.html: Added.
* fast/css/word-spacing-characters-complex-text-expected.html: Removed.
* fast/css/word-spacing-characters-complex-text.html: Removed.
* fast/css/word-spacing-characters-expected.html: Removed.
* fast/css/word-spacing-characters.html: Removed.
* fast/css/word-spacing-linebreak-expected.html: Removed.
* fast/css/word-spacing-linebreak.html: Removed.
* platform/chromium-linux/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/chromium-linux/fast/css/word-space-extra-expected.png:
* platform/chromium-mac-snowleopard/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/chromium-mac/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/chromium-win/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/chromium-win/css2.1/t1604-c541-word-sp-01-b-a-expected.txt: Added.
* platform/chromium-win/fast/css/word-space-extra-expected.txt:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/efl/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/efl/css2.1/t1604-c541-word-sp-01-b-a-expected.txt: Added.
* platform/gtk/TestExpectations:
* platform/gtk/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/gtk/css2.1/t1604-c541-word-sp-01-b-a-expected.txt: Added.
* platform/mac/TestExpectations:
* platform/mac/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/mac/css2.1/t1604-c541-word-sp-01-b-a-expected.txt: Added.
* platform/qt/TestExpectations:
* platform/qt/css2.1/t1604-c541-word-sp-01-b-a-expected.png: Added.
* platform/qt/css2.1/t1604-c541-word-sp-01-b-a-expected.txt: Added.
* platform/win/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: remove commitEditing from the text editor delegate.
https://bugs.webkit.org/show_bug.cgi?id=93858

Reviewed by Vsevolod Vlasov.

This should be up to the source frame.

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype._registerShortcuts):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame):
(WebInspector.SourceFrame.prototype.scrollChanged):
(WebInspector.SourceFrame.prototype._handleKeyDown):
(WebInspector.SourceFrame.prototype._commitEditing):
* inspector/front-end/TextEditor.js:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125438 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Clean up exception handling
https://bugs.webkit.org/show_bug.cgi?id=93880

Reviewed by Kenneth Rohde Christiansen.

The JSC C API uses a JSValueRef* exception parameter to indicate to the
caller that an exception was thrown. Naturally the caller must store
that ValueRef on the stack in order to get seen and marked by the
garbage collector, otherwise the callee would have to use
JSValueProtect on it.

This patch fixes one such case where in fact the exception pointer was passed as zero to the
callee and thus ignored. The patch also removes an unused exception parameter.

* bridge/qt/qt_class.cpp:
(JSC::Bindings::QtClass::fallbackObject):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
* bridge/qt/qt_runtime.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125439 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Media(Stream|Element)AudioSourceNode should be guarded by the WEB_AUDIO condition as well
https://bugs.webkit.org/show_bug.cgi?id=93864

Reviewed by Eric Carlson.

Add the WEB_AUDIO to the Conditional attribute in MediaElementAudioSourceNode
IDL file and the ENABLE(WEB_AUDIO) compilation guard to the header files for both
MediaStreamAudioSourceNode and MediaElementAudioSourceNode.

No new tests - no new functionality.

* Modules/webaudio/MediaElementAudioSourceNode.h:
* Modules/webaudio/MediaStreamAudioSourceNode.h:
* Modules/webaudio/MediaStreamAudioSourceNode.idl:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125440 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Update API for spell checking suggestions again.
https://bugs.webkit.org/show_bug.cgi?id=93877

Reviewed by Antonio Gomes.

PR 163283.

Update the spell checking options request API
to include the caret positions.

Reviewed internally by Nima Ghanavatian.

* Api/WebPageClient.h:
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::shouldRequestSpellCheckingOptionsForPoint):
(WebKit):
(BlackBerry::WebKit::InputHandler::requestSpellingCheckingOptions):
* WebKitSupport/InputHandler.h:
(Platform):
(InputHandler):
* WebKitSupport/TouchEventHandler.cpp:
(BlackBerry::WebKit::TouchEventHandler::handleTouchPoint):
* WebKitSupport/TouchEventHandler.h:
(TouchEventHandler):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125441 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Simplify storage and reduce size of QtConnectionObject
https://bugs.webkit.org/show_bug.cgi?id=93868

Patch by Simon Hausmann <simon.hausmann@nokia.com> on 2012-08-13
Reviewed by Kenneth Rohde Christiansen.

The connection object is a child of the sender QObject, so we can use parent()
whenever we need the sender instead of keeping an extra QObject pointer. Also
QtConnectionObject kept a RefPtr to the Instance, but actually only needed the
root object, so we can store a pointer to that instead.

* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtConnectionObject::QtConnectionObject):
(JSC::Bindings::QtConnectionObject::~QtConnectionObject):
(JSC::Bindings::QtConnectionObject::execute):
(JSC::Bindings::QtConnectionObject::match):
* bridge/qt/qt_runtime.h:
(QtConnectionObject):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125442 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CMake] Remove glib-related Find modules and write single new one instead.
https://bugs.webkit.org/show_bug.cgi?id=93786

Reviewed by Rob Buis.

.:

As part of the ongoing effort to write proper Find modules that use
absolute include and library paths instead of the short ones from
pkg-config, replace Find{GIO,Glib,Gthread}.cmake with a single
FindGLIB.cmake that optionally detects components such as GIO and
GObject.

Library paths are now defined as "/full/path/to/libfoo.so" instead of
simply "foo", so that the linker receives a full path and we can then
avoid accidentally picking up a libfoo.so installed into /usr/lib
instead of a local one built with jhbuild.

* Source/cmake/FindGIO.cmake: Removed.
* Source/cmake/FindGLIB.cmake: Added.
* Source/cmake/FindGlib.cmake: Removed.
* Source/cmake/FindGthread.cmake: Removed.
* Source/cmake/OptionsEfl.cmake: Look for GLIB with the GIO component.

Source/JavaScriptCore:

* shell/PlatformEfl.cmake: Use GLIB_* instead of Glib_*.

Source/WebCore:

No new tests, build system plumbing.

* PlatformEfl.cmake: Use GLIB_* instead of Glib_*, and link
directly against GIO, as code in the soup network backend uses
that.

Source/WebKit:

* PlatformEfl.cmake: Use GLIB_* instead of Glib_*.

Source/WebKit2:

* PlatformEfl.cmake: Use GLIB_* instead of Glib_*.

Source/WTF:

* wtf/PlatformEfl.cmake: Use GLIB_* instead of Glib_*, and link directly to GIO, as wtf/gobject uses functions from it.

Tools:

* DumpRenderTree/efl/CMakeLists.txt: Use GLIB_* instead of Glib_*.
* EWebLauncher/CMakeLists.txt: Ditto.
* MiniBrowser/efl/CMakeLists.txt: Ditto.
* WebKitTestRunner/PlatformEfl.cmake: Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Replace use of internal Weak smart pointer with JSWeakObjectMap
https://bugs.webkit.org/show_bug.cgi?id=93872

Reviewed by Kenneth Rohde Christiansen.

Source/JavaScriptCore:

* Target.pri: Add missing JSWeakObjectMap file to build.

Source/WebCore:

The intention of this patch series is to replace use of internal JSC
API with use of the stable and public C API.

The JSC::Weak template is internal API and the only part of the C API
that exposes similar functionality is the JSWeakObjectMap. It is
special in the sense that its life-time is tied to the life-time of the
JS global object, which in turn is subject to garbage collection. In
order to maximize re-use of the same map across different JSContextRef
instances, we use the associated global context ref as owner of the
weak maps. The key in the weak map is the identity (pointer) of the
runtime method object itself.  The iteration through the maps is
tedious, but should usually not go beyond just a few.

* bridge/qt/qt_runtime.cpp:
(Bindings):
(JSC::Bindings::methodMapCleaner):
(JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod):
(JSC::Bindings::QtRuntimeMethod::jsObjectRef):
* bridge/qt/qt_runtime.h:
(QtRuntimeMethod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125444 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Clear HUD canvas contents before drawing into it.
https://bugs.webkit.org/show_bug.cgi?id=93759

Reviewed by Adrienne Walker.

Not clearing the bitmaps before drawing into it results into
random noise. This patch also caches the SkCanvas used by the HUD
to avoid reallocating it every frame.

* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.cpp:
(WebCore::CCHeadsUpDisplayLayerImpl::willDraw):
* platform/graphics/chromium/cc/CCHeadsUpDisplayLayerImpl.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed skip: Skip faling test after r125428.
The fix will be tracked in https://bugs.webkit.org/show_bug.cgi?id=93897

* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS quotes output quotes when depth is negative
https://bugs.webkit.org/show_bug.cgi?id=92690

Patch by Elliott Sprehn <esprehn@chromium.org> on 2012-08-13
Reviewed by Eric Seidel.

Source/WebCore:

Previously if the quote depth would go negative we would output the close quote from the
first pair of quotes again instead of outputting no quotes as required by the spec.

See: http://www.w3.org/TR/CSS21/generate.html#quotes-insert

Test: fast/css-generated-content/nested-quote-more-than-pairs.html

* rendering/RenderQuote.cpp:
(WebCore::RenderQuote::originalText): Allow the value passed to getOpenQuote to go negative by removing std::max.
* rendering/style/QuotesData.cpp:
(WebCore::QuotesData::getOpenQuote): Bounds check for negative values for safety.
(WebCore::QuotesData::getCloseQuote): Allow index to be >= -1 and return an empty string for -1.

LayoutTests:

Make the expected output of close-quote-negative-depth.html follow the spec and
add another test that ensures the last quote pair is repeated when the depth is
greater than the number of quote pairs.

* fast/css-generated-content/close-quote-negative-depth-expected.html:
* fast/css-generated-content/close-quote-negative-depth.html:
* fast/css-generated-content/nested-quote-more-than-pairs-expected.html: Added.
* fast/css-generated-content/nested-quote-more-than-pairs.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CanvasRenderContext2D::font() does not re-serialize the font
https://bugs.webkit.org/show_bug.cgi?id=50859

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-08-13
Reviewed by Kenneth Rohde Christiansen.

Source/WebCore:

Added proper serialization for the font property.

No new tests, unskipped the existing ones.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::font):

LayoutTests:

Unskip tests that will now pass and remove wrong/duplicated
expectations. canvas-font-ex-units-crash has now the wrong
expectations until we fix the issue on 93840.

* fast/canvas/canvas-font-ex-units-crash-expected.txt:
* fast/canvas/script-tests/canvas-font-ex-units-crash.js:
Even though we are setting a value on this test case (and verifying),
the font is not being effectiviely set as the serialization reveled. This
is going to be fixed in another bug.
* platform/chromium/TestExpectations:
* platform/chromium/canvas/philip/tests/2d.text.font.parse.system-expected.txt: Removed.
* platform/efl/Skipped:
* platform/gtk/TestExpectations:
* platform/mac/canvas/philip/tests/2d.text.font.parse.system-expected.txt: Removed.
* platform/qt/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125450 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Move a remaining per-process message from WebContext to WebProcessProxy
        https://bugs.webkit.org/show_bug.cgi?id=93883

        Reviewed by Sam Weinig.

        There was one plug-in message renaming. Moving it, and also other plug-in messages
        for consistency.

        * UIProcess/WebContext.cpp:
        (WebKit): Got rid of the last MESSAGE_CHECK in this file.
        (WebKit::WebContext::WebContext): Moved m_pluginWorkQueue to a singleton.
        We don't need more than one queue (all it does is read plug-in info), and if we
        needed, it would have been per-process, not per-context.
        (WebKit::WebContext::~WebContext): No more work queue.
        (WebKit::WebContext::processDidFinishLaunching): Ditto.

        * UIProcess/WebContext.h: No longer needs to be a QueueClient.

        * UIProcess/WebContext.messages.in:
        * UIProcess/WebProcessProxy.messages.in:
        Moved plug-in related messages.

        * UIProcess/WebProcessProxy.cpp:
        (WebKit::pluginWorkQueue): Moved from WebContext to a singleton.
        (WebKit::WebProcessProxy::sendDidGetPlugins): Moved from WebContext.
        (WebKit::WebProcessProxy::handleGetPlugins): Ditto.
        (WebKit::WebProcessProxy::getPlugins): Ditto.
        (WebKit::WebProcessProxy::getPluginPath): Ditto.
        (WebKit::WebProcessProxy::getPluginProcessConnection): Ditto.
        (WebKit::WebProcessProxy::didGetSitesWithPluginData): Ditto.
        (WebKit::WebProcessProxy::didClearPluginSiteData): Ditto.

        * UIProcess/WebProcessProxy.h: Process proxy needs to be thread safe ref counted
        now, since it sends messages to itself on a work queue and back.

        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
        (WebKit::WebPlatformStrategies::populatePluginCache): Updated for new receiver.

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Ditto.

        * WebProcess/WebProcess.cpp: (WebKit::canPluginHandleResponse): Ditto.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125451 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r125444.
http://trac.webkit.org/changeset/125444
https://bugs.webkit.org/show_bug.cgi?id=93872

Broke some tests

Source/JavaScriptCore:

* Target.pri:

Source/WebCore:

* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod):
(JSC::Bindings::QtRuntimeMethod::jsObjectRef):
* bridge/qt/qt_runtime.h:
(QtRuntimeMethod):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        [WK2] Move a remaining per-process message from WebContext to WebProcessProxy
        https://bugs.webkit.org/show_bug.cgi?id=93883

        Windows build fix.

        * WebProcess/WebProcess.cpp:
        (WebKit::WebProcess::getSitesWithPluginData):
        (WebKit::WebProcess::clearPluginSiteData):
        Use WebProcessProxy for the message here, too.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@125453 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r125422.
http://trac.webkit.org/changeset/125422
https://bugs.webkit.org/show_bug.cgi?id=93902

Broke the Android canary build (Requested by fmalita on
#webkit).

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

Source/WebKit/chromium:

* WebKitUnitTests.gyp:

Tools:

* DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
* TestWebKitAPI/TestWebKitAPI.gyp/TestWebKitAPI.gyp:

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