WebKit.git
9 years ago[Qt][WK2] Move startDrag implementation to QtWebPageEventHandler
jesus@webkit.org [Mon, 12 Dec 2011 14:54:34 +0000 (14:54 +0000)]
[Qt][WK2] Move startDrag implementation to QtWebPageEventHandler
https://bugs.webkit.org/show_bug.cgi?id=73145

Reviewed by Simon Hausmann.

Move QtWebPageProxy::startDrag to QtWebPageEventHandler::startDrag
and call it straight from QtPageClient.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
* UIProcess/qt/QtWebPageEventHandler.cpp:
(dragOperationToDropAction):
(dragOperationToDropActions):
(dropActionToDragOperation):
Now these functions are static inline and not part of QtWebPageEventHandler
anymore.

(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::startDrag):
* UIProcess/qt/QtWebPageEventHandler.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::startDrag): removed.

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

9 years agoWebKit does not enumerate over CSS properties in HTMLElement.style
apavlov@chromium.org [Mon, 12 Dec 2011 14:46:24 +0000 (14:46 +0000)]
WebKit does not enumerate over CSS properties in HTMLElement.style
https://bugs.webkit.org/show_bug.cgi?id=23946

Reviewed by Darin Adler.

Source/JavaScriptCore:

Add a few exports to follow the JSCSSStyleDeclaration.cpp changes,
introduce an std::sort() comparator function.

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/WTFString.h:
(WTF::codePointCompareLessThan): Used by std::sort() to sort properties.

Source/WebCore:

This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them
using the "in" operator on the CSSStyleDeclaration object.

Test: fast/css/style-enumerate-properties.html

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added.
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down).
* css/CSSStyleDeclaration.idl: Use a custom property enumerator.
* css/makeprop.pl: Add a function to convert CSS property names into JS ones.

LayoutTests:

* fast/css/style-enumerate-properties-expected.txt: Added.
* fast/css/style-enumerate-properties.html: Added.
* fast/dom/domListEnumeration-expected.txt:
* fast/dom/script-tests/domListEnumeration.js:

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

9 years agoWeb Inspector: unreviewed test fix for r102574
loislo@chromium.org [Mon, 12 Dec 2011 14:27:19 +0000 (14:27 +0000)]
Web Inspector: unreviewed test fix for r102574

* inspector/profiler/detailed-heapshots-test.js:

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

9 years agoAdd myself as a committer
pierre.rossi@gmail.com [Mon, 12 Dec 2011 14:09:56 +0000 (14:09 +0000)]
Add myself as a committer

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

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

9 years agoUnreviewed, build fix.
apavlov@chromium.org [Mon, 12 Dec 2011 14:06:39 +0000 (14:06 +0000)]
Unreviewed, build fix.

Revert r102570 which broke SnowLeopard builders.

Source/JavaScriptCore:

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/WTFString.h:

Source/WebCore:

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter):
* css/CSSStyleDeclaration.idl:
* css/makeprop.pl:

LayoutTests:

* fast/css/style-enumerate-properties-expected.txt: Removed.
* fast/css/style-enumerate-properties.html: Removed.
* fast/dom/domListEnumeration-expected.txt:
* fast/dom/script-tests/domListEnumeration.js:

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

9 years agoWeb Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden...
loislo@chromium.org [Mon, 12 Dec 2011 13:58:56 +0000 (13:58 +0000)]
Web Inspector: chromium: UI: Detailed Heap snapshot shows too many objects' hidden properties.
https://bugs.webkit.org/show_bug.cgi?id=74289

WebCore objects have many hidden properties.
The Detailed Heap shapshot view shows all these props for a selected object.
The result view looks too heavy and users usually failed to find a useful information about the object.
Looks like such ability is unnecessary in the most cases.
I'd like to introduce a configurable property that will show/hide these props from the view.

Reviewed by Yury Semikhatsky.

* English.lproj/localizedStrings.js:
* inspector/front-end/DetailedHeapshotGridNodes.js:
* inspector/front-end/DetailedHeapshotView.js:
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotProxy.prototype.createPathFinder):
* inspector/front-end/SettingsScreen.js:
(WebInspector.SettingsScreen):

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

9 years ago[Qt] [WK2] Support customizing popup menus with QML
caio.oliveira@openbossa.org [Mon, 12 Dec 2011 13:53:13 +0000 (13:53 +0000)]
[Qt] [WK2] Support customizing popup menus with QML
https://bugs.webkit.org/show_bug.cgi?id=73560

Reviewed by Tor Arne Vestbø.

Source/WebKit2:

Add a new property 'itemSelector' to WebView (experimental for now) that contains
the QML component used when it needs to spawn a popup menu. For example, <select>
HTML tag may trigger a popup menu.

When loaded the component will have the 'model' available in its context with two
properties: 'elementRect', describing the position of the element which spawned
the item selector, and 'items', which is a model ready to be used by ListView. The
'model' also have methods to accept/reject the selection.

Option groups are available as a property for each row in the 'items' model. This
can be used together with ListView to create sections, as demonstrated in the
MiniBrowser. QML tests were added as well.

The existing Desktop version is removed since after the Qt5 refactoring isn't
working correctly. Once Qt have its own QML components for popup, we hope to use
it as a default if no other popupMenu is specified.

* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewExperimental::itemSelector):
(QQuickWebViewExperimental::setItemSelector):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::get):
* UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/select.html: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:
* UIProcess/qt/QtPageClient.cpp:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::createPopupMenuProxy):
* UIProcess/qt/WebPopupMenuProxyQt.cpp:
(WebKit::PopupMenuItemModel::rowCount):
(WebKit::PopupMenuItemModel::Item::Item):
(WebKit::ItemSelectorContextObject::elementRect):
(WebKit::ItemSelectorContextObject::items):
(WebKit::ItemSelectorContextObject::reject):
(WebKit::ItemSelectorContextObject::ItemSelectorContextObject):
(WebKit::ItemSelectorContextObject::accept):
(WebKit::createRoleNamesHash):
(WebKit::PopupMenuItemModel::PopupMenuItemModel):
(WebKit::PopupMenuItemModel::data):
(WebKit::PopupMenuItemModel::select):
(WebKit::PopupMenuItemModel::selectedOriginalIndex):
(WebKit::PopupMenuItemModel::buildItems):
(WebKit::WebPopupMenuProxyQt::WebPopupMenuProxyQt):
(WebKit::WebPopupMenuProxyQt::showPopupMenu):
(WebKit::WebPopupMenuProxyQt::hidePopupMenu):
(WebKit::WebPopupMenuProxyQt::selectIndex):
(WebKit::WebPopupMenuProxyQt::createItem):
(WebKit::WebPopupMenuProxyQt::createContext):
(WebKit::WebPopupMenuProxyQt::notifyValueChanged):
* UIProcess/qt/WebPopupMenuProxyQt.h:
(WebKit::WebPopupMenuProxyQt::create):
* UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: Removed.
* UIProcess/qt/WebPopupMenuProxyQtDesktop.h: Removed.

Tools:

Add an Item Selector to our WebView using the experimental API.

* MiniBrowser/qt/MiniBrowser.pro:
* MiniBrowser/qt/MiniBrowser.qrc:
* MiniBrowser/qt/qml/BrowserWindow.qml:
* MiniBrowser/qt/qml/ItemSelector.qml: Added.

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

9 years agoUnreviewed, rolling out r102556.
haraken@chromium.org [Mon, 12 Dec 2011 13:41:10 +0000 (13:41 +0000)]
Unreviewed, rolling out r102556.
http://trac.webkit.org/changeset/102556
https://bugs.webkit.org/show_bug.cgi?id=73394

clobber build failure

* WebCore.gyp/WebCore.gyp:
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main):
* WebCore.gypi:
* bindings/scripts/generate-bindings.pl:
* page/DOMWindow.idl:
* webaudio/DOMWindowWebAudio.idl: Removed.

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

9 years agoUnreviewed, rolling out r102558.
haraken@chromium.org [Mon, 12 Dec 2011 13:39:05 +0000 (13:39 +0000)]
Unreviewed, rolling out r102558.
http://trac.webkit.org/changeset/102558
https://bugs.webkit.org/show_bug.cgi?id=74160

clobber build failure

* WebCore.gypi:
* page/DOMWindow.idl:
* websockets/DOMWindowWebSocket.idl: Removed.

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

9 years agoWebKit does not enumerate over CSS properties in HTMLElement.style
apavlov@chromium.org [Mon, 12 Dec 2011 13:23:54 +0000 (13:23 +0000)]
WebKit does not enumerate over CSS properties in HTMLElement.style
https://bugs.webkit.org/show_bug.cgi?id=23946

Reviewed by Darin Adler.

Source/JavaScriptCore:

Add a few exports to follow the JSCSSStyleDeclaration.cpp changes,
introduce an std::sort() comparator function.

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* wtf/text/WTFString.h:
(WTF::codePointCompareLessThan): Used by std::sort() to sort properties.

Source/WebCore:

This change generates a list of JavaScript mirrors of the CSS properties and allows to enumerate them
using the "in" operator on the CSSStyleDeclaration object.

Test: fast/css/style-enumerate-properties.html

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Added.
* bindings/v8/custom/V8CSSStyleDeclarationCustom.cpp:
(WebCore::V8CSSStyleDeclaration::namedPropertyEnumerator): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyQuery): Added.
(WebCore::V8CSSStyleDeclaration::namedPropertyGetter): A small drive-by optimization (local initialization moved down).
* css/CSSStyleDeclaration.idl: Use a custom property enumerator.
* css/makeprop.pl: Add a function to convert CSS property names into JS ones, and a string comparator.

LayoutTests:

* fast/css/style-enumerate-properties-expected.txt: Added.
* fast/css/style-enumerate-properties.html: Added.
* fast/dom/domListEnumeration-expected.txt:
* fast/dom/script-tests/domListEnumeration.js:

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

9 years agoWeb Inspector: provide per Document Node count statistics
yurys@chromium.org [Mon, 12 Dec 2011 13:09:50 +0000 (13:09 +0000)]
Web Inspector: provide per Document Node count statistics
https://bugs.webkit.org/show_bug.cgi?id=74100

Memory agent now returns counters for nodes with given names. For each
object group root user will see total number of its descendtants and per
tag name counts.

This patch also moves generic CounterVisitor code out of V8 bindings. It
may well be used with both JS engines.

Reviewed by Pavel Feldman.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptProfiler.h:
(WebCore::ScriptProfiler::visitJSDOMWrappers):
* bindings/v8/ScriptProfiler.cpp:
(WebCore::ScriptProfiler::visitJSDOMWrappers):
* bindings/v8/ScriptProfiler.h:
* inspector/DOMWrapperVisitor.h: Added.
(WebCore::DOMWrapperVisitor::~DOMWrapperVisitor):
* inspector/Inspector.json:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::InspectorMemoryAgent::getDOMNodeCount):
* inspector/InspectorMemoryAgent.h:

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

9 years ago[Qt] MiniBrowser should only visualize mock touch points when in non-desktop mode
commit-queue@webkit.org [Mon, 12 Dec 2011 13:08:57 +0000 (13:08 +0000)]
[Qt] MiniBrowser should only visualize mock touch points when in non-desktop mode
https://bugs.webkit.org/show_bug.cgi?id=74283

