WebKit-https.git
6 years agoData store should be readable in dragstart/copy/cut events
dcheng@chromium.org [Fri, 22 Mar 2013 20:04:15 +0000 (20:04 +0000)]
Data store should be readable in dragstart/copy/cut events
https://bugs.webkit.org/show_bug.cgi?id=23695

Reviewed by Tony Chang.

Source/WebCore:

There were several events where data could be written but not read back due to the fact that
different Clipboard method implementations checked permissions inconsistently. This patch
adds helper methods to check if an operation is permitted on a Clipboard and refactors all
direct comparisons against Clipboard::m_policy to use the new helpers instead. This fixes
several bugs where Clipboard::types and Clipboard::getData are not usable inside the
aforementioned events.

Tests: editing/pasteboard/can-read-in-copy-and-cut-events.html
       editing/pasteboard/can-read-in-dragstart-event.html

* dom/Clipboard.cpp:
(WebCore::Clipboard::canReadTypes): Formerly restricted to ClipboardReadable and
                                    ClipboardTypesReadable; now allows ClipboardWritable as
                                    well.
(WebCore::Clipboard::canReadData): Formerly restricted to ClipboardReadable; now allows
                                   ClipboardWritable as well.
(WebCore::Clipboard::canWriteData):
(WebCore::Clipboard::canSetDragImage):
(WebCore::Clipboard::hasFileOfType):
(WebCore::Clipboard::hasStringOfType):
(WebCore::Clipboard::setDropEffect):
(WebCore::Clipboard::setEffectAllowed):
* dom/Clipboard.h:
(Clipboard):
* platform/blackberry/ClipboardBlackBerry.cpp:
(WebCore::ClipboardBlackBerry::clearData):
(WebCore::ClipboardBlackBerry::clearAllData):
(WebCore::ClipboardBlackBerry::getData):
(WebCore::ClipboardBlackBerry::setData):
(WebCore::ClipboardBlackBerry::types):
* platform/chromium/ClipboardChromium.cpp:
(WebCore::DataTransferItemPolicyWrapper::kind):
(WebCore::DataTransferItemPolicyWrapper::type):
(WebCore::DataTransferItemPolicyWrapper::getAsString):
(WebCore::DataTransferItemPolicyWrapper::getAsFile):
(WebCore::ClipboardChromium::clearData):
(WebCore::ClipboardChromium::clearAllData):
(WebCore::ClipboardChromium::getData):
(WebCore::ClipboardChromium::setData):
(WebCore::ClipboardChromium::types):
(WebCore::ClipboardChromium::files):
(WebCore::ClipboardChromium::setDragImage):
* platform/gtk/ClipboardGtk.cpp:
(WebCore::ClipboardGtk::clearData):
(WebCore::ClipboardGtk::clearAllData):
(WebCore::ClipboardGtk::getData):
(WebCore::ClipboardGtk::setData):
(WebCore::ClipboardGtk::types):
(WebCore::ClipboardGtk::files):
(WebCore::ClipboardGtk::setDragImage):
* platform/mac/ClipboardMac.mm:
(WebCore::ClipboardMac::clearData):
(WebCore::ClipboardMac::clearAllData):
(WebCore::ClipboardMac::getData):
(WebCore::ClipboardMac::setData):
(WebCore::ClipboardMac::types):
(WebCore::ClipboardMac::files):
(WebCore::ClipboardMac::setDragImage):
* platform/qt/ClipboardQt.cpp:
(WebCore::ClipboardQt::clearData):
(WebCore::ClipboardQt::clearAllData):
(WebCore::ClipboardQt::getData):
(WebCore::ClipboardQt::setData):
(WebCore::ClipboardQt::types):
(WebCore::ClipboardQt::files):
(WebCore::ClipboardQt::setDragImage):
(WebCore::ClipboardQt::items):
* platform/qt/DataTransferItemListQt.cpp:
(WebCore::DataTransferItemListQt::length):
(WebCore::DataTransferItemListQt::item):
(WebCore::DataTransferItemListQt::deleteItem):
(WebCore::DataTransferItemListQt::clear):
(WebCore::DataTransferItemListQt::add):
* platform/qt/DataTransferItemQt.cpp:
(WebCore::DataTransferItemQt::getAsString):
* platform/win/ClipboardWin.cpp:
(WebCore::ClipboardWin::clearData):
(WebCore::ClipboardWin::clearAllData):
(WebCore::ClipboardWin::getData):
(WebCore::ClipboardWin::setData):
(WebCore::ClipboardWin::types):
(WebCore::ClipboardWin::files):
(WebCore::ClipboardWin::setDragImage):

LayoutTests:

* editing/pasteboard/can-read-in-copy-and-cut-events-expected.txt: Added.
* editing/pasteboard/can-read-in-copy-and-cut-events.html: Added.
* editing/pasteboard/can-read-in-dragstart-event-expected.txt: Added.
* editing/pasteboard/can-read-in-dragstart-event.html: Added.

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

6 years ago[Chromium] Test expectation after Skia changes
schenney@chromium.org [Fri, 22 Mar 2013 20:00:13 +0000 (20:00 +0000)]
[Chromium] Test expectation after Skia changes

Unreviewed expectations update.

Only the things failing on the bots, not already accounted for.

* platform/chromium-linux/fast/text/international/danda-space-expected.png:
* platform/chromium-mac-lion/fast/multicol/vertical-rl/nested-columns-expected.png:
* platform/chromium-mac-lion/fast/ruby/base-shorter-than-text-expected.png:
* platform/chromium-mac-lion/fast/text/emphasis-combined-text-expected.png:
* platform/chromium-mac-lion/fast/text/international/text-combine-image-test-expected.png:
* platform/chromium-mac-lion/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/chromium-mac-snowleopard/fast/multicol/vertical-rl/nested-columns-expected.png:
* platform/chromium-mac-snowleopard/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/chromium-mac/fast/multicol/vertical-rl/nested-columns-expected.png:
* platform/chromium-mac/fast/repaint/japanese-rl-selection-clear-expected.png:
* platform/chromium-mac/fast/repaint/japanese-rl-selection-clear-expected.txt: Added.
* platform/chromium-mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.png:
* platform/chromium-mac/fast/repaint/japanese-rl-selection-repaint-in-regions-expected.txt:
* platform/chromium-mac/fast/text/international/text-combine-image-test-expected.png:
* platform/chromium-mac/fast/writing-mode/Kusa-Makura-background-canvas-expected.png:
* platform/chromium/TestExpectations:

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

6 years ago[CSS Regions] Remove pushLayoutState(RenderFlowThread*) from RenderView
abucur@adobe.com [Fri, 22 Mar 2013 19:44:30 +0000 (19:44 +0000)]
[CSS Regions] Remove pushLayoutState(RenderFlowThread*) from RenderView
https://bugs.webkit.org/show_bug.cgi?id=113084

Reviewed by Dirk Schulze.

Remove void pushLayoutState(RenderFlowThread*, bool regionsChanged) from RenderView.h because it's not used.

Tests: Code cleanup. No tests needed.

* rendering/RenderView.h:
(RenderView):

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

6 years agoCheck focused node reference when traversing through history
commit-queue@webkit.org [Fri, 22 Mar 2013 19:34:23 +0000 (19:34 +0000)]
Check focused node reference when traversing through history
https://bugs.webkit.org/show_bug.cgi?id=113082

Patch by Nima Ghanavatian <nghanavatian@blackberry.com> on 2013-03-22
Reviewed by Rob Buis.

PR312101
Check if we have a valid node and document before attempting to access its frame and
frame selection. This is causing issues when going back to a page after a redirect
where a stale pointer is used.
Further, the focused node should be changed after the frame is fully loaded.

* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
(WebCore::FrameLoaderClientBlackBerry::dispatchDidFinishLoad):
* WebKitSupport/InputHandler.cpp:
(BlackBerry::WebKit::InputHandler::setElementUnfocused):
(BlackBerry::WebKit::InputHandler::restoreViewState):

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

6 years ago[EFL] Fix build issues to enable CSS Filter and Shaders support.
commit-queue@webkit.org [Fri, 22 Mar 2013 19:23:45 +0000 (19:23 +0000)]
[EFL] Fix build issues to enable CSS Filter and Shaders support.
https://bugs.webkit.org/show_bug.cgi?id=111274

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2013-03-22
Reviewed by Noam Rosenthal.

This is in preperation to enable CSS Filter and Shaders support.
This patch fixes related build issues to enable the support.

* platform/graphics/surfaces/efl/GLTransportSurface.cpp:
* platform/graphics/texmap/TextureMapper.cpp:
* platform/graphics/texmap/TextureMapper.h:
(WebCore):
* platform/graphics/texmap/TextureMapperGL.cpp:
* platform/graphics/texmap/TextureMapperGL.h:
(WebCore):
* platform/graphics/texmap/TextureMapperShaderProgram.h:

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

6 years ago[chromium] Remove Android platform expectations from Chromium TestExpectations.
pkasting@chromium.org [Fri, 22 Mar 2013 19:11:54 +0000 (19:11 +0000)]
[chromium] Remove Android platform expectations from Chromium TestExpectations.
(Too many bug URLs to list)

Unreivewed, test expectations update.

* platform/chromium/TestExpectations:

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

6 years agoImplement isEnabledFormControl() for SliderThumbElement and SpinButtonElement in...
falken@chromium.org [Fri, 22 Mar 2013 19:01:22 +0000 (19:01 +0000)]
Implement isEnabledFormControl() for SliderThumbElement and SpinButtonElement in terms of disabled()
https://bugs.webkit.org/show_bug.cgi?id=112993

Reviewed by Kent Tamura.

This is an intermediate step for refactoring Node::disabled and
Element::isEnabledFormControl. All classes that override
isEnabledFormControl just return !disabled(), except for
SliderThumbElement and SpinButtonElement. This patch changes those two
classes to do so, which shows that the two functions are redundant and
easy to refactor into a single function in a subsequent patch.

No new tests, there should be no behavior change.

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::disabled):
(WebCore):
(WebCore::SliderThumbElement::isEnabledFormControl):
* html/shadow/SliderThumbElement.h:
(SliderThumbElement):
* html/shadow/SpinButtonElement.h: The check of shadowHost() is
necessary because it can be detached by JavaScript that runs during
event handling (see r76566)

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

6 years ago[GTK] Include the right GL header for GLES2
mario@webkit.org [Fri, 22 Mar 2013 18:47:36 +0000 (18:47 +0000)]
[GTK] Include the right GL header for GLES2
https://bugs.webkit.org/show_bug.cgi?id=113034

Reviewed by Martin Robinson.

Include GLES2/gl2.h when using GLES2.

Source/WebKit/gtk:

* WebCoreSupport/AcceleratedCompositingContextGL.cpp:

Source/WebKit2:

* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:

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

6 years ago[BlackBerry] Hit Test doesn't need to be active
commit-queue@webkit.org [Fri, 22 Mar 2013 18:28:36 +0000 (18:28 +0000)]
[BlackBerry] Hit Test doesn't need to be active
https://bugs.webkit.org/show_bug.cgi?id=113072

Patch by Genevieve Mak <gmak@rim.com> on 2013-03-22
Reviewed by Rob Buis.

Reviewed Internally By Mike Lattanzio.
PR #306074

* WebKitSupport/ProximityDetector.cpp:
(BlackBerry::WebKit::ProximityDetector::findBestPoint):

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

6 years ago[chromium] Support Quota API in Worker
alecflett@chromium.org [Fri, 22 Mar 2013 18:27:02 +0000 (18:27 +0000)]
[chromium] Support Quota API in Worker
https://bugs.webkit.org/show_bug.cgi?id=112713

Hook up WebKit side of queryUsageAndQuota. Tests
and WebCore code will come in https://bugs.webkit.org/show_bug.cgi?id=112972

Reviewed by David Levin.

* WebKit.gyp:
* public/WebCommonWorkerClient.h:
(WebKit::WebCommonWorkerClient::queryUsageAndQuota):
* src/StorageQuotaChromium.cpp:
(WebCore::StorageQuota::queryUsageAndQuota):
(WebCore::StorageQuota::requestQuota):
* src/WebWorkerClientImpl.cpp:
(WebKit::WebWorkerClientImpl::queryUsageAndQuota):
(WebKit):
* src/WebWorkerClientImpl.h:
* src/WorkerStorageQuotaCallbacksBridge.cpp: Added.
(WebKit):
(MainThreadStorageQuotaCallbacks):
(WebKit::MainThreadStorageQuotaCallbacks::createLeakedPtr):
(WebKit::MainThreadStorageQuotaCallbacks::~MainThreadStorageQuotaCallbacks):
(WebKit::MainThreadStorageQuotaCallbacks::didQueryStorageUsageAndQuota):
(WebKit::MainThreadStorageQuotaCallbacks::didFail):
(WebKit::MainThreadStorageQuotaCallbacks::didGrantStorageQuota):
(WebKit::MainThreadStorageQuotaCallbacks::MainThreadStorageQuotaCallbacks):
(WorkerStorageQuotaContextObserver):
(WebKit::WorkerStorageQuotaContextObserver::create):
(WebKit::WorkerStorageQuotaContextObserver::notifyStop):
(WebKit::WorkerStorageQuotaContextObserver::WorkerStorageQuotaContextObserver):
(WebKit::WorkerStorageQuotaCallbacksBridge::stop):
(WebKit::WorkerStorageQuotaCallbacksBridge::cleanUpAfterCallback):
(WebKit::WorkerStorageQuotaCallbacksBridge::WorkerStorageQuotaCallbacksBridge):
(WebKit::WorkerStorageQuotaCallbacksBridge::~WorkerStorageQuotaCallbacksBridge):
(WebKit::WorkerStorageQuotaCallbacksBridge::postQueryUsageAndQuotaToMainThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::queryUsageAndQuotaOnMainThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::didFailOnMainThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::didQueryStorageUsageAndQuotaOnMainThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::didFailOnWorkerThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::didQueryStorageUsageAndQuotaOnWorkerThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::runTaskOnMainThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::runTaskOnWorkerThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::dispatchTaskToMainThread):
(WebKit::WorkerStorageQuotaCallbacksBridge::mayPostTaskToWorker):
* src/WorkerStorageQuotaCallbacksBridge.h: Added.
(WebCore):
(WebKit):
(WorkerStorageQuotaCallbacksBridge):
(WebKit::WorkerStorageQuotaCallbacksBridge::create):

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

