Unreviewed gardening, unskip a now passing test.

* platform/mac-wk2/TestExpectations:
* platform/qt-5.0-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r135383.
http://trac.webkit.org/changeset/135383
https://bugs.webkit.org/show_bug.cgi?id=102935

IDBRequestTest.* unit tests are failing (Requested by yurys on
#webkit).

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

* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::installDOMWindow):
* bindings/v8/V8DOMWindowShell.h:
(V8DOMWindowShell):
(WebCore::V8DOMWindowShell::isolated):
* bindings/v8/WorldContextHandle.cpp:
(WebCore::WorldContextHandle::WorldContextHandle):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Now that offending patch has been rolled out reenable IDBRequestTest.EventsAfterStopping
https://bugs.webkit.org/show_bug.cgi?id=102929

* tests/IDBRequestTest.cpp:
(WebCore::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135397 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] KURL unit test crashing when tiled backing store is enabled on Release Bots
https://bugs.webkit.org/show_bug.cgi?id=102895

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-11-21
Reviewed by Gyuyoung Kim.

Change the link order so it wont override the new operator on gtest.
Looks like it was crashing because an allocator mismatch (using libc's
new and later fastMalloc delete. Thanks to Kangil Han for hinting on
the fastMalloc issue.

* TestWebKitAPI/CMakeLists.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135398 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Viewport meta tag broken after r134801
https://bugs.webkit.org/show_bug.cgi?id=102801

Reviewed by Kenneth Rohde Christiansen.

If the initial-scale attribute is not explicitly specified it is left -1 by the
viewport meta algorithm and if the content is not scalable the min and max scales
are restricted by restrictScaleFactorToInitialScaleIfNotUserScalable() which resulted
in negative scales on the UI side.
Make sure that the minimum scale to fit the viewport is calculated before restricting
the scales and use this scale as the initial scale if no explicit initial scale was set.

* UIProcess/PageViewportController.cpp:
(WebKit::PageViewportController::PageViewportController):
(WebKit::PageViewportController::pageTransitionViewportReady):
(WebKit::PageViewportController::didChangeViewportAttributes):
(WebKit::PageViewportController::updateMinimumScaleToFit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135399 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Gardening: svg/foreignObject/viewport-foreignobject-crash.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=102931

Unreviewed gardening.

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-11-21

* platform/efl/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135400 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Coordinated Graphics: refactor LayerTreeRenderer::syncRemoteContent().
https://bugs.webkit.org/show_bug.cgi?id=102900

Patch by Huang Dongsung <luxtella@company100.net> on 2012-11-21
Reviewed by Noam Rosenthal.

Currently, QQuickWebPage::updatePaintNode() calls
LayerTreeRenderer::syncRemoteContent() with locking the main thread.
syncRemoteContent() is heavy, so we should not call syncRemoteContent() in
updatePaintNode(). Calling syncRemoteContent() in the painting thread is
thread-safe because syncRemoteContent() does not access any data
structures, which the main thread use.

After this patch, syncRemoteContent() is used only internally, so
syncRemoteContent() becomes private.

* UIProcess/API/efl/EwkViewImpl.cpp:
(EwkViewImpl::displayTimerFired):
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::updatePaintNode):
* UIProcess/API/qt/raw/qrawwebview.cpp:
(QRawWebView::paint):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp:
(WebKit::LayerTreeRenderer::paintToCurrentGLContext):
(WebKit::LayerTreeRenderer::ensureRootLayer):
* UIProcess/CoordinatedGraphics/LayerTreeRenderer.h:
(LayerTreeRenderer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Reverted expectation changes from r135380 and marked css3/filters/effect-reference-ordering-hw.html as crashing
https://bugs.webkit.org/show_bug.cgi?id=102898

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Link highlight should display for at least 100ms, and fadeout on GestureTap/Longpress.
https://bugs.webkit.org/show_bug.cgi?id=102823

Reviewed by Adrienne Walker.

Link highlights sometimes disappear so quickly they barely display. Modify
so that the highlight is displayed for minimum 100ms before fading out, and
also fadeout (as opposed to abrupt clear) on GestureTap and GestureLongPress.

* src/LinkHighlight.cpp:
(WebKit::LinkHighlight::LinkHighlight):
(WebKit::LinkHighlight::startHighlightAnimationIfNeeded): Check if min duration achieved, if not add time to fadeout animation.
* src/LinkHighlight.h:
(LinkHighlight):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent): Fadeout instead of clear on GestureTap and GestureLongPress.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135403 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed Qt/Windows build fix.
https://bugs.webkit.org/show_bug.cgi?id=102787

Remove inclusion of QtQml, which drags in QtNetwork, which drags in qnetworksession.h, which
defines a member function called "interface". Since windows headers also define a pre-processor
macro called "interface", it has to do that. However we have now a dependency between combaseapi.h,
which #defines interface and is included earlier (before qnetworksession.h) and shlwapi.h, which _needs_
the interface macro and is included afterwards. Since this module-wide QtQml inclusion is unnecessary
and just slows down the build, this patch removes it.

* UIProcess/API/qt/qwebkittest_p.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135404 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

Splits the point() method in HitTestResult into two, innerNodeFramePoint and mainFramePoint().
To do this HitTestResult no longer inherits publically from HitTestLocation, which should also
help to later separate the two classes completely.

Many of the call-sites of hitTestResultAtPoint confuses which coordinates the point is in.
These have not have been fixed in this patch, and they should be audited by the individual ports.

* WebCore.exp.in:
* dom/Document.cpp:
(WebCore::Document::nodesFromRect):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventMayStartDrag):
(WebCore::EventHandler::hitTestResultAtPoint):
    Set and maintain pointInMainFrame on the HitTestResult.
