[CMake] Ninja generator builds fail with "Argument list too long"
https://bugs.webkit.org/show_bug.cgi?id=129771

Reviewed by Daniel Bates.

* Source/cmake/OptionsCommon.cmake: Work around a bug in the Ninja CMake generator,
by forcing the use of response files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165173 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][CMake] Tarball is created with wrong tarball paths
https://bugs.webkit.org/show_bug.cgi?id=129496

Reviewed by Daniel Bates.

* gtk/make-dist.py:
(Manifest.__init__): I inadvertently inverted the logic of these checks when
landing the original patch with some suggestions from the reviewer. With the
checks corrected, the tarball path is constructed properly.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GStreamer] human readable language code for tracks
https://bugs.webkit.org/show_bug.cgi?id=124514

Reviewed by Philippe Normand.

* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged): Run language codes though gst_tag_get_language_code_iso_639_1() to make sure they're valid.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165175 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r165175.
http://trac.webkit.org/changeset/165175
https://bugs.webkit.org/show_bug.cgi?id=129788

Linking failures on GTK, EFL due to missing gstreamer-tag-1.0
dependency (Requested by zdobersek on #webkit).

* platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
(WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165176 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move to using std::unique_ptr for KeyboardEvent, ScriptExecutionContext::PendingException
https://bugs.webkit.org/show_bug.cgi?id=129061

Reviewed by Eric Carlson.

Replace uses of OwnPtr and PassOwnPtr for KeyboardEvent and ScriptExecutionContext::PendingException
classes with std::unique_ptr. ScriptExecutionContext::Task objects are still handled through OwnPtr,
but this will be addressed later.

* dom/KeyboardEvent.cpp:
(WebCore::KeyboardEvent::KeyboardEvent):
* dom/KeyboardEvent.h:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::reportException):
* dom/ScriptExecutionContext.h:
* dom/ScriptRunner.h: Remove an unnecessary PassOwnPtr header inclusion.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165177 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Source/WebCore/editing/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129665

Reviewed by Anders Carlsson.

Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/editing/ with std::unique_ptr.

* editing/EditingStyle.cpp:
(WebCore::htmlElementEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfElement):
(WebCore::htmlAttributeEquivalents):
(WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
(WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
(WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
(WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
* editing/Editor.cpp:
(WebCore::Editor::Editor):
(WebCore::Editor::clear):
* editing/Editor.h:
* page/Frame.cpp:
(WebCore::Frame::Frame):
* page/Frame.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165178 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Move Source/WebCore/html/canvas/ code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129668

Reviewed by Anders Carlsson.

Replace uses of OwnPtr and PassOwnPtr in code under Source/WebCore/html/canvas/ to std::unique_ptr.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::~HTMLCanvasElement):
(WebCore::HTMLCanvasElement::getContext):
* html/HTMLCanvasElement.h:
* html/canvas/ANGLEInstancedArrays.cpp:
* html/canvas/ANGLEInstancedArrays.h:
* html/canvas/CanvasRenderingContext2D.h:
* html/canvas/EXTTextureFilterAnisotropic.cpp:
* html/canvas/EXTTextureFilterAnisotropic.h:
* html/canvas/OESElementIndexUint.cpp:
* html/canvas/OESElementIndexUint.h:
* html/canvas/OESStandardDerivatives.cpp:
* html/canvas/OESStandardDerivatives.h:
* html/canvas/OESTextureFloat.cpp:
* html/canvas/OESTextureFloat.h:
* html/canvas/OESTextureFloatLinear.cpp:
* html/canvas/OESTextureFloatLinear.h:
* html/canvas/OESTextureHalfFloat.cpp:
* html/canvas/OESTextureHalfFloat.h:
* html/canvas/OESTextureHalfFloatLinear.cpp:
* html/canvas/OESTextureHalfFloatLinear.h:
* html/canvas/OESVertexArrayObject.cpp:
* html/canvas/OESVertexArrayObject.h:
* html/canvas/WebGLCompressedTextureATC.cpp:
* html/canvas/WebGLCompressedTextureATC.h:
* html/canvas/WebGLCompressedTexturePVRTC.cpp:
* html/canvas/WebGLCompressedTexturePVRTC.h:
* html/canvas/WebGLCompressedTextureS3TC.cpp:
* html/canvas/WebGLCompressedTextureS3TC.h:
* html/canvas/WebGLDebugRendererInfo.cpp:
* html/canvas/WebGLDebugRendererInfo.h:
* html/canvas/WebGLDebugShaders.cpp:
* html/canvas/WebGLDebugShaders.h:
* html/canvas/WebGLDepthTexture.cpp:
* html/canvas/WebGLDepthTexture.h:
* html/canvas/WebGLDrawBuffers.cpp:
* html/canvas/WebGLDrawBuffers.h:
* html/canvas/WebGLLoseContext.cpp:
* html/canvas/WebGLLoseContext.h:
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::create):
(WebCore::WebGLRenderingContext::getExtension):
* html/canvas/WebGLRenderingContext.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165179 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use the LLVM disassembler on ARM64 if we are enabling the FTL
https://bugs.webkit.org/show_bug.cgi?id=129785

Source/JavaScriptCore:

Reviewed by Geoffrey Garen.

Our disassembler can't handle some of the code sequences that LLVM emits. LLVM's disassembler
is strictly more capable at this point. Use it if it's available.

* disassembler/ARM64Disassembler.cpp:
(JSC::tryToDisassemble):

Source/WTF:

Reviewed by Geoffrey Garen.

* wtf/Platform.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165180 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] MiniBrowser crashes when opening several urls passed as command line options
https://bugs.webkit.org/show_bug.cgi?id=129738

Reviewed by Sergio Villar Senin.

The problem is that we are calling g_object_unref() for the
WebKitWebSettings everytime we set it to a WebKitWebView, but the
view only increases the reference counter when the settings is not
the same it currently has. We should release our reference once.

* MiniBrowser/gtk/main.c:
(createBrowserWindow):
(main):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Close the page when the view is disposed instead of when finalized
https://bugs.webkit.org/show_bug.cgi?id=129783

Reviewed by Sergio Villar Senin.

Source/WebKit2:

When a GtkWidget is destroyed, the GObject is disposed, but not
finalized if it has additional references. When the destroyed
widget is leaked by the application, we leak the page proxy and
what is more important the web process in multi-process mode.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDispose): Close the WebPageProxy.

Tools:

Add test case but disabled for now because it's affetected by bug #129684.

* TestWebKitAPI/Tests/WebKit2Gtk/TestMultiprocess.cpp:
(testProcessPerWebView):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (r158254): Rubber-banding at Bing image search causes the toolbar to move up and away
https://bugs.webkit.org/show_bug.cgi?id=128873

Patch by Gurpreet Kaur <k.gurpreet@samsung.com> on 2014-03-06
Reviewed by Antonio Gomes.

Source/WebCore:

This regression is caused by  http://trac.webkit.org/changeset/154614
and http://trac.webkit.org/changeset/156605. So reverting the changes
to make it Web compatible as earlier.

* dom/Element.cpp:
(WebCore::Element::scrollLeft):
(WebCore::Element::scrollTop):
(WebCore::Element::setScrollLeft):
(WebCore::Element::setScrollTop):
Reverting changes as it caused regression.

LayoutTests:

* fast/css/zoom-body-scroll-expected.txt:
* fast/css/zoom-body-scroll.html:
* fast/dom/Element/documentElement-scrollLeft-expected.txt:
* fast/dom/Element/documentElement-scrollLeft.html:
* fast/dom/Element/documentElement-scrollTop-expected.txt:
* fast/dom/Element/documentElement-scrollTop.html:
* fast/dom/Element/scrollLeft-expected.txt:
* fast/dom/Element/scrollLeft.html:
* fast/dom/Element/scrollTop-expected.txt:
* fast/dom/Element/scrollTop.html:
* fast/events/mouse-cursor.html:
* fast/multicol/scrolling-overflow.html:
* http/tests/navigation/anchor-frames-expected.txt:
* http/tests/navigation/anchor-frames-gbk-expected.txt:
* http/tests/navigation/resources/frame-with-anchor-gbk.html:
* http/tests/navigation/resources/frame-with-anchor-same-origin.html:
* http/tests/navigation/resources/frame-with-anchor.html:
* platform/mac-wk2/tiled-drawing/resources/scroll-and-load-page.html:
* platform/mac-wk2/tiled-drawing/tiled-drawing-scroll-position-page-cache-restoration.html:
Reverting changes as it caused regression.

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

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165188 268f45cc-cd09-0410-ab3c-d52691b4dbfc
make-3.82 fails to build on ARM/Linux
https://bugs.webkit.org/show_bug.cgi?id=107926

Reviewed by Martin Robinson.

Some ARM/Linux systems don't support PAGE_SIZE macro so that it causes a build failure.
The related bug reporting is here. https://lists.debian.org/debian-kernel/2014/02/msg00274.html
To avoid this, I propose to use sysconf(_SC_PAGESIZE) instead of PAGE_SIZE
where it is not defined. See more details, http://linux.die.net/man/2/getpagesize

* gtk/patches/make-3.82-arg-list-length.patch:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165189 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel rendering: Setting content to opaque on m_graphicsLayer depends on subpixel accumulation.
https://bugs.webkit.org/show_bug.cgi?id=129776

Reviewed by Simon Fraser.

isEmpty() returns true when any of the dimensions is <= 0. Subpixel accumulation could happen
in one direction only. Use isZero() instead().

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):


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

