Fullscreen UI does not appear after WebProcess has crashed
https://bugs.webkit.org/show_bug.cgi?id=132442

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-05-02
Reviewed by Darin Adler.

Source/WebCore:
Clean up immediately when there is a WebProcess crash.

* WebCore.exp.in:
* platform/ios/WebVideoFullscreenInterfaceAVKit.h:
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::invalidate):
Clean-up resources immediately.

Source/WebKit2:
Cleanup WebVideoFullscreenManagerProxy after a WebProcess crash.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
recreate WebVideoFullscreenManagerProxy after a WebProcess crash.

(WebKit::WebPageProxy::resetState):
invalidate and release WebVideoFullscreenManagerProxy on crash.

* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
don't assume m_page is valid.

(WebKit::WebVideoFullscreenManagerProxy::invalidate):
do cleanup invalidation in reponse to a WebProcess crash.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (WebKit2) Need to support transliterate chinese button (简⇄繁) for Traditional Chinese.
https://bugs.webkit.org/show_bug.cgi?id=132500
<rdar://problem/16778870>

Reviewed by Benjamin Poulain.

For traditional Chinese we support the transliterate to simplified Chinese.
This is done by pressing the 简⇄繁 button on the system
menu. This patch adds the necessary code to canPerformAction to enable
the button when appropriate as well as the implementation of the action
itself.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _transliterateChinese:]):
(-[WKContentView canPerformAction:withSender:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Stop flipping the ImageControlsButton
<rdar://problem/16773238> and https://bugs.webkit.org/show_bug.cgi?id=132502

Reviewed by Tim Horton.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::paintImageControlsButton):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168207 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove HistogramSupport.
<https://webkit.org/b/132354>

Prune some leftover Chromium gunk that no other ports ever used.

Reviewed by Simon Fraser.

* CMakeLists.txt:
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::deleteObjectStore):
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::openInternal):
(WebCore::IDBFactory::deleteDatabase):
* Modules/indexeddb/IDBHistograms.h: Removed.
* Modules/indexeddb/leveldb/IDBBackingStoreLevelDB.cpp:
(WebCore::IDBBackingStoreLevelDB::open):
(WebCore::IDBBackingStoreLevelDB::openInMemory):
(WebCore::recordInternalError): Deleted.
* Modules/indexeddb/leveldb/IDBBackingStoreTransactionLevelDB.cpp:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSParser.cpp:
(WebCore::cssPropertyID):
* dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::histogramMutationEventUsage): Deleted.
* dom/ShadowRoot.cpp:
* fileapi/Blob.cpp:
* fileapi/WebKitBlobBuilder.cpp:
(WebCore::BlobBuilder::append):
* history/PageCache.cpp:
(WebCore::logCanCacheFrameDecision):
(WebCore::logCanCachePageDecision):
* platform/HistogramSupport.cpp: Removed.
* platform/HistogramSupport.h: Removed.
* platform/leveldb/LevelDBDatabase.cpp:
(WebCore::LevelDBDatabase::open):
(WebCore::histogramLevelDBError): Deleted.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateNeedsCompositedScrolling):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168209 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION (WebKit2) Need to support reanalyze button for Chinese Traditional.
https://bugs.webkit.org/show_bug.cgi?id=132504
<rdar://problem/16778862>

Reviewed by Benjamin Poulain.

For traditional Chinese we support reanalyzing of the text to perform
transformations on the text based on the selected language and keyboard.
This is done by pressing the Reanalyze button on the system
menu. This patch adds the necessary code to canPerformAction to enable
the button when appropriate as well as the implementation of the action
itself.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _reanalyze:]):
(-[WKContentView canPerformAction:withSender:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168210 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Subpixel rendering[iOS]: Use pixelSnappedRoundedRectForPainting() to clip text area rect.
https://bugs.webkit.org/show_bug.cgi?id=132499
<rdar://problem/16631050>

Reviewed by Simon Fraser.

Snap to device pixels properly instead of relying on float arithmetics while converting from RoundedRect
to FloatRoundedRect. This is the second, cleanup part of the text-area decoration is off-by-one painting issue.

Currently not testable.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::paintTextFieldDecorations):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168211 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Cocoa] Remove unused WKErrorRecoveryAttempting
https://bugs.webkit.org/show_bug.cgi?id=132503

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
(createErrorWithRecoveryAttempter): Deleted.
(-[WKBrowsingContextController attemptRecoveryFromError:]): Deleted.
* UIProcess/API/Cocoa/WKErrorRecoveryAttempting.m: Removed.
* UIProcess/API/Cocoa/_WKFormDelegate.h:
* WebKit2.xcodeproj/project.pbxproj:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168213 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[MSE][Mac] AVAssetTrack returns incorrect track size
https://bugs.webkit.org/show_bug.cgi?id=132469

