WebKit-https.git
4 years ago[ES6] Allow undefined/null for Symbol.search and Symbol.match
utatane.tea@gmail.com [Wed, 23 Mar 2016 09:11:56 +0000 (09:11 +0000)]
[ES6] Allow undefined/null for Symbol.search and Symbol.match
https://bugs.webkit.org/show_bug.cgi?id=155785

Reviewed by Saam Barati.

Undefined and null for Symbol.search and Symbol.match properties of the given RegExp (like) object are allowed.
When they are specified, we go to the fallback path; creating the RegExp with the given object and matching.

* builtins/StringPrototype.js:
(match):
(search):
* tests/stress/string-symbol-customization.js: Added.
(shouldBe):
(shouldThrow):

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

4 years agoUse Region instead of IntRect in PageClient and WebPageProxy setViewNeedsDisplay...
carlosgc@webkit.org [Wed, 23 Mar 2016 08:51:59 +0000 (08:51 +0000)]
Use Region instead of IntRect in PageClient and WebPageProxy setViewNeedsDisplay method
https://bugs.webkit.org/show_bug.cgi?id=155747

Reviewed by Darin Adler.

Source/WebCore:

Add helper function to make cairo region out of a WebCore::Region.

* platform/graphics/cairo/CairoUtilities.cpp:
(WebCore::toCairoRegion):
* platform/graphics/cairo/CairoUtilities.h:

Source/WebKit2:

This way instead of calling setViewNeedsDisplay() for every
rectangle in the damage area, we can build a region and call
setViewNeedsDisplay() once. GTK+ has API to queue a redraw for a
given region, so we also avoid scheduling multiple redraws in GTK+
port.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setViewNeedsDisplay): Convert the Region
into a cairo_region_t and use gtk_widget_queue_draw_region()
instyead of gtk_widget_queue_draw_area().
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate): Build a Region
with the damage rectangles and call
WebPageProxy::setViewNeedsDisplay() once.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setViewNeedsDisplay):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::setViewNeedsDisplay):
* UIProcess/efl/WebView.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setViewNeedsDisplay):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setViewNeedsDisplay):

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

4 years agoSmallPtrSet leaks memory in its move assignment operator when !this->isSmall()
sbarati@apple.com [Wed, 23 Mar 2016 08:21:03 +0000 (08:21 +0000)]
SmallPtrSet leaks memory in its move assignment operator when !this->isSmall()
https://bugs.webkit.org/show_bug.cgi?id=155701

Reviewed by Darin Adler.

* wtf/SmallPtrSet.h:
(WTF::SmallPtrSet::SmallPtrSet):
(WTF::SmallPtrSet::operator=):

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

4 years agoInvoking a link preview on a complex link (e.g. an image) results in an empty TextInd...
timothy_horton@apple.com [Wed, 23 Mar 2016 05:46:00 +0000 (05:46 +0000)]
Invoking a link preview on a complex link (e.g. an image) results in an empty TextIndicator
https://bugs.webkit.org/show_bug.cgi?id=155779
<rdar://problem/22408793>

Reviewed by Simon Fraser.

* page/FrameSnapshotting.cpp:
(WebCore::snapshotFrameRect):
(WebCore::snapshotFrameRectWithClip):
* page/FrameSnapshotting.h:
* page/TextIndicator.cpp:
(WebCore::takeSnapshot):
(WebCore::takeSnapshots):
(WebCore::initializeIndicator):
When snapshotting, clip to the indicated range's rects. This is important
to avoid painting into the margins in the non-selection-only painting case.
This didn't come up with normal selection-only painting because the text
didn't intersect the margin, and the background doesn't paint.

* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::dictionaryPopupInfoForRange):
(WebKit::WebPage::performImmediateActionHitTestAtLocation):
Use the TextIndicator mode where we give up on selection-only snapshotting
and just paint all content on Mac, similar to what we do for 3D Touch indicators.

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

4 years agoTiny tweak to test I just landed.
darin@apple.com [Wed, 23 Mar 2016 04:29:19 +0000 (04:29 +0000)]
Tiny tweak to test I just landed.

* http/tests/security/cross-origin-modal-dialog-base-expected.txt:
Fix expected result now that I fixed the less than sign.
* http/tests/security/cross-origin-modal-dialog-base.html:

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

4 years agostraighten quotes in ChangeLog
darin@apple.com [Wed, 23 Mar 2016 04:19:21 +0000 (04:19 +0000)]
straighten quotes in ChangeLog

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

4 years agoshowModalDialog code runs with “first window” set to wrong window
darin@apple.com [Wed, 23 Mar 2016 04:16:44 +0000 (04:16 +0000)]
showModalDialog code runs with “first window” set to wrong window
https://bugs.webkit.org/show_bug.cgi?id=155710

Source/WebCore:

Reviewed by Brent Fulgham.

Test: http/tests/security/cross-origin-modal-dialog-base.html

* page/Chrome.cpp:
(WebCore::Chrome::runModal): Null out entryScope so that the "first window"
checks inside the modal dialog won't run in the context of the original window
that presented the dialog.

LayoutTests:

Test by John Wilander.

Reviewed by Brent Fulgham.

* http/tests/security/cross-origin-modal-dialog-base-expected.txt: Added.
* http/tests/security/cross-origin-modal-dialog-base.html: Added.
* http/tests/security/resources/cross-origin-modal-dialog-base-1.html: Added.
* http/tests/security/resources/cross-origin-modal-dialog-base-2.html: Added.
* platform/wk2/TestExpectations: Skip test until we get better showModalDialog support.

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

4 years agouserSpaceOnUse patterns are not stroked for empty object bounding box elements
commit-queue@webkit.org [Wed, 23 Mar 2016 03:28:09 +0000 (03:28 +0000)]
userSpaceOnUse patterns are not stroked for empty object bounding box elements
https://bugs.webkit.org/show_bug.cgi?id=109758

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-03-22
Reviewed by Brent Fulgham.
Source/WebCore:

Checking whether the patternUnits is objectBoundingBox needs to be done
after calling collectPatternAttributes(). Otherwise the default value
will be always checked which is 'objectBoundingBox'.

Tests: svg/custom/pattern-units-fill-stroke.svg

* rendering/svg/RenderSVGResourcePattern.cpp:
(WebCore::RenderSVGResourcePattern::buildPattern):
(WebCore::RenderSVGResourcePattern::applyResource):

LayoutTests:

Ensure the SVG pattern is drawn correctly if it is used as a stroke for
empty objectBoundingBox elements.

* svg/custom/pattern-units-fill-stroke-expected.svg: Added.
* svg/custom/pattern-units-fill-stroke.svg: Added.

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

4 years agoFix a typo.
rniwa@webkit.org [Wed, 23 Mar 2016 02:30:57 +0000 (02:30 +0000)]
Fix a typo.

* config.json:

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

4 years ago[JSC] correctly handle indexed properties in Object.getOwnPropertyDescriptors
commit-queue@webkit.org [Wed, 23 Mar 2016 02:12:17 +0000 (02:12 +0000)]
[JSC] correctly handle indexed properties in Object.getOwnPropertyDescriptors
https://bugs.webkit.org/show_bug.cgi?id=155563

Patch by Caitlin Potter <caitp@igalia.com> on 2016-03-22
Reviewed by Saam Barati.

* runtime/JSObject.h:
(JSC::JSObject::putOwnDataPropertyMayBeIndex):
* runtime/ObjectConstructor.cpp:
(JSC::objectConstructorGetOwnPropertyDescriptors):

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

4 years agobmalloc: use a log scale for large-ish size classes
ggaren@apple.com [Wed, 23 Mar 2016 01:39:36 +0000 (01:39 +0000)]
bmalloc: use a log scale for large-ish size classes
https://bugs.webkit.org/show_bug.cgi?id=155770

Reviewed by Michael Saboff.

At larger sizes, precise allocation sizes don't save much memory -- and
they can cost memory when objects of distinct size classes can't
allocate together.

This is a small savings up to our current allocation limits, and it may
enable changing those limits in the long term.

* bmalloc/Algorithm.h:
(bmalloc::log2): We use this to compute large-ish size classes.

* bmalloc/Allocator.cpp:
(bmalloc::Allocator::Allocator): Iterate by size class instead of by
object size so we can change object size limits without breaking stuff.

(bmalloc::Allocator::scavenge): Ditto.

(bmalloc::Allocator::allocateLogSizeClass): New helper function for
allocating based on log size classes.

(bmalloc::Allocator::allocateSlowCase): Account for extra size class
possibilities.

* bmalloc/Allocator.h:
(bmalloc::Allocator::allocateFastCase): We only handle up to 512b on
the fastest fast path now.

* bmalloc/BumpAllocator.h:
(bmalloc::BumpAllocator::validate): Deleted. I noticed that this function
had been refactored not to do anything anymore.

* bmalloc/Heap.cpp:
(bmalloc::Heap::initializeLineMetadata): Iterate by size class. (See
Allocator::Allocator.)

* bmalloc/Heap.h: Use the sizeClassCount constant instead of hard coding
things.

* bmalloc/Sizes.h:
(bmalloc::Sizes::maskSizeClass):
(bmalloc::Sizes::maskObjectSize):
(bmalloc::Sizes::logSizeClass):
(bmalloc::Sizes::logObjectSize):
(bmalloc::Sizes::sizeClass):
(bmalloc::Sizes::objectSize): Separate size class calculation between
simple size classes that can be computed with a mask and are 8-byte-precise
and complex size classes that require more math and are less precise.

* bmalloc/SmallLine.h:
(bmalloc::SmallLine::ref):
* bmalloc/SmallPage.h:
(bmalloc::SmallPage::SmallPage):
(bmalloc::SmallPage::ref):
(bmalloc::SmallPage::deref): Cleaned up some ASSERTs that triggered
while working on this patch.

* bmalloc/Zone.cpp:
(bmalloc::statistics):
(bmalloc::zoneSize):
(bmalloc::Zone::Zone):
(bmalloc::size): Deleted. Renamed these symbols to work around an lldb
bug that makes it impossible to print out variables named 'size' -- which
can be a problem when working on malloc.

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

4 years agoWe should FTL compile code when the debugger is enabled
sbarati@apple.com [Wed, 23 Mar 2016 01:38:49 +0000 (01:38 +0000)]
We should FTL compile code when the debugger is enabled
https://bugs.webkit.org/show_bug.cgi?id=155740

Reviewed by Oliver Hunt.

There was no fundamental reason why we didn't support debugging
with the FTL. It looks like this was just an oversight. We had
a Breakpoint node in the DFG that amounted to a nop. By removing
this node, we now support debugging in the FTL. Anytime a breakpoint
is set, we will jettison any DFG/FTL CodeBlocks that contain the breakpoint
that was set.

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::parseBlock):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
* dfg/DFGNodeType.h:
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):

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

4 years agoUse references instead of pointers for absolute positioning code
mmaxfield@apple.com [Wed, 23 Mar 2016 00:58:34 +0000 (00:58 +0000)]
Use references instead of pointers for absolute positioning code
https://bugs.webkit.org/show_bug.cgi?id=155775

Reviewed by Simon Fraser.

There are many pointers which will never be null in this code. This patch
migrates them to use references.

No new tests because there is no behavior change.

* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::layoutBlockChild):
(WebCore::RenderBlockFlow::marginBeforeEstimateForChild):
(WebCore::RenderBlockFlow::insertFloatingObject):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalWidthInRegionByMinMax):
(WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::computeLogicalWidthInRegionUsing):
(WebCore::RenderBox::computeInlineDirectionMargins):
(WebCore::RenderBox::renderBoxRegionInfo):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalWidthUsing):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computeBlockDirectionMargins):
(WebCore::RenderBox::computeAndSetBlockDirectionMargins):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::computeInlineStaticDistance):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::computeLogicalLeftPositionedOffset):
(WebCore::RenderBox::computePositionedLogicalWidthUsing):
(WebCore::computeBlockStaticDistance):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::computeLogicalTopPositionedOffset):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalWidthReplaced):
(WebCore::RenderBox::computePositionedLogicalHeightReplaced):
(WebCore::percentageLogicalHeightIsResolvable):
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
(WebCore::RenderBox::hasDefiniteLogicalHeight):
(WebCore::RenderBox::hasUnsplittableScrollingOverflow):
* rendering/RenderBox.h:
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
(WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::minSizeForChild):
(WebCore::RenderGrid::computeMarginLogicalHeightForChild):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
* rendering/RenderTableRow.cpp:
(WebCore::RenderTableRow::layout):

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

4 years agoAdd Download Attribute to the Feature Status page
jond@apple.com [Wed, 23 Mar 2016 00:49:30 +0000 (00:49 +0000)]
Add Download Attribute to the Feature Status page
https://bugs.webkit.org/show_bug.cgi?id=155772

Reviewed by Timothy Hatcher.

* features.json:

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

4 years agoCachedResource::MediaResource types shouldn't be blocked due to mixed-content.
jer.noble@apple.com [Wed, 23 Mar 2016 00:47:41 +0000 (00:47 +0000)]
CachedResource::MediaResource types shouldn't be blocked due to mixed-content.
https://bugs.webkit.org/show_bug.cgi?id=155588
<rdar://problem/25177795>

Reviewed by Brent Fulgham.

Follow-up to address crashes caused by r198549. Rather than destroy MediaResourceLoader on a background thread,
migrate the Ref to the main thread before releasing.

* platform/graphics/PlatformMediaResourceLoader.h:
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession dealloc]):

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

4 years agoREGRESSION(r197543): Use-after-free on storage/indexeddb/transaction-abort-private...
keith_miller@apple.com [Wed, 23 Mar 2016 00:19:47 +0000 (00:19 +0000)]
REGRESSION(r197543): Use-after-free on storage/indexeddb/transaction-abort-private.html
https://bugs.webkit.org/show_bug.cgi?id=155067

Reviewed by Filip Pizlo.

GCIncommingRefCountedSets need to be finalized before we start
destructing members of the Heap object. Previously, we would
clear all our ArrayBuffer objects when the GCIncommingRefCountedSet
holding them was destroyed. However, ArrayBuffers have a weak
reference to their wrappers. When we would attempt to destroy the
ArrayBuffer object we would end up accessing the WeakImpl for
the weak reference, which had already been freed as we destroyed
our weak block. The solution to this is to move the old
GCIncommingRefCountedSet destructor functionality to a new
function lastChanceToFinalize. This function is called when
we finalize our other objects on Heap destruction.

* heap/GCIncomingRefCountedSet.h:
* heap/GCIncomingRefCountedSetInlines.h:
(JSC::GCIncomingRefCountedSet<T>::lastChanceToFinalize):
(JSC::GCIncomingRefCountedSet<T>::~GCIncomingRefCountedSet): Deleted.
* heap/Heap.cpp:
(JSC::Heap::lastChanceToFinalize):

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

4 years agoPost-review test update after r198560
mmaxfield@apple.com [Wed, 23 Mar 2016 00:12:23 +0000 (00:12 +0000)]
Post-review test update after r198560
https://bugs.webkit.org/show_bug.cgi?id=155533

