profile/ivi/webkit-efl.git
12 years agoUnreviewed GTK gardening, removing crash expectation for the
zandobersek@gmail.com [Thu, 28 Jun 2012 08:39:26 +0000 (08:39 +0000)]
Unreviewed GTK gardening, removing crash expectation for the
fast/workers/worker-context-gc.html test as the offending revision
was rolled out in r121417.

* platform/gtk/TestExpectations:

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

12 years agoUnreviewed, rolling out r121395.
zandobersek@gmail.com [Thu, 28 Jun 2012 08:34:47 +0000 (08:34 +0000)]
Unreviewed, rolling out r121395.
http://trac.webkit.org/changeset/121395
https://bugs.webkit.org/show_bug.cgi?id=90143

Patch causes crashes in fast/workers/worker-context-gc.html
(Requested by zdobersek on #webkit).

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

Source/WebCore:

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
* workers/DedicatedWorkerThread.h:
(DedicatedWorkerThread):
* workers/DefaultSharedWorkerRepository.cpp:
(SharedWorkerProxy):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::SharedWorkerThread):
* workers/SharedWorkerThread.h:
(SharedWorkerThread):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerContext):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::create):
(WorkerThreadStartupData):
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
* workers/WorkerThread.h:
(WorkerThread):

Source/WebKit/chromium:

* src/WebSharedWorkerImpl.cpp:
(WebKit::WebSharedWorkerImpl::startWorkerContext):
* src/WebWorkerClientImpl.cpp:
(WebKit::WebWorkerClientImpl::startWorkerContext):

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

12 years ago[Qt] KURL assert at fast/loader/opaque-base-url.html
kbalazs@webkit.org [Thu, 28 Jun 2012 07:46:54 +0000 (07:46 +0000)]
[Qt] KURL assert at fast/loader/opaque-base-url.html
https://bugs.webkit.org/show_bug.cgi?id=89468

Reviewed by Simon Hausmann.

Don't use the KURL(ParsedURLStringTag, const String&) constructor.
We cannot be sure that the url in encode was valid and even if it
was the message could have been corrupted.
* Shared/qt/WebCoreArgumentCodersQt.cpp:
(CoreIPC::::encode):
(CoreIPC::::decode):

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

12 years ago[Platform] Implement functions for localized time format information
yosin@chromium.org [Thu, 28 Jun 2012 07:30:11 +0000 (07:30 +0000)]
[Platform] Implement functions for localized time format information
https://bugs.webkit.org/show_bug.cgi?id=89965

Reviewed by Kent Tamura.

Source/WebCore:

This patch introduces three functions for time format:
  1. localizedTimeFormatText()
  2. localizedShortTimeFormatText()
  2. timeAMPMLabels()
for input type "time" if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS) is true.

Having both localizedTimeFormat and localizedShortTimeFormat is for
displaying only two fields hour and minute when step >= 60. There is
no way to remove second field from "h:m:s" pattern string. We don't
know whether ":" after "m" belongs minute or second field.

Test: WebKit/chromium/tests/LocalizedDateICUTest.cpp

* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::LocaleICU):
(WebCore::createFallbackAMPMLabels): Added.
(WebCore::LocaleICU::initializeDateTimeFormat):  Added.
(WebCore::LocaleICU::localizedTimeFormatText):  Added.
(WebCore::LocaleICU::localizedShortTimeFormatText):  Added.
(WebCore::LocaleICU::timeAMPMLabels):  Added.
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/LocalizedDate.h:
* platform/text/LocalizedDateICU.cpp:
(WebCore::localizedTimeFormatText):  Added.
(WebCore::localizedShortTimeFormatText):  Added.
(WebCore::timeAMPMLabels):  Added.

Source/WebKit/chromium:

This patch adds new test LocalizedDateICUTest if ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS)
is true.

* WebKit.gypi:
* tests/LocalizedDateICUTest.cpp: Added.
(LocalizedDateICUTest):
(Labels):
(LocalizedDateICUTest::Labels::Labels):
(LocalizedDateICUTest::Labels::operator==):
(LocalizedDateICUTest::Labels::toString):
(LocalizedDateICUTest::labels):
(LocalizedDateICUTest::localizedDateFormatText):
(LocalizedDateICUTest::localizedShortDateFormatText):
(LocalizedDateICUTest::timeAMPMLabels):
(operator<<):
(TEST_F):

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

12 years ago[Qt] Unreviewed gardening, skip a new test to hide an annoying bug
ossy@webkit.org [Thu, 28 Jun 2012 07:25:27 +0000 (07:25 +0000)]
[Qt] Unreviewed gardening, skip a new test to hide an annoying bug
https://bugs.webkit.org/show_bug.cgi?id=87680 (and paint the bot green)

* platform/qt/Skipped:

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

12 years agoUnreviewed GTK gardening, adding a crash expectation for the
zandobersek@gmail.com [Thu, 28 Jun 2012 07:17:42 +0000 (07:17 +0000)]
Unreviewed GTK gardening, adding a crash expectation for the
fast/workers/worker-context-gc.html test that started crashing after r121395.

* platform/gtk/TestExpectations:

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

12 years agoPerformance: Optimize Dromaeo/dom-query.html by caching NodeRareData on Document
haraken@chromium.org [Thu, 28 Jun 2012 06:29:27 +0000 (06:29 +0000)]
Performance: Optimize Dromaeo/dom-query.html by caching NodeRareData on Document
https://bugs.webkit.org/show_bug.cgi?id=90059

Reviewed by Ryosuke Niwa.

This patch improves performance of document.getElementsBy*().
e.g. the patch makes Dromaeo/dom-query.html 5.4% faster.

Dromaeo/dom-query.html without the patch (Chromium/Linux):
784714 runs/s, 765947 runs/s, 803109 runs/s, 804450 runs/s

Dromaeo/dom-query.html with the patch (Chromium/Linux):
839245 runs/s, 829867 runs/s, 811032 runs/s, 847486 runs/s

Based on the assumption that document.getElementsByClassName(),
document.getElementsByTagName() and document.getElementsByName()
would be used frequently in the real world, this patch implements
a fast path for Document methods that require to access NodeRareData.
Specifically, this patch caches a pointer to NodeRareData on Document,
by which Document can access NodeRareData without looking up a HashMap.

The only performance concern is the overhead of the isDocumentNode() check
that this patch added to Node::ensureRareData. However, I could not
observe any performance regression caused by the overhead.

No tests. No change in behavior.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setCachedRareData): I didn't inline this method,
since the inlining slightly regressed performance for some reason.
(WebCore):
* dom/Document.h:
(WebCore):
(WebCore::Document::cachedRareData):
(Document):
(~Document): Moved 'm_document = 0' to the tail of the destructor,
since isDocumentNode() has to return true in clearRareData() that is called
in ~Document().
* dom/Node.cpp:
(WebCore::Node::ensureRareData):
(~Node): Moved the assertion into clearRareData().

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

12 years agoUnreviewed. Fix the build without TEXTURE_MAPPER_GL.
carlosgc@webkit.org [Thu, 28 Jun 2012 06:24:56 +0000 (06:24 +0000)]
Unreviewed. Fix the build without TEXTURE_MAPPER_GL.

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformInitialize):

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

12 years ago[BlackBerry] 0-length response with no content-type shouldn't download
mary.wu@torchmobile.com.cn [Thu, 28 Jun 2012 06:09:50 +0000 (06:09 +0000)]
[BlackBerry] 0-length response with no content-type shouldn't download
https://bugs.webkit.org/show_bug.cgi?id=89860

Reviewed by Rob Buis.

RIM PR# 168419

For 0-length response, if we can't get its mimetype from the filename,
we set the mimetype to "text/plain" instead of "application/octet-stream",
so it won't go to download.

Reviewed internally by Charles Wei.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendResponseIfNeeded):

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

12 years agoUnreviewed, rolling out r121398.
ryuan.choi@samsung.com [Thu, 28 Jun 2012 05:36:01 +0000 (05:36 +0000)]
Unreviewed, rolling out r121398.
http://trac.webkit.org/changeset/121398
https://bugs.webkit.org/show_bug.cgi?id=90136

broke efl build (Requested by ryuan on #webkit).

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

Source/WebKit:

* PlatformEfl.cmake:

Source/WebKit/efl:

* tests/UnitTestUtils/EWKTestBase.cpp: Removed.
* tests/UnitTestUtils/EWKTestBase.h: Removed.
* tests/UnitTestUtils/EWKTestConfig.h: Removed.
* tests/UnitTestUtils/EWKTestView.cpp: Removed.
* tests/UnitTestUtils/EWKTestView.h: Removed.
* tests/resources/default_test_page.html: Removed.
* tests/test_ewk_view.cpp: Removed.
* tests/test_runner.cpp: Removed.

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

12 years agoUnreviewed, rolling out r121405.
commit-queue@webkit.org [Thu, 28 Jun 2012 05:34:00 +0000 (05:34 +0000)]
Unreviewed, rolling out r121405.
http://trac.webkit.org/changeset/121405
https://bugs.webkit.org/show_bug.cgi?id=90135

broke windows build (Requested by shawnsingh_ on #webkit).

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

* WebKit.gypi:
* WebKitUnitTests.gyp:
* public/WebDOMMessageEvent.h:
* tests/AssociatedURLLoaderTest.cpp:
(WebKit::AssociatedURLLoaderTest::AssociatedURLLoaderTest):
(WebKit::AssociatedURLLoaderTest::SetUp):
(WebKit::AssociatedURLLoaderTest::CheckMethodFails):
(WebKit::AssociatedURLLoaderTest::CheckHeaderFails):
(WebKit::AssociatedURLLoaderTest::CheckAccessControlHeaders):
(WebKit::TEST_F):
* tests/EventListenerTest.cpp:
* tests/FrameTestHelpers.cpp:
(WebKit::FrameTestHelpers::registerMockedURLLoad):
(FrameTestHelpers):
(WebKit::FrameTestHelpers::loadFrame):
* tests/FrameTestHelpers.h:
(FrameTestHelpers):
* tests/ListenerLeakTest.cpp:
(WebKit::ListenerLeakTest::RunTest):
* tests/PopupMenuTest.cpp:
(WebKit::SelectPopupMenuTest::registerMockedURLLoad):
(WebKit::SelectPopupMenuTest::loadFrame):
* tests/RunAllTests.cpp:
* tests/URLTestHelpers.cpp: Removed.
* tests/URLTestHelpers.h: Removed.
* tests/WebFrameTest.cpp:
(WebKit::WebFrameTest::registerMockedHttpURLLoad):
(WebKit::WebFrameTest::registerMockedChromeURLLoad):
(WebKit::TEST_F):
* tests/WebPageNewSerializerTest.cpp:
(WebKit::WebPageNewSerializeTest::registerMockedURLLoad):
(WebPageNewSerializeTest):
(WebKit::WebPageNewSerializeTest::setUpCSSTestPage):
(WebKit::WebPageNewSerializeTest::loadURLInTopFrame):
(WebKit::WebPageNewSerializeTest::resourceVectorContains):
(WebKit::TEST_F):
* tests/WebPageSerializerTest.cpp:
(WebKit::WebPageSerializerTest::registerMockedURLLoad):
(WebKit::WebPageSerializerTest::loadURLInTopFrame):
(WebKit::WebPageSerializerTest::webVectorContains):
(WebKit::TEST_F):
* tests/WebViewTest.cpp:
(WebKit::TEST_F):
(WebKit::WebViewTest::testAutoResize):
(WebKit::WebViewTest::testTextInputType):

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

12 years ago[WinCairo] Unreviewed build correction. Accidentally turned on
bfulgham@webkit.org [Thu, 28 Jun 2012 05:17:08 +0000 (05:17 +0000)]
[WinCairo] Unreviewed build correction.  Accidentally turned on
CSS_FILTERS, which is not available in tree.

* win/tools/vsprops/FeatureDefinesCairo.vsprops: Turn CSS_FILTERS
back off for WinCairo target.

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

12 years agoUnreviewed, rolling out r121363, r121367, r121384, and
ossy@webkit.org [Thu, 28 Jun 2012 05:15:45 +0000 (05:15 +0000)]
Unreviewed, rolling out r121363, r121367, r121384, and
r121390.
http://trac.webkit.org/changeset/121363
http://trac.webkit.org/changeset/121367
http://trac.webkit.org/changeset/121384
http://trac.webkit.org/changeset/121390
https://bugs.webkit.org/show_bug.cgi?id=90134

It broke debug NRWT on GTK and on Qt (Requested by Ossy_NIGHT
on #webkit).

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

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort):
(ChromiumPort.__init__):
(ChromiumPort._check_file_exists):
(ChromiumPort.default_results_directory):
(ChromiumPort._driver_class):
(ChromiumPort._build_path):
(ChromiumPort._path_to_image_diff):
* Scripts/webkitpy/layout_tests/port/chromium_linux.py:
(ChromiumLinuxPort.baseline_search_path):
* Scripts/webkitpy/layout_tests/port/chromium_mac.py:
(ChromiumMacPort.baseline_search_path):
* Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
(ChromiumPortTest):
* Scripts/webkitpy/layout_tests/port/chromium_win.py:
(ChromiumWinPort.baseline_search_path):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort.__init__):
(WebKitPort._webcore_symbols_string):
(WebKitPort._skipped_tests_for_unsupported_features):
* Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
(TestWebKitPort._webcore_symbols_string):
(WebKitPortUnitTests.test_default_options):

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

12 years ago[chromium] Use WEBKIT_IMPLEMENTATION == 1 for webkit_unit_tests
shawnsingh@chromium.org [Thu, 28 Jun 2012 05:00:42 +0000 (05:00 +0000)]
[chromium] Use WEBKIT_IMPLEMENTATION == 1 for webkit_unit_tests
https://bugs.webkit.org/show_bug.cgi?id=90094

Reviewed by James Robinson.

This patch adds the WEBKIT_IMPLEMENTATION = 1 define to
WebKitUnitTests.gyp. To get it to compile correctly, some string
and URL code was refactored and fixed.

* WebKit.gypi:
* WebKitUnitTests.gyp:
* public/WebDOMMessageEvent.h:
(WebKit::WebDOMMessageEvent::WebDOMMessageEvent):
* tests/AssociatedURLLoaderTest.cpp:
* tests/EventListenerTest.cpp:
* tests/FrameTestHelpers.cpp:
(WebKit::FrameTestHelpers::loadFrame):
* tests/FrameTestHelpers.h:
* tests/ListenerLeakTest.cpp:
(WebKit::ListenerLeakTest::RunTest):
* tests/PopupMenuTest.cpp:
* tests/RunAllTests.cpp:
* tests/URLTestHelpers.cpp: Added.
(URLTestHelpers):
(WebKit::URLTestHelpers::registerMockedURLFromBaseURL):
(WebKit::URLTestHelpers::registerMockedURLLoad):
* tests/URLTestHelpers.h: Copied from Source/WebKit/chromium/public/WebDOMMessageEvent.h.
(WebKit):
(URLTestHelpers):
(WebKit::URLTestHelpers::toKURL):
* tests/WebFrameTest.cpp:
* tests/WebPageNewSerializerTest.cpp:
* tests/WebPageSerializerTest.cpp:
* tests/WebViewTest.cpp:

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

12 years ago[Platform] Implement localizedDecimalSeparator function
yosin@chromium.org [Thu, 28 Jun 2012 04:58:07 +0000 (04:58 +0000)]
[Platform] Implement localizedDecimalSeparator function
https://bugs.webkit.org/show_bug.cgi?id=90036

Reviewed by Kent Tamura.

Source/WebCore:

This patch introduces new function localizedDecimalSeparator() when
ENABLE(INPUT_TYPE_TIME_MULTIPLE_FIELDS). It will be used for
displaying millisecond for time fields UI.

Test: WebKit/chromium/tests/LocalizedNumberICUTest.cpp

* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::localizedDecimalSeparator): Added
* platform/text/LocaleICU.h:
(LocaleICU): Added localizedDecimalSeparator.
* platform/text/LocalizedNumber.h:
* platform/text/LocalizedNumberICU.cpp:
(WebCore::localizedDecimalSeparator): Added.
* platform/text/LocalizedNumberNone.cpp:
(WebCore::localizedDecimalSeparator): Added.
* platform/text/mac/LocalizedNumberMac.mm:
(WebCore::localizedDecimalSeparator): Added.

