WebKit-https.git
3 years agoUnreviewed, rolling out r197955.
ggaren@apple.com [Tue, 15 Mar 2016 05:39:35 +0000 (05:39 +0000)]
Unreviewed, rolling out r197955.

I decided to go in another direction

Reverted changeset:

"bmalloc: Rename SmallPage to SmallRun"
https://bugs.webkit.org/show_bug.cgi?id=155320
http://trac.webkit.org/changeset/197955

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

3 years agoFix WinCairo build after r198195.
achristensen@apple.com [Tue, 15 Mar 2016 05:32:45 +0000 (05:32 +0000)]
Fix WinCairo build after r198195.

* platform/network/NetworkingContext.h:
curl networking now uses NetworkingContext::storageSession.  That's everybody!

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

3 years agoWeb Inspector: Show path from root to instances in the Heap Snapshot content view
commit-queue@webkit.org [Tue, 15 Mar 2016 05:02:28 +0000 (05:02 +0000)]
Web Inspector: Show path from root to instances in the Heap Snapshot content view
https://bugs.webkit.org/show_bug.cgi?id=155478
<rdar://problem/25157408>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Main.html:
New strings and resources.

* UserInterface/Models/HeapSnapshotNode.js:
(WebInspector.HeapSnapshotNode.prototype.get shortestGCRootPath):
(WebInspector.HeapSnapshotNode.prototype._gcRootPaths.visitNode):
(WebInspector.HeapSnapshotNode.prototype._gcRootPaths):
Helper to get the shortest path from a GC root to the node.

* UserInterface/Models/HeapSnapshotRootPath.js: Added.
(WebInspector.HeapSnapshotRootPath):
(WebInspector.HeapSnapshotRootPath.emptyPath):
(WebInspector.HeapSnapshotRootPath.prototype.get node):
(WebInspector.HeapSnapshotRootPath.prototype.get parent):
(WebInspector.HeapSnapshotRootPath.prototype.get pathComponent):
(WebInspector.HeapSnapshotRootPath.prototype.get rootNode):
(WebInspector.HeapSnapshotRootPath.prototype.get fullPath):
(WebInspector.HeapSnapshotRootPath.prototype.isRoot):
(WebInspector.HeapSnapshotRootPath.prototype.isEmpty):
(WebInspector.HeapSnapshotRootPath.prototype.isGlobalScope):
(WebInspector.HeapSnapshotRootPath.prototype.isPathComponentImpossible):
(WebInspector.HeapSnapshotRootPath.prototype.isFullPathImpossible):
(WebInspector.HeapSnapshotRootPath.prototype.appendInternal):
(WebInspector.HeapSnapshotRootPath.prototype.appendArrayIndex):
(WebInspector.HeapSnapshotRootPath.prototype.appendPropertyName):
(WebInspector.HeapSnapshotRootPath.prototype.appendVariableName):
(WebInspector.HeapSnapshotRootPath.prototype.appendGlobalScopeName):
(WebInspector.HeapSnapshotRootPath.prototype.appendEdge):
(WebInspector.HeapSnapshotRootPath.prototype._canPropertyNameBeDotAccess):
Helper class, like PropertyPath, for building a string path to
a HeapSnapshotNode. Typically the path is built up with
HeapSnapshotEdges and so you can build a string such as:
`window.foo[0]["prop erty"]._foo`.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotList):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotDiff):
(WebInspector.HeapAllocationsTimelineView.prototype.shown):
(WebInspector.HeapAllocationsTimelineView.prototype.hidden):
(WebInspector.HeapAllocationsTimelineView.prototype.closed):
Propogate shown/hidden to the contentViewContainer.
Cleanup the contentViewContainer when closing.

* UserInterface/Views/HeapSnapshotInstanceDataGridNode.js:
(WebInspector.HeapSnapshotInstanceDataGridNode.logHeapSnapshotNode):
Helper for logging a HeapSnapshotNode value to the console. If the
path is possible from the root, just output the path in the console
otherwise use a synthetic "Heap Snapshot Object (@1234)" like string.
For strings, just get the preview as we won't get a real RemoteObject.

(WebInspector.HeapSnapshotInstanceDataGridNode.prototype.createCellContent):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPath):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.appendPathRow):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.sanitizeClassName):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler.stringifyEdge):
(WebInspector.HeapSnapshotInstanceDataGridNode.prototype._mouseoverHandler):
Give the @1234 id element a mouseover handler to display a popover
with the path from a root. Stop the path at "Window" if possible
to avoid displaying internals like "JSDOMWindowShell".

* UserInterface/Views/HeapSnapshotInstancesContentView.css:
(.heap-snapshot .object-id):
(.heap-snapshot .object-id:hover):
(.heap-snapshot > .data-grid tr:not(.selected) td .object-id): Deleted.
(.heap-snapshot .icon):
(.heap-snapshot-instance-popover-content):
(.heap-snapshot-instance-popover-content table):
(.heap-snapshot-instance-popover-content tr):
(.heap-snapshot-instance-popover-content td):
(.heap-snapshot-instance-popover-content td.edge-name):
(.heap-snapshot-instance-popover-content td.object-data):
(.heap-snapshot-instance-popover-content .node):
(.heap-snapshot-instance-popover-content .node *):
Styles for contents of the popover.

* UserInterface/Views/HeapSnapshotInstancesContentView.js:
(WebInspector.HeapSnapshotInstancesContentView.prototype.hidden):
* UserInterface/Views/HeapSnapshotInstancesDataGridTree.js:
(WebInspector.HeapSnapshotInstancesDataGridTree):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popover):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.get popoverNode):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.set popoverNode):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.hidden):
(WebInspector.HeapSnapshotInstancesDataGridTree.prototype.willDismissPopover):
Have a single popover for the entire tree. Cache and clear
contents of the popover when appropriate.

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

3 years ago[WinCairo] Compile fix.
achristensen@apple.com [Tue, 15 Mar 2016 04:59:39 +0000 (04:59 +0000)]
[WinCairo] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=155463

Patch by Per Arne Vollan <peavo@outlook.com> on 2016-03-14
Reviewed by Alex Christensen.

Get the NetworkStorageSession object from the document in the same way as other platforms do.

Source/WebCore:

* loader/CookieJar.cpp:
(WebCore::storageSession):

Source/WebKit/win:

* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::storageSession):
* WebCoreSupport/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext::storageSession):

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

3 years ago[JSC] Don't reference the properties of @Reflect directly
utatane.tea@gmail.com [Tue, 15 Mar 2016 04:08:06 +0000 (04:08 +0000)]
[JSC] Don't reference the properties of @Reflect directly
https://bugs.webkit.org/show_bug.cgi?id=155436

Reviewed by Geoffrey Garen.

Reflect.ownKeys and Reflect.getOwnPropertyDescriptor can be altered with the user-crafted values.
Instead of referencing them directly, let's reference them through private names.

* builtins/ObjectConstructor.js:
(assign):
* runtime/CommonIdentifiers.h:
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::finishCreation): Deleted.
* runtime/ReflectObject.cpp:
(JSC::ReflectObject::finishCreation):
* tests/stress/object-assign-correctness.js:
(runTests.):
(runTests.get let):
(Reflect.ownKeys):
(Reflect.getOwnPropertyDescriptor):
(test.let.handler.switch.case.string_appeared_here.return.get enumerable): Deleted.
(test.let.handler.getOwnPropertyDescriptor): Deleted.
(test.let.handler.ownKeys): Deleted.
(test.let.handler.get getProps): Deleted.
(test.let.handler): Deleted.
(test): Deleted.

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

3 years ago<attachment> on iOS should paint its progress indicator instead of a green square
timothy_horton@apple.com [Tue, 15 Mar 2016 04:01:39 +0000 (04:01 +0000)]
<attachment> on iOS should paint its progress indicator instead of a green square
https://bugs.webkit.org/show_bug.cgi?id=155482
<rdar://problem/24805991>

Reviewed by Simon Fraser.

No new tests; there are existing tests that will be enabled shortly.

* rendering/RenderThemeIOS.mm:
(WebCore::getAttachmentProgress):
Clamp progress to 0-1.

(WebCore::paintAttachmentProgress):
Paint a pie.

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

3 years agoUnreviewed, rolling out r197981.
cdumez@apple.com [Tue, 15 Mar 2016 03:53:07 +0000 (03:53 +0000)]
Unreviewed, rolling out r197981.

Caused a massive PLT regression on Mac.

Reverted changeset:

"Font antialiasing (smoothing) changes when elements are
rendered into compositing layers"
https://bugs.webkit.org/show_bug.cgi?id=23364
http://trac.webkit.org/changeset/197981

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

3 years agoUnreviewed, rolling out r198145.
cdumez@apple.com [Tue, 15 Mar 2016 03:51:39 +0000 (03:51 +0000)]
Unreviewed, rolling out r198145.

This attempt to disable the feature did not fix the PLT
regression

Reverted changeset:

"Regression(r197981): Huge regression on Mac PLT"
https://bugs.webkit.org/show_bug.cgi?id=155443
http://trac.webkit.org/changeset/198145

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

3 years agoAdd twisted-15.5.0 module to webkitpy.thirdparty.autoinstalled.
dewei_zhu@apple.com [Tue, 15 Mar 2016 01:52:02 +0000 (01:52 +0000)]
Add twisted-15.5.0 module to webkitpy.thirdparty.autoinstalled.
https://bugs.webkit.org/show_bug.cgi?id=154667

Reviewed by Ryosuke Niwa and Simon Fraser.

Add twisted-15.5.0 to webkitpy.thirdparty.autoinstalled.
Minor fix for twsited_http_server used by run-benchmark that we should only stop http server while recieving 'GET /shutdown'.

* Scripts/webkitpy/benchmark_runner/http_server_driver/http_server/twisted_http_server.py:
(ServerControl.render_POST): Deleted.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook.find_module):
(AutoinstallImportHook._install_twisted_15_5_0):
* Scripts/webkitpy/thirdparty/__init___unittest.py:
(ThirdpartyTest.test_imports):

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

3 years agoRemove errant space.
weinig@apple.com [Tue, 15 Mar 2016 01:27:51 +0000 (01:27 +0000)]
Remove errant space.

* page/UserContentController.cpp:

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

3 years agoFix the windows build.
weinig@apple.com [Tue, 15 Mar 2016 01:21:08 +0000 (01:21 +0000)]
Fix the windows build.

* page/UserContentController.cpp:

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

3 years agoREGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
bfulgham@apple.com [Tue, 15 Mar 2016 00:59:57 +0000 (00:59 +0000)]
REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
https://bugs.webkit.org/show_bug.cgi?id=155453

Reviewed by Eric Carlson.
<rdar://problem/24879447>

Reviewed by Dan Bates.

Further refinement to test case: Remove use of 'setTimeout', and ensure the code gets
called by using 'testRunner.waitUntilDone()'/'testRunner.notifyDone()'.

* fast/mediastream/enumerating-crash.html:

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

3 years agoAdd a baseURL parameter to _WKUserStyleSheet
weinig@apple.com [Tue, 15 Mar 2016 00:48:40 +0000 (00:48 +0000)]
Add a baseURL parameter to _WKUserStyleSheet
https://bugs.webkit.org/show_bug.cgi?id=155219

Reviewed by Tim Horton.

Source/WebCore:

- Moves to a model for user content where instead of each page having a WebCore::UserContentController
  object, we have an abstract WebCore::UserContentProvider interface that can be implemented at the WebKit
  level. For now, legacy WebKit continues to use the old UserContentController, which implements
  WebCore::UserContentProvider, and WebKit2 implements its own implementation so it can store additional
  state.

* WebCore.xcodeproj/project.pbxproj:
Add new files.

* dom/ExtensionStyleSheets.cpp:
(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):
Switch to using forEachUserStyleSheet on the UserContentProvider.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::loadResource):
Remove null check now that we always have a UserContentProvider.

* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* loader/EmptyClients.h:
Add new EmptyClients.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadResourceSynchronously):
Remove null check now that we always have a UserContentProvider.

* loader/PingLoader.cpp:
(WebCore::processContentExtensionRulesForLoad):
Remove null check now that we always have a UserContentProvider.

* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::willSendRequestInternal):
Remove null check now that we always have a UserContentProvider.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::requestResource):
Remove null check now that we always have a UserContentProvider.

* page/DOMWindow.cpp:
(WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
Remove null checks now that we always have a UserContentProvider, and userMessageHandlerDescriptors
returns a reference.

(WebCore::DOMWindow::open):
Remove null check now that we always have a UserContentProvider.

* page/Frame.cpp:
(WebCore::Frame::injectUserScripts):
Simplify by lifting document check out of the main loop and using forEachUserScript.

* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::~Page):
(WebCore::Page::userContentProvider):
(WebCore::Page::setUserContentProvider):
(WebCore::Page::setUserContentController): Deleted.
* page/Page.h:
(WebCore::Page::userContentController): Deleted.
* page/PageConfiguration.h:
Store the UserContentProvider in a Ref, and require PageConfigurations to provide one. This
removes a bunch of null checks and simplifies the code.

* page/UserContentController.cpp:
(WebCore::UserContentController::~UserContentController):
(WebCore::UserContentController::forEachUserScript):
(WebCore::UserContentController::forEachUserStyleSheet):
(WebCore::UserContentController::addUserScript):
(WebCore::UserContentController::removeUserScript):
(WebCore::UserContentController::removeUserScripts):
(WebCore::UserContentController::addUserStyleSheet):
(WebCore::UserContentController::removeUserStyleSheet):
(WebCore::UserContentController::removeUserStyleSheets):
(WebCore::UserContentController::addUserMessageHandlerDescriptor):
(WebCore::UserContentController::removeUserMessageHandlerDescriptor):
(WebCore::UserContentController::addUserContentExtension):
(WebCore::UserContentController::removeUserContentExtension):
(WebCore::UserContentController::removeAllUserContentExtensions):
(WebCore::UserContentController::removeAllUserContent):
(WebCore::UserContentController::addPage): Deleted.
(WebCore::UserContentController::removePage): Deleted.
(WebCore::contentExtensionsEnabled): Deleted.
(WebCore::UserContentController::processContentExtensionRulesForLoad): Deleted.
(WebCore::UserContentController::actionsForResourceLoad): Deleted.
* page/UserContentController.h:
(WebCore::UserContentController::userScripts): Deleted.
(WebCore::UserContentController::userStyleSheets): Deleted.
(WebCore::UserContentController::userMessageHandlerDescriptors): Deleted.
Add inheritance from UserContentProvider and simplify things by removing unique_ptrs
that were holding the member variables. There is usually only one UserContentController
so having these in unique_ptrs doesn't make much sense.

* page/UserContentProvider.cpp: Added.
(WebCore::UserContentProvider::UserContentProvider):
(WebCore::UserContentProvider::~UserContentProvider):
(WebCore::UserContentProvider::addPage):
(WebCore::UserContentProvider::removePage):
(WebCore::UserContentProvider::invalidateInjectedStyleSheetCacheInAllFramesInAllPages):
(WebCore::contentExtensionsEnabled):
(WebCore::UserContentProvider::processContentExtensionRulesForLoad):
(WebCore::UserContentProvider::actionsForResourceLoad):
* page/UserContentProvider.h: Added.
Add abstract class for providing user content and add some helpers on it.

* page/UserMessageHandlerDescriptor.h:
(WebCore::UserMessageHandlerDescriptor::create):
(WebCore::UserMessageHandlerDescriptor::client):
(WebCore::UserMessageHandlerDescriptor::invalidateClient):
* page/UserMessageHandlersNamespace.cpp:
(WebCore::UserMessageHandlersNamespace::handler):
Simplify now that userContentProvider() and userMessageHandlerDescriptors() are references.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):
(-[WebView setGroupName:]):
Update to account for the name change from UserContentController -> UserContentProvider.

Source/WebKit2:

- Moves to a model for user content where instead of using a WebCore::UserContentController
  object, we implement the new WebCore::UserContentProvider interface (on the existing
  WebUserContentController object).
- Uses this to maintain maps of UserStylesSheets and UserScripts along with their identifiers,
  freeing up the URL, which had been acting as the identifier, to be used as the baseURL which
  was what it was intended for.
- Adds a baseURL property to _WKUserStyleSheet.

* WebKit2.xcodeproj/project.pbxproj:
Add new files.

* Scripts/webkit/messages.py:
(headers_for_type):
Add support for sending WebUserContentControllerDataTypes.

* Shared/WebUserContentControllerDataTypes.cpp: Added.
(WebKit::WebUserScriptData::encode):
(WebKit::WebUserScriptData::decode):
(WebKit::WebUserStyleSheetData::encode):
(WebKit::WebUserStyleSheetData::decode):
* Shared/WebUserContentControllerDataTypes.h: Added.
Add helper types for sending user content over IPC.

* UIProcess/API/APIUserScript.cpp:
(API::UserScript::generateUniqueURL):
(API::UserScript::UserScript):
* UIProcess/API/APIUserScript.h:
* UIProcess/API/APIUserStyleSheet.cpp:
(API::UserStyleSheet::generateUniqueURL):
(API::UserStyleSheet::UserStyleSheet):
* UIProcess/API/APIUserStyleSheet.h:
Add identifiers for tracking across processes.

