WebKit-https.git
3 years agoSource/WebCore:
simon.fraser@apple.com [Thu, 16 Jun 2016 23:34:17 +0000 (23:34 +0000)]
Source/WebCore:
[iOS] Focus event dispatched in iframe causes parent document to scroll incorrectly
https://bugs.webkit.org/show_bug.cgi?id=158629
rdar://problem/26521616

Reviewed by Enrica Casucci.

When focussing elements in iframes, the page could scroll to an incorrect location.
This happened because code in Element::focus() tried to disable scrolling on focus,
but did so only for the current frame, so ancestor frames got programmatically scrolled.
On iOS we handle the scrolling in the UI process, so never want the web process to
do programmatic scrolling.

Fix by changing the focus and cache restore code to use SelectionRevealMode::DoNotReveal,
rather than manually prohibiting frame scrolling.

Tests: fast/forms/ios/focus-input-in-iframe.html
       fast/forms/ios/programmatic-focus-input-in-iframe.html

* dom/Element.cpp:
(WebCore::Element::focus):
* history/CachedPage.cpp:
(WebCore::CachedPage::restore):

LayoutTests:
Focus event dispatched in iframe causes parent document to scroll incorrectly
https://bugs.webkit.org/show_bug.cgi?id=158629
rdar://problem/26521616

Reviewed by Enrica Casucci.

Tests for user-initiated and programmatic focus in frames.

* fast/forms/ios/focus-input-in-iframe-expected.txt: Added.
* fast/forms/ios/focus-input-in-iframe.html: Added.
* fast/forms/ios/programmatic-focus-input-in-iframe.html: Added.
* fast/forms/ios/programmatic-focus-input-in-iframe-expected.txt: Added.

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

3 years ago[New Block-Inside-Inline Model] Do not attempt to re-run margin collapsing on the...
zalan@apple.com [Thu, 16 Jun 2016 23:27:46 +0000 (23:27 +0000)]
[New Block-Inside-Inline Model] Do not attempt to re-run margin collapsing on the block sequence.
https://bugs.webkit.org/show_bug.cgi?id=158854

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/block/inside-inlines/crash-on-first-line-change.html

* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlockFlow::marginCollapseLinesFromStart):

LayoutTests:

* fast/block/inside-inlines/crash-on-first-line-change-expected.txt: Added.
* fast/block/inside-inlines/crash-on-first-line-change.html: Added.

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

3 years agoInclude cstdlib before using std::atexit
commit-queue@webkit.org [Thu, 16 Jun 2016 23:03:01 +0000 (23:03 +0000)]
Include cstdlib before using std::atexit
https://bugs.webkit.org/show_bug.cgi?id=158681

Patch by Ting-Wei Lan <lantw44@gmail.com> on 2016-06-16
Reviewed by Brent Fulgham.

* platform/graphics/PlatformDisplay.cpp:

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

3 years agoUse StringView::toAtomicString() in HTMLImageElement::setBestFitURLAndDPRFromImageCan...
cdumez@apple.com [Thu, 16 Jun 2016 22:55:53 +0000 (22:55 +0000)]
Use StringView::toAtomicString() in HTMLImageElement::setBestFitURLAndDPRFromImageCandidate()
https://bugs.webkit.org/show_bug.cgi?id=158853

Reviewed by Brent Fulgham.

Use StringView::toAtomicString() in HTMLImageElement::setBestFitURLAndDPRFromImageCandidate()
as m_bestFitImageURL data member is an AtomicString. This avoids constructing a String and
then atomizing it.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):

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

3 years ago:in-range & :out-of-range CSS pseudo-classes shouldn't match inputs without range...
commit-queue@webkit.org [Thu, 16 Jun 2016 22:47:02 +0000 (22:47 +0000)]
:in-range & :out-of-range CSS pseudo-classes shouldn't match inputs without range limitations
https://bugs.webkit.org/show_bug.cgi?id=156558

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-16
Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/selectors/pseudo-classes/inrange-outofrange-expected.txt:
One of the previous match was erroneous.
Our results are still very far from being correct. There are several
bugs affecting our range validation.

Source/WebCore:

The pseudo selectors :in-range and :out-of-range should only
apply if:
-minimum/maximum are defined for the input type
-the input value is/is-not suffering from underflow/overflow.

Only certain types have a valid minimum and maximum:
-number
-range
-date
-month
-week
-time
-datetime-local

Of those, only one has a default minimum and maximum: range.
For all the others, the minimum or maximum is only defined
if the min/max attribute is defined and valid.

This patch addresses these constraints for number and range.
The date types range validation is severely broken and is
left untouched. It really needs a clean rewrite.

Tests: fast/css/pseudo-in-range-basics.html
       fast/css/pseudo-in-range-out-of-range-trivial.html
       fast/css/pseudo-out-of-range-basics.html

* html/DateInputType.cpp:
(WebCore::DateInputType::createStepRange):
* html/DateTimeInputType.cpp:
(WebCore::DateTimeInputType::createStepRange):
* html/DateTimeLocalInputType.cpp:
(WebCore::DateTimeLocalInputType::createStepRange):
* html/InputType.cpp:
(WebCore::InputType::isInRange):
(WebCore::InputType::isOutOfRange):
Notice the isEmpty() shortcut.
A value can only overflow/underflow if it is not empty.

* html/MonthInputType.cpp:
(WebCore::MonthInputType::createStepRange):
* html/NumberInputType.cpp:
(WebCore::NumberInputType::createStepRange):
* html/RangeInputType.cpp:
(WebCore::RangeInputType::createStepRange):
* html/StepRange.cpp:
(WebCore::StepRange::StepRange):
* html/StepRange.h:
(WebCore::StepRange::hasRangeLimitations):
* html/WeekInputType.cpp:
(WebCore::WeekInputType::createStepRange):

LayoutTests:

* fast/css/pseudo-in-range-basics-expected.html: Added.
* fast/css/pseudo-in-range-basics.html: Added.
* fast/css/pseudo-in-range-out-of-range-trivial-expected.html: Added.
* fast/css/pseudo-in-range-out-of-range-trivial.html: Added.
* fast/css/pseudo-out-of-range-basics-expected.html: Added.
* fast/css/pseudo-out-of-range-basics.html: Added.

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

3 years agoFix macOS Sierra build
andersca@apple.com [Thu, 16 Jun 2016 22:44:32 +0000 (22:44 +0000)]
Fix macOS Sierra build
https://bugs.webkit.org/show_bug.cgi?id=158849

Reviewed by Tim Horton.

Source/WebCore:

Add WebCore:: qualifiers for IOSurface, to avoid conflicts with the IOSurface Objective-C class.

Also, add an asLayerContents() getter that will return an id that's suitable for setting
as the contents of a CALayer.

* platform/graphics/cocoa/IOSurface.h:
* platform/graphics/cocoa/IOSurface.mm:

Source/WebKit2:

Add WebCore:: qualifiers for IOSurface, to avoid conflicts with the IOSurface Objective-C class
and adopt IOSurface::asLayerContents().

* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::decode):
(WebKit::RemoteLayerBackingStore::bytesPerPixel):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
(WebKit::RemoteLayerBackingStore::Buffer::discard):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::asLayerContents):

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

3 years agoKraken/stanford-crypto-pbkdf2.js sometimes crashes with an OSR assertion in FTL
fpizlo@apple.com [Thu, 16 Jun 2016 22:18:06 +0000 (22:18 +0000)]
Kraken/stanford-crypto-pbkdf2.js sometimes crashes with an OSR assertion in FTL
https://bugs.webkit.org/show_bug.cgi?id=158850

Reviewed by Keith Miller.

Bytecode liveness was incorrectly claiming that all tail-deleted locals are live! That's
crazy! We never noticed this because extending OSR liveness is usually not a showstopper and
until recently we didn't have a lot of tail-call test cases to play with. Well, we do now,
thanks to the increasing reliance on tail calls in our builtins.

* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::localsLiveInBytecode): Fix the bug and add some optional tracing. Also restructure the code so that we don't break to return true, since that's counterintuitive.
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::buildExitArguments): Make this assertion print more useful information.

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

3 years agoWhen a WebsiteDataStore finds no ProcessPools and creates one from scratch, it should...
beidson@apple.com [Thu, 16 Jun 2016 22:06:57 +0000 (22:06 +0000)]
When a WebsiteDataStore finds no ProcessPools and creates one from scratch, it should represent the data store's config.
rdar://problem/26586991 and https://bugs.webkit.org/show_bug.cgi?id=158844

Reviewed by Anders Carlsson.

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::createWithWebsiteDataStoreConfiguration):
* UIProcess/API/APIProcessPoolConfiguration.h:

* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::WebsiteDataStore):
(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::processPools):
* UIProcess/WebsiteData/WebsiteDataStore.h:

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

3 years agoREGRESSION(r196217): 3% JSBench regression on iPhone 5.
akling@apple.com [Thu, 16 Jun 2016 21:47:06 +0000 (21:47 +0000)]
REGRESSION(r196217): 3% JSBench regression on iPhone 5.
<https://webkit.org/b/158848>
<rdar://problem/26609622>

Unreviewed rollout.

Don't jettison linked code on every top-level navigation as that was hurting JSBench on iPhone 5.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad):

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

3 years agoREGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick
commit-queue@webkit.org [Thu, 16 Jun 2016 21:35:48 +0000 (21:35 +0000)]
REGRESSION (r201538): Web Inspector: Border over Allocations Views is too thick
https://bugs.webkit.org/show_bug.cgi?id=158846

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

* UserInterface/Views/HeapAllocationsTimelineView.css:
(.timeline-view.heap-allocations > .content-view-container > .content-view): Deleted.

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

3 years agoUnreviewed, rolling out r202002 and r202111.
cdumez@apple.com [Thu, 16 Jun 2016 20:39:45 +0000 (20:39 +0000)]
Unreviewed, rolling out r202002 and r202111.

Ryosuke says this was a JSBench regression on iOS

Reverted changesets:

"Make HashMap and HashSet work with Refs"
https://bugs.webkit.org/show_bug.cgi?id=158638
http://trac.webkit.org/changeset/202002

"Improve HashMap and HashSet support for Ref"
https://bugs.webkit.org/show_bug.cgi?id=158789
http://trac.webkit.org/changeset/202111

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

3 years agoVersioning.
bshafiei@apple.com [Thu, 16 Jun 2016 20:39:44 +0000 (20:39 +0000)]
Versioning.

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

3 years agoUnreviewed build fix.
mattbaker@apple.com [Thu, 16 Jun 2016 19:50:32 +0000 (19:50 +0000)]
Unreviewed build fix.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype.createSettings):
"showColumn" -> "setColumnVisible".

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

3 years agoWeb Inspector: DataGrid should manage its own settings
mattbaker@apple.com [Thu, 16 Jun 2016 19:39:10 +0000 (19:39 +0000)]
Web Inspector: DataGrid should manage its own settings
https://bugs.webkit.org/show_bug.cgi?id=158675
<rdar://problem/26761338>

Reviewed by Timothy Hatcher.

Move grid sorting settings (sort order, column identifier) into DataGrid,
removing duplicated code from various views. A new grid method, "createSettings",
takes an identifier which is used as a prefix for naming the grid's settings.

So that the new behavior is easy to use and hard to misuse, default values
for each setting are set to the current value of the associated property.
The result is that:

    grid.sortColumnIdentifier = "columnA";
    grid.createSettings("myGrid");

will use "columnA" as the default value the first time the setting is created.

* UserInterface/Views/ApplicationCacheFrameContentView.js:
(WebInspector.ApplicationCacheFrameContentView.prototype._createDataGrid):
* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
* UserInterface/Views/DOMStorageContentView.js:
(WebInspector.DOMStorageContentView):
* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
(WebInspector.DataGrid.prototype.createSettings):
(WebInspector.DataGrid.prototype.get identifier): Deleted.
(WebInspector.DataGrid.prototype.set identifier): Deleted.
(WebInspector.DataGrid.prototype.set sortOrderSetting): Deleted.
(WebInspector.DataGrid.prototype.set sortColumnIdentifierSetting): Deleted.
* UserInterface/Views/HeapAllocationsTimelineView.js:
(WebInspector.HeapAllocationsTimelineView):
* UserInterface/Views/HeapSnapshotContentView.js:
(WebInspector.HeapSnapshotContentView):
* UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WebInspector.LayerTreeDetailsSidebarPanel.prototype._buildDataGridSection):
* UserInterface/Views/LayoutTimelineView.js:
(WebInspector.LayoutTimelineView):
* UserInterface/Views/NetworkGridContentView.js:
(WebInspector.NetworkGridContentView):
* UserInterface/Views/NetworkTimelineView.js:
(WebInspector.NetworkTimelineView):
* UserInterface/Views/ProfileView.js:
(WebInspector.ProfileView):
* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView):
* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView):

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

3 years ago[iOS WK2] On iPad, indirect focussing of a text field doesn't always scroll to the...
simon.fraser@apple.com [Thu, 16 Jun 2016 18:49:14 +0000 (18:49 +0000)]
[iOS WK2] On iPad, indirect focussing of a text field doesn't always scroll to the correct location
https://bugs.webkit.org/show_bug.cgi?id=158828

Reviewed by Enrica Casucci.

Source/WebKit2:

WebPage::getAssistedNodeInformation() unconditionally set information.selectionRect()
to a 1x1 rect at the last interaction location. This caused -[WKWebView _zoomToFocusRect:...]
to early return under the !forceScroll clause if the last interaction rect was visible, but
the elementRect was not. This would happen, for example, if a click in a <button> focussed
an input on some other portion of the page. This behavior is iPad-only, because forceScroll
is only NO there.

Fix by making getAssistedNodeInformation() only set the selectionRect to the last interaction
location if that is inside of the elementRect (this caters to the case where a tap is inside
an input which is larger than the screen). Otherwise, set it to the empty rect.

Make this testable by allowing a test to opt into the iPad-style scrolling/zooming behavior
in this code path (essentially, making forceScroll NO for testing), via testing SPI on WKWebView,
plumbed through to WKContentView.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView forceIPadStyleZoomOnInputFocus]):
(-[WKWebView setForceIPadStyleZoomOnInputFocus:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView requiresAccessoryView:]):
(-[WKContentView inputAccessoryView]):
(-[WKContentView forceIPadStyleZoomOnInputFocus]):
(-[WKContentView setForceIPadStyleZoomOnInputFocus:]):
(-[WKContentView requiresAccessoryView]): Remove redundant returns, and allow testing to
override the "isIPad" condition.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):

Tools:

Expose "forceIPadStyleZoomOnInputFocus" on UIScriptController, which allows iPad-style
zooming behavior on <input> focus in the iPhone simulator, which is used for testing.

* WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:
* WebKitTestRunner/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::forceIPadStyleZoomOnInputFocus):
(WTR::UIScriptController::setForceIPadStyleZoomOnInputFocus):
* WebKitTestRunner/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformResetStateToConsistentValues):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::forceIPadStyleZoomOnInputFocus):
(WTR::UIScriptController::setForceIPadStyleZoomOnInputFocus):

LayoutTests:

Add various tests for focusing form fields. focus-input-via-button-ipad.html tests
the change in the current patch.

* fast/forms/ios/focus-input-in-fixed-expected.txt: Added.
* fast/forms/ios/focus-input-in-fixed.html: Added.
* fast/forms/ios/focus-input-via-button-ipad-expected.txt: Added.
* fast/forms/ios/focus-input-via-button-ipad.html: Added.
* fast/forms/ios/focus-long-textarea-expected.txt: Added.
* fast/forms/ios/focus-long-textarea.html: Added.
* fast/forms/ios/resources/zooming-test-utils.js:
(testZoomAfterTap):

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

3 years agoAdd collecting of LLINT slow path stats.
mark.lam@apple.com [Thu, 16 Jun 2016 18:25:54 +0000 (18:25 +0000)]
Add collecting of LLINT slow path stats.
https://bugs.webkit.org/show_bug.cgi?id=158829

Reviewed by Keith Miller.

* llint/LLIntData.cpp:
(JSC::LLInt::Data::dumpStats):
* llint/LLIntData.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* llint/LLIntSlowPaths.h:
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:

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

3 years agoWebRTC: Check type of this in RTCPeerConnection JS built-in functions
adam.bergkvist@ericsson.com [Thu, 16 Jun 2016 18:12:41 +0000 (18:12 +0000)]
WebRTC: Check type of this in RTCPeerConnection JS built-in functions
https://bugs.webkit.org/show_bug.cgi?id=151303

Reviewed by Youenn Fablet.

Source/WebCore:

Check type of 'this' in RTCPeerConnection JS built-in functions.

Test: fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html

* Modules/mediastream/RTCPeerConnection.js:
(createOffer):
(createAnswer):
(setLocalDescription):
(setRemoteDescription):
(addIceCandidate):
(getStats):
Reject if 'this' isn't of type RTCPeerConnection.
* Modules/mediastream/RTCPeerConnectionInternals.js:
(isRTCPeerConnection):
Add helper function to perform type check. Needs further robustifying.

LayoutTests:

Verify that the RTCPeerConnection JS built-in methods checks 'this'. The test has expected
failures (bug: http://webkit.org/b/158831).

* fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html: Added.
* platform/mac/TestExpectations:
The mac port does not build with WEB_RTC enabled yet.

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

3 years agoForward/Back keyboard shortcuts need to flip for RTL
weinig@apple.com [Thu, 16 Jun 2016 17:54:33 +0000 (17:54 +0000)]
Forward/Back keyboard shortcuts need to flip for RTL
https://bugs.webkit.org/show_bug.cgi?id=158823
<rdar://problem/25975359>

Reviewed by Darin Adler.

Source/WebKit2:

Pipe the UserInterfaceLayoutDirection down to the WebContentProcess on initialization
and when it changes, and use it to flip the behavior of command-left and command-right
when in RTL mode.

Tests:
    WebKit2_CommandBackForwardTestWKView.LTR
    WebKit2_CommandBackForwardTestWKView.RTL
    WebKit2_CommandBackForwardTestWKWebView.LTR
    WebKit2_CommandBackForwardTestWKWebView.RTL

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webViewPrintFormatter]):
(-[WKWebView setSemanticContentAttribute:]):
(-[WKWebView _printOperationWithPrintInfo:forFrame:]):
(-[WKWebView setUserInterfaceLayoutDirection:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView setUserInterfaceLayoutDirection:]):
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::windowIsFrontWindowUnderMouse):
(WebKit::toUserInterfaceLayoutDirection):
(WebKit::WebViewImpl::userInterfaceLayoutDirection):
(WebKit::WebViewImpl::setUserInterfaceLayoutDirection):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::userInterfaceLayoutDirection):
(WebKit::WebPageProxy::setUserInterfaceLayoutDirection):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::hasHadSelectionChangesFromUserInteraction):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithProcessPool:configuration:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_userInterfaceLayoutDirection):
(WebKit::WebPage::setResourceCachingDisabled):
(WebKit::WebPage::setUserInterfaceLayoutDirection):
(WebKit::m_shouldDispatchFakeMouseMoveEvents): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::performNonEditingBehaviorForSelector):

Tools:

Add tests for flipping the behavior of command-left and command-right
under RTL mode.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/CommandBackForward.mm: Added.
(-[CommandBackForwardOffscreenWindow isKeyWindow]):
(-[CommandBackForwardOffscreenWindow isVisible]):
(simulateCommandArrow):
(WebKit2_CommandBackForwardTest::SetUp):
(WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame):
(WebKit2_CommandBackForwardTestWKView::SetUp):
(WebKit2_CommandBackForwardTestWKView::loadFiles):
(-[CommandBackForwardNavigationDelegate webView:didFinishNavigation:]):
(WebKit2_CommandBackForwardTestWKWebView::SetUp):
(WebKit2_CommandBackForwardTestWKWebView::loadFiles):

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

3 years ago[mac] LayoutTest transforms/undecomposable.html is a flaky timeout
dino@apple.com [Thu, 16 Jun 2016 17:43:43 +0000 (17:43 +0000)]
[mac] LayoutTest transforms/undecomposable.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=158816

Another attempt to deflake this test. Or is it unflake? I don't know.

* transforms/undecomposable.html:

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

3 years agoSporadic crash in HashTableAddResult following CSSValuePool::createFontFamilyValue
mmaxfield@apple.com [Thu, 16 Jun 2016 17:10:38 +0000 (17:10 +0000)]
Sporadic crash in HashTableAddResult following CSSValuePool::createFontFamilyValue
https://bugs.webkit.org/show_bug.cgi?id=158297

Reviewed by Darin Adler.

Source/WebCore:

In an effort to reduce the flash of unstyled content, we force all elements
to have display: none during an external stylesheet load. We do this by
ignoring the CSS cascade and forcing all elements to have a placeholder style
which hardcodes display: none. (This is necessary to make elements created by
script during the stylesheet load not flash.)

This style is exposed to web content via getComputedStyle(), which means it
needs to maintain the invariant that font-families can never be null strings.
We enforce this by forcing the font-family to be the standard font name.

Test: fast/text/placeholder-renderstyle-null-font.html

* style/StyleTreeResolver.cpp:
(WebCore::Style::ensurePlaceholderStyle):

LayoutTests:

* fast/text/placeholder-renderstyle-null-font-expected.txt: Added.
* fast/text/placeholder-renderstyle-null-font.html: Added.

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

3 years agoAvoid some temporary String allocations for common HTTP headers in ResourceResponse...
cdumez@apple.com [Thu, 16 Jun 2016 16:32:04 +0000 (16:32 +0000)]
Avoid some temporary String allocations for common HTTP headers in ResourceResponse::platformLazyInit()
https://bugs.webkit.org/show_bug.cgi?id=158827

Reviewed by Darin Adler.

Add a HTTPHeaderMap::set() overload taking in a CFStringRef. The
implementation has a fast path which gets the internal characters
of the CFStringRef when possible and constructs a StringView for
it in order to call findHTTPHeaderName(). As a result, we avoid
allocating a temporary String when findHTTPHeaderName() succeeds.

This new HTTPHeaderMap::set() overload is called from both the
CF and Cocoa implementations of ResourceResponse::platformLazyInit().

I have confirmed locally on both Mac and iOS that the fast path
is used ~93% of the time. CFStringGetCStringPtr() returns null in
rare cases, causing the regular code path to be used.

* platform/network/HTTPHeaderMap.cpp:
(WebCore::HTTPHeaderMap::set):
* platform/network/HTTPHeaderMap.h:

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

3 years agoAdd support for Symbol.isConcatSpreadable (round 2)
keith_miller@apple.com [Thu, 16 Jun 2016 06:01:47 +0000 (06:01 +0000)]
Add support for Symbol.isConcatSpreadable (round 2)
https://bugs.webkit.org/show_bug.cgi?id=158769

Reviewed by Mark Lam.

Source/JavaScriptCore:

This patch adds support for Symbol.isConcatSpreadable. In order to
do so, it was necessary to move the Array.prototype.concat function
to JS. A number of different optimizations were needed to make
such the move to a builtin performant. First, this patch adds a
new Bytecode intrinsic, isJSArray, that checks if the value is a
JSArray object. Specifically, isJSArray checks that the array
object is a normal instance of JSArray and not a RuntimeArray or
Array.prototype. isJSArray can also be converted into a constant
by the DFG if we are able to prove that the incomming value is
already a JSArray.

In order to further improve the perfomance we also now cover more
indexing types in our fast path memcpy code. Before we would only
memcpy Arrays if they had the same indexing type and did not have
Array storage or were undecided. Now the memcpy code covers the
following additional three cases:

1) One array is undecided and the other does not have array storage

2) One array is Int32 and the other is contiguous (we map this
into a contiguous array).

3) The this value is an array and first argument is a non-array
that does not have Symbol.isConcatSpreadable set.

This patch also adds a new fast path for concat with more than one
array argument by using memcpy to append values onto the result
array. This works roughly the same as the two array fast path
using the same methodology to decide if we can memcpy the other
butterfly into the result butterfly.

* JavaScriptCore.xcodeproj/project.pbxproj:
* builtins/ArrayPrototype.js:
(concatSlowPath):
(concat):
* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
* bytecode/BytecodeIntrinsicRegistry.h:
* bytecode/BytecodeList.json:
* bytecode/BytecodeUseDef.h:
(JSC::computeUsesForBytecodeOffset):
(JSC::computeDefsForBytecodeOffset):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.h:
(JSC::BytecodeGenerator::emitIsJSArray):
* bytecompiler/NodesCodegen.cpp:
(JSC::BytecodeIntrinsicNode::emit_intrinsic_isJSArray):
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::handleConstantInternalFunction):
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGCapabilities.cpp:
(JSC::DFG::capabilityLevel):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGOperations.cpp:
* dfg/DFGOperations.h:
* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::compileIsJSArray):
(JSC::DFG::SpeculativeJIT::compileCallObjectConstructor):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileCallObjectConstructor):
(JSC::FTL::DFG::LowerDFGToB3::compileIsJSArray):
(JSC::FTL::DFG::LowerDFGToB3::isArray):
* jit/JIT.cpp:
(JSC::JIT::privateCompileMainPass):
* jit/JIT.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_is_jsarray):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_is_jsarray):
* jit/JITOperations.h:
* llint/LLIntData.cpp:
(JSC::LLInt::Data::performAssertions):
* llint/LowLevelInterpreter.asm:
* llint/LowLevelInterpreter32_64.asm:
* llint/LowLevelInterpreter64.asm:
* runtime/ArrayConstructor.h:
(JSC::isArrayConstructor):
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::finishCreation):
(JSC::speciesWatchpointsValid):
(JSC::speciesConstructArray):
(JSC::moveElements):
(JSC::concatAppendOne):
(JSC::arrayProtoFuncConcat): Deleted.
* runtime/ArrayPrototype.h:
* runtime/CommonIdentifiers.h:
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/IndexingType.h:
(JSC::indexingTypeForValue):
* runtime/JSArray.cpp:
(JSC::JSArray::appendMemcpy):
(JSC::JSArray::fastConcatWith): Deleted.
* runtime/JSArray.h:
(JSC::JSArray::createStructure):
(JSC::isJSArray):
(JSC::JSArray::fastConcatType): Deleted.
* runtime/JSArrayInlines.h: Added.
(JSC::JSArray::mergeIndexingTypeForCopying):
(JSC::JSArray::canFastCopy):
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSObject.cpp:
(JSC::JSObject::convertUndecidedForValue):
* runtime/JSType.h:
* runtime/ObjectConstructor.h:
(JSC::constructObject):
* tests/es6.yaml:
* tests/stress/array-concat-spread-object.js: Added.
(arrayEq):
* tests/stress/array-concat-spread-proxy-exception-check.js: Added.
(arrayEq):
* tests/stress/array-concat-spread-proxy.js: Added.
(arrayEq):
* tests/stress/array-concat-with-slow-indexingtypes.js: Added.
(arrayEq):
* tests/stress/array-species-config-array-constructor.js:

LayoutTests:

Fix tests for Symbol.isConcatSpreadable. Also, add new test that
the array species construction does not use the callees' global
object's Array[Symbol.species] when given an array from another
global object.

* js/Object-getOwnPropertyNames-expected.txt:
* js/array-species-different-globalobjects.html:
* js/dom/array-prototype-properties-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:

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

3 years agoAssertion failure when returning incomplete property descriptor from proxy trap.
mark.lam@apple.com [Thu, 16 Jun 2016 04:41:18 +0000 (04:41 +0000)]
Assertion failure when returning incomplete property descriptor from proxy trap.
https://bugs.webkit.org/show_bug.cgi?id=157078

Reviewed by Saam Barati.

If the proxy returns a descriptor that expects a value but does not specify one,
we should use undefined for the value.

* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performInternalMethodGetOwnProperty):
* tests/stress/proxy-returning-incomplete-property-descriptor.js: Added.
(truthiness):
(compare):
(shouldBe):
(test):
(get test):

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

3 years agoDecouple the percent height and positioned descendants maps.
zalan@apple.com [Thu, 16 Jun 2016 03:30:22 +0000 (03:30 +0000)]
Decouple the percent height and positioned descendants maps.
https://bugs.webkit.org/show_bug.cgi?id=158773

Reviewed by David Hyatt and Chris Dumez.

Source/WebCore:

We track renderers with percent height across multiple containers using
HashMap<const RenderBox*, std::unique_ptr<HashSet<const RenderBlock*>>>.
We also use the same data structure to track positioned descendants.
However a positioned renderer can have only one containing block so tracking it
with a 1:many type is defective.
It allows multiple inserts for positioned descendants, which could lead to
inconsistent layout state as the rendering logic expects these type of renderers
with only one containing block.
This patch decouples percent height and positioned tracking by introducing
the PositionedDescendantsMap class. This class is responsible for tracking
the positioned descendants inbetween layouts.

No change in functionality.

Tests: fast/block/positioning/change-containing-block-for-absolute-positioned.html
       fast/block/positioning/change-containing-block-for-fixed-positioned.html

* rendering/RenderBlock.cpp:
(WebCore::insertIntoTrackedRendererMaps):
(WebCore::removeFromTrackedRendererMaps):
(WebCore::PositionedDescendantsMap::addDescendant): Add more defensive ASSERT_NOT_REACHED
to the double insert branch when webkit.org/b/158772 gets fixed.
(WebCore::PositionedDescendantsMap::removeDescendant):
(WebCore::PositionedDescendantsMap::removeContainingBlock):
(WebCore::PositionedDescendantsMap::positionedRenderers):
(WebCore::positionedDescendantsMap):
(WebCore::removeBlockFromPercentageDescendantAndContainerMaps):
(WebCore::RenderBlock::~RenderBlock):
(WebCore::RenderBlock::positionedObjects):
(WebCore::RenderBlock::insertPositionedObject):
(WebCore::RenderBlock::removePositionedObject):
(WebCore::RenderBlock::addPercentHeightDescendant):
(WebCore::RenderBlock::removePercentHeightDescendant):
(WebCore::RenderBlock::percentHeightDescendants):
(WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
(WebCore::removeBlockFromDescendantAndContainerMaps): Deleted.
* rendering/RenderBlock.h:

LayoutTests:

Various dynamic containing block changing tests.

* fast/block/fixed-position-reparent-when-transition-is-removed.html:
* fast/block/positioning/change-containing-block-for-absolute-positioned-expected.txt: Added.
* fast/block/positioning/change-containing-block-for-absolute-positioned.html: Added.
* fast/block/positioning/change-containing-block-for-fixed-positioned-expected.txt: Added.
* fast/block/positioning/change-containing-block-for-fixed-positioned.html: Added.

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

3 years agoMove SoftLinking.h to platform/cococa from platform/mac
ddkilzer@apple.com [Thu, 16 Jun 2016 03:22:07 +0000 (03:22 +0000)]
Move SoftLinking.h to platform/cococa from platform/mac
<https://webkit.org/b/158825>

Reviewed by Andy Estes.

* PlatformMac.cmake: Update for new directory.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* platform/cocoa/SoftLinking.h: Renamed from Source/WebCore/platform/mac/SoftLinking.h.

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

3 years ago[Cocoa] Clean up / optimize ResourceResponse::platformLazyInit(InitLevel)
cdumez@apple.com [Thu, 16 Jun 2016 02:59:54 +0000 (02:59 +0000)]
[Cocoa] Clean up / optimize ResourceResponse::platformLazyInit(InitLevel)
https://bugs.webkit.org/show_bug.cgi?id=158809

Reviewed by Darin Adler.

Source/WebCore:

Clean up / optimize ResourceResponse::platformLazyInit(InitLevel).

* platform/network/HTTPParsers.cpp:
(WebCore::extractReasonPhraseFromHTTPStatusLine):
* platform/network/HTTPParsers.h:
Have extractReasonPhraseFromHTTPStatusLine() return an AtomicString as the
Reason is stored as an AtomicString on ResourceResponse. Have the
implementation use StringView::subString()::toAtomicString().

* platform/network/cocoa/ResourceResponseCocoa.mm:
(WebCore::stripLeadingAndTrailingDoubleQuote):
Move the stripLeadingAndTrailingDoubleQuote logic from platformLazyInit()
to its own function. Have it use StringView::subString()::toAtomicString()
to avoid unnecessarily atomizing the textEncodingName that has surrounding
double-quotes.

(WebCore::initializeHTTPHeaders):
Move HTTP headers initialization to its own function for clarity.

(WebCore::extractHTTPStatusText):
Move HTTP status Text extraction to its own function for clarity.

(WebCore::ResourceResponse::platformLazyInit):
- The function is streamlined a bit because most of the logic was moved
  into separate functions.
- Drop unnecessary (initLevel >= CommonFieldsOnly) check in the first
  if case and replace with an assertion. This function is always called
  with CommonFieldsOnly or above (AllFields).
- Drop unnecessary (m_initLevel < AllFields) check in the second if
  case as this is always true. If not, we would have returned early
  at the beginning of the function when checking
  m_initLevel >= initLevel.
- Use AutodrainedPool instead of NSAutoreleasePool for convenience and have
  only 1 pool instead of 2.
- Drop unnecessary copyNSURLResponseStatusLine() function and call directly
  CFHTTPMessageCopyResponseStatusLine() since we already have a
  CFHTTPMessageRef at the call site.

Source/WTF:

Add toAtomicString() method to StringView to avoid having to call toString()
and then atomizing the String at call sites.

* wtf/text/StringView.h:
(WTF::StringView::toAtomicString):

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

3 years agoExpose _shouldExpandContentToViewHeightForAutoLayout SPI on WKWebView
timothy_horton@apple.com [Thu, 16 Jun 2016 02:20:04 +0000 (02:20 +0000)]
Expose _shouldExpandContentToViewHeightForAutoLayout SPI on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=158824
<rdar://problem/23713857>

Reviewed by Simon Fraser.

Test: TestWebKitAPI/WebKit2.AutoLayoutIntegration

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _shouldExpandContentToViewHeightForAutoLayout]):
(-[WKWebView _setShouldExpandContentToViewHeightForAutoLayout:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
This property exists on WKView; expose it on WKWebView.

* TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:
(-[AutoLayoutWKWebView load:withWidth:expectingContentSize:]):
(-[AutoLayoutWKWebView load:withWidth:expectingContentSize:resettingWidth:]):
(-[AutoLayoutWKWebView layoutAtMinimumWidth:andExpectContentSizeChange:resettingWidth:]):
(TEST):
Add a test for _shouldExpandContentToViewHeightForAutoLayout.

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

3 years agoRevert part of r196034
achristensen@apple.com [Thu, 16 Jun 2016 01:28:54 +0000 (01:28 +0000)]
Revert part of r196034
https://bugs.webkit.org/show_bug.cgi?id=158805
rdar://problem/26788138

Reviewed by Dan Bernstein.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::~NetworkLoad):
If the WebResourceLoader was destroyed and received a canAuthenticateAgainstProtectionSpace
but did not send a continueCanAuthenticateAgainstProtectionSpace answer because there's no
core loader, then the NetworkLoad will be destroyed.  When this happens, we still need to call
the callback for the challenge.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace):
If there's no core loader, we can't send IPC.

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

3 years ago+[WebHTMLRepresentation supportedMIMETypes] leaks
ap@apple.com [Thu, 16 Jun 2016 01:22:54 +0000 (01:22 +0000)]
+[WebHTMLRepresentation supportedMIMETypes] leaks
https://bugs.webkit.org/show_bug.cgi?id=158683

Reviewed by Darin Adler.

The problem occurred when chaining newArrayByConcatenatingArrays calls.

Also refactored the code to avoid returning NSMutableArrays disguised as NSArrays,
and removed __unsafe_unretained modifiers that were added in http://trac.webkit.org/r149453
for no apparent reason.

* WebView/WebHTMLRepresentation.mm:
(newArrayWithStrings):
(+[WebHTMLRepresentation supportedMIMETypes]):
(+[WebHTMLRepresentation supportedMediaMIMETypes]):
(+[WebHTMLRepresentation supportedNonImageMIMETypes]):
(+[WebHTMLRepresentation supportedImageMIMETypes]):
(+[WebHTMLRepresentation unsupportedTextMIMETypes]):
(newArrayByConcatenatingArrays): Deleted.

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

3 years ago<attachment> elements jump around a lot around when subtitle text changes slightly
timothy_horton@apple.com [Thu, 16 Jun 2016 01:14:02 +0000 (01:14 +0000)]
<attachment> elements jump around a lot around when subtitle text changes slightly
https://bugs.webkit.org/show_bug.cgi?id=158818
<rdar://problem/24450270>

Reviewed by Simon Fraser.

Test: fast/attachment/attachment-subtitle-resize.html

* rendering/RenderAttachment.cpp:
(WebCore::RenderAttachment::layout):
* rendering/RenderAttachment.h:
* rendering/RenderThemeMac.mm:
(WebCore::AttachmentLayout::AttachmentLayout):
(WebCore::RenderThemeMac::paintAttachment):
In order to avoid changes to the centered subtitle text causing the whole
attachment to bounce around a lot, make it so that attachment width can only
increase, never decrease, and round the subtitle's width up to the nearest
increment of 10px when determining its affect on the whole element's width.
Also, center the attachment in its element, instead of left-aligning it,
so that the extra width we may have is evenly distributed between the two sides.

* fast/attachment/attachment-subtitle-resize-expected.txt: Added.
* fast/attachment/attachment-subtitle-resize.html: Added.

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

3 years ago[iOS WK2] Make it possible to test the Next/Previous buttons in the keyboard accessor...
simon.fraser@apple.com [Wed, 15 Jun 2016 23:44:57 +0000 (23:44 +0000)]
[iOS WK2] Make it possible to test the Next/Previous buttons in the keyboard accessory bar
https://bugs.webkit.org/show_bug.cgi?id=158714

Reviewed by Enrica Casucci.

Add UIScriptController.keyboardAccessoryBar{Next,Previous} and hook it up to the WKContentView
method that gets called from UIKit.

Add a test that exercises it.

Source/WebKit2:

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView keyboardAssistantBarNext]):
(-[WKWebView keyboardAssistantBarPrevious]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

* WebKitTestRunner/UIScriptContext/Bindings/UIScriptController.idl:
* WebKitTestRunner/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::keyboardAccessoryBarNext):
(WTR::UIScriptController::keyboardAccessoryBarPrevious):
* WebKitTestRunner/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::keyboardAccessoryBarNext):
(WTR::UIScriptController::keyboardAccessoryBarPrevious):

LayoutTests:

* TestExpectations:
* fast/forms/ios/accessory-bar-navigation-expected.txt: Added.
* fast/forms/ios/accessory-bar-navigation.html: Added.
* fast/forms/ios/resources/zooming-test-utils.js: Added.
(testZoomAfterTap):
(tableFromJSON):
* platform/ios-simulator-wk2/TestExpectations:

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

3 years ago[mac] LayoutTest transforms/undecomposable.html is a flaky timeout
dino@apple.com [Wed, 15 Jun 2016 23:34:07 +0000 (23:34 +0000)]
[mac] LayoutTest transforms/undecomposable.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=158816

Unflakify this test by putting the script in a place that
will execute it before the load event (by which time the animation
may have started).

* transforms/undecomposable.html:

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

3 years ago[iOS WK2] Add tests for zooming to text fields on focus
simon.fraser@apple.com [Wed, 15 Jun 2016 23:07:42 +0000 (23:07 +0000)]
[iOS WK2] Add tests for zooming to text fields on focus
https://bugs.webkit.org/show_bug.cgi?id=158786

