[iOS] update optimized fullscreen media controls artwork
https://bugs.webkit.org/show_bug.cgi?id=138705

Reviewed by Dean Jackson.

* Modules/mediacontrols/MediaControlsHost.cpp:
(WebCore::MediaControlsHost::mediaUIImageData): Remove one button.
* Modules/mediacontrols/MediaControlsHost.idl:

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.controlsAreHidden): Add parentheses to fix the logic.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be
    visible during playback.
(ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically,
(ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before
    calling updateControls, which calls shouldHaveStartPlaybackButton.

* platform/ios/WebCoreSystemInterfaceIOS.h: Update constants.

* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176090 268f45cc-cd09-0410-ab3c-d52691b4dbfc
AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
https://bugs.webkit.org/show_bug.cgi?id=137867

Reviewed by Chris Fleizach.

Source/WebCore:

Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.

Test: platform/gtk/accessibility/detached-object-role.html

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetRole):

Tools:

Add ATK_ROLE_INVALID to roleToString. Remove the null AtkRole check in
AccessibilityUIElement::role: ATK_ROLE_INVALID = 0, and we need to be
able to test for the presence of ATK_ROLE_INVALID.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::role):

LayoutTests:

* platform/gtk/accessibility/detached-object-role-expected.txt: Added.
* platform/gtk/accessibility/detached-object-role.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176091 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK1: Update icon for Add to Reading List
https://bugs.webkit.org/show_bug.cgi?id=138710
<rdar://problem/18975774>

Reviewed by Beth Dakin.

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):
Use the right icon, matching WebKit2.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176093 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Update expected .png for platform/mac/editing/input/devanagari-ligature.html
https://bugs.webkit.org/show_bug.cgi?id=138712

This doesn't actually fix the test, it just updates the image.

Reviewed by Zalan Bujtas.

* platform/mac/editing/input/devanagari-ligature-expected.png:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176094 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change X86/64 JIT probes to save/restore xmm regs as double instead of __m128.
<https://webkit.org/b/138708>

Reviewed by Michael Saboff.

The JIT code only uses the xmm regs as double registers.  This patch changes
the storage types of the FP registers in X86Assembler.h to double instead of
__m128, and updates the X86 and X86_64 JIT probe implementations accordingly.

Also made some minor cosmetic changes in the output of the probe dump functions.

* assembler/MacroAssemblerX86Common.cpp:
(JSC::MacroAssemblerX86Common::ProbeContext::dumpCPURegisters):
* assembler/X86Assembler.h:
* jit/JITStubsX86.h:
* jit/JITStubsX86Common.h:
* jit/JITStubsX86_64.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176095 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Policy client not called for navigations through the page cache
https://bugs.webkit.org/show_bug.cgi?id=138703

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test added to TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadDifferentDocumentItem): When using a cached page, which already
has a document loader, set the document loader’s triggering action (so that the policy
client sees that this is a back/forward navigation) and clear its last checked request (so
that the policy client gets called).

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[DecidePolicyForPageCacheNavigationDelegate webView:didFinishNavigation:]):
(-[DecidePolicyForPageCacheNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176096 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Fire a layout milestone on session restore based on render tree size
https://bugs.webkit.org/show_bug.cgi?id=138711
rdar://problem/16033854

Reviewed by Anders Carlsson.
Source/WebCore:

New layout milestone for session restore based on render tree size. Only used
in WK2 at present.

* page/LayoutMilestones.h:

Source/WebKit2:

Add a session-restore layout milestone which fires after restoring a session,
when the render tree size reaches 50% of the size saved in the session state.

* Shared/SessionState.h: Add renderTreeSize.
* UIProcess/API/Cocoa/WKWebView.mm:
(layoutMilestones): Translate from SPI to WebCore milestones.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: New iOS-only milestone, er, event.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::renderingProgressEvents): Translate from WebCore milestone to rendering event.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Init stuff.
(WebKit::WebPageProxy::sessionState):
(WebKit::WebPageProxy::restoreFromSessionState): Zero out the target render tree size,
then get it out of session state and set the flag to say that we haven't reached it yet.
(WebKit::WebPageProxy::listenForLayoutMilestones): Set a flag to know that we should fire
the milestone. The other milestones get sent directly to WebCore.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::exceedsRenderTreeSizeSizeThreshold): Return true when we've reached 50%.
(WebKit::WebPageProxy::didCommitLayerTree): Fire the milestone when appropriate.
* UIProcess/mac/LegacySessionStateCoding.cpp: Rev the session state data for iOS
(where doing so is less disruptive). Standardize some CFString constants.
(WebKit::encodeSessionHistory): Wrap for legibility.
(WebKit::encodeLegacySessionState): Make a CFNumber for render tree size, and store
it in the root dictionary.
(WebKit::decodeBackForwardTreeNode): Move a comment to match another similar block.
(WebKit::decodeLegacySessionState): Decode render tree size and store it.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r176087.
https://bugs.webkit.org/show_bug.cgi?id=138714

Broke the build (Requested by ap on #webkit).

Reverted changeset:

"Update WebKit to build with LLVM TOT"
https://bugs.webkit.org/show_bug.cgi?id=138519
http://trac.webkit.org/changeset/176087

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176098 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK1: Support default actions for video
https://bugs.webkit.org/show_bug.cgi?id=138713
-and corresponding-
rdar://problem/18877520

Reviewed by Tim Horton.

Call setToNonShadowAncestor() for media HitTestResults.
* WebView/WebActionMenuController.mm:
(-[WebActionMenuController performHitTestAtPoint:]):

Default items and actions.
(-[WebActionMenuController _defaultMenuItemsForVideo:]):
(-[WebActionMenuController _copyVideoURL:]):
(-[WebActionMenuController _saveVideoToDownloads:]):
(-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):
(-[WebActionMenuController _defaultMenuItemsForHitTestResult:]):
* WebView/WebUIDelegatePrivate.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176099 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Change X86/64 JIT probes to save/restore xmm regs as double instead of __m128. [Follow up]
<https://webkit.org/b/138708>

Reviewed by Michael Saboff.

Removed a stale comment and a now unnecessary #include. 

* assembler/X86Assembler.h:



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