* UIProcess/API/Cocoa/_WKUserStyleSheet.h:
* UIProcess/API/Cocoa/_WKUserStyleSheet.mm:
(-[_WKUserStyleSheet initWithSource:forMainFrameOnly:legacyWhitelist:legacyBlacklist:baseURL:userContentWorld:]):
(-[_WKUserStyleSheet baseURL]):
Add new initializer which takes a baseURL as well as an accessor for the baseURL.

* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeUserScript):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeUserStyleSheet):
Pass identifiers as well as user content.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::addUserScript):
(WebKit::InjectedBundle::addUserStyleSheet):
Move user content in via move semantics rather than using a unique_ptr.

(WebKit::InjectedBundle::removeUserScript):
(WebKit::InjectedBundle::removeUserStyleSheet):
(WebKit::InjectedBundle::removeUserScripts):
(WebKit::InjectedBundle::removeUserStyleSheets):
(WebKit::InjectedBundle::removeAllUserContent):
Update for new function signatures.

* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::WebUserContentController):
(WebKit::WebUserContentController::~WebUserContentController):
(WebKit::WebUserContentController::addUserContentWorlds):
(WebKit::WebUserContentController::removeUserContentWorlds):
(WebKit::WebUserContentController::addUserScripts):
(WebKit::WebUserContentController::removeUserScript):
(WebKit::WebUserContentController::removeAllUserScripts):
(WebKit::WebUserContentController::addUserStyleSheets):
(WebKit::WebUserContentController::removeUserStyleSheet):
(WebKit::WebUserContentController::removeAllUserStyleSheets):
(WebKit::WebUserContentController::addUserScriptMessageHandlers):
(WebKit::WebUserContentController::removeUserScriptMessageHandler):
(WebKit::WebUserContentController::addUserContentExtensions):
(WebKit::WebUserContentController::removeUserContentExtension):
(WebKit::WebUserContentController::removeAllUserContentExtensions):
(WebKit::WebUserContentController::addUserScriptInternal):
(WebKit::WebUserContentController::addUserScript):
(WebKit::WebUserContentController::removeUserScriptWithURL):
(WebKit::WebUserContentController::removeUserScriptInternal):
(WebKit::WebUserContentController::removeUserScripts):
(WebKit::WebUserContentController::addUserStyleSheetInternal):
(WebKit::WebUserContentController::addUserStyleSheet):
(WebKit::WebUserContentController::removeUserStyleSheetWithURL):
(WebKit::WebUserContentController::removeUserStyleSheetInternal):
(WebKit::WebUserContentController::removeUserStyleSheets):
(WebKit::WebUserContentController::removeAllUserContent):
(WebKit::WebUserContentController::forEachUserScript):
(WebKit::WebUserContentController::forEachUserStyleSheet):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
Convert to inheriting from UserContentProvider, rather than containing a UserContentController.
This means adding the storage for the user content, which has been simplified to avoid using
unique_ptrs.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addUserScript):
(WebKit::WebPage::addUserStyleSheet):
(WebKit::WebPage::removeAllUserContent):
Update to call the WebUserContentController, rather than going to the UserContentController, which
no longer exists.

* WebProcess/WebPage/WebPageGroupProxy.cpp:
(WebKit::WebPageGroupProxy::userContentController):
* WebProcess/WebPage/WebPageGroupProxy.h:
Return the WebUserContentController rather than old UserContentController.

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

3 years agoiOS: RTFD format is not available in the pasteboard after copy/cut.
enrica@apple.com [Tue, 15 Mar 2016 00:47:11 +0000 (00:47 +0000)]
iOS: RTFD format is not available in the pasteboard after copy/cut.
https://bugs.webkit.org/show_bug.cgi?id=155477
rdar://problem/23500600

Reviewed by Tim Horton.

WebKit is using UTTypeRTFD instead of UTTypeFlatRTFD that is the
proper RTFD format for pastedboard. I also discovered that, when
we create the NSTextAttachment in the NSAttributedString we produce
from the DOM range, we are not generating a file name with the
appropriate extension for the MIME type. The iOS specific implementation
of the MIMETypeRegistry functions were empty.
There is no need to have a differentiation between OS X and iOS, so
we now have only one file called MIMETypeRegistryCocoa.mm.

* WebCore.xcodeproj/project.pbxproj:
* platform/cocoa/MIMETypeRegistryCocoa.mm: Added.
(WebCore::MIMETypeRegistry::getMIMETypeForExtension):
(WebCore::MIMETypeRegistry::getExtensionsForMIMEType):
(WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
* platform/ios/MIMETypeRegistryIOS.mm: Removed.
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
(WebCore::Pasteboard::supportedPasteboardTypes):
(WebCore::Pasteboard::hasData):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):
* platform/mac/MIMETypeRegistryMac.mm: Removed.

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

3 years agoWeb Inspector: Display Content Security Policy hash in details sidebar for script...
dbates@webkit.org [Tue, 15 Mar 2016 00:39:59 +0000 (00:39 +0000)]
Web Inspector: Display Content Security Policy hash in details sidebar for script and style elements
https://bugs.webkit.org/show_bug.cgi?id=155466
<rdar://problem/25152480>

Reviewed by Joseph Pecoraro and Timothy Hatcher.

Source/JavaScriptCore:

Add property contentSecurityPolicyHash to store the CSP hash for an HTML style element or an
applicable HTML script element.

* inspector/protocol/DOM.json:

Source/WebCore:

For convenience, display the SHA-256 Content Security Policy (CSP) hash in the node details
sidebar for the selected HTML script element or HTML style element. A CSP script hash is
only applicable to inline JavaScript scripts. Therefore, we will display a hash for HTML
script elements only if they do not have a src attribute.

Tests: inspector/dom/csp-big5-hash.html
       inspector/dom/csp-hash.html

* inspector/InspectorDOMAgent.cpp:
(WebCore::computeContentSecurityPolicySHA256Hash): Added.
(WebCore::InspectorDOMAgent::buildObjectForNode): For an applicable HTML script- or style-
element, pass the computed SHA-256 CSP hash to the Inspector front end.

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js: Add English localized string for the CSP hash UI label.
* UserInterface/Models/DOMNode.js:
(WebInspector.DOMNode): Initialize the instance variable this._contentSecurityPolicyHash
with the value passed from the Inspector back end.
(WebInspector.DOMNode.prototype.contentSecurityPolicyHash): Returns the CSP hash for this node.
* UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
(WebInspector.DOMNodeDetailsSidebarPanel): Append a row to the end of section Identity to display
the CSP hash (if applicable).
(WebInspector.DOMNodeDetailsSidebarPanel.prototype.refresh): Query the underlying WebInspector.DOMNode
for the CSP hash of the selected node.

LayoutTests:

Add tests to ensure that the WebInspector.DOMNode object associated with an HTML style element
or applicable HTML script element has a valid CSP hash.

* inspector/dom/csp-big5-hash-expected.txt: Added.
* inspector/dom/csp-big5-hash.html: Added.
* inspector/dom/csp-hash-expected.txt: Added.
* inspector/dom/csp-hash.html: Added.

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

3 years agoPurge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive...
jh718.park@samsung.com [Tue, 15 Mar 2016 00:22:45 +0000 (00:22 +0000)]
Purge PassRefPtr from ArrayBuffer, ArchiveResource, Pasteboard, LegacyWebArchive and DataObjectGtk
https://bugs.webkit.org/show_bug.cgi?id=150497

Reviewed by Darin Adler.

Source/JavaScriptCore:

* runtime/ArrayBuffer.h:
(JSC::ArrayBuffer::create):
(JSC::ArrayBuffer::createAdopted):
(JSC::ArrayBuffer::createFromBytes):
(JSC::ArrayBuffer::createUninitialized):
(JSC::ArrayBuffer::slice):
(JSC::ArrayBuffer::sliceImpl):

Source/WebCore:

No new tests, no new behaviours.

* Modules/indexeddb/IDBGetResult.h:
(WebCore::IDBGetResult::IDBGetResult):
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
* Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::didReceiveRawData):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
* dom/MessageEvent.h:
* editing/Editor.cpp:
(WebCore::Editor::selectedRange):
* editing/Editor.h:
* editing/FrameSelection.h:
(WebCore::FrameSelection::toNormalizedRange):
* editing/VisiblePosition.cpp:
(WebCore::makeRange):
* editing/VisiblePosition.h:
* editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::toNormalizedRange):
* editing/VisibleSelection.h:
* editing/VisibleUnits.cpp:
(WebCore::enclosingTextUnitOfGranularity):
(WebCore::wordRangeFromPosition):
(WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary):
(WebCore::rangeExpandedAroundPositionByCharacters):
* editing/VisibleUnits.h:
* editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_addAttachmentForElement):
(fileWrapperForURL):
* editing/efl/EditorEfl.cpp:
(WebCore::Editor::webContentFromPasteboard):
* editing/gtk/EditorGtk.cpp:
(WebCore::createFragmentFromPasteboardData):
(WebCore::Editor::webContentFromPasteboard):
* editing/ios/EditorIOS.mm:
(WebCore::dataInRTFDFormat):
(WebCore::dataInRTFFormat):
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::WebContentReader::addFragment):
(WebCore::Editor::WebContentReader::readWebArchive):
(WebCore::Editor::WebContentReader::readRTFD):
(WebCore::Editor::WebContentReader::readRTF):
(WebCore::Editor::WebContentReader::readImage):
(WebCore::Editor::WebContentReader::readURL):
(WebCore::Editor::webContentFromPasteboard):
(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::createFragmentAndAddResources):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
* editing/mac/EditorMac.mm:
(WebCore::Editor::selectionInWebArchiveFormat):
(WebCore::Editor::adjustedSelectionRange):
(WebCore::dataInRTFDFormat):
(WebCore::dataInRTFFormat):
(WebCore::Editor::dataSelectionForPasteboard):
(WebCore::Editor::WebContentReader::readWebArchive):
(WebCore::Editor::WebContentReader::readRTFD):
(WebCore::Editor::WebContentReader::readRTF):
(WebCore::Editor::WebContentReader::readImage):
(WebCore::Editor::WebContentReader::readURL):
(WebCore::Editor::webContentFromPasteboard):
(WebCore::Editor::createFragmentForImageResourceAndAddResource):
(WebCore::Editor::createFragmentAndAddResources):
* editing/win/EditorWin.cpp:
(WebCore::createFragmentFromPlatformData):
(WebCore::Editor::webContentFromPasteboard):
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::archive):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::mainResourceData):
(WebCore::DocumentLoader::maybeCreateArchive):
(WebCore::DocumentLoader::addArchiveResource):
(WebCore::DocumentLoader::mainResource):
* loader/DocumentLoader.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadArchive):
* loader/SubstituteData.h:
(WebCore::SubstituteData::SubstituteData):
(WebCore::SubstituteData::isValid):
* loader/SubstituteResource.h:
(WebCore::SubstituteResource::data):
(WebCore::SubstituteResource::SubstituteResource):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didReceiveResponse):
(WebCore::ApplicationCacheGroup::didReceiveData):
(WebCore::ApplicationCacheGroup::didFail):
(WebCore::ApplicationCacheGroup::didReceiveManifestData):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::maybeLoadMainResource):
(WebCore::ApplicationCacheHost::maybeLoadSynchronously):
(WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
* loader/appcache/ApplicationCacheResource.cpp:
(WebCore::ApplicationCacheResource::ApplicationCacheResource):
(WebCore::ApplicationCacheResource::deliver):
(WebCore::ApplicationCacheResource::estimatedSizeInStorage):
* loader/appcache/ApplicationCacheResource.h:
(WebCore::ApplicationCacheResource::create):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
* loader/appcache/ApplicationCacheStorage.h:
* loader/archive/ArchiveFactory.cpp:
(WebCore::archiveFactoryCreate):
(WebCore::ArchiveFactory::create):
* loader/archive/ArchiveFactory.h:
* loader/archive/ArchiveResource.cpp:
(WebCore::ArchiveResource::ArchiveResource):
(WebCore::ArchiveResource::create):
* loader/archive/ArchiveResource.h:
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::addResource):
* loader/archive/ArchiveResourceCollection.h:
* loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::createPropertyListRepresentation):
(WebCore::LegacyWebArchive::createResource):
(WebCore::LegacyWebArchive::create):
(WebCore::LegacyWebArchive::createFromSelection):
* loader/archive/cf/LegacyWebArchive.h:
* loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::create):
* loader/archive/mhtml/MHTMLArchive.h:
* loader/archive/mhtml/MHTMLParser.cpp:
(WebCore::MHTMLParser::parseArchive):
(WebCore::MHTMLParser::parseArchiveWithHeader):
(WebCore::MHTMLParser::parseNextPart):
* loader/archive/mhtml/MHTMLParser.h:
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::didAddClient):
* loader/icon/IconDatabase.cpp:
(WebCore::loadDefaultIconRecord):
* loader/icon/IconRecord.cpp:
(WebCore::IconRecord::setImageData):
* loader/icon/IconRecord.h:
* platform/Pasteboard.h:
* platform/PasteboardStrategy.h:
* platform/PlatformPasteboard.h:
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::createArrayBuffer):
(WebCore::utf8Buffer):
* platform/SharedBuffer.h:
(WebCore::SharedBuffer::create):
* platform/cf/SharedBufferCF.cpp:
(WebCore::SharedBuffer::wrapCFData):
* platform/cocoa/NetworkExtensionContentFilter.mm:
(WebCore::NetworkExtensionContentFilter::replacementData):
* platform/cocoa/ParentalControlsContentFilter.mm:
(WebCore::ParentalControlsContentFilter::replacementData):
* platform/graphics/Image.cpp:
(WebCore::Image::setData):
* platform/graphics/Image.h:
* platform/gtk/DataObjectGtk.cpp:
(WebCore::DataObjectGtk::forClipboard):
* platform/gtk/DataObjectGtk.h:
(WebCore::DataObjectGtk::create):
* platform/gtk/PasteboardGtk.cpp:
(WebCore::Pasteboard::Pasteboard):
(WebCore::Pasteboard::dataObject):
* platform/ios/PasteboardIOS.mm:
(WebCore::Pasteboard::read):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::bufferForType):
(WebCore::PlatformPasteboard::readBuffer):
* platform/mac/PasteboardMac.mm:
(WebCore::writeFileWrapperAsRTFDAttachment):
(WebCore::Pasteboard::read):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::bufferForType):
* platform/mac/SharedBufferMac.mm:
(WebCore::SharedBuffer::wrapNSData):
(WebCore::SharedBuffer::createFromReadingFile):
* platform/network/MIMEHeader.cpp:
(WebCore::retrieveKeyValuePairs):
(WebCore::MIMEHeader::parseHeader):
* platform/network/MIMEHeader.h:
* platform/soup/SharedBufferSoup.cpp:
(WebCore::SharedBuffer::wrapSoupBuffer):
* platform/win/ClipboardUtilitiesWin.cpp:
(WebCore::fragmentFromFilenames):
(WebCore::fragmentFromCFHTML):
(WebCore::fragmentFromHTML):
* platform/win/ClipboardUtilitiesWin.h:
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::documentFragment):

Source/WebKit/mac:

* DOM/WebDOMOperations.mm:
(-[DOMNode webArchive]):
(-[DOMNode webArchiveByFilteringSubframes:]):
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::bufferForType):
(WebPlatformStrategies::readBufferFromPasteboard):
* WebView/WebArchive.mm:
(-[WebArchive initWithData:]):
* WebView/WebDataSource.mm:
(-[WebDataSource webArchive]):
(-[WebDataSource addSubresource:]):
* WebView/WebResource.mm:
(-[WebResource encodeWithCoder:]):
(-[WebResource data]):
(-[WebResource _stringValue]):
(-[WebResource _initWithCoreResource:]): Deleted.

Source/WebKit/win:

* WebArchive.cpp:
(WebArchive::initWithNode):

Source/WebKit2:

* Shared/APIWebArchive.mm:
(API::WebArchive::WebArchive):
* Shared/APIWebArchiveResource.mm:
(API::WebArchiveResource::data):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::addArchiveResource):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::bufferForType):
(WebKit::WebPlatformStrategies::readBufferFromPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::documentFragmentFromAttributedString):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::webArchiveData):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::resourceDataForFrame):

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

3 years agoAndy VanWagoner no longer has time to own Intl
benjamin@webkit.org [Mon, 14 Mar 2016 23:35:40 +0000 (23:35 +0000)]
Andy VanWagoner no longer has time to own Intl

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-14

* features.json:
Andy is busy with other things.

Andy, thanks for your amazing work on Intl and your dedication
to making things right.

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

3 years agoWeb Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handl...
commit-queue@webkit.org [Mon, 14 Mar 2016 23:35:22 +0000 (23:35 +0000)]
Web Inspector: REGRESSION(r197974): HeapAllocationsTimelineView broken, doesn't handle Timeline Sidebar Navigation removal
https://bugs.webkit.org/show_bug.cgi?id=155458
<rdar://problem/25150803>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
(WebInspector.HeapAllocationsTimelineView.prototype.showHeapSnapshotTimelineRecord):
(WebInspector.HeapAllocationsTimelineView.prototype.get selectionPathComponents):
(WebInspector.HeapAllocationsTimelineView.prototype.layout):
(WebInspector.HeapAllocationsTimelineView.prototype._compareHeapSnapshotsClicked):
(WebInspector.HeapAllocationsTimelineView.prototype._dataGridNodeSelected):
(WebInspector.HeapAllocationsTimelineView.prototype.get navigationSidebarTreeOutlineLabel): Deleted.
Update the TimelineView now that there is no sidebar.
Remove any TreeOutline logic and replace with DataGrid logic.

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

