WebKit.git
4 years agoMove QualifiedName from CustomElementInfo to JSCustomElementInterface
rniwa@webkit.org [Sat, 5 Mar 2016 08:31:38 +0000 (08:31 +0000)]
Move QualifiedName from CustomElementInfo to JSCustomElementInterface
https://bugs.webkit.org/show_bug.cgi?id=155061

Reviewed by Antti Koivisto.

Store QualifiedName of custom elements in JSCustomElementInterface instead of CustomElementInfo
now that each interface is associated with exactly one custom element as of r197602.

No new tests since this is a refactoring.

* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::JSCustomElementInterface): Now takes QualifiedName as the
first argument.
* bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::create):
(WebCore::JSCustomElementInterface::name): Added.
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineElement):
* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement): Use findInterface instead of the deleted findName.
* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::checkName):
(WebCore::CustomElementDefinitions::addElementDefinition): Renamed from defineElement.
(WebCore::CustomElementDefinitions::findInterface): Add a variant that finds the interface object
by a JS constructor.
(WebCore::CustomElementDefinitions::containsConstructor):
(WebCore::CustomElementDefinitions::findName): Deleted.
* dom/CustomElementDefinitions.h:
(WebCore::CustomElementDefinitions::CustomElementInfo::CustomElementInfo): Deleted.

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

4 years agoAdd basic support for attributeChanged lifecycle callback
rniwa@webkit.org [Sat, 5 Mar 2016 07:50:54 +0000 (07:50 +0000)]
Add basic support for attributeChanged lifecycle callback
https://bugs.webkit.org/show_bug.cgi?id=155011

Reviewed by Antti Koivisto.

Source/WebCore:

Add basic support for attributeChangedCallback in setAttribute, removeAttribute, setAttributeNS,
remoteAttributeNS, setAttributeNode, and removeAttributeNS. There are many other DOM APIs that
could modify attributes but we would annotate those APIs in a separate patch to limit the scope
of this change.

In order to invoke the lifecycle callback right before returning to the author script, allocate
an instance of CustomElementLifecycleProcessingStack in each of these functions' binding code.
The stack object's destructor invokes all callbacks enqueued by the DOM API if there are any.

Spec: https://w3c.github.io/webcomponents/spec/custom/#dfn-attribute-changed-callback

Tests: fast/custom-elements/attribute-changed-callback.html
       fast/custom-elements/lifecycle-callback-timing.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::attributeChanged): Added. Invokes attributeChangedCallback.
* bindings/js/JSCustomElementInterface.h:
* bindings/js/JSMainThreadExecState.h:
(JSMainThreadNullState): Allocate an instance of CustomElementLifecycleProcessingStack in GObject
and Objective-C binding code for consistency with JavaScript. We can't do this in JavaScript
because there is no RAII object all functions, getters, and setters allocate (for a good reason).

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Generate an instance of CustomElementLifecycleProcessingStack when
NeedsLifecycleProcessingStack is specified as an extended IDL attribute.
* bindings/scripts/IDLAttributes.txt: Added NeedsLifecycleProcessingStack.
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithNeedsLifecycleProcessingStack):
* bindings/scripts/test/TestObj.idl: Added a test for NeedsLifecycleProcessingStack.

* dom/DOMAllInOne.cpp:
* dom/Element.cpp:
(WebCore::Element::attributeChanged): Enqueue attributeChanged callback if the context object
is a custom element and there is a CustomElementLifecycleProcessingStack allocated in the stack.
* dom/Element.idl:

* dom/LifecycleCallbackQueue.cpp: Added.
(WebCore::LifecycleQueueItem): Added.
(WebCore::LifecycleQueueItem::LifecycleQueueItem): Added.
(WebCore::LifecycleQueueItem::invoke): Added.
(WebCore::LifecycleCallbackQueue::LifecycleCallbackQueue): Added.
(WebCore::LifecycleCallbackQueue::~LifecycleCallbackQueue): Added.
(WebCore::LifecycleCallbackQueue::enqueueAttributeChangedCallback): Added.
(WebCore::LifecycleCallbackQueue::invokeAll): Added.
(WebCore::CustomElementLifecycleProcessingStack::ensureCurrentQueue): Added. As noted in FIXME,
the early exit in the code is necessary only because we haven't added NeedsLifecycleProcessingStack
in all places. It should go away in a follow up patch.
(WebCore::CustomElementLifecycleProcessingStack::processQueue): Added.
* dom/LifecycleCallbackQueue.h: Added.
(WebCore::CustomElementLifecycleProcessingStack): This is a light weight RAII object the binding
code will allocate in order to queue up lifecycle callbacks. We don't use Ref or std::unique_ptr
in m_queue to avoid generating the code to destruct LifecycleCallbackQueue everywhere.
(WebCore::CustomElementLifecycleProcessingStack::CustomElementLifecycleProcessingStack): Added.
(WebCore::CustomElementLifecycleProcessingStack::~CustomElementLifecycleProcessingStack): Added.
(WebCore::CustomElementLifecycleProcessingStack::hasCurrentProcessingStack): Added.

LayoutTests:

Added a test for attributeChangedCallback and a test for the timing of lifecycle callbacks in general.

* fast/custom-elements/attribute-changed-callback-expected.txt: Added.
* fast/custom-elements/attribute-changed-callback.html: Added.
* fast/custom-elements/lifecycle-callback-timing-expected.txt: Added.
* fast/custom-elements/lifecycle-callback-timing.html: Added.

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

4 years agoTemporarily skip attachment tests on iOS
timothy_horton@apple.com [Sat, 5 Mar 2016 07:31:32 +0000 (07:31 +0000)]
Temporarily skip attachment tests on iOS

* platform/ios-simulator/TestExpectations:
There's no point in running these quite yet (I'm surprised they weren't already skipped).
We'll turn them back on soon.

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

4 years ago[GTK] Scrollbars are broken again with GTK+ >= 3.19.11
carlosgc@webkit.org [Sat, 5 Mar 2016 06:25:30 +0000 (06:25 +0000)]
[GTK] Scrollbars are broken again with GTK+ >= 3.19.11
https://bugs.webkit.org/show_bug.cgi?id=154890

Reviewed by Michael Catanzaro.

Scrollbar style properties have been deprecated in GTK+, and it
seems that now deprecating means keeping the properties but
ignoring them. So, this reworks the whole scrollbars theme code
again to not cache style properties anymore, but retrieve them
from the GtkStyleContext. Previous GTK+ versions still need to
query the style properties, so I've added helper functions to get
all the style properties with the ifdefs, trying to keep the
common render code free of GTK+ versions ifdefs.

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::backButtonRect):
(WebCore::ScrollbarThemeGtk::forwardButtonRect):
(WebCore::ScrollbarThemeGtk::trackRect):
(WebCore::ScrollbarThemeGtk::thumbRect):
(WebCore::ScrollbarThemeGtk::paintTrackBackground):
(WebCore::ScrollbarThemeGtk::paintThumb):
(WebCore::ScrollbarThemeGtk::paint):
(WebCore::ScrollbarThemeGtk::scrollbarThickness):
(WebCore::ScrollbarThemeGtk::buttonSize):
(WebCore::ScrollbarThemeGtk::stepperSize):
(WebCore::ScrollbarThemeGtk::getStepperSpacing):
(WebCore::ScrollbarThemeGtk::troughUnderSteppers):
(WebCore::ScrollbarThemeGtk::minimumThumbLength):
(WebCore::ScrollbarThemeGtk::thumbFatness):
(WebCore::ScrollbarThemeGtk::getTroughBorder):
(WebCore::ScrollbarThemeGtk::getOrCreateStyleContext):
(WebCore::ScrollbarThemeGtk::updateThemeProperties):
(WebCore::ScrollbarThemeGtk::handleMousePressEvent):
* platform/gtk/ScrollbarThemeGtk.h:

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

4 years agoResource load statistics are not honoring private browsing
bfulgham@apple.com [Sat, 5 Mar 2016 05:24:51 +0000 (05:24 +0000)]
Resource load statistics are not honoring private browsing
https://bugs.webkit.org/show_bug.cgi?id=155054
<rdar://problem/24987873>

Reviewed by Andy Estes.

Modify the points where we capture resource load statistics to ignore
loads made during private browsing. Do this by moving more of the logic
about whether to gather statistics into the logging functions, passing
the raw input types (frame, ResourceRequest, ResourceResponse) internally
so that we don't pay any cost until we decide we want to gather data.s

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest): Revise for the new API on
ResourceLoadObserver.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::logFrameNavigation): Revise signature and
check for private browsing.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteraction): Ditto.
* loader/ResourceLoadObserver.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal): Ditto.

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

4 years agoconfig.json fix to remove duplicate scheduler.
lforschler@apple.com [Sat, 5 Mar 2016 03:42:06 +0000 (03:42 +0000)]
config.json fix to remove duplicate scheduler.

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

4 years agoFix file mime-types when using NetworkSession
commit-queue@webkit.org [Sat, 5 Mar 2016 03:30:19 +0000 (03:30 +0000)]
Fix file mime-types when using NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=155058

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-04
Reviewed by Andy Estes.

Source/WebCore:

This fixes platform/mac/fast/loader/file-url-mimetypes-3.html
and platform/mac/fast/loader/file-url-mimetypes.html.

* platform/network/mac/WebCoreURLResponse.h:

Source/WebKit2:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::NetworkDataTask):
Call adjustMIMETypeIfNecessary like we do in connection didReceiveResponse in
WebCoreResourceHandleAsOperationQueueDelegate.mm.
* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:dataTask:didReceiveResponse:completionHandler:]):
Don't content sniff file urls.  This check is analogous to ResourceHandle::shouldContentSniffURL.

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

4 years ago[WebKit2] Add WebKit2 equivalent of -[WebView _insertNewlineInQuotedContent]
weinig@apple.com [Sat, 5 Mar 2016 01:35:12 +0000 (01:35 +0000)]
[WebKit2] Add WebKit2 equivalent of -[WebView _insertNewlineInQuotedContent]
<rdar://problem/24943591>
https://bugs.webkit.org/show_bug.cgi?id=155057

Reviewed by Tim Horton.

Source/WebCore:

Move Editor::insertParagraphSeparatorInQuotedContent() into Editor.cpp
and remove the duplicated code in EditorIOS.mm and EditorMac.mm.

* editing/Editor.cpp:
(WebCore::Editor::insertParagraphSeparatorInQuotedContent):
* editing/Editor.h:
* editing/ios/EditorIOS.mm:
(WebCore::Editor::insertParagraphSeparatorInQuotedContent): Deleted.
* editing/mac/EditorMac.mm:
(WebCore::Editor::insertParagraphSeparatorInQuotedContent): Deleted.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageInsertNewlineInQuotedContent):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertNewlineInQuotedContent):
* WebProcess/WebPage/WebPage.h:
Expose WKBundlePageInsertNewlineInQuotedContent as SPI.

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

4 years agoConvert DOMTimer interval from int to std::chromo::milliseconds
barraclough@apple.com [Sat, 5 Mar 2016 01:34:21 +0000 (01:34 +0000)]
Convert DOMTimer interval from int to std::chromo::milliseconds
https://bugs.webkit.org/show_bug.cgi?id=155051

Speculative build fix.

* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createTimerInstallData):

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

4 years agoConvert DOMTimer interval from int to std::chromo::milliseconds
barraclough@apple.com [Sat, 5 Mar 2016 01:32:04 +0000 (01:32 +0000)]
Convert DOMTimer interval from int to std::chromo::milliseconds
https://bugs.webkit.org/show_bug.cgi?id=155051

iOS build fix

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

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

4 years agoUpdate defineCustomElement according to the spec rewrite
rniwa@webkit.org [Sat, 5 Mar 2016 01:23:42 +0000 (01:23 +0000)]
Update defineCustomElement according to the spec rewrite
https://bugs.webkit.org/show_bug.cgi?id=155010
<rdar://problem/24970878>

Reviewed by Chris Dumez.

Source/WebCore:

Updated the implementation of defineCustomElement and HTMLConstructor per recent rewrite of the spec:
https://w3c.github.io/webcomponents/spec/custom/#dom-document-defineelement
https://w3c.github.io/webcomponents/spec/custom/#htmlelement-constructor

defineCustomElement is now called defineElement and we disallow defining multiple custom elements with
a single class and throw an exception in defineElement.

Test: fast/custom-elements/Document-defineElement.html

* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineElement): Renamed from defineCustomElement. Throw an exception when the interface
already defines another custom element. Also added FIXME's for missing steps.

* bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement): Removed the support for specifying a tag name in the first argument when
a single class defines multiple custom elements since that now results in an exception (in defineElement).

* dom/CustomElementDefinitions.cpp:
(WebCore::CustomElementDefinitions::containsConstructor): Added.
* dom/CustomElementDefinitions.h:
* dom/Document.idl: Renamed defineCustomElement to defineElement.
* html/HTMLElement.idl: Removed the optional tag name from the constructor.

LayoutTests:

Update the tests for the rename and semantics change of defineCustomElement and HTMLElement constructor.

* fast/custom-elements/Document-createElement.html:
* fast/custom-elements/Document-defineCustomElement-expected.txt: Removed.
* fast/custom-elements/Document-defineCustomElement.html: Removed.
* fast/custom-elements/Document-defineElement-expected.txt: Renamed from LayoutTests/fast/custom-elements/Document-defineCustomElement-expected.txt.
* fast/custom-elements/Document-defineElement.html: Renamed from LayoutTests/fast/custom-elements/Document-defineCustomElement.html.
Also added a test case for defining multiple custom elements with a single class, which must throw.
* fast/custom-elements/HTMLElement-constructor-expected.txt:
* fast/custom-elements/HTMLElement-constructor.html:
Removed test cases for the tag name in the first argument as well as ones that associate a single class with multiple tag names.
* fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html:
* fast/custom-elements/parser/parser-constructs-custom-element-synchronously.html:
* fast/custom-elements/parser/parser-constructs-custom-elements.html:
* fast/custom-elements/parser/parser-fallsback-to-unknown-element.html:
* fast/custom-elements/parser/parser-sets-attributes-and-children.html:
* fast/custom-elements/parser/parser-uses-constructed-element.html:
* fast/custom-elements/parser/parser-uses-registry-of-owner-document.html:

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

4 years agoAdd iOS simulator debug bots
ap@apple.com [Sat, 5 Mar 2016 01:06:19 +0000 (01:06 +0000)]
Add iOS simulator debug bots
https://bugs.webkit.org/show_bug.cgi?id=155053

Reviewed by Lucas Forschler.

* BuildSlaveSupport/build.webkit.org-config/config.json:

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

4 years agoBegin implementing <attachment> painting on iOS
timothy_horton@apple.com [Sat, 5 Mar 2016 00:57:19 +0000 (00:57 +0000)]
Begin implementing <attachment> painting on iOS
https://bugs.webkit.org/show_bug.cgi?id=155046
<rdar://problem/24805991>

Reviewed by Enrica Casucci.

No new tests; there are existing tests that I will unskip and rebaseline
in the near future.

* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::AttachmentInfo::addLine):
(WebCore::AttachmentInfo::buildTitleLines):
(WebCore::AttachmentInfo::buildSingleLine):
(WebCore::getAttachmentProgress):
(WebCore::iconForAttachment):
(WebCore::AttachmentInfo::AttachmentInfo):
(WebCore::RenderThemeIOS::attachmentIntrinsicSize):
(WebCore::RenderThemeIOS::attachmentBaseline):
(WebCore::paintAttachmentIcon):
(WebCore::paintAttachmentText):
(WebCore::paintAttachmentProgress):
(WebCore::paintAttachmentBorder):
(WebCore::RenderThemeIOS::paintAttachment):
There are still a few missing pieces, but get <attachment> painting a bit on iOS.
We will paint an icon, action, title, and subtitle - in that order - depending on what we have.
The content is vertically and horizontally centered.

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

4 years agoConvert DOMTimer interval from int to std::chromo::milliseconds
barraclough@apple.com [Sat, 5 Mar 2016 00:56:07 +0000 (00:56 +0000)]
Convert DOMTimer interval from int to std::chromo::milliseconds
https://bugs.webkit.org/show_bug.cgi?id=155051

Reviewed by Ryosuke Niwa.

This change is pretty much mechanical, replacing int with std::chrono::milliseconds.

