WebKit-https.git
9 years ago[WinCairo] Unreviewed update to Skipped list to get bot green.
bfulgham@webkit.org [Tue, 13 Dec 2011 00:09:46 +0000 (00:09 +0000)]
[WinCairo] Unreviewed update to Skipped list to get bot green.

* platform/wincairo/Skipped: Exclude current failures (and turn
  on a few new successes).

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

9 years agoAX: aria-hidden inheritance broken when applying to some descendants
cfleizach@apple.com [Mon, 12 Dec 2011 23:54:37 +0000 (23:54 +0000)]
AX: aria-hidden inheritance broken when applying to some descendants
https://bugs.webkit.org/show_bug.cgi?id=73940

Reviewed by Darin Adler.

Source/WebCore:

When adding children, we were not updating the children cache for direct AX descendants.
This meant that toggling aria-hidden could result in a stale cache where elements would not be reachable.

Making this fix also exposed a problem in AccessibilityTable where the AccessibilityHeaderObject was not
being managed correctly as a mock element.

Test: platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::addChildren):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::clearChildren):
(WebCore::AccessibilityTable::headerContainer):
* accessibility/AccessibilityTable.h:

LayoutTests:

* platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements-expected.txt: Added.
* platform/mac/accessibility/aria-hidden-changes-for-non-ignored-elements.html: Added.

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

9 years agoPrefix internal methods in Objective-C API files with an underscore
weinig@apple.com [Mon, 12 Dec 2011 23:51:08 +0000 (23:51 +0000)]
Prefix internal methods in Objective-C API files with an underscore
https://bugs.webkit.org/show_bug.cgi?id=74363

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _pageRef]):
(-[WKBrowsingContextController loadRequest:]):
(-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]):
(-[WKBrowsingContextController stopLoading]):
(-[WKBrowsingContextController reload]):
(-[WKBrowsingContextController reloadFromOrigin]):
(-[WKBrowsingContextController goForward]):
(-[WKBrowsingContextController canGoForward]):
(-[WKBrowsingContextController goBack]):
(-[WKBrowsingContextController canGoBack]):
(-[WKBrowsingContextController activeURL]):
(-[WKBrowsingContextController provisionalURL]):
(-[WKBrowsingContextController committedURL]):
(-[WKBrowsingContextController title]):
(-[WKBrowsingContextController textZoom]):
(-[WKBrowsingContextController setTextZoom:]):
(-[WKBrowsingContextController pageZoom]):
(-[WKBrowsingContextController setPageZoom:]):
(-[WKBrowsingContextController setPaginationMode:]):
(-[WKBrowsingContextController paginationMode]):
(-[WKBrowsingContextController setPageLength:]):
(-[WKBrowsingContextController pageLength]):
(-[WKBrowsingContextController setGapBetweenPages:]):
(-[WKBrowsingContextController gapBetweenPages]):
(-[WKBrowsingContextController pageCount]):
(-[WKBrowsingContextController _initWithPageRef:]):
* UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
* UIProcess/API/mac/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup allowsJavaScript]):
(-[WKBrowsingContextGroup setAllowsJavaScript:]):
(-[WKBrowsingContextGroup allowsPlugIns]):
(-[WKBrowsingContextGroup setAllowsPlugIns:]):
(-[WKBrowsingContextGroup _pageGroupRef]):
* UIProcess/API/mac/WKBrowsingContextGroupInternal.h:
* UIProcess/API/mac/WKConnection.mm:
(-[WKConnection _initWithConnectionRef:]):
* UIProcess/API/mac/WKConnectionInternal.h:
* UIProcess/API/mac/WKProcessGroup.mm:
(didCreateConnection):
(-[WKProcessGroup _contextRef]):
* UIProcess/API/mac/WKProcessGroupInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:processGroup:browsingContextGroup:]):
(-[WKView browsingContextController]):

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

9 years agoWhen the mouse is dragged out of an :active element, it should lose :hover.
commit-queue@webkit.org [Mon, 12 Dec 2011 23:51:03 +0000 (23:51 +0000)]
When the mouse is dragged out of an :active element, it should lose :hover.
https://bugs.webkit.org/show_bug.cgi?id=57206

Patch by Jeremy Apthorp <jeremya@chromium.org> on 2011-12-12
Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/css/hover-active-drag.html

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMouseMoveEvent): Don't mark mouse-drag hit tests read-only, since they no longer are.
(WebCore::EventHandler::dragSourceEndedAt): Send a hit test request when the mouse goes up after a drag, so
RenderLayer has a chance to update the hover/active status.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateHoverActiveState): Only allow the :active state to change on mouse down or mouse up.

LayoutTests:

* fast/css/hover-active-drag-expected.txt: Added.
* fast/css/hover-active-drag.html: Added.
* platform/mac/fast/css/hover-active-drag-expected.txt: Removed.
* platform/chromium/fast/css/hover-active-drag-expected.txt: Removed.

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

9 years agoEliminate Duplicate word at a time equal code in StringImpl.cpp and StringHash.h
msaboff@apple.com [Mon, 12 Dec 2011 23:21:51 +0000 (23:21 +0000)]
Eliminate Duplicate word at a time equal code in StringImpl.cpp and StringHash.h
https://bugs.webkit.org/show_bug.cgi?id=73622

Reviewed by Oliver Hunt.

Moved equal(charType1 *, charType2, unsigned) template methods
from static StringImpl.cpp to StringImpl.h and then replaced the
processor specific character comparison code in StringHash::equal
with calls to these methods.

This change is worth 3% on SunSpider string-unpack-code as reported
by the SunSpider command line harness.  No other tests appear to
have measurable performance changes.

* wtf/text/AtomicString.h:
(WTF::operator==):
* wtf/text/StringHash.h:
(WTF::StringHash::equal):
* wtf/text/StringImpl.cpp:
* wtf/text/StringImpl.h:
(WTF::LChar):
(WTF::UChar):
(WTF::equal):

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

