⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Timeline



Sep 21, 2016:

11:07 PM Changeset in webkit [206251] by bshafiei@apple.com
  • 5 edits in tags/Safari-603.1.6.0.1/Source

Versioning.

11:03 PM Changeset in webkit [206250] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.6.0.1

New tag.

11:01 PM Changeset in webkit [206249] by ap@apple.com
  • 6 edits in trunk/Source

Rolling out r206244, as it caused flaky crashes on tests.
Was: Correct uses of 'safeCast'

Source/WebCore:

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::adjustSize):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::destroyMetadataAndNotify):
(WebCore::BitmapImage::cacheFrame):
(WebCore::BitmapImage::didDecodeProperties):
(WebCore::BitmapImage::dataChanged):
(WebCore::BitmapImage::frameImageAtIndex):

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::decodedSizeChanged):
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):

Source/WTF:

  • wtf/StdLibExtras.h:

(WTF::safeCast):

10:19 PM Changeset in webkit [206248] by jiewen_tan@apple.com
  • 3 edits in trunk/LayoutTests

Unreviewed, update ios-simulator-wk1 test expectations

  • platform/ios-simulator-wk1/TestExpectations:
  • platform/ios-simulator/TestExpectations:
10:03 PM Changeset in webkit [206247] by mitz@apple.com
  • 6 edits in trunk

[macOS] Upon layout, _webView:renderingProgressDidChange: fires before the intrinsic content size is updated
https://bugs.webkit.org/show_bug.cgi?id=162359
<rdar://problem/27776454>

Reviewed by Tim Horton.

Source/WebKit2:

Test: added to TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: Fixed a bug where m_pendingNewlyReachedLayoutMilestones was never initialized.
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Added m_pendingNewlyReachedLayoutMilestones member variable to this derived class as well.
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers): If we have pending milestones, notify

the WebPageProxy now, after any content size changes have been sent.

(WebKit::TiledCoreAnimationDrawingArea::dispatchDidReachLayoutMilestone): New override that

accumulates the milestones into m_pendingNewlyReachedLayoutMilestones and returns true,
so that the caller won’t notify the WebPageProxy immediately.

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/AutoLayoutIntegration.mm:

(TEST):

9:36 PM Changeset in webkit [206246] by Chris Dumez
  • 6 edits
    2 adds in trunk

Fix serialization of bgsound, keygen and track elements
https://bugs.webkit.org/show_bug.cgi?id=162353

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C tests now that more checks are passing.

  • web-platform-tests/html/syntax/serializing-html-fragments/outerHTML-expected.txt:
  • web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt:
  • web-platform-tests/html/syntax/serializing-xml-fragments/outerHTML-expected.txt:

Source/WebCore:

Fix serialization of keygen and track elements to match the specification:

They are not supposed to have an end tag. Firefox and Chrome agree with
the specification.

No new tests, rebaselined existing tests.

  • editing/MarkupAccumulator.cpp:

(WebCore::MarkupAccumulator::elementCannotHaveEndTag):

9:32 PM Changeset in webkit [206245] by keith_miller@apple.com
  • 22 edits in trunk

Fix build for future versions of Clang.
https://bugs.webkit.org/show_bug.cgi?id=162346

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

  • runtime/VM.h:

(JSC::VM::setGlobalConstRedeclarationShouldThrow):

Source/WebCore:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

  • Configurations/WebCore.unexp:
  • dom/Exception.h:
  • page/Frame.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebVideoFullscreenModelVideoElement.h:

(WebCore::WebVideoFullscreenModelVideoElement::videoElement):

  • platform/graphics/Color.h:
  • platform/graphics/transforms/TransformationMatrix.h:

(WebCore::TransformationMatrix::rotate):

  • platform/mac/WebVideoFullscreenInterfaceMac.h:
  • platform/network/ParsedContentRange.h:

(WebCore::ParsedContentRange::ParsedContentRange):
(WebCore::ParsedContentRange::isValid):

  • platform/network/ResourceResponseBase.h:

(WebCore::ResourceResponseBase::certificateInfo):

  • platform/text/TextStream.h:

(WebCore::TextStream::increaseIndent):
(WebCore::TextStream::decreaseIndent):

Source/WTF:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

  • wtf/text/StringImpl.h:

Tools:

  • TestWebKitAPI/Counters.cpp:
  • TestWebKitAPI/Counters.h:

(DeleterCounter::deleterCount):
(DeleterCounter::TestingScope::TestingScope):
(DeleterCounter::operator()):

  • TestWebKitAPI/Tests/WTF/HashCountedSet.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/HashMap.cpp:

(TestWebKitAPI::TEST):

6:23 PM Changeset in webkit [206244] by Brent Fulgham
  • 6 edits in trunk/Source

Correct uses of 'safeCast'
https://bugs.webkit.org/show_bug.cgi?id=162301
<rdar://problem/28343658>

Reviewed by Antti Koivisto.

Source/WebCore:

A number of integer calculations in BitmapImage and PDFDocumentImage
are not properly checked for overflow. Correct this.

Tested by fast/images/large-size-image-crash.html

  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::adjustSize): RELEASE_ASSERT on overflow.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::destroyMetadataAndNotify):
(WebCore::BitmapImage::cacheFrame):
(WebCore::BitmapImage::didDecodeProperties):
(WebCore::BitmapImage::dataChanged):
(WebCore::BitmapImage::ensureFrameAtIndexIsCached):
(WebCore::BitmapImage::frameImageAtIndex):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::decodedSizeChanged):
(WebCore::PDFDocumentImage::updateCachedImageIfNeeded):

Source/WTF:

  • wtf/StdLibExtras.h:

(WTF::safeCast): RELEASE_ASSERT on overflow.

4:50 PM Changeset in webkit [206243] by Chris Dumez
  • 11 edits in trunk

Setting HTMLMeterElement's attributes to non-finite values throws wrong exception type
https://bugs.webkit.org/show_bug.cgi?id=162364

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Merge meter test changes from https://github.com/w3c/web-platform-tests/pull/3791.

  • web-platform-tests/html/semantics/forms/the-meter-element/meter-expected.txt:
  • web-platform-tests/html/semantics/forms/the-meter-element/meter.html:

Source/WebCore:

Setting HTMLMeterElement's attributes to non-finite values throws wrong exception type.
It should throw a TypeError because their type is 'double' but we throw a
NOT_SUPPORTED_ERR.

Specification:

Firefox and Chrome agree with the specification.

No new tests, updated existing test.

  • html/HTMLMeterElement.cpp:

(WebCore::HTMLMeterElement::setMin):
(WebCore::HTMLMeterElement::setMax):
(WebCore::HTMLMeterElement::setValue):
(WebCore::HTMLMeterElement::setLow):
(WebCore::HTMLMeterElement::setHigh):
(WebCore::HTMLMeterElement::setOptimum):

  • html/HTMLMeterElement.h:
  • html/HTMLMeterElement.idl:

LayoutTests:

Update existing test to reflect behavior change.

  • fast/dom/HTMLMeterElement/script-tests/set-meter-properties.js:
  • fast/dom/HTMLMeterElement/set-meter-properties-expected.txt:
4:20 PM Changeset in webkit [206242] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Fix open source build.

  • platform/spi/cocoa/PassKitSPI.h:
4:08 PM Changeset in webkit [206241] by andersca@apple.com
  • 2 edits in trunk/Source/WebCore

Fix spelling errors (that were supposed to be part of my previous commit).

3:52 PM Changeset in webkit [206240] by Chris Dumez
  • 7 edits in trunk

Fix serialization of HTML Element attributes
https://bugs.webkit.org/show_bug.cgi?id=162356

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/html/semantics/embedded-content/the-img-element/current-pixel-density/basic-expected.txt:
  • web-platform-tests/html/syntax/serializing-html-fragments/serializing-expected.txt:

Source/WebCore:

Fix serialization of HTML Element attributes to align with:

In particular, we should not escape '<' and '>'.

Firefox and Chrome both match the specification.

Note that we keep escaping '<' and '>' for Element attributes in the
context of XML serialization, as per:

No new tests, rebaselined existing test.

  • editing/MarkupAccumulator.h:

LayoutTests:

Rebaseline test to reflect behavior change.

  • editing/pasteboard/paste-noscript-expected.txt:
3:52 PM Changeset in webkit [206239] by commit-queue@webkit.org
  • 3 edits in trunk/Source/JavaScriptCore

Inline function only used in one place
https://bugs.webkit.org/show_bug.cgi?id=162363

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-21
Reviewed by Saam Barati.

  • bytecompiler/NodesCodegen.cpp:

(JSC::ForInNode::emitBytecode):
(JSC::ForInNode::emitMultiLoopBytecode):

  • parser/Nodes.h:

No need for the extra function, it adds no clarification.

3:51 PM Changeset in webkit [206238] by andersca@apple.com
  • 20 edits in trunk/Source

Source/WebCore:
support openPaymentSetup API on ApplePaySession object
https://bugs.webkit.org/show_bug.cgi?id=162357
rdar://problem/26776939

Reviewed by Tim Horton.

  • Modules/applepay/ApplePaySession.cpp:

(WebCore::ApplePaySession::openPaymentSetup):
Perform security checks and then call into the PaymentCoordiantor. In its completion handler, we resolve the promise.

  • Modules/applepay/ApplePaySession.h:

Add new members.

  • Modules/applepay/ApplePaySession.idl:

Add openPaymentSetup declaration.

  • Modules/applepay/PaymentCoordinator.cpp:

(WebCore::PaymentCoordinator::openPaymentSetup):
Call through to the clients.

  • Modules/applepay/PaymentCoordinator.h:
  • Modules/applepay/PaymentCoordinatorClient.h:

Add new members.

  • loader/EmptyClients.cpp:

Add new stub.

  • platform/spi/cocoa/PassKitSPI.h:

Add SPI declaration.

Source/WebKit/mac:
Support openPaymentSetup API on ApplePaySession object
https://bugs.webkit.org/show_bug.cgi?id=162357
rdar://problem/26776939

Reviewed by Tim Horton.

Add openPaymentSetup stub.

  • WebCoreSupport/WebPaymentCoordinatorClient.h:
  • WebCoreSupport/WebPaymentCoordinatorClient.mm:

(WebPaymentCoordinatorClient::openPaymentSetup):

Source/WebKit2:
support openPaymentSetup API on ApplePaySession object
https://bugs.webkit.org/show_bug.cgi?id=162357
rdar://problem/26776939

Reviewed by Tim Horton.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::openPaymentSetup):
Call through to platformOpenPaymentSetup, and in the completion handler, send back a OpenPaymentSetupReply message.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.h:

Add new members.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.messages.in:

Add OpenPaymentSetup message.

  • UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:

(WebKit::WebPaymentCoordinatorProxy::platformOpenPaymentSetup):
Allocate a PKPassLibrary and call openPaymentSetupForMerchantIdentifier:domain:completion: on it.

  • WebProcess/ApplePay/WebPaymentCoordinator.cpp:

(WebKit::generateOpenPaymentSetupReplyID):
New helper function to generate a reply ID.

(WebKit::WebPaymentCoordinator::openPaymentSetup):
Add the completion handler to m_pendingOpenPaymentSetupCallbacks and send a OpenPaymentSetup message to the UI process.

(WebKit::WebPaymentCoordinator::openPaymentSetupReply):
Grab the callback given its ID and invoke it.

  • WebProcess/ApplePay/WebPaymentCoordinator.h:

Add new members.

  • WebProcess/ApplePay/WebPaymentCoordinator.messages.in:

Add OpenPaymentSetupReply message.

2:40 PM Changeset in webkit [206237] by Matt Baker
  • 7 edits in trunk

Web Inspector: Improve output of TestHarness.expect* failures
https://bugs.webkit.org/show_bug.cgi?id=162177
<rdar://problem/28367186>

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

This patch adds specific expectation functions to TestHarness, to better
express intent when writing tests, and to allow more details to be logged
in the event of a failure.

For functions taking both actual and expected parameters, the actual
parameter comes first. This convention simplifies the implementation of
TestHarness, improves the readability of tests involving inequalities,
and is consistent with XCTest assertions.

  • UserInterface/Test/TestHarness.js:

(TestHarness):
(TestHarness.prototype.expectThat):
(TestHarness.prototype.expectFalse):
(TestHarness.prototype.expectNull):
(TestHarness.prototype.expectNotNull):
(TestHarness.prototype.expectEqual):
(TestHarness.prototype.expectNotEqual):
(TestHarness.prototype.expectShallowEqual):
(TestHarness.prototype.expectNotShallowEqual):
(TestHarness.prototype.expectEqualWithAccuracy):
(TestHarness.prototype.expectLessThan):
(TestHarness.prototype.expectLessThanOrEqual):
(TestHarness.prototype.expectGreaterThan):
(TestHarness.prototype.expectGreaterThanOrEqual):
New expectation functions, all of which call _expect under the hood.

(TestHarness.prototype._expect):
Helper method which calls pass or fail. Creates a message when no user
message is provided, and logs expected and actual values in the event
of a failure.

(TestHarness.prototype._expectationValueAsString):
(TestHarness.prototype._expectationMessageFormat):
Get a message format string for the expectation type. Used to create
pass/fail message when no user message is provided.

(TestHarness.prototype._expectedValueFormat):
Get a format string for displaying the expected value. Used to create
the "Expected: " failure message line.

LayoutTests:

Extend coverage to more TestHarness messages by omitting the optional
message parameter when calling expect* functions.

Other improvements:

  • expectEqual/expectNotEqual should test WebInspector object instances, to cover more TestHarness message formatting cases.
  • expectEqual/expectNotEqual should test shallow equal arrays, since the test is for strict equality.
  • inspector/indexeddb/requestData-expected.txt:
  • inspector/unit-tests/number-utilities-expected.txt:

Updated expectations for new TestHarness output.

  • inspector/unit-tests/test-harness-expect-functions-expected.txt:
  • inspector/unit-tests/test-harness-expect-functions.html:
2:22 PM Changeset in webkit [206236] by commit-queue@webkit.org
  • 22 edits in trunk

Unreviewed, rolling out r206222 and r206227.
https://bugs.webkit.org/show_bug.cgi?id=162361

"broke the windows build" (Requested by keith_mi_ on #webkit).

Reverted changesets:

"Fix build for future versions of Clang."
https://bugs.webkit.org/show_bug.cgi?id=162346
http://trac.webkit.org/changeset/206222

"Attempt to fix windows build after r206222."
http://trac.webkit.org/changeset/206227

2:16 PM Changeset in webkit [206235] by achristensen@apple.com
  • 4 edits in trunk

URLParser should match URL::parse when parsing data urls with slashes in them
https://bugs.webkit.org/show_bug.cgi?id=162352

Reviewed by Darin Adler.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

1:53 PM Changeset in webkit [206234] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] Null pointer crash under WebCore::CACFLayerTreeHost::create().
https://bugs.webkit.org/show_bug.cgi?id=162266
<rdar://problem/28345073>