3 years agoWeb Inspector: REGRESSION(r198026): Can't click on Snapshot in Timeline Overview
commit-queue@webkit.org [Mon, 14 Mar 2016 23:33:49 +0000 (23:33 +0000)]
Web Inspector: REGRESSION(r198026): Can't click on Snapshot in Timeline Overview
https://bugs.webkit.org/show_bug.cgi?id=155457
<rdar://problem/25150706>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._handleClick):
The conditional was accidentally inverted in r198026.

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

3 years ago[mips] Fix unaligned access in LLINT.
julien.brianceau@gmail.com [Mon, 14 Mar 2016 23:31:18 +0000 (23:31 +0000)]
[mips] Fix unaligned access in LLINT.
https://bugs.webkit.org/show_bug.cgi?id=153228

Address loads used with btbxx opcodes were wrongly converted to lw
instruction instead of lbu, leading to unaligned access on mips
platforms. This is not a bug as it's silently fixed up by kernel,
but it's more efficient to avoid unaligned accesses for mips.

Reviewed by Geoffrey Garen.

* offlineasm/mips.rb:

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

3 years agoREGRESSION(r194394): >2x slow-down on CDjs
fpizlo@apple.com [Mon, 14 Mar 2016 23:28:03 +0000 (23:28 +0000)]
REGRESSION(r194394): >2x slow-down on CDjs
https://bugs.webkit.org/show_bug.cgi?id=155471

Unreviewed (rollout).

Source/JavaScriptCore:

This revision changes localeCompare() so that it's *much* slower than before. It's
understandable that sometimes things will get a tiny bit slower when implementing new
language features, but more than 2x regression on a major benchmark is not OK.

This rolls out that change. We can reland it once we think about how to do it in a
performant way.

* builtins/StringPrototype.js:
(search):
(localeCompare): Deleted.
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):

LayoutTests:

* js/dom/script-tests/string-prototype-properties.js:
* js/dom/string-prototype-properties-expected.txt:
* js/script-tests/string-localeCompare.js:
* js/string-localeCompare-expected.txt:
* js/string-localeCompare.html:

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

3 years agoNeed to distinguish between Symbol() and Symbol("").
mark.lam@apple.com [Mon, 14 Mar 2016 23:20:27 +0000 (23:20 +0000)]
Need to distinguish between Symbol() and Symbol("").
https://bugs.webkit.org/show_bug.cgi?id=155438

Reviewed by Saam Barati.

Source/JavaScriptCore:

* runtime/PrivateName.h:
(JSC::PrivateName::PrivateName):

Source/WTF:

While toString of both Symbol() and Symbol("") yields "Symbol()", Function.name
should yield "" and "[]" respectively.  Hence, we need to tell between the two.
This functionality will be needed later in https://bugs.webkit.org/show_bug.cgi?id=155437.

We achieve this by creating another singleton instance like the empty StringImpl
as the null StringImpl.  isNullSymbol() tests if the Stringimpl instance is a
symbol, and its substring is the null() singleton.

* wtf/text/StringImpl.cpp:
(WTF::StringImpl::createSymbol):
(WTF::StringImpl::createNullSymbol):
(WTF::StringImpl::containsOnlyWhitespace):
(WTF::StringImpl::createSymbolEmpty): Deleted.
* wtf/text/StringImpl.h:
(WTF::StringImpl::tryCreateUninitialized):
(WTF::StringImpl::stringKind):
(WTF::StringImpl::isSymbol):
(WTF::StringImpl::isAtomic):
(WTF::StringImpl::isNullSymbol):
* wtf/text/StringStatics.cpp:
(WTF::StringImpl::null):

Tools:

* TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
- Test that the a symbol with an empty string is not equivalent to a null symbol.

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

3 years agoTemporarily disable the separated heap.
oliver@apple.com [Mon, 14 Mar 2016 23:14:15 +0000 (23:14 +0000)]
Temporarily disable the separated heap.
https://bugs.webkit.org/show_bug.cgi?id=155472

Reviewed by Geoffrey Garen.

Temporarily disable this.

* Configurations/FeatureDefines.xcconfig:

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

3 years ago[iOS] WKPreviewAction conforms to NSCopying but doesn’t override -
bdakin@apple.com [Mon, 14 Mar 2016 22:58:28 +0000 (22:58 +0000)]
[iOS] WKPreviewAction conforms to NSCopying but doesn’t override -
copyWithZone:
https://bugs.webkit.org/show_bug.cgi?id=155395

Reviewed by Sam Weinig.

* UIProcess/API/Cocoa/WKPreviewActionItem.mm:
(-[WKPreviewAction copyWithZone:]):

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

3 years agoMarking js/funcion-apply.html as flaky on mac debug
ryanhaddad@apple.com [Mon, 14 Mar 2016 22:38:53 +0000 (22:38 +0000)]
Marking js/funcion-apply.html as flaky on mac debug
https://bugs.webkit.org/show_bug.cgi?id=155411

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoWeb Inspector: cssmin.py does not handle calc(var(--toolbar-height) + var(--tab-bar...
timothy@apple.com [Mon, 14 Mar 2016 22:22:24 +0000 (22:22 +0000)]
Web Inspector: cssmin.py does not handle calc(var(--toolbar-height) + var(--tab-bar-height))

https://bugs.webkit.org/show_bug.cgi?id=155464
rdar://problem/25152196

Reviewed by Joseph Pecoraro.

* Scripts/cssmin.py:
(cssminify): Check for var when stripping spaces around + and -.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._viewModeDidChange):
Drive-by fix to add a missing semi-colon found by the copy-user-interface-resources-dryrun.rb script.

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

3 years agoSelecting with shift+drag results in unexpected drag-n-drop
tonikitoo@webkit.org [Mon, 14 Mar 2016 22:08:32 +0000 (22:08 +0000)]
Selecting with shift+drag results in unexpected drag-n-drop
https://bugs.webkit.org/show_bug.cgi?id=155314

Reviewed by Darin Adler.

Source/WebCore:

Test: editing/selection/shift-drag-selection-no-drag-n-drop.html

Whenever user tries to extend an existing text selection by dragging the mouse
(left button hold) with shift key pressed, WebKit enters drag-n-drop mode.
This behavior does not match common editing behavior out there, including other
browsers' (Firefox, Opera/Presto and IE).

Patch changes WebKit so that whenever one extends a selection with mouse
and shift key pressed off of a #text node, it does not enter drag-n-drop mode.

Additionally, patch also adds some further tests to ensure that when
selection is extended off of either a link or an image, drag-n-drop does
get triggered, no matter if shift key is pressed.

* page/EventHandler.cpp:
(WebCore::EventHandler::handleMousePressEvent):

LayoutTests:

Tests that ensure that WebKit:

1) does not enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed,
   off of a #text node.
2) does enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed,
   off of a link.
3) does enter drag-n-drop mode and extending selection by dragging with mouse with shift key is pressed,
   off of an image.

Note that (1) is a behavior changed by this patch, whereas (2) and (3) represent existing
behavior that is kept.
Tests are also skip for iOS similarly to other drag-n-drop related tests.

* fast/events/shift-drag-selection-no-drag-n-drop-expected.txt: Added.
* fast/events/shift-drag-selection-no-drag-n-drop.html: Added.
* fast/events/shift-drag-selection-on-link-triggers-drag-n-drop-expected.txt: Added.
* fast/events/shift-drag-selection-on-link-triggers-drag-n-drop.html: Added.
* fast/events/shift-drag-selection-on-image-triggers-drag-n-drop-expected.txt: Added.
* fast/events/shift-drag-selection-on-image-triggers-drag-n-drop.html: Added.

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

3 years agoMarking storage/indexeddb/transaction-abort-private.html as flaky on mac-wk1
ryanhaddad@apple.com [Mon, 14 Mar 2016 22:03:21 +0000 (22:03 +0000)]
Marking storage/indexeddb/transaction-abort-private.html as flaky on mac-wk1
https://bugs.webkit.org/show_bug.cgi?id=155067

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

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

3 years agoSkip test storage/indexeddb/odd-strings.html
ryanhaddad@apple.com [Mon, 14 Mar 2016 22:03:19 +0000 (22:03 +0000)]
Skip test storage/indexeddb/odd-strings.html
https://bugs.webkit.org/show_bug.cgi?id=154975

Unreviewed test gardening.

Removing duplicate expectation for test and skipping since it fails or times out on every run.

* TestExpectations:
* platform/mac-wk1/TestExpectations:

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

3 years agoREGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
bfulgham@apple.com [Mon, 14 Mar 2016 21:53:10 +0000 (21:53 +0000)]
REGRESSION (r197114): Crash in WebCore::MediaDevicesRequest::didCompletePermissionCheck
https://bugs.webkit.org/show_bug.cgi?id=155453
<rdar://problem/24879447>

Reviewed by Daniel Bates.

Source/WebCore:

Tested by fast/mediastream/enumerating-crash.html.

* Modules/mediastream/MediaDevicesRequest.cpp:
(WebCore::MediaDevicesRequest::didCompletePermissionCheck): Prevent UserMediaPermissionCheck object from being
destroyed before the method completes.

LayoutTests:

* fast/mediastream/enumerating-crash-expected.txt: Added.
* fast/mediastream/enumerating-crash.html: Added.

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

3 years agoReduce generated JSON HeapSnapshot size
commit-queue@webkit.org [Mon, 14 Mar 2016 21:50:20 +0000 (21:50 +0000)]
Reduce generated JSON HeapSnapshot size
https://bugs.webkit.org/show_bug.cgi?id=155460

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-14
Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Adjust the HeapSnapshot JSON to better reduce its size.
Changes include:

  - avoid inner array groups and instead just have a large array for
    nodes/edges. This removes lots of small array allocations.
  - eliminate duplicate edges
  - avoid duplicating edge names by including them in their own table;
  - now both the nodes and edges lists hold only integers

* heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::json):
Add some more documentation for the slightly modified format.
While generating, clear data structures as early as possible.

* heap/HeapSnapshotBuilder.h:
(JSC::HeapSnapshotEdge::HeapSnapshotEdge):
During JSON building, the edge's cell pointers are converted to the
identifier they point to. This avoids having to re-lookup the identifier.

* tests/heapProfiler/driver/driver.js:
(CheapHeapSnapshotEdge):
(CheapHeapSnapshot):
(CheapHeapSnapshot.prototype.edgeNameFromTableIndex):
(HeapSnapshot):
Update test driver for slightly different snapshot format.

Source/WebInspectorUI:

* UserInterface/Models/HeapSnapshot.js:
(WebInspector.HeapSnapshot.fromPayload):
Update for the slightly modified format.

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

3 years agoUnreviewed, rolling out r198095.
commit-queue@webkit.org [Mon, 14 Mar 2016 21:44:27 +0000 (21:44 +0000)]
Unreviewed, rolling out r198095.
https://bugs.webkit.org/show_bug.cgi?id=155467

Made text look poor (Requested by JoePeck on #webkit).

Reverted changeset:

"Web Inspector: Large repaints when typing any character in
console"
https://bugs.webkit.org/show_bug.cgi?id=155387
http://trac.webkit.org/changeset/198095

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

3 years agoFix crash when reloading a page using requestAnimationFrame on iOS
simon.fraser@apple.com [Mon, 14 Mar 2016 21:32:38 +0000 (21:32 +0000)]
Fix crash when reloading a page using requestAnimationFrame on iOS
https://bugs.webkit.org/show_bug.cgi?id=155465
rdar://problem/25100202

Reviewed by Tim Horton.

On iOS, it's possible for all clients for a DisplayRefreshMonitor
to be unregistered, but still get a subsequent displayDidRefresh() for that monitor.
In this case, we would remove(notFound) which release-asserts.

Fix by just checking for notFound.

Unable to test because requestAnimationFrame doesn't work in the simulator.

* platform/graphics/DisplayRefreshMonitorManager.cpp:
(WebCore::DisplayRefreshMonitorManager::displayDidRefresh):

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

3 years agoRemove usage of -[UIGestureRecognizer requireOtherGestureToFail:]
andersca@apple.com [Mon, 14 Mar 2016 21:16:43 +0000 (21:16 +0000)]
Remove usage of -[UIGestureRecognizer requireOtherGestureToFail:]
https://bugs.webkit.org/show_bug.cgi?id=155461
rdar://problem/25143282

Reviewed by Beth Dakin.

Use -[UIGestureRecognizer requireGestureRecognizerToFail:] instead, which has been API ever since UIGestureRecognizer was added.

* Platform/spi/ios/UIKitSPI.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureDoubleTapGestureRecognizer]):

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

3 years ago[WinCairo][MediaFoundation] Implement float versions of MediaPlayer methods.
peavo@outlook.com [Mon, 14 Mar 2016 20:55:18 +0000 (20:55 +0000)]
[WinCairo][MediaFoundation] Implement float versions of MediaPlayer methods.
https://bugs.webkit.org/show_bug.cgi?id=155357

Reviewed by Brent Fulgham.

It is better to implement the float versions of some of the MediaPlayer methods,
since the default implementation of the double versions is to call the float version.
Also added override keyword to overridden methods.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::seeking):
(WebCore::MediaPlayerPrivateMediaFoundation::seek):
(WebCore::MediaPlayerPrivateMediaFoundation::setRate):
(WebCore::MediaPlayerPrivateMediaFoundation::duration):
(WebCore::MediaPlayerPrivateMediaFoundation::currentTime):
(WebCore::MediaPlayerPrivateMediaFoundation::seekDouble): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble): Deleted.
(WebCore::MediaPlayerPrivateMediaFoundation::durationDouble): Deleted.
* platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:

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

3 years agoWe should be able to eliminate cloned arguments objects that use the length property
keith_miller@apple.com [Mon, 14 Mar 2016 20:55:15 +0000 (20:55 +0000)]
We should be able to eliminate cloned arguments objects that use the length property
https://bugs.webkit.org/show_bug.cgi?id=155391

Reviewed by Geoffrey Garen.

Previously if a programmer tried to use arguments.length in a strict function we would not eliminate the
arguments object. We were unable to eliminate the arguments object because the user would get a cloned arguments
object, which does not special case the length property. Thus, in order to get arguments elimination for cloned
we need to add a special case. There are two things that need to happen for the elimination to succeed.

First, we need to eliminate the CheckStructure blocking the GetByOffset for the length property. In order to
eliminate the check structure we need to prove to the Abstract Interpreter that this structure check is
unnesssary. This didn't occur before for two reasons: 1) CreateClonedArguments did not set the structure it
produced. 2) Even if CreateClonedArguments provided the global object's cloned arguments structure we would
transition the new argements object when we added the length property during construction. To fix the second
problem we now pre-assign a slot on clonedArgumentsStructure for the length property. Additionally, in order to
prevent future transitions of the structure we need to choose an indexing type for the structure. Since, not
eliminating the arguments object is so expensive we choose to have all cloned arguments start with continuous
indexing type, this avoids transitioning when otherwise we would not have to. In the future we should be smarter
about choosing the indexing type but since its relatively rare to have a arguments object escape we don't worry
about this for now.

Additionally, this patch renames all former references of outOfBandArguments to clonedArguments and adds
extra instrumentation to DFGArgumentsEliminationPhase.

* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecode/ValueRecovery.h:
(JSC::ValueRecovery::clonedArgumentsThatWereNotCreated):
(JSC::ValueRecovery::outOfBandArgumentsThatWereNotCreated): Deleted.
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::BytecodeGenerator):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGOperations.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCreateClonedArguments):
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::run):
* dfg/DFGVariableEventStream.cpp:
(JSC::DFG::VariableEventStream::tryToSetConstantRecovery):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileCreateClonedArguments):
* ftl/FTLOperations.cpp:
(JSC::FTL::operationMaterializeObjectInOSR):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_create_cloned_arguments):
(JSC::JIT::emit_op_create_out_of_band_arguments): Deleted.
* llint/LowLevelInterpreter.asm:
* runtime/ClonedArguments.cpp:
(JSC::ClonedArguments::ClonedArguments):
(JSC::ClonedArguments::createEmpty):
(JSC::ClonedArguments::createWithInlineFrame):
(JSC::ClonedArguments::createByCopyingFrom):
(JSC::ClonedArguments::createStructure):
* runtime/ClonedArguments.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::clonedArgumentsStructure):
(JSC::JSGlobalObject::outOfBandArgumentsStructure): Deleted.

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

3 years agoREGRESSION (r191691): Can't Share Selected Text
andersca@apple.com [Mon, 14 Mar 2016 20:54:15 +0000 (20:54 +0000)]
REGRESSION (r191691): Can't Share Selected Text
https://bugs.webkit.org/show_bug.cgi?id=155459
rdar://problem/24893625

Reviewed by Tim Horton.

Add the selected text as well. Somehow this got lost in the refactoring.

* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::createShareMenuItem):

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

3 years agoRevert r194125 and r194186: We're going to fix this a different way.
timothy_horton@apple.com [Mon, 14 Mar 2016 20:27:26 +0000 (20:27 +0000)]
Revert r194125 and r194186: We're going to fix this a different way.