* inspector/InspectorInstrumentation.cpp:
(WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
(WebCore::InspectorInstrumentation::didInstallTimerImpl):
* inspector/InspectorInstrumentation.h:
(WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
(WebCore::InspectorInstrumentation::didInstallTimer):
* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::didPaint):
(WebCore::InspectorTimelineAgent::didInstallTimer):
* inspector/InspectorTimelineAgent.h:
* inspector/TimelineRecordFactory.cpp:
(WebCore::TimelineRecordFactory::createGenericTimerData):
(WebCore::TimelineRecordFactory::createTimerInstallData):
* inspector/TimelineRecordFactory.h:
* page/DOMTimer.cpp:
(WebCore::shouldForwardUserGesture):
(WebCore::DOMTimer::DOMTimer):
(WebCore::DOMTimer::~DOMTimer):
(WebCore::DOMTimer::install):
(WebCore::DOMTimer::intervalClampedToMinimum):
* page/DOMTimer.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setTimeout):
(WebCore::DOMWindow::clearTimeout):
(WebCore::DOMWindow::setInterval):
(WebCore::DOMWindow::clearInterval):
* workers/WorkerGlobalScope.cpp:
(WebCore::WorkerGlobalScope::setTimeout):
(WebCore::WorkerGlobalScope::clearTimeout):
(WebCore::WorkerGlobalScope::setInterval):
(WebCore::WorkerGlobalScope::clearInterval):

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

4 years agoStub API to support a debug menu option for measuring resource load statistics
bfulgham@apple.com [Sat, 5 Mar 2016 00:40:14 +0000 (00:40 +0000)]
Stub API to support a debug menu option for measuring resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=154998
<rdar://problem/24944604>

Reviewed by Andy Estes.

* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::resourceLoadStatisticsEnabled): Added stub.
(API::WebsiteDataStore::setResourceLoadStatisticsEnabled): Ditto.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/C/WKWebsiteDataStoreRef.cpp:
(WKWebsiteDataStoreSetResourceLoadStatisticsEnabled): Added method that calls through
to the underlying APIWebsiteDataStore class.
(WKWebsiteDataStoreGetResourceLoadStatisticsEnabled): Ditto.
* UIProcess/API/C/WKWebsiteDataStoreRef.h:

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

4 years agoUnreviewed test fix for null global WebResourceLoadStatisticsStore.
bfulgham@apple.com [Sat, 5 Mar 2016 00:36:48 +0000 (00:36 +0000)]
Unreviewed test fix for null global WebResourceLoadStatisticsStore.

* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):
(+[WebView _applicationWillTerminate]):

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

4 years agoAdd a mechanism to customize the long press action.
enrica@apple.com [Fri, 4 Mar 2016 23:55:55 +0000 (23:55 +0000)]
Add a mechanism to customize the long press action.
https://bugs.webkit.org/show_bug.cgi?id=154995
rdar://problem/24823732

Reviewed by Tim Horton.

Source/WebCore:

We want to allow long press on attachment elements as well.

* WebCore.xcodeproj/project.pbxproj: Making HTMLAttachmentElement.h private.
* html/HTMLAttachmentElement.h: Adding exported functions.

Source/WebKit2:

Adding a new private delegate method to allow clients to
replace the action sheet displayed for images and links.
The change also adds support for attachment elements.

* Shared/ios/InteractionInformationAtPosition.h:
* Shared/ios/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showImageSheet]):
(-[WKContentView _showAttachmentSheet]):
(-[WKContentView _showLinkSheet]):
(-[WKContentView _actionForLongPress]):
(-[WKContentView actionSheetAssistant:shouldIncludeAppLinkActionsForElement:]):
(-[WKContentView actionSheetAssistant:showCustomSheetForElement:]):
(-[WKContentView actionSheetAssistant:decideActionsForElement:defaultActions:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):

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

4 years ago[iOS] Throw away compiled RegExp code when navigating to a new page.
akling@apple.com [Fri, 4 Mar 2016 23:33:22 +0000 (23:33 +0000)]
[iOS] Throw away compiled RegExp code when navigating to a new page.
<https://webkit.org/b/155015>

Reviewed by Anders Carlsson.

Source/JavaScriptCore:

Add a mechanism to have the VM discard all RegExp bytecode and JIT code.

* runtime/VM.cpp:
(JSC::VM::deleteAllRegExpCode):
* runtime/VM.h:

Source/WebCore:

Discard RegExp code when doing a top-level navigation.
This frees up a couple hundred kilobytes on many pages.

* bindings/js/GCController.cpp:
(WebCore::GCController::deleteAllRegExpCode):
* bindings/js/GCController.h:
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):

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

4 years agoUse larger tiles when possible to reduce per-tile painting overhead
simon.fraser@apple.com [Fri, 4 Mar 2016 23:32:22 +0000 (23:32 +0000)]
Use larger tiles when possible to reduce per-tile painting overhead
https://bugs.webkit.org/show_bug.cgi?id=154985

Reviewed by Zalan Bujtas.

Source/WebCore:

r197541 inadvertently missed FrameView changes that push scrollability data
onto the TiledBacking, so didn't actually change behavior (hence the 512x512 tiles
in the failing tests).

Also remove m_tileSizeAtLastRevalidate from TileGrid; it's replaced by a simpler test.

* page/FrameView.cpp:
(WebCore::FrameView::addedOrRemovedScrollbar):
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::revalidateTiles):
(WebCore::TileGrid::TileGrid): Deleted.
* platform/graphics/ca/TileGrid.h:

LayoutTests:

* tiled-drawing/background-transparency-toggle-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* tiled-drawing/tile-coverage-speculative-expected.txt:
* tiled-drawing/tile-size-unscrollable-expected.txt:
* tiled-drawing/tile-size-vertically-scrollable-expected.txt:
* tiled-drawing/visible-rect-content-inset-expected.txt:

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

4 years agoUse BoxExtent instead of EdgeSet in TileController
simon.fraser@apple.com [Fri, 4 Mar 2016 23:32:14 +0000 (23:32 +0000)]
Use BoxExtent instead of EdgeSet in TileController
https://bugs.webkit.org/show_bug.cgi?id=155040

Reviewed by Zalan Bujtas.

Remove EdgeSet, which was very similar to the existing BoxExtent, and use BoxExtent
in TileController.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/EdgeSet.h: Removed.
(WebCore::EdgeSet::EdgeSet): Deleted.
(WebCore::EdgeSet::top): Deleted.
(WebCore::EdgeSet::setTop): Deleted.
(WebCore::EdgeSet::right): Deleted.
(WebCore::EdgeSet::setRight): Deleted.
(WebCore::EdgeSet::bottom): Deleted.
(WebCore::EdgeSet::setBottom): Deleted.
(WebCore::EdgeSet::left): Deleted.
(WebCore::EdgeSet::setLeft): Deleted.
(WebCore::EdgeSet::operator==): Deleted.
(WebCore::EdgeSet::operator!=): Deleted.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setHasMargins):
* platform/graphics/ca/TileController.h:

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

4 years ago[WK2] Gather resource load statistics
bfulgham@apple.com [Fri, 4 Mar 2016 23:29:31 +0000 (23:29 +0000)]
[WK2] Gather resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=154278
<rdar://problem/24702892>

Reviewed by Andy Estes.

Source/WebCore:

Tested (now under WK2) by http/tests/navigation/statistics.html

Split part of the ResourceLoadObserver into a new class (ResourceLoadStatisticsStore)
that manages the collection of ResourceLoadStatistic objects, and that can be used
in the UIProcess without touching various WebProcess-specific WebCore classes.

Have the WebProcess only fire a message to the UIProcess if data has been modified. Otherwise,
no messages should be sent. When new data is encountered, start a 5 second timer. If more
data is found during this delay, just accumulate it. When the timer fires, all data is sent
and the timer stops until a new batch of data arrives.

* CMakeLists.txt: Add the new ResourceLoadStatisticsStore class.
* WebCore.xcodeproj/project.pbxproj: Adjust visibility of ResourceLoadStatistics header,
and add new ResourceLoadStatisticsStore class.
* loader/ResourceLoadObserver.cpp:
(WebCore::ResourceLoadObserver::setResourceLoadStatisticsEnabled): Deleted.
(WebCore::ResourceLoadObserver::resourceLoadStatisticsEnabled): Deleted.
(WebCore::ResourceLoadObserver::setStatisticsStore): Added.
(WebCore::ResourceLoadObserver::logFrameNavigation): Tell the ResourceLoadStatisticsStore to fire its 'data changed'
handler if necessary.
(WebCore::ResourceLoadObserver::logSubresourceLoading): Ditto.
(WebCore::ResourceLoadObserver::logUserInteraction): Ditto.
(WebCore::ResourceLoadObserver::statisticsForOrigin): Use new ResourceLoadStatisticsStore.
(WebCore::ResourceLoadObserver::isPrevalentResource): Deleted.
(WebCore::ResourceLoadObserver::resourceStatisticsForPrimaryDomain): Deleted.
(WebCore::ResourceLoadObserver::writeDataToDisk): Deleted.
(WebCore::ResourceLoadObserver::setStatisticsStorageDirectory): Deleted.
(WebCore::ResourceLoadObserver::persistentStoragePath): Deleted.
(WebCore::ResourceLoadObserver::readDataFromDiskIfNeeded): Deleted.
(WebCore::ResourceLoadObserver::createDecoderFromDisk): Deleted.
(WebCore::ResourceLoadObserver::writeEncoderToDisk): Deleted.
* loader/ResourceLoadObserver.h:
* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::encode): Get rid of unneeded argument.
(WebCore::ResourceLoadStatistics::decode): Ditto.
(WebCore::mergeHashCountedSet): Added helper function.
(WebCore::ResourceLoadStatistics::merge): Added.
* loader/ResourceLoadStatistics.h:
(WebCore::ResourceLoadStatistics::ResourceLoadStatistics):
* loader/ResourceLoadStatisticsStore.cpp: Added.
(WebCore::ResourceLoadStatisticsStore::create):
(WebCore::ResourceLoadStatisticsStore::ResourceLoadStatisticsStore):
(WebCore::ResourceLoadStatisticsStore::isPrevalentResource):
(WebCore::ResourceLoadStatisticsStore::resourceStatisticsForPrimaryDomain):
(WebCore::ResourceLoadStatisticsStore::writeDataToDisk):
(WebCore::ResourceLoadStatisticsStore::setStatisticsStorageDirectory):
(WebCore::ResourceLoadStatisticsStore::persistentStoragePath):
(WebCore::ResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
(WebCore::ResourceLoadStatisticsStore::createDecoderFromDisk):
(WebCore::ResourceLoadStatisticsStore::writeEncoderToDisk):
(WebCore::ResourceLoadStatisticsStore::statisticsForOrigin):
(WebCore::ResourceLoadStatisticsStore::takeStatistics):
(WebCore::ResourceLoadStatisticsStore::mergeStatistics):
(WebCore::ResourceLoadStatisticsStore::setNotificationCallback):
(WebCore::ResourceLoadStatisticsStore::fireDataModificationHandler):
* loader/ResourceLoadStatisticsStore.h: Added.

Source/WebKit/mac:

Switch to maintaining a global WebCore::ResourceLoadStatisticsStore in the WebKit process,
and hand it off to the WebCore layer to use during data gathering. The ResourceLoadStatisticsStore
is now responsible for reading/writing to disk, and tracking the collection of load data.

* WebView/WebView.mm:
(WebKitInitializeApplicationStatisticsStoragePathIfNecessary): Initialize singleton
ResourceLoadStatisticsStore object for tracking state.
(-[WebView _preferencesChanged:]): Revise for new singleton.
(+[WebView _applicationWillTerminate]): Ditto.

Source/WebKit2:

Revise the WebProcess to notify the UIProcess about resource load statistics. These
updates are not time-critical, and do not need to be done in concert with the actual
load. As resource loads are made, each WebProcess notifies the UIProcess of the new
load counts, then clears its local state. These statistics are then aggregated in
the UIProcess.

* CMakeLists.txt: Add new ResourceLoadStatisticsState files to build.
* DerivedSources.make: Ditto.
* Platform/IPC/ArgumentCoders.h: Update to support HashCountedSets.
* PlatformEfl.cmake: Add new ResourceLoadStatisticsState files to build.
* PlatformGTK.cmake: Ditto.
* PlatformMac.cmake: Ditto.
* Shared/API/APIObject.h: Add new ResourceLoadStatistics type.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ExceptionDetails>::decode): Support new ResourceLoadStatistics type.
(IPC::ArgumentCoder<ResourceLoadStatistics>::encode): Added.
(IPC::ArgumentCoder<ResourceLoadStatistics>::decode): Added.
* Shared/WebCoreArgumentCoders.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode): Handle 'resourceLoadStatisticsEnabled' flag.
(WebKit::WebProcessCreationParameters::decode): Ditto.
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::ProcessPoolConfiguration): Add storage location for the
resource load statistics.
(API::ProcessPoolConfiguration::copy): Handle the new storage location and the feature flag.
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Added stub.
* UIProcess/API/APIWebsiteDataStore.h:
* UIProcess/API/Cocoa/APIWebsiteDataStoreCocoa.mm:
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory): Added.
(API::WebsiteDataStore::defaultDataStoreConfiguration): Added support for the new resource
load statistics storage location.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _initializeWithConfiguration:]): Sync Process Pool configuration parameters
with the state of our websiteData object's "ResourceLoadStatisticsEnabled" flag, so that
new processes are created in the right state.
* UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(-[WKWebsiteDataStore _resourceLoadStatisticsEnabled]): Added.
(-[WKWebsiteDataStore _setResourceLoadStatisticsEnabled:]): Added.
* UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess): Handle new flag for enabling resource
load statistics.
* UIProcess/WebResourceLoadStatisticsStore.cpp: Added.
(WebKit::WebResourceLoadStatisticsStore::create):
(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::~WebResourceLoadStatisticsStore):
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):
(WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled):
(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsEnabled):
(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded):
(WebKit::WebResourceLoadStatisticsStore::writeToDisk):
(WebKit::WebResourceLoadStatisticsStore::applicationWillTerminate):
* UIProcess/WebResourceLoadStatisticsStore.h: Added.
(WebKit::WebResourceLoadStatisticsStore::coreStore):
* UIProcess/WebResourceLoadStatisticsStore.messages.in: Added.
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::platformInitialize): Register a termination handler
to close down the resource load statistics store.
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore): Initialize the new WebResourceLoadStatisticsStore
member.
(WebKit::WebsiteDataStore::webProcessWillOpenConnection): Register the WebResourceLoadStatisticsStore
object as a work queue message receiver
(WebKit::WebsiteDataStore::webProcessDidCloseConnection): Unregister WebResourceLoadStatisticsStore.
(WebKit::WebsiteDataStore::resourceLoadStatisticsEnabled): Added.
(WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled): Ditto.
* UIProcess/WebsiteData/WebsiteDataStore.h:
(WebKit::WebsiteDataStore::resourceLoadStatisticsStore): Added.
* WebKit2.xcodeproj/project.pbxproj: Add new ResourceLoadStatisticsState files to build.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Take into account the new parameter
specifying whether resource load statistics are being captured.
(WebKit::WebProcess::WebProcess): Initialized statistics changed notification timer.
(WebKit::WebProcess::statisticsChangedTimerFired): Added. Send bundles of site load
statistics to the UIProcess on a set interval. Clear out local cache after each send.
(WebKit::WebProcess::setResourceLoadStatisticsEnabled): Added.
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in: Add new SetResourceLoadStatisticsEnabled message.

Tools:

* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration): Retrieve state of the ResourceLoadStatisticsEnabled setting.
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]): Move setting from WK1-only to be
universally applicable.
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]): Recognize when the
Resource Load Statistics flag has changed.

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

4 years agoAdded missing override specifiers under Source/WebCore.
commit-queue@webkit.org [Fri, 4 Mar 2016 23:28:22 +0000 (23:28 +0000)]
Added missing override specifiers under Source/WebCore.
https://bugs.webkit.org/show_bug.cgi?id=155021

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

No new tests needed.

* bridge/NP_jsobject.cpp:
* css/CSSStyleSheet.cpp:
* dom/MutationObserver.cpp:
* editing/DictationCommand.cpp:
* editing/EditingStyle.cpp:
* loader/EmptyClients.cpp:
* loader/SinkDocument.cpp:
* page/DOMWindow.cpp:
* page/animation/CSSPropertyAnimation.cpp:
* platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
Also added #if(SOUP) guard to
ResourceHandleStreamingClient::getOrCreateReadBuffer
because it is not an overridden method otherwise.
* platform/text/LineEnding.cpp:
* xml/parser/XMLDocumentParserLibxml2.cpp:

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

4 years agoREGRESSION (r197531): JavaScriptCore ASan build fails due to weak external symbol
ddkilzer@apple.com [Fri, 4 Mar 2016 22:18:10 +0000 (22:18 +0000)]
REGRESSION (r197531): JavaScriptCore ASan build fails due to weak external symbol
<http://webkit.org/b/155033>
<rdar://problem/24979661>

Reviewed by Alexey Proskuryakov.

* runtime/JSObject.cpp:
(JSC::JSObject::ordinaryToPrimitive): Don't mark this method
inline since it's also used in DatePrototype.cpp, and is
declared as a public class method.
* runtime/JSObject.h:
(JSC::JSObject::ordinaryToPrimitive): Don't export this method
since it is not used outside of JavaScriptCore.

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