Source/WebKit/chromium:

This patch adds test case for localizedDecimalSeparator().

* tests/LocalizedNumberICUTest.cpp:
(testDecimalSeparator):
(TEST):

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

12 years agoAdd OVERRIDE to functions in UnthrottledTextureUploader class
commit-queue@webkit.org [Thu, 28 Jun 2012 04:49:53 +0000 (04:49 +0000)]
Add OVERRIDE to functions in UnthrottledTextureUploader class
https://bugs.webkit.org/show_bug.cgi?id=90130

Patch by Lu Guanqun <guanqun.lu@intel.com> on 2012-06-27
Reviewed by James Robinson.

No new tests required.

* platform/graphics/chromium/LayerRendererChromium.cpp:

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

12 years ago[WinCairo] Unreviewed build correction. Resync feature defines with
bfulgham@webkit.org [Thu, 28 Jun 2012 04:08:58 +0000 (04:08 +0000)]
[WinCairo] Unreviewed build correction.  Resync feature defines with
Apple port. Things have drifted apart a little.

* win/tools/vsprops/FeatureDefinesCairo.vsprops: Update to match
Apple port, define some missing features.

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

12 years agopattern="" should only accept the empty string
commit-queue@webkit.org [Thu, 28 Jun 2012 03:58:02 +0000 (03:58 +0000)]
pattern="" should only accept the empty string
https://bugs.webkit.org/show_bug.cgi?id=89569

Patch by Pablo Flouret <pablof@motorola.com> on 2012-06-27
Reviewed by Kent Tamura.

Source/WebCore:

An empty pattern attribute was being treated essentially as if the
pattern wasn't present.

No new tests. Covered by existing tests (plus a modified one).

* html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch):
    Check if the pattern attribute is present. If it is then use the
    pattern as is (in the particular case of this bug, an empty pattern
    will only match an empty value).

LayoutTests:

* fast/forms/ValidityState-patternMismatch-expected.txt:
* fast/forms/ValidityState-patternMismatch.html:
    Modified the test to check the results of an empty pattern both with an empty
    value, and with some value specified.

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

12 years ago[BlackBerry] Selection overlay can become visible after it has been hidden
commit-queue@webkit.org [Thu, 28 Jun 2012 03:33:01 +0000 (03:33 +0000)]
[BlackBerry] Selection overlay can become visible after it has been hidden
https://bugs.webkit.org/show_bug.cgi?id=90105

Patch by Andrew Lo <anlo@rim.com> on 2012-06-27
Reviewed by George Staikos.

When SelectionOverlay::hide is called from UI thread,
rather than setting the override opacity, dispatch to the
WebKit thread, which removes the overlay (normal case).

Internal PR164183.
Internally Reviewed by: Arvid Nilsson.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::~WebPagePrivate):
(BlackBerry::WebKit::WebPage::selectionOverlay):
* Api/WebPage_p.h:
(WebPagePrivate):
* Api/WebSelectionOverlay.h:
* WebKitSupport/SelectionOverlay.cpp:
(BlackBerry::WebKit::SelectionOverlay::SelectionOverlay):
(BlackBerry::WebKit::SelectionOverlay::hide):
* WebKitSupport/SelectionOverlay.h:
(BlackBerry::WebKit::SelectionOverlay::create):
(SelectionOverlay):

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

12 years agoSource/WebKit: [EFL] Add support for Unit Tests, based on the gtest library.
commit-queue@webkit.org [Thu, 28 Jun 2012 02:17:40 +0000 (02:17 +0000)]
Source/WebKit: [EFL] Add support for Unit Tests, based on the gtest library.
https://bugs.webkit.org/show_bug.cgi?id=68509

Patch by Krzysztof Czech <k.czech@samsung.com> on 2012-06-27
Reviewed by Chang Shu.

Add configuration for building gtest library, testing framework and unit tests.

* PlatformEfl.cmake:

Source/WebKit/efl: [EFL] Implementation of testing framework and unit tests for WebKit-EFL port.
https://bugs.webkit.org/show_bug.cgi?id=68509

Patch by Krzysztof Czech <k.czech@samsung.com> on 2012-06-27
Reviewed by Chang Shu.

Testing framework is based on gtest library. Gtest library is part of the WebKit project. Framework is devided into base part and view part.
Base part takes care of efl initialization, defines test macros and prepares test to run. View part is a context of each test.

* tests/UnitTestUtils/EWKTestBase.cpp: Added.
(EWKUnitTests):
(EWKUnitTests::EWKTestBase::init):
(EWKUnitTests::EWKTestBase::shutdown):
(EWKUnitTests::EWKTestBase::shutdownAll):
(EWKUnitTests::EWKTestBase::startTest):
(EWKUnitTests::EWKTestBase::endTest):
(EWKUnitTests::EWKTestBase::createTest):
(EWKUnitTests::EWKTestBase::runTest):
* tests/UnitTestUtils/EWKTestBase.h: Added.
(EWKUnitTests):
(EWKTestBase):
* tests/UnitTestUtils/EWKTestConfig.h: Added.
(Config):
* tests/UnitTestUtils/EWKTestView.cpp: Added.
(EWKUnitTests):
(EWKUnitTests::EWKTestEcoreEvas::EWKTestEcoreEvas):
(EWKUnitTests::EWKTestEcoreEvas::evas):
(EWKUnitTests::EWKTestEcoreEvas::show):
(EWKUnitTests::EWKTestView::EWKTestView):
(EWKUnitTests::EWKTestView::init):
(EWKUnitTests::EWKTestView::show):
(EWKUnitTests::EWKTestView::mainFrame):
(EWKUnitTests::EWKTestView::evas):
(EWKUnitTests::EWKTestView::bindEvents):
* tests/UnitTestUtils/EWKTestView.h: Added.
(EWKUnitTests):
(EWKTestEcoreEvas):
(EWKTestView):
(EWKUnitTests::EWKTestView::webView):
* tests/resources/default_test_page.html: Added.
* tests/test_ewk_view.cpp: Added.
(ewkViewEditableGetCb):
(TEST):
(ewkViewUriGetCb):
* tests/test_runner.cpp: Added.
(parseCustomArguments):
(main):

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

12 years ago[chromium] Improve keyboardEvent() so a web page could receive a DOM3 spec compliant...
commit-queue@webkit.org [Thu, 28 Jun 2012 02:06:13 +0000 (02:06 +0000)]
[chromium] Improve keyboardEvent() so a web page could receive a DOM3 spec compliant keyboard event.
https://bugs.webkit.org/show_bug.cgi?id=89637

Patch by Yusuke Sato <yusukes@chromium.org> on 2012-06-27
Reviewed by Tony Chang.

This is a Gtk port of http://crrev.com/142209.

Normalizes event->state to make it Windows/Mac compatible. Since the
way of setting modifier mask on X is very different than Windows/Mac
as shown in http://crbug.com/127142#c8, the normalization is necessary.

* src/gtk/WebInputEventFactory.cpp:
(WebKit):
(WebKit::normalizeEventState):
(WebKit::WebInputEventFactory::keyboardEvent):

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

12 years ago[chromium] Use SkColor in compositor internals
jamesr@google.com [Thu, 28 Jun 2012 02:03:24 +0000 (02:03 +0000)]
[chromium] Use SkColor in compositor internals
https://bugs.webkit.org/show_bug.cgi?id=90108

Reviewed by Adrienne Walker.

Source/WebCore:

As the title says, cutting dependencies. If we support color spaces in the compositor we will probably need to
use a more sophisticated type, but for our current use SkColor is sufficient and matches our API better.

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
(WebCore::LayerChromium::setBackgroundColor):
(WebCore::LayerChromium::setDebugBorderColor):
* platform/graphics/chromium/LayerChromium.h:
(LayerChromium):
(WebCore::LayerChromium::backgroundColor):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawDebugBorderQuad):
(WebCore::LayerRendererChromium::drawSolidColorQuad):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.cpp:
(WebCore::CCDebugBorderDrawQuad::create):
(WebCore::CCDebugBorderDrawQuad::CCDebugBorderDrawQuad):
* platform/graphics/chromium/cc/CCDebugBorderDrawQuad.h:
(CCDebugBorderDrawQuad):
(WebCore::CCDebugBorderDrawQuad::color):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
(WebCore::CCLayerImpl::setBackgroundColor):
(WebCore::CCLayerImpl::setDebugBorderColor):
(WebCore::CCLayerImpl::hasDebugBorders):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(CCLayerImpl):
(WebCore::CCLayerImpl::backgroundColor):
(WebCore::CCLayerImpl::debugBorderColor):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::CCLayerTreeHost):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCLayerTreeHost::setBackgroundColor):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::CCLayerTreeHostImpl):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(WebCore::CCLayerTreeHostImpl::backgroundColor):
(WebCore::CCLayerTreeHostImpl::setBackgroundColor):
(CCLayerTreeHostImpl):
* platform/graphics/chromium/cc/CCQuadCuller.cpp:
(WebCore::appendQuadInternal):
* platform/graphics/chromium/cc/CCRenderPass.cpp:
(WebCore::CCRenderPass::appendQuadsToFillScreen):
* platform/graphics/chromium/cc/CCRenderPass.h:
(WebCore):
(CCRenderPass):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::appendQuads):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.cpp:
(WebCore::CCSolidColorDrawQuad::create):
(WebCore::CCSolidColorDrawQuad::CCSolidColorDrawQuad):
* platform/graphics/chromium/cc/CCSolidColorDrawQuad.h:
(CCSolidColorDrawQuad):
(WebCore::CCSolidColorDrawQuad::color):
* platform/graphics/chromium/cc/CCTiledLayerImpl.cpp:
(WebCore::CCTiledLayerImpl::appendQuads):

Source/WebKit/chromium:

* src/NonCompositedContentHost.cpp:
(WebKit::NonCompositedContentHost::setBackgroundColor):
* tests/CCLayerImplTest.cpp:
(WebCore::TEST):
* tests/CCLayerTreeHostImplTest.cpp:
* tests/CCSolidColorLayerImplTest.cpp:
(CCLayerTestCommon::TEST):
* tests/LayerChromiumTest.cpp:

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

12 years agoIndexedDB: should make the LevelDB persistant to the directory indicated in PageGroup...
charles.wei@torchmobile.com.cn [Thu, 28 Jun 2012 01:58:22 +0000 (01:58 +0000)]
IndexedDB: should make the LevelDB persistant to the directory indicated in PageGroupSettings::indexedDBDataBasePath
https://bugs.webkit.org/show_bug.cgi?id=88338

Reviewed by David Levin.

Source/WebCore:

If the indexedDB runs in main thread it can access the GroupSettings via the document;
otherwise, we need to pass the page GroupSettings to the worker thread so that accessible
to the indexedDB running in WorkerContext.

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
* workers/DedicatedWorkerThread.cpp:
(WebCore::DedicatedWorkerThread::create):
(WebCore::DedicatedWorkerThread::DedicatedWorkerThread):
* workers/DedicatedWorkerThread.h:
(DedicatedWorkerThread):
* workers/DefaultSharedWorkerRepository.cpp:
(SharedWorkerProxy):
(WebCore::SharedWorkerProxy::groupSettings):
(WebCore):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
* workers/SharedWorkerThread.cpp:
(WebCore::SharedWorkerThread::create):
(WebCore::SharedWorkerThread::SharedWorkerThread):
* workers/SharedWorkerThread.h:
(SharedWorkerThread):
* workers/WorkerMessagingProxy.cpp:
(WebCore::WorkerMessagingProxy::startWorkerContext):
* workers/WorkerThread.cpp:
(WebCore::WorkerThreadStartupData::create):
(WorkerThreadStartupData):
(WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
(WebCore::WorkerThread::WorkerThread):
(WebCore::WorkerThread::groupSettings):
(WebCore):
* workers/WorkerThread.h:
(WorkerThread):

Source/WebKit/chromium:

* src/WebSharedWorkerImpl.cpp:
(WebKit::WebSharedWorkerImpl::startWorkerContext):
* src/WebWorkerClientImpl.cpp:
(WebKit::WebWorkerClientImpl::startWorkerContext):

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

12 years ago[Win] jscore-tests flakey
msaboff@apple.com [Thu, 28 Jun 2012 01:14:20 +0000 (01:14 +0000)]
[Win] jscore-tests flakey
https://bugs.webkit.org/show_bug.cgi?id=88118

Reviewed by Jessie Berlin.

jsDriver.pl on windows intermittently doesn't get the returned value from jsc,
instead it gets 126.  Added a new option to jsc (-x) which prints the exit
code before exiting.  jsDriver.pl uses this option on Windows and parses the
exit code output for the exit code, removing it before comparing the actual
and expected outputs.  Filed a follow on "FIXME" defect:
[WIN] Intermittent failure for jsc return value to propagate through jsDriver.pl
https://bugs.webkit.org/show_bug.cgi?id=90119

* jsc.cpp:
(CommandLine::CommandLine):
(CommandLine):
(printUsageStatement):
(parseArguments):
(jscmain):
* tests/mozilla/jsDriver.pl:
(execute_tests):

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

12 years agoUnreviewed, rolling out r121359.
commit-queue@webkit.org [Thu, 28 Jun 2012 01:09:22 +0000 (01:09 +0000)]
Unreviewed, rolling out r121359.
http://trac.webkit.org/changeset/121359
https://bugs.webkit.org/show_bug.cgi?id=90115

Broke many inspector tests (Requested by jpfau on #webkit).

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

Source/JavaScriptCore:

* interpreter/Interpreter.h:
(JSC::StackFrame::toString):

Source/WebCore:

* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):

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

12 years agoImplement selectedOptions attribute of HTMLSelectElement.
alexis.menard@openbossa.org [Thu, 28 Jun 2012 01:05:27 +0000 (01:05 +0000)]
Implement selectedOptions attribute of HTMLSelectElement.
https://bugs.webkit.org/show_bug.cgi?id=80631

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add a new collection as a member of HTMLSelectElement which is
used to store the selected elements. Extend HTMLCollection to
support the new collection type needed by this feature. Make sure
that we invalidate the collection when the select state of an
option changes as the select state change does not trigger a dom
tree version change.

Reference : http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#dom-select-selectedoptions

Test: fast/dom/HTMLSelectElement/select-selectedOptions.html

* html/CollectionType.h:
* html/HTMLCollection.cpp:
(WebCore::shouldIncludeChildren):
(WebCore::HTMLCollection::clearCache):
(WebCore):
(WebCore::HTMLCollection::isAcceptableElement):
* html/HTMLCollection.h:
(HTMLCollection):
* html/HTMLOptionElement.cpp:
(WebCore::HTMLOptionElement::setSelectedState):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::selectedOptions):
(WebCore):
(WebCore::HTMLSelectElement::invalidateSelectedItems):
(WebCore::HTMLSelectElement::setRecalcListItems):
* html/HTMLSelectElement.h:
(WebCore):
(HTMLSelectElement):
* html/HTMLSelectElement.idl:

LayoutTests:

New tests to cover the feature.

* fast/dom/HTMLSelectElement/select-selectedOptions-expected.txt: Added.
* fast/dom/HTMLSelectElement/select-selectedOptions.html: Added.
* fast/dom/htmlcollection-non-html-expected.txt:
* fast/dom/htmlcollection-non-html.html:

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

12 years agoJavascript SHA-512 gives wrong hash on second and subsequent runs unless Web Inspecto...
fpizlo@apple.com [Thu, 28 Jun 2012 00:49:55 +0000 (00:49 +0000)]
Javascript SHA-512 gives wrong hash on second and subsequent runs unless Web Inspector Javascript Debugging is on
https://bugs.webkit.org/show_bug.cgi?id=90053
<rdar://problem/11764613>

Source/JavaScriptCore:

Reviewed by Mark Hahnenberg.

The problem is that the code was assuming that the recovery should be Undefined if the source of
the SetLocal was !shouldGenerate(). But that's wrong, since the DFG optimizer may skip around a
UInt32ToNumber node (hence making it !shouldGenerate()) and keep the source of that node alive.
In that case we should base the recovery on the source of the UInt32ToNumber. The logic for this
was already in place but the fast check for !shouldGenerate() broke it.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::computeValueRecoveryFor):

LayoutTests:

Reviewed by Mark Hahnenberg.

* fast/js/dfg-uint32-to-number-skip-then-exit-expected.txt: Added.
* fast/js/dfg-uint32-to-number-skip-then-exit.html: Added.
* fast/js/script-tests/dfg-uint32-to-number-skip-then-exit.js: Added.
(foo):

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

12 years agoFix typo in r121384 :(
dpranke@chromium.org [Thu, 28 Jun 2012 00:48:05 +0000 (00:48 +0000)]
Fix typo in r121384 :(

Unreviewed, build fix.

* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort.default_test_timeout_ms):

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

12 years ago[chromium] Rebase image mismatch caused by 121371.
hclam@chromium.org [Thu, 28 Jun 2012 00:32:02 +0000 (00:32 +0000)]
[chromium] Rebase image mismatch caused by 121371.

Rebase test results for:
platform/chromium/compositing/scrollbars/custom-composited-different-track-parts.html

Not reviewed.

* platform/chromium-linux/platform/chromium/compositing/scrollbars/custom-composited-different-track-parts-expected.png: Added.

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

12 years agoFix crash in Frame::nodeImage.
dcheng@chromium.org [Thu, 28 Jun 2012 00:09:03 +0000 (00:09 +0000)]
Fix crash in Frame::nodeImage.
https://bugs.webkit.org/show_bug.cgi?id=89911

Reviewed by Abhishek Arya.

Source/WebCore:

We were caching a pointer to a RenderObject and then calling updateLayout(). Instead, we
need to get a pointer to the RenderObject again after updateLayout().

Test: fast/events/drag-display-none-element.html

* page/Frame.cpp:
(WebCore::Frame::nodeImage):
* page/mac/FrameMac.mm:
(WebCore::Frame::snapshotDragImage):
(WebCore::Frame::nodeImage):

LayoutTests:

* fast/events/drag-display-none-element-expected.txt: Added.
* fast/events/drag-display-none-element.html: Added.

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

12 years agoUnreviewed, rolling out r121380.
tony@chromium.org [Thu, 28 Jun 2012 00:04:32 +0000 (00:04 +0000)]
Unreviewed, rolling out r121380.
http://trac.webkit.org/changeset/121380
https://bugs.webkit.org/show_bug.cgi?id=86525

Hits an ASSERT in debug.

Source/WebCore:

* css/CSSComputedStyleDeclaration.cpp:
(WebCore):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseFlex):
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty):
* css/CSSPropertyNames.in:
* css/StyleBuilder.cpp:
(ApplyPropertyFlex):
(WebCore::ApplyPropertyFlex::applyInheritValue):
(WebCore::ApplyPropertyFlex::applyInitialValue):
(WebCore::ApplyPropertyFlex::applyValue):
(WebCore::ApplyPropertyFlex::createHandler):
(WebCore::ApplyPropertyFlex::getFlexValue):
(WebCore):
(WebCore::StyleBuilder::StyleBuilder):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue):
(WebCore::StylePropertySet::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitFlexFlowShorthand):
(WebCore::shorthandForProperty):
* css/StylePropertyShorthand.h:
(WebCore):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

LayoutTests:

* css3/flexbox/flex-longhand-parsing-expected.txt: Removed.
* css3/flexbox/flex-longhand-parsing.html: Removed.
* css3/flexbox/flex-property-parsing-expected.txt:
* css3/flexbox/flex-property-parsing.html:
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js:
* svg/css/getComputedStyle-basic-expected.txt:

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

12 years agoHTMLFieldSetElement::m_documentVersion is not initialized
commit-queue@webkit.org [Wed, 27 Jun 2012 23:53:16 +0000 (23:53 +0000)]
HTMLFieldSetElement::m_documentVersion is not initialized
https://bugs.webkit.org/show_bug.cgi?id=90038

Patch by Rakesh KN <rakesh.kn@motorola.com> on 2012-06-27
Reviewed by Kent Tamura.

Initialised m_documentVersion member as HTMLFieldSetElement::elements can return an wrong collection.

Covered by existing tests.

* html/HTMLFieldSetElement.cpp:
(WebCore::HTMLFieldSetElement::HTMLFieldSetElement):
Initialised m_documentVersion.

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

12 years ago[Mac] Fix test expectation introduced in r121299
jpfau@apple.com [Wed, 27 Jun 2012 23:50:13 +0000 (23:50 +0000)]
[Mac] Fix test expectation introduced in r121299

Unreviewed.

* platform/mac/editing/spelling/autocorrection-blockquote-crash-expected.txt:

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

12 years agonrwt: default timeout for debug bots broke in r121363
dpranke@chromium.org [Wed, 27 Jun 2012 23:49:47 +0000 (23:49 +0000)]
nrwt: default timeout for debug bots broke in r121363
https://bugs.webkit.org/show_bug.cgi?id=90112

Unreviewed, build fix.

I forgot to account for release and debug having different
default values :(.

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort.default_test_timeout_ms):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort):
(WebKitPort.default_test_timeout_ms):
* Scripts/webkitpy/layout_tests/port/webkit_unittest.py:
(WebKitPortUnitTests.test_default_options):

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

12 years ago[chromium] Rebase image mismatch caused by 121371.
hclam@chromium.org [Wed, 27 Jun 2012 23:27:48 +0000 (23:27 +0000)]
[chromium] Rebase image mismatch caused by 121371.

Rebase test results for:
platform/chromium/compositing/scrollbars/custom-composited-different-track-parts.html

Not reviewed.

* platform/chromium-mac-snowleopard/platform/chromium/compositing/scrollbars/custom-composited-different-track-parts-expected.png: Added.
* platform/chromium-mac/platform/chromium/compositing/scrollbars/custom-composited-different-track-parts-expected.png: Added.
* platform/chromium-win/platform/chromium/compositing/scrollbars/custom-composited-different-track-parts-expected.png: Added.

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

12 years agoDFG disassembly should be easier to read
fpizlo@apple.com [Wed, 27 Jun 2012 23:16:10 +0000 (23:16 +0000)]
DFG disassembly should be easier to read
https://bugs.webkit.org/show_bug.cgi?id=90106

Reviewed by Mark Hahnenberg.

Did a few things:

- Options::showDFGDisassembly now shows OSR exit disassembly as well.

- Phi node dumping doesn't attempt to do line wrapping since it just made the dump harder
  to read.

- DFG graph disassembly view shows a few additional node types that turn out to be
  essential for understanding OSR exits.

Put together, these changes reinforce the philosophy that anything needed for computing
OSR exit is just as important as the machine code itself. Of course, we still don't take
that philosophy to its full extreme - for example Phantom nodes are not dumped. We may
revisit that in the future.

* assembler/LinkBuffer.cpp:
(JSC::LinkBuffer::finalizeCodeWithDisassembly):
* assembler/LinkBuffer.h:
(JSC):
* dfg/DFGDisassembler.cpp:
(JSC::DFG::Disassembler::dump):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dumpBlockHeader):
* dfg/DFGNode.h:
(JSC::DFG::Node::willHaveCodeGenOrOSR):
* dfg/DFGOSRExitCompiler.cpp:
* jit/JIT.cpp:
(JSC::JIT::privateCompile):

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

12 years agoJSLock should be per-JSGlobalData
mhahnenberg@apple.com [Wed, 27 Jun 2012 23:08:26 +0000 (23:08 +0000)]
JSLock should be per-JSGlobalData
https://bugs.webkit.org/show_bug.cgi?id=89123

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* API/APIShims.h:
(APIEntryShimWithoutLock):
(JSC::APIEntryShimWithoutLock::APIEntryShimWithoutLock): Added an extra parameter to the constructor to
determine whether we should ref the JSGlobalData or not. We want to ref all the time except for in the
HeapTimer class because timerDidFire could run after somebody has started to tear down that particular
JSGlobalData, so we wouldn't want to resurrect the ref count of that JSGlobalData from 0 back to 1 after
its destruction has begun.
(JSC::APIEntryShimWithoutLock::~APIEntryShimWithoutLock):
(JSC::APIEntryShim::APIEntryShim):
(APIEntryShim):
(JSC::APIEntryShim::~APIEntryShim):
(JSC::APIEntryShim::init): Factored out common initialization code for the various APIEntryShim constructors.
Also moved the timeoutChecker stop and start here because we need to start after we've grabbed the API lock
and before we've released it, which can only done in APIEntryShim.
(JSC::APICallbackShim::~APICallbackShim): We no longer need to synchronize here.
* API/JSContextRef.cpp:
(JSGlobalContextCreate):
(JSGlobalContextCreateInGroup):
(JSGlobalContextRelease):
(JSContextCreateBacktrace):
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* heap/CopiedSpace.cpp:
(JSC::CopiedSpace::tryAllocateSlowCase):
* heap/Heap.cpp:
(JSC::Heap::protect):
(JSC::Heap::unprotect):
(JSC::Heap::collect):
(JSC::Heap::setActivityCallback):
(JSC::Heap::activityCallback):
(JSC::Heap::sweeper):
* heap/Heap.h: Changed m_activityCallback and m_sweeper to be raw pointers rather than OwnPtrs because they
are now responsible for their own lifetime. Also changed the order of declaration of the GCActivityCallback
and the IncrementalSweeper to make sure they're the last things that get initialized during construction to
prevent any issues with uninitialized memory in the JSGlobalData/Heap they might care about.
(Heap):
* heap/HeapTimer.cpp: Refactored to allow for thread-safe operation and shutdown.
(JSC::HeapTimer::~HeapTimer):
(JSC::HeapTimer::invalidate):
(JSC):
(JSC::HeapTimer::didStartVMShutdown): Called at the beginning of ~JSGlobalData. If we're on the same thread
that the HeapTimer is running on, we kill the HeapTimer ourselves. If not, then we set some state in the
HeapTimer and schedule it to fire immediately so that it can notice and kill itself.
(JSC::HeapTimer::timerDidFire): We grab our mutex and check our JSGlobalData pointer. If it has been zero-ed
out, then we know the VM has started to shutdown and we should kill ourselves. Otherwise, grab the APIEntryShim,
but without ref-ing the JSGlobalData (we don't want to bring the JSGlobalData's ref-count from 0 to 1) in case
we were interrupted between releasing our mutex and trying to grab the APILock.
* heap/HeapTimer.h:
(HeapTimer):
* heap/IncrementalSweeper.cpp:
(JSC::IncrementalSweeper::doWork): We no longer need the API shim here since HeapTimer::timerDidFire handles
all of that for us.
(JSC::IncrementalSweeper::create):
* heap/IncrementalSweeper.h:
(IncrementalSweeper):
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::allocateSlowCase):
* heap/WeakBlock.cpp:
(JSC::WeakBlock::reap):
* jsc.cpp:
(functionGC):
(functionReleaseExecutableMemory):
(jscmain):
* runtime/Completion.cpp:
(JSC::checkSyntax):
(JSC::evaluate):
* runtime/GCActivityCallback.h:
(DefaultGCActivityCallback):
(JSC::DefaultGCActivityCallback::create):
* runtime/JSGlobalData.cpp:
(JSC::JSGlobalData::JSGlobalData):
(JSC::JSGlobalData::~JSGlobalData): Signals to the two HeapTimers (GCActivityCallback and IncrementalSweeper)
that the VM has started shutting down. It then waits until the HeapTimer is done with whatever activity
it needs to do before continuing with any further destruction. Also asserts that we do not currently hold the
APILock because this could potentially cause deadlock when we try to signal to the HeapTimers using their mutexes.
(JSC::JSGlobalData::sharedInstance): Protect the initialization for the shared instance with the GlobalJSLock.
(JSC::JSGlobalData::sharedInstanceInternal):
* runtime/JSGlobalData.h: Change to be ThreadSafeRefCounted so that we don't have to worry about refing and
de-refing JSGlobalDatas on separate threads since we don't do it that often anyways.
(JSGlobalData):
(JSC::JSGlobalData::apiLock):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::~JSGlobalObject):
(JSC::JSGlobalObject::init):
* runtime/JSLock.cpp:
(JSC):
(JSC::GlobalJSLock::GlobalJSLock): For accessing the shared instance.
(JSC::GlobalJSLock::~GlobalJSLock):
(JSC::JSLockHolder::JSLockHolder): MutexLocker for JSLock. Also refs the JSGlobalData to keep it alive so that
it can successfully unlock it later without it disappearing from underneath it.
(JSC::JSLockHolder::~JSLockHolder):
(JSC::JSLock::JSLock):
(JSC::JSLock::~JSLock):
(JSC::JSLock::lock): Uses the spin lock for guarding the lock count and owner thread fields. Uses the mutex for
actually waiting for long periods.
(JSC::JSLock::unlock):
(JSC::JSLock::currentThreadIsHoldingLock):
(JSC::JSLock::dropAllLocks):
(JSC::JSLock::dropAllLocksUnconditionally):
(JSC::JSLock::grabAllLocks):
(JSC::JSLock::DropAllLocks::DropAllLocks):
(JSC::JSLock::DropAllLocks::~DropAllLocks):
* runtime/JSLock.h:
(JSC):
(GlobalJSLock):
(JSLockHolder):
(JSLock):
(DropAllLocks):
* runtime/WeakGCMap.h:
(JSC::WeakGCMap::set):
* testRegExp.cpp:
(realMain):