* page/EventHandler.cpp:
(WebCore::EventHandler::clear):
* page/EventHandler.h:

* Shared/NativeWebGestureEvent.h:
* Shared/mac/NativeWebGestureEventMac.mm:
(WebKit::pointForEvent):
(WebKit::NativeWebGestureEvent::NativeWebGestureEvent):
(WebKit::distanceForTouches): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView selectFindMatch:completionHandler:]):
(-[WKWebView _web_superInputContext]):
(-[WKWebView touchesBeganWithEvent:]): Deleted.
(-[WKWebView touchesMovedWithEvent:]): Deleted.
(-[WKWebView touchesEndedWithEvent:]): Deleted.
(-[WKWebView touchesCancelledWithEvent:]): Deleted.
* UIProcess/API/mac/WKView.mm:
(-[WKView namesOfPromisedFilesDroppedAtDestination:]):
(-[WKView initWithFrame:processPool:configuration:webView:]):
(-[WKView touchesBeganWithEvent:]): Deleted.
(-[WKView touchesMovedWithEvent:]): Deleted.
(-[WKView touchesEndedWithEvent:]): Deleted.
(-[WKView touchesCancelledWithEvent:]): Deleted.
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::magnifyWithEvent):
(WebKit::WebViewImpl::smartMagnifyWithEvent):
(WebKit::WebViewImpl::rotateWithEvent):
(WebKit::WebViewImpl::touchesOrderedByAge): Deleted.
(WebKit::WebViewImpl::touchesBeganWithEvent): Deleted.
(WebKit::WebViewImpl::touchesMovedWithEvent): Deleted.
(WebKit::WebViewImpl::touchesEndedWithEvent): Deleted.
(WebKit::WebViewImpl::touchesCancelledWithEvent): Deleted.

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

3 years ago[Fetch API] FetchLoader should check for empty bodies
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 20:13:30 +0000 (20:13 +0000)]
[Fetch API] FetchLoader should check for empty bodies
https://bugs.webkit.org/show_bug.cgi?id=155440

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/request/request-consume-empty-expected.txt:
* web-platform-tests/fetch/api/request/request-consume-empty.html:
* web-platform-tests/fetch/api/response/response-consume-empty-expected.txt:
* web-platform-tests/fetch/api/response/response-consume-empty.html:

Source/WebCore:

Covered by added tests.

* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::didFinishLoading): returning empty array buffer/empty string if no data received during loading.

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

3 years ago[ES6] Make JSON.stringify ES6 compatible
sbarati@apple.com [Mon, 14 Mar 2016 20:07:16 +0000 (20:07 +0000)]
[ES6] Make JSON.stringify ES6 compatible
https://bugs.webkit.org/show_bug.cgi?id=155448

Reviewed by Sam Weinig and Mark Lam.

We weren't following the spec with respect to the "toJSON" property
of the thing being stringified. We were perform hasProperty(.)
on "toJSON" instead of get(.). This patch changes it our
implementation to perform get(value, "toJSON").

* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::isFunction):
(JSC::JSValue::isCallable):
* runtime/JSONObject.cpp:
(JSC::Stringifier::toJSON):
(JSC::Stringifier::toJSONImpl):
(JSC::Stringifier::appendStringifiedValue):
* tests/es6.yaml:
* tests/stress/proxy-json.js:
(test):
(test.let.handler.get assert):
(test.let.handler):

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

3 years agoFix build.
andersca@apple.com [Mon, 14 Mar 2016 20:06:54 +0000 (20:06 +0000)]
Fix build.

Source/WebKit/mac:

Ignore nullability warnings, create an empty PDF selection.

* WebView/WebPDFView.mm:
(-[WebPDFView centerSelectionInVisibleArea:]):
(-[WebPDFView searchFor:direction:caseSensitive:wrap:startInSelection:]):
(+[WebPDFView _PDFSelectionClass]):
(-[WebPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]):

Source/WebKit2:

Create an empty PDF selection.

* Shared/mac/PDFKitImports.h:
* Shared/mac/PDFKitImports.mm:
(WebKit::pdfSelectionClass):
* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
(WebKit::PDFPlugin::nextMatchForString):

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

3 years ago[ES6] Disallow var assignments in for-in loops
sbarati@apple.com [Mon, 14 Mar 2016 19:40:01 +0000 (19:40 +0000)]
[ES6] Disallow var assignments in for-in loops
https://bugs.webkit.org/show_bug.cgi?id=155451

Reviewed by Mark Lam.

Source/JavaScriptCore:

We're doing this in its own patch instead of the patch for https://bugs.webkit.org/show_bug.cgi?id=155384
because last time we made this change it broke some websites. Lets try making
it again because it's what the ES6 mandates. If it still breaks things we will
roll it out.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseForStatement):

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

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

3 years agoUnable to commit previews in Mobile Safari
bdakin@apple.com [Mon, 14 Mar 2016 19:33:22 +0000 (19:33 +0000)]
Unable to commit previews in Mobile Safari
https://bugs.webkit.org/show_bug.cgi?id=155450
-and corresponding-
rdar://problem/25135529

Reviewed by Tim Horton.

_uiDelegateProvidedPreviewingViewController was being consulted before
invoking the old SPI, which was always wrong. It should have been consulted
before calling the new API! But also, it doesn’t seem to be necessary at all
since [WKContentView _previewItemController:commitPreview:] is only invoked
when a custom view controller has been provided.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _registerPreview]):
(-[WKContentView _unregisterPreview]):
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:commitPreview:]):

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

3 years agoRegression(r197981): Huge regression on Mac PLT
cdumez@apple.com [Mon, 14 Mar 2016 19:01:28 +0000 (19:01 +0000)]
Regression(r197981): Huge regression on Mac PLT
https://bugs.webkit.org/show_bug.cgi?id=155443
<rdar://problem/25113391>

Reviewed by Gavin Barraclough.

We have experience a huge regression on Mac PLT after r197981, so
disable the feature until the performance issue is resolved.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayer::supportsSmoothedLayerText):

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

3 years agoassignments in for-in/for-of header not allowed
sbarati@apple.com [Mon, 14 Mar 2016 18:38:28 +0000 (18:38 +0000)]
assignments in for-in/for-of header not allowed
https://bugs.webkit.org/show_bug.cgi?id=155384

Reviewed by Darin Adler.

Source/JavaScriptCore:

This patch prevents assignments to the loop variable
in for in/of loops in all but one situation. The following
syntax is still allowed even though the spec prevents it:
```
for (var i = X in blah) ;
```
If the loop contains let/const, destructuring, or is a for-of
loop, we always throw a syntax error if there is an assignment.
We can do this with full backwards compatibility.
We only allow the above type of for-in loops because Oliver told
me that when he tried to make such programs illegal he ran
into real websites breaking.

This patch also removed the !::CreatesAST compile-time branch when checking
assignments to new.target. This was a dangerous thing for me
to introduce into our parser. There are times where ::CreatesAST
is true but we also want to check for syntax errors. For example,
when parsing the top-level AST of a program. Though this check
was technically correct, it's dangerous to have. It was correct
because we would always be reparsing the new.target assignment
because new.target is only allowed inside a function. That made it
so that (!::CreatesAST <=> we care about new.target assignment syntax errors).
But, (!::CreatesAST <=> we care about syntax error X) is not true in general.
I think it's safer to remove such code.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createNewTargetExpr):
(JSC::ASTBuilder::isNewTarget):
(JSC::ASTBuilder::createResolve):
* parser/Nodes.h:
(JSC::ExpressionNode::isBoolean):
(JSC::ExpressionNode::isSpreadExpression):
(JSC::ExpressionNode::isSuperNode):
(JSC::ExpressionNode::isNewTarget):
(JSC::ExpressionNode::isBytecodeIntrinsicNode):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseForStatement):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseUnaryExpression):

LayoutTests:

* js/parser-syntax-check-expected.txt:
* js/script-tests/parser-syntax-check.js:

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

3 years agoPingHandle delete's itself but pointer is still used by handleDataURL
bfulgham@apple.com [Mon, 14 Mar 2016 18:29:05 +0000 (18:29 +0000)]
PingHandle delete's itself but pointer is still used by handleDataURL
https://bugs.webkit.org/show_bug.cgi?id=154752
<rdar://problem/24872347>

Source/WebCore:

Patch by Chris Vienneau <chris.vno@outlook.com> on 2016-03-14
Reviewed by Alex Christensen.

When a PingHandle is destroyed, we should tell its client so that the client can clear the pointer it
holds to the element to avoid accidentally attempting to use deallocated memory.

The ResourceHandle's client member may be null after "didReceiveResponse" is called. We should confirm
the client is still valid after these calls.

* platform/network/DataURL.cpp:
(WebCore::handleDataURL): Check the client pointer before using it.
* platform/network/PingHandle.h:
(WebCore::PingHandle::~PingHandle): Notify the client we are being destroyed.
* platform/platform/network/ResourceHandle.h:

Source/WebKit2:

Reviewed by Alex Christensen.

When a PingLoad is destroyed, we should tell its client so that the client can clear the pointer it
holds to the element to avoid accidentally attempting to use deallocated memory.

* NetworkProcess/PingLoad.h:
(WebKit::PingLoad::~PingLoad): Notify the client we are being destroyed.

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

3 years agoNegative outline offset could break curved outline-style: auto
zalan@apple.com [Mon, 14 Mar 2016 18:13:02 +0000 (18:13 +0000)]
Negative outline offset could break curved outline-style: auto
https://bugs.webkit.org/show_bug.cgi?id=155416

Reviewed by Tim Horton.

When radius becomes negative the rounded rect could end up being un-renderable -> no rounded corners at all.

Source/WebCore:

Test: fast/inline/hidpi-outline-auto-negative-offset-with-border-radius.html

* platform/graphics/PathUtilities.cpp:
(WebCore::adjustedtRadiiForHuggingCurve):

LayoutTests:

* fast/inline/hidpi-outline-auto-negative-offset-with-border-radius-expected.html: Added.
* fast/inline/hidpi-outline-auto-negative-offset-with-border-radius.html: Added.

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

3 years agoRemove blank lines after #include "config.h"
ddkilzer@apple.com [Mon, 14 Mar 2016 18:09:54 +0000 (18:09 +0000)]
Remove blank lines after #include "config.h"

Follow-up fix from review comments on Bug 155394.

* TestWebKitAPI/PlatformUtilities.cpp:
* TestWebKitAPI/Tests/WTF/RefLogger.cpp:

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

3 years ago[Outline: auto] Fractional radius value could result in non-renderable rounded border.
zalan@apple.com [Mon, 14 Mar 2016 18:01:24 +0000 (18:01 +0000)]
[Outline: auto] Fractional radius value could result in non-renderable rounded border.
https://bugs.webkit.org/show_bug.cgi?id=155420

Reviewed by Tim Horton.

RoundedRect::pixelSnappedRoundedRectForPainting ensures that the rounded rect is always renderable.

Source/WebCore:

Test: fast/inline/hidpi-outline-auto-with-fractional-radius.html

* platform/graphics/PathUtilities.cpp:
(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
* platform/graphics/PathUtilities.h:
* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintFocusRing):

LayoutTests:

* fast/inline/hidpi-outline-auto-with-fractional-radius-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-fractional-radius.html: Added.

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

3 years agoUnreviewed.
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 17:30:03 +0000 (17:30 +0000)]
Unreviewed.
Marking imported/fetch/api/request/request-consume.html as flaky on debug builds.

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

3 years agoOutline: auto has sharp corners with single line contenteditable.
zalan@apple.com [Mon, 14 Mar 2016 17:22:54 +0000 (17:22 +0000)]
Outline: auto has sharp corners with single line contenteditable.
https://bugs.webkit.org/show_bug.cgi?id=155418

Reviewed by Tim Horton.

Multiple rectangles assumed multiline content and it broke bottomLeft and bottomRight corner check.
This patch adds fast path for polygons with 4 corners.

Source/WebCore:

Test: fast/inline/hidpi-outline-auto-with-one-focusring-rect.html

* platform/graphics/PathUtilities.cpp:
(WebCore::cornerType):
(WebCore::cornerTypeForMultiline):
(WebCore::rectFromPolygon):
(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):

LayoutTests:

* fast/inline/hidpi-outline-auto-with-one-focusring-rect-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-one-focusring-rect.html: Added.

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

3 years ago[AX] SVG element with child desc not exposed
jdiggs@igalia.com [Mon, 14 Mar 2016 17:18:53 +0000 (17:18 +0000)]
[AX] SVG element with child desc not exposed
https://bugs.webkit.org/show_bug.cgi?id=155374

Reviewed by Darin Adler.

Source/WebCore:

Covered by the accessibility/w3c-svg-roles.html test, which was updated.

AccessibilitySVGRoot is now a subclass of AccessibilitySVGElement, which
exposes SVG elements with a child desc element as per the specification.
Also made existing protected methods private.

* accessibility/AccessibilitySVGElement.h:
* accessibility/AccessibilitySVGRoot.cpp:
(WebCore::AccessibilitySVGRoot::AccessibilitySVGRoot):
(WebCore::AccessibilitySVGRoot::parentObject):
* accessibility/AccessibilitySVGRoot.h:

LayoutTests:

* platform/gtk/accessibility/w3c-svg-roles-expected.txt: Updated.
* platform/mac/accessibility/w3c-svg-roles-expected.txt: Updated.

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

3 years agoSkip asserting test http/tests/security/aboutBlank/security-context-write.html
ryanhaddad@apple.com [Mon, 14 Mar 2016 16:55:00 +0000 (16:55 +0000)]
Skip asserting test http/tests/security/aboutBlank/security-context-write.html
https://bugs.webkit.org/show_bug.cgi?id=94458

Unreviewed test gardening.

* TestExpectations:

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

3 years agoAdd copy/paste plug-in check for XHTML document
darin@apple.com [Mon, 14 Mar 2016 16:27:27 +0000 (16:27 +0000)]
Add copy/paste plug-in check for XHTML document
https://bugs.webkit.org/show_bug.cgi?id=106350

* TestExpectations: Re-enable test now that it works in WebKit 1.
* editing/pasteboard/paste-noplugin-xhtml.xhtml: Fixed problem where test would try to
call setBlockAllPlugins even when it did not exist. Turns out that's needed for the
test to run under WebKit 2, but not needed at all under WebKit 1.

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

3 years agoBuild fix.
ap@apple.com [Mon, 14 Mar 2016 16:16:18 +0000 (16:16 +0000)]
Build fix.

* Modules/fetch/FetchBodyOwner.cpp:
(WebCore::FetchBodyOwner::loadedBlobAsText):

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

3 years ago[Fetch API] Implement data resolution for blob stored in Body
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 15:58:14 +0000 (15:58 +0000)]
[Fetch API] Implement data resolution for blob stored in Body
https://bugs.webkit.org/show_bug.cgi?id=155359

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* web-platform-tests/fetch/api/request/request-consume-expected.txt:
* web-platform-tests/fetch/api/request/request-consume.html:
* web-platform-tests/fetch/api/request/request-init-002-expected.txt:
* web-platform-tests/fetch/api/response/response-consume-expected.txt:
* web-platform-tests/fetch/api/response/response-consume.html:
* web-platform-tests/fetch/api/response/response-init-002-expected.txt:

Source/WebCore:

Introducing FetchLoader as a wrapper around ThreadableLoader to load resources.
FetchLoader can retrieve data as text or array buffer. It only supports blob currently.

Introducing FetchLoaderClient interface and FetchBodyOwner::BlobLoader as specifc blob loader client.

Covered by existing rebased tests.

* CMakeLists.txt:
* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::loadingType):
(WebCore::FetchBody::loadedAsArrayBuffer):
(WebCore::FetchBody::loadedAsText):
* Modules/fetch/FetchBody.h:
* Modules/fetch/FetchBodyOwner.cpp: Added.
(WebCore::FetchBodyOwner::FetchBodyOwner):
(WebCore::FetchBodyOwner::loadBlob):
(WebCore::FetchBodyOwner::finishBlobLoading):
(WebCore::FetchBodyOwner::blobLoadingFailed):
(WebCore::FetchBodyOwner::BlobLoader::didReceiveResponse):
* Modules/fetch/FetchBodyOwner.h:
(WebCore::FetchBodyOwner::loadedBlobAsText):
(WebCore::FetchBodyOwner::loadedBlobAsArrayBuffer):
(WebCore::FetchBodyOwner::blobLoadingSucceeded):
* Modules/fetch/FetchLoader.cpp: Added.
(WebCore::FetchLoader::start):
(WebCore::FetchLoader::FetchLoader):
(WebCore::FetchLoader::stop):
(WebCore::FetchLoader::didReceiveResponse):
(WebCore::FetchLoader::didReceiveData):
(WebCore::FetchLoader::didFinishLoading):
(WebCore::FetchLoader::didFail):
* Modules/fetch/FetchLoader.h: Added.
* Modules/fetch/FetchLoaderClient.h: Added.
(WebCore::FetchLoaderClient::~FetchLoaderClient):
(WebCore::FetchLoaderClient::didReceiveResponse):
(WebCore::FetchLoaderClient::didFinishLoadingAsText):
(WebCore::FetchLoaderClient::didFinishLoadingAsArrayBuffer):
* WebCore.xcodeproj/project.pbxproj:

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