4 years agoTemporarily use bundle identifier as part of user directory suffix
dbates@webkit.org [Fri, 4 Mar 2016 22:07:39 +0000 (22:07 +0000)]
Temporarily use bundle identifier as part of user directory suffix
https://bugs.webkit.org/show_bug.cgi?id=155042
<rdar://problem/24983174>

Reviewed by Brent Fulgham and Brady Eidson.

* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox):

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

4 years agoMax out timer throttling immediately for pre-render pages
barraclough@apple.com [Fri, 4 Mar 2016 21:56:46 +0000 (21:56 +0000)]
Max out timer throttling immediately for pre-render pages
https://bugs.webkit.org/show_bug.cgi?id=155038

Reviewed by Chris Dumez.

If a hidden page has never been visible, no need to gently ramp into throttling - treat it
the same as a page that has been viewed, but has been in the background for a long time.

Why? The throttling mechanism scales with the amount of background work by shifting the
limit - once all background pages have maxed out the limit, they should no longer be burden
of the system. However the mechanism doesn't currently do anything to accelerate towards
the limit based on the number of pages in the ramp up phase, and ramp up duration is
proportional to limit (so ramping up to a high limit takes a long time). So if you quickly
create a large number of hidden pages the system may be under excessive load for a while,
as we slowly ramp up to a limit that will adequately constrain resource consumption.
In cases where a large number of hidden pages are rapidly generated, many likely remain in
the pre-render state, so this mitigation should typically help.

* page/Page.cpp:
(WebCore::Page::updateDOMTimerAlignmentInterval):
    - if m_isPrerender then m_timerAlignmentInterval is set to the limit.
(WebCore::Page::setIsPrerender):
    - When this changes updateDOMTimerAlignmentInterval().

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

4 years agoRemove vcxproj build system
achristensen@apple.com [Fri, 4 Mar 2016 21:36:03 +0000 (21:36 +0000)]
Remove vcxproj build system
https://bugs.webkit.org/show_bug.cgi?id=154388

Rubber-stamped by Brent Fulgham.

* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree.sln: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTree.vcxproj.filters: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeApple.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeDebugWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncher.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeLauncherRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePostBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreePreBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/DumpRenderTree/DumpRenderTreeReleaseWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiff.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffCommonWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffDebugWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncher.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffLauncherRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPostBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffPreBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffRelease.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/ImageDiff/ImageDiffReleaseWinCairo.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePlugin.vcxproj.filters: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginCommon.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginDebug.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPostBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginPreBuild.cmd: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginProduction.props: Removed.
* DumpRenderTree/DumpRenderTree.vcxproj/TestNetscapePlugin/TestNetscapePluginRelease.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.vcxproj: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowser.vcxproj.filters: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCF.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCFLite.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserCommon.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserDebug.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.vcxproj: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLib.vcxproj.filters: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibCommon.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibDebug.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibPostBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibPreBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibProduction.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserLibRelease.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserPostBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserPreBuild.cmd: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserProduction.props: Removed.
* MiniBrowser/MiniBrowser.vcxproj/MiniBrowserRelease.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.sln: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPI.vcxproj.filters: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommon.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPICommonWinCairo.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebug.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIDebugWinCairo.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPostBuild.cmd: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIPreBuild.cmd: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIProduction.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIRelease.props: Removed.
* TestWebKitAPI/TestWebKitAPI.vcxproj/TestWebKitAPIReleaseWinCairo.props: Removed.
* win/AssembleBuildLogs: Removed.
* win/AssembleBuildLogs/AssembleBuildLogs.vcxproj: Removed.
* win/AssembleBuildLogs/AssembleBuildLogs.vcxproj.filters: Removed.
* win/AssembleBuildLogs/AssembleLogs.cmd: Removed.
* win/AssembleBuildLogs/README: Removed.

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

4 years agoTemporarily skip fast/table/table-overflow.html on ios-simulator
ryanhaddad@apple.com [Fri, 4 Mar 2016 21:27:44 +0000 (21:27 +0000)]
Temporarily skip fast/table/table-overflow.html on ios-simulator
https://bugs.webkit.org/show_bug.cgi?id=155036

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoSkip fast/text/all-small-caps-whitespace.html on ios-simulator
ryanhaddad@apple.com [Fri, 4 Mar 2016 21:19:19 +0000 (21:19 +0000)]
Skip fast/text/all-small-caps-whitespace.html on ios-simulator

Unreviewed test gardening.

* platform/ios-simulator/TestExpectations:

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

4 years agoSkip storage/indexeddb/modern/256-open-databases.html on mac
ryanhaddad@apple.com [Fri, 4 Mar 2016 21:05:06 +0000 (21:05 +0000)]
Skip storage/indexeddb/modern/256-open-databases.html on mac
https://bugs.webkit.org/show_bug.cgi?id=155028

Unreviewed test gardening.

* platform/wk2/TestExpectations:

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

4 years agoRelease build fix after r197572.
achristensen@apple.com [Fri, 4 Mar 2016 21:00:02 +0000 (21:00 +0000)]
Release build fix after r197572.
https://bugs.webkit.org/show_bug.cgi?id=154993

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesExpectedToWrite:]):

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

4 years agoUnify determination of page timer alignment
barraclough@apple.com [Fri, 4 Mar 2016 20:58:50 +0000 (20:58 +0000)]
Unify determination of page timer alignment
https://bugs.webkit.org/show_bug.cgi?id=155031

Reviewed by Chris Dumez.

Currently this is scattered throughout Page - sites that call setDOMTimerAlignmentInterval have
to determine the correct alignment interval. Instead, replace setDOMTimerAlignmentInterval with
updateDOMTimerAlignmentInterval, and unify the policy decision here.

* page/Page.cpp:
(WebCore::Page::setTimerThrottlingState):
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
      Also, to simplify always record the timestamp when the state changes.
(WebCore::Page::setTimerAlignmentIntervalIncreaseLimit):
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
(WebCore::Page::updateDOMTimerAlignmentInterval):
    - Was setDOMTimerAlignmentInterval, now determines the new alignment value.
(WebCore::Page::timerAlignmentIntervalIncreaseTimerFired):
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
(WebCore::Page::setDOMTimerAlignmentInterval): Deleted.
    - Removed, became updateDOMTimerAlignmentInterval.
* page/Page.h:
    - setDOMTimerAlignmentInterval -> updateDOMTimerAlignmentInterval
      m_timerThrottlingEnabledTime -> m_timerThrottlingStateLastChangedTime

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

4 years agoFix crash seen in iOS simulator tests
simon.fraser@apple.com [Fri, 4 Mar 2016 20:19:45 +0000 (20:19 +0000)]
Fix crash seen in iOS simulator tests
https://bugs.webkit.org/show_bug.cgi?id=155030

Reviewed by Tim Horton.

owningGraphicsLayer() can be null when the tileSizeChangeTimer fires, so null check
it and return, as we do for the tileRevalidationTimer.

* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::tileSizeChangeTimerFired):

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

4 years agoRemove vcxproj build system
achristensen@apple.com [Fri, 4 Mar 2016 19:59:59 +0000 (19:59 +0000)]
Remove vcxproj build system
https://bugs.webkit.org/show_bug.cgi?id=154388

Rubber-stamped by Brent Fulgham.

Source/JavaScriptCore:

* JavaScriptCore.vcxproj/JavaScriptCore.sln: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.submit.sln: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj: Removed.
* JavaScriptCore.vcxproj/JavaScriptCore.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreCF.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreCFLite.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreCommon.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreDLL.cpp: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreDebug.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreDebugCFLite.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.make: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGenerated.vcxproj.filters: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedCommon.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedDebug.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedProduction.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreGeneratedRelease.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCorePostBuild.cmd: Removed.
* JavaScriptCore.vcxproj/JavaScriptCorePreBuild.cmd: Removed.
* JavaScriptCore.vcxproj/JavaScriptCorePreLink.cmd: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreProduction.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreRelease.props: Removed.
* JavaScriptCore.vcxproj/JavaScriptCoreReleaseCFLite.props: Removed.
* JavaScriptCore.vcxproj/build-generated-files.pl: Removed.
* JavaScriptCore.vcxproj/copy-files.cmd: Removed.

Source/WebCore:

* WebCore.vcxproj/WebCore.submit.sln: Removed.
* WebCore.vcxproj/WebCore.vcxproj: Removed.
* WebCore.vcxproj/WebCore.vcxproj.filters: Removed.
* WebCore.vcxproj/WebCoreCFNetwork.props: Removed.
* WebCore.vcxproj/WebCoreCG.props: Removed.
* WebCore.vcxproj/WebCoreCURL.props: Removed.
* WebCore.vcxproj/WebCoreCairo.props: Removed.
* WebCore.vcxproj/WebCoreCommon.props: Removed.
* WebCore.vcxproj/WebCoreDebug.props: Removed.
* WebCore.vcxproj/WebCoreDebugWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreGenerated.make: Removed.
* WebCore.vcxproj/WebCoreGenerated.vcxproj: Removed.
* WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Removed.
* WebCore.vcxproj/WebCoreGeneratedCommon.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedDebug.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedDebugWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedProduction.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedRelease.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedReleaseWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreGeneratedWinCairo.make: Removed.
* WebCore.vcxproj/WebCoreGeneratedWinCairoCommon.props: Removed.
* WebCore.vcxproj/WebCoreIncludeCommon.props: Removed.
* WebCore.vcxproj/WebCoreMediaQT.props: Removed.
* WebCore.vcxproj/WebCorePostBuild.cmd: Removed.
* WebCore.vcxproj/WebCorePreBuild.cmd: Removed.
* WebCore.vcxproj/WebCoreProduction.props: Removed.
* WebCore.vcxproj/WebCoreQuartzCore.props: Removed.
* WebCore.vcxproj/WebCoreRelease.props: Removed.
* WebCore.vcxproj/WebCoreReleaseWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj: Removed.
* WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Removed.
* WebCore.vcxproj/WebCoreTestSupportCommon.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportDebug.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportProduction.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportRelease.props: Removed.
* WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Removed.
* WebCore.vcxproj/build-generated-files.pl: Removed.
* WebCore.vcxproj/copyForwardingHeaders.cmd: Removed.
* WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Removed.
* WebCore.vcxproj/migrate-scripts.pl: Removed.

Source/WebKit:

* WebKit.vcxproj/Interfaces/FixMIDLHeaders.pl: Removed.
* WebKit.vcxproj/Interfaces/Interfaces.vcxproj: Removed.
* WebKit.vcxproj/Interfaces/Interfaces.vcxproj.filters: Removed.
* WebKit.vcxproj/Interfaces/InterfacesCommon.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesDebug.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesDebugWinCairo.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesPostBuild.cmd: Removed.
* WebKit.vcxproj/Interfaces/InterfacesPreBuild.cmd: Removed.
* WebKit.vcxproj/Interfaces/InterfacesProduction.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesRelease.props: Removed.
* WebKit.vcxproj/Interfaces/InterfacesReleaseWinCairo.props: Removed.
* WebKit.vcxproj/WebKit.sln: Removed.
* WebKit.vcxproj/WebKit.submit.sln: Removed.
* WebKit.vcxproj/WebKit/WebKit.vcxproj: Removed.
* WebKit.vcxproj/WebKit/WebKit.vcxproj.filters: Removed.
* WebKit.vcxproj/WebKit/WebKitANGLE.props: Removed.
* WebKit.vcxproj/WebKit/WebKitApple.props: Removed.
* WebKit.vcxproj/WebKit/WebKitCFLite.props: Removed.
* WebKit.vcxproj/WebKit/WebKitCommon.props: Removed.
* WebKit.vcxproj/WebKit/WebKitDebug.props: Removed.
* WebKit.vcxproj/WebKit/WebKitDebugWinCairo.props: Removed.
* WebKit.vcxproj/WebKit/WebKitDirectX.props: Removed.
* WebKit.vcxproj/WebKit/WebKitPostBuild.cmd: Removed.
* WebKit.vcxproj/WebKit/WebKitPreBuild.cmd: Removed.
* WebKit.vcxproj/WebKit/WebKitPreLink.cmd: Removed.
* WebKit.vcxproj/WebKit/WebKitProduction.props: Removed.
* WebKit.vcxproj/WebKit/WebKitRelease.props: Removed.
* WebKit.vcxproj/WebKit/WebKitReleaseWinCairo.props: Removed.
* WebKit.vcxproj/WebKit/WebKitVersion.cmd: Removed.

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

4 years agoRemove vcxproj build system
achristensen@apple.com [Fri, 4 Mar 2016 19:48:51 +0000 (19:48 +0000)]
Remove vcxproj build system
https://bugs.webkit.org/show_bug.cgi?id=154388

Rubber-stamped by Brent Fulgham.

* WTF.vcxproj/WTF.submit.sln: Removed.
* WTF.vcxproj/WTF.vcxproj: Removed.
* WTF.vcxproj/WTF.vcxproj.filters: Removed.
* WTF.vcxproj/WTFCFLite.props: Removed.
* WTF.vcxproj/WTFCommon.props: Removed.
* WTF.vcxproj/WTFCoreFoundation.props: Removed.
* WTF.vcxproj/WTFDebug.props: Removed.
* WTF.vcxproj/WTFDebugWinCairo.props: Removed.
* WTF.vcxproj/WTFGenerated.make: Removed.
* WTF.vcxproj/WTFGenerated.vcxproj: Removed.
* WTF.vcxproj/WTFGenerated.vcxproj.filters: Removed.
* WTF.vcxproj/WTFGeneratedCommon.props: Removed.
* WTF.vcxproj/WTFGeneratedDebug.props: Removed.
* WTF.vcxproj/WTFGeneratedProduction.props: Removed.
* WTF.vcxproj/WTFGeneratedRelease.props: Removed.
* WTF.vcxproj/WTFPostBuild.cmd: Removed.
* WTF.vcxproj/WTFPreBuild.cmd: Removed.
* WTF.vcxproj/WTFProduction.props: Removed.
* WTF.vcxproj/WTFRelease.props: Removed.
* WTF.vcxproj/WTFReleaseWinCairo.props: Removed.
* WTF.vcxproj/build-generated-files.pl: Removed.
* WTF.vcxproj/copy-files.cmd: Removed.
* WTF.vcxproj/work-around-vs-dependency-tracking-bugs.py: Removed.

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

4 years agoRemove use of deprecated sqlite3_expired
beidson@apple.com [Fri, 4 Mar 2016 19:42:54 +0000 (19:42 +0000)]
Remove use of deprecated sqlite3_expired
https://bugs.webkit.org/show_bug.cgi?id=155025

Reviewed by Tim Horton.

Since we exclusively use sqlite3_prepare_v2 and don't use sqlite3_prepare,
manually checking for expired statements is not necessary.

* platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::isExpired): Null check the statement, but don't bother
  with sqlite3_expired.

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

4 years agoLocation.reload should not be writable
cdumez@apple.com [Fri, 4 Mar 2016 19:30:36 +0000 (19:30 +0000)]
Location.reload should not be writable
https://bugs.webkit.org/show_bug.cgi?id=154989

Reviewed by Gavin Barraclough.

Source/JavaScriptCore:

After r196770, operations marked as [Unforgeable] in the IDL (such as
Location.reload) are correctly reported as not writable by
Object.getOwnPropertyDescriptor(). Trying to set such property in JS
is correctly ignored (or throws in strict mode) if the object has
previously been reified. However, due to a bug in putEntry(), it was
still possible to override the property if the object was not reified
yet. This patch fixes the issue by checking in putEntry() that entries
that are functions are not ReadOnly before calling putDirect().

* runtime/Lookup.h:
(JSC::putEntry):

LayoutTests:

Add a layout test to verify that operations marked as [Unforgeable] in
IDL are indeed not writable.

* fast/html/unforgeable-operations-readonly-expected.txt: Added.
* fast/html/unforgeable-operations-readonly.html: Added.

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

4 years agoMove CryptoDigest to WebCore/platform
dbates@webkit.org [Fri, 4 Mar 2016 19:26:23 +0000 (19:26 +0000)]
Move CryptoDigest to WebCore/platform
https://bugs.webkit.org/show_bug.cgi?id=155008
<rdar://problem/24969787>

Reviewed by Brent Fulgham.

CryptoDigest provides a platform-independent interface for interacting with platform-
specific cryptographic hashing services. We currently make use of this code as part
of the implementation of Web Crypto. This code will also be beneficial as part of
implementing support for Content Security Policy inline script and inline stylesheet
hashes. We should move CryptoDigest to WebCore/platform to convey that it a general
purpose platform abstraction.

