[chromium] Add a test to WebFrameTest for selectRange and visiblePositionForWindowPoint.
https://bugs.webkit.org/show_bug.cgi?id=93108

Patch by Oli Lan <olilan@chromium.org> on 2012-08-03
Reviewed by Adam Barth.

Adds a new test WebFrameTest.SelectRange. This tests WebFrameImpl::selectRange, and also
serves to test WebFrameImpl::visiblePositionForWindowPoint as it is used by selectRange.

The test uses sample files that contain selected text on load. The test uses
WebViewImpl::selectionBounds to retrieve the ends of the selection, then unselects
and calls WebFrameImpl::selectRange to attempt to reselect the same text.

Three cases are tested: the normal case, the case where the selected text is offscreen
due to a scroll, and the case where the selected text is in an iframe. This allows the
problem cases and fix in https://bugs.webkit.org/show_bug.cgi?id=79117 to be tested.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124632 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Avoid dispatching gesture events of unknown types
https://bugs.webkit.org/show_bug.cgi?id=93060

Patch by Sadrul Habib Chowdhury <sadrul@chromium.org> on 2012-08-03
Reviewed by Adam Barth.

WebCore gesture events do not always correspond 1-to-1 to the Platform gesture events. So
avoid dispatching the unknown gesture events to nodes.

* dom/GestureEvent.cpp:
(WebCore::GestureEvent::create):
* dom/Node.cpp:
(WebCore::Node::dispatchGestureEvent):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124633 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Add an IsExecutionTerminating() check to setDOMException()
https://bugs.webkit.org/show_bug.cgi?id=93101

Reviewed by Adam Barth.

In preparation for moving exception related code from V8Proxy to V8Binding,
I am going to remove throwError(ExceptionCode, v8::Isolate*) from V8Proxy.
throwError(ExceptionCode, v8::Isolate*) will be replaced with
setDOMException(ExceptionCode, v8::Isolate*). By this refactoring,
the way to throw JavaScript errors and DOM exceptions becomes simple:
"Throw JavaScript errors by throwError(). Throw DOM exceptions by setDOMException()".
(Currently some DOM exceptions are being thrown by throwError().)

To keep the current behavior of throwError(ExceptionCode, v8::Isolate*),
before the replacement, we need to insert the IsExecutionTerminating()
check to setDOMException(). This will add an extra check to the current
setDOMException(), but I don't think it's a problem.

No tests. No change in behavior.

* bindings/v8/V8Proxy.cpp:
(WebCore::V8Proxy::setDOMException):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124634 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Limited the number of queried cached build infos in URLs used by Garden-o-matic.
https://bugs.webkit.org/show_bug.cgi?id=92992.

Patch by Ádám Kallai <kadam@inf.u-szeged.hu> on 2012-08-03
Reviewed by Adam Barth.

I added a limit to the cached builds that are included in the URL to avoid too long URLs in Garden-o-matic.

* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/builders.js:
(.):
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Blocking a plugin via CSP should result in one (and only one) console message.
https://bugs.webkit.org/show_bug.cgi?id=92649

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

Source/WebCore:

Currently, blocking a plugin via Content Security Policy results in some
leakage of console log messages between tests. I'm unclear as to the
root cause, but the symptoms exhibited include
`SubframeLoader::requestPlugin` being called multiple times for a single
element, which in turn causes multiple console logs to be sent. These
messages tend to appear in the subsequent test, making the
`http/test/security/contentSecurityPolicy/object-src-*` set of tests
flakey indeed.

This patch addresses the issue by marking elements' plugins as
unavailable when they're blocked by CSP. No new tests have been added:
this patch should simply make the current tests actually pass.

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestPlugin):
    We check the CSP status in `SubframeLoader::loadPlugin`, which is
    called at the end of this function. Checking CSP status in both
    locations is redundant.
(WebCore::SubframeLoader::loadPlugin):
    If the plugin is blocked by CSP, tell the element's embedded object
    renderer that the plugin is unavailable.
* platform/LocalizedStrings.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/LocalizedStrings.h:
(WebCore):
* platform/blackberry/LocalizedStringsBlackBerry.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* platform/qt/LocalizedStringsQt.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::unavailablePluginReplacementText):
* rendering/RenderEmbeddedObject.h:
    Return appropriate text when the plugin is blocked by CSP.

Source/WebKit/chromium:

* src/LocalizedStrings.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore):
    Adding a stub for the newly added string.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124636 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, adding self to committers.py after becoming committer.

Patch by Arvid Nilsson <anilsson@rim.com> on 2012-08-03

* Scripts/webkitpy/common/config/committers.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@124637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Create and interface for TextEditor
https://bugs.webkit.org/show_bug.cgi?id=93126

Patch by Jan Keromnes <janx@linux.com> on 2012-08-03
Reviewed by Pavel Feldman.

For more extensibility, TextEditor needs to be an interface that other
classes can implement, e.g. the new class DefaultTextEditor.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame):
* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor):
(WebInspector.TextEditor.prototype.set mimeType):
(WebInspector.TextEditor.prototype.setReadOnly):
(WebInspector.TextEditor.prototype.readOnly):
(WebInspector.TextEditor.prototype.defaultFocusedElement):
(WebInspector.TextEditor.prototype.revealLine):
(WebInspector.TextEditor.prototype.addDecoration):
(WebInspector.TextEditor.prototype.removeDecoration):
(WebInspector.TextEditor.prototype.markAndRevealRange):
(WebInspector.TextEditor.prototype.highlightLine):
(WebInspector.TextEditor.prototype.clearLineHighlight):
(WebInspector.TextEditor.prototype.freeCachedElements):
(WebInspector.TextEditor.prototype.elementsToRestoreScrollPositionsFor):
(WebInspector.TextEditor.prototype.inheritScrollPositions):
(WebInspector.TextEditor.prototype.beginUpdates):
(WebInspector.TextEditor.prototype.endUpdates):
(WebInspector.TextEditor.prototype.onResize):
(WebInspector.TextEditor.prototype._textChanged):
(WebInspector.TextEditor.prototype.editRange):
(WebInspector.TextEditor.prototype.scrollToLine):
(WebInspector.TextEditor.prototype.selection):
(WebInspector.TextEditor.prototype.lastSelection):
(WebInspector.TextEditor.prototype.setSelection):
(WebInspector.TextEditor.prototype.setText):
(WebInspector.TextEditor.prototype.text):
(WebInspector.TextEditor.prototype.range):
(WebInspector.TextEditor.prototype.line):
(WebInspector.TextEditor.prototype.get linesCount):
(WebInspector.TextEditor.prototype.setAttribute):
(WebInspector.TextEditor.prototype.getAttribute):
(WebInspector.TextEditor.prototype.removeAttribute):
(WebInspector.TextEditor.prototype.wasShown):
(WebInspector.TextEditor.prototype._handleFocused):
(WebInspector.TextEditor.prototype.willHide):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:

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