6 years agoAdd a failure test expectation to media/track/track-user-preferences.html after r146380.
rniwa@webkit.org [Fri, 22 Mar 2013 18:13:36 +0000 (18:13 +0000)]
Add a failure test expectation to media/track/track-user-preferences.html after r146380.
The failure is tracked by the webkit.org/b/113083.

* platform/mac/TestExpectations:

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

6 years ago[Qt] New fast/text/word-space-with-kerning-3.html fails on Qt.
allan.jensen@digia.com [Fri, 22 Mar 2013 17:51:11 +0000 (17:51 +0000)]
[Qt] New fast/text/word-space-with-kerning-3.html fails on Qt.
https://bugs.webkit.org/show_bug.cgi?id=112668

Reviewed by Jocelyn Turcotte.

Source/WebCore:

Qt adds word-spacing to leading spaces, but WebCore only expects
us to add for trailing spaces. We only corrected for this in width
calculation but do need to also do it for drawing.

Instead of subtracting the extra word-spacing we now configure the
FormatRange not to apply to leading spaces. This means this behavior
will be applied everywhere reliably.

* platform/graphics/Font.h:
(Font):
* platform/graphics/qt/FontQt.cpp:
(WebCore::Font::drawComplexText):
(WebCore::Font::floatWidthForComplexText):
(WebCore::Font::offsetForPositionForComplexText):
(WebCore::Font::selectionRectForComplexText):
(WebCore::Font::initFormatForTextLayout):

LayoutTests:

* platform/qt/TestExpectations:

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

6 years agoREGRESSION (r146540?): Crashes in storage/indexeddb/factory-basics-workers.html,...
jsbell@chromium.org [Fri, 22 Mar 2013 17:41:26 +0000 (17:41 +0000)]
REGRESSION (r146540?): Crashes in storage/indexeddb/factory-basics-workers.html, storage/indexeddb/transaction-error.html
https://bugs.webkit.org/show_bug.cgi?id=113019

Reviewed by Tony Chang.

Also manifesting flakily under Chromium's content_shell. It's an ASSERT being hit in
the IDBTransaction destructor. The cause was r146540 which allows a stopped context
to reclaim script wrappers. This allows the IDBTransaction to be deref'd at times where
it previously would have just leaked. Modulate the destructor assertions to account
for this case.

No new tests; failures already manifest as flaky crashes in some ports.

* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::~IDBTransaction): If context is stopped, expected state
transitions/cleanup may not have occurred before destructor runs.

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

6 years agoIndexedDB: Histogram available disk space on attempt to open database
dgrogan@chromium.org [Fri, 22 Mar 2013 17:34:20 +0000 (17:34 +0000)]
IndexedDB: Histogram available disk space on attempt to open database
https://bugs.webkit.org/show_bug.cgi?id=112862

Reviewed by Tony Chang.

Source/Platform:

* chromium/public/Platform.h:
(WebKit::Platform::availableDiskSpaceInBytes):
(Platform):

Source/WebCore:

ChromeOS suspects they might be hitting disk corruption when the disks
are nearly full. This patch logs the available space to either the
"success" or the "fail" histogram as appropriate so that the
distributions can be compared.

No new tests - I don't know of a good way to test histograms. Local
printf testing didn't turn up any bugs.

* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::HistogramFreeSpace):
(WebCore):
(WebCore::LevelDBDatabase::open):

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

6 years ago[BlackBerry] Selection overlay clipped incorrectly
commit-queue@webkit.org [Fri, 22 Mar 2013 17:11:53 +0000 (17:11 +0000)]
[BlackBerry] Selection overlay clipped incorrectly
https://bugs.webkit.org/show_bug.cgi?id=113069

Patch by Andrew Lo <anlo@rim.com> on 2013-03-22
Reviewed by George Staikos.
Internally reviewed by Arvid Nilsson.

As a follow-up to r146278, the clip rect also needs to be
adjusted by the parent's offset when drawing the
selection overlay.

* WebKitSupport/SelectionOverlay.cpp:
(BlackBerry::WebKit::SelectionOverlay::paintContents):

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

6 years agoREGRESSION (r146239): Reproducible crash in WebCore::DocumentLoader::responseReceived.
japhet@chromium.org [Fri, 22 Mar 2013 17:05:12 +0000 (17:05 +0000)]
REGRESSION (r146239): Reproducible crash in WebCore::DocumentLoader::responseReceived.
https://bugs.webkit.org/show_bug.cgi?id=112811

Reviewed by Brady Eidson.

Source/WebCore:

Test: http/tests/cache/x-frame-options-304.html

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::responseReceived):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::switchClientsToRevalidatedResource):
* loader/cache/CachedRawResource.h:

LayoutTests:

* http/tests/cache/resources/x-frame-options.php: Added.
* http/tests/cache/x-frame-options-304-expected.txt: Added.
* http/tests/cache/x-frame-options-304.html: Added.

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

6 years agoLeak bots shouldn't build
rniwa@webkit.org [Fri, 22 Mar 2013 17:03:12 +0000 (17:03 +0000)]
Leak bots shouldn't build
https://bugs.webkit.org/show_bug.cgi?id=112774

Reviewed by Simon Fraser.

Since leak bots use regular debug builds, there is no need to build on these bots.
Simply downloading builds will dramatically improve the cycle time of these bots.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(TestLeaksFactory): Renamed from BuildAndTestLeaksFactory and changed to inherit from
TestFactory instead of BuildAndTestFactory.

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

6 years agoAdd flaky crash expectations on some media tests per bugs 113075 and 113076.
rniwa@webkit.org [Fri, 22 Mar 2013 16:58:59 +0000 (16:58 +0000)]
Add flaky crash expectations on some media tests per bugs 113075 and 113076.

* platform/win/TestExpectations:

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

6 years agoREGRESSION: -webkit-box-reflect does not show on video elements
jer.noble@apple.com [Fri, 22 Mar 2013 16:24:48 +0000 (16:24 +0000)]
REGRESSION: -webkit-box-reflect does not show on video elements
https://bugs.webkit.org/show_bug.cgi?id=112397

Reviewed by Eric Carlson.

Work around the ASSERTs generated when setting an AVPlayerLayer's player property
during a CA flush by setting the player property during the next runloop, outside
of a CA flush.

* platform/graphics/ca/mac/PlatformCALayerMac.mm:
(PlatformCALayer::clone):

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

6 years ago[Curl] Performance fix, avoid loading cookie file on every request.
commit-queue@webkit.org [Fri, 22 Mar 2013 16:22:26 +0000 (16:22 +0000)]
[Curl] Performance fix, avoid loading cookie file on every request.
https://bugs.webkit.org/show_bug.cgi?id=113023

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-03-22
Reviewed by Brent Fulgham.

We currently load the cookie file on every request, and when setting cookies from JavaScript, by using the option CURLOPT_COOKIEFILE.
This is very inefficient as the cookie file can get quite large, and file I/O is slow.
It is sufficient to load the cookie file on startup, as we use a shared cookie database between the requests.

* platform/network/curl/CookieJarCurl.cpp:
(WebCore::setCookiesFromDOM): Avoid loading cookie file when setting cookies from JavaScript.
* platform/network/curl/ResourceHandleManager.cpp:
(WebCore::ResourceHandleManager::initializeHandle): Avoid loading cookie file on every request.
(WebCore::ResourceHandleManager::initCookieSession): Load the cookie file to shared database on startup.

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

6 years ago[BlackBerry] Update Input field Background Color
commit-queue@webkit.org [Fri, 22 Mar 2013 16:08:54 +0000 (16:08 +0000)]
[BlackBerry] Update Input field Background Color
https://bugs.webkit.org/show_bug.cgi?id=113063

Patch by Tiancheng Jiang <tijiang@rim.com> on 2013-03-22
Reviewed by George Staikos.

RIM PR 307463.
Internally reviewed by Ed Baker.

* platform/blackberry/RenderThemeBlackBerry.cpp:
(WebCore::RenderThemeBlackBerry::paintTextFieldOrTextAreaOrSearchField):

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

6 years agoWeb Inspector: FlameChart. Draw function names over flame chart bar if they fit into...
loislo@chromium.org [Fri, 22 Mar 2013 15:56:22 +0000 (15:56 +0000)]
Web Inspector: FlameChart. Draw function names over flame chart bar if they fit into the bar.
https://bugs.webkit.org/show_bug.cgi?id=113052

Reviewed by Vsevolod Vlasov.

The draw function will draw the bar title if the text is less than bar width.
Unfortunately almost all the projects which need to be profiled
use long function names with dots. So if the function name has dots and
doesn't fit into the space then prepareTitle will try to drop the prefix before dot.
If the title has no dots then the function will strip the tail of the title.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart):
(WebInspector.FlameChart.prototype.draw):
(WebInspector.FlameChart.prototype._prepareTitle):

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

6 years agoUnreviewed. Update test expectations for a bunch of softwarecompositing tests.
yurys@chromium.org [Fri, 22 Mar 2013 15:55:11 +0000 (15:55 +0000)]
Unreviewed. Update test expectations for a bunch of softwarecompositing tests.

* platform/chromium/TestExpectations:

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

6 years agoWeb Inspector: Add "hidden" attribute to the recently added APIs in Inspector.json
commit-queue@webkit.org [Fri, 22 Mar 2013 15:44:51 +0000 (15:44 +0000)]
Web Inspector: Add "hidden" attribute to the recently added APIs in Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=113061

Added "hidden": true to the APIs introduced since version 1.0.

Patch by Vladislav Kaznacheev <kaznacheev@chromium.org> on 2013-03-22
Reviewed by Pavel Feldman.

* inspector/Inspector.json:

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

6 years agoSource/WebKit/chromium: Skia flag removal to enable bug fixes and performance improve...
schenney@chromium.org [Fri, 22 Mar 2013 15:39:31 +0000 (15:39 +0000)]
Source/WebKit/chromium: Skia flag removal to enable bug fixes and performance improvements.

Unreviewed code enabling.

* skia_webkit.gyp:

LayoutTests: Enabling Skia features/modifications.

Unreviewed Chromium expectations, all of which will be removed later today.

* platform/chromium/TestExpectations:

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

6 years agoWeb Inspector: Correctly implement scrollToLine, revealLine and setSelection on CodeM...
vsevik@chromium.org [Fri, 22 Mar 2013 15:22:50 +0000 (15:22 +0000)]
Web Inspector: Correctly implement scrollToLine, revealLine and setSelection on CodeMirror  editor.
https://bugs.webkit.org/show_bug.cgi?id=113028

Reviewed by Pavel Feldman.

Added focus event handler to CodeMirror editor view elememnt to support inspector's focus model.
Added selection and scroll listeners to correctly save editor scroll and selection in history.
Implemented revealLine, scrollToLine and setSelection.
Note: CodeMirror's coordsChar method does not work correctly in "local" mode, implemented as binary search
as a temporary workaround.

* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor):
(WebInspector.CodeMirrorTextEditor.prototype.defaultFocusedElement):
(WebInspector.CodeMirrorTextEditor.prototype._handleElementFocus):
(WebInspector.CodeMirrorTextEditor.prototype.revealLine):
(WebInspector.CodeMirrorTextEditor.prototype._coordsChar):
(WebInspector.CodeMirrorTextEditor.prototype._topScrolledLine):
(WebInspector.CodeMirrorTextEditor.prototype._bottomScrolledLine):
(WebInspector.CodeMirrorTextEditor.prototype._scroll):
(WebInspector.CodeMirrorTextEditor.prototype._selectionChange):
(WebInspector.CodeMirrorTextEditor.prototype.scrollToLine):
(WebInspector.CodeMirrorTextEditor.prototype.setSelection):
(WebInspector.CodeMirrorTextEditor.prototype.copyRange):
* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor.prototype.copyRange):

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

6 years agoWeb Inspector: [Regression] Editor scroll is not restored after inspector reload.
vsevik@chromium.org [Fri, 22 Mar 2013 15:16:27 +0000 (15:16 +0000)]
Web Inspector: [Regression] Editor scroll is not restored after inspector reload.
https://bugs.webkit.org/show_bug.cgi?id=113027

Reviewed by Pavel Feldman.

* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame.prototype.wasShown):
(WebInspector.SourceFrame.prototype._isEditorShowing):
(WebInspector.SourceFrame.prototype._innerHighlightLineIfNeeded):
(WebInspector.SourceFrame.prototype._innerRevealLineIfNeeded):
(WebInspector.SourceFrame.prototype._innerScrollToLineIfNeeded):
(WebInspector.SourceFrame.prototype._innerSetSelectionIfNeeded):

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

6 years ago[Qt] Fix build with OPENCL 1.2
allan.jensen@digia.com [Fri, 22 Mar 2013 15:04:10 +0000 (15:04 +0000)]
[Qt] Fix build with OPENCL 1.2
https://bugs.webkit.org/show_bug.cgi?id=113056

Reviewed by Kenneth Rohde Christiansen.

Switch qmake checks to the modern style which means we can enable OpenCL with
WEBKIT_CONFIG+=opencl.

Upgrade OpenCL 1.1 clCreateImage2D to OpenCL 1.2 clCreateImage calls.

* Target.pri:
* WebCore.pri:
* platform/graphics/filters/FilterEffect.cpp:
(WebCore::FilterEffect::createOpenCLImageResult):
* platform/graphics/gpu/opencl/FilterContextOpenCL.cpp:
(WebCore::FilterContextOpenCL::createOpenCLImage):

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

6 years agoTelugu [te] language translation submission for WebKitGTK+ HEAD
kov@webkit.org [Fri, 22 Mar 2013 14:54:05 +0000 (14:54 +0000)]
Telugu [te] language translation submission for WebKitGTK+ HEAD
https://bugs.webkit.org/show_bug.cgi?id=103052