9 years agoUnreviewed Chromium expectations update; skip
kbr@google.com [Mon, 12 Dec 2011 23:17:52 +0000 (23:17 +0000)]
Unreviewed Chromium expectations update; skip
plugins/netscape-plugin-page-cache-works.html.

* platform/chromium/test_expectations.txt:

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

9 years agoARMv7 version of DFG soft modulo does register allocation inside of control flow
fpizlo@apple.com [Mon, 12 Dec 2011 23:08:35 +0000 (23:08 +0000)]
ARMv7 version of DFG soft modulo does register allocation inside of control flow
https://bugs.webkit.org/show_bug.cgi?id=74354

Reviewed by Gavin Barraclough.

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

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

9 years agoUnreviewed Windows build fix after http://trac.webkit.org/changeset/102619 .
kbr@google.com [Mon, 12 Dec 2011 23:05:34 +0000 (23:05 +0000)]
Unreviewed Windows build fix after trac.webkit.org/changeset/102619 .
Remove OVERRIDE specifier from virtual destructor.

* html/HTMLPlugInImageElement.h:

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

9 years agoWebKit code shouldn't be calling applyCommand directly
rniwa@webkit.org [Mon, 12 Dec 2011 22:53:34 +0000 (22:53 +0000)]
WebKit code shouldn't be calling applyCommand directly
https://bugs.webkit.org/show_bug.cgi?id=74337

Reviewed by Darin Adler.

Source/WebCore:

Make WebKit-layer code call Editor::replaceSelectionWithFragment and Editor::replaceSelectionWithText
instead of manually creating and applying ReplaceSelectionCommand.

The only behavioral difference is that new code will end up checking for spell checks. However, this
difference appears to be unintentional since the code predates http://trac.webkit.org/changeset/73886,
which introduced an invocation of spellcheck code.

Unfortunately no tests since there doesn't seem to be anyway to test this change.

* WebCore.exp.in:
* editing/EditCommand.cpp:
(WebCore::applyCommand):
* editing/EditCommand.h:
* editing/Editor.h:

Source/WebKit/chromium:

* src/WebFrameImpl.cpp:
(WebKit::WebFrameImpl::replaceSelection):

Source/WebKit/gtk:

* webkit/webkitwebframe.cpp:
(webkit_web_frame_replace_selection):

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):

Source/WebKit2:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceSelectionWithText):

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

9 years agoUpdate html5lib test data to latest version
abarth@webkit.org [Mon, 12 Dec 2011 22:49:58 +0000 (22:49 +0000)]
Update html5lib test data to latest version
https://bugs.webkit.org/show_bug.cgi?id=74343

Reviewed by Eric Seidel.

This patch imports the latest version of the "dat" files from
http://code.google.com/p/html5lib/

* html5lib/resources/pending-spec-changes.dat:
* html5lib/resources/plain-text-unsafe.dat:
* html5lib/resources/tables01.dat:
* html5lib/resources/tests16.dat:
* html5lib/resources/tests19.dat:
* html5lib/resources/tests26.dat:
* html5lib/resources/tests_innerHTML_1.dat:
* html5lib/resources/webkit01.dat:
* html5lib/runner-expected.txt:
* html5lib/webkit-resumer-expected.txt:
* platform/chromium/html5lib/runner-expected.txt:

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

9 years agoRemove unused getter on WKConnection.
weinig@apple.com [Mon, 12 Dec 2011 22:41:31 +0000 (22:41 +0000)]
Remove unused getter on WKConnection.

Reviewed by Dan Bernstein.

* UIProcess/API/mac/WKConnection.mm:

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

9 years agoSimplify autotools configure.ac
commit-queue@webkit.org [Mon, 12 Dec 2011 22:33:45 +0000 (22:33 +0000)]
Simplify autotools configure.ac
https://bugs.webkit.org/show_bug.cgi?id=74312

Patch by Andy Wingo <wingo@igalia.com> on 2011-12-12
Reviewed by Martin Robinson.

.:

* configure.ac: Don't AC_DEFINE so many things.  Many of the
defines were stale (ENABLE_YARR, ENABLE_JIT_OPTIMIZE_CALL, etc),
and with Platform.h we don't need to make an explicit decision
here.  If the user does pass --enable-jit or --disable-jit, effect
that choice via setting JSC_CPPFLAGS.

Source/JavaScriptCore:

* GNUmakefile.am: Add JSC_CPPFLAGS to javascriptcore_cppflags.

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

9 years agoDFG GetByVal CSE incorrectly assumes that a non-matching PutByVal cannot clobber
fpizlo@apple.com [Mon, 12 Dec 2011 22:13:35 +0000 (22:13 +0000)]
DFG GetByVal CSE incorrectly assumes that a non-matching PutByVal cannot clobber
https://bugs.webkit.org/show_bug.cgi?id=74329

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

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

LayoutTests:

* fast/js/dfg-get-by-val-clobber-expected.txt: Added.
* fast/js/dfg-get-by-val-clobber.html: Added.
* fast/js/script-tests/dfg-get-by-val-clobber.js: Added.
(doAccesses):

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

9 years agoRemove platform/audio/fftw
abarth@webkit.org [Mon, 12 Dec 2011 22:13:32 +0000 (22:13 +0000)]
Remove platform/audio/fftw
https://bugs.webkit.org/show_bug.cgi?id=73163

Reviewed by Eric Seidel.

The FFTW library is GPL, not LGPL, like WebKit.  This patch removes the
integration with the library so folks who use WebAudio don't
accidentially violate the GPL by linking in FFTW.

* GNUmakefile.am:
* WebCore.gyp/WebCore.gyp:
* WebCore.gypi:
* platform/audio/FFTFrame.h:
* platform/audio/FFTFrameStub.cpp:
* platform/audio/fftw: Removed.
* platform/audio/fftw/FFTFrameFFTW.cpp: Removed.

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

9 years agoCOMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
kbr@google.com [Mon, 12 Dec 2011 22:09:26 +0000 (22:09 +0000)]
COMPILE_ASSERT in CSSStyleSelector.cpp doesn't compile on Windows
https://bugs.webkit.org/show_bug.cgi?id=74327

