[iOS] REGRESSION(r171526): PDF documents fail to load in WebKit1 with disk image caching enabled
https://bugs.webkit.org/show_bug.cgi?id=135359
<rdar://problem/17824645>

Reviewed by Darin Adler.

r171526 broke the case where we have a memory mapped file from the DiskImageCache in the
SharedBuffer. In such a case, m_buffer is empty and createCFData() returned an
WebCoreSharedBufferData with an empty buffer.

Fix this by taking the easy route of bringing back the old code for the disk image cache
file backed case. In the long run we probably want to remove the iOS specific disk image
cache anyway.

Review also uncovered another bug in r171526 where we were balancing an Objective-C alloc
with a CFRelease which is incorrect when running under GC. Fix that by using adoptNS along
with adoptCF which is what the code did before.

No new tests because the bug only occurs on device and we can't run tests on device yet.

* platform/mac/SharedBufferMac.mm:
(-[WebCoreSharedBufferData initWithDiskImageSharedBuffer:]):
(-[WebCoreSharedBufferData length]):
(-[WebCoreSharedBufferData bytes]):
(WebCore::SharedBuffer::createCFData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
fast/borders/border-radius-on-subpixel-position-non-hidpi.html fails on Retina machines
https://bugs.webkit.org/show_bug.cgi?id=135398

Reviewed by Zalan Bujtas.


Tools: 
* WebKitTestRunner/TestController.cpp: (WTR::TestController::updateWindowScaleForTest):
"hidpi-" should be at the start. This allows "hidpi-" in both file and directory names.

* DumpRenderTree/mac/DumpRenderTree.mm: (changeWindowScaleIfNeeded): Same fix.
For some reason, I wasn't seeing this test fail on WK1 even without the fix, not
sure why.

LayoutTests: 
* platform/mac-wk2/TestExpectations: Let's try to unskip the test, maybe this was
the actual reason for it to appear failing?



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@171772 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WKPDFView paints rotated pages squished
https://bugs.webkit.org/show_bug.cgi?id=135401
<rdar://problem/17173916>

Reviewed by Simon Fraser.

* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _computePageAndDocumentFrames]):
[page size] returns the crop box's size, ignoring rotation.
[page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
UIPDFPageView will respect rotation when painting, so we
should make sure that it is given an aspect ratio that also
respects rotation, so that the page isn't squished.


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