* CMakeLists.txt: Add include directory WebCore/platform/crypto.
* PlatformEfl.cmake: Add file platform/crypto/gnutls/CryptoDigestGnuTLS.cpp and
remove file crypto/gnutls/CryptoDigestGnuTLS.cpp.
* PlatformGTK.cmake: Ditto.
* PlatformMac.cmake: Add file platform/crypto/mac/CryptoDigestMac.cpp and
remove file crypto/mac/CryptoDigestMac.cpp.
* WebCore.xcodeproj/project.pbxproj:
* crypto/algorithms/CryptoAlgorithmSHA1.cpp:
(WebCore::CryptoAlgorithmSHA1::digest): Substitute "CryptoDigest::Algorithm" for "CryptoAlgorithmIdentifier".
* crypto/algorithms/CryptoAlgorithmSHA224.cpp:
(WebCore::CryptoAlgorithmSHA224::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA256.cpp:
(WebCore::CryptoAlgorithmSHA256::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA384.cpp:
(WebCore::CryptoAlgorithmSHA384::digest): Ditto.
* crypto/algorithms/CryptoAlgorithmSHA512.cpp:
(WebCore::CryptoAlgorithmSHA512::digest): Ditto.
* crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
(WebCore::getCryptoDigestAlgorithm): Converts a CryptoAlgorithmIdentifier enumerator to a
CryptoDigest::Algorithm enumerator, if applicable.
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign): Write in terms of WebCore::getCryptoDigestAlgorithm().
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify): Ditto.
* platform/crypto/CryptoDigest.h: Renamed from Source/WebCore/crypto/CryptoDigest.h. Also added enum CryptoDigest::Algorithm
and changed constructor to take this enum.
* platform/crypto/gnutls/CryptoDigestGnuTLS.cpp: Renamed from Source/WebCore/crypto/gnutls/CryptoDigestGnuTLS.cpp.
(WebCore::CryptoDigest::CryptoDigest): Substitute "CryptoDigest::Algorithm" for "CryptoAlgorithmIdentifier".
(WebCore::CryptoDigest::~CryptoDigest): Ditto.
(WebCore::CryptoDigest::create): Ditto.
(WebCore::CryptoDigest::addBytes): Ditto.
(WebCore::CryptoDigest::computeHash): Ditto.
* platform/crypto/mac/CryptoDigestMac.cpp: Renamed from Source/WebCore/crypto/mac/CryptoDigestMac.cpp.
(WebCore::toSHA1Context): Ditto.
(WebCore::toSHA224Context): Ditto.
(WebCore::toSHA256Context): Ditto.
(WebCore::toSHA384Context): Ditto.
(WebCore::toSHA512Context): Ditto.
(WebCore::CryptoDigest::CryptoDigest): Ditto.
(WebCore::CryptoDigest::~CryptoDigest): Ditto.
(WebCore::CryptoDigest::create): Ditto.
(WebCore::CryptoDigest::addBytes): Ditto.
(WebCore::CryptoDigest::computeHash): Ditto.

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

4 years agoRebaseline inspector/model/remote-object.html for mac after r197539
ryanhaddad@apple.com [Fri, 4 Mar 2016 19:13:25 +0000 (19:13 +0000)]
Rebaseline inspector/model/remote-object.html for mac after r197539

Unreviewed test gardening.

* platform/mac/inspector/model/remote-object-expected.txt:

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

4 years agoWhitespace causes font-variant: all-small-caps to synthesize
mmaxfield@apple.com [Fri, 4 Mar 2016 19:09:37 +0000 (19:09 +0000)]
Whitespace causes font-variant: all-small-caps to synthesize
https://bugs.webkit.org/show_bug.cgi?id=155004
<rdar://problem/24630796>

Reviewed by Darin Adler.

Source/WebCore:

Many fonts (such as Avenir Next) don't report to support whitespace characters under
smcp or c2sc. Previously, we were using this as a signal to synthesize small caps
instead of true small caps. However, a better solution is for whitespace to never
cause synthesis with all-small-caps.

Test: fast/text/all-small-caps-whitespace.html

* platform/graphics/mac/ComplexTextController.cpp:
(WebCore::shouldSynthesize):
(WebCore::ComplexTextController::collectComplexTextRuns):

Tools:

* DumpRenderTree/mac/DumpRenderTree.mm:
(allowedFontFamilySet):
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::allowedFontFamilySet):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::allowedFontFamilySet):

LayoutTests:

* fast/text/all-small-caps-whitespace-expected.html: Added.
* fast/text/all-small-caps-whitespace.html: Added.
* platform/mac/TestExpectations: Skip on platforms which don't support proper coverage
queries.

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

4 years agoUse NSURLSession for loading in WebKit2
achristensen@apple.com [Fri, 4 Mar 2016 19:05:00 +0000 (19:05 +0000)]
Use NSURLSession for loading in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=154993

Reviewed by Sam Weinig.

Source/WebKit2:

* config.h:

Source/WTF:

* wtf/Platform.h:

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

4 years agoREGRESSION (r197541): many tiled drawing tests failing after new "large tile size...
simon.fraser@apple.com [Fri, 4 Mar 2016 18:48:57 +0000 (18:48 +0000)]
REGRESSION (r197541): many tiled drawing tests failing after new "large tile size" logic was added
https://bugs.webkit.org/show_bug.cgi?id=155020

Rebaseline these tests.

* platform/mac-wk2/TestExpectations:
* tiled-drawing/background-transparency-toggle-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
* tiled-drawing/scrolling/fixed/four-bars-zoomed-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders-expected.txt:
* tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-overflow-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* tiled-drawing/tile-coverage-speculative-expected.txt:
* tiled-drawing/tile-size-unscrollable-expected.txt:
* tiled-drawing/tile-size-vertically-scrollable-expected.txt:
* tiled-drawing/visible-rect-content-inset-expected.txt:

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

4 years ago[iOS] Crash during font loading when injected bundle cancels load
mmaxfield@apple.com [Fri, 4 Mar 2016 18:30:52 +0000 (18:30 +0000)]
[iOS] Crash during font loading when injected bundle cancels load
https://bugs.webkit.org/show_bug.cgi?id=155001

Reviewed by Tim Horton.

Source/WebCore:

If a injected bundle cancels the load, the fontLoaded() callback will be
called twice. We can simply detect this condition.

Test: CancelLoading.CancelFontSubresource API test

* css/CSSFontFaceSource.cpp:
(WebCore::CSSFontFaceSource::fontLoaded):

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2/Ahem.ttf: Added.
* TestWebKitAPI/Tests/WebKit2/webfont.html: Added.
* TestWebKitAPI/Tests/WebKit2Cocoa/CancelFontSubresource.mm: Added.
(-[Myles webView:didFinishNavigation:]):
(TEST):
* TestWebKitAPI/Tests/WebKit2Cocoa/CancelFontSubresourcePlugIn.mm: Added.
(-[CancelFontSubresourcePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[CancelFontSubresourcePlugIn webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:]):

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

4 years agoThe visibility of the airplay menu also depends on whether there's a custom menu...
adachan@apple.com [Fri, 4 Mar 2016 18:27:04 +0000 (18:27 +0000)]
The visibility of the airplay menu also depends on whether there's a custom menu item.
https://bugs.webkit.org/show_bug.cgi?id=154987

Reviewed by Darin Adler.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):

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

4 years agoUse NetworkSession for pings
achristensen@apple.com [Fri, 4 Mar 2016 18:01:37 +0000 (18:01 +0000)]
Use NetworkSession for pings
https://bugs.webkit.org/show_bug.cgi?id=154984

Reviewed by Antti Koivisto.

Before this patch, we were using NSURLConnection for pings when the rest of the loading was being
done with NSURLSession.  To fix this, I implemented PingLoad, which is the NetworkSession equivalent
of PingHandle.

This fixes http/tests/security/contentSecurityPolicy/report-status-code-zero-when-using-https.html

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier):
* NetworkProcess/PingLoad.h: Added.
(WebKit::PingLoad::PingLoad):
(WebKit::PingLoad::willPerformHTTPRedirection):
(WebKit::PingLoad::didReceiveChallenge):
(WebKit::PingLoad::didReceiveResponseNetworkSession):
(WebKit::PingLoad::didReceiveData):
(WebKit::PingLoad::didCompleteWithError):
(WebKit::PingLoad::didBecomeDownload):
(WebKit::PingLoad::didSendData):
(WebKit::PingLoad::wasBlocked):
(WebKit::PingLoad::cannotShowURL):
(WebKit::PingLoad::timeoutTimerFired):
(WebKit::PingLoad::~PingLoad):
* WebKit2.xcodeproj/project.pbxproj:

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

4 years ago[check-webkit-style] Added checks for redundant virtual specifiers.
commit-queue@webkit.org [Fri, 4 Mar 2016 17:58:51 +0000 (17:58 +0000)]
[check-webkit-style] Added checks for redundant virtual specifiers.
https://bugs.webkit.org/show_bug.cgi?id=155017

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-04
Reviewed by Darin Adler.

Added 3 new checks related to virtual, override, and final specifiers:

1. When "override" is present, "virtual" is redundant.
2. When "final" is present, "virtual" is redundant.
3. When "final" is present, "override" is redundant.

* Scripts/webkitpy/style/checkers/cpp.py:
(_FunctionState.begin):
(_FunctionState.is_virtual):
(_check_parameter_name_against_text):
(_error_redundant_specifier):
(check_function_definition):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(FunctionDetectionTest.perform_function_detection):
(FunctionDetectionTest.test_basic_function_detection):
(FunctionDetectionTest.test_function_declaration_detection):
(FunctionDetectionTest.test_pure_function_detection):
(FunctionDetectionTest.test_override_and_final_function_detection):
(FunctionDetectionTest.test_non_functions):
(FunctionDetectionTest.test_parameter_list):

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

4 years agoFollowup to:
darin@apple.com [Fri, 4 Mar 2016 17:20:46 +0000 (17:20 +0000)]
Followup to:
Remove "virtual" from all lines that have both "virtual" and "override".
https://bugs.webkit.org/show_bug.cgi?id=155005

Reviewed by Geoffrey Garen.

* Scripts/do-webcore-rename: Added more regular expressions to make sure we always
use either override or final, not both, and to remove virtual from all lines that
have both virtual and final.

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

4 years agoREGRESSION (r197541): many tiled drawing tests failing after new "large tile size...
darin@apple.com [Fri, 4 Mar 2016 17:02:25 +0000 (17:02 +0000)]
REGRESSION (r197541): many tiled drawing tests failing after new "large tile size" logic was added
https://bugs.webkit.org/show_bug.cgi?id=155020

* platform/mac-wk2/TestExpectations: Added failure expectations for tiled drawing tests.
* platform/wk2/TestExpectations: Moved some expectations to a more appropriate section in the file.

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

4 years agoInform WebKit and WebCore if a page is controlled by automation.
timothy@apple.com [Fri, 4 Mar 2016 16:55:55 +0000 (16:55 +0000)]
Inform WebKit and WebCore if a page is controlled by automation.

https://bugs.webkit.org/show_bug.cgi?id=154991
rdar://problem/24965784

Reviewed by Joseph Pecoraro.

Source/WebCore:

* page/Page.h:
(WebCore::Page::isControlledByAutomation): Added.
(WebCore::Page::setControlledByAutomation): Added.

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetIsControlledByAutomation):
(WKPageSetControlledByAutomation):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setControlledByAutomation):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isControlledByAutomation):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageIsControlledByAutomation):
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldDispatchFakeMouseMoveEvents):
(WebKit::WebPage::isControlledByAutomation):
(WebKit::WebPage::setControlledByAutomation):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

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

4 years agoRemove "virtual" from all lines that have both "virtual" and "override".
darin@apple.com [Fri, 4 Mar 2016 16:47:55 +0000 (16:47 +0000)]
Remove "virtual" from all lines that have both "virtual" and "override".
https://bugs.webkit.org/show_bug.cgi?id=155005

Reviewed by Geoffrey Garen.

* Scripts/do-webcore-rename: Added a regular expression to this script to do the job.

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

4 years ago[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in gener...
gskachkov@gmail.com [Fri, 4 Mar 2016 09:52:39 +0000 (09:52 +0000)]
[ES6] Arrow function syntax. Lexical bind super inside of the arrow function in generator.
https://bugs.webkit.org/show_bug.cgi?id=152575

Reviewed by Yusuke Suzuki.

Added support of the 'SuperProperty' in arrow function within of the generator
method of class. Before patch parser  did not recognize that current arrow function
is declated inside of the generator and raise SyntaxError.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::isGeneratorBoundary):
(JSC::Scope::setIsFunction):
(JSC::Scope::setIsGenerator):
(JSC::Parser::closestParentOrdinaryFunctionNonLexicalScope):
* tests/stress/arrowfunction-lexical-bind-superproperty.js:

LayoutTests:

* js/arrowfunction-superproperty-expected.txt:
* js/arrowfunction-syntax-errors-expected.txt:
* js/script-tests/arrowfunction-superproperty.js:
* js/script-tests/arrowfunction-syntax-errors.js:

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

4 years agoComposedTreeIterator may traverse slotted nodes multiple times
antti@apple.com [Fri, 4 Mar 2016 09:29:12 +0000 (09:29 +0000)]
ComposedTreeIterator may traverse slotted nodes multiple times
https://bugs.webkit.org/show_bug.cgi?id=154983

Reviewed by Ryosuke Niwa.

Source/WebCore:

Traversal of slotted nodes can escape to real siblings. Those siblings are then traversed again as slotted nodes.

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

* dom/ComposedTreeIterator.cpp:
(WebCore::ComposedTreeIterator::initializeContextStack):
(WebCore::ComposedTreeIterator::traverseNextInShadowTree):
(WebCore::ComposedTreeIterator::traverseNextLeavingContext):
(WebCore::ComposedTreeIterator::advanceInSlot):
* dom/ComposedTreeIterator.h:
(WebCore::ComposedTreeIterator::Context::Context):

    Include end iterator to the context.
    For slotted nodes set it up to point to the next sibling of the node.

(WebCore::ComposedTreeIterator::context):
(WebCore::ComposedTreeIterator::traverseNextSkippingChildren):

LayoutTests:

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

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

4 years agoDrop DocumentSharedObjectPool immediately when going into PageCache.
akling@apple.com [Fri, 4 Mar 2016 09:03:00 +0000 (09:03 +0000)]
Drop DocumentSharedObjectPool immediately when going into PageCache.
<https://webkit.org/b/154986>

Reviewed by Antti Koivisto.

The DocumentSharedObjectPool is a weirdly efficient little optimization
that deduplicates ElementData during the first 10s of a Document's lifetime.
While it's up, every ElementData created will persist so it can be used for
deduplication.

If a Document goes into the PageCache while its shared object pool is still
alive, we can just kill it right away. This will sometimes allow us to free
a bunch of ElementData sooner.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::setInPageCache):
(WebCore::Document::clearSharedObjectPool):
(WebCore::Document::sharedObjectPoolClearTimerFired): Deleted.
* dom/Document.h:

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

4 years agoRemove PassRefPtr from ThreadableLoader and relatives
youenn.fablet@crf.canon.fr [Fri, 4 Mar 2016 08:27:36 +0000 (08:27 +0000)]
Remove PassRefPtr from ThreadableLoader and relatives
https://bugs.webkit.org/show_bug.cgi?id=154966

Reviewed by Darin Adler.

Covered by existing tests.

* loader/DocumentThreadableLoader.cpp:
(WebCore::DocumentThreadableLoader::create):
* loader/DocumentThreadableLoader.h:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoader::create):
* loader/ThreadableLoader.h:
* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
* loader/WorkerThreadableLoader.h:

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

4 years agoLet XCode have its own way and also sort the file.
rniwa@webkit.org [Fri, 4 Mar 2016 07:41:45 +0000 (07:41 +0000)]
Let XCode have its own way and also sort the file.

* WebCore.xcodeproj/project.pbxproj:

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

4 years agoDFG/FTL should inline accesses to RegExpObject::m_lastIndex
fpizlo@apple.com [Fri, 4 Mar 2016 06:36:24 +0000 (06:36 +0000)]
DFG/FTL should inline accesses to RegExpObject::m_lastIndex
https://bugs.webkit.org/show_bug.cgi?id=155003

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

The Octane/regexp benchmark sets RegExps' lastIndex a lot. I could imagine this being
something that people want to do. Right now, I'm not convinced that making the RegExp object
be more plain-JS would be a good idea considering that pretty much all uses of it will
require some special compiler magic. Also, it's good that this patch teaches the compiler
how to reason about lastIndex since some of my other plans for regexp involve having the
compiler treat more regexp stuff as intrinsic.

This is a smaller Octane/regexp speed-up than I hoped - maybe around 1%. It's an enormous
speed-up on the microbenchmarks attached to this patch.