Source/WebCore:

No new tests. Current regression tests are sufficient.

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* bindings/js/GCController.cpp:
(WebCore::collect):
(WebCore::GCController::garbageCollectSoon):
(WebCore::GCController::garbageCollectNow):
(WebCore::GCController::discardAllCompiledCode):
* bindings/js/JSCustomSQLStatementErrorCallback.cpp:
(WebCore::JSSQLStatementErrorCallback::handleEvent):
* bindings/js/JSCustomVoidCallback.cpp:
(WebCore::JSCustomVoidCallback::handleEvent):
* bindings/js/JSCustomXPathNSResolver.cpp:
(WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
* bindings/js/JSErrorHandler.cpp:
(WebCore::JSErrorHandler::handleEvent):
* bindings/js/JSEventCustom.cpp:
(WebCore::toJS):
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent):
* bindings/js/JSInjectedScriptHostCustom.cpp:
(WebCore::InjectedScriptHost::nodeAsScriptValue):
(WebCore::JSInjectedScriptHost::inspectedObject):
* bindings/js/JSInjectedScriptManager.cpp:
(WebCore::InjectedScriptManager::createInjectedScript):
(WebCore::InjectedScriptManager::canAccessInspectedWindow):
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::initializeJSFunction):
* bindings/js/JSMainThreadExecState.h:
(WebCore::JSMainThreadExecState::evaluate):
* bindings/js/JSMutationCallbackCustom.cpp:
(WebCore::JSMutationCallback::handleEvent):
* bindings/js/JSNodeFilterCondition.cpp:
(WebCore::JSNodeFilterCondition::acceptNode):
* bindings/js/JSRequestAnimationFrameCallbackCustom.cpp:
(WebCore::JSRequestAnimationFrameCallback::handleEvent):
* bindings/js/JavaScriptCallFrame.cpp:
(WebCore::JavaScriptCallFrame::evaluate):
* bindings/js/PageScriptDebugServer.cpp:
(WebCore::PageScriptDebugServer::recompileAllJSFunctions):
* bindings/js/ScheduledAction.cpp:
(WebCore::ScheduledAction::executeFunctionInContext):
* bindings/js/ScriptCachedFrameData.cpp:
(WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
(WebCore::ScriptCachedFrameData::restore):
(WebCore::ScriptCachedFrameData::clear):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::clearWindowShell):
(WebCore::ScriptController::initScript):
(WebCore::ScriptController::updateDocument):
(WebCore::ScriptController::cacheableBindingRootObject):
(WebCore::ScriptController::bindingRootObject):
(WebCore::ScriptController::windowScriptNPObject):
(WebCore::ScriptController::jsObjectForPluginElement):
(WebCore::ScriptController::clearScriptObjects):
* bindings/js/ScriptControllerMac.mm:
(WebCore::ScriptController::windowScriptObject):
* bindings/js/ScriptDebugServer.cpp:
(WebCore::ScriptDebugServer::dispatchDidPause):
* bindings/js/ScriptEventListener.cpp:
(WebCore::eventListenerHandlerBody):
(WebCore::eventListenerHandlerLocation):
* bindings/js/ScriptFunctionCall.cpp:
(WebCore::ScriptCallArgumentHandler::appendArgument):
(WebCore::ScriptFunctionCall::call):
(WebCore::ScriptFunctionCall::construct):
(WebCore::ScriptCallback::call):
* bindings/js/ScriptObject.cpp:
(WebCore::ScriptGlobalObject::set):
(WebCore::ScriptGlobalObject::get):
(WebCore::ScriptGlobalObject::remove):
* bindings/js/ScriptValue.cpp:
(WebCore::ScriptValue::getString):
(WebCore::ScriptValue::toInspectorValue):
* bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::~WorkerScriptController):
(WebCore::WorkerScriptController::initScript):
(WebCore::WorkerScriptController::evaluate):
(WebCore::WorkerScriptController::disableEval):
* bindings/objc/WebScriptObject.mm:
(_didExecute):
(-[WebScriptObject callWebScriptMethod:withArguments:]):
(-[WebScriptObject evaluateWebScript:]):
(-[WebScriptObject setValue:forKey:]):
(-[WebScriptObject valueForKey:]):
(-[WebScriptObject removeWebScriptKey:]):
(-[WebScriptObject hasWebScriptKey:]):
(-[WebScriptObject stringRepresentation]):
(-[WebScriptObject webScriptValueAtIndex:]):
(-[WebScriptObject setWebScriptValueAtIndex:value:]):
(+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateCallbackImplementation):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallback::callbackWithNoParam):
(WebCore::JSTestCallback::callbackWithClass1Param):
(WebCore::JSTestCallback::callbackWithClass2Param):
(WebCore::JSTestCallback::callbackWithStringList):
(WebCore::JSTestCallback::callbackWithBoolean):
(WebCore::JSTestCallback::callbackRequiresThisToPass):
* bridge/NP_jsobject.cpp:
(_NPN_InvokeDefault):
(_NPN_Invoke):
(_NPN_Evaluate):
(_NPN_GetProperty):
(_NPN_SetProperty):
(_NPN_RemoveProperty):
(_NPN_HasProperty):
(_NPN_HasMethod):
(_NPN_Enumerate):
(_NPN_Construct):
* bridge/c/c_class.cpp:
(JSC::Bindings::CClass::~CClass):
(JSC::Bindings::CClass::methodsNamed):
(JSC::Bindings::CClass::fieldNamed):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
(JSC::Bindings::CInstance::invokeMethod):
(JSC::Bindings::CInstance::invokeDefaultMethod):
(JSC::Bindings::CInstance::invokeConstruct):
(JSC::Bindings::CInstance::getPropertyNames):
* bridge/c/c_runtime.cpp:
(JSC::Bindings::CField::valueFromInstance):
(JSC::Bindings::CField::setValueToInstance):
* bridge/c/c_utility.cpp:
(JSC::Bindings::convertValueToNPVariant):
(JSC::Bindings::convertNPVariantToValue):
* bridge/jni/jni_jsobject.mm:
(JavaJSObject::call):
(JavaJSObject::eval):
(JavaJSObject::getMember):
(JavaJSObject::setMember):
(JavaJSObject::removeMember):
(JavaJSObject::getSlot):
(JavaJSObject::setSlot):
(JavaJSObject::toString):
(JavaJSObject::convertValueToJObject):
(JavaJSObject::convertJObjectToValue):
* bridge/jni/jni_objc.mm:
(JSC::Bindings::dispatchJNICall):
* bridge/jni/jsc/JNIUtilityPrivate.cpp:
(JSC::Bindings::convertValueToJValue):
* bridge/jni/jsc/JavaClassJSC.cpp:
(JavaClass::JavaClass):
(JavaClass::~JavaClass):
* bridge/jni/jsc/JavaInstanceJSC.cpp:
(JavaInstance::stringValue):
* bridge/jni/jsc/JavaMethodJSC.cpp:
(appendClassName):
(JavaMethod::signature):
* bridge/jni/jsc/JavaStringJSC.h:
(JSC::Bindings::JavaString::JavaString):
(JSC::Bindings::JavaString::~JavaString):
(JSC::Bindings::JavaString::utf8):
(JSC::Bindings::JavaString::init):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
(JSC::Bindings::Instance::newRuntimeObject):
* bridge/objc/objc_instance.mm:
(ObjcInstance::moveGlobalExceptionToExecState):
(ObjcInstance::invokeObjcMethod):
(ObjcInstance::invokeDefaultMethod):
(ObjcInstance::setValueOfUndefinedField):
(ObjcInstance::getValueOfUndefinedField):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcField::valueFromInstance):
(JSC::Bindings::ObjcField::setValueToInstance):
* bridge/objc/objc_utility.mm:
(JSC::Bindings::convertValueToObjcValue):
(JSC::Bindings::convertNSStringToString):
(JSC::Bindings::convertObjcValueToValue):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtInstance::~QtInstance):
(JSC::Bindings::QtInstance::getQtInstance):
(JSC::Bindings::QtInstance::newRuntimeObject):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapInstance::createPixmapRuntimeObject):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):
(JSC::Bindings::QtRuntimeMetaMethod::call):
(JSC::Bindings::QtRuntimeConnectionMethod::call):
* bridge/qt/qt_runtime_qt4.cpp:
(JSC::Bindings::convertValueToQVariant):
(JSC::Bindings::convertQVariantToValue):
(JSC::Bindings::QtRuntimeMetaMethod::call):
(JSC::Bindings::QtRuntimeConnectionMethod::call):
* bridge/runtime_root.cpp:
(JSC::Bindings::RootObject::gcProtect):
(JSC::Bindings::RootObject::gcUnprotect):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createImageBuffer):
* html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::notifyFinished):
* plugins/PluginView.cpp:
(WebCore::PluginView::start):
(WebCore::PluginView::stop):
(WebCore::PluginView::performRequest):
(WebCore::PluginView::npObject):
(WebCore::PluginView::privateBrowsingStateChanged):
* plugins/blackberry/PluginViewBlackBerry.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::platformStart):
(WebCore::PluginView::getWindowInfo):
* plugins/efl/PluginViewEfl.cpp:
(WebCore::PluginView::dispatchNPEvent):
* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::platformStart):
* plugins/mac/PluginViewMac.mm:
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::dispatchNPEvent):
* plugins/qt/PluginViewQt.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::setNPWindowIfNeeded):
(WebCore::PluginView::platformStart):
* plugins/win/PluginViewWin.cpp:
(WebCore::PluginView::dispatchNPEvent):
(WebCore::PluginView::handleKeyboardEvent):
(WebCore::PluginView::handleMouseEvent):
(WebCore::PluginView::setNPWindowRect):
* testing/js/WebCoreTestSupport.cpp:
(WebCoreTestSupport::injectInternalsObject):
(WebCoreTestSupport::resetInternalsObject):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::dropProtection):

Source/WebKit/blackberry:

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* Api/BlackBerryGlobal.cpp:
(BlackBerry::WebKit::clearMemoryCaches):
* WebCoreSupport/ClientExtension.cpp:
* WebCoreSupport/PagePopupBlackBerry.cpp:
(WebCore::PagePopupBlackBerry::installDomFunction):
* WebKitSupport/DumpRenderTreeSupport.cpp:
(DumpRenderTreeSupport::computedStyleIncludingVisitedInfo):

Source/WebKit/efl:

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* ewk/ewk_frame.cpp:
(ewk_frame_script_execute):
* ewk/ewk_view.cpp:
(ewk_view_js_object_add):

Source/WebKit/gtk:

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::gcCountJavascriptObjects):

Source/WebKit/mac:

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* DOM/WebDOMOperations.mm:
(JSC):
* Misc/WebCoreStatistics.mm:
(+[WebCoreStatistics javaScriptObjectsCount]):
(+[WebCoreStatistics javaScriptGlobalObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
(+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
(+[WebCoreStatistics javaScriptObjectTypeCounts]):
(+[WebCoreStatistics shouldPrintExceptions]):
(+[WebCoreStatistics setShouldPrintExceptions:]):
(+[WebCoreStatistics memoryStatistics]):
(+[WebCoreStatistics javaScriptReferencedObjectsCount]):
* Plugins/Hosted/NetscapePluginInstanceProxy.mm:
(WebKit::NetscapePluginInstanceProxy::evaluate):
(WebKit::NetscapePluginInstanceProxy::invoke):
(WebKit::NetscapePluginInstanceProxy::invokeDefault):
(WebKit::NetscapePluginInstanceProxy::construct):
(WebKit::NetscapePluginInstanceProxy::getProperty):
(WebKit::NetscapePluginInstanceProxy::setProperty):
(WebKit::NetscapePluginInstanceProxy::removeProperty):
(WebKit::NetscapePluginInstanceProxy::hasMethod):
(WebKit::NetscapePluginInstanceProxy::enumerate):
(WebKit::NetscapePluginInstanceProxy::addValueToArray):
(WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
* Plugins/WebNetscapePluginStream.mm:
(WebNetscapePluginStream::wantsAllStreams):
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView sendEvent:isDrawRect:]):
(-[WebNetscapePluginView privateBrowsingModeDidChange]):
(-[WebNetscapePluginView setWindowIfNecessary]):
(-[WebNetscapePluginView createPluginScriptableObject]):
(-[WebNetscapePluginView getFormValue:]):
(-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
(-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
(-[WebNetscapePluginView loadPluginRequest:]):
(-[WebNetscapePluginView _printedPluginBitmap]):
* Plugins/WebPluginController.mm:
(+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
(-[WebPluginController stopOnePlugin:]):
(-[WebPluginController destroyOnePlugin:]):
(-[WebPluginController startAllPlugins]):
(-[WebPluginController addPlugin:]):
* WebView/WebFrame.mm:
(-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
(-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
* WebView/WebScriptDebugDelegate.mm:
(-[WebScriptCallFrame scopeChain]):
(-[WebScriptCallFrame evaluateWebScript:]):
* WebView/WebView.mm:
(+[WebView _reportException:inContext:]):
(-[WebView aeDescByEvaluatingJavaScriptFromString:]):
(-[WebView _computedStyleIncludingVisitedInfo:forElement:]):

Source/WebKit/qt:

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* Api/qwebframe.cpp:
(QWebFramePrivate::addQtSenderToGlobalObject):
(QWebFrame::addToJavaScriptWindowObject):
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::injectInternalsObject):
(DumpRenderTreeSupportQt::resetInternalsObject):

Source/WebKit/win:

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* WebCoreStatistics.cpp:
(WebCoreStatistics::javaScriptObjectsCount):
(WebCoreStatistics::javaScriptGlobalObjectsCount):
(WebCoreStatistics::javaScriptProtectedObjectsCount):
(WebCoreStatistics::javaScriptProtectedGlobalObjectsCount):
(WebCoreStatistics::javaScriptProtectedObjectTypeCounts):
* WebFrame.cpp:
(WebFrame::stringByEvaluatingJavaScriptInScriptWorld):
* WebJavaScriptCollector.cpp:
(WebJavaScriptCollector::objectCount):
* WebView.cpp:
(WebView::stringByEvaluatingJavaScriptFromString):
(WebView::reportException):
(WebView::elementFromJS):

Source/WebKit2:

Changed all sites that used JSLock to instead use the new JSLockHolder
and pass in the correct JS context that the code is about to interact with that
needs protection. Also added a couple JSLocks to places that didn't already
have it that needed it.

* Shared/mac/WebMemorySampler.mac.mm:
(WebKit::WebMemorySampler::sampleWebKit):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::javaScriptObjectsCount):
(WebKit::InjectedBundle::reportException):
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::callMethod):
(WebKit::JSNPObject::callObject):
(WebKit::JSNPObject::callConstructor):
(WebKit::JSNPObject::put):
(WebKit::JSNPObject::deleteProperty):
(WebKit::JSNPObject::getOwnPropertyNames):
(WebKit::JSNPObject::propertyGetter):
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
(WebKit::NPJSObject::hasMethod):
(WebKit::NPJSObject::invoke):
(WebKit::NPJSObject::invokeDefault):
(WebKit::NPJSObject::hasProperty):
(WebKit::NPJSObject::getProperty):
(WebKit::NPJSObject::setProperty):
(WebKit::NPJSObject::removeProperty):
(WebKit::NPJSObject::enumerate):
(WebKit::NPJSObject::construct):
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
(WebKit::NPRuntimeObjectMap::evaluate):
(WebKit::NPRuntimeObjectMap::moveGlobalExceptionToExecState):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::jsWrapperForWorld):
(WebKit::WebFrame::computedStyleIncludingVisitedInfo):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runJavaScriptInMainFrame):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::getWebCoreStatistics):

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

12 years agoSplit flex into flex-grow/flex-shrink/flex-basis
tony@chromium.org [Wed, 27 Jun 2012 23:05:19 +0000 (23:05 +0000)]
Split flex into flex-grow/flex-shrink/flex-basis
https://bugs.webkit.org/show_bug.cgi?id=86525

Reviewed by Ojan Vafai.

Source/WebCore:

Split flex into 3 separate properties per the spec:
http://dev.w3.org/csswg/css3-flexbox/#flex-components

Tests: css3/flexbox/flex-longhand-parsing.html
       css3/flexbox/flex-property-parsing.html: Updated test results.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore): -webkit-flex is no longer enumerable.
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Add new css property names and use
getCSSPropertyValuesForShorthandProperties for WebkitFlex. Also sort flex propery names.
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): Fix indent.
(WebCore::CSSParser::parseValue): Add parsing for new properties and handle -webkit-flex: none.
(WebCore::CSSParser::parseFlex): Switch to new names (positive -> grow, negative -> shrink,
preferred size -> basis) and assign to longhand properties.
* css/CSSParser.h:
* css/CSSProperty.cpp:
(WebCore::CSSProperty::isInheritedProperty): Add new properties.
* css/CSSPropertyNames.in: Add new properties.
* css/StyleBuilder.cpp:
(WebCore::StyleBuilder::StyleBuilder): Delete special handling of applying flex and just use shorthand handlers.
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::getPropertyValue): Add new shorthand.
(WebCore::StylePropertySet::asText):
* css/StylePropertyShorthand.cpp:
(WebCore::webkitFlexShorthand): Add new shorthand.
(WebCore::shorthandForProperty):
* css/StylePropertyShorthand.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList): Add to list of properties applied by StyleBuilder.

