WebKit-https.git
7 years ago[WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
commit-queue@webkit.org [Tue, 11 Sep 2012 12:32:24 +0000 (12:32 +0000)]
[WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin
https://bugs.webkit.org/show_bug.cgi?id=96372

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

Source/WebKit2:

Add Bundle C API to clear the application cache for a
given origin. This is needed by WebKitTestRunner to
implement clearApplicationCacheForOrigin().

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleClearApplicationCacheForOrigin):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::clearApplicationCacheForOrigin):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Implement clearApplicationCacheForOrigin() in WebKitTestRunner.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::clearApplicationCacheForOrigin):
(WTR):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

Refresh Skipped list now that clearApplicationCacheForOrigin
is implemented in TestRunner. Some tests were also marked as
failing due to clearAllApplicationCaches() being missing
despite the fact that it is already implemented.

* platform/wk2/Skipped:

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

7 years ago[EFL] Unreviewed build fix after r128065.
rakuco@webkit.org [Tue, 11 Sep 2012 11:59:54 +0000 (11:59 +0000)]
[EFL] Unreviewed build fix after r128065.

* CMakeLists.txt: Link against WTF for FastMalloc symbols, which
are needed when building with SYSTEM_MALLOC off.

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

7 years agoWeb Inspector: Remove no-op TreeElement.prototype.didChange method
apavlov@chromium.org [Tue, 11 Sep 2012 11:54:59 +0000 (11:54 +0000)]
Web Inspector: Remove no-op TreeElement.prototype.didChange method
https://bugs.webkit.org/show_bug.cgi?id=96376

Reviewed by Yury Semikhatsky.

* inspector/front-end/treeoutline.js:
(TreeElement.prototype.set title):
(TreeElement.prototype.set tooltip):
(TreeElement.prototype.set hasChildren):

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

7 years agoDon't ignore .pak files when making an archive for Android
peter@chromium.org [Tue, 11 Sep 2012 11:26:26 +0000 (11:26 +0000)]
Don't ignore .pak files when making an archive for Android
https://bugs.webkit.org/show_bug.cgi?id=96375

Reviewed by Jochen Eisinger.

The .pak files do need to be pushed to the device, which is currently
preventing the layout test runner from correctly pushing all files.

* BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct):

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

7 years ago[WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
commit-queue@webkit.org [Tue, 11 Sep 2012 11:21:52 +0000 (11:21 +0000)]
[WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval
https://bugs.webkit.org/show_bug.cgi?id=96256

Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-09-11
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Added new setter for minimum DOM timer interval to InjectedBundle private API.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetMinimumTimerInterval):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setMinimumTimerInterval):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Exported TestRunner::setMinimumTimerInterval() method.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::beginTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMinimumTimerInterval):
(WTR):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

Unskipped corresponding fast/dom/ tests.

* platform/wk2/Skipped:

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

7 years agoUnreviewed. Rolled DEPS.
peter@chromium.org [Tue, 11 Sep 2012 10:50:48 +0000 (10:50 +0000)]
Unreviewed.  Rolled DEPS.

* DEPS:

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

7 years ago[Qt] New fast/canvas/canvas-lineDash.html introduced in r128116 fails.
ossy@webkit.org [Tue, 11 Sep 2012 10:34:22 +0000 (10:34 +0000)]
[Qt] New fast/canvas/canvas-lineDash.html introduced in r128116 fails.
https://bugs.webkit.org/show_bug.cgi?id=96360

Patch by Szilard Ledan <szledan@inf.u-szeged.hu> on 2012-09-11
Reviewed by Csaba Osztrogonác.

* platform/qt/Skipped:

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

7 years agoMediaStream API: add RTCPeerConnection::onnegotiationneeded
tommyw@google.com [Tue, 11 Sep 2012 10:29:23 +0000 (10:29 +0000)]
MediaStream API: add RTCPeerConnection::onnegotiationneeded
https://bugs.webkit.org/show_bug.cgi?id=96097

Reviewed by Adam Barth.

Source/Platform:

* chromium/public/WebRTCPeerConnectionHandlerClient.h:
(WebRTCPeerConnectionHandlerClient):

Source/WebCore:

This patch adds the last callback to RTCPeerConnection: onnegotiationneeded.
This is called whenever the state in the RTCPeerConnection changes and that
change needs to be sent to the other side.

Test: fast/mediastream/RTCPeerConnection-onnegotiationneeded.html

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::negotiationNeeded):
(WebCore):
* Modules/mediastream/RTCPeerConnection.h:
(RTCPeerConnection):
* Modules/mediastream/RTCPeerConnection.idl:
* dom/EventNames.h:
(WebCore):
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
(RTCPeerConnectionHandlerClient):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:
(WebCore::RTCPeerConnectionHandlerChromium::negotiationNeeded):
(WebCore):
* platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.h:
(RTCPeerConnectionHandlerChromium):

Tools:

* DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp:
(MockWebRTCPeerConnectionHandler::addStream):
(MockWebRTCPeerConnectionHandler::removeStream):

LayoutTests:

* fast/mediastream/RTCPeerConnection-onnegotiationneeded-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-onnegotiationneeded.html: Added.

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

7 years agoSort an Xcode project file.
tkent@chromium.org [Tue, 11 Sep 2012 10:11:59 +0000 (10:11 +0000)]
Sort an Xcode project file.

* WebCore.xcodeproj/project.pbxproj:

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

7 years agoRecognize the "--chromium-android" argument in run-webkit-tests
peter@chromium.org [Tue, 11 Sep 2012 10:10:06 +0000 (10:10 +0000)]
Recognize the "--chromium-android" argument in run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=96369

Reviewed by Jochen Eisinger.

Chromium for the Android platform cannot determine the platform based on
the host itself, so we'll use the --chromium-android argument as the build
master passes to run-webkit-tests. Make sure the layout test runner
can pick the right port when doing so.

* Scripts/run-webkit-tests:
* Scripts/webkitpy/layout_tests/port/factory.py:
(port_options):

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

7 years ago[WK2][EFL] Fix compile warnings when enable tiled backing store
commit-queue@webkit.org [Tue, 11 Sep 2012 10:06:58 +0000 (10:06 +0000)]
[WK2][EFL] Fix compile warnings when enable tiled backing store
https://bugs.webkit.org/show_bug.cgi?id=95342

Patch by Kangil Han <kangil.han@samsung.com> on 2012-09-11
Reviewed by Gyuyoung Kim.

Fixed compile time warning messages when enable tiled backing store.

* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_accelerated_compositing_mode_enter): Fixed invalid use of 'EINA_SAFETY_ON_NULL_RETURN_VAL' since it used '!' ahead of evasGl value so it is always null.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp:
(WebCore::CoordinatedGraphicsLayer::setChildren): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'.
* WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp:
(WebKit::LayerTreeCoordinator::renderNextFrame): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'.
(WebKit::LayerTreeCoordinator::beginContentUpdate): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'.

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

7 years ago[QT] Fix build with newer qmake from Qt 5
hausmann@webkit.org [Tue, 11 Sep 2012 09:57:38 +0000 (09:57 +0000)]
[QT] Fix build with newer qmake from Qt 5

Rubber-stamped by Tor Arne Vestbø.

Support for "qmake -query QMAKE_MKSPECS" was removed from qmake. Replace
it with the use of QT_HOST_DATA/mkspecs.
Based on patch by Oswald Buddenhagen <oswald.buddenhagen@nokia.com>.

* Scripts/webkitdirs.pm:
(builtDylibPathForName):
(qtMakeCommand):

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

7 years ago[Qt] Remove Qt 4 syncqt, no longer needed
vestbo@webkit.org [Tue, 11 Sep 2012 09:54:58 +0000 (09:54 +0000)]
[Qt] Remove Qt 4 syncqt, no longer needed

Reviewed by Simon Hausmann.

* qmake/syncqt-4.8: Removed.

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

7 years ago[EFL][WK2] WKEinaSharedString needs a function to adopt eina stringshare.
commit-queue@webkit.org [Tue, 11 Sep 2012 09:36:36 +0000 (09:36 +0000)]
[EFL][WK2] WKEinaSharedString needs a function to adopt eina stringshare.
https://bugs.webkit.org/show_bug.cgi?id=96201

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2012-09-11
Reviewed by Kenneth Rohde Christiansen.

WKEinaSharedString needs a to adopt eina stringshare directly.

With this adopt function, an instance that is directly created with
eina_stringshare_add() can be easily handled by WKEinaSharedString
without calling eina_stringshare_del() for preventing memory leak.

* UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
(WKEinaSharedString::adopt):
* UIProcess/API/cpp/efl/WKEinaSharedString.h:
* UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
(TEST_F):

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

7 years agoRemoved V8IsolatedContext
commit-queue@webkit.org [Tue, 11 Sep 2012 09:35:13 +0000 (09:35 +0000)]
Removed V8IsolatedContext
https://bugs.webkit.org/show_bug.cgi?id=95735

Patch by Dan Carney <dcarney@google.com> on 2012-09-11
Reviewed by Adam Barth.

Remove V8IsolatedContext and merge functionality into V8DOMWindowShell.
This brings the V8 isolated world model into closer alignment with
that of JSC.

No new tests.  No change in functionality.

* UseV8.cmake:
* WebCore.gypi:
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateImplementation):
* bindings/scripts/test/V8/V8Float64Array.cpp:
* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
* bindings/scripts/test/V8/V8TestEventConstructor.cpp:
* bindings/scripts/test/V8/V8TestEventTarget.cpp:
* bindings/scripts/test/V8/V8TestException.cpp:
* bindings/scripts/test/V8/V8TestInterface.cpp:
* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
* bindings/scripts/test/V8/V8TestNode.cpp:
* bindings/scripts/test/V8/V8TestObj.cpp:
* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
* bindings/v8/DOMData.cpp:
(WebCore::DOMData::getCurrentStore):
* bindings/v8/DOMWrapperWorld.cpp:
(WebCore::DOMWrapperWorld::ensureIsolatedWorld):
* bindings/v8/DOMWrapperWorld.h:
(DOMWrapperWorld):
* bindings/v8/ScriptController.cpp:
(WebCore::ScriptController::ScriptController):
(WebCore::ScriptController::resetIsolatedWorlds):
(WebCore::ScriptController::ensureIsolatedWorldContext):
(WebCore::ScriptController::existingWindowShellInternal):
(WebCore):
(WebCore::ScriptController::windowShell):
(WebCore::ScriptController::evaluateInIsolatedWorld):
(WebCore::ScriptController::setIsolatedWorldSecurityOrigin):
(WebCore::ScriptController::currentWorldContext):
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::collectIsolatedContexts):
* bindings/v8/ScriptController.h:
(WebCore):
(ScriptController):
(WebCore::ScriptController::existingWindowShell):
* bindings/v8/SharedPersistent.h:
(WebCore):
(WebCore::SharedPersistent::create):
(WebCore::SharedPersistent::get):
(WebCore::SharedPersistent::SharedPersistent):
(SharedPersistent):
* bindings/v8/V8Binding.cpp:
(WebCore::perContextDataForCurrentWorld):
* bindings/v8/V8DOMWindowShell.cpp:
(WebCore::setIsolatedWorldField):
(WebCore::V8DOMWindowShell::enteredIsolatedWorldContext):
(WebCore):
(WebCore::setInjectedScriptContextDebugId):
(WebCore::V8DOMWindowShell::create):
(WebCore::V8DOMWindowShell::V8DOMWindowShell):
(WebCore::V8DOMWindowShell::destroyIsolatedShell):
(WebCore::isolatedContextWeakCallback):
(WebCore::V8DOMWindowShell::disposeContext):
(WebCore::V8DOMWindowShell::initializeIfNeeded):
(WebCore::V8DOMWindowShell::createContext):
(WebCore::V8DOMWindowShell::installDOMWindow):
(WebCore::V8DOMWindowShell::updateDocumentWrapper):
(WebCore::V8DOMWindowShell::updateDocumentProperty):
(WebCore::V8DOMWindowShell::clearDocumentProperty):
(WebCore::V8DOMWindowShell::setSecurityToken):
(WebCore::V8DOMWindowShell::updateDocument):
(WebCore::V8DOMWindowShell::namedItemAdded):
(WebCore::V8DOMWindowShell::namedItemRemoved):
(WebCore::V8DOMWindowShell::updateSecurityOrigin):
(WebCore::V8DOMWindowShell::setIsolatedWorldSecurityOrigin):
* bindings/v8/V8DOMWindowShell.h:
(V8DOMWindowShell):
(WebCore::V8DOMWindowShell::world):
(WebCore::V8DOMWindowShell::isolatedWorldSecurityOrigin):
(WebCore::V8DOMWindowShell::getEntered):
* bindings/v8/V8DOMWrapper.h:
(WebCore::V8DOMWrapper::getCachedWrapper):
* bindings/v8/V8IsolatedContext.cpp: Removed.
* bindings/v8/V8IsolatedContext.h: Removed.
* bindings/v8/V8LazyEventListener.cpp:
* bindings/v8/WorldContextHandle.cpp:
(WebCore::WorldContextHandle::WorldContextHandle):
(WebCore::WorldContextHandle::adjustedContext):
* bindings/v8/custom/V8DocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8SVGDocumentCustom.cpp:
(WebCore::toV8):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):

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

7 years ago[Qt][WK2] Fix the build with recent Qt5
abecsi@webkit.org [Tue, 11 Sep 2012 09:18:27 +0000 (09:18 +0000)]
[Qt][WK2] Fix the build with recent Qt5
https://bugs.webkit.org/show_bug.cgi?id=96283

Reviewed by Simon Hausmann.

We should not use deprecated Qt API because doing that results
in build failure since all the deprecated API was disabled
in qtbase (https://codereview.qt-project.org/#change,24890).

Source/WebKit/qt:

* tests/qgraphicswebview/tst_qgraphicswebview.cpp:
(tst_QGraphicsWebView::widgetsRenderingThroughCache):
(tst_QGraphicsWebView::setPalette):
(tst_QGraphicsWebView::compareCanvasToImage):
* tests/qobjectbridge/tst_qobjectbridge.cpp:
(tst_QObjectBridge::ownership):
* tests/qwebframe/tst_qwebframe.cpp:
(tst_QWebFrame::popupFocus):
(tst_QWebFrame::inputFieldFocus):
(tst_QWebFrame::evaluateWillCauseRepaint):
* tests/qwebpage/tst_qwebpage.cpp:
(Navigation):
(PluginCounterPage):
* tests/qwebview/tst_qwebview.cpp:
(tst_QWebView::reusePage):
(tst_QWebView::focusInputTypes):
(tst_QWebView::setPalette):
(tst_QWebView::renderingAfterMaxAndBack):

Source/WebKit2:

* UIProcess/API/qt/qwebnavigationhistory.cpp:
(QWebNavigationListModel::roleNames):
(QWebNavigationListModel::reset):
* UIProcess/API/qt/qwebnavigationhistory_p.h:
* UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp:
(WebView::load):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(PopupMenuItemModel):
(WebKit::PopupMenuItemModel::PopupMenuItemModel):
(WebKit::PopupMenuItemModel::roleNames):
(WebKit):

Tools:

* DumpRenderTree/qt/main.cpp:
(main):
* MiniBrowser/qt/MiniBrowserApplication.cpp:
(MiniBrowserApplication::notify):
* MiniBrowser/qt/raw/View.cpp:
(View::exposeEvent):
(main):

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

7 years agoWTR needs an implementation of applicationCacheDiskUsageForOrigin
commit-queue@webkit.org [Tue, 11 Sep 2012 09:16:21 +0000 (09:16 +0000)]
WTR needs an implementation of applicationCacheDiskUsageForOrigin
https://bugs.webkit.org/show_bug.cgi?id=87188

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

Source/WebKit2:

Add Bundle private C API to retrieve the application cache
usage for a specific security origin. This is needed by
WebKitTestRunner.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleGetAppCacheUsageForOrigin):
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::appCacheUsageForOrigin):
(WebKit):
* WebProcess/InjectedBundle/InjectedBundle.h:
(InjectedBundle):

