[BlackBerry] AccessibilityUIElement: add dummy implementations of scroll methods
https://bugs.webkit.org/show_bug.cgi?id=112597

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-21
Reviewed by Xan Lopez.

These were introduced for the Chromium port in r105295. We need
dummy implementations in order to compile the BlackBerry port.

* DumpRenderTree/blackberry/AccessibilityUIElementBlackBerry.cpp:
(AccessibilityUIElement::scrollToMakeVisible):
(AccessibilityUIElement::scrollToMakeVisibleWithSubFocus):
(AccessibilityUIElement::scrollToGlobalPoint):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146491 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Chromium] Unreviewed gardening.

New test results for effect-reference and effect-reference-hw.

* platform/chromium-linux-x86/css3/filters/effect-reference-expected.png: Removed.
* platform/chromium-linux-x86/css3/filters/effect-reference-expected.txt: Removed.
* platform/chromium-linux/css3/filters/effect-reference-expected.png: Removed.
* platform/chromium-linux/css3/filters/effect-reference-expected.txt: Removed.
* platform/chromium-mac-lion/css3/filters/effect-reference-expected.png: Removed.
* platform/chromium-mac-lion/css3/filters/effect-reference-expected.txt: Removed.
* platform/chromium-mac-snowleopard/css3/filters/effect-reference-expected.png: Removed.
* platform/chromium-mac-snowleopard/css3/filters/effect-reference-expected.txt: Removed.
* platform/chromium-mac/css3/filters/effect-reference-expected.png:
* platform/chromium-mac/css3/filters/effect-reference-expected.txt:
* platform/chromium-mac/css3/filters/effect-reference-hw-expected.png:
* platform/chromium-mac/css3/filters/effect-reference-hw-expected.txt:
* platform/chromium-win-xp/css3/filters/effect-reference-expected.png: Removed.
* platform/chromium-win-xp/css3/filters/effect-reference-expected.txt: Removed.
* platform/chromium-win/css3/filters/effect-reference-expected.png:
* platform/chromium-win/css3/filters/effect-reference-expected.txt:
* platform/chromium-win/css3/filters/effect-reference-hw-expected.png:
* platform/chromium-win/css3/filters/effect-reference-hw-expected.txt:
* platform/chromium/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Hide toolbar customization experimental setting
https://bugs.webkit.org/show_bug.cgi?id=112942

Patch by Alexei Filippov <alph@chromium.org> on 2013-03-21
Reviewed by Pavel Feldman.

* inspector/front-end/Settings.js:
(WebInspector.ExperimentsSettings):
* inspector/front-end/Toolbar.js:
(WebInspector.Toolbar):
(WebInspector.Toolbar.prototype._isToolbarCustomizable):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Objective-C API: wrapperClass holds a static JSClassRef, which causes JSGlobalObjects to leak
https://bugs.webkit.org/show_bug.cgi?id=112856

Reviewed by Geoffrey Garen.

Through a very convoluted path that involves the caching of prototypes on the JSClassRef, we can leak 
JSGlobalObjects when inserting an Objective-C object into multiple independent JSContexts.