Patch by Alexander Færøy <alexander.faeroy@nokia.com> on 2011-12-12
Reviewed by Simon Hausmann.

* MiniBrowser/qt/MiniBrowserApplication.cpp:
(MiniBrowserApplication::sendTouchEvent):

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

9 years agoUnreviewed, skip flaky fast/events/overflow-events.html test on GTK.
philn@webkit.org [Mon, 12 Dec 2011 12:30:17 +0000 (12:30 +0000)]
Unreviewed, skip flaky fast/events/overflow-events.html test on GTK.

* platform/gtk/test_expectations.txt:

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

9 years agoUnreviewed, skip failing test on GTK.
philn@webkit.org [Mon, 12 Dec 2011 11:54:00 +0000 (11:54 +0000)]
Unreviewed, skip failing test on GTK.

* platform/gtk/Skipped: Skip editing/pasteboard/emacs-ctrl-k-with-move.html

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

9 years agoUnreviewed, skip a flaky test and a failing test on GTK.
philn@webkit.org [Mon, 12 Dec 2011 10:54:00 +0000 (10:54 +0000)]
Unreviewed, skip a flaky test and a failing test on GTK.

* platform/gtk/Skipped: Skip fast/events/dont-loose-last-event.html
* platform/gtk/test_expectations.txt: Mark
fullscreen/full-screen-iframe-legacy.html flaky.

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

9 years agoUnreviewed. Fix make distcheck issues.
carlosgc@webkit.org [Mon, 12 Dec 2011 10:03:13 +0000 (10:03 +0000)]
Unreviewed. Fix make distcheck issues.

* GNUmakefile.list.am:

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

9 years agoUnreviewed, GTK baselines for tests added in r102388.
philn@webkit.org [Mon, 12 Dec 2011 09:39:39 +0000 (09:39 +0000)]
Unreviewed, GTK baselines for tests added in r102388.

* platform/gtk/animations/cross-fade-background-image-expected.txt: Added.
* platform/gtk/animations/cross-fade-border-image-source-expected.txt: Added.
* platform/gtk/animations/cross-fade-list-style-image-expected.txt: Added.
* platform/gtk/animations/cross-fade-webkit-mask-box-image-expected.txt: Added.
* platform/gtk/animations/cross-fade-webkit-mask-image-expected.txt: Added.
* platform/gtk/transitions/cross-fade-background-image-expected.txt: Added.
* platform/gtk/transitions/cross-fade-border-image-expected.txt: Added.

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

9 years ago[Refactoring] In prepare-ChangeLog, move into a method the top-level code
haraken@chromium.org [Mon, 12 Dec 2011 08:58:58 +0000 (08:58 +0000)]
[Refactoring] In prepare-ChangeLog, move into a method the top-level code
to show ChangeLogs diff and open ChangeLogs in an editor
https://bugs.webkit.org/show_bug.cgi?id=74266

Reviewed by Ryosuke Niwa.

We are planning to write unit-tests for prepare-ChangeLog
in a run-leaks_unittest manner. This patch is one of the incremental
refactorings to remove all top-level code and global variables from
prepare-ChangeLog.

* Scripts/prepare-ChangeLog: Moved the top-level code to show ChangeLogs diff into printDiff().
Moved the top-level code to open ChangeLogs in an editor into openChangeLogs().
Renamed @changed_files to @changedFiles.
Renamed %conflict_files to %conflictFiles.
(generateFunctionLists):
(printDiff):
(openChangeLogs):

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

9 years agoWebPImageDecoder: Increase image/webp decoding performance 10-20%
noel.gordon@gmail.com [Mon, 12 Dec 2011 08:10:33 +0000 (08:10 +0000)]
WebPImageDecoder: Increase image/webp decoding performance 10-20%
https://bugs.webkit.org/show_bug.cgi?id=74263

Reviewed by Adam Barth.

Avoid copying data from the RGB buffer of decoded image output to the
backing pixel store. That is slow - costs 10% of the overall decoding
time at libwebp 0.1.2, and 20% at libwebp 0.1.3.

Instead, instruct the decoder to write the decoded pixels directly to
the backing pixel store.

No new tests. Covered by existing tests. No progressive decoding test
exists in DRT, see https://bugs.webkit.org/show_bug.cgi?id=74062

* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(outputMode):  Define output pixel format. On little-endian machines,
output BGRA pixels to the backing store, for example.
(WebCore::WEBPImageDecoder::WEBPImageDecoder):
(WebCore::WEBPImageDecoder::decode):
* platform/image-decoders/webp/WEBPImageDecoder.h:

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

9 years agoAdd new CSS nth-children parsing tests
zherczeg@webkit.org [Mon, 12 Dec 2011 07:44:02 +0000 (07:44 +0000)]
Add new CSS nth-children parsing tests
https://bugs.webkit.org/show_bug.cgi?id=74178

Source/WebCore:

Reviewed by Darin Adler.

Test: fast/css/parsing-css-nth-child.html

* css/CSSParser.cpp:
(WebCore::isValidNthToken): Add "-n" to the possible identifiers.

LayoutTests:

The test covers several valid and invalid nth-child tokens.

Reviewed by Darin Adler.

* fast/css/parsing-css-nth-child-expected.txt: Added.
* fast/css/parsing-css-nth-child.html: Added.

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

9 years ago[Refactoring] Move top-level code to resolve conflicted ChangeLogs into a method
haraken@chromium.org [Mon, 12 Dec 2011 07:07:56 +0000 (07:07 +0000)]
[Refactoring] Move top-level code to resolve conflicted ChangeLogs into a method
https://bugs.webkit.org/show_bug.cgi?id=74257

Reviewed by Ryosuke Niwa.

We are planning to write unit-tests for prepare-ChangeLog
in a run-leaks_unittest/ manner. This patch is one of the incremental
refactorings to remove all top-level code and global variables from
prepare-ChangeLog.

* Scripts/prepare-ChangeLog: Moved top-level code to get the latest ChangeLogs
into getLatestChangeLogs(), and moved top-level code to resolve conflicted ChangeLogs
into resolveConflictedChangeLogs().
(getLatestChangeLogs):
(resolveConflictedChangeLogs):

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

9 years agoUse [Supplemental] IDL in WebSocket
haraken@chromium.org [Mon, 12 Dec 2011 07:01:29 +0000 (07:01 +0000)]
Use [Supplemental] IDL in WebSocket
https://bugs.webkit.org/show_bug.cgi?id=74160

Reviewed by Adam Barth.

By using the [Supplemental] IDL, this patch moves declarations of WebSocket
attributes from DOMWindow.idl to websocket/DOMWindowWebSocket.idl,
which helps make WebSocket a self-contained module.

