Enter the creationContext before creating DOM wrappers
https://bugs.webkit.org/show_bug.cgi?id=96044

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

Source/WebCore:

Now that we have the creationContext available when instantiating DOM
wrappers, we should use it! After this patch, we enter the creation
context so that the DOM wrapper is created in the right context (and
therefore has the right prototype chain).

This patch would have been tested by
fast/dom/prototype-inheritance.html, but that test was removed because
it was too much work to maintain. I'll post what the diff would have
been to the results for that test as an attachment to this bug.

Note: After this patch there are a number of cleanup patches to write,
but I'll do those separately.

* bindings/js/JSGeolocationCustom.cpp:
(WebCore::JSGeolocation::getCurrentPosition):
(WebCore::JSGeolocation::watchPosition):
  - This patch also includes a minor bug fix to the JSC implementations
    of Geolocation and Notifications. Previously, JSC was using the
    current lexical context for the callback object, which makes very
    little sense as it neither cooresponds to the Geolocation (or
    Notification) object or the functions being used for the callback.

    To be consistent with how we do callbacks elsewhere in WebKit, we
    should use the context that corresponds to the Geolocation (or
    Notification) object. This change happened automatically for V8
    when this patch fixed the Geolocation (and Notifications) wrapper
    to use the right context, but for JSC we need to change these lines
    of code explicitly.
* bindings/scripts/CodeGeneratorV8.pm:
(GenerateToV8Converters):

LayoutTests:

Update the Geolocation tests to show that we now use the correct
context for these callback. Specifically, we use the context that
cooresponds to the Geolocation object itself, not whatever random
context we happened to be in when we first touched the Geolocation
object.

* fast/dom/Geolocation/callback-to-deleted-context-expected.txt:
* fast/dom/Geolocation/disconnected-frame-expected.txt:
* fast/dom/Geolocation/disconnected-frame-permission-denied-expected.txt:
* fast/dom/Geolocation/resources/callback-to-deleted-context-inner1.html:
* fast/dom/Geolocation/script-tests/callback-to-deleted-context.js:
(onSecondIframeLoaded):
* fast/dom/Geolocation/script-tests/disconnected-frame-permission-denied.js:
(onIframeUnloaded.setTimeout):
* fast/dom/Geolocation/script-tests/disconnected-frame.js:
(onIframeUnloaded.setTimeout):
(onIframeUnloaded):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127923 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Add touchscreen specific fling curve parametrization
https://bugs.webkit.org/show_bug.cgi?id=95997

Reviewed by James Robinson.

Added a new set of fling curve parameters with a good feel for touchscreen
initiated flings. Renamed TouchpadFlingPlatformGestureCurve to
TouchFlingPlatformGestureCurve to better reflect that the class
can serve for both touchscreen and touchpad flings when appropriately
parametrized. Updated build files as necessary for the rename.

No new tests - existing tests apply.

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.gypi:
* platform/ScrollAnimatorNone.cpp:
(WebCore::ScrollAnimatorNone::fireUpAnAnimation):
* platform/TouchFlingPlatformGestureCurve.cpp: Renamed from Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.cpp.
(WebCore):
(WebCore::TouchFlingPlatformGestureCurve::createForTouchPad):
(WebCore::TouchFlingPlatformGestureCurve::createForTouchScreen):
Added with touchscreen parameters.
(WebCore::TouchFlingPlatformGestureCurve::create):
(WebCore::position):
(WebCore::velocity):
(WebCore::TouchFlingPlatformGestureCurve::TouchFlingPlatformGestureCurve):
(WebCore::TouchFlingPlatformGestureCurve::~TouchFlingPlatformGestureCurve):
(WebCore::TouchFlingPlatformGestureCurve::debugName):
(WebCore::TouchFlingPlatformGestureCurve::apply):
* platform/TouchFlingPlatformGestureCurve.h: Renamed from Source/WebCore/platform/TouchpadFlingPlatformGestureCurve.h.
(WebCore):
(TouchFlingPlatformGestureCurve):
* platform/chromium/support/PlatformGestureCurveFactory.cpp: invokes
createForTouchPad or createForTouchScreen as appropriate.
(WebKit::PlatformGestureCurveFactory::createCurve):

Source/WebKit/chromium:

* tests/PlatformGestureCurveTest.cpp: To use the renamed curve constructor.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Handle non-existant TestExpectations files gracefully
https://bugs.webkit.org/show_bug.cgi?id=96149

Reviewed by Eric Seidel.

Even when we get rid of Skipped files, we shouldn't have each port
require a TestExpectations file for each platform if it doesn't
need one.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.expectations_dict):
* Scripts/webkitpy/layout_tests/port/base_unittest.py:
(PortTest.test_nonexistant_expectations):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127925 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Mac build fix.
https://bugs.webkit.org/show_bug.cgi?id=93640

Reviewed by Abhishek Arya.

The original patch for this bug broke the mac builds.

* WebCore.exp.in: Adding const marker


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the remaining linter errors. These are all cases of paths
that don't actually exist or that are duplicated between TestExpectations
and Skipped files. I left in the Skipped file entries since those
were the ones that win out when duplicated.

* platform/efl/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt-4.8/TestExpectations:
* platform/qt/Skipped:
* platform/qt/TestExpectations:
* platform/win/Skipped:
* platform/win/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@127927 268f45cc-cd09-0410-ab3c-d52691b4dbfc
StringImpl::find(StringImpl*) doesn't handle cases where search and match strings are different bitness
https://bugs.webkit.org/show_bug.cgi?id=96125

Reviewed by Benjamin Poulain.

Changed findInner and reverseFindInner to be templated on both search and match character types.
Changed both find's and reverseFind to use all four bitness combinations of findInner and
reverseFindInner.

* wtf/text/StringImpl.cpp:
(WTF::findInner):
(WTF::StringImpl::find):
(WTF::reverseFindInner):
(WTF::StringImpl::reverseFind):


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