Patch by Krishnababu Krothapalli <kkrothap@redhat.com> on 2013-03-22
Reviewed by Gustavo Noronha Silva (kov).

* te.po: Added.

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

6 years agoUnreviewed chromium rebaselines for r146600.
eae@chromium.org [Fri, 22 Mar 2013 14:45:18 +0000 (14:45 +0000)]
Unreviewed chromium rebaselines for r146600.

* platform/chromium-mac-lion/fast/text/international/bidi-layout-across-linebreak-expected.txt: Removed.
* platform/chromium-mac-lion/fast/transforms/bounding-rect-zoom-expected.txt: Removed.
* platform/chromium-mac-snowleopard/tables/mozilla_expected_failures/bugs/bug89315-expected.txt: Added.
* platform/chromium-mac/fast/text/international/bidi-layout-across-linebreak-expected.png:
* platform/chromium-mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/chromium-mac/fast/transforms/bounding-rect-zoom-expected.txt:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug89315-expected.png:
* platform/chromium-mac/tables/mozilla_expected_failures/bugs/bug89315-expected.txt:
* platform/chromium-win/fast/text/international/bidi-layout-across-linebreak-expected.png:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug89315-expected.png:

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

6 years ago[GTK][AC] Opacity animation doesn't work with clutter backend
commit-queue@webkit.org [Fri, 22 Mar 2013 14:42:16 +0000 (14:42 +0000)]
[GTK][AC] Opacity animation doesn't work with clutter backend
https://bugs.webkit.org/show_bug.cgi?id=110347

Patch by ChangSeok Oh <changseok.oh@collabora.com> on 2013-03-22
Reviewed by Gustavo Noronha Silva.

The static casting in ternary operator doesn't change actual inputted argument type.
So I replaced it with if-else statement.

Covered by existing animation tests.

* platform/graphics/clutter/PlatformClutterAnimation.cpp:
(WebCore::PlatformClutterAnimation::addClutterTransitionForProperty):
(WebCore::PlatformClutterAnimation::addClutterKeyframeTransitionForProperty):

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

6 years ago[GTK][AC] Add removing animations procedure with clutter ac backend
commit-queue@webkit.org [Fri, 22 Mar 2013 14:38:31 +0000 (14:38 +0000)]
[GTK][AC] Add removing animations procedure with clutter ac backend
https://bugs.webkit.org/show_bug.cgi?id=110607

Patch by ChangSeok Oh <changseok.oh@collabora.com> on 2013-03-22
Reviewed by Gustavo Noronha Silva.

This changes is based on mac port implementation. The only different thing is
that updateAnimations is called explicitly in destructor of GraphicsLayerClutter
to remove uncommitted animations. Because even though we call notifyFlushRequired
to remove existing animations in removeAnimation(), removeClutterAnimationFromLayer
has been never reached since the root layer is destroyed before. It means
that we haven't lost a change to remove actual animations from clutterActor.

Covered by existing animation tests.

* platform/graphics/clutter/GraphicsLayerClutter.cpp:
(WebCore::GraphicsLayerClutter::~GraphicsLayerClutter):
(WebCore::GraphicsLayerClutter::removeAnimation):
(WebCore):
(WebCore::GraphicsLayerClutter::removeClutterAnimationFromLayer):
* platform/graphics/clutter/GraphicsLayerClutter.h:
(WebCore::GraphicsLayerClutter::animationIsRunning):
(GraphicsLayerClutter):

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

6 years ago[EFL][WebGL] Optimize AlphaOp for HTMLVideoElement input.
commit-queue@webkit.org [Fri, 22 Mar 2013 14:28:56 +0000 (14:28 +0000)]
[EFL][WebGL] Optimize AlphaOp for HTMLVideoElement input.
https://bugs.webkit.org/show_bug.cgi?id=113049

Patch by Kondapally Kalyan <kalyan.kondapally@intel.com> on 2013-03-22
Reviewed by Kenneth Rohde Christiansen.

Covered by existing tests.

Changeset 137397 implemented optimisation to avoid any
unnecessary Unmultiply or Premultiply operation in unpack/pack
provided the Image source is from HTMLVideoElement. This patch
enables the same for EFL port.

* platform/graphics/efl/GraphicsContext3DEfl.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):

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

6 years agoUnreviewed chromium and apple mac rebaselines for r146600.
eae@chromium.org [Fri, 22 Mar 2013 14:27:46 +0000 (14:27 +0000)]
Unreviewed chromium and apple mac rebaselines for r146600.

* platform/chromium-mac-lion/fast/text/international/bidi-layout-across-linebreak-expected.png:
* platform/chromium-mac-lion/fast/text/international/bidi-layout-across-linebreak-expected.txt: Added.
* platform/chromium-mac-lion/fast/transforms/bounding-rect-zoom-expected.txt: Added.
* platform/chromium-mac-lion/tables/mozilla_expected_failures/bugs/bug89315-expected.png:
* platform/chromium-mac-lion/tables/mozilla_expected_failures/bugs/bug89315-expected.txt: Added.
* platform/chromium-mac-snowleopard/fast/text/international/bidi-layout-across-linebreak-expected.png:
* platform/chromium-mac-snowleopard/tables/mozilla_expected_failures/bugs/bug89315-expected.png:
* platform/chromium-win/fast/text/international/bidi-layout-across-linebreak-expected.txt: Removed.
* platform/chromium-win/fast/transforms/bounding-rect-zoom-expected.txt: Removed.
* platform/chromium/fast/text/international/bidi-layout-across-linebreak-expected.txt: Added.
* platform/chromium/fast/transforms/bounding-rect-zoom-expected.txt: Added.
* platform/mac/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/mac/fast/transforms/bounding-rect-zoom-expected.txt:

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

6 years agoFix an assert when opening the Web Inspector window for the first time.
timothy@apple.com [Fri, 22 Mar 2013 14:24:50 +0000 (14:24 +0000)]
Fix an assert when opening the Web Inspector window for the first time.

rdar://problem/13471765
https://webkit.org/b/113053

Reviewed by Eric Carlson.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Assign m_inspectorWindow
earlier so it is ready for when center is called and windowDidMove: gets called.

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

6 years agoBUILD FIX (r146558): Build testapi.mm with ARC enabled for armv7s
ddkilzer@apple.com [Fri, 22 Mar 2013 14:22:21 +0000 (14:22 +0000)]
BUILD FIX (r146558): Build testapi.mm with ARC enabled for armv7s
<http://webkit.org/b/112608>

Fixes the following build failure:

    Source/JavaScriptCore/API/tests/testapi.mm:205:1: error: method possibly missing a [super dealloc] call [-Werror,-Wobjc-missing-super-calls]
    }
    ^
    1 error generated.

* Configurations/ToolExecutable.xcconfig: Enable ARC for armv7s
architecture.

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

6 years agoRevert "BUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc]"
ddkilzer@apple.com [Fri, 22 Mar 2013 13:53:37 +0000 (13:53 +0000)]
Revert "BUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc]"

This fixes a build failure introduced by this change:

    Source/JavaScriptCore/API/tests/testapi.mm:206:6: error: ARC forbids explicit message send of 'dealloc'
        [super dealloc];
         ^     ~~~~~~~
    1 error generated.

Not sure why this didn't fail locally on my Mac Pro.

* API/tests/testapi.mm:
(-[TinyDOMNode dealloc]): Remove call to [super dealloc].

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

6 years ago[Qt] Unreviewed gardening. Missed one in r146589.
zarvai@inf.u-szeged.hu [Fri, 22 Mar 2013 13:46:45 +0000 (13:46 +0000)]
[Qt] Unreviewed gardening. Missed one in r146589.

* platform/qt/compositing/overflow/composited-scrolling-paint-phases-expected.txt: Rebaselining after r146531.

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

6 years agoSource/WebCore: Clean up the speech recognintion API
tommyw@google.com [Fri, 22 Mar 2013 13:43:08 +0000 (13:43 +0000)]
Source/WebCore: Clean up the speech recognintion API
https://bugs.webkit.org/show_bug.cgi?id=112916

Reviewed by Adam Barth.

This patch cleans away deprecated parts, fixes so that stop() can be called more than once and adds
the missing emma attribute on SpeechRecognitionEvent (which is always null).

Patch covered by existing tests.

* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::stopFunction):
(WebCore::SpeechRecognition::abort):
(WebCore::SpeechRecognition::didEnd):
(WebCore::SpeechRecognition::SpeechRecognition):
* Modules/speech/SpeechRecognition.h:
(SpeechRecognition):
* Modules/speech/SpeechRecognitionEvent.cpp:
(WebCore::SpeechRecognitionEvent::createResult):
(WebCore::SpeechRecognitionEvent::createNoMatch):
(WebCore::SpeechRecognitionEvent::SpeechRecognitionEvent):
* Modules/speech/SpeechRecognitionEvent.h:
(WebCore):
(SpeechRecognitionEventInit):
(SpeechRecognitionEvent):
(WebCore::SpeechRecognitionEvent::emma):
* Modules/speech/SpeechRecognitionEvent.idl:

Source/WebKit/chromium: Clean up the speach recognintion API
https://bugs.webkit.org/show_bug.cgi?id=112916

Reviewed by Adam Barth.

* public/WebSpeechRecognizerClient.h:
* src/SpeechRecognitionClientProxy.cpp:
* src/SpeechRecognitionClientProxy.h:
(SpeechRecognitionClientProxy):

LayoutTests: Clean up the speech recognintion API
https://bugs.webkit.org/show_bug.cgi?id=112916

Reviewed by Adam Barth.

* fast/events/constructors/speech-recognition-event-constructor-expected.txt:
* fast/events/constructors/speech-recognition-event-constructor.html:

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

6 years agoFloor cell widths in AutoTableLayout::recalcColumn
eae@chromium.org [Fri, 22 Mar 2013 13:40:57 +0000 (13:40 +0000)]
Floor cell widths in AutoTableLayout::recalcColumn
https://bugs.webkit.org/show_bug.cgi?id=112922

Reviewed by Levi Weintraub.

Source/WebCore:

Table cells widths are floored to ensure even distribution of available
space across columns. The code path that computes the width of the
_table_ failed to take this into account and thus can over report the
total width of the table.

Test: fast/sub-pixel/table-with-subpixel-cell-size.html

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn): Floor width to match column sizing logic.

LayoutTests:

Add test for table with subpixel cells and update existing baselines as needed.

* fast/sub-pixel/table-with-subpixel-cell-size-expected.html: Added.
* fast/sub-pixel/table-with-subpixel-cell-size.html: Added.
* platform/chromium-linux/fast/text/international/bidi-layout-across-linebreak-expected.png:
* platform/chromium-linux/tables/mozilla_expected_failures/bugs/bug89315-expected.png:
* platform/chromium-win/fast/text/international/bidi-layout-across-linebreak-expected.txt:
* platform/chromium-win/fast/transforms/bounding-rect-zoom-expected.txt:
* platform/chromium-win/tables/mozilla_expected_failures/bugs/bug89315-expected.txt:

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

6 years agoBUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc]
ddkilzer@apple.com [Fri, 22 Mar 2013 13:35:00 +0000 (13:35 +0000)]
BUILD FIX (r146558): Call [super dealloc] from -[TinyDOMNode dealloc]
<http://webkit.org/b/112608>

Fixes the following build failure:

    Source/JavaScriptCore/API/tests/testapi.mm:205:1: error: method possibly missing a [super dealloc] call [-Werror,-Wobjc-missing-super-calls]
    }
    ^
    1 error generated.

* API/tests/testapi.mm:
(-[TinyDOMNode dealloc]): Call [super dealloc].

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

6 years agoBUILD FIX (r146208): Export shouldPrintExceptions methods for iOS
ddkilzer@apple.com [Fri, 22 Mar 2013 13:27:23 +0000 (13:27 +0000)]
BUILD FIX (r146208): Export shouldPrintExceptions methods for iOS

Fixes the following build failure:

    Undefined symbols for architecture i386:
      "__ZN7WebCore11PageConsole24setShouldPrintExceptionsEb", referenced from:
            +[WebCoreStatistics setShouldPrintExceptions:] in WebCoreStatistics.o
      "__ZN7WebCore11PageConsole21shouldPrintExceptionsEv", referenced from:
            +[WebCoreStatistics shouldPrintExceptions] in WebCoreStatistics.o
    ld: symbol(s) not found for architecture i386
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

* WebCore.exp.in: Move symbols so they're exported for iOS as
well.

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

6 years ago[BlackBerry] Add custom BackForwardList client implementation
commit-queue@webkit.org [Fri, 22 Mar 2013 13:18:22 +0000 (13:18 +0000)]
[BlackBerry] Add custom BackForwardList client implementation
https://bugs.webkit.org/show_bug.cgi?id=113024

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2013-03-22
Reviewed by Rob Buis.

PR 310030
Internally reviewed by Joe Mason.

Source/WebKit:

* PlatformBlackBerry.cmake: Add new files to compilation.

Source/WebKit/blackberry:

Adds a new class BackForwardListBlackBerry that implements
BackForwardList client and wraps the BackForwardListImpl including
the BlackBerry specific changes to notify the API layer when the
BackForwardList changes.

* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::init): Create a
BackForwardListBlackBerry.
(BlackBerry::WebKit::WebPage::getBackForwardList): Use
BackForwardListBlackBerry instead of BackForwardListImpl.
(BlackBerry::WebKit::WebPage::clearBackForwardList): Ditto.
* WebCoreSupport/BackForwardListBlackBerry.cpp: Added.
(WebCore):
(WebCore::BackForwardListBlackBerry::BackForwardListBlackBerry):
(WebCore::BackForwardListBlackBerry::~BackForwardListBlackBerry):
(WebCore::BackForwardListBlackBerry::current):
(WebCore::BackForwardListBlackBerry::notifyBackForwardListChanged):
(WebCore::BackForwardListBlackBerry::addItem):
(WebCore::BackForwardListBlackBerry::goToItem):
(WebCore::BackForwardListBlackBerry::itemAtIndex):
(WebCore::BackForwardListBlackBerry::backListCount):
(WebCore::BackForwardListBlackBerry::forwardListCount):
(WebCore::BackForwardListBlackBerry::isActive):
(WebCore::BackForwardListBlackBerry::close):
(WebCore::BackForwardListBlackBerry::clear):
(WebCore::BackForwardListBlackBerry::entries):
(WebCore::BackForwardListBlackBerry::currentItem):
* WebCoreSupport/BackForwardListBlackBerry.h: Added.
(WebKit):
(WebCore):
(BackForwardListBlackBerry):
(WebCore::BackForwardListBlackBerry::create):
* WebCoreSupport/FrameLoaderClientBlackBerry.cpp:
* WebCoreSupport/FrameLoaderClientBlackBerry.h:
(FrameLoaderClientBlackBerry):

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