Reviewed by Enrica Casucci.

Add tests that focus form controls, and test the resulting scroll position and zoom level.

* TestExpectations:
* fast/forms/ios/focus-input-via-button-expected.txt: Added.
* fast/forms/ios/focus-input-via-button-no-scaling-expected.txt: Added.
* fast/forms/ios/focus-input-via-button-no-scaling.html: Added.
* fast/forms/ios/focus-input-via-button.html: Added.
* fast/forms/ios/resources/zooming-test-utils.js: Added.
(testZoomAfterTap):
(tableFromJSON):
* fast/forms/ios/zoom-after-input-tap-expected.txt: Added.
* fast/forms/ios/zoom-after-input-tap-wide-input-expected.txt: Added.
* fast/forms/ios/zoom-after-input-tap-wide-input.html: Added.
* fast/forms/ios/zoom-after-input-tap.html: Added.
* platform/ios-simulator-wk2/TestExpectations:

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

3 years agoUnreviewed, fix typo in test and move tests to the correct files.
keith_miller@apple.com [Wed, 15 Jun 2016 22:37:03 +0000 (22:37 +0000)]
Unreviewed, fix typo in test and move tests to the correct files.

* tests/stress/multi-get-by-offset-proto-or-unset.js:
* tests/stress/multi-get-by-offset-proto-self-or-unset.js:

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

3 years agoRTL <select> forms are misplaced
dino@apple.com [Wed, 15 Jun 2016 22:14:09 +0000 (22:14 +0000)]
RTL <select> forms are misplaced
https://bugs.webkit.org/show_bug.cgi?id=158810
<rdar://problem/24847541>

Reviewed by Eric Carlson.

AppKit made a change in Sierra that causes popup menus
to snap to a different point when the system language is RTL.
We need to be more explicit about what directionality
we want, and override the location of the popup based
on the text direction.

I also made a small tweak to the fudge offsets we use
in order to make button text and menu text to be
more consistent.

Unfortunately since this is just about the location
of the popup menu, it's unable to be tested in our
current infrastructure.

Source/WebKit/mac:

* WebCoreSupport/PopupMenuMac.mm:
(PopupMenuMac::show):

Source/WebKit2:

* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):

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

3 years agoImprove HashMap and HashSet support for Ref
commit-queue@webkit.org [Wed, 15 Jun 2016 22:07:57 +0000 (22:07 +0000)]
Improve HashMap and HashSet support for Ref
https://bugs.webkit.org/show_bug.cgi?id=158789

Patch by Sam Weinig <sam@webkit.org> on 2016-06-15
Reviewed by Chris Dumez.

Source/WTF:

Tests: Add more cases to WTF_HashMap.Ref_Key, WTF_HashMap.Ref_Value and WTF_HashSet.Ref

* wtf/HashMap.h:
* wtf/HashSet.h:
Add a MappedTakeType typedef and rework the take functions to use it and HashTraits::take(...).

* wtf/HashTraits.h:
(WTF::GenericHashTraits::assignToEmpty):
Move to GenericHashTraits rather than GenericHashTraitsBase, since it is not different
between integral and non-integral HashTraits.

(WTF::GenericHashTraits::take):
Add a trait function for take that defaults as a forward. This allows us to override take
just like we do with get/peek.

(WTF::HashTraits<Ref<P>>::emptyValue):
Remove unnecessary explicit construction.

(WTF::HashTraits<Ref<P>>::peek):
Fix assertion that could happen if you did a HashMap.get() on an empty Ref value.

(WTF::HashTraits<Ref<P>>::take):
Make the TakeType of a Ref<P> be Optional<Ref<P>>, to avoid having empty
Refs returned from HashMap and HashSet. Implement an explicit take() function to
construct one.

(WTF::HashTraits<Ref<P>>::customDeleteBucket): Deleted.
Remove unnecessary customDeleteBucket implementation. Ref does not assign nullptr to
it's m_ptr in destruction, so there is no dead store to avoid here.

* wtf/Ref.h:
(WTF::Ref::ptrAllowingHashTableEmptyValue):
Add HashTrait helper to allow getting the value of m_ptr even when it is null. This
allows us to avoid a branch in HashTraits<Ref<P>>::peek().

Tools:

* TestWebKitAPI/Tests/WTF/HashMap.cpp:
* TestWebKitAPI/Tests/WTF/HashSet.cpp:
Add more cases to WTF_HashMap.Ref_Key, WTF_HashMap.Ref_Value and WTF_HashSet.Ref

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

3 years agoReset bindings test results after r202105
ryanhaddad@apple.com [Wed, 15 Jun 2016 21:56:16 +0000 (21:56 +0000)]
Reset bindings test results after r202105

Unreviewed test gardening.

* bindings/scripts/test/JS/JSTestObj.cpp:

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

3 years agoWebRTC: (Refactor) Align the structure of RTCPeerConnection.idl with the header file
adam.bergkvist@ericsson.com [Wed, 15 Jun 2016 21:27:36 +0000 (21:27 +0000)]
WebRTC: (Refactor) Align the structure of RTCPeerConnection.idl with the header file
https://bugs.webkit.org/show_bug.cgi?id=158779

Reviewed by Eric Carlson.

Restructure RTCPeerConnection.idl to make it easer to read and extend in the future.

No change in behavior.

* Modules/mediastream/RTCPeerConnection.idl:

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

3 years agoWebRTC: Add media setup test using the legacy callback APIs
adam.bergkvist@ericsson.com [Wed, 15 Jun 2016 21:27:07 +0000 (21:27 +0000)]
WebRTC: Add media setup test using the legacy callback APIs
https://bugs.webkit.org/show_bug.cgi?id=158736

Reviewed by Eric Carlson.

Add a test that sets up media using the legacy callback-based createOffer/Answer() and
setLocal/RemoteDescription() methods [1].

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#legacy-interface-extensions

* fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-media-setup-callbacks-single-dialog.html: Added.
* platform/mac/TestExpectations:
The mac port is not building with WEB_RTC yet.

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

3 years agoToo much log data generated during layout-tests on iOS Simulator
aakash_jain@apple.com [Wed, 15 Jun 2016 21:25:53 +0000 (21:25 +0000)]
Too much log data generated during layout-tests on iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=158751

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.developer_dir): memoized the property so that it is not called
repeatedly.

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

3 years agoUncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement...
commit-queue@webkit.org [Wed, 15 Jun 2016 21:15:13 +0000 (21:15 +0000)]
Uncaught Exception: TypeError: undefined is not an object (evaluating 'imageElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=158808
<rdar://problem/26821034>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-06-15
Reviewed by Brian Burg.

* UserInterface/Views/HeapAllocationsTimelineOverviewGraph.js:
(WebInspector.HeapAllocationsTimelineOverviewGraph.prototype._updateSnapshotMarkers):
If the record is out of the layout bounds of the overview graph, the overview graph
may not have created an image element yet, so bail. Later, when the image element
is created, it would get the appropriate style if the record is selected.

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

3 years agoDrop some unnecessary header includes
cdumez@apple.com [Wed, 15 Jun 2016 20:59:07 +0000 (20:59 +0000)]
Drop some unnecessary header includes
https://bugs.webkit.org/show_bug.cgi?id=158788

Reviewed by Alexey Proskuryakov.

Drop some unnecessary header includes in headers to speed up build time.

Source/WebCore:

* Modules/encryptedmedia/MediaKeySession.cpp:
* Modules/gamepad/GamepadManager.cpp:
* Modules/indexeddb/IDBDatabase.cpp:
* Modules/indexeddb/IDBOpenDBRequest.cpp:
* Modules/indexeddb/IDBRequest.cpp:
* Modules/indexeddb/IDBTransaction.cpp:
* Modules/mediasource/MediaSource.cpp:
* Modules/mediasource/SourceBuffer.cpp:
* Modules/mediasource/SourceBufferList.cpp:
* Modules/mediastream/MediaStream.cpp:
* Modules/mediastream/MediaStreamTrack.cpp:
* Modules/speech/SpeechSynthesis.cpp:
* Modules/webaudio/AudioScheduledSourceNode.cpp:
* Modules/webaudio/ScriptProcessorNode.cpp:
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* dom/CharacterData.cpp:
* dom/ContainerNode.cpp:
* dom/DOMNamedFlowCollection.cpp:
* dom/DeviceMotionController.cpp:
* dom/DeviceOrientationController.cpp:
* dom/Document.cpp:
* dom/Document.h:
* dom/DocumentEventQueue.cpp:
* dom/DocumentOrderedMap.h:
* dom/Element.cpp:
* dom/Event.cpp:
* dom/EventDispatcher.cpp:
* dom/EventTarget.cpp:
* dom/EventTarget.h:
* dom/KeyboardEvent.cpp:
* dom/MessageEvent.cpp:
* dom/MessagePort.cpp:
* dom/ScriptElement.cpp:
* dom/ScriptExecutionContext.cpp:
* dom/ScriptExecutionContext.h:
* dom/SecurityContext.h:
* dom/SimulatedClick.cpp:
* dom/TextEvent.cpp:
* dom/WebKitNamedFlow.cpp:
* editing/FrameSelection.cpp:
* fileapi/FileReader.cpp:
* html/HTMLLinkElement.cpp:
* html/HTMLPlugInImageElement.cpp:
* html/HTMLStyleElement.cpp:
* html/HTMLSummaryElement.cpp:
* html/HTMLTrackElement.cpp:
* html/HTMLVideoElement.cpp:
* html/InputType.cpp:
* html/MediaController.cpp:
* html/TextFieldInputType.cpp:
* html/canvas/WebGLRenderingContextBase.cpp:
* html/parser/HTMLScriptRunner.cpp:
* html/shadow/MediaControlElementTypes.cpp:
* html/shadow/MediaControls.cpp:
* html/shadow/MediaControlsApple.cpp:
* html/shadow/SliderThumbElement.cpp:
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
* inspector/InspectorIndexedDBAgent.cpp:
* loader/DocumentLoader.cpp:
* loader/ImageLoader.cpp:
* loader/PolicyChecker.cpp:
* mathml/MathMLSelectElement.cpp:
* page/DOMWindow.h:
* page/EventSource.cpp:
* page/FrameView.cpp:
* page/Performance.cpp:
* page/csp/ContentSecurityPolicy.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
* platform/network/HTTPHeaderMap.h:
* platform/network/ResourceHandle.cpp:
* rendering/RenderEmbeddedObject.cpp:
* rendering/RenderSnapshottedPlugIn.cpp:
* svg/SVGSVGElement.cpp:
* svg/SVGUseElement.cpp:
* svg/animation/SVGSMILElement.cpp:
* workers/WorkerGlobalScope.h:
* xml/XMLHttpRequest.cpp:
* xml/XMLHttpRequestProgressEventThrottle.cpp:
* xml/XMLHttpRequestUpload.cpp:

Source/WebKit/mac:

* WebCoreSupport/WebFrameLoaderClient.mm:

Source/WebKit/win:

* Plugins/PluginView.cpp:

Source/WebKit2:

* WebProcess/Plugins/PDF/DeprecatedPDFPlugin.mm:
* WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
* WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
* WebProcess/Plugins/PluginView.cpp:
* WebProcess/WebPage/WebPage.cpp:

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

3 years agoGoogleMaps transit schedule explorer comes up blank initially
antti@apple.com [Wed, 15 Jun 2016 20:52:14 +0000 (20:52 +0000)]
GoogleMaps transit schedule explorer comes up blank initially
https://bugs.webkit.org/show_bug.cgi?id=158803
rdar://problem/25818080

Source/WebCore:

Reviewed by Andreas Kling.

In case we had something like

.foo bar { ... }

and later a new stylesheet was added dynamically that contained

.foo baz { ... }

we would fail to add the new rules to the descendant invalidation rule sets for ".foo". This could
cause some style invalidations to be missed.

* css/DocumentRuleSets.cpp:
(WebCore::DocumentRuleSets::collectFeatures):

Reset the ancestorClassRules and ancestorAttributeRulesForHTML rule set caches when new style sheets
are added (==collectFeatures is called).

LayoutTests:

Reviewed by Andreas Kling

Expand the tests to cover this case.

* fast/css/style-invalidation-attribute-change-descendants-expected.txt:
* fast/css/style-invalidation-attribute-change-descendants.html:
* fast/css/style-invalidation-class-change-descendants-expected.txt:
* fast/css/style-invalidation-class-change-descendants.html:

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

3 years ago[css-sizing] Item borders are missing with 'min-width:-webkit-fill-available' and...
jfernandez@igalia.com [Wed, 15 Jun 2016 20:48:45 +0000 (20:48 +0000)]
[css-sizing] Item borders are missing with 'min-width:-webkit-fill-available' and zero available width
https://bugs.webkit.org/show_bug.cgi?id=158258

Source/WebCore:

Reviewed by Darin Adler.

The "fill-available" size is defined as the containing block's size less
the box's border and padding size. However, when used for min-width we
should ensure we don't get negative values as result of logical width
computation.

http://www.w3.org/TR/css-sizing-3/#fill-available-sizing

This patch ensure fill-available value computed value will be always
greater than box's boder and padding width.

Test: fast/css-intrinsic-dimensions/fill-available-with-zero-width.html

* rendering/RenderBox.cpp:
(WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):

LayoutTests:

Tests to verify that fill-available size works as expected when contaner's width is zero.

Reviewed by Darin Adler.

* fast/css-intrinsic-dimensions/fill-available-with-zero-width-expected.html: Added.
* fast/css-intrinsic-dimensions/fill-available-with-zero-width.html: Added.

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

3 years agoFix 2d canvas transform after r192900
commit-queue@webkit.org [Wed, 15 Jun 2016 19:41:52 +0000 (19:41 +0000)]
Fix 2d canvas transform after r192900
https://bugs.webkit.org/show_bug.cgi?id=158725
Source/WebCore:

rdar://problem/26774230

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-15
Reviewed by Dean Jackson.

Test: fast/canvas/canvas-transform-inverse.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::transform):
r192900 was intended to have no change in behavior, but I made a typo.
We need to apply the inverse of the original transform to the path to be correct.
This affects transforms applied to the canvas during the creation of a path.