3 years agoRestored ENABLE_WEBCORE option and used it in JSCOnly port.
commit-queue@webkit.org [Mon, 14 Mar 2016 15:42:54 +0000 (15:42 +0000)]
Restored ENABLE_WEBCORE option and used it in JSCOnly port.
https://bugs.webkit.org/show_bug.cgi?id=155428

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-14
Reviewed by Michael Catanzaro.

This is a partial revert of r182624.

* CMakeLists.txt:
* Source/CMakeLists.txt:
* Source/cmake/OptionsJSCOnly.cmake:
* Source/cmake/WebKitFS.cmake:

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

3 years agoUnreviewed: Add my professional email address.
fred.wang@free.fr [Mon, 14 Mar 2016 15:40:03 +0000 (15:40 +0000)]
Unreviewed: Add my professional email address.

* Scripts/webkitpy/common/config/contributors.json:

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

3 years agoSkip accessibility/internal-link-anchors2.html as the linked ui element API is not...
fred.wang@free.fr [Mon, 14 Mar 2016 15:26:25 +0000 (15:26 +0000)]
Skip accessibility/internal-link-anchors2.html as the linked ui element API is not supported for links.

Unreviewed test gardening.

* platform/gtk/TestExpectations:

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

3 years agoMake MathML colspan/rowspan consistent with HTML table cells.
fred.wang@free.fr [Mon, 14 Mar 2016 15:19:12 +0000 (15:19 +0000)]
Make MathML colspan/rowspan consistent with HTML table cells.
https://bugs.webkit.org/show_bug.cgi?id=150253

Patch by Frederic Wang <fwang@igalia.com> on 2016-03-14
Reviewed by Martin Robinson.

Source/WebCore:

Test: mathml/rowspan-crash.xhtml

We make MathMLElement::colSpan and MathMLElement::rowSpan consistent with the corresponding functions in HTMLTableCellElement.cpp.
These functions now return unsigned integers, use the same parsing functions and set a maximum for rowspan.
This latter change fixes crash/timeout with large values of rowspan.

* mathml/MathMLElement.cpp: Include HTMLParserIdioms to use limitToOnlyHTMLNonNegative.
(WebCore::MathMLElement::colSpan): Use unsigned integer and limitToOnlyHTMLNonNegative.
(WebCore::MathMLElement::rowSpan): ditto. We also use the same maximum limit as HTMLTableCellElement.
* mathml/MathMLElement.h: Make colSpan and rowSpan return unsigned integers.

LayoutTests:

We import crashing test from bug 150253.

* mathml/rowspan-crash-expected.txt: Added.
* mathml/rowspan-crash.xhtml: Added.

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

3 years ago Continue work on https://bugs.webkit.org/show_bug.cgi?id=106350
darin@apple.com [Mon, 14 Mar 2016 15:17:06 +0000 (15:17 +0000)]
    Continue work on https://bugs.webkit.org/show_bug.cgi?id=106350

        * TestExpectations: Disable test fow now since it seems to be failing in WebKit 1 and
        depends on hooks not present in WebKit 1 test runner.

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

3 years agoEnable GSS-Negotiate support in libsoup
commit-queue@webkit.org [Mon, 14 Mar 2016 15:13:48 +0000 (15:13 +0000)]
Enable GSS-Negotiate support in libsoup
https://bugs.webkit.org/show_bug.cgi?id=155354

Patch by Tomas Popela <tpopela@redhat.com> on 2016-03-14
Reviewed by Carlos Garcia Campos.

Enable the SOUP_TYPE_AUTH_NEGOTIATE feature if libsoup was compiled
with the GSS-Negotiate support.

* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::SoupNetworkSession):

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

3 years agoUnreviewed. Fix the GTK+ build after r198124.
carlosgc@webkit.org [Mon, 14 Mar 2016 14:13:46 +0000 (14:13 +0000)]
Unreviewed. Fix the GTK+ build after r198124.

WebsiteDataTypes is now an OptionSet.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache):

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

3 years ago[GTK] Reimplement webkit_web_context_clear_cache functionality.
carlosgc@webkit.org [Mon, 14 Mar 2016 13:36:48 +0000 (13:36 +0000)]
[GTK] Reimplement webkit_web_context_clear_cache functionality.
https://bugs.webkit.org/show_bug.cgi?id=146041

Reviewed by Michael Catanzaro.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_clear_cache):

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

3 years agoWeb platform test server should not try to launch servers on already bound sockets
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 12:10:23 +0000 (12:10 +0000)]
Web platform test server should not try to launch servers on already bound sockets
https://bugs.webkit.org/show_bug.cgi?id=141157

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

* resources/config.json: Changed wpt https port from 8443 to 9443.
* web-platform-tests/fetch/api/basic/mode-no-cors-expected.txt: Updated according https port change.
* web-platform-tests/fetch/api/basic/mode-no-cors-worker-expected.txt: Ditto.
* web-platform-tests/fetch/api/basic/mode-same-origin-expected.txt: Ditto.
* web-platform-tests/fetch/api/basic/mode-same-origin-worker-expected.txt: Ditto.

Tools:

* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(wpt_config_json): Load WPT config from LayoutTests/imported/w3c/resources/config.json.
(base_url): Refactored to use wpt_config_json routine.
(WebPlatformTestServer.__init__): Fill port mappings according WPT config.

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

3 years agoAdd slotchange event
rniwa@webkit.org [Mon, 14 Mar 2016 12:02:21 +0000 (12:02 +0000)]
Add slotchange event
https://bugs.webkit.org/show_bug.cgi?id=155424
<rdar://problem/24997534>

Reviewed by Antti Koivisto.

Source/WebCore:

Added `slotchange` event as discussed on https://github.com/w3c/webcomponents/issues/288.

While the exact semantics of it could still evolve over time, this patch implements as
an asynchronous event that fires on a slot element whenever its distributed nodes change
(flattened assigned nodes):
http://w3c.github.io/webcomponents/spec/shadow/#dfn-distributed-nodes

Since inserting or removing an element from a shadow host could needs to enqueue this event
on the right slot element, this patch moves the invalidation point of element removals and
insertions from Element::childrenChanged to Element::insertedInto and Element::removedFrom.
Text nodes are still invalidated at Element::childrenChanged for performance reasons
since it could only appear within a default slot element.

Because this more fine-grained invalidation needs to be overridden by HTMLDetailsElement,
we now subclass SlotAssignment in HTMLDetailsElement instead of passing in a std::function.

Test: fast/shadow-dom/slotchange-event.html

* dom/Document.cpp:
(WebCore::Document::enqueueSlotchangeEvent): Added.
* dom/Document.h:
* dom/Element.cpp:
(WebCore::Element::attributeChanged): Call hostChildElementDidChangeSlotAttr.
(WebCore::Element::insertedInto): Call hostChildElementDidChange.
(WebCore::Element::removedFrom): Ditto.
(WebCore::Element::childrenChanged): Don't invalidate the slots on ElementInserted and
ElementRemoved since they're now done in Element::insertedInto and Element::removedFrom.
* dom/Event.cpp:
(WebCore::Event::scoped): slotchange event is scoped.
* dom/EventNames.h: Added eventNames().slotchange.
* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::invalidateSlotAssignments): Deleted.
(WebCore::ShadowRoot::invalidateDefaultSlotAssignments): Deleted.
* dom/ShadowRoot.h:
(ShadowRoot): Added more fine-grained invalidators, mirroring changes to SlotAssignment.
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::SlotAssignment): Removed a variant that takes SlotNameFunction
since HTMLDetailsElement now subclasses SlotAssignment.
(WebCore::SlotAssignment::~SlotAssignment): Added now that the class is virtual.
(WebCore::recursivelyFireSlotChangeEvent): Added.
(WebCore::SlotAssignment::didChangeSlot): Added. Invalidates the style tree only if there
is a corresponding slot element, and fires slotchange event. When the slot element we found
in this shadow tree is assigned to a slot element inside an inner shadow tree, recursively
fire slotchange event on each such inner slots.
(WebCore::SlotAssignment::hostChildElementDidChange): Added. Update the matching slot when
an element is inserted or removed under a shadow host.
(WebCore::SlotAssignment::assignedNodesForSlot): Removed the superfluous early exit to an
release assert since addSlotElementByName should always create a SlotInfo for each element.
(WebCore::SlotAssignment::slotNameForHostChild): Added. This is the equivalent of old
m_slotNameFunction which DetailsSlotAssignment overrides.
(WebCore::SlotAssignment::invalidateDefaultSlot): Deleted.
(WebCore::SlotAssignment::findFirstSlotElement): Added an assertion. slotInfo.element must
be nullptr if elementCount is 0, and elementCount must be 0 if slotInfo.element is nullptr
after calling resolveAllSlotElements, which traverses the entire shadow tree to find all
slot elements.
(WebCore::SlotAssignment::assignSlots):
* dom/SlotAssignment.h: Implemented inline functions of ShadowRoot here to avoid including
SlotAssignment.h in ShadowRoot.h. Not inlining them results in extra function calls for all
builtin elements with shadow root without slot elements, which impacts performance.
(WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost): Added.
(WebCore::ShadowRoot::didChangeDefaultSlot): Added.
(WebCore::ShadowRoot::hostChildElementDidChange): Added.
(WebCore::ShadowRoot::hostChildElementDidChangeSlotAttribute): Added.
(WebCore::ShadowRoot::innerSlotDidChange):
* html/HTMLDetailsElement.cpp:
(WebCore::DetailsSlotAssignment): Added. Subclasses SlotAssignment to override
hostChildElementDidChange and slotNameForHostChild.
(WebCore::DetailsSlotAssignment::hostChildElementDidChange): Added. We don't check if this
is the first summary element since we don't know the answer when this function is called
inside Element::removedFrom.
(WebCore::DetailsSlotAssignment::slotNameForHostChild): Renamed from slotNameFunction. Also
removed the code to return nullAtom when details element is not open as that messes up new
fine-grained invalidation. Insert/remove the slot element in parseAttribute instead.
(WebCore::HTMLDetailsElement::didAddUserAgentShadowRoot): Don't insert the slot element for
the summary since the details element is not open now.
(WebCore::HTMLDetailsElement::parseAttribute): Remove and insert the slot element for the
summary here instead of changing the behavior of slotNameForHostChild.
* html/HTMLDetailsElement.h:
* html/HTMLSlotElement.cpp:
(WebCore::HTMLSlotElement::enqueueSlotChangeEvent): Added. Enqueues a new slotchange event
if we haven't done so for this element yet.
(WebCore::HTMLSlotElement::dispatchEvent): Added. Clear m_hasEnqueuedSlotChangeEvent when
dispatching a slotchange event so that a subsequent call to enqueueSlotChangeEvent would
enqueue a new event. Note scripts call EventTarget::dispatchEventForBindings instead.
* html/HTMLSlotElement.h:

LayoutTests:

Added a W3C style testharness.js test.

* fast/shadow-dom/ShadowRoot-interface-expected.txt:
* fast/shadow-dom/ShadowRoot-interface.html: Don't import testharness.css from svn.webkit.org.
* fast/shadow-dom/slotchange-event-expected.txt: Added.
* fast/shadow-dom/slotchange-event.html: Added.

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

3 years agoWeb Inspector: Reduce unnecessary dashboard repaints
nvasilyev@apple.com [Mon, 14 Mar 2016 11:38:13 +0000 (11:38 +0000)]
Web Inspector: Reduce unnecessary dashboard repaints
https://bugs.webkit.org/show_bug.cgi?id=155425
<rdar://problem/25138247>

Reviewed by Timothy Hatcher.

* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem.):
newText is a number for console message counters.

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

3 years agoIntroduce CallWith=Document in binding generator
youenn.fablet@crf.canon.fr [Mon, 14 Mar 2016 09:44:44 +0000 (09:44 +0000)]
Introduce CallWith=Document in binding generator
https://bugs.webkit.org/show_bug.cgi?id=155358

Reviewed by Darin Adler.

Covered by existing tests and binding test.

* Modules/notifications/Notification.cpp:
(WebCore::Notification::permission): Taking a Document& instead of ScriptExecutionContext&.
(WebCore::Notification::requestPermission): Ditto.
* Modules/notifications/Notification.h:
* Modules/notifications/Notification.idl: Using CallWith=Document.
* bindings/scripts/CodeGeneratorJS.pm: Adding support for CallWith=Document and changed name from scriptContext to context.
(GenerateCallWith):
(GenerateConstructorDefinition):
* bindings/scripts/IDLAttributes.txt: Adding support for CallWith=Document.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_with_document_argument):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::jsTestInterfacePrototypeFunctionImplementsMethod2):
(WebCore::jsTestInterfacePrototypeFunctionSupplementalMethod2):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjWithScriptExecutionContextAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::jsTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
(WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContext):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptState):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateObjException):
(WebCore::jsTestObjPrototypeFunctionWithScriptExecutionContextAndScriptStateWithSpaces):
(WebCore::jsTestObjPrototypeFunctionWithDocumentArgument):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj withDocumentArgument]):
* bindings/scripts/test/TestObj.idl: Adding binding test.
* page/DOMWindow.cpp:
(WebCore::DOMWindow::focus): Taking a Document& instead of ScriptExecutionContext&.
(WebCore::DOMWindow::close): Ditto.
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/History.cpp:
(WebCore::History::back): Ditto.
(WebCore::History::forward): Ditto.
(WebCore::History::go): Ditto.
* page/History.h:
* page/History.idl:
* testing/Internals.cpp:
(WebCore::InspectorStubFrontend::closeWindow): Calling DOMWindow::close() directly.

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

3 years agoInstall WebKit2 WebProcess NetworkProcess on OSX when not building the Mac PORT
commit-queue@webkit.org [Mon, 14 Mar 2016 08:37:50 +0000 (08:37 +0000)]
Install WebKit2 WebProcess NetworkProcess on OSX when not building the Mac PORT
https://bugs.webkit.org/show_bug.cgi?id=152651

Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com> on 2016-03-14
Reviewed by Philippe Normand.

* CMakeLists.txt:

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

3 years agoAdd copy/paste plug-in check for XHTML document
darin@apple.com [Mon, 14 Mar 2016 06:27:43 +0000 (06:27 +0000)]
Add copy/paste plug-in check for XHTML document
https://bugs.webkit.org/show_bug.cgi?id=106350

Reviewed by David Kilzer.

This bug was filed because of the assumption that there was a bug, but it
turns out that even in XHTML documents, we use HTML tree builder, so there is
no bug. Thus this just adds the test that demonstrates this.

* editing/pasteboard/paste-noplugin-xhtml-expected.txt: Added.
* editing/pasteboard/paste-noplugin-xhtml.xhtml: Added.

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

3 years agoWeb Inspector: Large repaints when typing any character in console
nvasilyev@apple.com [Mon, 14 Mar 2016 06:20:29 +0000 (06:20 +0000)]
Web Inspector: Large repaints when typing any character in console
https://bugs.webkit.org/show_bug.cgi?id=155387
<rdar://problem/25125720>

Reviewed by Timothy Hatcher.

* UserInterface/Views/Main.css:
(#content):

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

3 years agoWeb Inspector: Memory timeline pie charts are misaligned when there is no recording
commit-queue@webkit.org [Mon, 14 Mar 2016 05:57:39 +0000 (05:57 +0000)]
Web Inspector: Memory timeline pie charts are misaligned when there is no recording
https://bugs.webkit.org/show_bug.cgi?id=155421

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-03-13
Reviewed by Timothy Hatcher.

* UserInterface/Views/MemoryTimelineView.css:
(.timeline-view.memory > .content > .overview):
Removed top padding to match bottom padding.

(.timeline-view.memory .legend > .row):
(.timeline-view.memory .legend):
Moved specified width to prevent unrecorded timelines from having graphs
that are offset horizontally.

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

3 years agoRemove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
commit-queue@webkit.org [Mon, 14 Mar 2016 04:52:59 +0000 (04:52 +0000)]
Remove ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX) guards
https://bugs.webkit.org/show_bug.cgi?id=155417

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-03-13
Reviewed by Yusuke Suzuki.

.:

* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression): Deleted.
(JSC::Parser<LexerType>::parseMemberExpression): Deleted.

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

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

3 years agoImplement unprivileged execCommand("copy") and execCommand("cut")
weinig@apple.com [Mon, 14 Mar 2016 04:43:58 +0000 (04:43 +0000)]
Implement unprivileged execCommand("copy") and execCommand("cut")
<rdar://problem/24354406>
https://bugs.webkit.org/show_bug.cgi?id=146336

Reviewed by Dean Jackson.

Source/WebCore:

Test: editing/execCommand/clipboard-access-with-user-gesture.html

* WebCore.xcodeproj/project.pbxproj:
Add new files.

* editing/ClipboardAccessPolicy.h:
Added.

* editing/EditorCommand.cpp:
(WebCore::defaultValueForSupportedCopyCut):
(WebCore::supportedCopyCut):
Match other browsers and allow the copy and cut commands
to be executed when there is a user gesture.

* page/Settings.h:
Add include of ClipboardAccessPolicy.h.

* page/Settings.in:
Add new setting for ClipboardAccessPolicy

LayoutTests:

* editing/execCommand/clipboard-access-with-user-gesture-expected.txt: Added.
* editing/execCommand/clipboard-access-with-user-gesture.html: Added.
Add test for using execCommand("copy") and execCommand("cut") during a user gesture.

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