Unreviewed build fix. True fix should follow under above bug.

* css/CSSStyleSelector.cpp:

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

9 years agoFix compilation error when !ENABLE(WORKERS)
dgrogan@chromium.org [Mon, 12 Dec 2011 22:04:06 +0000 (22:04 +0000)]
Fix compilation error when !ENABLE(WORKERS)
https://bugs.webkit.org/show_bug.cgi?id=74029

Reviewed by Yury Semikhatsky.

Source/WebCore:

* storage/IDBFactory.cpp:
(WebCore::IDBFactory::open): add #if ENABLE(WORKERS) guard

Source/WebKit/chromium:

* features.gypi:
* src/IDBFactoryBackendProxy.cpp:
(WebKit::IDBFactoryBackendProxy::openFromWorker):
* src/PlatformSupport.cpp:
* src/WebDevToolsAgentImpl.cpp:
(WebKit::WebDevToolsAgent::disconnectEventAsText):
* src/WebWorkerRunLoop.cpp:

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

9 years agoPage cache should support pages with plugins.
beidson@apple.com [Mon, 12 Dec 2011 22:00:31 +0000 (22:00 +0000)]
Page cache should support pages with plugins.
<rdar://problem/5190122> and https://bugs.webkit.org/show_bug.cgi?id=13634

Source/WebCore:

Reviewed by Anders Carlsson.

By making plugin elements renderers go display:none when entering the page cache,
we destroy the plug-in in a cross platform way as well as handle invalidating script
objects created by that plugin.

By restoring the original style when leaving the page cache and forcing a style recalc
on the plugin element, the plugin is gracefully reinstantiated when the user goes back.

Test: plugins/netscape-plugin-page-cache-works.html

* dom/Document.cpp:
(WebCore::Document::documentDidBecomeActive): Copy this collection before iterating over
  it, as the callbacks might result in mutating the set.

* dom/Node.h:
(WebCore::Node::setHasCustomStyleForRenderer):
(WebCore::Node::clearHasCustomStyleForRenderer): Expose the ability to stop using a
  custom renderer and go back to the default renderer.

* history/CachedFrame.cpp:
(WebCore::CachedFrame::CachedFrame): Move the document inactivation call to the same place
  we suspend active DOM objects. It is important this call be *after* the beforeunload event
  is dispatched, and was coincidental non of the elements that using Document activation
  had run in to this problem yet.

* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::PageCache::canCachePageContainingThisFrame): If the page contains plugins but
  the PageCacheSupportsPlugins setting is true, allow this page.

Kill and recreate the plugin by listening for Document activation callbacks and setting a custom
display:none render style:
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
(WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Unregister for document activation
  callbacks.
(WebCore::HTMLPlugInImageElement::createRenderer): Once a renderer (ie. plugin instance) is
  created, this element needs Document (in)activation callbacks.
(WebCore::HTMLPlugInImageElement::willMoveToNewOwnerDocument): Manage Document activation
  callback registration.
(WebCore::HTMLPlugInImageElement::didMoveToNewOwnerDocument): Ditto.
(WebCore::HTMLPlugInImageElement::documentWillBecomeInactive): Clone the element's current style
  and set the clone's display value to None. Start using this custom style and force a style
  recall. This destroys the renderer and therefore the plugin instance.
(WebCore::HTMLPlugInImageElement::documentDidBecomeActive): Stop using the custom style and
  force a style recall to reinstantiate the plugin.
(WebCore::HTMLPlugInImageElement::customStyleForRenderer): Return the stand-in style that has
  display:none set.
* html/HTMLPlugInImageElement.h:

Add a setting that allows runtime configuration of whether or not the page cache supports plugins:
* page/Settings.cpp:
(WebCore::Settings::Settings):
* page/Settings.h:
(WebCore::Settings::setPageCacheSupportsPlugins):
(WebCore::Settings::pageCacheSupportsPlugins):

Source/WebKit/mac:

Expose a WebKit preference for the page cache supporting plugins (on by default).

Reviewed by Anders Carlsson.

* WebView/WebPreferenceKeysPrivate.h:

* WebView/WebPreferences.mm:
(-[WebPreferences pageCacheSupportsPlugins]):
(-[WebPreferences setPageCacheSupportsPlugins:]):
* WebView/WebPreferencesPrivate.h:

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Expose a WebKit2 preference for the page cache supporting plugins (on by default).

Reviewed by Anders Carlsson.

* Shared/WebPreferencesStore.h:

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetPageCacheSupportsPlugins):
(WKPreferencesGetPageCacheSupportsPlugins):
* UIProcess/API/C/WKPreferencesPrivate.h:

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests:

Reviewed by Anders Carlsson.

* plugins/netscape-plugin-page-cache-works-expected.txt: Added.
* plugins/netscape-plugin-page-cache-works.html: Added.
* plugins/resources/go-back.html: Added.

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

9 years agoAdd WKConnection objective-c wrapper around WKConnectionRef
weinig@apple.com [Mon, 12 Dec 2011 21:41:34 +0000 (21:41 +0000)]
Add WKConnection objective-c wrapper around WKConnectionRef
<rdar://problem/10446092>
https://bugs.webkit.org/show_bug.cgi?id=74324

Reviewed by Anders Carlsson.

* UIProcess/API/mac/WKConnection.h: Added.
* UIProcess/API/mac/WKConnection.mm: Added.
(-[WKConnection dealloc]):
(-[WKConnection connectionRef]):
(-[WKConnection delegate]):
(-[WKConnection setDelegate:]):
(didReceiveMessage):
(didClose):
(setUpClient):
(-[WKConnection initWithConnectionRef:]):
* UIProcess/API/mac/WKConnectionInternal.h: Added.
Added new class.

* UIProcess/API/mac/WKProcessGroup.h:
* UIProcess/API/mac/WKProcessGroup.mm:
(didCreateConnection):
(setUpConnectionClient):
(-[WKProcessGroup initWithInjectedBundleURL:]):
(-[WKProcessGroup delegate]):
(-[WKProcessGroup setDelegate:]):
Add WKProcessGroupDelegate to inform the user of when connections are established.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

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