Reviewed by Brent Fulgham.

Add null pointer check.

  • platform/graphics/ca/win/CACFLayerTreeHost.cpp:

(WebCore::CACFLayerTreeHost::create):

1:47 PM Changeset in webkit [206233] by Chris Dumez
  • 5 edits in trunk

Fix enumeration of properties cross origin
https://bugs.webkit.org/show_bug.cgi?id=162328

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline W3C test now that one more check is passing.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/WebCore:

All cross origin properties for Window / Location are supposed to be not enumerable:

Therefore, there should be no properties to iterate on for cross origin Window /
Location objects.

No new tests, rebaselined existing test.

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::JSDOMWindow::getOwnPropertyNames):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::getOwnPropertyNames):

1:40 PM Changeset in webkit [206232] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/css/manager-preferredInspectorStyleSheetForFrame.html as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=162305

Unreviewed test gardening.

  • platform/mac/TestExpectations:
1:19 PM Changeset in webkit [206231] by achristensen@apple.com
  • 4 edits in trunk

URLParser should fail when parsing invalid relative URLs with no schemes
https://bugs.webkit.org/show_bug.cgi?id=162355

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::copyASCIIStringUntil):
When copying from a null String, is8Bit dereferences a null pointer. We don't want to do that.
(WebCore::URLParser::parse):
What the spec calls a "null" URL matches !url.isValid(), not url.isNull().
The former reflects whether the parsing succeeded,
the latter whether the contained String (which could be an invalid URL) is null.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

12:59 PM Changeset in webkit [206230] by Antti Koivisto
  • 2 edits in trunk/Source/WebCore

Document::styleResolverChanged simplification
https://bugs.webkit.org/show_bug.cgi?id=162347

Reviewed by Anders Carlsson.

  • dom/Document.cpp:

(WebCore::Document::implicitClose):
(WebCore::Document::setParsing):
(WebCore::Document::write):
(WebCore::Document::styleResolverChanged):

  • Remove unncessary AnimationUpdateBlock, it is created by recalcStyle.
  • Remove explicit setNeedsLayoutAndPrefWidthsRecalc/scheduleRelayout calls, style resolution invalidates those as needed.
  • Remove evaluateMediaQueryList call, that is done on layout as needed.
  • Remove the ancient INSTRUMENT_LAYOUT_SCHEDULING and the related printfs.
12:42 PM Changeset in webkit [206229] by bshafiei@apple.com
  • 5 edits in trunk/Source

Versioning.

12:38 PM Changeset in webkit [206228] by bshafiei@apple.com
  • 1 copy in tags/Safari-603.1.6

New tag.

12:33 PM Changeset in webkit [206227] by keith_miller@apple.com
  • 2 edits in trunk/Source/WebCore

Attempt to fix windows build after r206222.

  • page/MainFrame.h:

(WebCore::Frame::isMainFrame):

12:09 PM Changeset in webkit [206226] by fpizlo@apple.com
  • 17 edits
    2 adds in trunk

Add a Fence opcode to B3
https://bugs.webkit.org/show_bug.cgi?id=162343

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:


This adds the most basic fence support to B3. Currently, this is optimal on x86 and correct
on ARM. It also happens to be sufficient and optimal for what we'll do in the concurrent GC.

The idea of Fence is that it can represent any standalone fence instruction by having two
additional params: a read range and a write range. If the write range is empty, this is
taken to be a store-store fence, which turns into zero code on x86 and a cheaper fence on
ARM.

It turns out that this is powerful enough to express store-load and store-store fences. For
load-store and load-load fences, you wouldn't have wanted to use any code on x86 and you
wouldn't have wanted a standalone barrier on ARM. For those cases, you'd want either a
fenced load (load acquire) or a dependency. See bug 162349 and bug 162350, respectively.

This isn't yet optimized for store-store fences on ARM because we don't have the
MacroAssembler support. Also, the support for "dmb ish" is not really what we want (it seems
to use a heavier fence). I don't think that this is urgent because of how the concurrent GC
will use this facility. I've left that to bug 162342.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • assembler/MacroAssemblerCodeRef.cpp:

(JSC::MacroAssemblerCodeRef::tryToDisassemble):
(JSC::MacroAssemblerCodeRef::disassembly):

  • assembler/MacroAssemblerCodeRef.h:

(JSC::MacroAssemblerCodeRef::size): Deleted.
(JSC::MacroAssemblerCodeRef::tryToDisassemble): Deleted.

  • b3/B3Compilation.h:

(JSC::B3::Compilation::codeRef):
(JSC::B3::Compilation::disassembly):
(JSC::B3::Compilation::code): Deleted.

  • b3/B3Effects.h:
  • b3/B3FenceValue.cpp: Added.

(JSC::B3::FenceValue::~FenceValue):
(JSC::B3::FenceValue::cloneImpl):
(JSC::B3::FenceValue::FenceValue):

  • b3/B3FenceValue.h: Added.
  • b3/B3LowerToAir.cpp:

(JSC::B3::Air::LowerToAir::lower):

  • b3/B3Opcode.cpp:

(WTF::printInternal):

  • b3/B3Opcode.h:
  • b3/B3Validate.cpp:
  • b3/B3Value.cpp:

(JSC::B3::Value::effects):

  • b3/air/AirOpcode.opcodes:
  • b3/testb3.cpp:

(JSC::B3::checkUsesInstruction):
(JSC::B3::checkDoesNotUseInstruction):
(JSC::B3::testX86MFence):
(JSC::B3::testX86CompilerFence):
(JSC::B3::run):

Websites/webkit.org:

  • docs/b3/intermediate-representation.html:
11:42 AM Changeset in webkit [206225] by Gustavo Noronha Silva
  • 2 edits in releases/WebKitGTK/webkit-2.14/Source/WebKit2

Merge 206216 - Unreviewed, build fix.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::paint): fix usage of deviceScaleFactor variable which was
removed.

11:41 AM Changeset in webkit [206224] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

New DocumentLoader logging causes crashes
https://bugs.webkit.org/show_bug.cgi?id=162348
<rdar://problem/28404744>

Patch by Keith Rollin <Keith Rollin> on 2016-09-21
Reviewed by Chris Dumez

Check for NULL m_frame before using it.

No new tests -- no tests for logging, though this issue was found by
contentfiltering/block-after-will-send-request-then-allow-unblock.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource):

11:33 AM Changeset in webkit [206223] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Optimize URLParser
https://bugs.webkit.org/show_bug.cgi?id=162338

Reviewed by Tim Horton.

No change in behavior. Just a marginal performance improvement.

  • platform/URLParser.cpp:

(WebCore::isValidSchemeCharacter):
Added to reduce branches when parsing the scheme of a URL. Now there is a table lookup instead of many range checks.
(WebCore::URLParser::parse):
Use appendVector, which uses memcpy.
(WebCore::URLParser::parseHostAndPort):
If we know that we are parsing the serialized output of a valid URL,
we do not need to convert host characters to lower case.
They are already lower case.

11:24 AM Changeset in webkit [206222] by keith_miller@apple.com
  • 21 edits in trunk

Fix build for future versions of Clang.
https://bugs.webkit.org/show_bug.cgi?id=162346

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

  • runtime/VM.h:

(JSC::VM::setGlobalConstRedeclarationShouldThrow):

Source/WebCore:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

  • Configurations/WebCore.unexp:
  • dom/Exception.h:
  • page/Frame.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebVideoFullscreenModelVideoElement.h:

(WebCore::WebVideoFullscreenModelVideoElement::videoElement):

  • platform/graphics/Color.h:
  • platform/graphics/transforms/TransformationMatrix.h:

(WebCore::TransformationMatrix::rotate):

  • platform/mac/WebVideoFullscreenInterfaceMac.h:
  • platform/network/ParsedContentRange.h:

(WebCore::ParsedContentRange::ParsedContentRange):
(WebCore::ParsedContentRange::isValid):

  • platform/network/ResourceResponseBase.h:

(WebCore::ResourceResponseBase::certificateInfo):

  • platform/text/TextStream.h:

(WebCore::TextStream::increaseIndent):
(WebCore::TextStream::decreaseIndent):

Source/WTF:

This fixes issues with the WebCore build where inline
template-class function definitions are marked as exported. This
genereates a weak external symobl that our build does not like.

  • wtf/text/StringImpl.h:

Tools:

  • TestWebKitAPI/Counters.cpp:
  • TestWebKitAPI/Counters.h:

(DeleterCounter::deleterCount):
(DeleterCounter::TestingScope::TestingScope):
(DeleterCounter::operator()):

  • TestWebKitAPI/Tests/WTF/HashCountedSet.cpp:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WTF/HashMap.cpp:

(TestWebKitAPI::TEST):

11:23 AM Changeset in webkit [206221] by Chris Dumez
  • 10 edits
    2 adds in trunk

Object.getOwnPropertyDescriptor() does not work correctly cross origin
https://bugs.webkit.org/show_bug.cgi?id=162311

Reviewed by Gavin Barraclough.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/html/browsers/origin/cross-origin-objects/cross-origin-objects-expected.txt:

Source/JavaScriptCore:

Add a CustomGetterSetter field to PropertySlot that gets populated
by getOwnPropertySlot() and use it in getOwnPropertyDescriptor()
to properly populate the descriptor. We used to rely on reifying
the properties and then call getDirect() in order to get the
CustomGetterSetter. However, this hack was insufficient to support
the cross-origin case because we need to control more precisely
the visibility of the getter and the setter. For example, Location's
href property has both a getter and a setter in the same origin
case but only has a setter in the cross-origin case.

In the future, we can extend the use of PropertySlot's
customGetterSetter field to the same origin case and get rid of the
reification + getDirect() hack in getOwnPropertyDescriptor().

  • runtime/JSObject.cpp:

(JSC::JSObject::getOwnPropertyDescriptor):

  • runtime/PropertySlot.cpp:

(JSC::PropertySlot::customAccessorGetter):

  • runtime/PropertySlot.h:

Source/WebCore:

Object.getOwnPropertyDescriptor() does not work correctly cross origin. In particular:

  • We return value descriptors for attributes instead of getter/setter descriptors
  • attributes / operations are wrongly marked as non-configurable

Corresponding specification:

Test: http/tests/security/cross-origin-descriptors.html

  • bindings/js/JSDOMWindowCustom.cpp:

(WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):

  • bindings/js/JSLocationCustom.cpp:

(WebCore::JSLocation::getOwnPropertySlotDelegate):

LayoutTests:

Add layout test coverage.

  • http/tests/security/cross-origin-descriptors-expected.txt: Added.
  • http/tests/security/cross-origin-descriptors.html: Added.
11:04 AM Changeset in webkit [206220] by achristensen@apple.com
  • 2 edits in trunk/Tools

Prepare API tests for enabling URLParser by default
https://bugs.webkit.org/show_bug.cgi?id=162341

Reviewed by Tim Horton.

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::checkURL):
(TestWebKitAPI::checkRelativeURL):
(TestWebKitAPI::checkURLDifferences):
(TestWebKitAPI::checkRelativeURLDifferences):
(TestWebKitAPI::shouldFail):

11:02 AM Changeset in webkit [206219] by achristensen@apple.com
  • 4 edits in trunk

URLParser: Correctly parse URLs that are just nonspecialscheme:/
https://bugs.webkit.org/show_bug.cgi?id=162340

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
r206162 wasn't quite right. If a url is just nonspecialscheme:/ then the path should indeed be /

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:00 AM Changeset in webkit [206218] by achristensen@apple.com
  • 4 edits in trunk

URLParser: correctly parse relative URLs that are just one character
https://bugs.webkit.org/show_bug.cgi?id=162344

Reviewed by Tim Horton.

Source/WebCore:

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

10:44 AM Changeset in webkit [206217] by dbates@webkit.org
  • 4 edits
    11 adds in trunk

REGRESSION (r201090): Setting style.webkitTextSizeAdjust does not change text change on iPad
https://bugs.webkit.org/show_bug.cgi?id=162227
<rdar://problem/27201529>

Reviewed by Simon Fraser.

Source/WebCore:

The CSS property -webkit-text-size-adjust should be respected on all iOS devices. Following
r201090 we respect it only on iPhone and in iPhone-apps run on iPad.

Tests: fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html

fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html
fast/text-autosizing/ios/programmatic-text-size-adjust.html
fast/text-autosizing/ios/text-size-adjust-inline-style.html
fast/text-autosizing/text-size-adjust-inline-style.html

  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue): Remove unused code to validate -webkit-text-size-adjust.
This code is never used because -webkit-text-size-adjust is a value property (since it accepts a
<percentage> as a value and CSSParserFastPaths::isKeywordPropertyID(CSSPropertyWebkitTextSizeAdjust)
returns false). That is, it is not a keyword property.
(WebCore::CSSParser::parseValue): Always enable the -webkit-text-size-adjust CSS property when
building for iOS regardless of whether Settings:textAutosizingEnabled() is enabled.

LayoutTests:

Add tests to ensure setting the CSS property -webkit-text-size-adjust in a stylesheet or
programmatically is respected on iPhone and iPad. Also added a test to ensure that this
CSS property is ignored on macOS by default.

Note that we have existing tests that ensure that -webkit-text-size-adjust is respected
on macOS when the internal setting Settings::textAutosizingEnabled() is enabled.

  • fast/text-autosizing/ios/ipad/programmatic-text-size-adjust-expected.txt: Added.
  • fast/text-autosizing/ios/ipad/programmatic-text-size-adjust.html: Added.
  • fast/text-autosizing/ios/ipad/text-size-adjust-inline-style-expected.html: Added.
  • fast/text-autosizing/ios/ipad/text-size-adjust-inline-style.html: Added.
  • fast/text-autosizing/ios/programmatic-text-size-adjust-expected.txt: Added.
  • fast/text-autosizing/ios/programmatic-text-size-adjust.html: Added.
  • fast/text-autosizing/ios/text-size-adjust-inline-style-expected.html: Added.
  • fast/text-autosizing/ios/text-size-adjust-inline-style.html: Added.
  • fast/text-autosizing/text-size-adjust-inline-style-expected.html: Added.
  • fast/text-autosizing/text-size-adjust-inline-style.html: Added.
  • platform/mac/TestExpectations: Skip the iOS and iPad tests on Mac. Otherwise, they will fail

because these tests intentionally do not call window.internal.settings.setTextAutosizingEnabled(true)
so as to test the default port behavior. And on Mac automatic text size adjustment is disabled
by default.

10:35 AM Changeset in webkit [206216] by Gustavo Noronha Silva
  • 2 edits in trunk/Source/WebKit2

Unreviewed, build fix.

  • UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:

(WebKit::AcceleratedBackingStoreWayland::paint): fix usage of deviceScaleFactor variable which was
removed.

