Web Inspector: InspectorBackendCommands should include when to activate particular domains
https://bugs.webkit.org/show_bug.cgi?id=137753

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

Add an availability property to domains that only activate for
particular debuggable types. If missing, the domain is always
activated. Otherwise it must be a debuggable type string.
When a frontend is opened for that debuggable type, the domain
will be activated.

* inspector/scripts/codegen/models.py:
(Protocol.parse_domain):
(Domain.__init__):
(Domains):
Parse and validate the Domain's "availability" property.

* inspector/scripts/codegen/generate_backend_commands.py:
(BackendCommandsGenerator.generate_domain):
Emit InspectorBackend.activateDomain with debuggable type filter.

* inspector/protocol/ApplicationCache.json:
* inspector/protocol/CSS.json:
* inspector/protocol/DOM.json:
* inspector/protocol/DOMDebugger.json:
* inspector/protocol/DOMStorage.json:
* inspector/protocol/Database.json:
* inspector/protocol/IndexedDB.json:
* inspector/protocol/LayerTree.json:
* inspector/protocol/Network.json:
* inspector/protocol/Page.json:
* inspector/protocol/Replay.json:
* inspector/protocol/Timeline.json:
* inspector/protocol/Worker.json:
These domains only activate for Web debuggables.

* inspector/scripts/tests/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
Update existing tests that now have activate output.

* inspector/scripts/tests/expected/fail-on-domain-availability.json-error: Added.
* inspector/scripts/tests/fail-on-domain-availability.json: Added.
Add a test for "availability" validation.

Source/WebInspectorUI:

* UserInterface/Base/Main.js:
* UserInterface/Base/Test.js:
(WebInspector.loaded):
Activation now happens automatically so remove the hardcoded activations.

* UserInterface/Protocol/InspectorBackend.js:
(InspectorBackendClass.prototype.activateDomain):
Given no filter, always activate a domain. Otherwise only activate
if the debuggable type matches the provided filter.

* UserInterface/Protocol/Legacy/6.0/InspectorBackendCommands.js:
* UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
Only web debuggables are supported in iOS 6 and 7. The JSON files do not
need to change, all agents will auto activate.

* UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
* Versions/Inspector-iOS-8.0.json:
Specify which are web debuggables in iOS 8 since JS inspection is possible.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[Win] Mark a few tests as no-longer failing.

It looks like Said's work on SVG has fixed a number of things!

* platform/win/TestExpectations: Remove 'crash' and 'failures' cases
for a few things that are now reliably passing.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add support for action menus
https://bugs.webkit.org/show_bug.cgi?id=137891
rdar://problem/18451638
rdar://problem/18694470

Reviewed by Anders Carlsson.

Source/WebCore:

New SPI that is needed for this.
* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:
* platform/spi/mac: Added.
* platform/spi/mac/NSViewSPI.h: Added.

Source/WebKit2:

Temporary artwork needed for menu item.
* Resources/OpenInNewWindowTemplate.pdf: Added.
* WebKit2.xcodeproj/project.pbxproj:

Add a preference that defaults to false for action menu support.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetActionMenuSupportEnabled):
(WKPreferencesGetActionMenuSupportEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

New SPI. WebKit clients can implement this method to customize the action menu.
* UIProcess/API/Cocoa/WKViewPrivate.h:

Create the action menu if it is supported.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):

Methods to implement the default menu actions.
(-[WKView _openURLFromActionMenu:]):
(-[WKView _addToReadingListFromActionMenu:]):
(-[WKView _quickLookURLFromActionMenu:]):

Add action menus support for links. Populate the menu at the right time.
(-[WKView _defaultMenuItemsForLink]):
(-[WKView _defaultMenuItems]):
(-[WKView prepareForMenu:withEvent:]):
(-[WKView _actionMenuItemsForHitTestResult:defaultActionMenuItems:]):

New member variable caches the HitTestResult on mouse move.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::mouseDidMoveOverElement):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::activeActionMenuHitTestResult):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@174908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Speculative build fix.

* platform/spi/mac/NSViewSPI.h:



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