Unreviewed.

* fast/scrolling/rtl-scrollbars-positioning-expected.html:
* fast/scrolling/rtl-scrollbars-positioning.html:

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

4 years agoWeb Inspector: REGRESSION: Switching Timelines via Path Component does not work
commit-queue@webkit.org [Tue, 22 Mar 2016 23:47:12 +0000 (23:47 +0000)]
Web Inspector: REGRESSION: Switching Timelines via Path Component does not work
https://bugs.webkit.org/show_bug.cgi?id=155767
<rdar://problem/25298945>

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

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

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

4 years agoFix HTTPS on Mac using NSURLSession after r198457
achristensen@apple.com [Tue, 22 Mar 2016 23:33:30 +0000 (23:33 +0000)]
Fix HTTPS on Mac using NSURLSession after r198457
https://bugs.webkit.org/show_bug.cgi?id=155774
<rdar://problem/25301027>

Reviewed by Anders Carlsson.

* NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(WebKit::NetworkSession::NetworkSession):
r198457 was intended to fix an issue on iOS and have no change in behavior on Mac.
It did have a subtle change in behavior, setting the source application bundle identifier
on iOS and was causing problems with HTTPS connections using NSURLSession, so this patch
reverts that change.

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

4 years agoRestrict WebSockets header parsing according to RFC6455 and RFC7230. Based on Lamarqu...
commit-queue@webkit.org [Tue, 22 Mar 2016 22:27:25 +0000 (22:27 +0000)]
Restrict WebSockets header parsing according to RFC6455 and RFC7230. Based on Lamarque V. Souza's original patch.
https://bugs.webkit.org/show_bug.cgi?id=82714

Patch by John Wilander <wilander@apple.com> on 2016-03-22
Reviewed by Brent Fulgham.

Source/WebCore:

Tests: http/tests/websocket/tests/hybi/error-event-ready-state-non-existent-url-with-server-responding-404.html
       http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version.html
       http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept.html
       http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions.html
       http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol.html
       http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line.html
       http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status.html
       http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1.html

* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
(WebCore::headerHasValidHTTPVersion):
    - Check for HTTP version 1.1 and above.
(WebCore::WebSocketHandshake::readStatusLine):
    - Only allow ASCII characters in status line.
    - Only allow HTTP version 1.1 and above in status line.
(WebCore::WebSocketHandshake::readHTTPHeaders):
    - Only allow ASCII characters in values for new HTTP headers.

LayoutTests:

* http/tests/websocket/tests/hybi/error-event-ready-state-expected.txt: Removed.
    - See comment below on the associated HTML file.
* http/tests/websocket/tests/hybi/error-event-ready-state-non-existent-url-with-server-responding-404-expected.txt: Added.
* http/tests/websocket/tests/hybi/error-event-ready-state-non-existent-url-with-server-responding-404.html: Added.
    - Uses PHP to respond with an HTTP 1.1 404. The old (now removed) test case failed once we restricted WebSockets to HTTP 1.1 and above because the test server responded with an HTTP 1.0 404 for non-existing files.
* http/tests/websocket/tests/hybi/error-event-ready-state.html: Removed.
    - This test case was renamed "error-event-ready-state-non-existent-url-with-server-responding-404" to make it clear it now relies on a server responding with HTTP 1.1 404.
* http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-invalid-http-version_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - Test case for lower than HTTP 1.1 versions.
* http/tests/websocket/tests/hybi/handshake-fail-by-more-accept-header-expected.txt:
* http/tests/websocket/tests/hybi/handshake-fail-by-more-extensions-header-expected.txt:
* http/tests/websocket/tests/hybi/handshake-fail-by-more-protocol-header-expected.txt:
    - Updated to pass with lowercase 'must not' in the failure reason.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-accept_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - Test case for non-ASCII characters in new HTTP header Sec-WebSocket-Accept.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-extensions_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - Test case for non-ASCII characters in new HTTP header Sec-WebSocket-Extensions.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-header-value-sec-websocket-protocol_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - Test case for non-ASCII characters in new HTTP header Sec-WebSocket-Protocol.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-non-ascii-status-line_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - Test case for non-ASCII characters in HTTP status line.
* http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status.html: Added.
* http/tests/websocket/tests/hybi/handshake-fail-by-null-char-in-status_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - Test case for null character in the middle of the HTTP status line.
* http/tests/websocket/tests/hybi/handshake-fail-by-prepended-null_wsh.py:
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - This test case was changed to prepend a null character to the actual status line. Previously it used a WebSockets frame with a prepended null before the status line. The Python WebSockets lib uses non-ASCII characters in that frame which meant the test case hit the non-ASCII check before the null check. It was confusing to me that the description and intent of the test was to run with a null in the status line, not in a frame before the status line. I believe the changed test case better reflects the intention of the test.
* http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1-expected.txt: Added.
* http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1.html: Added.
* http/tests/websocket/tests/hybi/handshake-ok-with-http-version-beyond-1_1_wsh.py: Added.
(web_socket_do_extra_handshake):
(web_socket_transfer_data):
    - Test case for HTTP versions higher than 1.1.
* http/tests/websocket/tests/hybi/resources/status-404-without-body.php: Added.
    - To use with the error-event-ready-state-non-existent-url-with-server-responding-404.html test described above.

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

4 years ago[RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar
mmaxfield@apple.com [Tue, 22 Mar 2016 22:15:45 +0000 (22:15 +0000)]
[RTL Scrollbars] Position: absolute divs are covered by vertical scrollbar
https://bugs.webkit.org/show_bug.cgi?id=155533

Reviewed by Darin Adler.

Source/WebCore:

This patch changes the behavior of position: absolute elements when their
containing block has overflow: scroll in RTL scrollbar mode. Previously, we
were only adjusting the overflow calculation for such elements (but not
their position calculation). This patch updates the position calculation,
which automatically makes the overflow calculation work propertly, so the
old calculation is no longer necessary.

This patch also updates iframes to appropriately move their dirty rects
and their painting CTM by the scrollbar width when traversing frame
boundaries. This fixes all our existing RTL scrollbar RTL tests.

The RTL scrollbar tests are only marked as passing on certain OSes, so these
tests are transitioning from failing to passing in that other repository.

Test: fast/scrolling/rtl-scrollbars-positioning.html
      fast/scrolling/rtl-scrollbars-overflow-elementFromPoint.html
      fast/scrolling/rtl-scrollbars-overflow-position-absolute.html
      fast/scrolling/rtl-scrollbars-iframe-offset.html
      fast/scrolling/rtl-scrollbars-iframe-position-absolute.html
      fast/scrolling/rtl-scrollbars-iframe-scrolled.html
      fast/scrolling/rtl-scrollbars-iframe.html

* platform/ScrollView.cpp:
(WebCore::ScrollView::paint):
(WebCore::ScrollView::locationOfContents):
* platform/ScrollView.h:
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::repaintLayerDirtyRects):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::addOverflowFromPositionedObjects):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::computePositionedLogicalWidth):
* rendering/RenderView.cpp:
(WebCore::RenderView::repaintViewRectangle):

LayoutTests:

* TestExpectations:
* fast/scrolling/rtl-scrollbars-positioning-expected.html: Added.
* fast/scrolling/rtl-scrollbars-positioning.html: Added.

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

4 years ago[Win] [64-bit] Remove MSVC 2013 FMA3 Bug Workaround
peavo@outlook.com [Tue, 22 Mar 2016 22:14:38 +0000 (22:14 +0000)]
[Win] [64-bit] Remove MSVC 2013 FMA3 Bug Workaround
https://bugs.webkit.org/show_bug.cgi?id=141499

Reviewed by Brent Fulgham.

As we have moved on to VS2015, this workaround is no longer needed.

Source/JavaScriptCore:

* API/tests/testapi.c:
(main):
* JavaScriptCore.vcxproj/jsc/DLLLauncherMain.cpp:
(wWinMain):
* jsc.cpp:
(main):
* testRegExp.cpp:
(main):

Source/WebKit/win:

* WebKitDLL.cpp:
(DllMain):

Source/WTF:

* wtf/PlatformWin.cmake:
* wtf/win/WTFDLL.cpp: Removed.

Tools:

* DumpRenderTree/cg/ImageDiffCG.cpp:
(main):
* DumpRenderTree/win/DumpRenderTree.cpp:
(main):
* DumpRenderTree/win/ImageDiffCairo.cpp:
(main):
* MiniBrowser/win/Common.cpp:
(DllMain):
* TestWebKitAPI/win/main.cpp:
(main):
* win/DLLLauncher/DLLLauncherMain.cpp:
(wWinMain):

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

4 years agoMarking inspector/console/console-api.html as flaky on Mac
ryanhaddad@apple.com [Tue, 22 Mar 2016 22:13:29 +0000 (22:13 +0000)]
Marking inspector/console/console-api.html as flaky on Mac
https://bugs.webkit.org/show_bug.cgi?id=143719

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoAllow the use of custom styles and scripts for blog posts
jond@apple.com [Tue, 22 Mar 2016 22:05:27 +0000 (22:05 +0000)]
Allow the use of custom styles and scripts for blog posts
https://bugs.webkit.org/show_bug.cgi?id=155768

Reviewed by Timothy Hatcher.

* wp-content/themes/webkit/functions.php:

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

4 years agoFixing a typo in the Mac TestExpectations file.
ryanhaddad@apple.com [Tue, 22 Mar 2016 21:49:45 +0000 (21:49 +0000)]
Fixing a typo in the Mac TestExpectations file.

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years agoWeb Inspector: Consider Automation script names as internal and hide them
timothy@apple.com [Tue, 22 Mar 2016 21:44:19 +0000 (21:44 +0000)]
Web Inspector: Consider Automation script names as internal and hide them

https://bugs.webkit.org/show_bug.cgi?id=155753
rdar://problem/25293310

Reviewed by Joseph Pecoraro.

* UserInterface/Base/Utilities.js:
(isWebKitInternalScript): Renamed from isWebInspectorDebugScript.
Check for "__Web" prefix and "__" suffix.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager):
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.debuggerDidPause):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
(WebInspector.DebuggerManager.prototype._debugUIEnabledDidChange):
Renamed _inspectorDebugScripts to _internalWebKitScripts. And renamed
isWebInspectorDebugScript to isWebKitInternalScript.

* UserInterface/Protocol/RemoteObject.js:
(WebInspector.RemoteObject.prototype.findFunctionSourceCodeLocation):
Renamed isWebInspectorDebugScript to isWebKitInternalScript.

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

4 years ago[ES6] Implement RegExp.prototype[@@match]
msaboff@apple.com [Tue, 22 Mar 2016 21:42:06 +0000 (21:42 +0000)]
[ES6] Implement RegExp.prototype[@@match]
https://bugs.webkit.org/show_bug.cgi?id=155711

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Implemented ES6 spec for String.prototype.match and RegExp.prototype[@@match].
Implemented both as builtins, with String.prototype.match calling
RegExp.prototype[@@match].

For performance reasons, RegExp.prototype[@@match] has a C++ fast path when
RegExp.prototype.exec has not been overridden.  This fast path,
RegExpObject::matchGlobal, was taken from the prior StringPrototype::match.
It only handles global matches.

Added new test, stress/regexp-match.js.

Updated various tests for changes exception string and now passing ES6 behavior.

* CMakeLists.txt:
* DerivedSources.make:
* JavaScriptCore.xcodeproj/project.pbxproj:
Added builtins/RegExpPrototype.js and eliminated RegExpPrototype.lut.h.

* builtins/RegExpPrototype.js: Added.
(match.advanceStringIndexUnicode): Helper.
(match): Implements RegExp.prototype[@@match].
* builtins/StringPrototype.js:
(match): Implements String.prototype.match.

* bytecode/BytecodeIntrinsicRegistry.cpp:
(JSC::BytecodeIntrinsicRegistry::BytecodeIntrinsicRegistry):
(JSC::BytecodeIntrinsicRegistry::lookup):
* bytecode/BytecodeIntrinsicRegistry.h:
* runtime/CommonIdentifiers.h:
Added Symbol.match and builtins @match and @exec.

* runtime/RegExpObject.cpp:
* runtime/RegExpObject.h:
* runtime/RegExpObjectInlines.h:
(JSC::RegExpObject::matchGlobal): Added.
(JSC::RegExpObject::advanceStringUnicode): Added helper.

* runtime/RegExpPrototype.cpp:
* runtime/RegExpPrototype.h:
(JSC::RegExpPrototype::RegExpPrototype):
(JSC::RegExpPrototype::finishCreation):
(JSC::RegExpPrototype::visitChildren):
(JSC::regExpProtoFuncMatchPrivate):
(JSC::RegExpPrototype::getOwnPropertySlot): Deleted.
(JSC::RegExpPrototype::create):
Restructured to create properties explicitly due to having two names for native regExpProtoFuncExec.

* runtime/StringPrototype.cpp:
(JSC::StringPrototype::finishCreation):
Made match a builtin.
Removed unused declaration of stringProtoFuncSearch() since it was made a builtin.

* tests/es6.yaml:
* tests/stress/regexp-match.js: Added.
(shouldBe):
(shouldThrow):
(errorKey.toString):
(primitive.of.primitives.shouldThrow):
(testRegExpMatch):
(testMatch):
(testBoth):
(alwaysUnmatch):

LayoutTests:

Updated tests for exception string changes and added Symbol.match.

* js/Object-getOwnPropertyNames-expected.txt:
* js/dom/string-prototype-properties-expected.txt:
* js/script-tests/Object-getOwnPropertyNames.js:
* sputnik/Conformance/15_Native_Objects/15.5_String/15.5.4/15.5.4.10_String.prototype.match/S15.5.4.10_A1_T3-expected.txt:

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

4 years agoNon-const DocumentRuleSets::features() does not check default style version
antti@apple.com [Tue, 22 Mar 2016 21:31:16 +0000 (21:31 +0000)]
Non-const DocumentRuleSets::features() does not check default style version
https://bugs.webkit.org/show_bug.cgi?id=155766

Reviewed by Andreas Kling.

This may leave it out of date when the default stylesheet expands.

No test, don't know how to hit this with current codebase. With some further optimizations
it starts affecting some tests involving UA media control stylesheets.

* css/DocumentRuleSets.h:
(WebCore::DocumentRuleSets::mutableFeatures):

    Check the default style version number in non-const case too.

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

4 years agoWeb Inspector: REGRESSION: Shift + Click on record button should create a new recording
commit-queue@webkit.org [Tue, 22 Mar 2016 21:28:43 +0000 (21:28 +0000)]
Web Inspector: REGRESSION: Shift + Click on record button should create a new recording
https://bugs.webkit.org/show_bug.cgi?id=155763

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

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.prototype._recordButtonClicked):
Use the shiftKey from the DOM Event.

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

