Add an overlay play button to media controls on android
https://bugs.webkit.org/show_bug.cgi?id=92132

Patch by Min Qin <qinmin@chromium.org> on 2012-07-27
Reviewed by Adam Barth.

This change adds an overlay play button to the media controls for android.
No tests for now as this setting is not being used by other port.
Will add a test and adjust all the test expectations when we upstream the layout tests for android.

* WebCore.gypi:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSValueKeywords.in:
* css/mediaControls.css:
(audio::-webkit-media-controls-overlay-play-button, video::-webkit-media-controls-overlay-play-button):
* css/mediaControlsChromiumAndroid.css:
(audio::-webkit-media-controls-overlay-enclosure):
(video::-webkit-media-controls-overlay-enclosure):
(audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
(video::-webkit-media-controls-overlay-play-button):
* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlOverlayPlayButtonElement::MediaControlOverlayPlayButtonElement):
(WebCore):
(WebCore::MediaControlOverlayPlayButtonElement::create):
(WebCore::MediaControlOverlayPlayButtonElement::defaultEventHandler):
(WebCore::MediaControlOverlayPlayButtonElement::updateDisplayType):
(WebCore::MediaControlOverlayPlayButtonElement::shadowPseudoId):
* html/shadow/MediaControlElements.h:
(MediaControlOverlayPlayButtonElement):
(WebCore):
* html/shadow/MediaControlRootElementChromium.cpp:
(WebCore::MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement):
(WebCore::MediaControlPanelEnclosureElement::create):
(WebCore):
(WebCore::MediaControlPanelEnclosureElement::shadowPseudoId):
(WebCore::MediaControlRootElementChromium::create):
(WebCore::MediaControlRootElementChromium::initializeControls):
* html/shadow/MediaControlRootElementChromium.h:
(MediaControlChromiumEnclosureElement):
(WebCore):
(MediaControlPanelEnclosureElement):
(MediaControlRootElementChromium):
* html/shadow/MediaControlRootElementChromiumAndroid.cpp: Added.
(WebCore):
(WebCore::MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement):
(WebCore::MediaControlOverlayEnclosureElement::create):
(WebCore::MediaControlOverlayEnclosureElement::shadowPseudoId):
(WebCore::MediaControlRootElementChromiumAndroid::MediaControlRootElementChromiumAndroid):
(WebCore::MediaControls::create):
(WebCore::MediaControlRootElementChromiumAndroid::create):
(WebCore::MediaControlRootElementChromiumAndroid::setMediaController):
(WebCore::MediaControlRootElementChromiumAndroid::playbackStarted):
(WebCore::MediaControlRootElementChromiumAndroid::playbackStopped):
* html/shadow/MediaControlRootElementChromiumAndroid.h: Added.
(WebCore):
(MediaControlOverlayEnclosureElement):
(MediaControlRootElementChromiumAndroid):
* platform/ThemeTypes.h:
* rendering/RenderMediaControlsChromium.cpp:
(WebCore::paintMediaOverlayPlayButton):
(WebCore):
(WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::paint):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::paintMediaOverlayPlayButton):
* rendering/RenderThemeChromiumAndroid.cpp:
(WebCore::RenderThemeChromiumAndroid::paintMediaOverlayPlayButton):
(WebCore):
* rendering/RenderThemeChromiumAndroid.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore: flex-wrap: wrap not wrapping for % sized items in column flow
https://bugs.webkit.org/show_bug.cgi?id=92324

Patch by Tony Chang <tony@chromium.org> on 2012-07-27
Reviewed by Ojan Vafai.

We were using trying to use the value of contentLogicalHeight() before having called computeLogicalHeight()
in a few places. Fix this in mainAxisContentExtent() rather than at the callers.

Test: css3/flexbox/percentage-heights.html

* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::mainAxisContentExtent):
(WebCore::RenderFlexibleBox::preferredMainAxisContentExtentForChild): If we haven't called computeLogicalHeight, we try to compute
the height based on the fixed flexbox value. min/max don't matter here since percent values are only based on height/width.
* rendering/RenderFlexibleBox.h: Drop const because computeContentLogicalHeightUsing is not const. I can
try making computeContentLogicalHeightUsing const in a follow up change (might be non-trivial).