9 years agoRename QueueClient::willProcessMessageOnClientRunLoop
andersca@apple.com [Mon, 12 Dec 2011 21:41:04 +0000 (21:41 +0000)]
Rename QueueClient::willProcessMessageOnClientRunLoop
https://bugs.webkit.org/show_bug.cgi?id=74325

Reviewed by Sam Weinig.

Rename the QueueClient willProcessMessageOnClientRunLoop function to didReceiveMessageOnConnectionWorkQueue
and give it an out parameter to indicate whether the message was handled or not. This makes it more clear that
the function is expected to handle the message.

* Platform/CoreIPC/Connection.cpp:
(CoreIPC::Connection::processIncomingMessage):
* Platform/CoreIPC/Connection.h:
* Scripts/webkit2/messages.py:
(async_case_statement):
* Scripts/webkit2/messages_unittest.py:
* WebProcess/WebConnectionToUIProcess.cpp:
(WebKit::WebConnectionToUIProcess::didReceiveMessageOnConnectionWorkQueue):
* WebProcess/WebConnectionToUIProcess.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue):
* WebProcess/WebProcess.h:

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

9 years agor102234 caused RuleData to use 33 bits in its bitmask
ojan@chromium.org [Mon, 12 Dec 2011 21:25:04 +0000 (21:25 +0000)]
r102234 caused RuleData to use 33 bits in its bitmask
https://bugs.webkit.org/show_bug.cgi?id=74314

Reviewed by Antti Koivisto.

Lower m_position to something more reasonable. A million
should be plenty. Current large sites (e.g. gmail) seem to use
tens of thousands.

Added a COMPILE_ASSERT to ensure this doesn't regress.

No new tests.

* css/CSSStyleSelector.cpp:

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

9 years agoRename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec...
commit-queue@webkit.org [Mon, 12 Dec 2011 20:58:15 +0000 (20:58 +0000)]
Rename webkitCancelRequestAnimationFrame to webkitCancelAnimationFrame to match spec change
https://bugs.webkit.org/show_bug.cgi?id=74231

Patch by James Robinson <jamesr@chromium.org> on 2011-12-12
Reviewed by Simon Fraser.

Source/WebCore:

The RequestAnimationFrame spec has renamed cancelRequestAnimationFrame to cancelAnimationFrame in response to
feedback from Mozilla and Microsoft that the old name was too long and didn't parallel setTimeout/clearTimeout
and setInterval/clearInterval very well. This updates our IDL to match, while preserving the old name as an
alias to be compatible with current content.

* dom/Document.cpp:
(WebCore::Document::webkitCancelAnimationFrame):
* dom/Document.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::webkitCancelAnimationFrame):
* page/DOMWindow.h:
(WebCore::DOMWindow::webkitCancelRequestAnimationFrame):
* page/DOMWindow.idl:

LayoutTests:

Update requestAnimationFrame tests to refer to the new function name.

* fast/animation/request-animation-frame-missing-arguments.html:
* fast/animation/script-tests/request-animation-frame-cancel.js:
(window):
* fast/animation/script-tests/request-animation-frame-cancel2.js:

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

9 years ago[chromium] Remove assumption that empty surface is always at end of list
commit-queue@webkit.org [Mon, 12 Dec 2011 20:53:30 +0000 (20:53 +0000)]
[chromium] Remove assumption that empty surface is always at end of list
https://bugs.webkit.org/show_bug.cgi?id=74037

Patch by Shawn Singh <shawnsingh@chromium.org> on 2011-12-12
Reviewed by James Robinson.

Source/WebCore:

Test case added to CCLayerTreeHostCommonTest.cpp, which reproduces
a crash reported in http://code.google.com/p/chromium/issues/detail?id=106734

This patch fixes the crash in a less risky way to be merged into
m17, but the root of the issue needs to be addressed in a
follow-up patch.

* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::calculateDrawTransformsAndVisibilityInternal):

Source/WebKit/chromium:

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

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

9 years ago[chromium] Remove BufferDrag from WebClipboard::Buffer enum.
dcheng@chromium.org [Mon, 12 Dec 2011 20:47:48 +0000 (20:47 +0000)]
[chromium] Remove BufferDrag from WebClipboard::Buffer enum.
https://bugs.webkit.org/show_bug.cgi?id=74227

Reviewed by Tony Chang.

This enum value was intended for asynchronous data retrieval during drop operations; since
that was never implemented, I'm removing this enum value.

* public/platform/WebClipboard.h:
* src/AssertMatchingEnums.cpp:

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

9 years agoUnreviewed Chromium gardening. Mark flaky crashing transitions/
kbr@google.com [Mon, 12 Dec 2011 20:29:31 +0000 (20:29 +0000)]
Unreviewed Chromium gardening. Mark flaky crashing transitions/
test and update previously added flaky compositing test expectations.

* platform/chromium/test_expectations.txt:

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

9 years agoShare code that checks for matching sets of transform operations
simon.fraser@apple.com [Mon, 12 Dec 2011 19:16:20 +0000 (19:16 +0000)]
Share code that checks for matching sets of transform operations
https://bugs.webkit.org/show_bug.cgi?id=74265

Reviewed by Dan Bernstein.

Add TransformOperations::operationsMatch() and call it from the
three places that used this same code.

Tested by existing tests.

* page/animation/ImplicitAnimation.cpp:
(WebCore::ImplicitAnimation::validateTransformFunctionList):
* page/animation/KeyframeAnimation.cpp:
(WebCore::KeyframeAnimation::validateTransformFunctionList):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::fetchTransformOperationList):
* platform/graphics/transforms/TransformOperations.cpp:
(WebCore::TransformOperations::operationsMatch):
* platform/graphics/transforms/TransformOperations.h:

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

9 years agoUnreviewed, remove X86_64 modifier from GTK test_expectations list.
philn@webkit.org [Mon, 12 Dec 2011 19:11:28 +0000 (19:11 +0000)]
Unreviewed, remove X86_64 modifier from GTK test_expectations list.