Tools:

Add implementation for applicationCacheDiskUsageForOrigin()
in WebKitTestRunner.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::applicationCacheDiskUsageForOrigin):
(WTR):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

Unskip test cases that require an implementation of
applicationCacheDiskUsageForOrigin in WebKitTestRunner.

* platform/efl/Skipped:
* platform/wk2/Skipped:

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

7 years agoCreate Localizer factory method for LocaleMac
keishi@webkit.org [Tue, 11 Sep 2012 08:15:20 +0000 (08:15 +0000)]
Create Localizer factory method for LocaleMac
https://bugs.webkit.org/show_bug.cgi?id=96355

Reviewed by Kent Tamura.

Source/WebCore:

Preparing to use Localizer instead of LocaleMac/Win/ICU

No new tests. Covered in unit test tests/LocaleMacTest.cpp

* platform/text/Localizer.h:
(Localizer):
* platform/text/mac/LocaleMac.mm:
(WebCore::Localizer::create):
(WebCore):

Source/WebKit/chromium:

* tests/LocaleMacTest.cpp:
(testNumberIsReversible): Use Localizer::create.
(testNumbers):

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

7 years ago[CSS Regions] Auto width is not working for Regions
mihnea@adobe.com [Tue, 11 Sep 2012 08:07:36 +0000 (08:07 +0000)]
[CSS Regions] Auto width is not working for Regions
https://bugs.webkit.org/show_bug.cgi?id=74135

Reviewed by Julien Chaffraix.

Source/WebCore:

It was not possible to flow content into a region having { width: auto; } since in such case, the region width was computed to 0.
Now, a region having auto width, will have its width computed following the rules for calculation of widths and margins
(http://www.w3.org/TR/CSS2/visudet.html#Computing_widths_and_margins).
For those cases in which resolving the width requires measuring of content's min/max-content values, we use the associated named flow min/max-content
values (the same for all regions with width auto in a region chain).
When a region has width:auto, the computation of width should be done using normal block/box sizing code, instead of replaced element code.
Contains code contributed by Alexandru Chiculita(achicu@adobe.com).

Tests: fast/regions/autowidth-abspos-regionchain.html
       fast/regions/autowidth-abspos.html
       fast/regions/autowidth-attachedinvalidregion.html
       fast/regions/autowidth-float.html
       fast/regions/autowidth-inlineblock.html
       fast/regions/autowidth-nonreplaced-abspos.html
       fast/regions/autowidth-nonreplacedblock-normalflow.html
       fast/regions/autowidth-normalflow-maxwidth.html
       fast/regions/autowidth-normalflow-minmaxwidth.html
       fast/regions/autowidth-normalflow-minwidth.html
       fast/regions/autowidth-normalflow-vertrl.html
       fast/regions/autowidth-normalflow.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth): For positioned auto-width regions, skip the code path for replaced elements.
* rendering/RenderRegion.cpp:
(WebCore): Override min/maxPreferredLogicalWidth as they are used in the process of computing width for regions with auto width.
As this moment, a region is still a RenderReplaced element, so this code needs to be revisited when the region will become a RenderBlock.
Also, for min/max-width, we support only <length> values. We will extend support for other values in a following patch.
We only attempt to use the flowThread min/maxPreferredLogicalWidth if the region is valid (there are no circular dependencies).
(WebCore::RenderRegion::minPreferredLogicalWidth):
(WebCore::RenderRegion::maxPreferredLogicalWidth):
* rendering/RenderRegion.h:
(RenderRegion): Override isInlineBlockOrInlineTable() and shouldComputeSizeAsReplaced() to ensure that computation for width auto follows the normal
block/box sizing code.
(WebCore::RenderRegion::expandToEncompassFlowThreadContentsIfNeeded):

LayoutTests:

Add tests for width: auto and modify the existing region tests that were having width: auto so that they do not fail after the changes.

* fast/regions/autowidth-abspos-expected.html: Added.
* fast/regions/autowidth-abspos-regionchain-expected.html: Added.
* fast/regions/autowidth-abspos-regionchain.html: Added.
* fast/regions/autowidth-abspos.html: Added.
* fast/regions/autowidth-attachedinvalidregion-expected.txt: Added.
* fast/regions/autowidth-attachedinvalidregion.html: Added.
* fast/regions/autowidth-float-expected.html: Added.
* fast/regions/autowidth-float.html: Added.
* fast/regions/autowidth-inlineblock-expected.html: Added.
* fast/regions/autowidth-inlineblock.html: Added.
* fast/regions/autowidth-nonreplaced-abspos-expected.html: Added.
* fast/regions/autowidth-nonreplaced-abspos.html: Added.
* fast/regions/autowidth-nonreplacedblock-normalflow-expected.html: Added.
* fast/regions/autowidth-nonreplacedblock-normalflow.html: Added.
* fast/regions/autowidth-normalflow-expected.html: Added.
* fast/regions/autowidth-normalflow-maxwidth-expected.html: Added.
* fast/regions/autowidth-normalflow-maxwidth.html: Added.
* fast/regions/autowidth-normalflow-minmaxwidth-expected.html: Added.
* fast/regions/autowidth-normalflow-minmaxwidth.html: Added.
* fast/regions/autowidth-normalflow-minwidth-expected.html: Added.
* fast/regions/autowidth-normalflow-minwidth.html: Added.
* fast/regions/autowidth-normalflow-vertrl-expected.html: Added.
* fast/regions/autowidth-normalflow-vertrl.html: Added.
* fast/regions/autowidth-normalflow.html: Added.
* fast/regions/bottom-overflow-out-of-first-region.html:
* fast/regions/flows-dependency-dynamic-remove.html:
* fast/regions/flows-dependency-same-flow.html:
* fast/regions/render-region-renderer-expected.html:
* fast/regions/top-overflow-out-of-second-region.html:

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

7 years ago[EFL][WK2] Add necessary include directory in WebKit2
commit-queue@webkit.org [Tue, 11 Sep 2012 07:48:57 +0000 (07:48 +0000)]
[EFL][WK2] Add necessary include directory in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=95173

Unreviewed build fix.

revision r126694: Move TextureMapperGL to use
GraphicsContext3D. modify the TextureMapperGL.h to include
GraphicsContext3D.h. And when enable TEXTURE_MAPPER,
file WebKit2/Shared/ShareableSurface.cpp will include
TextureMapperGL.h then depends on GraphicsContext3D.h
thus it need to add ANGLE director. As currently, this
problem only affect EFL platform, according to Gyuyoung Kim's
suggestion, we add this include dir into EFL private file
PlatformEfl.cmake. Otherwise, the build will fail.

To trigger this problem by using the following command:
./Tools/Scripts/build-webkit --efl --3d-rendering --tiled-backing-store

Patch by Zhigang Gong <zhigang.gong@linux.intel.com> on 2012-09-11

* CMakeLists.txt:

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

7 years agoWeb Inspector: NMI: move MemoryInstrumentation.h to wtf
loislo@chromium.org [Tue, 11 Sep 2012 07:33:58 +0000 (07:33 +0000)]
Web Inspector: NMI: move MemoryInstrumentation.h to wtf
https://bugs.webkit.org/show_bug.cgi?id=96356

Reviewed by Yury Semikhatsky.

It is necessary step because it helps us to remove dependency between platform and WebCore.

Source/WebCore:

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/WebCoreMemoryInstrumentation.h:
* inspector/MemoryInstrumentationImpl.h:

Source/WTF:

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h: Renamed from Source/WebCore/dom/MemoryInstrumentation.h.
(WebCore):
(GenericMemoryTypes):
(MemoryInstrumentationTraits):
(MemoryInstrumentation):
(WebCore::MemoryInstrumentation::~MemoryInstrumentation):
(WebCore::MemoryInstrumentation::addRootObject):
(InstrumentedPointerBase):
(WebCore::MemoryInstrumentation::InstrumentedPointerBase::~InstrumentedPointerBase):
(InstrumentedPointer):
(WebCore::MemoryInstrumentation::InstrumentedPointer::InstrumentedPointer):
(WebCore::MemoryInstrumentation::addObject):
(WebCore::MemoryInstrumentation::addInstrumentedObject):
(WebCore::MemoryInstrumentation::addRawBuffer):
(WebCore::MemoryInstrumentation::OwningTraits::addInstrumentedObject):
(WebCore::MemoryInstrumentation::OwningTraits::addObject):
(WebCore::MemoryInstrumentationTraits::addInstrumentedObject):
(WebCore::MemoryInstrumentationTraits::addObject):
(MemoryObjectInfo):
(WebCore::MemoryObjectInfo::MemoryObjectInfo):
(WebCore::MemoryObjectInfo::objectType):
(WebCore::MemoryObjectInfo::objectSize):
(WebCore::MemoryObjectInfo::memoryInstrumentation):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(MemoryClassInfo):
(WebCore::MemoryClassInfo::MemoryClassInfo):
(WebCore::MemoryClassInfo::addInstrumentedMember):
(WebCore::MemoryClassInfo::addMember):
(WebCore::MemoryClassInfo::addHashMap):
(WebCore::MemoryClassInfo::addHashSet):
(WebCore::MemoryClassInfo::addHashCountedSet):
(WebCore::MemoryClassInfo::addInstrumentedHashSet):
(WebCore::MemoryClassInfo::addInstrumentedVector):
(WebCore::MemoryClassInfo::addInstrumentedVectorPtr):
(WebCore::MemoryClassInfo::addInstrumentedMapEntries):
(WebCore::MemoryClassInfo::addInstrumentedMapValues):
(WebCore::MemoryClassInfo::addListHashSet):
(WebCore::MemoryClassInfo::addVector):
(WebCore::MemoryClassInfo::addVectorPtr):
(WebCore::MemoryClassInfo::addRawBuffer):
(WebCore::MemoryInstrumentation::addInstrumentedObjectImpl):
(WebCore::MemoryInstrumentation::addObjectImpl):
(WebCore::MemoryInstrumentation::addHashMap):
(WebCore::MemoryInstrumentation::addHashSet):
(WebCore::MemoryInstrumentation::addInstrumentedCollection):
(WebCore::MemoryInstrumentation::addInstrumentedMapEntries):
(WebCore::MemoryInstrumentation::addInstrumentedMapValues):
(WebCore::MemoryInstrumentation::addListHashSet):
(WebCore::MemoryInstrumentation::addVector):
(WebCore::MemoryInstrumentation::calculateContainerSize):
(WebCore::::process):

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

7 years agoUnreviewed GTK gardening.
zandobersek@gmail.com [Tue, 11 Sep 2012 07:33:11 +0000 (07:33 +0000)]
Unreviewed GTK gardening.

Removing crashing expectations for two editing tests after they were fixed
in r128074.

Rebaselining accessibility/legend.html after r128140.

* platform/gtk/TestExpectations:
* platform/gtk/accessibility/legend-expected.txt:

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

7 years agoUnreviewed, rolling out r128150.
loislo@chromium.org [Tue, 11 Sep 2012 07:17:52 +0000 (07:17 +0000)]
Unreviewed, rolling out r128150.
http://trac.webkit.org/changeset/128150
https://bugs.webkit.org/show_bug.cgi?id=96357

it broke chromium compilation (Requested by loislo on
#webkit).

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

* DEPS:

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

7 years agoUnreviewed. Rolled DEPS.
yosin@chromium.org [Tue, 11 Sep 2012 05:46:02 +0000 (05:46 +0000)]
Unreviewed.  Rolled DEPS.

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

* DEPS:

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

7 years agoMove InputTypeNames to a separate file
keishi@webkit.org [Tue, 11 Sep 2012 05:44:07 +0000 (05:44 +0000)]
Move InputTypeNames to a separate file
https://bugs.webkit.org/show_bug.cgi?id=96255

Reviewed by Kent Tamura.

We want to move InputTypeNames to a separate file so we can use it without including InputType.h.

No new tests. No behavior change.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* html/ButtonInputType.cpp:
* html/CheckboxInputType.cpp:
* html/ColorInputType.cpp:
* html/DateInputType.cpp:
* html/DateTimeInputType.cpp:
* html/DateTimeLocalInputType.cpp:
* html/EmailInputType.cpp:
* html/FileInputType.cpp:
* html/HiddenInputType.cpp:
* html/ImageInputType.cpp:
* html/InputType.cpp:
* html/InputType.h:
* html/InputTypeNames.cpp: Added.
(WebCore):
(InputTypeNames):
(WebCore::InputTypeNames::button):
(WebCore::InputTypeNames::checkbox):
(WebCore::InputTypeNames::color):
(WebCore::InputTypeNames::date):
(WebCore::InputTypeNames::datetime):
(WebCore::InputTypeNames::datetimelocal):
(WebCore::InputTypeNames::email):
(WebCore::InputTypeNames::file):
(WebCore::InputTypeNames::hidden):
(WebCore::InputTypeNames::image):
(WebCore::InputTypeNames::month):
(WebCore::InputTypeNames::number):
(WebCore::InputTypeNames::password):
(WebCore::InputTypeNames::radio):
(WebCore::InputTypeNames::range):
(WebCore::InputTypeNames::reset):
(WebCore::InputTypeNames::search):
(WebCore::InputTypeNames::submit):
(WebCore::InputTypeNames::telephone):
(WebCore::InputTypeNames::text):
(WebCore::InputTypeNames::time):
(WebCore::InputTypeNames::url):
(WebCore::InputTypeNames::week):
* html/InputTypeNames.h: Added.
(WebCore):
(InputTypeNames):
* html/MonthInputType.cpp:
* html/NumberInputType.cpp:
* html/PasswordInputType.cpp:
* html/RadioInputType.cpp:
* html/RangeInputType.cpp:
* html/ResetInputType.cpp:
* html/SearchInputType.cpp:
* html/SubmitInputType.cpp:
* html/TelephoneInputType.cpp:
* html/TextInputType.cpp:
* html/TimeInputType.cpp:
* html/URLInputType.cpp:
* html/WeekInputType.cpp:
* html/parser/HTMLPreloadScanner.cpp:
* platform/efl/RenderThemeEfl.cpp:
* rendering/RenderThemeChromiumCommon.cpp:

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

7 years agoREGRESSION (r127226): Calling DateTimeEditElement::layout() in focus handler should...
yosin@chromium.org [Tue, 11 Sep 2012 05:29:55 +0000 (05:29 +0000)]
REGRESSION (r127226): Calling DateTimeEditElement::layout() in focus handler should not dispatch blur event
https://bugs.webkit.org/show_bug.cgi?id=96232

Reviewed by Kent Tamura.

Source/WebCore:

This patch makes DateTimeEditElement::layout() not to dispatch blur
event by removing existing fields, one of them can be focused, after
moving focus to newly created field.

This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.

Test: fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur.html

* html/shadow/DateTimeEditElement.cpp:
(WebCore::DateTimeEditBuilder::build): Changed to call resetFields().
(WebCore::DateTimeEditElement::focusedFieldIndex): Changed to use
Document::focusedNode(). When this function is called during handling
focus event, Element::focused() isn't true.
(WebCore::DateTimeEditElement::layout): Changed to remove existing
child nodes after moving focus to newly created field.
(WebCore::DateTimeEditElement::resetFields): Renamed from resetLayout().
This function makes m_fields vector empty.
(WebCore::DateTimeEditElement::resetLayout): Renamed to resetFields().
We moved removing field elements and spin button to layout().
* html/shadow/DateTimeEditElement.h:
(DateTimeEditElement): Renamed resetLayout() to resetFields().

LayoutTests:

This patch adds a new test for checking layout changing of multiple
fields time input UI in focus handler doesn't dispatch blur event.

This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.

* fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur-expected.txt: Added.
* fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur.html: Added.

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

7 years agoRename NumberLocalizer to Localizer
keishi@webkit.org [Tue, 11 Sep 2012 05:17:56 +0000 (05:17 +0000)]
Rename NumberLocalizer to Localizer
https://bugs.webkit.org/show_bug.cgi?id=96350

Reviewed by Kent Tamura.

Renaming NumberLocalizer to Localizer so we can unify our localization methods into this class in the future.

No new tests. No behavior change.

* WebCore.gypi:
* WebCore.xcodeproj/project.pbxproj:
* platform/text/LocaleICU.cpp:
(WebCore::LocaleICU::initializeLocalizerData):
* platform/text/LocaleICU.h:
(LocaleICU):
* platform/text/LocaleWin.cpp:
(WebCore::LocaleWin::initializeLocalizerData):
* platform/text/LocaleWin.h:
(LocaleWin):
* platform/text/Localizer.cpp: Renamed from Source/WebCore/platform/text/NumberLocalizer.cpp.
(WebCore):
(WebCore::Localizer::~Localizer):
(WebCore::Localizer::setLocalizerData):
(WebCore::Localizer::convertToLocalizedNumber):
(WebCore::matches):
(WebCore::Localizer::detectSignAndGetDigitRange):
(WebCore::Localizer::matchedDecimalSymbolIndex):
(WebCore::Localizer::convertFromLocalizedNumber):
(WebCore::Localizer::localizedDecimalSeparator):
* platform/text/Localizer.h: Renamed from Source/WebCore/platform/text/NumberLocalizer.h.
(WebCore):
(Localizer):
(WebCore::Localizer::Localizer):
* platform/text/mac/LocaleMac.h:
(LocaleMac):
* platform/text/mac/LocaleMac.mm:
(WebCore::LocaleMac::initializeLocalizerData):

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

7 years agoRemove m_classInfo from JSCell
mhahnenberg@apple.com [Tue, 11 Sep 2012 05:05:53 +0000 (05:05 +0000)]
Remove m_classInfo from JSCell
https://bugs.webkit.org/show_bug.cgi?id=96311

Reviewed by Oliver Hunt.

Now that no one is using the ClassInfo in JSCell, we can remove it for the greater good. This is a 1.5% win on v8v7 and
a 1.7% win on kraken, and is an overall performance progression.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::emitAllocateBasicJSObject): Had to rearrange the order of when we take things off the free list
and when we store the Structure in the object because we would clobber the free list otherwise. This made it not okay for
the structure argument and the scratch register to alias one another. Also removed the store of the ClassInfo pointer in the
object. Yay!
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp: Since it's no longer okay for for the scratch register and structure register to alias
one another as stated above, had to add an extra temporary for passing the Structure.
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp: Ditto.
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITInlineMethods.h:
(JSC::JIT::emitAllocateBasicJSObject): Similar changes to DFG's inline allocation except that it removed the object from
the free list first, so no changes were necessary there.
* llint/LowLevelInterpreter.asm: Change the constants for amount of inline storage to match PropertyOffset.h and remove
the store of the ClassInfo pointer during inline allocation.
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/JSCell.h: Remove the m_classInfo field and associated methods.
(JSCell):
* runtime/JSObject.h:
(JSObject):
* runtime/PropertyOffset.h: Expand the number of inline storage properties to take up the extra space that we're freeing
with the removal of the ClassInfo pointer.
(JSC):
* runtime/Structure.h:
(JSC):
(JSC::JSCell::JSCell):
(JSC::JSCell::finishCreation):

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