LayoutTests:

If -webkit-flex is set to none, when the user reads the value back out, it is
now 0 0 auto. 'none' is for convenience, not an actual value.

* css3/flexbox/flex-longhand-parsing-expected.txt:
* css3/flexbox/flex-longhand-parsing.html: Test flex-grow, flex-shrink and flex-basis.
* css3/flexbox/flex-property-parsing-expected.txt:
* css3/flexbox/flex-property-parsing.html: Update results for 'none'.
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/getComputedStyle/resources/property-names.js: Remove -webkit-flex since it's no longer enumerable.
* svg/css/getComputedStyle-basic-expected.txt:

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

12 years agoMake Element::elementRareData() and Element::ensureElementRareData() private
haraken@chromium.org [Wed, 27 Jun 2012 22:51:47 +0000 (22:51 +0000)]
Make Element::elementRareData() and Element::ensureElementRareData() private
https://bugs.webkit.org/show_bug.cgi?id=90060

Reviewed by Andreas Kling.

This is a simple refactoring. Element::elementRareData() and
Element::ensureElementRareData() can be private methods.

No tests. No change in behavior.

* dom/Element.h:
(Element):

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

12 years ago[chromium] Delete unused includes and forward declarations from compositor code
jamesr@google.com [Wed, 27 Jun 2012 22:16:49 +0000 (22:16 +0000)]
[chromium] Delete unused includes and forward declarations from compositor code
https://bugs.webkit.org/show_bug.cgi?id=90102

Reviewed by Adrienne Walker.

* platform/graphics/chromium/BitmapCanvasLayerTextureUpdater.cpp:
* platform/graphics/chromium/CanvasLayerTextureUpdater.cpp:
* platform/graphics/chromium/ContentLayerChromium.h:
* platform/graphics/chromium/ImageLayerChromium.cpp:
* platform/graphics/chromium/LayerChromium.cpp:
* platform/graphics/chromium/LayerChromium.h:
* platform/graphics/chromium/LayerRendererChromium.cpp:
* platform/graphics/chromium/ShaderChromium.h:
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateTiles):
* platform/graphics/chromium/cc/CCLayerAnimationController.cpp:
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:

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

12 years agoIndexedDB: make IDBKey immutable
commit-queue@webkit.org [Wed, 27 Jun 2012 22:13:53 +0000 (22:13 +0000)]
IndexedDB: make IDBKey immutable
https://bugs.webkit.org/show_bug.cgi?id=90016

Patch by Alec Flett <alecflett@chromium.org> on 2012-06-27
Reviewed by Tony Chang.

Make all members of IDBKey const, so that this can be considered
an immutable, and thus safe to copy and/or stop ref-counting.

No new tests, existing tests show this works.

* Modules/indexeddb/IDBKey.cpp:
(WebCore::IDBKey::compare):
* Modules/indexeddb/IDBKey.h:
(WebCore::IDBKey::createInvalid):
(WebCore::IDBKey::createNumber):
(WebCore::IDBKey::createString):
(WebCore::IDBKey::createDate):
(WebCore::IDBKey::createMultiEntryArray):
(WebCore::IDBKey::createArray):
(WebCore::IDBKey::date):
(WebCore::IDBKey::IDBKey):
(IDBKey):

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

12 years ago[V8] Improve variable resolution order on window
arv@chromium.org [Wed, 27 Jun 2012 22:00:55 +0000 (22:00 +0000)]
[V8] Improve variable resolution order on window
https://bugs.webkit.org/show_bug.cgi?id=84247

Reviewed by Ojan Vafai.

This changes the V8 flag to turn on es52_globals and updates the layout tests to reflect the fixed behavior.

This is the second (third?) try. Last time there was a bug in the V8 code related to the split window.
I added a test that tests the failure that caused this to be rolled back last time.

Source/WebCore:

Tests: fast/dom/Window/es52-globals.html
       fast/dom/Window/window-property-shadowing-onclick.html

* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::V8DOMWindowShell::initContextIfNeeded):
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::initIsolate):

LayoutTests:

* fast/dom/Window/es52-globals-expected.txt: Added.
* fast/dom/Window/es52-globals.html: Added.
* fast/dom/Window/window-property-shadowing-onclick-expected.txt: Added.
* fast/dom/Window/window-property-shadowing-onclick.html: Added.
* platform/chromium/fast/dom/Window/es52-globals-expected.txt: Added.
* platform/chromium/fast/dom/Window/window-property-shadowing-name-expected.txt: Added.
* platform/chromium/fast/dom/Window/window-property-shadowing-onclick-expected.txt: Added.

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

12 years ago[chromium] Use categorized TRACE_EVENTN() macros in compositor code
jamesr@google.com [Wed, 27 Jun 2012 21:50:49 +0000 (21:50 +0000)]
[chromium] Use categorized TRACE_EVENTN() macros in compositor code
https://bugs.webkit.org/show_bug.cgi?id=90100

Reviewed by Adrienne Walker.

Specify the category in all traces in the compositor. Patch generated mostly by the sed command
's/TRACE_EVENT(\(.*\), this, 0)/TRACE_EVENT0("cc", \1)/'.

* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::beginDrawingFrame):
(WebCore::LayerRendererChromium::finish):
(WebCore::LayerRendererChromium::swapBuffers):
(WebCore::LayerRendererChromium::initializeSharedObjects):
(WebCore::LayerRendererChromium::tileCheckerboardProgram):
(WebCore::LayerRendererChromium::solidColorProgram):
(WebCore::LayerRendererChromium::headsUpDisplayProgram):
(WebCore::LayerRendererChromium::renderPassProgram):
(WebCore::LayerRendererChromium::renderPassProgramAA):
(WebCore::LayerRendererChromium::renderPassMaskProgram):
(WebCore::LayerRendererChromium::renderPassMaskProgramAA):
(WebCore::LayerRendererChromium::tileProgram):
(WebCore::LayerRendererChromium::tileProgramOpaque):
(WebCore::LayerRendererChromium::tileProgramAA):
(WebCore::LayerRendererChromium::tileProgramSwizzle):
(WebCore::LayerRendererChromium::tileProgramSwizzleOpaque):
(WebCore::LayerRendererChromium::tileProgramSwizzleAA):
(WebCore::LayerRendererChromium::textureProgram):
(WebCore::LayerRendererChromium::textureProgramFlip):
(WebCore::LayerRendererChromium::textureIOSurfaceProgram):
(WebCore::LayerRendererChromium::videoYUVProgram):
(WebCore::LayerRendererChromium::videoStreamTextureProgram):
* platform/graphics/chromium/LayerTextureSubImage.cpp:
(WebCore::LayerTextureSubImage::uploadWithTexSubImage):
(WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
* platform/graphics/chromium/SkPictureCanvasLayerTextureUpdater.cpp:
(WebCore::SkPictureCanvasLayerTextureUpdater::drawPicture):
* platform/graphics/chromium/TextureCopier.cpp:
(WebCore::AcceleratedTextureCopier::copyTexture):
* platform/graphics/chromium/TextureManager.cpp:
(WebCore::TextureManager::evictTexture):
* platform/graphics/chromium/cc/CCFrameRateController.cpp:
(WebCore::CCFrameRateController::setActive):
(WebCore::CCFrameRateController::onTimerTick):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::initialize):
(WebCore::CCLayerTreeHost::~CCLayerTreeHost):
(WebCore::CCLayerTreeHost::initializeLayerRenderer):
(WebCore::CCLayerTreeHost::beginCommitOnImplThread):
(WebCore::CCLayerTreeHost::didLoseContext):
(WebCore::CCLayerTreeHost::updateLayers):
(WebCore::CCLayerTreeHost::animateLayers):
* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp:
(WebCore::CCSingleThreadProxy::CCSingleThreadProxy):
(WebCore::CCSingleThreadProxy::~CCSingleThreadProxy):
(WebCore::CCSingleThreadProxy::compositeAndReadback):
(WebCore::CCSingleThreadProxy::stop):
* platform/graphics/chromium/cc/CCThreadProxy.cpp:
(WebCore::CCThreadProxy::CCThreadProxy):
(WebCore::CCThreadProxy::~CCThreadProxy):
(WebCore::CCThreadProxy::compositeAndReadback):
(WebCore::CCThreadProxy::initializeContext):
(WebCore::CCThreadProxy::initializeLayerRenderer):
(WebCore::CCThreadProxy::setNeedsAnimate):
(WebCore::CCThreadProxy::setNeedsCommit):
(WebCore::CCThreadProxy::onSwapBuffersCompleteOnImplThread):
(WebCore::CCThreadProxy::setNeedsCommitOnImplThread):
(WebCore::CCThreadProxy::setNeedsForcedCommitOnImplThread):
(WebCore::CCThreadProxy::postAnimationEventsToMainThreadOnImplThread):
(WebCore::CCThreadProxy::setNeedsRedraw):
(WebCore::CCThreadProxy::setNeedsRedrawOnImplThread):
(WebCore::CCThreadProxy::stop):
(WebCore::CCThreadProxy::finishAllRenderingOnImplThread):
(WebCore::CCThreadProxy::beginFrame):
(WebCore::CCThreadProxy::beginFrameCompleteOnImplThread):
(WebCore::CCThreadProxy::scheduledActionUpdateMoreResources):
(WebCore::CCThreadProxy::scheduledActionCommit):
(WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
(WebCore::CCThreadProxy::acquireLayerTextures):
(WebCore::CCThreadProxy::initializeImplOnImplThread):
(WebCore::CCThreadProxy::initializeContextOnImplThread):
(WebCore::CCThreadProxy::initializeLayerRendererOnImplThread):
(WebCore::CCThreadProxy::layerTreeHostClosedOnImplThread):

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

12 years agox86 disassembler confuses immediates with addresses
fpizlo@apple.com [Wed, 27 Jun 2012 21:45:08 +0000 (21:45 +0000)]
x86 disassembler confuses immediates with addresses
https://bugs.webkit.org/show_bug.cgi?id=90099

Reviewed by Mark Hahnenberg.

Prepend "$" to immediates to disambiguate between immediates and addresses. This is in
accordance with the gas and AT&T syntax.

* disassembler/udis86/udis86_syn-att.c:
(gen_operand):

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

12 years agowebkitpy: fix a couple of issues running under cygwin
dpranke@chromium.org [Wed, 27 Jun 2012 21:25:33 +0000 (21:25 +0000)]
webkitpy: fix a couple of issues running under cygwin
https://bugs.webkit.org/show_bug.cgi?id=90035

Reviewed by Eric Seidel.

These were causing unit tests to fail on cygwin (apple win bot).

* Scripts/webkitpy/layout_tests/port/chromium.py:
* Scripts/webkitpy/performance_tests/perftest.py:

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

12 years agoAdd a comment clarifying Options::showDisassembly versus Options::showDFGDisassembly.
fpizlo@apple.com [Wed, 27 Jun 2012 21:25:23 +0000 (21:25 +0000)]
Add a comment clarifying Options::showDisassembly versus Options::showDFGDisassembly.

Rubber stamped by Mark Hahnenberg.

* runtime/Options.cpp:
(JSC::Options::initializeOptions):

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

12 years ago[chromium] ScrollbarLayerChromium should support painting forward-track and back...
wjmaclean@chromium.org [Wed, 27 Jun 2012 21:24:54 +0000 (21:24 +0000)]
[chromium] ScrollbarLayerChromium should support painting forward-track and back-track in different styles.
https://bugs.webkit.org/show_bug.cgi?id=89908

Reviewed by Adrienne Walker.

Source/WebCore:

Test: platform/chromium/compositing/scrollbars/custom-composited-different-track-parts.html

Adds support for accelerated drawing (impl thread) of scrollbars with different styles for the
forward-track and back-track parts.

* platform/graphics/chromium/ScrollbarLayerChromium.cpp:
(WebCore::ScrollbarLayerChromium::pushPropertiesTo):
(WebCore::ScrollbarBackgroundPainter::create):
(WebCore::ScrollbarBackgroundPainter::ScrollbarBackgroundPainter):
(ScrollbarBackgroundPainter):
(WebCore::ScrollbarLayerChromium::setLayerTreeHost):
(WebCore::ScrollbarLayerChromium::createTextureUpdaterIfNeeded):
(WebCore::ScrollbarLayerChromium::update):
* platform/graphics/chromium/ScrollbarLayerChromium.h:
(ScrollbarLayerChromium):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.cpp:
(WebCore::CCScrollbarLayerImpl::CCScrollbarLayerImpl):
(WebCore):
(WebCore::CCScrollbarLayerImpl::appendQuads):
* platform/graphics/chromium/cc/CCScrollbarLayerImpl.h:
(WebCore::CCScrollbarLayerImpl::setBackTrackTextureId):
(WebCore::CCScrollbarLayerImpl::setForeTrackTextureId):
(CCScrollbarLayerImpl):

LayoutTests:

Adds support for accelerated drawing (impl thread) of scrollbars with different styles for the
forward-track and back-track parts.

* platform/chromium/compositing/scrollbars/custom-composited-different-track-parts-expected.png: Added.
* platform/chromium/compositing/scrollbars/custom-composited-different-track-parts-expected.txt: Added.
* platform/chromium/compositing/scrollbars/custom-composited-different-track-parts.html: Added.

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

12 years agoREGRESSION(r121135): It made qmltests::WebViewColorChooser::test_accept() fail
commit-queue@webkit.org [Wed, 27 Jun 2012 21:18:53 +0000 (21:18 +0000)]
REGRESSION(r121135): It made qmltests::WebViewColorChooser::test_accept() fail
https://bugs.webkit.org/show_bug.cgi?id=89871

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-06-27
Reviewed by Simon Hausmann.

Added proper event synchronization to the test case.

* UIProcess/API/qt/tests/qmltests/WebView/tst_colorChooser.qml:

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

12 years ago[Chromium] DumpRenderTree on Android should call SkUseTestFontConfigFile once available
abarth@webkit.org [Wed, 27 Jun 2012 21:14:11 +0000 (21:14 +0000)]
[Chromium] DumpRenderTree on Android should call SkUseTestFontConfigFile once available
https://bugs.webkit.org/show_bug.cgi?id=89801

Reviewed by Nate Chapin.

Let's call SkUseTestFontConfigFile now that it exists.

* DumpRenderTree/chromium/TestShellAndroid.cpp:
(platformInit):

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

12 years agoUnreviewed GTK gardening, adding a new baseline that's required
zandobersek@gmail.com [Wed, 27 Jun 2012 21:12:46 +0000 (21:12 +0000)]
Unreviewed GTK gardening, adding a new baseline that's required
after the Gamepad API has been turned on in r121332.

* platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt: Added.

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

12 years agoFix typo introduced in r121363.
dpranke@chromium.org [Wed, 27 Jun 2012 21:09:36 +0000 (21:09 +0000)]
Fix typo introduced in r121363.

Unreviewed, build fix.

* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort._symbols_string):

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