3 years agoDRT should enable WebGL by default on Mac
dino@apple.com [Mon, 14 Mar 2016 03:58:26 +0000 (03:58 +0000)]
DRT should enable WebGL by default on Mac
https://bugs.webkit.org/show_bug.cgi?id=155419
<rdar://problem/25136981>

Reviewed by Sam Weinig.

Tools:

For some reason, lost in time, WebGL was enabled
by default on trunk, but disabled by default
in DumpRenderTree when using WebKit 1. This
was very annoying, because each test had
an explicit command to enable it.

* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues): Deleted WebGL line.

LayoutTests:

Update all the tests that no longer have to explicitly
turn WebGL on.

* compositing/backface-visibility/backface-visibility-webgl.html:
* compositing/visibility/visibility-simple-webgl-layer.html:
* compositing/webgl/webgl-background-color.html:
* compositing/webgl/webgl-no-alpha.html:
* compositing/webgl/webgl-nonpremultiplied-blend.html:
* compositing/webgl/webgl-reflection.html:
* compositing/webgl/webgl-repaint.html:
* fast/canvas/webgl/antialiasing-enabled.html:
* fast/canvas/webgl/canvas-resize-crash.html:
* fast/canvas/webgl/css-webkit-canvas-repaint.html:
* fast/canvas/webgl/css-webkit-canvas.html:
* fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays-expected.txt:
* fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays.html:
* fast/canvas/webgl/premultiplyalpha-test.html:
* fast/canvas/webgl/resources/webgl-test.js:
(initNonKhronosFramework): Deleted.
* fast/canvas/webgl/texImage2DImageDataTest.html:
* fast/canvas/webgl/toDataURL-unpremultipliedAlpha.html:
* fast/canvas/webgl/unprefixed-context.html:
* fast/canvas/webgl/webgl-composite-modes-repaint.html:
* fast/canvas/webgl/webgl-composite-modes.html:
* fast/canvas/webgl/webgl-drawarrays-crash.html:
* fast/canvas/webgl/webgl-layer-update.html:
* fast/canvas/webgl/webgl-reload-crash.html:
* http/tests/canvas/webgl/origin-clean-conformance.html:
* http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html:
* http/tests/security/webgl-remote-read-remote-image-allowed.html:
* http/tests/security/webgl-remote-read-remote-image-blocked-no-crossorigin.html:
* http/tests/webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js:
* http/tests/webgl/1.0.2/resources/webgl_test_files/resources/js-test-pre.js:
* http/tests/webgl/1.0.2/resources/webkit-webgl-test-harness.js:
* imported/blink/compositing/draws-content/webgl-simple-background.html:
* webgl/1.0.2/resources/webgl_test_files/conformance/more/unit.js:
* webgl/1.0.2/resources/webgl_test_files/resources/js-test-pre.js:
* webgl/1.0.2/resources/webkit-webgl-test-harness.js:
* webgl/1.0.3/resources/webgl_test_files/conformance/more/unit.js:
* webgl/1.0.3/resources/webgl_test_files/resources/js-test-pre.js:
* webgl/1.0.3/resources/webkit-webgl-test-harness.js:
* webgl/resources/webkit-webgl-test-harness.js:

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

3 years agoREGRESSION (r190840): crash inside details element's slotNameFunction
rniwa@webkit.org [Mon, 14 Mar 2016 01:57:17 +0000 (01:57 +0000)]
REGRESSION (r190840): crash inside details element's slotNameFunction
https://bugs.webkit.org/show_bug.cgi?id=155388

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by HTMLDetailsElement::isActiveSummary calling findAssignedSlot with a summary element
inside the shadow tree of the detials element. Fixed it by existing early when the summary element passed
to isActiveSummary is not a direct child of the details element.

Test: fast/html/details-summary-tabindex-crash.html

* dom/ShadowRoot.cpp:
(WebCore::ShadowRoot::findAssignedSlot): Added an assertion for regression testing.
* dom/SlotAssignment.cpp:
(WebCore::SlotAssignment::findAssignedSlot): Removed the superfluous call to assignSlots added in r190840.
There is no need to update the slot assignments here (entires in m_slots are added or removed by
addSlotElementByName or removeSlotElementByName and assignSlots only updates assignedNodes in each SlotInfo
which is never used in this function or findFirstSlotElement.
* html/HTMLDetailsElement.cpp:
(WebCore::HTMLDetailsElement::isActiveSummary): Fixed the bug.

LayoutTests:

Added a regression test.

* fast/html/details-summary-tabindex-crash-expected.txt: Added.
* fast/html/details-summary-tabindex-crash.html: Added.

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

3 years ago[Mac] Injected bundle in relocatable WebContent service can’t use XPC services from...
mitz@apple.com [Mon, 14 Mar 2016 01:44:08 +0000 (01:44 +0000)]
[Mac] Injected bundle in relocatable WebContent service can’t use XPC services from other relocatable frameworks
https://bugs.webkit.org/show_bug.cgi?id=155414
<rdar://problem/24428418>

Reviewed by Sam Weinig.

* Configurations/DebugRelease.xcconfig:
  Set WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT to NO, because
  engineering builds are ad-hoc signed and therefore can’t have a private entitlement.

* Configurations/WebContent-OSX.entitlements: Added. Includes the XPC domain extension
  entitlement.

* Configurations/WebContentService.xcconfig:
  Set WK_WEBCONTENT_SERVICE_NEEDS_XPC_DOMAIN_EXTENSION_ENTITLEMENT to YES if not already set
  and the framework is relocatable. Set CODE_SIGN_ENTITLEMENTS to the new entitlements file
  if the domain extension entitlement is needed.

* WebKit2.xcodeproj/project.pbxproj: Added reference to new file.

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

3 years ago<attachment> should be a runtime-enabled feature
dino@apple.com [Mon, 14 Mar 2016 01:09:17 +0000 (01:09 +0000)]
<attachment> should be a runtime-enabled feature
https://bugs.webkit.org/show_bug.cgi?id=155413
<rdar://problem/25120753>

Reviewed by Sam Weinig and Anders Carlsson.

Source/WebKit/mac:

Add an internal setting on WebPreferences
to enable the <attachment> element support.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences attachmentElementEnabled]):
(-[WebPreferences setAttachmentElementEnabled:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add an internal setting on WKWebViewConfiguration
to enable the <attachment> element support.

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _attachmentElementEnabled]):
(-[WKWebViewConfiguration _setAttachmentElementEnabled:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

LayoutTests:

Now that <attachment> is disabled by default, use an
internal setting to turn them back on test by test.

* fast/attachment/attachment-default-icon-expected.html:
* fast/attachment/attachment-default-icon.html:
* fast/attachment/attachment-disabled-dom.html:
* fast/attachment/attachment-disabled-rendering.html:
* fast/attachment/attachment-dom.html:
* fast/attachment/attachment-folder-icon-expected.html:
* fast/attachment/attachment-folder-icon.html:
* fast/attachment/attachment-icon-from-file-extension-expected.html:
* fast/attachment/attachment-icon-from-file-extension.html:
* fast/attachment/attachment-label-highlight.html:
* fast/attachment/attachment-progress.html:
* fast/attachment/attachment-rendering.html:
* fast/attachment/attachment-select-on-click-inside-user-select-all.html:
* fast/attachment/attachment-select-on-click.html:
* fast/attachment/attachment-subtitle.html:
* fast/attachment/attachment-title.html:
* fast/attachment/attachment-type-attribute-expected.html:
* fast/attachment/attachment-type-attribute.html:
* editing/pasteboard/copy-paste-attachment.html:
* editing/pasteboard/drag-and-drop-attachment-contenteditable.html:

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

3 years agoComposedTreeIterator fails to traverse slots if root is shadow host
antti@apple.com [Sun, 13 Mar 2016 22:54:12 +0000 (22:54 +0000)]
ComposedTreeIterator fails to traverse slots if root is shadow host
https://bugs.webkit.org/show_bug.cgi?id=155407

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/shadow-dom/composed-tree-shadow-subtree.html

* dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::ComposedTreeIterator):

    Traversal functions assume m_contextStack is deeper than 1 before they need to enter slot traversal code paths.
    Call initializeContextStack in case of shadow host which does the right thing.

(WebCore::ComposedTreeIterator::traverseSiblingInSlot):
(WebCore::composedTreeAsText):

    Add option to include pointers as debugging aid.

* dom/ComposedTreeIterator.h:
(WebCore::composedTreeChildren):

LayoutTests:

* fast/shadow-dom/composed-tree-shadow-subtree-expected.txt: Added.
* fast/shadow-dom/composed-tree-shadow-subtree.html: Added.

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

3 years agoAdded new port JSCOnly.
commit-queue@webkit.org [Sun, 13 Mar 2016 22:30:13 +0000 (22:30 +0000)]
Added new port JSCOnly.
https://bugs.webkit.org/show_bug.cgi?id=154512

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-13
Reviewed by Michael Catanzaro.

This port allows to build JavaScriptCore engine with minimal
dependencies.

.:

* CMakeLists.txt:
* Source/cmake/OptionsJSCOnly.cmake: Added.

Source/JavaScriptCore:

* PlatformJSCOnly.cmake: Added.

Source/WTF:

* wtf/PlatformJSCOnly.cmake: Added.
* wtf/none/MainThreadNone.cpp: Added.
* wtf/none/RunLoopNone.cpp: Added.
* wtf/none/WorkQueueNone.cpp: Added.

Tools:

* Scripts/build-jsc:
* Scripts/webkitdirs.pm:
(argumentsForConfiguration):
(executableProductDir):
(determinePortName):
(isJSCOnly):
(wrapperPrefixIfNeeded):
(generateBuildSystemFromCMakeProject):
(buildCMakeGeneratedProject):

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

3 years agoTestWebKitAPI: fix linker warnings
ddkilzer@apple.com [Sun, 13 Mar 2016 22:28:11 +0000 (22:28 +0000)]
TestWebKitAPI: fix linker warnings
<http://webkit.org/b/155394>

Reviewed by Darin Adler.

* TestWebKitAPI/CMakeLists.txt:
- Add RefLogger.cpp source file.
- Add other missing cross-platform source files.
- Add FIXMEs about RunLoop.cpp and about missing
  platform-specific source files.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
- Add RefLogger.cpp source file.

* TestWebKitAPI/Counters.cpp:
(DeleterCounter<ConstructorDestructorCounter>::deleterCount):
Move specific declaration here to fix linker warning.
* TestWebKitAPI/Counters.h:
(DeleterCounter<T>::deleterCount): Remove declaration of global
template variable.

* TestWebKitAPI/Tests/WTF/RefLogger.cpp: Added.
(TestWebKitAPI::log): Added.  Move inline definition in
RefLogger.h to here to fix linker warning.

* TestWebKitAPI/Tests/WTF/RefLogger.h:
(TestWebKitAPI::log): Replace inline function with declaration.

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

3 years agoWeb Inspector: REGRESSION: Styles sidebar inline swatches are oddly shaped
commit-queue@webkit.org [Sun, 13 Mar 2016 22:03:44 +0000 (22:03 +0000)]
Web Inspector: REGRESSION: Styles sidebar inline swatches are oddly shaped
https://bugs.webkit.org/show_bug.cgi?id=155410

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2016-03-13
Reviewed by Timothy Hatcher.

* UserInterface/Views/InlineSwatch.css:
(.inline-swatch):
(.inline-swatch > span):
Added more consistent border-radius with UserInterface/Images/CubicBezier.svg.

* UserInterface/Views/VisualStyleColorPicker.css:
(.visual-style-property-container.input-color-picker > .visual-style-property-value-container > .inline-swatch.color):
Made border-radius consistent with the adjacent input field.

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

3 years agoWebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSessi...
weinig@apple.com [Sun, 13 Mar 2016 20:12:01 +0000 (20:12 +0000)]
WebKit can easily crash below NetworkSession::dataTaskForIdentifier() with NSURLSession enabled
<rdar://problem/25129946>
https://bugs.webkit.org/show_bug.cgi?id=155401

Reviewed by Alex Christensen.

Source/WebCore:

Add a SessionID as a member of NetworkStorageSession. This allows us to avoid having HashMaps
to map between the two types.

* platform/network/NetworkStorageSession.h:
(WebCore::NetworkStorageSession::sessionID):
(WebCore::NetworkStorageSession::credentialStorage):
(WebCore::NetworkStorageSession::platformSession):
* platform/network/NetworkStorageSessionStub.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::context):
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
(WebCore::defaultSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession):
(WebCore::NetworkStorageSession::defaultStorageSession):
(WebCore::NetworkStorageSession::createPrivateBrowsingSession):
(WebCore::NetworkStorageSession::switchToNewTestingSession):
(WebCore::NetworkStorageSession::soupNetworkSession):

Source/WebKit/mac:

* WebCoreSupport/WebFrameNetworkingContext.mm:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
Pass a SessionID to NetworkStorageSession::createPrivateBrowsingSession().

Source/WebKit/win:

* WebCoreSupport/WebFrameNetworkingContext.cpp:
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):
Pass a SessionID to NetworkStorageSession::createPrivateBrowsingSession().

Source/WebKit2:

The issue was that NSURLSessionDataTasks can continue to invoke their NSURLSession's delegate methods
after -[NSURLSession invalidateAndCancel] is called. So, when the NetworkSession was destroyed, and
still had outstanding data tasks, the session delegate would get called, try to use the session, and
crash. To fix this I:

- Made NetworkSession RefCounted.
- Gave NetworkSession two delegates, one for each NSURLSession.
- Made each delegate have a strong reference to the NetworkSession that gets cleared out in the
  newly implemented URLSession:didBecomeInvalidWithError: method.
- Changed from simply destroying the NetworkSession in SessionTracker::destroySession(), to derefing
  it and explicitly calling invalidateAndCancel on the two associated NSURLSessions (which in turn
  eventually cause the URLSession:didBecomeInvalidWithError: to fire).
- To ensure the correct lifetime of the WebCore::NetworkStorageSession, I made it a member of the
  NetworkSession. This also allowed some simplification inside SessionTracker.

* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::setPendingDownload):
(WebKit::NetworkDataTask::pendingDownloadLocation):
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::sessionID):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::NetworkDataTask):
(WebKit::NetworkDataTask::~NetworkDataTask):
(WebKit::NetworkDataTask::willPerformHTTPRedirection):
(WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate initWithNetworkSession:]):
(-[WKNetworkSessionDelegate URLSession:didBecomeInvalidWithError:]):
(WebKit::NetworkSession::setCustomProtocolManager):
(WebKit::NetworkSession::create):
(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::invalidateAndCancel):
(WebKit::NetworkSession::networkStorageSession):
(WebKit::NetworkSession::clearCredentials):
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::identifierBase):
(WebKit::SessionTracker::getIdentifierBase):
(WebKit::SessionTracker::setIdentifierBase):
(WebKit::staticSessionMap):
(WebKit::SessionTracker::networkSession):
(WebKit::SessionTracker::storageSession):
(WebKit::staticStorageSessionMap):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
(WebKit::SessionTracker::forEachNetworkStorageSession):
(WebKit::storageSessionToID): Deleted.
(WebKit::SessionTracker::storageSessionMap): Deleted.
* Shared/SessionTracker.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::localFileContentSniffingEnabled):
(WebKit::WebFrameNetworkingContext::scheduledRunLoopPairs):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts):
(WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext):

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

3 years agogetUserMedia requests from the main frame should be treated the same as requests...
jonlee@apple.com [Sun, 13 Mar 2016 19:51:39 +0000 (19:51 +0000)]
getUserMedia requests from the main frame should be treated the same as requests from an iframe with the same origin
https://bugs.webkit.org/show_bug.cgi?id=155405
<rdar://problem/25131007>

Reviewed by Eric Carlson.

When gUM is called from the main frame, or from a subframe with the same origin, the
top level document origin should be the same.

* Modules/mediastream/UserMediaRequest.cpp:
(WebCore::UserMediaRequest::userMediaDocumentOrigin): Reverse the logic so that it is similar
to topLevelDocumentOrigin.
(WebCore::UserMediaRequest::topLevelDocumentOrigin): Return the top origin always.

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

3 years agoREGRESSION (r198079): Windows build broke because of "%PRId64" format specifier
ddkilzer@apple.com [Sun, 13 Mar 2016 19:02:57 +0000 (19:02 +0000)]
REGRESSION (r198079): Windows build broke because of "%PRId64" format specifier

Source/WebCore:

* platform/network/ParsedContentRange.cpp: Add #include
<wtf/StdLibExtras.h> and remove local definition of "PRId64".

Source/WTF:

This fixes the following build failure in WebCore for Windows:
    C:\Source\WebCore\page\DOMTimer.cpp(396): error C2146: syntax error: missing ')' before identifier 'PRId64' [C:\WebKitBuild\Debug\Source\WebCore\WebCore.vcxproj]
    C:\Source\WebCore\page\DOMTimer.cpp(399): error C2146: syntax error: missing ')' before identifier 'PRId64' [C:\WebKitBuild\Debug\Source\WebCore\WebCore.vcxproj]

* wtf/StdLibExtras.h: Define "PRId64" for Windows here so it may
be shared.  This should fix DOMTimer.cpp after r198079 since it
already includes StdLibExtras.h.

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