10:20 AM Changeset in webkit [206215] by jer.noble@apple.com
  • 3 edits in trunk/LayoutTests

Unreviewed gardening; after r206208, update url-null.html test to reflect current (specced) behavior.

  • fast/files/url-null-expected.txt:
  • fast/files/url-null.html:
10:16 AM Changeset in webkit [206214] by jer.noble@apple.com
  • 2 edits in trunk/LayoutTests/imported/w3c

Unreviewed gardening; add some whitespace to expected results.

  • web-platform-tests/media-source/URL-createObjectURL-null-expected.txt:
9:28 AM Changeset in webkit [206213] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GTK] Build fails with GSTREAMER_GL enabled
https://bugs.webkit.org/show_bug.cgi?id=162337

Patch by Miguel Gomez <magomez@igalia.com> on 2016-09-21
Reviewed by Michael Catanzaro.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Remove uneeded const.

9:26 AM Changeset in webkit [206212] by msaboff@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

FTL needs to reserve callee stack space in bytes
https://bugs.webkit.org/show_bug.cgi?id=162324

Reviewed by Geoffrey Garen.

Changed two instances where we call B3::Procedure::requestCallArgAreaSize() with the
number of JSValue sized objects of stack space instead of bytes. The correct units
to use is bytes.

Renamed both the Air and B3 related callArgAreaSize() to callArgAreaSizeInBytes().

No new tests as this doesn't surface as an issue when arguments are passed on the stack.

  • b3/B3Procedure.cpp:

(JSC::B3::Procedure::callArgAreaSizeInBytes):
(JSC::B3::Procedure::requestCallArgAreaSizeInBytes):
(JSC::B3::Procedure::callArgAreaSize): Deleted.
(JSC::B3::Procedure::requestCallArgAreaSize): Deleted.

  • b3/B3Procedure.h:
  • b3/air/AirAllocateStack.cpp:

(JSC::B3::Air::allocateStack):

  • b3/air/AirCCallingConvention.cpp:

(JSC::B3::Air::computeCCallingConvention):

  • b3/air/AirCode.h:

(JSC::B3::Air::Code::callArgAreaSizeInBytes):
(JSC::B3::Air::Code::requestCallArgAreaSizeInBytes):
(JSC::B3::Air::Code::callArgAreaSize): Deleted.
(JSC::B3::Air::Code::requestCallArgAreaSize): Deleted.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstruct):
(JSC::FTL::DFG::LowerDFGToB3::compileCallOrConstructVarargs):
(JSC::FTL::DFG::LowerDFGToB3::compileCallEval):

9:25 AM Changeset in webkit [206211] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

REGRESSION(r206127): ASSERTION FAILED: !isClosed() in WebCore::MediaSource::detachFromElement
https://bugs.webkit.org/show_bug.cgi?id=162307

Reviewed by Eric Carlson.

The test is crashing when the ScriptExecutionContext is calling stop() on the media element before
it's attached MediaSource has been open()ed, which is a valid state. Removing this ASSERT().

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::detachFromElement):

9:16 AM Changeset in webkit [206210] by jer.noble@apple.com
  • 3 edits
    2 adds in trunk/LayoutTests

LayoutTests/imported/w3c:
Unreviewed gardening; added test expectations for new tests.

  • web-platform-tests/media-source/mediasource-attach-stops-delaying-load-event-expected.txt: Added.
  • web-platform-tests/media-source/mediasource-sourcebuffer-mode-timestamps-expected.txt: Added.

LayoutTests:
Unreviewed gardening; mark imported/w3c/web-platform-tests/media-source/ tests as passing by default
and mark specific tests to skip or fail (rather than vice versa).

  • platform/mac/TestExpectations:
9:13 AM Changeset in webkit [206209] by jer.noble@apple.com
  • 4 edits in trunk

[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-activesourcebuffers.html
https://bugs.webkit.org/show_bug.cgi?id=162257

Reviewed by Eric Carlson.

Source/WebCore:

Some of the conditions in the track changed methods were reversed, and all failed to schedule
a change event.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::videoTrackSelectedChanged):
(WebCore::SourceBuffer::audioTrackEnabledChanged):
(WebCore::SourceBuffer::textTrackModeChanged):

LayoutTests:

  • platform/mac/TestExpectations:
9:12 AM Changeset in webkit [206208] by jer.noble@apple.com
  • 21 edits in trunk

[media-source] Fix imported/w3c/web-platform-tests/media-source/URL-createObjectURL-null.html
https://bugs.webkit.org/show_bug.cgi?id=162299

Reviewed by Eric Carlson.

Source/WebCore:

URL.createObjectURL() should not take an optional parameter (nor return an optional String).
(Ref: https://w3c.github.io/FileAPI/#dfn-createObjectURL)

  • Modules/mediasource/DOMURLMediaSource.cpp:

(WebCore::DOMURLMediaSource::createObjectURL):

  • Modules/mediasource/DOMURLMediaSource.h:
  • Modules/mediasource/DOMURLMediaSource.idl:
  • Modules/mediasource/MediaSourceRegistry.cpp:

(WebCore::MediaSourceRegistry::registerURL):

  • Modules/mediasource/MediaSourceRegistry.h:
  • Modules/mediastream/DOMURLMediaStream.cpp:

(WebCore::DOMURLMediaStream::createObjectURL):

  • Modules/mediastream/DOMURLMediaStream.h:
  • Modules/mediastream/DOMURLMediaStream.idl:
  • Modules/mediastream/MediaStreamRegistry.cpp:

(WebCore::MediaStreamRegistry::registerURL):

  • Modules/mediastream/MediaStreamRegistry.h:
  • fileapi/Blob.cpp:

(WebCore::BlobURLRegistry::registerURL):

  • html/DOMURL.cpp:

(WebCore::DOMURL::createObjectURL):
(WebCore::DOMURL::createPublicURL):

  • html/DOMURL.h:
  • html/DOMURL.idl:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setSrcObject):

  • html/PublicURLManager.cpp:

(WebCore::PublicURLManager::registerURL):

  • html/PublicURLManager.h:
  • html/URLRegistry.h:

LayoutTests:

  • platform/mac/TestExpectations:
5:39 AM Changeset in webkit [206207] by Csaba Osztrogonác
  • 3 edits in trunk/Source/JavaScriptCore

[ARM] Unreviewed buildfix after r206136.

  • assembler/MacroAssembler.h:
  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::branchPtr): Added.

5:16 AM WebKitGTK/Roadmap edited by Michael Catanzaro
Remove Iulian as primary contact of GAction work, mark as stalled (diff)
5:15 AM WebKitGTK/Roadmap edited by Michael Catanzaro
Use a different bug to track sandboxing, remove my name as primary contact (diff)
2:56 AM Changeset in webkit [206206] by commit-queue@webkit.org
  • 17 edits in trunk

[Fetch] Align Accept header default values with fetch spec
https://bugs.webkit.org/show_bug.cgi?id=162260

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-21
Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Ensuring Accept and Accept-Language user-specific values are going up to the server.

  • web-platform-tests/fetch/api/basic/accept-header-expected.txt:
  • web-platform-tests/fetch/api/basic/accept-header-worker-expected.txt:
  • web-platform-tests/fetch/api/basic/accept-header.js:

(promise_test):

Source/WebCore:

Covered by existing and updated tests.

To start implementing step 1 to 7 of fetch algorithm, this patch updates Accept header handling.

Default values are set according the spec based on resource type.
Some resource types are not defined in the spec and we keep using existing values.

We check if Accept header is already present in the request. If that is the case, no change is done to that header.

If the Accept header is not set, the default value '*/*' is used.
An Accept header is therefore always set at CachedResourceLoader level.

  • loader/cache/CachedCSSStyleSheet.cpp:

(WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet): Removing accept initialization.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load): Removing accept header setting.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::accept): Deleted.
(WebCore::CachedResource::setAccept): Deleted.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::acceptHeaderValueFromType): helper routine merging fetch spec and existing WebKit accept values.
(WebCore::CachedResourceLoader::prepareFetch): Should implement step 1 to 7 of https://fetch.spec.whatwg.org/#fetching.
(WebCore::CachedResourceLoader::requestResource): Making use of prepareFetch.

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedSVGDocument.cpp:

(WebCore::CachedSVGDocument::CachedSVGDocument): Removing accept initialization.

  • loader/cache/CachedScript.cpp:

(WebCore::CachedScript::CachedScript): Removing accept initialization.

  • loader/cache/CachedXSLStyleSheet.cpp:

(WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet): Removing accept initialization.

  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::hasHTTPHeader): Introduced to check for header presence.

  • platform/network/ResourceRequestBase.h:

LayoutTests:

  • http/tests/misc/resources/image-checks-for-accept.php: Updated according new image Accept header value.
2:48 AM Changeset in webkit [206205] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GTK] Fix build failure of ScrollbarThemeGtk with libc++
https://bugs.webkit.org/show_bug.cgi?id=162302

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

  • platform/gtk/ScrollbarThemeGtk.cpp:

(WebCore::ScrollbarThemeGtk::paint): Add missing #include <cstdlib>

2:44 AM Changeset in webkit [206204] by Philippe Normand
  • 3 edits in trunk/Source/WebCore

[OpenWebRTC] Miscellaneous fixes
https://bugs.webkit.org/show_bug.cgi?id=162332

Reviewed by Alejandro G. Castro.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::currentTime): Improved logging.
(WebCore::MediaPlayerPrivateGStreamerOwr::load): Ditto.
(WebCore::MediaPlayerPrivateGStreamerOwr::loadingFailed): Ditto.
(WebCore::MediaPlayerPrivateGStreamerOwr::createGSTAudioSinkBin):
Pre-roll the autoaudiosink, fetch the underlying platform audio
sink and pass it to the OpenWebRTC renderer.
(WebCore::MediaPlayerPrivateGStreamerOwr::maybeHandleChangeMutedState): Improved logging.
(WebCore::MediaPlayerPrivateGStreamerOwr::setSize): Don't configure invalid video renderer.

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Fix copy-paste error.

2:28 AM WebKitGTK/Roadmap edited by eocanha@igalia.com
(diff)
2:25 AM WebKitGTK/Roadmap edited by eocanha@igalia.com
(diff)
1:43 AM Changeset in webkit [206203] by commit-queue@webkit.org
  • 14 edits in trunk/Source/WebCore

Refactor CachedResourceLoader::canRequest
https://bugs.webkit.org/show_bug.cgi?id=162144

Patch by Youenn Fablet <youenn@apple.com> on 2016-09-21
Reviewed by Darin Adler.

Covered by existing tests.

Simplifying CachedResourceLoader::canRequest by doing:

  • CSP checks in another method
  • Removing Same-Origin type-specific checks by setting FetchOptions::Mode appropriately in resource loader clients
  • Moving script specific check in ScriptElement

Note that the last check may affect the loading behavior in the case scripts are enabled when starting the load
of a script, but gets disabled before receiving a redirection for the script load.

  • dom/ProcessingInstruction.cpp:

(WebCore::ProcessingInstruction::checkStyleSheet): Setting XSLT stylesheet fetch mode to SameOrigin.

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestScriptWithCache): Returning early if scripts are disabled.

  • loader/CrossOriginPreflightChecker.cpp:

(WebCore::CrossOriginPreflightChecker::startPreflight): Bypassing CSP checks.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource): Bypassing CSP checks as CachedResourceLoader was not
checking them for MainResource.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::loadRequest): Ditto.

  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::preloadIfNeeded): Using new CachedResourceRequest constructor to enable moving the ResourceRequest.
(WebCore::LinkLoader::loadLink): Skipping CSP checks for link prefetch/subresources as CachedResourceLoader was
not checking them for Link Prefetch and Subresource types.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy): Helper routine to check for CSP.
(WebCore::CachedResourceLoader::canRequest): Making use of introduced helper routine.
Simplified same origin check as all requests should have their options set.

  • loader/cache/CachedResourceLoader.h:
  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::CachedResourceRequest): More efficient constructor.

  • loader/cache/CachedResourceRequest.h:
  • loader/cache/CachedSVGDocumentReference.cpp:

(WebCore::CachedSVGDocumentReference::load): Setting fetch mode to SameOrigin.

  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::updateExternalDocument): Ditto.

  • xml/XSLImportRule.cpp:

(WebCore::XSLImportRule::loadSheet): Ditto.

12:48 AM Changeset in webkit [206202] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Build fails with GSTREAMER_GL when both desktop GL and GLES2 are enabled in gst-plugins-bad
https://bugs.webkit.org/show_bug.cgi?id=159562

Patch by Miguel Gomez <magomez@igalia.com> on 2016-09-21
Reviewed by Philippe Normand.

Refactor video orientation code so including TextureMapperGL in MediaPlayerPrivateGStreamerBase.h
is not necessary.

