2010-10-13  Yury Semikhatsky  <yurys@chromium.org>

        Unreviewed. Update test expectation.

        * inspector/console-trace-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Csaba Osztrogonác.

        Missing parameters for bytecode dump of next_pname
        https://bugs.webkit.org/show_bug.cgi?id=47590

        * bytecode/CodeBlock.cpp:
        (JSC::CodeBlock::dump): add missing parameters to the dump.

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

Need to check for the existence of DeviceOrientation and DeviceMotion controllers

These features can be disabled at run time, so an enable guard is not sufficient.
This bug was introduced in http://trac.webkit.org/changeset/69646

Tested with existing tests.

* history/PageCache.cpp:
(WebCore::logCanCachePageDecision):
(WebCore::PageCache::canCache):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Xan Lopez  <xlopez@igalia.com>

        Reviewed by Martin Robinson.

        Unskip some fast/js tests that seem to be working now.

        * platform/gtk/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Adam Barth  <abarth@webkit.org>

        Reviewed by Darin Fisher.

        [Chromium] Clean up SerializeDomParam
        https://bugs.webkit.org/show_bug.cgi?id=47580

        This patch just renames a bunch of the members of this struct to be
        more sensible.  No behavior change, well, except for one struct member
        that wasn't initialized.  I didn't trace through this code to see if
        the uninitialized value was used anywhere, but initializing all the
        values seems like a good idea.

        * src/WebPageSerializerImpl.cpp:
        (WebKit::WebPageSerializerImpl::SerializeDomParam::SerializeDomParam):
        (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
        (WebKit::WebPageSerializerImpl::postActionAfterSerializeOpenTag):
        (WebKit::WebPageSerializerImpl::postActionAfterSerializeEndTag):
        (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):
        (WebKit::WebPageSerializerImpl::openTagToString):
        (WebKit::WebPageSerializerImpl::endTagToString):
        (WebKit::WebPageSerializerImpl::buildContentForNode):
        * src/WebPageSerializerImpl.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Adam Barth  <abarth@webkit.org>

        Reviewed by Maciej Stachowiak.

        [WTFURL] Add a mechanism for classifying types of characters
        https://bugs.webkit.org/show_bug.cgi?id=45085

        Various characters have different escaping rules depending on where
        they are in URLs.  This patch adds a table containing that information.

        * JavaScriptCore.xcodeproj/project.pbxproj:
        * wtf/url/src/URLCharacterTypes.cpp: Added.
        * wtf/url/src/URLCharacterTypes.h: Added.
        (WTF::URLCharacterTypes::isQueryChar):
        (WTF::URLCharacterTypes::isIPv4Char):
        (WTF::URLCharacterTypes::isHexChar):
        (WTF::URLCharacterTypes::isCharOfType):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-11  Andrei Popescu  <andreip@google.com>

        Reviewed by Jeremy Orlow.

        [Chromium] Cleanup WebIDBFactory::open once the Chromium plumbing has landed.
        https://bugs.webkit.org/show_bug.cgi?id=47531

        Remove the temporary open() method since the appropriate Chromium plumbing was
        added in http://codereview.chromium.org/3729003/

        * public/WebIDBFactory.h:
        (WebKit::WebIDBFactory::open):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Let WebCore handle scrolling when the spacebar is pressed on Windows

WebCore already has code to do this, and WebKit2 was doing it on
keydown instead of keypress, which caused problems with text fields.

WebCore's spacebar-handling code is currently compiled out on Mac and
Qt, so we continue to handle spacebar in WebKit2 on those platforms.

Fixes <http://webkit.org/b/47544> <rdar://problem/8540645> REGRESSION:
Pressing spacebar in a text field in WebKit2 does not insert a space,
scrolls the page instead

Test: WebKit2/SpacebarScrolling

Reviewed by Sam Weinig.

WebKit2:

* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::performDefaultBehaviorForKeyEvent):
Removed handling for spacebar presses. WebCore already does this for
us, and does it better.

WebKitTools:

Test that pressing the spacebar in a text field does not scroll the
document

* TestWebKitAPI/PlatformUtilities.h: Added isKeyDown.

* TestWebKitAPI/PlatformWebView.h: Added simulateSpacebarKeyPress.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/win/TestWebKitAPI.vcproj:
* TestWebKitAPI/win/copy-resources.cmd:
Added new files.