* API/JSAPIWrapperObject.cpp: Removed.
* API/JSAPIWrapperObject.h:
(JSAPIWrapperObject):
* API/JSAPIWrapperObject.mm: Copied from Source/JavaScriptCore/API/JSAPIWrapperObject.cpp. Made this an
Objective-C++ file so that we can call release on the wrappedObject. Also added a WeakHandleOwner for 
JSAPIWrapperObjects. This will also be used in a future patch for https://bugs.webkit.org/show_bug.cgi?id=112608.
(JSAPIWrapperObjectHandleOwner):
(jsAPIWrapperObjectHandleOwner):
(JSAPIWrapperObjectHandleOwner::finalize): This finalize replaces the old finalize that was done through
the C API.
(JSC::JSAPIWrapperObject::finishCreation): Allocate the WeakImpl. Balanced in finalize.
(JSC::JSAPIWrapperObject::setWrappedObject): We now do the retain of the wrappedObject here rather than in random
places scattered around JSWrapperMap.mm
* API/JSObjectRef.cpp: Added some ifdefs for platforms that don't support the Obj-C API.
(JSObjectGetPrivate): Ditto.
(JSObjectSetPrivate): Ditto.
(JSObjectGetPrivateProperty): Ditto.
(JSObjectSetPrivateProperty): Ditto.
(JSObjectDeletePrivateProperty): Ditto.
* API/JSValueRef.cpp: Ditto.
(JSValueIsObjectOfClass): Ditto.
* API/JSWrapperMap.mm: Remove wrapperClass().
(objectWithCustomBrand): Change to no longer use a parent class, which was only used to give the ability to 
finalize wrapper objects.
(-[JSObjCClassInfo initWithContext:forClass:superClassInfo:]): Change to no longer use wrapperClass(). 
(-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]): Ditto.
(tryUnwrapObjcObject): We now check if the object inherits from JSAPIWrapperObject.
* API/tests/testapi.mm: Added a test that exports an Objective-C object to two different JSContexts and makes 
sure that the first one is collected properly by using a weak JSManagedValue for the wrapper in the first JSContext.
* CMakeLists.txt: Build file modifications.
* GNUmakefile.list.am: Ditto.
* JavaScriptCore.gypi: Ditto.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj: Ditto.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Ditto.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
* JavaScriptCore.xcodeproj/project.pbxproj: Ditto.
* runtime/JSGlobalObject.cpp: More ifdefs for unsupported platforms.
(JSC::JSGlobalObject::reset): Ditto.
(JSC::JSGlobalObject::visitChildren): Ditto.
* runtime/JSGlobalObject.h: Ditto.
(JSGlobalObject): Ditto.
(JSC::JSGlobalObject::objcCallbackFunctionStructure): Ditto.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146494 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SVG] Suppress painting when an empty viewBox is specified
https://bugs.webkit.org/show_bug.cgi?id=112623

Reviewed by Philip Rogers.

Source/WebCore:

Per spec, elements with an empty viewBox should not be rendered:
http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute.

This patch adds the missing viewBox checks to RenderSVGRoot, RenderSVGViewPortContainer,
RenderSVGResourceMarker and RenderSVGResourceMarker's paint methods.

In order to detect the case of "viewBox present but invalid", the patch also introduces
SVGAnimatedProperty plumbing for tracking property validity: the baseVal setter now takes
an additional optional 'validValue' boolean parameter, which can later be queried via a
macroed getter (LowerProperty##IsValid()).

Test: svg/custom/viewBox-empty.html

* rendering/svg/RenderSVGResourceMarker.cpp:
(WebCore::RenderSVGResourceMarker::draw):
* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::paintReplaced):
* rendering/svg/RenderSVGViewportContainer.cpp:
(WebCore::RenderSVGViewportContainer::paint):
(WebCore):
* rendering/svg/RenderSVGViewportContainer.h:
(RenderSVGViewportContainer):
* svg/SVGPatternElement.cpp:
(WebCore::SVGPatternElement::collectPatternAttributes):
* svg/SVGSVGElement.h:
(WebCore::SVGSVGElement::hasEmptyViewBox):
(SVGSVGElement):
Suppress painting if a valid empty viewBox is found.

* svg/SVGFitToViewBox.h:
(WebCore::SVGFitToViewBox::parseAttribute):
Mark the viewBox property as invalid if not successfully parsed.

* svg/SVGExternalResourcesRequired.h:
(SVGExternalResourcesRequired):
* svg/SVGURIReference.h:
(SVGURIReference):
* svg/properties/SVGAnimatedPropertyMacros.h:
(WebCore::SVGSynchronizableAnimatedProperty::SVGSynchronizableAnimatedProperty):
(SVGSynchronizableAnimatedProperty):
(WebCore):
Plumbing for tracking property value validation.

LayoutTests:

* svg/custom/script-tests/svg-viewBox-dynamic.js:
* svg/custom/svg-viewBox-dynamic-expected.txt:
* svg/custom/viewBox-empty-expected.html: Added.
* svg/custom/viewBox-empty.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
kill-old-processes spits out error messages on Mac
https://bugs.webkit.org/show_bug.cgi?id=112878

Reviewed by Jessie Berlin.

Use grep -E instead of grep -P since grep on Mac doesn't seem to support the latter even though it's
included in the list of options grep --help shows.

Also use double-slash in escaping ++ in clang++ since the slashes needs to escape + inside the shell.

* BuildSlaveSupport/kill-old-processes:
(main):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] DrawingBuffer: add clearPlatformLayer() implementation
https://bugs.webkit.org/show_bug.cgi?id=112696

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-21
Reviewed by Rob Buis.

DrawingBuffer::clearPlatformLayer() was added in r139142.

This is not needed in the BlackBerry port, so this patch only
contains a dummy implementation.