7 years ago[EFL][WK2] Build warning : fix warning about extended initializer lists on EWK2UnitTe...
commit-queue@webkit.org [Tue, 11 Sep 2012 05:03:55 +0000 (05:03 +0000)]
[EFL][WK2] Build warning : fix warning about extended initializer lists on EWK2UnitTestBase.cpp.
https://bugs.webkit.org/show_bug.cgi?id=95990

Patch by Byungwoo Lee <bw80.lee@samsung.com> on 2012-09-10
Reviewed by Gyuyoung Kim.

Fix build warning about extended initializer lists only available with
-std=c++0x or -std=gnu++0x.

* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::ewk2UnitTestBrowserViewSmartClass):
(EWK2UnitTest):
(EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):

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

7 years agoUse an API symbol instead of a hardcoded string for the TIFF uniform type identifier.
mitz@apple.com [Tue, 11 Sep 2012 04:05:52 +0000 (04:05 +0000)]
Use an API symbol instead of a hardcoded string for the TIFF uniform type identifier.

Reviewed by Mark Rowe.

* platform/graphics/mac/ImageMac.mm:
(WebCore::BitmapImage::getTIFFRepresentation): Replaced CFSTR("public.tiff") with kUTTypeTIFF.

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

7 years ago[CMake] Remove duplicated file in CMakeLists.txt
gyuyoung.kim@samsung.com [Tue, 11 Sep 2012 03:50:17 +0000 (03:50 +0000)]
[CMake] Remove duplicated file in CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=96346

Reviewed by Benjamin Poulain.

* CMakeLists.txt: Remove duplicated files.

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

7 years ago[BlackBerry] add a way to overscroll non-overflown content
tonikitoo@webkit.org [Tue, 11 Sep 2012 03:19:50 +0000 (03:19 +0000)]
[BlackBerry] add a way to overscroll non-overflown content
https://bugs.webkit.org/show_bug.cgi?id=96331
[UxD] Vertical lists should always be scrollable
PR #195305

Reviewed by Yong Li.
Patch by Antonio Gomes <agomes@rim.com>
Internally reviewed by Gen Mak.

Check if the RenderLayer is composited / hardware acceleratable prior to
check if its contents overflows. If that is the case, check if
our custom data-blackberry-force-overscroll is present.

That makes it possible for us to align to UX requirements: settings
and CCM panels should be always scrollable.

* Api/InRegionScroller.cpp:
(BlackBerry::WebKit::canScrollRenderBox):
* WebKitSupport/InRegionScrollableArea.cpp:
(BlackBerry::WebKit::InRegionScrollableArea::InRegionScrollableArea):

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

7 years agoAdded large allocation support to MarkedSpace
ggaren@apple.com [Tue, 11 Sep 2012 03:02:46 +0000 (03:02 +0000)]
Added large allocation support to MarkedSpace
https://bugs.webkit.org/show_bug.cgi?id=96214

Originally reviewed by Oliver Hunt, then I added a design revision by
suggested by Phil Pizlo.

I expanded the imprecise size classes to cover up to 32KB, then added
an mmap-based allocator for everything bigger. There's a lot of tuning
we could do in these size classes, but currently they're almost
completely unused, so I haven't done any tuning.

Subtle point: the large allocator is a degenerate case of our free list
logic. Its list only ever contains zero or one items.

* heap/Heap.h:
(JSC::Heap::allocateStructure): Pipe in size information.

* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::tryAllocateHelper): Handle the case where we
find a free item in the sweep list but the item isn't big enough. This
can happen in the large allocator because it mixes sizes.

(JSC::MarkedAllocator::tryAllocate):
(JSC::MarkedAllocator::allocateSlowCase): More piping.

(JSC::MarkedAllocator::allocateBlock): Handle the oversize case.

(JSC::MarkedAllocator::addBlock): I moved the call to didAddBlock here
because it made more sense.

* heap/MarkedAllocator.h:
(MarkedAllocator):
(JSC::MarkedAllocator::allocate):
* heap/MarkedSpace.cpp:
(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::resetAllocators):
(JSC::MarkedSpace::canonicalizeCellLivenessData):
(JSC::MarkedSpace::isPagedOut):
(JSC::MarkedSpace::freeBlock):
* heap/MarkedSpace.h:
(MarkedSpace):
(JSC::MarkedSpace::allocatorFor):
(JSC::MarkedSpace::destructorAllocatorFor):
(JSC::MarkedSpace::allocateWithoutDestructor):
(JSC::MarkedSpace::allocateWithDestructor):
(JSC::MarkedSpace::allocateStructure):
(JSC::MarkedSpace::forEachBlock):
* runtime/Structure.h:
(JSC::Structure): More piping.

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

7 years agoProperly expose <legend> elements to ATs
commit-queue@webkit.org [Tue, 11 Sep 2012 01:41:27 +0000 (01:41 +0000)]
Properly expose <legend> elements to ATs
https://bugs.webkit.org/show_bug.cgi?id=84137

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-09-10
Reviewed by Chris Fleizach.

Created a new WebCore Accessibility Role, LegendRole. Used it to map to
the expected platform role, ATK_ROLE_LABEL. Also established the needed
AtkRelation pair, label-for/labelled-by between the legend and fieldset.

Source/WebCore:

No new test needed - Existing legend.html test is now unskipped for Gtk.

* accessibility/AccessibilityObject.h: Added LegendRole
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole): Map legendTag to LegendRole
* accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetName): Fieldset accessible should take its name from the associated LegendRole/label
(setAtkRelationSetFromCoreObject): Set label-for/labelled-by AtkRelation pair between fieldset and legend
(atkRole): Map LegendRole to ATK_ROLE_LABEL
* accessibility/mac/WebAccessibilityObjectWrapper.mm:
(createAccessibilityRoleMap):  Map LegendRole to NSAccessibilityGroupRole

Source/WebKit/chromium:

* public/WebAccessibilityRole.h: added WebAccessibilityRoleLegend
* src/AssertMatchingEnums.cpp: added the assert matching rule for
WebAccessibilityRoleLegend and LegendRole

Tools:

* DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp:
(roleToString): added "Legend" string for WebAccessibilityRoleLegend

LayoutTests:

* accessibility/legend.html: Modified the test to be more platform-agnostic.
* platform/gtk/TestExpectations: Removed legend.html from the skipped list.
* platform/gtk/accessibility/legend-expected.txt: Added.
* platform/mac/accessibility/legend-expected.txt: Updated.

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

7 years ago[V8] Code assumes that getScriptExecutionContext can return 0
commit-queue@webkit.org [Tue, 11 Sep 2012 01:25:03 +0000 (01:25 +0000)]
[V8] Code assumes that getScriptExecutionContext can return 0
https://bugs.webkit.org/show_bug.cgi?id=96340

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Eric Seidel.

This function can never return 0 (as long as V8 is on the stack).
There's no reason to try to handle a 0 return as an error.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateCallWith):
(GenerateConstructorCallback):
* bindings/scripts/test/V8/V8TestInterface.cpp:
(WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):
(WebCore::V8TestInterface::constructorCallback):
* bindings/scripts/test/V8/V8TestObj.cpp:
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrGetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
(WebCore::TestObjV8Internal::withScriptExecutionContextCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateObjExceptionCallback):
(WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesCallback):
* bindings/v8/custom/V8BlobCustom.cpp:
(WebCore::V8Blob::constructorCallback):
* bindings/v8/custom/V8CustomXPathNSResolver.cpp:
(WebCore::V8CustomXPathNSResolver::lookupNamespaceURI):
* bindings/v8/custom/V8MessageChannelConstructor.cpp:
(WebCore::V8MessageChannel::constructorCallback):
* bindings/v8/custom/V8MutationObserverCustom.cpp:
(WebCore::V8MutationObserver::constructorCallback):
* bindings/v8/custom/V8SQLTransactionCustom.cpp:
(WebCore::V8SQLTransaction::executeSqlCallback):
* bindings/v8/custom/V8WebSocketCustom.cpp:
(WebCore::V8WebSocket::constructorCallback):
* bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
(WebCore::V8XMLHttpRequest::constructorCallback):
* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::openCallback):

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

7 years ago[V8] We don't us the global handle map for anything useful---let's remove it
commit-queue@webkit.org [Tue, 11 Sep 2012 01:22:17 +0000 (01:22 +0000)]
[V8] We don't us the global handle map for anything useful---let's remove it
https://bugs.webkit.org/show_bug.cgi?id=96343

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Kentaro Hara.

The global handle map was a dream of tracking all the persistent V8
handles in WebCore. Unfortunately, it has never been complete, and I'm
not aware of us using it for anything. This patch removes what little
is left of it.

* bindings/v8/NPV8Object.cpp:
(WebCore::freeV8NPObject):
(WebCore::npCreateV8ScriptObject):
* bindings/v8/V8GCController.cpp:
(WebCore):
(WebCore::V8GCController::gcEpilogue):
(WebCore::V8GCController::collectGarbage):
* bindings/v8/V8GCController.h:
(V8GCController):
* bindings/v8/V8PerIsolateData.h:
(WebCore):
(V8PerIsolateData):

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

7 years ago[chromium] Fix trace event macro naming issue
commit-queue@webkit.org [Tue, 11 Sep 2012 01:19:31 +0000 (01:19 +0000)]
[chromium] Fix trace event macro naming issue
https://bugs.webkit.org/show_bug.cgi?id=96337

Patch by John Bates <jbates@google.com> on 2012-09-10
Reviewed by James Robinson.

* platform/chromium/TraceEvent.h:

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

7 years agoIndexedDB: IDBFactory.deleteDatabase() is slow
jsbell@chromium.org [Tue, 11 Sep 2012 00:50:33 +0000 (00:50 +0000)]
IndexedDB: IDBFactory.deleteDatabase() is slow
https://bugs.webkit.org/show_bug.cgi?id=96036

Reviewed by Tony Chang.

The deleteDatabase() operation is implemented by creating a LevelDBTansaction to accumulate
the records to delete, then committing it. The transaction is a tree of key/operation pairs.
As each (key, delete) entry is added to the tree compares need to be made, potentially
requiring full key decodes. Since this temporary transaction is never read from, this is
overkill.

Add a new "write only" transaction type that simply wraps a write batch, which provides
transaction integrity but avoids the insertion overhead and has a minimal interface.

No new tests - no functional changes, only perf improvement.

* Modules/indexeddb/IDBLevelDBBackingStore.cpp:
(WebCore::IDBLevelDBBackingStore::deleteDatabase): Use new write-only transaction type.
* platform/leveldb/LevelDBTransaction.cpp:
(WebCore::LevelDBWriteOnlyTransaction::create):
(WebCore):
(WebCore::LevelDBWriteOnlyTransaction::LevelDBWriteOnlyTransaction):
(WebCore::LevelDBWriteOnlyTransaction::~LevelDBWriteOnlyTransaction):
(WebCore::LevelDBWriteOnlyTransaction::remove):
(WebCore::LevelDBWriteOnlyTransaction::commit):
* platform/leveldb/LevelDBTransaction.h:
(WebCore):
(LevelDBWriteOnlyTransaction):

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

7 years ago[V8] createFunctionOnlyCallback should be in V8Callback.h with the other callback...
commit-queue@webkit.org [Tue, 11 Sep 2012 00:41:13 +0000 (00:41 +0000)]
[V8] createFunctionOnlyCallback should be in V8Callback.h with the other callback functions
https://bugs.webkit.org/show_bug.cgi?id=96336

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Kentaro Hara.

Moving this function to V8Callback.h also lets us delete
setTypeMismatchException because we no longer have a header inclusion
cycle.

* bindings/v8/V8Callback.h:
(WebCore::createFunctionOnlyCallback):
(WebCore):
* bindings/v8/V8Utilities.cpp:
* bindings/v8/V8Utilities.h:
(WebCore):
* bindings/v8/custom/V8GeolocationCustom.cpp:
* bindings/v8/custom/V8NotificationCustom.cpp:

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