* TestWebKitAPI/Tests/WebKit2/SpacebarScrolling.cpp: Added.
(TestWebKitAPI::JavaScriptCallbackContext::JavaScriptCallbackContext):
We use this to track what the result of calling into JavaScript was.
(TestWebKitAPI::didFinishLoadForFrame): Records when the page
finishes loading.
(TestWebKitAPI::didNotHandleKeyEventCallback): Records when a key down
event is not handled.
(TestWebKitAPI::javaScriptCallback): Records that JavaScript finished
executing and whether the result matched our expectation.
(TestWebKitAPI::wk): Turns a UTF-8 C string into a WKStringRef.
(TestWebKitAPI::runJSTest): Calls into JS, waits for the call to
complete, and returns whether we got back the expected result.
(TestWebKitAPI::WebKit2_SpacebarScrolling): Tests that pressing
spacebar inside a text field does not scroll the document and that
pressing it outside the text field does scroll the document.

* TestWebKitAPI/Tests/WebKit2/spacebar-scrolling.html: Added.

* TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
(TestWebKitAPI::Util::isKeyDown): Checks the event's type.

* TestWebKitAPI/mac/PlatformWebViewMac.mm:
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress): Copied
code from DRT's EventSendingController.

* TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
(TestWebKitAPI::Util::isKeyDown): Checks the message's type.

* TestWebKitAPI/win/PlatformWebViewWin.cpp:
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress): Send the
same messages that get sent when you press spacebar in Notepad.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Allow all signals to be delivered to the web process
https://bugs.webkit.org/show_bug.cgi?id=47602
<rdar://problem/8546399>

Reviewed by Sam Weinig.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  John Knottenbelt  <jknotten@chromium.org>

        Reviewed by Steve Block.

        First step towards client-based Geolocation in Chromium. Build
        fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
        https://bugs.webkit.org/show_bug.cgi?id=47586

        * WebCore.gyp/WebCore.gyp:
        * platform/chromium/ChromiumBridge.h:
        * platform/chromium/GeolocationServiceChromium.cpp:
2010-10-13  John Knottenbelt  <jknotten@chromium.org>

        Reviewed by Steve Block.

        First step towards client-based Geolocation in Chromium. Build
        fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
        https://bugs.webkit.org/show_bug.cgi?id=47586

        * WebKit.gyp:
        * src/ChromeClientImpl.cpp:
        (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame):
        (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
        * src/ChromiumBridge.cpp:
        * src/WebGeolocationServiceMock.cpp:
        (WebKit::WebGeolocationServiceMock::createWebGeolocationServiceMock):
        (WebKit::WebGeolocationServiceMock::setMockGeolocationPermission):
        (WebKit::WebGeolocationServiceMock::setMockGeolocationPosition):
        (WebKit::WebGeolocationServiceMock::setMockGeolocationError):
2010-10-13  John Knottenbelt  <jknotten@chromium.org>

        Reviewed by Steve Block.

        First step towards client-based Geolocation in Chromium. Build
        fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
        https://bugs.webkit.org/show_bug.cgi?id=47586

        * DumpRenderTree/chromium/WebViewHost.cpp:
        * DumpRenderTree/chromium/WebViewHost.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r69638.
        http://trac.webkit.org/changeset/69638
        https://bugs.webkit.org/show_bug.cgi?id=47595

        "Broke win and chromium-win bots" (Requested by dglazkov on
        #webkit).

        * Scripts/webkitpy/common/system/path.py:
        * Scripts/webkitpy/layout_tests/layout_package/dump_render_tree_thread.py:
        * Scripts/webkitpy/layout_tests/port/base.py:
        * Scripts/webkitpy/layout_tests/port/base_unittest.py:
        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Adam Barth  <abarth@webkit.org>

        Reviewed by Tony Chang.

        [Chromium] Clean up WebPageSerializerImpl::serialize
        https://bugs.webkit.org/show_bug.cgi?id=47577

        This patch shouldn't have any behavior change.  I'm just trying to
        understand what this code does.

        * src/WebPageSerializerImpl.cpp:
        (WebKit::WebPageSerializerImpl::saveHTMLContentToBuffer):
        (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):
        (WebKit::WebPageSerializerImpl::serialize):
        * src/WebPageSerializerImpl.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Sheriff Bot  <webkit.review.bot@gmail.com>

        Unreviewed, rolling out r69667.
        http://trac.webkit.org/changeset/69667
        https://bugs.webkit.org/show_bug.cgi?id=47598

        "Most of the tests seem to fail in the bots for some reason"
        (Requested by xan_ on #webkit).

        * platform/gtk/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename BackingStoreMac.mm to BackingStoreCG.cpp

There's nothing Mac-specific about this file.

Rubber-stamped by Anders Carlsson.

* Shared/cg/BackingStoreCG.cpp: Renamed from WebKit2/Shared/mac/BackingStoreMac.mm.

* WebKit2.xcodeproj/project.pbxproj: Updated for rename.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Start compiling BackingStore on Windows

Rubber-stamped by Anders Carlsson.

JavaScriptCore:

Export tryFastRealloc for WebKit2's benefit

* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Added
tryFastRealloc. Removed RegExpObject::info, which is now exported via
JS_EXPORTDATA.

WebKit2:

* win/WebKit2.vcproj: Added BackingStore.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Nate Chapin  <japhet@chromium.org>

        Unreviewed, Chromium test fix.

        Move a couple of platform-specific results that were added to the wrong directory.

        * platform/chromium/console-trace-in-eval-expected.txt: Removed.
        * platform/chromium/console-uncaught-exception-in-eval-expected.txt: Removed.
        * platform/chromium/inspector/console-trace-in-eval-expected.txt: Copied from LayoutTests/platform/chromium/console-trace-in-eval-expected.txt.
        * platform/chromium/inspector/console-uncaught-exception-in-eval-expected.txt: Copied from LayoutTests/platform/chromium/console-uncaught-exception-in-eval-expected.txt.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fixes after r69538.

* UIProcess/WebBackForwardList.h: Add missing include directive
for CoreFoundation.
* UIProcess/cf/WebBackForwardListCF.cpp: Add missing include
directives for RetainPtr.h and CoreFoundation.
* UIProcess/cf/WebPageProxyCF.cpp: Add missing include directive
for RetainPtr.h.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Dirk Schulze.

        [Cairo] Activate ContextShadow in all places where shadows are drawn
        https://bugs.webkit.org/show_bug.cgi?id=46475

        Rebaselined tests. All these changes seem reasonable. In some cases, the
        new results are much better / closer matches to Chromium.

        * platform/gtk/fast/box-shadow/basic-shadows-expected.checksum:
        * platform/gtk/fast/box-shadow/basic-shadows-expected.png:
        * platform/gtk/fast/box-shadow/inset-expected.checksum:
        * platform/gtk/fast/box-shadow/inset-expected.png:
        * platform/gtk/fast/css/shadow-multiple-expected.checksum:
        * platform/gtk/fast/css/shadow-multiple-expected.png:
        * platform/gtk/fast/text/shadow-no-blur-expected.checksum:
        * platform/gtk/fast/text/shadow-no-blur-expected.png:
        * platform/gtk/fast/text/shadow-translucent-fill-expected.checksum:
        * platform/gtk/fast/text/shadow-translucent-fill-expected.png:
        * platform/gtk/fast/text/stroking-decorations-expected.checksum:
        * platform/gtk/fast/text/stroking-decorations-expected.png:
        * platform/gtk/fast/text/stroking-expected.checksum:
        * platform/gtk/fast/text/stroking-expected.png:
        * platform/gtk/fast/transforms/shadows-expected.checksum:
        * platform/gtk/fast/transforms/shadows-expected.png:
        * platform/gtk/svg/css/arrow-with-shadow-expected.checksum:
        * platform/gtk/svg/css/arrow-with-shadow-expected.png:
        * platform/gtk/svg/css/composite-shadow-text-expected.checksum:
        * platform/gtk/svg/css/composite-shadow-text-expected.png:
        * platform/gtk/svg/css/group-with-shadow-expected.checksum:
        * platform/gtk/svg/css/group-with-shadow-expected.png:
        * platform/gtk/svg/css/path-with-shadow-expected.checksum:
        * platform/gtk/svg/css/path-with-shadow-expected.png:
        * platform/gtk/svg/css/shadow-with-large-radius-expected.checksum:
        * platform/gtk/svg/css/shadow-with-large-radius-expected.png:
        * platform/gtk/svg/css/shadow-with-negative-offset-expected.checksum:
        * platform/gtk/svg/css/shadow-with-negative-offset-expected.png:
2010-10-06  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Dirk Schulze.

        [Cairo] Activate ContextShadow in all places where shadows are drawn
        https://bugs.webkit.org/show_bug.cgi?id=46475

        Turn on ContextShadow for the Cairo port and remove all old shadow code.
        Shadow tiling optimizations will be added in a followup patch to ContextShadowCairo.

        * platform/graphics/GraphicsContext.h: Add a ContextShadow forward declaration for Cairo.
        * platform/graphics/cairo/FontCairo.cpp: Switch to using ContextShadow.
        (WebCore::prepareContextForGlyphDrawing): Added this helper which sets up the translation
        on the specified cairo_t to prepare for drawing glyphs.
        (WebCore::drawGlyphsToContext): Added this helper which draws the glyphs to a cairo_t,
        while properly handling glyphs with synthetic bold.
        (WebCore::Font::drawGlyphs): Removed old shadow code and replaced it with ContextShadow usage.
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::drawPathShadow): Modified this to use ContextShadow and to take an enum
        argument specifying whether to fill or stroke the solid figure for the shadow.
        (WebCore::fillCurrentCairoPath): Updated drawPathShadow call.
        (WebCore::strokeCurrentCairoPath): Ditto.
        (WebCore::GraphicsContext::savePlatformState): Save the ContextShadow.
        (WebCore::GraphicsContext::restorePlatformState): Restore the ContextShadow.
        (WebCore::GraphicsContext::drawPath): Updated drawPathShadow call.
        (WebCore::GraphicsContext::fillRect): Uses ContextShadow now.
        (WebCore::GraphicsContext::setPlatformShadow): Uses ContextShadow now.
        (WebCore::GraphicsContext::contextShadow): Added.
        (WebCore::GraphicsContext::clearPlatformShadow): Clears the ContextShadow member.
        (WebCore::GraphicsContext::fillRoundedRect): Updated drawPathShadow call.
        * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
        (WebCore::GraphicsContextPlatformPrivate::hasShadow): Added.
        * platform/graphics/cairo/ImageCairo.cpp:
        (WebCore::BitmapImage::draw): Updated to use ContextShadow.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-10-13  Yong Li  <yoli@rim.com>

        Reviewed by Oliver Hunt.

        Fix potential misaligned memory access in CloneDeserializer::readLittleEndian and readString
        that can result crash on ARM (<v6).
        https://bugs.webkit.org/show_bug.cgi?id=47594

        No new test added, because the crash can be produced by existing tests like:
        LayoutTests/fast/events/message-channel-gc-4.html

        * bindings/js/SerializedScriptValue.cpp:
        (WebCore::CloneDeserializer::readLittleEndian):
        (WebCore::CloneDeserializer::readString):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore: Bug 43987 - Downloading using XHR is much slower than before
Change StringBuilder to use overcapacity in a StringImpl, rather than a Vector.
Fundamentally this should be the same (copies current contents to expand capacity,
rather than using a rope), but this approach allows the intermadiate state of the
String to be inspected in the buffer without copying to resolve.

Reviewed by Oliver Hunt.

* runtime/JSONObject.cpp:
(JSC::Stringifier::appendQuotedString):
(JSC::Stringifier::Holder::appendNextProperty):
    Renamed StringBuilder::size() -> length() (to match other String types).

* runtime/UStringBuilder.h:
(JSC::UStringBuilder::append):
(JSC::UStringBuilder::toUString):
    Update for changes in parent class, can just 'using' the append methods.

* wtf/text/StringBuilder.cpp: Added.
(WTF::StringBuilder::reifyString):
(WTF::StringBuilder::resize):
(WTF::StringBuilder::reserveCapacity):
(WTF::StringBuilder::allocateBuffer):
(WTF::StringBuilder::appendUninitialized):
(WTF::StringBuilder::append):
(WTF::StringBuilder::shrinkToFit):
* wtf/text/StringBuilder.h:
(WTF::StringBuilder::StringBuilder):
(WTF::StringBuilder::append):
(WTF::StringBuilder::toString):
(WTF::StringBuilder::toStringPreserveCapacity):
(WTF::StringBuilder::length):
(WTF::StringBuilder::isEmpty):
(WTF::StringBuilder::operator[]):
(WTF::StringBuilder::clear):
    Class updated to use overcapacity in a StringImpl, rather than a Vector.

* Android.mk:
* Android.v8.wtf.mk:
* GNUmakefile.am:
* JavaScriptCore.exp:
* JavaScriptCore.gypi:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCoreCommon.vsprops:
* JavaScriptCore.vcproj/WTF/WTF.vcproj:
* JavaScriptCore.vcproj/jsc/jsc.vcproj:
* JavaScriptCore.xcodeproj/project.pbxproj:
* wtf/CMakeLists.txt:
* wtf/wtf.pri:

WebCore: Bug 43987 - Downloading using XHR is much slower than before

Reviewed by Oliver Hunt.

* svg/SVGPathStringBuilder.cpp:
(WebCore::SVGPathStringBuilder::result):
    StringBuilder::size() -> StringBuilder::length().

WebKit/chromium: Bug 43987 - Downloading using XHR is much slower than before

Reviewed by Oliver Hunt.

* src/WebPageSerializerImpl.cpp:
(WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):



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