* disassembler/ARM64Disassembler.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][CMake] Fix the GTK+ CMake build
https://bugs.webkit.org/show_bug.cgi?id=129801

Patch by Lorenzo Tilve <ltilve@igalia.com> on 2014-03-06
Reviewed by Martin Robinson.

Include missing files for CMake build

* CMakeLists.txt: Add a missing references to DOMURLMediaStream

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK][Autotools] Default to libc++ when compiling with Clang
https://bugs.webkit.org/show_bug.cgi?id=129798

Reviewed by Anders Carlsson.

* Source/autotools/SetupCompilerFlags.m4: Default to using libc++ when compiling with the Clang
compiler. This is still overridable if -stdlib=* flag was set through CXXFLAGS, in case people
would for some reason still prefer libstdc++ (i.e. on setups where a functional libc++ is not yet available).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165193 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement VideoTrackList.selectedIndex
https://bugs.webkit.org/show_bug.cgi?id=129770

Reviewed by Eric Carlson.

Source/WebCore:

Tests: media/track/video/video-track-mkv-theora-selected.html

* html/track/VideoTrackList.idl:

LayoutTests:

* media/track/video/video-track-mkv-theora-selected-expected.txt:
* media/track/video/video-track-mkv-theora-selected.html:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165194 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Mac] Leak: dispatch_semaphore leak allocated in MediaPlayerPrivateAVFoundationObjC::waitForVideoOutputMediaDataWillChange
https://bugs.webkit.org/show_bug.cgi?id=129792

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-03-06
Reviewed by Anders Carlsson.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@165195 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Clarify how we deal with "special" registers
https://bugs.webkit.org/show_bug.cgi?id=129806

