Use testRunner instead of layoutTestController in fast/canvas, clip, compact, constructors, cookies, and css* tests
https://bugs.webkit.org/show_bug.cgi?id=89431

Reviewed by Kent Tamura.

* fast/canvas/:
* fast/constructors/constructor-as-function-crash.html:
* fast/css-generated-content/absolute-position-inside-inline.html:
* fast/css-generated-content/after-with-first-letter-float-crash.html:
* fast/css-generated-content/attr-missing.html:
* fast/css-generated-content/before-content-with-list-marker-in-anon-block-crash.html:
* fast/css-generated-content/block-after.html:
* fast/css-generated-content/drag-state.html:
* fast/css-generated-content/empty-content-with-float-crash.html:
* fast/css-generated-content/first-letter-next-sibling-crash.html:
* fast/css-generated-content/first-letter-table-cell-format-block-crash.html:
* fast/css-generated-content/float-first-letter-siblings-convert-to-inline.html:
* fast/css-generated-content/floating-before-content-with-list-marker-crash.html:
* fast/css-generated-content/hit-test-generated-content.html:
* fast/css-generated-content/hover-style-change.html:
* fast/css-generated-content/inline-splitting-with-after-float-crash.html:
* fast/css-generated-content/malformed-url.html:
* fast/css-generated-content/positioned-background-hit-test-crash.html:
* fast/css-generated-content/positioned-div-with-floating-after-content-crash.html:
* fast/css-generated-content/positioned-generated-content-under-run-in-crash.html:
* fast/css-generated-content/remove-div-from-flexible-box-with-floating-after-content-crash.html:
* fast/css-generated-content/reset-content-to-initial.html:
* fast/css-generated-content/resources/pass.html:
* fast/css-generated-content/resources/positioned-div-with-floating-after-content-crash-frame2.html:
* fast/css-generated-content/spellingToolTip-assert.html:
* fast/css-generated-content/table-row-after-no-crash.html:
* fast/css-generated-content/table-with-scrollbar-corner.html:
* fast/css-generated-content/text-before-table-col-crash.html:
* fast/css-grid-layout/display-grid-set-get.html:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-item-column-row-get-set.html:
* fast/css/:
* platform/mac/fast/canvas/canvas-draw-xbm-image.html:
* platform/qt/fast/canvas/toDataURL-jpeg-alpha.html:
* platform/qt/fast/canvas/toDataURL-jpeg-primarycolors.html:
* platform/qt/fast/canvas/toDataURL-jpeg-quality-basic.html:
* platform/qt/fast/canvas/toDataURL-jpeg-quality-notnumber.html:
* platform/qt/fast/canvas/toDataURL-jpeg-quality-outsiderange.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120683 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a scheme registry for bypassing Content Security Policy.
https://bugs.webkit.org/show_bug.cgi?id=89373

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

.:

* Source/autotools/symbols.filter:

Source/WebCore:

The Content Security Policy specification notes that "Enforcing a CSP
policy should not interfere with the operation of user-supplied scripts
such as third-party user-agent add-ons and JavaScript bookmarklets."
(https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html#processing-model)
This use case can be at least partially addressed by adding a scheme
registry for certain types of URLs whose resources should be loaded
regardless of a page's defined policy directives.

See http://crbug.com/133223 for additional context.

Test: http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html

* WebCore.exp.in:
    Exporting new symbols for use by Internals.
* page/ContentSecurityPolicy.cpp:
(WebCore::isAllowedByAllWithURL):
    Adding a check against the new SchemeRegistry method to determine
    whether or not we should proceed with checking the URL against the
    policy.
* platform/SchemeRegistry.cpp:
(WebCore::CSPBypassingSchemes):
(WebCore):
(WebCore::SchemeRegistry::registerURLSchemeAsBypassingContentSecurityPolicy):
(WebCore::SchemeRegistry::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy):
(WebCore::SchemeRegistry::schemeShouldBypassContentSecurityPolicy):
* platform/SchemeRegistry.h:
(SchemeRegistry):
    Adding the scheme registry for CSP-bypassing URL schemes.
* testing/Internals.cpp:
(WebCore):
(WebCore::Internals::registerURLSchemeAsBypassingContentSecurityPolicy):
(WebCore::Internals::removeURLSchemeRegisteredAsBypassingContentSecurityPolicy):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:
    Adding a method to Internals so that we can write a layout test.

Source/WebKit/chromium:

* public/WebSecurityPolicy.h:
(WebSecurityPolicy):
* src/WebSecurityPolicy.cpp:
(WebKit::WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy):
(WebKit):

Source/WebKit2:

* win/WebKit2.def:
* win/WebKit2CFLite.def:

LayoutTests:

* http/tests/security/contentSecurityPolicy/register-bypassing-scheme-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/register-bypassing-scheme.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Fix TARGET not properly being set for QtWebKitd5.dll when building in debug.
https://bugs.webkit.org/show_bug.cgi?id=88880

load(qt_module_config) adjusts the TARGET to add the "d" suffix when doing
the debug build_pass. When doing the first pass, qt_module_config.prf doesn't
adjust the target since it is in debug_and_release and expects the debug
build_pass to come later. However, since we remove debug_and_release from CONFIG
right after this, the TARGET hasn't been adjusted and the debug build_pass
will not happen.

Work around it by disabling this optimization on Windows.

Patch by Jocelyn Turcotte <jocelyn.turcotte@nokia.com> on 2012-06-19
Reviewed by Tor Arne Vestbø.

* Source/api.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Allow the modules file generation to work on Windows.
https://bugs.webkit.org/show_bug.cgi?id=89010

Patch by Joel Dillon  <joel.dillon@codethink.co.uk>, Jocelyn Turcotte <jocelyn.turcotte@nokia.com> on 2012-06-19
Reviewed by Csaba Osztrogonác.

Add calls to toSystemPath and use QMAKE_DIR_SEP where necessary.

* Source/api.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120686 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed expectation update.

* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Temporarily disable xvfb driver in nrwt
https://bugs.webkit.org/show_bug.cgi?id=88414

Reviewed by Csaba Osztrogonác.

* Scripts/webkitpy/layout_tests/port/qt.py:
(QtPort._build_driver):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r120586.
http://trac.webkit.org/changeset/120586
https://bugs.webkit.org/show_bug.cgi?id=89444

doesn't fix mac issue (Requested by morrita on #webkit).

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

* src/ContextMenuClientImpl.cpp:
(WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::replaceMisspelledRange):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Unreviewed build system fix after r120051.

* Target.pri:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Compilation failure in StyleResolver.cpp
https://bugs.webkit.org/show_bug.cgi?id=89446

Patch by Mike West <mkwst@chromium.org> on 2012-06-19
Reviewed by Ryosuke Niwa.

Adding 'CSSPropertyWebkitColumnProgression' to a switch statement from
which it was missing.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] EFL's LayoutTestController does not support setTextDirection
https://bugs.webkit.org/show_bug.cgi?id=87481

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-06-19
Reviewed by Hajime Morita.

Source/WebKit/efl:

Add new Ewk_View method to set the text direction, by calling
Editor::setBaseWritingDirection() internally, as Mac and Chromium
ports do.

* WebCoreSupport/AssertMatchingEnums.cpp:
* ewk/ewk_view.cpp:
(ewk_view_text_direction_set):
* ewk/ewk_view.h:

Tools:

Implement setTextDirection in EFL's LayoutTestController and
properly reset its value between test cases to avoid flakiness.

* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setTextDirection):

LayoutTests:

Unskip related test case now that EFL's LayoutTestController
implements setTextDirection.

* platform/efl/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Use AutodrainedPool instead of NSAutoreleasePool in AudioBus::loadPlatformResource()
https://bugs.webkit.org/show_bug.cgi?id=89427

Reviewed by Dan Bernstein.

loadPlatformResource() called -[NSAutoreleasePool release] at each of
its exit points, which is not only an error-prone pattern but is
incorrect in garbage-collected environments. AutodrainedPool solves
both these problems by automatically calling -[NSAutoreleasePool drain]
when going out of scope.

* platform/audio/mac/AudioBusMac.mm:
(WebCore::AudioBus::loadPlatformResource):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120693 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Calling nativeImageForCurrentFrame() causes assertion failure: m_verifier.isSafeToUse()
https://bugs.webkit.org/show_bug.cgi?id=67582

