[GTK] accessibility/svg-remote-element.html is failing
https://bugs.webkit.org/show_bug.cgi?id=101185

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-30
Reviewed by Chris Fleizach.

Tools:

Implemented missing methods by mimicing existing functionality in
AccessibilityObject::clickPoint() using available ATK API.

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::clickPointX): Implemented.
(AccessibilityUIElement::clickPointY): Implemented.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::clickPointX): Implemented.
(WTR::AccessibilityUIElement::clickPointY): Implemented.

LayoutTests:

Provided new test expectations since resulting discrepancies are believed to be
platform related.

* platform/gtk-wk2/TestExpectations: The test is no longer failing.
* platform/gtk/accessibility/svg-remote-element-expected.txt: Added.
* platform/gtk/TestExpectations: The test is no longer failing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158267 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make SimpleLineLayout::Layout a class
https://bugs.webkit.org/show_bug.cgi?id=123508

Reviewed by Mario Sanchez Prada.

Improve encapsulation.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove unused runtime enabled
https://bugs.webkit.org/show_bug.cgi?id=123509

Reviewed by Anders Carlsson.

Some of the runtime enabled features were only ever used by the V8 bindings
and can be removed as no WebKit code sets or reads them.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158269 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE] Make MediaSourcePrivate, SourceBufferPrivate classes RefCounted.
https://bugs.webkit.org/show_bug.cgi?id=123350

Reviewed by Darin Adler.

Make the MediaSourcePrivate and SourceBufferPrivate classes RefCounted so that
they can be referenced both by MediaSource/SourceBuffer, and by the MediaPlayerPrivate
which creates them.

Change OwnPtr -> RefPtr everywhere:
* Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::addSourceBuffer):
* Modules/mediasource/MediaSourceBase.cpp:
(WebCore::MediaSourceBase::setPrivateAndOpen):
(WebCore::MediaSourceBase::createSourceBufferPrivate):
* Modules/mediasource/MediaSourceBase.h:
* Modules/mediasource/SourceBuffer.cpp:
(WebCore::SourceBuffer::create):
(WebCore::SourceBuffer::SourceBuffer):
* Modules/mediasource/SourceBuffer.h:
* Modules/mediasource/WebKitMediaSource.cpp:
(WebCore::WebKitMediaSource::addSourceBuffer):
* Modules/mediasource/WebKitSourceBuffer.cpp:
(WebCore::WebKitSourceBuffer::create):
(WebCore::WebKitSourceBuffer::WebKitSourceBuffer):
* Modules/mediasource/WebKitSourceBuffer.h:
* html/HTMLMediaSource.h:
* platform/graphics/MediaSourcePrivate.h:
* platform/graphics/SourceBufferPrivate.h:
(WebCore::SourceBufferPrivate::SourceBufferPrivate):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158270 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] accessibility/svg-remote-element.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112013

Unreviewed EFL gardening. Passes after r158267.

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-30

* platform/efl-wk1/TestExpectations: The test is no longer failing.
* platform/efl-wk2/TestExpectations: The test is no longer failing.
* platform/efl/accessibility/svg-remote-element-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Disabled JIT on Win64.
https://bugs.webkit.org/show_bug.cgi?id=122472

Reviewed by Geoffrey Garen.

Source/JavaScriptCore: 

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj:
Disabled building JITStubsMSVC64.

Source/WebKit: 

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Added missing 64-bit linker symbol.

Source/WTF: 

* wtf/Platform.h:
Disabled JIT on Win64.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158272 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] accessibility/textarea-selected-text-range.html is failing
https://bugs.webkit.org/show_bug.cgi?id=112016

Patch by Robert Plociennik <r.plociennik@samsung.com> on 2013-10-30
Reviewed by Mario Sanchez Prada.

Tools:

Provided implementation for AccessibilityUIElement::selectedTextRange() and
AccessibilityUIElement::setSelectedTextRange().

* DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:
(AccessibilityUIElement::selectedTextRange): Implemented.
(AccessibilityUIElement::setSelectedTextRange): Implemented
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::selectedTextRange): Implemented.
(WTR::AccessibilityUIElement::setSelectedTextRange): Implemented.

LayoutTests:

Removed failure expectations.

* platform/efl-wk1/TestExpectations: The test is no longer failing.
* platform/efl-wk2/TestExpectations: The test is no longer failing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158273 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add stubbed out WKRemoteObjectRegistry class
https://bugs.webkit.org/show_bug.cgi?id=123512

Reviewed by Andreas Kling.

Also add a WKRemoteObjectInterface class that represents a remote object interface.

* Shared/API/Cocoa/WKRemoteObjectInterface.h: Added.
* Shared/API/Cocoa/WKRemoteObjectInterface.mm: Added.
(-[WKRemoteObjectInterface initWithProtocol:identifier:]):
(+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
* Shared/API/Cocoa/WKRemoteObjectRegistry.h: Added.
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Added.
(-[WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158274 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unguard Element::childShouldCreateRenderer
https://bugs.webkit.org/show_bug.cgi?id=123496

Reviewed by Andreas Kling.

Make Element::childShouldCreateRenderer normally accessible. Guarding it with flags
just leaves potential build issues.

No new tests since no functionality changed.

* dom/Element.cpp:
(WebCore::Element::childShouldCreateRenderer):
* dom/Element.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl][Win] Suggested filename of download is not url decoded.
https://bugs.webkit.org/show_bug.cgi?id=123511

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

* WebDownloadCurl.cpp:
(WebDownload::didReceiveResponse): Url decode suggested filename.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Curl] Cookies are sometimes not set in download request.
https://bugs.webkit.org/show_bug.cgi?id=123445

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

Sometimes cookies are not set in the download request because the cookie file cannot be opened,
it's already been opened by the ResourceHandleManager for writing.
This can be fixed by getting the cookie list from the share handle in ResourceHandleManager instead.
This will also improve performance, as there is no need to read and parse the cookie file for each download.

* platform/network/curl/CurlDownload.cpp:
(WebCore::CurlDownload::init): Use share handle to get cookie list.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WIN] Add missing USE(CFNETWORK) to WebError.h
https://bugs.webkit.org/show_bug.cgi?id=121834

Reviewed by Brent Fulgham.

WebError.cpp uses USE(CFNETWORK), so add it to the header too.

* WebError.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158278 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add debug settings for simple line layout
https://bugs.webkit.org/show_bug.cgi?id=123514

Source/WebCore: 

Reviewed by Andreas Kling.

* WebCore.exp.in:
* page/Settings.in:
        
    Add simpleLineLayoutEnabled and simpleLineLayoutDebugBordersEnabled.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseFor):
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::paintDebugBorders):
(WebCore::SimpleLineLayout::paintFlow):

Source/WebKit2: 

Reviewed by Andreas Kling.
        
Expose debug settings.

* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSimpleLineLayoutEnabled):
(WKPreferencesGetSimpleLineLayoutEnabled):
(WKPreferencesSetSimpleLineLayoutDebugBordersEnabled):
(WKPreferencesGetSimpleLineLayoutDebugBordersEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix memory leaks in platform/image-encoders/JPEGImageEncoder.cpp
https://bugs.webkit.org/show_bug.cgi?id=118781

Patch by Liangjun Zeng <lizeng@blackberry.com> on 2013-10-30
Reviewed by Brent Fulgham.

We can find the function "jpeg_finish_compress" call the function "jpeg_abort" at the end.
And the comments of "jpeg_abort" is "Abort processing of a JPEG compression operation,
but don't destroy the object itself". (We can find these in the "jcapimin.c" of jpeg)
So the compression object destroy need be called.
No new tests because this doesn't change functionality.

* platform/image-encoders/JPEGImageEncoder.cpp:
(WebCore::compressRGBABigEndianToJPEG):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158280 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add result caching for Math.cos
https://bugs.webkit.org/show_bug.cgi?id=123255

Patch by Iago Toral Quiroga <itoral@igalia.com> on 2013-10-30
Reviewed by Brent Fulgham.

* runtime/MathObject.cpp:
(JSC::mathProtoFuncCos):
* runtime/VM.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158281 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Compile errors when enabling DFG JIT.
https://bugs.webkit.org/show_bug.cgi?id=120998

Patch by peavo@outlook.com <peavo@outlook.com> on 2013-10-30
Reviewed by Brent Fulgham.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Added files.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Ditto.
* dfg/DFGAllocator.h: Removed scope.
* dfg/DFGWorklist.cpp: Use new ThreadingOnce class instead of pthread_once.
(JSC::DFG::globalWorklist):
* heap/DeferGC.h: Link fix, member needs to be public.
* jit/JITOperationWrappers.h: Added required assembler macros.

Source/WTF:

* wtf/CompilationThread.cpp: Use new ThreadingOnce class instead of pthread_once.
(WTF::initializeCompilationThreads):
* wtf/ThreadingOnce.h: Added ThreadingOnce class encapsulating pthread_once functionality.
(WTF::ThreadingOnce::ThreadingOnce):
(WTF::ThreadingOnce::~ThreadingOnce):
(WTF::ThreadingOnce::callOnce):
* wtf/text/CString.h: Export needed symbols.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Teach the style checker how to handle Objective-C categories and NS_ENUM
https://bugs.webkit.org/show_bug.cgi?id=123482

Reviewed by Dan Bernstein.

* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing_for_function_call): Allow a space before '(' in a line
starting with @interface or @implementation, since this is defining an
Objective-C category rather than a function.
(check_braces): The opening brace of an NS_ENUM should not be on its
own line.
* Scripts/webkitpy/style/checkers/cpp_unittest.py: Added unit tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
A WebGL test times out sometimes.

* platform/mac/TestExpectations:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158284 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unbreak the release build.

* rendering/SimpleLineLayoutFunctions.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158285 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSExport doesn't support constructors
https://bugs.webkit.org/show_bug.cgi?id=123380

Reviewed by Geoffrey Garen.

Support for constructor-style callbacks for the Objective-C API to JSC is currently limited to 
Objective-C blocks. Any clients who try to call the constructor of a JSExport-ed Objective-C class 
are met with a type error stating that it cannot be called as a constructor.

It would be nice to expand JSExport's functionality to support this idiom. It is a natural 
extension to JSExport and would increase the expressiveness and simplicity in both Objective-C and 
JavaScript client code.

The way we'll do this is to expand the capabilities of ObjCCallbackFunction and associated classes. 
Instead of constructing a normal C API object for the constructor, we'll instead allocate a full-blown 
ObjCCallbackFunction object which can already properly handle being invoked as a constructor.

* API/JSWrapperMap.mm:
(copyMethodsToObject):
(allocateConstructorForCustomClass):
(-[JSObjCClassInfo allocateConstructorAndPrototypeWithSuperClassInfo:]):
(tryUnwrapObjcObject):
* API/ObjCCallbackFunction.h:
(JSC::ObjCCallbackFunction::impl):
* API/ObjCCallbackFunction.mm:
(JSC::ObjCCallbackFunctionImpl::ObjCCallbackFunctionImpl):
(JSC::ObjCCallbackFunctionImpl::wrappedConstructor):
(JSC::ObjCCallbackFunctionImpl::isConstructible):
(JSC::ObjCCallbackFunction::getConstructData):
(JSC::ObjCCallbackFunctionImpl::name):
(JSC::ObjCCallbackFunctionImpl::call):
(objCCallbackFunctionForInvocation):
(objCCallbackFunctionForInit):
(tryUnwrapConstructor):
* API/tests/testapi.mm:
(-[TextXYZ initWithString:]):
(-[ClassA initWithA:]):
(-[ClassB initWithA:b:]):
(-[ClassC initWithA:]):
(-[ClassC initWithA:b:]):


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