Reviewed by Brent Fulgham.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
(WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):  Remove the sizeChanged() notification.
(WebCore::SourceBufferPrivateAVFObjC::processCodedFrame): Cache the last parsed video frame size.
(WebCore::SourceBufferPrivateAVFObjC::naturalSize): Return the cached value.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168214 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CSS-based Media Controls Show Different times content longer than 1 hour.
https://bugs.webkit.org/show_bug.cgi?id=132443

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-05-02
Reviewed by Jer Noble.

* Modules/mediacontrols/mediaControlsApple.css:
(audio::-webkit-media-controls-timeline-container .hour-long-time):
This class has a wider width for longer duration times.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateDuration):
Apply .hour-long-time class as appropriate.

(Controller.prototype.formatTime):
More robust formatting to handle hours.

* Modules/mediacontrols/mediaControlsiOS.css:
(audio::-webkit-media-controls-timeline-container .hour-long-time):
This class has a wider width for longer duration times.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.formatTime):
More robust formatting to handle hours.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Use displayNameForTrack instead of textTrack->label() for captions.
https://bugs.webkit.org/show_bug.cgi?id=131311

Patch by Jeremy Jones <jeremyj@apple.com> on 2014-05-02
Reviewed by Darin Adler.

Use the same mechanism as the desktop to build the captions list so it has the correct
names in the correct order including none and automatic.

* platform/ios/WebVideoFullscreenModelMediaElement.h:
* platform/ios/WebVideoFullscreenModelMediaElement.mm:
(WebVideoFullscreenModelMediaElement::setMediaElement):
move legible track code into updateLegibleOptions()

(WebVideoFullscreenModelMediaElement::handleEvent):
updateLegibleOptions on addTrack and removeTrack

(WebVideoFullscreenModelMediaElement::selectLegibleMediaOption):
select the corresponding TextTrack on HTMLMediaElement.

(WebVideoFullscreenModelMediaElement::updateLegibleOptions):
use the same mechanism as desktop to build the captions menu.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WK2] Tiled layer content missing on pages with animated tiled layers
https://bugs.webkit.org/show_bug.cgi?id=132507
<rdar://problem/16765740>

Reviewed by Tim Horton.

Updating the tiling area of content TileControllers while
CSS animations are running depends on GraphicsLayerUpdater
triggering repeated layer flushes. With UI-side compositing, those
flushes were happening, but nothing triggered RemoteLayerTreeDrawingArea
to flush changes to the UI process.

Fix by having RenderLayerCompositor schedule a flush, rather
than just doing a flush, in response to GraphicsLayerUpdater.

Also change the name of the GraphicsLayerUpdaterClient function
to indicate that it suggests that a flush is required soon, rather than
that the flushing has to be synchronous.

* platform/graphics/GraphicsLayerUpdater.cpp:
(WebCore::GraphicsLayerUpdater::displayRefreshFired):
* platform/graphics/GraphicsLayerUpdater.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushLayersSoon):
(WebCore::RenderLayerCompositor::flushLayers): Deleted.
* rendering/RenderLayerCompositor.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168217 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<https://webkit.org/b/132505> Make it possible to tell copy-webkitlibraries-to-product-directory which OS X version to copy for

Reviewed by Dan Bernstein.

* Scripts/copy-webkitlibraries-to-product-directory: Add an --osx-version argument and use the passed value
when determining which LLVM archive to extract.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@168218 268f45cc-cd09-0410-ab3c-d52691b4dbfc
CodeCleanup: Remove *MaintainsPixelAlignment from GraphicsLayer*.
https://bugs.webkit.org/show_bug.cgi?id=132501

Reviewed by Simon Fraser.

* WebCore.exp.in:
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::GraphicsLayer):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setMaintainsPixelAlignment): Deleted.
(WebCore::GraphicsLayer::maintainsPixelAlignment): Deleted.
(WebCore::GraphicsLayer::pixelAlignmentOffset): Deleted.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::updateGeometry):
(WebCore::GraphicsLayerCA::computePixelAlignment):
(WebCore::GraphicsLayerCA::setMaintainsPixelAlignment): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::createGraphicsLayer):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::keepLayersPixelAligned): Deleted.
* rendering/RenderLayerCompositor.h:


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