* rendering/HitTestResult.cpp:
(WebCore::HitTestResult::HitTestResult):
    Construct pointInMainFrame as a copy of pointInInnerNodeFrame. This is correct
    for all hit-tests outside of the recursion in EventHandler::hitTestResultAtPoint.
(WebCore::HitTestResult::operator=):
(WebCore::HitTestResult::innerNodeFrame):
(WebCore::HitTestResult::append):
* rendering/HitTestResult.h:
(WebCore::HitTestLocation::point):
(HitTestResult):
    Inherits protected now from HitTestLocation to avoid exposing the ambiguous
    point() and roundedPoint() methods.
    HitTestResult will be split completely from HitTestLocation in a later patch.
(WebCore::HitTestResult::isRectBasedTest):
(WebCore::HitTestResult::pointInMainFrame):
(WebCore::HitTestResult::roundedPointInMainFrame):
(WebCore::HitTestResult::setPointInMainFrame):
(WebCore::HitTestResult::pointInInnerNodeFrame):
(WebCore::HitTestResult::roundedPointInInnerNodeFrame):
(WebCore::HitTestResult::localPoint):
(WebCore::HitTestResult::setLocalPoint):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hitTest):

Source/WebKit/chromium: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

* src/ChromeClientImpl.cpp:
(WebKit::ChromeClientImpl::mouseDidMoveOverElement):
* src/ContextMenuClientImpl.cpp:
(WebKit::selectMisspelledWord):
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::characterIndexForPoint):

Source/WebKit/efl: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

* ewk/ewk_frame.cpp:
(ewk_frame_hit_test_new):

Source/WebKit/gtk: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

Switched to using point in innerNodeFrame. While the use here seems wrong it has been
left functionally unchanged to be fixed by a later patch.

* webkit/webkithittestresult.cpp:
(WebKit::kit):

Source/WebKit/mac: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

Switch to using HitTestResult::innerNodeFrame and HitTestResult::innerNodeFramePoint.

* WebCoreSupport/WebContextMenuClient.mm:
(WebContextMenuClient::showContextMenu):

Source/WebKit/qt: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

* Api/qwebframe.cpp:
(QWebHitTestResultPrivate::QWebHitTestResultPrivate):
* Api/qwebpage.cpp:
(QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch):

Source/WebKit/win: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

* WebView.cpp:
(WebView::handleContextMenuEvent):

Source/WebKit2: Disambiguate innerNodeFramePoint and mainFramePoint
https://bugs.webkit.org/show_bug.cgi?id=98139

Reviewed by Julien Chaffraix.

Switch to using HitTestResult::innerNodeFrame and HitTestResult::innerNodeFramePoint.

* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::characterIndexForPoint):

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

* DEPS:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: [Qt] MinGW: Explicitly add OpenGL library dependencies
https://bugs.webkit.org/show_bug.cgi?id=102924

Patch by Kai Koehne <kai.koehne@digia.com> on 2012-11-21
Reviewed by Simon Hausmann.

Adding the dependencies to WebKit1 is too late, because linking will have already failed. Also make sure that
the we link against OpenGLES1 e.g. for Angle.

* WebCore.pri:

Source/WebKit: [Qt] MinGW: Don't add OpenGL library dependencies here
https://bugs.webkit.org/show_bug.cgi?id=102924

Patch by Kai Koehne <kai.koehne@digia.com> on 2012-11-21
Reviewed by Simon Hausmann.

As the comment suggests the dependency is already for WebCore, so add it there instead.

* WebKit1.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135407 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL][WK2] gardening: fast/writing-mode/japanese-ruby-* are flaky
https://bugs.webkit.org/show_bug.cgi?id=102921

Unreviewed gardening: several tests fail if run after any test that
changes font family mappings. Mark them flaky.

Patch by Jussi Kukkonen <jussi.kukkonen@intel.com> on 2012-11-21

* platform/efl-wk2/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135408 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDBRequestTest needs a v8 context
https://bugs.webkit.org/show_bug.cgi?id=102941

Patch by Dan Carney <dcarney@google.com> on 2012-11-21
Reviewed by Jochen Eisinger.

Added v8 context to IDBRequestTest tests.