* platform/graphics/blackberry/DrawingBufferBlackBerry.cpp:
(WebCore):
(WebCore::DrawingBuffer::clearPlatformLayer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Move libLevelDB.la setup into a separate GNUmakefile.am
https://bugs.webkit.org/show_bug.cgi?id=112947

Reviewed by Martin Robinson.

.: 

* GNUmakefile.am: Include the new GNUmakefile.am, located under Source/ThirdParty/leveldb.

Source/ThirdParty: 

* leveldb/GNUmakefile.am: Added, sets up the libLevelDB.la library.

Source/WebCore: 

No new tests - no new functionality.

* GNUmakefile.am: Move the libLevelDD.la setup into the new GNUmakefile.am that's placed in
the third-party leveldb source directory.
* GNUmakefile.list.am: Move the LevelDB sources listing there as well.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] GraphicsLayer: fix code that was accidentally reverted
https://bugs.webkit.org/show_bug.cgi?id=112143

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-21
Reviewed by Rob Buis.

Several changes were accidentally reverted in r144465 due to the
upstreaming of some new code:

- clearBackgroundColor() and m_contentsLayerHasBackgroundColor had
  been removed in r137798.

- showDebugBorders() had been renamed to isShowingDebugBorder() in
  r133517.

- A new GraphicsLayer::create() overload had been introduced in
  r130185.

This patch fixes them all.

* platform/graphics/blackberry/GraphicsLayerBlackBerry.cpp:
(WebCore::GraphicsLayer::create):
(WebCore):
(WebCore::GraphicsLayerBlackBerry::GraphicsLayerBlackBerry):
(WebCore::GraphicsLayerBlackBerry::setBackgroundColor):
(WebCore::GraphicsLayerBlackBerry::updateLayerBackgroundColor):
(WebCore::GraphicsLayerBlackBerry::setupContentsLayer):
* platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
(GraphicsLayerBlackBerry):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Regression: drawer resizes slowly with animation.
https://bugs.webkit.org/show_bug.cgi?id=112920

Drawer status bar opacity wasn't set to zero on inialization, so no transition event
was fired on first time drawer appeared,thus animation styles wasn't removed properly.

Patch by Dmitry Zvorygin <zvorygin@chromium.org> on 2013-03-21
Reviewed by Vsevolod Vlasov.

* inspector/front-end/Drawer.js:
(WebInspector.Drawer):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Texmap] Implement support for OpenGLES EXT_unpack_subimage extension
https://bugs.webkit.org/show_bug.cgi?id=108716

If the extension GL_EXT_unpack_subimage is supported, it adds GL_UNPACK_ROW_LENGTH,
GL_UNPACK_SKIP_ROWS and GL_UNPACK_SKIP_PIXELS as valid enums to PixelStore.

Reviewed by Noam Rosenthal.

* platform/graphics/texmap/TextureMapperGL.cpp:
(WebCore::driverSupportsSubImage):
(WebCore::BitmapTextureGL::updateContentsNoSwizzle):
(WebCore::BitmapTextureGL::updateContents):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[BlackBerry] GCActivityCallback: replace JSLock with JSLockHolder
https://bugs.webkit.org/show_bug.cgi?id=112448

Patch by Alberto Garcia <agarcia@igalia.com> on 2013-03-21
Reviewed by Xan Lopez.

This changed in r121381.

* runtime/GCActivityCallbackBlackBerry.cpp:
(JSC::DefaultGCActivityCallback::doWork):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[SVG] Remove explicit LightSource dispatchers
https://bugs.webkit.org/show_bug.cgi?id=112827

Reviewed by Stephen Chenney.

Convert LightSource setters to dynamic dispatch. This allows us to remove LightSource.cpp
altogether.

No new tests: refactoring only.

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/filters/DistantLightSource.h:
(DistantLightSource):
* platform/graphics/filters/LightSource.cpp: Removed.
* platform/graphics/filters/LightSource.h:
(WebCore::LightSource::setAzimuth):
(WebCore::LightSource::setElevation):
(WebCore::LightSource::setX):
(WebCore::LightSource::setY):
(WebCore::LightSource::setZ):
(WebCore::LightSource::setPointsAtX):
(WebCore::LightSource::setPointsAtY):
(WebCore::LightSource::setPointsAtZ):
(WebCore::LightSource::setSpecularExponent):
(WebCore::LightSource::setLimitingConeAngle):
* platform/graphics/filters/PointLightSource.h:
(PointLightSource):
* platform/graphics/filters/SpotLightSource.h:
(SpotLightSource):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] generate-feature-defines-files is incompatible with Python3
https://bugs.webkit.org/show_bug.cgi?id=112956