7 years agohttps://bugs.webkit.org/show_bug.cgi?id=96158
bdakin@apple.com [Tue, 11 Sep 2012 00:37:06 +0000 (00:37 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=96158
Need API to suppress scrollbar animations
-and corresponding-
<rdar://problem/12210972>

Reviewed by Sam Weinig.

Source/WebCore:

This patch re-names ScrollableAre::isOnActivePage() to
ScrollableArea::scrollbarsCanBeActive(). The new name better reflects
how the function is actually used, and it allows us to use the same
function for the new API that has been added to WebKit2. Now when a
client has used that API to indicate that scrollbars should be
suppressed, ScrollableArea::scrollbarsCanBeActive() will return
false.

Page has a new member variable which indicated whether scrollbar
animations for all scrollbars associated with that page should be
suppressed. Whenever it is set to true (meaning the animations
should be suppressed), Page iterates through all of the
ScrollableAreas to tell each one to finishCurrentScrollAnimations().
* WebCore.exp.in:
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::setShouldSuppressScrollbarAnimations):
(WebCore):
* page/Page.h:
(WebCore::Page::shouldSuppressScrollbarAnimations):
(Page):

FrameView::isOnActivePage() is renamed to scrollbarsCanBeActive ()
and it will now return false if the Page says that scrollbar
animations should be suppressed.
* page/FrameView.cpp:
(WebCore::FrameView::scrollbarsCanBeActive):

scrollbarsCanBeActive() must now be a public member of FrameView so
that it can be called from RenderLayer and RenderListBox.
* page/FrameView.h:
(FrameView):

New ScrollAnimator function calls hideOverlayScrollers.
* platform/ScrollAnimator.h:
(WebCore::ScrollAnimator::finishCurrentScrollAnimations):
(ScrollAnimator):
* platform/ScrollableArea.cpp:
(WebCore::ScrollableArea::finishCurrentScrollAnimations):
(WebCore):
* platform/ScrollableArea.h:
(ScrollableArea):
* platform/mac/ScrollAnimatorMac.h:
(ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::finishCurrentScrollAnimations):

Re-name. isOnActivePage() -> scrollbarsCanBeActive()
(WebCore::FrameView::setAnimatorsAreActive):
(WebCore::FrameView::notifyPageThatContentAreaWillPaint):
* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
(WebCore::ScrollAnimatorMac::contentAreaWillPaint):
(WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
(WebCore::ScrollAnimatorMac::mouseExitedContentArea):
(WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::willStartLiveResize):
(WebCore::ScrollAnimatorMac::contentsResized):
(WebCore::ScrollAnimatorMac::willEndLiveResize):
(WebCore::ScrollAnimatorMac::contentAreaDidShow):
(WebCore::ScrollAnimatorMac::contentAreaDidHide):
(WebCore::ScrollAnimatorMac::didBeginScrollGesture):
(WebCore::ScrollAnimatorMac::didEndScrollGesture):
(WebCore::ScrollAnimatorMac::mayBeginScrollGesture):
(WebCore):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
* rendering/RenderLayer.cpp:

RenderLayer and RenderListBox should call into FrameView's
scrollbarsCanBeActive() so that they also return false when Page::
shouldSuppressScrollbarAnimations() is true.
(WebCore::RenderLayer::scrollbarsCanBeActive):
* rendering/RenderLayer.h:
(RenderLayer):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::scrollbarsCanBeActive):
* rendering/RenderListBox.h:

This is the one caller of ScrollableArea:: scrollbarsCanBeActive()
that needs to distinguish between the scrollbar-suppressing scenario
and the in-the-page-cache scenario.
* page/FocusController.cpp:
(WebCore::FocusController::setContainingWindowIsVisible):

Source/WebKit/chromium:

ScrollableArea::isOnActivePage() has been re-named to
ScrollableArea:: scrollbarsCanBeActive().
* src/ScrollbarGroup.cpp:
(WebKit::ScrollbarGroup::scrollbarsCanBeActive):
* src/ScrollbarGroup.h:
* tests/GraphicsLayerChromiumTest.cpp:
* tests/ScrollAnimatorNoneTest.cpp:
(MockScrollableArea):

Source/WebKit/win:

ScrollableArea::isOnActivePage() has been re-named to
ScrollableArea:: scrollbarsCanBeActive().
* WebScrollBar.cpp:
(WebScrollBar::scrollbarsCanBeActive):
* WebScrollBar.h:
(WebScrollBar):

Source/WebKit2:

Add suppressScrollbarAnimations as a WebCreationParameter.
* Shared/WebPageCreationParameters.h:
(WebPageCreationParameters):

New API. Calls into the web process for the setter but not the
getter.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetSuppressScrollbarAnimations):
(WKPageAreScrollbarAnimationsSuppressed):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setSuppressScrollbarAnimations):
(WebKit):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
(WebKit::WebPageProxy::areScrollbarAnimationsSuppressed):
* WebProcess/WebPage/WebPage.messages.in:

Call into WebCore.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSuppressScrollbarAnimations):
(WebKit):
* WebProcess/WebPage/WebPage.h:
(WebPage):

This ScrollableArea area function is re-named by this patch in
WebCore.
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
* WebProcess/Plugins/PDF/BuiltInPDFView.mm:
(WebKit::BuiltInPDFView::scrollbarsCanBeActive):

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

7 years ago[chromium, android] Reloading a page with a different user agent can cause the page...
commit-queue@webkit.org [Tue, 11 Sep 2012 00:22:06 +0000 (00:22 +0000)]
[chromium, android] Reloading a page with a different user agent can cause the page to be zoomed in
https://bugs.webkit.org/show_bug.cgi?id=90222

Patch by Dan Alcantara <dfalcantara@chromium.org> on 2012-09-10
Reviewed by Adam Barth.

When reloading a page with an overridden URL, the page's scroll and zoom
state will be restored once the reload is complete.  This is problematic
in situations when switching between mobile and desktop versions of the
same site because it will zoom back in on a random part of alternate page.
This CL just avoids that situation by resetting the zoom and scale whenever
this type of reload occurs.

Chromium half: https://chromiumcodereview.appspot.com/10889019

* public/WebView.h:
(WebView):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::resetScrollAndScaleState):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

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

7 years agoUnreviewed, rolling out r127837.
jamesr@google.com [Tue, 11 Sep 2012 00:12:38 +0000 (00:12 +0000)]
Unreviewed, rolling out r127837.
http://trac.webkit.org/changeset/127837
https://bugs.webkit.org/show_bug.cgi?id=93898

Broke ScrollingCoordinator on chromium

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:
* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
(WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinator::hasNonLayerFixedObjects):
(WebCore::ScrollingCoordinator::updateShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinator::setForceMainThreadScrollLayerPositionUpdates):
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingCoordinator.h:
(ScrollingCoordinator):
* page/scrolling/ScrollingCoordinatorNone.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::scrollingPeformanceLoggingEnabled):
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::ScrollingTreeNode):
(WebCore::ScrollingTreeNode::update):
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::shouldUpdateScrollLayerPositionOnMainThread):
(ScrollingTreeNode):
* page/scrolling/ScrollingTreeState.cpp:
(WebCore::ScrollingTreeState::ScrollingTreeState):
(WebCore::ScrollingTreeState::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/ScrollingTreeState.h:
(WebCore::ScrollingTreeState::shouldUpdateScrollLayerPositionOnMainThread):
(ScrollingTreeState):
* page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
(WebCore::ScrollingCoordinator::setShouldUpdateScrollLayerPositionOnMainThread):
* page/scrolling/mac/ScrollingTreeMac.mm:
(WebCore::ScrollingTree::updateDebugRootLayer):
* page/scrolling/mac/ScrollingTreeNodeMac.mm:
(WebCore::ScrollingTreeNodeMac::update):
(WebCore::ScrollingTreeNodeMac::scrollPosition):
(WebCore::ScrollingTreeNodeMac::setScrollPosition):
(WebCore::ScrollingTreeNodeMac::setScrollPositionWithoutContentEdgeConstraints):
(WebCore::ScrollingTreeNodeMac::setScrollLayerPosition):

Source/WebKit2:

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):

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

7 years agoSource/WebCore: Remove unnecessary codepaths in SMILTimeContainer::updateAnimations
pdr@google.com [Tue, 11 Sep 2012 00:07:26 +0000 (00:07 +0000)]
Source/WebCore: Remove unnecessary codepaths in SMILTimeContainer::updateAnimations
https://bugs.webkit.org/show_bug.cgi?id=96224

Reviewed by Nikolas Zimmermann.

This change removes two sources of unnecessary code in
SMILTimeContainer::updateAnimations:
    1) After r117711 we now accumulate the result of multiple
       animations into the first _contributing_ animation
       element. As a result it is no longer necessary to
       track both which elements are contributing AND which elements
       we are storing results into. Both cases are now handled
       together with resultsElements.

    2) r32044 added a second sort of the animation elements
       in order to process animateTransform last. This change
       was added 4 years ago, before we correctly handled <use>
       and the instance tree, and I think the extra sort is no
       longer necessary. A test has been added to ensure this
       is the case.

This change also does a minor cleanup of resultsElements. Previously,
we added animation elements to resultsElements and then removed them
if the animation element did not contribute. After this change, we
only add to resultsElements (no more add-then-remove).

Test: svg/animations/use-animate-transform-and-position.html

* svg/animation/SMILTimeContainer.cpp:
(WebCore::SMILTimeContainer::sortByPriority):
(WebCore::SMILTimeContainer::updateAnimations):

LayoutTests: Remove unnecessary work in SMILTimeContainer::updateAnimations
https://bugs.webkit.org/show_bug.cgi?id=96224

Reviewed by Nikolas Zimmermann.

This change should have no functional differences but a test
is being added to show that. SMILTimeContainer::updateAnimations
contained a comment explaining why a animateTransform needed to be
processed last but that is no longer the case (as the test shows).

* svg/animations/script-tests/use-animate-transform-and-position.js: Added.
(sample1):
(sample2):
(sample3):
(sample4):
(sample5):
(executeTest):
* svg/animations/use-animate-transform-and-position-expected.txt: Added.
* svg/animations/use-animate-transform-and-position.html: Added.

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

7 years agoRename box-sizing applying methods to be more clear about just applying box-sizing.
ojan@chromium.org [Mon, 10 Sep 2012 23:55:38 +0000 (23:55 +0000)]
Rename box-sizing applying methods to be more clear about just applying box-sizing.
https://bugs.webkit.org/show_bug.cgi?id=96319

Reviewed by Tony Chang.

This is strictly a rename. No logic or web-exposed changes.

* rendering/AutoTableLayout.cpp:
(WebCore::AutoTableLayout::recalcColumn):
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcWidthArray):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::computePreferredLogicalWidths):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::adjustBorderBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustBorderBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalWidthForBoxSizing):
(WebCore::RenderBox::adjustContentBoxLogicalHeightForBoxSizing):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeLogicalClientHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::computePreferredLogicalWidths):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computePreferredLogicalWidths):
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::computePreferredLogicalWidths):
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::computePreferredLogicalWidths):
* rendering/RenderSlider.cpp:
(WebCore::RenderSlider::computePreferredLogicalWidths):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::computePreferredLogicalWidths):

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

7 years agoUnreviewed; rolling out r128081.
jer.noble@apple.com [Mon, 10 Sep 2012 23:39:47 +0000 (23:39 +0000)]
Unreviewed; rolling out r128081.
http://trac.webkit.org/changeset/128081
https://bugs.webkit.org/show_bug.cgi?id=96134

New test http/tests/media/video-donottrack.html fails to run on Apple test bots.

Source/WebCore:

* html/HTMLMediaElement.cpp:
* html/HTMLMediaElement.h:
(HTMLMediaElement):
* loader/FrameLoaderClient.h:
* platform/graphics/MediaPlayer.h:
(MediaPlayer):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebDelegateImplementationCaching.h:
(WebFrameLoadDelegateImplementationCache):
* WebView/WebDelegateImplementationCaching.mm:
* WebView/WebView.mm:
(-[WebView _cacheFrameLoadDelegateImplementations]):

Source/WebKit2:

* Shared/APIClientTraits.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
(InjectedBundlePageLoaderClient):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebFrameLoaderClient):
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):

Tools:

* DumpRenderTree/TestRunner.cpp:
(TestRunner::TestRunner):
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner):
* DumpRenderTree/mac/FrameLoadDelegate.mm:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
(InjectedBundlePage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner):

LayoutTests:

* http/tests/media/resources/video-donottrack-check-donottrack.php: Removed.
* http/tests/media/video-donottrack-expected.txt: Removed.
* http/tests/media/video-donottrack.html: Removed.
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/Skipped:

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

7 years agoReduce the number of treeScope queries when matching rules.
dglazkov@chromium.org [Mon, 10 Sep 2012 23:26:34 +0000 (23:26 +0000)]
Reduce the number of treeScope queries when matching rules.
https://bugs.webkit.org/show_bug.cgi?id=96315

Reviewed by Eric Seidel.

In the worst case, treeScope() requires a HashMap lookup, which could be slow. Since the value is always the same for the element,
we can just ask for it once.

No new tests, no change in behavior.

* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList): Moved the call to treeScope out of the loop.

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

7 years ago[V8] V8PerIsolateData::m_toStringTemplate leaks memory
abarth@webkit.org [Mon, 10 Sep 2012 23:23:36 +0000 (23:23 +0000)]
[V8] V8PerIsolateData::m_toStringTemplate leaks memory
https://bugs.webkit.org/show_bug.cgi?id=96322

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Kentaro Hara.

We never call Dispose to balance the call to v8::Persistent::New. This
patch uses ScopedPersistent to call Dispose automatically.

* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::toStringTemplate):
    - I've changed this function to return a new local handle in case
      anyone is trying to hold on to these handles during shutdown.
* bindings/v8/V8PerIsolateData.h:
(V8PerIsolateData):

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

7 years ago[V8] V8LazyEventListener::prepareListenerObject uses inefficient string operations
abarth@webkit.org [Mon, 10 Sep 2012 23:23:00 +0000 (23:23 +0000)]
[V8] V8LazyEventListener::prepareListenerObject uses inefficient string operations
https://bugs.webkit.org/show_bug.cgi?id=96324

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Kentaro Hara.

Previously, this code called String::append several times, which
mallocs a new string buffer each time. This patch switches this code to
use operator+, which uses StringAppend to optimize these operations
down to a single malloc.

* bindings/v8/V8LazyEventListener.cpp:
(WebCore::V8LazyEventListener::prepareListenerObject):

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

7 years ago[V8] V8AuxiliaryContext used by IDB leaks memory
abarth@webkit.org [Mon, 10 Sep 2012 23:22:10 +0000 (23:22 +0000)]
[V8] V8AuxiliaryContext used by IDB leaks memory
https://bugs.webkit.org/show_bug.cgi?id=96317

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Tony Chang.

Source/WebCore:

Before this patch, we leaked m_auxiliaryContext on V8PerIsolateData
because no one ever called Dispose to balance the call to
V8::Context::New. This patch uses ScopedPersistent to call Dispose
automatically.

Also, I've deleted the V8AuxiliaryContext because it just reinvents
V8::Context::Scope.

* bindings/v8/IDBBindingUtilities.cpp:
(WebCore::createIDBKeyFromSerializedValueAndKeyPath):
(WebCore::injectIDBKeyIntoSerializedValue):
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::ensureAuxiliaryContext):
(WebCore):
* bindings/v8/V8PerIsolateData.h:
(V8PerIsolateData):
* bindings/v8/V8Utilities.cpp:
* bindings/v8/V8Utilities.h:

Source/WebKit/chromium:

Call the V8 APIs directly instead of using a helper class.

* tests/IDBBindingUtilitiesTest.cpp:
(WebCore::TEST):

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

7 years ago[V8] currentDocument doesn't need to handle the case where there is no v8::Context
abarth@webkit.org [Mon, 10 Sep 2012 23:21:53 +0000 (23:21 +0000)]
[V8] currentDocument doesn't need to handle the case where there is no v8::Context
https://bugs.webkit.org/show_bug.cgi?id=96312

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Eric Seidel.