* tests/IDBRequestTest.cpp:
(IDBRequestTest):
(WebKit::IDBRequestTest::IDBRequestTest):
(WebKit::IDBRequestTest::context):
(WebKit::IDBRequestTest::scriptExecutionContext):
(WebKit):
(WebKit::TEST_F):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135409 268f45cc-cd09-0410-ab3c-d52691b4dbfc
In-band text tracks infrastructure
https://bugs.webkit.org/show_bug.cgi?id=102830

Reviewed by Philippe Normand.

Add the infrastructure necessary to allow a port-specific media engine to expose in-band text
tracks.

No new tests, this patch only adds plumbing. Existing tests verify that these changes don't
break existing functionality.

* CMakeLists.txt: Add new project files.
* GNUmakefile.list.am: Ditto.
* Target.pri: Ditto.
* WebCore.gypi: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setReadyState): Call processInbandTextTracks when readyState reaches
    HAVE_METADATA
(WebCore::HTMLMediaElement::processInbandTextTracks): Fetch the in-band text tracks from the 
    media player and processes them.
* html/HTMLMediaElement.h:

* html/track/InbandTextTrack.cpp: Added.
* html/track/InbandTextTrack.h: Added.
* html/track/InbandTextTrackPrivate.h: Added.

* html/track/TextTrack.h:
(TextTrack):
(WebCore::TextTrack::clearClient): Remove virtual, it is unnecessary
(WebCore::TextTrack::mode): Make virtual so derived classes can override.
(WebCore::TextTrack::setMode): Ditto.

* html/track/TextTrackList.cpp:
(TextTrackList::length): Update to deal with in-band tracks.
(TextTrackList::getTrackIndex): Ditto.
(TextTrackList::getTrackIndexRelativeToRenderedTracks): Ditto.
(TextTrackList::item): Ditto.
(TextTrackList::invalidateTrackIndexesAfterTrack): New, invalidate the cached track indexes of
    all tracks after another.
(TextTrackList::append): Update to deal with in-band tracks.
(TextTrackList::remove): Update to deal with in-band tracks.
(TextTrackList::scheduleAddTrackEvent): Remove typo.
* html/track/TextTrackList.h:

* platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::getTextTracks): New, pass through to the media engine.
(WebCore::MediaPlayer::setTextTrackClient):
* platform/graphics/MediaPlayer.h:

* platform/graphics/MediaPlayerPrivate.h:
(WebCore::MediaPlayerPrivateInterface::setPreload): Cleanup.
(WebCore::MediaPlayerPrivateInterface::sourceEndOfStream): Ditto.
(WebCore::MediaPlayerPrivateInterface::getTextTracks): New client method.
(WebCore::MediaPlayerPrivateInterface::setTextTrackClient): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid creating degenerate cubics at corners of rounded rects.
https://bugs.webkit.org/show_bug.cgi?id=102945

Patch by Tom Hudson <tomhudson@chromium.org> on 2012-11-21
Reviewed by Stephen White.

Covered by existing layout tests.

* platform/graphics/Path.cpp:
(Path::addBeziersForRoundedRect):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135411 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Ctrl+A closes breakpoint condition editor
https://bugs.webkit.org/show_bug.cgi?id=102906

Patch by Andrey Lushnikov <lushnikov@chromium.com> on 2012-11-21
Reviewed by Pavel Feldman.

Check if e.target has no ancestors with className
"webkit-line-decorations" in DefaultTextEditor._handleKeyDown

* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype._handleKeyDown): Add check

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135412 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, build fix after r135410.

* html/track/InbandTextTrack.cpp:
(WebCore::InbandTextTrack::addCue): Prevent unused parameter error.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135413 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add flag to enable/disable touch adjustment at runtime.
https://bugs.webkit.org/show_bug.cgi?id=102534

Patch by Kevin Ellis <kevers@chromium.org> on 2012-11-21
Reviewed by Antonio Gomes.

Source/WebCore:

Add setting for enabling or disabling touch adjustment.  Note that for
touch adjustment to apply, the compile flag must also be enabled.  A
compile only option is insufficient as it does not allow developers to
quickly test the impact of touch adjustemnt without recompiling.  Nor
does it allow end users to disable touch adjustemnt if they find that
touch adjustment is not working well for a particular site.

No new tests required.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureEvent): Move enable check to adjustGesturePosition.
(WebCore::EventHandler::handleGestureTap): Move enable check to adjustGesturePosition.
(WebCore::EventHandler::shouldApplyTouchAdjustment): Checks if touch adjustment is enabled.
(WebCore):
(WebCore::EventHandler::adjustGesturePosition): Add check for enabling of touch adjustment.
(WebCore::EventHandler::sendContextMenuEventForGesture): Move enable check to adjustGesturePosition.
* page/EventHandler.h:
(EventHandler):
* page/Settings.in:

Source/WebKit/chromium:

Add setting for enabling or disabling touch adjustment.
For touch adjustemnt to apply, the compile option must
also be enabled.

* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setEnableTouchAdjustment):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

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