* dfg/DFGAbstractHeap.h:
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGHeapLocation.h:
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compilePutAccessorByVal):
(JSC::DFG::SpeculativeJIT::compileGetRegExpObjectLastIndex):
(JSC::DFG::SpeculativeJIT::compileSetRegExpObjectLastIndex):
* dfg/DFGSpeculativeJIT.h:
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGStoreBarrierInsertionPhase.cpp:
* ftl/FTLAbstractHeapRepository.cpp:
* ftl/FTLAbstractHeapRepository.h:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileStringReplace):
(JSC::FTL::DFG::LowerDFGToB3::compileGetRegExpObjectLastIndex):
(JSC::FTL::DFG::LowerDFGToB3::compileSetRegExpObjectLastIndex):
(JSC::FTL::DFG::LowerDFGToB3::didOverflowStack):
(JSC::FTL::DFG::LowerDFGToB3::lowObject):
(JSC::FTL::DFG::LowerDFGToB3::lowRegExpObject):
(JSC::FTL::DFG::LowerDFGToB3::lowString):
* runtime/RegExpObject.h:
(JSC::RegExpObject::createStructure):
(JSC::RegExpObject::offsetOfLastIndex):

LayoutTests:

* js/regress/regexp-last-index-expected.txt: Added.
* js/regress/regexp-last-index.html: Added.
* js/regress/regexp-set-last-index-expected.txt: Added.
* js/regress/regexp-set-last-index.html: Added.
* js/regress/script-tests/regexp-last-index.js: Added.
* js/regress/script-tests/regexp-set-last-index.js: Added.

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

4 years agoRegression(r196770): Unable to use HipChat Mac app
cdumez@apple.com [Fri, 4 Mar 2016 06:00:02 +0000 (06:00 +0000)]
Regression(r196770): Unable to use HipChat Mac app
https://bugs.webkit.org/show_bug.cgi?id=154999
<rdar://problem/24931959>

Reviewed by Darin Adler.

Source/JavaScriptCore:

Add a setter to PutPropertySlot to override the 'isStrictMode' flag.

* runtime/PutPropertySlot.h:
(JSC::PutPropertySlot::setStrictMode):

Source/WebCore:

r196770 made [Unforgeable] operations such as Location.reload()
non-writable as per the Web IDL specification. As a result,
trying to set such properties will be ignored in non-strict
mode and will throw an exception is strict mode. This also matches
Firefox and Chrome.

However, this broke the HipChat Mac App (the Web App seems fine)
because it sets Location.reload() and is using strict mode, therefore
causing an exception to be thrown.

This patch adds a quirk to JSLocation::putDelegate() which disable
strict mode when we detect that the application is HipChat. As a
result, we no longer throw when HipChat tries to set Location.reload
and the application is able to connect again.

* bindings/js/JSLocationCustom.cpp:
(WebCore::JSLocation::putDelegate):
Add a quirk which disables strict mode if the application is HipChat.

* platform/RuntimeApplicationChecks.cpp:
(WebCore::mainBundleIdentifier):
Extract this from mainBundleIsEqualTo() so it can be shared with
applicationBundleIdentifier().

(WebCore::applicationBundleIdentifier):
Returns the application bundle identifier, which is a static variable.
For the WebContent / Networking processes, the application bundle
identifier gets set to the UIProcess bundle identifier upon
initialization. If unset, we fall back to using mainBundleIdentifier()
which will do the right thing for the WK2 UIProcess and WK1.

(WebCore::mainBundleIsEqualTo):
Extract part of the code to mainBundleIdentifier() to better share
code.

(WebCore::applicationIsHipChat):
Add utility function that checks if the application is HipChat. This
will do the right thing whether it is called from the UIProcess, the
WebProcess or the UIProcess.

(WebCore::setApplicationBundleIdentifier):
Add utility function to set the application bundle identifier. It gets
called with the UIProcess bundle identifier by the NetworkProcess and
the WebProcess upon initialization.

* platform/RuntimeApplicationChecks.h:

Source/WebKit2:

Have the NetworkProcess and the WebProcess pass the UIProcess bundle
identifier to WebCore so that we can do app detection of applications
using a WK2 WebView (such as HipChat).

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

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

4 years agoUnreviewed, remove test with flaky timeout that doesn't test anything anymore. This...
fpizlo@apple.com [Fri, 4 Mar 2016 05:49:23 +0000 (05:49 +0000)]
Unreviewed, remove test with flaky timeout that doesn't test anything anymore. This test
was relevant back when arguments got torn off; something that we don't do anymore. It
uses a loop that waits for the top-tier compiler to compile it. We don't write tests
like that anymore.

* js/dfg-osr-exit-between-create-and-tearoff-arguments-expected.txt: Removed.
* js/dfg-osr-exit-between-create-and-tearoff-arguments.html: Removed.
* js/script-tests/dfg-osr-exit-between-create-and-tearoff-arguments.js: Removed.

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

4 years ago[JSC] Add support for MADD, MSUB and MNEG to Air
commit-queue@webkit.org [Fri, 4 Mar 2016 04:40:17 +0000 (04:40 +0000)]
[JSC] Add support for MADD, MSUB and MNEG to Air
https://bugs.webkit.org/show_bug.cgi?id=154997

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-03-03
Reviewed by Filip Pizlo.

ARM64 can do an Add/Sub in the Multiply units.
LLVM was doing so but we lost that when switching to B3.

This patch adds those instructions in Air.

There are more ALUs than multiply units, thus we are more
likely to successfully schedule a Multiply+Add than 2 Multiply.
I am conservative and only emit a multiply-add if the value
can be interned. As far as I can tell from what is generated
by LLVM, that backend had the same rule.

* assembler/MacroAssemblerARM64.h:
(JSC::MacroAssemblerARM64::multiplyAdd32):
(JSC::MacroAssemblerARM64::multiplySub32):
(JSC::MacroAssemblerARM64::multiplyNeg32):
(JSC::MacroAssemblerARM64::multiplyAdd64):
(JSC::MacroAssemblerARM64::multiplySub64):
(JSC::MacroAssemblerARM64::multiplyNeg64):
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::lower):
* b3/air/AirOpcode.opcodes:
* b3/testb3.cpp:
(JSC::B3::populateWithInterestingValues):
(JSC::B3::floatingPointOperands):
(JSC::B3::int64Operands):
(JSC::B3::int32Operands):
(JSC::B3::testMulAddArgsLeft):
(JSC::B3::testMulAddArgsRight):
(JSC::B3::testMulAddArgsLeft32):
(JSC::B3::testMulAddArgsRight32):
(JSC::B3::testMulSubArgsLeft):
(JSC::B3::testMulSubArgsRight):
(JSC::B3::testMulSubArgsLeft32):
(JSC::B3::testMulSubArgsRight32):
(JSC::B3::testMulNegArgs):
(JSC::B3::testMulNegArgs32):
(JSC::B3::run):

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

4 years agoUnreviewed, rolling in r197174.
ggaren@apple.com [Fri, 4 Mar 2016 04:02:25 +0000 (04:02 +0000)]
Unreviewed, rolling in r197174.
https://bugs.webkit.org/show_bug.cgi?id=154762

The right calculation for alignment is actually:

    vmAlignment - getpagesize() + vmSize

instead of:

    vmAlignment - vmPageSize + vmSize

The vmPageSize might be larger than getpagesize().

Restored changeset:

"bmalloc: Added a fast XLarge allocator"
https://bugs.webkit.org/show_bug.cgi?id=154720
http://trac.webkit.org/changeset/197174

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

4 years ago[ES6] Implement Proxy.[[SetPrototypeOf]]
sbarati@apple.com [Fri, 4 Mar 2016 03:43:06 +0000 (03:43 +0000)]
[ES6] Implement Proxy.[[SetPrototypeOf]]
https://bugs.webkit.org/show_bug.cgi?id=154931

Reviewed by Ryosuke Niwa.

This patch is a straight forward implementation of Proxy.[[SetPrototypeOf]]
with respect to section 9.5.2 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-setprototypeof-v

* runtime/JSObject.cpp:
(JSC::JSObject::putInlineSlow):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::put):
(JSC::ProxyObject::getGenericPropertyNames):
(JSC::ProxyObject::performSetPrototype):
(JSC::ProxyObject::setPrototype):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-set-prototype-of.js: Added.
(assert):
(throw.new.Error.let.handler.get setPrototypeOf):
(throw.new.Error.set let):
(throw.new.Error.set catch):
(throw.new.Error):
(assert.let.handler.setPrototypeOf):
(assert.set let):
(assert.set catch):
(let.handler.setPrototypeOf):
(set let):
(set catch):

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

4 years agoJSArrayBuffers should be collected less aggressively
keith_miller@apple.com [Fri, 4 Mar 2016 03:19:11 +0000 (03:19 +0000)]
JSArrayBuffers should be collected less aggressively
https://bugs.webkit.org/show_bug.cgi?id=154982

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

We are currently too aggressive in our collection of ArrayBuffer wrappers.
There are three cases where we need to avoid collecting ArrayBuffer wrappers.
1. If the wrapper has custom properties.
2. If the wrapper is a subclass of ArrayBuffer.
3. If the wrapper is in a WeakMap/WeakSet.

Currently, we only pass the first case in WebCore and none in the jsc CLI.
This patch removes some optimizations that cause us to collect when we
should not. Namely, always skipping the object unless it has custom
properties. Additionally, in the case of subclassing, we also need a way
for custom JSArrayBuffer objects to register themselves as the wrapper for
an ArrayBuffer class.

Finally, this patch fixes an issue where views would not mark their ArrayBuffer
as an opaque root. This patch also moves an associated ASSERT that the
ArrayBuffer held by a view is not null in JSGenericTypedArrayView::visitChildren
into JSArrayBufferView::visitChildren, where we add the opaque root.

* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::finishCreation):
(JSC::JSArrayBuffer::create):
(JSC::JSArrayBuffer::createWithoutWrapping):
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::visitChildren):
* runtime/JSArrayBufferView.h:
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::visitChildren): Deleted.
* runtime/SimpleTypedArrayController.cpp:
(JSC::SimpleTypedArrayController::toJS):
(JSC::SimpleTypedArrayController::registerWrapper):
(JSC::SimpleTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots):
(JSC::SimpleTypedArrayController::JSArrayBufferOwner::finalize):
* runtime/SimpleTypedArrayController.h:
* runtime/TypedArrayController.h:

Source/WebCore:

We are currently too aggressive in our collection of ArrayBuffer wrappers.
There are three cases where we need to avoid collecting ArrayBuffer wrappers.
1. If the wrapper has custom properties.
2. If the wrapper is a subclass of ArrayBuffer.
3. If the wrapper is in a WeakMap/WeakSet.

Currently, we only pass the first case in WebCore and none in the jsc CLI.
This patch removes some optimizations that cause us to collect when we
should not. Namely, always skipping the object unless it has custom
properties. Additionally, in the case of subclassing, we also need a way
for custom JSArrayBuffer objects to register themselves as the wrapper for
an ArrayBuffer class.

Finally, this patch removes an unnecessary ref() and deref() of
ArrayBuffer objects during the creation/destruction of the wrapper.
Since an ArrayBuffer object's GC lifetime will be at least as long
as the lifetime of the wrapper we are creating for it we don't need
to ref() and deref() the ArrayBuffer object. This lifetime is
guaranteed because ArrayBuffer objects are both GCed and refcounted
and any new wrapper will visit the ArrayBuffer object as long as the
wrapper is still alive.

Test: js/arraybuffer-wrappers.html

* bindings/js/JSDOMBinding.h:
(WebCore::toJS):
* bindings/js/WebCoreTypedArrayController.cpp:
(WebCore::WebCoreTypedArrayController::registerWrapper):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::finalize):
(WebCore::WebCoreTypedArrayController::JSArrayBufferOwner::isReachableFromOpaqueRoots): Deleted.
* bindings/js/WebCoreTypedArrayController.h:

LayoutTests:

* js/arraybuffer-wrappers-expected.txt: Added.
* js/arraybuffer-wrappers.html: Added.
* js/script-tests/arraybuffer-wrappers.js: Added.
(prototype.types.forEach):

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

4 years agoOctane/regexp's Exec function should benefit from array length accessor inlining
fpizlo@apple.com [Fri, 4 Mar 2016 02:43:53 +0000 (02:43 +0000)]
Octane/regexp's Exec function should benefit from array length accessor inlining
https://bugs.webkit.org/show_bug.cgi?id=154994

Reviewed by Benjamin Poulain.

It does:

    var thingy = blahbitty.blah;
    if (thingy)
        foo = thingy.length;

So, 'thingy' is SpecArray | SpecOther, which prevents the array length accessor inlining from
kicking in. Our strategy for this elsewhere in the DFG is to allow a one-time speculation that
we won't see SpecOther, since *usually* we see SpecOther mixed with other stuff in cases like
this where there is some null check guarding the code.

This gives another slight speed-up on Octane/regexp.

* bytecode/SpeculatedType.h:
(JSC::isCellSpeculation):
(JSC::isCellOrOtherSpeculation):
(JSC::isNotCellSpeculation):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNode.h:
(JSC::DFG::Node::shouldSpeculateCell):
(JSC::DFG::Node::shouldSpeculateCellOrOther):
(JSC::DFG::Node::shouldSpeculateNotCell):

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

4 years agoUse larger tiles when possible to reduce per-tile painting overhead
simon.fraser@apple.com [Fri, 4 Mar 2016 02:26:49 +0000 (02:26 +0000)]
Use larger tiles when possible to reduce per-tile painting overhead
https://bugs.webkit.org/show_bug.cgi?id=154985
rdar://problem/23635219

Reviewed by Tim Horton.
Source/WebCore:

There's no reason to use lots of 512x512 tiles on a non-scrollable page. We can reduce
per-tile painting overhead by using one big tile. On vertically scrolling pages, we
can also use wide tiles to reduce tile-crossing when painting. Have FrameView tell
the TiledBacking about scrollability, allowing TileController to make tile size decisions.

Change the "giant tile" code path to just return whether Settings says we're in giant
tile mode, so that tile size decisions can be made in TileController.

TileController now stores a single margin size, and a per-edge margin flag rather than a size
per edge. It computes tile size based on scrollability, but adjusts tile size with some
hysteresis to avoid size thrashing for content that frequently resizes the document (e.g.
some performance tests).

TileGrid stores a copy of the tile size, so that it remains unchanged from one revalidate
to the next, and the grid can detect when the tile size changes, since it needs to throw away
all tiles in that case.

Tests: tiled-drawing/tile-size-both-scrollable.html
       tiled-drawing/tile-size-horizontally-scrollable.html
       tiled-drawing/tile-size-unscrollable.html
       tiled-drawing/tile-size-vertically-scrollable.html

* WebCore.xcodeproj/project.pbxproj:
* page/FrameView.cpp:
(WebCore::FrameView::addedOrRemovedScrollbar):
(WebCore::FrameView::willStartLiveResize): Tell the tile backing when live resize starts and stops.
(WebCore::FrameView::willEndLiveResize):
* platform/graphics/EdgeSet.h: Added. Template class that just stores some value
per edge.
(WebCore::EdgeSet::EdgeSet):
(WebCore::EdgeSet::top):
(WebCore::EdgeSet::setTop):
(WebCore::EdgeSet::right):
(WebCore::EdgeSet::setRight):
(WebCore::EdgeSet::bottom):
(WebCore::EdgeSet::setBottom):
(WebCore::EdgeSet::left):
(WebCore::EdgeSet::setLeft):
(WebCore::EdgeSet::operator==):
(WebCore::EdgeSet::operator!=):
* platform/graphics/GraphicsLayerClient.h: Rather than have the client return the
tile size, have it return whether we're in giant tile mode.
(WebCore::GraphicsLayerClient::useGiantTiles):
(WebCore::GraphicsLayerClient::tileSize): Deleted.
* platform/graphics/TiledBacking.h:
(WebCore::defaultTileSize): Deleted.
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::platformCALayerUseGiantTiles):
(WebCore::GraphicsLayerCA::platformCALayerTileSize): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayerClient.h:
(WebCore::PlatformCALayerClient::platformCALayerUseGiantTiles):
(WebCore::PlatformCALayerClient::platformCALayerTileSize): Deleted.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::TileController):
(WebCore::TileController::setScrollability):
(WebCore::TileController::willStartLiveResize):
(WebCore::TileController::didEndLiveResize):
(WebCore::TileController::tileSize):
(WebCore::TileController::setHasMargins):
(WebCore::TileController::setMarginSize):
(WebCore::TileController::hasMargins):
(WebCore::TileController::hasHorizontalMargins):
(WebCore::TileController::hasVerticalMargins):
(WebCore::TileController::topMarginHeight):
(WebCore::TileController::bottomMarginHeight):
(WebCore::TileController::leftMarginWidth):
(WebCore::TileController::rightMarginWidth):
(WebCore::TileController::setTileMargins): Deleted.
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::TileGrid):
(WebCore::TileGrid::setNeedsDisplayInRect):
(WebCore::TileGrid::rectForTileIndex):
(WebCore::TileGrid::getTileIndexRangeForRect):
(WebCore::TileGrid::removeAllTiles):
(WebCore::TileGrid::revalidateTiles):
* platform/graphics/ca/TileGrid.h:
(WebCore::TileGrid::tileSize):
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::setTiledBackingHasMargins):
(WebCore::RenderLayerBacking::useGiantTiles):
(WebCore::RenderLayerBacking::tileSize): Deleted.
* rendering/RenderLayerBacking.h:

Source/WebKit2:

Do a bit of #include cleanup.

* Shared/mac/RemoteLayerBackingStore.mm:
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

LayoutTests:

Rebaseline tests with new tile sizes. Add new tests that explicitly test tile size on
pages with different scrollability.

* tiled-drawing/background-transparency-toggle-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-iframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-expected.txt:
* tiled-drawing/scrolling/fast-scroll-iframe-latched-mainframe-with-handler-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-html-background-expected.txt:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-expected.txt:
* tiled-drawing/tile-coverage-after-scroll-speculative-expected.txt:
* tiled-drawing/tile-coverage-scroll-to-bottom-expected.txt:
* tiled-drawing/tile-coverage-slow-scrolling-expected.txt:
* tiled-drawing/tile-coverage-speculative-expected.txt:
* tiled-drawing/tile-size-both-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-both-scrollable.html: Added.
* tiled-drawing/tile-size-horizontally-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-horizontally-scrollable.html: Added.
* tiled-drawing/tile-size-unscrollable-expected.txt: Added.
* tiled-drawing/tile-size-unscrollable.html: Added.
* tiled-drawing/tile-size-vertically-scrollable-expected.txt: Copied from LayoutTests/tiled-drawing/scrolling/fixed-background/fixed-background-no-image-expected.txt.
* tiled-drawing/tile-size-vertically-scrollable.html: Added.
* tiled-drawing/visible-rect-content-inset-expected.txt:

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

4 years agoFix an image resource URL in tiled scrolling tests
simon.fraser@apple.com [Fri, 4 Mar 2016 02:26:36 +0000 (02:26 +0000)]
Fix an image resource URL in tiled scrolling tests
https://bugs.webkit.org/show_bug.cgi?id=154981

Reviewed by Tim Horton.

These tests had an incorrect url to compositing/resources/simple_image.png.

* tiled-drawing/scrolling/fixed-background/fixed-background-composited-expected.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-composited.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-negative-z-index-fixed-expected.html:
* tiled-drawing/scrolling/fixed-background/fixed-background-negative-z-index-fixed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-body-layer.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-opacity.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-positioned.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-transformed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background-zoomed.html:
* tiled-drawing/scrolling/fixed-background/fixed-body-background.html:
* tiled-drawing/scrolling/fixed-background/fixed-html-background.html:
* tiled-drawing/scrolling/fixed-background/fixed-non-propagated-body-background.html:

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

4 years agoAdd Proxy tests for exceptions that depend on an object being non-extensible and...
sbarati@apple.com [Fri, 4 Mar 2016 02:25:30 +0000 (02:25 +0000)]
Add Proxy tests for exceptions that depend on an object being non-extensible and having configurable properties
https://bugs.webkit.org/show_bug.cgi?id=154745

Reviewed by Geoffrey Garen.

This patch is mostly an implementation of Proxy.[[OwnPropertyKeys]]
with respect to section 9.5.11 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys

This patch also changes call sites of getOwnPropertyNames and
getPropertyNames to expect that an exception can be thrown.

* dfg/DFGOperations.cpp:
* inspector/JSInjectedScriptHost.cpp:
(Inspector::JSInjectedScriptHost::iteratorEntries):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute):
* runtime/IntlObject.cpp:
(JSC::supportedLocales):
* runtime/JSCJSValue.h:
* runtime/JSCJSValueInlines.h:
(JSC::JSValue::get):
(JSC::JSValue::put):
* runtime/JSONObject.cpp:
(JSC::Stringifier::Holder::appendNextProperty):
(JSC::Walker::walk):
* runtime/JSObject.cpp:
(JSC::JSObject::getPropertyNames):
(JSC::JSObject::getGenericPropertyNames):
* runtime/JSObject.h:
(JSC::makeIdentifier):
(JSC::createListFromArrayLike):
* runtime/JSPropertyNameEnumerator.h:
(JSC::propertyNameEnumerator):
* runtime/JSPropertyNameIterator.cpp:
(JSC::JSPropertyNameIterator::create):
* runtime/MapConstructor.cpp:
(JSC::constructMap):
* runtime/ObjectConstructor.cpp:
(JSC::defineProperties):
(JSC::objectConstructorSeal):
(JSC::objectConstructorFreeze):
(JSC::objectConstructorIsSealed):
(JSC::objectConstructorIsFrozen):
(JSC::ownPropertyKeys):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::getOwnPropertySlotByIndex):
(JSC::ProxyObject::deleteProperty):
(JSC::ProxyObject::deletePropertyByIndex):
(JSC::ProxyObject::defineOwnProperty):
(JSC::ProxyObject::performGetOwnPropertyNames):
(JSC::ProxyObject::getOwnPropertyNames):
(JSC::ProxyObject::getOwnNonIndexPropertyNames):
(JSC::ProxyObject::getStructurePropertyNames):
(JSC::ProxyObject::getGenericPropertyNames):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
(JSC::ProxyObject::create):
(JSC::ProxyObject::createStructure):
* runtime/Structure.cpp:
(JSC::Structure::Structure):
(JSC::Structure::add):
(JSC::Structure::getPropertyNamesFromStructure):
(JSC::Structure::checkConsistency):
(JSC::Structure::canCachePropertyNameEnumerator):
(JSC::Structure::canAccessPropertiesQuicklyForEnumeration):
(JSC::Structure::canAccessPropertiesQuickly): Deleted.
* runtime/Structure.h:
* runtime/WeakMapConstructor.cpp:
(JSC::constructWeakMap):
* tests/es6.yaml:
* tests/stress/proxy-own-keys.js: Added.
(assert):
(throw.new.Error.let.handler.ownKeys):
(throw.new.Error):
(assert.let.handler.get ownKeys):
(assert.let.handler.ownKeys):
(let.handler.ownKeys):
(i.catch):
(shallowEq):
(let.handler.getOwnPropertyDescriptor):
(i.set assert):
(set add):
(set assert):
(set if):

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

4 years agoWeb Inspector: Temporarily hide the TimelineSidebarPanel
timothy@apple.com [Fri, 4 Mar 2016 01:57:29 +0000 (01:57 +0000)]
Web Inspector: Temporarily hide the TimelineSidebarPanel

https://bugs.webkit.org/show_bug.cgi?id=154974
rdar://problem/24956380

Reviewed by Joseph Pecoraro.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView): Remove _showNavigationSidebarItem and hide the sidebar.

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

4 years agoArray prototype JS builtins should support Symbol.species
keith_miller@apple.com [Fri, 4 Mar 2016 01:56:39 +0000 (01:56 +0000)]
Array prototype JS builtins should support Symbol.species
https://bugs.webkit.org/show_bug.cgi?id=154710

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Add support for Symbol.species in the Array.prototype JS
builtin functions.

* builtins/ArrayPrototype.js:
(filter):
(map):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::finishCreation):
(JSC::arrayConstructorPrivateFuncIsArrayConstructor):
* runtime/ArrayConstructor.h:
(JSC::ArrayConstructor::create):
* runtime/CommonIdentifiers.h:
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* tests/stress/array-species-functions.js:
(id):

LayoutTests:

Add test that checks the Array object created by a species
constructor in Array.prototype functions cannot come from a
different global object without subclassing.

* js/array-species-different-globalobjects-expected.txt: Added.
* js/array-species-different-globalobjects.html: Added.

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

4 years ago[ES6] Make Unicode RegExp pattern parsing conform to the spec
msaboff@apple.com [Fri, 4 Mar 2016 01:24:28 +0000 (01:24 +0000)]
[ES6] Make Unicode RegExp pattern parsing conform to the spec
https://bugs.webkit.org/show_bug.cgi?id=154988

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Updated RegExp pattern processing with 'u' (Unicode) flag to conform to the
spec (https://tc39.github.io/ecma262/2016/#sec-patterns).  In the spec, the
grammar is annotated with [U] annotations.  Productions that are prefixed with
[+U] are only available with the Unicode flags while productions prefixed with
[~U] are only available without the Unicode flag.

Added flags argument to Yarr::checkSyntax() so we can catch Unicode flag related
parsing errors at syntax checking time.  Restricted what escapes are available for
non Unicode patterns.  Most of this is defined in the IdentityEscape rule in the
pattern grammar.

Added \- as a CharacterClass only escape in Unicode patterns.

Updated the tests for these changes.

Made changes suggested in https://bugs.webkit.org/show_bug.cgi?id=154842#c22 after
change set r197426 was landed.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createRegExp):
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createRegExp):
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::Interpreter::InputStream::readChecked):
(JSC::Yarr::Interpreter::InputStream::readSurrogatePairChecked):
(JSC::Yarr::Interpreter::InputStream::reread):
(JSC::Yarr::Interpreter::InputStream::uncheckInput):
(JSC::Yarr::Interpreter::InputStream::atStart):
(JSC::Yarr::Interpreter::InputStream::atEnd):
(JSC::Yarr::Interpreter::testCharacterClass):
(JSC::Yarr::Interpreter::backtrackPatternCharacter):
(JSC::Yarr::Interpreter::matchDisjunction):
(JSC::Yarr::ByteCompiler::atomPatternCharacter):
* yarr/YarrParser.h:
(JSC::Yarr::Parser::Parser):
(JSC::Yarr::Parser::isIdentityEscapeAnError):
(JSC::Yarr::Parser::parseEscape):
(JSC::Yarr::Parser::parse):
* yarr/YarrPattern.cpp:
(JSC::Yarr::CharacterClassConstructor::putChar):
(JSC::Yarr::CharacterClassConstructor::putRange):
(JSC::Yarr::CharacterClassConstructor::addSorted):
(JSC::Yarr::YarrPatternConstructor::setupAlternativeOffsets):
* yarr/YarrSyntaxChecker.cpp:
(JSC::Yarr::SyntaxChecker::disjunction):
(JSC::Yarr::checkSyntax):
* yarr/YarrSyntaxChecker.h:

LayoutTests:

Added tests cases.

* js/regexp-unicode-expected.txt:
* js/script-tests/regexp-unicode.js:
(shouldThrowInvalidEscape):

[ES6] Add support for Symbol.toPrimitive
https://bugs.webkit.org/show_bug.cgi?id=154877

Reviewed by Saam Barati.

Update test for Symbol.toPrimitive.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

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

4 years ago[ES6] Implement Proxy.[[DefineOwnProperty]]
sbarati@apple.com [Fri, 4 Mar 2016 01:07:04 +0000 (01:07 +0000)]
[ES6] Implement Proxy.[[DefineOwnProperty]]
https://bugs.webkit.org/show_bug.cgi?id=154759

Reviewed by Geoffrey Garen and Mark Lam.

This patch is a straight forward implementation of Proxy.[[DefineOwnProperty]]
with respect to section 9.5.6 of the ECMAScript spec.
https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-defineownproperty-p-desc

* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptor):
(JSC::objectConstructorGetOwnPropertyDescriptors):
* runtime/ObjectConstructor.h:
(JSC::constructEmptyObject):
(JSC::constructObjectFromPropertyDescriptor):
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::isExtensible):
(JSC::ProxyObject::performDefineOwnProperty):
(JSC::ProxyObject::defineOwnProperty):
(JSC::ProxyObject::visitChildren):
* runtime/ProxyObject.h:
* tests/es6.yaml:
* tests/stress/proxy-define-own-property.js: Added.
(assert):
(throw.new.Error):
(assert.let.handler.get defineProperty):
(assert.let.handler.defineProperty):
(let.handler.defineProperty):
(i.catch):
(assert.try.):
(assert.set get catch):
(assert.let.setter):
(assert.let.getter):
(assert.set get let.handler.defineProperty):
(assert.set get let):
(assert.):

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

4 years agoUse std::make_unique<> when creating std::unique_ptr<>
gyuyoung.kim@webkit.org [Fri, 4 Mar 2016 00:54:21 +0000 (00:54 +0000)]
Use std::make_unique<> when creating std::unique_ptr<>
https://bugs.webkit.org/show_bug.cgi?id=154574

Reviewed by Darin Adler.

* NetworkProcess/cache/NetworkCacheStatistics.cpp:
(WebKit::NetworkCache::Statistics::open):
* NetworkProcess/cache/NetworkCacheStatistics.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createColorChooser):

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

4 years ago[ES6] Add support for Symbol.toPrimitive
keith_miller@apple.com [Fri, 4 Mar 2016 00:47:55 +0000 (00:47 +0000)]
[ES6] Add support for Symbol.toPrimitive
https://bugs.webkit.org/show_bug.cgi?id=154877

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch adds suport for Symbol.toPrimitive. Since we don't currently
generate snippits for one side of a binary operation we only need to change
the JSObject::ToPrimitive function and update some optimizations in the DFG
that need to know how conversions to primitive values should work. As of
ES6, the date prototype is also no longer special cased in the ToPrimitive
operation. Instead, Date.prototype has a Symbol.species function that
replicates the old behavior.

* bytecode/ObjectPropertyConditionSet.cpp:
(JSC::generateConditionsForPropertyMissConcurrently):
* bytecode/ObjectPropertyConditionSet.h:
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::watchConditions):
(JSC::DFG::Graph::canOptimizeStringObjectAccess):
* dfg/DFGGraph.h:
* runtime/CommonIdentifiers.h:
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::finishCreation):
(JSC::dateProtoFuncToPrimitiveSymbol):
* runtime/Error.cpp:
(JSC::throwTypeError):
* runtime/Error.h:
* runtime/JSCJSValueInlines.h:
(JSC::toPreferredPrimitiveType):
* runtime/JSObject.cpp:
(JSC::callToPrimitiveFunction):
(JSC::JSObject::ordinaryToPrimitive):
(JSC::JSObject::defaultValue):
(JSC::JSObject::toPrimitive):
(JSC::JSObject::getPrimitiveNumber):
(JSC::callDefaultValueFunction): Deleted.
(JSC::throwTypeError): Deleted.
* runtime/JSObject.h:
(JSC::JSObject::toPrimitive): Deleted.
* runtime/SmallStrings.h:
* runtime/SymbolPrototype.cpp:
(JSC::SymbolPrototype::finishCreation):
* runtime/SymbolPrototype.h:
(JSC::SymbolPrototype::create):
* tests/es6.yaml:
* tests/stress/date-symbol-toprimitive.js: Added.
* tests/stress/ropes-symbol-toprimitive.js: Added.
(ropify):
(String.prototype.Symbol.toPrimitive):
* tests/stress/symbol-toprimitive.js: Added.
(foo.Symbol.toPrimitive):
(catch):

LayoutTests:

Update test for Symbol.toPrimitive.

* js/Object-getOwnPropertyNames-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

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

4 years agoWeb Inspector: Selected range path component should be zero time corrected
mattbaker@apple.com [Fri, 4 Mar 2016 00:39:41 +0000 (00:39 +0000)]
Web Inspector: Selected range path component should be zero time corrected
https://bugs.webkit.org/show_bug.cgi?id=154950
<rdar://problem/24947022>

Reviewed by Timothy Hatcher.

Subtracts zero time from TimelineRange start and end values, and corrects
a cosmetic issue in TimelineRuler which showed selection handle tooltips
that weren't adjusted for the ruler's zero time.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype._timeRangeSelectionChanged):

* UserInterface/Views/TimelineRuler.js:
(WebInspector.TimelineRuler.prototype._updateSelection):

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

4 years agoWeb Inspector: Events and Frames mode switch does not fully switch until first zoom
mattbaker@apple.com [Fri, 4 Mar 2016 00:33:15 +0000 (00:33 +0000)]
Web Inspector: Events and Frames mode switch does not fully switch until first zoom
https://bugs.webkit.org/show_bug.cgi?id=154971
<rdar://problem/24955871>

Reviewed by Timothy Hatcher.

Switching modes toggles the visibility of the tree outline, which changes
the width of the overview's ruler, graphs, and scroll container. When the
view mode changes, the overview needs a forced "resize" layout.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview.prototype._viewModeDidChange):

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

4 years agoSource/WebCore:
rniwa@webkit.org [Fri, 4 Mar 2016 00:28:44 +0000 (00:28 +0000)]
Source/WebCore:
Disallow custom elements inside a window-less documents
https://bugs.webkit.org/show_bug.cgi?id=154944
<rdar://problem/24944875>

Reviewed by Antti Koivisto.

Disallow custom elements inside a window-less documents such as the shared inert document of template elements
and the ones created by DOMImplementation.createDocument and DOMImplementation.createHTMLDocument.

Throw NotSupportedError in defineCustomElement when it's called in such a document as discussed in:
https://github.com/w3c/webcomponents/issues/369

Tests: fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html
       fast/custom-elements/parser/parser-uses-registry-of-owner-document.html