Reviewed by David Levin.

Source/WebCore:

Added a new synchronous method to the IconDatabase that returns a
native image for the platform instead of a WebCore::Image*.

* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::synchronousNativeIconForPageURL):
(WebCore):
* loader/icon/IconDatabase.h:
(IconDatabase):
* loader/icon/IconDatabaseBase.h:
(WebCore::IconDatabaseBase::synchronousNativeIconForPageURL):
(IconDatabaseBase):

Source/WebKit/blackberry:

Use synchronousNativeIconForPageURL() to retrieve favicons.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidReceiveIcon):

Source/WebKit/cf:

Fixes windows build.

* WebCoreSupport/WebInspectorClientCF.cpp:

Source/WebKit/efl:

Use synchronousNativeIconForPageURL() to retrieve favicons.

* ewk/ewk_history.cpp:
(ewk_history_item_icon_surface_get):
(ewk_history_item_icon_object_add):
* ewk/ewk_settings.cpp:
(ewk_settings_icon_database_icon_surface_get):
(ewk_settings_icon_database_icon_object_add):

Source/WebKit/gtk:

Use synchronousNativeIconForPageURL() to retrieve favicons.

* webkit/webkitfavicondatabase.cpp:
(getIconPixbufSynchronously):

Source/WebKit/qt:

Use synchronousNativeIconForPageURL() to retrieve favicons.

* Api/qwebhistory.cpp:
(QWebHistoryItem::icon):
* Api/qwebsettings.cpp:
(QWebSettings::iconForUrl):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Forms] Move isKeyboardFocusable and isMouseFocusable to InputType from HTMLInputElement
https://bugs.webkit.org/show_bug.cgi?id=89425

Reviewed by Kent Tamura.

This patch moves implementation of HTMLInpueElement::isKeyboardFocusable
and isMouseFocusable to InputType class to allow each implementation
of InputType can decide focus-ability.

No new tests. This patch doesn't change behavior.

* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::isKeyboardFocusable): Changed to call InputType::isKeyboardFocusable.
(WebCore::HTMLInputElement::isMouseFocusable): Changed to call InputType::isMouseFocusable.
(WebCore::HTMLInputElement::isTextFormControlFocusable): Added to allow InputType can call a method in HTMLTextFormControlElement.
(WebCore::HTMLInputElement::isTextFormControlKeyboardFocusable): Added to allow InputType can call a method in HTMLTextFormControlElement.
(WebCore::HTMLInputElement::isTextFormControlMouseFocusable): Added to allow InputType can call a method in HTMLTextFormControlElement.
* html/HTMLInputElement.h:
(HTMLInputElement):
* html/InputType.cpp:
(WebCore::InputType::isKeyboardFocusable): Changed to call isTextFormControlKeyboardFocusable.
(WebCore::InputType::isMouseFocusable): Added for default method of derived InputType classes.
* html/InputType.h:
(InputType): Chagned signature of isKeyboardFocusable.
* html/RadioInputType.cpp:
(WebCore::RadioInputType::isKeyboardFocusable): Changed to call isTextFormControlKeyboardFocusable which was done in HTMLInputElement.
* html/RadioInputType.h:
(RadioInputType):
* html/TextFieldInputType.cpp:
(WebCore::TextFieldInputType::isKeyboardFocusable): Moved implementation from HTMLInputElement.
(WebCore::TextFieldInputType::isMouseFocusable): Moved implementation from HTMLInputElement.
* html/TextFieldInputType.h:
(TextFieldInputType):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120695 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make StylePropertySet::merge() always override on conflict
https://bugs.webkit.org/show_bug.cgi?id=89348

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-19
Reviewed by Ryosuke Niwa.

merge() was only used with argOverridesOnConflict = true, which
makes the extra parameter useless. It will also save a boolean check.

* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::mergeAndOverrideOnConflict):
* css/StylePropertySet.h:
(StylePropertySet):
* editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):
* editing/EditingStyle.cpp:
(WebCore::EditingStyle::overrideWithStyle):
(WebCore::styleFromMatchedRulesForElement):
(WebCore::EditingStyle::mergeStyleFromRules):
(WebCore::EditingStyle::mergeStyleFromRulesForSerialization):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120696 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION(r120552): Many tests timing out on Windows
https://bugs.webkit.org/show_bug.cgi?id=89433