12 years ago[Chromium] IndexedDB: Expose WebIDBTransaction::commit() method in public API
jsbell@chromium.org [Wed, 27 Jun 2012 21:05:44 +0000 (21:05 +0000)]
[Chromium] IndexedDB: Expose WebIDBTransaction::commit() method in public API
https://bugs.webkit.org/show_bug.cgi?id=90089

Reviewed by James Robinson.

Prep work for http://webkit.org/b/89379 which requires empty transactions to
trigger a commit from the front-end.

* public/WebIDBTransaction.h:
(WebKit::WebIDBTransaction::commit):

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

12 years agoMoving from committers to reviewers :-)
mhahnenberg@apple.com [Wed, 27 Jun 2012 21:02:28 +0000 (21:02 +0000)]
Moving from committers to reviewers :-)

Rubber stamped by Filip Pizlo.

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

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

12 years ago[chromium] Expose device scale factor in WebPluginContainer
commit-queue@webkit.org [Wed, 27 Jun 2012 21:00:59 +0000 (21:00 +0000)]
[chromium] Expose device scale factor in WebPluginContainer
https://bugs.webkit.org/show_bug.cgi?id=87874

Patch by Josh Horwich <jhorwich@chromium.org> on 2012-06-27
Reviewed by Adam Barth.

* public/WebPluginContainer.h:
(WebPluginContainer):
* src/WebPluginContainerImpl.cpp:
(WebKit::WebPluginContainerImpl::deviceScaleFactor):
(WebKit):
(WebKit::WebPluginContainerImpl::pageScaleFactor):
(WebKit::WebPluginContainerImpl::pageZoomFactor):
* src/WebPluginContainerImpl.h:
(WebPluginContainerImpl):

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

12 years agoDerive ChromiumPort from WebKitPort to add support for missing symbols to skip tests
dpranke@chromium.org [Wed, 27 Jun 2012 20:52:58 +0000 (20:52 +0000)]
Derive ChromiumPort from WebKitPort to add support for missing symbols to skip tests
https://bugs.webkit.org/show_bug.cgi?id=89706

Reviewed by Adam Barth.

Based on the original patch by Raymond Toy.

This patch changes ChromiumPort to derive from webkit.WebKitPort
instead of base.Port. This is a long-awaited change and a
precursor to merging base.Port and webkit.WebKitPort, but is
driven by the desire to dynamically detect whether the MP3 and
AAC codecs are compiled into DRT on Chromium, for which we
wanted to re-use the existing logic in WebKit port for determine
what to skip at compile time.

Most of the changes are shuffling things around so that we don't
change any other logic and so we override the necessary methods
in WebKitPort (and try to follow the same method definition
order where possible).

Also, on the Chromium port the mp3 and aac codecs are actually
defined in a separate library, so scanning webcore isn't
sufficient. This patch generalizes the symbol lookup to handle
multiple libraries, and uses different libraries as appropriate
for Chromium.

The only functional/visible changes should be in the value
returned for skipped_layout_tests().

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort):
(ChromiumPort.__init__):
(ChromiumPort.driver_name):
(ChromiumPort._driver_class):
(ChromiumPort._missing_symbol_to_skipped_tests):
(ChromiumPort.skipped_layout_tests):
(ChromiumPort.setup_test_run):
(ChromiumPort._path_to_image_diff):
(ChromiumPort._convert_path):
* Scripts/webkitpy/layout_tests/port/chromium_unittest.py:
(ChromiumPortTest.test_missing_symbol_to_skipped_tests):
* Scripts/webkitpy/layout_tests/port/chromium_linux.py:
(ChromiumLinuxPort._modules_to_search_for_symbols):
* Scripts/webkitpy/layout_tests/port/chromium_mac.py:
(ChromiumLinuxPort._modules_to_search_for_symbols):
* Scripts/webkitpy/layout_tests/port/chromium_win.py:
(ChromiumLinuxPort._modules_to_search_for_symbols):
* Scripts/webkitpy/layout_tests/port/webkit.py:
(WebKitPort):
(WebKitPort.__init__):
(WebKitPort._symbols_string):
(WebKitPort._modules_to_search_for_symbols):

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

12 years ago[BlackBerry] Wrong scale after leaving fullscreen <video>
zhajiang@rim.com [Wed, 27 Jun 2012 20:38:54 +0000 (20:38 +0000)]
[BlackBerry] Wrong scale after leaving fullscreen <video>
https://bugs.webkit.org/show_bug.cgi?id=89546

Reviewed by Antonio Gomes.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 164948
When we were entering fullscreen, the current scale A was clamped to a
greater minimum scale B as we relayouted the contents during the change
of the viewport size. When leaving fullscreen, we still used that scale
B as the current scale which was incorrect.
To fix this, we can save the current scale when entering fullscreen and
restore it when leaving fullscreen.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::WebPagePrivate):
(BlackBerry::WebKit::WebPagePrivate::enterFullScreenForElement):
(BlackBerry::WebKit::WebPagePrivate::exitFullScreenForElement):
* Api/WebPage_p.h:
(WebPagePrivate):

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

12 years ago[chromium] Allow screen space rects and occluding rects to be visualized for debugging.
commit-queue@webkit.org [Wed, 27 Jun 2012 20:31:27 +0000 (20:31 +0000)]
[chromium] Allow screen space rects and occluding rects to be visualized for debugging.
https://bugs.webkit.org/show_bug.cgi?id=90012

Patch by Ian Vollick <vollick@chromium.org> on 2012-06-27
Reviewed by Adrienne Walker.

No new tests. No new functionality.

* platform/graphics/chromium/cc/CCDebugRectHistory.cpp:
(WebCore::CCDebugRectHistory::enabled):
(WebCore::CCDebugRectHistory::saveDebugRectsForCurrentFrame):
(WebCore::CCDebugRectHistory::saveScreenSpaceRects):
(WebCore):
(WebCore::CCDebugRectHistory::saveOccludingRects):
* platform/graphics/chromium/cc/CCDebugRectHistory.h:
(WebCore):
(CCDebugRectHistory):
* platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
(WebCore::CCHeadsUpDisplay::showDebugRects):
(WebCore::CCHeadsUpDisplay::draw):
(WebCore::CCHeadsUpDisplay::drawDebugRects):
* platform/graphics/chromium/cc/CCLayerTreeHost.h:
(WebCore::CCLayerTreeSettings::CCLayerTreeSettings):
(CCLayerTreeSettings):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
(WebCore::CCLayerTreeHostImpl::calculateRenderPasses):
(WebCore::CCLayerTreeHostImpl::drawLayers):
* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
(FrameData):
* platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
(WebCore::::CCOcclusionTrackerBase):
(WebCore::addOcclusionBehindLayer):
(WebCore::::markOccludedBehindLayer):
* platform/graphics/chromium/cc/CCOcclusionTracker.h:
(CCOcclusionTrackerBase):
(WebCore::CCOcclusionTrackerBase::setOccludingScreenSpaceRectsContainer):

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

12 years ago[gtk] Spell checker doesn't recognize contractions (apostrophes)
commit-queue@webkit.org [Wed, 27 Jun 2012 20:22:32 +0000 (20:22 +0000)]
[gtk] Spell checker doesn't recognize contractions (apostrophes)
https://bugs.webkit.org/show_bug.cgi?id=86118

Patch by Martin Robinson <mrobinson@igalia.com> on 2012-06-27
Reviewed by Gustavo Noronha Silva.

Work-around a bug in Pango by trying to detect apostrophes
that create contractions. This work-around is similar to one
found in gtkspell.

* webkit/webkitspellcheckerenchant.cpp:
(wordEndIsAContractionApostrophe): Added this helper which tries to detect
situations where a word end is both an apostrophe and followed by a alphabetic
character.
(checkSpellingOfString): When searching for the end of a word, skip over
apostrophes that appear to be part of contractions.

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

12 years agoWeb Inspector [JSC]: Implement ScriptCallStack::stackTrace
commit-queue@webkit.org [Wed, 27 Jun 2012 19:54:48 +0000 (19:54 +0000)]
Web Inspector [JSC]: Implement ScriptCallStack::stackTrace
https://bugs.webkit.org/show_bug.cgi?id=40118

Patch by Anthony Scian <ascian@rim.com> on 2012-06-27
Reviewed by Yong Li.

Source/JavaScriptCore:

Added member functions to expose function name, urlString, and line #.
Refactored toString to make use of these member functions to reduce
duplicated code for future maintenance.

Manually tested refactoring of toString by tracing thrown exceptions.

* interpreter/Interpreter.h:
(StackFrame):
(JSC::StackFrame::toString):
(JSC::StackFrame::friendlySourceURL):
(JSC::StackFrame::friendlyFunctionName):
(JSC::StackFrame::friendlyLineNumber):

Source/WebCore:

Implemented stub for createScriptCallStack to call into
Interpreter and extract the current stack frames, iterate
through the frames and create the return result required.

No new tests, manually tested thrown exception and inspector
tracebacks.

* bindings/js/ScriptCallStackFactory.cpp:
(WebCore::createScriptCallStack):

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

12 years agoLet Xcode have its own way.
rniwa@webkit.org [Wed, 27 Jun 2012 19:50:52 +0000 (19:50 +0000)]
Let Xcode have its own way.

* WebCore.xcodeproj/project.pbxproj:

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

12 years agoREGRESSION (Safari 5?): Pasting a line into textarea inserts two newlines
rniwa@webkit.org [Wed, 27 Jun 2012 19:42:22 +0000 (19:42 +0000)]
REGRESSION (Safari 5?): Pasting a line into textarea inserts two newlines
https://bugs.webkit.org/show_bug.cgi?id=49288

Reviewed by Tony Chang.

Source/WebCore:

The bug was caused by positionAvoidingPrecedingNodes getting out of a block when the insertion point is at a line break.
It caused the subsequent code to be misinformed of the insertion position and ended up not pruning the extra line break.

Fixed the bug by checking this special case and bailing out so that we don't crawl out of the enclosing block.
It's similar to checks several lines below it.

Test: editing/pasteboard/copy-paste-pre-line-content.html

* editing/ReplaceSelectionCommand.cpp:
(WebCore::positionAvoidingPrecedingNodes):

LayoutTests:

Add a test regerssion test for copying & pasting a line in pre into textarea twice.

* editing/pasteboard/copy-paste-pre-line-content-expected.txt: Added.
* editing/pasteboard/copy-paste-pre-line-content.html: Added.

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

12 years ago[Chromium] Rebaseline svg/text/scaled-font.svg and svg/text/scaling-font-with-geometr...
hclam@chromium.org [Wed, 27 Jun 2012 18:45:01 +0000 (18:45 +0000)]
[Chromium] Rebaseline svg/text/scaled-font.svg and svg/text/scaling-font-with-geometric-precision.html caused by r121343.

Not reviewed. Build fix.

* platform/chromium-mac-snowleopard/svg/text/scaling-font-with-geometric-precision-expected.png:
* platform/chromium-mac/svg/text/scaled-font-expected.png:
* platform/chromium-mac/svg/text/scaling-font-with-geometric-precision-expected.png:

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

12 years agoScale was incorrect when reloading a simple web page after initial load https://bugs...
zhajiang@rim.com [Wed, 27 Jun 2012 18:44:52 +0000 (18:44 +0000)]
Scale was incorrect when reloading a simple web page after initial load https://bugs.webkit.org/show_bug.cgi?id=88889

Reviewed by Antonio Gomes.
Patch by Jacky Jiang <zhajiang@rim.com>

PR: 164442
For FrameLoadTypeStandard load, the layout timer can be fired which can
call dispatchDidFirstVisuallyNonEmptyLayout() after the load Finished
state, in which case the web page will have no chance to zoom to
initial scale. We should give it a chance as well as FrameLoadTypeSame
load.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::shouldZoomToInitialScaleOnLoad):

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