Reviewed by Martin Robinson.

Make the generate-feature-defines-files compatible with Python3 by calling the items()
method on the dictionary objects when iterating through said dictionaries.

* gtk/generate-feature-defines-files:
(write_feature_defines_header):
(write_flattened_feature_defines_file):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix lexer charPosition computation when "rewind"ing the lexer.
https://bugs.webkit.org/show_bug.cgi?id=112952.

Reviewed by Michael Saboff.

Changed the Lexer to no longer keep a m_charPosition. Instead, we compute
currentCharPosition() from m_code and m_codeStartPlusOffset, where
m_codeStartPlusOffset is the SourceProvider m_codeStart + the SourceCode
start offset. This ensures that the charPosition is always in sync with
m_code.

* parser/Lexer.cpp:
(JSC::::setCode):
(JSC::::internalShift):
(JSC::::shift):
(JSC::::lex):
* parser/Lexer.h:
(JSC::Lexer::currentCharPosition):
(JSC::::lexExpectIdentifier):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146505 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows rebaseline after r146469.

* platform/win/css3/filters/effect-reference-expected.txt:
* platform/win/css3/filters/effect-reference-hw-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146506 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WinCairo] Correct assert in Empty BitmapImage Test.
https://bugs.webkit.org/show_bug.cgi?id=112934

Reviewed by Tim Horton.

* TestWebKitAPI/Tests/WebCore/win/BitmapImage.cpp:
(TestWebKitAPI::TEST): Use proper RefPtr and adoptRef
to avoid ref counting assertion when leaving test scope.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146507 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Move non-trivial virtual functions out of ResourceHandleClient.h
        https://bugs.webkit.org/show_bug.cgi?id=112950

        Reviewed by Brady Eidson.

        * CMakeLists.txt:
        * GNUmakefile.list.am:
        * Target.pri:
        * WebCore.exp.in:
        * WebCore.gypi:
        * WebCore.vcproj/WebCore.vcproj:
        * WebCore.vcxproj/WebCore.vcxproj:
        * WebCore.vcxproj/WebCore.vcxproj.filters:
        * WebCore.xcodeproj/project.pbxproj:
        * platform/network/ResourceHandleClient.cpp: Added.
        (WebCore::ResourceHandleClient::ResourceHandleClient):
        (WebCore::ResourceHandleClient::~ResourceHandleClient):
        (WebCore::ResourceHandleClient::didReceiveBuffer):
        (WebCore::ResourceHandleClient::getBuffer):
        * platform/network/ResourceHandleClient.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146508 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose the Type field of an RTCStatsReport
https://bugs.webkit.org/show_bug.cgi?id=112951

Patch by Harald Alvestrand <hta@google.com> on 2013-03-21
Reviewed by Adam Barth.

Source/WebCore:

Covered by an extension of an existing test.

* Modules/mediastream/RTCStatsReport.h:
(WebCore::RTCStatsReport::type):
* Modules/mediastream/RTCStatsReport.idl:

LayoutTests:

* fast/mediastream/RTCPeerConnection-stats-expected.txt:
* fast/mediastream/RTCPeerConnection-stats.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Correct bisector angle calculation for markers
https://bugs.webkit.org/show_bug.cgi?id=112054

Reviewed by Stephen Chenney.

Source/WebCore:

The SVG marker spec states that mid markers with orient=auto should be aligned with their
x-axis along the bisector of the incoming (in) and outgoing (out) angles. Previously we
calculated this bisector angle as:
    bisector = (in + out) / 2;
Angles cannot be averaged this way! Consider in=90deg and out=-180deg: the bisector should
be 135deg but a naive average gives -45deg. This patch corrects for the discontinuity in
angle values with:
    bisector = (in + out + 360) / 2   // if |in - out| > 180
    bisector = (in + out) / 2         // otherwise
This patch includes an exhaustive test of angle values.

Test: svg/custom/marker-orient-auto.html

* rendering/svg/SVGMarkerData.h:
(WebCore::SVGMarkerData::currentAngle):

LayoutTests:

* platform/chromium-linux/svg/custom/marker-orient-auto-expected.png: Added.
* platform/chromium-linux/svg/custom/marker-orient-auto-expected.txt: Added.
* platform/chromium/TestExpectations:
* svg/custom/marker-orient-auto.html: Added.


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