This function is always called while V8 is on the stack. It doesn't
need to handle this impossible error condition.

* bindings/v8/BindingState.cpp:
(WebCore::currentDocument):

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

7 years ago[V8] Inline firstFrame and currentFrame into their unique callers
abarth@webkit.org [Mon, 10 Sep 2012 23:21:37 +0000 (23:21 +0000)]
[V8] Inline firstFrame and currentFrame into their unique callers
https://bugs.webkit.org/show_bug.cgi?id=96309

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Eric Seidel.

Source/WebCore:

These functions have only one caller. We'd prefer not to have more
callers (because there's usually no reason to indirect through the
Frame), so we should inline them into their one caller (which is the
Chromium WebKit API).

* bindings/js/BindingState.h:
(WebCore):
* bindings/v8/BindingState.cpp:
* bindings/v8/BindingState.h:
(WebCore):
* bindings/v8/ScriptController.cpp:
* bindings/v8/ScriptController.h:
(ScriptController):

Source/WebKit/chromium:

This patch just lines these WebCore functions because we only call them
from here.

* src/WebFrameImpl.cpp:
(WebKit::WebFrame::frameForEnteredContext):
(WebKit::WebFrame::frameForCurrentContext):

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

7 years agoTry to fix the Windows (32-bit) build.
ggaren@apple.com [Mon, 10 Sep 2012 23:13:47 +0000 (23:13 +0000)]
Try to fix the Windows (32-bit) build.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_tear_off_arguments):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_tear_off_arguments): Get operands 1 and 2, not 1 and 1. :(

Also took this opportunity to rename to indicate that these values are
not destinations anymore.

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

7 years agoMark gradient-with-scaled-ancestor.html as flaky
fsamuel@chromium.org [Mon, 10 Sep 2012 23:01:58 +0000 (23:01 +0000)]
Mark gradient-with-scaled-ancestor.html as flaky

* platform/chromium/TestExpectations:

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

7 years agoRemove stray Changelog message.
fsamuel@chromium.org [Mon, 10 Sep 2012 22:39:57 +0000 (22:39 +0000)]
Remove stray Changelog message.

Patch by Jon Lee <jonlee@apple.com> on 2012-09-10

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

7 years agoRemove stray Changelog message.
jonlee@apple.com [Mon, 10 Sep 2012 22:29:00 +0000 (22:29 +0000)]
Remove stray Changelog message.

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

7 years agoSkip video-donottrack.html on Chromium
fsamuel@chromium.org [Mon, 10 Sep 2012 22:24:43 +0000 (22:24 +0000)]
Skip video-donottrack.html on Chromium

* platform/chromium/TestExpectations:

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

7 years agoTestExpectationsChecker._determine_port_from_expectations_path() does not support...
commit-queue@webkit.org [Mon, 10 Sep 2012 22:22:01 +0000 (22:22 +0000)]
TestExpectationsChecker._determine_port_from_expectations_path() does not support cascaded TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=96205

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-09-10
Reviewed by Tony Chang.

_determine_port_from_expectations_path() was calling port.path_to_test_expectations_file()
internally, which means that it would support only 1 TestExpectations file per port. This
is an issue for ports such as EFL that support cascased TestExpectations (efl-wk2 -> efl
and efl-wk1 -> efl).

This patch makes _determine_port_from_expectations_path() call port.expectations_files()
instead so that all the ports TestExpectations are recognized. The ports are also
constructed twice, with "webkit_test_runner" option set to True and False so that we
retrieve the TestExpectations paths for both WebKit1 and WebKit2.

* Scripts/webkitpy/style/checkers/test_expectations.py:
(TestExpectationsChecker._determine_port_from_expectations_path):
* Scripts/webkitpy/style/checkers/test_expectations_unittest.py: Add corresponding unit test.
(TestExpectationsTestCase.test_determine_port_from_expectations_path):

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

7 years agoImplement canvas v5 line dash feature
commit-queue@webkit.org [Mon, 10 Sep 2012 22:21:49 +0000 (22:21 +0000)]
Implement canvas v5 line dash feature
https://bugs.webkit.org/show_bug.cgi?id=82560

Patch by Justin Novosad <junov@chromium.org> on 2012-09-10
Reviewed by Darin Adler.

Source/WebCore:

Adding new canvas 2d context API methods getLineDash and setLineDash,
and new attribute lineDashOffset. Implementation mostly based on
the existing webkitLineDash feature, with changes that reflect the
canvas v5 specification. This change is visible to all JS ports,
unlike webkitLineDash which is not exposed to V8. The new lineDash
and the legacy webkitLineDash features access the same rendering
context state. The JavasScriptCore binding layer was augmented to
support the sequence<float> IDL type.

Tests: fast/canvas/canvas-lineDash-invalid.html
       fast/canvas/canvas-lineDash.html

* bindings/js/JSCanvasRenderingContext2DCustom.cpp:
(WebCore::JSCanvasRenderingContext2D::webkitLineDash):
(WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
* bindings/js/JSDOMBinding.h:
Added template specialization on float to NativeValueTraits in order to
add support for the sequence<double> IDL type to JavaScriptCore.
* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::getLineDash):
New 2D canvas API method, returns the current line dash array
(WebCore::lineDashSequenceIsValid):
Returns true if the line dash array contains only non-negative finite
numbers.
(WebCore::CanvasRenderingContext2D::setLineDash):
New 2D canvas API method, set the line dash array.
(WebCore::CanvasRenderingContext2D::setWebkitLineDash):
Legacy implementation, does not double the new line dash array if
it contains an odd number of elements.  Just accepts it as is.
(WebCore::CanvasRenderingContext2D::lineDashOffset):
Attribute getter
(WebCore::CanvasRenderingContext2D::setLineDashOffset):
Attribute setter
(WebCore::CanvasRenderingContext2D::webkitLineDashOffset):
Alias for lineDashOffset
(WebCore::CanvasRenderingContext2D::setWebkitLineDashOffset):
Alias for setLineDashOffset
(WebCore::CanvasRenderingContext2D::applyLineDash):
Sends the line dash state to the GraphicsContext
* html/canvas/CanvasRenderingContext2D.h:
(CanvasRenderingContext2D):
(State):
* html/canvas/CanvasRenderingContext2D.idl:
* platform/graphics/DashArray.h:

LayoutTests:

New layout tests for the canvas lineDash feature.
-Validate normal behavior of lineDash state change operations.
-Validate behavior when attempting invalid state changes.
-Validate rendering behavior.

* fast/canvas/canvas-lineDash-expected.txt: Added.
* fast/canvas/canvas-lineDash-invalid-expected.txt: Added.
* fast/canvas/canvas-lineDash-invalid.html: Added.
* fast/canvas/canvas-lineDash.html: Added.
* fast/canvas/script-tests/canvas-lineDash-invalid.js: Added.
(resetLineDash):
(trySettingLineDash):
(trySettingLineDashWithNoArgs):
(trySettingLineDashOffset):
* fast/canvas/script-tests/canvas-lineDash.js: Added.
(dataToArray):
(getPixel):
(pixelShouldBe):

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

7 years agoUnreviewed, rolling out r128109.
commit-queue@webkit.org [Mon, 10 Sep 2012 22:18:40 +0000 (22:18 +0000)]
Unreviewed, rolling out r128109.
http://trac.webkit.org/changeset/128109
https://bugs.webkit.org/show_bug.cgi?id=96326

broke win and lion builds (Requested by kling on #webkit).

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

* WebCore.exp.in:
* dom/Element.cpp:
(WebCore::Element::createMutableAttributeData):
* dom/ElementAttributeData.cpp:
(WebCore::immutableElementAttributeDataSize):
(WebCore::ElementAttributeData::createImmutable):
(WebCore::ElementAttributeData::ElementAttributeData):
(WebCore::ElementAttributeData::~ElementAttributeData):
(WebCore::ElementAttributeData::addAttribute):
(WebCore::ElementAttributeData::removeAttribute):
(WebCore::ElementAttributeData::reportMemoryUsage):
(WebCore::ElementAttributeData::cloneDataFrom):
(WebCore::ElementAttributeData::clearAttributes):
* dom/ElementAttributeData.h:
(WebCore):
(WebCore::ElementAttributeData::create):
(ElementAttributeData):
(WebCore::ElementAttributeData::isMutable):
(WebCore::ElementAttributeData::makeMutable):
(WebCore::ElementAttributeData::length):
(WebCore::ElementAttributeData::attributeItem):

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

7 years agoAccessibilityNodeObject* is not in Mac xcode file
cfleizach@apple.com [Mon, 10 Sep 2012 22:17:08 +0000 (22:17 +0000)]
AccessibilityNodeObject* is not in Mac xcode file
https://bugs.webkit.org/show_bug.cgi?id=96327

Reviewed by Sam Weinig.

* WebCore.xcodeproj/project.pbxproj:

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

7 years agoSource/WebCore: Update notifications to latest spec
jonlee@apple.com [Mon, 10 Sep 2012 22:12:52 +0000 (22:12 +0000)]
Source/WebCore: Update notifications to latest spec
https://bugs.webkit.org/show_bug.cgi?id=91726
<rdar://problem/11910451>

Reviewed by Alexey Proskuryakov.

Among the changes:

Addition of lang attribute
http://lists.w3.org/Archives/Public/public-web-notification/2012Jul/0025.html

Specification of icon URL is icon instead of iconURL
http://lists.w3.org/Archives/Public/public-web-notification/2012Jul/0012.html

Tests are not possible since at best they only verify exposure of the attributes, which isn't
terribly useful, and use of the attributes depend on the platform.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::create): Add support for reading lang, dir, and icon from option dictionary.
* Modules/notifications/Notification.h:
(Notification): Make url() and setURL(), which are used for HTML notifications, only available with
ENABLE(LEGACY_NOTIFICATIONS).
(WebCore::Notification::setIconURL): Added so that it can be set from the option dictionary.
(WebCore::Notification::lang):
(WebCore::Notification::setLang):
* Modules/notifications/Notification.idl: According to specification, dir is not exposed.

Source/WebKit/mac: Update notifications to latest spec
https://bugs.webkit.org/show_bug.cgi?id=91726
<rdar://problem/11910451>

Reviewed by Alexey Proskuryakov.

Expose lang and dir.

* WebView/WebNotification.h:
* WebView/WebNotification.mm:
(-[WebNotification lang]):
(-[WebNotification dir]):

Source/WebKit2: Update notifications to latest spec
https://bugs.webkit.org/show_bug.cgi?id=91726
<rdar://problem/11910451>

Reviewed by Alexey Proskuryakov.

Expose lang and dir.

* UIProcess/API/C/WKNotification.cpp:
(WKNotificationCopyLang):
(WKNotificationCopyDir):
* UIProcess/API/C/WKNotification.h:
* UIProcess/Notifications/WebNotification.cpp:
(WebKit::WebNotification::WebNotification):
* UIProcess/Notifications/WebNotification.h:
(WebKit::WebNotification::create):
(WebKit::WebNotification::lang):
(WebKit::WebNotification::dir):
(WebNotification):
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::show):
* UIProcess/Notifications/WebNotificationManagerProxy.h:
(WebNotificationManagerProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showNotification):
* UIProcess/WebPageProxy.h:
(WebPageProxy):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/Notifications/WebNotificationManager.cpp:
(WebKit::WebNotificationManager::show):

LayoutTests: The options dictionary in Notification constructor should not accept event listeners
https://bugs.webkit.org/show_bug.cgi?id=95538
<rdar://problem/12213901>

Reviewed by Alexey Proskuryakov.

Make sure the onshow handler added in the options dictionary does not get called.

* http/tests/notifications/events-in-dictionary-expected.txt: Added.
* http/tests/notifications/events-in-dictionary.html: Added.

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

7 years agoNSInvalidArgumentException in WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader()
jer.noble@apple.com [Mon, 10 Sep 2012 21:52:24 +0000 (21:52 +0000)]
NSInvalidArgumentException in WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader()
https://bugs.webkit.org/show_bug.cgi?id=96320

Reviewed by Geoffrey Garen.

Client was being cached as the FrameLoaderClient, but requests were sent to the ResourceLoadClient.

* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader): Send the request to the FrameLoadDelegate.
* WebView/WebDelegateImplementationCaching.h:
* WebView/WebDelegateImplementationCaching.mm:
(CallFrameLoadDelegateReturningBoolean): Added.

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

7 years agoDFG misses arguments tear-off for function.arguments if 'arguments' is used
ggaren@apple.com [Mon, 10 Sep 2012 21:49:25 +0000 (21:49 +0000)]
DFG misses arguments tear-off for function.arguments if 'arguments' is used
https://bugs.webkit.org/show_bug.cgi?id=96227

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

We've decided not to allow function.arguments to alias the local
'arguments' object, or a local var or function named 'arguments'.
Aliasing complicates the implementation (cf, this bug) and can produce
surprising behavior for web programmers.

Eliminating the aliasing has the side-effect of fixing this bug.

The compatibilty story: function.arguments is deprecated, was never
specified, and throws an exception in strict mode, so we expect it to
disappear over time. Firefox does not alias to 'arguments'; Chrome
does, but not if you use eval or with; IE does; Safari did.

* dfg/DFGByteCodeParser.cpp: Noticed a little cleanup while verifying
this code. Use the CodeBlock method for better encapsulation.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::retrieveArgumentsFromVMCode): Behavior change: don't
alias.

* tests/mozilla/js1_4/Functions/function-001.js:
(TestFunction_4): Updated test expectations for changed behavior.

LayoutTests:

New test, and updated expectations.

* fast/js/script-tests/function-dot-arguments.js:
* fast/js/function-dot-arguments-expected.txt: Updated for new behavior.

* fast/js/dfg-tear-off-function-dot-arguments.html:
* fast/js/script-tests/dfg-tear-off-function-dot-arguments.js: Added. New test for bug cited here.

* fast/js/function-dot-arguments-identity-expected.txt:
* fast/js/function-dot-arguments-identity.html: Added. New test for new behavior.

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

7 years agoRename computeLogicalWidth to updateLogicalWidth
tony@chromium.org [Mon, 10 Sep 2012 21:47:50 +0000 (21:47 +0000)]
Rename computeLogicalWidth to updateLogicalWidth
https://bugs.webkit.org/show_bug.cgi?id=96288

Reviewed by Ojan Vafai.

Also rename recomputeLogicalWidth to updateLogicalWidthAndColumnWidth.
Also rename RenderTableCell::updateLogicalWidth to RenderTableCell::setCellLogicalWidth.

No new tests, this is just a refactor.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateLogicalWidthAndColumnWidth):
(WebCore::RenderBlock::layoutBlock):
(WebCore::RenderBlock::layoutPositionedObjects):
(WebCore::RenderBlock::insertFloatingObject):
(WebCore::RenderBlock::getClearDelta):
* rendering/RenderBlock.h:
* rendering/RenderBox.cpp:
(WebCore::RenderBox::updateLogicalWidth):
* rendering/RenderBox.h:
(RenderBox):
(WebCore::RenderBox::tryLayoutDoingPositionedMovementOnly):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutBlock):
* rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::layout):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::layoutBlock):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::layout):
(WebCore::RenderFlowThread::updateLogicalWidth):
* rendering/RenderFlowThread.h:
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::layoutBlock):
* rendering/RenderHTMLCanvas.cpp:
(WebCore::RenderHTMLCanvas::canvasSizeChanged):
* rendering/RenderIFrame.cpp:
(WebCore::RenderIFrame::updateLogicalWidth):
(WebCore::RenderIFrame::layoutSeamlessly):
(WebCore::RenderIFrame::layout):
* rendering/RenderIFrame.h:
(RenderIFrame):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::imageDimensionsChanged):
* rendering/RenderMeter.cpp:
(WebCore::RenderMeter::updateLogicalWidth):
* rendering/RenderMeter.h:
(RenderMeter):
* rendering/RenderMultiColumnBlock.cpp:
(WebCore::RenderMultiColumnBlock::updateLogicalWidthAndColumnWidth):
* rendering/RenderMultiColumnBlock.h:
(RenderMultiColumnBlock):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::updateLogicalWidth):
* rendering/RenderMultiColumnSet.h:
(RenderMultiColumnSet):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::layout):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::layout):
* rendering/RenderTable.h:
(RenderTable):
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::updateLogicalWidth):
(WebCore::RenderTableCell::setCellLogicalWidth):
* rendering/RenderTableCell.h:
(RenderTableCell):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::setCellLogicalWidths):
* rendering/RenderView.cpp:
(WebCore::RenderView::updateLogicalWidth):
* rendering/RenderView.h:
* rendering/svg/RenderSVGForeignObject.cpp:
(WebCore::RenderSVGForeignObject::updateLogicalWidth):
* rendering/svg/RenderSVGForeignObject.h:
(RenderSVGForeignObject):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::layout):

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