* platform/gtk/test_expectations.txt:

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

9 years agoCache visited link hash
antti@apple.com [Mon, 12 Dec 2011 18:56:20 +0000 (18:56 +0000)]
Cache visited link hash
https://bugs.webkit.org/show_bug.cgi?id=74095

Reviewed by Darin Adler.

Visited link hash is relatively expensive to compute. We can cache it for anchor elements
with minimal relative memory cost for faster style resolve.

On my machine this speeds up style matching on full HTML spec by ~100ms or ~1% of the total
CPU usage. It makes link elements 8 bytes larger, a relatively minor increase to their overall size.

Invalidate the hashes on base URL for completeness sake (lack of style invalidation means
that this scenario is not properly supported currently).

Covered by existing tests. No specific test for visited hash invalidation on dynamic base URL
change as the effect is not testable due to lack of style invalidation.

* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::determineLinkStateSlowCase):
(WebCore::SelectorChecker::visitedStateChanged):
* html/Document.cpp:
* html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::HTMLAnchorElement):
(WebCore::HTMLAnchorElement::parseMappedAttribute):
* html/HTMLAnchorElement.h:
(WebCore::HTMLAnchorElement::visitedLinkHash):

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

9 years ago<rdar://problem/10328474> Text highlight changes to gray selection color when menu...
mitz@apple.com [Mon, 12 Dec 2011 18:48:43 +0000 (18:48 +0000)]
<rdar://problem/10328474> Text highlight changes to gray selection color when menu extra is shown

Reviewed by John Sullivan.

* WebView/WebView.mm:
(-[WebView _updateActiveState]): Changed to use -[NSWindow _hasKeyAppearance] instead
of -isKeyWindow. The former also returns YES when a menu extra is open.
(-[WebView addWindowObserversForWindow:]): Removed code to observe
NSWindowDidBecomeKeyNotification and NSWindowDidResignKeyNotification.
(-[WebView removeWindowObservers]): Removed code to stop observing the above.
(-[WebView _windowChangedKeyState]): Overridden this to call _updateActiveState.
This is called when the result of -_hasKeyAppearance changes.
(-[WebView _windowWillOrderOnScreen:]): Removed call to _updateActiveState,
previously needed for popovers, because _windowChangedKeyState is invoked
at the right time for them.
(-[WebView _windowWillOrderOffScreen:]): Ditto.

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

9 years ago[GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebView size...
commit-queue@webkit.org [Mon, 12 Dec 2011 18:44:10 +0000 (18:44 +0000)]
[GTK] gtk_widget_size_allocate for plugin widgets should happen in the WebView size-allocate method
https://bugs.webkit.org/show_bug.cgi?id=72805

Patch by Martin Robinson <mrobinson@igalia.com> on 2011-12-12
Reviewed by Gustavo Noronha Silva.

Source/WebCore:

No new tests. This is only a performance tweak.

Instead of immediately calling gtk_widget_size during painting, defer
this until the size-allocate method of the WebView.

* plugins/gtk/PluginViewGtk.cpp:
(WebCore::PluginView::updateWidgetAllocationAndClip): Instead of immediately changing
the widget allocation, just record it in a GObject data attachment.

Source/WebKit/gtk:

Instead of immediately calling gtk_widget_size during painting, defer
this until the size-allocate method of the WebView.

* WebCoreSupport/ChromeClientGtk.cpp:
(WebKit::ChromeClient::paint): If any child widgets have a pending allocation
call gtk_widget_size_allocate.
* webkit/webkitwebview.cpp:
(updateChildAllocationFromPendingAllocation): Added this helper.
(webkit_web_view_size_allocate): Call the helper on all child widgets.

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

9 years ago[chromium] MediaStream API: Moving WebMediaStreamSource.h
tommyw@google.com [Mon, 12 Dec 2011 18:40:03 +0000 (18:40 +0000)]
[chromium] MediaStream API: Moving WebMediaStreamSource.h
https://bugs.webkit.org/show_bug.cgi?id=74081

Moving WebMediaStreamSource.h to public/platform.
Keeping a stub in public as to not affect chromium right now.

Reviewed by Darin Fisher.

* WebKit.gyp:
* public/WebMediaStreamSource.h:
* public/platform/WebMediaStreamSource.h: Copied from Source/WebKit/chromium/public/WebMediaStreamSource.h.
(WebKit::WebMediaStreamSource::WebMediaStreamSource):
(WebKit::WebMediaStreamSource::~WebMediaStreamSource):
(WebKit::WebMediaStreamSource::isNull):
* src/AssertMatchingEnums.cpp:
* src/UserMediaClientImpl.cpp:
* src/WebMediaStreamDescriptor.cpp:
* src/WebMediaStreamRegistry.cpp:
* src/WebMediaStreamSource.cpp:
* src/WebUserMediaRequest.cpp:

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

9 years agoSource/WebCore: A SubresourceLoader in the middle of revalidating
japhet@chromium.org [Mon, 12 Dec 2011 18:27:31 +0000 (18:27 +0000)]
Source/WebCore: A SubresourceLoader in the middle of revalidating
a resource should be treated as finishing (similar to
didFinishLoading and didFail) to ensure that willCancel()
doesn't declare the revalidation as having failed reentrantly.
https://bugs.webkit.org/show_bug.cgi?id=72762

Reviewed by Adam Barth.

Test: http/tests/cache/cancel-during-revalidation-succeeded.html

* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::didReceiveResponse):

LayoutTests: Test for https://bugs.webkit.org/show_bug.cgi?id=72762

Reviewed by Adam Barth.

* http/tests/cache/cancel-during-revalidation-succeeded-expected.txt: Added.
* http/tests/cache/cancel-during-revalidation-succeeded.html: Added.
* http/tests/cache/resources/stylesheet304.php: Added.

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

9 years ago[EFL] Add API to query the validity of a frame's SSL certificate.
kubo@profusion.mobi [Mon, 12 Dec 2011 18:18:57 +0000 (18:18 +0000)]
[EFL] Add API to query the validity of a frame's SSL certificate.
https://bugs.webkit.org/show_bug.cgi?id=74302