12 years agohttps://bugs.webkit.org/show_bug.cgi?id=87513
beidson@apple.com [Wed, 27 Jun 2012 18:28:52 +0000 (18:28 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=87513
WebBackForwardList needs an overhaul to consistently and clearly handle error conditions.

Reviewed by Darin Adler.

- We think a null entry might somehow be getting in the list so we now try to prevent that.
- We think a null entry might somehow be in the list so we now null check when indexing into m_entries.
- A lot of index math - especially tracking "no current index" - was implicit or wrong.
- Operating on a WebBackForwardList whose page has been closed is now an explicit no-op.
- The session state data reading and writing code was fragile and needed an overhaul.
- This includes adding a new V1 format of the session data that is easier to validate when reading back in.

* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::~WebBackForwardList):
(WebKit::WebBackForwardList::pageClosed):
(WebKit::WebBackForwardList::addItem):
(WebKit::WebBackForwardList::goToItem):
(WebKit::WebBackForwardList::backListCount):
(WebKit::WebBackForwardList::forwardListCount):
(WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
(WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
(WebKit::WebBackForwardList::clear):

* UIProcess/WebBackForwardList.h:
(WebBackForwardList):

* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::createEmptySessionHistoryDictionary):
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
(WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
(WebKit::WebBackForwardList::restoreFromV0CFDictionaryRepresentation):
(WebKit::WebBackForwardList::restoreFromV1CFDictionaryRepresentation):
(WebKit::extractBackForwardListEntriesFromArray):

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

12 years agoFix some styling errors in the TestExpecations files.
ojan@chromium.org [Wed, 27 Jun 2012 18:28:20 +0000 (18:28 +0000)]
Fix some styling errors in the TestExpecations files.
There were automatically fixed when trying to make
webkit-patch rebaseline-expectations work for non-Chromium ports.

* platform/efl/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:

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

12 years ago[CSSRegions]Change display values that allow regions
commit-queue@webkit.org [Wed, 27 Jun 2012 18:25:16 +0000 (18:25 +0000)]
[CSSRegions]Change display values that allow regions
https://bugs.webkit.org/show_bug.cgi?id=89759

Patch by Andrei Onea <onea@adobe.com> on 2012-06-27
Reviewed by Tony Chang.

Source/WebCore:

Allow only elements with display values of block, inline-block,
table-cell, table-caption and list-item to become regions, as per
CSSRegions spec: http://dev.w3.org/csswg/css3-regions .
Also added test for checking whether regions are destroyed and/or created
when changing display value.

Test: fast/regions/region-element-display-change.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::createObject):
* rendering/style/RenderStyle.h:

LayoutTests:

Added checks for more display values, and modified results to reflect proper values that can become
regions. Also created new test for dynamically changing display values, making sure regions are
created or destroyed correctly.
* fast/regions/region-element-display-change-expected.txt: Added.
* fast/regions/region-element-display-change.html: Added.
* fast/regions/region-element-display-restriction-expected.txt:
* fast/regions/script-tests/region-element-display-change.js: Added.
(testElement):
* fast/regions/script-tests/region-element-display-restriction.js:

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

12 years agoCSS3 calc: blending involving expressions
mikelawther@chromium.org [Wed, 27 Jun 2012 18:23:09 +0000 (18:23 +0000)]
CSS3 calc: blending involving expressions
https://bugs.webkit.org/show_bug.cgi?id=86160

Reviewed by Tony Chang.

Source/WebCore:

If either endpoint of a blend involves a calc expression, we create a new
expression to perform the blend calculation.

Test: css3/calc/transitions.html
      css3/calc/transitions-dependent.html

* platform/Length.cpp:
(WebCore):
(WebCore::Length::blendCalculation):
* platform/Length.h:
(WebCore::Length::blend):
(Length):

LayoutTests:

Removed existing test as it was folded into transitions.html.

* css3/calc/transition-start-end-with-calc-expected.txt: Removed.
* css3/calc/transition-start-end-with-calc.html: Removed.
* css3/calc/transitions-dependent-expected.txt: Added.
* css3/calc/transitions-dependent.html: Added.
* css3/calc/transitions-expected.txt: Added.
* css3/calc/transitions.html: Added.

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

12 years ago[Shadow] Triggers assertion in VisibleSelection::adjustSelectionToAvoidCrossingBounda...
shinyak@chromium.org [Wed, 27 Jun 2012 17:48:23 +0000 (17:48 +0000)]
[Shadow] Triggers assertion in VisibleSelection::adjustSelectionToAvoidCrossingBoundaries()
https://bugs.webkit.org/show_bug.cgi?id=89918

Reviewed by Ryosuke Niwa.

This patch adds a testcase of selection from Shadow DOM to some elements outside of shadow host.
r121303, which is a patch for another issue, fixed this issue.

* editing/shadow/breaking-editing-boundaries-2-expected.txt: Added.
* editing/shadow/breaking-editing-boundaries-2.html: Added.

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

12 years agoMove CSSWrapShape style resolution from StyleResolver to StyleBuilder
commit-queue@webkit.org [Wed, 27 Jun 2012 17:45:24 +0000 (17:45 +0000)]
Move CSSWrapShape style resolution from StyleResolver to StyleBuilder
https://bugs.webkit.org/show_bug.cgi?id=89668

Patch by Hans Muller <hmuller@adobe.com> on 2012-06-27
Reviewed by Andreas Kling.

Moved the resolution of the shapeInside and shapeOutside CSS properties
from the StyleResolver class to StyleBuilder. This is just refactoring
in preparation for fixing https://bugs.webkit.org/show_bug.cgi?id=89670.

No new tests were required.

* css/StyleBuilder.cpp:
(WebCore):
(ApplyPropertyWrapShape):
(WebCore::ApplyPropertyWrapShape::setValue):
(WebCore::ApplyPropertyWrapShape::applyValue):
(WebCore::ApplyPropertyWrapShape::createHandler):
(WebCore::StyleBuilder::StyleBuilder):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):

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

12 years agoBlur filter causes issues when scrolling
achicu@adobe.com [Wed, 27 Jun 2012 17:38:05 +0000 (17:38 +0000)]
Blur filter causes issues when scrolling
https://bugs.webkit.org/show_bug.cgi?id=89475

Reviewed by Simon Fraser.

Source/WebCore:

This patch disables the fast scrolling when there is a fixed postioned element that
has a filter applied on its parent layer. Otherwise the scroll blitting will just
copy the outsets of the blur effect.

Test: css3/filters/blur-filter-page-scroll.html

* page/FrameView.cpp:
(WebCore::FrameView::scrollContentsFastPath):

LayoutTests:

Checking that the fixed positioned element repaints correctly when there is a blur filter
applied on its parent layer.

* css3/filters/blur-filter-page-scroll.html: Added.
* platform/chromium/css3/filters/blur-filter-page-scroll-expected.png: Added.
* platform/chromium/css3/filters/blur-filter-page-scroll-expected.txt: Added.
* platform/chromium/TestExpectations: The new test needs to be checked on Windows.
* platform/mac/css3/filters/blur-filter-page-scroll-expected.png: Added.
* platform/mac/css3/filters/blur-filter-page-scroll-expected.txt: Added.

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

12 years agoREGRESSION(r121296): New zero-size background tests asserting on Mac.
kling@webkit.org [Wed, 27 Jun 2012 17:22:30 +0000 (17:22 +0000)]
REGRESSION(r121296): New zero-size background tests asserting on Mac.
<http://webkit.org/b/90071>

Reviewed by Dan Bernstein.

Remove ASSERT(patternTransform.isInvertible()) as this is now a valid scenario.

* platform/graphics/cg/ImageCG.cpp:
(WebCore::Image::drawPattern):

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

12 years ago[Qt] REGRESSION(r121339): It broke the build on the Qt Windows bots
ossy@webkit.org [Wed, 27 Jun 2012 16:55:51 +0000 (16:55 +0000)]
[Qt] REGRESSION(r121339): It broke the build on the Qt Windows bots
https://bugs.webkit.org/show_bug.cgi?id=90081

Buildfix for Qt 4.8 Windows. Use the former path for Qt 4.8, and the newer one for Qt 5.

Reviewed by Noam Rosenthal.

* qmake/mkspecs/features/features.prf:

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

12 years ago[WK2] [GTK] WebKit2 testing bot fails to run tests due to missing files
sergio@webkit.org [Wed, 27 Jun 2012 15:52:00 +0000 (15:52 +0000)]
[WK2] [GTK] WebKit2 testing bot fails to run tests due to missing files
https://bugs.webkit.org/show_bug.cgi?id=90061

Reviewed by Gustavo Noronha Silva.

Add "-no-install -no-fast-install" to the LDFLAGS in bots. With
this flag libtool tells the linker to set the rpath for the output
file to the full path of the .libs directory, instead of using a
wrapper script to set up the LD_LIBRARY_PATH. This will allow us
to directly reuse builds in the pure testing bots.

* BuildSlaveSupport/gtk/daemontools-buildbot.conf:

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

12 years agoHTMLStyleElement::removedFrom seems incorrect.
shinyak@chromium.org [Wed, 27 Jun 2012 15:18:07 +0000 (15:18 +0000)]
HTMLStyleElement::removedFrom seems incorrect.
https://bugs.webkit.org/show_bug.cgi?id=89986

Reviewed by Hajime Morita.

This is a follow-up patch for Bug 88495. The Same bug as Bug 88495 seems to exist on
HTMLStyleElement::removedFrom().

No new tests, hard to write a test case.

* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::removedFrom):

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

12 years agoCleanup scaling code in text-decorations for SVG InlineText. Use scale() instead...
reed@google.com [Wed, 27 Jun 2012 15:06:24 +0000 (15:06 +0000)]
Cleanup scaling code in text-decorations for SVG InlineText. Use scale() instead of getCTM/normalizeTransform/setCTM
to use more standard pattern for scaling, and to allow for these operations to be recorded and played back later
(potentially with a different starting matrix). This effectively reverts change# 78704.
https://bugs.webkit.org/show_bug.cgi?id=89888

Reviewed by Nikolas Zimmermann.

No new tests. Current layouttests exercise this code path.

* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paintDecorationWithStyle):
(WebCore::SVGInlineTextBox::paintTextWithShadows):

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

12 years ago[chromium] out-of-order assert in WebViewImpl setDeviceScaleFactor
rjkroege@chromium.org [Wed, 27 Jun 2012 14:55:13 +0000 (14:55 +0000)]
[chromium] out-of-order assert in WebViewImpl setDeviceScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=90006

The assert in WebViewImpl::setDeviceScaleFactor should test for non-scaling
after we have set both m_DeviceScaleInCompositor and page()->deviceScaleFactor()
instead of in between.

Reviewed by James Robinson.

* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setDeviceScaleFactor):

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

12 years ago[Qt] Remove redundant NDEBUG definition
vestbo@webkit.org [Wed, 27 Jun 2012 14:27:00 +0000 (14:27 +0000)]
[Qt] Remove redundant NDEBUG definition

Already handled in default_post.prf.

Patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-06-27
Reviewed by Tor Arne Vestbø.

* WebCore.pri:

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

12 years ago[Qt] No need to save and restore TEMPLATE in a function
vestbo@webkit.org [Wed, 27 Jun 2012 14:24:56 +0000 (14:24 +0000)]
[Qt] No need to save and restore TEMPLATE in a function

This was a leftover from when the logic was not in its own function scope.

QMAKE_FRAMEWORK_BUNDLE_NAME on the other hand is exported in qtLibraryTarget, which
will surprisingly affect the global scope as well, so we have to save and restore it.

Original patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-06-27

Reviewed by Tor Arne Vestbø.

* qmake/mkspecs/features/functions.prf:

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

12 years ago[Qt] Fix lookup location for sqlite sources
vestbo@webkit.org [Wed, 27 Jun 2012 13:05:43 +0000 (13:05 +0000)]
[Qt] Fix lookup location for sqlite sources

Don't look in the install dir - we are unlikely to find anything there
unless we are doing a developer build.

Patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-06-27
Reviewed by Tor Arne Vestbø.

* qmake/mkspecs/features/features.prf:

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

12 years ago[Qt] Remove redundant c++11 warning suppression code
vestbo@webkit.org [Wed, 27 Jun 2012 13:02:03 +0000 (13:02 +0000)]
[Qt] Remove redundant c++11 warning suppression code

This is already handled in default_post.

Patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com> on 2012-06-27
Reviewed by Tor Arne Vestbø.

* Target.pri:

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

12 years agoUnexpected end of style sheet in @font-face rule discards it rather than closes all...
apavlov@chromium.org [Wed, 27 Jun 2012 11:35:06 +0000 (11:35 +0000)]
Unexpected end of style sheet in @font-face rule discards it rather than closes all open constructs
https://bugs.webkit.org/show_bug.cgi?id=89980

Reviewed by Antti Koivisto.

Source/WebCore:

Use the "closing_brace" at the end of font_face rather than the explicit "'}' maybe_space".

Test: fast/css/font-face-unexpected-end.html

* css/CSSGrammar.y:

LayoutTests:

* fast/css/font-face-unexpected-end-expected.html: Added.
* fast/css/font-face-unexpected-end.html: Added.

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

12 years ago[Qt] Add missing heades to HEADERS
vestbo@webkit.org [Wed, 27 Jun 2012 11:30:42 +0000 (11:30 +0000)]
[Qt] Add missing heades to HEADERS

For JavaScriptCore there aren't any Qt specific files, so we include all
headers for easy editing in Qt Creator.

Reviewed by Simon Hausmann.

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

12 years agoRename Element::rareData() to Element::elementRareData(), and Element::ensureRareData...
haraken@chromium.org [Wed, 27 Jun 2012 10:21:55 +0000 (10:21 +0000)]
Rename Element::rareData() to Element::elementRareData(), and Element::ensureRareData() to Element::ensureElementRareData()
https://bugs.webkit.org/show_bug.cgi?id=90050

Reviewed by Ryosuke Niwa.

Element::rareData()/Element::ensureRareData() and
Node::rareData()/Node::ensureRareData() are confusing. They are not virtual
methods. For clarification, we can rename Element::rareData() to
Element::elementRareData(), and Element::ensureRareData() to
Element::ensureElementRareData().

c.f. SVGRareData uses SVGElement::rareSVGData() and SVGElement::ensureRareSVGData().
(We might want to rename them to SVGElement::svgRareData() and
SVGElement::ensureSVGRareData() in a follow-up patch.)

No tests. No change in behavior.

* dom/Element.cpp:
(WebCore::Element::~Element):
(WebCore::Element::elementRareData):
(WebCore::Element::ensureElementRareData):
(WebCore::Element::attributes):
(WebCore::Element::attach):
(WebCore::Element::detach):
(WebCore::Element::recalcStyle):
(WebCore::Element::shadow):
(WebCore::Element::ensureShadow):
(WebCore::Element::shadowPseudoId):
(WebCore::Element::setShadowPseudoId):
(WebCore::Element::focus):
(WebCore::Element::minimumSizeForResizing):
(WebCore::Element::setMinimumSizeForResizing):
(WebCore::Element::computedStyle):
(WebCore::Element::setStyleAffectedByEmpty):
(WebCore::Element::styleAffectedByEmpty):
(WebCore::Element::cancelFocusAppearanceUpdate):
(WebCore::Element::classList):
(WebCore::Element::optionalClassList):
(WebCore::Element::dataset):
(WebCore::Element::containsFullScreenElement):
(WebCore::Element::setContainsFullScreenElement):
(WebCore::Element::hasNamedNodeMap):
(WebCore::Element::ensureCachedHTMLCollection):
(WebCore::Element::savedLayerScrollOffset):
(WebCore::Element::setSavedLayerScrollOffset):
* dom/Element.h:
(Element):
* html/LabelableElement.cpp:
(WebCore::LabelableElement::labels):

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

12 years ago[Chromium] Remove unused build scripts and empty folders for JavaScriptCore w/ gyp
dominicc@chromium.org [Wed, 27 Jun 2012 09:44:31 +0000 (09:44 +0000)]
[Chromium] Remove unused build scripts and empty folders for JavaScriptCore w/ gyp
https://bugs.webkit.org/show_bug.cgi?id=90029