Source/WebKit2: Show the unavailable plug-in indicator for Java applets as well
https://bugs.webkit.org/show_bug.cgi?id=92521

Patch by Anders Carlsson <andersca@apple.com> on 2012-07-27
Reviewed by Sam Weinig.

* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::unavailablePluginButtonClicked):
This can now be called on applet elements as well.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createJavaAppletWidget):
Get the MIME type from the applet element.

LayoutTests: flex-wrap: wrap not wrapping for % sized items in column flow
https://bugs.webkit.org/show_bug.cgi?id=92324

Patch by Tony Chang <tony@chromium.org> on 2012-07-27
Reviewed by Ojan Vafai.

Test cases for column flow with percentage heights. There are three
test cases for the three callers of mainAxisContentExtent() that were
broken by this.

* css3/flexbox/percentage-heights-expected.txt: Added.
* css3/flexbox/percentage-heights.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add Mac results for fast/table/table-row-outline-paint.html.

* platform/mac/fast/table/table-row-outline-paint-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][WTR] LayoutTestController.deliverWebIntent() needs to be implemented
https://bugs.webkit.org/show_bug.cgi?id=92228

Patch by Christophe Dumez <christophe.dumez@intel.com> on 2012-07-27
Reviewed by Anders Carlsson.

Source/WebKit2:

Add C API to create a WKIntentData and to deliver
it to a frame. This is needed by WebKitTestRunner
to implement LayoutTestController.deliverWebIntent().

* UIProcess/API/C/WKIntentData.cpp:
(WKIntentDataCreate):
* UIProcess/API/C/WKIntentData.h:
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageDeliverIntentToFrame):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.h:
(WebPage): Make deliverIntentToFrame() public so that it can
be used by WKBundlePage.

Tools:

Implement LayoutTestController.deliverWebIntent() to
allow test cases to deliver a Web intent and test this
functionality.

This functionality is needed by:
- webintents/web-intents-delivery.html

* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::deliverWebIntent):
(WTR):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@123911 268f45cc-cd09-0410-ab3c-d52691b4dbfc
https://bugs.webkit.org/show_bug.cgi?id=92327
-webkit-background-clip:text is blurry in WebKit 1 apps when
deviceScaleFactor > 1
-and corresponding-
<rdar://problem/11683788>

Reviewed by Simon Fraser.

Source/WebCore: 

The bug here is that the code to make createCompatibleBuffer() HiDPI-savvy 
assumed that the deviceScaleFactor would always be baked into the CTM of the
GraphicsContext. But that is NOT the case in WebKit 1.

createCompatibleBuffer() is used for clip text and gradients.

Now getCTM() takes a parameter indicating whether the result should definitely
include the device scale, or if it should possibly included the device scale, 
which is the option that matches old behavior.
* platform/graphics/GraphicsContext.h:
(GraphicsContext):
* platform/graphics/cairo/GraphicsContextCairo.cpp:
(WebCore::GraphicsContext::getCTM):
* platform/graphics/openvg/GraphicsContextOpenVG.cpp:
(WebCore::GraphicsContext::getCTM):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::GraphicsContext::getCTM):
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::getCTM):
* platform/graphics/wince/GraphicsContextWinCE.cpp:
(WebCore::GraphicsContext::getCTM):
* platform/graphics/wx/GraphicsContextWx.cpp:
(WebCore::GraphicsContext::getCTM):

Actually use the new parameter in the CG implementation. Use CG API to get a
matrix that definitely includes the device scale when that is required. 
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::getCTM):

Remove some symbol cruft that doesn't seem to require a replacement.
* WebCore.exp.in:

Use DefinitelyIncludeDeviceScale when getting the CTM in the buggy spot.
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::createCompatibleBuffer):

The ImageBuffer for gradients is created using createCompatibleBuffer(), and since 
createCompatibleBuffer() now uses getCTM(DefinitelyIncludeDeviceScale) to 
determine appropriate sizing, drawPattern() should use that same matrix to 
determine pattern sizing.
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::drawPattern):

LayoutTests: 

* fast/hidpi/gradient-with-scaled-ancestor.html: Added.
* platform/mac/fast/hidpi/gradient-with-scaled-ancestor-expected.png: Added.
* platform/mac/fast/hidpi/gradient-with-scaled-ancestor-expected.txt: Added.



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