[BlackBerry] InspectorOverlay class duplicated in WebCore
https://bugs.webkit.org/show_bug.cgi?id=93124

Reviewed by Rob Buis.

Changed namespace of InspectorOverlay from WebCore to
BlackBerry::WebKit

* Api/WebPage.cpp:
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::setInspectorOverlayClient):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/InspectorClientBlackBerry.h:
* WebCoreSupport/InspectorOverlay.cpp:
(BlackBerry::WebKit::InspectorOverlay::create):
(BlackBerry::WebKit::InspectorOverlay::InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifySyncRequired):
(BlackBerry::WebKit::InspectorOverlay::paintContents):
(BlackBerry::WebKit::InspectorOverlay::showDebugBorders):
(BlackBerry::WebKit::InspectorOverlay::showRepaintCounter):
(BlackBerry::WebKit::InspectorOverlay::contentsVisible):
(BlackBerry::WebKit::InspectorOverlay::update):
* WebCoreSupport/InspectorOverlay.h:
(WebKit):
(InspectorOverlayClient):
(InspectorOverlay):
(BlackBerry::WebKit::InspectorOverlay::notifyAnimationStarted):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124639 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Add stubs for the find-in-page match rects API
https://bugs.webkit.org/show_bug.cgi?id=93110

Reviewed by Adam Barth.

The Android port allows tapping on the find-in-page result tickmarks taking
the user to the corresponding matches. This patch introduces stubs for the
new required methods in order to achieve WebKit API compatibility for this
port as soon as possible. The implementation of these methods will be added
later in https://bugs.webkit.org/show_bug.cgi?id=93111.

* public/WebFrame.h:
(WebKit):
(WebFrame):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::findMatchMarkersVersion):
(WebKit):
(WebKit::WebFrameImpl::activeFindMatchRect):
(WebKit::WebFrameImpl::findMatchRects):
(WebKit::WebFrameImpl::selectNearestFindMatch):
* src/WebFrameImpl.h:
(WebFrameImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124640 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r124475 and r124496.
http://trac.webkit.org/changeset/124475
http://trac.webkit.org/changeset/124496
https://bugs.webkit.org/show_bug.cgi?id=93151

Causing assertion failures in table-section-node-at-point-
crash.html (Requested by inferno-sec on #webkit).

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

* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124641 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Apply target fuzzing when sending a context menu event
https://bugs.webkit.org/show_bug.cgi?id=92914

Patch by Terry Anderson <tdanderson@chromium.org> on 2012-08-03
Reviewed by Antonio Gomes.

Source/WebCore:

If TOUCH_ADJUSTMENT is enabled, use bestClickableNodeForTouchPoint to possibly
adjust the location of a context menu event. This change uses the same set of
candidates for touch adjustment as is used for a GestureTap event (which
admittedly is a simplifying assumption).

Test: touchadjustment/touch-links-longpress.html

* page/EventHandler.cpp:
(WebCore::EventHandler::handleGestureTap):
Some code moved to the new function adjustGesturePosition.
(WebCore):
(WebCore::EventHandler::adjustGesturePosition):
Added this function to avoid repeated code in handleGestureTap and
sendContextMenuEventForGesture.
(WebCore::EventHandler::sendContextMenuEventForGesture):
Try to adjust the location of |mouseEvent| to correspond to the most
probable gesture target. If no such target exists, the location of
|mouseEvent| is unchanged.
* page/EventHandler.h:
(EventHandler):

Source/WebKit/chromium:

When constructing a PlatformEvent::GestureLongPress in WebInputEventConversion.cpp,
use |boundingBox| to specify |m_area|.

* src/WebInputEventConversion.cpp:
(WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):

LayoutTests:

New layout test to verify that context menus appear on links for a long press
gesture when TOUCH_ADJUSTMENT is enabled.

* platform/qt/Skipped:
Skipped on qt because gestureLongPress is not used for context menus.
* touchadjustment/touch-links-longpress-expected.txt: Added.
* touchadjustment/touch-links-longpress.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124642 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] FrameLoaderClient::restoreViewState() shouldn't trigger painting
https://bugs.webkit.org/show_bug.cgi?id=93141

Patch by Yong Li <yoli@rim.com> on 2012-08-03
Reviewed by Rob Buis.

PR# 172041.
It is not always safe to render the page at this point. So we post a message
instead.

* Api/WebPage.cpp:
(WebKit):
(BlackBerry::WebKit::WebPagePrivate::restoreHistoryViewState):
* Api/WebPage_p.h:
(WebPagePrivate):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::restoreViewState):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124643 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r124594.
http://trac.webkit.org/changeset/124594
https://bugs.webkit.org/show_bug.cgi?id=93152

Broke PlatformAppBrowserTest.Iframes browser_test on Chromium
bots (Requested by dimich on #webkit).

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

* bindings/generic/BindingSecurity.cpp:
(WebCore::canAccess):
(WebCore::BindingSecurity::canAccessFrame):
(WebCore::BindingSecurity::shouldAllowAccessToNode):
* bindings/v8/BindingState.cpp:
(WebCore::immediatelyReportUnsafeAccessTo):
* bindings/v8/BindingState.h:
(WebCore):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::reportUnsafeJavaScriptAccess):
* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::reportUnsafeAccessTo):
* bindings/v8/V8Proxy.h:
(V8Proxy):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Negative timestamps for TextTrackCues should not be allowed.
https://bugs.webkit.org/show_bug.cgi?id=92939

Reviewed by Eric Carlson.

Make sure cues added in JavaScript are not allowed negative timestamps.
Attempting to add a cue with a negative timestamp is not successful
and setting a timestamp to a negative value has no effect.

Source/WebCore:

Test: media/track/track-cue-negative-timestamp.html

* html/track/TextTrack.cpp:
(WebCore::TextTrack::addCue): If the cue's startTime or endTime is
    negative, do not add the cue.
* html/track/TextTrackCue.cpp:
(WebCore::TextTrackCue::setStartTime): Ignore negative values.
(WebCore::TextTrackCue::setEndTime): Ignore negative values.
* html/track/TextTrackCueList.cpp:
(WebCore::TextTrackCueList::add): Add ASSERTs to check startTime and
    endTime are positive.

LayoutTests:

* media/track/track-cue-negative-timestamp-expected.txt: Added.
* media/track/track-cue-negative-timestamp.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r124632.
http://trac.webkit.org/changeset/124632
https://bugs.webkit.org/show_bug.cgi?id=93154

Added new WebFrameTest.SelectRange which fails on bots
(Requested by dimich on #webkit).

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

* tests/WebFrameTest.cpp:
* tests/data/select_range_basic.html: Removed.
* tests/data/select_range_iframe.html: Removed.
* tests/data/select_range_scroll.html: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add API for enabling blanket third-party data blocking
https://bugs.webkit.org/show_bug.cgi?id=93022

Reviewed by Anders Carlsson.

Source/WebCore:

Added API for enabling third-party storage blocking.

* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setThirdPartyStorageBlockingEnabled):
(WebCore::Settings::thirdPartyStorageBlockingEnabled):
(Settings):

Source/WebKit2:

Added API for enabling third-party storage blocking.

* Shared/WebPreferencesStore.h:
(WebKit):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetThirdPartyStorageBlockingEnabled):
(WKPreferencesGetThirdPartyStorageBlockingEnabled):
* UIProcess/API/C/WKPreferences.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Added test for default setting of new third-party storage blocking API.

* TestWebKitAPI/Tests/WebKit2/WKPreferences.cpp:
(TestWebKitAPI::TEST):

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