* bindings/js/JSDOMBinding.cpp:
(WebCore::throwNotSupportedError): Added.
* bindings/js/JSDOMBinding.h:
* bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::defineCustomElement): Throw NotSupportedError when the context object's document doesn't
have a browsing context (i.e. window-less).
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Replaced a FIXME with an assertion now that we
disallow instantiation of custom elements inside a template element.

LayoutTests:
Disallow custom elements inside template elements and share the registry for windowless documents
https://bugs.webkit.org/show_bug.cgi?id=154944
<rdar://problem/24944875>

Reviewed by Antti Koivisto.

Added various tests to ensure the custom elements registry is not shared between documents with
distinct browsing context (e.g. iframes) but shared among the ones that share a single browsing context
(e.g. documents created by DOMImplementation).

Also added a test case for defineCustomElement to ensure it throws NotSupportedError when it's called on
a template element's inert owner document as well as a basic test case for document.write.

* fast/custom-elements/Document-defineCustomElement-expected.txt:
* fast/custom-elements/Document-defineCustomElement.html: Added a new test case.
* fast/custom-elements/parser/parser-constructs-custom-element-in-document-write-expected.txt: Added.
* fast/custom-elements/parser/parser-constructs-custom-element-in-document-write.html: Added.
* fast/custom-elements/parser/parser-uses-registry-of-owner-document-expected.txt: Added.
* fast/custom-elements/parser/parser-uses-registry-of-owner-document.html: Added.

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

4 years agoMove SPI to CFNetworkSPI.h
achristensen@apple.com [Fri, 4 Mar 2016 00:26:23 +0000 (00:26 +0000)]
Move SPI to CFNetworkSPI.h
https://bugs.webkit.org/show_bug.cgi?id=154992

Reviewed by Andy Estes.

Source/WebCore:

* platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::applyBasicAuthorizationHeader):

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

4 years agoUse CredentialStorage with NetworkSession
achristensen@apple.com [Fri, 4 Mar 2016 00:21:34 +0000 (00:21 +0000)]
Use CredentialStorage with NetworkSession
https://bugs.webkit.org/show_bug.cgi?id=154939

Reviewed by Darin Adler.

Source/WebCore:

This makes the credential-based http tests pass when using NetworkSession.

* platform/network/CredentialBase.h:
(WebCore::CredentialBase::encodingRequiresPlatformData):
* platform/network/CredentialStorage.h:
WEBCORE_EXPORT more things that are newly used in WebKit2.

Source/WebKit2:

* config.h:
Added compile-time flag to help us be able to keep track and remove this code when we can.
* NetworkProcess/NetworkDataTask.h:
(WebKit::NetworkDataTask::pendingDownloadLocation):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::clearCachedCredentials):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
* NetworkProcess/NetworkSession.h:
(WebKit::NetworkSession::sessionID):
* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::applyBasicAuthorizationHeader):
(WebKit::NetworkDataTask::NetworkDataTask):
Use a credential storage and preemptively apply basic authentication headers if we have credentials from the storage.
This is analogous to code in ResourceHandle::createNSURLConnection.

(WebKit::NetworkDataTask::didReceiveChallenge):
Make this look more like ResourceHandle::didReceiveAuthenticationChallenge.
The call to tryPasswordBasedAuthentication was moved from the delegate callback to here.

(WebKit::NetworkDataTask::willPerformHTTPRedirection):
Use credentials from the credential storage if they exist.  This is analogous to code in ResourceHandle::willSendRequest.

(WebKit::NetworkDataTask::tryPasswordBasedAuthentication):
Use credentials from the credential storage if they exist.  This is analogous to code in ResourceHandle::tryHandlePasswordBasedAuthentication.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]):
If we are given a credential with CredentialPersistenceForSession, put it in the credential storage and give
CFNetwork a credential with CredentialPersistenceNone so it won't automatically be used again until the credential
storage says its ok to use again.  This gives us the ability to clear session credentials when logout credentials are used.
This is analogous to code in ResourceHandle::receivedCredential.

(WebKit::NetworkSession::defaultSession):
(WebKit::NetworkSession::NetworkSession):
(WebKit::NetworkSession::~NetworkSession):
(WebKit::NetworkSession::dataTaskForIdentifier):
(WebKit::NetworkSession::clearCredentials): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::clearCachedCredentials):
(WebKit::WebProcess::focusedWebPage):
We no longer need to clear credentials from the NSURLSessions because we don't store session credentials in them.
Instead, calling CredentialStorage.clearCredentials is sufficient.

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

4 years ago[GTK] Unreviewed fix after r197505 (Run the run-benchmark script on the performance...
clopez@igalia.com [Thu, 3 Mar 2016 23:57:13 +0000 (23:57 +0000)]
[GTK] Unreviewed fix after r197505 (Run the run-benchmark script on the performance bot.)
https://bugs.webkit.org/show_bug.cgi?id=154595

Unreviewed fix after r197505.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(RunBenchmarkTests.start):

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

4 years agoSubpixel rendering: Make collapsed borders painting subpixel aware.
zalan@apple.com [Thu, 3 Mar 2016 23:55:52 +0000 (23:55 +0000)]
Subpixel rendering: Make collapsed borders painting subpixel aware.
https://bugs.webkit.org/show_bug.cgi?id=154980

Reviewed by David Hyatt.

This patch enables collapsed borders with odd pixel width paint on subpixel position.
Currently borders with odd pixels are split at integral position so that border-width: 3px;
paints 1px on the left(top) and 2px on the right(bottom) side. With this patch
we paint 1.5px on both sides(on 2x display).

Source/WebCore:

Test: fast/table/hidpi-collapsed-border-with-odd-pixel-width.html

* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintCollapsedBorders):

LayoutTests:

* fast/table/hidpi-collapsed-border-with-odd-pixel-width-expected.html: Added.
* fast/table/hidpi-collapsed-border-with-odd-pixel-width.html: Added.

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

4 years agoAdd unit tests for WTF::OptionSet
dbates@webkit.org [Thu, 3 Mar 2016 23:49:18 +0000 (23:49 +0000)]
Add unit tests for WTF::OptionSet
https://bugs.webkit.org/show_bug.cgi?id=154925
<rdar://problem/24964211>

Reviewed by Darin Adler.

Source/WTF:

* wtf/CMakeLists.txt: Add header OptionSet.h to the list of WTF headers.
* wtf/OptionSet.h: Use in-class initialization to initialize m_storage and declare
the trivial constexpr constructor as default.
(WTF::OptionSet::OptionSet): For convenience add a constructor that takes a std::initializer_list.
This code was written by Anders Carlsson.

Tools:

Add tests to ensure that we do not regress the behavior of WTF::OptionSet.

* TestWebKitAPI/CMakeLists.txt: Add file TestWebKitAPI/Tests/WTF/OptionSet.cpp.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Ditto.
* TestWebKitAPI/Tests/WTF/OptionSet.cpp: Added.
(TestWebKitAPI::TEST):

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

4 years agoDFG should be able to compile StringReplace
fpizlo@apple.com [Thu, 3 Mar 2016 23:30:49 +0000 (23:30 +0000)]
DFG should be able to compile StringReplace
https://bugs.webkit.org/show_bug.cgi?id=154979

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

Adds support for StringReplace to the DFG tier. This is a 3% speed-up on Octane/regexp.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleIntrinsicCall):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::speculateFinalObject):
(JSC::DFG::SpeculativeJIT::speculateRegExpObject):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* jit/JITOperations.h:

LayoutTests:

Add a microbenchmark for a case of StringReplace that we hadn't covered with a microbenchmark
yet: using something absurd for the replace value. This is interesting for implementing the
32_64 version of StringReplace, which gets really weird in the absurd case because of how it
consumes the entire register file while making the call on x86-32.

* js/regress/script-tests/string-replace-generic.js: Added.
* js/regress/string-replace-generic-expected.txt: Added.
* js/regress/string-replace-generic.html: Added.

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

4 years agoAdd support for the "last" value of hanging-punctuation
hyatt@apple.com [Thu, 3 Mar 2016 21:49:32 +0000 (21:49 +0000)]
Add support for the "last" value of hanging-punctuation
https://bugs.webkit.org/show_bug.cgi?id=154977

Reviewed by Darin Adler and Simon Fraser.

Source/WebCore:

New tests in fast/text.

This patch adds support for the new "last" value and also fixes up both
"first" and "last" to work with leading and trailing whitespace that ends
up getting collapsed away.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::inlineAncestorHasStartBorderPaddingOrMargin):
(WebCore::inlineAncestorHasEndBorderPaddingOrMargin):
(WebCore::isLastInFlowRun):
(WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
* rendering/RenderText.cpp:
(WebCore::isHangablePunctuationAtLineEnd):
(WebCore::RenderText::hangablePunctuationStartWidth):
(WebCore::RenderText::hangablePunctuationEndWidth):
(WebCore::RenderText::firstCharacterIndexStrippingSpaces):
(WebCore::RenderText::lastCharacterIndexStrippingSpaces):
(WebCore::RenderText::trimmedPrefWidths):
* rendering/RenderText.h:
* rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):

LayoutTests:

* fast/text/hanging-punctuation-first-and-last-together-expected.html: Added.
* fast/text/hanging-punctuation-first-and-last-together.html: Added.
* fast/text/hanging-punctuation-first-ws-expected.html: Added.
* fast/text/hanging-punctuation-first-ws.html: Added.
* fast/text/hanging-punctuation-last-expected.html: Added.
* fast/text/hanging-punctuation-last-rtl-expected.html: Added.
* fast/text/hanging-punctuation-last-rtl.html: Added.
* fast/text/hanging-punctuation-last-ws-expected.html: Added.
* fast/text/hanging-punctuation-last-ws.html: Added.
* fast/text/hanging-punctuation-last.html: Added.

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

4 years agoAdopt CFNetwork storage partitioning SPI
aestes@apple.com [Thu, 3 Mar 2016 21:46:07 +0000 (21:46 +0000)]
Adopt CFNetwork storage partitioning SPI
https://bugs.webkit.org/show_bug.cgi?id=154957
rdar://problem/23614620

Reviewed by Darin Adler.

Source/WebCore:

Adopt CFNetwork SPI for creating storage partitions. If Settings::cookieStoragePartitioningEnabled() is true,
create cookie storage partitions for third-party contexts. This feature is disabled by default.

No new tests. Test support is tracked by <https://webkit.org/b/154958>.

* page/Settings.cpp:
(WebCore::Settings::setCookieStoragePartitioningEnabled): Controls whether storage partitioning for cookies is enabled.
* page/Settings.h:
(WebCore::Settings::cookieStoragePartitioningEnabled):
* platform/network/NetworkStorageSession.h:
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::cookieStoragePartition): Computes a storage partition identifier by determining the top
privately-controlled domain of the cookie's first-party (main frame document) URL, then determining whether the
cookie's document hostname is a subdomain of it. If is is not, the first-party top domain is the partition name.
Otherwise, there is no partition name.
* platform/network/mac/CookieJarMac.mm:
(WebCore::applyPartitionToCookies): Returns a deep copy of the given cookie array after adding a storage
partition property to each copied cookie.
(WebCore::cookiesInPartitionForURL): Returns cookies for the partition computed by the given URLs. If no
partition can be determined, nil is returned.
(WebCore::cookiesForURL): Returns cookiesInPartitionForURL() if non-nil, otherwise returns wkHTTPCookiesForURL().
(WebCore::cookiesForSession): Started calling cookiesForURL().
(WebCore::setCookiesFromDOM): Called applyPartitionToCookies() if a partition can be computed from the given URLs.
(WebCore::getRawCookies): Started calling cookiesForURL().
* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::createNSURLConnection): Computed the storage partition identifier for the new request.
If non-empty, set it as a property on the NSURLRequest where CFNetwork knows to find it.
* platform/spi/cf/CFNetworkSPI.h: Declare new SPI for building with the public SDK.

Source/WebKit2:

* NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:
(WebKit::NetworkDataTask::NetworkDataTask): Computed the storage partition identifier for the new session task.
If non-empty, set it using a NSURLSessionTask SPI.

Source/WTF:

* wtf/Platform.h: Defined HAVE_CFNETWORK_STORAGE_PARTITIONING.

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

4 years ago[WK2] testRunner.setPrivateBrowsingEnabled doesn't work with NetworkProcess
commit-queue@webkit.org [Thu, 3 Mar 2016 21:25:09 +0000 (21:25 +0000)]
[WK2] testRunner.setPrivateBrowsingEnabled doesn't work with NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=115274

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-03
Reviewed by Darin Adler.

* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::blobSize):
(WebKit::NetworkConnectionToWebProcess::ensureLegacyPrivateBrowsingSession):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::destroyPrivateBrowsingSession):
(WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
(WebKit::WebProcess::pluginProcessConnectionManager):
* WebProcess/WebProcess.h:

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

4 years agoWeb Inspector: Assertion Failed: Cannot show timeline because it does not belong...
mattbaker@apple.com [Thu, 3 Mar 2016 20:34:39 +0000 (20:34 +0000)]
Web Inspector: Assertion Failed: Cannot show timeline because it does not belong to the shown recording. – "overview"
https://bugs.webkit.org/show_bug.cgi?id=154972
<rdar://problem/24956233>

Reviewed by Timothy Hatcher.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._showTimelineViewForType):
Just show the overview if the recording has no timeline of the given type.

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

4 years agoUpdate image test
jonlee@apple.com [Thu, 3 Mar 2016 20:26:46 +0000 (20:26 +0000)]
Update image test
https://bugs.webkit.org/show_bug.cgi?id=154962

Rubber-stamped by Darin Adler.

* Animometer/tests/master/image-data.html: Make each canvas have a compositing layer.
* Animometer/tests/master/resources/image-data.js:
(initialize): Update to load multiple images serially.
(_loadImage):
(tune): Use display instead of visibility. When showing an element anew, move it somewhere else.
(_createTestElement): Set up the element, refactor out placement of element to _refreshElement.
(_refreshElement): Place element in a tile grid.
(animate):
(_getRandomNeighboringPixelIndex): Use a more conservative distribution to make the effect last a little longer.
* Animometer/tests/master/resources/compass.svg: Added.
* Animometer/tests/master/resources/console.svg: Added.
* Animometer/tests/master/resources/contribute.svg: Added.
* Animometer/tests/master/resources/debugger.svg: Added.
* Animometer/tests/master/resources/inspector.svg: Added.
* Animometer/tests/master/resources/layout.svg: Added.
* Animometer/tests/master/resources/performance.svg: Added.
* Animometer/tests/master/resources/script.svg: Added.
* Animometer/tests/master/resources/shortcuts.svg: Added.
* Animometer/tests/master/resources/standards.svg: Added.
* Animometer/tests/master/resources/storage.svg: Added.
* Animometer/tests/master/resources/styles.svg: Added.
* Animometer/tests/master/resources/timeline.svg: Added.

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

4 years agostorage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html flaky on mac...
beidson@apple.com [Thu, 3 Mar 2016 19:46:25 +0000 (19:46 +0000)]
storage/indexeddb/delete-in-upgradeneeded-close-in-open-success.html flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=154747

Reviewed by Alex Christensen.

This callback coming out of order like this is okay, so the test should just allow it.

It makes sense that the flake is WK2-only, since WK1 has a much more well defined order
with thread-hopping versus process-hopping.

* storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-expected.txt:
* storage/indexeddb/delete-in-upgradeneeded-close-in-open-success-private-expected.txt:
* storage/indexeddb/resources/delete-in-upgradeneeded-close-in-open-success.js:

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

4 years ago[[SetPrototypeOf]] isn't properly implemented everywhere
sbarati@apple.com [Thu, 3 Mar 2016 19:18:35 +0000 (19:18 +0000)]
[[SetPrototypeOf]] isn't properly implemented everywhere
https://bugs.webkit.org/show_bug.cgi?id=154943

Reviewed by Benjamin Poulain.

We were copy-pasting implememntation bits that belong in OrdinarySetPrototypeOf
in a few different places that call O.[[SetPrototypeOf]](v)
rather than having those bits in OrdinarySetPrototypeOf itself.
We need to put those copy-pasted bits into OrdinarySetPrototypeOf
and not the call sites of O.[[SetPrototypeOf]](v) because
O.[[SetPrototypeOf]](v) won't always call into OrdinarySetPrototypeOf.
This is needed for correctness because this behavior is now observable
with the ES6 Proxy object.

* runtime/ClassInfo.h:
* runtime/JSCell.cpp:
(JSC::JSCell::isExtensible):
(JSC::JSCell::setPrototype):
* runtime/JSCell.h:
* runtime/JSGlobalObjectFunctions.cpp:
(JSC::globalFuncProtoSetter):
* runtime/JSObject.cpp:
(JSC::JSObject::setPrototypeDirect):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::setPrototype):
(JSC::JSObject::allowsAccessFrom):
* runtime/JSObject.h:
(JSC::JSObject::mayInterceptIndexedAccesses):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorSetPrototypeOf):
* runtime/ReflectObject.cpp:
(JSC::reflectObjectSetPrototypeOf):

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