Reviewed by Gustavo Noronha Silva.

* ewk/ewk_frame.cpp:
(ewk_frame_certificate_status_get):
* ewk/ewk_frame.h:

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

9 years ago[EFL] Add API to notify that mixed content has been loaded.
kubo@profusion.mobi [Mon, 12 Dec 2011 18:18:34 +0000 (18:18 +0000)]
[EFL] Add API to notify that mixed content has been loaded.
https://bugs.webkit.org/show_bug.cgi?id=74301

Reviewed by Gustavo Noronha Silva.

When mixed content is displayed/run, both frames and views
emit the proper signals to notify API users.

* WebCoreSupport/FrameLoaderClientEfl.cpp:
(WebCore::FrameLoaderClientEfl::didDisplayInsecureContent):
(WebCore::FrameLoaderClientEfl::didRunInsecureContent):
* ewk/ewk_frame.cpp:
(ewk_frame_view_create_for_view):
(ewk_frame_mixed_content_displayed_get):
(ewk_frame_mixed_content_run_get):
(ewk_frame_mixed_content_displayed_set):
(ewk_frame_mixed_content_run_set):
* ewk/ewk_frame.h:
* ewk/ewk_private.h:
* ewk/ewk_view.cpp:
(ewk_view_frame_main_cleared):
(ewk_view_mixed_content_displayed_get):
(ewk_view_mixed_content_run_get):
(ewk_view_mixed_content_displayed_set):
(ewk_view_mixed_content_run_set):
* ewk/ewk_view.h:

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

9 years ago[EFL] Add API to manage root X.509 CA certificates.
kubo@profusion.mobi [Mon, 12 Dec 2011 18:18:07 +0000 (18:18 +0000)]
[EFL] Add API to manage root X.509 CA certificates.
https://bugs.webkit.org/show_bug.cgi?id=74300

Reviewed by Martin Robinson.

* ewk/ewk_network.cpp:
(ewk_network_tls_ca_certificates_path_get):
(ewk_network_tls_ca_certificates_path_set):
* ewk/ewk_network.h:

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

9 years ago[EFL] Add API to control whether SSL certificates should be checked.
kubo@profusion.mobi [Mon, 12 Dec 2011 18:17:40 +0000 (18:17 +0000)]
[EFL] Add API to control whether SSL certificates should be checked.
https://bugs.webkit.org/show_bug.cgi?id=74299

Reviewed by Martin Robinson.

* ewk/ewk_main.cpp:
(_ewk_init_body): Explicitly disable certificate checks by default.
* ewk/ewk_network.cpp:
(ewk_network_tls_certificate_check_get):
(ewk_network_tls_certificate_check_set):
* ewk/ewk_network.h:

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

9 years agoUnreviewed cleanup fix.
alexis.menard@openbossa.org [Mon, 12 Dec 2011 18:10:22 +0000 (18:10 +0000)]
Unreviewed cleanup fix.

Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016

Also remove the files that should be removed.

* UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
* UIProcess/qt/qwkhistory.cpp: Removed.
* UIProcess/qt/qwkhistory.h: Removed.
* UIProcess/qt/qwkhistory_p.h: Removed.

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

9 years ago[Qt] Unreviewed gardening. Add Qt5 specific expected results after r102388.
ossy@webkit.org [Mon, 12 Dec 2011 18:03:46 +0000 (18:03 +0000)]
[Qt] Unreviewed gardening. Add Qt5 specific expected results after r102388.

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

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

9 years agoUnreviewed. Mark a couple of flaky compositing tests as failing.
kbr@google.com [Mon, 12 Dec 2011 17:49:54 +0000 (17:49 +0000)]
Unreviewed. Mark a couple of flaky compositing tests as failing.

* platform/chromium/test_expectations.txt:

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

9 years ago[Qt] Fix skip list search path and expected file search path in ORWT
commit-queue@webkit.org [Mon, 12 Dec 2011 17:48:33 +0000 (17:48 +0000)]
[Qt] Fix skip list search path and expected file search path in ORWT
https://bugs.webkit.org/show_bug.cgi?id=74281

Expected file search path fixed.

Print all used skipped list and expected search path in verbose mode similar to NRWT.

Patch by Ádám Kallai <Kallai.Adam@stud.u-szeged.hu> on 2011-12-12
Reviewed by Csaba Osztrogonác.

* Scripts/old-run-webkit-tests:
(buildPlatformResultHierarchy):
(buildPlatformTestHierarchy):
(readSkippedFiles):

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

9 years ago[qt][wk2] Postpone scroll effects when page transition is ongoing.
commit-queue@webkit.org [Mon, 12 Dec 2011 17:40:42 +0000 (17:40 +0000)]
[qt][wk2] Postpone scroll effects when page transition is ongoing.
https://bugs.webkit.org/show_bug.cgi?id=74177

Patch by Michael Bruning <michael.bruning@nokia.com> on 2011-12-12
Reviewed by Kenneth Rohde Christiansen.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::scrollPositionRequested):
* UIProcess/API/qt/qquickwebview_p_p.h:
(QQuickWebViewPrivate::PostTransitionState::apply):

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

9 years ago[Qt] Missing layoutTestController.dumpWillCacheResponse
commit-queue@webkit.org [Mon, 12 Dec 2011 17:30:36 +0000 (17:30 +0000)]
[Qt] Missing layoutTestController.dumpWillCacheResponse
https://bugs.webkit.org/show_bug.cgi?id=74287

Patch by Nándor Huszka <huszka.nandor@stud.u-szeged.hu> on 2011-12-12
Reviewed by Csaba Osztrogonác.

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::dumpWillCacheResponseCallbacks):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::dispatchDidReceiveResponse):
* WebCoreSupport/FrameLoaderClientQt.h:

Tools:

* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::reset):
(LayoutTestController::dumpWillCacheResponse):
* DumpRenderTree/qt/LayoutTestControllerQt.h:

LayoutTests:

* platform/qt/Skipped: Unskip http/tests/misc/willCacheResponse-delegate-callback.html

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

9 years ago[GTK] platform/gtk/fonts/custom-font-missing-glyphs.html fails on 64-bit Debug
commit-queue@webkit.org [Mon, 12 Dec 2011 17:26:37 +0000 (17:26 +0000)]
[GTK] platform/gtk/fonts/custom-font-missing-glyphs.html fails on 64-bit Debug
https://bugs.webkit.org/show_bug.cgi?id=73771

Patch by Martin Robinson <mrobinson@igalia.com> on 2011-12-12
Reviewed by Gustavo Noronha Silva.

Tools:

When using a fallback font during testing, always use DejaVu Sans. This prevents
falling back to DejaVu Serif on some systems.

* DumpRenderTree/gtk/fonts/fonts.conf: Fall back to DejaVu Sans.

LayoutTests:

* platform/gtk/fonts/custom-font-missing-glyphs-expected.txt: Update results to reflect DejaVu Sans.
* platform/gtk/Skipped: Unskip a test that is now passing.

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

9 years agoUpstream 3 files into WebCore/platform/blackberry
commit-queue@webkit.org [Mon, 12 Dec 2011 16:47:49 +0000 (16:47 +0000)]
Upstream 3 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=74275

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

Initial upstream, no new tests.

* platform/blackberry/ContextMenuBlackBerry.cpp: Added.
* platform/blackberry/ContextMenuItemBlackBerry.cpp: Added.
* platform/blackberry/TemporaryLinkStubs.cpp: Added.

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

9 years ago[Qt] Rendering issues with sliders and QStyle
pierre.rossi@gmail.com [Mon, 12 Dec 2011 16:44:31 +0000 (16:44 +0000)]
[Qt] Rendering issues with sliders and QStyle
https://bugs.webkit.org/show_bug.cgi?id=73921

With QStyle's origins being deeply rooted with widgets,
several styles make wrong assumptions, leading to sliders
not being painted properly in WebKit. We can solve a lot
of problems by systematically translating the painter to
the top left corner of the render object.

Reviewed by Simon Hausmann.

No new tests. The Qt tests are ran with the Windows
style, this fixes some quirks affecting other styles.

* platform/qt/RenderThemeQStyle.cpp:
(WebCore::RenderThemeQStyle::paintSliderTrack):
(WebCore::RenderThemeQStyle::paintSliderThumb):

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

9 years agoUpstream 5 files into WebCore/platform/blackberry
commit-queue@webkit.org [Mon, 12 Dec 2011 16:35:08 +0000 (16:35 +0000)]
Upstream 5 files into WebCore/platform/blackberry
https://bugs.webkit.org/show_bug.cgi?id=73798

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

Main contributors:
Genevieve Mak <gmak@rim.com>
Mike Lattanzio  <mlattanzio@rim.com>
George Staikos <gstaikos@rim.com>

Initial upstream, no new tests.

* platform/blackberry/PlatformTouchEventBlackBerry.cpp: Added.
(WebCore::PlatformTouchEvent::PlatformTouchEvent):
* platform/blackberry/PlatformTouchPointBlackBerry.cpp: Added.
(WebCore::PlatformTouchPoint::PlatformTouchPoint):
* platform/blackberry/SharedBufferBlackBerry.cpp: Added.
(WebCore::SharedBuffer::createWithContentsOfFile):
* platform/blackberry/SharedTimerBlackBerry.cpp: Added.
(WebCore::SharedTimerBlackBerry::SharedTimerBlackBerry):
(WebCore::SharedTimerBlackBerry::~SharedTimerBlackBerry):
(WebCore::SharedTimerBlackBerry::instance):
(WebCore::SharedTimerBlackBerry::start):
(WebCore::SharedTimerBlackBerry::stop):
(WebCore::setSharedTimerFiredFunction):
(WebCore::setSharedTimerFireInterval):
(WebCore::stopSharedTimer):
* platform/blackberry/SystemTimeBlackBerry.cpp: Added.
(WebCore::userIdleTime):

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

9 years agoUnreviewed, mark
philn@webkit.org [Mon, 12 Dec 2011 16:28:57 +0000 (16:28 +0000)]
Unreviewed, mark
http/tests/security/cross-origin-xsl-redirect-BLOCKED.html as
expected crasher on GTK 64-bit Debug.

* platform/gtk/test_expectations.txt:

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

9 years ago[Qt][WK2] Remove dead code from QtWebPageProxy
caio.oliveira@openbossa.org [Mon, 12 Dec 2011 16:14:14 +0000 (16:14 +0000)]
[Qt][WK2] Remove dead code from QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=74296

Reviewed by Andreas Kling.

* UIProcess/qt/QtWebPageProxy.cpp:
* UIProcess/qt/QtWebPageProxy.h:

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

9 years agoUnreviewed build fix.
hausmann@webkit.org [Mon, 12 Dec 2011 15:50:06 +0000 (15:50 +0000)]
Unreviewed build fix.

Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016

* UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
(QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
(QWebNavigationListModelPrivate::createWebNavigationModel):
(QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
(QWebNavigationHistoryPrivate::createHistory):
(QWebNavigationHistoryPrivate::reset):
(QWebNavigationHistoryPrivate::goBackTo):
(QWebNavigationHistoryPrivate::goForwardTo):
(QWebNavigationListModel::QWebNavigationListModel):
(QWebNavigationListModel::~QWebNavigationListModel):
(QWebNavigationListModel::rowCount):
(QWebNavigationListModel::data):
(QWebNavigationHistory::QWebNavigationHistory):
(QWebNavigationHistory::~QWebNavigationHistory):
(QWebNavigationHistory::backItems):
(QWebNavigationHistory::forwardItems):
* UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
* UIProcess/API/qt/qwebnavigationhistory_p_p.h: Added.

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

9 years agoImplement a cache for CSSStyleRule::selectorText()
apavlov@chromium.org [Mon, 12 Dec 2011 15:47:43 +0000 (15:47 +0000)]
Implement a cache for CSSStyleRule::selectorText()
https://bugs.webkit.org/show_bug.cgi?id=74269

This change is geared towards speeding up the CSS selector profiler,
its implementation tracked at https://bugs.webkit.org/show_bug.cgi?id=74004.
Using a proof-of-concept implementation of the profiler, this change reduces
the profiler temporal overhead on PerformanceTests/Parser/html5-full-render.html
roughly by 86% (from ~72 seconds down to ~10 seconds). This change also does not
considerably increase average memory usage, as reading selectorText is a relatively
rare case during normal web browsing.

Reviewed by Andreas Kling.

No new tests, as this functionality is covered by existing tests.

* css/CSSRule.h:
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::~CSSStyleRule):
(WebCore::selectorTextCache):
(WebCore::CSSStyleRule::cleanup):
(WebCore::CSSStyleRule::generateSelectorText):
(WebCore::CSSStyleRule::selectorText):
(WebCore::CSSStyleRule::setSelectorText):
* css/CSSStyleRule.h:

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

9 years ago[Qt] Move postMessage/messageReceived APIS to experimental
hausmann@webkit.org [Mon, 12 Dec 2011 15:42:56 +0000 (15:42 +0000)]
[Qt] Move postMessage/messageReceived APIS to experimental

Reviewed by Tor Arne Vestbø.

* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::setPageProxy):
(QQuickWebViewExperimental::QQuickWebViewExperimental):
(QQuickWebViewExperimental::postMessage):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml:

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

9 years ago[Qt][WK2] History is not accessible in QML.
alexis.menard@openbossa.org [Mon, 12 Dec 2011 15:39:28 +0000 (15:39 +0000)]
[Qt][WK2] History is not accessible in QML.
https://bugs.webkit.org/show_bug.cgi?id=73016

Reviewed by Simon Hausmann.

.:

Add the new QWebNavigationHistory in the map file.

* Source/qtwebkit-export.map:

Source/WebKit/qt:

Register QWebNavigationHistory and QWebNavigationListModel in the QML plugin.

* declarative/experimental/plugin.cpp:
(WebKitQmlPlugin::registerTypes):

Source/WebKit2:

Remove the old qwkhistory and create QWebNavigationHistory which is QML
friendly with data models you can plug to a view in QML

* Target.pri:
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::didChangeBackForwardList):
(QQuickWebViewExperimental::navigationHistory):
(QQuickWebViewExperimental::goForwardTo):
(QQuickWebViewExperimental::goBackTo):
* UIProcess/API/qt/qquickwebview_p.h:
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/API/qt/qwebnavigationhistory.cpp: Added.
(QWebNavigationListModelPrivate::QWebNavigationListModelPrivate):
(QWebNavigationListModelPrivate::createWebNavigationModel):
(QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate):
(QWebNavigationHistoryPrivate::createHistory):
(QWebNavigationHistoryPrivate::reset):
(QWebNavigationHistoryPrivate::goBackTo):
(QWebNavigationHistoryPrivate::goForwardTo):
(QWebNavigationListModel::QWebNavigationListModel):
(QWebNavigationListModel::~QWebNavigationListModel):
(QWebNavigationListModel::rowCount):
(QWebNavigationListModel::data):
(QWebNavigationHistory::QWebNavigationHistory):
(QWebNavigationHistory::~QWebNavigationHistory):
(QWebNavigationHistory::backItems):
(QWebNavigationHistory::forwardItems):
* UIProcess/API/qt/qwebnavigationhistory_p.h: Added.
* UIProcess/API/qt/qwebnavigationhistory_p_p.h: Renamed from Source/WebKit2/UIProcess/qt/qwkhistory_p.h.
* UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added.
* UIProcess/qt/QtWebPageLoadClient.cpp:
(QtWebPageLoadClient::QtWebPageLoadClient):
(QtWebPageLoadClient::didChangeBackForwardList):
* UIProcess/qt/QtWebPageLoadClient.h:
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::~QtWebPageProxy):
(QtWebPageProxy::goBackTo):
(QtWebPageProxy::goForwardTo):
(QtWebPageProxy::navigationHistory):
* UIProcess/qt/QtWebPageProxy.h:
* UIProcess/qt/qwkhistory.cpp: Removed.
* UIProcess/qt/qwkhistory.h: Removed.

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

9 years agoWeb Inspector: [Styles] Modified selector text needs sanitization
apavlov@chromium.org [Mon, 12 Dec 2011 15:24:36 +0000 (15:24 +0000)]
Web Inspector: [Styles] Modified selector text needs sanitization
https://bugs.webkit.org/show_bug.cgi?id=74291

Reviewed by Yury Semikhatsky.

Source/WebCore:

* inspector/front-end/StylesSidebarPane.js:

LayoutTests:

* inspector/styles/commit-selector-expected.txt:
* inspector/styles/commit-selector.html:

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

9 years agoFulfill FIXME in HTMLLinkElement.h.
reni@webkit.org [Mon, 12 Dec 2011 15:13:18 +0000 (15:13 +0000)]
Fulfill FIXME in  HTMLLinkElement.h.
https://bugs.webkit.org/show_bug.cgi?id=74278

Rename HTMLLinkElement::isLoading() to isStyleSheetLoading().

Reviewed by Andreas Kling.

No new tests because the functionality remains the same.

* dom/Document.cpp:
(WebCore::Document::recalcStyleSelector):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setDisabledState):
(WebCore::HTMLLinkElement::isStyleSheetLoading):
(WebCore::HTMLLinkElement::sheetLoaded):
* html/HTMLLinkElement.h:

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

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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://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: https://svn.webkit.org/repository/webkit/trunk@102537 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10 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: https://svn.webkit.org/repository/webkit/trunk@102536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10 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: https://svn.webkit.org/repository/webkit/trunk@102535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10 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: https://svn.webkit.org/repository/webkit/trunk@102534 268f45cc-cd09-0410-ab3c-d52691b4dbfc

10 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: https://svn.webkit.org/repository/webkit/trunk@102533 268f45cc-cd09-0410-ab3c-d52691b4dbfc