7 years agoElementAttributeData: Use subclasses to manage varying object layouts.
kling@webkit.org [Mon, 10 Sep 2012 21:43:52 +0000 (21:43 +0000)]
ElementAttributeData: Use subclasses to manage varying object layouts.
<http://webkit.org/b/94465>

Reviewed by Antti Koivisto.

Add two ElementAttributeData subclasses:

    - MutableElementAttributeData
    - ImmutableElementAttributeData

The ElementAttributeData::m_isMutable bit determines which subclass to cast to when accessing
the attribute storage. Added mutableAttributeVector() and immutableAttributeArray() helpers
to ElementAttributeData (with appropriate assertions.)

This patch removes one step of indirection in the mutable case, since the Vector<Attribute> is no
longer heap-allocated, but part of MutableElementAttributeData.

Added a WTF::deleteOwnedPtr(ElementAttributeData*) specialization so that the appropriate subclass
destructor is called for these objects.

* WebCore.exp.in:
* dom/Element.cpp:
(WebCore::Element::createMutableAttributeData):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::createImmutable):
(WebCore::ElementAttributeData::create):
(WebCore::ElementAttributeData::ElementAttributeData):
(WebCore::MutableElementAttributeData::MutableElementAttributeData):
(WebCore::ImmutableElementAttributeData::ImmutableElementAttributeData):
(WebCore::ImmutableElementAttributeData::~ImmutableElementAttributeData):
(WebCore::ElementAttributeData::makeMutableCopy):
(WebCore::ElementAttributeData::addAttribute):
(WebCore::ElementAttributeData::removeAttribute):
(WebCore::ElementAttributeData::reportMemoryUsage):
(WebCore::ElementAttributeData::cloneDataFrom):
(WebCore::ElementAttributeData::clearAttributes):
* dom/ElementAttributeData.h:
(ElementAttributeData):
(WebCore::ElementAttributeData::isMutable):
(ImmutableElementAttributeData):
(MutableElementAttributeData):
(WebCore::MutableElementAttributeData::MutableElementAttributeData):
(WebCore::ElementAttributeData::immutableAttributeArray):
(WebCore::ElementAttributeData::mutableAttributeVector):
(WebCore::ElementAttributeData::length):
(WebCore::ElementAttributeData::attributeItem):

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

7 years ago[WTR] Generated source files should include config.h
ryuan.choi@samsung.com [Mon, 10 Sep 2012 21:43:41 +0000 (21:43 +0000)]
[WTR] Generated source files should include config.h
https://bugs.webkit.org/show_bug.cgi?id=96254

Reviewed by Benjamin Poulain.

Current coding style has encouraged to include config.h at the first position,
But derived sources, generated by CodeGeneratorTestRunner.pm, don't follow
this rule.
Therefore, this patch added it.

* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
(_generateImplementationFile):

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

7 years agoRemove stray spaces found after :: in case statements
tony@chromium.org [Mon, 10 Sep 2012 21:41:14 +0000 (21:41 +0000)]
Remove stray spaces found after :: in case statements
https://bugs.webkit.org/show_bug.cgi?id=96314

Reviewed by Ojan Vafai.

New contributors keep copy/pasting this style error and it makes me sad.
Also remove the extra spaces in MediaQueryEvaluator.cpp.

No new tests, this is just a style refactor.

* css/CSSPrimitiveValue.cpp:
(WebCore::isValidCSSUnitTypeForDoubleConversion):
(WebCore::unitCategory):
* css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::MediaQueryEvaluator):

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

7 years agoChange -data-blackberry-webworks-context to -data-webworks-context
commit-queue@webkit.org [Mon, 10 Sep 2012 21:18:15 +0000 (21:18 +0000)]
Change -data-blackberry-webworks-context to -data-webworks-context
because not all webworks apps are blackberry apps.
https://bugs.webkit.org/show_bug.cgi?id=96297

Patch by Genevieve Mak <gmak@rim.com> on 2012-09-10
Reviewed by Antonio Gomes.

PR #193726
Rubber Stamped interally by Mike Fenton.

* WebKitSupport/DOMSupport.cpp:
(BlackBerry::WebKit::DOMSupport::webWorksContext):

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

7 years agoUnreviewed Rebaseline for Chromium Win XP.
fsamuel@chromium.org [Mon, 10 Sep 2012 21:07:59 +0000 (21:07 +0000)]
Unreviewed Rebaseline for Chromium Win XP.

* platform/chromium-win-xp/fast/hidpi/gradient-with-scaled-ancestor-expected.png: Added.

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

7 years agoRebaselined for Chromium.
fsamuel@chromium.org [Mon, 10 Sep 2012 20:59:51 +0000 (20:59 +0000)]
Rebaselined for Chromium.

* platform/chromium/http/tests/security/contentSecurityPolicy/source-list-parsing-nonascii-expected.txt: Added.

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

7 years ago Build fix.
ap@apple.com [Mon, 10 Sep 2012 20:55:07 +0000 (20:55 +0000)]
    Build fix.

        * UIProcess/WebContext.h: Added a default value for relatedPage argment - if
        you don't have one, null is fine.

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

7 years ago[V8] setNamedHiddenWindowReference doesn't need to be a special case
abarth@webkit.org [Mon, 10 Sep 2012 20:54:43 +0000 (20:54 +0000)]
[V8] setNamedHiddenWindowReference doesn't need to be a special case
https://bugs.webkit.org/show_bug.cgi?id=96198

Reviewed by Nate Chapin.

Prior to this patch, the DOMWindow cached its properties on the outter
global object rather than on the Holder of the properties. (We cache
properties to prevent their DOM wrappers from being garbage collected
too early.) There doesn't seem to be any reason why DOMWindow need to
be special-cased in this regard. We can just cache the properities on
their Holders, as usual.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNormalAttrGetter):
* bindings/v8/V8DOMWrapper.cpp:
* bindings/v8/V8DOMWrapper.h:
(V8DOMWrapper):
* bindings/v8/custom/V8LocationCustom.cpp:
* page/Location.idl:
    - Previously, Location had a custom toV8 function so that
      document.location would cache its wrapper in the same place as
      window.location. However, that's no longer necessary as the
      DOMWindow now holds its Document in a hidden property, which
      means the DOMWindow keeps the cached location property on
      Document alive anyway.

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

7 years ago [WK2] Add an API to open a page in same process
ap@apple.com [Mon, 10 Sep 2012 20:52:04 +0000 (20:52 +0000)]
    [WK2] Add an API to open a page in same process
        https://bugs.webkit.org/show_bug.cgi?id=96306

        Reviewed by Anders Carlsson.

        The name "related" inspired by <http://wiki.whatwg.org/wiki/Links_to_Unrelated_Browsing_Contexts>.

        * UIProcess/API/mac/WKView.h: Added an API. It's unwieldy, but I blame
        WKBrowsingContextGroup, not the related view.

        * UIProcess/API/mac/WKViewPrivate.h: Matching SPI for clients that mostly use
        C APIs.

        * UIProcess/API/mac/WKView.mm:
        (-[WKView initWithFrame:processGroup:browsingContextGroup:]): Use new back-end
        signature.
        (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
        Get page from WKView, and call back-end.
        (-[WKView initWithFrame:contextRef:pageGroupRef:]): Reimplement existing method
        by calling new, more powerful one.
        (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Just one change,
        pass relatedPage to the context.

        * UIProcess/WebContext.cpp: (WebKit::WebContext::createWebPage): If related page
        is not null, use its process.

        * UIProcess/WebContext.h: (WebContext): Updated createWebPage signature.

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

7 years agoofflineasm has some impossible to implement, and unused, instructions
fpizlo@apple.com [Mon, 10 Sep 2012 20:51:13 +0000 (20:51 +0000)]
offlineasm has some impossible to implement, and unused, instructions
https://bugs.webkit.org/show_bug.cgi?id=96310

Reviewed by Mark Hahnenberg.

* offlineasm/armv7.rb:
* offlineasm/instructions.rb:
* offlineasm/x86.rb:

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

7 years agoUpdate the css3/filters test expectations to match the bots.
ojan@chromium.org [Mon, 10 Sep 2012 20:33:11 +0000 (20:33 +0000)]
Update the css3/filters test expectations to match the bots.
90+ of these tests never failed, so adding the whole css3/filters
directory was incorrect.
* platform/chromium/TestExpectations:

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

7 years agoSilence a warning when running update-webkit-localizable-strings
andersca@apple.com [Mon, 10 Sep 2012 20:31:17 +0000 (20:31 +0000)]
Silence a warning when running update-webkit-localizable-strings
https://bugs.webkit.org/show_bug.cgi?id=96307

Reviewed by John Sullivan.

Since both the blockedPluginByContentSecurityPolicyText and insecurePluginVersionText strings use exact the same wording,
use WEB_UI_STRING_KEY to indicate that they are different.

* English.lproj/Localizable.strings:
Update the localizable strings file.

* platform/LocalizedStrings.cpp:
(WebCore::blockedPluginByContentSecurityPolicyText):
(WebCore::insecurePluginVersionText):

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

7 years agoUnreviewed fix of webkit-lint for Chromium gardening
fsamuel@chromium.org [Mon, 10 Sep 2012 20:27:29 +0000 (20:27 +0000)]
Unreviewed fix of webkit-lint for Chromium gardening

* platform/chromium/TestExpectations:

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

7 years agoRefactored op_tear_off* to support activations that don't allocate space for 'arguments'
ggaren@apple.com [Mon, 10 Sep 2012 20:23:50 +0000 (20:23 +0000)]
Refactored op_tear_off* to support activations that don't allocate space for 'arguments'
https://bugs.webkit.org/show_bug.cgi?id=96231

Reviewed by Gavin Barraclough.

This is a step toward smaller activations.

As a side-effect, this patch eliminates a load and branch from the hot path
of activation tear-off by moving it to the cold path of arguments tear-off. Our
optimizing assumptions are that activations are common and that reifying the
arguments object is less common.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dump):
* bytecode/Opcode.h:
(JSC::padOpcodeName): Updated for new opcode lengths.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::addConstantValue): Added support for JSValue()
in the bytecode, which we use when we have 'arguments' but no activation.

(JSC::BytecodeGenerator::emitReturn): Always emit tear_off_arguments
if we've allocated the arguments registers. This allows tear_off_activation
not to worry about the arguments object anymore.

Also, pass the activation and arguments values directly to these opcodes
instead of requiring the opcodes to infer the values through special
registers. This gives us more flexibility to move or eliminate registers.

* dfg/DFGArgumentsSimplificationPhase.cpp:
(JSC::DFG::ArgumentsSimplificationPhase::run):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGNode.h:
(Node): Updated for new opcode lengths.

* dfg/DFGOperations.cpp: Activation tear-off doesn't worry about the
arguments object anymore. If 'arguments' is in use and reified, it's
responsible for aliasing back to the activation object in tear_off_arguments.

* dfg/DFGOperations.h:
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
(SpeculativeJIT):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile): Don't pass the arguments object to
activation tear-off; do pass the activation object to arguments tear-off.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::privateExecute): Ditto.

* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_tear_off_arguments):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_tear_off_activation):
(JSC::JIT::emit_op_tear_off_arguments):
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm: Same change in a few more execution engines.

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

7 years ago[V8] V8HTMLDocument::write and friends should not indirect through Frame
abarth@webkit.org [Mon, 10 Sep 2012 20:21:33 +0000 (20:21 +0000)]
[V8] V8HTMLDocument::write and friends should not indirect through Frame
https://bugs.webkit.org/show_bug.cgi?id=96289

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Eric Seidel.

There is no reason why document.write and friends need to indirect
through the Frame to find the active document. This patch makes these
functions work the same as the JSC versions.

* bindings/v8/BindingState.cpp:
* bindings/v8/BindingState.h:
    - This patch removes the last callers of activeFrame, so we can
      remove the function entirely.
* bindings/v8/custom/V8HTMLDocumentCustom.cpp:
(WebCore::V8HTMLDocument::writeCallback):
(WebCore::V8HTMLDocument::writelnCallback):
(WebCore::V8HTMLDocument::openCallback):

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

7 years ago[V8] Constructors try to handle errors that cannot occur
abarth@webkit.org [Mon, 10 Sep 2012 20:20:58 +0000 (20:20 +0000)]
[V8] Constructors try to handle errors that cannot occur
https://bugs.webkit.org/show_bug.cgi?id=96304

Patch by Adam Barth <abarth@chromium.org> on 2012-09-10
Reviewed by Kentaro Hara.

There's no reason for constructors to indirect through the Frame. Now
that we can reliably get the Document from the v8::Context, we can just
grab it without worrying about handling error conditions related to not
being able to find the Document.

* bindings/scripts/CodeGeneratorV8.pm:
(GenerateNamedConstructorCallback):
* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
(WebCore::V8TestNamedConstructorConstructorCallback):
* bindings/v8/custom/V8AudioContextCustom.cpp:
(WebCore::V8AudioContext::constructorCallback):
* bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
(WebCore::v8HTMLImageElementConstructorCallback):

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

7 years agoSource/WebKit/chromium: [chromium] Add unused GestureTapCancel
commit-queue@webkit.org [Mon, 10 Sep 2012 20:09:45 +0000 (20:09 +0000)]
Source/WebKit/chromium: [chromium] Add unused GestureTapCancel
https://bugs.webkit.org/show_bug.cgi?id=96183

Patch by Rick Byers <rbyers@chromium.org> on 2012-09-10
Reviewed by Adam Barth.

This adds a new 'tap cancel' gesture type.  This is temporarily unused,
so that we can change chromium to start sending the gesture type
without breaking anything.

* public/WebInputEvent.h:
* src/PageWidgetDelegate.cpp:
(WebKit::PageWidgetDelegate::handleInputEvent):
* src/WebInputEventConversion.cpp:
(WebKit::PlatformGestureEventBuilder::PlatformGestureEventBuilder):
* src/WebPopupMenuImpl.cpp:
(WebKit::WebPopupMenuImpl::handleInputEvent):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::handleGestureEvent):

Tools: Add handling of new GestureTapCancel in DRT

https://bugs.webkit.org/show_bug.cgi?id=96183

Patch by Rick Byers <rbyers@chromium.org> on 2012-09-10
Reviewed by Adam Barth.

* DumpRenderTree/chromium/TestWebPlugin.cpp:
(TestWebPlugin::handleInputEvent):

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

7 years ago[chromium] gradient-with-scaled-ancestor.html rebaseline
fsamuel@chromium.org [Mon, 10 Sep 2012 19:55:15 +0000 (19:55 +0000)]
[chromium] gradient-with-scaled-ancestor.html rebaseline
https://bugs.webkit.org/show_bug.cgi?id=96110