4 years agoCSP: Should only execute <script> or apply <style> if its hash appears in all policies
dbates@webkit.org [Tue, 22 Mar 2016 21:27:07 +0000 (21:27 +0000)]
CSP: Should only execute <script> or apply <style> if its hash appears in all policies
https://bugs.webkit.org/show_bug.cgi?id=155709
<rdar://problem/25263368>

Reviewed by Darin Adler.

Source/WebCore:

Fixes an issue where a <script>/<style> was allowed to execute/be applied if its hash is listed
in at least one Content Security Policy (CSP) delivered with the page. We should only execute/apply
such a script/stylesheet if its hash is listed in all CSPs delivered with the page.

Tests: http/tests/security/contentSecurityPolicy/1.1/scripthash-multiple-policies.html
       http/tests/security/contentSecurityPolicy/1.1/stylehash-multiple-policies.html

* page/csp/ContentSecurityPolicy.cpp:
(WebCore::isAllowedByAllWithHash): Added. Checks if the specified hash is allowed by all policies.
(WebCore::isAllowedByAllWithHashFromContent): Modified to call WebCore::isAllowedByAllWithHash()
to determine if the <script>/<style> is allowed by all CSPs delivered with the page.

LayoutTests:

Add tests to ensure that we only execute/apply a <script>/<style> if its hash is listed in all CSPs
delivered with the page.

* TestExpectations: Mark added tests as PASS so that we run them.
* http/tests/security/contentSecurityPolicy/1.1/scripthash-multiple-policies-expected.txt: Added.
* http/tests/security/contentSecurityPolicy/1.1/scripthash-multiple-policies.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/stylehash-multiple-policies-expected.html: Added.
* http/tests/security/contentSecurityPolicy/1.1/stylehash-multiple-policies.html: Added.

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

4 years agoWeb Inspector: Switching Away and Back to Timelines Tab may select a different Timeline
commit-queue@webkit.org [Tue, 22 Mar 2016 21:15:37 +0000 (21:15 +0000)]
Web Inspector: Switching Away and Back to Timelines Tab may select a different Timeline
https://bugs.webkit.org/show_bug.cgi?id=155742
<rdar://problem/25284330>

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

When switching to the Timeline tab, or switching recordings within the
the Timeline tab, the TimelineTabContentView does work to correctly
save/restore its view state.

When switching to the Timeline tab, the TimelineTabContentView correctly
restores the state of the tab, but when showing the RecordingContentView
the RecordingContentView restores its state from a stale cookie.

Since TimelineTabContentView already seems to handle correctly restoring
RecordingContentViews on its own. Removing the RecordingContentView's
implementation of save/restore made everything work as expected.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView.prototype.saveToCookie): Deleted.
(WebInspector.TimelineRecordingContentView.prototype.restoreFromCookie): Deleted.

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

4 years agoCRASH in WebCore::MediaResourceLoader::requestResource + 698
jer.noble@apple.com [Tue, 22 Mar 2016 20:56:38 +0000 (20:56 +0000)]
CRASH in WebCore::MediaResourceLoader::requestResource + 698
https://bugs.webkit.org/show_bug.cgi?id=155651
<rdar://problem/25130582>

Reviewed by Eric Carlson.

No new tests, fixes existing tests running under GuardMalloc.

Protect against the Document passed into MediaResourceLoader being destroyed during the MediaResourceLoader's lifetime.

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResourceLoader::MediaResourceLoader):
(WebCore::MediaResourceLoader::contextDestroyed):
(WebCore::MediaResourceLoader::requestResource):
(WebCore::MediaResource::responseReceived):
* loader/MediaResourceLoader.h:

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

4 years agoWeb Inspector: remove the remaining TimelineSidebarPanel references
mattbaker@apple.com [Tue, 22 Mar 2016 20:29:40 +0000 (20:29 +0000)]
Web Inspector: remove the remaining TimelineSidebarPanel references
https://bugs.webkit.org/show_bug.cgi?id=155765
<rdar://problem/25296980>

Reviewed by Timothy Hatcher.

Remove dead code from TimelineView and TimelineTabContentView.

* UserInterface/Views/OverviewTimelineView.js:
(WebInspector.OverviewTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.OverviewTimelineView.prototype.showContentViewForTreeElement): Deleted.

* UserInterface/Views/RenderingFrameTimelineView.js:
(WebInspector.RenderingFrameTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.RenderingFrameTimelineView.prototype.showContentViewForTreeElement): Deleted.

* UserInterface/Views/ScriptDetailsTimelineView.js:
(WebInspector.ScriptDetailsTimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.ScriptDetailsTimelineView.prototype.showContentViewForTreeElement): Deleted.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView):

* UserInterface/Views/TimelineView.js:
(WebInspector.TimelineView.prototype.canShowContentViewForTreeElement): Deleted.
(WebInspector.TimelineView.prototype.showContentViewForTreeElement): Deleted.

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

4 years agoAdvanced spell checking should be guarded behind
bdakin@apple.com [Tue, 22 Mar 2016 20:21:28 +0000 (20:21 +0000)]
Advanced spell checking should be guarded behind
HAVE(ADVANCED_SPELL_CHECKING)
https://bugs.webkit.org/show_bug.cgi?id=155738

Reviewed by Geoff Garen.

Source/WebCore:

* config.h:
(WebCore::ScrollableArea::systemLanguageIsRTL):
* platform/spi/mac/NSSpellCheckerSPI.h:

Source/WebKit/mac:

* WebCoreSupport/WebEditorClient.mm:
(insertionPointFromCurrentSelection):
(WebEditorClient::checkTextOfParagraph):
(WebEditorClient::getGuessesForWord):
(WebEditorClient::requestCandidatesForSelection):
(WebEditorClient::handleRequestedCandidates):
(WebEditorClient::requestCheckingOfString):
* WebKitPrefix.h:
* WebView/WebHTMLView.mm:
(-[WebHTMLView insertText:]):

Source/WebKit2:

* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::requestCandidatesForSelectionIfNeeded):
(WebKit::WebViewImpl::handleRequestedCandidates):
(WebKit::WebViewImpl::insertText):
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkTextOfParagraph):
(WebKit::TextChecker::getGuessesForWord):
* config.h:

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

4 years agoMallocBench: consolidate regression testing for aligned allocation
ggaren@apple.com [Tue, 22 Mar 2016 19:39:38 +0000 (19:39 +0000)]
MallocBench: consolidate regression testing for aligned allocation
https://bugs.webkit.org/show_bug.cgi?id=155762

Reviewed by Michael Saboff.

* MallocBench/MallocBench.xcodeproj/project.pbxproj:
* MallocBench/MallocBench/Benchmark.cpp:
* MallocBench/MallocBench/memalign.cpp: Removed.
* MallocBench/MallocBench/memalign.h: Removed. The stress_aligned test
covers this and much more.

* MallocBench/MallocBench/stress_aligned.cpp:
(benchmark_stress_aligned): Include specific tests for extreme sizes
and alignments.

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

4 years agobmalloc: shrink largeMax
ggaren@apple.com [Tue, 22 Mar 2016 19:39:12 +0000 (19:39 +0000)]
bmalloc: shrink largeMax
https://bugs.webkit.org/show_bug.cgi?id=155759

Reviewed by Michael Saboff.

If a largeChunk contains N bytes and we allocate objects of size
N / 2 + 8 bytes, then we waste 50% of physical memory at peak.

This patch sets largeMax to N / 2, reducing maximum waste to 25%.

* bmalloc/BoundaryTag.h:
* bmalloc/LargeChunk.h:
(bmalloc::LargeChunk::LargeChunk):
* bmalloc/SegregatedFreeList.cpp:
(bmalloc::SegregatedFreeList::SegregatedFreeList):
(bmalloc::SegregatedFreeList::insert): Honor largeMax vs largeObjectMax.

* bmalloc/Sizes.h: Distinguish between the largest thing we can store
in a free list (largeObjectMax) and the largest thing we're willing to
allocate (largeMax).

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

4 years agoAdd a setting to let the client toggle support for network cache speculative validation
cdumez@apple.com [Tue, 22 Mar 2016 19:21:53 +0000 (19:21 +0000)]
Add a setting to let the client toggle support for network cache speculative validation
https://bugs.webkit.org/show_bug.cgi?id=155622
<rdar://problem/25233209>

Reviewed by Antti Koivisto.

Copy new m_diskCacheSpeculativeValidationEnabled member introduced
in r198470 in ProcessPoolConfiguration::copy().

* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):

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

4 years agoAX: Change "dialog" role description to "web dialog" so users can distinguish from...
n_wang@apple.com [Tue, 22 Mar 2016 19:17:37 +0000 (19:17 +0000)]
AX: Change "dialog" role description to "web dialog" so users can distinguish from native alerts
https://bugs.webkit.org/show_bug.cgi?id=154292

Reviewed by Chris Fleizach.

Source/WebCore:

Changed role descriptions for "dialog" and "alert dialog" roles as required.

No new tests needed.

* English.lproj/Localizable.strings:

LayoutTests:

* platform/mac-mavericks/accessibility/roles-exposed-expected.txt:
* platform/mac/accessibility/roles-exposed-expected.txt:

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

4 years agoAdd null check in CachedResourceLoader::determineRevalidationPolicy
commit-queue@webkit.org [Tue, 22 Mar 2016 19:12:32 +0000 (19:12 +0000)]
Add null check in CachedResourceLoader::determineRevalidationPolicy
https://bugs.webkit.org/show_bug.cgi?id=155758
rdar://problem/25108408

Patch by Alex Christensen <achristensen@webkit.org> on 2016-03-22
Reviewed by Jer Noble.

* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::frame):
(WebCore::CachedResourceLoader::determineRevalidationPolicy):
Null-check frame() before dereferencing it.

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

4 years agoCSP: Check inline event handlers on each run, not only the first
dbates@webkit.org [Tue, 22 Mar 2016 19:08:43 +0000 (19:08 +0000)]
CSP: Check inline event handlers on each run, not only the first
https://bugs.webkit.org/show_bug.cgi?id=115700
<rdar://problem/24211159>

Reviewed by Andy Estes.

Source/WebCore:

Fixes an issue where an inline event handler would always be allowed to execute if it
executed at least once.

Currently we query whether the Content Security Policy (CSP) of the page permits inline event
handlers each time we register a new handler for an event. And a handler is registered exactly
once the first time the event associated with it is dispatched. Once a handler is registered
as a listener for an event E then we will always invoke the handler when event E is dispatched
regardless of whether the CSP of the page changes (say, as a result of programmatically inserting
a <meta http-equiv="Content-Security-Policy">). Instead we should always check the
CSP of the page whenever we are going to invoke an event handler.

* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::handleEvent): Check the CSP of the page and bail out if the
policy does not permit execution of an inline event handler.
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::sourceURL): Added. Default implementation that returns an empty string.
(WebCore::JSEventListener::sourcePosition): Added. Default implementation that returns a default position.
* bindings/js/JSLazyEventListener.cpp:
(WebCore::JSLazyEventListener::JSLazyEventListener): Update code following instance variable
renaming in JSLazyEventListener.h.
(WebCore::JSLazyEventListener::initializeJSFunction): Ditto.
* bindings/js/JSLazyEventListener.h: Override JSEventListener::sourceURL() and JSEventListener::sourcePosition().
Changed all mutable instance variables to immutable ones as we do not modify these variables
in any const member functions. Also renamed instance variable m_position to m_sourcePosition
to better describe that it represents the source code position where the event handler was defined.

LayoutTests:

Update expected result for test http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta.html
and remove its entry from file LayoutTests/TestExpectations now that it passes.

* TestExpectations:
* http/tests/security/contentSecurityPolicy/inline-event-handler-blocked-after-injecting-meta-expected.txt:

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

4 years agoSkipping media/media-document-audio-repaint.html on El Capitan Debug WK2
ryanhaddad@apple.com [Tue, 22 Mar 2016 18:28:53 +0000 (18:28 +0000)]
Skipping media/media-document-audio-repaint.html on El Capitan Debug WK2
https://bugs.webkit.org/show_bug.cgi?id=155757

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

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

4 years agoMedia elements allowed to play without a user gesture, but requiring fullscreen playb...
jer.noble@apple.com [Tue, 22 Mar 2016 18:03:59 +0000 (18:03 +0000)]
Media elements allowed to play without a user gesture, but requiring fullscreen playback, should not be allowed to autoplay.
https://bugs.webkit.org/show_bug.cgi?id=155599

Reviewed by Darin Adler.

Test: media/video-autoplay-allowed-but-fullscreen-required.html

Entering fullscreen should always require a user gesture.

* html/MediaElementSession.cpp:
(WebCore::MediaElementSession::playbackPermitted):

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

4 years agoWeb Inspector: Timelines UI redesign: Provide a way to configure which instruments...
mattbaker@apple.com [Tue, 22 Mar 2016 17:59:51 +0000 (17:59 +0000)]
Web Inspector: Timelines UI redesign: Provide a way to configure which instruments to use
https://bugs.webkit.org/show_bug.cgi?id=153672
<rdar://problem/24417575>

Reviewed by Timothy Hatcher.

Adds UI for configuring a timeline recording's instrument list. TimelineManager
maintains the list of supported timeline types, and tracks the subset
of user-configured timelines which are used to create the instrument list
that is passed to new recordings.

* Localizations/en.lproj/localizedStrings.js:
New strings for "Edit" Timelines button.

* UserInterface/Controllers/TimelineManager.js:
(WebInspector.TimelineManager):
Added setting for user-configured (enabled) timeline types.
Initialized to the default timeline types.

(WebInspector.TimelineManager.defaultTimelineTypes):
(WebInspector.TimelineManager.availableTimelineTypes):
Get the list of all supported timeline types, which is a superset
of the list of default timeline types.

(WebInspector.TimelineManager.prototype.get enabledTimelineTypes):
(WebInspector.TimelineManager.prototype.set enabledTimelineTypes):
List of user-configured timeline types, backed by a Setting.
(WebInspector.TimelineManager.prototype._loadNewRecording):
Create new recordings with the current user-configured instrument list.
(WebInspector.TimelineManager.defaultInstruments): Deleted.
Renamed defaultTimelineTypes.

* UserInterface/Main.html:
New class, TimelineTreeElement.

* UserInterface/Models/Instrument.js:
(WebInspector.Instrument.createForTimelineType):
Factory method for creating Instruments.

* UserInterface/Models/TimelineRecording.js:
(WebInspector.TimelineRecording):
Replace fixed instrument list with TimelineManager's list.
(WebInspector.TimelineRecording.prototype.instrumentForTimeline):
Get the instrument in the recording for a given timeline.
(WebInspector.TimelineRecording.prototype.addInstrument):
(WebInspector.TimelineRecording.prototype.removeInstrument):
Drive-by syntax error fixes: Array.prototype.contains doesn't exist.