6 years ago[kn] Kannada Translation for webkit
kov@webkit.org [Fri, 22 Mar 2013 12:29:21 +0000 (12:29 +0000)]
[kn] Kannada Translation for webkit
https://bugs.webkit.org/show_bug.cgi?id=106301

Patch by Shankar Prasad <svenkate@redhat.com> on 2013-03-22
Reviewed by Gustavo Noronha Silva (kov).

* kn.po: Added.

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

6 years ago[Qt] Fix the TestWebKitAPI build
jocelyn.turcotte@digia.com [Fri, 22 Mar 2013 12:24:48 +0000 (12:24 +0000)]
[Qt] Fix the TestWebKitAPI build
https://bugs.webkit.org/show_bug.cgi?id=113044

Reviewed by Tor Arne Vestbø.

The generate-forwarding-headers script would only be run
after the targets in InjectedBundle.pri since the second
addStrictSubdirOrderBetween call in
Tools/TestWebKitAPI/TestWebKitAPI.pro would overwrite
the derived_sources -> injected_bundle order in SUBDIRS.

Fix it by only moving the dependent target at the end of
SUBDIRS, don't touch its dependency.

* qmake/mkspecs/features/functions.prf:

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

6 years agoUnreviewed. Fix Chromium Win compilation after r146583.
yurys@chromium.org [Fri, 22 Mar 2013 12:14:09 +0000 (12:14 +0000)]
Unreviewed. Fix Chromium Win compilation after r146583.

* bindings/v8/CustomElementHelpers.cpp:
(WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):

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

6 years agoWeb Inspector: Flame Chart. Chart has to be zoomed around the mouse pointer.
loislo@chromium.org [Fri, 22 Mar 2013 12:04:53 +0000 (12:04 +0000)]
Web Inspector: Flame Chart. Chart has to be zoomed around the mouse pointer.
https://bugs.webkit.org/show_bug.cgi?id=113031

Reviewed by Yury Semikhatsky.

Overview grid is able to zoom around the mouse pointer.
So the simplest way is to translate x coordinate of the mouse pointer hovered over the chart
to x coordinate in term of overview window and pass it to the zoom function.

Minor unrelated fix: draw small border at bottom of the overview grid.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart.prototype._onMouseWheel):
* inspector/front-end/OverviewGrid.js:
(WebInspector.OverviewGrid.prototype.zoom):
* inspector/front-end/flameChart.css:
(#flame-chart-overview-container):

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

6 years ago[Texmap] TextureMapperImageBuffer should not use rendering code for filters.
commit-queue@webkit.org [Fri, 22 Mar 2013 11:58:21 +0000 (11:58 +0000)]
[Texmap] TextureMapperImageBuffer should not use rendering code for filters.
https://bugs.webkit.org/show_bug.cgi?id=113040

Patch by No'am Rosenthal <noam@webkit.org> on 2013-03-22
Reviewed by Kenneth Rohde Christiansen.

Disable TextureMapperImageBuffer filters, until they can be done the right way.
This should only disrupt accelerated filters in fallback mode, which is a very rare
use case.

No new testable functionality.

* platform/graphics/texmap/TextureMapperImageBuffer.cpp:
(WebCore::BitmapTextureImageBuffer::applyFilters):

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

6 years ago[Qt] Unreviewed gardening. Rebaselining after r146469 and r146531. Cleaning up duplic...
zarvai@inf.u-szeged.hu [Fri, 22 Mar 2013 11:54:23 +0000 (11:54 +0000)]
[Qt] Unreviewed gardening. Rebaselining after r146469 and r146531. Cleaning up duplicated expecteds.

* platform/qt-5.0-wk1/compositing/iframes/iframe-size-from-zero-expected.txt:
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt: Removed.
* platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt: Removed.
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-absolute-overflow-expected.png: Removed.
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png: Removed.
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-fixed-overflow-expected.png: Removed.
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png: Removed.
* platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt: Removed.
* platform/qt/compositing/rtl/rtl-iframe-absolute-overflow-expected.png: Renamed from LayoutTests/platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-absolute-overflow-expected.png.
* platform/qt/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt: Renamed from LayoutTests/platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-absolute-overflow-expected.txt.
* platform/qt/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png: Renamed from LayoutTests/platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.png.
* platform/qt/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt: Renamed from LayoutTests/platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-absolute-overflow-scrolled-expected.txt.
* platform/qt/compositing/rtl/rtl-iframe-fixed-overflow-expected.png: Renamed from LayoutTests/platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-fixed-overflow-expected.png.
* platform/qt/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt: Renamed from LayoutTests/platform/qt-5.0-wk2/compositing/rtl/rtl-iframe-fixed-overflow-expected.txt.
* platform/qt/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png: Renamed from LayoutTests/platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.png.
* platform/qt/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt: Renamed from LayoutTests/platform/qt-5.0-wk1/compositing/rtl/rtl-iframe-fixed-overflow-scrolled-expected.txt.
* platform/qt/css3/filters/effect-reference-expected.txt:

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

6 years agoWeb Inspector: Report more CSS errors
commit-queue@webkit.org [Fri, 22 Mar 2013 11:26:57 +0000 (11:26 +0000)]
Web Inspector: Report more CSS errors
https://bugs.webkit.org/show_bug.cgi?id=113022

Patch by Sergey Ryazanov <serya@chromium.org> on 2013-03-22
Reviewed by Pavel Feldman.

Source/WebCore:

Reporting next few CSS syntax errors in declaration_list.

* css/CSSGrammar.y.in:

LayoutTests:

* inspector/console/console-css-warnings-expected.txt:
* inspector/console/console-css-warnings.html:

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

6 years agoWeb Inspector: use individual samples to construct CPU profile flame chart
yurys@chromium.org [Fri, 22 Mar 2013 11:00:50 +0000 (11:00 +0000)]
Web Inspector: use individual samples to construct CPU profile flame chart
https://bugs.webkit.org/show_bug.cgi?id=112569

Reviewed by Pavel Feldman.

Added an optional array of samples to the CPU profile returned over the
protocol. Each sample is id of the profile node corresponding to the top frame
of the sample's stack trace. The array of samples if present is used to draw
the flame chart on the CPU profile panel, otherwise flame chart is drawn based
on the aggregated profile data.

* bindings/js/ScriptProfile.cpp:
(WebCore::ScriptProfile::buildInspectorObjectForSamples):
* bindings/js/ScriptProfile.h:
(ScriptProfile):
* bindings/v8/ScriptProfile.cpp:
(WebCore::buildInspectorObjectFor):
(WebCore):
(WebCore::ScriptProfile::buildInspectorObjectForSamples):
* bindings/v8/ScriptProfile.h:
(ScriptProfile):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::start):
* inspector/Inspector.json:
* inspector/InspectorProfilerAgent.cpp:
(WebCore::InspectorProfilerAgent::getCPUProfile):
* inspector/front-end/CPUProfileView.js:
(WebInspector.CPUProfileView.prototype._getCPUProfileCallback):
(WebInspector.CPUProfileView.prototype._buildIdToNodeMap):
* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart.prototype._calculateTimelineData):

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

6 years agoCannot run All Source (target WebProcess) on Xcode.
commit-queue@webkit.org [Fri, 22 Mar 2013 10:34:33 +0000 (10:34 +0000)]
Cannot run All Source (target WebProcess) on Xcode.
https://bugs.webkit.org/show_bug.cgi?id=111042

Patch by Yuki Sekiguchi <yuki.sekiguchi@access-company.com> on 2013-03-22
Reviewed by Alexey Proskuryakov.

WebProcessShim is renamed by r139066.
However, WebProcessShim is not renamed to SecItemShim in WebKit.xcworkspace.
This make WebProcess.app load WebProcessShim.dylib, and it cause dyld loading error.

* WebKit.xcworkspace/xcshareddata/xcschemes/All Source (target WebProcess).xcscheme: Renamed WebProcessShim to SecItemShim.

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

6 years agoUse generated bindings for the Coordinates type used by Geolocation
commit-queue@webkit.org [Fri, 22 Mar 2013 10:08:55 +0000 (10:08 +0000)]
Use generated bindings for the Coordinates type used by Geolocation
https://bugs.webkit.org/show_bug.cgi?id=112975

Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
Reviewed by Kentaro Hara.

No new tests, refactoring only.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Modules/geolocation/Coordinates.cpp: Renamed from Source/WebCore/bindings/js/JSCoordinatesCustom.cpp.
(WebCore):
(WebCore::Coordinates::altitude):
(WebCore::Coordinates::altitudeAccuracy):
(WebCore::Coordinates::heading):
(WebCore::Coordinates::speed):
* Modules/geolocation/Coordinates.h:
(Coordinates):
* Modules/geolocation/Coordinates.idl:
* Target.pri:
* UseJSC.cmake:
* UseV8.cmake:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/v8/custom/V8CoordinatesCustom.cpp: Removed.

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

6 years agoINPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default
commit-queue@webkit.org [Fri, 22 Mar 2013 10:04:16 +0000 (10:04 +0000)]
INPUT_MULTIPLE_FIELDS_UI: Incomplete datetime format should fallback to default
https://bugs.webkit.org/show_bug.cgi?id=113005

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> on 2013-03-22
Reviewed by Kent Tamura.

Source/WebCore:

Use fallback format when datetime format from locale is not complete.

Tests: fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html
       fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html
       fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html
       fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html
       fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html
       fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html

* html/BaseMultipleFieldsDateAndTimeInputType.cpp:
(DateTimeFormatValidator): A helper class that parses datetime format and tests existence of fields.
(WebCore::DateTimeFormatValidator::DateTimeFormatValidator):
(WebCore::DateTimeFormatValidator::visitField):
(WebCore::DateTimeFormatValidator::validateFormat): Parses datetime format and validates by calling BaseMultipleFieldsDateAndTimeInputType::isValidFormat.
(WebCore::BaseMultipleFieldsDateAndTimeInputType::updateInnerTextValue): Checks if dateTimeFormat is valid, and uses fallback format if not.
* html/BaseMultipleFieldsDateAndTimeInputType.h:
(BaseMultipleFieldsDateAndTimeInputType): Declare isValidFormat.
* html/DateInputType.cpp:
(WebCore::DateInputType::isValidFormat): Added.
* html/DateInputType.h:
(DateInputType):
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::isValidFormat): Added.
* html/DateTimeInputType.h:
(DateTimeInputType):
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::isValidFormat): Added.
* html/DateTimeLocalInputType.h:
(DateTimeLocalInputType):
* html/MonthInputType.cpp:
(WebCore::MonthInputType::isValidFormat): Added.
* html/MonthInputType.h:
(MonthInputType):
* html/TimeInputType.cpp:
(WebCore::TimeInputType::isValidFormat): Added.
* html/TimeInputType.h:
(TimeInputType):
* html/WeekInputType.cpp:
(WebCore::WeekInputType::isValidFormat): Added.
* html/WeekInputType.h:
(WeekInputType):

LayoutTests:

* fast/forms/date-multiple-fields/date-multiple-fields-fallback-format-expected.txt: Added.
* fast/forms/date-multiple-fields/date-multiple-fields-fallback-format.html: Added.
* fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format-expected.txt: Added.
* fast/forms/datetime-multiple-fields/datetime-multiple-fields-fallback-format.html: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format-expected.txt: Added.
* fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-fallback-format.html: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-fallback-format-expected.txt: Added.
* fast/forms/month-multiple-fields/month-multiple-fields-fallback-format.html: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-fallback-format-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-fallback-format.html: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-fallback-format-expected.txt: Added.
* fast/forms/week-multiple-fields/week-multiple-fields-fallback-format.html: Added.

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

6 years agoCustom Elements: "readyCallback" lifecycle callback should be called.
morrita@google.com [Fri, 22 Mar 2013 09:54:06 +0000 (09:54 +0000)]
Custom Elements: "readyCallback" lifecycle callback should be called.
https://bugs.webkit.org/show_bug.cgi?id=112538

Reviewed by Elliott Sprehn.

Source/WebCore:

This change allows each custom element definition to hook up its instantiation,
namely "readyCallback" lifecycle callback.

The change has two parts:
- 1. Tracking which Element objects to be created.
- 2. Invoking appropriate JavaScript functions, which are readyCallback(),
  before the Element object is visible from page script.

For 1, CustomElementRegistry maintains list of "callback
invocaions".  Each list item ("invocation") tracks the element
which has a lifecycle callback to be invoked. Each invocation is
registered when - Any custom element C++ object is instantiated.
See changes on CustomElementConstructor.cpp.

This also happens when @is attribute is set by the parser or node
cloning routine, which can turn a non-custom element into a
type-extended custom element. See changes on Element.cpp.

For 2, CustomElementRegistry basically follows what
MutationObserver is doing, and introduces a method called
deliverLifecycleCallbacks(). This function flushes all pending
callback invocations. You can think it as a dual of
MutationObserver::deliverAllMutations().

The delivery function is called places where MutationObserver's
deliverAllMutations() is called. In addition, it is also called
just before returning from a set of DOM APIs. For example, it is
called just before createElement() returns, so that possibly
created custom element becomes ready through its readyCallback().
Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
principle, APIs which can create new custom element instnaces are
marked. See CustomElementRegistry::CallbackDeliveryScope and
changes on CodeGeneratorV8.pm.