No new tests, no change in behavior.
Confirm that http/tests/websocket/* pass.

* WebCore.gypi: Added DOMWindowWebSocket.idl.
* page/DOMWindow.idl: Added the [Supplemented] IDL to WebSocket-related attributes. This [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL (See bug 73394 for more details).
* websockets/DOMWindowWebSocket.idl: Added. Used the [Supplemental=DOMWindow] IDL. The attributes in this IDL file are treated as if they are described in DOMWindow.idl.

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

9 years agoImplement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyP...
macpherson@chromium.org [Mon, 12 Dec 2011 04:06:57 +0000 (04:06 +0000)]
Implement webkit-line-grid and webkit-line-grid-snap CSS properties in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74262

Reviewed by Andreas Kling.

No new tests / refactoring only.

* css/CSSStyleApplyProperty.cpp:
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):

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

9 years agoUse the [Supplemental] IDL for webaudio attributes in Chromium
haraken@chromium.org [Mon, 12 Dec 2011 03:55:06 +0000 (03:55 +0000)]
Use the [Supplemental] IDL for webaudio attributes in Chromium
https://bugs.webkit.org/show_bug.cgi?id=73394

Reviewed by Adam Barth.

- Overview: Using the [Supplemental] IDL, this patch moves the attribute
declarations of webaudio from DOMWindow.idl into a new IDL file
webaudio/DOMWindowWebAudio.idl, which helps make webaudio a self-contained
feature (aka a module).

- This patch changes the build flow of WebCore.gyp as follows:

    Previous build flow:
        foreach $idl (all IDL files) {
            generate-bindings.pl depends on $idl;
            generate-bindings.pl reads $idl;
            generate-bindings.pl generates .h and .cpp files for $idl;
        }

    New build flow (See the discussions in bug 72138 for more details):
        resolve-supplemental.pl depends on all IDL files;
        resolve-supplemental.pl reads all IDL files;
        resolve-supplemental.pl resolves the dependency of [Supplemental=XXXX];
        resolve-supplemental.pl outputs supplemental_dependency.tmp;
        foreach $idl (all IDL files) {
            generate-bindings.pl depends on $idl and supplemental_dependency.tmp;
            generate-bindings.pl reads $idl;
            generate-bindings.pl reads supplemental_dependency.tmp;
            generate-bindings.pl generates .h and .cpp files for $idl, including all attributes in IDL files whilementing $idl;
        }

- This patch introduces a temporary IDL, [Supplemented]. The [Supplemented] IDL
will be removed after build scripts for all platforms support the [Supplemental] IDL.
The motivation for the [Supplemented] IDL is as follows:

In order to support the [Supplemental] IDL, we need to
(1) run resolve-supplemental.pl and generate supplemental_dependency.tmp
(2) and run generate-bindings.pl with the supplemental_dependency.tmp.

This build flow requires a change on the following build scripts,
but changing all the build scripts all at once without any regression is too difficult:

    - DerivedSources.make
    - DerivedSources.pri
    - GNUmakefile.am
    - PlatformBlackBerry.cmake
    - UseJSC.cmake
    - UseV8.cmake
    - WebCore.vcproj/MigrateScripts
    - WebCore.vcproj/WebCore.vcproj
    - bindings/gobject/GNUmakefile.am
    - WebCore.gyp/WebCore.gyp

Thus, we are planning to change the build scripts one by one, which implies that
we need to allow the temporary state in which some build scripts support [Supplemental] IDL
but others do not. To accomplish this, we introduce a temporary IDL, [Supplemented].
The [Supplemented] IDL on an attribute means that the attribute is marked with [Supplemental]
in another IDL file somewhere, like this:

    DOMWindowWebAudio.idl:
        interface [
            Supplemental=DOMWindow
        ] DOMWindowWebAudio {
            attribute attr1;
            attribute attr2;
        };

    DOMWindow.idl:
        interface [
        ] DOMWindow {
            attribute [Supplemented] attr1; // This line will be removed after all build scripts support the [Su IDL
            attribute [Supplemented] attr2; // This line will be removed after all build scripts support the [Su IDL.
            attribute attr3;
            attribute attr4;
        };

Assuming these IDL files, this patch implements the following logic in generate-bindings.pl:

    - If a given build script supports the [Supplemental] IDL,
    generate-bindings.pl ignores all attributes with the [Supplemented] IDL.
    - Otherwise, generate-bindings.pl treats all attributes with the [Supplemented] IDL
    as normal attributes and instead ignores all attributes with the [Supplemental] IDL
    (i.e. generate-bindings.pl generates nothing from the IDL file with the [Supplemental] IDL).

Tests: webaudio/*

* WebCore.gyp/WebCore.gyp: Describes the build flow that I described above.
* WebCore.gyp/scripts/action_derivedsourcesallinone.py:
(main): Reads the IDL file names from the input file (i.e. supplemental_dependency.tmp), which are described at the first column of each line in the input file. If the file name is a "/cygdrive/c/..."-style path, it is converted to a "C:\cygwin\..."-style path by the cygpath command.
* WebCore.gypi: Added DOMWindowWebAudio.idl.
* bindings/scripts/generate-bindings.pl: As a temporary solution, if the platform does not support the [Supplemental] IDL, the perl script ignores the [Supplemental] IDL and instead uses the [Supplemented] IDL. Otherwise, the perl script ignores the [Supplemented] IDL and instead uses the [Supplemental] IDL.
* page/DOMWindow.idl: Added the [Supplemented] IDL to webaudio-related attributes. As I described above, the [Supplemented] IDL will be removed after all platforms support the [Supplemental] IDL.
* webaudio/DOMWindowWebAudio.idl: Added. Describes the [Supplemental=DOMWindow] IDL. The attributes in this IDL file should be treated as if they are written in DOMWindow.idl.

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

9 years agoMicro-optimize CSSStyleSelector::findSiblingForStyleSharing().
kling@webkit.org [Mon, 12 Dec 2011 03:43:10 +0000 (03:43 +0000)]
Micro-optimize CSSStyleSelector::findSiblingForStyleSharing().
<http://webkit.org/b/74261>

Reviewed by Antti Koivisto.

Move the isStyledElement() check from canShareStyleWithElement() into the
loop in findSiblingForStyleSharing(), and tighten up the argument/return
types to StyledElement* as appropriate.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::canShareStyleWithElement):
(WebCore::CSSStyleSelector::findSiblingForStyleSharing):
(WebCore::CSSStyleSelector::locateSharedStyle):
* css/CSSStyleSelector.h:

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

9 years ago[Qt] QQuickWebView missing titleChanged signal tests
commit-queue@webkit.org [Mon, 12 Dec 2011 03:25:22 +0000 (03:25 +0000)]
[Qt] QQuickWebView missing titleChanged signal tests
https://bugs.webkit.org/show_bug.cgi?id=73923

Patch by Gopal Raghavan <gopal.1.raghavan@nokia.com> on 2011-12-11
Reviewed by Simon Hausmann.

Added tests for QQuickWebView tilteChanged signal.

* UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml: Added.
* UIProcess/API/qt/tests/qmltests/common/test3.html: Added.
* UIProcess/API/qt/tests/qmltests/qmltests.pro:

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

9 years agoAsynchronous path synchronous path of SpellChecker should share the code to mark...
commit-queue@webkit.org [Mon, 12 Dec 2011 03:12:06 +0000 (03:12 +0000)]
Asynchronous path synchronous path of SpellChecker should share the code to mark misspellings.
https://bugs.webkit.org/show_bug.cgi?id=73616

Patch by Shinya Kawanaka <shinyak@google.com> on 2011-12-11
Reviewed by Hajime Morita.

Asynchronous spellchecking path should call the same method for the synchronous spellchecking path
to mark misspellings.

No new tests. Covered by existing tests.

* editing/Editor.cpp:
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::Editor::markAndReplaceFor):
  Takes SpellCheckRequest object.
* editing/Editor.h:
* editing/SpellChecker.cpp:
(WebCore::SpellChecker::didCheck):
  Calls the same method of synchronous spellchecking path.

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

9 years agoImplement CSS display property in CSSStyleApplyProperty.
macpherson@chromium.org [Mon, 12 Dec 2011 02:24:28 +0000 (02:24 +0000)]
Implement CSS display property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=73500

Reviewed by Andreas Kling.

Refactoring only / no functionality changed.

* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyDisplay::isValidDisplayValue):
(WebCore::ApplyPropertyDisplay::applyInheritValue):
(WebCore::ApplyPropertyDisplay::applyInitialValue):
(WebCore::ApplyPropertyDisplay::applyValue):
(WebCore::ApplyPropertyDisplay::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):

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

9 years agoCrash when trying to garbage collect JavaScript objects
andersca@apple.com [Mon, 12 Dec 2011 01:22:49 +0000 (01:22 +0000)]
Crash when trying to garbage collect JavaScript objects
https://bugs.webkit.org/show_bug.cgi?id=74259
<rdar://problem/10556188>

Reviewed by Sam Weinig.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::garbageCollectJavaScriptObjects):
Use sendToAllProcesses which is more correct and also handles m_process being null.

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

9 years agoFix another signed vs. unsigned warning
weinig@apple.com [Mon, 12 Dec 2011 01:22:10 +0000 (01:22 +0000)]
Fix another signed vs. unsigned warning

* runtime/ArgList.h:
(JSC::MarkedArgumentBuffer::~MarkedArgumentBuffer):

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

9 years agoFix a signed vs. unsigned warning.
weinig@apple.com [Mon, 12 Dec 2011 01:05:26 +0000 (01:05 +0000)]
Fix a signed vs. unsigned warning.

* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::slowAppend):
Cast inlineCapacity to an int to appease the warning. This is known OK
since inlineCapacity is defined to be 8.

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

9 years agoTry to fix the Qt build.
ggaren@apple.com [Mon, 12 Dec 2011 00:50:34 +0000 (00:50 +0000)]
Try to fix the Qt build.

Unreviewed.

* css/CSSStyleDeclaration.cpp: Maybe an #include will solve our problem?
Someday, compiler error messages will not suck. Today is not that day.

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

9 years agoRolled out *another* debugging change I committed accidentally.
ggaren@apple.com [Mon, 12 Dec 2011 00:45:40 +0000 (00:45 +0000)]
Rolled out *another* debugging change I committed accidentally.

Unreviewed.

* Configurations/Base.xcconfig:

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

9 years agoRolled out a debug counter I committed accidentally.
ggaren@apple.com [Mon, 12 Dec 2011 00:40:09 +0000 (00:40 +0000)]
Rolled out a debug counter I committed accidentally.

Unreviewed.

* jit/JITStubs.cpp:
(JSC::arityCheckFor):

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

9 years agov8 benchmark takes 12-13 million function call slow paths due to extra arguments
ggaren@apple.com [Mon, 12 Dec 2011 00:35:51 +0000 (00:35 +0000)]
v8 benchmark takes 12-13 million function call slow paths due to extra arguments
https://bugs.webkit.org/show_bug.cgi?id=74244

Reviewed by Filip Pizlo.

.arguments function of order the Reversed

10% speedup on v8-raytrace, 1.7% speedup on v8 overall, neutral on Kraken
and SunSpider.

* bytecode/CodeBlock.h:
(JSC::CodeBlock::valueProfileForArgument): Clarified that the interface
to this function is an argument number.

* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
(JSC::BytecodeGenerator::emitCall):
(JSC::BytecodeGenerator::emitConstruct):
(JSC::BytecodeGenerator::isArgumentNumber): Switched to using CallFrame
helper functions for computing offsets for arguments, rather than doing
the math by hand.

Switched to iterating argument offsets backwards (--) instead of forwards (++).

* bytecompiler/BytecodeGenerator.h:
(JSC::CallArguments::thisRegister):
(JSC::CallArguments::argumentRegister):
(JSC::CallArguments::registerOffset): Updated for arguments being reversed.

* bytecompiler/NodesCodegen.cpp: Allocate arguments in reverse order.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::getArgument):
(JSC::DFG::ByteCodeParser::setArgument):
(JSC::DFG::ByteCodeParser::flush):
(JSC::DFG::ByteCodeParser::addCall):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::handleMinMax):
(JSC::DFG::ByteCodeParser::handleIntrinsic):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::processPhiStack): Use abstract argument indices
that just-in-time convert to bytecode operands (i.e., indexes in the register
file) through helper functions. This means only one piece of code needs
to know how arguments are laid out in the register file.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::dump): Ditto.

* dfg/DFGGraph.h:
(JSC::DFG::Graph::valueProfileFor): Ditto.

* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::compileFunction): The whole point of this patch:
Treat too many arguments as an arity match.

* dfg/DFGOSRExit.h:
(JSC::DFG::OSRExit::variableForIndex):
(JSC::DFG::OSRExit::operandForIndex): Use helper functions, as above.

* dfg/DFGOperands.h:
(JSC::DFG::operandToArgument):
(JSC::DFG::argumentToOperand): These are now the only two lines of code in
the DFG compiler that know how arguments are laid out in memory.

(JSC::DFG::Operands::operand):
(JSC::DFG::Operands::setOperand): Use helper functions, as above.

* dfg/DFGOperations.cpp: The whole point of this patch:
Treat too many arguments as an arity match.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall): Use helper functions, as above.

Also, don't tag the caller frame slot as a cell, because it's not a cell.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall): Use helper functions, as above.

* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compile): Use helper functions, as above.

(JSC::DFG::SpeculativeJIT::checkArgumentTypes): Use already-computed
argument virtual register instead of recomputing by hand.

* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callFrameSlot):
(JSC::DFG::SpeculativeJIT::argumentSlot):
(JSC::DFG::SpeculativeJIT::callFrameTagSlot):
(JSC::DFG::SpeculativeJIT::callFramePayloadSlot):
(JSC::DFG::SpeculativeJIT::argumentTagSlot):
(JSC::DFG::SpeculativeJIT::argumentPayloadSlot): Added a few helper
functions for dealing with callee arguments specifically. These still
build on top of our other helper functions, and have no direct knowledge
of how arguments are laid out in the register file.

(JSC::DFG::SpeculativeJIT::resetCallArguments):
(JSC::DFG::SpeculativeJIT::addCallArgument): Renamed argumentIndex to
argumentOffset to match CallFrame naming.

(JSC::DFG::SpeculativeJIT::valueSourceReferenceForOperand): Use helper
functions, as above.

* interpreter/CallFrame.h:
(JSC::ExecState::argumentOffset):
(JSC::ExecState::argumentOffsetIncludingThis):
(JSC::ExecState::argument):
(JSC::ExecState::setArgument):
(JSC::ExecState::thisArgumentOffset):
(JSC::ExecState::thisValue):
(JSC::ExecState::setThisValue):
(JSC::ExecState::offsetFor):
(JSC::ExecState::hostThisRegister):
(JSC::ExecState::hostThisValue): Added a bunch of helper functions for
computing where an argument is in the register file. Anything in the
runtime that needs to access arguments should use these helpers.

* interpreter/CallFrameClosure.h:
(JSC::CallFrameClosure::setThis):
(JSC::CallFrameClosure::setArgument):
(JSC::CallFrameClosure::resetCallFrame): This stuff is a lot simpler, now
that too many arguments counts as an arity match and doesn't require
preserving two copies of our arguments.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::slideRegisterWindowForCall): Only need to do something
special if the caller provided too few arguments.

Key simplification: We never need to maintain two copies of our arguments
anymore.

(JSC::eval):
(JSC::loadVarargs): Use helper functions.

(JSC::Interpreter::unwindCallFrame): Updated for new interface.

(JSC::Interpreter::execute):
(JSC::Interpreter::executeCall):
(JSC::Interpreter::executeConstruct):
(JSC::Interpreter::prepareForRepeatCall): Seriously, though: use helper
functions.

(JSC::Interpreter::privateExecute): No need to check for stack overflow
when calling host functions because they have zero callee registers.

(JSC::Interpreter::retrieveArguments): Explicitly tear off the arguments
object, since there's no special constructor for this anymore.

* interpreter/Interpreter.h: Reduced the C++ re-entry depth because some
workers tests were hitting stack overflow in some of my testing. We should
make this test more exact in future.

* interpreter/RegisterFile.h: Death to all runtime knowledge of argument
location that does not belong to the CallFrame class!

* jit/JIT.cpp:
(JSC::JIT::privateCompile): I am a broken record and I use helper functions.

Also, the whole point of this patch: Treat too many arguments as an arity match.

* jit/JITCall32_64.cpp:
(JSC::JIT::compileLoadVarargs):
* jit/JITCall.cpp:
(JSC::JIT::compileLoadVarargs): Updated the argument copying math to use
helper functions, for backwards-correctness. Removed the condition
pertaining to declared argument count because, now that arguments are
always in just one place, this optimization is valid for all functions.
Standardized the if predicate for each line of the optimization. This might
fix a bug, but I couldn't get the bug to crash in practice.

* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_create_arguments):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emitSlow_op_get_argument_by_val):
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_arguments):
(JSC::JIT::emit_op_get_argument_by_val):
(JSC::JIT::emitSlow_op_get_argument_by_val): Removed cti_op_create_arguments_no_params
optimization because it's no longer an optimization, now that arguments
are always contiguous in a known location.

Updated argument access opcode math for backwards-correctness.

* jit/JITStubs.cpp:
(JSC::arityCheckFor): Updated just like slideRegisterWindowForCall. This
function is slightly different because it copies the call frame in
addition to the arguments. (In the Interpreter, the call frame is not
set up by this point.)

(JSC::lazyLinkFor): The whole point of this patch: Treat too many
arguments as an arity match.

(JSC::DEFINE_STUB_FUNCTION): Updated for new iterface to tearOff().

* jit/JITStubs.h:
* jit/SpecializedThunkJIT.h:
(JSC::SpecializedThunkJIT::loadDoubleArgument):
(JSC::SpecializedThunkJIT::loadCellArgument):
(JSC::SpecializedThunkJIT::loadInt32Argument): Use helper functions! They
build strong bones and teeth!

* runtime/ArgList.cpp:
(JSC::ArgList::getSlice):
(JSC::MarkedArgumentBuffer::slowAppend):
* runtime/ArgList.h:
(JSC::MarkedArgumentBuffer::MarkedArgumentBuffer):
(JSC::MarkedArgumentBuffer::~MarkedArgumentBuffer):
(JSC::MarkedArgumentBuffer::at):
(JSC::MarkedArgumentBuffer::clear):
(JSC::MarkedArgumentBuffer::append):
(JSC::MarkedArgumentBuffer::removeLast):
(JSC::MarkedArgumentBuffer::last):
(JSC::ArgList::ArgList):
(JSC::ArgList::at): Updated for backwards-correctness. WTF::Vector doesn't
play nice with backwards-ness, so I changed to using manual allocation.

Fixed a FIXME about not all values being marked in the case of out-of-line
arguments. I had to rewrite the loop anyway, and I didn't feel like
maintaining fidelity to its old bugs.

* runtime/Arguments.cpp:
(JSC::Arguments::visitChildren):
(JSC::Arguments::copyToArguments):
(JSC::Arguments::fillArgList):
(JSC::Arguments::getOwnPropertySlotByIndex):
(JSC::Arguments::getOwnPropertySlot):
(JSC::Arguments::getOwnPropertyDescriptor):
(JSC::Arguments::putByIndex):
(JSC::Arguments::put):
(JSC::Arguments::tearOff):
* runtime/Arguments.h:
(JSC::Arguments::create):
(JSC::Arguments::Arguments):
(JSC::Arguments::argument):
(JSC::Arguments::finishCreation): Secondary benefit of this patch: deleted
lots of tricky code designed to maintain two different copies of function
arguments. Now that arguments are always contiguous in one place in memory,
this complexity can go away.

Reduced down to one create function for the Arguments class, from three.

Moved tearOff() into an out-of-line function because it's huge.

Moved logic about whether to tear off eagerly into the Arguments class,
so we didn't have to duplicate it elsewhere.

* runtime/JSActivation.cpp:
(JSC::JSActivation::JSActivation):
(JSC::JSActivation::visitChildren): Renamed m_numParametersMinusThis to
m_numCapturedArgs because if the value really were m_numParametersMinusThis
we would be marking too much. (We shouldn't mark 'this' because it can't
be captured.) Also, use helper functions.

* runtime/JSActivation.h:
(JSC::JSActivation::tearOff): Use helper functions.

* runtime/JSArray.cpp:
(JSC::JSArray::copyToArguments):
* runtime/JSArray.h: Use helper functions, as above.

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

9 years agoImplement CSS resize property in CSSStyleApplyProperty.
macpherson@chromium.org [Mon, 12 Dec 2011 00:24:29 +0000 (00:24 +0000)]
Implement CSS resize property in CSSStyleApplyProperty.
https://bugs.webkit.org/show_bug.cgi?id=74162

Reviewed by Julien Chaffraix.

No new tests / refactoring only.

* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyResize::applyValue):
(WebCore::ApplyPropertyResize::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty):

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

9 years agoMove CSSElementStyleDeclaration to its own cpp/h files.
kling@webkit.org [Sun, 11 Dec 2011 23:07:54 +0000 (23:07 +0000)]
Move CSSElementStyleDeclaration to its own cpp/h files.
<http://webkit.org/b/74256>

Reviewed by Sam Weinig.

CSSElementStyleDeclaration is old enough to move out of CSSMutableStyleDeclaration's
attic and into her own apartment.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSDOMBinding.h:
* css/CSSElementStyleDeclaration.cpp: Added.
(WebCore::CSSElementStyleDeclaration::styleSheet):
* css/CSSElementStyleDeclaration.h: Added.
(WebCore::CSSElementStyleDeclaration::element):
(WebCore::CSSElementStyleDeclaration::setElement):
(WebCore::CSSElementStyleDeclaration::CSSElementStyleDeclaration):
(WebCore::CSSElementStyleDeclaration::~CSSElementStyleDeclaration):
* css/CSSInlineStyleDeclaration.h:
* css/CSSMutableStyleDeclaration.cpp:
* css/CSSMutableStyleDeclaration.h:
* dom/CSSMappedAttributeDeclaration.h:

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

9 years agoAdd KillRingNone.cpp to Mac build system
benjamin@webkit.org [Sun, 11 Dec 2011 22:20:48 +0000 (22:20 +0000)]
Add KillRingNone.cpp to Mac build system
https://bugs.webkit.org/show_bug.cgi?id=74168

Patch by Benjamin Poulain <bpoulain@apple.com> on 2011-12-11
Reviewed by David Kilzer.

Add KillRingNone.cpp so it can be used on iOS, but
blacklist the file from the build in order to avoid
conflicts with KillRingMac.

* Configurations/WebCore.xcconfig:
* WebCore.xcodeproj/project.pbxproj:

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

9 years agoWeb Inspector: [protocol] alter some type names generated from Inspector.json
loislo@chromium.org [Sun, 11 Dec 2011 20:44:19 +0000 (20:44 +0000)]
Web Inspector: [protocol] alter some type names generated from Inspector.json
https://bugs.webkit.org/show_bug.cgi?id=74247

Patch by Peter Rybin <peter.rybin@gmail.com> on 2011-12-11
Reviewed by Pavel Feldman.

Manually-filled map added that contains problem type names and its replacement.

* inspector/CodeGeneratorInspector.py:
(fix_type_name.Result):
(fix_type_name.Result.output_comment):
(fix_type_name):
(TypeBindings.create_for_named_type_declaration.write_doc):
(TypeBindings.create_for_named_type_declaration.EnumBinding.generate_type_builder):
(TypeBindings.create_for_named_type_declaration.PlainString.generate_type_builder):
(TypeBindings):
(TypeBindings.create_for_named_type_declaration.ClassBinding.generate_type_builder):
(Generator.process_types):

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

9 years agoWK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1.
kling@webkit.org [Sun, 11 Dec 2011 19:38:49 +0000 (19:38 +0000)]
WK2/NetscapePlugin: Incorrect mouse event coordinates when frameScaleFactor != 1.
<http://webkit.org/b/74209> and <rdar://problem/10438197>

Reviewed by Anders Carlsson.

Source/WebCore:

* WebCore.exp.in: Export AffineTransform::scale(double).

Source/WebKit2:

* Shared/WebEvent.h:
* Shared/WebMouseEvent.cpp:

    Remove the WebMouseEvent "copy" constructor that applied a scale factor
    to the coordinates of an existing event.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):

    Pass the WebMouseEvent through to the plugin unmodified.

(WebKit::PluginView::viewGeometryDidChange):

    Plumb a complex translate+scale transform through to the plugin, so coordinate
    space transformations in will behave correctly with scale factors other than 1.

LayoutTests:

Add a test verifying that NetscapePlugins receive correctly transformed
mouse events with a page scale factor applied.

* platform/mac-wk2/plugins/mouse-events-scaled-expected.txt: Added.
* platform/mac-wk2/plugins/mouse-events-scaled.html: Added.

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

9 years agoRemove OS(SYMBIAN) block from Settings constructor.
kling@webkit.org [Sun, 11 Dec 2011 19:33:25 +0000 (19:33 +0000)]
Remove OS(SYMBIAN) block from Settings constructor.
<http://webkit.org/b/74248>

Reviewed by Benjamin Poulain.

Kill the last OS(SYMBIAN) block in WebKit!

* page/Settings.cpp:
(WebCore::Settings::Settings):

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

9 years agoSource/WebCore: <rdar://problem/10561285> REGRESSION (r80438): First word on a line...
mitz@apple.com [Sun, 11 Dec 2011 19:06:56 +0000 (19:06 +0000)]
Source/WebCore: <rdar://problem/10561285> REGRESSION (r80438): First word on a line or after collapsed space may not be hyphenated even though it should
https://bugs.webkit.org/show_bug.cgi?id=74239

Reviewed by Anders Carlsson.

Tests: fast/text/hyphenate-first-word-after-skipped-space-expected.html
       fast/text/hyphenate-first-word-after-skipped-space.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::tryHyphenating): Replaced the assumption that the character at lastSpace is a space
iff lastSpace is non-zero with a test of whether it is a space, in the sense that it should
not be counted as part of the prefix when comparing it to the value of hyphenate-limit-before.

LayoutTests: Test and updated results for <rdar://problem/10561285> REGRESSION (r80438): First word on a line or after collapsed space may not be hyphenated even though it should
https://bugs.webkit.org/show_bug.cgi?id=74239

Reviewed by Anders Carlsson.

* fast/text/hyphenate-first-word-after-skipped-space-expected.html: Added.
* fast/text/hyphenate-first-word-after-skipped-space.html: Added.
* platform/mac/fast/text/hyphenate-limit-lines-expected.txt:

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

9 years ago[Refactoring] Move top-level code to generate a new ChangeLog into a method
haraken@chromium.org [Sun, 11 Dec 2011 18:04:50 +0000 (18:04 +0000)]
[Refactoring] Move top-level code to generate a new ChangeLog into a method
https://bugs.webkit.org/show_bug.cgi?id=74253

Reviewed by David Kilzer.

The objective is to make prepare-ChangeLog a loadable Perl module for unit testing,
which requires to remove top-level code and global variables. This patch is one of
the incremental refactorings for that.

* Scripts/prepare-ChangeLog: Moved top-level code to generate a new ChangeLog into generateNewChangeLogs().
(generateFunctionLists):
(findChangeLogs):
(generateNewChangeLogs):
(generateFileList): Removed an unnecessary variable $didChangeRegressionTests.

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

9 years ago[Refactoring] In prepare-ChangeLog, move top-level code to find ChangeLogs into a...
haraken@chromium.org [Sun, 11 Dec 2011 06:32:04 +0000 (06:32 +0000)]
[Refactoring] In prepare-ChangeLog, move top-level code to find ChangeLogs into a method
https://bugs.webkit.org/show_bug.cgi?id=74175

Reviewed by Ryosuke Niwa.

The objective is to make prepare-ChangeLog a loadable Perl module for unit testing.
This requires to remove top-level code. This patch is one of the incremental refactorings
for that.

* Scripts/prepare-ChangeLog: Moved top-level code to find ChangeLogs into findChangeLogs().
(findChangeLogs):

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

9 years ago#ifdef the parts of the Mac platform which should not be used on iOS
commit-queue@webkit.org [Sun, 11 Dec 2011 06:20:32 +0000 (06:20 +0000)]
#ifdef the parts of the Mac platform which should not be used on iOS
https://bugs.webkit.org/show_bug.cgi?id=74246

Patch by Benjamin Poulain <bpoulain@apple.com> on 2011-12-10
Reviewed by David Kilzer.

* Configurations/WebCore.xcconfig:
* platform/FileSystem.cpp:
* platform/mac/FileSystemMac.mm:
* platform/mac/Language.mm:
(+[WebLanguageChangeObserver _webkit_languagePreferencesDidChange]):
(WebCore::createHTTPStyleLanguageCode):
(WebCore::platformDefaultLanguage):
* platform/mac/LocalizedStringsMac.mm:
(WebCore::localizedString):
(+[WebCoreSharedBufferData initialize]):
* platform/mac/WebCoreNSStringExtras.h:
* platform/mac/WebCoreNSStringExtras.mm:
* platform/mac/WebFontCache.mm:
* platform/mac/WebNSAttributedStringExtras.mm: The value NSAttachmentCharacter is
not defined in the iOS SDK so we add it here.

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

9 years agoJSC testapi is crashing on Windows
mhahnenberg@apple.com [Sun, 11 Dec 2011 01:23:36 +0000 (01:23 +0000)]
JSC testapi is crashing on Windows
https://bugs.webkit.org/show_bug.cgi?id=74233

Reviewed by Sam Weinig.

Same error we've encountered before where we are calling the wrong version of
visitChildren and objects that are still reachable aren't getting marked.
This problem will go away soon with the removal of vptrs for these sorts of
optimizations in favor of using the ClassInfo, but for now we can simply give
JSFinalObject a bogus virtual method that Visual Studio can't optimize away to
ensure that JSFinalObject will always have a unique vptr.  We don't have to worry
about JSString or JSArray right now, which are the other two special cases for
visitChildren, since they already have their own virtual functions.

* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/JSObject.cpp:
(JSC::JSFinalObject::vtableAnchor):
* runtime/JSObject.h:

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

9 years agoTry to fix the windows build.
weinig@apple.com [Sun, 11 Dec 2011 00:09:49 +0000 (00:09 +0000)]
Try to fix the windows build.

* win/WebKit2.vcproj:

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

9 years agoThe previous fix broke Lion release build. Fix that.
rniwa@webkit.org [Sat, 10 Dec 2011 23:54:19 +0000 (23:54 +0000)]
The previous fix broke Lion release build. Fix that.

* editing/SpellingCorrectionCommand.cpp:

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

9 years agoLion build fix attempt after r102527.
rniwa@webkit.org [Sat, 10 Dec 2011 23:46:33 +0000 (23:46 +0000)]
Lion build fix attempt after r102527.

* editing/SpellingCorrectionCommand.cpp:

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

9 years ago[wx] Unreviewed build fixes. Add missing header for CPP
kevino@webkit.org [Sat, 10 Dec 2011 23:30:34 +0000 (23:30 +0000)]
[wx] Unreviewed build fixes. Add missing header for CPP
DOM bindings and add stubs for new DPI methods.

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

9 years agoMac build fix. Remove an erroneous OVERRIDE.
rniwa@webkit.org [Sat, 10 Dec 2011 21:48:30 +0000 (21:48 +0000)]
Mac build fix. Remove an erroneous OVERRIDE.

* editing/CompositeEditCommand.h:

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

9 years agoCSS 2.1 failure: numerous counter-increment-* tests fail
robert@webkit.org [Sat, 10 Dec 2011 21:40:14 +0000 (21:40 +0000)]
CSS 2.1 failure: numerous counter-increment-* tests fail
https://bugs.webkit.org/show_bug.cgi?id=73360

Source/WebCore:

Reviewed by Julien Chaffraix.

Allow counter-increment to handle integer underflow and overflow.
Also allow 'counter' to inherit.

* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyCounter::applyInheritValue):
(WebCore::ApplyPropertyCounter::applyValue):
(WebCore::ApplyPropertyCounter::createHandler):

LayoutTests:

WebKit dumpAsText() versions of the CSS test suite's counter-increment-001 and 002 are already present in
fast/css/counters, so add a dumpAsText version of tests 003 to 056.

Reviewed by Julien Chaffraix.

* fast/css/counters/counter-increment-inherit-expected.txt: Added.
* fast/css/counters/counter-increment-inherit.htm: Added.
* fast/css/counters/counter-increment-tests-expected.txt: Added.
* fast/css/counters/counter-increment-tests.htm: Added.

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

9 years agoThere should be a way to count the number of nodes held by undo stack
rniwa@webkit.org [Sat, 10 Dec 2011 21:35:06 +0000 (21:35 +0000)]
There should be a way to count the number of nodes held by undo stack
https://bugs.webkit.org/show_bug.cgi?id=74099

Reviewed by Enrica Casucci.

Add getNodesInCommand to all SimpleEditCommands and EditCommandComposition in debug builds.
We can easily aggregate the number of nodes held by the undo stack by calling
this function on each item in the undo stack.

* editing/AppendNodeCommand.cpp:
(WebCore::AppendNodeCommand::getNodesInCommand):
* editing/AppendNodeCommand.h:
* editing/CompositeEditCommand.cpp:
(WebCore::EditCommandComposition::getNodesInCommand):
* editing/CompositeEditCommand.h:
* editing/DeleteFromTextNodeCommand.cpp:
(WebCore::DeleteFromTextNodeCommand::getNodesInCommand):
* editing/DeleteFromTextNodeCommand.h:
* editing/EditCommand.cpp:
(WebCore::SimpleEditCommand::addNodeAndDescedents):
* editing/EditCommand.h:
* editing/Editor.cpp:
(WebCore::Editor::appliedEditing):
* editing/InsertIntoTextNodeCommand.cpp:
(WebCore::InsertIntoTextNodeCommand::getNodesInCommand):
* editing/InsertIntoTextNodeCommand.h:
* editing/InsertNodeBeforeCommand.cpp:
(WebCore::InsertNodeBeforeCommand::getNodesInCommand):
* editing/InsertNodeBeforeCommand.h:
* editing/MergeIdenticalElementsCommand.cpp:
(WebCore::MergeIdenticalElementsCommand::getNodesInCommand):
* editing/MergeIdenticalElementsCommand.h:
* editing/RemoveCSSPropertyCommand.cpp:
(WebCore::RemoveCSSPropertyCommand::getNodesInCommand):
* editing/RemoveCSSPropertyCommand.h:
* editing/RemoveNodeCommand.cpp:
(WebCore::RemoveNodeCommand::getNodesInCommand):
* editing/RemoveNodeCommand.h:
* editing/ReplaceNodeWithSpanCommand.cpp:
(WebCore::ReplaceNodeWithSpanCommand::getNodesInCommand):
* editing/ReplaceNodeWithSpanCommand.h:
* editing/SetNodeAttributeCommand.cpp:
(WebCore::SetNodeAttributeCommand::getNodesInCommand):
* editing/SetNodeAttributeCommand.h:
* editing/SetSelectionCommand.h:
* editing/SplitElementCommand.cpp:
(WebCore::SplitElementCommand::getNodesInCommand):
* editing/SplitElementCommand.h:
* editing/SplitTextNodeCommand.cpp:
(WebCore::SplitTextNodeCommand::getNodesInCommand):
* editing/SplitTextNodeCommand.h:
* editing/WrapContentsInDummySpanCommand.cpp:
(WebCore::WrapContentsInDummySpanCommand::getNodesInCommand):
* editing/WrapContentsInDummySpanCommand.h:

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

9 years agoCSS 2.1 failure: outline-color-* tests fail
robert@webkit.org [Sat, 10 Dec 2011 20:30:35 +0000 (20:30 +0000)]
CSS 2.1 failure: outline-color-* tests fail
https://bugs.webkit.org/show_bug.cgi?id=71931

Source/WebCore:

Reviewed by Julien Chaffraix.

Test: css2.1/20110323/outline-color-001.html

WebKit didn't paint the top block in this series of tests because it ignored the outline
of objects with a zero size. Fix this by taking account of both offset and width of the
outline when deciding whether to paint it.

* rendering/RenderObject.cpp:
(WebCore::RenderObject::paintOutline): paint the outline even when the block has zero size

LayoutTests:

Add outline-color-001.htm to catch regressions against displaying outlines
on objects with zero size. The rest of the outline-color-* test series will
be landed separately.

Reviewed by Julien Chaffraix.

* css2.1/20110323/outline-color-001-expected.html: Added.
* css2.1/20110323/outline-color-001.htm: Added.

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

9 years agoAdd my Apple e-mail to committers.py.
kling@webkit.org [Sat, 10 Dec 2011 19:45:56 +0000 (19:45 +0000)]
Add my Apple e-mail to committers.py.

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

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

9 years agoUpdate test_expectations for chromium
commit-queue@webkit.org [Sat, 10 Dec 2011 19:33:20 +0000 (19:33 +0000)]
Update test_expectations for chromium
https://bugs.webkit.org/show_bug.cgi?id=74137

Patch by Alan Stearns <stearns@adobe.com> on 2011-12-10
Reviewed by Ryosuke Niwa.

* platform/chromium/test_expectations.txt:

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

9 years agoMicrodata: Fix compilation error in MICRODATA enabled build.
commit-queue@webkit.org [Sat, 10 Dec 2011 18:46:31 +0000 (18:46 +0000)]
Microdata: Fix compilation error in MICRODATA enabled build.
https://bugs.webkit.org/show_bug.cgi?id=74235

Patch by Arko Saha <arko@motorola.com> on 2011-12-10
Reviewed by Andreas Kling.

* dom/Document.cpp:
(WebCore::Document::getItems):

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

9 years agoUnused variable in YarrJIT.cpp.
alexis.menard@openbossa.org [Sat, 10 Dec 2011 17:13:07 +0000 (17:13 +0000)]
Unused variable in YarrJIT.cpp.
https://bugs.webkit.org/show_bug.cgi?id=74237

Reviewed by Andreas Kling.

Variable is set but not used so we can remove it.

* yarr/YarrJIT.cpp:
(JSC::Yarr::YarrGenerator::generatePatternCharacterOnce):

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

9 years ago[V8] Remove old ArrayBuffer guards from V8XMLHttpRequestCustom.cpp
jarred@sencha.com [Sat, 10 Dec 2011 14:50:55 +0000 (14:50 +0000)]
[V8] Remove old ArrayBuffer guards from V8XMLHttpRequestCustom.cpp
https://bugs.webkit.org/show_bug.cgi?id=74234

Reviewed by Adam Barth.

No new tests are necessary.

* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
(WebCore::V8XMLHttpRequest::responseAccessorGetter):

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

9 years agoUnreviewed build fix for Qt.
alexis.menard@openbossa.org [Sat, 10 Dec 2011 13:55:21 +0000 (13:55 +0000)]
Unreviewed build fix for Qt.

Build error introduced by r102484.

* Target.pri:

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

9 years agoWebPImageDecoder progressive decodes fail to decode valid images
noel.gordon@gmail.com [Sat, 10 Dec 2011 09:54:37 +0000 (09:54 +0000)]
WebPImageDecoder progressive decodes fail to decode valid images
https://bugs.webkit.org/show_bug.cgi?id=74062

Reviewed by Adam Barth.

The WEBP header is followed by a so-called P0 header, then some data to
decode.  If a partial P0 header is received during progressive decodes,
WebPIDecGetRGB() returns false; that makes the decoder enter the failed
state, no image appears on the page.

James Zern (webp) recommended the following via e-mail:

WebPIUpdate() validates input data, and will return an error status for
malformed data (bit-stream error, invalid data).  Otherwise, it returns
OK or SUSPENDED.  OK means that decoding is done/complete/no-error, and
SUSPENDED means more input data is needed to complete decoding.  A NULL
return from WebPIDecGetRGB() is valid at this time due to a partial P0,
and should not be interpreted as a decoding failure.

No new tests. Not something DumpRenderTree can easily test.

* platform/image-decoders/webp/WEBPImageDecoder.cpp:
(WebCore::WEBPImageDecoder::decode):  A NULL WebPIDecGetRGB() return is
acceptable here.  Return false instead of failing the decoder.

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

9 years agoAdd the FileSystem functions of iOS
benjamin@webkit.org [Sat, 10 Dec 2011 05:34:02 +0000 (05:34 +0000)]
Add the FileSystem functions of iOS
https://bugs.webkit.org/show_bug.cgi?id=74164

Patch by Benjamin Poulain <bpoulain@apple.com> on 2011-12-09
Reviewed by David Kilzer.

Two functions are needed on iOS for temporary files and directories.

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/ios/FileSystemIOS.h: Added.
* platform/ios/FileSystemIOS.mm: Added.
(WebCore::createTemporaryDirectory):
(WebCore::createTemporaryFile):

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

9 years agoRemove ResourceHandle::bufferedData() from ResourceHandleBlackBerry.cpp
commit-queue@webkit.org [Sat, 10 Dec 2011 03:03:29 +0000 (03:03 +0000)]
Remove ResourceHandle::bufferedData() from ResourceHandleBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=74197

The bufferedData() was removed in r95120.

Patch by Jacky Jiang <zhajiang@rim.com> on 2011-12-09
Reviewed by Rob Buis.

Trivial fix, so no new tests.

* platform/network/blackberry/ResourceHandleBlackBerry.cpp:

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

9 years agoUpstream BlackBerry API backing store files
commit-queue@webkit.org [Sat, 10 Dec 2011 02:46:12 +0000 (02:46 +0000)]
Upstream BlackBerry API backing store files
https://bugs.webkit.org/show_bug.cgi?id=73668

Patch by Jacky Jiang <zhajiang@rim.com> on 2011-12-09
Reviewed by Daniel Bates.

Contributed by Torch team, the main contributor is Adam Treat
<atreat@rim.com>.

Initial upstream, no new tests.

* blackberry/Api/BackingStore.cpp: Added.
* blackberry/Api/BackingStore.h: Added.
* blackberry/Api/BackingStore_p.h: Added.

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

9 years ago[chromium] Prevent ASSERT in legitimate out-of-memory case.
commit-queue@webkit.org [Sat, 10 Dec 2011 02:35:35 +0000 (02:35 +0000)]
[chromium] Prevent ASSERT in legitimate out-of-memory case.
https://bugs.webkit.org/show_bug.cgi?id=74215

Patch by Eric Penner <epenner@google.com> on 2011-12-09
Reviewed by James Robinson.

* platform/graphics/chromium/TiledLayerChromium.cpp:
(WebCore::TiledLayerChromium::updateCompositorResources):

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

9 years agoNameNodeListCache should be invalidated when name attribute changes/modified.
commit-queue@webkit.org [Sat, 10 Dec 2011 02:29:51 +0000 (02:29 +0000)]
NameNodeListCache should be invalidated when name attribute changes/modified.
https://bugs.webkit.org/show_bug.cgi?id=70810

Patch by Arko Saha <arko@motorola.com> on 2011-12-09
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/dom/getelementsbyname-invalidation-cache.html

* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parseMappedAttribute):
* html/HTMLAppletElement.cpp:
(WebCore::HTMLAppletElement::parseMappedAttribute):
* html/HTMLElement.cpp:
(WebCore::HTMLElement::parseMappedAttribute):
* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::parseMappedAttribute):
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::parseMappedAttribute):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::parseMappedAttribute):
* html/HTMLIFrameElement.cpp:
(WebCore::HTMLIFrameElement::parseMappedAttribute):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::parseMappedAttribute):
* html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::parseMappedAttribute):
* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::parseMappedAttribute):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseMappedAttribute):
* html/HTMLParamElement.cpp:
(WebCore::HTMLParamElement::parseMappedAttribute):

LayoutTests:

* fast/dom/getelementsbyname-invalidation-cache-expected.txt: Added.
* fast/dom/getelementsbyname-invalidation-cache.html: Added.

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

9 years agoREGRESSION (r97496-r97499): 6 fast/workers tests failing on SnowLeopard Intel Release...
levin@chromium.org [Sat, 10 Dec 2011 02:26:41 +0000 (02:26 +0000)]
REGRESSION (r97496-r97499): 6 fast/workers tests failing on SnowLeopard Intel Release (Tests)
https://bugs.webkit.org/show_bug.cgi?id=70619

Reviewed by Alexey Proskuryakov.

* platform/mac/Skipped: Unskip various worker tests as they should work
now that bug 71695 is fixed.

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

9 years agoDFG ArithMul power-of-two case does not check for overflow
fpizlo@apple.com [Sat, 10 Dec 2011 02:15:39 +0000 (02:15 +0000)]
DFG ArithMul power-of-two case does not check for overflow
https://bugs.webkit.org/show_bug.cgi?id=74230

Source/JavaScriptCore:

Reviewed by Gavin Barraclough.

Disabled power-of-2 peephole optimization for multiplication, because it was wrong,
and any attempt to fix it would likely introduce code bloat and register pressure.

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

LayoutTests:

Reviewed by Gavin Barraclough.

* fast/js/dfg-multiply-expected.txt: Added.
* fast/js/dfg-multiply.html: Added.
* fast/js/script-tests/dfg-multiply.js: Added.
(doMultiplyConstant2):
(doMultiplyConstant3):
(doMultiplyConstant4):

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

9 years agoREGRESSION(r101863-r102042): Assertion hit: m_verifier.isSafeToUse() in RefCountedBas...
levin@chromium.org [Sat, 10 Dec 2011 02:13:02 +0000 (02:13 +0000)]
REGRESSION(r101863-r102042): Assertion hit: m_verifier.isSafeToUse() in RefCountedBase::ref in FunctionCodeBlock
https://bugs.webkit.org/show_bug.cgi?id=73886

Reviewed by Darin Adler.

* runtime/SymbolTable.h:
(JSC::SharedSymbolTable::SharedSymbolTable): Added deprecatedTurnOffVerifier for
another JavaScriptObject, since JavaScriptCore objects allow use on multiple threads.
Bug 58091 is about changing these deprecated calls to something else but that something
else will still need to be in all of these places.

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

9 years agoFix the Snow Leopard build some more.
mrowe@apple.com [Sat, 10 Dec 2011 02:06:25 +0000 (02:06 +0000)]
Fix the Snow Leopard build some more.

Move the #if to a location where it will do some good.

* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:

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

9 years ago[Gtk] Unskip two passing Shadow DOM tests
commit-queue@webkit.org [Sat, 10 Dec 2011 01:59:34 +0000 (01:59 +0000)]
[Gtk] Unskip two passing Shadow DOM tests
https://bugs.webkit.org/show_bug.cgi?id=74186

Patch by Zan Dobersek <zandobersek@gmail.com> on 2011-12-09
Reviewed by Martin Robinson.

Unskip two passing tests after bug #59571 was fixed.

* platform/gtk/Skipped:

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

9 years agoRemove unnecessary file DissasemblerARM.cpp from build system
commit-queue@webkit.org [Sat, 10 Dec 2011 01:57:24 +0000 (01:57 +0000)]
Remove unnecessary file DissasemblerARM.cpp from build system
https://bugs.webkit.org/show_bug.cgi?id=74184

Patch by Konrad Piascik <kpiascik@rim.com> on 2011-12-09
Reviewed by Daniel Bates.

* PlatformBlackBerry.cmake:

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

9 years agoFix the Snow Leopard build.
mrowe@apple.com [Sat, 10 Dec 2011 01:54:25 +0000 (01:54 +0000)]
Fix the Snow Leopard build.

Wrap some code that is only applicable to Lion and newer in the appropriate #if's.

* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h:
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess):

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

9 years agoFix Lion release build.
andersca@apple.com [Sat, 10 Dec 2011 01:44:06 +0000 (01:44 +0000)]
Fix Lion release build.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):

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

9 years ago[Qt] request parameter of QQuickWebView::navigationRequested is not a registered...
commit-queue@webkit.org [Sat, 10 Dec 2011 01:41:36 +0000 (01:41 +0000)]
[Qt] request parameter of QQuickWebView::navigationRequested is not a registered type
https://bugs.webkit.org/show_bug.cgi?id=73826

Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2011-12-09
Reviewed by Tor Arne Vestbø.

.:

* Source/qtwebkit-export.map: Adding QWebNavigationRequest

Source/WebKit/qt:

* declarative/plugin.cpp:
(WebKitQmlPlugin::registerTypes): Registering QWebNavigationRequest

Source/WebKit2:

Adding QWebNavigationRequest by moving NavigationRequest out of QtWebPagePolicyClient.

* Target.pri:
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qwebnavigationrequest.cpp: Added.
(QWebNavigationRequestPrivate::QWebNavigationRequestPrivate):
(QWebNavigationRequestPrivate::~QWebNavigationRequestPrivate):
(QWebNavigationRequest::QWebNavigationRequest):
(QWebNavigationRequest::~QWebNavigationRequest):
(QWebNavigationRequest::setAction):
(QWebNavigationRequest::url):
(QWebNavigationRequest::button):
(QWebNavigationRequest::modifiers):
(QWebNavigationRequest::action):
* UIProcess/API/qt/qwebnavigationrequest_p.h: Added.
* UIProcess/qt/QtWebPagePolicyClient.cpp:
(QtWebPagePolicyClient::decidePolicyForNavigationAction):
(QtWebPagePolicyClient::decidePolicyForResponse):

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

9 years ago[FileSystem API] Entry.remove successCallback is required
commit-queue@webkit.org [Sat, 10 Dec 2011 01:39:11 +0000 (01:39 +0000)]
[FileSystem API] Entry.remove successCallback is required
https://bugs.webkit.org/show_bug.cgi?id=69639

Patch by Mark Pilgrim <pilgrim@chromium.org> on 2011-12-09
Reviewed by Adam Barth.

Source/WebCore:

Test: fast/filesystem/simple-required-arguments-remove.html

* fileapi/Entry.idl: remove [Optional] flag from Entry.remove.successCallback parameter

LayoutTests:

* fast/filesystem/resources/simple-required-arguments-remove.js: Added.
(errorCallback):
(successCallback):
* fast/filesystem/simple-required-arguments-remove-expected.txt: Added.
* fast/filesystem/simple-required-arguments-remove.html: Added.

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

9 years ago[chromium] Remove forwarding headers for WebLayer APIs
jamesr@google.com [Sat, 10 Dec 2011 01:31:15 +0000 (01:31 +0000)]
[chromium] Remove forwarding headers for WebLayer APIs
https://bugs.webkit.org/show_bug.cgi?id=73729

Reviewed by Adam Barth.

These are no longer necessary.

* WebKit.gyp:
* public/WebContentLayer.h: Removed.
* public/WebContentLayerClient.h: Removed.
* public/WebExternalTextureLayer.h: Removed.
* public/WebLayer.h: Removed.
* public/WebLayerClient.h: Removed.
* public/WebLayerTreeView.h: Removed.
* public/WebLayerTreeViewClient.h: Removed.

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

9 years ago[Qt][WK2] Unskip API tests
commit-queue@webkit.org [Sat, 10 Dec 2011 01:28:28 +0000 (01:28 +0000)]
[Qt][WK2] Unskip API tests
https://bugs.webkit.org/show_bug.cgi?id=74180

Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2011-12-09
Reviewed by Tor Arne Vestbø.

Unskip API tests for geolocation and javascript dialogs.

* UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml:
* UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml:

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

9 years agobackground-image transitions trigger between equivalent images
timothy_horton@apple.com [Sat, 10 Dec 2011 01:26:36 +0000 (01:26 +0000)]
background-image transitions trigger between equivalent images
https://bugs.webkit.org/show_bug.cgi?id=74229
<rdar://problem/10558627>

Reviewed by Darin Adler.
Patch by Simon Fraser.

For animation property wrappers around StyleImage properties,
test the equivalence of the image itself, instead of equality of
the StyleImage pointer.

Test: transitions/equivalent-background-image-no-transition.html

* page/animation/AnimationBase.cpp:
(WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
(WebCore::StyleImagePropertyWrapper::equals):
(WebCore::FillLayerStyleImagePropertyWrapper::FillLayerStyleImagePropertyWrapper):
(WebCore::FillLayerStyleImagePropertyWrapper::equals):
(WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
(WebCore::AnimationBase::ensurePropertyMap):

Add a test ensuring that background-images aren't needlessly transitioned
when they are equivalent.

* transitions/equivalent-background-image-no-transition-expected.txt: Added.
* transitions/equivalent-background-image-no-transition.html: Added.

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

9 years ago<http://webkit.org/b/74061> WebProcess and PluginProcess should inherit environment...
mrowe@apple.com [Sat, 10 Dec 2011 01:25:29 +0000 (01:25 +0000)]
<webkit.org/b/74061> WebProcess and PluginProcess should inherit environment variables provided in LC_DYLD_ENVIRONMENT of main executable binary.

Reviewed by Darin Adler.

* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: Added.
* UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: Added.
(WebKit::DynamicLinkerEnvironmentExtractor::DynamicLinkerEnvironmentExtractor):
(WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable): Parse out the name
and value from the environment string and add an entry to our variable map if the variable
is one that dyld would respect in LC_DYLD_ENVIRONMENT.
(WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommand): Look for a LC_DYLD_ENVIRONMENT
load command and extract any environment string that we find within.
(WebKit::DynamicLinkerEnvironmentExtractor::processLoadCommands): Iterate over each
load command in the Mach-O file.
(WebKit::DynamicLinkerEnvironmentExtractor::processSingleArchitecture): Determine whether
the Mach-O file is of the correct architecture, and if so then process the load commands
found within.
(WebKit::DynamicLinkerEnvironmentExtractor::processFatFile): Process each architecture of the
Mach-O file in turn.
(WebKit::DynamicLinkerEnvironmentExtractor::getExtractedEnvironmentVariables): Add our
extracted variables to the passed-in EnvironmentVariables object. We skip adding any
variables that already exist so as to allow variables passed in the environment to override
those that we extract from the executable file.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::launchProcess): Extract the environment variables from the
main binary and add them to the launch environment of our subprocess.
* WebKit2.xcodeproj/project.pbxproj:

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

9 years ago[chromium] add accessors to WebDOMMessageEvent
commit-queue@webkit.org [Sat, 10 Dec 2011 01:18:20 +0000 (01:18 +0000)]
[chromium] add accessors to WebDOMMessageEvent
https://bugs.webkit.org/show_bug.cgi?id=73346

Patch by Karl Koscher <supersat@chromium.org> on 2011-12-09
Reviewed by Darin Fisher.

* public/WebDOMMessageEvent.h:
* src/WebDOMMessageEvent.cpp:
(WebKit::WebDOMMessageEvent::data):
(WebKit::WebDOMMessageEvent::origin):

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

9 years ago[chromium] add event methods to WebFrame
commit-queue@webkit.org [Sat, 10 Dec 2011 01:09:09 +0000 (01:09 +0000)]
[chromium] add event methods to WebFrame
https://bugs.webkit.org/show_bug.cgi?id=73259

Patch by Karl Koscher <supersat@chromium.org> on 2011-12-09
Reviewed by Darin Fisher.

* public/WebDOMEventListener.h: Use EventTarget instead of Node
* public/WebFrame.h: Add event methods
* src/WebDOMEventListener.cpp: Use EventTarget instead of Node
(WebKit::WebDOMEventListener::createEventListenerWrapper):
(WebKit::WebDOMEventListener::getEventListenerWrapper):
* src/WebDOMEventListenerPrivate.cpp: Use EventTarget instead of Node
(WebKit::WebDOMEventListenerPrivate::createEventListenerWrapper):
(WebKit::WebDOMEventListenerPrivate::getEventListenerWrapper):
* src/WebDOMEventListenerPrivate.h: Use EventTarget instead of Node
(WebKit::WebDOMEventListenerPrivate::ListenerInfo::ListenerInfo):
* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::addEventListener): register a listener on a WebFrame
(WebKit::WebFrameImpl::removeEventListener): remove a listener on a WebFrame
(WebKit::WebFrameImpl::dispatchEvent): dispatch an event to a WebFrame
* src/WebFrameImpl.h: Add event methods

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

9 years agoAdd WKView implementation for quickLookPreviewItemsAtWindowLocation.
weinig@apple.com [Sat, 10 Dec 2011 01:05:18 +0000 (01:05 +0000)]
Add WKView implementation for quickLookPreviewItemsAtWindowLocation.
<rdar://problem/10472505>

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKView.mm:
(-[WKView quickLookPreviewItemsAtWindowLocation:]):

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

9 years ago[Qt] Open shared memory files with shm_open.
commit-queue@webkit.org [Sat, 10 Dec 2011 01:01:12 +0000 (01:01 +0000)]
[Qt] Open shared memory files with shm_open.
https://bugs.webkit.org/show_bug.cgi?id=74078

Original patch by Kimmo Kinnunen

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2011-12-09
Reviewed by Kenneth Rohde Christiansen.

Open shared memory files with shm_open. This uses mount point that is
intended to host shared memory files. Typically this is /dev/shm.

This fixes crashes when filesystem that hosts QDir::temp() is full.

This is also more well-defined with respect to question whether SHM
writes to temp dir would cause unintended wear if hosted on flash drives.

This also fixes performance problems regarding QDir::temp() and
mkostemp(), both of which appear to be long operations.

* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::create):

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

9 years agoSmall style fix on DragDataBlackBerry.cpp
commit-queue@webkit.org [Sat, 10 Dec 2011 01:01:02 +0000 (01:01 +0000)]
Small style fix on DragDataBlackBerry.cpp
https://bugs.webkit.org/show_bug.cgi?id=74171

Patch by Mary Wu <mary.wu@torchmobile.com.cn> on 2011-12-09
Reviewed by Rob Buis.

Style fix, no function impact, no new tests.

* platform/blackberry/DragDataBlackBerry.cpp:
(WebCore::DragData::containsURL):
(WebCore::DragData::asFilenames):
(WebCore::DragData::asURL):
(WebCore::DragData::asFragment):

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

9 years agoFix test expectations from r102486: flex-flow returns direction and wrap now.
tony@chromium.org [Sat, 10 Dec 2011 00:47:29 +0000 (00:47 +0000)]
Fix test expectations from r102486: flex-flow returns direction and wrap now.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt:
* platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt:
* platform/chromium/svg/css/getComputedStyle-basic-expected.txt:
* platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

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

9 years agochromium win build: revert build_webkit_exes_from_webkit_gyp change
dpranke@chromium.org [Sat, 10 Dec 2011 00:41:40 +0000 (00:41 +0000)]
chromium win build: revert build_webkit_exes_from_webkit_gyp change
https://bugs.webkit.org/show_bug.cgi?id=74225

Source/WebKit/chromium:

Reviewed by Tony Chang.

This change sets build_webkit_exes_from_webkit_gyp back to 1;
the "All.gyp" solution doesn't work on windows.

* gyp_webkit:

Tools:

This change sets build_webkit_exes_from_webkit_gyp back to 1;
the "All.gyp" solution doesn't work on windows.

* Scripts/webkitdirs.pm:
(buildChromium):

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

9 years agoDFG's interpretation of rare case profiles should be frequency-based not count-based
fpizlo@apple.com [Sat, 10 Dec 2011 00:09:55 +0000 (00:09 +0000)]
DFG's interpretation of rare case profiles should be frequency-based not count-based
https://bugs.webkit.org/show_bug.cgi?id=74170

Reviewed by Geoff Garen.

DFG optimizes for rare cases only when the rare case counter is above some threshold
and it also constitutes a large enough fraction of total function executions. Also
added some minor debug logic.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::CodeBlock):
* bytecode/CodeBlock.h:
(JSC::CodeBlock::likelyToTakeSlowCase):
(JSC::CodeBlock::couldTakeSlowCase):
(JSC::CodeBlock::likelyToTakeSpecialFastCase):
(JSC::CodeBlock::likelyToTakeDeepestSlowCase):
(JSC::CodeBlock::likelyToTakeAnySlowCase):
(JSC::CodeBlock::executionEntryCount):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):
(JSC::DFG::ByteCodeParser::makeDivSafe):
(JSC::DFG::ByteCodeParser::handleCall):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGDriver.cpp:
(JSC::DFG::compile):
* jit/JIT.cpp:
(JSC::JIT::privateCompile):
* runtime/Heuristics.cpp:
(JSC::Heuristics::initializeHeuristics):
* runtime/Heuristics.h:

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

9 years ago[Qt] Click's count is limited to three continuous clicks.
commit-queue@webkit.org [Fri, 9 Dec 2011 23:53:35 +0000 (23:53 +0000)]
[Qt] Click's count is limited to three continuous clicks.
https://bugs.webkit.org/show_bug.cgi?id=45666

Patch by Hugo Parente Lima <hugo.lima@openbossa.org> on 2011-12-09
Reviewed by Kenneth Rohde Christiansen.

Source/WebKit2:

Make Qt recognize "infinite" continuous mouse clicks.
handleMouseDoubleClickEvent merged into handleMousePressEvent.

* UIProcess/qt/QtWebPageEventHandler.cpp:
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::timerEvent):
* UIProcess/qt/QtWebPageEventHandler.h:

Tools:

Update m_time at every call to leapForward, so double clicks
event are correctly sent by EventSender.

* WebKitTestRunner/qt/EventSenderProxyQt.cpp:
(WTR::EventSenderProxy::updateClickCountForButton):
(WTR::EventSenderProxy::leapForward):

LayoutTests:

Enable fast/events/click-count.html for qt and disable for qt-wk1.

* platform/qt-wk1/Skipped:
* platform/qt/Skipped:

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

9 years ago[Refactoring] Reduce top-level code in prepare-ChangeLog
haraken@chromium.org [Fri, 9 Dec 2011 23:50:58 +0000 (23:50 +0000)]
[Refactoring] Reduce top-level code in prepare-ChangeLog
https://bugs.webkit.org/show_bug.cgi?id=74172

Reviewed by Ryosuke Niwa.

The objective is to make prepare-ChangeLog a loadable Perl module for unit testing.
This requires to remove top-level code. This patch is one of the incremental refactorings
for that.

* Scripts/prepare-ChangeLog: Moved some top-level code into generateFunctionLists().
(generateFunctionLists):

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

9 years agoadd css parsing for flex-flow: wrap and wrap-reverse
ojan@chromium.org [Fri, 9 Dec 2011 23:50:16 +0000 (23:50 +0000)]
add css parsing for flex-flow: wrap and wrap-reverse
https://bugs.webkit.org/show_bug.cgi?id=74008

Patch by Tony Chang <tony@chromium.org> on 2011-12-09
Reviewed by Ojan Vafai.

Source/WebCore:

Also save 2 bits in StyleFlexibleBoxData by changing the size of m_flexFlow (there are only 4 enum values).

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Print the wrap value if it exists.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Parse a second token and put the values into a CSSValueList.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator EFlexWrap):
* css/CSSStyleApplyProperty.cpp:
(WebCore::ApplyPropertyFlexFlow::applyInheritValue): Does not inherit.
(WebCore::ApplyPropertyFlexFlow::applyInitialValue):
(WebCore::ApplyPropertyFlexFlow::applyValue): Special handler for setting two render style values from one
CSS property.
(WebCore::ApplyPropertyFlexFlow::createHandler):
(WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
* css/CSSValueKeywords.in:
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::flexWrap):
(WebCore::InheritedFlags::setFlexWrap):
(WebCore::InheritedFlags::initialFlexWrap):
* rendering/style/RenderStyleConstants.h: EFlexWrap to hold flex wrap values.
* rendering/style/StyleFlexibleBoxData.cpp:
(WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
(WebCore::StyleFlexibleBoxData::operator==):
* rendering/style/StyleFlexibleBoxData.h: 2 bits is enough to hold the 4 flexFlow values.

LayoutTests:

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/script-tests/css-properties.js: Test call combinations of flex-flow values.

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

9 years agoPutByValAlias unnecessarily clobbers GetIndexedPropertyStorage
oliver@apple.com [Fri, 9 Dec 2011 23:47:42 +0000 (23:47 +0000)]
PutByValAlias unnecessarily clobbers GetIndexedPropertyStorage
https://bugs.webkit.org/show_bug.cgi?id=74223

Reviewed by Geoffrey Garen.

Don't clobber GetIndexedPropertyStorage when we see PutByValAlias

* dfg/DFGPropagator.cpp:
(JSC::DFG::Propagator::getIndexedPropertyStorageLoadElimination):

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

9 years agoExpose a WKConnectionRef which represents the connection to/from the WebProcess/UIProcess
weinig@apple.com [Fri, 9 Dec 2011 23:45:49 +0000 (23:45 +0000)]
Expose a WKConnectionRef which represents the connection to/from the WebProcess/UIProcess
https://bugs.webkit.org/show_bug.cgi?id=74218

Reviewed by Anders Carlsson.

Source/WebKit2:

Test: WebKit2.WKConnectionTest in TestWebKitAPI

* Shared/WebConnection.cpp:
(WebKit::WebConnection::forwardDidReceiveMessageToClient):
* Shared/WebConnection.h:
Add helper for connection subclasses to dispatch to the client.

* UIProcess/WebConnectionToWebProcess.cpp:
(WebKit::WebConnectionToWebProcess::didReceiveMessage):
Handle postMessage messages from the WebProcess.

* UIProcess/WebContext.cpp:
(WebKit::WebContext::processDidFinishLaunching):
Dispatch the notification that a connection to the WebProcess has
been established.

* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleGetApplicationConnection):
* WebProcess/InjectedBundle/API/c/WKBundle.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::webConnectionToUIProcess):
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::WebProcess::webConnectionToUIProcess):
Add accessor to get the connection to the UIProcess from
the bundle.

* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::didReceiveMessage):
Handle postMessage messages from the UIProcess.
* WebProcess/WebProcess.h:

Tools:

Add a test of the WKConnectionRef API.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/WKConnection.cpp: Added.
(TestWebKitAPI::didCreateConnection):
(TestWebKitAPI::connectionDidReceiveMessage):
(TestWebKitAPI::connectionDidClose):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/WKConnection_Bundle.cpp: Added.
(TestWebKitAPI::connectionDidReceiveMessage):
(TestWebKitAPI::WKConnectionTest::WKConnectionTest):
(TestWebKitAPI::WKConnectionTest::initialize):

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

9 years agoHash* iterators should allow comparison between const and const versions.
levin@chromium.org [Fri, 9 Dec 2011 23:43:52 +0000 (23:43 +0000)]
Hash* iterators should allow comparison between const and const versions.
https://bugs.webkit.org/show_bug.cgi?id=73370

Reviewed by Darin Adler.

Source/JavaScriptCore:

* wtf/HashTable.h: Add the operators needed to do this.
(WTF::HashTableConstIterator::operator==):
(WTF::HashTableConstIterator::operator!=):
(WTF::HashTableIterator::operator==):
(WTF::HashTableIterator::operator!=):
(WTF::operator==):
(WTF::operator!=):

Tools:

* TestWebKitAPI/TestWebKitAPI.gypi: Add the new test file to the build.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* TestWebKitAPI/win/TestWebKitAPI.vcproj: Ditto.
* TestWebKitAPI/Tests/WTF/HashMap.cpp: Added.
(TestWebKitAPI::TEST): Add a test for the new functionality.

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

9 years agochromium: visual studio projects are busted when build_webkit_exes_from_webkit_gyp==0
dpranke@chromium.org [Fri, 9 Dec 2011 23:39:45 +0000 (23:39 +0000)]
chromium: visual studio projects are busted when build_webkit_exes_from_webkit_gyp==0
https://bugs.webkit.org/show_bug.cgi?id=74212

Reviewed by Tony Chang.

The change introduced in r102201 to split the executables out of
WebKit.gyp apparently doesn't work right on Windows, since
WebKit.gyp and Tools.gyp refer to dependent projects by
different relative paths (it appears gyp doesn't normalize the
paths). This change moves Tools.gyp to be in the same directory
as WebKit.gyp (and All.gyp), which should fix this and
conveniently will also solve the problem of how to add Tools.gyp
to the chromium DEPS file.

Source/WebKit/chromium:

* All.gyp:
* Tools.gyp: Renamed from ../../../Tools/Tools.gyp.

Tools:

* Tools.gyp: Renamed to ../Source/WebKit/chromium/Tools.gyp

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

9 years ago[Refactoring] In prepare-ChangeLog, move top-level code to fetch a bug description...
haraken@chromium.org [Fri, 9 Dec 2011 23:26:42 +0000 (23:26 +0000)]
[Refactoring] In prepare-ChangeLog, move top-level code to fetch a bug description from URL into a method
https://bugs.webkit.org/show_bug.cgi?id=74173

Reviewed by Ryosuke Niwa.

The objective is to make prepare-ChangeLog a loadable Perl module for unit testing.
This requires to remove top-level code. This patch is one of the incremental refactorings
for that.

* Scripts/prepare-ChangeLog: Moved top-level code to fetch a bug description from URL into fetchBugDescriptionFromURL().
(fetchBugDescriptionFromURL):

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

9 years ago[EFL] Add RefPtrEfl specialization for evas_object.
commit-queue@webkit.org [Fri, 9 Dec 2011 23:26:38 +0000 (23:26 +0000)]
[EFL] Add RefPtrEfl specialization for evas_object.
https://bugs.webkit.org/show_bug.cgi?id=73790

Patch by KwangHyuk Kim <hyuki.kim@samsung.com> on 2011-12-09
Reviewed by Ryosuke Niwa.

As evas_object is also based on reference count, RefPtr is applied for evas_object.

* PlatformEfl.cmake:
* platform/efl/RefPtrEfl.cpp: Added.
(WTF::refIfNotNull):
(WTF::derefIfNotNull):
* platform/efl/RefPtrEfl.h: Added.

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

9 years agoREGRESSION(102234): 2-3% layout regression
tony@chromium.org [Fri, 9 Dec 2011 23:23:23 +0000 (23:23 +0000)]
REGRESSION(102234): 2-3% layout regression
https://bugs.webkit.org/show_bug.cgi?id=74141

Reviewed by David Hyatt.

Don't allocate a RuleSet when there are no regions.

* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::initForRegionStyling):

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

9 years agoFix assertion failure in ScrollAnimatorMac
andersca@apple.com [Fri, 9 Dec 2011 23:21:10 +0000 (23:21 +0000)]
Fix assertion failure in ScrollAnimatorMac
https://bugs.webkit.org/show_bug.cgi?id=74222

Reviewed by Andreas Kling.

* platform/mac/ScrollAnimatorMac.mm:
(-[WebScrollbarPainterControllerDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]):
This can be called with a nil scrollerImp, just return NSZeroPoint when that happens.

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

9 years ago[MutationObservers] Add test for deliver-at-end-of-task semantics
adamk@chromium.org [Fri, 9 Dec 2011 22:48:16 +0000 (22:48 +0000)]
[MutationObservers] Add test for deliver-at-end-of-task semantics
https://bugs.webkit.org/show_bug.cgi?id=74190

Reviewed by Ojan Vafai.

The addition of eventSender.scheduleAsynchronousKeyDown in r102424
allows testing the code added in r101842 and http://crrev.com/113010.

Added a test using a contentEditable element and an onblur event
handler that asserts it fires after mutations due to editing have been
delivered.

* fast/mutation/end-of-task-delivery-expected.txt: Added.
* fast/mutation/end-of-task-delivery.html: Added.

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