Add new GraphicsLayer::create overload to all ports
https://bugs.webkit.org/show_bug.cgi?id=98082

Reviewed by Andreas Kling.

Add the GraphicsLayer::create variant that takes a factory to all ports.

* platform/graphics/GraphicsLayer.cpp:
(WebCore):
(WebCore::GraphicsLayer::setGraphicsLayerFactory):
* platform/graphics/GraphicsLayer.h:
(GraphicsLayer):
Rename the GraphicsLayerFactory function typedef to GraphicsLayerFactoryCallback to avoid collisions.

* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayer::create):
(WebCore):
* platform/graphics/chromium/GraphicsLayerChromium.cpp:
(WebCore::GraphicsLayer::create):
(WebCore):
* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayer::create):
(WebCore):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayer::create):
(WebCore):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Use XvfbDriver for layout tests
https://bugs.webkit.org/show_bug.cgi?id=98162

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-10-02
Reviewed by Kenneth Rohde Christiansen.

Use XvfbDriver for layout tests on EFL port.

* Scripts/webkitpy/layout_tests/port/efl.py:
(EflPort._driver_class):
* Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
(XvfbDriver._start): Set DUMPRENDERTREE_TEMP and LOCAL_RESOURCE_ROOT
environment variables in XvfbDriver as those are needed for
TestRunner::pathToLocalResource().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130186 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: NMI: switch to non intrusive instrumentation of ParsedURL.
https://bugs.webkit.org/show_bug.cgi?id=98150

Reviewed by Yury Semikhatsky.

Source/WebCore:

Style changes.

* platform/KURLWTFURLImpl.h:
(WebCore::KURLWTFURLImpl::reportMemoryUsage):

Source/WTF:

Memory instrumentation for ParsedURL was extracted into separate header MemoryInstrumentationParsedURL.h

Drive by fix: unnecessary include was removed from String*.cpp files.

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
* wtf/MemoryInstrumentationParsedURL.h: Added.
(WTF):
(WTF::reportMemoryUsage):
* wtf/text/AtomicString.cpp:
* wtf/text/StringImpl.cpp:
* wtf/text/WTFString.cpp:
* wtf/url/api/ParsedURL.cpp:
* wtf/url/api/ParsedURL.h:
* wtf/url/api/URLString.cpp:
* wtf/url/api/URLString.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130187 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Qt] Missing expected results for rounded dotted borders tests
https://bugs.webkit.org/show_bug.cgi?id=98170

Patch by Marcelo Lira <marcelo.lira@openbossa.org> on 2012-10-02
Reviewed by Csaba Osztrogonác.

* platform/qt/css2.1/t170602-bdr-conflct-w-45-d-expected.png:
* platform/qt/css2.1/t170602-bdr-conflct-w-46-d-expected.png:
* platform/qt/css2.1/t170602-bdr-conflct-w-47-d-expected.png:
* platform/qt/css2.1/t170602-bdr-conflct-w-48-d-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r130103 and r130125.
http://trac.webkit.org/changeset/130103
http://trac.webkit.org/changeset/130125
https://bugs.webkit.org/show_bug.cgi?id=97974

Causes performance regressions on Dromaeo dom modify tests.

* bindings/v8/IntrusiveDOMWrapperMap.h:
(WebCore):
(ChunkedTable):
(WebCore::ChunkedTable::ChunkedTable):
(WebCore::ChunkedTable::add):
(WebCore::ChunkedTable::remove):
(WebCore::ChunkedTable::clear):
(WebCore::ChunkedTable::visit):
(WebCore::ChunkedTable::reportMemoryUsage):
(WebCore::ChunkedTable::Chunk::Chunk):
(Chunk):
(WebCore::ChunkedTable::clearEntries):
(WebCore::ChunkedTable::visitEntries):
(WebCore::IntrusiveDOMWrapperMap::IntrusiveDOMWrapperMap):
(WebCore::IntrusiveDOMWrapperMap::get):
(WebCore::IntrusiveDOMWrapperMap::set):
(WebCore::IntrusiveDOMWrapperMap::contains):
(WebCore::IntrusiveDOMWrapperMap::visit):
(WebCore::IntrusiveDOMWrapperMap::removeIfPresent):
(IntrusiveDOMWrapperMap):
(WebCore::IntrusiveDOMWrapperMap::clear):
(ChunkedTableTraits):
(WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::move):
(WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::clear):
(WebCore::IntrusiveDOMWrapperMap::ChunkedTableTraits::visit):
* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::ScriptWrappable):
(WebCore::ScriptWrappable::wrapper):
(WebCore::ScriptWrappable::setWrapper):
(WebCore::ScriptWrappable::clearWrapper):
(WebCore::ScriptWrappable::reportMemoryUsage):
(ScriptWrappable):
* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::getCachedWrapper):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HTMLConstructionSite::insertTextNode isn't optimized for 8 bit strings
https://bugs.webkit.org/show_bug.cgi?id=97740

Reviewed by Darin Adler.

Source/WebCore: 

