URLs for some videos are not valid URLs, should not be exposed to action menu
https://bugs.webkit.org/show_bug.cgi?id=138746
-and corresponding-
rdar://problem/18941927

Reviewed by Tim Horton.

If the video cannot be downloaded, that is also an indication that the URL of the 
video will not be valid on its own. In these cases, we should share or copy the 
main page’s URL.
* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _copyVideoURL:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WK1: Webpage preview can come up in wrong location
https://bugs.webkit.org/show_bug.cgi?id=138747
-and corresponding-
rdar://problem/18979004

Reviewed by Tim Horton.

Converting to window twice is bad.
* WebView/WebActionMenuController.mm:
(elementBoundingBoxInWindowCoordinatesFromNode):
(-[WebActionMenuController _quickLookURLFromActionMenu:]):
(elementBoundingBoxFromNode): Deleted.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add some tracing to help investigating <rdar://problem/18905383> [iOS] Crash due to null m_webPageProxyForBackForwardListForCurrentSwipe in ViewGestureController::endSwipeGesture
https://bugs.webkit.org/show_bug.cgi?id=138750

Reviewed by Tim Horton.

Emit trace messages at various points, and log them prior to crashing if the error condition
occurs. Otherwise, clear the trace messages.

* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::addLogEntry): Helper function that adds a message, including a time stamp and a
backtrace, to m_logEntries.
(WebKit::dumpLogEntries): Helper function that logs everything in m_logEntries.
(WebKit::ViewGestureController::beginSwipeGesture): Add a log entry.
(WebKit::ViewGestureController::endSwipeGesture): If
m_webPageProxyForBackForwardListForCurrentSwipe is null, dump the log entries just before
crashing. Otherwise, clear m_logEntries.
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree): Add a log entry.
(WebKit::ViewGestureController::removeSwipeSnapshot): Add a log entry.
* UIProcess/mac/ViewGestureController.h: Defined ENABLE_VIEW_GESTURE_CONTROLLER_TRACING,
and added m_logEntries member variable.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reduce amount of cut-and-paste needed for probe mechanism implementations.
<https://webkit.org/b/138671>

Reviewed by Geoffrey Garen.

The existing code requires that each MacroAssembler implementation provide
their own copy of all of the probe implementations even when most of it is
identical.  This patch hoists the common parts into AbstractMacroAssembler
(with some minor renaming).  Each target specific MacroAssembler now only
need to implement a few target specific methods that are expected by and
documented in AbstractMacroAssembler.h in the ENABLE(MASM_PROBE) section.

In this patch, I also simplified the X86 and X86_64 ports to use the same
port implementation.  The ARMv7 probe implementation should not conditionally
exclude the higher FP registers (since the JIT doesn't).  Fixed the ARMv7
probe code to include the higher FP registers always. 

This is all done in preparation to add printing functionality in JITted code
for debugging.

* assembler/AbstractMacroAssembler.h:
(JSC::AbstractMacroAssembler::Label::Label):
(JSC::AbstractMacroAssembler::ConvertibleLoadLabel::ConvertibleLoadLabel):
(JSC::AbstractMacroAssembler::DataLabelPtr::DataLabelPtr):
(JSC::AbstractMacroAssembler::DataLabel32::DataLabel32):
(JSC::AbstractMacroAssembler::DataLabelCompact::DataLabelCompact):
(JSC::AbstractMacroAssembler::Jump::link):
(JSC::AbstractMacroAssembler::Jump::linkTo):
(JSC::AbstractMacroAssembler::JumpList::link):
(JSC::AbstractMacroAssembler::JumpList::linkTo):
(JSC::AbstractMacroAssembler::ProbeContext::print):
(JSC::AbstractMacroAssembler::printIndent):
(JSC::AbstractMacroAssembler::printCPU):
(JSC::AbstractMacroAssembler::CachedTempRegister::CachedTempRegister):
- Except for the 3 printing methods (which are for the probe), the rest
  are touched simply because we need to add the MacroAssemblerType to the
  template args.
  The MacroAssemblerType is used by the abstract probe code to call the
  few probe methods that need to have CPU specific implementations.

* assembler/MacroAssemblerARM.cpp:
(JSC::MacroAssemblerARM::printCPURegisters):
- This was refactored from ProbeContext::dumpCPURegisters() which no
  longer exists.
(JSC::MacroAssemblerARM::ProbeContext::dumpCPURegisters): Deleted.
(JSC::MacroAssemblerARM::ProbeContext::dump): Deleted.

* assembler/MacroAssemblerARM.h:
* assembler/MacroAssemblerARM64.h:

* assembler/MacroAssemblerARMv7.cpp:
(JSC::MacroAssemblerARMv7::printCPURegisters):
- This was refactored from ProbeContext::dumpCPURegisters() which no
  longer exists.
(JSC::MacroAssemblerARMv7::ProbeContext::dumpCPURegisters): Deleted.
(JSC::MacroAssemblerARMv7::ProbeContext::dump): Deleted.

* assembler/MacroAssemblerARMv7.h:
* assembler/MacroAssemblerMIPS.h:
* assembler/MacroAssemblerSH4.h:
* assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::trustedImm32FromPtr): Deleted.
(JSC::MacroAssemblerX86::probe): Deleted.

* assembler/MacroAssemblerX86Common.cpp:
(JSC::MacroAssemblerX86Common::printCPURegisters):
- This was refactored from ProbeContext::dumpCPURegisters() which no
  longer exists.
(JSC::MacroAssemblerX86Common::probe):
- This implementation of probe() is based on the one originally in
  MacroAssemblerX86_64.h.  It is generic and should work for both
  32-bit and 64-bit.
(JSC::MacroAssemblerX86Common::ProbeContext::dumpCPURegisters): Deleted.
(JSC::MacroAssemblerX86Common::ProbeContext::dump): Deleted.

* assembler/MacroAssemblerX86Common.h:
* assembler/MacroAssemblerX86_64.h:
(JSC::MacroAssemblerX86_64::trustedImm64FromPtr): Deleted.
(JSC::MacroAssemblerX86_64::probe): Deleted.
* jit/JITStubsARMv7.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Do proper teardown for optimized fullscreen
https://bugs.webkit.org/show_bug.cgi?id=138648

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

* platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
(WebVideoFullscreenInterfaceAVKit::invalidate): must do corresponding teardown based on mode.

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