Patch by Alex Sakhartchouk <alexst@chromium.org> on 2012-09-10
Reviewed by Adrienne Walker.

Fixed a bug in the test, rebaselining the results at proper resolution.

* platform/chromium-linux-x86/fast/hidpi/gradient-with-scaled-ancestor-expected.png: Removed.
* platform/chromium-linux/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium-mac-snowleopard/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium-mac/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium-win-xp/fast/hidpi/gradient-with-scaled-ancestor-expected.png: Removed.
* platform/chromium-win/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium/TestExpectations:

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

7 years ago[JSC] Use StringBuilder::appendNumber() instead of String::number()
paroga@webkit.org [Mon, 10 Sep 2012 19:48:13 +0000 (19:48 +0000)]
[JSC] Use StringBuilder::appendNumber() instead of String::number()
https://bugs.webkit.org/show_bug.cgi?id=96236

Reviewed by Benjamin Poulain.

* API/JSContextRef.cpp:
(JSContextCreateBacktrace):

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

7 years ago[chromium] gradient-with-scaled-ancestor.html rebaseline
commit-queue@webkit.org [Mon, 10 Sep 2012 19:13:50 +0000 (19:13 +0000)]
[chromium] gradient-with-scaled-ancestor.html rebaseline
https://bugs.webkit.org/show_bug.cgi?id=96110

Patch by Alex Sakhartchouk <alexst@chromium.org> on 2012-09-10
Reviewed by Adrienne Walker.

Fixed a bug in the test, rebaselining the results at proper resolution.

* platform/chromium-linux-x86/fast/hidpi/gradient-with-scaled-ancestor-expected.png: Removed.
* platform/chromium-linux/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium-mac-snowleopard/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium-mac/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium-win-xp/fast/hidpi/gradient-with-scaled-ancestor-expected.png: Removed.
* platform/chromium-win/fast/hidpi/gradient-with-scaled-ancestor-expected.png:
* platform/chromium/TestExpectations:

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

7 years agoWeb Inspector: highlight of paint rectangles is broken
caseq@chromium.org [Mon, 10 Sep 2012 19:12:47 +0000 (19:12 +0000)]
Web Inspector: highlight of paint rectangles is broken
https://bugs.webkit.org/show_bug.cgi?id=96276

Reviewed by Vsevolod Vlasov.

* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::drawRectHighlight): Fix JS method name to match the one in InspectorOverlayPage.html

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

7 years agoJavascript in foreground tabs should not wait synchronously for plug-ins to load
beidson@apple.com [Mon, 10 Sep 2012 19:08:11 +0000 (19:08 +0000)]
Javascript in foreground tabs should not wait synchronously for plug-ins to load
<rdar://problem/12067415> and https://bugs.webkit.org/show_bug.cgi?id=96167

Reviewed by Geoff Garen.

Source/WebKit2:

Synchronously waiting for initialization to complete when javascript accesses the plug-in script object severely
reduces the effectiveness of having an asynchronous NPP_New.

Such as with background tabs that have never been viewed, we already have cases where JS calls into the plug-in
element fail because we haven't bothered to initialize the plug-in.

We get a huge win by expanding that to foreground tabs that simply haven't finished initializing their plug-ins.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::scriptObject): If initialization is not complete just return 0 - They can get at the script object later.

Remove the notion of "wait for asynchronous initialization" altogether:
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
(NetscapePlugin):
* WebProcess/Plugins/PDF/BuiltInPDFView.h:
(BuiltInPDFView):
* WebProcess/Plugins/Plugin.h:
(Plugin):
* WebProcess/Plugins/PluginProxy.cpp:
* WebProcess/Plugins/PluginProxy.h:
(PluginProxy):

Tools:

Enhance the "Slow NPP_New" plug-in to also be able to return properties to javascript.

* DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
(PluginObject):
(SlowNPPNew::PluginObject::PluginObject):
(SlowNPPNew::PluginObject::~PluginObject):
(SlowNPPNew::PluginObject::hasProperty):
(SlowNPPNew::PluginObject::getProperty):
(SlowNPPNew::NPP_GetValue):
(SlowNPPNew):

LayoutTests:

* platform/mac-wk2/plugins/script-object-access-fails-during-slow-initialization-expected.txt: Added.
* platform/mac-wk2/plugins/script-object-access-fails-during-slow-initialization.html: Added.

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

7 years ago[Chromium] Define new setSharedWorkerRepository function in preparation for removing...
pilgrim@chromium.org [Mon, 10 Sep 2012 19:07:48 +0000 (19:07 +0000)]
[Chromium] Define new setSharedWorkerRepository function in preparation for removing WebKitPlatformSupport::sharedWorkerRepository()
https://bugs.webkit.org/show_bug.cgi?id=95861

Reviewed by Adam Barth.

Followup patch to Chromium will call this new function, then we can remove all references to the legacy function on WebKitPlatformSupport.

* public/WebSharedWorkerRepository.h:
(WebKit):
* src/SharedWorkerRepository.cpp:
(WebKit):
(WebKit::setSharedWorkerRepository):
(WebKit::sharedWorkerRepository):
(WebCore::SharedWorkerRepository::isAvailable):
(WebCore::SharedWorkerRepository::connect):
(WebCore::SharedWorkerRepository::documentDetached):
(WebCore::SharedWorkerRepository::hasSharedWorkers):

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

7 years agoWKTR often reports an unresponsive WebProcess on Mac bots
timothy_horton@apple.com [Mon, 10 Sep 2012 18:50:54 +0000 (18:50 +0000)]
WKTR often reports an unresponsive WebProcess on Mac bots
https://bugs.webkit.org/show_bug.cgi?id=95906

Reviewed by Dan Bernstein.

Attempt to work around resource contention issues by increasing the NRWT
timeout when running against WKTR, as well as WKTR's own WebProcess timeout.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.default_timeout_ms): Default timeout when using WKTR -> 80 seconds.
* WebKitTestRunner/TestController.cpp:
(WTR): LongTimeout (used when waiting for WebProcess to finish) -> 60 seconds.

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

7 years agowebkit build for 64-bit Mac chromium
commit-queue@webkit.org [Mon, 10 Sep 2012 18:49:07 +0000 (18:49 +0000)]
webkit build for 64-bit Mac chromium
https://bugs.webkit.org/show_bug.cgi?id=95977

Patch by Catalin Badea <badea@adobe.com> on 2012-09-10
Reviewed by Eric Seidel.

Source/WebCore:

Use the correct definitions for NS types in order to fix build issues for 64-bit chromium on mac.

* platform/chromium/PlatformSupport.h:
Remove a deprecated Carbon typedef.
* platform/graphics/FloatPoint.h:
(FloatPoint):
* platform/graphics/FloatRect.h:
(FloatRect):
* platform/graphics/FloatSize.h:
(FloatSize):
* platform/graphics/IntRect.h:
(IntRect):

Source/WebKit/chromium:

Ensure header completeness and use the correct include order. This fixes a compilation issues noticeable when building chromium for 64-bit Mac.

* public/mac/WebSubstringUtil.h:
* src/mac/WebSubstringUtil.mm:

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

7 years agoCombine MarkStack and SlotVisitor into single class
mhahnenberg@apple.com [Mon, 10 Sep 2012 18:41:05 +0000 (18:41 +0000)]
Combine MarkStack and SlotVisitor into single class
https://bugs.webkit.org/show_bug.cgi?id=96043

Reviewed by Geoff Garen.

Move all of MarkStack into SlotVisitor. The remaining stuff in MarkStack.cpp actually has to do
with MarkStack management/allocation. Cleaned up a few of the header files while I was at it.

* CMakeLists.txt:
* GNUmakefile.list.am:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* Target.pri:
* bytecode/CodeBlock.cpp:
* dfg/DFGCommon.h:
* heap/GCThreadSharedData.cpp:
* heap/GCThreadSharedData.h:
(GCThreadSharedData):
* heap/HeapRootVisitor.h:
* heap/MarkStack.cpp:
(JSC):
* heap/MarkStack.h:
(JSC):
(MarkStackSegment):
(JSC::MarkStackSegment::data):
(JSC::MarkStackSegment::capacityFromSize):
(JSC::MarkStackSegment::sizeFromCapacity):
(MarkStackSegmentAllocator):
(MarkStackArray):
* heap/MarkStackInlineMethods.h:
(JSC::MarkStackArray::postIncTop):
(JSC):
(JSC::MarkStackArray::preDecTop):
(JSC::MarkStackArray::setTopForFullSegment):
(JSC::MarkStackArray::setTopForEmptySegment):
(JSC::MarkStackArray::top):
(JSC::MarkStackArray::validatePrevious):
(JSC::MarkStackArray::append):
(JSC::MarkStackArray::canRemoveLast):
(JSC::MarkStackArray::removeLast):
(JSC::MarkStackArray::isEmpty):
(JSC::MarkStackArray::size):
* heap/SlotVisitor.cpp: Added.
(JSC):
(JSC::SlotVisitor::SlotVisitor):
(JSC::SlotVisitor::~SlotVisitor):
(JSC::SlotVisitor::setup):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::append):
(JSC::visitChildren):
(JSC::SlotVisitor::donateKnownParallel):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::mergeOpaqueRoots):
(JSC::SlotVisitor::startCopying):
(JSC::SlotVisitor::allocateNewSpaceSlow):
(JSC::SlotVisitor::allocateNewSpaceOrPin):
(JSC::JSString::tryHashConstLock):
(JSC::JSString::releaseHashConstLock):
(JSC::JSString::shouldTryHashConst):
(JSC::SlotVisitor::internalAppend):
(JSC::SlotVisitor::copyAndAppend):
(JSC::SlotVisitor::doneCopying):
(JSC::SlotVisitor::harvestWeakReferences):
(JSC::SlotVisitor::finalizeUnconditionalFinalizers):
(JSC::SlotVisitor::validate):
* heap/SlotVisitor.h:
(JSC):
(SlotVisitor):
(JSC::SlotVisitor::sharedData):
(JSC::SlotVisitor::isEmpty):
(JSC::SlotVisitor::visitCount):
(JSC::SlotVisitor::resetChildCount):
(JSC::SlotVisitor::childCount):
(JSC::SlotVisitor::incrementChildCount):
(ParallelModeEnabler):
(JSC::ParallelModeEnabler::ParallelModeEnabler):
(JSC::ParallelModeEnabler::~ParallelModeEnabler):
* heap/SlotVisitorInlineMethods.h:
(JSC::SlotVisitor::append):
(JSC):
(JSC::SlotVisitor::appendUnbarrieredPointer):
(JSC::SlotVisitor::appendUnbarrieredValue):
(JSC::SlotVisitor::internalAppend):
(JSC::SlotVisitor::addWeakReferenceHarvester):
(JSC::SlotVisitor::addUnconditionalFinalizer):
(JSC::SlotVisitor::addOpaqueRoot):
(JSC::SlotVisitor::containsOpaqueRoot):
(JSC::SlotVisitor::opaqueRootCount):
(JSC::SlotVisitor::mergeOpaqueRootsIfNecessary):
(JSC::SlotVisitor::mergeOpaqueRootsIfProfitable):
(JSC::SlotVisitor::donate):
(JSC::SlotVisitor::donateAndDrain):
* jit/JITWriteBarrier.h:
(JSC::SlotVisitor::append):
* jit/JumpReplacementWatchpoint.cpp:
* runtime/JSCell.h:
* runtime/Structure.h:
(JSC::SlotVisitor::internalAppend):
* runtime/WriteBarrier.h:
(JSC):
(JSC::SlotVisitor::append):
(JSC::SlotVisitor::appendValues):
* yarr/YarrJIT.cpp:

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

7 years ago[CSS Exlusions] add support for the basic shapes
commit-queue@webkit.org [Mon, 10 Sep 2012 18:24:34 +0000 (18:24 +0000)]
[CSS Exlusions] add support for the basic shapes
https://bugs.webkit.org/show_bug.cgi?id=95490

Patch by Hans Muller <hmuller@adobe.com> on 2012-09-10
Reviewed by David Hyatt.

Initial commit of a subset of the ExclusionShape classes.

This set of classes enables the exclusions layout code to determine how to break up a line into segments
that will fit within or around a shape, given the Y coordinates of the line's top edge and bottom edges.
The ExclusionShape class represents BasicShapes whose coordinates have been resolved to actual values. It
provides a pair of methods, getInsideIntervals() and getOutsideIntervals(), that return the line segments'
start and end X coordinates, and a method that computes the shape's bounding box. The line segments'
coordinates are represented by a Vector of ExclusionIntervals. ExclusionInterval is just a pair
of X coordinates.

The other classes, ExclusionRectangle (and TBD ExclusionPolygon et al), are internal to the
ExclusionShape implementation.

This is the initial version of the ExclusionShapes code and it's only being used to the limited extent WebKit
currently supports shape-inside exclusions. It will be extended to support computing a minimal
line segment's "first layout location" and other improvements, in tandem with the exclusions layout code.

No new tests have been added since this code just replaces a provisional implementation stub.

More information about the algorithms used by the ExclusionShapes classes can be found here: http://hansmuller-webkit.blogspot.com.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* rendering/ExclusionInterval.cpp: Added.
(WebCore):
(WebCore::IntervalX1Comparator::operator()):
Compare x1 ExclusionInterval fields.
(WebCore::ExclusionInterval::intersect):
Compute the intersection of this interval with another interval. Unlike merge/subtract,
the result is always a single interval.
(WebCore::sortExclusionIntervals):
Sort a vector of intervals by their x1 (start) field.
(WebCore::mergeExclusionIntervals):
Union of two vectors of intervals.
(WebCore::intersectExclusionIntervals):
Intersecion of two vectors of intervals.
(WebCore::subtractExclusionIntervals):
Difference of two vectors of intervals.

* rendering/ExclusionInterval.h: Added.
Represents the actual start and end coordinates of a horizontal line segment.
(WebCore):
(ExclusionInterval):
(WebCore::ExclusionInterval::ExclusionInterval):

* rendering/ExclusionRectangle.cpp: Added.
(WebCore):
(WebCore::ellipseXIntercept):
(WebCore::ExclusionRectangle::getOutsideIntervals):
(WebCore::ExclusionRectangle::getInsideIntervals):

* rendering/ExclusionRectangle.h: Added.
A subclass of ExclusionShape used to represent rounded rectangles, circles, and ellipses.
(WebCore):
(ExclusionRectangle)
(WebCore::ExclusionRectangle::ExclusionRectangle):
(WebCore::ExclusionRectangle::shapeBoundingBox):

* rendering/ExclusionShape.cpp: Added.
(WebCore):
(WebCore::createExclusionRectangle):
(WebCore::createExclusionCircle):
(WebCore::createExclusionEllipse):
(WebCore::Exclusionhape::createExclusionShape):
Creates an ExclusionShape given a BasicShape and the width/height of a border box.  Currently rounded
rectangles, circles, and ellipses are supported.  Support for polygons will be included in the
next patch.

* rendering/ExclusionShape.h: Added.
The rest of the exclusions implementation will only depend on the definitions included by this file: ExclusionShape,
and ExclusionInterval. ExclusionShape subclasses define shape-specific implementations of the methods that compute the
horizontal intervals that fit within or around a specific shape, a shape's bounding box, and - in future
revisions - other operations required by the exclusions implementation, like computing the first possible
layout location within a shape. ExclusionShapes are created for BasicShape objects as needed, using the
createExclusionShape() method.
(WebCore):
(ExclusionShape):
(WebCore::ExclusionShape::~ExclusionShape):

* rendering/WrapShapeInfo.cpp:
(WebCore::WrapShapeInfo::computeShapeSize):
Create an ExclusionShape for the RenderBlock's BasicShape.
(WebCore::WrapShapeInfo::computeSegmentsForLine):
Use ExclusionShape::getInsideIntervals() to compute the shape-inside intervals within which a line will fit.