LayoutTests:

Patch by Alex Christensen <achristensen@webkit.org> on 2016-06-15
Reviewed by Dean Jackson.

* fast/canvas/canvas-transform-inverse-expected.html: Added.
* fast/canvas/canvas-transform-inverse.html: Added.

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

3 years agoDFGByteCodeParser should be able to infer the value of unset properties in MultiGetBy...
keith_miller@apple.com [Wed, 15 Jun 2016 19:40:43 +0000 (19:40 +0000)]
DFGByteCodeParser should be able to infer the value of unset properties in MultiGetByOffset
https://bugs.webkit.org/show_bug.cgi?id=158802

Reviewed by Filip Pizlo.

This patch adds support for unset properties in MultiGetByOffset. Since MultiGetByOffset
already supports constant values this patch just adds a constant case where the fetched
value is undefined. Fortunately (or unfortunately) we don't support object allocation
sinking for constant cases of MultiGetByOffset, which means we don't need to adjust any
in that phase.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::planLoad):
(JSC::DFG::ByteCodeParser::handleGetById):
* dfg/DFGMultiGetByOffsetData.h:
* tests/stress/multi-get-by-offset-proto-or-unset.js: Added.
(foo):
* tests/stress/multi-get-by-offset-proto-self-or-unset.js: Added.
(foo):
* tests/stress/multi-get-by-offset-self-or-unset.js: Added.
(foo):

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

3 years ago[iOS] Make HTMLMediaElement.muted mutable
eric.carlson@apple.com [Wed, 15 Jun 2016 19:32:50 +0000 (19:32 +0000)]
[iOS] Make HTMLMediaElement.muted mutable
https://bugs.webkit.org/show_bug.cgi?id=158787
<rdar://problem/24452567>

Reviewed by Dean Jackson.

Source/WebCore:

Tests: media/audio-playback-restriction-removed-muted.html
       media/audio-playback-restriction-removed-track-enabled.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::audioTrackEnabledChanged): Remove most behavior restrictions if
  the track state was changed as a result of a user gesture.
(WebCore::HTMLMediaElement::setMuted): Ditto.
(WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Add mask
  parameter so caller can choose which restrictions are removed.
* html/HTMLMediaElement.h:

* html/MediaElementSession.cpp:
(WebCore::restrictionName): Drive-by fix: remove duplicate label.
* html/MediaElementSession.h:

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Set muted on AVPlayer if setMuted
  was called before the player was created.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setVolume): Drive-by fix: return early if there
  is no AVPlayer, not if we won't have metadata yet.
(WebCore::MediaPlayerPrivateAVFoundationObjC::setMuted): New.

LayoutTests:

* media/audio-playback-restriction-removed-muted-expected.txt: Added.
* media/audio-playback-restriction-removed-muted.html: Added.
* media/audio-playback-restriction-removed-track-enabled-expected.txt: Added.
* media/audio-playback-restriction-removed-track-enabled.html: Added.

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

3 years agoUnreviewed GCC build fix after r202098.
cdumez@apple.com [Wed, 15 Jun 2016 19:30:23 +0000 (19:30 +0000)]
Unreviewed GCC build fix after r202098.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::thresholdForJIT):

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

3 years agocompilation policy should adapt to past behavior
ggaren@apple.com [Wed, 15 Jun 2016 19:20:23 +0000 (19:20 +0000)]
compilation policy should adapt to past behavior
https://bugs.webkit.org/show_bug.cgi?id=158759

Reviewed by Saam Barati.

This looks like a ~9% speedup on JSBench.

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::~CodeBlock): Record when a CodeBlock dies without ever
making it to DFG.

(JSC::CodeBlock::thresholdForJIT): CodeBlocks that make it to DFG should
compile sooner; CodeBlocks that don't should compile later. The goal is
to use past behavior, in addition to execution counts, to determine
whether compilation is profitable.

(JSC::CodeBlock::jitAfterWarmUp):
(JSC::CodeBlock::jitSoon): Apply the thresholdForJIT rule.

* bytecode/CodeBlock.h: Moved some code into the .cpp file so I could
change stuff without recompiling.
(JSC::CodeBlock::jitAfterWarmUp): Deleted.
(JSC::CodeBlock::jitSoon): Deleted.

* bytecode/UnlinkedCodeBlock.cpp:
(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):
* bytecode/UnlinkedCodeBlock.h:
(JSC::UnlinkedCodeBlock::didOptimize):
(JSC::UnlinkedCodeBlock::setDidOptimize): Added a piece of data to track
whether we made it to DFG.

* jit/JITOperations.cpp: Record when we make it to DFG.

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

3 years agofast/events/ios tests are marked as flakey, but really just fail in OpenSource and WK1
simon.fraser@apple.com [Wed, 15 Jun 2016 19:17:51 +0000 (19:17 +0000)]
fast/events/ios tests are marked as flakey, but really just fail in OpenSource and WK1
https://bugs.webkit.org/show_bug.cgi?id=158804

Test gardening.

fast/events/ios is skipped globally. Ideally it would be re-enabled in /ios-simulator-wk2/TestExpectations, but relies on unreleased
software, so leave disabled for now.

* platform/ios-simulator/TestExpectations:

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

3 years agoSource/JavaScriptCore:
annulen@yandex.ru [Wed, 15 Jun 2016 19:04:43 +0000 (19:04 +0000)]
Source/JavaScriptCore:
Only Mac port needs ObjC API for JSC.
https://bugs.webkit.org/show_bug.cgi?id=158780

Reviewed by Philippe Normand.

* API/JSBase.h: Removed !defined(BUILDING_GTK__)

Source/WTF:
Only Mac port needs ObjC API for JSC
https://bugs.webkit.org/show_bug.cgi?id=158780

Reviewed by Philippe Normand.

* wtf/FeatureDefines.h:

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

3 years ago[Win][CMake] Changes in WebKit options are not reflected in incremental builds.
pvollan@apple.com [Wed, 15 Jun 2016 17:08:08 +0000 (17:08 +0000)]
[Win][CMake] Changes in WebKit options are not reflected in incremental builds.
https://bugs.webkit.org/show_bug.cgi?id=158727

Reviewed by Alex Christensen.

Delete CMake cache file if WebKit options have been modified.

* Scripts/build-webkit:
* Scripts/webkitdirs.pm:
(shouldRemoveCMakeCache):

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

3 years agoUnreviewed, follow up patch for r202092
utatane.tea@gmail.com [Wed, 15 Jun 2016 16:45:31 +0000 (16:45 +0000)]
Unreviewed, follow up patch for r202092
https://bugs.webkit.org/show_bug.cgi?id=158661

During checking Windows port on EWS, accidentally introduce the regression.

* wtf/Platform.h:

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

3 years agoDFGByteCodeParser should be able to infer a property is unset from the Baseline inlin...
keith_miller@apple.com [Wed, 15 Jun 2016 16:39:19 +0000 (16:39 +0000)]
DFGByteCodeParser should be able to infer a property is unset from the Baseline inline cache.
https://bugs.webkit.org/show_bug.cgi?id=158774

Reviewed by Filip Pizlo.

This patch allows the DFGByteCodeParser to speculatively convert a property access into a
constant if that access was always a miss in the Baseline inline cache. This patch does
not add support for MultiGetByOffset and unset properties. That functionality will come
a future patch.

* bytecode/ComplexGetStatus.cpp:
(JSC::ComplexGetStatus::computeFor):
* bytecode/GetByIdStatus.cpp:
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):
* bytecode/GetByIdVariant.h:
(JSC::GetByIdVariant::isPropertyUnset):
* bytecode/PutByIdVariant.h:
(JSC::PutByIdVariant::isPropertyUnset):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::load):
(JSC::DFG::ByteCodeParser::handleGetById):
* tests/stress/undefined-access-then-self-change.js: Added.
(foo):

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

3 years ago[JSC] Move calling convention flags to WTF
utatane.tea@gmail.com [Wed, 15 Jun 2016 16:30:00 +0000 (16:30 +0000)]
[JSC] Move calling convention flags to WTF
https://bugs.webkit.org/show_bug.cgi?id=158661

Reviewed by Keith Miller.

Source/JavaScriptCore:

Due to some calling convention flags and JIT_OPERATION flags, MathCommon.h includes MacroAssemblerCodeRef and JITOperations.h.
But MacroAssembler and JIT part should not be necessary for the MathCommon component.
As with other calling convention flags like JSC_HOST_CALL, these flags should be in WTF.

* assembler/MacroAssemblerCodeRef.h:
* jit/JITOperations.h:
Add wtf/Platform.h inclusion driven by the Windows port build failure.

* runtime/MathCommon.h:

Source/WTF:

* wtf/Platform.h:

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

3 years agoEnabling Shadow DOM for all platforms
commit-queue@webkit.org [Wed, 15 Jun 2016 15:22:19 +0000 (15:22 +0000)]
Enabling Shadow DOM for all platforms
https://bugs.webkit.org/show_bug.cgi?id=158738

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-06-15
Reviewed by Ryosuke Niwa.

.:

Removed Shadow DOM from options (enabled by default)

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

Source/JavaScriptCore:

Removed Shadow DOM from options (enabled by default)

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

No new tests (no new behavior to be tested).

Removed Shadow DOM from options (enabled by default)
(comprises removal of corresponding preprocessor directives)

* Configurations/FeatureDefines.xcconfig:
* DerivedSources.make:
* bindings/generic/RuntimeEnabledFeatures.h:
* bindings/js/JSDocumentFragmentCustom.cpp:
* bindings/js/JSNodeCustom.cpp:
* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
* css/CSSParserValues.cpp:
* css/CSSParserValues.h:
* css/CSSSelector.cpp:
* css/CSSSelector.h:
* css/ElementRuleCollector.cpp:
* css/ElementRuleCollector.h:
* css/RuleSet.cpp:
* css/RuleSet.h:
* css/SelectorChecker.cpp:
* css/SelectorChecker.h:
* css/SelectorPseudoClassAndCompatibilityElementMap.in:
* css/StyleResolver.cpp:
* cssjit/SelectorCompiler.cpp:
* dom/ComposedTreeAncestorIterator.h:
* dom/ComposedTreeIterator.cpp:
* dom/ComposedTreeIterator.h:
* dom/ContainerNode.cpp:
* dom/Document.cpp:
* dom/Document.h:
* dom/Element.cpp:
* dom/Element.h:
* dom/Element.idl:
* dom/Event.idl:
* dom/EventPath.cpp:
* dom/Node.cpp:
* dom/Node.h:
* dom/NonDocumentTypeChildNode.idl:
* dom/ShadowRoot.cpp:
* dom/ShadowRoot.h:
* dom/ShadowRoot.idl:
* dom/SlotAssignment.cpp:
* dom/SlotAssignment.h:
* html/HTMLSlotElement.cpp:
* html/HTMLSlotElement.h:
* html/HTMLSlotElement.idl:
* html/HTMLTagNames.in:
* page/FocusController.cpp:
* style/StyleSharingResolver.cpp:
* style/StyleTreeResolver.cpp:

Source/WebKit/mac:

Removed Shadow DOM from options (enabled by default)

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferences.mm:
* WebView/WebView.mm:

Source/WebKit/win:

Removed Shadow DOM from options (enabled by default)
(comprises removal of corresponding preprocessor directives)

* WebView.cpp:

Source/WebKit2:

Removed Shadow DOM from options (enabled by default)
(comprises removal of corresponding preprocessor directives)

* Configurations/FeatureDefines.xcconfig:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/WebPage/WebPage.cpp:

Tools:

Removed Shadow DOM from options (enabled by default)

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

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

3 years ago[Cocoa] Add two notify listeners for poking the garbage collector.
akling@apple.com [Wed, 15 Jun 2016 15:13:03 +0000 (15:13 +0000)]
[Cocoa] Add two notify listeners for poking the garbage collector.
<https://webkit.org/b/158783>

Reviewed by Antti Koivisto.

Add two new notify listeners:

- com.apple.WebKit.fullGC

    Trigger a full garbage collection in the main WebCore VM immediately.

- com.apple.WebKit.deleteAllCode

    Throw away all of JSC's linked and unlinked code, and do a full GC.

These will make it easier to diagnose memory growth issues by having a lever that
eliminates many of the large object graphs without going after behavior-changing things
like the memory cache.

* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::platformInitialize):
* platform/MemoryPressureHandler.h:
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformInitialize):

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

3 years agoVary:Cookie validation doesn't work in private browsing
antti@apple.com [Wed, 15 Jun 2016 14:12:16 +0000 (14:12 +0000)]
Vary:Cookie validation doesn't work in private browsing
https://bugs.webkit.org/show_bug.cgi?id=158616
Source/WebCore:

<rdar://problem/26755067>

Reviewed by Andreas Kling.

There wasn't a way to get cookie based on SessionID from WebCore.

* platform/CookiesStrategy.h:

    Add a cookie retrival function that takes SessionID instead of NetworkStorageSession.

* platform/network/CacheValidation.cpp:
(WebCore::headerValueForVary):

    Use it.

(WebCore::verifyVaryingRequestHeaders):

Source/WebKit/mac:

<rdar://problem/26755067>

Reviewed by Andreas Kling.

* WebCoreSupport/WebFrameNetworkingContext.h:
(WebFrameNetworkingContext::create):
* WebCoreSupport/WebFrameNetworkingContext.mm:
(privateSession):
(WebFrameNetworkingContext::ensurePrivateBrowsingSession):

    Expose the private browsing session.

(WebFrameNetworkingContext::destroyPrivateBrowsingSession):
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::cookieRequestHeaderFieldValue):

    Implement SessionID version of the function.

(WebPlatformStrategies::getRawCookies):

Source/WebKit2:

<rdar://problem/26755067>

Reviewed by Andreas Kling.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):

    Implement SessionID version of the function.

* WebProcess/WebCoreSupport/WebPlatformStrategies.h:

LayoutTests:

Reviewed by Darin Adler.

* http/tests/cache/disk-cache/disk-cache-vary-cookie-expected.txt:
* http/tests/cache/disk-cache/disk-cache-vary-cookie.html:

Exapand the existing test to cover memory cache and private browsing.

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

3 years ago[Win] The test accessibility/selected-text-range-aria-elements.html is failing.
pvollan@apple.com [Wed, 15 Jun 2016 09:55:18 +0000 (09:55 +0000)]
[Win] The test accessibility/selected-text-range-aria-elements.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=158732

Reviewed by Brent Fulgham.

Source/WebCore:

Implement support for getting selected text range.

* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):

Tools:

Implement selectedTextRange() method.

* DumpRenderTree/win/AccessibilityUIElementWin.cpp:
(AccessibilityUIElement::selectedTextRange):

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

3 years ago[Win] MiniBrowser is not DPI aware.
pvollan@apple.com [Wed, 15 Jun 2016 09:36:22 +0000 (09:36 +0000)]
[Win] MiniBrowser is not DPI aware.
https://bugs.webkit.org/show_bug.cgi?id=158733

Reviewed by Brent Fulgham.

Call Win32 api function to let Windows know that we will scale the contents ourselves.

* MiniBrowser/win/WinMain.cpp:
(wWinMain):

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

3 years agoUnreviewed: add new email address to contributors.json.
pvollan@apple.com [Wed, 15 Jun 2016 09:26:08 +0000 (09:26 +0000)]
Unreviewed: add new email address to contributors.json.

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

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

3 years agoAddressing post-review comments after r201971
mmaxfield@apple.com [Wed, 15 Jun 2016 06:36:29 +0000 (06:36 +0000)]
Addressing post-review comments after r201971
https://bugs.webkit.org/show_bug.cgi?id=158450

Unreviewed.

* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::add):
(WebCore::CSSFontFaceSet::remove):

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

3 years agoJSBench should use geometric mean
keith_miller@apple.com [Wed, 15 Jun 2016 05:04:17 +0000 (05:04 +0000)]
JSBench should use geometric mean
https://bugs.webkit.org/show_bug.cgi?id=158775

Reviewed by Mark Lam.

For some reason JSBench was using algebraic mean. Since each test
is pretty substantially different it should use geometric mean
instead.

* Scripts/run-jsc-benchmarks:

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

3 years agoHonor bidi unicode codepoints
mmaxfield@apple.com [Wed, 15 Jun 2016 04:44:01 +0000 (04:44 +0000)]
Honor bidi unicode codepoints
https://bugs.webkit.org/show_bug.cgi?id=149170
<rdar://problem/26527378>

Reviewed by Simon Fraser.

Source/WebCore:

BidiResolver doesn't have any concept of isolate Unicode code points, so produces
unexpected output when they are present. Fix by considering such code points as
whitespace in the bidi algorithm. This is a stop-gap measure until we can support
the codepoints fully in our Bidi algorithm.

Test: fast/text/isolate-ignore.html

* platform/graphics/Font.cpp:
(WebCore::createAndFillGlyphPage):
* platform/text/BidiResolver.h:
(WebCore::Subclass>::createBidiRunsForLine):

Source/WTF:

* wtf/unicode/CharacterNames.h:

LayoutTests:

* fast/text/isolate-ignore-expected.html: Added.
* fast/text/isolate-ignore.html: Added.

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

3 years agoWeb Inspector: Rename DataGrid.showColumn to setColumnVisible
mattbaker@apple.com [Wed, 15 Jun 2016 02:52:35 +0000 (02:52 +0000)]
Web Inspector: Rename DataGrid.showColumn to setColumnVisible
https://bugs.webkit.org/show_bug.cgi?id=158764
<rdar://problem/26801448>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid):
Drive-by update to initialize "this._columnChooserEnabled".

(WebInspector.DataGrid.prototype.set identifier):
(WebInspector.DataGrid.prototype.insertColumn):
(WebInspector.DataGrid.prototype._collapseColumnGroupWithCell):
Use new method name.

(WebInspector.DataGrid.prototype._contextMenuInHeader):
Drive-by style update.

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

3 years agoWeb Inspector: Storage tab should allow hiding columns in the cookies grid
mattbaker@apple.com [Wed, 15 Jun 2016 02:52:10 +0000 (02:52 +0000)]
Web Inspector: Storage tab should allow hiding columns in the cookies grid
https://bugs.webkit.org/show_bug.cgi?id=158767
<rdar://problem/26803568>

Reviewed by Joseph Pecoraro.

* UserInterface/Views/CookieStorageContentView.js:
(WebInspector.CookieStorageContentView.prototype._rebuildTable):
Enable column chooser, exclude Name and Value columns.

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

3 years agoAvoid constructing a AuthenticationChallenge unnecessarily in the NetworkLoad constructor
cdumez@apple.com [Wed, 15 Jun 2016 02:18:02 +0000 (02:18 +0000)]
Avoid constructing a AuthenticationChallenge unnecessarily in the NetworkLoad constructor
https://bugs.webkit.org/show_bug.cgi?id=158746

Reviewed by Darin Adler.

Avoid constructing a AuthenticationChallenge unnecessarily in the
NetworkLoad constructor by using WTF::Optional<> for this data
member.

* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::continueCanAuthenticateAgainstProtectionSpace):
* NetworkProcess/NetworkLoad.h:

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

3 years ago[iOS] Play glyph is pixelated when the page zoom is large
commit-queue@webkit.org [Wed, 15 Jun 2016 02:07:38 +0000 (02:07 +0000)]
[iOS] Play glyph is pixelated when the page zoom is large
https://bugs.webkit.org/show_bug.cgi?id=158770
<rdar://problem/26092124>

Patch by Antoine Quint <graouts@apple.com> on 2016-06-14
Reviewed by Dean Jackson.

Use the same technique that we use to scale the video controls by using a combination
of CSS "zoom" and "transform" properties to have the video play glyph scaled at its
native size regardless of page zoom.

* Modules/mediacontrols/mediaControlsiOS.js:
(ControllerIOS.prototype.set pageScaleFactor):

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

3 years agoDebug crash logs are not fully symbolicated on Yosemite
ap@apple.com [Wed, 15 Jun 2016 01:45:25 +0000 (01:45 +0000)]
Debug crash logs are not fully symbolicated on Yosemite
https://bugs.webkit.org/show_bug.cgi?id=158760

Reviewed by Darin Adler.

* BuildSlaveSupport/build.webkit.org-config/master.cfg: Don't enable dSYM generation
for debug builds on Yosemite.

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

3 years agoAdd missing WTFMove() in NetworkResourceLoader::didReceiveResponse()
cdumez@apple.com [Wed, 15 Jun 2016 01:31:00 +0000 (01:31 +0000)]
Add missing WTFMove() in NetworkResourceLoader::didReceiveResponse()
https://bugs.webkit.org/show_bug.cgi?id=158745

Reviewed by Darin Adler.

Add missing WTFMove() in NetworkResourceLoader::didReceiveResponse()
to avoid copying the ResourceResponse.

* NetworkProcess/NetworkResourceLoader.cpp:

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

3 years agoRegression(r201534): Compile time greatly regressed
cdumez@apple.com [Wed, 15 Jun 2016 01:25:59 +0000 (01:25 +0000)]
Regression(r201534): Compile time greatly regressed
https://bugs.webkit.org/show_bug.cgi?id=158765
<rdar://problem/26587342>

Reviewed by Darin Adler.

Compile time greatly regressed by r201534 due to Document.h now including
TextAutoSizing.h. Move the TextAutoSizingTraits back to Document.h to
restore pre-r201534 behavior.

* WebCore.xcodeproj/project.pbxproj:
* dom/Document.cpp:
(WebCore::TextAutoSizingTraits::constructDeletedValue):
(WebCore::TextAutoSizingTraits::isDeletedValue):
* dom/Document.h:
* rendering/TextAutoSizing.h:
(WebCore::TextAutoSizingTraits::constructDeletedValue): Deleted.
(WebCore::TextAutoSizingTraits::isDeletedValue): Deleted.

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

3 years agoInline media controls cut off PiP and fullscreen buttons on cnn.com
commit-queue@webkit.org [Wed, 15 Jun 2016 01:03:30 +0000 (01:03 +0000)]
Inline media controls cut off PiP and fullscreen buttons on cnn.com
https://bugs.webkit.org/show_bug.cgi?id=158766
<rdar://problem/24175161>

Patch by Antoine Quint <graouts@apple.com> on 2016-06-14
Reviewed by Dean Jackson.

The display of the picture-in-picture and fullscreen buttons are dependent on the availability
of video tracks through a call to hasVideo(). We need to ensure that the display properties of
both those buttons are updated when the number of video tracks has changed since the controls
may be populated prior to the availability of video tracks.

* Modules/mediacontrols/mediaControlsApple.js:
(Controller.prototype.updateHasVideo):

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

3 years agoThe parser doesn't properly parse "super" when default parameter is an
commit-queue@webkit.org [Wed, 15 Jun 2016 00:45:25 +0000 (00:45 +0000)]
The parser doesn't properly parse "super" when default parameter is an
arrow function.
https://bugs.webkit.org/show_bug.cgi?id=157872.

Patch by Caio Lima <ticaiolima@gmail.com> on 2016-06-14
Reviewed by Saam Barati.

The "super" member or "super()" could not be used when default parameter is an
arrow function, resuling in sytax error. It happened because the
"closestOrdinaryFunctionScope" was not being initialized properly
before "parseFunctionParameters" step and the condition
"functionSuperBinding == SuperBinding::NotNeeded" or
"functionConstructorKind != ConstructorKind::Derived" on
"Parser<LexerType>::parseMemberExpression" step were being true
resulting in SyntaxError.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseFunctionInfo): setting
"functionScope->setExpectedSuperBinding(expectedSuperBinding)" and
"functionScope->setConstructorKind(constructorKind)" before
"parseFunctionParameters" step.

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

3 years agoWeb Inspector: Visual Sidebar: Remove "Text -> Content" subsection
nvasilyev@apple.com [Wed, 15 Jun 2016 00:43:23 +0000 (00:43 +0000)]
Web Inspector: Visual Sidebar: Remove "Text -> Content" subsection
https://bugs.webkit.org/show_bug.cgi?id=158758
<rdar://problem/26799628>

Reviewed by Timothy Hatcher.

"content" CSS property only works with pseudo elements ::before and ::after.
It doesn't do anything for regular (non pseudo) elements. Remove it to
reduce UI clutter.

* UserInterface/Views/VisualStyleDetailsPanel.js:
(WebInspector.VisualStyleDetailsPanel.prototype.initialLayout):
(WebInspector.VisualStyleDetailsPanel.prototype._populateContentSection): Deleted.
* UserInterface/Views/VisualStylePropertyEditor.css:
(.visual-style-property-container > *:first-child:matches(.visual-style-property-value-container)): Deleted.

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

3 years agoWeb Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments
commit-queue@webkit.org [Wed, 15 Jun 2016 00:42:51 +0000 (00:42 +0000)]
Web Inspector: Rename Timeline.setAutoCaptureInstruments to Timeline.setInstruments
https://bugs.webkit.org/show_bug.cgi?id=158762

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

Source/JavaScriptCore:

Rename the protocol methods since the backend may use the instruments
for purposes other then auto-capture, such as programmatic capture
via console.profile.

* inspector/protocol/Timeline.json:

Source/WebCore:

Test: inspector/timeline/setInstruments-errors.html

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorTimelineAgent::setInstruments):
(WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
(WebCore::InspectorTimelineAgent::setAutoCaptureInstruments): Deleted.
* inspector/InspectorTimelineAgent.h:

Source/WebInspectorUI:

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager.prototype._updateAutoCaptureInstruments):
(WebInspector.TimelineManager):

LayoutTests:

* inspector/timeline/setInstruments-errors-expected.txt: Renamed from LayoutTests/inspector/timeline/setAutoCaptureInstruments-errors-expected.txt.
* inspector/timeline/setInstruments-errors.html: Renamed from LayoutTests/inspector/timeline/setAutoCaptureInstruments-errors.html.

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

3 years agoTests don't work in iOS Simulator when ASan is enabled
ap@apple.com [Tue, 14 Jun 2016 23:38:32 +0000 (23:38 +0000)]
Tests don't work in iOS Simulator when ASan is enabled
https://bugs.webkit.org/show_bug.cgi?id=158726

Reviewed by David Kilzer.

* Scripts/webkitpy/port/driver.py:
(Driver._setup_environ_for_driver): Added a FIXME.
* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort.setup_environ_for_server): Don't try to insert a dylib built for
simulator into LayoutTestRelay, which is a macOS tool.

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

3 years agoContinuous "Reentrancy avoided" error messages in run-webkit-tests if Simulator quits...
aakash_jain@apple.com [Tue, 14 Jun 2016 23:28:11 +0000 (23:28 +0000)]
Continuous "Reentrancy avoided" error messages in run-webkit-tests if Simulator quits unexpectedly
https://bugs.webkit.org/show_bug.cgi?id=158756

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/xcode/simulator.py:
(Simulator.wait_until_device_is_booted): If checking Simulator boot state fails, verify if
the "simulator device" is still in booted state. Since we ensured that simulator device
was in booted state earlier in this method, this indicates that simulator device has shut down
unexpectedly.

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

3 years agoDocument the native format of JSChar type
ddkilzer@apple.com [Tue, 14 Jun 2016 22:56:02 +0000 (22:56 +0000)]
Document the native format of JSChar type
<http://webkit.org/b/156137>

Reviewed by Darin Adler.

* API/JSStringRef.h:
(typedef JSChar): Update documentation.

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

3 years agodecompose4 return value is unchecked, leading to potentially uninitialized data.
dino@apple.com [Tue, 14 Jun 2016 22:47:34 +0000 (22:47 +0000)]
decompose4 return value is unchecked, leading to potentially uninitialized data.
https://bugs.webkit.org/show_bug.cgi?id=158761
<rdar://problem/17526268>

Reviewed by Simon Fraser.

Source/WebCore:

WebCore::decompose4 could return early without initializing data.
I now initialize it, but I also started checking the return
value at all the call sites to make sure everything is sensible.

Test: transforms/undecomposable.html

* platform/graphics/transforms/PerspectiveTransformOperation.cpp:
(WebCore::PerspectiveTransformOperation::blend):
* platform/graphics/transforms/RotateTransformOperation.cpp:
(WebCore::RotateTransformOperation::blend):
* platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::decompose4):
(WebCore::TransformationMatrix::blend4):
* platform/graphics/transforms/TransformationMatrix.h:

LayoutTests:

* transforms/undecomposable-expected.txt: Added.
* transforms/undecomposable.html: Added.

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

3 years agoThe Array species constructor watchpoints should be created the first time they are...
keith_miller@apple.com [Tue, 14 Jun 2016 22:34:09 +0000 (22:34 +0000)]
The Array species constructor watchpoints should be created the first time they are needed rather than on creation
https://bugs.webkit.org/show_bug.cgi?id=158754

Reviewed by Benjamin Poulain.

Source/JavaScriptCore:

We use adaptive watchpoints for some Array prototype functions to
ensure that the user has not overridden the value of the
Array.prototype.constructor or Array[Symbol.species]. This patch
changes when the Array species constructor watchpoints are
initialized. Before, those watchpoints would be created when the
global object is initialized. This had the advantage that it did
not require validating the constructor and Symbol.species
properties. On the other hand, it also meant that if the user were
to reconfigure properties Array.prototype, which would cause the
structure of the property to become an uncachable dictionary,
prior to running code that the watchpoints would be
invalidated. It turns out that JSBench amazon, for instance, does
reconfigure some of Array.prototype's properties. This patch
initializes the watchpoints the first time they are needed. Since
we only initialize once we also flatten the structure of Array and
Array.prototype.

* runtime/ArrayPrototype.cpp:
(JSC::speciesConstructArray):
(JSC::ArrayPrototype::attemptToInitializeSpeciesWatchpoint):
(JSC::ArrayPrototypeAdaptiveInferredPropertyWatchpoint::handleFire):
(JSC::ArrayPrototype::setConstructor): Deleted.
* runtime/ArrayPrototype.h:
(JSC::ArrayPrototype::speciesWatchpointStatus):
(JSC::ArrayPrototype::didChangeConstructorOrSpeciesProperties): Deleted.
* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::speciesGetterSetter):
(JSC::JSGlobalObject::arrayConstructor):
* tests/stress/array-symbol-species-lazy-watchpoints.js: Added.
(test):
(arrayEq):
(A):

LayoutTests:

Add new micro-benchmark that tests the impact of lazily
initializing the array species watchpoints.

* js/regress/lazy-array-species-watchpoints-expected.txt: Added.
* js/regress/lazy-array-species-watchpoints.html: Added.
* js/regress/script-tests/lazy-array-species-watchpoints.js: Added.
(test):

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

3 years agoAdd the unprefixed version of the pseudo element ::placeholder
commit-queue@webkit.org [Tue, 14 Jun 2016 22:09:33 +0000 (22:09 +0000)]
Add the unprefixed version of the pseudo element ::placeholder
https://bugs.webkit.org/show_bug.cgi?id=158653

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-06-14
Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/forms/placeholder-pseudo-element-with-webkit-prefix.html

The pseudo element ::-webkit-input-placeholder is stupidly popular
which forces other engines to support this exact name.

The pseudo-element spec provides a new standard name we can adopt
to drop the prefix: https://drafts.csswg.org/css-pseudo-4/#placeholder-pseudo

This patch does just that, make ::placeholder the standard name to select
the placeholder element in the shadow dom of input elements.

Unlike pseudo classes, we did not have any support for prefixes and aliasing.
I want to keep the absurdly efficient matching we currently use for styling
because style updates are more common than stylesheet updates.
With that constraint in mind, the value of CSSSelector has to be the unprefixed
version for both forms of input.

This leaves us with the problem of displaying the CSSSelector for CSSOM.
To differentiate the legacy form from the standard form, I added
a new type of PseudoElement: PseudoElementWebKitCustomLegacyPrefixed.
When parsing, PseudoElementWebKitCustomLegacyPrefixed let us replace
the original value "-webkit-input-placeholder" by the standard value.
When creating the selectorText for CSSOM, PseudoElementWebKitCustomLegacyPrefixed
let us replace the standard for by the legacy form.

* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::parsePseudoElementSelector):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::pseudoId):
(WebCore::CSSSelector::selectorText):
* css/CSSSelector.h:
(WebCore::CSSSelector::isCustomPseudoElement):
(WebCore::CSSSelector::isWebKitCustomPseudoElement):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::matchRecursively):
* css/SelectorPseudoElementTypeMap.in:
* css/html.css:
(::placeholder):
(input::placeholder, isindex::placeholder):
(textarea::placeholder):
(::-webkit-input-placeholder): Deleted.
(input::-webkit-input-placeholder, isindex::-webkit-input-placeholder): Deleted.
(textarea::-webkit-input-placeholder): Deleted.
* features.json:
* html/shadow/TextControlInnerElements.cpp:
(WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement):

Source/WebInspectorUI:

* UserInterface/Views/FilterBar.css:
(.filter-bar > input[type="search"]::placeholder):
(.filter-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
* UserInterface/Views/FindBanner.css:
(.find-banner.console-find-banner > input[type="search"]::placeholder):
(.find-banner.console-find-banner > input[type="search"]::-webkit-input-placeholder): Deleted.
* UserInterface/Views/GoToLineDialog.css:
(.go-to-line-dialog > div > input::placeholder):
(.go-to-line-dialog > div > input::-webkit-input-placeholder): Deleted.
* UserInterface/Views/OpenResourceDialog.css:
(.open-resource-dialog > .field > input::placeholder):
(.open-resource-dialog > .field > input::-webkit-input-placeholder): Deleted.
* UserInterface/Views/SearchBar.css:
(.search-bar > input[type="search"]::placeholder):
(.search-bar > input[type="search"]::-webkit-input-placeholder): Deleted.
* UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.css:

LayoutTests:

* fast/css/css-selector-text-expected.txt:
* fast/css/css-selector-text.html:
* fast/css/css-set-selector-text-expected.txt:
* fast/css/css-set-selector-text.html:
This covers CSSOM for the prefixed version.

* fast/forms/placeholder-pseudo-element-with-webkit-prefix-expected.html: Added.
* fast/forms/placeholder-pseudo-element-with-webkit-prefix.html: Added.
This verifies both version of the pseudo elements are equivalent.

* fast/css/pseudo-cache-stale-expected.html:
* fast/css/pseudo-cache-stale.html:
* fast/forms/input-placeholder-paint-order-2-expected.html:
* fast/forms/input-placeholder-paint-order-2.html:
* fast/forms/input-placeholder-paint-order.html:
* fast/forms/input-placeholder-text-indent.html:
* fast/forms/input-user-modify.html:
* fast/forms/isindex-placeholder.html:
* fast/forms/placeholder-position.html:
* fast/forms/placeholder-pseudo-style.html:
* fast/forms/textarea-placeholder-pseudo-style.html:
* fast/forms/textarea/textarea-placeholder-paint-order-2-expected.html:
* fast/forms/textarea/textarea-placeholder-paint-order-2.html:
* fast/forms/textarea/textarea-placeholder-paint-order.html:

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

3 years agoFollow-up fix #2: REGRESSION (r202020): El Capitan CMake Debug build broken
ddkilzer@apple.com [Tue, 14 Jun 2016 22:02:34 +0000 (22:02 +0000)]
Follow-up fix #2: REGRESSION (r202020): El Capitan CMake Debug build broken
<https://webkit.org/b/158743>

Unreviewed build fix.

* DumpRenderTree/PlatformMac.cmake: Fix silly typo.

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

3 years agoWeb Inspector: Introduce --navigation-bar-height CSS variable
nvasilyev@apple.com [Tue, 14 Jun 2016 21:42:35 +0000 (21:42 +0000)]
Web Inspector: Introduce --navigation-bar-height CSS variable
https://bugs.webkit.org/show_bug.cgi?id=158752

Reviewed by Timothy Hatcher.

Abstract a commonly repeated height value (29px) into a variable.

* UserInterface/Views/CSSStyleDetailsSidebarPanel.css:
(.sidebar > .panel.details.css-style > .content.has-filter-bar):
* UserInterface/Views/DebuggerSidebarPanel.css:
(.sidebar > .panel.navigation.debugger > :matches(.content, .empty-content-placeholder)):
* UserInterface/Views/FilterBar.css:
(.filter-bar):
* UserInterface/Views/NavigationBar.css:
(.navigation-bar):
* UserInterface/Views/NavigationSidebarPanel.css:
(.sidebar > .panel.navigation > .content):
(.sidebar > .panel.navigation > .overflow-shadow.top):
* UserInterface/Views/NetworkSidebarPanel.css:
(.sidebar > .panel.navigation.network > .title-bar):
* UserInterface/Views/ResourceSidebarPanel.css:
(.sidebar > .panel.navigation.resource > :matches(.content, .empty-content-placeholder)):
* UserInterface/Views/SearchSidebarPanel.css:
(.sidebar > .panel.navigation.search > :matches(.content, .empty-content-placeholder)):
(.sidebar > .panel.navigation.search > .search-bar):
* UserInterface/Views/Sidebar.css:
(.sidebar.has-navigation-bar > .panel):
* UserInterface/Views/StorageSidebarPanel.css:
(.sidebar > .panel.navigation.storage > :matches(.content, .empty-content-placeholder)):
* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording > .content-browser .recording-progress):
* UserInterface/Views/Variables.css:
(:root):

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

3 years agoAX: Form label text should be exposed as static text if it contains only static text
d_russell@apple.com [Tue, 14 Jun 2016 21:28:37 +0000 (21:28 +0000)]
AX: Form label text should be exposed as static text if it contains only static text
https://bugs.webkit.org/show_bug.cgi?id=158634

Reviewed by Chris Fleizach.

Use AccessibilityLabel to represent HTMLLabelElement to assistive technology.
AccessibilityLabel::containsOnlyStaticText() searches label subtree to evaluate
if all children are static text.
AccessibilityLabel::stringValue() consults containsOnlyStaticText() and returns
textUnderElement() if true.
WebAccessibilityObjectWrapperMac consults containsOnlyStaticText() and substitutes
StaticTextRole for LabelRole if true.
Cache containsOnlyStaticText() in the common case when updating children.

Source/WebCore:

Tests: accessibility/mac/label-element-all-text-string-value.html
       accessibility/mac/label-element-with-link-string-value.html

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* accessibility/AXObjectCache.cpp:
(WebCore::createFromRenderer):
* accessibility/AccessibilityAllInOne.cpp:
* accessibility/AccessibilityLabel.cpp: Added.
(WebCore::AccessibilityLabel::AccessibilityLabel):
(WebCore::AccessibilityLabel::~AccessibilityLabel):
(WebCore::AccessibilityLabel::create):
(WebCore::AccessibilityLabel::computeAccessibilityIsIgnored):
(WebCore::AccessibilityLabel::stringValue):
(WebCore::childrenContainOnlyStaticText):
(WebCore::AccessibilityLabel::containsOnlyStaticText):
(WebCore::AccessibilityLabel::updateChildrenIfNecessary):
(WebCore::AccessibilityLabel::clearChildren):
(WebCore::AccessibilityLabel::insertChild):
* accessibility/AccessibilityLabel.h: Added.
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isLabel):
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper role]):

LayoutTests:

* accessibility/aria-labelledby-overrides-label-expected.txt:
* accessibility/mac/label-element-all-text-string-value-expected.txt: Added.
* accessibility/mac/label-element-all-text-string-value.html: Added.
* accessibility/mac/label-element-with-hidden-control-expected.txt:
* accessibility/mac/label-element-with-hidden-control.html:
* accessibility/mac/label-element-with-link-string-value-expected.txt: Added.
* accessibility/mac/label-element-with-link-string-value.html: Added.
* accessibility/mac/slider-allows-title-ui-element-expected.txt:
* accessibility/mac/slider-allows-title-ui-element.html:

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

3 years agoToo much log data generated during layout-tests on iOS Simulator
aakash_jain@apple.com [Tue, 14 Jun 2016 21:27:19 +0000 (21:27 +0000)]
Too much log data generated during layout-tests on iOS Simulator
https://bugs.webkit.org/show_bug.cgi?id=158751

Reviewed by Alexey Proskuryakov.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort._quit_ios_simulator): Do not use -v flag.
(IOSSimulatorPort.clean_up_test_run): Ditto.
(IOSSimulatorPort._createSimulatorApp): Ditto.

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

3 years agoIncrease timeouts for userscripts/window-onerror-for-isolated-world-3.html to fix...
ryanhaddad@apple.com [Tue, 14 Jun 2016 20:35:24 +0000 (20:35 +0000)]
Increase timeouts for userscripts/window-onerror-for-isolated-world-3.html to fix flakiness.
https://bugs.webkit.org/show_bug.cgi?id=158750

Reviewed by Joseph Pecoraro.

* userscripts/window-onerror-for-isolated-world-3.html:

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

3 years agoFollow-up fix: REGRESSION (r202020): El Capitan CMake Debug build broken
ddkilzer@apple.com [Tue, 14 Jun 2016 20:17:10 +0000 (20:17 +0000)]
Follow-up fix: REGRESSION (r202020): El Capitan CMake Debug build broken
<https://webkit.org/b/158743>

Unreviewed build fix.

The fix in r202056 clobbered DumpRenderTree_SOURCES and
TestNetscapePlugin_SOURCES from DumpRenderTree/CMakeLists.txt,
so the build failure is now that we're not building the common
sources.

Fix that by saving the common sources (which are all C++ source
files) into *_Cpp_SOURCES lists first, then setting the compiler
flags, then creating the final *_SOURCES lists.

* DumpRenderTree/PlatformMac.cmake: Add
${TestNetscapePlugin_Cpp_SOURCES} to list that needs
"-std=c++14" compiler switch.
(TestNetscapePlugin_Cpp_SOURCES): Add new list for C++ source
files for TestNetscapePlugin.  Seeded with
${TestNetscapePlugin_SOURCES} from CMakeLists.txt.
(TestNetscapePlugin_SOURCES): Add
${TestNetscapePlugin_Cpp_SOURCES} to the list of files.
(DumpRenderTree_Cpp_SOURCES): Seed list for C++ source files
with ${DumpRenderTree_SOURCES} from CMakeLists.txt.
(DumpRenderTree_SOURCES): Reformat and sort source lists.

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

3 years agoUnreviewed, rolling out r202057.
ryanhaddad@apple.com [Tue, 14 Jun 2016 20:15:47 +0000 (20:15 +0000)]
Unreviewed, rolling out r202057.
https://bugs.webkit.org/show_bug.cgi?id=158749

This change broke the Windows build. (Requested by ryanhaddad
on #webkit).

Reverted changeset:

"Honor bidi unicode codepoints"
https://bugs.webkit.org/show_bug.cgi?id=149170
http://trac.webkit.org/changeset/202057

Patch by Commit Queue <commit-queue@webkit.org> on 2016-06-14

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

3 years agoREGRESSION(202002-202014): 845 32-bit JSC Stress Test failures
keith_miller@apple.com [Tue, 14 Jun 2016 19:01:58 +0000 (19:01 +0000)]
REGRESSION(202002-202014): 845 32-bit JSC Stress Test failures
https://bugs.webkit.org/show_bug.cgi?id=158737

Reviewed by Filip Pizlo.

When the this child and arguments child for the varargs nodes was switched I missed one
case in the 32-bit build.

* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::emitCall):

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

3 years agoHonor bidi unicode codepoints
mmaxfield@apple.com [Tue, 14 Jun 2016 18:59:48 +0000 (18:59 +0000)]
Honor bidi unicode codepoints
https://bugs.webkit.org/show_bug.cgi?id=149170
<rdar://problem/26527378>

Reviewed by Simon Fraser.

Source/WebCore:

BidiResolver doesn't have any concept of isolate Unicode code points, so produces
unexpected output when they are present. Fix by considering such code points as
whitespace in the bidi algorithm. This is a stop-gap measure until we can support
the codepoints fully in our Bidi algorithm.

Test: fast/text/isolate-ignore.html

* platform/graphics/Font.cpp:
(WebCore::createAndFillGlyphPage):
* platform/text/BidiResolver.h:
(WebCore::Subclass>::createBidiRunsForLine):

Source/WTF:

* wtf/unicode/CharacterNames.h:

LayoutTests:

* fast/text/isolate-ignore-expected.html: Added.
* fast/text/isolate-ignore.html: Added.

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

3 years agoREGRESSION (r202020): El Capitan CMake Debug build broken
ddkilzer@apple.com [Tue, 14 Jun 2016 18:51:44 +0000 (18:51 +0000)]
REGRESSION (r202020): El Capitan CMake Debug build broken
<https://webkit.org/b/158743>

Reviewed by Alex Christensen.

The bug was that pure C++ source files (and Objective-C source
files) were being compiled as Objective-C++ source files.  This
is obviously incorrect, so the fix was to split out the list of
source files by language, then define compiler switches based on
each file type.

* DumpRenderTree/PlatformMac.cmake: Replace add_definitions()
with separate foreach loops that set compiler flags based on
each source file's type.
(TestNetscapePlugin_ObjCpp_SOURCES): Rename from
TestNetscapePlugin_SOURCES.
(TestNetscapePlugin_SOURCES): Create based on
${TestNetscapePlugin_ObjCpp_SOURCES}.
(DumpRenderTree_ObjC_SOURCES): Split from DumpRenderTree_SOURCES.
(DumpRenderTree_Cpp_SOURCES): Ditto.
(DumpRenderTree_ObjCpp_SOURCES): Ditto.
(DumpRenderTree_SOURCES): Create from above three lists.

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

3 years agoFollow up to: Web Inspector: Call Trees view should have a 'Top Functions'-like mode
sbarati@apple.com [Tue, 14 Jun 2016 18:42:17 +0000 (18:42 +0000)]
Follow up to: Web Inspector: Call Trees view should have a 'Top Functions'-like mode
https://bugs.webkit.org/show_bug.cgi?id=158555
<rdar://problem/26712544>

Unreviewed follow up patch.

- Move a long if-else sequence to a switch statement.
- Fix a copy-paste typo in a Symbol(.) enum.

* UserInterface/Models/CallingContextTree.js:
(WebInspector.CallingContextTree.prototype.updateTreeWithStackTrace):

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

3 years agoReduce copying of NetworkLoadParameters
cdumez@apple.com [Tue, 14 Jun 2016 18:37:17 +0000 (18:37 +0000)]
Reduce copying of NetworkLoadParameters
https://bugs.webkit.org/show_bug.cgi?id=158744

Reviewed by Alex Christensen.

Reduce copying of NetworkLoadParameters by moving it around instead.

* NetworkProcess/Downloads/DownloadManager.cpp:
(WebKit::DownloadManager::startDownload):
* NetworkProcess/Downloads/PendingDownload.cpp:
(WebKit::PendingDownload::PendingDownload):
* NetworkProcess/Downloads/PendingDownload.h:
* NetworkProcess/NetworkLoad.cpp:
(WebKit::NetworkLoad::NetworkLoad):
* NetworkProcess/NetworkLoad.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::startNetworkLoad):
* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):

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

3 years agoRemoving duplicated TestExpectation and sorting others alphabetically
ryanhaddad@apple.com [Tue, 14 Jun 2016 18:09:09 +0000 (18:09 +0000)]
Removing duplicated TestExpectation and sorting others alphabetically

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMarking inspector/debugger/break-in-constructor-before-super.html as flaky on mac...
ryanhaddad@apple.com [Tue, 14 Jun 2016 18:03:47 +0000 (18:03 +0000)]
Marking inspector/debugger/break-in-constructor-before-super.html as flaky on mac debug.
https://bugs.webkit.org/show_bug.cgi?id=158742

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoMoving flaky expectation for inspector/heap/garbageCollected.html from mac-wk1 to mac
ryanhaddad@apple.com [Tue, 14 Jun 2016 17:55:17 +0000 (17:55 +0000)]
Moving flaky expectation for inspector/heap/garbageCollected.html from mac-wk1 to mac
https://bugs.webkit.org/show_bug.cgi?id=153039

Unreviewed test gardening.

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

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

3 years agoUnreviewed, rolling out r200455.
commit-queue@webkit.org [Tue, 14 Jun 2016 16:54:23 +0000 (16:54 +0000)]
Unreviewed, rolling out r200455.
https://bugs.webkit.org/show_bug.cgi?id=158740

hangs twitter/facebook (Requested by mcatanzaro on #webkit).

Reverted changeset:

"[GStreamer] Adaptive streaming issues"
https://bugs.webkit.org/show_bug.cgi?id=144040
http://trac.webkit.org/changeset/200455

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

3 years agoWebRTC: RTCPeerConnection::addTrack() should throw InvalidAccessError instead of...
nael.ouedraogo@crf.canon.fr [Tue, 14 Jun 2016 16:46:26 +0000 (16:46 +0000)]
WebRTC: RTCPeerConnection::addTrack() should throw InvalidAccessError instead of InvalidModificationError.
https://bugs.webkit.org/show_bug.cgi?id=158735

Reviewed by Eric Carlson.

Source/WebCore:

Throw InvalidAccessError instead of InvalidModificationError when track already exists in connection's
set of senders as per specification (https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtrack).

Updated existing test results: fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt

* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::addTrack):

LayoutTests:

Check that an InvalidAccessError exception is thrown when the track already exists in set of senders.

* fast/mediastream/RTCPeerConnection-add-removeTrack-expected.txt:

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

3 years agoWebRTC: Imlement MediaEndpointPeerConnection::addIceCandidate()
adam.bergkvist@ericsson.com [Tue, 14 Jun 2016 16:41:18 +0000 (16:41 +0000)]
WebRTC: Imlement MediaEndpointPeerConnection::addIceCandidate()
https://bugs.webkit.org/show_bug.cgi?id=158690

Reviewed by Eric Carlson.

Source/WebCore:

Implement MediaEndpointPeerConnection::addIceCandidate() that is the MediaEndpoint
implementation of RTCPeerConnection.addIceCandidate() [1].

[1] https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#dom-peerconnection-addicecandidate

Test: fast/mediastream/RTCPeerConnection-addIceCandidate.html

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
(WebCore::MediaEndpointPeerConnection::addIceCandidate):
(WebCore::MediaEndpointPeerConnection::addIceCandidateTask):
Implemented.
* Modules/mediastream/MediaEndpointPeerConnection.h:
* platform/mediastream/MediaEndpoint.h:
Use mid instead of mdescIndex to identify the target media description in the backend.
* platform/mock/MockMediaEndpoint.cpp:
Update mock method signature accordingly.
(WebCore::MockMediaEndpoint::addRemoteCandidate):
* platform/mock/MockMediaEndpoint.h:

LayoutTests:

Add test for RTCPeerConnection.addIceCandidate() that verifies:
- Candidate line parsing
- That a underlying media description can be identified using either sdpMid or sdpMLineIndex
- That sdpMid takes precedence over sdpMLineIndex

* fast/mediastream/RTCPeerConnection-addIceCandidate-expected.txt: Added.
* fast/mediastream/RTCPeerConnection-addIceCandidate.html: Added.
* platform/mac/TestExpectations:
The mac port is not building with WEB_RTC yet.

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

3 years ago<rdar://problem/26685782>
lforschler@apple.com [Tue, 14 Jun 2016 16:40:47 +0000 (16:40 +0000)]
<rdar://problem/26685782>
Teach the copy-webkitlibraries-to-product-directory script about WebKitSystemInterfaceOSX10.12

Rubber-stamped by Jessie Berlin.

* Scripts/copy-webkitlibraries-to-product-directory:

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