Reviewed by Andy Estes.

* wtf/CurrentTime.cpp:
(WTF::lowResUTCTime):
It looks like there were two bugs:
1) the function was converting from 100ths of nanoseconds to seconds
   rather than 100s of nanoseconds to seconds by dividing by
   (nsPerSecond * 100) rather than (nsPerSecond / 100)
2) the function should've been returning milliseconds, not seconds



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120697 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Introduce ENABLE_CSP_NEXT configuration flag.
https://bugs.webkit.org/show_bug.cgi?id=89300

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

The 1.0 draft of the Content Security Policy spec is just about to
move to Last Call. We'll hide work on the upcoming 1.1 spec behind
this ENABLE flag, disabled by default.

Spec: https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html

.:

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/chromium:

* features.gypi:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.vsprops:
* win/tools/vsprops/FeatureDefinesCairo.vsprops:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120698 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Modify HTTPS port to 8443 for performance tests
https://bugs.webkit.org/show_bug.cgi?id=89442

Reviewed by Ryosuke Niwa.

We should be consistent with the default HTTPS port and with the changelog of r119188.

* Scripts/webkitpy/performance_tests/perftest.py:
(ReplayServer.__init__):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update webkit.org to refer to layoutTestController instead of testRunner
https://bugs.webkit.org/show_bug.cgi?id=89445

Reviewed by Kent Tamura.

* quality/testwriting.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Web Inspector: remove unnecessary indirection from message loop instrumentation
https://bugs.webkit.org/show_bug.cgi?id=89443

Removed start/stopMainThreadMonitoring methods from WebDevToolsAgentClient
and WebDevToolsAgentImpl. The functionality is now implemented inside
InspectorClientImpl.

Reviewed by Vsevolod Vlasov.

* public/WebDevToolsAgentClient.h:
* src/InspectorClientImpl.cpp:
(WebKit::InspectorClientImpl::clearBrowserCookies):
(WebKit::InspectorClientImpl::startMainThreadMonitoring):
(WebKit::InspectorClientImpl::stopMainThreadMonitoring):
(WebKit::InspectorClientImpl::willProcessTask):
(WebKit):
(WebKit::InspectorClientImpl::didProcessTask):
* src/InspectorClientImpl.h:
(InspectorClientImpl):
* src/WebDevToolsAgentImpl.cpp:
* src/WebDevToolsAgentImpl.h:
(WebDevToolsAgentImpl):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@120701 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: FileSystem tree should hide uninitialized FileSystem
https://bugs.webkit.org/show_bug.cgi?id=88602

Patch by Taiju Tsuiki <tzik@chromium.org> on 2012-06-19
Reviewed by Vsevolod Vlasov.

Source/WebCore:

Test: http/tests/inspector/filesystem/get-filesystem-root.html

* inspector/Inspector.json:
* inspector/InspectorFileSystemAgent.cpp:
(WebCore):
(WebCore::InspectorFileSystemAgent::getFileSystemRoot):
* inspector/InspectorFileSystemAgent.h:
(InspectorFileSystemAgent):
* inspector/front-end/FileSystemModel.js:
(WebInspector.FileSystemModel.prototype._originAdded):
(WebInspector.FileSystemModel.prototype.refreshFileSystemList):
(WebInspector.FileSystemModel.prototype._gotFileSystem):
(WebInspector.FileSystemModel.FileSystem):
(WebInspector.FileSystemRequestManager):
(WebInspector.FileSystemRequestManager.prototype.getFileSystemRoot):
(WebInspector.FileSystemRequestManager.prototype._gotFileSystemRoot):
(WebInspector.FileSystemDispatcher.prototype.gotFileSystemRoot):
* inspector/front-end/ResourcesPanel.js:
(WebInspector.FileSystemListTreeElement.prototype._fileSystemRemoved):

LayoutTests:

* http/tests/inspector/filesystem/get-filesystem-root-expected.txt: Added.
* http/tests/inspector/filesystem/get-filesystem-root.html: Added.

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