Covered by existent tests.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::texMapFlagFromOrientation):
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
(WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
(WebCore::MediaPlayerPrivateGStreamerBase::setVideoSourceOrientation):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
12:14 AM Changeset in webkit [206201] by Chris Dumez
  • 4 edits
    193 adds in trunk/LayoutTests

Import html/syntax web platform tests
https://bugs.webkit.org/show_bug.cgi?id=162331

Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

Import html/syntax web platform tests to improve test coverage.

  • web-platform-tests/html/syntax/*: Added.

LayoutTests:

  • tests-options.json:
12:09 AM Changeset in webkit [206200] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[GTK] Fix build failure in clipboard support
https://bugs.webkit.org/show_bug.cgi?id=162261

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

  • platform/PlatformPasteboard.h: Add missing #include <functional>
  • platform/gtk/PasteboardHelper.h: Add missing #include <functional>

Sep 20, 2016:

11:44 PM Changeset in webkit [206199] by nael.ouedraogo@crf.canon.fr
  • 2 edits in trunk/Source/WebCore

VariadicHelper::Result should not include constructor to initialize members
https://bugs.webkit.org/show_bug.cgi?id=162298

Reviewed by Darin Adler.

Remove the constructor since member-wise initialization does the same thing.

No new tests required.

  • bindings/js/JSDOMBinding.h: Remove useless constructor.
11:42 PM WebKitGTK/Roadmap edited by Carlos Garcia Campos
(diff)
11:34 PM Changeset in webkit [206198] by achristensen@apple.com
  • 4 edits in trunk

Optimize URLParser
https://bugs.webkit.org/show_bug.cgi?id=162105

Reviewed by Geoffrey Garen.

Source/WebCore:

Covered by new API tests.
This is about a 5% speedup on my URLParser benchmark.

  • platform/URLParser.cpp:

(WebCore::percentEncodeByte):
(WebCore::utf8PercentEncode):
(WebCore::utf8QueryEncode):
(WebCore::encodeQuery):
(WebCore::URLParser::parse):
(WebCore::serializeURLEncodedForm):
(WebCore::percentEncode): Deleted.
(WebCore::utf8PercentEncodeQuery): Deleted.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:17 PM Changeset in webkit [206197] by Carlos Garcia Campos
  • 28 edits in trunk/Source

[GTK] Clean up DataObjectGtk handling
https://bugs.webkit.org/show_bug.cgi?id=162267

Reviewed by Michael Catanzaro.

Source/WebCore:

  • platform/Pasteboard.h: Use Ref instead of RefPtr for DataObjectGtk member.
  • platform/PasteboardStrategy.h: Pass a const reference to DataObjectGtk in write method and return a Ref from read.
  • platform/PlatformPasteboard.h: Ditto.
  • platform/gtk/DataObjectGtk.h:

(WebCore::DataObjectGtk::image): Use Image instead of GdkPixbuf.
(WebCore::DataObjectGtk::setImage):

  • platform/gtk/PasteboardGtk.cpp:

(WebCore::Pasteboard::createForDragAndDrop): Use a reference instead of a pointer.
(WebCore::Pasteboard::Pasteboard): Receives a reference, so we can also remove the ASSERT.
(WebCore::Pasteboard::dataObject):
(WebCore::Pasteboard::writeToClipboard): Remove the ShouldIncludeSmartPaste parameter, callers should also update
canSmartPaste property of DataObjectGtk before calling this.
(WebCore::Pasteboard::writePlainText):
(WebCore::Pasteboard::write): Do not convert the image the GdkPixbuf, pass the image to the DataObjectGtk instead.

  • platform/gtk/PasteboardHelper.cpp:

(WebCore::PasteboardHelper::fillSelectionData): Convert the DataObjectGtk image to GdkPixbuf right before
passing it to gtk_selection_data_set_pixbuf().
(WebCore::ClipboardSetData::ClipboardSetData): Use reference instead of pointer.
(WebCore::getClipboardContentsCallback):
(WebCore::clearClipboardContentsCallback): Never clear the saved DataObjectGtk, that was only needed when we had
a global DataObjectGtk associated to a GtkClipboard.
(WebCore::PasteboardHelper::writeClipboardContents): Use TemporaryChange to set the settingClipboardDataObject global.

  • platform/gtk/PlatformPasteboardGtk.cpp:

(WebCore::PlatformPasteboard::writeToClipboard):
(WebCore::PlatformPasteboard::readFromClipboard):

Source/WebKit2:

In some cases the ownership of DataObjectGtk instances is not clear enough, and we have hacks to avoid memory
leaks because of that.

  • Shared/gtk/ArgumentCodersGtk.cpp:

(IPC::encodeImage): Use Image instead of GdkPixbuf.
(IPC::decodeImage): Ditto.
(IPC::ArgumentCoder<DataObjectGtk>::encode):
(IPC::ArgumentCoder<DataObjectGtk>::decode):
(IPC::encode): Deleted.
(IPC::decode): Deleted.
(IPC::ArgumentCoder<DragData>::encode): Deleted.
(IPC::ArgumentCoder<DragData>::decode): Deleted.

  • Shared/gtk/ArgumentCodersGtk.h:
  • Shared/gtk/PasteboardContent.cpp:

(WebKit::PasteboardContent::PasteboardContent): Add empty constructor that creates a new DataObjectGtk, a
constructor that receives a const reference and another one that takes the ownership of the given DataObjectGtk.
(WebKit::PasteboardContent::encode):
(WebKit::PasteboardContent::decode):

  • Shared/gtk/PasteboardContent.h: Use Ref instead of RefPtr for the DataObjectGtk member.
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::startDrag): Transfer the DataObjectGtk to the DragAndDropHandler, instead of using DragData.

  • UIProcess/API/gtk/PageClientImpl.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::performDragControllerAction): Instead of sending a DragData object to the web process,
send the DataObjectGtk and DragData members needed as parameters.
(WebKit::WebPageProxy::startDrag): Transfer the received DataObjectGtk to page client, instead of using
DragData. Also notify the web process that drag started.

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in: Update StartDrag message parameters.
  • UIProcess/gtk/DragAndDropHandler.cpp:

(WebKit::DragAndDropHandler::DragAndDropHandler): Remove unneeded initialization.
(WebKit::DragAndDropHandler::startDrag): Take ownership of the given DataObjectGtk.

  • UIProcess/gtk/DragAndDropHandler.h:
  • UIProcess/gtk/WebPasteboardProxyGtk.cpp:

(WebKit::WebPasteboardProxy::writeToClipboard):
(WebKit::WebPasteboardProxy::readFromClipboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:

(WebKit::WebPlatformStrategies::writeToClipboard):
(WebKit::WebPlatformStrategies::readFromClipboard):

  • WebProcess/WebCoreSupport/WebPlatformStrategies.h:
  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::convertCairoSurfaceToShareableBitmap):
(WebKit::WebDragClient::startDrag): Do not create a DragData and pass the DataObjectGtk directly to the
message. Also notify the WebPage that drag is about to start.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction): Remove explicit DataObjectGtk derefs and simply create a
DragData using the DataObjectGtk pointer as platform data.

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in: Update PerformDragControllerAction message parameters.
8:10 PM Changeset in webkit [206196] by achristensen@apple.com
  • 20 edits in trunk/Source

Require WTFMove for String::adopt
https://bugs.webkit.org/show_bug.cgi?id=162313

Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • runtime/JSStringBuilder.h:

(JSC::JSStringBuilder::build):

Source/WebCore:

No change in behavior. This just makes it more clear what is going on when a String adopts a Vector.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneDeserializer::readString):

  • css/parser/CSSParser.cpp:

(WebCore::quoteCSSStringInternal):

  • dom/Document.cpp:

(WebCore::canonicalizedTitle):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::normalizeSpaces):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace):

  • platform/Length.cpp:

(WebCore::newCoordsArray):

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
(WebCore::URLParser::serialize):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::ReplicaState::cloneID):

  • platform/text/TextCodecUTF16.cpp:

(WebCore::TextCodecUTF16::decode):

  • platform/text/TextCodecUTF8.cpp:

(WebCore::TextCodecUTF8::decode):

  • platform/text/mac/TextCodecMac.cpp:

(WebCore::TextCodecMac::decode):

Source/WTF:

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::removeCharacters):
(WTF::StringImpl::simplifyMatchedCharactersToSpace):
(WTF::StringImpl::adopt):

  • wtf/text/StringImpl.h:

(WTF::StringImpl::adopt):

  • wtf/text/WTFString.h:

(WTF::String::adopt):

7:46 PM Changeset in webkit [206195] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Reload unexpectedly switches to Storage Tab
https://bugs.webkit.org/show_bug.cgi?id=162323
<rdar://problem/28393954>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-09-20
Reviewed by Matt Baker.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel.prototype.showDefaultContentViewForTreeElement):
We aren't stealing if the ContentView doesn't yet have a parent!
This fixes restoration when switching to the Storage tab at a
later time after a reload.

  • UserInterface/Views/StorageSidebarPanel.js:

(WebInspector.StorageSidebarPanel._treeSelectionDidChange):
Don't showRepresentedObject if we aren't visible. That would force this
tab to the foreground and we don't want that. This only happens when
tree elements are removed (main frame navigation) and TreeOutline
selects the next available tree element.

(WebInspector.StorageSidebarPanel.prototype._storageCleared):
Simplify and close all content views. We were missing IndexedDB content views.

7:34 PM Changeset in webkit [206194] by Hunseop Jeong
  • 2 edits in trunk/Source/WebKit2

[EFL] ewk_context_menu_item_select test have been failed
https://bugs.webkit.org/show_bug.cgi?id=162143

Reviewed by Gyuyoung Kim.

ewk_context_menu_item_select has been waited until test page loading is finished, but it is
unnecessary to wait the loading is finished. It would be good to pass if *testFinished*
flag is true.

  • UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:

(EWK2ContextMenuTest::checkBasicContextMenuItem):
(EWK2ContextMenuTest::testContextMenu):
(TEST_F):

6:10 PM Changeset in webkit [206193] by jer.noble@apple.com
  • 10 edits in trunk/Source/WebCore

Adopt MRMediaRemoteSetParentApplication.
https://bugs.webkit.org/show_bug.cgi?id=162259
<rdar://problem/28376161>

Reviewed by Anders Carlsson.

Allow MediaSessionManagerMac to retrieve the correct parent application identifier
from a PlatformMediaSession so that it can pass that identifier through to MediaRemote
via MRMediaRemoteSetParentApplication.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::sourceApplicationIdentifier):

  • Modules/webaudio/AudioContext.h:
  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::sourceApplicationIdentifier):

  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSession::resetPlaybackSessionState): Deleted.

  • platform/audio/mac/MediaSessionManagerMac.mm:

(WebCore::MediaSessionManagerMac::updateNowPlayingInfo):

  • platform/mac/MediaRemoteSoftLink.cpp:
  • platform/mac/MediaRemoteSoftLink.h:
6:03 PM Changeset in webkit [206192] by Joseph Pecoraro
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION(r205692): Minified builds have broken inspector
https://bugs.webkit.org/show_bug.cgi?id=162327
<rdar://problem/28370137>

Reviewed by Matt Baker.

  • Scripts/cssmin.py:

(cssminify):
Converge on the newer cssmin that we mistakenly dropped in r205692.
This knows how to handle more cases.

5:34 PM Changeset in webkit [206191] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.2.11

New tag.

5:27 PM Changeset in webkit [206190] by n_wang@apple.com
  • 3 edits
    2 adds in trunk

AX: AppleVisUser: VO can't navigate web dialogs iOS10
https://bugs.webkit.org/show_bug.cgi?id=162322

Reviewed by Chris Fleizach.

Source/WebCore:

When using VoiceOver to navigate a web dialog's children, we were setting focus
onto the focusable parent in accessibilityElementDidBecomeFocused. When the focusable
parent is the dialog, it will cause the VO cursor jumping back and forward. Fixed it
by not setting focus on web dialogs in such case.

Test: accessibility/ios-simulator/dialog-did-become-focused.html

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityElementDidBecomeFocused]):

LayoutTests:

  • accessibility/ios-simulator/dialog-did-become-focused-expected.txt: Added.
  • accessibility/ios-simulator/dialog-did-become-focused.html: Added.
5:27 PM Changeset in webkit [206189] by Keith Rollin
  • 12 edits in trunk/Source

Add new logging for network resource loading
https://bugs.webkit.org/show_bug.cgi?id=162237

Reviewed by Antti Koivisto.

Add new logging along the non-main path for resource loading. This
logging should allow us to differentiate between lack-of-logging due
execution along a path that doesn't have logging statements and
lack-of-logging due to a hung process.

Source/WebCore:

No new tests -- there are no tests for logging.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startLoadingMainResource):
(WebCore::DocumentLoader::isAlwaysOnLoggingAllowed):

  • loader/DocumentLoader.h:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterWillSubmitForm):

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::load):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::isAlwaysOnLoggingAllowed):

  • loader/cache/CachedResourceLoader.h:
  • page/Frame.h:

Source/WebKit2:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::startNetworkLoad):
(WebKit::NetworkResourceLoader::setDefersLoading):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveBuffer):

  • NetworkProcess/NetworkResourceLoader.h:
  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::loadResource):
(WebKit::WebLoaderStrategy::scheduleLoad):

5:25 PM Changeset in webkit [206188] by Alan Bujtas
  • 5 edits
    2 adds in trunk

REGRESSION (r204552): Athlete search on Strava gives bad rendering.
https://bugs.webkit.org/show_bug.cgi?id=162250

Reviewed by Simon Fraser.

Source/WebCore:

Test: fast/layers/blank-content-when-child-layer-is-at-negative-big-number.html

  • platform/graphics/LayoutRect.cpp:

(WebCore::LayoutRect::checkedUnite):

  • platform/graphics/LayoutRect.h:

(WebCore::LayoutRect::isMaxXMaxYRepresentable):
(WebCore::LayoutRect::maxXMaxYCorner): Deleted.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects):

LayoutTests:

While computing the size of a particular layer, we unite the content size and the descendant layers' size.
If a descendant layer is positioned far off, the computed rectangle might not fully cover the original rectangles.
This happens when the 2 rectangles' distance is close to the maximum LayoutUnit value.
It's fairly common technic to put some content offscreen (top: -99999999px;). In order to keep the main content
visible, we need to ensure that the parent layer never gets cut off, while uniting it with the descendant layers.

  • fast/layers/blank-content-when-child-layer-is-at-negative-big-number-expected.html: Added.
  • fast/layers/blank-content-when-child-layer-is-at-negative-big-number.html: Added.
5:21 PM Changeset in webkit [206187] by aakash_jain@apple.com
  • 2 edits in trunk/Tools

enable remote_api (for debugging) in flakiness dashboard app
https://bugs.webkit.org/show_bug.cgi?id=162325

Reviewed by Alexey Proskuryakov.

  • TestResultServer/app.yaml: enabled remote_api and datastore_admin.
4:58 PM Changeset in webkit [206186] by jer.noble@apple.com
  • 5 edits in trunk

[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-appendwindow.html
https://bugs.webkit.org/show_bug.cgi?id=162306

Reviewed by Darin Adler.

Source/WebCore:

appendWindowStart should be a restricted double, and both it and appendWindowEnd should throw
TypeError exceptions when setting them to disallowed values.

  • Modules/mediasource/SourceBuffer.cpp:

(WebCore::SourceBuffer::setAppendWindowStart):
(WebCore::SourceBuffer::setAppendWindowEnd):

  • Modules/mediasource/SourceBuffer.idl:

LayoutTests:

  • platform/mac/TestExpectations:
4:56 PM Changeset in webkit [206185] by jer.noble@apple.com
  • 4 edits in trunk

[media-source] Fix imported/w3c/web-platform-tests/media-source/mediasource-preload.html
https://bugs.webkit.org/show_bug.cgi?id=162304

Reviewed by Darin Adler.

Source/WebCore:

If an error occurs while loading a URL on behalf of MediaPlayerPrivateAVFObjC, make sure to signal
that error to AVFoundation, so that the HTMLMediaElement is notified of the error.

  • platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:

(WebCore::WebCoreAVFResourceLoader::notifyFinished):

LayoutTests:

  • platform/mac/TestExpectations:
4:11 PM Changeset in webkit [206184] by Ryan Haddad
  • 4 edits in trunk/Tools

Unreviewed, rolling out r206180.

Roll r206178 back in as the necessary changes have been made
on the build master.

Reverted changeset:

"Unreviewed, rolling out r206178."
https://bugs.webkit.org/show_bug.cgi?id=162249
http://trac.webkit.org/changeset/206180

3:57 PM Changeset in webkit [206183] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

DFG::StoreBarrierInsertionPhase should assume that any epoch increment may make objects older
https://bugs.webkit.org/show_bug.cgi?id=162319

Reviewed by Saam Barati.

The store barrier phase needs to be aware of the fact that an object that is not in the
OldBlack state may be concurrently brought into that state. That means that:

  • We cannot reason about the relative ages of objects. An object is either new, in which case we can store to it without barriers, or it's not in which case it needs a barrier.


  • After we insert a barrier on an object, the object is no longer new, because now the GC knows about it and the GC may do things to it, like make it OldBlack.


This is a perf-neutral change. These optimizations were never particularly profitable.

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
3:36 PM Changeset in webkit [206182] by ap@apple.com
  • 2 edits in trunk/Tools

Use a hardcoded patch for sRGB color profile
https://bugs.webkit.org/show_bug.cgi?id=162320
rdar://problem/28387318

Reviewed by Simon Fraser.

This is a workaround for rdar://problem/28392768

  • DumpRenderTree/mac/LayoutTestHelper.m:

(installLayoutTestColorProfile):

3:30 PM Changeset in webkit [206181] by andersca@apple.com
  • 7 edits in trunk/Source/WebCore

Remove "in-store" from "-apple-pay-button-type"
https://bugs.webkit.org/show_bug.cgi?id=162321
rdar://problem/28394581

Reviewed by Beth Dakin.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator ApplePayButtonType):

  • css/CSSValueKeywords.in:
  • css/parser/CSSParser.cpp:

(WebCore::isValidKeywordPropertyAndValue):

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

  • rendering/RenderThemeCocoa.mm:

(WebCore::toPKPaymentButtonType):

  • rendering/style/RenderStyleConstants.h:
3:30 PM Changeset in webkit [206180] by Ryan Haddad
  • 4 edits in trunk/Tools

Unreviewed, rolling out r206178.

This change caused buildbot config issues.

Reverted changeset:

"Add Sierra bots to buildbot and dashboard."
https://bugs.webkit.org/show_bug.cgi?id=162249
http://trac.webkit.org/changeset/206178

3:19 PM Changeset in webkit [206179] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix occasional using uninitialized memory crashes after r206168.
https://bugs.webkit.org/show_bug.cgi?id=162247

This fixes a crash in imported/w3c/web-platform-tests/url/urlsearchparams-constructor.html
I could reproduce about 10% of the time.

  • html/URLSearchParams.h:

Initialize the pointer to nullptr.

3:16 PM Changeset in webkit [206178] by commit-queue@webkit.org
  • 4 edits in trunk/Tools

Add Sierra bots to buildbot and dashboard.
https://bugs.webkit.org/show_bug.cgi?id=162249

Patch by Dean Johnson <dean_johnson@apple.com> on 2016-09-20
Reviewed by Alexey Proskuryakov.

  • BuildSlaveSupport/build.webkit.org-config/config.json:
  • BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
  • BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:

(WebKitBuildbot):

2:50 PM Changeset in webkit [206177] by achristensen@apple.com
  • 5 edits in trunk

Reduce allocations in URLParser
https://bugs.webkit.org/show_bug.cgi?id=162241

Reviewed by Chris Dumez.

Source/WebCore:

Use Vectors instead of StringBuilders. This allows us to use the inline capacity on the stack
for short URLs (<2KB) and also allows us to skip branches because we know whether the
contained type is UChar or LChar at compile time. It also allows us to use uncheckedAppend.

Added new API tests for parts that were less tested, but there is
no change in behavior except for a performance improvement.

  • platform/URLParser.cpp:

(WebCore::appendCodePoint):
(WebCore::encodeQuery):
(WebCore::URLParser::failure):
(WebCore::URLParser::parse):
(WebCore::percentDecode):
(WebCore::domainToASCII):
(WebCore::hasInvalidDomainCharacter):
(WebCore::URLParser::parseHost):
(WebCore::formURLDecode):
(WebCore::isC0Control): Deleted.

  • platform/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):
(TestWebKitAPI::checkURL):

2:43 PM Changeset in webkit [206176] by andersca@apple.com
  • 2 edits in trunk/Source/WebKit2

Can't present a payment sheet if a sheet is already active in another window
https://bugs.webkit.org/show_bug.cgi?id=162314
rdar://problem/27643511

Reviewed by Tim Horton.

Instead of keeping track of whether a sheet is active or not, keep track of its underlying payment coordinator proxy,
so we can hide it and send a cancel event to WebCore if another sheet is being presented.

  • UIProcess/ApplePay/WebPaymentCoordinatorProxy.cpp:

(WebKit::WebPaymentCoordinatorProxy::~WebPaymentCoordinatorProxy):
(WebKit::WebPaymentCoordinatorProxy::showPaymentUI):
(WebKit::WebPaymentCoordinatorProxy::didReachFinalState):

2:19 PM Changeset in webkit [206175] by bshafiei@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

2:19 PM Changeset in webkit [206174] by bshafiei@apple.com
  • 5 edits in tags/Safari-602.2.7.1/Source

Versioning.

2:10 PM Changeset in webkit [206173] by bshafiei@apple.com
  • 1 copy in tags/Safari-602.2.7.1

New tag.

2:04 PM Changeset in webkit [206172] by fpizlo@apple.com
  • 15 edits in trunk/Source/JavaScriptCore

Rename MarkedSpace::version/MarkedBlock::version to MarkedSpace::markingVersion/MarkedBlock::markingVersion
https://bugs.webkit.org/show_bug.cgi?id=162310

Reviewed by Geoffrey Garen.

In bug 162309, which is part of my concurrent GC work, I'll need to introduce a second
version-based flip. This one will be for newlyAllocated bits. This will allow me to
cheaply preserve per-object live state during marking. MarkedBlock::aboutToMarkSlow() will
do this instead of clearMarks():

  • Walk the mark bits, simultaneously counting the number of set bits and clearing them.
  • If the count is zero, then we're done.
  • If the count is equal to the max number of cells in the block, then set the allocated bit for the block.
  • If the count is something else, create a newlyAllocated vector.


The hope is that the last mode is going to be rare, since most blocks are not fragmented
at end of GC. Usually, we will fill them in with objects by allocating! But if we do
create newlyAllocated bits then we need to have some way of blowing them away later.

This is where a second version comes in. We can have a version for newlyAllocated bits,
which we increment at the end of marking, at around the same time that we clear all
allocated bits.

This means that the MarkedBlock will have two different version-based flips, so terms like
"flip" and "version" aren't enough.

This patch gets rid of the term "flip" entirely. It's a term of art in GCs that refers to
the state change at the beginning or end of GC. It refers to the logical state change, not
the physical one. It doesn't actually make sense to speak of a block being flipped
independently of other blocks. It's true that our implementation of the flip makes some
state updates happen lazily, but the block updating itself in some way (like clearing mark
bits) isn't the flip - the flip already happened when the version was incremented.

We no longer refer to a version without qualifying what kind of version it is. The type is
HeapVersion. All of the version members were renamed to markingVersion, to reflect the
fact that this version is just used for doing things to marking state. Instead of asking
if the block needsFlip(), we ask if areMarksStale().

This will let us introduce a second version for newlyAllocated, and will let us speak of
the two versions unambiguously.

  • heap/CellContainer.h:
  • heap/CellContainerInlines.h:

(JSC::CellContainer::isMarked):
(JSC::CellContainer::isMarkedOrNewlyAllocated):
(JSC::CellContainer::aboutToMark):
(JSC::CellContainer::areMarksStale):
(JSC::CellContainer::needsFlip): Deleted.

  • heap/ConservativeRoots.cpp:

(JSC::ConservativeRoots::genericAddPointer):
(JSC::ConservativeRoots::genericAddSpan):

  • heap/HeapInlines.h:

(JSC::Heap::isMarked):
(JSC::Heap::isMarkedConcurrently):
(JSC::Heap::testAndSetMarked):

  • heap/HeapUtil.h:

(JSC::HeapUtil::findGCObjectPointersForMarking):

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::isPagedOut):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::sweepHelperSelectSweepMode):
(JSC::MarkedBlock::Handle::sweepHelperSelectMarksMode):
(JSC::MarkedBlock::aboutToMarkSlow):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::assertMarksNotStale):
(JSC::MarkedBlock::areMarksStale):
(JSC::MarkedBlock::Handle::areMarksStale):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::markCount):
(JSC::MarkedBlock::Handle::isLive):
(JSC::MarkedBlock::Handle::isLiveCell):
(JSC::MarkedBlock::Handle::sweepHelperSelectFlipMode): Deleted.
(JSC::MarkedBlock::assertFlipped): Deleted.
(JSC::MarkedBlock::needsFlip): Deleted.
(JSC::MarkedBlock::Handle::needsFlip): Deleted.

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::areMarksStale):
(JSC::MarkedBlock::aboutToMark):
(JSC::MarkedBlock::assertMarksNotStale):
(JSC::MarkedBlock::Handle::assertMarksNotStale):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::isMarkedConcurrently):
(JSC::MarkedBlock::testAndSetMarked):
(JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::needsFlip): Deleted.
(JSC::MarkedBlock::assertFlipped): Deleted.
(JSC::MarkedBlock::Handle::assertFlipped): Deleted.

  • heap/MarkedBlockInlines.h:

(JSC::MarkedBlock::Handle::isLive):
(JSC::MarkedBlock::Handle::isLiveCell):
(JSC::MarkedBlock::resetMarkingVersion):
(JSC::MarkedBlock::resetVersion): Deleted.

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::beginMarking):

  • heap/MarkedSpace.h:

(JSC::MarkedSpace::markingVersion):
(JSC::MarkedSpace::version): Deleted.

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::SlotVisitor):
(JSC::SlotVisitor::didStartMarking):
(JSC::SlotVisitor::appendJSCellOrAuxiliary):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::markAuxiliary):

  • heap/SlotVisitor.h:

(JSC::SlotVisitor::markingVersion):
(JSC::SlotVisitor::version): Deleted.

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::specializedVisit):
(JSC::WeakBlock::reap):

1:57 PM Changeset in webkit [206171] by commit-queue@webkit.org
  • 14 edits in trunk/JSTests

[JSC] Do not use EagerRun on tests counting recompilation
https://bugs.webkit.org/show_bug.cgi?id=162248

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-09-20
Reviewed by Geoffrey Garen.

This patch adds defaultNoEagerRun to all the tests
for which recompilation is the symptom of a bug.
The reason is that an OSR Exit can be unrelated to the tested
nodes when we are running in Eager mode.

  • stress/arith-abs-on-various-types.js:
  • stress/arith-ceil-on-various-types.js:
  • stress/arith-clz32-on-various-types.js:
  • stress/arith-cos-on-various-types.js:
  • stress/arith-floor-on-various-types.js:
  • stress/arith-fround-on-various-types.js:
  • stress/arith-log-on-various-types.js:
  • stress/arith-round-on-various-types.js:
  • stress/arith-sin-on-various-types.js:
  • stress/arith-sqrt-on-various-types.js:
  • stress/arith-tan-on-various-types.js:
  • stress/arith-trunc-on-various-types.js:
  • stress/compare-strict-eq-on-various-types.js:

(testAllTypesCall):
The value 2 came from the other tests.
CompareStrictEq supports many more cases, the worst case
is bool->int->int52->number->polymorphic.

1:44 PM Changeset in webkit [206170] by n_wang@apple.com
  • 5 edits in trunk

AX: voiceover does not read contents of input role="spinbutton"
https://bugs.webkit.org/show_bug.cgi?id=162137

Reviewed by Chris Fleizach.

Source/WebCore:

The aria-valuenow attribute value on the spinbutton is not exposed
on iOS. We should expose aria-valuenow attribute for range controls
based on https://www.w3.org/TR/wai-aria/states_and_properties#aria-valuenow

Changes are covered in the modified test.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityValue]):

LayoutTests:

  • accessibility/ios-simulator/spinbutton-expected.txt:
  • accessibility/ios-simulator/spinbutton.html:
1:25 PM Changeset in webkit [206169] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

URLParser: uidna_IDNToASCII_56 is deprecated
https://bugs.webkit.org/show_bug.cgi?id=161841

Patch by Michael Catanzaro <Michael Catanzaro> on 2016-09-20
Reviewed by Alex Christensen.

Add pragmas to silence the warning, plus a FIXME.

  • platform/URLParser.cpp:

(WebCore::domainToASCII):

1:11 PM Changeset in webkit [206168] by achristensen@apple.com
  • 7 edits in trunk

Make URLSearchParams spec-compliant
https://bugs.webkit.org/show_bug.cgi?id=162247

Reviewed by Chris Dumez and Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

Covered by newly-passing web platform tests.

  • html/DOMURL.cpp:

(WebCore::DOMURL::~DOMURL):
(WebCore::DOMURL::setHref):
(WebCore::DOMURL::setQuery):
Update any associated URLSearchParams object when the query could change.
(WebCore::DOMURL::searchParams):
The lifetime of the URLSearchParams was wrong. We were creating a new URLSearchParams each time
URL.searchParams was called, and we should have been creating one the first time and returning the
same instance for subsequent calls. This means the DOMURL must own the URLSearchParams if it is associated,
but if it is not associated, then a URLSearchParams can live on its own.

  • html/DOMURL.h:
  • html/URLSearchParams.h:

(WebCore::URLSearchParams::URLDestroyed):
(WebCore::URLSearchParams::setContents):

1:05 PM Changeset in webkit [206167] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Remove AuthorStyleSheets::m_hadActiveLoadingStylesheet bit
https://bugs.webkit.org/show_bug.cgi?id=162312

Reviewed by Chris Dumez.

  • dom/AuthorStyleSheets.cpp:

(WebCore::AuthorStyleSheets::analyzeStyleSheetChange):

We can handle loading sheets with the normal stylesheet change logic. Remove the special case.

(WebCore::filterEnabledNonemptyCSSStyleSheets):

Filter out loading stylesheets.

  • dom/AuthorStyleSheets.h:
1:03 PM Changeset in webkit [206166] by Keith Rollin
  • 8 edits in trunk/Source

Adjust current networking logging
https://bugs.webkit.org/show_bug.cgi?id=162235

Reviewed by Antti Koivisto.

Update the "always on" network logging in order to better track the
loading of a particular resource and to better bind together the
resources downloaded for a particular page and frame. Do this by
consistently logging pageID, frameID, and resourceID.

Source/WebCore:

No new tests -- there are no tests for logging.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkLoadCompleteForThisFrame):

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::frame):

Source/WebKit2:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFailLoading):
(WebKit::NetworkResourceLoader::continueWillSendRequest):

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::scheduleLoad):
(WebKit::WebLoaderStrategy::startLocalLoad):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::create):
(WebKit::WebResourceLoader::WebResourceLoader):
(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
(WebKit::WebResourceLoader::didReceiveResource):

  • WebProcess/Network/WebResourceLoader.h:
1:01 PM Changeset in webkit [206165] by achristensen@apple.com
  • 9 edits in trunk

Non-special URLs should have an opaque origin
https://bugs.webkit.org/show_bug.cgi?id=162254

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/url/a-element-expected.txt:
  • web-platform-tests/url/a-element-xhtml-expected.txt:
  • web-platform-tests/url/url-constructor-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • page/SecurityOrigin.cpp:

(WebCore::shouldTreatAsUniqueOrigin):
According to https://url.spec.whatwg.org/#origin all URLs with non-special protocols
should have a unique SecurityOrigin whose serialization is "null".

LayoutTests:

  • http/tests/security/postMessage/invalid-origin-throws-exception-expected.txt:
  • http/tests/security/postMessage/invalid-origin-throws-exception.html:
12:31 PM Changeset in webkit [206164] by Ryan Haddad
  • 2 edits in trunk/Source/JavaScriptCore

Rebaseline builtins generator tests after r206155.

Unreviewed test gardening.

  • Scripts/tests/builtins/expected/WebCoreJSBuiltins.h-result:
12:11 PM Changeset in webkit [206163] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[WinCairo] Not building since 206044
https://bugs.webkit.org/show_bug.cgi?id=162246

Patch by Christopher Reid <Christopher.Reid@am.sony.com> on 2016-09-20
Reviewed by Alex Christensen.

No new tests. No change in behaviour.

  • bindings/js/JSWebGLRenderingContextCustom.cpp:
  • platform/network/curl/CookieJarCurl.cpp:
11:46 AM Changeset in webkit [206162] by achristensen@apple.com
  • 5 edits in trunk

Align URLParser with web platform tests when parsing non-special relative URLs ending in AuthorityOrHost state
https://bugs.webkit.org/show_bug.cgi?id=162251

Reviewed by Tim Horton.

Source/WebCore:

Covered by new and updated API tests.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
Fix parsing of non-special URLs that end after scheme:// with no authority.
We used to assume that parsing non-special schemes would never end with just scheme:// but a string can indeed end right there.
When a non-special relative URL contains just scheme:// we need the resulting URL to be valid to conform with the web platform tests.
(WebCore::URLParser::parseHostAndPort):
Renamed to reflect what the function actually does.
(WebCore::URLParser::internalValuesConsistent):
Add utility function for testing.
(WebCore::URLParser::parseHost): Deleted.

  • platform/URLParser.h:

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::checkURL):
(TestWebKitAPI::TEST_F):
(TestWebKitAPI::checkRelativeURL):
(TestWebKitAPI::checkURLDifferences):
(TestWebKitAPI::checkRelativeURLDifferences):

11:41 AM Changeset in webkit [206161] by jfernandez@igalia.com
  • 6 edits in trunk

[css-grid] The 'grid' shorthand has a new syntax.
https://bugs.webkit.org/show_bug.cgi?id=161954

Reviewed by Darin Adler.

Source/WebCore:

Implementation of the new CSS syntax for the 'grid' shorthand, as
defined in the CSS Grid Layout specification:

No new tests, just adapted the ones we already have and added a few additional test cases.

  • css/CSSValueKeywords.in:
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseImplicitAutoFlow): Added. Similar to parseGridAutoFlow, but using the new 'auto-flow' keyword.
(WebCore::CSSParser::parseGridShorthand): New syntax of the 'grid' shorthand.

  • css/parser/CSSParser.h:

LayoutTests:

Adapted the already defined test cases to the new syntax of the
'grid' shorthand. Also added a few additional test cases.

  • fast/css-grid-layout/grid-shorthand-get-set-expected.txt:
  • fast/css-grid-layout/grid-shorthand-get-set.html:
11:35 AM Changeset in webkit [206160] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cloop build.

  • runtime/VM.h:
11:34 AM Changeset in webkit [206159] by achristensen@apple.com
  • 4 edits in trunk

URLParser should allow '@' in user
https://bugs.webkit.org/show_bug.cgi?id=162272

Reviewed by Tim Horton.

Source/WebCore:

Covered by a new API test.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):
The spec describes using an "@ flag" and rewinding iterators. I've implemented the authority parsing
and host parsing a little differently, but this makes it equivalent.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:31 AM Changeset in webkit [206158] by achristensen@apple.com
  • 4 edits in trunk

URLParser: Fix parsing relative URLs with one slash after the scheme:
https://bugs.webkit.org/show_bug.cgi?id=162294

Reviewed by Tim Horton.

Source/WebCore:

This fixes the relatively-obscure case where a relative URL has the same special scheme as the base,
but there is only one slash after the scheme: at the beginning of the relative URL. According to spec,
this should be interpreted the same as if the scheme: were not there.
For example, parsing "http:/example.com/" relative to "http://example.org/foo/bar" should be the same as
parsing "/example.com/" relative to "http://example.org/foo/bar".

Covered by a new API test.

  • platform/URLParser.cpp:

(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:27 AM Changeset in webkit [206157] by achristensen@apple.com
  • 4 edits in trunk

Fix Windows file URL quirks in URLParser
https://bugs.webkit.org/show_bug.cgi?id=162303

Reviewed by Tim Horton.

Source/WebCore:

Windows file urls allow c:\ and c|\ to have the same meaning, but when serialized they should both be c:/.
This is now standardized to allow cross-platform uniform behavior of URLs.

Covered by new API tests and progress on web platform tests when URLParser is enabled.

  • platform/URLParser.cpp:

(WebCore::incrementIteratorSkippingTabAndNewLine):
(WebCore::isWindowsDriveLetter):
(WebCore::checkWindowsDriveLetter):
(WebCore::shouldCopyFileURL):
(WebCore::URLParser::parseSerializedURL):
(WebCore::URLParser::parse):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

11:24 AM Changeset in webkit [206156] by commit-queue@webkit.org
  • 27 edits
    2 adds in trunk/Source/WebCore

Rename FrameData to ImageFrame, move it to a separate file and use it for all ports
https://bugs.webkit.org/show_bug.cgi?id=159819

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-09-20
Reviewed by Simon Fraser.

Rename FrameData to ImageFrame and move it to a separate file so caching
it can be managed outside the BitmapImage object. Make the data members
of FrameData be private and add getters to return their values. Add backing
store and disposalMethod members, getter and setters to ImageFrame so it can
replace the non-CG ImageFrame class.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:

Add ImageFrame class to WebCore project.

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::BitmapImage): The metadata for the non-decoder case is now calculated in the ImageFrame::initialize().
(WebCore::BitmapImage::haveFrameImageAtIndex): Call ImageFrame's getters instead of access private members.
(WebCore::BitmapImage::destroyDecodedData): Pass ImageFrame::Caching::Metadata to ImageFrame::clear() to clear the image only.
(WebCore::BitmapImage::destroyDecodedDataIfNecessary): ImageFrame::usedFrameBytes() is now renamed to ImageFrame::frameBytes().
(WebCore::BitmapImage::cacheFrame): Call ImageFrame::initialize() to set the image and cache the frame's metadata.
(WebCore::BitmapImage::dataChanged): Pass ImageFrame::Caching::Empty to ImageFrame::clear() to clear the frame's image and metadata.
(WebCore::BitmapImage::ensureFrameAtIndexIsCached): Call ImageFrame's getters instead of access private members.
(WebCore::BitmapImage::frameImageAtIndex): Call ImageFrame's getters instead of access private members.
(WebCore::BitmapImage::frameIsCompleteAtIndex): Pass ImageFrame::Caching::Metadata to ensureFrameAtIndexIsCached() to ensure the frame's metadata is cached.
(WebCore::BitmapImage::frameDurationAtIndex): Pass ImageFrame::Caching::Metadata to ensureFrameAtIndexIsCached() to ensure the frame's metadata is cached.
(WebCore::BitmapImage::frameHasAlphaAtIndex): Pass ImageFrame::Caching::Metadata to ensureFrameAtIndexIsCached() to ensure the frame's metadata is cached.
(WebCore::BitmapImage::frameOrientationAtIndex): Pass ImageFrame::Caching::Metadata to ensureFrameAtIndexIsCached() to ensure the frame's metadata is cached.
(WebCore::BitmapImage::singlePixelSolidColor): Call ImageFrame's getters instead of access private members.
(WebCore::BitmapImage::repetitionCount): Change the return type to be RepetitionCount instead of int.
(WebCore::BitmapImage::shouldAnimate): Use a simpler condition since RepetitionCountNone is equal to zero.
(WebCore::BitmapImage::startAnimation): Replace the cAnimation* constants by the new RepetitionCount* enum.
(WebCore::BitmapImage::internalAdvanceAnimation): Replace the cAnimation* constants by the new RepetitionCount* enum.

  • platform/graphics/BitmapImage.h: FrameData is renamed to ImageFrame and moved to a separate file named ImageFrame.h.

(WebCore::FrameData::FrameData): Deleted.
(WebCore::FrameData::~FrameData): Deleted.
(WebCore::FrameData::clear): Deleted.
(WebCore::FrameData::usedFrameBytes): Deleted.

  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::fillRect): Make it efficient to fill a rect in the ImageBackingStore with the same color.
(WebCore::ImageBackingStore::pixelAt): Asserts the point is in the bounds of the ImageBackingStore size.
(WebCore::ImageBackingStore::setPixel): Use pixelValue().
(WebCore::ImageBackingStore::inBounds): Private functions check whether a point or a rect is in the bounds of the ImageBackingStore size.
(WebCore::ImageBackingStore::pixelValue): Calculate the RGBA value form red, green, blue and alpha values.

  • platform/graphics/ImageFrame.cpp: Added.

(WebCore::ImageFrame::ImageFrame):
(WebCore::ImageFrame::~ImageFrame):
(WebCore::ImageFrame::operator=):
(WebCore::ImageFrame::fillMetaData): Caches the ImageFrame's metadata.
(WebCore::ImageFrame::clearImage): Deletes all the allocated memory by ImageFrame which can be the ImageBackingStore or the NativeImagePtr.
(WebCore::ImageFrame::clear): Deletes the allocated memory and may or may not clears the metadata also.
(WebCore::ImageFrame::initialize): Sets a new ImageBackingStore or a new NativeImagePtr in the ImageFrame.
(WebCore::ImageFrame::size): Returns the size of the ImageFrame which can be the size of ImageBackingStore or the size of NativeImagePtr.
(WebCore::ImageFrame::singlePixelSolidColor): Returns whether the ImageFrame can be drawn by filling the image rectangle with a solid color.

  • platform/graphics/ImageFrame.h: Added.

(WebCore::operator++): SubsamplingLevel is strongly typed but RepetitionCount is not since it can be any unsigned value in addition to -1.
(WebCore::ImageFrame::ImageFrame):
(WebCore::ImageFrame::setDecoding):
(WebCore::ImageFrame::decoding):
(WebCore::ImageFrame::isEmpty):
(WebCore::ImageFrame::isPartial):
(WebCore::ImageFrame::isComplete):
(WebCore::ImageFrame::sizeRespectingOrientation):
(WebCore::ImageFrame::frameBytes):
(WebCore::ImageFrame::subsamplingLevel):
(WebCore::ImageFrame::setDisposalMethod):
(WebCore::ImageFrame::disposalMethod):
(WebCore::ImageFrame::image):
(WebCore::ImageFrame::setOrientation):
(WebCore::ImageFrame::orientation):
(WebCore::ImageFrame::setDuration):
(WebCore::ImageFrame::duration):
(WebCore::ImageFrame::setHasAlpha):
(WebCore::ImageFrame::hasAlpha):
(WebCore::ImageFrame::hasImage):
(WebCore::ImageFrame::hasInvalidImage):
(WebCore::ImageFrame::hasMetadata):
(WebCore::ImageFrame::backingStore):
(WebCore::ImageFrame::hasBackingStore):
Setters and getters for the private members.

  • platform/graphics/ImageSource.cpp:

(WebCore::ImageSource::calculateMaximumSubsamplingLevel): allowSubsamplingOfFrameAtIndex() is renamed to frameAllowSubsamplingAtIndex().
(WebCore::ImageSource::subsamplingLevelForScale): Use the values of the enum class SubsamplingLevel.
(WebCore::ImageSource::size): Use the values of the enum class SubsamplingLevel.
(WebCore::ImageSource::sizeRespectingOrientation): Use the values of the enum class SubsamplingLevel.
(WebCore::ImageSource::repetitionCount): Replace the constants cAnimation* by the enum RepetitionCount*.
(WebCore::ImageSource::frameAllowSubsamplingAtIndex): Rename allowSubsamplingOfFrameAtIndex() to frameAllowSubsamplingAtIndex().
(WebCore::ImageSource::frameSizeAtIndex): Replace the call to orientationAtIndex() by frameOrientationAtIndex().
(WebCore::ImageSource::frameOrientationAtIndex): Rename orientationAtIndex() to frameOrientationAtIndex().
(WebCore::ImageSource::dump): Replace the call to orientationAtIndex() by frameOrientationAtIndex().
(WebCore::ImageSource::allowSubsamplingOfFrameAtIndex): Deleted.
(WebCore::ImageSource::orientationAtIndex): Deleted.

  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::decoder): We need this function temporarily till we move caching the frames outside BitmapImage.

(WebCore::clearNativeImageSubimages):
(WebCore::clearNativeImageSubImages): Deleted.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::createImageSourceOptions): Use the values of the enum class SubsamplingLevel.
(WebCore::imageSourceOptions): Use the values of the enum class SubsamplingLevel.
(WebCore::ImageDecoder::repetitionCount): Change the return type to be RepetitionCount instead of int.
(WebCore::ImageDecoder::frameOrientationAtIndex): orientationAtIndex() is renamed to frameOrientationAtIndex().
(WebCore::ImageDecoder::frameAllowSubsamplingAtIndex): allowSubsamplingOfFrameAtIndex() is renamed to frameAllowSubsamplingAtIndex().
(WebCore::ImageDecoder::orientationAtIndex): Deleted.
(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex): Deleted.

  • platform/graphics/cg/ImageDecoderCG.h:
  • platform/graphics/cg/NativeImageCG.cpp:

(WebCore::clearNativeImageSubimages): Change SubImages() to Subimages().
(WebCore::clearNativeImageSubImages): Deleted.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameIsCompleteAtIndex): Use ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::ImageDecoder::frameHasAlphaAtIndex): Use ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::ImageDecoder::frameDurationAtIndex): Use ImageFrame::isEmpty() instead of checking the value of the decoding status().
(WebCore::ImageDecoder::createFrameImageAtIndex): Access the ImageBackingStore::image() function directly.
(WebCore::ImageFrame::ImageFrame): Deleted.
(WebCore::ImageFrame::operator=): Deleted.
(WebCore::ImageFrame::clearPixelData): Deleted.
(WebCore::ImageFrame::zeroFillPixelData): Deleted.
(WebCore::ImageFrame::zeroFillFrameRect): Deleted.
(WebCore::ImageFrame::initializeBackingStore): Deleted.
(WebCore::ImageFrame::hasAlpha): Deleted.
(WebCore::ImageFrame::setHasAlpha): Deleted.
(WebCore::ImageFrame::setOriginalFrameRect): Deleted.
(WebCore::ImageFrame::setStatus): Deleted.

  • platform/image-decoders/ImageDecoder.h:

(WebCore::ImageDecoder::repetitionCount): Use the type RepetitionCount and the enum RepetitionCount* values.
(WebCore::ImageDecoder::frameOrientationAtIndex): Rename orientationAtIndex() to frameOrientationAtIndex().
(WebCore::ImageDecoder::frameAllowSubsamplingAtIndex): Rename allowSubsamplingOfFrameAtIndex() to frameAllowSubsamplingAtIndex().
(WebCore::ImageDecoder::subsamplingLevelForScale): Use the enum class SubsamplingLevel value instead of integer values.
(WebCore::ImageFrame::ImageFrame): Deleted.
(WebCore::ImageFrame::copyRowNTimes): Deleted.
(WebCore::ImageFrame::size): Deleted.
(WebCore::ImageFrame::asNewNativeImage): Deleted.
(WebCore::ImageFrame::backingStore): Deleted.
(WebCore::ImageFrame::hasBackingStore): Deleted.
(WebCore::ImageFrame::originalFrameRect): Deleted.
(WebCore::ImageFrame::status): Deleted.
(WebCore::ImageFrame::duration): Deleted.
(WebCore::ImageFrame::disposalMethod): Deleted.
(WebCore::ImageFrame::setDuration): Deleted.
(WebCore::ImageFrame::setDisposalMethod): Deleted.
(WebCore::ImageFrame::pixelAt): Deleted.
(WebCore::ImageFrame::setPixel): Deleted.
(WebCore::ImageFrame::blendPixel): Deleted.
(WebCore::ImageDecoder::orientationAtIndex): Deleted.
(WebCore::ImageDecoder::allowSubsamplingOfFrameAtIndex): Deleted.

  • platform/image-decoders/bmp/BMPImageDecoder.cpp:

(WebCore::BMPImageDecoder::frameBufferAtIndex): Call ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::BMPImageDecoder::decode): Ditto.

  • platform/image-decoders/bmp/BMPImageReader.cpp:

(WebCore::BMPImageReader::decodeBMP): Call ImageFrame::isEmpty(). ImageBuffer::initializeBackingStore() is renamed to initialize().
(WebCore::BMPImageReader::processNonRLEData): Replace ImageFrame::zeroFillPixelData() by ImageBackingStore::clear() and ImageFrame::setAlpha().

  • platform/image-decoders/bmp/BMPImageReader.h:

(WebCore::BMPImageReader::setPixel): Call ImageBackingStore::setPixel() directly.
(WebCore::BMPImageReader::fillRGBA): Replace an efficient loop to call setPixel() by ImageBackingStore::fillRect().

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::GIFImageDecoder): Move the initialization of m_repetitionCount to the header file.
(WebCore::GIFImageDecoder::repetitionCount): Change the return type.
(WebCore::GIFImageDecoder::frameBufferAtIndex): Call ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::GIFImageDecoder::clearFrameBufferCache): Use the values of the new enum class ImageFrame::DisposalMethod.
(WebCore::GIFImageDecoder::haveDecodedRow): Call the ImageBackingStore API's directly.
(WebCore::GIFImageDecoder::frameComplete): Use the values of the new enum class ImageFrame::DisposalMethod.
(WebCore::GIFImageDecoder::initFrameBuffer): Move calling ImageBackingStore::setFrameRect() to be after initializing the ImageBackingStore itself.

  • platform/image-decoders/gif/GIFImageDecoder.h: Make repetitionCount() returns RepetitionCount and use the new enum class ImageFrame::DisposalMethod.
  • platform/image-decoders/gif/GIFImageReader.cpp:

(GIFImageReader::parse):

  • platform/image-decoders/gif/GIFImageReader.h:

(GIFFrameContext::GIFFrameContext): Use new enum class ImageFrame::DisposalMethod.

  • platform/image-decoders/ico/ICOImageDecoder.cpp:

(WebCore::ICOImageDecoder::frameBufferAtIndex): Call ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::ICOImageDecoder::decode): Ditto.

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::frameBufferAtIndex): Call ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::setPixel): Call ImageBackingStore::setPixel() directly.
(WebCore::JPEGImageDecoder::outputScanlines): ImageFrame::initializeBackingStore() is renamed to initialize().
(WebCore::JPEGImageDecoder::jpegComplete): ImageFrame::setStatus() is renamed to ImageFrame::setDecoding().
(WebCore::JPEGImageDecoder::decode): Call ImageFrame::isComplete() instead of checking the value of the decoding status().

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::frameBufferAtIndex): Call ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::PNGImageDecoder::rowAvailable): Call the ImageBackingStore APIs directly.
(WebCore::PNGImageDecoder::pngComplete): ImageFrame::setStatus() is renamed to setDecoding().
(WebCore::PNGImageDecoder::readChunks): Use the values of the new enum class ImageFrame::DisposalMethod.
(WebCore::PNGImageDecoder::clearFrameBufferCache): Replace the call to ImageFrame::clearPixelData() by ImageFrame::clear().
(WebCore::PNGImageDecoder::initFrameBuffer): Move calling ImageBackingStore::setFrameRect() to be after initializing the ImageBackingStore itself.
(WebCore::PNGImageDecoder::frameComplete): Call the ImageBackingStore APIs directly.

  • platform/image-decoders/png/PNGImageDecoder.h: Call ImageFrame::isComplete() instead of checking the value of the decoding status().
  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::frameBufferAtIndex): Call ImageFrame::isComplete() instead of checking the value of the decoding status().
(WebCore::WEBPImageDecoder::decode): ImageFrame::setStatus() is renamed to setDecoding(). And initializeBackingStore() is renamed to initialize().

11:12 AM Changeset in webkit [206155] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking js/regress-139548.html as a flaky timeout on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=160017

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
11:12 AM Changeset in webkit [206154] by fpizlo@apple.com
  • 46 edits
    6 adds in trunk

Make MarkedBlock state tracking support overlapped allocation and marking state
https://bugs.webkit.org/show_bug.cgi?id=161581

Reviewed by Geoffrey Garen.

JSTests:

Add a microbenchmark for why we want to reclaim empty blocks from other allocators.

  • microbenchmarks/switching-size-classes.js: Added.

Source/JavaScriptCore:

Concurrent GCs must allow for mutation and allocation during collection. We already know
how to mutate during collection. We have a write barrier for that. Allocation during
collection is more involved: the collector modifies the the mark bits, as well as other
kinds of MarkedBlock state, in-place during a collection. The allocator uses that same
MarkedBlock state to decide which regions of memory are free. This works if the allocator
never runs while the collector is running, but if we want to allow them to run at the same
time, then we need to have two versions of the state: one version built up by the
collector and another consumed by the allocator. We clear the collector state at the
beginning of collection, and splat the collector state onto the allocator state after
collection.

This could be super expensive, but we can make it cheap with some cleverness. The biggest
observation is just that most of the state is a handful of bits per block: is the block
free-listed? is it completely full? completely empty? in the incremental sweeper's
snapshot? is it retired? is it in eden? There is also state inside blocks, like the mark
bits, but I have a solid plan there and I'll save it for another patch. Once we view the
state of blocks as bits, we can put that state into bitvectors, so that if the collector
needs to transform the state of some blocks, it can do it with a single operation over
bitvectors. I like to think of this as 32-way parallelizing block operations, since
doing one operation on a 32-bit word in one of those bitvectors instantly affects 32
blocks.

This change converts all previous collections of MarkedBlocks, along with the MarkedBlock
state, into 8 bitvectors (live, empty, allocated, canAllocateButNotEmpty, eden, unswept,
markingNotEmpty, and markingRetired). The bitvectors separate allocator state (empty,
allocated, canAllocateButNotEmpty) from marking state (markingNotEmpty, markingRetired).

As a nice side-effect of switching to bitvectors, we get size class rebalancing for free.
It used to be that if a MarkedAllocator had an empty block, we would only allow that
memory to be reused by a different MarkedAllocator if we did an incremental sweep or a
full eager sweep. Now we hunt down all destructorless empty blocks before allocating new
MarkedBlocks. It would be relatively easy to also hunt down destructor empty blocks, but
the theory is that those might be expensive to sweep, so it might still be better to leave
those to the incremental sweeper.

This change is perf-neutral all around. I did some tests with two different kinds of
allocation strategies - something that is somewhat easier to do now that you can look for
blocks that are candidates for allocation by just scanning some bitvectors. I tried two
variants:

  • Allocate out of non-empty blocks first, leaving empty blocks for last in case a different allocator needed them. This is sort of a best-fit strategy. I tried this first, and it can be expressed as:


m_allocationCursor = m_canAllocateButNotEmpty.findBit(m_allocationCursor, true)


  • Allocate out of lower-indexed blocks first, treating empty and canAllocateButNotEmpty blocks equally. This is sort of a first-fit strategy. This is what I ended up settling on, and it can be expressed as:


m_allocationCursor = (m_canAllocateButNotEmpty | m_empty).findBit(m_allocationCursor, true)


The best-fit strategy meant 1% regressions in LongSpider and Octane overall, and a 11%
regression on Octane/earley. First-fit means perf-neutrality. Most great allocators skew
towards first-fit because it's empirically better, so this result is not surprising.

Overall, the performance of this patch on my machine is as follows, where "neutral" means
less than 1% and not statistically significant.

run-jsc-benchmarks:

SunSpider: neutral
LongSpider: 0.6% slower
V8Spider: neutral
Octane: neutral
Kraken: neutral
Microbenchmarks: 0.37% slower
AsmBench: neutral
CompressionBench: maybe 1% faster


For browser benchmarks, I report the ratio of means (bigger / smaller) along with a T-test
from Mathematica reported as % chance of not [sic] the null hypothesis. Note that we
normally consider anything less than 95% confidence to be inconclusive.

Browser benchmarks:

PLT3: 0.3% faster with 67% confidence
membuster:

Snap2FinishedLoadingPost: 0.68% more memory with 50% confidence
Snap3EndPost: 2.4% more memory with 61% confidence

JetStream: 0.2% slower with 32% confidence
Speedometer: 0.7% faster with 82% confidence


Additionally, Octane/splay's heap capacity goes down to ~180KB from ~200KB, so about a 10%
progression. This is due to the allocator rebalancing feature.

Finally, this breaks --useImmortalObjects. It was already broken as far as I can tell. I
filed a bug to reimplement it (bug 162296). Unless someone urgently needs this internal
tool, it's probably best to reimplement it after I'm done refactoring MarkedSpace.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • debugger/Debugger.cpp:
  • heap/CellContainer.h:
  • heap/CellContainerInlines.h:

(JSC::CellContainer::vm):
(JSC::CellContainer::heap):
(JSC::CellContainer::isMarkedOrNewlyAllocated):
(JSC::CellContainer::aboutToMark):
(JSC::CellContainer::isMarked): Deleted.
(JSC::CellContainer::flipIfNecessary): Deleted.

  • heap/ConservativeRoots.cpp:
  • heap/Heap.cpp:

(JSC::Heap::beginMarking):
(JSC::Heap::endMarking):
(JSC::Heap::collectAllGarbage):
(JSC::Heap::collectImpl):
(JSC::Heap::snapshotMarkedSpace):
(JSC::Heap::prepareForAllocation):
(JSC::Heap::zombifyDeadObjects):
(JSC::MarkedBlockSnapshotFunctor::MarkedBlockSnapshotFunctor): Deleted.
(JSC::MarkedBlockSnapshotFunctor::operator()): Deleted.
(JSC::Heap::resetAllocators): Deleted.

  • heap/Heap.h:
  • heap/HeapInlines.h:

(JSC::Heap::isMarked):
(JSC::Heap::isMarkedConcurrently):
(JSC::Heap::testAndSetMarked):

  • heap/HeapStatistics.cpp:
  • heap/HeapUtil.h:

(JSC::HeapUtil::findGCObjectPointersForMarking):
(JSC::HeapUtil::isPointerGCObjectJSCell):

  • heap/HeapVerifier.cpp:
  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::IncrementalSweeper):
(JSC::IncrementalSweeper::doSweep):
(JSC::IncrementalSweeper::sweepNextBlock):
(JSC::IncrementalSweeper::startSweeping):
(JSC::IncrementalSweeper::willFinishSweeping):

  • heap/IncrementalSweeper.h:
  • heap/LargeAllocation.h:

(JSC::LargeAllocation::isMarked):
(JSC::LargeAllocation::isMarkedConcurrently):
(JSC::LargeAllocation::isMarkedOrNewlyAllocated):
(JSC::LargeAllocation::aboutToMark):
(JSC::LargeAllocation::isMarkedDuringWeakVisiting): Deleted.
(JSC::LargeAllocation::flipIfNecessary): Deleted.
(JSC::LargeAllocation::flipIfNecessaryDuringMarking): Deleted.

  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::MarkedAllocator):
(JSC::MarkedAllocator::isPagedOut):
(JSC::MarkedAllocator::findEmptyBlock):
(JSC::MarkedAllocator::tryAllocateWithoutCollectingImpl):
(JSC::MarkedAllocator::allocateIn):
(JSC::MarkedAllocator::tryAllocateIn):
(JSC::MarkedAllocator::allocateSlowCaseImpl):
(JSC::MarkedAllocator::tryAllocateBlock):
(JSC::MarkedAllocator::addBlock):
(JSC::MarkedAllocator::removeBlock):
(JSC::MarkedAllocator::stopAllocating):
(JSC::MarkedAllocator::prepareForAllocation):
(JSC::MarkedAllocator::lastChanceToFinalize):
(JSC::MarkedAllocator::resumeAllocating):
(JSC::MarkedAllocator::beginMarkingForFullCollection):
(JSC::MarkedAllocator::endMarking):
(JSC::MarkedAllocator::snapshotForEdenCollection):
(JSC::MarkedAllocator::snapshotForFullCollection):
(JSC::MarkedAllocator::findBlockToSweep):
(JSC::MarkedAllocator::sweep):
(JSC::MarkedAllocator::shrink):
(JSC::MarkedAllocator::assertSnapshotEmpty):
(JSC::MarkedAllocator::dump):
(JSC::MarkedAllocator::dumpBits):
(JSC::MarkedAllocator::retire): Deleted.
(JSC::MarkedAllocator::filterNextBlock): Deleted.
(JSC::MarkedAllocator::setNextBlockToSweep): Deleted.
(JSC::MarkedAllocator::reset): Deleted.

  • heap/MarkedAllocator.h:

(JSC::MarkedAllocator::forEachBitVector):
(JSC::MarkedAllocator::forEachBitVectorWithName):
(JSC::MarkedAllocator::nextAllocator):
(JSC::MarkedAllocator::setNextAllocator):
(JSC::MarkedAllocator::forEachBlock):
(JSC::MarkedAllocator::resumeAllocating): Deleted.

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::tryCreate):
(JSC::MarkedBlock::Handle::Handle):
(JSC::MarkedBlock::Handle::~Handle):
(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::sweep):
(JSC::MarkedBlock::Handle::sweepHelperSelectScribbleMode):
(JSC::MarkedBlock::Handle::sweepHelperSelectEmptyMode):
(JSC::MarkedBlock::Handle::sweepHelperSelectHasNewlyAllocated):
(JSC::MarkedBlock::Handle::sweepHelperSelectSweepMode):
(JSC::MarkedBlock::Handle::sweepHelperSelectFlipMode):
(JSC::MarkedBlock::Handle::unsweepWithNoNewlyAllocated):
(JSC::MarkedBlock::Handle::setIsFreeListed):
(JSC::MarkedBlock::Handle::stopAllocating):
(JSC::MarkedBlock::Handle::lastChanceToFinalize):
(JSC::MarkedBlock::Handle::resumeAllocating):
(JSC::MarkedBlock::aboutToMarkSlow):
(JSC::MarkedBlock::clearMarks):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::Handle::didConsumeFreeList):
(JSC::MarkedBlock::markCount):
(JSC::MarkedBlock::Handle::isEmpty):
(JSC::MarkedBlock::noteMarkedSlow):
(JSC::MarkedBlock::Handle::removeFromAllocator):
(JSC::MarkedBlock::Handle::didAddToAllocator):
(JSC::MarkedBlock::Handle::didRemoveFromAllocator):
(JSC::MarkedBlock::Handle::isLive):
(JSC::MarkedBlock::Handle::isLiveCell):
(JSC::MarkedBlock::Handle::sweepHelperSelectStateAndSweepMode): Deleted.
(JSC::MarkedBlock::flipIfNecessary): Deleted.
(JSC::MarkedBlock::Handle::flipIfNecessary): Deleted.
(JSC::MarkedBlock::flipIfNecessarySlow): Deleted.
(JSC::MarkedBlock::flipIfNecessaryDuringMarkingSlow): Deleted.
(JSC::MarkedBlock::Handle::willRemoveBlock): Deleted.
(WTF::printInternal): Deleted.

  • heap/MarkedBlock.h:

(JSC::MarkedBlock::Handle::isFreeListed):
(JSC::MarkedBlock::Handle::index):
(JSC::MarkedBlock::aboutToMark):
(JSC::MarkedBlock::isMarked):
(JSC::MarkedBlock::isMarkedConcurrently):
(JSC::MarkedBlock::Handle::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::isMarkedOrNewlyAllocated):
(JSC::MarkedBlock::Handle::isOnBlocksToSweep): Deleted.
(JSC::MarkedBlock::Handle::setIsOnBlocksToSweep): Deleted.
(JSC::MarkedBlock::Handle::state): Deleted.
(JSC::MarkedBlock::flipIfNecessary): Deleted.
(JSC::MarkedBlock::flipIfNecessaryDuringMarking): Deleted.
(JSC::MarkedBlock::Handle::flipIfNecessary): Deleted.
(JSC::MarkedBlock::Handle::flipIfNecessaryDuringMarking): Deleted.
(JSC::MarkedBlock::Handle::flipForEdenCollection): Deleted.
(JSC::MarkedBlock::isMarkedDuringWeakVisiting): Deleted.
(JSC::MarkedBlock::Handle::isLive): Deleted.
(JSC::MarkedBlock::Handle::isLiveCell): Deleted.
(JSC::MarkedBlock::Handle::forEachLiveCell): Deleted.
(JSC::MarkedBlock::Handle::forEachDeadCell): Deleted.
(JSC::MarkedBlock::Handle::needsSweeping): Deleted.
(JSC::MarkedBlock::Handle::isAllocated): Deleted.
(JSC::MarkedBlock::Handle::isMarked): Deleted.

  • heap/MarkedBlockInlines.h: Added.

(JSC::MarkedBlock::Handle::isLive):
(JSC::MarkedBlock::Handle::isLiveCell):
(JSC::MarkedBlock::Handle::forEachLiveCell):
(JSC::MarkedBlock::Handle::forEachDeadCell):
(JSC::MarkedBlock::resetVersion):

  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::MarkedSpace):
(JSC::MarkedSpace::allocate):
(JSC::MarkedSpace::tryAllocate):
(JSC::MarkedSpace::sweep):
(JSC::MarkedSpace::prepareForAllocation):
(JSC::MarkedSpace::shrink):
(JSC::MarkedSpace::clearNewlyAllocated):
(JSC::MarkedSpace::beginMarking):
(JSC::MarkedSpace::endMarking):
(JSC::MarkedSpace::didAllocateInBlock):
(JSC::MarkedSpace::findEmptyBlock):
(JSC::MarkedSpace::snapshot):
(JSC::MarkedSpace::assertSnapshotEmpty):
(JSC::MarkedSpace::dumpBits):
(JSC::MarkedSpace::zombifySweep): Deleted.
(JSC::MarkedSpace::resetAllocators): Deleted.
(JSC::VerifyMarked::operator()): Deleted.
(JSC::MarkedSpace::flip): Deleted.

  • heap/MarkedSpace.h:

(JSC::MarkedSpace::nextVersion):
(JSC::MarkedSpace::firstAllocator):
(JSC::MarkedSpace::allocatorForEmptyAllocation):
(JSC::MarkedSpace::forEachAllocator):
(JSC::MarkedSpace::blocksWithNewObjects): Deleted.
(JSC::MarkedSpace::setIsMarking): Deleted.
(JSC::MarkedSpace::forEachLiveCell): Deleted.
(JSC::MarkedSpace::forEachDeadCell): Deleted.

  • heap/MarkedSpaceInlines.h: Added.

(JSC::MarkedSpace::forEachLiveCell):
(JSC::MarkedSpace::forEachDeadCell):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::markAuxiliary):
(JSC::SlotVisitor::visitChildren):

  • heap/Weak.h:

(WTF::HashTraits<JSC::Weak<T>>::emptyValue):
(WTF::HashTraits<JSC::Weak<T>>::peek):

  • heap/WeakBlock.cpp:

(JSC::WeakBlock::specializedVisit):
(JSC::WeakBlock::reap):

  • heap/WeakInlines.h:

(WTF::HashTraits<JSC::Weak<T>>::emptyValue): Deleted.
(WTF::HashTraits<JSC::Weak<T>>::peek): Deleted.

  • jit/JITThunks.h:
  • runtime/JSGlobalObject.cpp:
  • runtime/PrototypeMap.h:
  • runtime/SamplingProfiler.cpp:
  • runtime/WeakGCMap.h:
  • tools/JSDollarVMPrototype.cpp:

Source/WTF:

The main change here is to bring back FastBitVector.cpp, so that I could outline some
large slow path functions. This also adds some utilities, like atomicSetAndCheck() and
isEmpty(). The GC uses these.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/FastBitVector.cpp: Added.

(WTF::FastBitVectorWordOwner::setEqualsSlow):
(WTF::FastBitVectorWordOwner::resizeSlow):

  • wtf/FastBitVector.h:

(WTF::FastBitVectorWordOwner::operator=):
(WTF::FastBitVectorWordOwner::resize):
(WTF::FastBitVectorImpl::isEmpty):
(WTF::FastBitVector::atomicSetAndCheck):
(WTF::FastBitVector::operator[]): Deleted.

Tools:

Remove the always-trigger-copy-phase configuration.

  • Scripts/run-jsc-stress-tests:
11:07 AM Changeset in webkit [206153] by commit-queue@webkit.org
  • 10 edits in trunk

[WinCairo] Use find_package cairo in build
https://bugs.webkit.org/show_bug.cgi?id=162239

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2016-09-20
Reviewed by Alex Christensen.

.:

  • Source/cmake/FindCairo.cmake:
  • Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

No new tests. No change in behavior.

  • PlatformWinCairo.cmake:

Source/WebKit:

  • PlatformWin.cmake:

Tools:

  • DumpRenderTree/PlatformWin.cmake:
  • TestWebKitAPI/PlatformWin.cmake:
10:28 AM Changeset in webkit [206152] by commit-queue@webkit.org
  • 6 edits in trunk/LayoutTests

Web Inspector: adopt Object.awaitEvent in LayoutTests/inspector/model
https://bugs.webkit.org/show_bug.cgi?id=162074

Patch by Devin Rousso <Devin Rousso> on 2016-09-20
Reviewed by Brian Burg.

Replace instances of singleFireEventListener with awaitEvent and use promise logic to make
tests more readable.

  • inspector/model/frame-extra-scripts.html:
  • inspector/model/scope-chain-node.html:
  • inspector/model/script-resource-relationship-expected.txt:
  • inspector/model/script-resource-relationship.html:
  • inspector/model/stack-trace.html:
10:14 AM Changeset in webkit [206151] by Jonathan Bedard
  • 5 edits in trunk/Source

Undefined behavior: Left shift negative number
https://bugs.webkit.org/show_bug.cgi?id=161866

Reviewed by Keith Miller.

Left shifting a negative number is undefined behavior in C/C++, although most implementations do define it. Explicitly clarifying the intended behavior due to shifting negative number in some cases.

Source/JavaScriptCore:

  • dfg/DFGAbstractHeap.h:

(JSC::DFG::AbstractHeap::encode): Explicitly cast signed integer for left shift.

Source/WTF:

  • wtf/text/Base64.cpp:

(WTF::base64EncodeInternal): Changed signed character to unsigned when shifting.
(WTF::base64Encode): Ditto.
(WTF::base64URLEncode): Ditto.
(WTF::base64DecodeInternal): Ditto.

  • wtf/text/Base64.h: Ditto.

(WTF::SignedOrUnsignedCharVectorAdapter): Rebuilt to stop using union as a bitwise_cast.
(WTF::ConstSignedOrUnsignedCharVectorAdapter): Ditto.

8:58 AM Changeset in webkit [206150] by Wenson Hsieh
  • 2 edits in trunk/Tools

Unreviewed build fix on 10.10 bots.

  • TestWebKitAPI/mac/TestWKWebViewMac.h:
8:56 AM Changeset in webkit [206149] by sbarati@apple.com
  • 3 edits
    1 add in trunk

JSTests:
Unreviewed, added test for x86 32-bit failure for HasOwnProperty node in DFG.

  • stress/has-own-property-called-on-non-object.js: Added.

(let.objs):
(new.String):
(foo):

Source/JavaScriptCore:
Unreviewed fix for 32-bit DFG x86 implementation of HasOwnProperty.

Fixup phase is always setting ObjectUse on child1() of HasOwnProperty.
However, on x86 32-bit, I omitted a call to speculateObject() on child1().

  • dfg/DFGSpeculativeJIT32_64.cpp:

(JSC::DFG::SpeculativeJIT::compile):

8:47 AM Changeset in webkit [206148] by Wenson Hsieh
  • 3 edits in trunk/Tools

VideoControlsManager.VideoControlsManagerSingleLargeVideo fails intermittently on the Mac WK2 bot
https://bugs.webkit.org/show_bug.cgi?id=162255

Reviewed by Jer Noble.

This is reproducible by running the test repeatedly in a for loop (locally, I observed that running the test
back-to-back would result in the second one failing). This suggests that even on the runloop after the video
starts playing, the state of the playback controls manager may not be up to date in the UI process. Instead, we
can just spin the runloop until the playback controls are shown, which makes back-to-back tests to succeed and
will probably address flakiness on the bots for this test.

  • TestWebKitAPI/Tests/WebKit2Cocoa/VideoControlsManager.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKit2Cocoa/large-video-with-audio.html:
8:45 AM Changeset in webkit [206147] by Yusuke Suzuki
  • 4 edits
    2 adds in trunk

[JSC] Add typeof value === "symbol" handling to bytecode compiler
https://bugs.webkit.org/show_bug.cgi?id=162253

Reviewed by Sam Weinig.

JSTests:

  • microbenchmarks/is-symbol-mixed.js: Added.

(isSymbol):
(i.let.pair.of.list.String):

  • microbenchmarks/is-symbol.js: Added.

(isSymbol):

Source/JavaScriptCore:

Add typeof value === "symbol" handling to the bytecode compiler.
The effect is tiny, but it keeps consistency since the bytecode compiler
already has the similar optimization for "string" case.

  • bytecode/SpeculatedType.cpp:

(JSC::speculationFromJSType):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitEqualityOp):

8:26 AM Changeset in webkit [206146] by jer.noble@apple.com
  • 14 edits
    1 copy in trunk

[media-source] Support MediaSource.setLiveSeekableRanges()
https://bugs.webkit.org/show_bug.cgi?id=162252

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/media-source/interfaces-expected.txt:

Source/WebCore:

Fixes tests: imported/w3c/web-platform-tests/media-source/interfaces.html

imported/w3c/web-platform-tests/media-source/mediasource-liveseekable.html

Add support for a new part of the Media Source specification, the ability for clients to
specify the seekable ranges for a MediaSource-backed HTMLMediaElement.

Adding the live-seekable methods to MediaSource fixes a large number of the interfaces.html
tests, and the rest are fixed by adding on<event> handlers to MediaSource, SourceBuffer,
and SourceBufferList.

  • Modules/mediasource/MediaSource.cpp:

(WebCore::MediaSource::seekable):
(WebCore::MediaSource::setLiveSeekableRange):
(WebCore::MediaSource::clearLiveSeekableRange):

  • Modules/mediasource/MediaSource.h:
  • Modules/mediasource/MediaSource.idl:
  • Modules/mediasource/SourceBuffer.idl:
  • Modules/mediasource/SourceBufferList.idl:
  • Modules/mediasource/VideoPlaybackQuality.idl:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::seekable):

LayoutTests:

  • platform/mac/TestExpectations:
  • platform/mac/imported/w3c/web-platform-tests/media-source/interfaces-expected.txt:
  • platform/mac-wk1/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:
2:08 AM Changeset in webkit [206145] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win] Unreviewed warning fix.

  • page/CaptionUserPreferencesMediaAF.cpp:
1:29 AM Changeset in webkit [206144] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] Run layout tests in parallel.
https://bugs.webkit.org/show_bug.cgi?id=162145

Reviewed by Brent Fulgham.

To speed up layout tests, try running them in parallel.

  • Scripts/webkitpy/port/win.py:

(WinPort.default_child_processes): Deleted.

12:11 AM Changeset in webkit [206143] by Carlos Garcia Campos
  • 1 copy in releases/WebKitGTK/webkit-2.14.0

WebKitGTK+ 2.14.0

12:10 AM Changeset in webkit [206142] by Carlos Garcia Campos
  • 4 edits in releases/WebKitGTK/webkit-2.14

Unreviewed. Update OptionsGTK.cmake and NEWS for 2.14.0 release.

.:

  • Source/cmake/OptionsGTK.cmake: Bump version numbers.

Source/WebKit2:

  • gtk/NEWS: Add release notes for 2.14.0.
Note: See TracTimeline for information about the timeline view.