Changed parserAppendData to take a string instead of a UChar*.  Also added an optional offset
argument to handle string+offset.  The actual string append now uses the appropriate string
size.

* dom/CharacterData.cpp:
(WebCore::CharacterData::parserAppendData):
* dom/CharacterData.h:
(CharacterData):
* dom/Text.cpp:
(WebCore::Text::createWithLengthLimit):
* html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::insertTextNode):

Source/WTF: 

Added an append method that takes an LChar source.  Made both the UChar and LChar versions optimally handle
the appendee and appendend string bitness.

* wtf/text/WTFString.cpp:
(WTF::String::append):
* wtf/text/WTFString.h:
(String):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130190 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebDocument doesn't export document language to outside users.
https://bugs.webkit.org/show_bug.cgi?id=98066

Patch by Brian White <bcwhite@chromium.org> on 2012-10-02
Reviewed by Adam Barth.

Chromium uses the document language to offer translation.  It's been doing
its own detection of this property but it would be better to get it from
existing extraction code.

* public/WebDocument.h:
(WebDocument):
* src/WebDocument.cpp:
(WebKit::WebDocument::contentLanguage):
(WebKit):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[XvfbDriver] First tests in each worker occasionally crash
https://bugs.webkit.org/show_bug.cgi?id=96203

Reviewed by Dirk Pranke.

Often in debug builds, the first tests in each worker crash because they
can't yet open the Xvfb display assigned to them. This indicates Xvfb hasn't
yet been set up.

To avoid this, the execution should halt for a small amount of time before tests
are run so the Xvfb process has enough time to get ready. At the moment this is
done right after the Xvfb process is spawned and the execution halts for one
second. That value is overriden to zero when testing to not prolong the testing time.

* Scripts/webkitpy/layout_tests/port/xvfbdriver.py:
(XvfbDriver.__init__):
(XvfbDriver._start):
* Scripts/webkitpy/layout_tests/port/xvfbdriver_unittest.py:
(XvfbDriverTest.make_driver):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update some expectations to green the tree.
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Unreviewed gardening. Skipping broken tests on Windows.
https://bugs.webkit.org/show_bug.cgi?id=98169

http/tests/inspector/csp-injected-content-warning-contains-stacktrace.html
and http/tests/inspector/csp-inline-warning-contains-stacktrace.html started
failing on Apple Win 7 Release (Tests) in r130150
<http://trac.webkit.org/changeset/130150>.

http://build.webkit.org/results/Apple%20Win%207%20Release%20(Tests)/r130150%20(28375)/results.html

Will be fixed in webkit.org/b/98169


* platform/win/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Adding Windows specific test results. Accelerated 2D canvas not enabled on Windows.

* platform/win/fast/canvas/canvas-render-layer-expected.txt: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Programs/WebKit2APITests/TestCookieManager fails
https://bugs.webkit.org/show_bug.cgi?id=98176

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2012-10-02
Reviewed by Martin Robinson.

The problem is that the soup server has a g_assert_not_reached()
for unknown paths, but know /favicon.icon might be requested.

* UIProcess/API/gtk/tests/TestCookieManager.cpp:
(serverCallback): Ignore unknown paths.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130196 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Make sure the touch-points in the touch-events have the correct state.
https://bugs.webkit.org/show_bug.cgi?id=98110

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

Source/WebKit/chromium:

It is necessary for the WebTouchPoints in the reconstructed WebTouchEvent
to have the correct state. Without this change, the states were always
unknown.

* src/WebInputEventConversion.cpp:
(WebKit::toWebTouchPointState):
(WebKit):
(WebKit::addTouchPoints):
(WebKit::WebTouchEventBuilder::WebTouchEventBuilder):

Tools:

TestWebPlugin can now be configured to print out some details about
events. For now, details for only touch events are printed. This is
used to verify that touch-points in the touch-events are properly
set.

* DumpRenderTree/chromium/TestWebPlugin.cpp:
(pointState):
(printTouchList):
(printEventDetails):
(TestWebPlugin::TestWebPlugin):
(TestWebPlugin::handleInputEvent):
* DumpRenderTree/chromium/TestWebPlugin.h:
(TestWebPlugin):

LayoutTests:

* platform/chromium/plugins/touch-events-details-expected.txt: Added.
* platform/chromium/plugins/touch-events-details.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
http/tests/inspector/indexeddb/database-structure.html start to crash after r124675
https://bugs.webkit.org/show_bug.cgi?id=93225

Reviewed by Tony Chang.

Source/WebCore:

Tests - the disabled indexeddb inspector tests are re-enabled.

* Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
(WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
(WebCore::IDBDatabaseBackendImpl::close):
Detect re-entrancy and bail.

* Modules/indexeddb/IDBDatabaseBackendImpl.h:
(IDBDatabaseBackendImpl):

LayoutTests:

* platform/chromium/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130198 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Don't wedge if page reloads with pending upgradeneeded
https://bugs.webkit.org/show_bug.cgi?id=98091

Reviewed by Tony Chang.

Source/WebCore:

Test: storage/indexeddb/dont-wedge.html

* Modules/indexeddb/IDBOpenDBRequest.cpp:
(WebCore::IDBOpenDBRequest::onUpgradeNeeded):
This got the same treatment as IDBRequest::onSuccess(Transaction).
Explicitly tell the backend objects that they are going away so that
m_runningVersionChangeTransaction is cleared and connectionCount()
decreases.

LayoutTests:

dont-wedge.js was derived from
transaction-coordination-across-databases.js.

This would have passed in DRT without this patch, but not in
content_shell.

* storage/indexeddb/dont-wedge-expected.txt: Added.
* storage/indexeddb/dont-wedge.html: Added.
* storage/indexeddb/resources/dont-wedge.js: Added.
(test):
(deleteDatabase1.request.onblocked):
(deleteDatabase1):
(deleteDatabase2):
(isAfterReload):
(reload):
(openDatabase1.request.onupgradeneeded):
(openDatabase1.request.onsuccess):
(openDatabase1):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130199 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Split popup-blocking-timers.html into individual tests
https://bugs.webkit.org/show_bug.cgi?id=96480

Reviewed by Daniel Bates.

That should avoid failures from the log messages coming in in the wrong order.

* fast/events/popup-blocking-timers-expected.txt: Removed.
* fast/events/popup-blocking-timers.html: Removed.
* fast/events/popup-blocking-timers1-expected.txt: Added.
* fast/events/popup-blocking-timers1.html: Added.
* fast/events/popup-blocking-timers2-expected.txt: Added.
* fast/events/popup-blocking-timers2.html: Added.
* fast/events/popup-blocking-timers3-expected.txt: Added.
* fast/events/popup-blocking-timers3.html: Added.
* fast/events/popup-blocking-timers4-expected.txt: Added.
* fast/events/popup-blocking-timers4.html: Added.
* fast/events/popup-blocking-timers5-expected.txt: Added.
* fast/events/popup-blocking-timers5.html: Added.
* fast/events/popup-blocking-timers6-expected.txt: Added.
* fast/events/popup-blocking-timers6.html: Added.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt-5.0-wk2/TestExpectations:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130200 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove cases of testRunner.disableImageLoading() from the layout tests.
https://bugs.webkit.org/show_bug.cgi?id=98187

Reviewed by Simon Fraser.

According to the discussion started in [1], it does not make much
sense to keep disableLoadingImages() around when
overridePreferences("WebKitDisplayImagesKey", 0) achieves the same
effect.

There were only two cases of disableLoadingImages() in the tests;
one of the tests is disabled and the other is currently skipped by
all ports, so there should be no regressions, such as problems
with ports that may implement testRunner.disableLoadingImages()
but not overridePreferences("WebKitDisplayImagesKey").

[1] http://lists.webkit.org/pipermail/webkit-dev/2012-September/022323.html

* http/tests/misc/favicon-loads-with-icon-loading-override.html:
* http/tests/misc/favicon-loads-with-images-disabled.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130201 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove MSYS-related changes to the http testing infrastructure.
https://bugs.webkit.org/show_bug.cgi?id=98183

Patch by Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> on 2012-10-02
Reviewed by Eric Seidel.

In the process of removing the cruft that has accumulated in our
Apache configuration code, we can basically revert r77161 which
added some MSYS (mingw)-specific code to old-run-webkit-tests,
since it is not being used by any port anymore.

Tools:

* Scripts/run-webkit-httpd: Remove isMsys()-dependent hacks.
* Scripts/webkitperl/httpd.pm:
(getHTTPDPath): Remove isMsys() code path.
(getDefaultConfigForTestDirectory): Revert isMsys() hacks.
(getHTTPDConfigPathForTestDirectory): Do not point to the noew
removed apache2-msys-httpd.conf.
(convertMsysPath): Removed.

LayoutTests:

* http/conf/apache2-msys-httpd.conf: Removed.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130202 268f45cc-cd09-0410-ab3c-d52691b4dbfc
createHTMLDocument() should not create a title element if the title argument is left out
https://bugs.webkit.org/show_bug.cgi?id=96694

Reviewed by Darin Adler.

In case the argument is not passed to createHTMLDocument we use a null string and check
for that before creating a title element.

Source/WebCore:

Test: fast/dom/DOMImplementation/createHTMLDocument-optional-title.html

* dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createHTMLDocument):
* dom/DOMImplementation.idl:

LayoutTests:

* fast/dom/DOMImplementation/createHTMLDocument-optional-title-expected.txt: Added.
* fast/dom/DOMImplementation/createHTMLDocument-optional-title.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130203 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] Prevent window.close() from closing pages that are not opened by JS
https://bugs.webkit.org/show_bug.cgi?id=98190

Reviewed by Antonio Gomes.

RIM PR# 217812.
Only pages opened by JS can be closed by JS.

* WebCoreSupport/ChromeClientBlackBerry.cpp:
(WebCore::ChromeClientBlackBerry::closeWindowSoon):


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