Source/JavaScriptCore:

Reviewed by Adam Barth.

* gyp: Removed.
* gyp/generate-derived-sources.sh: Removed.
* gyp/generate-dtrace-header.sh: Removed.
* gyp/run-if-exists.sh: Removed.
* gyp/update-info-plist.sh: Removed.

Source/WebCore:

* gyp: Removed empty dir.

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

12 years agoUnreviewed, rolling out r121271.
commit-queue@webkit.org [Wed, 27 Jun 2012 09:26:03 +0000 (09:26 +0000)]
Unreviewed, rolling out r121271.
http://trac.webkit.org/changeset/121271
https://bugs.webkit.org/show_bug.cgi?id=90056

Broke a whole bunch of tests and also caused crashes in some
tests (Requested by rniwa on #webkit).

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

* editing/Editor.cpp:
(WebCore::Editor::markAndReplaceFor):

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

12 years ago[Gtk] Add support for the Gamepad API
zandobersek@gmail.com [Wed, 27 Jun 2012 09:19:15 +0000 (09:19 +0000)]
[Gtk] Add support for the Gamepad API
https://bugs.webkit.org/show_bug.cgi?id=87503

Reviewed by Carlos Garcia Campos.

.:

Only enable the Gamepad feature on Linux as support
for other operating systems is not present.

Check for the GIO Unix and GUdev dependencies when the
Gamepad feature is enabled.

* configure.ac:

Source/WebCore:

Add support for the Gamepad feature on the GTK port.

The support is available only on Linux, with each gamepad device being presented
through a GamepadDeviceLinux object. The implementation of this class relies on
the Linux kernel joystick API.

Gamepad devices are recognized through the GamepadsGtk class, of which implementation
is based on GUdev. This way devices are properly registered on connection as objects of
the GamepadDeviceGtk class which inherits GamepadDeviceLinux. GamepadDeviceGtk reads the
joystick data through GIO pollable streams and updates the device state accordingly. The
GamepadsGtk object is then polled for gamepads data through the sampleGamepads method.

No new tests - tests already exist but require additional testing infrastructure.

* GNUmakefile.am:
* GNUmakefile.list.am:
* bindings/gobject/GNUmakefile.am:
* bindings/js/JSDOMBinding.h: Add the jsArray method that operates on a Vector of floats.
(WebCore):
(WebCore::jsArray):
* platform/gtk/GamepadsGtk.cpp: Added.
(WebCore):
(GamepadDeviceGtk):
(WebCore::GamepadDeviceGtk::create):
(WebCore::GamepadDeviceGtk::GamepadDeviceGtk):
(WebCore::GamepadDeviceGtk::~GamepadDeviceGtk):
(WebCore::GamepadDeviceGtk::readCallback):
(GamepadsGtk):
(WebCore::GamepadsGtk::GamepadsGtk):
(WebCore::GamepadsGtk::~GamepadsGtk):
(WebCore::GamepadsGtk::registerDevice):
(WebCore::GamepadsGtk::unregisterDevice):
(WebCore::GamepadsGtk::updateGamepadList):
(WebCore::GamepadsGtk::onUEventCallback):
(WebCore::GamepadsGtk::isGamepadDevice):
(WebCore::sampleGamepads):
* platform/linux/GamepadDeviceLinux.cpp: Added.
(WebCore):
(WebCore::GamepadDeviceLinux::GamepadDeviceLinux):
(WebCore::GamepadDeviceLinux::~GamepadDeviceLinux):
(WebCore::GamepadDeviceLinux::updateForEvent):
(WebCore::GamepadDeviceLinux::normalizeAxisValue):
(WebCore::GamepadDeviceLinux::normalizeButtonValue):
* platform/linux/GamepadDeviceLinux.h: Added.
(WebCore):
(GamepadDeviceLinux):
(WebCore::GamepadDeviceLinux::connected):
(WebCore::GamepadDeviceLinux::id):
(WebCore::GamepadDeviceLinux::timestamp):
(WebCore::GamepadDeviceLinux::axesCount):
(WebCore::GamepadDeviceLinux::axesData):
(WebCore::GamepadDeviceLinux::buttonsCount):
(WebCore::GamepadDeviceLinux::buttonsData):

Source/WebKit/gtk:

Add the Gamepad feature dependencies libraries to the LIBADD
list for the libwebkitgtk library.

* GNUmakefile.am:

Source/WebKit2:

Add the Gamepad feature dependencies libraries to the LIBADD
list for the libwebkitgtk2 library.

* GNUmakefile.am:

Tools:

Enable the gamepad support for the GTK port.

* Scripts/webkitperl/FeatureList.pm:

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

12 years agoFix gcc build after r121302
rniwa@webkit.org [Wed, 27 Jun 2012 09:15:18 +0000 (09:15 +0000)]
Fix gcc build after r121302
https://bugs.webkit.org/show_bug.cgi?id=90055

Reviewed by Mark Rowe.

Source/ThirdParty:

Assume RTTI is disabled so that gtest builds under XCode 3.2.6.

* gtest/xcode/Config/General.xcconfig:

Tools:

Assume RTTI is always disabled so that gtest builds on XCode 3.2.6.

It appears that gcc doesn't like window.get().* inside a template so replace that by [window.get() *] instead.

* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm:
(TestWebKitAPI::AcceptsFirstMouse::runTest):

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

12 years agoRename rareSVGData() to svgRareData()
haraken@chromium.org [Wed, 27 Jun 2012 08:54:43 +0000 (08:54 +0000)]
Rename rareSVGData() to svgRareData()
https://bugs.webkit.org/show_bug.cgi?id=90051

Reviewed by Nikolas Zimmermann.

Since rareSVGData() returns SVGRareData, it would make sense to
rename rareSVGData() to svgRareData(). Similarly, we can rename
ensureRareSVGData() to ensureSVGRareData(), and hasRareSVGData()
to hasSVGRareData().

c.f. bug 90050 is trying to introduce elementRareData() and
ensureElementRareData().

No tests. No change in behavior.

* WebCore.order:
* dom/Node.h:
(WebCore::Node::hasSVGRareData):
(WebCore::Node::setHasSVGRareData):
(WebCore::Node::clearHasSVGRareData):
* svg/SVGElement.cpp:
(WebCore::SVGElement::~SVGElement):
(WebCore::SVGElement::willRecalcStyle):
(WebCore::SVGElement::svgRareData):
(WebCore::SVGElement::ensureSVGRareData):
(WebCore::SVGElement::mapInstanceToElement):
(WebCore::SVGElement::removeInstanceMapping):
(WebCore::SVGElement::instancesForElement):
(WebCore::SVGElement::setCursorElement):
(WebCore::SVGElement::cursorElementRemoved):
(WebCore::SVGElement::setCursorImageValue):
(WebCore::SVGElement::cursorImageValueRemoved):
(WebCore::SVGElement::correspondingElement):
(WebCore::SVGElement::setCorrespondingElement):
(WebCore::SVGElement::animatedSMILStyleProperties):
(WebCore::SVGElement::ensureAnimatedSMILStyleProperties):
(WebCore::SVGElement::setUseOverrideComputedStyle):
(WebCore::SVGElement::computedStyle):
* svg/SVGElement.h:
(SVGElement):
* svg/SVGStyledElement.cpp:
(WebCore::SVGStyledElement::instanceUpdatesBlocked):
(WebCore::SVGStyledElement::setInstanceUpdatesBlocked):
(WebCore::SVGStyledElement::hasPendingResources):
(WebCore::SVGStyledElement::setHasPendingResources):
(WebCore::SVGStyledElement::clearHasPendingResourcesIfPossible):

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

12 years ago[Qt] Unreviewed gardening, rebaseline after r121303.
kkristof@inf.u-szeged.hu [Wed, 27 Jun 2012 08:30:09 +0000 (08:30 +0000)]
[Qt] Unreviewed gardening, rebaseline after r121303.

Patch by Zoltan Arvai <zarvai@inf.u-szeged.hu> on 2012-06-27

* platform/qt/editing/deleting/delete-br-002-expected.txt:
* platform/qt/editing/deleting/delete-br-004-expected.txt:
* platform/qt/editing/deleting/delete-br-005-expected.txt:
* platform/qt/editing/deleting/delete-br-006-expected.txt:

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

12 years agoAdd master.cfg unittest to help migration - pass BuildStep instances instead of Build...
ossy@webkit.org [Wed, 27 Jun 2012 08:27:02 +0000 (08:27 +0000)]
Add cfg unittest to help migration - pass BuildStep instances instead of BuildStep subclasses
https://bugs.webkit.org/show_bug.cgi?id=89564

Reviewed by Tony Chang.

* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
(BuildStepsConstructorTest):
(BuildStepsConstructorTest.generateTests):
(BuildStepsConstructorTest.createTest):
(BuildStepsConstructorTest.createTest.doTest):

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

12 years agoLabelableElement.cpp should include not ElementRareData.h but NodeRareData.h
haraken@chromium.org [Wed, 27 Jun 2012 07:48:24 +0000 (07:48 +0000)]
LabelableElement.cpp should include not ElementRareData.h but NodeRareData.h
https://bugs.webkit.org/show_bug.cgi?id=90047

Reviewed by Kent Tamura.

This is a simple refactoring. What LabelableElement uses is
not ElementRareData but NodeRareData.

No tests. No change in behavior.

* html/LabelableElement.cpp:

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

12 years ago[V8] Refactor V8BindingPerIsolateData::current() and V8BindingPerIsolateData::get()
haraken@chromium.org [Wed, 27 Jun 2012 07:28:31 +0000 (07:28 +0000)]
[V8] Refactor V8BindingPerIsolateData::current() and V8BindingPerIsolateData::get()
https://bugs.webkit.org/show_bug.cgi?id=90044

Reviewed by Adam Barth.

'static_cast<V8BindingPerIsolateData*>(isolate->GetData())' is duplicated
in V8BindingPerIsolateData::current() and V8BindingPerIsolateData::get().
This patch removes the duplication.

No tests. No change in behavior.

* bindings/v8/V8Binding.h:
(WebCore::V8BindingPerIsolateData::current):

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

12 years agoUnreviewed GTK gardening, updating baselines after r121303.
zandobersek@gmail.com [Wed, 27 Jun 2012 07:26:35 +0000 (07:26 +0000)]
Unreviewed GTK gardening, updating baselines after r121303.

* platform/gtk/editing/deleting/delete-br-002-expected.txt:
* platform/gtk/editing/deleting/delete-br-004-expected.txt:
* platform/gtk/editing/deleting/delete-br-005-expected.txt:
* platform/gtk/editing/deleting/delete-br-006-expected.txt:

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

12 years ago[Qt] Fix compilation of example platform plugin with Qt 5
hausmann@webkit.org [Wed, 27 Jun 2012 07:26:34 +0000 (07:26 +0000)]
[Qt] Fix compilation of example platform plugin with Qt 5

Reviewed by Kenneth Christiansen.

Use QLatin1String where appropriate and use the Qt 5 plugin
system with Qt 5.

* examples/platformplugin/WebPlugin.cpp:
(SingleSelectionPopup::SingleSelectionPopup):
(MultipleItemListDelegate::MultipleItemListDelegate):
(MultipleSelectionPopup::MultipleSelectionPopup):
* examples/platformplugin/WebPlugin.h:
(WebPlugin):

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

12 years ago[Qt] Avoid use of deprecated Qt API
hausmann@webkit.org [Wed, 27 Jun 2012 07:09:30 +0000 (07:09 +0000)]
[Qt] Avoid use of deprecated Qt API

Reviewed by Tor Arne Vestbø.

QGuiApplication::inputPanel() has been deprecated in favour of
inputMethod().

* UIProcess/qt/QtWebPageEventHandler.cpp:
(WebKit::QtWebPageEventHandler::QtWebPageEventHandler):
(WebKit::QtWebPageEventHandler::~QtWebPageEventHandler):
(WebKit::setInputPanelVisible):
(WebKit::QtWebPageEventHandler::inputPanelVisibleChanged):
(WebKit::QtWebPageEventHandler::updateTextInputState):

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

12 years agoUnreviewed. Rolled DEPS.
commit-queue@webkit.org [Wed, 27 Jun 2012 06:37:55 +0000 (06:37 +0000)]
Unreviewed.  Rolled DEPS.

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

* DEPS:

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

12 years ago[Platform] Change implementation of LocaleICU class to support more UDateFormat.
yosin@chromium.org [Wed, 27 Jun 2012 06:03:35 +0000 (06:03 +0000)]
[Platform] Change implementation of LocaleICU class to support more UDateFormat.
https://bugs.webkit.org/show_bug.cgi?id=89967

Reviewed by Kent Tamura.

This patch changes internal functions of LocaleICU class to process
multiple ICU date time format handles in addition to short date time
format handle.

This patch is a part of implementing input type time. I'll add time
format related ICU date time format handles.

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

* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::initializeShortDateFormat): Changed to use openDateFormat().
(WebCore::LocaleICU::openDateFormat): Added for common usage of udt_open().
(WebCore::getDateFormatPattern): Added for common usage of udt_toPattern().
(WebCore::localizeFormat): Changed to take String parameter.
(WebCore::LocaleICU::initializeLocalizedDateFormatText): Changed to use getDateFormatPattern.
(WebCore::LocaleICU::createLabelVector): Changed to take UDateFormat parameter.
(WebCore::LocaleICU::initializeCalendar): Changed for helper functions.
* platform/text/LocaleICU.h:
(LocaleICU):

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

12 years agoReturn correct value for css variables enabled runtime flag.
macpherson@chromium.org [Wed, 27 Jun 2012 05:40:18 +0000 (05:40 +0000)]
Return correct value for css variables enabled runtime flag.
https://bugs.webkit.org/show_bug.cgi?id=90040

Reviewed by Dimitri Glazkov.

Was always returning true for the runtime flag when the compile time flag was on. That was good for testing,
but not so much for production.

* page/Settings.h:
(WebCore::Settings::cssVariablesEnabled):

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

12 years agoDragData::asFilenames should not push same file names to result in Windows.
commit-queue@webkit.org [Wed, 27 Jun 2012 04:22:47 +0000 (04:22 +0000)]
DragData::asFilenames should not push same file names to result in Windows.
https://bugs.webkit.org/show_bug.cgi?id=79861

Patch by Xueqing Huang <huangxueqing@baidu.com> on 2012-06-26
Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: platform/win/fast/forms/file/drag-and-drop-files.html

* platform/win/DragDataWin.cpp:
(WebCore::DragData::asFilenames):

LayoutTests:

* platform/win/fast/forms/file/drag-and-drop-files-expected.txt: Added.
* platform/win/fast/forms/file/drag-and-drop-files.html: Added.

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

12 years agoRebaseline after r121286 and r121290.
rniwa@webkit.org [Wed, 27 Jun 2012 04:03:04 +0000 (04:03 +0000)]
Rebaseline after r121286 and r121290.

* editing/deleting/merge-into-empty-block-2-expected.txt:

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