We need this extra work because the readyCallback() needs to give
an illusion so that JavaScript programmers feel like the
readyCallback() callback being called just after it is created,
instead of called on arbitrary late timing like MutationObserver
notifications.

Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
       fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
       fast/dom/custom/lifecycle-ready-creation-api.html
       fast/dom/custom/lifecycle-ready-innerHTML.html
       fast/dom/custom/lifecycle-ready-parser-only.html
       fast/dom/custom/lifecycle-ready-parser-script.html
       fast/dom/custom/lifecycle-ready-paste.html

* bindings/scripts/CodeGeneratorV8.pm:
- Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
(GenerateCustomElementInvocationScopeIfNeeded):
(GenerateNormalAttrSetter):
(GenerateFunction):
* bindings/scripts/IDLAttributes.txt:
* bindings/v8/CustomElementHelpers.cpp:
(WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
(WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
* bindings/v8/CustomElementHelpers.h:
(CustomElementHelpers):
* bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
(WebCore::V8RecursionScope::didLeaveScriptContext):
* dom/CustomElementConstructor.cpp:
(WebCore::CustomElementConstructor::createElement):
(WebCore::CustomElementConstructor::createElementInternal):
* dom/CustomElementConstructor.h:
(WebCore::CustomElementConstructor::isExtended):
(CustomElementConstructor):
* dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
(WebCore::CustomElementInvocation::CustomElementInvocation):
(WebCore::CustomElementInvocation::~CustomElementInvocation):
(WebCore::activeCustomElementRegistries):
(WebCore::CustomElementRegistry::~CustomElementRegistry):
(WebCore::CustomElementRegistry::didGiveTypeExtension):
(WebCore::CustomElementRegistry::didCreateElement):
(WebCore::CustomElementRegistry::activate):
(WebCore::CustomElementRegistry::deactivate):
(WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
(WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
* dom/CustomElementRegistry.h:
(CustomElementInvocation):
(WebCore::CustomElementInvocation::element):
(CallbackDeliveryScope):
(WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
(WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
(CustomElementRegistry):
(WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
* dom/Document.cpp:
(WebCore::Document::createElement):
(WebCore::Document::didCreateCustomElement):
* dom/Document.h:
(Document):
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
(WebCore::Element::parserSetAttributes):
(WebCore::Element::cloneAttributesFromElement):
* dom/Element.h:
* dom/Node.idl:
* dom/ShadowRoot.idl:
* html/HTMLElement.idl:
* html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::runScript):

Source/WebKit/chromium:

* src/WebKit.cpp: Added deliverAllLifecycleCallbacks()

Source/WTF:

* wtf/HashSet.h:
(WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.

LayoutTests:

* fast/dom/custom/lifecycle-ready-createElement-recursion-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-createElement-recursion.html: Added.
* fast/dom/custom/lifecycle-ready-createElement-reentrancy-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-createElement-reentrancy.html: Added.
* fast/dom/custom/lifecycle-ready-creation-api-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-creation-api.html: Added.
* fast/dom/custom/lifecycle-ready-innerHTML-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-innerHTML.html: Added.
* fast/dom/custom/lifecycle-ready-parser-only-expected.html: Added.
* fast/dom/custom/lifecycle-ready-parser-only.html: Added.
* fast/dom/custom/lifecycle-ready-parser-script-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-parser-script.html: Added.
* fast/dom/custom/lifecycle-ready-paste-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-paste.html: Added.

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

6 years agoMediaStream API: Finalize the RTCPeerConnection states
tommyw@google.com [Fri, 22 Mar 2013 09:29:37 +0000 (09:29 +0000)]
MediaStream API: Finalize the RTCPeerConnection states
https://bugs.webkit.org/show_bug.cgi?id=112792

Reviewed by Adam Barth.

Source/Platform:

* chromium/public/WebRTCPeerConnectionHandlerClient.h:

Source/WebCore:

This patch finalized the RTCPeerConnection state and events. These changes
have not yet pushed out to the editors draft; but they are uncontroversial
and agreed upon.

readyState will be deleted; please use the replacement signalingState which is already available.
onstatechange -> onsignalingstatechange
onicechange -> oniceconnectionstatechange
ongatheringchange will be deleted since oniceconnectionstatechange can be used for the same purpose.
RTCIceConnectionState::"starting" -> RTCIceConnectionState::"new"

Patch covered by modified tests.

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
(WebCore::RTCPeerConnection::iceConnectionState):
(WebCore::RTCPeerConnection::changeSignalingState):
(WebCore::RTCPeerConnection::changeIceGatheringState):
(WebCore::RTCPeerConnection::changeIceConnectionState):
* Modules/mediastream/RTCPeerConnection.h:
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* dom/EventNames.h:
(WebCore):
* platform/mediastream/RTCPeerConnectionHandlerClient.h:

Source/WebKit/chromium:

* src/AssertMatchingEnums.cpp:

LayoutTests:

* fast/mediastream/RTCPeerConnection-datachannel.html:
* fast/mediastream/RTCPeerConnection-dtmf.html:
* fast/mediastream/RTCPeerConnection-events-expected.txt:
* fast/mediastream/RTCPeerConnection-events.html:
* fast/mediastream/RTCPeerConnection-ice.html:
* fast/mediastream/RTCPeerConnection-state-expected.txt:
* fast/mediastream/RTCPeerConnection-state.html:

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

6 years ago[EFL][WK2] View is not focused when fullscreen mode toggled
commit-queue@webkit.org [Fri, 22 Mar 2013 09:23:41 +0000 (09:23 +0000)]
[EFL][WK2] View is not focused when fullscreen mode toggled
https://bugs.webkit.org/show_bug.cgi?id=113009

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-03-22
Reviewed by Laszlo Gombos.

Set focus on view when fullscreen mode enabled/disabled
by FullScreen API.

* MiniBrowser/efl/main.c:
(on_fullscreen_accept):
(on_fullscreen_deny):

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

6 years agoPrefer 'KURL(ParsedURLString, String)' when dealing with known-good data.
mkwst@chromium.org [Fri, 22 Mar 2013 09:20:46 +0000 (09:20 +0000)]
Prefer 'KURL(ParsedURLString, String)' when dealing with known-good data.
https://bugs.webkit.org/show_bug.cgi?id=112965

Reviewed by Alexey Proskuryakov.

In https://bugs.webkit.org/show_bug.cgi?id=112783#c6, Adam noted that
it would be possible to use 'KURL(ParsedURLString, [url])' rather than
'KURL(KURL(), [url])', since we knew that the URL in question is a
value and absolute URL. This patch fixes the obvious instances of this
pattern; there are several more 'KURL(KURL(), String)' calls in
WebCore but these were the only places I was reasonably sure that bad
data couldn't creep in.

* dom/Document.cpp:
(WebCore::Document::updateBaseURL):
    'documentURI' is pulled from 'url()->string()'. It's safe.
* page/ContentSecurityPolicy.cpp:
(WebCore::gatherSecurityPolicyViolationEventData):
(WebCore::ContentSecurityPolicy::reportViolation):
    'CallFrame::sourceURL()' is a known valid/absolute URL.
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::createFromDatabaseIdentifier):
(WebCore::SecurityOrigin::create):
    The strings constructed here are certainly valid.

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

6 years ago[Qt] Unreviewed gardening. Unskip a now passing test after r146393.
kadam@inf.u-szeged.hu [Fri, 22 Mar 2013 09:17:20 +0000 (09:17 +0000)]
[Qt] Unreviewed gardening. Unskip a now passing test after r146393.
https://bugs.webkit.org/show_bug.cgi?id=112904.

* platform/qt/TestExpectations:

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

6 years ago[EFL] New baseline for accessibility/platform-name.html
commit-queue@webkit.org [Fri, 22 Mar 2013 09:09:56 +0000 (09:09 +0000)]
[EFL] New baseline for accessibility/platform-name.html
https://bugs.webkit.org/show_bug.cgi?id=113018

Unreviewed EFL gardening

Patch by Krzysztof Czech <k.czech@samsung.com> on 2013-03-22

* platform/efl-wk1/TestExpectations:
* platform/efl-wk2/TestExpectations:
* platform/efl/accessibility/platform-name-expected.txt: Added.

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

6 years agoWeb Inspector: Flame Chart. move overview window when user scrolls the chart.
loislo@chromium.org [Fri, 22 Mar 2013 09:00:08 +0000 (09:00 +0000)]
Web Inspector: Flame Chart. move overview window when user scrolls the chart.
https://bugs.webkit.org/show_bug.cgi?id=113014

Reviewed by Yury Semikhatsky.

I found that I could use scaling mechanics in OverviewGrid for scaling the chart.
But the dragging part was not so simple due to the different approaches in
OverviewGrid and FlameChart. OverviewGrid used _windowLeft and _windowRight
when FlameChart used _xOffset and _xScaleFactor and width.
It was not practical and I rewrote the FlameChart mechanics
and now it also uses _windowLeft _windowRight.

* inspector/front-end/FlameChart.js:
(WebInspector.FlameChart):
(WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
(WebInspector.FlameChart.Calculator.prototype.computePosition):
(WebInspector.FlameChart.prototype._onWindowChanged):
(WebInspector.FlameChart.prototype._startCanvasDragging):
(WebInspector.FlameChart.prototype._canvasDragging):
(WebInspector.FlameChart.prototype._onMouseMove):
(WebInspector.FlameChart.prototype._onMouseWheel):
(WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
(WebInspector.FlameChart.prototype._drawOverviewCanvas):
(WebInspector.FlameChart.prototype.draw):
(WebInspector.FlameChart.prototype._updateBoundaries):
(WebInspector.FlameChart.prototype.update):
* inspector/front-end/OverviewGrid.js:
(WebInspector.OverviewGrid.prototype.setWindowPosition):
(WebInspector.OverviewGrid.prototype.setWindow):
(WebInspector.OverviewGrid.prototype.addEventListener):
(WebInspector.OverviewGrid.prototype.zoom):
(WebInspector.OverviewGrid.Window.prototype._zoom):
* inspector/front-end/inspectorCommon.css:
(.overview-grid-window-rulers):

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

6 years agoMove GeolocationClient.h to Modules/geolocation/
commit-queue@webkit.org [Fri, 22 Mar 2013 08:38:27 +0000 (08:38 +0000)]
Move GeolocationClient.h to Modules/geolocation/
https://bugs.webkit.org/show_bug.cgi?id=112997

Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
Reviewed by Kentaro Hara.

No new tests, no functional change.

* GNUmakefile.list.am:
* Modules/geolocation/GeolocationClient.h: Renamed from Source/WebCore/page/GeolocationClient.h.
(WebCore):
(GeolocationClient):
(WebCore::GeolocationClient::~GeolocationClient):
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

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

6 years agoAdd a flaky crash test expectations on Mac WebKit2 per bug 113020.
rniwa@webkit.org [Fri, 22 Mar 2013 08:29:59 +0000 (08:29 +0000)]
Add a flaky crash test expectations on Mac WebKit2 per bug 113020.

* platform/mac-wk2/TestExpectations:

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

6 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Fri, 22 Mar 2013 08:24:05 +0000 (08:24 +0000)]
Unreviewed GTK gardening.

* platform/gtk/TestExpectations: Skipping fast/dom/custom tests as the custom elements support is not yet enabled
on the GTK port. Adding crashing expectations for two IDB tests that regressed with r146540.

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

6 years agoUnreviewed, rolling out r146534 and r146565.
commit-queue@webkit.org [Fri, 22 Mar 2013 08:12:05 +0000 (08:12 +0000)]
Unreviewed, rolling out r146534 and r146565.
http://trac.webkit.org/changeset/146534
http://trac.webkit.org/changeset/146565
https://bugs.webkit.org/show_bug.cgi?id=113017

"r146534 caused perf regression on Chromium Linux x64"
(Requested by yurys on #webkit).

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

Source/WebCore:

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrSetter):
(GenerateOverloadedFunction):
(GenerateFunctionCallback):
(GenerateFunction):
(GenerateParametersCheck):
(GenerateSingleConstructorCallback):
(GenerateNonStandardFunction):
(GenerateImplementation):
(GenerateFunctionCallString):
* bindings/scripts/IDLAttributes.txt:
* bindings/scripts/test/V8/V8Float64Array.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
(WebCore):
* bindings/scripts/test/V8/V8TestTypedefs.cpp:
(WebCore):
* bindings/v8/CustomElementHelpers.cpp:
* bindings/v8/CustomElementHelpers.h:
(WebCore):
(CustomElementHelpers):
* bindings/v8/V8DOMConfiguration.cpp:
(WebCore::V8DOMConfiguration::batchConfigureCallbacks):
(WebCore::V8DOMConfiguration::configureTemplate):
* bindings/v8/V8DOMConfiguration.h:
(BatchedMethod):
(V8DOMConfiguration):
* bindings/v8/V8RecursionScope.cpp:
(WebCore::V8RecursionScope::didLeaveScriptContext):
* dom/CustomElementConstructor.cpp:
(WebCore::CustomElementConstructor::createElement):
* dom/CustomElementConstructor.h:
(CustomElementConstructor):
* dom/CustomElementRegistry.cpp:
(WebCore::CustomElementRegistry::~CustomElementRegistry):
* dom/CustomElementRegistry.h:
(WebCore):
(CustomElementRegistry):
* dom/Document.cpp:
(WebCore::Document::createElement):
(WebCore::Document::registerElement):
* dom/Document.h:
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::parserSetAttributes):
(WebCore::Element::cloneAttributesFromElement):
* dom/Element.h:
* dom/Element.idl:
* dom/Node.idl:
* dom/ShadowRoot.idl:
* html/HTMLElement.idl:
* html/parser/HTMLScriptRunner.cpp:
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::runScript):

Source/WebKit/chromium:

* src/WebKit.cpp:

Source/WTF:

* wtf/HashSet.h:
(WTF):
(WTF::copyToVector):

LayoutTests:

* fast/dom/custom/lifecycle-ready-createElement-recursion-expected.txt: Removed.
* fast/dom/custom/lifecycle-ready-createElement-recursion.html: Removed.
* fast/dom/custom/lifecycle-ready-createElement-reentrancy-expected.txt: Removed.
* fast/dom/custom/lifecycle-ready-createElement-reentrancy.html: Removed.
* fast/dom/custom/lifecycle-ready-creation-api-expected.txt: Removed.
* fast/dom/custom/lifecycle-ready-creation-api.html: Removed.
* fast/dom/custom/lifecycle-ready-innerHTML-expected.txt: Removed.
* fast/dom/custom/lifecycle-ready-innerHTML.html: Removed.
* fast/dom/custom/lifecycle-ready-parser-only-expected.html: Removed.
* fast/dom/custom/lifecycle-ready-parser-only.html: Removed.
* fast/dom/custom/lifecycle-ready-parser-script-expected.txt: Removed.
* fast/dom/custom/lifecycle-ready-parser-script.html: Removed.
* fast/dom/custom/lifecycle-ready-paste-expected.txt: Removed.
* fast/dom/custom/lifecycle-ready-paste.html: Removed.

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

6 years ago[GStreamer] Memory leak in AudioFileReader::createBus()
commit-queue@webkit.org [Fri, 22 Mar 2013 08:07:38 +0000 (08:07 +0000)]
[GStreamer] Memory leak in AudioFileReader::createBus()
https://bugs.webkit.org/show_bug.cgi?id=112925

Patch by Sudarsana Nagineni <sudarsana.nagineni@intel.com> on 2013-03-22
Reviewed by Martin Robinson.

Adopt the reference returned by g_timeout_source_new()
to fix a memory leak.

No new tests. No change in behavior.

* platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::createBus):

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

6 years agoMove page/Coordinates.[h|idl] to Modules/geolocation/
commit-queue@webkit.org [Fri, 22 Mar 2013 07:52:09 +0000 (07:52 +0000)]
Move page/Coordinates.[h|idl] to Modules/geolocation/
https://bugs.webkit.org/show_bug.cgi?id=112945

Patch by Steve Block <steveblock@chromium.org> on 2013-03-22
Reviewed by Kentaro Hara.

No new tests, no functional change.

* CMakeLists.txt:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Modules/geolocation/Coordinates.h: Renamed from Source/WebCore/page/Coordinates.h.
(WebCore):
(Coordinates):
(WebCore::Coordinates::create):
(WebCore::Coordinates::isolatedCopy):
(WebCore::Coordinates::latitude):
(WebCore::Coordinates::longitude):
(WebCore::Coordinates::altitude):
(WebCore::Coordinates::accuracy):
(WebCore::Coordinates::altitudeAccuracy):
(WebCore::Coordinates::heading):
(WebCore::Coordinates::speed):
(WebCore::Coordinates::canProvideAltitude):
(WebCore::Coordinates::canProvideAltitudeAccuracy):
(WebCore::Coordinates::canProvideHeading):
(WebCore::Coordinates::canProvideSpeed):
(WebCore::Coordinates::Coordinates):
* Modules/geolocation/Coordinates.idl: Renamed from Source/WebCore/page/Coordinates.idl.
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:

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

6 years agoAdd a flaky test failure expectation per bug 113012.
rniwa@webkit.org [Fri, 22 Mar 2013 07:41:27 +0000 (07:41 +0000)]
Add a flaky test failure expectation per bug 113012.

* platform/win/TestExpectations:

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

6 years agoLeak bots erroneously report JSC::WatchpointSet as leaking
rniwa@webkit.org [Fri, 22 Mar 2013 07:36:58 +0000 (07:36 +0000)]
Leak bots erroneously report JSC::WatchpointSet as leaking
https://bugs.webkit.org/show_bug.cgi?id=107781

Reviewed by Filip Pizlo.

Since leaks doesn't support tagged pointers, avoid using it by flipping the bit flag to indicate
the entry is "fat". We set the flag when the entry is NOT fat; i.e. slim.

Replaced FatFlag by SlimFlag and initialized m_bits with this flag to indicate that the entry is
initially "slim".

* runtime/SymbolTable.cpp:
(JSC::SymbolTableEntry::copySlow): Don't set FatFlag since it has been replaced by SlimFlag.
(JSC::SymbolTableEntry::inflateSlow): Ditto.

* runtime/SymbolTable.h:
(JSC::SymbolTableEntry::Fast::Fast): Set SlimFlag by default.
(JSC::SymbolTableEntry::Fast::isNull): Ignore SlimFlag.
(JSC::SymbolTableEntry::Fast::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag
is not set.

(JSC::SymbolTableEntry::SymbolTableEntry): Set SlimFlag by default.
(JSC::SymbolTableEntry::SymbolTableEntry::getFast): Set SlimFlag when creating Fast from a fat entry.
(JSC::SymbolTableEntry::isNull): Ignore SlimFlag.
(JSC::SymbolTableEntry::FatEntry::FatEntry): Strip SlimFlag.
(JSC::SymbolTableEntry::isFat): An entry is fat when m_bits is not entirely zero and SlimFlag is unset.
(JSC::SymbolTableEntry::fatEntry): Don't strip FatFlag as this flag doesn't exist anymore.
(JSC::SymbolTableEntry::pack): Preserve SlimFlag.

(JSC::SymbolTableIndexHashTraits): empty value is no longer zero so don't set emptyValueIsZero true.

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

6 years agoFinal Mac rebaseline attempt for r146531 since r146564 wasn't enough.
rniwa@webkit.org [Fri, 22 Mar 2013 07:19:45 +0000 (07:19 +0000)]
Final Mac rebaseline attempt for r146531 since r146564 wasn't enough.

I'm sorry I made a huge mess here.

* platform/mac/compositing/rtl/rtl-fixed-expected.txt:

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

6 years ago[chromium] Mark virtual/gpu/fast/canvas/canvas-toDataURL-webp.html as flaky
commit-queue@webkit.org [Fri, 22 Mar 2013 07:09:58 +0000 (07:09 +0000)]
[chromium] Mark virtual/gpu/fast/canvas/canvas-toDataURL-webp.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=93310

Unreviewed test expectations update.

libwebp will be updated to 0.3.0 in chrome changing the encoder
output after which this test will need to be rebaselined.

Patch by James Zern <jzern@chromium.org> on 2013-03-22

* platform/chromium/TestExpectations:

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

6 years agoCustom Elements: "readyCallback" lifecycle callback should be called.
morrita@google.com [Fri, 22 Mar 2013 06:16:07 +0000 (06:16 +0000)]
Custom Elements: "readyCallback" lifecycle callback should be called.
https://bugs.webkit.org/show_bug.cgi?id=112538

Reviewed by Elliott Sprehn.

Source/WebCore:

This change allows each custom element definition to hook up its instantiation,
namely "readyCallback" lifecycle callback.

The change has two parts:
- 1. Tracking which Element objects to be created.
- 2. Invoking appropriate JavaScript functions, which are readyCallback(),
  before the Element object is visible from page script.

For 1, CustomElementRegistry maintains list of "callback
invocaions".  Each list item ("invocation") tracks the element
which has a lifecycle callback to be invoked. Each invocation is
registered when - Any custom element C++ object is instantiated.
See changes on CustomElementConstructor.cpp.

This also happens when @is attribute is set by the parser or node
cloning routine, which can turn a non-custom element into a
type-extended custom element. See changes on Element.cpp.

For 2, CustomElementRegistry basically follows what
MutationObserver is doing, and introduces a method called
deliverLifecycleCallbacks(). This function flushes all pending
callback invocations. You can think it as a dual of
MutationObserver::deliverAllMutations().

The delivery function is called places where MutationObserver's
deliverAllMutations() is called. In addition, it is also called
just before returning from a set of DOM APIs. For example, it is
called just before createElement() returns, so that possibly
created custom element becomes ready through its readyCallback().
Such APIs get "V8DeliverCustomElementCallbacks" IDL attribute. In
principle, APIs which can create new custom element instnaces are
marked. See CustomElementRegistry::CallbackDeliveryScope and
changes on CodeGeneratorV8.pm.

We need this extra work because the readyCallback() needs to give
an illusion so that JavaScript programmers feel like the
readyCallback() callback being called just after it is created,
instead of called on arbitrary late timing like MutationObserver
notifications.

Tests: fast/dom/custom/lifecycle-ready-createElement-recursion.html
       fast/dom/custom/lifecycle-ready-createElement-reentrancy.html
       fast/dom/custom/lifecycle-ready-creation-api.html
       fast/dom/custom/lifecycle-ready-innerHTML.html
       fast/dom/custom/lifecycle-ready-parser-only.html
       fast/dom/custom/lifecycle-ready-parser-script.html
       fast/dom/custom/lifecycle-ready-paste.html

* bindings/scripts/CodeGeneratorV8.pm:
- Hooked up CallbackDeliveryScope through V8DeliverCustomElementCallbacks attriute.
(GenerateCustomElementInvocationScopeIfNeeded):
(GenerateNormalAttrSetter):
(GenerateFunction):
* bindings/scripts/IDLAttributes.txt:
* bindings/v8/CustomElementHelpers.cpp:
(WebCore::CustomElementHelpers::invokeReadyCallbackIfNeeded):
(WebCore::CustomElementHelpers::invokeReadyCallbacksIfNeeded):
* bindings/v8/CustomElementHelpers.h:
(CustomElementHelpers):
* bindings/v8/V8RecursionScope.cpp: Added deliverAllLifecycleCallbacks()
(WebCore::V8RecursionScope::didLeaveScriptContext):
* dom/CustomElementConstructor.cpp:
(WebCore::CustomElementConstructor::createElement):
(WebCore::CustomElementConstructor::createElementInternal):
* dom/CustomElementConstructor.h:
(WebCore::CustomElementConstructor::isExtended):
(CustomElementConstructor):
* dom/CustomElementRegistry.cpp: Adding element tracking and invocation execution.
(WebCore::CustomElementInvocation::CustomElementInvocation):
(WebCore::CustomElementInvocation::~CustomElementInvocation):
(WebCore::activeCustomElementRegistries):
(WebCore::CustomElementRegistry::~CustomElementRegistry):
(WebCore::CustomElementRegistry::didGiveTypeExtension):
(WebCore::CustomElementRegistry::didCreateElement):
(WebCore::CustomElementRegistry::activate):
(WebCore::CustomElementRegistry::deactivate):
(WebCore::CustomElementRegistry::deliverLifecycleCallbacks):
(WebCore::CustomElementRegistry::deliverAllLifecycleCallbacks):
* dom/CustomElementRegistry.h:
(CustomElementInvocation):
(WebCore::CustomElementInvocation::element):
(CallbackDeliveryScope):
(WebCore::CustomElementRegistry::CallbackDeliveryScope::CallbackDeliveryScope):
(WebCore::CustomElementRegistry::CallbackDeliveryScope::~CallbackDeliveryScope):
(CustomElementRegistry):
(WebCore::CustomElementRegistry::deliverAllLifecycleCallbacksIfNeeded):
* dom/Document.cpp:
(WebCore::Document::createElement):
(WebCore::Document::didCreateCustomElement):
* dom/Document.h:
(Document):
* dom/Document.idl:
* dom/Element.cpp:
(WebCore::Element::attributeChangedFromParserOrByCloning): Added to catch @is attribute
(WebCore::Element::parserSetAttributes):
(WebCore::Element::cloneAttributesFromElement):
* dom/Element.h:
* dom/Node.idl:
* dom/ShadowRoot.idl:
* html/HTMLElement.idl:
* html/parser/HTMLScriptRunner.cpp: Added deliverAllLifecycleCallbacks()
(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::runScript):

Source/WebKit/chromium:

* src/WebKit.cpp: Added deliverAllLifecycleCallbacks()

Source/WTF:

* wtf/HashSet.h:
(WTF::copyToVector): Generalized to let it accept variants like ListHahsSet instead of only HashSet.

LayoutTests:

* fast/dom/custom/lifecycle-ready-createElement-recursion-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-createElement-recursion.html: Added.
* fast/dom/custom/lifecycle-ready-createElement-reentrancy-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-createElement-reentrancy.html: Added.
* fast/dom/custom/lifecycle-ready-creation-api-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-creation-api.html: Added.
* fast/dom/custom/lifecycle-ready-innerHTML-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-innerHTML.html: Added.
* fast/dom/custom/lifecycle-ready-parser-only-expected.html: Added.
* fast/dom/custom/lifecycle-ready-parser-only.html: Added.
* fast/dom/custom/lifecycle-ready-parser-script-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-parser-script.html: Added.
* fast/dom/custom/lifecycle-ready-paste-expected.txt: Added.
* fast/dom/custom/lifecycle-ready-paste.html: Added.

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

6 years agoYet another Mac rebaseline attempt for r146531 since r146538 and r146554 didn't work.
rniwa@webkit.org [Fri, 22 Mar 2013 06:05:21 +0000 (06:05 +0000)]
Yet another Mac rebaseline attempt for r146531 since r146538 and r146554 didn't work.

* platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* platform/mac/compositing/rtl/rtl-fixed-expected.txt:
* platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt:

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

6 years agoCrash in WebCore::MediaPlayer::cachedResourceLoader + 4
jer.noble@apple.com [Fri, 22 Mar 2013 05:50:28 +0000 (05:50 +0000)]
Crash in WebCore::MediaPlayer::cachedResourceLoader + 4
https://bugs.webkit.org/show_bug.cgi?id=112977

Reviewed by Geoffrey Garen.

Speculative fix for a NULL-dereference crash. MediaPlayerPrivateAVFoundationObjC is the
sole owner of a WebCoreAVFLoaderDelegate instance. It releases this instance in its destructor,
but it is possible that, on another thread, the AVAssetResourceLoader has already begun
using the delegate and in so doing has retained it. By the time the delegate method is fired
on the main thread, the MediaPlayerPrivateAVFoundationObjC owner of the delegate has already
been deleted, and the delegate's m_callback pointer is now pointing at freed memory.

In addition to calling -[AVAssetResourceLoader setDelegate:queue:] to avoid any not-yet-started
delegate callbacks, MediaPlayerPrivateAVFoundationObjC should clear the WebCoreAVFLoaderDelegate
m_callback ivar, to avoid calling into freed memory for already queued delegate callbacks.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Clear the m_loaderDelegate's callback pointer.
(-[WebCoreAVFLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]): Check the value of m_callback before continuing.
(-[WebCoreAVFLoaderDelegate resourceLoader:didCancelLoadingRequest:]): Ditto.
(-[WebCoreAVFLoaderDelegate setCallback:]): Added simple setter.

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

6 years agoXMLDocumentParser doesn't parse <template> correctly.
tasak@google.com [Fri, 22 Mar 2013 05:22:14 +0000 (05:22 +0000)]
XMLDocumentParser doesn't parse <template> correctly.
https://bugs.webkit.org/show_bug.cgi?id=112328

Reviewed by Hajime Morrita.

Source/WebCore:

XMLDocumentParser should check whether a parent node is attached or not
when a new element is appended.

Test: fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml

* xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::XMLDocumentParser::startElementNs):
m_currentNode is a parent node of newElement, but it is updated by
pushCurrentNode. So firstly stored copied m_curretNode's value into
local currentNode and used the currentNode to check whether
newElement's parent is attached or not.

LayoutTests:

* fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash-expected.txt: Added.
* fast/dom/HTMLTemplateElement/xhtml-with-titleElement-parsing-crash.xhtml: Added.

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

6 years agoUnreviewed, rolling out r146560.
dgrogan@chromium.org [Fri, 22 Mar 2013 04:58:15 +0000 (04:58 +0000)]
Unreviewed, rolling out r146560.
http://trac.webkit.org/changeset/146560
https://bugs.webkit.org/show_bug.cgi?id=112862

invalid parameter to histogram

Source/Platform:

* chromium/public/Platform.h:

Source/WebCore:

* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::LevelDBDatabase::open):

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

6 years agoIndexedDB: Histogram available disk space on attempt to open database
dgrogan@chromium.org [Fri, 22 Mar 2013 04:03:27 +0000 (04:03 +0000)]
IndexedDB: Histogram available disk space on attempt to open database
https://bugs.webkit.org/show_bug.cgi?id=112862

Reviewed by Adam Barth.

Source/Platform:

* chromium/public/Platform.h:
(WebKit::Platform::availableDiskSpaceInBytes):
(Platform):

Source/WebCore:

ChromeOS suspects they might be hitting disk corruption when the disks
are nearly full. This patch logs the available space to either the
"success" or the "fail" histogram as appropriate so that the
distributions can be compared.

No new tests - I don't know of a good way to test histograms. Local
printf testing didn't turn up any bugs.

* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::HistogramFreeSpace):
(WebCore):
(WebCore::LevelDBDatabase::open):

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

6 years agonrwt is no longer saving retry results in the retries/ subdirectory
dpranke@chromium.org [Fri, 22 Mar 2013 03:48:06 +0000 (03:48 +0000)]
nrwt is no longer saving retry results in the retries/ subdirectory
https://bugs.webkit.org/show_bug.cgi?id=112995

Reviewed by Ojan Vafai.

I think this has been broken a long time, unfortunately. This
patch should fix that.

In order to do so, I had to pass the directory to use from
the Worker object through the SingleTestWriter to the
TestResultWriter. While I was plumbing that through, I rationalized
the order of the parameter arguments a bit ...

* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(Worker._run_single_test):
* Scripts/webkitpy/layout_tests/controllers/single_test_runner.py:
(run_single_test):
(SingleTestRunner.__init__):
(SingleTestRunner._run_compare_test):
(SingleTestRunner._run_rebaseline):
(SingleTestRunner._run_reftest):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(write_test_result):
* Scripts/webkitpy/layout_tests/controllers/test_result_writer_unittest.py:
(TestResultWriterTest.test_reftest_diff_image):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.test_retrying_uses_retries_directory):

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

6 years agoObjective-C API: Need a good way to preserve custom properties on JS wrappers
mhahnenberg@apple.com [Fri, 22 Mar 2013 03:12:49 +0000 (03:12 +0000)]
Objective-C API: Need a good way to preserve custom properties on JS wrappers
https://bugs.webkit.org/show_bug.cgi?id=112608

Reviewed by Geoffrey Garen.

Currently, we just use a weak map, which means that garbage collection can cause a wrapper to
disappear if it isn't directly exported to JavaScript.

The most straightforward and safe way (with respect to garbage collection and concurrency) is to have
clients add and remove their external references along with their owners. Effectively, the client is
recording the structure of the external object graph so that the garbage collector can make sure to
mark any wrappers that are reachable through either the JS object graph of the external Obj-C object
graph. By keeping these wrappers alive, this has the effect that custom properties on these wrappers
will also remain alive.

The rule for if an object needs to be tracked by the runtime (and therefore whether the client should report it) is as follows:
For a particular object, its references to its children should be added if:
1. The child is referenced from JavaScript.
2. The child contains references to other objects for which (1) or (2) are true.

* API/JSAPIWrapperObject.mm:
(JSAPIWrapperObjectHandleOwner::finalize):
(JSAPIWrapperObjectHandleOwner::isReachableFromOpaqueRoots): A wrapper object is kept alive only if its JSGlobalObject
is marked and its corresponding Objective-C object was added to the set of opaque roots.
(JSC::JSAPIWrapperObject::visitChildren): We now call out to scanExternalObjectGraph, which handles adding all Objective-C
objects to the set of opaque roots.
* API/JSAPIWrapperObject.h:
(JSAPIWrapperObject):
* API/JSContext.mm: Moved dealloc to its proper place in the main implementation.
(-[JSContext dealloc]):
* API/JSVirtualMachine.h:
* API/JSVirtualMachine.mm:
(-[JSVirtualMachine initWithContextGroupRef:]):
(-[JSVirtualMachine dealloc]):
(getInternalObjcObject): Helper funciton to get the Objective-C object out of JSManagedValues or JSValues if there is one.
(-[JSVirtualMachine addManagedReference:withOwner:]): Adds the Objective-C object to the set of objects
owned by the owner object in that particular virtual machine.
(-[JSVirtualMachine removeManagedReference:withOwner:]): Removes the relationship between the two objects.
(-[JSVirtualMachine externalObjectGraph]):
(scanExternalObjectGraph): Does a depth-first search of the external object graph in a particular virtual machine starting at
the specified root. Each new object it encounters it adds to the set of opaque roots. These opaque roots will keep their
corresponding wrapper objects alive if they have them.
* API/JSManagedReferenceInternal.h: Added.
* API/JSVirtualMachine.mm: Added the per-JSVirtualMachine map between objects and the objects they own, which is more formally
known as that virtual machine's external object graph.
* API/JSWrapperMap.mm:
(-[JSWrapperMap dealloc]): We were leaking this before :-(
(-[JSVirtualMachine initWithContextGroupRef:]):
(-[JSVirtualMachine dealloc]):
(-[JSVirtualMachine externalObjectGraph]):
* API/JSVirtualMachineInternal.h:
* API/tests/testapi.mm: Added two new tests using the TinyDOMNode class. The first tests that a custom property added to a wrapper
doesn't vanish after GC, even though that wrapper isn't directly accessible to the JS garbage collector but is accessible through
the external Objective-C object graph. The second test makes sure that adding an object to the external object graph with the same
owner doesn't cause any sort of problems.
(+[TinyDOMNode sharedVirtualMachine]):
(-[TinyDOMNode init]):
(-[TinyDOMNode dealloc]):
(-[TinyDOMNode appendChild:]):
(-[TinyDOMNode numberOfChildren]):
(-[TinyDOMNode childAtIndex:]):
(-[TinyDOMNode removeChildAtIndex:]):
* JavaScriptCore.xcodeproj/project.pbxproj:
* heap/SlotVisitor.h:
(SlotVisitor):
* heap/SlotVisitorInlines.h:
(JSC::SlotVisitor::containsOpaqueRootTriState): Added a new method to SlotVisitor to allow scanExternalObjectGraph to have a
thread-safe view of opaque roots during parallel marking. The set of opaque roots available to any one SlotVisitor isn't guaranteed
to be 100% correct, but that just results in a small duplication of work in scanExternalObjectGraph. To indicate this change for
false negatives we return a TriState that's either true or mixed, but never false.

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

6 years agoFileAPI: Remove deprecation warning when ArrayBuffer is in Blob constructor.
li.yin@intel.com [Fri, 22 Mar 2013 03:11:39 +0000 (03:11 +0000)]
FileAPI: Remove deprecation warning when ArrayBuffer is in Blob constructor.
https://bugs.webkit.org/show_bug.cgi?id=88389

Reviewed by Kenneth Russell.

Source/WebCore:

Spec: http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob
Both ArrayBuffer and ArrayBufferView should be supported for Blob constructor.

Test: fast/files/blob-constructor.html.

* bindings/js/JSBlobCustom.cpp:
(WebCore::JSBlobConstructor::constructJSBlob):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCustom):
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append): Remove the deprecated warning.
* fileapi/WebKitBlobBuilder.h:
(WebCore):
(BlobBuilder):