* UserInterface/Views/TimelineOverview.css:
(.timeline-overview > .navigation-bar.timelines):
(.navigation-bar.timelines .item.button.toggle-edit-instruments:not(.disabled):matches(:focus, .activate.activated, .radio.selected)):
(.navigation-bar.timelines .item.button.toggle-edit-instruments:not(.disabled):active:matches(:focus, .activate.activated, .radio.selected)):
(.navigation-bar.timelines .item.button.toggle-edit-instruments.disabled):
(.navigation-bar.timelines .toggle-edit-instruments:not(.disabled):active):
(.timeline-overview > .tree-outline.timelines):
(.timeline-overview.edit-instruments > .tree-outline.timelines):
(.timeline-overview.edit-instruments > .tree-outline.timelines .item.selected):
(.timeline-overview > .tree-outline.timelines input[type=checkbox].status-button):
(.timeline-overview.frames > :matches(.tree-outline.timelines, .navigation-bar.timelines)):
(.timeline-overview > .tree-outline.timelines::before): Deleted.
(.timeline-overview.frames > .tree-outline.timelines): Deleted.
Styles for the "Edit" navigation bar above the timelines tree outline,
and tree element styles for showing checkboxes and hiding the current
selection while in edit mode.

* UserInterface/Views/TimelineOverview.js:
(WebInspector.TimelineOverview):
Create "Edit" button and navigation bar and add event handlers for
capturing events, so that timeline editing can be closed and
disabled when capturing begins.

(WebInspector.TimelineOverview.prototype.set selectedTimeline):
Prevent timeline selection while in edit mode.
(WebInspector.TimelineOverview.prototype.get editingInstruments):
(WebInspector.TimelineOverview.prototype.set viewMode):
Prevent view mode change while in edit mode.

(WebInspector.TimelineOverview.prototype._instrumentAdded):
Create a TimelineTreeElement, and insert into the tree outline and graph
container in sorted order instead of appending timeline elements.

(WebInspector.TimelineOverview.prototype._toggleEditingInstruments):
Handler for Edit button click event.
(WebInspector.TimelineOverview.prototype._editingInstrumentsDidChange):
Update UI in response to editing mode change: toggle CSS, enable/disable
the timeline ruler and wheel/gesture events, and update Edit button appearance.

(WebInspector.TimelineOverview.prototype._updateEditInstrumentsButton):
Update label text and button state.
(WebInspector.TimelineOverview.prototype._updateWheelAndGestureHandlers):
Add/remove event handlers based on editing state.

(WebInspector.TimelineOverview.prototype._startEditingInstruments):
Enable edit mode UI. Placeholder elements are added for timelines that
aren't included in the recording, and all tree elements have checkboxes
for toggling their associated timelines.

(WebInspector.TimelineOverview.prototype._stopEditingInstruments):
Disable edit mode UI. Unchecked instruments are first removed from the
recording, then placeholder tree elements are removed, and their instruments
added, as needed. TimelineManager's list of user-configured timeline types
is then updated.

(WebInspector.TimelineOverview.prototype._capturingStarted):
(WebInspector.TimelineOverview.prototype._capturingStopped):
Enable/disable the Edit button. Quit editing mode when capturing starts.
(WebInspector.TimelineOverview.prototype._compareTimelineTreeElements):
Special sorting for the timelines tree outline. The sort order is:
    1. Instruments that are in the recording, except Rendering Frames.
    2. Instruments that aren't in the recording (placeholders).
    3. Rendering Frames.

Timelines in groups 1 & 2 are sorted based on the order of the list returned
by TimelineManager.availableTimelineTypes(). The Rendering Frames tree
element must be last, since it's always hidden and would otherwise interfere
with the alternating tree element CSS styles.

* UserInterface/Views/TimelineRecordingContentView.css:
(.content-view.timeline-recording.edit-instruments > .timeline-overview):
(.content-view.timeline-recording.edit-instruments > .content-browser):
Hide lower content browser and extend timelines tree height in edit mode.

* UserInterface/Views/TimelineRecordingContentView.js:
(WebInspector.TimelineRecordingContentView):
Listen for edit mode changes on TimelineOverview.
(WebInspector.TimelineRecordingContentView.prototype.contentBrowserTreeElementForRepresentedObject):
(WebInspector.TimelineRecordingContentView.prototype._updateTimelineOverviewHeight):
When in edit mode, remove inline style rule for TimelineOverview height.
(WebInspector.TimelineRecordingContentView.prototype._instrumentAdded):
(WebInspector.TimelineRecordingContentView.prototype._editingInstrumentsDidChange):
Update CSS and TimelineOverview height when edit mode changes.
(WebInspector.TimelineRecordingContentView.prototype.get timelineOverviewHeight): Deleted.
No longer used.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.displayNameForTimelineType):
(WebInspector.TimelineTabContentView.iconClassNameForTimelineType):
(WebInspector.TimelineTabContentView.genericClassNameForTimelineType):
(WebInspector.TimelineTabContentView.displayNameForTimeline): Deleted.
(WebInspector.TimelineTabContentView.iconClassNameForTimeline): Deleted.
(WebInspector.TimelineTabContentView.genericClassNameForTimeline): Deleted.
Helper functions now take a timeline type instead of a timeline object.

* UserInterface/Views/TimelineTreeElement.js: Added.
New tree element class to encapsulate behavior specific to the timelines
tree outline, such as status element changes and disabling selection
when editing.

(WebInspector.TimelineTreeElement):
(WebInspector.TimelineTreeElement.prototype.get placeholder):
(WebInspector.TimelineTreeElement.prototype.get editing):
(WebInspector.TimelineTreeElement.prototype.set editing):
(WebInspector.TimelineTreeElement.prototype._showCloseButton):
(WebInspector.TimelineTreeElement.prototype._showCheckbox):
(WebInspector.TimelineTreeElement.prototype._updateStatusButton):

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

4 years agoVersioning.
bshafiei@apple.com [Tue, 22 Mar 2016 17:58:54 +0000 (17:58 +0000)]
Versioning.

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

4 years ago[JSC] ASMBench cannot be run without JSBENCH_PATH
utatane.tea@gmail.com [Tue, 22 Mar 2016 17:49:40 +0000 (17:49 +0000)]
[JSC] ASMBench cannot be run without JSBENCH_PATH
https://bugs.webkit.org/show_bug.cgi?id=155751

Reviewed by Saam Barati.

Check ASMBENCH_PATH instead of JSBENCH_PATH for ASMBench files.

* Scripts/run-jsc-benchmarks:

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

4 years agoMarking perf/document-contains.html as flaky on ios-simulator-wk2
ryanhaddad@apple.com [Tue, 22 Mar 2016 17:30:23 +0000 (17:30 +0000)]
Marking perf/document-contains.html as flaky on ios-simulator-wk2
https://bugs.webkit.org/show_bug.cgi?id=155755

Unreviewed test gardening.

* platform/ios-simulator-wk2/TestExpectations:

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

4 years ago[GTK] WebInspector broken after r197620
commit-queue@webkit.org [Tue, 22 Mar 2016 17:26:03 +0000 (17:26 +0000)]
[GTK] WebInspector broken after r197620
https://bugs.webkit.org/show_bug.cgi?id=155497
<rdar://problem/25171910>

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2016-03-22
Reviewed by Philippe Normand.

Source/WebCore:

Add resource scheme to the list of secure protocols.

* platform/SchemeRegistry.cpp:
(WebCore::secureSchemes):

Source/WebKit2:

Stop registering resource:// URLs as local, because they are not
like a local file at all. Compare also the URL protocols when
checking whether requested URL is main or test inspector page
instead of checking that the protocol is registered as local.

* UIProcess/WebInspectorProxy.cpp:
(WebKit::isMainOrTestInspectorPage): Compare also the URL protocols.
* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Do not
set setAllowFileAccessFromFileURLs setting to true.
* UIProcess/gtk/WebProcessPoolGtk.cpp:
(WebKit::WebProcessPool::platformInitializeWebProcess): Do not
register resource:// URLS as local.

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

4 years ago[JSC] allow duplicate property names returned from Proxy ownKeys() trap
commit-queue@webkit.org [Tue, 22 Mar 2016 17:01:04 +0000 (17:01 +0000)]
[JSC] allow duplicate property names returned from Proxy ownKeys() trap
https://bugs.webkit.org/show_bug.cgi?id=155560

Patch by Caitlin Potter <caitp@igalia.com> on 2016-03-22
Reviewed by Darin Adler.

Specification allows duplicate property names to be reported by the
Proxy ownKeys() trap --- and this is observable in any API which
operates on the returned list, such as Object.keys(),
Object.getOwnPropertyNames(), Object.getOwnPropertySymbols(), or
Object.getOwnPropertyDescriptors().

* runtime/PropertyNameArray.h:
(JSC::PropertyNameArray::addUnchecked):
(JSC::PropertyNameArray::add):
(JSC::PropertyNameArray::addKnownUnique): Deleted.
* runtime/ProxyObject.cpp:
(JSC::ProxyObject::performGetOwnPropertyNames):
* runtime/Structure.cpp:
(JSC::Structure::getPropertyNamesFromStructure):

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

4 years agoSource/WebCore:
bfulgham@apple.com [Tue, 22 Mar 2016 16:02:22 +0000 (16:02 +0000)]
Source/WebCore:
SharedBuffer::copy() can cause a segmentation fault.
https://bugs.webkit.org/show_bug.cgi?id=155739

Reviewed by Ryosuke Niwa.

Based on a Blink patch by Huang Dongsung <luxtella@company100.net>.
<https://src.chromium.org/viewvc/blink?revision=153850&view=revision>

After SharedBuffer::copy(), SharedBuffer::append() can cause segmentation fault,
because copy() calls clone->m_buffer.append(m_segments[i], segmentSize) even if
'i' is the last index. The data size of m_segments.last() is often less than
segmentSize. So, in the cloned instance m_size < (m_buffer.size() + SUM(m_segments[i].size())).
This patch appends the exact size of the last segment instead of segmentSize.

Tested by TestWebKitAPI SharedBufferTest::copy

* platform/SharedBuffer.cpp:
(SharedBuffer::copy):

Tools:
[Win] SharedBuffer::copy() can cause a segmentation fault.
https://bugs.webkit.org/show_bug.cgi?id=155739

Reviewed by Ryosuke Niwa.

* TestWebKitAPI/PlatformWin.cmake: Build and run the
SharedBuffer tests.

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

4 years ago[buildbot] Move ARM Linux bots to JSCOnly port
ossy@webkit.org [Tue, 22 Mar 2016 15:29:15 +0000 (15:29 +0000)]
[buildbot] Move ARM Linux bots to JSCOnly port
https://bugs.webkit.org/show_bug.cgi?id=155655

Reviewed by Lucas Forschler.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(ConfigureBuild.__init__):
(appendCustomBuildFlags):
(CompileJSCOnly):
(Factory.__init__):
(BuildAndRemoteJSCTestsFactory):
(BuildAndRemoteJSCTestsFactory.__init__):
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
* BuildSlaveSupport/clean-build:
(main):

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

4 years ago[OSX] Rebase media/media-document-audio-repaint.html
eric.carlson@apple.com [Tue, 22 Mar 2016 14:27:41 +0000 (14:27 +0000)]
[OSX] Rebase media/media-document-audio-repaint.html
https://bugs.webkit.org/show_bug.cgi?id=155733

Reviewed by Darin Adler.

* platform/mac/TestExpectations:
* platform/mac/media/media-document-audio-repaint-expected.png:
* platform/mac/media/media-document-audio-repaint-expected.txt: Added.

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

4 years agoSource/ThirdParty/ANGLE:
berto@igalia.com [Tue, 22 Mar 2016 13:47:30 +0000 (13:47 +0000)]
Source/ThirdParty/ANGLE:
Unreviewed typo fix.

* src/compiler/translator/InfoSink.cpp:
(TInfoSinkBase::prefix): "UNKOWN" => "UNKOWN".

Source/WebCore:
Unreviewed typo fix.

* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::textTrackAutomaticMenuItemText): "choosen" => "chosen"

Source/WebCore/platform/gtk/po:
Unreviewed typo fix "choosen" => "chosen"

* as.po:
* bg.po:
* ca.po:
* de.po:
* en_GB.po:
* es.po:
* fr.po:
* gl.po:
* gu.po:
* he.po:
* hi.po:
* it.po:
* ja.po:
* kn.po:
* mr.po:
* nl.po:
* or.po:
* pl.po:
* pt_BR.po:
* sl.po:
* sv.po:
* ta.po:
* te.po:
* tr.po:

Source/WebKit2:
Unreviewed typo fixes.

* Shared/linux/WebMemorySamplerLinux.cpp:
(WebKit::WebMemorySampler::sampleWebKit): "Commited" => "Committed"
* UIProcess/API/gtk/WebKitFileChooserRequest.cpp:
(webkit_file_chooser_request_select_files): "choosen" => "chosen"
* UIProcess/API/gtk/WebKitUserMediaPermissionRequest.cpp:
(webkit_user_media_permission_request_class_init): "Wether" => "Whether"

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

4 years agoRemove unused display and scroll view methods from PageClient and WebPageProxy
carlosgc@webkit.org [Tue, 22 Mar 2016 13:22:37 +0000 (13:22 +0000)]
Remove unused display and scroll view methods from PageClient and WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=155744

Reviewed by Andreas Kling.

We have displayView(), canScrollView() and scrollView() that are
used by DrawingAreaProxyImpl which is only used by GTK+ port that
doesn't implement those methods.

* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::displayView): Deleted.
(WebKit::PageClientImpl::scrollView): Deleted.
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::incorporateUpdate): Update the
whole view when scrolling, or the damage area otherwise.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::displayView): Deleted.
(WebKit::WebPageProxy::canScrollView): Deleted.
(WebKit::WebPageProxy::scrollView): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebView.cpp:
(WebKit::WebView::displayView): Deleted.
(WebKit::WebView::scrollView): Deleted.
* UIProcess/efl/WebView.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::displayView): Deleted.
(WebKit::PageClientImpl::canScrollView): Deleted.
(WebKit::PageClientImpl::scrollView): Deleted.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::displayView): Deleted.
(WebKit::PageClientImpl::canScrollView): Deleted.
(WebKit::PageClientImpl::scrollView): Deleted.

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

4 years ago[CoordinatedGraphics] Polish std::function<> usage in ThreadedCompositor, Coordinated...
zandobersek@gmail.com [Tue, 22 Mar 2016 09:44:47 +0000 (09:44 +0000)]
[CoordinatedGraphics] Polish std::function<> usage in ThreadedCompositor, CoordinatedGraphicsScene
https://bugs.webkit.org/show_bug.cgi?id=155726

Reviewed by Darin Adler.

Adjust the methods in ThreadedCompositor and CoordinatedGraphicsScene
classes to accept std::function<> arguments via rvalue references. This
should prevent both unnecessary copies and moves.