4 years ago[css-grid] Fix order of grid shorthands in CSSPropertyNames.in
rego@igalia.com [Thu, 3 Mar 2016 18:34:11 +0000 (18:34 +0000)]
[css-grid] Fix order of grid shorthands in CSSPropertyNames.in
https://bugs.webkit.org/show_bug.cgi?id=154915

Reviewed by Darin Adler.

The order of columns and rows in grid and grid-template shorthands
has been swapped recently (r196906 & r196934).
However the order was not updated in CSSPropertyNames.in file.

* css/CSSPropertyNames.in:

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

4 years agostorage/indexeddb/intversion-open-in-upgradeneeded.html is flaky on mac-wk2 debug.
beidson@apple.com [Thu, 3 Mar 2016 18:30:38 +0000 (18:30 +0000)]
storage/indexeddb/intversion-open-in-upgradeneeded.html is flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=154706

Rubberstamped by Alex Christensen.

This test was fixed by http://trac.webkit.org/changeset/197474.

Unskipping it now.

* platform/mac-wk2/TestExpectations:

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

4 years agoAllInOne build fix.
ap@apple.com [Thu, 3 Mar 2016 17:40:57 +0000 (17:40 +0000)]
AllInOne build fix.

* rendering/RenderFlexibleBox.cpp:
* rendering/RenderGrid.cpp:
Don't have two static functions with the same name.

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

4 years agoUnreviewed, rolling out r197442.
commit-queue@webkit.org [Thu, 3 Mar 2016 17:28:27 +0000 (17:28 +0000)]
Unreviewed, rolling out r197442.
https://bugs.webkit.org/show_bug.cgi?id=154967

Broke tests, and also uses a wrong approach (Requested by ap
on #webkit).

Reverted changeset:

"Disable FTL JIT testing on 32-bit JSC tester bots"
https://bugs.webkit.org/show_bug.cgi?id=154858
http://trac.webkit.org/changeset/197442

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

4 years agoDrop [TreatNullAs=EmptyString] from URL interface attributes
cdumez@apple.com [Thu, 3 Mar 2016 17:25:26 +0000 (17:25 +0000)]
Drop [TreatNullAs=EmptyString] from URL interface attributes
https://bugs.webkit.org/show_bug.cgi?id=154951

Reviewed by Darin Adler.

Source/WebCore:

Drop [TreatNullAs=EmptyString] from URL interface attributes to match
the specification:
- https://url.spec.whatwg.org/#api

Firefox and Chrome both already follow the specification and convert
null to the "null" string.

No new tests, already covered by existing tests.

* html/URLUtils.idl:

LayoutTests:

Update existing tests now that URL interface attributes no longer treat
null as the empty string.

* fast/dom/DOMURL/set-href-attribute-hash-expected.txt:
* fast/dom/DOMURL/set-href-attribute-hash.html:
* fast/dom/DOMURL/set-href-attribute-host-expected.txt:
* fast/dom/DOMURL/set-href-attribute-host.html:
* fast/dom/DOMURL/set-href-attribute-hostname-expected.txt:
* fast/dom/DOMURL/set-href-attribute-hostname.html:
* fast/dom/DOMURL/set-href-attribute-pathname-expected.txt:
* fast/dom/DOMURL/set-href-attribute-pathname.html:
* fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
* fast/dom/DOMURL/set-href-attribute-protocol.html:
* fast/dom/DOMURL/set-href-attribute-search-expected.txt:
* fast/dom/DOMURL/set-href-attribute-search.html:

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

4 years ago[TextureMapper] Use RGBA format for textures attached to framebuffers
commit-queue@webkit.org [Thu, 3 Mar 2016 17:09:49 +0000 (17:09 +0000)]
[TextureMapper] Use RGBA format for textures attached to framebuffers
https://bugs.webkit.org/show_bug.cgi?id=154965

Patch by Miguel Gomez <magomez@igalia.com> on 2016-03-03
Reviewed by Žan Doberšek.

Use RGBA format when allocating textures that will be used as framebuffer
attachments. This means adding a new flag to BitmapTexture and modifying
BitmapTextureGL to use the appropriate format according to the flag. Also,
BitmapTexturePool needs to use two vectors to handle both types of textures
separately, as we want to avoid constantly switching the format of a reused
texture.

No new tests since the behavior change is covered by existing tests.

* platform/graphics/texmap/BitmapTexture.h: Add new flag.
* platform/graphics/texmap/BitmapTextureGL.cpp:
(WebCore::BitmapTextureGL::BitmapTextureGL): Receive flags on constructor and use RGBA
when the FBOAttachment flag is enabled.
(WebCore::BitmapTextureGL::applyFilters): Use FBOAttachemt flag to request a texture.
* platform/graphics/texmap/BitmapTextureGL.h: Add flags to the constructor.
* platform/graphics/texmap/BitmapTexturePool.cpp: Add a new vector of textures to hold
those in RGBA format.
(WebCore::BitmapTexturePool::acquireTexture): Return a texture for the usage specified
in the incoming flags.
(WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired): Release textures from
both vectors.
(WebCore::BitmapTexturePool::createTexture): Pass the usage flag when creating a new
texture.
* platform/graphics/texmap/BitmapTexturePool.h: Add new texture vector and add flags to
the needed headers.
* platform/graphics/texmap/TextureMapper.cpp:
(WebCore::TextureMapper::acquireTextureFromPool): Pass the received flags to the BitmapTexturePool.
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::paintIntoSurface): Use FBOAttachemt flag to request a texture.

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

4 years ago[GTK] Run the run-benchmark script on the performance bot.
clopez@igalia.com [Thu, 3 Mar 2016 16:40:19 +0000 (16:40 +0000)]
[GTK] Run the run-benchmark script on the performance bot.
https://bugs.webkit.org/show_bug.cgi?id=154595

Reviewed by Carlos Garcia Campos.

* BuildSlaveSupport/build.webkit.org-config/master.cfg: Add new RunBenchmarkTests step on the perf bots (only for the GTK+ port at this moment).
(RunBenchmarkTests):
(RunBenchmarkTests.start):
(RunBenchmarkTests.getText):
(RunBenchmarkTests.getText2):
(BuildAndPerfTestFactory.__init__):
(DownloadAndPerfTestFactory.__init__):
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py: Add new test for RunBenchmarkTests and update expected steps of GTK+ perf bot.
(RunBenchmarkTest):
(RunBenchmarkTest.assertResults):
(RunBenchmarkTest.test_success):
(RunBenchmarkTest.test_tests_failed):
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py: Log both the current iteration as also the total iterations for the current benchmark/plan.
(BenchmarkRunner._run_benchmark):
* Scripts/webkitpy/benchmark_runner/browser_driver/gtk_minibrowser_driver.py: Use python logging also for errors.
(GTKMiniBrowserDriver.close_browsers):
* Scripts/webkitpy/benchmark_runner/run_benchmark.py: Implement support for running all available benchmark plans.
(parse_args):
(start):
(main):

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

4 years ago[EFL] Remove u-szeged.hu SVN mirror in EFL perf bot
gyuyoung.kim@webkit.org [Thu, 3 Mar 2016 14:09:22 +0000 (14:09 +0000)]
[EFL] Remove u-szeged.hu SVN mirror in EFL perf bot
https://bugs.webkit.org/show_bug.cgi?id=154960

Reviewed by Csaba Osztrogonác.

* BuildSlaveSupport/build.webkit.org-config/config.json: Remove szeged univ's svn mirror.
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:

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

4 years ago[CSS Box Alignment] New CSS Value 'normal' for Content Alignment
jfernandez@igalia.com [Thu, 3 Mar 2016 11:05:32 +0000 (11:05 +0000)]
[CSS Box Alignment] New CSS Value 'normal' for Content Alignment
https://bugs.webkit.org/show_bug.cgi?id=154282

Source/WebCore:

Reviewed by David Hyatt.

The Box Alignment specification defines a new value 'normal' to be used
as default for the different layout models, which will define the
specific behavior for each case. This patch adds a new CSS value in the
parsing logic and adapts the Content Alignment properties to the new
value.

The 'auto' value is no longer valid and the Computed Value will be
always the specified value. Hence, I removed the StyleResolver logic
because is not required now; the specific behavior of the 'normal'
value will be resolved at layout time.

Computed value of both align-content and justify-content is the
specified value, we don't have to resolve any 'auto' value now.

Additionally, this patch updates the layout logic as well, for both
Flexbox and Grid layout models.

No new tests, since we only need to rebaseline those test cases
affected by the new default computed value.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Deleted.
(WebCore::CSSComputedStyleDeclaration::copyProperties): Deleted.
(WebCore::nodeOrItsAncestorNeedsStyleRecalc): Deleted.
(WebCore::isFlexOrGrid): Deleted.
(WebCore::ComputedStyleExtractor::customPropertyValue): Deleted.
* css/CSSParser.cpp:
(WebCore::CSSParser::parseContentDistributionOverflowPosition):
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ContentPosition):
* rendering/RenderFlexibleBox.cpp:
(WebCore::normalValueBehavior):
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
(WebCore::RenderFlexibleBox::layoutColumnReverse):
(WebCore::RenderFlexibleBox::alignFlexLines):
(WebCore::alignContentSpaceBetweenChildren): Deleted.
* rendering/RenderGrid.cpp:
(WebCore::normalValueBehavior):
(WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
(WebCore::RenderGrid::columnAxisOffsetForChild):
(WebCore::RenderGrid::rowAxisOffsetForChild):
(WebCore::resolveContentDistributionFallback):
(WebCore::contentDistributionOffset):
(WebCore::RenderGrid::computeContentPositionAndDistributionOffset):
* rendering/style/RenderStyle.cpp:
(WebCore::resolvedContentAlignmentPosition):
(WebCore::resolvedContentAlignmentDistribution):
(WebCore::RenderStyle::resolvedJustifyContentPosition):
(WebCore::RenderStyle::resolvedJustifyContentDistribution):
(WebCore::RenderStyle::resolvedAlignContentPosition):
(WebCore::RenderStyle::resolvedAlignContentDistribution):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:

LayoutTests:

The Box Alignment specification defines a new value 'normal' to be used
as default for the different layout models, which will define the
specific behavior for each case. This patch adds a new CSS value in the
parsing logic and adapts the Content Alignment properties to the new
value.

Since the 'normal' vlaue, initial/default for both justify-content
and align-content CSS properties, behaves now as 'stretch' instead
of o'start' we have to rebaseline those tests affected by the new
default value.

Reviewed by David Hyatt.

* css3/flexbox/css-properties-expected.txt:
* css3/flexbox/css-properties.html:
* css3/parse-align-content-expected.txt:
* css3/parse-align-content.html:
* css3/parse-justify-content-expected.txt:
* css3/parse-justify-content.html:
* css3/resources/alignment-parsing-utils.js:
(checkBadValues):
* fast/css-grid-layout/auto-content-resolution-columns.html:
* fast/css-grid-layout/grid-auto-columns-rows-update.html:
* fast/css-grid-layout/grid-auto-flow-resolution.html:
* fast/css-grid-layout/grid-columns-rows-get-set-multiple.html:
* fast/css-grid-layout/grid-columns-rows-get-set.html:
* fast/css-grid-layout/grid-container-change-named-grid-lines-recompute-child.html:
* fast/css-grid-layout/grid-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-dynamic-updates-relayout.html:
* fast/css-grid-layout/grid-element-min-max-width.html:
* fast/css-grid-layout/grid-element-repeat-get-set.html:
* fast/css-grid-layout/grid-initialize-span-one-items.html:
* fast/css-grid-layout/grid-item-addition-auto-placement-update.html:
* fast/css-grid-layout/grid-item-addition-track-breadth-update.html:
* fast/css-grid-layout/grid-item-bad-named-area-auto-placement.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-ltr.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-horizontal-rtl.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-ltr.html:
* fast/css-grid-layout/grid-item-margin-auto-columns-rows-vertical-rtl.html:
* fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html:
* fast/css-grid-layout/grid-item-named-grid-area-resolution.html:
* fast/css-grid-layout/grid-item-negative-indexes.html:
* fast/css-grid-layout/grid-item-order-in-content-sized-columns-resolution.html:
* fast/css-grid-layout/grid-item-removal-auto-placement-update.html:
* fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
* fast/css-grid-layout/grid-update-sizes-after-distributing-all.html:
* fast/css-grid-layout/implicit-columns-auto-resolution.html:
* fast/css-grid-layout/implicit-position-dynamic-change.html:
* fast/css-grid-layout/mark-as-infinitely-growable.html:
* fast/css-grid-layout/maximize-tracks-definite-indefinite-width.html:
* fast/css-grid-layout/minmax-spanning-resolution-columns.html:
* fast/css-grid-layout/named-grid-line-get-set.html:
* fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html:
* fast/css-grid-layout/named-grid-lines-with-named-grid-areas-resolution.html:
* fast/css-grid-layout/percent-intrinsic-track-breadth.html:
* fast/css-grid-layout/percent-track-breadths-regarding-container-size.html:
* fast/css-grid-layout/resources/grid-definitions-parsing-utils.js:
(checkGridTemplatesSetJSValues):
* fast/css-grid-layout/resources/grid-template-shorthand-parsing-utils.js:
(checkGridDefinitionsSetJSValues):
(testGridDefinitionsSetBadJSValues):
* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* svg/css/getComputedStyle-basic-expected.txt:

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

4 years agoSlider thumb style should not depend on renderers
antti@apple.com [Thu, 3 Mar 2016 10:48:10 +0000 (10:48 +0000)]
Slider thumb style should not depend on renderers
https://bugs.webkit.org/show_bug.cgi?id=154961

Reviewed by Andreas Kling.

Currently slider thumb pseudo id is computed based on host element renderer.
Style is the input for building a render tree and should be computable without having one.

* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::hostInput):
(WebCore::SliderThumbElement::customStyleForRenderer):

    Compute pseudo id based on the host style.
    Return nullptr so style recalc will otherwise proceed normally.

(WebCore::SliderThumbElement::shadowPseudoId):
(WebCore::SliderThumbElement::cloneElementWithoutAttributesAndChildren):
(WebCore::SliderContainerElement::SliderContainerElement):
(WebCore::SliderContainerElement::create):
(WebCore::SliderContainerElement::createElementRenderer):
(WebCore::SliderContainerElement::customStyleForRenderer):

    Here too.

(WebCore::SliderContainerElement::shadowPseudoId):
(WebCore::sliderThumbShadowPseudoId): Deleted.
(WebCore::mediaSliderThumbShadowPseudoId): Deleted.
* html/shadow/SliderThumbElement.h:

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

4 years ago[css-grid] Simplify method to resolve auto-placed items
rego@igalia.com [Thu, 3 Mar 2016 10:23:35 +0000 (10:23 +0000)]
[css-grid] Simplify method to resolve auto-placed items
https://bugs.webkit.org/show_bug.cgi?id=154911

Reviewed by Sergio Villar Senin.

Refactor the method to resolve auto-placed items
as we're only interested in knowing the span size.

Adapt the calls to use the span size instead of a GridSpan.

No new tests, no change of behavior.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid):
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
* rendering/style/GridResolvedPosition.cpp:
(WebCore::GridResolvedPosition::spanSizeForAutoPlacedItem):
(WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
Renamed to spanSizeForAutoPlacedItem().
* rendering/style/GridResolvedPosition.h:

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

4 years agoFix Windows build after r197489.
achristensen@apple.com [Thu, 3 Mar 2016 09:12:05 +0000 (09:12 +0000)]
Fix Windows build after r197489.

* jsc.cpp:

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

4 years agoAdd some new controllers, and refine tests
jonlee@apple.com [Thu, 3 Mar 2016 08:22:32 +0000 (08:22 +0000)]
Add some new controllers, and refine tests
https://bugs.webkit.org/show_bug.cgi?id=154914

Reviewed by Simon Fraser.

Improve tests.

* Animometer/tests/master/focus.html: Move each particle into a layer. Put the particle
in a container element. Expand the container element by the max blur radius, and clip
overflow. This way, when the blur is applied, it avoids causing layer resizes.
* Animometer/tests/master/resources/focus.js:
(FocusElement.Utilities.createClass): Create a container element, and put the particle
inside.
(hide): Set display:none.
(show): Set display:block.
(animate): Apply filters to the container element.
(FocusStage.call.initialize): Instead of inserting and removing elements from the DOM,
keep them in the stage, but set the display style instead. Use this._offsetIndex to
keep track of which elements are displayed.
(FocusStage.call.animate): Move some calculations around to avoid doing unneeded math.
(FocusStage.call.getBlurValue): Make sure elements are always blurred.
(FocusStage.call.getOpacityValue): Make sure elements have some opacity.
* Animometer/tests/master/resources/multiply.js: Have the particles on the edge of the
stage appear less black when the complexity gets large enough.
(tune): Have this._distanceFactor calculate the factor. Avoid calculating square root each
frame.

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