LayoutTests:

* fast/files/blob-constructor-expected.txt:
* fast/files/script-tests/blob-constructor.js:

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

6 years ago[Shadow]: @host styles are not applied dynamically
tasak@google.com [Fri, 22 Mar 2013 03:02:18 +0000 (03:02 +0000)]
[Shadow]: @host styles are not applied dynamically
https://bugs.webkit.org/show_bug.cgi?id=112869

Reviewed by Elliott Sprehn.

Source/WebCore:

Need to add features of @host @-rules to rule feature set.

Test: fast/dom/shadow/athost-apply-dynamically.html

* css/StyleScopeResolver.cpp:
(WebCore::StyleScopeResolver::collectFeaturesTo):

LayoutTests:

* fast/dom/shadow/athost-apply-dynamically-expected.html: Added.
* fast/dom/shadow/athost-apply-dynamically.html: Added.

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

6 years ago[Shadow] Provide an api of insertionParent().
hayato@chromium.org [Fri, 22 Mar 2013 03:00:00 +0000 (03:00 +0000)]
[Shadow] Provide an api of insertionParent().
https://bugs.webkit.org/show_bug.cgi?id=112866

Source/WebCore:

Add insertinParent binding to Element and Text.
It's prefixed (webkitInsertionParent) and guarded by SHADOW_DOM flag.

