WKView -printOperationWithPrintInfo:forFrame: doesn’t use the print info that is 
passed in
https://bugs.webkit.org/show_bug.cgi?id=112212
-and corresponding-
<rdar://problem/12994883>

Reviewed by Anders Carlsson.

We should call [NSPrintOperation printOperationWithView: printInfo:] to use the 
printInfo parameter instead of [NSPrintOperation printOperationWithView:] which 
will just use the sharedPrintInfo.
* UIProcess/API/mac/WKView.mm:
(-[WKView printOperationWithPrintInfo:forFrame:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Array.prototype.sort should at least try to be PTIME even when the array is in some bizarre mode
https://bugs.webkit.org/show_bug.cgi?id=112187
<rdar://problem/13393550>

Source/JavaScriptCore: 

Reviewed by Michael Saboff and Gavin Barraclough.
        
If we have an array-like object in crazy mode passed into Array.prototype.sort, and its length is large,
then first copy all elements into a separate, compact, un-holy array and sort that. Then copy back.
This means that sorting will be at works O(n^2) in the actual number of things in the array, rather than
O(n^2) in the array's length.

* runtime/ArrayPrototype.cpp:
(JSC::attemptFastSort):
(JSC::performSlowSort):
(JSC):
(JSC::arrayProtoFuncSort):

LayoutTests: 

Reviewed by Michael Saboff and Gavin Barraclough.
        
If your Array.prototype.sort is not sufficiently smart, this test will never complete.
But if it is, it'll complete instantly.

* fast/js/array-sort-small-sparse-array-with-large-length-expected.txt: Added.
* fast/js/array-sort-small-sparse-array-with-large-length.html: Added.
* fast/js/jsc-test-list:
* fast/js/script-tests/array-sort-small-sparse-array-with-large-length.js: Added.



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