3 years agohttp://kangax.github.io/compat-table/esnext/ crashes reliably.
mark.lam@apple.com [Sun, 13 Mar 2016 15:46:50 +0000 (15:46 +0000)]
kangax.github.io/compat-table/esnext/ crashes reliably.
https://bugs.webkit.org/show_bug.cgi?id=155404

Reviewed by Yusuke Suzuki.

constructObjectFromPropertyDescriptor() was incorrectly assuming that either
both getter and setter will be set or unset.  It did not consider that only one
of the getter or setter may be set.  This patch fixes that.

* runtime/ObjectConstructor.h:
(JSC::constructObjectFromPropertyDescriptor):
* tests/stress/proxy-with-unbalanced-getter-setter.js: Added.
(assert):
(let.handler.defineProperty):
(i.):
(i.assert):
(i.get assert):
(set assert):

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

3 years ago[EFL] Fix debug build error since r197690. Unreviewed.
jh718.park@samsung.com [Sun, 13 Mar 2016 14:46:35 +0000 (14:46 +0000)]
[EFL] Fix debug build error since r197690. Unreviewed.
https://bugs.webkit.org/show_bug.cgi?id=155408

Unreviewed. Change %lld to %PRId instead to correct the error below.
error: format ‘%lld’ expects argument of type ‘long long int’,
but argument 5 has type ‘std::chrono::duration<long int, std::ratio<1l, 1000l> >::rep
{aka long int}’ [-Werror=format=]

* page/DOMTimer.cpp:
(WebCore::DOMTimer::updateTimerIntervalIfNecessary):

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

3 years ago[Cocoa] Remove typedef from NSScrollerImp to ScrollbarPainter
mmaxfield@apple.com [Sun, 13 Mar 2016 03:58:41 +0000 (03:58 +0000)]
[Cocoa] Remove typedef from NSScrollerImp to ScrollbarPainter
https://bugs.webkit.org/show_bug.cgi?id=155379

Reviewed by Beth Dakin.

There's no reason to not call them what they are.

No new tests because there is no behavior change.

* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
(WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
(WebCore::ScrollingStateFrameScrollingNode::setScrollerImpsFromScrollbars):
(WebCore::ScrollingStateFrameScrollingNode::setScrollbarPaintersFromScrollbars): Deleted.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
(WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac):
(WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollerImpsOnTheMainThread):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollLayerPosition):
(WebCore::ScrollingTreeFrameScrollingNodeMac::releaseReferencesToScrollbarPaintersOnTheMainThread): Deleted.
* platform/ScrollbarThemeComposite.h:
* platform/mac/ScrollAnimatorMac.h:
* platform/mac/ScrollAnimatorMac.mm:
(scrollbarPainterForScrollbar):
(-[WebScrollerImpDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
(-[WebScrollerImpDelegate scrollerImp:animateKnobAlphaTo:duration:]):
(-[WebScrollerImpDelegate scrollerImp:animateTrackAlphaTo:duration:]):
(-[WebScrollerImpDelegate scrollerImp:animateUIStateTransitionWithDuration:]):
(-[WebScrollerImpDelegate scrollerImp:animateExpansionTransitionWithDuration:]):
(WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::~ScrollAnimatorMac):
(WebCore::ScrollAnimatorMac::mouseEnteredScrollbar):
(WebCore::ScrollAnimatorMac::mouseExitedScrollbar):
(WebCore::ScrollAnimatorMac::mouseIsDownInScrollbar):
(WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar):
(WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar):
(WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
(WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
(WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
(WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
(WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
(WebCore::ScrollAnimatorMac::cancelAnimations):
(WebCore::ScrollAnimatorMac::updateScrollerStyle):
(WebCore::ScrollAnimatorMac::initialScrollbarPaintTimerFired):
(-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]): Deleted.
(-[WebScrollbarPainterDelegate scrollerImp:animateKnobAlphaTo:duration:]): Deleted.
(-[WebScrollbarPainterDelegate scrollerImp:animateTrackAlphaTo:duration:]): Deleted.
(-[WebScrollbarPainterDelegate scrollerImp:animateUIStateTransitionWithDuration:]): Deleted.
(-[WebScrollbarPainterDelegate scrollerImp:animateExpansionTransitionWithDuration:]): Deleted.
* platform/mac/ScrollbarThemeMac.h:
* platform/mac/ScrollbarThemeMac.mm:
(WebCore::scrollbarMap):
(+[WebScrollbarPrefsObserver appearancePrefsChanged:]):
(WebCore::ScrollbarThemeMac::registerScrollbar):
(WebCore::ScrollbarThemeMac::setNewPainterForScrollbar):
(WebCore::ScrollbarThemeMac::painterForScrollbar):
(WebCore::ScrollbarThemeMac::scrollbarThickness):
(WebCore::ScrollbarThemeMac::updateScrollbarOverlayStyle):
(WebCore::ScrollbarThemeMac::hasThumb):
(WebCore::ScrollbarThemeMac::setPaintCharacteristicsForScrollbar):
(WebCore::scrollbarPainterPaint):

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

3 years agoWhen generating Objective-C protocol types, getters for objects need to synthesize...
bburg@apple.com [Sun, 13 Mar 2016 03:48:56 +0000 (03:48 +0000)]
When generating Objective-C protocol types, getters for objects need to synthesize a new object instance
https://bugs.webkit.org/show_bug.cgi?id=155389
<rdar://problem/25125821>

Reviewed by Timothy Hatcher.

Currently, in object property getters for Objective-C protocol types, we use
a C-style cast of the member's RWIProtocolJSONObject * to the type of the property.
However, at runtime the class of `self` is going to be RWIProtocolJSONObject *,
not MemberType *, so any subsequent calls to MemberType properties on the return value
will fail as the selectors will not be recognized.

Instead of doing a C-style pointer cast, we need to create a new MemberType object
that's backed by the InspectorObject retrieved from the parent object by key.
This requires a new initWithJSONObject initializer for each object protocol type.

* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator._generate_type_interface): Add new declaration.

* inspector/scripts/codegen/generate_objc_protocol_types_implementation.py:
(ObjCProtocolTypesImplementationGenerator.generate_type_implementation):
(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_json_object): Added.
Forward through to the super class initializer who assigns the underlying InspectorObject.

(ObjCProtocolTypesImplementationGenerator._generate_init_method_for_required_members):
Drive-by cleanup to use the more compact [super init] form.

* inspector/scripts/codegen/objc_generator.py:
(ObjCGenerator.protocol_to_objc_expression_for_member):
For property getters of objects, use initWithJSONObject: rather than a C-style cast.

Rebaseline relevant test results.

* 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/events-with-optional-parameters.json-result:
* inspector/scripts/tests/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/expected/type-requiring-runtime-casts.json-result:

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

3 years agoRemoved variable names from default constructor declarations.
commit-queue@webkit.org [Sun, 13 Mar 2016 02:39:43 +0000 (02:39 +0000)]
Removed variable names from default constructor declarations.
https://bugs.webkit.org/show_bug.cgi?id=155397

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-12
Reviewed by Mark Lam.

They carry no information and generate unused variable warning with GCC
4.8 in a lot of source files.

* parser/VariableEnvironment.h:

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

3 years agoREGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
dino@apple.com [Sun, 13 Mar 2016 01:55:45 +0000 (01:55 +0000)]
REGRESSION (r188647): Teamtreehouse website sidebar buttons are not rendered
https://bugs.webkit.org/show_bug.cgi?id=155400
<rdar://problem/24818602>

Reviewed by Anders Carlsson.

Source/WebCore:

When we unprefixed CSS filters we accidentally
stopped SVG elements that use the CSS filter shorthands
from rendering. We still don't actually support
the shorthands in this case, but we should render
the element without the filter.

Tests: css3/filters/filters-on-svg-element.html
       css3/filters/filters-on-svg-root.html

* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::hasReferenceFilterOnly): Add
this new function that tells us if we have the
style of filter that we can handle in SVG content.
* rendering/style/RenderStyle.h:
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::prepareToRenderSVGContent):
We can mark an element as ready to render if it
has a shorthand filter.

LayoutTests:

Add tests with SVG content that uses CSS filter
shorthands. These particular filters are no-ops
so should not affect rendering. If they actually
tried to do something you wouldn't see them work
until we enable shorthand filters on SVG content.

* css3/filters/filters-on-svg-element-expected.html: Added.
* css3/filters/filters-on-svg-element.html: Added.
* css3/filters/filters-on-svg-root-expected.html: Added.
* css3/filters/filters-on-svg-root.html: Added.

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

3 years agoDelete dead SVG Font code
mmaxfield@apple.com [Sun, 13 Mar 2016 00:36:59 +0000 (00:36 +0000)]
Delete dead SVG Font code
https://bugs.webkit.org/show_bug.cgi?id=154718

Reviewed by Antti Koivisto.

.:

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

All the ports have adopted the SVG -> OTF Font Converter, so there will never
be an instantiation of a font backed by a DOM subtree. We can remove all the
infrastructure used to support that.

No new tests because there is no behavior change.

* CMakeLists.txt:
* Configurations/FeatureDefines.xcconfig:
* WebCore.order:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::CSSFontFaceSource): Deleted.
(WebCore::CSSFontFaceSource::font): Deleted.
* css/CSSFontFaceSource.h:
* loader/cache/CachedFont.cpp:
* loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::createFont): Deleted.
(WebCore::CachedSVGFont::ensureCustomFontData): Deleted.
* loader/cache/CachedSVGFont.h:
* platform/graphics/Font.cpp:
(WebCore::Font::Font):
(WebCore::fillGlyphPage):
(WebCore::Font::description): Deleted.
(WebCore::Font::createScaledFont): Deleted.
(WebCore::Font::applyTransforms): Deleted.
* platform/graphics/Font.h:
(WebCore::Font::widthForGlyph):
(WebCore::Font::SVGData::~SVGData): Deleted.
(WebCore::Font::create): Deleted.
(WebCore::Font::svgData): Deleted.
(WebCore::Font::isSVGFont): Deleted.
* platform/graphics/win/FontWin.cpp:
* platform/graphics/FontCascade.cpp:
(WebCore::FontCascade::drawText):
(WebCore::FontCascade::drawEmphasisMarks):
(WebCore::FontCascade::glyphDataForCharacter):
(WebCore::FontCascade::adjustSelectionRectForText):
(WebCore::FontCascade::offsetForPosition):
(WebCore::FontCascade::drawEmphasisMarksForSimpleText):
(WebCore::FontCascade::drawGlyphBuffer):
(WebCore::isDrawnWithSVGFont): Deleted.
(WebCore::FontCascade::width): Deleted.
(WebCore::FontCascade::codePath): Deleted.
* platform/graphics/FontCascade.h:
* platform/graphics/GraphicsContext.h:
* platform/graphics/SVGGlyph.cpp: Removed.
(WebCore::processArabicFormDetection): Deleted.
(WebCore::charactersWithArabicForm): Deleted.
(WebCore::isCompatibleArabicForm): Deleted.
(WebCore::isCompatibleGlyph): Deleted.
* platform/graphics/SVGGlyph.h: Removed.
(WebCore::SVGGlyph::SVGGlyph): Deleted.
(WebCore::SVGGlyph::inheritedValue): Deleted.
(WebCore::SVGGlyph::operator==): Deleted.
* platform/graphics/TextRun.cpp:
* platform/graphics/TextRun.h:
(WebCore::TextRun::RenderingContext::~RenderingContext): Deleted.
(WebCore::TextRun::renderingContext): Deleted.
(WebCore::TextRun::setRenderingContext): Deleted.
* platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::applyFontTransforms):
(WebCore::WidthIterator::advanceInternal):
(WebCore::WidthIterator::glyphDataForCharacter): Deleted.
* platform/graphics/WidthIterator.h:
(WebCore::WidthIterator::lastGlyphName): Deleted.
(WebCore::WidthIterator::setLastGlyphName): Deleted.
(WebCore::WidthIterator::arabicForms): Deleted.
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::CairoGlyphToPathTranslator::advance):
(WebCore::FontCascade::dashesForIntersectionsWithRect):
(WebCore::CairoGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
* platform/graphics/cocoa/FontCascadeCocoa.mm:
(WebCore::MacGlyphToPathTranslator::advance):
(WebCore::FontCascade::dashesForIntersectionsWithRect):
(WebCore::FontCascade::primaryFontIsSystemFont):
(WebCore::FontCascade::drawEmphasisMarksForComplexText):
(WebCore::MacGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
* platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Deleted.
* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::TextLayout::isNeeded):
(WebCore::TextLayout::TextLayout):
(WebCore::TextLayout::constructTextRun):
* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint):
(WebCore::EllipsisBox::selectionRect):
(WebCore::EllipsisBox::paintSelection):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::localSelectionRect):
(WebCore::InlineTextBox::paint):
(WebCore::InlineTextBox::paintSelection):
(WebCore::InlineTextBox::paintCompositionBackground):
(WebCore::InlineTextBox::paintDocumentMarker):
(WebCore::InlineTextBox::paintTextMatchMarker):
(WebCore::InlineTextBox::offsetForPosition):
(WebCore::InlineTextBox::positionForOffset):
(WebCore::InlineTextBox::constructTextRun):
* rendering/InlineTextBox.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* rendering/RenderBlock.h:
* rendering/RenderBlockFlow.cpp:
(WebCore::stripTrailingSpace):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::checkLinesForTextOverflow):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::paintObject):
(WebCore::RenderFileUploadControl::computeIntrinsicLogicalWidths):
* rendering/RenderImage.cpp:
(WebCore::RenderImage::setImageSizeForAltText):
(WebCore::RenderImage::paintReplaced):
* rendering/RenderListBox.cpp:
(WebCore::RenderListBox::updateFromElement):
* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::paint):
(WebCore::RenderListMarker::computePreferredLogicalWidths):
(WebCore::RenderListMarker::getRelativeMarkerRect):
* rendering/RenderMenuList.cpp:
(RenderMenuList::updateOptionsWidth):
* rendering/RenderText.cpp:
(WebCore::RenderText::widthFromCache):
(WebCore::RenderText::trimmedPrefWidths):
(WebCore::hyphenWidth):
(WebCore::maxWordFragmentWidth):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::RenderText::width):
* rendering/RenderTextControl.cpp:
(WebCore::RenderTextControl::getAverageCharWidth):
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeMeasureTextClient::RenderThemeMeasureTextClient):
(WebCore::adjustInputElementButtonStyle):
* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::canUseForFontAndText): Deleted.
* rendering/line/BreakingContext.h:
(WebCore::WordTrailingSpace::WordTrailingSpace):
(WebCore::WordTrailingSpace::width):
(WebCore::measureHyphenWidth):
(WebCore::textWidth):
(WebCore::tryHyphenating):
(WebCore::BreakingContext::handleText):
* rendering/svg/RenderSVGAllInOne.cpp:
* rendering/svg/RenderSVGText.cpp:
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::prepareGraphicsContextForTextPainting):
(WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
(WebCore::SVGInlineTextBox::paintTextWithShadows):
(WebCore::SVGInlineTextBox::constructTextRun): Deleted.
* rendering/svg/SVGInlineTextBox.h:
* rendering/svg/SVGTextLayoutEngine.cpp:
(WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath):
* rendering/svg/SVGTextLayoutEngineSpacing.cpp:
(WebCore::SVGTextLayoutEngineSpacing::calculateSVGKerning): Deleted.
* rendering/svg/SVGTextLayoutEngineSpacing.h:
* rendering/svg/SVGTextMetrics.cpp:
(WebCore::SVGTextMetrics::SVGTextMetrics):
(WebCore::SVGTextMetrics::constructTextRun): Deleted.
* rendering/svg/SVGTextMetrics.h:
* rendering/svg/SVGTextMetricsBuilder.cpp:
(WebCore::SVGTextMetricsBuilder::advanceSimpleText):
* rendering/svg/SVGTextRunRenderingContext.cpp: Removed.
(WebCore::svgFontAndFontFaceElementForFontData): Deleted.
(WebCore::SVGTextRunRenderingContext::floatWidthUsingSVGFont): Deleted.
(WebCore::SVGTextRunRenderingContext::applySVGKerning): Deleted.
(WebCore::SVGGlyphToPathTranslator::SVGGlyphToPathTranslator): Deleted.
(WebCore::SVGGlyphToPathTranslator::transform): Deleted.
(WebCore::SVGGlyphToPathTranslator::path): Deleted.
(WebCore::SVGGlyphToPathTranslator::extents): Deleted.
(WebCore::SVGGlyphToPathTranslator::moveToNextValidGlyph): Deleted.
(WebCore::SVGGlyphToPathTranslator::advance): Deleted.
(WebCore::SVGTextRunRenderingContext::createGlyphToPathTranslator): Deleted.
(WebCore::SVGTextRunRenderingContext::drawSVGGlyphs): Deleted.
(WebCore::missingGlyphForFont): Deleted.
(WebCore::SVGTextRunRenderingContext::glyphDataForCharacter): Deleted.
* rendering/svg/SVGTextRunRenderingContext.h: Removed.
* svg/SVGAllInOne.cpp:
* svg/SVGFontData.cpp: Removed.
(WebCore::SVGFontData::SVGFontData): Deleted.
(WebCore::SVGFontData::initializeFont): Deleted.
(WebCore::SVGFontData::widthForSVGGlyph): Deleted.
(WebCore::SVGFontData::applySVGGlyphSelection): Deleted.
(WebCore::SVGFontData::fillSVGGlyphPage): Deleted.
(WebCore::SVGFontData::fillBMPGlyphs): Deleted.
(WebCore::SVGFontData::fillNonBMPGlyphs): Deleted.
(WebCore::computeNormalizedSpaces): Deleted.
(WebCore::createStringWithMirroredCharacters): Deleted.
* svg/SVGFontData.h: Removed.
(WebCore::SVGFontData::~SVGFontData): Deleted.
(WebCore::SVGFontData::svgFontFaceElement): Deleted.
(WebCore::SVGFontData::horizontalOriginX): Deleted.
(WebCore::SVGFontData::horizontalOriginY): Deleted.
(WebCore::SVGFontData::horizontalAdvanceX): Deleted.
(WebCore::SVGFontData::verticalOriginX): Deleted.
(WebCore::SVGFontData::verticalOriginY): Deleted.
(WebCore::SVGFontData::verticalAdvanceY): Deleted.
* svg/SVGFontElement.cpp:
(WebCore::SVGFontElement::SVGFontElement): Deleted.
(WebCore::SVGFontElement::invalidateGlyphCache): Deleted.
(WebCore::SVGFontElement::firstMissingGlyphElement): Deleted.
(WebCore::SVGFontElement::registerLigaturesInGlyphCache): Deleted.
(WebCore::SVGFontElement::ensureGlyphCache): Deleted.
(WebCore::SVGKerningMap::clear): Deleted.
(WebCore::SVGKerningMap::insert): Deleted.
(WebCore::stringMatchesUnicodeRange): Deleted.
(WebCore::stringMatchesGlyphName): Deleted.
(WebCore::stringMatchesUnicodeName): Deleted.
(WebCore::matches): Deleted.
(WebCore::kerningForPairOfStringsAndGlyphs): Deleted.
(WebCore::SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs): Deleted.
(WebCore::SVGFontElement::verticalKerningForPairOfStringsAndGlyphs): Deleted.
(WebCore::SVGFontElement::collectGlyphsForString): Deleted.
(WebCore::SVGFontElement::collectGlyphsForGlyphName): Deleted.
(WebCore::SVGFontElement::svgGlyphForGlyph): Deleted.
(WebCore::SVGFontElement::missingGlyph): Deleted.
* svg/SVGFontElement.h:
(WebCore::SVGKerning::SVGKerning): Deleted.
(WebCore::SVGKerningMap::isEmpty): Deleted.
* svg/SVGGlyphElement.cpp:
(WebCore::SVGGlyphElement::invalidateGlyphCache): Deleted.
(WebCore::SVGGlyphElement::parseAttribute): Deleted.
(WebCore::SVGGlyphElement::insertedInto): Deleted.
(WebCore::SVGGlyphElement::removedFrom): Deleted.
(WebCore::parseArabicForm): Deleted.
(WebCore::parseOrientation): Deleted.
(WebCore::SVGGlyphElement::inheritUnspecifiedAttributes): Deleted.
(WebCore::parseSVGGlyphAttribute): Deleted.
(WebCore::SVGGlyphElement::buildGenericGlyphIdentifier): Deleted.
(WebCore::SVGGlyphElement::buildGlyphIdentifier): Deleted.
* svg/SVGGlyphElement.h:
* svg/SVGGlyphMap.h: Removed.
(WebCore::GlyphMapNode::GlyphMapNode): Deleted.
(WebCore::GlyphMapNode::create): Deleted.
(WebCore::SVGGlyphMap::SVGGlyphMap): Deleted.
(WebCore::SVGGlyphMap::addGlyph): Deleted.
(WebCore::SVGGlyphMap::appendToGlyphTable): Deleted.
(WebCore::SVGGlyphMap::compareGlyphPriority): Deleted.
(WebCore::SVGGlyphMap::collectGlyphsForString): Deleted.
(WebCore::SVGGlyphMap::clear): Deleted.
(WebCore::SVGGlyphMap::svgGlyphForGlyph): Deleted.
(WebCore::SVGGlyphMap::glyphIdentifierForGlyphName): Deleted.
* svg/SVGHKernElement.cpp:
(WebCore::SVGHKernElement::insertedInto): Deleted.
(WebCore::SVGHKernElement::removedFrom): Deleted.
* svg/SVGHKernElement.h:
* svg/SVGToOTFFontConversion.cpp:
* svg/SVGToOTFFontConversion.h:
* svg/SVGVKernElement.cpp:
(WebCore::SVGVKernElement::insertedInto): Deleted.
(WebCore::SVGVKernElement::removedFrom): Deleted.
* svg/SVGVKernElement.h:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:

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

3 years agoMake preview inline navigation work API
bdakin@apple.com [Sat, 12 Mar 2016 23:15:47 +0000 (23:15 +0000)]
Make preview inline navigation work API
https://bugs.webkit.org/show_bug.cgi?id=155383
-and corresponding-
rdar://problem/25117985

Reviewed by Dan Bernstein.

With this patch:
_WKElementInfo is now WKElementInfo in file and class names. Header is now
public.

_WKPreviewElementInfo is now WKPreviewElementInfo in file and class names.
Header is now public.

_WKPreviewAction is now WKPreviewActionItem in filenames (header is now
public), the protocol _WKPreviewActionItem is now WKPreviewActionItem, and
the _WKPreviewAction class is now WKPreviewAction. (The internal header is
still project, of course.)
and
WKPreviewActionIdentifiersPrivate.h/mm is now
WKPreviewActionItemIdentifiers.h/mm and all the the identifiers have been
updated. Header is now public.

* Shared/API/Cocoa/WebKit.h:
* UIProcess/API/Cocoa/WKElementInfo.h: Copied from UIProcess/API/Cocoa/_WKElementInfo.h.
* UIProcess/API/Cocoa/WKElementInfo.mm: Copied from UIProcess/API/Cocoa/_WKElementInfo.mm.
(-[WKElementInfo copyWithZone:]):
(-[_WKElementInfo copyWithZone:]): Deleted.
* UIProcess/API/Cocoa/WKElementInfoInternal.h: Copied from UIProcess/API/Cocoa/_WKElementInfoInternal.h.
* UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.h: Removed.
* UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.mm: Removed.
* UIProcess/API/Cocoa/WKPreviewActionItem.h: Copied from UIProcess/API/Cocoa/_WKPreviewAction.h.
* UIProcess/API/Cocoa/WKPreviewActionItem.mm: Copied from UIProcess/API/Cocoa/_WKPreviewAction.mm.
* UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.h: Copied from UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.h.
* UIProcess/API/Cocoa/WKPreviewActionItemIdentifiers.mm: Copied from UIProcess/API/Cocoa/WKPreviewActionIdentifiersPrivate.mm.
* UIProcess/API/Cocoa/WKPreviewActionItemInternal.h: Copied from UIProcess/API/Cocoa/_WKPreviewActionInternal.h.
* UIProcess/API/Cocoa/WKPreviewElementInfo.h: Copied from UIProcess/API/Cocoa/_WKPreviewElementInfo.h.
* UIProcess/API/Cocoa/WKPreviewElementInfo.mm: Copied from UIProcess/API/Cocoa/_WKPreviewElementInfo.mm.
(-[WKPreviewElementInfo _initWithLinkURL:]):
(-[_WKPreviewElementInfo _initWithLinkURL:]): Deleted.
* UIProcess/API/Cocoa/WKPreviewElementInfoInternal.h: Copied from UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h.
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/_WKContextMenuElementInfo.h:
* UIProcess/API/Cocoa/_WKElementInfo.h: Removed.
* UIProcess/API/Cocoa/_WKElementInfo.mm: Removed.
* UIProcess/API/Cocoa/_WKElementInfoInternal.h: Removed.
* UIProcess/API/Cocoa/_WKPreviewAction.h: Removed.
* UIProcess/API/Cocoa/_WKPreviewAction.mm: Removed.
* UIProcess/API/Cocoa/_WKPreviewActionInternal.h: Removed.
* UIProcess/API/Cocoa/_WKPreviewElementInfo.h: Removed.
* UIProcess/API/Cocoa/_WKPreviewElementInfo.mm: Removed.
* UIProcess/API/Cocoa/_WKPreviewElementInfoInternal.h: Removed.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _interactionShouldBeginFromPreviewItemController:forPosition:]):
(previewIdentifierForElementAction):
(-[WKContentView _presentedViewControllerForPreviewItemController:]):
(-[WKContentView _previewItemController:commitPreview:]):
* WebKit2.xcodeproj/project.pbxproj:

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