The bug in the Shadow DOM spec is here:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=21067

Reviewed by Dimitri Glazkov.

Test: fast/dom/shadow/insertion-parent.html

* dom/Element.idl:
* dom/Node.cpp:
(WebCore::Node::insertionParentForBinding):
(WebCore):
* dom/Node.h:
(Node):
* dom/Text.idl:

LayoutTests:

Reviewed by Dimitri Glazkov.

* fast/dom/shadow/insertion-parent-expected.txt: Added.
* fast/dom/shadow/insertion-parent.html: Added.

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

6 years agoAnother Mac rebaseline attempt for r146531 since r146538 didn't work.
rniwa@webkit.org [Fri, 22 Mar 2013 02:23:13 +0000 (02:23 +0000)]
Another Mac rebaseline attempt for r146531 since r146538 didn't work.

* platform/mac-wk2/compositing/rtl/rtl-fixed-expected.txt:
* platform/mac-wk2/compositing/rtl/rtl-fixed-overflow-expected.txt:
* platform/mac/compositing/rtl/rtl-fixed-expected.txt:
* platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt:

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

6 years ago[chromium] Test expectations updates.
pkasting@chromium.org [Fri, 22 Mar 2013 02:02:09 +0000 (02:02 +0000)]
[chromium] Test expectations updates.
https://bugs.webkit.org/show_bug.cgi?id=88833
https://bugs.webkit.org/show_bug.cgi?id=107935
https://bugs.webkit.org/show_bug.cgi?id=109507

Unreviewed, test expectations updates.

* platform/chromium/TestExpectations:

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

6 years agoSource/JavaScriptCore: Fix O(n^2) op_debug bytecode charPosition to column computation.
mark.lam@apple.com [Fri, 22 Mar 2013 01:56:17 +0000 (01:56 +0000)]
Source/JavaScriptCore: Fix O(n^2) op_debug bytecode charPosition to column computation.
https://bugs.webkit.org/show_bug.cgi?id=112957.

Reviewed by Geoffrey Garen.

The previous algorithm does a linear reverse scan of the source string
to find the line start for any given char position. This results in a
O(n^2) algortithm when the source string has no line breaks.

The new algorithm computes a line start column table for a
SourceProvider on first use. This line start table is used to fix up
op_debug's charPosition operand into a column operand when an
UnlinkedCodeBlock is linked into a CodeBlock. The initialization of
the line start table is O(n), and the CodeBlock column fix up is
O(log(n)).

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::CodeBlock): - do column fix up.
* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug): - no need to do column fixup anymore.
* interpreter/Interpreter.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* parser/SourceProvider.cpp:
(JSC::SourceProvider::lineStarts):
(JSC::charPositionExtractor):
(JSC::SourceProvider::charPositionToColumnNumber):
- initialize line start column table if needed.
- look up line start for the given char position.
* parser/SourceProvider.h:

Source/WTF: Introducing String::findNextLineStart().
https://bugs.webkit.org/show_bug.cgi?id=112957.

Reviewed by Geoffrey Garen.

This is replaces String::reverseFindLineTerminator() in the JSC
debugger's code for computing column numbers.

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

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

6 years ago[wk2] Page Overlays: Don't create backing store until the client asks us to paint
timothy_horton@apple.com [Fri, 22 Mar 2013 01:39:28 +0000 (01:39 +0000)]
[wk2] Page Overlays: Don't create backing store until the client asks us to paint
https://bugs.webkit.org/show_bug.cgi?id=112989
<rdar://problem/13355759>

Reviewed by Anders Carlsson.

* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
Invalidate the entire overlay on installation, to maintain existing behavior
on platforms where the fade-in animation is not performed by invalidating the overlay.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::installPageOverlay):
Don't invalidate the overlay upon installation.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay):
Create backing store for the page overlay layer the first time it is painted into.
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
Don't update the size of the page overlay layer unless we intend for it to have backing store.
(WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
Don't create backing store when we create the page overlay layer.

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

6 years agoWinCairo build fails to link.
commit-queue@webkit.org [Fri, 22 Mar 2013 01:32:28 +0000 (01:32 +0000)]
WinCairo build fails to link.
https://bugs.webkit.org/show_bug.cgi?id=112892

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-03-21
Reviewed by Kentaro Hara.

* WebKit.vcproj/WebKitExports.def.in: Added ENABLE(VIDEO_TRACK) guard.

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

6 years agoBypass XSSAuditor for asp.net servers.
tsepez@chromium.org [Fri, 22 Mar 2013 01:26:32 +0000 (01:26 +0000)]
Bypass XSSAuditor for asp.net servers.
https://bugs.webkit.org/show_bug.cgi?id=112235

Reviewed by Adam Barth.

Source/WebCore:

Similar to https://bugs.webkit.org/show_bug.cgi?id=81283, but the
fix to that bug failed to cover this particular comma-splicing case.

Test: http/tests/security/xssAuditor/img-tag-with-comma.html

* html/parser/XSSAuditor.cpp:
(WebCore::isTerminatingCharacter):
Beware of comma-splicing tricks by stopping at commas.

LayoutTests:

* http/tests/security/xssAuditor/img-tag-with-comma-expected.txt: Added.
* http/tests/security/xssAuditor/img-tag-with-comma.html: Added.

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

6 years agoJSC profiler should have an at-a-glance report of the success of DFG optimization
fpizlo@apple.com [Fri, 22 Mar 2013 01:17:09 +0000 (01:17 +0000)]
JSC profiler should have an at-a-glance report of the success of DFG optimization
https://bugs.webkit.org/show_bug.cgi?id=112988

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleGetById):
(JSC::DFG::ByteCodeParser::parseBlock):
* profiler/ProfilerCompilation.cpp:
(JSC::Profiler::Compilation::Compilation):
(JSC::Profiler::Compilation::toJS):
* profiler/ProfilerCompilation.h:
(JSC::Profiler::Compilation::noticeInlinedGetById):
(JSC::Profiler::Compilation::noticeInlinedPutById):
(JSC::Profiler::Compilation::noticeInlinedCall):
(Compilation):
* runtime/CommonIdentifiers.h:

Tools:

* Scripts/display-profiler-output:

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

6 years ago[chromium] Test expectations updates: mark flaky tests; fix overlapping expectations...
pkasting@chromium.org [Fri, 22 Mar 2013 00:58:57 +0000 (00:58 +0000)]
[chromium] Test expectations updates: mark flaky tests; fix overlapping expectations; convert [ Pass Slow ] to [ Slow ].
https://bugs.webkit.org/show_bug.cgi?id=88833
https://bugs.webkit.org/show_bug.cgi?id=93569
https://bugs.webkit.org/show_bug.cgi?id=109507
https://bugs.webkit.org/show_bug.cgi?id=112980
https://bugs.webkit.org/show_bug.cgi?id=112981
https://bugs.webkit.org/show_bug.cgi?id=112984
https://bugs.webkit.org/show_bug.cgi?id=112987
http://crbug.com/24182

Unreviewed, test expectations updates.

* platform/chromium/TestExpectations:

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

6 years ago[chromium] Linux ASAN WebKit canary is running out of memory
dpranke@chromium.org [Fri, 22 Mar 2013 00:25:11 +0000 (00:25 +0000)]
[chromium] Linux ASAN WebKit canary is running out of memory
https://bugs.webkit.org/show_bug.cgi?id=112978

Reviewed by Tony Chang.

Running the AddressSanitizer on a crash takes a lot of
memory, so we should serialize access to it to avoid running
out of memory on a machine.

* Scripts/webkitpy/layout_tests/port/chromium.py:
(ChromiumPort._get_crash_log):
* Scripts/webkitpy/layout_tests/port/http_lock.py:
(HttpLock.__init__):
(HttpLock.wait_for_httpd_lock):

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

6 years agoAdd Mac baseline after r146510.
rniwa@webkit.org [Fri, 22 Mar 2013 00:14:43 +0000 (00:14 +0000)]
Add Mac baseline after r146510.

* platform/mac/svg/custom/marker-orient-auto-expected.png: Added.
* platform/mac/svg/custom/marker-orient-auto-expected.txt: Added.

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

6 years agoIf a previously loaded resource is later stored to the disk cache, replace the buffer...
beidson@apple.com [Fri, 22 Mar 2013 00:14:03 +0000 (00:14 +0000)]
If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory.
<rdar://problem/13414154> and https://bugs.webkit.org/show_bug.cgi?id=112943

Reviewed by Geoff Garen.

Source/WebCore:

No new tests (No change in behavior.)

Give SharedBuffer the ability to replace its contents from another SharedBuffer:
* platform/SharedBuffer.h:
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer:: tryReplaceContentsWithPlatformBuffer):

Forward along SharedBuffer's new ability to ResourceBuffer:
* loader/mac/ResourceBuffer.mm:
(WebCore::ResourceBuffer:: tryReplaceSharedBufferContents):
* loader/ResourceBuffer.h:

Give CachedResource the ability to replace its encoded data buffer if appropriate:
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource:: tryReplaceEncodedData):
* loader/cache/CachedResource.h:

* WebCore.exp.in:

Source/WebKit2:

Add a timer that will try to look up the disk cached buffer for the resource a few seconds after the load
completes and - if the resource is disk backed - send it to the WebProcess for sharing:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::diskCacheTimerFired):
(WebKit::NetworkResourceLoader::didReceiveResponse):
(WebKit::NetworkResourceLoader::didReceiveData):
(WebKit::NetworkResourceLoader::didFinishLoading):
* NetworkProcess/NetworkResourceLoader.h:

* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleForResource):

Refactor SharedMemory to remove the unnecessary vm_copy and only vm_allocate when an appropriate buffer
doesn't already exist:
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::create):
(WebKit::SharedMemory::createFromVMBuffer):
(WebKit::SharedMemory::~SharedMemory):

Give ShareableResource the ability to create a CFDataRef that wraps "this", and return it in a SharedBuffer:
* Shared/ShareableResource.cpp:
(WebKit::shareableResourceDeallocate):
(WebKit::createShareableResourceDeallocator):
(WebKit::ShareableResource::Handle::tryWrapInSharedBuffer):
* Shared/ShareableResource.h:

* Shared/WebCoreArgumentCoders.cpp: Encode/decode the cache partition for ResourceRequest.

* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveMessage):
(WebKit::NetworkProcessConnection::didCacheResource): Lookup the CachedResource in the WebCore memory cache
  and try to replace its encoded data with the shared mmap'ed buffer.
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:

* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResource):

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

6 years ago[Mac] Add baselines for css3/filters/effect-reference*.html
rniwa@webkit.org [Fri, 22 Mar 2013 00:08:00 +0000 (00:08 +0000)]
[Mac] Add baselines for css3/filters/effect-reference*.html
https://bugs.webkit.org/show_bug.cgi?id=112962

Reviewed by Dean Jackson.

Add Mac rebaselines for the following tests and removed the corresponding entries in TestExpectations.

* platform/mac/TestExpectations:
* platform/mac/css3/filters/effect-reference-expected.png: Added.
* platform/mac/css3/filters/effect-reference-expected.txt:
* platform/mac/css3/filters/effect-reference-external-expected.png: Added.
* platform/mac/css3/filters/effect-reference-hw-expected.png: Added.
* platform/mac/css3/filters/effect-reference-hw-expected.txt:
* platform/mac/css3/filters/effect-reference-ordering-expected.png: Added.
* platform/mac/css3/filters/effect-reference-ordering-hw-expected.png: Added.

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

6 years agoUnreviewed build fix, forgot to stage one file.
timothy_horton@apple.com [Fri, 22 Mar 2013 00:04:02 +0000 (00:04 +0000)]
Unreviewed build fix, forgot to stage one file.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame):
(DrawingArea):

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

6 years agoUnreviewed gardening.
alokp@chromium.org [Thu, 21 Mar 2013 23:58:22 +0000 (23:58 +0000)]
Unreviewed gardening.
Suppressed text failures due to r146531.

* platform/chromium/TestExpectations:

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

6 years agoIndexedDB: Ensure script wrappers can be collected after context is stopped
jsbell@chromium.org [Thu, 21 Mar 2013 23:52:16 +0000 (23:52 +0000)]
IndexedDB: Ensure script wrappers can be collected after context is stopped
https://bugs.webkit.org/show_bug.cgi?id=112976

Reviewed by Adam Barth.

ActiveDOMObject::hasPendingActivity is called to see if script wrappers
can be disposed of. Once the script execution context has stopped they
should be free to go - include this in the checks.

No new tests - suggestions welcome.

* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::hasPendingActivity): Return false if stopped.
(WebCore::IDBDatabase::stop): Don't bother calling empty super impl.
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::hasPendingActivity): Return false if stopped.
(WebCore::IDBRequest::stop): Don't bother calling empty super impl.
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::hasPendingActivity): Return false if stopped.
(WebCore::IDBTransaction::stop): Don't bother calling empty super impl.

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

6 years ago[wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame...
timothy_horton@apple.com [Thu, 21 Mar 2013 23:47:56 +0000 (23:47 +0000)]
[wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll
https://bugs.webkit.org/show_bug.cgi?id=111662
<rdar://problem/13355808>

Reviewed by Dean Jackson.

Instead of setNeedsDisplay()ing the whole page overlay layer every time through
TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
necessary to keep things painted in the right place when we scroll (the overlay
is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.

This works with threaded scrolling because overlay installation forces us
into main-thread scrolling mode.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didChangeScrollOffset):
Plumb scroll offset changes through to the drawing area, so it can invalidate the page overlay.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
(TiledCoreAnimationDrawingArea):
Add didChangeScrollOffsetForAnyFrame, for WebFrameLoaderClient to call us back when any frame scrolls.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame):
Invalidate the page overlay when any frame scrolls, so that find indicators in subframes are kept in the right place.
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
Stop unconditionally invalidating the page overlay when we flush layers.

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

6 years agoMac rebaseline r146531.
rniwa@webkit.org [Thu, 21 Mar 2013 23:41:04 +0000 (23:41 +0000)]
Mac rebaseline r146531.

* platform/mac/compositing/rtl/rtl-fixed-expected.txt: Added.
* platform/mac/compositing/rtl/rtl-fixed-overflow-expected.txt: Added.

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

6 years agoRemove upcastPointer from ActiveDOMObject constructor
commit-queue@webkit.org [Thu, 21 Mar 2013 23:28:38 +0000 (23:28 +0000)]
Remove upcastPointer from ActiveDOMObject constructor
https://bugs.webkit.org/show_bug.cgi?id=112858

Patch by Russell McClellan <russell.mcclellan@gmail.com> on 2013-03-21
Reviewed by Alexey Proskuryakov.

Removed pesky argument to ActiveDOMObject constructor that is no longer
used.

No new tests (no change in behavior).

* Modules/battery/BatteryManager.cpp:
(WebCore::BatteryManager::BatteryManager):
* Modules/filesystem/DOMFileSystem.cpp:
(WebCore::DOMFileSystem::DOMFileSystem):
* Modules/filesystem/FileWriter.cpp:
(WebCore::FileWriter::FileWriter):
* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::Geolocation):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::IDBDatabase):
* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::IDBRequest):
* Modules/indexeddb/IDBTransaction.cpp:
(WebCore::IDBTransaction::IDBTransaction):
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::MediaSource):
* Modules/mediastream/MediaStreamTrack.cpp:
(WebCore::MediaStreamTrack::MediaStreamTrack):
* Modules/mediastream/RTCDTMFSender.cpp:
(WebCore::RTCDTMFSender::RTCDTMFSender):
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::RTCPeerConnection):
* Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
(WebCore::RTCSessionDescriptionRequestImpl::RTCSessionDescriptionRequestImpl):
* Modules/mediastream/RTCStatsRequestImpl.cpp:
(WebCore::RTCStatsRequestImpl::RTCStatsRequestImpl):
* Modules/mediastream/RTCVoidRequestImpl.cpp:
(WebCore::RTCVoidRequestImpl::RTCVoidRequestImpl):
* Modules/networkinfo/NetworkInfoConnection.cpp:
(WebCore::NetworkInfoConnection::NetworkInfoConnection):
* Modules/notifications/Notification.cpp:
(WebCore::Notification::Notification):
* Modules/notifications/NotificationCenter.cpp:
(WebCore::NotificationCenter::NotificationCenter):
* Modules/speech/SpeechRecognition.cpp:
(WebCore::SpeechRecognition::SpeechRecognition):
* Modules/webaudio/AudioContext.cpp:
(WebCore::AudioContext::AudioContext):
* Modules/webdatabase/DatabaseContext.cpp:
(WebCore::DatabaseContext::DatabaseContext):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::WebSocket):
* css/FontLoader.cpp:
(WebCore::FontLoader::FontLoader):
* dom/ActiveDOMObject.cpp:
(WebCore::ActiveDOMObject::ActiveDOMObject):
* dom/ActiveDOMObject.h:
(ActiveDOMObject):
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::canSuspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
(WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
(WebCore::ScriptExecutionContext::didCreateActiveDOMObject):
* dom/ScriptExecutionContext.h:
(ScriptExecutionContext):
(WebCore::ScriptExecutionContext::activeDOMObjects):
* fileapi/FileReader.cpp:
(WebCore::FileReader::FileReader):
* html/HTMLMarqueeElement.cpp:
(WebCore::HTMLMarqueeElement::HTMLMarqueeElement):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::HTMLMediaElement):
* html/canvas/WebGLRenderingContext.cpp:
(WebCore):
(WebCore::WebGLRenderingContext::WebGLRenderingContext):
* loader/Prerenderer.cpp:
(WebCore::Prerenderer::Prerenderer):
* page/EventSource.cpp:
(WebCore::EventSource::EventSource):
* page/SuspendableTimer.cpp:
(WebCore::SuspendableTimer::SuspendableTimer):
* workers/AbstractWorker.cpp:
(WebCore::AbstractWorker::AbstractWorker):
* workers/WorkerContext.cpp:
(WebCore::WorkerContext::hasPendingActivity):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::XMLHttpRequest):

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