Fix lambda expressions that are most commonly used to construct the
std::function<> objects so that they don't capture-by-value by default,
but instead list the captured values verbosely. This part alone exposed
an issue in ThreadedCompositor::didChangeVisibleRect() where we were
capturing the `this' value by default, instead of a protector RefPtr.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
(WebKit::CoordinatedGraphicsScene::dispatchOnClientRunLoop):
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebKit::CoordinatedGraphicsScene::onNewBufferAvailable):
(WebKit::CoordinatedGraphicsScene::commitSceneState):
(WebKit::CoordinatedGraphicsScene::purgeGLResources):
(WebKit::CoordinatedGraphicsScene::commitScrollOffset):
(WebKit::CoordinatedGraphicsScene::appendUpdate):
(WebKit::CoordinatedGraphicsScene::setActive):
* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.h:
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::CompositingRunLoop::CompositingRunLoop):
(WebKit::CompositingRunLoop::callOnCompositingRunLoop):
(WebKit::ThreadedCompositor::setNeedsDisplay):
(WebKit::ThreadedCompositor::setNativeSurfaceHandleForCompositing):
(WebKit::ThreadedCompositor::setDeviceScaleFactor):
(WebKit::ThreadedCompositor::didChangeViewportSize):
(WebKit::ThreadedCompositor::didChangeViewportAttribute):
(WebKit::ThreadedCompositor::didChangeContentsSize):
(WebKit::ThreadedCompositor::scrollTo):
(WebKit::ThreadedCompositor::scrollBy):
(WebKit::ThreadedCompositor::didChangeVisibleRect):
(WebKit::ThreadedCompositor::callOnCompositingThread):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.h:

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

4 years ago[CoordinatedGraphics] Prefer RunLoop::main().dispatch() over callOnMainThread()
zandobersek@gmail.com [Tue, 22 Mar 2016 07:28:06 +0000 (07:28 +0000)]
[CoordinatedGraphics] Prefer RunLoop::main().dispatch() over callOnMainThread()
https://bugs.webkit.org/show_bug.cgi?id=155725

Reviewed by Darin Adler.

Unify the CoordinatedGraphics code in the WebKit2 layer to use RunLoop
for dispatching tasks on either the main thread or the composition thread
in case of using the threaded compositor. The latter is already the default,
so this patch just replaces calls to callOnMainThread() with calls to
RunLoop::main().dispatch().

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::dispatchOnMainThread):
* Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
(WebKit::ThreadedCompositor::didChangeVisibleRect):

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

4 years ago[TextureMapper] Destructing TextureMapperLayer should clean up its effect target
zandobersek@gmail.com [Tue, 22 Mar 2016 07:26:21 +0000 (07:26 +0000)]
[TextureMapper] Destructing TextureMapperLayer should clean up its effect target
https://bugs.webkit.org/show_bug.cgi?id=155718

Reviewed by Darin Adler.

TextureMapperLayer destructor should, in case of non-null effect target,
null out the effect target's mask and replica layer pointers if those
pointers point to the TextureMapperLayer object that's being destroyed,
avoiding use-after-free occurrences.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::~TextureMapperLayer):

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

4 years ago[TexMap] Shrink-to-fit the CompositingCoordinator's update atlases vector after cleanup
zandobersek@gmail.com [Tue, 22 Mar 2016 07:21:13 +0000 (07:21 +0000)]
[TexMap] Shrink-to-fit the CompositingCoordinator's update atlases vector after cleanup
https://bugs.webkit.org/show_bug.cgi?id=155719

Reviewed by Carlos Garcia Campos.

Shrink the Vector object containing the cached UpdateAtlas objects
after the inactive ones are removed. This way the capacity of the
Vector is kept under control, preventing unnecessary waste of memory.

* platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
(WebCore::CompositingCoordinator::releaseInactiveAtlasesTimerFired):

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

4 years agoSkip HeapSnapshot test on WebKit1. Shared VM skews the data.
joepeck@webkit.org [Tue, 22 Mar 2016 03:48:28 +0000 (03:48 +0000)]
Skip HeapSnapshot test on WebKit1. Shared VM skews the data.

Rubber-stamped by Timothy Hatcher.

In this case, snapshots with snapshots with snapshots in the same VM
causes the test to run out of memory. This does not happen in WebKit2.

* platform/mac-wk1/TestExpectations:

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

4 years agoCommit log viewer repaints too frequently after r198499
rniwa@webkit.org [Tue, 22 Mar 2016 02:58:19 +0000 (02:58 +0000)]
Commit log viewer repaints too frequently after r198499
https://bugs.webkit.org/show_bug.cgi?id=155732

Reviewed by Joseph Pecoraro.

The bug was caused by InteractiveTimeSeriesChart invoking onchange callback whenever mouse moved even
if the current point didn't change. Fixed the bug by avoiding the work if the indicator hadn't changed
and avoiding work in the commit log viewer when the requested repository and the revision range were
the same as those of the last request.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer):
(CommitLogViewer.prototype.currentRepository): Exit early when repository and the revision range are
identical to the one we already have to avoid repaints and issuing multiple network requests.
* public/v3/components/interactive-time-series-chart.js:
(InteractiveTimeSeriesChart.prototype._mouseMove): Don't invoke _notifyIndicatorChanged if the current
indicator hadn't changed.
* public/v3/pages/chart-pane.js:
(ChartPane.prototype._indicatorDidChange): Fixed the bug that unlocking the indicator wouldn't update
the URL. We need to check whether the lock state had changed. The old condition was also redundant
since _mainChartIndicatorWasLocked is always identically equal to isLocked per the prior assignment.

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

4 years ago[JSC] Clean up Math.floor thunk and use SSE round instruction
utatane.tea@gmail.com [Tue, 22 Mar 2016 01:35:04 +0000 (01:35 +0000)]
[JSC] Clean up Math.floor thunk and use SSE round instruction
https://bugs.webkit.org/show_bug.cgi?id=155705

Reviewed by Geoffrey Garen.

SSE now allow us to use round instruction to implement Math.floor.
MacroAssembler's floorDouble is now only used in ARM64, but it can be allowed in x86 SSE.

* jit/ThunkGenerators.cpp:
(JSC::floorThunkGenerator):

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

4 years agoWeb Inspector: New icon for Heap Allocations timeline
mattbaker@apple.com [Tue, 22 Mar 2016 00:51:43 +0000 (00:51 +0000)]
Web Inspector: New icon for Heap Allocations timeline
https://bugs.webkit.org/show_bug.cgi?id=155731
<rdar://problem/25275494>

Reviewed by Joseph Pecoraro and Timothy Hatcher.

* UserInterface/Images/HeapAllocationsInstrument.svg: Added.
New artwork from Jon Davis.

* UserInterface/Views/TimelineIcons.css:
(.heap-allocations-icon .icon):
(body:not(.mac-platform, .windows-platform) .memory-icon .icon):
(body:not(.mac-platform, .windows-platform) .heap-allocations-icon .icon):
New icon styles/fallbacks for GTK.

* UserInterface/Views/TimelineTabContentView.js:
(WebInspector.TimelineTabContentView.iconClassNameForTimeline):
Add new icon class to UI helper method.

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

4 years agoUpdate benchmark tests
jonlee@apple.com [Tue, 22 Mar 2016 00:30:44 +0000 (00:30 +0000)]
Update benchmark tests
https://bugs.webkit.org/show_bug.cgi?id=155723

Reviewed by Darin Adler.
Provisionally reviewed by Said Abou-Hallawa.

Add quadratic and bezier segments to the canvas path test.

* Animometer/resources/runner/tests.js: Some of the query strings are unnecessary.
Rename the test.
* Animometer/tests/master/resources/canvas-stage.js:
(tune): Update to be able to take an array of possible constructors. Choose one randomly.
* Animometer/tests/master/resources/canvas-tests.js:
(CanvasLinePoint.Utilities.createClass): Move the point selection out to a separate
function called randomPoint() for reuse. Move X_LOOPS, Y_LOOPS, and offsets into the
class definition.
(randomPoint): Scale the grid down a little bit so that the lines along the edge of the
canvas are not cut off when the stroke size is thick.
(CanvasQuadraticSegment): Added.
(CanvasBezierSegment): Added.
(SimpleCanvasStage): Pass in an array of the different segment types. Since line segments
are short compared to the curved ones, make it twice as likely to render a line segment.
(SimpleCanvasStage.animate): Update the drawing code so that we render all line segments.

Add a helper method that selects a random element from an array.

* Animometer/tests/resources/main.js:
(Stage.randomElementInArray): Select a random element from the provided array.

* Animometer/tests/bouncing-particles/resources/bouncing-tagged-images.js: Refactor.
* Animometer/tests/dom/resources/leaves.js: Ditto.
* Animometer/tests/master/resources/dom-particles.js: Ditto.
* Animometer/tests/master/resources/image-data.js: Ditto.
* Animometer/tests/master/resources/leaves.js: Ditto.
* Animometer/tests/simple/resources/simple-canvas-paths.js: Ditto.

Add canvas tests that includes all stroke and fill paths. This makes it possible to avoid having to
include the full simple canvas suite for perf testing.

* Animometer/resources/debug-runner/tests.js: Add new tests. Move the canvas test into the Canvas
suite.
* Animometer/tests/simple/resources/simple-canvas-paths.js: Add a CanvasStroke and CanvasFill particle
that random selects an object to render.

* Animometer/resources/debug-runner/tests.js: Move 3D suite before basic canvas suite.
When updating the perf bot script, we will include the suites up to this one, but exclude
the basic canvas suite.

Move compositing transforms test to HTML suite and remove the empty Miscellaneous suite.

* Animometer/resources/debug-runner/tests.js:
* Animometer/tests/dom/compositing-transforms.html: Renamed from PerformanceTests/Animometer/tests/misc/compositing-transforms.html.
* Animometer/tests/dom/resources/compositing-transforms.js: Renamed from PerformanceTests/Animometer/tests/misc/resources/compositing-transforms.js.

Clean up miscellaneous test suite. Add a canvas ellipse test, and remove the other
canvas tests.

* Animometer/resources/debug-runner/tests.js: Add ellipse tests to the simple suite.
* Animometer/tests/misc/canvas-electrons.html: Removed.
* Animometer/tests/misc/canvas-stars.html: Removed.
* Animometer/tests/misc/resources/canvas-electrons.js: Removed.
* Animometer/tests/misc/resources/canvas-stars.js: Removed.
* Animometer/tests/simple/resources/simple-canvas-paths.js: Add ellipse primitives.

Merge text tests together into one.

* Animometer/resources/runner/tests.js: Remove international.html.
* Animometer/tests/master/international.html: Removed.
* Animometer/tests/master/resources/text.js:
(animate): Update styling. Manually calculate gradients for the shadow particles.
Reduce the step size for y direction to avoid cutting text off at the margins. Increase
step for x since there will be a little more room.
* Animometer/tests/master/text.html: Add more translations and lay it out in a table.

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

4 years agoFix A/B testing after r198503.
rniwa@webkit.org [Tue, 22 Mar 2016 00:22:14 +0000 (00:22 +0000)]
Fix A/B testing after r198503.

* public/include/build-requests-fetcher.php:

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

4 years agoImprove SharedBuffer testing
bfulgham@apple.com [Tue, 22 Mar 2016 00:06:53 +0000 (00:06 +0000)]
Improve SharedBuffer testing
https://bugs.webkit.org/show_bug.cgi?id=93078
<rdar://problem/25277829>

Reviewed by Ryosuke Niwa.

Source/WebCore:

* platform/SharedBuffer.h: Mark a few methods as WEBCORE_EXPORT so they
can be used by TestWebKitAPI.

Tools:

Based on a Blink patch by Huang Dongsung <luxtella@company100.net>.
<https://src.chromium.org/viewvc/blink?revision=153850&view=revision,
and a Blink patch by <tyoshino@chromium.org>
<https://src.chromium.org/viewvc/blink?view=rev&revision=151617>

Add three test cases from the Blink project that cover various append,
copy, and createArrayBuffer calls.

* TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F):

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

4 years agoWebCore::RenderTableCell::setCol should put a cap on the column value.
zalan@apple.com [Mon, 21 Mar 2016 23:29:58 +0000 (23:29 +0000)]
WebCore::RenderTableCell::setCol should put a cap on the column value.
https://bugs.webkit.org/show_bug.cgi?id=155642
<rdar://problem/15895201>

Reviewed by Simon Fraser.

This patch ensures that we don't crash when the column number is large enough.
see webkit.org/b/71135 for more information.

Source/WebCore:

Test: tables/colspan-with-large-value-crash.html

* rendering/RenderTableCell.h:
(WebCore::RenderTableCell::setCol):

LayoutTests:

* tables/colspan-with-large-value-crash-expected.txt: Added.
* tables/colspan-with-large-value-crash.html: Added.

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

4 years agostorage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html flaky on...
beidson@apple.com [Mon, 21 Mar 2016 22:57:43 +0000 (22:57 +0000)]
storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange.html flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=154748

Reviewed by Alex Christensen.

* platform/mac/TestExpectations:
* storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-expected.txt:
* storage/indexeddb/deletedatabase-delayed-by-open-and-versionchange-private-expected.txt:
* storage/indexeddb/resources/deletedatabase-delayed-by-open-and-versionchange.js:

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

4 years agoAnalysis task page is broken after r198479
rniwa@webkit.org [Mon, 21 Mar 2016 22:27:34 +0000 (22:27 +0000)]
Analysis task page is broken after r198479
https://bugs.webkit.org/show_bug.cgi?id=155735

Rubber-stamped by Chris Dumez.

* public/api/measurement-set.php:
(AnalysisResultsFetcher::fetch_commits): We need to emit the commit ID as done for regular data.
* public/include/build-requests-fetcher.php:
(BuildRequestsFetcher::fetch_roots_for_set_if_needed): Ditto. Don't use a fake ID after r198479.
* public/v3/models/commit-log.js:
(CommitLog): Assert that all commit log IDs are integers to catch regressions like this in future.
* public/v3/models/root-set.js:
(RootSet): Don't resolve Repository here as doing so would modify the shared "root" entry in the JSON
we fetched, and subsequent construction of RootSet would fail since this line would blow up trying to
find the repository with "[object]" as the ID.
* public/v3/models/test-group.js:
(TestGroup._createModelsFromFetchedTestGroups): Resolve Repository here.

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

4 years ago[iOS WK2] Use larger tiles when possible to reduce per-tile painting overhead
simon.fraser@apple.com [Mon, 21 Mar 2016 22:25:08 +0000 (22:25 +0000)]
[iOS WK2] Use larger tiles when possible to reduce per-tile painting overhead
https://bugs.webkit.org/show_bug.cgi?id=155734
rdar://problem/24968144

Reviewed by Tim Horton.

Source/WebCore:

The existing tile size logic is wired to adjustScrollbars, which doesn't fire
when scrolling is delegated. For iOS WK2, key off of a new unobscuredContentSizeChanged()
function that runs when the UI process tells told WebCore that the unobscured size
has changed. In addition, contentsResized() is used to update scrollability when
page changes size.

* page/FrameView.cpp:
(WebCore::FrameView::contentsResized):
(WebCore::FrameView::addedOrRemovedScrollbar):
(WebCore::FrameView::adjustTiledBackingScrollability): Handle both delegated and non-delegated
scrolling; the former looks at the visible size (based on the unobscuredVisibleContentRect),
the latter at the presence of scrollbars.
(WebCore::FrameView::unobscuredContentSizeChanged):
* page/FrameView.h:
* platform/ScrollView.h:
(WebCore::ScrollView::unobscuredContentSizeChanged):
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::adjustTileCoverageRect): Use kDefaultTileSize rather than the
tile size, to retain the old amount of overdraw.
(WebCore::TileController::tileSize): There was a bug in the not-scrollable case; we need
to scale.
* platform/ios/ScrollViewIOS.mm:
(WebCore::ScrollView::setUnobscuredContentSize):

LayoutTests:

New results with larger page tiles in WK2.

* platform/ios-simulator-wk2/compositing/tiling/rotated-tiled-clamped-expected.txt: Added.
* platform/ios-simulator-wk2/compositing/tiling/rotated-tiled-preserve3d-clamped-expected.txt: Added.
* platform/ios-simulator-wk2/compositing/tiling/transform-origin-tiled-expected.txt: Added.

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

4 years agoSource/WebKit/win:
bfulgham@apple.com [Mon, 21 Mar 2016 22:22:16 +0000 (22:22 +0000)]
Source/WebKit/win:
[Win] Connect layoutTestController.findString() to support testing
https://bugs.webkit.org/show_bug.cgi?id=50234

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2016-03-21
Reviewed by Alex Christensen.

Implement WebView::findString to support testing efforts.

* Interfaces/IWebViewPrivate.idl: Add API declaration.
* WebView.cpp:
* WebView.h:

Tools:
[Win] Connect layoutTestController.findString() to support testing
https://bugs.webkit.org/show_bug.cgi?id=50234

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2016-03-21
Reviewed by Alex Christensen.

Implement TestRunner::findString().

* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::findString):

LayoutTests:
[Win] Connect layoutTestController.findString() to support testing
https://bugs.webkit.org/show_bug.cgi?id=50234

Patch by Hyungwook Lee <hyungwook.lee@navercorp.com> on 2016-03-21
Reviewed by Alex Christensen.

* platform/win/TestExpectations: Unskip test.
* platform/win/editing/text-iterator/findString-expected.txt: Added.

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

4 years agoUnreviewed, rolling out r197552.
cdumez@apple.com [Mon, 21 Mar 2016 22:07:33 +0000 (22:07 +0000)]
Unreviewed, rolling out r197552.

May have caused a ~2% PLT regression on iOS

Reverted changeset:

"Drop DocumentSharedObjectPool immediately when going into
PageCache."
https://bugs.webkit.org/show_bug.cgi?id=154986
http://trac.webkit.org/changeset/197552

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

4 years agov3 UI sometimes don't update the list of revisions on the commit log viewer
rniwa@webkit.org [Mon, 21 Mar 2016 20:54:27 +0000 (20:54 +0000)]
v3 UI sometimes don't update the list of revisions on the commit log viewer
https://bugs.webkit.org/show_bug.cgi?id=155729

Rubber-stamped by Chris Dumez.

Fixed multiple bugs that were affecting the list of blame range and commit logs for the range weren't
updated in some cases on v3 UI. Also, the commit log viewer state is now a part of the URL state so
opening and closing the commit log viewer will persist across page loads.

Also fixed a regression from r198479 that Test object can't be created for a top level test.

* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.configure):
(ChartPaneBase.prototype._mainSelectionDidChange): Fixed the bug that the list of blame range nor the
commit log viewer don't get updated when the selected range changes.
(ChartPaneBase.prototype._indicatorDidChange):
(ChartPaneBase.prototype._didFetchData):
(ChartPaneBase.prototype._updateStatus): Extracted from _indicatorDidChange and _didFetchData.
(ChartPaneBase.prototype._requestOpeningCommitViewer): Renamed from _openCommitViewer.

* public/v3/components/chart-status-view.js:
(ChartStatusView.prototype.updateStatusIfNeeded): Fixed the bug that the blame range doesn't get set
on the initial page load when the selection range is set but the chart data hadn't been fetched yet.

* public/v3/components/commit-log-viewer.js:
(CommitLogViewer.prototype.view): Fixed the bug that we don't clear out the old list of commits while
loading the next set of commits to show as it looked as if the list was never updated.
(CommitLogViewer.prototype.render): Fixed the bug that the view always show the last repository name
even if there were nothing being fetched or commits to show.

* public/v3/components/pane-selector.js:
(PaneSelector.prototype.focus): Removed superfluous call to console.log.

* public/v3/models/data-model.js:
(DataModelObject.listForStaticMap): Generalized the code for all to fix the bug in Test.
(DataModelObject.all):

* public/v3/models/test.js:
(Test): Fixed the bug that this code was relying on the static map to be an array.
(Test.topLevelTests): Use newly added listForStaticMap to convert the dictionary to an array.

* public/v3/pages/chart-pane-status-view.js:
(ChartPaneStatusView): Always initialize _usedRevisionRange as a triple to simplify code elsewhere.
(ChartPaneStatusView.prototype.render): Invoke _revisionCallback when user clicks on a repository
expansion mark (>>). Also fixed click handler from the row since this made selecting revision range
on the view cumbersome. Now user has to explicitly click on the expansion mark (>>).
(ChartPaneStatusView.prototype._setRevisionRange): Now takes shouldNotify, from, and to as arguments
as this function must not invoke_revisionCallback inside _updateRevisionListForNewCurrentRepository.
(ChartPaneStatusView.prototype.moveRepositoryWithNotification): Use newly added setCurrentRepository
instead of manually invoking setCurrentRepository and updateRevisionListWithNotification.
(ChartPaneStatusView.prototype.setCurrentRepository): Fixed the bug that we weren't updating the
blame list here.
(ChartPaneStatusView.prototype.updateRevisionList): Renamed from updateRevisionListWithNotification
since we no longer call _revisionCallback. In general, callbacks are only meant to communicate user
initiated actions, and not program induced updates like this API so this was a bad pattern anyway.
ChartPane now explicitly updates the commit log viewer instead of relying on this function calling
_requestOpeningCommitViewer implicitly.
(ChartPaneStatusView.prototype._updateRevisionListForNewCurrentRepository): Extracted from
updateRevisionListWithNotification so that setCurrentRepository can also call this function.

* public/v3/pages/chart-pane.js:
(ChartPane.prototype._requestOpeningCommitViewer): Overrides ChartPaneBase's method. Open the same
repository in other panes via ChartsPage.setOpenRepository.
(ChartPane.prototype.setOpenRepository): This method is called when the user selected a repository in
another pane. Open the same repository in this pane if it wasn't already open.

* public/v3/pages/charts-page.js:
(ChartsPage): Added this._currentRepositoryId.
(ChartsPage.prototype.serializeState): Serialize _currentRepositoryId.
(ChartsPage.prototype.updateFromSerializedState): Set the commit log viewer's
(ChartsPage.prototype.setOpenRepository): Added.

* tests/api-measurement-set.js: Fixed a test after r198479.

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

4 years agoVery flashy scrolling on http://quellish.tumblr.com page
simon.fraser@apple.com [Mon, 21 Mar 2016 20:23:23 +0000 (20:23 +0000)]
Very flashy scrolling on quellish.tumblr.com page
https://bugs.webkit.org/show_bug.cgi?id=155728
rdar://problem/22299375

Reviewed by Zalan Bujtas.

http://quellish.tumblr.com/post/126712999812/how-on-earth-the-facebook-ios-application-is-so
has many elements that are nested inside elements with non-equal corner radius clipping.
This requires building bezier paths for the rounded-rect clip which is expensive.

For many rows of the table, we can avoid the rounded-rect clipping because the intersection
of the paintDirtyRect and the clip is actually rectangular.

* platform/graphics/FloatRoundedRect.cpp:
(WebCore::FloatRoundedRect::intersectionIsRectangular):
* platform/graphics/FloatRoundedRect.h:
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::clipToRect):

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

4 years agoWeb Inspector search icon does not fit when zoomed in.
zalan@apple.com [Mon, 21 Mar 2016 20:13:25 +0000 (20:13 +0000)]
Web Inspector search icon does not fit when zoomed in.
https://bugs.webkit.org/show_bug.cgi?id=155708

Reviewed by Simon Fraser.

Adjusts the paint rect for the magnifier icon so that it fits even when zoomed in.

Source/WebCore:

Covered by existing tests.

* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::resultsButtonSizes):
(WebCore::RenderThemeMac::paintSearchFieldResultsButton):

LayoutTests:

* fast/forms/search/search-padding-cancel-results-buttons-expected.txt:
* platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt:
* platform/mac/fast/css/text-input-with-webkit-border-radius-expected.txt:
* platform/mac/fast/css/text-overflow-input-expected.txt:
* platform/mac/fast/forms/box-shadow-override-expected.txt:
* platform/mac/fast/forms/control-restrict-line-height-expected.txt:
* platform/mac/fast/forms/input-appearance-height-expected.txt:
* platform/mac/fast/forms/placeholder-position-expected.txt:
* platform/mac/fast/forms/placeholder-pseudo-style-expected.txt:
* platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt:
* platform/mac/fast/forms/search-display-none-cancel-button-expected.txt:
* platform/mac/fast/forms/search-rtl-expected.txt:
* platform/mac/fast/forms/search-styled-expected.txt:
* platform/mac/fast/forms/search-vertical-alignment-expected.txt:
* platform/mac/fast/forms/search/search-size-with-decorations-expected.txt:
* platform/mac/fast/forms/searchfield-heights-expected.txt:
* platform/mac/fast/repaint/search-field-cancel-expected.txt:
* platform/mac/fast/replaced/width100percent-searchfield-expected.txt:

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

4 years agoEnable preview of images as attachments.
enrica@apple.com [Mon, 21 Mar 2016 19:28:53 +0000 (19:28 +0000)]
Enable preview of images as attachments.
https://bugs.webkit.org/show_bug.cgi?id=155674
rdar://problem/25242656

Reviewed by Darin Adler.

If the client cannot handle image preview, but can handle attachments,
let them handle images as attachments.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

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

4 years agoV3 Perf Dashboard should automatically select initial range when creating a new task
rniwa@webkit.org [Mon, 21 Mar 2016 19:22:42 +0000 (19:22 +0000)]
V3 Perf Dashboard should automatically select initial range when creating a new task
https://bugs.webkit.org/show_bug.cgi?id=155677

Reviewed by Joseph Pecoraro.

Select the entire range of points for which the analysis task is created by default so that creating
a test group to confirm the regression / progression is easy.

* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage): Added a boolean flag which indicates the user had modified main chart's selection.
* public/v3/pages/analysis-task-page.js:
(AnalysisTaskPage.prototype.render): Set the main chart's selection to the entire range of points in
the analysis task if the user had never modified selection.
(AnalysisTaskPage.prototype._chartSelectionDidChange): This callback is invoked only when the user had
modified the selection so set _selectionWasModifiedByUser true here unconditionally.

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

4 years agoAdd a link to show debug data
jonlee@apple.com [Mon, 21 Mar 2016 18:09:12 +0000 (18:09 +0000)]
Add a link to show debug data
https://bugs.webkit.org/show_bug.cgi?id=155724

Reviewed by Simon Fraser.

* Animometer/developer.html: Attach the onclick handler to the score.
* Animometer/index.html: Ditto.

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

4 years ago[WinCairo][MediaFoundation] Crash when media player is destroyed.
peavo@outlook.com [Mon, 21 Mar 2016 17:54:19 +0000 (17:54 +0000)]
[WinCairo][MediaFoundation] Crash when media player is destroyed.
https://bugs.webkit.org/show_bug.cgi?id=155716

Reviewed by Alex Christensen.

Increase the reference count on the video presenter object in the ActivateObject method
to avoid referencing a deleted object when the media player is destroyed.

* platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
(WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::ActivateObject):

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

4 years agoAdd a WebRTC specific compile flag
eric.carlson@apple.com [Mon, 21 Mar 2016 17:52:29 +0000 (17:52 +0000)]
Add a WebRTC specific compile flag
https://bugs.webkit.org/show_bug.cgi?id=155663

.:

Reviewed by Jer Noble.

* Source/cmake/OptionsEfl.cmake:
* Source/cmake/OptionsGTK.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/WebCore:

Guard WebRTC-only files with ENABLE(WEB_RTC) rather than ENABLE(MEDIA_STREAM).

Reviewed by Jer Noble.

* Modules/mediastream/MediaEndpointPeerConnection.cpp:
* Modules/mediastream/MediaEndpointPeerConnection.h:
* Modules/mediastream/PeerConnectionBackend.h:
* Modules/mediastream/PeerConnectionStates.h:
* Modules/mediastream/RTCConfiguration.cpp:
* Modules/mediastream/RTCConfiguration.h:
* Modules/mediastream/RTCConfiguration.idl:
* Modules/mediastream/RTCDTMFSender.cpp:
* Modules/mediastream/RTCDTMFSender.h:
* Modules/mediastream/RTCDTMFSender.idl:
* Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
* Modules/mediastream/RTCDTMFToneChangeEvent.h:
* Modules/mediastream/RTCDTMFToneChangeEvent.idl:
* Modules/mediastream/RTCDataChannel.cpp:
* Modules/mediastream/RTCDataChannel.h:
* Modules/mediastream/RTCDataChannel.idl:
* Modules/mediastream/RTCDataChannelEvent.cpp:
* Modules/mediastream/RTCDataChannelEvent.h:
* Modules/mediastream/RTCDataChannelEvent.idl:
* Modules/mediastream/RTCIceCandidate.cpp:
* Modules/mediastream/RTCIceCandidate.h:
* Modules/mediastream/RTCIceCandidate.idl:
* Modules/mediastream/RTCIceCandidateEvent.cpp:
* Modules/mediastream/RTCIceCandidateEvent.h:
* Modules/mediastream/RTCIceCandidateEvent.idl:
* Modules/mediastream/RTCIceServer.h:
* Modules/mediastream/RTCIceServer.idl:
* Modules/mediastream/RTCOfferAnswerOptions.cpp:
* Modules/mediastream/RTCOfferAnswerOptions.h:
* Modules/mediastream/RTCPeerConnection.cpp:
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:
* Modules/mediastream/RTCPeerConnection.js:
(createOffer):
* Modules/mediastream/RTCPeerConnectionInternals.js:
* Modules/mediastream/RTCRtpReceiver.cpp:
* Modules/mediastream/RTCRtpReceiver.h:
* Modules/mediastream/RTCRtpReceiver.idl:
* Modules/mediastream/RTCRtpSender.cpp:
* Modules/mediastream/RTCRtpSender.h:
* Modules/mediastream/RTCRtpSender.idl:
* Modules/mediastream/RTCRtpSenderReceiverBase.h:
* Modules/mediastream/RTCSessionDescription.cpp:
* Modules/mediastream/RTCSessionDescription.h:
* Modules/mediastream/RTCSessionDescription.idl:
* Modules/mediastream/RTCStatsReport.cpp:
* Modules/mediastream/RTCStatsReport.idl:
* Modules/mediastream/RTCStatsResponse.cpp:
* Modules/mediastream/RTCStatsResponse.idl:
* Modules/mediastream/RTCTrackEvent.cpp:
* Modules/mediastream/RTCTrackEvent.h:
* Modules/mediastream/RTCTrackEvent.idl:
* Modules/mediastream/SDPProcessor.cpp:
* Modules/mediastream/SDPProcessor.h:
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures):
* bindings/generic/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::webkitGetUserMediaEnabled):
(WebCore::RuntimeEnabledFeatures::webkitMediaStreamEnabled):
(WebCore::RuntimeEnabledFeatures::peerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled):
(WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::addBuiltinGlobals):
* bindings/js/JSDictionary.cpp:
(WebCore::JSDictionary::convertValue):
* bindings/js/JSDictionary.h:
* bindings/js/JSRTCIceCandidateCustom.cpp:
* bindings/js/JSRTCPeerConnectionCustom.cpp:
* bindings/js/JSRTCSessionDescriptionCustom.cpp:
* bindings/js/JSRTCStatsResponseCustom.cpp:
* bindings/js/WebCoreJSBuiltinInternals.cpp:
(WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
(WebCore::JSBuiltinInternalFunctions::visit):
(WebCore::JSBuiltinInternalFunctions::initialize):
* bindings/js/WebCoreJSBuiltinInternals.h:
(WebCore::JSBuiltinInternalFunctions::rtcPeerConnectionInternals):
* bindings/js/WebCoreJSBuiltins.h:
(WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
(WebCore::JSBuiltinFunctions::mediaDevicesBuiltins):
(WebCore::JSBuiltinFunctions::navigatorUserMediaBuiltins):
(WebCore::JSBuiltinFunctions::rtcPeerConnectionBuiltins):
(WebCore::JSBuiltinFunctions::rtcPeerConnectionInternalsBuiltins):
* dom/EventNames.in:
* dom/EventTargetFactory.in:
* loader/FrameLoaderClient.h:
* platform/mediastream/IceCandidate.h:
* platform/mediastream/MediaEndpoint.cpp:
* platform/mediastream/MediaEndpoint.h:
* platform/mediastream/MediaEndpointConfiguration.cpp:
* platform/mediastream/MediaEndpointConfiguration.h:
* platform/mediastream/MediaEndpointSessionConfiguration.h:
* platform/mediastream/MediaPayload.h:
* platform/mediastream/PeerMediaDescription.h:
* platform/mediastream/RTCConfigurationPrivate.h:
* platform/mediastream/RTCDTMFSenderHandler.h:
* platform/mediastream/RTCDTMFSenderHandlerClient.h:
* platform/mediastream/RTCDataChannelHandler.h:
* platform/mediastream/RTCDataChannelHandlerClient.h:
* platform/mediastream/RTCIceCandidateDescriptor.cpp:
* platform/mediastream/RTCIceCandidateDescriptor.h:
* platform/mediastream/RTCIceServerPrivate.h:
* platform/mediastream/RTCPeerConnectionHandler.cpp:
* platform/mediastream/RTCPeerConnectionHandler.h:
* platform/mediastream/RTCPeerConnectionHandlerClient.h:
* platform/mediastream/RTCSessionDescriptionDescriptor.cpp:
* platform/mediastream/RTCSessionDescriptionDescriptor.h:
* platform/mediastream/RTCSessionDescriptionRequest.h:
* platform/mediastream/RTCStatsRequest.h:
* platform/mediastream/RTCStatsResponseBase.h:
* platform/mediastream/RTCVoidRequest.h:
* platform/mediastream/SDPProcessorScriptResource.cpp:
* platform/mediastream/SDPProcessorScriptResource.h:
* platform/mock/MockMediaEndpoint.cpp:
* platform/mock/MockMediaEndpoint.h:
* platform/mock/RTCDTMFSenderHandlerMock.cpp:
* platform/mock/RTCDTMFSenderHandlerMock.h:
* platform/mock/RTCDataChannelHandlerMock.cpp:
* platform/mock/RTCDataChannelHandlerMock.h:
* platform/mock/RTCNotifiersMock.cpp:
* platform/mock/RTCNotifiersMock.h:
* platform/mock/RTCPeerConnectionHandlerMock.cpp:
* platform/mock/RTCPeerConnectionHandlerMock.h:
* platform/mock/TimerEventBasedMock.h:
(WebCore::RenderLayerBacking::paintIntoLayer):
* testing/Internals.cpp:
(WebCore::Internals::Internals):
(WebCore::Internals::enableMockSpeechSynthesizer):
(WebCore::Internals::enableMockMediaEndpoint):
(WebCore::Internals::enableMockRTCPeerConnectionHandler):
(WebCore::Internals::setMockMediaCaptureDevicesEnabled):
* testing/Internals.h:

LayoutTests:

Reviewed by Jer Noble.

* platform/mac-mavericks/js/dom/global-constructors-attributes-expected.txt:
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
* platform/mac/js/dom/global-constructors-attributes-expected.txt:

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

4 years agoMoving the -expected.txt file for accessibility/radio-button-group-members.html
ryanhaddad@apple.com [Mon, 21 Mar 2016 17:47:14 +0000 (17:47 +0000)]
Moving the -expected.txt file for accessibility/radio-button-group-members.html

Unreviewed test gardening.

* accessibility/radio-button-group-members-expected.txt: Renamed from LayoutTests/accessibility/mac/radio-button-group-members-expected.txt.

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

4 years agoFixed compilation with GCC 4.8.
commit-queue@webkit.org [Mon, 21 Mar 2016 17:17:30 +0000 (17:17 +0000)]
Fixed compilation with GCC 4.8.
https://bugs.webkit.org/show_bug.cgi?id=155698

Patch by Konstantin Tokarev <annulen@yandex.ru> on 2016-03-21
Reviewed by Alexey Proskuryakov.

GCC 4.8 does not allow aggregate initialization for type with deleted
constructor, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52707.

* dfg/DFGCSEPhase.cpp: Added ctor for ImpureDataSlot.

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

4 years agoMarking two inspector tests as flaky timeouts on Mac.
ryanhaddad@apple.com [Mon, 21 Mar 2016 17:10:39 +0000 (17:10 +0000)]
Marking two inspector tests as flaky timeouts on Mac.
https://bugs.webkit.org/show_bug.cgi?id=155607

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

4 years ago[JSC] Add ArrayBuffer::tryCreate and change the callsites where it is needed
jh718.park@samsung.com [Mon, 21 Mar 2016 15:59:20 +0000 (15:59 +0000)]
[JSC] Add ArrayBuffer::tryCreate and change the callsites where it is needed
https://bugs.webkit.org/show_bug.cgi?id=155328

Reviewed by Darin Adler.

Source/JavaScriptCore:

* API/JSTypedArray.cpp:
(JSObjectMakeTypedArray):
(JSObjectMakeArrayBufferWithBytesNoCopy):
* runtime/ArrayBuffer.h:
(JSC::ArrayBuffer::create):
(JSC::ArrayBuffer::tryCreate):
(JSC::ArrayBuffer::createUninitialized):
(JSC::ArrayBuffer::tryCreateUninitialized):
(JSC::ArrayBuffer::createInternal):
* runtime/GenericTypedArrayViewInlines.h:
(JSC::GenericTypedArrayView<Adaptor>::create):
(JSC::GenericTypedArrayView<Adaptor>::createUninitialized):
* runtime/JSArrayBufferConstructor.cpp:
(JSC::constructArrayBuffer):

Source/WebCore:

No new tests, no new behaviours.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::processIfEmptyOrDisturbed):
(WebCore::FetchBody::consumeText):
* Modules/fetch/FetchLoader.cpp:
(WebCore::FetchLoader::didFinishLoading):
* bindings/js/JSDOMPromise.h:
(WebCore::char>>):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
* dom/MessageEvent.h:
* fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::didReceiveResponse):
(WebCore::FileReaderLoader::didReceiveData):
(WebCore::FileReaderLoader::arrayBufferResult):
* html/canvas/WebGLBuffer.cpp:
(WebCore::WebGLBuffer::associateBufferDataImpl):
* html/track/DataCue.cpp:
(WebCore::DataCue::DataCue):
(WebCore::DataCue::data):
(WebCore::DataCue::setData):
(WebCore::DataCue::cueContentsMatch):
* html/track/DataCue.h:
* html/track/InbandDataTextTrack.cpp:
(WebCore::InbandDataTextTrack::addDataCue):
(WebCore::InbandDataTextTrack::removeCue):
* platform/mac/SerializedPlatformRepresentationMac.mm:
(WebCore::jsValueWithDataInContext):

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

4 years agoUnreviewed.
youenn.fablet@crf.canon.fr [Mon, 21 Mar 2016 12:58:24 +0000 (12:58 +0000)]
Unreviewed.
Marking imported/w3c/web-platform-tests/streams/readable-streams/garbage-collection-2.html as flaky (Pass, Crash)

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

4 years ago[css-grid] Fix percentage tracks' size computation in grids with gutters
svillar@igalia.com [Mon, 21 Mar 2016 10:42:33 +0000 (10:42 +0000)]
[css-grid] Fix percentage tracks' size computation in grids with gutters
https://bugs.webkit.org/show_bug.cgi?id=153825

Reviewed by Darin Adler.

Source/WebCore:

The track sizing algorithm is passed an available size
(freeSpace in the code) where to size the tracks. The total size of the grid
gutters was pre-removed from that available size because we cannot use it to size
the tracks. However that available size is also used to compute the size of
percentage tracks. As we're removing the size of the gutters, the base size for
percentage computations is smaller than it should be.

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):

LayoutTests:

* fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt:
* fast/css-grid-layout/grid-gutters-and-flex-content.html:
* fast/css-grid-layout/grid-gutters-and-tracks-expected.txt:
* fast/css-grid-layout/grid-gutters-and-tracks.html:

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

4 years ago[GTK] scrollbar thumb clipped in 2.11.92
carlosgc@webkit.org [Mon, 21 Mar 2016 09:18:30 +0000 (09:18 +0000)]
[GTK] scrollbar thumb clipped in 2.11.92
https://bugs.webkit.org/show_bug.cgi?id=155586

Reviewed by Michael Catanzaro.

In the current version of Adwaita, the scrollbar itself also has a
one pixel border that we are not taking into account.

* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::paintThumb): Use the scrollbar size
in indicator mode, instead of only the thumb size, to correctly
position the thumb in indicator mode.

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

4 years agoReduce uses of PassRefPtr in WebCore/dom - 6
gyuyoung.kim@webkit.org [Mon, 21 Mar 2016 06:05:49 +0000 (06:05 +0000)]
Reduce uses of PassRefPtr in WebCore/dom - 6
https://bugs.webkit.org/show_bug.cgi?id=155579

Reviewed by Darin Adler.

* dom/MessagePortChannel.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::EventData::EventData):
(WebCore::MessagePortChannel::createChannel):
(WebCore::MessagePortChannel::MessagePortChannel):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::PlatformMessagePortChannel::create):
(WebCore::PlatformMessagePortChannel::PlatformMessagePortChannel):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::EventData::message):

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

4 years agoThe setter of binaryType attribute in WebSocket should raise the exception.
commit-queue@webkit.org [Mon, 21 Mar 2016 05:28:21 +0000 (05:28 +0000)]
The setter of binaryType attribute in WebSocket should raise the exception.
https://bugs.webkit.org/show_bug.cgi?id=135874

Patch by Jinwoo Jeong <jw00.jeong@samsung.com> on 2016-03-20
Reviewed by Antonio Gomes.

Source/WebCore:

According to W3C WebSocket Specification, <https://www.w3.org/TR/2012/CR-websockets-20120920/>
when an invalid value is set on binaryType of WebSocket, a SyntaxError should be raised.

* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::setBinaryType): Add a parameter to set an exception.
* Modules/websockets/WebSocket.h: Ditto.
* Modules/websockets/WebSocket.idl: Update that setter of binaryType could raise an exception.

LayoutTests:

According to W3C WebSocket Specification, <https://www.w3.org/TR/2012/CR-websockets-20120920/>,
when an invalid value is set on binaryType of WebSocket, a SyntaxError should be raised.

* http/tests/websocket/tests/hybi/binary-type.html: Catch a syntax exception when binary type is set with invalid values.

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

4 years ago[Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather...
mitz@apple.com [Mon, 21 Mar 2016 05:11:38 +0000 (05:11 +0000)]
[Mac] Determine TARGET_MAC_OS_X_VERSION_MAJOR from MACOSX_DEPLOYMENT_TARGET rather than from MAC_OS_X_VERSION_MAJOR
https://bugs.webkit.org/show_bug.cgi?id=155707
<rdar://problem/24980691>

Reviewed by Darin Adler.

Source/bmalloc:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Source/JavaScriptCore:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Source/ThirdParty/ANGLE:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Source/WebCore:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Source/WebInspectorUI:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Source/WebKit/mac:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Source/WebKit2:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Source/WTF:

* Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR based on the last
  component of MACOSX_DEPLOYMENT_TARGET.
* Configurations/DebugRelease.xcconfig: For engineering builds, preserve the behavior of
  TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Tools:

* ContentExtensionTester/Configurations/Base.xcconfig: Set TARGET_MAC_OS_X_VERSION_MAJOR
  based on the last component of MACOSX_DEPLOYMENT_TARGET.
* ContentExtensionTester/Configurations/DebugRelease.xcconfig: For engineering builds,
  preserve the behavior of TARGET_MAC_OS_X_VERSION_MAJOR being the host’s OS version.

Similarly for these projects:

* DumpRenderTree/mac/Configurations/Base.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* LayoutTestRelay/Configurations/Base.xcconfig:
* LayoutTestRelay/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* WebEditingTester/Configurations/Base.xcconfig:
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:

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

4 years agoAdded implementations of AXObjectCache methods for !HAVE(ACCESSIBILITY).
commit-queue@webkit.org [Mon, 21 Mar 2016 01:26:13 +0000 (01:26 +0000)]
Added implementations of AXObjectCache methods for !HAVE(ACCESSIBILITY).
https://bugs.webkit.org/show_bug.cgi?id=155697

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

No new tests needed.

* accessibility/AXObjectCache.h:
(WebCore::AXObjectCache::rangeForUnorderedCharacterOffsets):
(WebCore::AXObjectCache::absoluteCaretBoundsForCharacterOffset):
(WebCore::AXObjectCache::characterOffsetForIndex):
(WebCore::AXObjectCache::startOrEndCharacterOffsetForRange):
(WebCore::AXObjectCache::endCharacterOffsetOfLine):
(WebCore::AXObjectCache::nextCharacterOffset):
(WebCore::AXObjectCache::previousCharacterOffset):

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

4 years agoAssociated commits don't immediately show up on an analysis task page
rniwa@webkit.org [Mon, 21 Mar 2016 00:57:01 +0000 (00:57 +0000)]
Associated commits don't immediately show up on an analysis task page
https://bugs.webkit.org/show_bug.cgi?id=155692

Reviewed by Darin Adler.

The bug was caused by resolveCommits in AnalysisTask._constructAnalysisTasksFromRawData not being
able to find the matching commit log if the commit log had been created by the charts which don't
set the remote identifiers on each CommitLog objects.

Fixed the bug by modifying /api/measurement-set to include the commit ID, and making CommitLog
use the real database ID as its ID instead of a fake ID we create from repository and revision.

Also added a bunch of Mocha unit tests for AnalysisTask.fetchAll.

* public/api/measurement-set.php:
(MeasurementSetFetcher::execute_query): Fetch commit_id.
(MeasurementSetFetcher::format_run): Use pass-by-reference to avoid making a copy of the row.
(MeasurementSetFetcher::parse_revisions_array): Include commit_id as the first item in the result.
* public/v3/instrumentation.js:
* public/v3/models/analysis-task.js:
(AnalysisTask): Fixed a bug that _buildRequestCount and _finishedBuildRequestCount could be kept
as strings and hasPendingRequests() could return a wrong result because it would perform string
inequality instead of numerical inequality.
(AnalysisTask.prototype.updateSingleton): Ditto.
(AnalysisTask.prototype.dissociateCommit):
(AnalysisTask._constructAnalysisTasksFromRawData):
(AnalysisTask._constructAnalysisTasksFromRawData.resolveCommits): Use findById now that CommitLog
objects all use the same id as the database id.
* public/v3/models/commit-log.js:
(CommitLog):
(CommitLog.prototype.remoteId): Deleted since we no longer create a fake id for commit logs for
measurement sets.
(CommitLog.findByRemoteId): Deleted.
(CommitLog.ensureSingleton): Deleted.
(CommitLog.fetchBetweenRevisions):

* public/v3/models/data-model.js:
(DataModelObject.clearStaticMap): Added to aid unit testing.
(DataModelObject.ensureNamedStaticMap): Fixed a typo. Each map is a dictionary, not an array.
* public/v3/models/metric.js:
* public/v3/models/platform.js:
* public/v3/models/root-set.js:
(RootSet): Updated per the interface change in CommitLog.ensureSingleton.
(MeasurementRootSet): Updated per /api/measurement-set change. Use the first value as the id.
* public/v3/models/test.js:
* unit-tests/analysis-task-tests.js: Added.
(sampleAnalysisTask):
(measurementCluster):
* unit-tests/checkconfig.js: Added some assertion message to help aid diagnosing the failure.
* unit-tests/measurement-adaptor-tests.js: Updated the sample data per the API change in
/api/measurement-set and also added assertions for commit log ids.
* unit-tests/measurement-set-tests.js:
(beforeEach):
* unit-tests/resources: Added.
* unit-tests/resources/mock-remote-api.js: Added. Extracted from measurement-set-tests.js to be
used in analysis-task-tests.js.
(assert.notReached.assert.notReached):
(global.RemoteAPI.getJSON):
(global.RemoteAPI.getJSONWithStatus):
(beforeEach):
* unit-tests/resources/v3-models.js: Added. Extracted from measurement-set-tests.js to be used in
analysis-task-tests.js and added more imports as needed.
(importFromV3):
(beforeEach):

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

4 years agoCrash in stress/regexp-matches-array-slow-put.js due to stomping on memory when havin...
msaboff@apple.com [Sun, 20 Mar 2016 23:08:51 +0000 (23:08 +0000)]
Crash in stress/regexp-matches-array-slow-put.js due to stomping on memory when having bad time
https://bugs.webkit.org/show_bug.cgi?id=155679

Reviewed by Saam Barati.

Allocate out of line storage based on what the structure says it needs
in JSArray::tryCreateUninitialized.

* runtime/JSArray.h:
(JSC::JSArray::tryCreateUninitialized):

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

4 years agoCrash on DFG::WorkList thread in JSC::Heap::isCollecting for destroyed Web Worker
joepeck@webkit.org [Sun, 20 Mar 2016 22:42:32 +0000 (22:42 +0000)]
Crash on DFG::WorkList thread in JSC::Heap::isCollecting for destroyed Web Worker
https://bugs.webkit.org/show_bug.cgi?id=155678
<rdar://problem/25251439>

Reviewed by Filip Pizlo.

This fixes a crash that we saw with GuardMalloc. If the Plan was
Cancelled it may not be safe to access the VM. If the Plan was
cancelled we are just going to bail anyways, so keep the ASSERT but
short-circuit if the plan was Cancelled.

* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::runThread):

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

4 years agoDisable Caches in Safari's Develop menu does not disable caches.
darin@apple.com [Sun, 20 Mar 2016 20:08:59 +0000 (20:08 +0000)]
Disable Caches in Safari's Develop menu does not disable caches.
https://bugs.webkit.org/show_bug.cgi?id=64483

Reviewed by Antti Koivisto.

Source/WebCore:

Moved feature from Settings to Page.

* history/PageCache.cpp:
(WebCore::canCachePage): Use function on Page instead of Settings.
(WebCore::PageCache::take): Ditto.
(WebCore::PageCache::get): Ditto.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::subresourceCachePolicy): Ditto.
(WebCore::FrameLoader::addExtraFieldsToRequest): Ditto.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::cachePolicy): Ditto.

* page/Page.h:
(WebCore::Page::isResourceCachingDisabled): Added.
(WebCore::Page::setResourceCachingDisabled): Added.

* page/Settings.in: Removed resourceCachingDisabled.

Source/WebKit/mac:

Removed unneeded WebPreferences property; we don't need this for Legacy WebKit.

* WebView/WebPreferenceKeysPrivate.h: Removed
WebKitResourceCachingDisabledPreferenceKey.
* WebView/WebPreferences.mm:
(-[WebPreferences isResourceCachingDisabled]): Deleted.
(-[WebPreferences setResourceCachingDisabled:]): Deleted.
* WebView/WebPreferencesPrivate.h: Removed resourceCachingDisabled property.
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]): Removed code to update resourceCachingDisabled.

Source/WebKit2:

Moved functions from WKPreferences to WKPage.

* Shared/WebPreferencesDefinitions.h: Removed ResourceCachingDisabled.

* UIProcess/API/C/WKPage.cpp:
(WKPageGetResourceCachingDisabled): Added.
(WKPageSetResourceCachingDisabled): Added.
* UIProcess/API/C/WKPagePrivate.h: Added above functions.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetResourceCachingDisabled): Deleted.
(WKPreferencesGetResourceCachingDisabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h: Deleted above functions.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setResourceCachingDisabled): Added.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isResourceCachingDisabled): Added.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Removed code to set the setting
for resourceCachingDisabled..
(WebKit::WebPage::setResourceCachingDisabled): Added.
* WebProcess/WebPage/WebPage.h: Declared setResourceCachingDisabled.
* WebProcess/WebPage/WebPage.messages.in: Added SetResourceCachingDisabled.

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

4 years agoUpdate build settings
mitz@apple.com [Sun, 20 Mar 2016 17:20:45 +0000 (17:20 +0000)]
Update build settings

Rubber-stamped by Andy Estes.

Source/bmalloc:

* Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

Source/ThirdParty/ANGLE:

* Configurations/DebugRelease.xcconfig:

Source/WebCore:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

Source/WebInspectorUI:

* Configurations/DebugRelease.xcconfig:
* Configurations/Version.xcconfig:

Source/WebKit/mac:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

Source/WebKit2:

* Configurations/DebugRelease.xcconfig:
* Configurations/FeatureDefines.xcconfig:
* Configurations/Version.xcconfig:

Source/WTF:

* Configurations/DebugRelease.xcconfig:

Tools:

* ContentExtensionTester/Configurations/DebugRelease.xcconfig:
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
* LayoutTestRelay/Configurations/DebugRelease.xcconfig:
* MiniBrowser/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/DebugRelease.xcconfig:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Synced up to the ones in ../Source.
* WebEditingTester/Configurations/DebugRelease.xcconfig:
* WebKitTestRunner/Configurations/DebugRelease.xcconfig:
* asan/asan.xcconfig:

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

4 years agoAX: Radio button members are not identified together in all cases
cfleizach@apple.com [Sun, 20 Mar 2016 15:21:33 +0000 (15:21 +0000)]
AX: Radio button members are not identified together in all cases
https://bugs.webkit.org/show_bug.cgi?id=155604
<rdar://problem/21186992>

Reviewed by Darin Adler.

Source/WebCore:

Allow aria radio buttons to be grouped together as linked ui elements even if they're not input types of radio button.

Modified test: accessibility/radio-button-group-members.html

* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::speakProperty):
(WebCore::AccessibilityRenderObject::addRadioButtonGroupChildren):
(WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
* accessibility/AccessibilityRenderObject.h:

LayoutTests:

* accessibility/mac/radio-button-group-members-expected.txt: Added.
* accessibility/radio-button-group-members.html:
* platform/mac/accessibility/radio-button-group-members-expected.txt: Removed.

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

4 years agoPurge PassRefPtr from WebCore/html/shadow
jh718.park@samsung.com [Sun, 20 Mar 2016 01:57:33 +0000 (01:57 +0000)]
Purge PassRefPtr from WebCore/html/shadow
https://bugs.webkit.org/show_bug.cgi?id=155681

Reviewed by Darin Adler.

No new tests, no new behaviours.

* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::updateImageControls):
(WebCore::HTMLImageElement::tryCreateImageControls):
(WebCore::HTMLImageElement::createImageControls): Deleted.
* html/HTMLImageElement.h:
* html/shadow/ImageControlsRootElement.h:
* html/shadow/MediaControls.h:
* html/shadow/MediaControlsApple.cpp:
(WebCore::MediaControls::tryCreate):
(WebCore::MediaControlsApple::tryCreateControls):
(WebCore::MediaControlsApple::showClosedCaptionTrackList):
(WebCore::MediaControlsApple::hideClosedCaptionTrackList):
(WebCore::MediaControlsApple::eventListener):
(WebCore::MediaControls::create): Deleted.
(WebCore::MediaControlsApple::createControls): Deleted.
* html/shadow/MediaControlsApple.h:
* html/shadow/mac/ImageControlsButtonElementMac.cpp:
(WebCore::ImageControlsButtonElementMac::tryCreate):
(WebCore::ImageControlsButtonElementMac::maybeCreate): Deleted.
* html/shadow/mac/ImageControlsButtonElementMac.h:
* html/shadow/mac/ImageControlsRootElementMac.cpp:
(WebCore::ImageControlsRootElement::tryCreate):
(WebCore::ImageControlsRootElement::maybeCreate): Deleted.

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

4 years ago[ES6] Arrow function syntax. Update syntax error text 'super is only valid inside...
gskachkov@gmail.com [Sat, 19 Mar 2016 21:16:23 +0000 (21:16 +0000)]
[ES6] Arrow function syntax. Update syntax error text 'super is only valid inside functions' to more suitable
https://bugs.webkit.org/show_bug.cgi?id=155491

Reviewed by Saam Barati.

Source/JavaScriptCore:

Current message 'super is only valid inside of funcitons' is not correct
after patch for https://bugs.webkit.org/show_bug.cgi?id=153864 because
it is allow to use 'super' in eval. Current patch replace old message by
'Super is only valid inside functions or 'eval' inside a function' and
fix tests that rely on this message.

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseMemberExpression):
* tests/stress/generator-with-super.js:
(shouldThrow):
* tests/stress/modules-syntax-error.js:
* tests/stress/super-in-lexical-scope.js:
* tests/stress/tagged-templates-syntax.js:

LayoutTests:

* js/class-syntax-super-expected.txt:
* js/script-tests/class-syntax-super.js:
* sputnik/Conformance/07_Lexical_Conventions/7.5_Tokens/7.5.3_Future_Reserved_Words/S7.5.3_A1.27-expected.txt:

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

4 years agoData URL DecodeTask may get deleted outside main thread
antti@apple.com [Sat, 19 Mar 2016 18:54:02 +0000 (18:54 +0000)]
Data URL DecodeTask may get deleted outside main thread
https://bugs.webkit.org/show_bug.cgi?id=155584
rdar://problem/24492104

Reviewed by David Kilzer.

Follow-up: fix a possible null pointer crash.

* platform/network/DataURLDecoder.cpp:
(WebCore::DataURLDecoder::DecodingResultDispatcher::startTimer):

    If timer fires under startOneShot m_decodeTask may become zero before schedule() is called.
    Fix by copying schedule context to a local before calling startOneShot.

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

4 years agoAdd a setting to let the client toggle support for network cache speculative validation
cdumez@apple.com [Sat, 19 Mar 2016 18:46:50 +0000 (18:46 +0000)]
Add a setting to let the client toggle support for network cache speculative validation
https://bugs.webkit.org/show_bug.cgi?id=155622
<rdar://problem/25233209>

Reviewed by Darin Adler.

Add SPI to toggle support for network cache speculative validation.
Enable network cache speculative validation by default for now, until
I have a chance to update the clients to use the new SPI.

* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDiskCacheSpeculativeValidationEnabled):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration diskCacheSpeculativeValidationEnabled]):
(-[_WKProcessPoolConfiguration setDiskCacheSpeculativeValidationEnabled:]):
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::WebProcessPool::platformInitializeNetworkProcess):

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

4 years agoES6 spec requires that ErrorPrototype not be an Error object.
mark.lam@apple.com [Sat, 19 Mar 2016 18:13:42 +0000 (18:13 +0000)]
ES6 spec requires that ErrorPrototype not be an Error object.
https://bugs.webkit.org/show_bug.cgi?id=155680

Reviewed by Michael Saboff.

Source/JavaScriptCore:

The ES6 spec states that Error.prototype should not be an instance of Error:
https://tc39.github.io/ecma262/#sec-properties-of-the-error-prototype-object

"The Error prototype object is an ordinary object. It is not an Error instance
and does not have an [[ErrorData]] internal slot."

This patch changes ErrorPrototype to conform to the above specification.

* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::finishCreation):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
(JSC::ErrorPrototype::finishCreation):
(JSC::ErrorPrototype::getOwnPropertySlot):
* runtime/ErrorPrototype.h:
(JSC::ErrorPrototype::create):

* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::finishCreation):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
(JSC::NativeErrorPrototype::finishCreation):
* runtime/NativeErrorPrototype.h:
(JSC::NativeErrorPrototype::create):
- updated to no longer need a JSGlobalObject argument.

* tests/es6/miscellaneous_built-in_prototypes_are_not_instances.js:
- updated to match the kangax version of this test.

LayoutTests:

Updated the appropriate tests to expect the toString() value of Error.prototype
to now be "[object Object]" instead of "[object Error]".  Also rebased the test
results accordingly.

* fast/dom/DOMException/prototype-object-expected.txt:
* fast/dom/DOMException/prototype-object.html:
* js/dom/native-error-prototype-expected.txt:
* js/dom/script-tests/native-error-prototype.js:
* sputnik/Conformance/15_Native_Objects/15.11_Error/15.11.4/S15.11.4_A2.html:

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