CSS 2.1 failure: content-counter-010.htm fails
https://bugs.webkit.org/show_bug.cgi?id=81447

Reviewed by Alexey Proskuryakov.

Source/WebCore:

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

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

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

LayoutTests:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128078 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Tests] Move fast/notifications/notifications-double-show.html to http/tests/notifications
https://bugs.webkit.org/show_bug.cgi?id=95537
<rdar://problem/12213860>

Reviewed by Alexey Proskuryakov.

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128079 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The options dictionary in Notification constructor should not accept event listeners
https://bugs.webkit.org/show_bug.cgi?id=95538
<rdar://problem/12213901>

Reviewed by Alexey Proskuryakov.

Source/WebCore:

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

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

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

LayoutTests:

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<audio> and <video> should send Do Not Track when appropriate
https://bugs.webkit.org/show_bug.cgi?id=96134

Reviewed by Eric Carlson.

Source/WebCore:

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

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

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

Source/WebKit/mac:

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

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

Source/WebKit2:

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

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

Tools:

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

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

LayoutTests:

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

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] Fix deadlock between WebMediaPlayerClientImpl dtor and PutCurrentFrame
https://bugs.webkit.org/show_bug.cgi?id=96010

Reviewed by James Robinson.

Source/Platform:

Add some additional clarifying comments.

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

Source/WebKit/chromium:

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

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

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[CSS Exlusions] add support for the basic shapes
https://bugs.webkit.org/show_bug.cgi?id=95490

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

Initial commit of a subset of the ExclusionShape classes.

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

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

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

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

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

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

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

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

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

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

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

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128083 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Combine MarkStack and SlotVisitor into single class
https://bugs.webkit.org/show_bug.cgi?id=96043

Reviewed by Geoff Garen.

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128084 268f45cc-cd09-0410-ab3c-d52691b4dbfc
webkit build for 64-bit Mac chromium
https://bugs.webkit.org/show_bug.cgi?id=95977

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

Source/WebCore:

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

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

Source/WebKit/chromium:

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128085 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKTR often reports an unresponsive WebProcess on Mac bots
https://bugs.webkit.org/show_bug.cgi?id=95906

Reviewed by Dan Bernstein.

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128086 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Define new setSharedWorkerRepository function in preparation for removing WebKitPlatformSupport::sharedWorkerRepository()
https://bugs.webkit.org/show_bug.cgi?id=95861

Reviewed by Adam Barth.

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128087 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Javascript in foreground tabs should not wait synchronously for plug-ins to load
<rdar://problem/12067415> and https://bugs.webkit.org/show_bug.cgi?id=96167

Reviewed by Geoff Garen.

Source/WebKit2:

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

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

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

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

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

Tools:

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

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

LayoutTests:

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128088 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: highlight of paint rectangles is broken
https://bugs.webkit.org/show_bug.cgi?id=96276

Reviewed by Vsevolod Vlasov.

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128089 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] gradient-with-scaled-ancestor.html rebaseline
https://bugs.webkit.org/show_bug.cgi?id=96110

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

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[JSC] Use StringBuilder::appendNumber() instead of String::number()
https://bugs.webkit.org/show_bug.cgi?id=96236

Reviewed by Benjamin Poulain.

* API/JSContextRef.cpp:
(JSContextCreateBacktrace):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[chromium] gradient-with-scaled-ancestor.html rebaseline
https://bugs.webkit.org/show_bug.cgi?id=96110

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

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128092 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/chromium: [chromium] Add unused GestureTapCancel
https://bugs.webkit.org/show_bug.cgi?id=96183

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

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

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

Tools: Add handling of new GestureTapCancel in DRT

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

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

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] Constructors try to handle errors that cannot occur
https://bugs.webkit.org/show_bug.cgi?id=96304

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

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[V8] V8HTMLDocument::write and friends should not indirect through Frame
https://bugs.webkit.org/show_bug.cgi?id=96289

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

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Refactored op_tear_off* to support activations that don't allocate space for 'arguments'
https://bugs.webkit.org/show_bug.cgi?id=96231

Reviewed by Gavin Barraclough.

This is a step toward smaller activations.

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

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

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

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

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

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

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

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

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

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


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@128096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed fix of webkit-lint for Chromium gardening

* platform/chromium/TestExpectations:

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