Reviewed by Michael Saboff.
        
Previously we had two different places that defined what "stack" registers are, a thing
called "specialRegisters" that had unclear meaning, and a really weird "firstRealRegister"/
"secondRealRegister"/"nextRegister" idiom in MacroAssembler that appeared to only be used by
one place and had a baked-in notion of what it meant for a register to be "real" or not.
        
It's not cool to use words like "real" and "special" to describe registers, especially if you
fail to qualify what that means. This originally made sense on X86 - "real" registers were
the ones that weren't "stack related" (so "real" was the opposite of "stack"). But on ARM64,
you also have to worry about the LR register, which we'd want to say is "not real" but it's
also not a "stack" register. This got super confusing.
        
So, this patch removes any mention of "real" registers, consolidates the knowledge of what is
a "stack" register, and uses the word special only in places where it's clearly defined and
where no better word comes to mind.
        
This cleans up the code and fixes what seems like it was probably a harmless ARM64 bug: the
Reg and RegisterSet data structures would sometimes think that FP was Q0. Somehow this
magically didn't break anything because you never need to save/restore either FP or Q0, but
it was still super weird.

* assembler/ARM64Assembler.h:
(JSC::ARM64Assembler::lastRegister):
* assembler/MacroAssembler.h:
(JSC::MacroAssembler::nextRegister):
* ftl/FTLLocation.cpp:
(JSC::FTL::Location::restoreInto):
* ftl/FTLSaveRestore.cpp:
(JSC::FTL::saveAllRegisters):
(JSC::FTL::restoreAllRegisters):
* ftl/FTLSlowPathCall.cpp:
* jit/RegisterSet.cpp:
(JSC::RegisterSet::reservedHardwareRegisters):
(JSC::RegisterSet::runtimeRegisters):
(JSC::RegisterSet::specialRegisters):
(JSC::RegisterSet::calleeSaveRegisters):
* jit/RegisterSet.h:



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