Add more validation logic to CompressibleVector
https://bugs.webkit.org/show_bug.cgi?id=120227

Reviewed by Brent Fulgham.

Add a pile of assertions to try on catch whatever is going wrong
in the windows environment or other platforms.

* wtf/Compression.cpp:
(WTF::GenericCompressedData::create):
(WTF::GenericCompressedData::decompress):
* wtf/Compression.h:
(WTF::CompressedVector::decompress):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Let Document keep its RenderView during render tree attach.
<https://webkit.org/b/120224>

Reviewed by Antti Koivisto.

Remove prehistoric code that cleared Document's renderer pointer during tree attach.

* dom/Document.cpp:
(WebCore::Document::attach):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154517 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Incorrect TypedArray#set behavior
https://bugs.webkit.org/show_bug.cgi?id=83818

Source/JavaScriptCore: 

Reviewed by Oliver Hunt and Mark Hahnenberg.
        
This was so much fun! typedArray.set() is like a memmove on steroids, and I'm
not smart enough to figure out optimal versions for *all* of the cases. But I
did come up with optimal implementations for most of the cases, and I wrote
spec-literal code (i.e. copy via a transfer buffer) for the cases I'm not smart
enough to write optimal code for.

* runtime/JSArrayBufferView.h:
(JSC::JSArrayBufferView::hasArrayBuffer):
* runtime/JSArrayBufferViewInlines.h:
(JSC::JSArrayBufferView::buffer):
(JSC::JSArrayBufferView::existingBufferInButterfly):
(JSC::JSArrayBufferView::neuter):
(JSC::JSArrayBufferView::byteOffset):
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::::setWithSpecificType):
(JSC::::set):
(JSC::::existingBuffer):

LayoutTests: 

Reviewed by Oliver Hunt and Mark Hahnenberg.
        
Made it possible for shouldBe() to compare typed arrays to each other and to any array-like
object.
        
Added a bunch of tests for different kinds of overlapping typedArray.set()'s.
        
For sanity, also added the reduced test case from the bug. Interestingly, though, that test
case already passed on trunk - probably by luck (we had incidentally changed the default
copy direction from one that happened to not work to one that happened to be fine, but only
for this test).

* fast/js/jsc-test-list:
* fast/js/resources/js-test-pre.js:
(isTypedArray):
(isResultCorrect):
(stringify):
(shouldBe):
* fast/js/script-tests/typed-array-copy.js: Added.
* fast/js/script-tests/typedarray-set-destination-smaller-than-source.js: Added.
* fast/js/script-tests/typedarray-set-overlapping-elements-of-same-size.js: Added.
* fast/js/script-tests/typedarray-set-same-type-memmove.js: Added.
(arraysEqual):
* fast/js/script-tests/typedarray-set-source-smaller-than-destination.js: Added.
* fast/js/typed-array-copy-expected.txt: Added.
* fast/js/typed-array-copy.html: Added.
* fast/js/typedarray-set-destination-smaller-than-source-expected.txt: Added.
* fast/js/typedarray-set-destination-smaller-than-source.html: Added.
* fast/js/typedarray-set-overlapping-elements-of-same-size-expected.txt: Added.
* fast/js/typedarray-set-overlapping-elements-of-same-size.html: Added.
* fast/js/typedarray-set-same-type-memmove-expected.txt: Added.
* fast/js/typedarray-set-same-type-memmove.html: Added.
* fast/js/typedarray-set-source-smaller-than-destination-expected.txt: Added.
* fast/js/typedarray-set-source-smaller-than-destination.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154518 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap for assignment operators
https://bugs.webkit.org/show_bug.cgi?id=120223

Reviewed by Anders Carlsson.

* wtf/RefPtr.h: Switch to copy-and-swap in the assignment operators. The move ones already were done
that way.
* wtf/RetainPtr.h: Ditto, except for the move ones too.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154519 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction after r154513.

* WTF.vcxproj/build-generated-files.sh: Variable was missing '$' character.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Failure building with python3
https://bugs.webkit.org/show_bug.cgi?id=106645

Patch by Laszlo Papp <lpapp@kde.org> on 2013-08-23
Reviewed by Benjamin Poulain.

Use print functions instead of python statements to be compatible with python 3.X and 2.7 as well.
Archlinux has been using python3 and that is what causes issues while packaging QtWebKit along with Qt5.

* disassembler/udis86/itab.py:
(UdItabGenerator.genInsnTable):
* disassembler/udis86/ud_opcode.py:
(UdOpcodeTables.print_table):
* disassembler/udis86/ud_optable.py:
(UdOptableXmlParser.parseDef):
(UdOptableXmlParser.parse):
(printFn):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154521 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Fix js minification of updated CodeMirror
https://bugs.webkit.org/show_bug.cgi?id=120231

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-23
Reviewed by Andy Estes.

Workaround a jsmin issue with "return //.test();" lines when
minifying JavaScript in production builds.

* Scripts/copy-user-interface-resources.sh:
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154524 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use ElementTraversal some more
https://bugs.webkit.org/show_bug.cgi?id=120226

Reviewed by Darin Adler.

More traversal with tighter typing.

* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canvasHasFallbackContent):
(WebCore::siblingWithAriaRole):
* accessibility/AccessibilityTable.cpp:
(WebCore::AccessibilityTable::isDataTable):
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::getFontData):
* dom/ContainerNode.cpp:
(WebCore::willRemoveChild):
* dom/ContainerNodeAlgorithms.h:
(WebCore::ChildFrameDisconnector::ChildFrameDisconnector):
(WebCore::ChildFrameDisconnector::collectFrameOwners):
(WebCore::ChildFrameDisconnector::disconnect):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectMediaResource):
(WebCore::HTMLMediaElement::textTrackModeChanged):
(WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
* html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parametersForPlugin):
(WebCore::HTMLObjectElement::containsJavaApplet):
* html/HTMLParamElement.h:
(WebCore::isHTMLParamElement):
(WebCore::HTMLParamElement):
* html/HTMLSourceElement.h:
(WebCore::isHTMLSourceElement):
(WebCore::HTMLSourceElement):
* svg/SVGFontFaceElement.h:
(WebCore::isSVGFontFaceElement):
(WebCore::SVGFontFaceElement):
(WebCore::toSVGFontFaceElement):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154525 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Windows] Unreviewed build correction. Need to force environment variable
to be escaped when running nmake command.

* WebCore.vcxproj/WebCoreGenerated.make:



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