* rendering/WrapShapeInfo.h:
(WebCore::WrapShapeInfo::shapeTop):
Removed - no longer used.
(WrapShapeInfo):
(WebCore::WrapShapeInfo::lineState):
Use the ExclusionShape's bounding box to compute lineState.

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

7 years ago[chromium] Fix deadlock between WebMediaPlayerClientImpl dtor and PutCurrentFrame
enne@google.com [Mon, 10 Sep 2012 18:22:51 +0000 (18:22 +0000)]
[chromium] Fix deadlock between WebMediaPlayerClientImpl dtor and PutCurrentFrame
https://bugs.webkit.org/show_bug.cgi?id=96010

Reviewed by James Robinson.

Source/Platform:

Add some additional clarifying comments.

* chromium/public/WebVideoFrameProvider.h:
(Client):
(WebVideoFrameProvider):

Source/WebKit/chromium:

The key fix here is that the destructor no longer has a mutex.
The m_compositingMutex was supposedly protecting races between
~WebMediaPlayerClientImpl and setVideoFrameProviderClient. The
former is only called from the main thread and the latter is called
from the compositor thread only when the main thread is blocked (and
it already asserts that this is the case).

In addition, the m_providerMutex in CCVideoLayerImpl prevents the
destruction of WebMediaPlayerClientImpl, thus keeping the frame
acquired via getCurrentFrame alive until putCurrentFrame is called.
These functions are only called by the client, and comments are added
to the interface to better document this.

To prevent a race between load() and getCurrentFrame/putCurrentFrame
(which are called from different threads) a new m_webMediaPlayerMutex
to replace part of what the old m_compositingMutex was doing.

* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl):
(WebKit::WebMediaPlayerClientImpl::load):
(WebKit::WebMediaPlayerClientImpl::loadInternal):
(WebKit::WebMediaPlayerClientImpl::setVideoFrameProviderClient):
(WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
(WebKit::WebMediaPlayerClientImpl::putCurrentFrame):
* src/WebMediaPlayerClientImpl.h:
(WebMediaPlayerClientImpl):

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

7 years ago<audio> and <video> should send Do Not Track when appropriate
jer.noble@apple.com [Mon, 10 Sep 2012 18:11:04 +0000 (18:11 +0000)]
<audio> and <video> should send Do Not Track when appropriate
https://bugs.webkit.org/show_bug.cgi?id=96134

Reviewed by Eric Carlson.

Source/WebCore:

Add a FrameLoaderClient function to determine whether the DNT header should be sent,
and plumb that new function down into the MediaPlayerPrivateAVFoundationObjC class.

Test: http/tests/media/video-donottrack.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::mediaPlayerShouldSendDoNotTrackHTTPHeader):
    Pass the question on through to the FrameLoaderClient.
* html/HTMLMediaElement.h:
* loader/FrameLoaderClient.h:
(WebCore::FrameLoaderClient::shouldSendDoNotTrackHTTPHeader):
    Call through to the implementation in WebKit or WebKit2.
* platform/graphics/MediaPlayer.h:
(WebCore::MediaPlayerClient::mediaPlayerShouldSendDoNotTrackHTTPHeader):
    Pass the question on to the HTMLMediaElement.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL):
    If we should send the DNT header, add it to the header options array
    when creating the AVAsset.

Source/WebKit/mac:

Add support for the shouldSendDoNotTrackHTTPHeader by passing the request
on to the WebFrameLoadDelegate.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::shouldSendDoNotTrackHeader):
    Pass the question on to the WebFrameLoadDelegate.
* WebView/WebDelegateImplementationCaching.h:
(WebFrameLoadDelegateImplementationCache):
    Add an entry for the delegate's webViewShouldSendDoNotTrackHeader method.
* WebView/WebDelegateImplementationCaching.mm:
(CallResourceLoadDelegateReturningBoolean): Added a 0-parameter overloaded function.
* WebView/WebView.mm:
(-[WebView _cacheFrameLoadDelegateImplementations]): initialize the
    cached value for shouldSendDoNotTrackHeaderFunc.

Source/WebKit2:

Add support for the shouldSendDoNotTrackHTTPHeader by passing the request
on to the WebFrameLoadDelegate.

* Shared/APIClientTraits.cpp: Increment the interfaceSizes for
    WKBundlePageLoaderClient by the value of the new functions.
* Shared/APIClientTraits.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add a new API to
    WKBundlePageLoaderClient and bump the version number.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::shouldSendDoNotTrackHTTPHeader):
    Pass the question on to the client.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::shouldSendDoNotTrackHTTPHeader):
    Pass the question on to the bundle.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/qt/QtBuiltinBundlePage.cpp:
(WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage):
    Add an entry for the new function in the Qt loader client.

Tools:

Add a testRunner JS API for calling setShouldSendDoNotTrackHTTPHeader to DRT and
WTR. Add FrameLoaderClient client methods for retrieving that value.

* DumpRenderTree/TestRunner.cpp:
(setShouldSendDoNotTrackHTTPHeaderCallback): Pass through to the TestRunner.
(TestRunner::staticFunctions): Add the setShouldSendDoNotTrackHTTPHeader function.
* DumpRenderTree/TestRunner.h:
(TestRunner::setShouldSendDoNotTrackHTTPHeader): Simple setter.
(TestRunner::shouldSendDoNotTrackHTTPHeader): Simple getter.
* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate webViewShouldSendDoNotTrackHTTPHeader:]):
    Pass the question on to the TestRunner.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
    Add the setShouldSendDoNotTrackHTTPHeader client function.
(WTR::InjectedBundlePage::shouldSendDoNotTrackHTTPHeader):
    Pass the question on to the TestRunner.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::shouldSendDoNotTrackHTTPHeader): Simple getter.
(WTR::TestRunner::setShouldSendDoNotTrackHTTPHeader): Simple Setter.

LayoutTests:

Add a new HTTP test ensuring the DNT header is passed correctly during video tests.

* http/tests/media/resources/video-donottrack-check-donottrack.php: Added.
* http/tests/media/video-donottrack-expected.txt: Added.
* http/tests/media/video-donottrack.html: Added.

Skip the new tests on platforms which do not support it:
* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/Skipped:

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

7 years agoThe options dictionary in Notification constructor should not accept event listeners
jonlee@apple.com [Mon, 10 Sep 2012 18:08:25 +0000 (18:08 +0000)]
The options dictionary in Notification constructor should not accept event listeners
https://bugs.webkit.org/show_bug.cgi?id=95538
<rdar://problem/12213901>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

The latest spec only allows setting the event listeners after the notification has been created.

Test: http/tests/notifications/events-in-dictionary.html

* Modules/notifications/Notification.cpp:
(WebCore::Notification::create): Do not look for the event handlers in the options dictionary.

LayoutTests:

Make sure the onshow handler added in the options dictionary does not get called.

* http/tests/notifications/events-in-dictionary-expected.txt: Added.
* http/tests/notifications/events-in-dictionary.html: Added.

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

7 years ago[Tests] Move fast/notifications/notifications-double-show.html to http/tests/notifica...
jonlee@apple.com [Mon, 10 Sep 2012 18:06:39 +0000 (18:06 +0000)]
[Tests] Move fast/notifications/notifications-double-show.html to http/tests/notifications
https://bugs.webkit.org/show_bug.cgi?id=95537
<rdar://problem/12213860>

Reviewed by Alexey Proskuryakov.

Calling show() multiple times should only call the ondisplay event handler once.

* fast/notifications/notifications-double-show-expected.txt: Removed.
* fast/notifications/notifications-double-show.html: Removed.
* http/tests/notifications/legacy/double-show-expected.txt: Added.
* http/tests/notifications/legacy/double-show.html: Added.

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

7 years agoCSS 2.1 failure: content-counter-010.htm fails
robert@webkit.org [Mon, 10 Sep 2012 17:42:39 +0000 (17:42 +0000)]
CSS 2.1 failure: content-counter-010.htm fails
https://bugs.webkit.org/show_bug.cgi?id=81447

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: fast/css/content-counter-010.htm

Per http://lists.w3.org/Archives/Public/public-css-testsuite/2010Nov/0064.html, the correct rendering of
7000 to 7999 in Armenian changed in Nov 2010. Update implementation to match the revised spec.

* rendering/RenderListMarker.cpp:
(WebCore::toArmenianUnder10000):

LayoutTests:

* fast/css/content-counter-010-expected.html: Added.
* fast/css/content-counter-010.htm: Added.
  Note that <meta http-equiv="Content-Type" content="text/html; charset=utf-8"  was added to the suite test
  to allow it to render correctly from a file:/ url.
* fast/lists/w3-css3-lower-armenian-expected.txt:
* fast/lists/w3-css3-lower-armenian.html:
* fast/lists/w3-css3-upper-armenian-expected.txt:
* fast/lists/w3-css3-upper-armenian.html:
  Amended tests to conform to revised specification for numbers between 7000 and 7999.

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

7 years agoMake EFL bots work on the flakiness dashboard
ojan@chromium.org [Mon, 10 Sep 2012 17:26:58 +0000 (17:26 +0000)]
Make EFL bots work on the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=96164

Reviewed by Tony Chang.

Also, update outdated unittests that had started failing.

* TestResultServer/static-dashboards/builders.js:
(isWebkitTestRunner):
* TestResultServer/static-dashboards/flakiness_dashboard.js:
(nonChromiumPlatform):
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
(test):

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

7 years agoFont value should be parsed as a individual property
commit-queue@webkit.org [Mon, 10 Sep 2012 17:20:54 +0000 (17:20 +0000)]
Font value should be parsed as a individual property
https://bugs.webkit.org/show_bug.cgi?id=96271

Patch by Thiago Marcos P. Santos <thiago.santos@intel.com> on 2012-09-10
Reviewed by Eric Seidel.

Source/WebCore:

Parsing the font value as an individual CSS property instead of a style
body should make it significantly more effective and will not
validate something like ctx.font = "25px serif; background: green".

Updated canvas/philip/tests/2d.text.font.parse.invalid.html to cover
this use case.

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::setFont):

LayoutTests:

Updated test to the latest W3C approved version. It adds a test
that verifies this fix.

* canvas/philip/tests/2d.text.font.parse.invalid.html:

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

7 years ago[Chromium] Handle smaller sizes of media elements in media controls.
commit-queue@webkit.org [Mon, 10 Sep 2012 17:15:41 +0000 (17:15 +0000)]
[Chromium] Handle smaller sizes of media elements in media controls.
https://bugs.webkit.org/show_bug.cgi?id=89344

Patch by Silvia Pfeiffer <silviapf@chromium.org> on 2012-09-10
Reviewed by Eric Carlson.

The redesign of the Chrome video controls calls for successive removal of individual
elements in the Chrome video and audio controls as the element becomes smaller in width.
It also requires decreasing padding on the enclosure element of videos.

Source/WebCore:

This patch introduces a layout() function into the MediaControlRootElementChromium to
react to any changes of the media controls width and appropriately hide/show the
interactive elements and apply the correct padding on video elements.

Tests: platform/chromium/media/controls-audio-sizes.html
       platform/chromium/media/controls-video-sizes-padding.html
       platform/chromium/media/controls-video-sizes.html

* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore):
(RenderMediaControlPanelEnclosureElement):
Introduce a renderer for the MediaControlPanelEnclosureElement in which to deal with the layout changes.
Following the pattern in MediaControlElements.cpp .
(WebCore::RenderMediaControlPanelEnclosureElement::RenderMediaControlPanelEnclosureElement):
Definition of the new RenderMediaControlPanelEnclosureElement class.
(WebCore::RenderMediaControlPanelEnclosureElement::layout):
Definition of the layout() function for the renderer. This does most of the actual work.
(WebCore::MediaControlPanelEnclosureElement::createRenderer):
Create the renderer for the MediaControlPanelEnclosureElement.
(WebCore::MediaControlPanelEnclosureElement::updatePadding):
Update padding as part of the MediaControlPanelEnclosureElement functions.
(WebCore::MediaControlRootElementChromium::MediaControlRootElementChromium):
Add a class property to store whether the duration and current time display are hidden.
(WebCore::MediaControlRootElementChromium::reset):
Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
(WebCore::MediaControlRootElementChromium::playbackStarted):
Include the hiding/showing of the timeline and time display into the updateTimeDisplay() function
to reduce code duplication.
(WebCore::MediaControlRootElementChromium::playbackProgressed):
Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
(WebCore::MediaControlRootElementChromium::playbackStopped):
Include the hiding/showing of the timeline into the updateTimeDisplay() function to reduce code duplication.
(WebCore::MediaControlRootElementChromium::updateTimeDisplay):
Only show time display if not hidden. Add timeline update here to reduce code duplication/
(WebCore::MediaControlRootElementChromium::hideVolumeSlider):
New function to allow layout() function to hide the volume slider.
(WebCore::MediaControlRootElementChromium::showTimeDisplay):
New function to allow layout() function to show the time display.
(WebCore::MediaControlRootElementChromium::hideTimeDisplay):
New function to allow layout() function to hide the time display.
(WebCore::MediaControlRootElementChromium::showMuteButton):
New function to allow layout() function to show the mute button.
(WebCore::MediaControlRootElementChromium::hideMuteButton):
New function to allow layout() function to hide the mute button.
(WebCore::MediaControlRootElementChromium::showFullscreenButton):
New function to allow layout() function to show the fullscreen button.
(WebCore::MediaControlRootElementChromium::hideFullscreenButton):
New function to allow layout() function to hide the fullscreen button.
(WebCore::MediaControlRootElementChromium::showTimeline):
New function to allow layout() function to show the timeline.
(WebCore::MediaControlRootElementChromium::hideTimeline):
New function to allow layout() function to hide the timeline.

* html/shadow/MediaControlRootElementChromium.h:
(MediaControlPanelEnclosureElement):
Add a createRender() and a updatePadding() function to the MediaControlPanelEnclosureElement class.
(MediaControlRootElementChromium):
Add hide/show functions for volume slider, time display, mute button, fullscreen button and timeline.
Add a class property to store whether the duration and current time display are hidden.

LayoutTests:

These platform-specific tests check if the correct interactive elements are shown for
different video and audio element widths and the correct padding is applied for videos.

* platform/chromium/TestExpectations:
  Mark failing tests for later rebaseline.
* platform/chromium/media/controls-audio-sizes-expected.txt: Added.
* platform/chromium/media/controls-audio-sizes.html: Added.
  Tests if the correct elements are shown for audio elements.
* platform/chromium/media/controls-video-sizes-expected.txt: Added.
* platform/chromium/media/controls-video-sizes.html: Added.
* platform/chromium-mac/platform/chromium/media/controls-video-sizes-expected.png: Added.
  Tests if the correct elements are shown for video elements.
* platform/chromium/media/controls-video-sizes-padding-expected.txt: Added.
* platform/chromium/media/controls-video-sizes-padding.html: Added.
  Tests if the correct padding is applied to the enclosure of the video controls.

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

7 years ago[GTK][a11y] editing/pasteboard/paste-blockquote-into-blockquote-4.html crashes
commit-queue@webkit.org [Mon, 10 Sep 2012 17:12:55 +0000 (17:12 +0000)]
[GTK][a11y] editing/pasteboard/paste-blockquote-into-blockquote-4.html crashes
https://bugs.webkit.org/show_bug.cgi?id=96199

Patch by Joanmarie Diggs <jdiggs@igalia.com> on 2012-09-10
Reviewed by Martin Robinson.

Added sanity check to correct erroneous assumption that there will
always be a child object.

No new tests as the bug crashes two existing Layout Tests which should
no longer crash as a result of this fix.

* accessibility/gtk/AccessibilityObjectAtk.cpp:
(WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):

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