[GTK] Add HighDPI support for non-accelerated compositing contents
https://bugs.webkit.org/show_bug.cgi?id=131562

Patch by Owen Taylor <otaylor@redhat.com> on 2014-05-29
Reviewed by Anders Carlsson.

Source/WebCore:
No new tests. This will be tested once we have the proper dependencies in the WebKit testing
JHBuild.

* platform/cairo/WidgetBackingStore.h:
(WebCore::WidgetBackingStore::WidgetBackingStore): Accept a device scale argument.
* platform/cairo/WidgetBackingStoreCairo.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
* platform/cairo/WidgetBackingStoreCairo.h: Accept a device scale argument.
* platform/graphics/cairo/CairoUtilities.cpp: Add a new helper to set the device scale if Cairo built against is new enough.
* platform/graphics/cairo/CairoUtilities.h:
* platform/gtk/GtkVersioning.h: Add the HAVE_GTK_SCALE_FACTOR macro.
* platform/gtk/WidgetBackingStoreGtkX11.cpp: Use the device scale argument to make the surface the proper size and set the surface device scale.
* platform/gtk/WidgetBackingStoreGtkX11.h: Accept a device scale argument.

Source/WebKit2:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(deviceScaleFactorChanged): Added this callback to pass scale changes to the page proxy.
(webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
* UIProcess/WebPageProxy.cpp:
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::WebPageProxy::setCustomDeviceScaleFactor): Do not set a
custom device scale factor for cairo when it's not supported.
(WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
(WebKit::BackingStore::incorporateUpdate): Ditto.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169445 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[GTK] Add support for HiDPI icons
https://bugs.webkit.org/show_bug.cgi?id=133377

Reviewed by Martin Robinson.

Source/WebCore:
Use the GTK+ missing icon at 16 or 32 size depending on the device
scale factor.

* platform/graphics/gtk/ImageGtk.cpp:
(WebCore::loadMissingImageIconFromTheme):
(WebCore::Image::loadPlatformResource):

Source/WebKit2:
* PlatformGTK.cmake: Compile also the @2x versions for the builtin icons.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169446 268f45cc-cd09-0410-ab3c-d52691b4dbfc
DFG::DCEPhase inserts into an insertion set in reverse, causing hilarious basic block corruption if you kill a lot of NewArrays
https://bugs.webkit.org/show_bug.cgi?id=133368

Reviewed by Mark Lam.


Source/JavaScriptCore: 
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::fixupBlock): Loop in the right order so that we insert in the right order.
* tests/stress/new-array-dead.js: Added.
(foo):

Source/WTF: 
* wtf/Insertion.h:
(WTF::executeInsertions): This algorithm is only correct if insertions are added in the right order. Assert that the order is right.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169447 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a sandbox profile for com.apple.appstore.CodeRedeemerNetscapePlugin
https://bugs.webkit.org/show_bug.cgi?id=133360

Reviewed by Sam Weinig.

* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Looks like
anyone using camera would need access to CoreMedia preferences.

* Resources/PlugInSandboxProfiles/com.apple.appstore.CodeRedeemerNetscapePlugin.sb: Added.

* WebKit2.xcodeproj/project.pbxproj: Added the profile.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169448 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use correct version of requiresFullscreenForVideoPlayback().
https://bugs.webkit.org/show_bug.cgi?id=133331

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-05-29
Reviewed by Eric Carlson.

Source/WebCore:
Test: media/video-fullscreeen-only-controls.html

Update the last place not yet using m_mediaSession->requiresFullscreenForVideoPlayback.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::parseAttribute):
switch to media session version for requriesFullscreenForVideoPlayback.

LayoutTests:
* media/video-fullscreeen-only-controls-expected.txt: Added.
* media/video-fullscreeen-only-controls.html: Added. Make sure video element
controls show even when not specified if inline playback is restricted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Perserve caption selection in fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=133350

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-05-29
Reviewed by Eric Carlson.

Use the logic from the inline player to calculate the selected caption index.

* html/HTMLMediaElement.h:
(WebCore::HTMLMediaElement::mediaControlsHost):
Expose mediaControlsHost() for use by WebVideoFullscreenModelMediaElement.

* platform/ios/WebVideoFullscreenModelMediaElement.mm:
(WebVideoFullscreenModelMediaElement::updateLegibleOptions):
Use logic from buildCaptionsMenu from mediaControlsApple.js.

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