3 years ago[OS X] Scrollbars of overflow:scroll divs should appear on the left on RTL systems
mmaxfield@apple.com [Sat, 12 Mar 2016 21:18:25 +0000 (21:18 +0000)]
[OS X] Scrollbars of overflow:scroll divs should appear on the left on RTL systems
https://bugs.webkit.org/show_bug.cgi?id=155385

Reviewed by Simon Fraser.

Source/WebCore:

There is already some existing setup for RTL scrollbars. This patch hooks up this
existing support to the OS X triggering mechanism introduced in r197956. It also
fixes up the existing support to function even when the direction of the
RTL-scrollbar div is LTR (this means the contents of the div must be pushed
over by the width of the scrollbar).

Tests: fast/scrolling/rtl-scrollbars-overflow-contents.html
       fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html
       fast/scrolling/rtl-scrollbars-overflow-padding.html
       fast/scrolling/rtl-scrollbars-overflow-simple.html
       fast/scrolling/rtl-scrollbars-overflow.html

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromPositionedObjects):
(WebCore::RenderBlock::logicalLeftOffsetForContent):
(WebCore::RenderBlock::logicalRightOffsetForContent):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::determineLogicalLeftPositionForChild):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::overflowClipRect):
(WebCore::RenderBox::layoutOverflowRectForPropagation):
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::computeScrollDimensions):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::shouldPlaceBlockDirectionScrollbarOnLogicalLeft):
* rendering/style/RenderStyle.h:

LayoutTests:

* platform/mac-wk1/TestExpectations:
* platform/mac/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/ios-simulator/TestExpectations:
* platform/win/TestExpectations:
* fast/scrolling/rtl-scrollbars-overflow-contents-expected.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-contents.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-dir-rtl-expected.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-dir-rtl.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-expected.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-padding-expected.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-padding.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-simple-expected-mismatch.html: Added.
* fast/scrolling/rtl-scrollbars-overflow-simple.html: Added.
* fast/scrolling/rtl-scrollbars-overflow.html: Added.

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

3 years agoREGRESSION (r178615): Fix incorrect case in included header for WeakPtr.cpp
ddkilzer@apple.com [Sat, 12 Mar 2016 20:58:58 +0000 (20:58 +0000)]
REGRESSION (r178615): Fix incorrect case in included header for WeakPtr.cpp

* TestWebKitAPI/Tests/WTF/WeakPtr.cpp: Change "test.h" to
"Test.h" to fix incorrect case.  This was discovered when adding
WeakPtr.cpp to CMakeLists.txt for the patch on Bug 155394.

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

3 years agorun-webkit-tests: handle Darwin framework/library environment variables more consistently
ddkilzer@apple.com [Sat, 12 Mar 2016 19:59:41 +0000 (19:59 +0000)]
run-webkit-tests: handle Darwin framework/library environment variables more consistently
<http://webkit.org/b/155392>

Reviewed by Daniel Bates.

These changes will make it possible to pass through environment
variables from the run-webkit-tests command-line.

* Scripts/webkitpy/port/base.py:
(Port.to.setup_environ_for_server): Add DYLD_FRAMEWORK_PATH,
__XPC_DYLD_FRAMEWORK_PATH and __XPC_DYLD_LIBRARY_PATH to the
list of variables to keep from the run-webkit-test environment.

* Scripts/webkitpy/port/driver.py:
(Driver._append_environment_variable_path): Add method to append
a path to an environment variable, or set the path if the
variable doesn't exist.
(Driver._setup_environ_for_driver): Extract build_root_path into
a local variable.  Use Driver._append_environment_variable_path
to extend DYLD_LIBRARY_PATH, __XPC_DYLD_LIBRARY_PATH,
DYLD_FRAMEWORK_PATH and __XPC_DYLD_FRAMEWORK_PATH instead of
overwriting them.

* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest.test__append_environment_variable_path): Add test
method to test Driver._append_environment_variable_path.

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

3 years agoWeb Inspector: Convert toolbar and tab bar to position absolute to reduce repaint...
nvasilyev@apple.com [Sat, 12 Mar 2016 18:16:32 +0000 (18:16 +0000)]
Web Inspector: Convert toolbar and tab bar to position absolute to reduce repaint areas
https://bugs.webkit.org/show_bug.cgi?id=155386

Reviewed by Timothy Hatcher.

Using CSS flexbox causes unnecessary large repaints.
Convert top level elements (.toolbar, .tab-bar, #main)
from flexbox to "position: absolute".

* UserInterface/Views/Main.css:
(#main):
* UserInterface/Views/TabBar.css:
(.tab-bar):
* UserInterface/Views/Toolbar.css:
(.toolbar):
(body.mac-platform:not(.docked, .mavericks) .toolbar):
(body.mac-platform:not(.docked, .mavericks)):
(body.window-inactive:not(.mavericks) .toolbar): Deleted.
* UserInterface/Views/Variables.css:
(:root):

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

3 years ago[Forms: focus] focus rings around text fields do not follow contour (border-radius)
zalan@apple.com [Sat, 12 Mar 2016 17:24:21 +0000 (17:24 +0000)]
[Forms: focus] focus rings around text fields do not follow contour (border-radius)
https://bugs.webkit.org/show_bug.cgi?id=154099
rdar://problem/9988429

Reviewed by Tim Horton.

Source/WebCore:

This patch enables outline-style: auto to follow the curve of border-radius.
When both border-radius and outline-style: auto are set, the native focusring painting will take the border-radius values
into account. This is only for outline-style: auto, other non-auto outline styles paint as if there
was no border-radius set.
It supports both single and multiline content with joint rectangles.
However in case of disjoint rectangles, we fallback to the non-radius drawing.

Tests: fast/inline/hidpi-outline-auto-with-border-radius-horizontal-ltr.html
       fast/inline/hidpi-outline-auto-with-border-radius-horizontal-rtl.html
       fast/inline/hidpi-outline-auto-with-border-radius-vertical-ltr.html
       fast/inline/hidpi-outline-auto-with-border-radius-vertical-rtl.html

* platform/graphics/GraphicsContext.h:
* platform/graphics/Path.cpp:
(WebCore::Path::addBeziersForRoundedRect):
* platform/graphics/Path.h:
(WebCore::Path::circleControlPoint):
* platform/graphics/PathUtilities.cpp:
(WebCore::polygonsForRect):
(WebCore::PathUtilities::pathsWithShrinkWrappedRects):
(WebCore::startAndEndPointsForCorner):
(WebCore::cornerType):
(WebCore::controlPointsForBezierCurve):
(WebCore::adjustedtRadiiForHuggingCurve):
(WebCore::PathUtilities::pathWithShrinkWrappedRectsForOutline):
* platform/graphics/PathUtilities.h:
* platform/graphics/mac/GraphicsContextMac.mm:
(WebCore::GraphicsContext::drawFocusRing):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::paintFocusRing):

LayoutTests:

Unfortunately there's no proper way to test native focusring drawing.
These tests attempt to verify that we don't end up painting sharp corners.

* fast/inline/hidpi-outline-auto-with-border-radius-horizontal-ltr-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-border-radius-horizontal-ltr.html: Added.
* fast/inline/hidpi-outline-auto-with-border-radius-horizontal-rtl-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-border-radius-horizontal-rtl.html: Added.
* fast/inline/hidpi-outline-auto-with-border-radius-vertical-ltr-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-border-radius-vertical-ltr.html: Added.
* fast/inline/hidpi-outline-auto-with-border-radius-vertical-rtl-expected.html: Added.
* fast/inline/hidpi-outline-auto-with-border-radius-vertical-rtl.html: Added.

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

3 years ago.:
commit-queue@webkit.org [Sat, 12 Mar 2016 10:23:40 +0000 (10:23 +0000)]
.:
[GTK][Mac] Don't force ENABLE_INTROSPECTION=OFF on Mac
https://bugs.webkit.org/show_bug.cgi?id=152650

Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com> on 2016-03-12
Reviewed by Carlos Garcia Campos.

* Source/cmake/OptionsGTK.cmake:

Source/WebKit2:
[GTK][Mac] Use DYLD_LIBRARY_PATH on OSX rather then LD_LIBRARY_PATH
https://bugs.webkit.org/show_bug.cgi?id=152650

Patch by Jeremy Huddleston Sequoia <jeremyhu@apple.com> on 2016-03-12
Reviewed by Carlos Garcia Campos.

* PlatformGTK.cmake:

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

3 years ago[JSC] Remove a few jumps from DFG
commit-queue@webkit.org [Sat, 12 Mar 2016 03:28:32 +0000 (03:28 +0000)]
[JSC] Remove a few jumps from DFG
https://bugs.webkit.org/show_bug.cgi?id=155347

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-11
Reviewed by Mark Lam.

Usually, setting ValueTrue or ValueFalse is set
by Compare+Or. There are 3 places in DFG with branches instead.

This patch changes them to the usual pattern.

* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compileObjectEquality):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):

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