Timeline



Nov 18, 2016:

11:35 PM Changeset in webkit [208921] by Simon Fraser
  • 12 edits
    6 adds in trunk

[iOS WK2] Eliminate a source of flakiness in layout tests by forcing WebPage into "responsive" mode for all tests, with an internals override
https://bugs.webkit.org/show_bug.cgi?id=164980

Reviewed by Chris Dumez.

Source/WebCore:

WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
flag that impacts tile coverage.

During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().

Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.

Tests: fast/scrolling/ios/scroll-events-default.html

fast/scrolling/ios/scroll-events-responsive.html
fast/scrolling/ios/scroll-events-unresponsive.html

  • page/Page.h:

(WebCore::Page::eventThrottlingBehaviorOverride):
(WebCore::Page::setEventThrottlingBehaviorOverride):

  • testing/Internals.cpp:

(WebCore::Internals::setEventThrottlingBehaviorOverride):
(WebCore::Internals::eventThrottlingBehaviorOverride):

  • testing/Internals.h:
  • testing/Internals.idl:

Source/WebKit2:

WebPage::eventThrottlingDelay() uses a latency estimate based on the round-trip time from the UI process
to affect behavior, including whether scroll events are fired. This also affects the FrameView "scrolledByUser"
flag that impacts tile coverage.

During testing, latency falling above or below the 16ms threshold could affect behavior. Fix by forcing
WebPage into "responsive" mode while running tests, via InjectedBundlePage::prepare().

Add a nullable internals property so that a test can specify responsive, unresponsive or default behavior.

  • WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:

(WKBundlePageSetEventThrottlingBehaviorOverride):

  • WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::eventThrottlingDelay):

Tools:

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::prepare):

LayoutTests:

  • fast/scrolling/ios/scroll-events-default-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-default.html: Added.
  • fast/scrolling/ios/scroll-events-responsive-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-responsive.html: Added.
  • fast/scrolling/ios/scroll-events-unresponsive-expected.txt: Added.
  • fast/scrolling/ios/scroll-events-unresponsive.html: Added.
9:09 PM Changeset in webkit [208920] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build after r208917.

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionStack::ElementQueue::invokeAll):

8:45 PM Changeset in webkit [208919] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build after r208917.

  • dom/CustomElementReactionQueue.cpp:
8:38 PM Changeset in webkit [208918] by jiewen_tan@apple.com
  • 21 edits
    31 adds in trunk

Update SubtleCrypto::decrypt to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164739
<rdar://problem/29257848>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::decrypt method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-decrypt. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-decrypt.
  2. It implements decrypt operations of the following algorithms: AES-CBC, RSAES-PKCS1-V1_5, and RSA-OAEP.

Tests: crypto/subtle/aes-cbc-decrypt-malformed-parameters.html

crypto/subtle/aes-cbc-generate-key-encrypt-decrypt.html
crypto/subtle/aes-cbc-import-key-decrypt.html
crypto/subtle/decrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-decrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label.html
crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html
crypto/subtle/rsa-oaep-import-key-decrypt-label.html
crypto/subtle/rsa-oaep-import-key-decrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html
crypto/workers/subtle/aes-cbc-import-key-decrypt.html
crypto/workers/subtle/rsa-oaep-import-key-decrypt.html
crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::toCryptoKey):
(WebCore::toVector):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::jsSubtleCryptoFunctionDecryptPromise):
(WebCore::jsSubtleCryptoFunctionExportKeyPromise):
(WebCore::JSSubtleCrypto::decrypt):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::decrypt):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::decrypt):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::decryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::decryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

LayoutTests:

  • crypto/subtle/aes-cbc-decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-cbc-decrypt-malformed-parameters.html: Added.
  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/aes-cbc-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-decrypt.html: Added.
  • crypto/subtle/decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/decrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-decrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-oaep-decrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-import-key-decrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-key-encrypt-decrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-decrypt.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-decrypt.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-decrypt.js: Added.
  • crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-decrypt.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-decrypt.html: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt-expected.txt: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-decrypt.html: Added.
8:25 PM Changeset in webkit [208917] by Chris Dumez
  • 5 edits in trunk

Unreviewed, rolling out r208837.

The bots did not show a progression

Reverted changeset:

"REGRESSION(r208082): 1% Speedometer regression on iOS"
https://bugs.webkit.org/show_bug.cgi?id=164852
http://trac.webkit.org/changeset/208837

7:33 PM Changeset in webkit [208916] by Simon Fraser
  • 20 edits in trunk/Source

Remove use of std::chrono in WebPage and entrained code
https://bugs.webkit.org/show_bug.cgi?id=164967

Reviewed by Tim Horton.

Replace std::chrono with Seconds and Monotonic Time.

Use more C++11 initialization for WebPage data members.

Source/WebCore:

  • page/ChromeClient.h:
  • page/FrameView.cpp:

(WebCore::FrameView::scrollPositionChanged):
(WebCore::FrameView::setScrollVelocity):

  • page/FrameView.h:
  • platform/Timer.h:

(WebCore::TimerBase::startRepeating):
(WebCore::TimerBase::startOneShot):
(WebCore::TimerBase::augmentFireInterval):
(WebCore::TimerBase::augmentRepeatInterval):

  • platform/graphics/TiledBacking.h:

(WebCore::VelocityData::VelocityData):

  • platform/graphics/ca/TileController.cpp:

(WebCore::TileController::adjustTileCoverageRect):

Source/WebKit2:

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:

(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::timestamp):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<MonotonicTime>::encode):
(IPC::ArgumentCoder<MonotonicTime>::decode):
(IPC::ArgumentCoder<Seconds>::encode):
(IPC::ArgumentCoder<Seconds>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/ios/WKContentView.mm:

(WebKit::HistoricalVelocityData::HistoricalVelocityData):
(WebKit::HistoricalVelocityData::velocityForNewData):
(WebKit::HistoricalVelocityData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

  • WebProcess/WebCoreSupport/WebChromeClient.h:
  • WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:

(WebKit::WebChromeClient::eventThrottlingDelay):

  • WebProcess/WebPage/ViewUpdateDispatcher.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::WebPage):
(WebKit::m_userActivityHysteresis):
(WebKit::WebPage::didFlushLayerTreeAtTime):
(WebKit::WebPage::didCommitLoad):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::eventThrottlingDelay):
(WebKit::WebPage::updateVisibleContentRects):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

6:51 PM Changeset in webkit [208915] by dino@apple.com
  • 27 edits
    8 adds in trunk

AX: "(inverted-colors)" media query only matches on page reload; should match on change
https://bugs.webkit.org/show_bug.cgi?id=163564
<rdar://problem/28807350>

Source/WebCore:

Reviewed by Simon Fraser.

Mark some media queries as responding to notifications that
system accessibility settings have changed. When Page gets told
that has happened, check if any of the results have changed.

Tests: fast/media/mq-inverted-colors-live-update.html

fast/media/mq-monochrome-live-update.html
fast/media/mq-prefers-reduced-motion-live-update.html

  • css/MediaQueryEvaluator.cpp:

(WebCore::isAccessibilitySettingsDependent):
(WebCore::MediaQueryEvaluator::evaluate):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::addAccessibilitySettingsDependentMediaQueryResult):
(WebCore::StyleResolver::hasMediaQueriesAffectedByAccessibilitySettingsChange):

  • css/StyleResolver.h:

(WebCore::StyleResolver::hasAccessibilitySettingsDependentMediaQueries):

  • page/Page.cpp:

(WebCore::Page::accessibilitySettingsDidChange):

  • page/Page.h:

Source/WebKit2:

Reviewed by Simon Fraser.

Listen for the appropriate notifications that accessibility settings
have changed. This is a single notification on macOS, which uses WebViewImpl,
and more fine-grained notifications on iOS, using WKWebView.

When we see the notification, send a message to the WebProcess which will
then tell the WebCore::Page.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _accessibilitySettingsDidChange:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/Cocoa/WebViewImpl.h:
  • UIProcess/Cocoa/WebViewImpl.mm:

(-[WKAccessibilitySettingsObserver initWithImpl:]):
(-[WKAccessibilitySettingsObserver dealloc]):
(-[WKAccessibilitySettingsObserver _settingsDidChange:]):
(WebKit::WebViewImpl::WebViewImpl):
(WebKit::WebViewImpl::accessibilitySettingsDidChange):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::accessibilitySettingsDidChange):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::accessibilitySettingsDidChange):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Reviewed by NOBODY (OOPS!).

Add a UIScriptController method that tricks WebKit into thinking
it has received a notification that accessibility settings have
changed. Combined with our forced overrides, this allows us to
test if a page would react to the notifications.

  • DumpRenderTree/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
  • TestRunnerShared/UIScriptContext/UIScriptController.cpp:

(WTR::simulateAccessibilitySettingsChangeNotification):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::simulateAccessibilitySettingsChangeNotification):

LayoutTests:

Reviewed by Simon Fraser.

  • fast/media/mq-inverted-colors-live-update-in-subframes-expected.html: Added.
  • fast/media/mq-inverted-colors-live-update-in-subframes.html: Added.
  • fast/media/mq-inverted-colors-live-update-expected.html: Added.
  • fast/media/mq-inverted-colors-live-update.html: Added.
  • fast/media/mq-monochrome-live-update-expected.html: Added.
  • fast/media/mq-monochrome-live-update.html: Added.
  • fast/media/mq-prefers-reduced-motion-live-update-expected.html: Added.
  • fast/media/mq-prefers-reduced-motion-live-update.html: Added.
6:45 PM Changeset in webkit [208914] by andersca@apple.com
  • 9 edits in trunk/Source/WebCore

Rename the 'other' Apple Pay Button type to 'donate'
https://bugs.webkit.org/show_bug.cgi?id=164978

Reviewed by Dean Jackson.

  • DerivedSources.make:
  • WebCorePrefix.h:
  • 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:
5:46 PM Changeset in webkit [208913] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix missing exception checks in DFGOperations.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164958

Reviewed by Geoffrey Garen.

  • dfg/DFGOperations.cpp:
5:40 PM Changeset in webkit [208912] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope verification failures in ShadowChicken.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164966

Reviewed by Saam Barati.

  • interpreter/ShadowChicken.cpp:

(JSC::ShadowChicken::functionsOnStack):

5:00 PM Changeset in webkit [208911] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

USE WK_MAC_TBA for version number in _webViewRequestPointerLock:(WKWebView *)webView WK_API_AVAILABLE(macosx(10.12))
https://bugs.webkit.org/show_bug.cgi?id=164962

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-11-18
Reviewed by Dean Jackson.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
5:00 PM Changeset in webkit [208910] by mmaxfield@apple.com
  • 12 edits
    2 adds in trunk

[WebGL2] Implement texStorage2D()
https://bugs.webkit.org/show_bug.cgi?id=164493

Reviewed by Dean Jackson.

Source/WebCore:

Create a new validation function which only accepts sized internalFormats.
After running texStorage2D(), we also texSubImage2D() to zero-fill it. This
is to compensate for potentially buggy drivers.

Because glTexStorage2D() was only added to OpenGL in version 4.2, not all
OpenGL 3.2+ contexts can implement this command. However, according to
https://developer.apple.com/opengl/capabilities/ all Apple GPUs have the
GL_ARB_texture_storage which implements this call. In the future, we could
implement texStorage2D() on top of texImage2D() if there are any ports which
want WebGL2 but don't have 4.2 and don't have the extension.

Also, when calling texStorage2D, callers specify an internalFormat but not a
type/format pair. This means that storing the texture's type is only valid
for WebGL 1 contexts. This patch surrounds all calls to reading the texture
type with guards and adds an ASSERT() at the read site to make sure the
right thing is happening.

Test: fast/canvas/webgl/webgl2-texStorage.html

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::validateTexStorageFuncParameters):
(WebCore::WebGL2RenderingContext::texStorage2D):

  • html/canvas/WebGL2RenderingContext.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::validateIndexArrayConservative):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::validateTexFunc):
(WebCore::WebGLRenderingContextBase::validateTexFuncData):
(WebCore::WebGLRenderingContextBase::texImage2D):

  • html/canvas/WebGLTexture.cpp:

(WebCore::WebGLTexture::WebGLTexture):
(WebCore::WebGLTexture::getType):
(WebCore::WebGLTexture::needToUseBlackTexture):
(WebCore::WebGLTexture::canGenerateMipmaps):
(WebCore::internalFormatIsFloatType):
(WebCore::internalFormatIsHalfFloatType):
(WebCore::WebGLTexture::update):

  • html/canvas/WebGLTexture.h:
  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::texImage2DResourceSafe):
(WebCore::GraphicsContext3D::packImageData):
(WebCore::GraphicsContext3D::extractImageData):

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:

(WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::texStorage2D):
(WebCore::GraphicsContext3D::texStorage3D):

LayoutTests:

  • fast/canvas/webgl/webgl2-texStorage-expected.txt: Added.
  • fast/canvas/webgl/webgl2-texStorage.html: Added.
4:58 PM Changeset in webkit [208909] by achristensen@apple.com
  • 4 edits in trunk

TextDecoder constructor should not accept replacement encodings
https://bugs.webkit.org/show_bug.cgi?id=164903

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/api-replacement-encodings-expected.txt:

Source/WebCore:

Covered by newly passing web platform tests.

  • dom/TextDecoder.cpp:

(WebCore::TextDecoder::create):
https://encoding.spec.whatwg.org/#textdecoder says about the constructor:
"If label is either not a label or is a label for replacement, throws a RangeError."
See https://bugs.webkit.org/show_bug.cgi?id=159180 for the mapping of the replacement
codec names to "replacement".

4:38 PM Changeset in webkit [208908] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Assertion failures in ActiveDOMObject::~ActiveDOMObject under Database destructor
https://bugs.webkit.org/show_bug.cgi?id=164955
<rdar://problem/29336715>

Reviewed by Brady Eidson.

Make sure the Database's DatabaseContext object is destroyed on the context
thread given that DatabaseContext is an ActiveDOMObject and there is an
assertion in the ActiveDOMObject destructor that it should be destroyed on
on the context thread.

No new tests, already covered by existing tests.

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::~Database):

4:28 PM Changeset in webkit [208907] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13/Source/WebKit/mac

Merge r208877. rdar://problem/29326204

4:28 PM Changeset in webkit [208906] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-603.1.13

Disable INTERSECTION_OBSERVER on the tag. rdar://problem/29324149

3:50 PM Changeset in webkit [208905] by achristensen@apple.com
  • 2 edits in trunk/Tools

Fix API test after r208902
https://bugs.webkit.org/show_bug.cgi?id=144194

  • TestWebKitAPI/Tests/Cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):
The fullwidth solidus, U+FF0F, changed encoding from IDN2003 to IDN2008, probably to prevent domains from using it
to spoof other domains. https://webkit.org/blog/ and https://webkit.org\uFF0Fblog/ would otherwise look
too similar when rendered.

3:35 PM Changeset in webkit [208904] by enrica@apple.com
  • 24 edits in trunk/Source

Refactor drag and drop for WebKit2 to encode DragData message exchange.
https://bugs.webkit.org/show_bug.cgi?id=164945

Reviewed by Tim Horton.

Source/WebCore:

No new tests. No change in functionality.

  • loader/EmptyClients.h:
  • page/DragClient.h:
  • page/DragController.cpp:

(WebCore::createMouseEvent):
(WebCore::documentFragmentFromDragData):
(WebCore::DragController::dragIsMove):
(WebCore::DragController::dragEntered):
(WebCore::DragController::dragExited):
(WebCore::DragController::dragUpdated):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::dragEnteredOrUpdated):
(WebCore::DragController::tryDocumentDrag):
(WebCore::DragController::operationForLoad):
(WebCore::DragController::dispatchTextInputEventFor):
(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::canProcessDrag):
(WebCore::DragController::tryDHTMLDrag):

  • page/DragController.h:
  • page/efl/DragControllerEfl.cpp:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/gtk/DragControllerGtk.cpp:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/mac/DragControllerMac.mm:

(WebCore::DragController::isCopyKeyDown):
(WebCore::DragController::dragOperation):

  • page/win/DragControllerWin.cpp:

(WebCore::DragController::dragOperation):
(WebCore::DragController::isCopyKeyDown):

  • platform/DragData.h:

(WebCore::DragData::DragData):

Source/WebKit/mac:

  • WebCoreSupport/WebDragClient.h:
  • WebCoreSupport/WebDragClient.mm:

(WebDragClient::actionMaskForDrag):
(WebDragClient::willPerformDragDestinationAction):

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<DragData>::encode):
(IPC::ArgumentCoder<DragData>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::performDragControllerAction):

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::willPerformDragDestinationAction):
(WebKit::WebDragClient::actionMaskForDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
3:33 PM Changeset in webkit [208903] by commit-queue@webkit.org
  • 33 edits in trunk

Add runtime flag to enable pointer lock. Enable pointer lock feature for mac.
https://bugs.webkit.org/show_bug.cgi?id=163801

Patch by Jeremy Jones <jeremyj@apple.com> on 2016-11-18
Reviewed by Simon Fraser.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

These tests now pass with DumpRenderTree.
LayoutTests/pointer-lock/lock-already-locked.html
LayoutTests/pointer-lock/lock-element-not-in-dom.html
LayoutTests/pointer-lock/locked-element-iframe-removed-from-dom.html
LayoutTests/pointer-lock/mouse-event-api.html

PointerLockController::requestPointerLock now protects against synchronous callback
to allowPointerLock().

Add pointerLockEnabled setting.

  • Configurations/FeatureDefines.xcconfig:
  • dom/Document.cpp:

(WebCore::Document::exitPointerLock): Fix existing typo.
(WebCore::Document::pointerLockElement):

  • features.json:
  • page/EventHandler.cpp:
  • page/PointerLockController.cpp:

(WebCore::PointerLockController::requestPointerLock):
(WebCore::PointerLockController::requestPointerUnlock):

  • page/Settings.in:

Source/WebKit/mac:

Plumb through PointerLockEnabled setting.

  • Configurations/FeatureDefines.xcconfig:
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::requestPointerUnlock):

  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(-[WebPreferences pointerLockEnabled]):
(-[WebPreferences setPointerLockEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add SPI to notify client of pointer lock and for client to allow or deny.
Unlock pointer when view is not longer active.

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::requestPointerLock):
(API::UIClient::didLosePointerLock):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):
(WKPageDidAllowPointerLock):
(WKPageDidDenyPointerLock):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/API/C/WKPageUIClient.h:
  • UIProcess/API/C/WKPreferences.cpp:
  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::requestPointerLock):
(WebKit::UIDelegate::UIClient::didLosePointerLock):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::requestPointerLock):
(WebKit::WebPageProxy::didAllowPointerLock):
(WebKit::WebPageProxy::didDenyPointerLock):
(WebKit::WebPageProxy::requestPointerUnlock):

  • UIProcess/WebPageProxy.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • wtf/FeatureDefines.h: ENABLE_POINTER_LOCK true for Mac.
2:47 PM Changeset in webkit [208902] by achristensen@apple.com
  • 11 edits in trunk

Support IDN2008 with UTS #46 instead of IDN2003
https://bugs.webkit.org/show_bug.cgi?id=144194

Reviewed by Darin Adler.

Source/WebCore:

Use uidna_nameToASCII instead of the deprecated uidna_IDNToASCII.
It uses IDN2008 instead of IDN2003, and it uses UTF #46 when used with a UIDNA opened with uidna_openUTS46.
This follows https://url.spec.whatwg.org/#concept-domain-to-ascii except we do not use Transitional_Processing
to prevent homograph attacks on german domain names with "ß" and "ss" in them. These are now treated as separate domains.
Firefox also doesn't use Transitional_Processing. Chrome and the current specification use Transitional_processing,
but https://github.com/whatwg/url/issues/110 might change the spec.

In addition, http://unicode.org/reports/tr46/ says:
"implementations are encouraged to apply the Bidi and ContextJ validity criteria"
Bidi checks prevent domain names with bidirectional text, such as latin and hebrew characters in the same domain. Chrome and Firefox do this.

ContextJ checks prevent code points such as U+200D, which is a zero-width joiner which users would not see when looking at the domain name.
Firefox currently enables ContextJ checks and it is suggested by UTS #46, so we'll do it.

ContextO checks, which we do not use and neither does any other browser nor the spec, would fail if a domain contains code points such as U+30FB,
which looks somewhat like a dot. We can investigate enabling these checks later.

Covered by new API tests and rebased LayoutTests.
The new API tests verify that we do not use transitional processing, that we do apply the Bidi and ContextJ checks, but not ContextO checks.

  • platform/URLParser.cpp:

(WebCore::URLParser::domainToASCII):
(WebCore::URLParser::internationalDomainNameTranscoder):

  • platform/URLParser.h:
  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::mapHostNameWithRange):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):
Add some tests from http://unicode.org/faq/idn.html verifying that we follow UTS46's deviations from IDN2008.
Add some tests based on https://tools.ietf.org/html/rfc5893 verifying that we check for bidirectional text.
Add a test based on https://tools.ietf.org/html/rfc5892 verifying that we do not do ContextO check.
Add a test for U+321D and U+321E which have particularly interesting punycode encodings. We match Firefox here now.
Also add a test from http://www.unicode.org/reports/tr46/#IDNAComparison verifying we are not using IDN2003.
We should consider importing all of http://www.unicode.org/Public/idna/9.0.0/IdnaTest.txt as URL domain tests.

LayoutTests:

  • fast/encoding/idn-security.html:

Move some characters with changed IDN encodings to inside the check for old ICU.

  • fast/url/idna2003-expected.txt:
  • fast/url/idna2008-expected.txt:

Update expected results. We are now more compliant with IDN2008.

2:32 PM Changeset in webkit [208901] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

REGRESSION(r208867): JSC test failure: ChakraCore.yaml/ChakraCore/test/strict/05.arguments_sm.js.default
https://bugs.webkit.org/show_bug.cgi?id=164929

Reviewed by Mark Lam.

ES2017 drops arguments.caller and JavaScriptCore is updated to meet the spec.
This patch rebaselines the result of ChakraCore test for JSC.

  • ChakraCore/test/strict/05.arguments_sm.baseline-jsc:
2:31 PM Changeset in webkit [208900] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking two js/dom/domjit-function-get-element-by-id-* tests as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164797

Unreviewed test gardening.

2:30 PM Changeset in webkit [208899] by dino@apple.com
  • 9 edits
    1 copy
    3 adds in trunk

Better testing for accessibility media queries
https://bugs.webkit.org/show_bug.cgi?id=164954
<rdar://problem/29338292>

Reviewed by Myles Maxfield.

Source/WebCore:

Provide an override mode for the accessibility media queries
that rely on system settings. This way we can test that they
are least responding to something.

Tests: fast/media/mq-inverted-colors-forced-value.html

fast/media/mq-monochrome-forced-value.html

  • css/MediaQueryEvaluator.cpp: Query the Settings to see if we're

forcing a value.
(WebCore::monochromeEvaluate):
(WebCore::invertedColorsEvaluate):
(WebCore::prefersReducedMotionEvaluate):

  • page/Settings.h:
  • testing/InternalSettings.cpp: Add new forcing values for inverted-colors

and monochrome.
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::settingsToInternalSettingsValue):
(WebCore::internalSettingsToSettingsValue):
(WebCore::InternalSettings::forcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::setForcedColorsAreInvertedAccessibilityValue):
(WebCore::InternalSettings::forcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::setForcedDisplayIsMonochromeAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionAccessibilityValue):
(WebCore::InternalSettings::setForcedPrefersReducedMotionAccessibilityValue):
(WebCore::InternalSettings::forcedPrefersReducedMotionValue): Deleted.
(WebCore::InternalSettings::setForcedPrefersReducedMotionValue): Deleted.

  • testing/InternalSettings.h:
  • testing/InternalSettings.idl:

LayoutTests:

  • fast/media/mq-inverted-colors-forced-value-expected.html: Added.
  • fast/media/mq-inverted-colors-forced-value.html: Copied from LayoutTests/fast/media/mq-prefers-reduced-motion-forced-value.html.
  • fast/media/mq-monochrome-forced-value-expected.html: Added.
  • fast/media/mq-monochrome-forced-value.html: Added.
  • fast/media/mq-prefers-reduced-motion-forced-value.html:
2:29 PM Changeset in webkit [208898] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cloop.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::stronglyVisitStrongReferences):

2:11 PM Changeset in webkit [208897] by fpizlo@apple.com
  • 16 edits
    1 add in trunk

Concurrent GC should be able to run splay in debug mode and earley/raytrace in release mode with no perf regression
https://bugs.webkit.org/show_bug.cgi?id=164282

Reviewed by Geoffrey Garen and Oliver Hunt.

PerformanceTests:

CDjs is a fun benchmark for stressing concurrent GCs, but to really give the GC a good
workout you need to increase the amount of work that the test does. This adds a second
configuration of the benchmark that has more aircraft. It uses much more memory and causes us
to do more GCs and those GCs take longer.

  • JetStream/cdjs/benchmark.js:

(benchmarkImpl):
(benchmark):

  • JetStream/cdjs/large.js: Added.

Source/JavaScriptCore:

The two three remaining bugs were:

  • Improper ordering inside putDirectWithoutTransition() and friends. We need to make sure that the GC doesn't see the store to Structure::m_offset until we've resized the butterfly. That proved a bit tricky. On the other hand, this means that we could probably remove the requirement that the GC holds the Structure lock in some cases. I haven't removed that lock yet because I still think it might protect some weird cases, and it doesn't seem to cost us anything.


  • CodeBlock's GC strategy needed to be made thread-safe (visitWeakly, visitChildren, and their friends now hold locks) and incremental-safe (we need to update predictions in the finalizer to make sure we clear anything that was put into a value profile towards the end of GC).


  • The GC timeslicing scheduler needed to be made a bit more aggressive to deal with generational workloads like earley, raytrace, and CDjs. Once I got those benchmarks to run, I found that they would do many useless iterations of GC because they wouldn't pause long enough after rescanning weak references and roots. I added a bunch of knobs for forcing a pause. In the end, I realized that I could get the desired effect by putting a ceiling on mutator utilization. We want the GC to finish quickly if it is possible to do so, even if the amount of allocation that the mutator had done is low. Having a utilization ceiling seems to accomplish this for benchmarks with trivial heaps (earley and raytrace) as well as huge heaps (like CDjs in its "large" configuration).


This preserves splay performance, makes the concurrent GC more stable, and makes the
concurrent GC not a perf regression on earley or raytrace. It seems to give us great CDjs
performance as well, but this is still hard to tell because we crash a lot in that benchmark.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::CodeBlock):
(JSC::CodeBlock::visitWeakly):
(JSC::CodeBlock::visitChildren):
(JSC::CodeBlock::shouldVisitStrongly):
(JSC::CodeBlock::shouldJettisonDueToOldAge):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::determineLiveness):
(JSC::CodeBlock::WeakReferenceHarvester::visitWeakReferences):
(JSC::CodeBlock::UnconditionalFinalizer::finalizeUnconditionally):
(JSC::CodeBlock::visitOSRExitTargets):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::stronglyVisitWeakReferences):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::clearVisitWeaklyHasBeenCalled):

  • heap/CodeBlockSet.cpp:

(JSC::CodeBlockSet::deleteUnmarkedAndUnreferenced):

  • heap/Heap.cpp:

(JSC::Heap::ResumeTheWorldScope::ResumeTheWorldScope):
(JSC::Heap::markToFixpoint):
(JSC::Heap::beginMarking):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::collectInThread):

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

(JSC::Heap::mutatorFence):

  • heap/MarkedBlock.cpp:
  • runtime/JSCellInlines.h:

(JSC::JSCell::finishCreation):

  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/Options.h:
  • runtime/Structure.cpp:

(JSC::Structure::add):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::add):

2:04 PM Changeset in webkit [208896] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/misc/link-rel-icon-beforeload.html as failing on mac-wk1.
https://bugs.webkit.org/show_bug.cgi?id=164933

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
2:04 PM Changeset in webkit [208895] by Matt Baker
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: TimelineDataGridNode assertions when refreshing page
https://bugs.webkit.org/show_bug.cgi?id=162642
<rdar://problem/28505898>

Reviewed by Timothy Hatcher.

This patch fixes a number of deficiencies in the Network tab that caused
TimelineDataGridNode graphs to refresh before the tab became visible.

  • UserInterface/Views/ElementsTabContentView.js:

(WebInspector.ElementsTabContentView):
(WebInspector.ElementsTabContentView.prototype.shown):
Drive-by fix: defer showing the DOM content view until the tab is shown.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView):
Drive-by event listener cleanup.
(WebInspector.NetworkGridContentView.prototype.get startTime):
(WebInspector.NetworkGridContentView.prototype.get endTime):
Back endTime with a variable, instead of using the ruler value which
isn't valid before the tab is shown for the first time.

(WebInspector.NetworkGridContentView.prototype.shown):
Force the grid to update its layout, and that of the Timeline column ruler.
During layout the ruler's secondsPerPixel value is used, which isn't
valid until the ruler does an initial layout.

(WebInspector.NetworkGridContentView.prototype.reset):
Clear pending records. This was causing duplicates to appear when the
inspected page was refreshed multiple times prior to showing the Network
tab for the first time.

(WebInspector.NetworkGridContentView.prototype.layout):
Should more closely match behavior in NetworkTimelineView.prototype.layout.
Graph end time padding is added if no longer updating the current time.

(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):
Track endTime of the last record added, so that the graph end time can
be padded once the current time is no longer being updated.

(WebInspector.NetworkGridContentView.prototype._update):
(WebInspector.NetworkGridContentView.prototype._stopUpdatingCurrentTime):
Graph end time padding shouldn't be applied here, since this isn't called
if the inspected page finishes loading before the view is shown.

(WebInspector.NetworkGridContentView.prototype._clearNetworkItems): Deleted.
Replaced by an arrow function.

  • UserInterface/Views/NetworkSidebarPanel.js:

(WebInspector.NetworkSidebarPanel.prototype._networkTimelineReset):
Don't show the content view if the tab is hidden.

1:55 PM Changeset in webkit [208894] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

Unsupported emoji are invisible
https://bugs.webkit.org/show_bug.cgi?id=164944
<rdar://problem/28591608>

Reviewed by Dean Jackson.

Source/WebCore:

In WidthIterator, we explicitly skip characters which the OS has no font
to render with. However, for emoji, we should draw something to show that
there is missing content. Because we have nothing to draw, we can draw
the .notdef glyph (empty box, or "tofu").

Test: fast/text/emoji-draws.html

  • platform/graphics/WidthIterator.cpp:

(WebCore::characterMustDrawSomething):
(WebCore::WidthIterator::advanceInternal):

LayoutTests:

  • fast/text/emoji-draws-expected-mismatch.html: Added.
  • fast/text/emoji-draws.html: Added.
1:47 PM Changeset in webkit [208893] by weinig@apple.com
  • 17 edits in trunk

[WebIDL] Add support for record types
https://bugs.webkit.org/show_bug.cgi?id=164935

Reviewed by Tim Horton.

Source/WebCore:

Add support for WebIDLs record types. We map them to HashMap<String, {OtherType}>.

  • bindings/generic/IDLTypes.h:
  • Add IDLRecord type and helper predicate.
  • Remove IDLRegExp which is no longer in WebIDL and we never supported.
  • bindings/js/JSDOMBinding.cpp:

(WebCore::stringToByteString):
(WebCore::identifierToByteString):
(WebCore::valueToByteString):
(WebCore::hasUnpairedSurrogate):
(WebCore::stringToUSVString):
(WebCore::identifierToUSVString):
(WebCore::valueToUSVString):

  • bindings/js/JSDOMBinding.h:

Refactor ByteString and USVString conversion to support converting from
either a JSValue or Identifier.

  • bindings/js/JSDOMConvert.h:

(WebCore::DetailConverter<IDLRecord<K, V>>):
(WebCore::JSConverter<IDLRecord<K, V>>):
Add conversion support for record types. Use Detail::IdentifierConverter helper
to convert identifiers to strings using the correct conversion rules.

(WebCore::Converter<IDLUnion<T...>>::convert):
Update comments in union conversion to match current spec. Remove check
for regular expressions and add support for record types.

  • bindings/scripts/CodeGenerator.pm:

(IsRefPtrType):
Add record and union types to the list of things that aren't RefPtrs.

(IsRecordType):
Add predicate for testing if a type is a record.

(IsWrapperType):
Remove check for union. This is now handled in the IsRefPtrType check.

(SkipIncludeHeader): Deleted.
(GetSequenceInnerType): Deleted.
(GetFrozenArrayInnerType): Deleted.
(GetSequenceOrFrozenArrayInnerType): Deleted.
Remove no longer necessary functions.

  • bindings/scripts/CodeGeneratorJS.pm:

(AddIncludesForImplementationType):
Remove check for includes to skip. This is now only called for interfaces, which should be included
unconditionally.

(AddToIncludesForIDLType):
Add includes and recursive includes for record types.

(GenerateOverloadedFunctionOrConstructor):
Update to account for records.

(GetGnuVTableRefForInterface):
(GetGnuVTableNameForInterface):
(GetGnuMangledNameForInterface):
(GetWinVTableNameForInterface):
(GetWinMangledNameForInterface):
Strength-reduce GetNativeTypeForConversions and GetNamespaceForInterface into their callers.

(GetBaseIDLType):
Add support for IDLRecord. Remove call to GetIDLInterfaceName now that is simply the type name.

(GetNativeType):
Simplify sequence/FrozenArray support and add record support.

(GetNativeInnerType):
Generalize GetNativeVectorInnerType to work for record types as well.

(ShouldPassWrapperByReference):
Moved so native type accessors can be together.

(NativeToJSValueDOMConvertNeedsState):
(NativeToJSValueDOMConvertNeedsGlobalObject):
Add record support.

(GetNativeTypeForConversions): Deleted.
(GetNamespaceForInterface): Deleted.
(GetNativeVectorType): Deleted.
(GetIDLInterfaceName): Deleted.
(GetNativeVectorInnerType): Deleted.
Remove unneeded functions.

  • bindings/scripts/IDLParser.pm:

(typeDescription):
Add helper useful for debugging, that constructs the string form of a type.

(typeByApplyingTypedefs):
Add missing call to typeByApplyingTypedefs (this is noted by a fix in JSTestCallbackFunctionWithTypedefs.h)

(parseNonAnyType):
Remove unused $subtypeName variables and add support for parsing record types.

  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
  • bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.h:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/TestObj.idl:

Add tests for records and update results.

  • testing/TypeConversions.h:

(WebCore::TypeConversions::testLongRecord):
(WebCore::TypeConversions::setTestLongRecord):
(WebCore::TypeConversions::testNodeRecord):
(WebCore::TypeConversions::setTestNodeRecord):
(WebCore::TypeConversions::testSequenceRecord):
(WebCore::TypeConversions::setTestSequenceRecord):

  • testing/TypeConversions.idl:

Add record types so it can be tested from layout tests.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Add tests for WebIDL record types.

1:41 PM Changeset in webkit [208892] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support font-variation-settings
https://bugs.webkit.org/show_bug.cgi?id=164947

Reviewed by Myles Maxfield.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontVariationTag):
(WebCore::consumeFontVariationSettings):
(WebCore::CSSPropertyParser::parseSingleValue):

1:31 PM Changeset in webkit [208891] by jiewen_tan@apple.com
  • 43 edits
    3 copies
    24 adds in trunk

Update SubtleCrypto::encrypt to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164738
<rdar://problem/29257812>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/encrypt_decrypt/test_aes_cbc-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_aes_ctr-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_aes_gcm-expected.txt:
  • WebCryptoAPI/encrypt_decrypt/test_rsa_oaep-expected.txt:
  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::encrypt method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-encrypt. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-encrypt.
  2. It implements encrypt operations of the following algorithms: AES-CBC, RSAES-PKCS1-V1_5, and RSA-OAEP.
  3. It addes ASSERT(parameters) for every method that accepts a std::unique_ptr<CryptoAlgorithmParameters>&& type parameter.
  4. It changes RefPtr<CryptoKey>&& to Ref<CryptoKey>&& for every method that accepts a CryptoKey.

Tests: crypto/subtle/aes-cbc-encrypt-malformed-parameters.html

crypto/subtle/aes-cbc-import-key-encrypt.html
crypto/subtle/encrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html
crypto/subtle/rsa-oaep-import-key-encrypt-label.html
crypto/subtle/rsa-oaep-import-key-encrypt.html
crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html
crypto/workers/subtle/aes-cbc-import-key-encrypt.html
crypto/workers/subtle/rsa-oaep-import-key-encrypt.html
crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/BufferSource.h:

(WebCore::BufferSource::BufferSource):
Add a default constructor for initializing an empty BufferSource object.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::jsSubtleCryptoFunctionEncryptPromise):
(WebCore::JSSubtleCrypto::encrypt):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::exportKey):

  • crypto/CryptoAlgorithm.h:
  • crypto/CryptoAlgorithmParameters.h:
  • crypto/CryptoKey.h:
  • crypto/SubtleCrypto.cpp:

(WebCore::SubtleCrypto::SubtleCrypto):

  • crypto/SubtleCrypto.h:

(WebCore::SubtleCrypto::workQueue):

  • crypto/SubtleCrypto.idl:
  • crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:

(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):

  • crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):

  • crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):

  • crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::generateKey):
(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::generateKey):
(WebCore::CryptoAlgorithmAES_KW::importKey):
(WebCore::CryptoAlgorithmAES_KW::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::generateKey):
(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/keys/CryptoKeyRSA.h:
  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

(WebCore::transformAES_CBC):
(WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:

(WebCore::encryptRSAES_PKCS1_v1_5):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::encryptRSA_OAEP):
(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::generatePair):

  • crypto/parameters/AesCbcParams.idl: Added.
  • crypto/parameters/CryptoAlgorithmAesCbcParams.h: Added.
  • crypto/parameters/CryptoAlgorithmAesCbcParamsDeprecated.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h: Added.
  • crypto/parameters/RsaOaepParams.idl: Added.

LayoutTests:

  • TestExpectations:
  • crypto/subtle/aes-cbc-encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-cbc-encrypt-malformed-parameters.html: Added.
  • crypto/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/aes-cbc-import-key-encrypt.html: Added.
  • crypto/subtle/encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/encrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-encrypt-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-oaep-encrypt-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-label-expected.txt: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt-label.html: Added.
  • crypto/subtle/rsa-oaep-import-key-encrypt.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
  • crypto/workers/subtle/aes-cbc-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/aes-cbc-import-key-encrypt.html: Added.
  • crypto/workers/subtle/resources/aes-cbc-import-key-encrypt.js: Added.
  • crypto/workers/subtle/resources/rsa-oaep-import-key-encrypt.js: Added.
  • crypto/workers/subtle/resources/rsaes-pkcs1-v1_5-import-key-encrypt.js: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/rsa-oaep-import-key-encrypt.html: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt-expected.txt: Added.
  • crypto/workers/subtle/rsaes-pkcs1-v1_5-import-key-encrypt.html: Added.
1:23 PM Changeset in webkit [208890] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix iOS build again.
<rdar://problem/29312689>

Unreviewed build fix.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::setCurrentTextTrack):
(WebCore::MediaPlayerPrivateAVFoundationObjC::languageOfPrimaryAudioTrack):

12:56 PM Changeset in webkit [208889] by mmaxfield@apple.com
  • 6 edits
    2 adds in trunk

[CSS Font Loading] FontFaceSet.load() promises don't always fire
https://bugs.webkit.org/show_bug.cgi?id=164902

Reviewed by David Hyatt.

Source/WebCore:

Test: fast/text/fontfaceset-rebuild-during-loading.html

We currently handle web fonts in two phases. The first phase is building up
StyleRuleFontFace objects which reflect the style on the page. The second is creating
CSSFontFace objects from those StyleRuleFontFace objects. When script modifies the
style on the page, we can often update the CSSFontFace objects, but there are some
modifications which we don't know how to model. For these operations, we destroy the
CSSFontFace objects and rebuild them from the newly modified StyleRuleFontFace objects.

Normally, this is fine. However, with the CSS font loading API, the CSSFontFaces back
Javascript objects which will persist across the rebuilding step mentioned above. This
means that the FontFace objects need to adopt the new CSSFontFace objects and forget
the old CSSFontFace objects.

There was one bit of state which I forgot to update during this rebuilding phase. The
FontFaceSet object contains an internal HashMap where a reference to a CSSFontFace
is used as a key. After the rebuilding phase, this reference wasn't updated to point
to the new CSSFontFace.

The solution is to instead use a reference to the higher-level FontFace as the key to
the HashMap. This object is persistent across the rebuilding phase (and it adopts
the new CSSFontFaces). There is not a lifetime problem because the FontFace holds a
strong reference to its backing CSSFontFace object.

This bug didn't cause a memory problem because the HashMap was keeping the old
CSSFontFace alive because the key was a strong reference.

This patch also adds a lengthy comment explaining how the migration works.

  • css/CSSFontFace.cpp:

(WebCore::CSSFontFace::initializeWrapper): This is another bit of state which didn't
survive the rebuilding phase. Moving it here causes it to survive.
(WebCore::CSSFontFace::wrapper):

  • css/CSSFontSelector.cpp:

(WebCore::CSSFontSelector::addFontFaceRule):

  • css/FontFaceSet.cpp:

(WebCore::FontFaceSet::load):
(WebCore::FontFaceSet::faceFinished):

  • css/FontFaceSet.h:

LayoutTests:

  • fast/text/fontfaceset-rebuild-during-loading-expected.txt: Added.
  • fast/text/fontfaceset-rebuild-during-loading.html: Added.
12:27 PM Changeset in webkit [208888] by mmaxfield@apple.com
  • 29 edits in trunk

[SVG -> OTF Font Converter] Fonts advances are not internally consistent inside the generated font file
https://bugs.webkit.org/show_bug.cgi?id=164846
<rdar://problem/29031509>

Reviewed by Darin Adler.

Source/WebCore:

The fonts I'm generating in the SVG -> OTF converter have fractional FUnit values for their advances.
The CFF table can encode that, but hmtx can't, which means the font isn't internally consistent.

Covered by existing tests.

  • svg/SVGToOTFFontConversion.cpp:

LayoutTests:

  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
  • platform/ios-simulator/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
  • platform/ios-simulator/svg/batik/text/textEffect-expected.txt:
  • platform/ios-simulator/svg/batik/text/textEffect3-expected.txt:
  • platform/ios-simulator/svg/batik/text/textPosition2-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-01-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-02-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/fonts-elem-07-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-01-t-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-02-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-03-b-expected.txt:
  • platform/mac/svg/W3C-SVG-1.1/text-intro-04-t-expected.txt:
  • platform/mac/svg/batik/text/textEffect3-expected.txt:
  • platform/mac/svg/batik/text/textPosition2-expected.txt:
  • platform/mac/svg/custom/svg-fonts-fallback-expected.txt:
  • platform/mac/svg/wicd/test-rightsizing-b-expected.txt:
  • svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt:
12:01 PM Changeset in webkit [208887] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Attempt to fix iOS build.
<rdar://problem/29312689>

Unreviewed build fix.

  • platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:

(WebCore::MediaSelectionGroupAVFObjC::updateOptions):

11:09 AM Changeset in webkit [208886] by hyatt@apple.com
  • 9 edits in trunk/Source/WebCore

[CSS Parser] Hook up InspectorStyleSheet to the new CSS parser.
https://bugs.webkit.org/show_bug.cgi?id=164886

Reviewed by Dean Jackson.

  • css/CSSGrammar.y.in:

Get rid of the CSSRuleSourceData type enum, since StyleRule's type
enum is exactly the same.

  • css/CSSPropertySourceData.cpp:

(WebCore::CSSPropertySourceData::CSSPropertySourceData):

  • css/CSSPropertySourceData.h:

Add a concept of disabled to CSSPropertySourceData. This is used for
commented out properties.

(WebCore::CSSRuleSourceData::create):
(WebCore::CSSRuleSourceData::createUnknown):
(WebCore::CSSRuleSourceData::CSSRuleSourceData):
Get rid of the CSSRuleSourceData type enum, since StyleRule's type
enum is exactly the same.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParserContext::CSSParserContext):
(WebCore::CSSParser::parseSheetForInspector):
(WebCore::CSSParser::parseDeclarationForInspector):
(WebCore::CSSParser::markSupportsRuleHeaderStart):
(WebCore::CSSParser::markRuleHeaderStart):
(WebCore::CSSParser::markPropertyEnd):

  • css/parser/CSSParser.h:

Add functions that represent the new API for inspector sheet
and declaration parsing. Patch the old parse code to use StyleRule::Type
now that the CSSRuleSourceData type is gone.

  • css/parser/CSSParserObserver.h:

Tweak the API for our memory management.

  • inspector/InspectorStyleSheet.cpp:

(flattenSourceData):
(WebCore::parserContextForDocument):
(WebCore::StyleSheetHandler::StyleSheetHandler):
(WebCore::StyleSheetHandler::startRuleHeader):
(WebCore::StyleSheetHandler::setRuleHeaderEnd):
(WebCore::StyleSheetHandler::endRuleHeader):
(WebCore::StyleSheetHandler::observeSelector):
(WebCore::StyleSheetHandler::startRuleBody):
(WebCore::StyleSheetHandler::endRuleBody):
(WebCore::StyleSheetHandler::popRuleData):
(WebCore::fixUnparsedProperties):
(WebCore::StyleSheetHandler::fixUnparsedPropertyRanges):
(WebCore::StyleSheetHandler::observeProperty):
(WebCore::StyleSheetHandler::observeComment):
(WebCore::InspectorStyle::populateAllProperties):
(WebCore::isValidSelectorListString):
(WebCore::InspectorStyleSheet::ensureSourceData):
(WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady):
(WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData):
(WebCore::createCSSParser): Deleted.
(WebCore::InspectorStyleSheetForInlineStyle::getStyleAttributeRanges): Deleted.

  • inspector/InspectorStyleSheet.h:

(WebCore::InspectorStyleProperty::setRawTextFromStyleDeclaration):
Add the new implementation. This involves duplicating most of the old
parser code for this into a new class, StyleSheetHandler, that implements
the observer interface and builds up the same data structures as the old
parser did in response to the callbacks.

10:57 AM Changeset in webkit [208885] by Joseph Pecoraro
  • 10 edits in trunk

Web Inspector: Generator functions should have a displayable name when shown in stack traces
https://bugs.webkit.org/show_bug.cgi?id=164844
<rdar://problem/29300697>

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/generator-function-name.js:

Add another test now that we name the inner generator function
that we do not break the lexical resolution of names.

Source/JavaScriptCore:

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::createGeneratorFunctionBody):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createGeneratorFunctionBody):
New way to create a generator function with an inferred name.

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseGeneratorFunctionSourceElements):

  • parser/Parser.h:

Pass on the name of the generator wrapper function so we can
use it on the inner generator function.

LayoutTests:

  • inspector/debugger/js-stacktrace-expected.txt:
  • inspector/debugger/js-stacktrace.html:

Add a test case for console.trace() / Error stack inside of generators.
Modernize the test to reduce redundency and get nicer output.

7:17 AM Changeset in webkit [208884] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix some non-macOS builds.
<rdar://problems/29331425&29331438&29331722>

  • platform/mac/WebPlaybackControlsManager.h:
3:54 AM WebKitGTK/2.14.x edited by magomez@igalia.com
(diff)
3:53 AM WebKitGTK/2.14.x edited by magomez@igalia.com
(diff)
2:03 AM Changeset in webkit [208883] by pvollan@apple.com
  • 2 edits in trunk/Source/WebCore

[Win32] Start releasing memory earlier when memory is running low.
https://bugs.webkit.org/show_bug.cgi?id=164862

Reviewed by Brent Fulgham.

On Windows, 32-bit processes have 2GB of memory available, where some is used by the system.
Debugging has shown that allocations might fail and cause crashes when memory usage is > ~1GB.
We should start releasing memory before we reach 1GB.

  • platform/win/MemoryPressureHandlerWin.cpp:

(WebCore::CheckMemoryTimer::fired):

Nov 17, 2016:

11:50 PM Changeset in webkit [208882] by Carlos Garcia Campos
  • 8 edits in trunk

Downloads started by context menu actions should also have a web view associated
https://bugs.webkit.org/show_bug.cgi?id=164364

Reviewed by Michael Catanzaro.

Source/WebKit2:

When a request is converted to a download WebPageProxy calls handleDownloadRequest() and clients handle that to
associate the web view to the download. When a download is started by a context menu action, WebPageProxy calls
WebProcessPool::download() with this as initiatingPage parameter, but clients are not notified in this case.

  • UIProcess/API/gtk/WebKitDownload.cpp:

(webkitDownloadCreateForRequest): Deleted.

  • UIProcess/API/gtk/WebKitDownloadPrivate.h:
  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextStartDownload): Use webkitWebContextGetOrCreateDownload() after WebProcessPool::download()
because the WebKitDownload could have already been created by the web view download handler at this point.

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkit_web_view_download_uri): We no longer need to associate the web view to the download here.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::download): If an initiatingPage has been passed, call handleDownloadRequest() to notify
the page client.

Tools:

Add a GTK+ unit tests to check that downloads started by the context menu have a web view associated.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:

(downloadLocalFileSuccessfully):
(testDownloadOverwriteDestinationDisallowed):
(testDownloadLocalFileError):
(testDownloadRemoteFile):
(testDownloadRemoteFileError):
(testDownloadMIMEType):
(contextMenuCallback):
(testContextMenuDownloadActions):
(beforeAll):

11:25 PM Changeset in webkit [208881] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebCore

REGRESSION(r208511): ImageDecoders: Crash decoding GIF images since r208511
https://bugs.webkit.org/show_bug.cgi?id=164864

Reviewed by Simon Fraser.

This happens sometimes since r208511 because the same decoder is used by more than one thread at the same
time and the decoders are not thread-safe. Several methods in ImageDecoder need to decode partially the image,
so it's possible that one method calls frameBufferAtIndex at the same times as createFrameImageAtIndex that now
can be called from the image decoder thread. Use a Lock in ImageDecoder to protect calls to frameBufferAtIndex.

  • platform/image-decoders/ImageDecoder.cpp:

(WebCore::ImageDecoder::frameIsCompleteAtIndex):
(WebCore::ImageDecoder::frameDurationAtIndex):
(WebCore::ImageDecoder::createFrameImageAtIndex):

  • platform/image-decoders/ImageDecoder.h:
11:21 PM Changeset in webkit [208880] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION: API test _WKDownload.ConvertResponseToDownload is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=164631

Reviewed by Carlos Garcia Campos.

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::convertToDownload):
I could reproduce the flaky failure 100% of the time when not using NETWORK_SESSION
by adding a usleep(1000000) in NetworkResourceLoader::convertToDownload. m_networkLoad
was not being set to nullptr before it was being checked in NetworkResourceLoader::abort

10:28 PM Changeset in webkit [208879] by achristensen@apple.com
  • 2 edits in trunk/Source/WebKit2

Fix CMake build after r208865
https://bugs.webkit.org/show_bug.cgi?id=164894

  • PlatformMac.cmake:

Add new files.

9:30 PM Changeset in webkit [208878] by rniwa@webkit.org
  • 16 edits
    1 move
    1 add in trunk

Add an experimental API to find elements across shadow boundaries
https://bugs.webkit.org/show_bug.cgi?id=164851
<rdar://problem/28220092>

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/CommonIdentifiers.h:

Source/WebCore:

Add window.collectMatchingElementsInFlatTree(Node node, DOMString selectors)
as an experimental API which finds a list of elements that matches the given CSS selectors
and expose it to a JSWorld on which WKBundleScriptWorldMakeAllShadowRootsOpen was called.

No new tests. More test cases are added to WebKit2.InjectedBundleMakeAllShadowRootsOpen.

  • bindings/scripts/CodeGeneratorJS.pm:

(NeedsRuntimeCheck): Added. Abstracts checks for EnabledAtRuntime and EnabledForWorld.
(OperationShouldBeOnInstance):
(GeneratePropertiesHashTable):
(GetRuntimeEnableFunctionName): Use worldForDOMObject(this).condition() for EnabledForWorld.
Also split the line for EnabledAtRuntime and EnabledAtRuntime for a better readability.
(GenerateImplementation):
(addIterableProperties):

  • bindings/scripts/IDLAttributes.txt:
  • bindings/scripts/preprocess-idls.pl:

(GenerateConstructorAttribute):

  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:

(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorld):
(WebCore::jsTestGlobalObjectInstanceFunctionEnabledInSpecificWorldCaller):

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

(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::jsTestObjPrototypeFunctionWorldSpecificMethod):
(WebCore::jsTestObjPrototypeFunctionWorldSpecificMethodCaller):

  • bindings/scripts/test/TestGlobalObject.idl: Added a test case.
  • bindings/scripts/test/TestObj.idl: Ditto.
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::collectMatchingElementsInFlatTree): Added. Implements the feature by
calling SelectorQuery's matches on a node yielded by ComposedTreeIterator.

  • page/DOMWindow.h:
  • page/DOMWindow.idl:

Tools:

Added test cases for window.collectMatchingElementsInFlatTree to WebKit2.InjectedBundleMakeAllShadowRootOpen.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2/InjectedBundleMakeAllShadowRoot*s*Open_Bundle.cpp: Renamed

from InjectedBundleMakeAllShadowRootOpen_Bundle.cpp.
(TestWebKitAPI::InjectedBundleMakeAllShadowRootOpenTest::initialize): Added test cases for
window.collectMatchingElementsInFlatTree by calling alert() many times.

  • TestWebKitAPI/Tests/WebKit2/InjectedBundleMakeAllShadowRootsOpen.cpp:

(TestWebKitAPI::runJavaScriptAlert): Added expectations for multiple test cases. Each test case
finishes with a call to alert, and moves testNumber forward.
(TestWebKitAPI::TEST): Use the newly added closed-shadow-tree-test.html

  • TestWebKitAPI/Tests/WebKit2/closed-shadow-tree-test.html: Added. Creates a shadow tree with slots

and tests that window.collectMatchingElementsInFlatTree is not present when
an event named "testnormalworld" is dispatched by the injected bundle.

9:11 PM Changeset in webkit [208877] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit/mac

Try to fix some non-macOS builds.

  • WebView/WebView.mm:
9:07 PM Changeset in webkit [208876] by weinig@apple.com
  • 14 edits in trunk

[WebIDL] Add support for ByteString
https://bugs.webkit.org/show_bug.cgi?id=164901

Reviewed by Darin Adler.

Source/WebCore:

  • bindings/generic/IDLTypes.h:

Make IDLByteString a IDLString.

  • bindings/js/JSDOMBinding.cpp:

(WebCore::valueToByteString):
(WebCore::valueToUSVString):

  • bindings/js/JSDOMBinding.h:

Add conversion function for ByteString and fix valueToUSVString to take an ExecState reference.

  • bindings/js/JSDOMConvert.h:

(WebCore::Converter<IDLByteString>::convert):
(WebCore::JSConverter<IDLByteString>::convert):
Add conversion functions for ByteString, using valueToByteString.

(WebCore::Converter<IDLUSVString>::convert):
Update to pass the ExecState by reference.

  • bindings/js/JSMessageEventCustom.cpp:

(WebCore::handleInitMessageEvent):
Update to pass the ExecState by reference.

  • bindings/js/JSWorkerGlobalScopeCustom.cpp:

(WebCore::JSWorkerGlobalScope::importScripts):
Update to pass the ExecState by reference.

  • bindings/scripts/CodeGenerator.pm:

Add ByteString as a string type.

  • testing/TypeConversions.h:

(WebCore::TypeConversions::testByteString):
(WebCore::TypeConversions::setTestByteString):

  • testing/TypeConversions.idl:

Add a testByteString attribute for testing.

LayoutTests:

  • js/dom/webidl-type-mapping-expected.txt:
  • js/dom/webidl-type-mapping.html:

Add tests for ByteString using the new TypeConversions.testByteString attribute.

8:57 PM Changeset in webkit [208875] by rniwa@webkit.org
  • 8 edits in trunk/Source

WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled should keep text replacement enabled
https://bugs.webkit.org/show_bug.cgi?id=164857
<rdar://problem/27721742>

Reviewed by Wenson Hsieh.

Source/WebCore:

It turns out that some users want text replacement to be always enabled so change the semantics of
WKBundleNodeHandleSetHTMLInputElementSpellcheckEnabled to only disable everything else.

Instead of completely disabling spellchecking, remove all text checking options but text replacement
when the user types into an input element on which this API is used to disable spellchecking.

No new tests since we don't have a good facility to test text replacement.

  • dom/Element.h:

(WebCore::Element::isSpellCheckingEnabled): Made this non-virtual now that there is no override.

  • editing/Editor.cpp:

(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): Don't call resolveTextCheckingTypeMask twice.
(WebCore::Editor::resolveTextCheckingTypeMask): Filter out the text checking options if the root editable
element is inside an input element on which isSpellcheckDisabledExceptTextReplacement is set to true.

  • editing/Editor.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::HTMLInputElement):
(WebCore::HTMLInputElement::isSpellCheckingEnabled): Deleted.

  • html/HTMLInputElement.h:

(WebCore::HTMLInputElement::setSpellcheckDisabledExceptTextReplacement): Renamed from setSpellcheckEnabled
to reflect the new semantics.
(WebCore::HTMLInputElement::isSpellcheckDisabledExceptTextReplacement): Ditto.

Source/WebKit2:

  • WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:

(WebKit::InjectedBundleNodeHandle::setHTMLInputElementSpellcheckEnabled):

7:32 PM Changeset in webkit [208874] by wilander@apple.com
  • 9 edits in trunk/Source

Resource load statistics: Cover further data records, count removed data records, and only fire handler when needed
https://bugs.webkit.org/show_bug.cgi?id=164659

Reviewed by Andy Estes.

Source/WebCore:

No new tests. This feature is behind a flag and off by default. Tests require real domain names.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logFrameNavigation):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):

All three functions are now more conservative in calls to
m_store->fireDataModificationHandler(). They only fire when an important statistic has
changed or data records have previously been removed for the domain in question.

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::encode):

Added the dataRecordsRemoved statistic.

(WebCore::ResourceLoadStatistics::decode):

Now takes a version parameter to control which keys to expect.
Added the dataRecordsRemoved statistic.

(WebCore::appendHashCountedSet):

Removed stray linefeed.

(WebCore::ResourceLoadStatistics::toString):

Added the dataRecordsRemoved statistic.

(WebCore::ResourceLoadStatistics::merge):

Added the dataRecordsRemoved statistic.

  • loader/ResourceLoadStatistics.h:

Added the dataRecordsRemoved statistic.

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::createEncoderFromData):

Now encodes a version number for the statistics model.

(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):

Now tries to decode a version number and passes it on to statistics decoding.

(WebCore::ResourceLoadStatisticsStore::processStatistics):

No longer gates processing on the number of data captured.

(WebCore::ResourceLoadStatisticsStore::updateStatisticsForRemovedDataRecords):

Update function for the new dataRecordsRemoved statistic.

(WebCore::ResourceLoadStatisticsStore::hasEnoughDataForStatisticsProcessing): Deleted.

No longer needed since we no longer gate processing on the number of data captured.

  • loader/ResourceLoadStatisticsStore.h:

Source/WebKit2:

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

Consistent naming with 'remove' rather than 'delete'.
Now removes localStorage, IndexDB, disk cache, and memory cache too.
Updates statistics with number of times it has removed data records.

(WebKit::WebResourceLoadStatisticsStore::resourceLoadStatisticsUpdated):

No longer checks whether it has enough data since the classification rules
are absolute, not relative.

(WebKit::WebResourceLoadStatisticsStore::clearDataRecords): Deleted.

  • UIProcess/WebResourceLoadStatisticsStore.h:

Consistent naming with 'remove' rather than 'delete'.

6:41 PM Changeset in webkit [208873] by achristensen@apple.com
  • 2 edits in trunk/Source/WebCore

Fix WinCairo build after r208740
https://bugs.webkit.org/show_bug.cgi?id=164749

  • platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:

(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::validateAttributes):
(WebCore::GraphicsContext3D::getExtensions):
Use more references instead of pointers, like Myles did in r208740

6:11 PM Changeset in webkit [208872] by achristensen@apple.com
  • 31 edits
    8 adds in trunk

Implement TextDecoder and TextEncoder
https://bugs.webkit.org/show_bug.cgi?id=163771

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

  • web-platform-tests/encoding/api-basics-expected.txt:
  • web-platform-tests/encoding/api-invalid-label-expected.txt:
  • web-platform-tests/encoding/api-replacement-encodings-expected.txt:
  • web-platform-tests/encoding/api-surrogates-utf8-expected.txt:
  • web-platform-tests/encoding/idlharness-expected.txt:
  • web-platform-tests/encoding/iso-2022-jp-decoder-expected.txt:
  • web-platform-tests/encoding/single-byte-decoder-expected.txt:
  • web-platform-tests/encoding/textdecoder-byte-order-marks-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-single-byte-expected.txt:
  • web-platform-tests/encoding/textdecoder-fatal-streaming-expected.txt:
  • web-platform-tests/encoding/textdecoder-ignorebom-expected.txt:
  • web-platform-tests/encoding/textdecoder-labels-expected.txt:
  • web-platform-tests/encoding/textdecoder-streaming-expected.txt:
  • web-platform-tests/encoding/textdecoder-utf16-surrogates-expected.txt:
  • web-platform-tests/encoding/textencoder-constructor-non-utf-expected.txt:
  • web-platform-tests/encoding/textencoder-utf16-surrogates-expected.txt:

Source/WebCore:

This API is already implemented by Chrome and Firefox
as specified in https://encoding.spec.whatwg.org/

Covered by newly passing web platform tests.

  • features.json:
  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • dom/TextDecoder.cpp: Added.

(WebCore::isEncodingWhitespace):
(WebCore::TextDecoder::create):
(WebCore::TextDecoder::TextDecoder):
(WebCore::TextDecoder::ignoreBOMIfNecessary):
(WebCore::TextDecoder::prependBOMIfNecessary):
(WebCore::codeUnitByteSize):
(WebCore::TextDecoder::decode):
(WebCore::TextDecoder::encoding):

  • dom/TextDecoder.h: Added.

(WebCore::TextDecoder::fatal):
(WebCore::TextDecoder::ignoreBOM):

  • dom/TextDecoder.idl: Added.
  • dom/TextEncoder.cpp: Added.

(WebCore::TextEncoder::TextEncoder):
(WebCore::TextEncoder::encoding):
(WebCore::TextEncoder::encode):

  • dom/TextEncoder.h: Added.

(WebCore::TextEncoder::create):

  • dom/TextEncoder.idl: Added.

LayoutTests:

  • fast/encoding/utf-8-non-ascii-expected.txt: Added.
  • fast/encoding/utf-8-non-ascii.html: Added.
  • js/dom/global-constructors-attributes-dedicated-worker-expected.txt:
  • platform/efl/js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-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:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
5:26 PM Changeset in webkit [208871] by weinig@apple.com
  • 3 edits in trunk/Source/WebCore

Try to fix the windows build again.

  • svg/SVGStringList.h:
  • svg/properties/SVGStaticListPropertyTearOff.h:

(WebCore::SVGStaticListPropertyTearOff::SVGStaticListPropertyTearOff):

5:09 PM Changeset in webkit [208870] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Try to fix the windows build.

  • svg/SVGStringList.h:

Remove unnecessary using declarations.

4:55 PM Changeset in webkit [208869] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Regression(r208672?): ASSERTION FAILED: isMainThread() in WebCore::Node::ref()
https://bugs.webkit.org/show_bug.cgi?id=164887
<rdar://problem/29319497>

Reviewed by Brady Eidson.

Restore pre-r208672 behavior where we do not ref the script execution context in the
background thread since this is unsafe. We use WTFMove(m_scriptExecutionContext)
instead of m_scriptExecutionContext.copyRef(). Before r208672, it was calling
m_scriptExecutionContext.releaseNonNull() because m_scriptExecutionContext was a
RefPtr instead of a Ref. Note that copyRef() causes 2 issues here:

  1. It refs the scriptExecutionContext in a non-main thread which is unsafe and asserts.
  2. The point of this postTask in the destructor is to make sure the scriptExecutionContext gets destroyed in the main thread so we definitely want to *transfer* ownership of m_scriptExecutionContext to the main thread, not ref it to pass it to the main thread.

No new tests, already covered by storage/websql/multiple-transactions-on-different-handles.html.

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::~Database):

4:48 PM Changeset in webkit [208868] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Rebaseline fast/html/keygen.html for Sierra.

Unreviewed test gardening.

  • platform/mac/fast/html/keygen-expected.txt:
4:37 PM Changeset in webkit [208867] by Yusuke Suzuki
  • 9 edits
    1 add in trunk

[JSC] Drop arguments.caller
https://bugs.webkit.org/show_bug.cgi?id=164859

Reviewed by Saam Barati.

JSTests:

  • stress/strict-mode-arguments-caller.js: Added.

(strictArguments):
(shouldBe):

Source/JavaScriptCore:

Originally, some JavaScript engine has arguments.caller property.
But it easily causes some information leaks and it becomes obstacles
for secure ECMAScript (SES). In ES5, we make it deprecated in strict
mode. To do so, we explicitly set "caller" getter throwing TypeError
to arguments in strict mode.

But now, there is no modern engine which supports arguments.caller
in sloppy mode. So the original compatibility problem is gone and
"caller" getter in the strict mode arguments becomes meaningless.

ES2017 drops this from the spec. In this patch, we also drop this
arguments.caller in strict mode support.

Note that Function#caller is still alive.

  • runtime/ClonedArguments.cpp:

(JSC::ClonedArguments::getOwnPropertySlot):
(JSC::ClonedArguments::put):
(JSC::ClonedArguments::deleteProperty):
(JSC::ClonedArguments::defineOwnProperty):
(JSC::ClonedArguments::materializeSpecials):

LayoutTests:

  • js/basic-strict-mode-expected.txt:
  • js/script-tests/basic-strict-mode.js:
  • js/script-tests/strict-throw-type-error.js:
  • js/script-tests/throw-type-error-is-unique.js:

(test):

  • js/strict-throw-type-error-expected.txt:
4:23 PM Changeset in webkit [208866] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Inlining should be disallowed when JSC_alwaysUseShadowChicken=true.
https://bugs.webkit.org/show_bug.cgi?id=164893
<rdar://problem/29146436>

Reviewed by Saam Barati.

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

4:22 PM Changeset in webkit [208865] by beidson@apple.com
  • 26 edits
    7 copies
    1 add in trunk

Add _WKIconLoadingDelegate SPI.
https://bugs.webkit.org/show_bug.cgi?id=164894

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Manual testing possible in MiniBrowser now, WKTR tests coming soon in https://bugs.webkit.org/show_bug.cgi?id=164895).

With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.

WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.

For icons the app decides to load, WebKit will pass the data to the app without storing locally.

  • WebCore.xcodeproj/project.pbxproj:
  • dom/Document.cpp:

(WebCore::Document::implicitClose):

  • html/LinkIconCollector.cpp:

(WebCore::iconSize):
(WebCore::compareIcons):

  • html/LinkIconCollector.h:
  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::startIconLoading):
(WebCore::DocumentLoader::didGetLoadDecisionForIcon):
(WebCore::DocumentLoader::finishedLoadingIcon):

  • loader/DocumentLoader.h:
  • loader/FrameLoaderClient.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::IconLoader):
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • platform/LinkIcon.h: Copied from Source/WebCore/html/LinkIconCollector.h.

(WebCore::LinkIcon::encode):
(WebCore::LinkIcon::decode):

Source/WebKit2:

With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.

WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.

For icons the app decides to load, WebKit will pass the data to the app without storing locally.

  • UIProcess/API/APIIconLoadingClient.h: Copied from Source/WebCore/html/LinkIconCollector.h.

(API::IconLoadingClient::~IconLoadingClient):
(API::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):
(-[WKWebView _iconLoadingDelegate]):
(-[WKWebView _setIconLoadingDelegate:]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKIconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/API/Cocoa/_WKLinkIconParameters.mm: Copied from Source/WebCore/html/LinkIconCollector.h.

(-[_WKLinkIconParameters _initWithLinkIcon:]):
(-[_WKLinkIconParameters url]):
(-[_WKLinkIconParameters mimeType]):
(-[_WKLinkIconParameters size]):
(-[_WKLinkIconParameters iconType]):

  • UIProcess/API/Cocoa/_WKLinkIconParametersInternal.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/Cocoa/IconLoadingDelegate.h: Copied from Source/WebCore/html/LinkIconCollector.h.
  • UIProcess/Cocoa/IconLoadingDelegate.mm: Added.

(WebKit::IconLoadingDelegate::IconLoadingDelegate):
(WebKit::IconLoadingDelegate::~IconLoadingDelegate):
(WebKit::IconLoadingDelegate::createIconLoadingClient):
(WebKit::IconLoadingDelegate::delegate):
(WebKit::IconLoadingDelegate::setDelegate):
(WebKit::IconLoadingDelegate::IconLoadingClient::IconLoadingClient):
(WebKit::IconLoadingDelegate::IconLoadingClient::~IconLoadingClient):
(WebKit::IconLoadingDelegate::IconLoadingClient::getLoadDecisionForIcon):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setIconLoadingClient):
(WebKit::WebPageProxy::getLoadDecisionForIcon):
(WebKit::WebPageProxy::finishedLoadingIcon):

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::iconLoadingClient):

  • UIProcess/WebPageProxy.messages.in:
  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::useIconLoadingClient):
(WebKit::WebFrameLoaderClient::getLoadDecisionForIcon):
(WebKit::WebFrameLoaderClient::finishedLoadingIcon):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

(WebKit::WebFrameLoaderClient::setUseIconLoadingClient):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didGetLoadDecisionForIcon):
(WebKit::WebPage::setUseIconLoadingClient):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:

Tools:

Add MiniBrowser support for this new SPI, configurable with a setting.

  • MiniBrowser/mac/SettingsController.h:
  • MiniBrowser/mac/SettingsController.m:

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController loadsAllSiteIcons]):
(-[SettingsController toggleLoadsAllSiteIcons:]):

  • MiniBrowser/mac/WK2BrowserWindowController.m:

(-[WK2BrowserWindowController awakeFromNib]):
(-[WK2BrowserWindowController webView:shouldLoadIconWithParameters:completionHandler:]):

4:11 PM Changeset in webkit [208864] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Update TestExpectations for media/modern-media-controls/pip-support/pip-support-enabled.html.
https://bugs.webkit.org/show_bug.cgi?id=164336

Unreviewed test gardening.

  • platform/mac-wk1/TestExpectations:
3:58 PM Changeset in webkit [208863] by weinig@apple.com
  • 91 edits
    7 copies
    5 moves
    3 deletes in trunk/Source/WebCore

[SVG] Moving more special casing of SVG out of the bindings - SVG lists
https://bugs.webkit.org/show_bug.cgi?id=164790

Reviewed by Alex Christensen.

  • Make SVGLengthList, SVGNumberList, SVGPointList, SVGStringList, SVGPathSegList and SVGTransformList real classes and stop special casing them in the bindings generator. This removes the remaining SVG specializations for tear offs from the bindings generator.
  • Renamed existing SVGLengthList, SVGNumberList, SVGPointList, SVGStringList, SVGPathSegList, SVGPathSegList and SVGTransformList to SVG<Type>ListValues, to make way for the new classes.
  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • svg/SVGAllInOne.cpp:

Add new files.

  • bindings/scripts/CodeGenerator.pm:
  • bindings/scripts/CodeGeneratorJS.pm:

Remove SVG tear off specific code!

  • rendering/svg/RenderSVGShape.cpp:
  • rendering/svg/RenderSVGText.cpp:
  • rendering/svg/RenderSVGTextPath.cpp:
  • rendering/svg/SVGRenderTreeAsText.cpp:
  • svg/SVGAnimateMotionElement.cpp:
  • svg/SVGClipPathElement.cpp:
  • svg/SVGLinearGradientElement.cpp:
  • svg/SVGRadialGradientElement.cpp:

Remove unnecessary #includes.

  • rendering/svg/SVGPathData.cpp:

(WebCore::updatePathFromPolygonElement):
(WebCore::updatePathFromPolylineElement):

  • rendering/svg/SVGTextLayoutAttributesBuilder.cpp:

(WebCore::updateCharacterData):
(WebCore::SVGTextLayoutAttributesBuilder::fillCharacterDataMap):

  • svg/SVGAnimatedLengthList.cpp:

(WebCore::SVGAnimatedLengthListAnimator::constructFromString):
(WebCore::parseLengthListFromString):
(WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedLengthListAnimator::calculateDistance):

  • svg/SVGAnimatedLengthList.h:
  • svg/SVGAnimatedNumberList.cpp:

(WebCore::SVGAnimatedNumberListAnimator::constructFromString):
(WebCore::SVGAnimatedNumberListAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedNumberListAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedNumberListAnimator::calculateDistance):

  • svg/SVGAnimatedNumberList.h:
  • svg/SVGAnimatedPath.cpp:

(WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):

  • svg/SVGAnimatedPointList.cpp:

(WebCore::SVGAnimatedPointListAnimator::constructFromString):
(WebCore::SVGAnimatedPointListAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedPointListAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedPointListAnimator::calculateDistance):

  • svg/SVGAnimatedPointList.h:
  • svg/SVGAnimatedTransformList.cpp:

(WebCore::SVGAnimatedTransformListAnimator::constructFromString):
(WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):

  • svg/SVGAnimatedTransformList.h:
  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::createLengthList):
(WebCore::SVGAnimatedType::createNumberList):
(WebCore::SVGAnimatedType::createPointList):
(WebCore::SVGAnimatedType::createTransformList):

  • svg/SVGAnimatedType.h:

(WebCore::SVGAnimatedType::lengthList):
(WebCore::SVGAnimatedType::numberList):
(WebCore::SVGAnimatedType::pointList):
(WebCore::SVGAnimatedType::transformList):

  • svg/SVGComponentTransferFunctionElement.cpp:

(WebCore::SVGComponentTransferFunctionElement::parseAttribute):

  • svg/SVGFEColorMatrixElement.cpp:

(WebCore::SVGFEColorMatrixElement::parseAttribute):

  • svg/SVGFEConvolveMatrixElement.cpp:

(WebCore::SVGFEConvolveMatrixElement::parseAttribute):
(WebCore::SVGFEConvolveMatrixElement::build):

  • svg/SVGParserUtilities.cpp:

(WebCore::pointsListFromSVGData):

  • svg/SVGParserUtilities.h:
  • svg/SVGPathElement.cpp:
  • svg/SVGPathElement.h:
  • svg/SVGPathSegListBuilder.cpp:
  • svg/SVGPathSegListBuilder.h:
  • svg/SVGPathSegListSource.cpp:
  • svg/SVGPathSegListSource.h:
  • svg/SVGPathUtilities.cpp:

(WebCore::buildSVGPathByteStreamFromSVGPathSegListValues):
(WebCore::appendSVGPathByteStreamFromSVGPathSeg):
(WebCore::buildSVGPathSegListValuesFromByteStream):
(WebCore::buildStringFromSVGPathSegListValues):
(WebCore::buildSVGPathByteStreamFromSVGPathSegList): Deleted.
(WebCore::buildSVGPathSegListFromByteStream): Deleted.
(WebCore::buildStringFromSVGPathSegList): Deleted.

  • svg/SVGPathUtilities.h:
  • svg/SVGPolyElement.cpp:

(WebCore::SVGPolyElement::parseAttribute):
(WebCore::SVGPolyElement::lookupOrCreatePointsWrapper):
(WebCore::SVGPolyElement::points):
(WebCore::SVGPolyElement::animatedPoints):

  • svg/SVGPolyElement.h:

(WebCore::SVGPolyElement::pointList):

  • svg/SVGTextPositioningElement.cpp:

(WebCore::SVGTextPositioningElement::parseAttribute):

  • svg/SVGTransformable.cpp:

(WebCore::SVGTransformable::parseTransformAttribute):

  • svg/SVGTransformable.h:
  • svg/SVGViewElement.cpp:

(WebCore::SVGViewElement::viewTarget):
(WebCore::SVGViewElement::parseAttribute):

  • svg/SVGViewElement.h:
  • svg/SVGViewElement.idl:
  • svg/SVGViewSpec.cpp:

(WebCore::SVGViewSpec::transformString):
(WebCore::SVGViewSpec::transform):
(WebCore::SVGViewSpec::lookupOrCreateTransformWrapper):
(WebCore::SVGViewSpec::reset):

  • svg/SVGViewSpec.h:

Update for name changes.

  • svg/SVGAngle.h:

(WebCore::SVGAngle::create):
(WebCore::SVGAngle::SVGAngle):

  • svg/SVGLength.h:

(WebCore::SVGLength::create):
(WebCore::SVGLength::SVGLength):

  • svg/SVGMatrix.h:

(WebCore::SVGMatrix::create):
(WebCore::SVGMatrix::SVGMatrix):

  • svg/SVGNumber.h:

(WebCore::SVGNumber::create):
(WebCore::SVGNumber::SVGNumber):

  • svg/SVGPoint.h:

(WebCore::SVGPoint::create):
(WebCore::SVGPoint::SVGPoint):

  • svg/SVGPreserveAspectRatio.h:

(WebCore::SVGPreserveAspectRatio::create):
(WebCore::SVGPreserveAspectRatio::SVGPreserveAspectRatio):

  • svg/SVGRect.h:

(WebCore::SVGRect::create):
(WebCore::SVGRect::SVGRect):

  • svg/SVGTransform.h:

(WebCore::SVGTransform::create):
(WebCore::SVGTransform::SVGTransform):

  • svg/properties/SVGPropertyTearOff.h:

(WebCore::SVGPropertyTearOff::create):
Pass the SVGAnimatedProperty parameter by reference.

  • svg/SVGAnimationElement.cpp:

(WebCore::SVGAnimationElement::requiredFeatures):
(WebCore::SVGAnimationElement::requiredExtensions):
(WebCore::SVGAnimationElement::systemLanguage):

  • svg/SVGAnimationElement.h:
  • svg/SVGCursorElement.cpp:

(WebCore::SVGCursorElement::requiredFeatures):
(WebCore::SVGCursorElement::requiredExtensions):
(WebCore::SVGCursorElement::systemLanguage):

  • svg/SVGCursorElement.h:
  • svg/SVGGradientElement.cpp:
  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::requiredFeatures):
(WebCore::SVGGraphicsElement::requiredExtensions):
(WebCore::SVGGraphicsElement::systemLanguage):

  • svg/SVGGraphicsElement.h:
  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::requiredFeatures):
(WebCore::SVGMaskElement::requiredExtensions):
(WebCore::SVGMaskElement::systemLanguage):

  • svg/SVGMaskElement.h:
  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::parseAttribute):
(WebCore::SVGPatternElement::requiredFeatures):
(WebCore::SVGPatternElement::requiredExtensions):
(WebCore::SVGPatternElement::systemLanguage):

  • svg/SVGPatternElement.h:
  • svg/SVGTests.cpp:

(WebCore::SVGTests::synchronizeAttribute):
(WebCore::SVGTests::synchronizeRequiredFeatures):
(WebCore::SVGTests::synchronizeRequiredExtensions):
(WebCore::SVGTests::synchronizeSystemLanguage):
(WebCore::SVGTests::requiredFeatures):
(WebCore::SVGTests::requiredExtensions):
(WebCore::SVGTests::systemLanguage):

  • svg/SVGTests.h:
  • svg/SVGTests.idl:

Make SVGTests SVGStringLists work by adding implementations of functions
on the SVGElements that implement SVGTests, passing *this down to SVGTests.

  • svg/SVGLengthList.cpp: Removed.
  • svg/SVGLengthList.h:
  • svg/SVGLengthList.idl:
  • svg/SVGLengthListValues.cpp: Copied from svg/SVGLengthList.cpp.
  • svg/SVGLengthListValues.h: Copied from svg/SVGLengthList.h.

Rename SVGLengthList to SVGLengthListValues and add an explicit implementation of
the SVGLengthList interface inheriting from SVGListPropertyTearOff<SVGLengthListValues>.

  • svg/SVGNumberList.cpp: Removed.
  • svg/SVGNumberList.h:
  • svg/SVGNumberListValues.cpp: Copied from svg/SVGNumberList.cpp.
  • svg/SVGNumberListValues.h: Copied from svg/SVGNumberList.h.

Rename SVGNumberList to SVGNumberListValues and add an explicit implementation of
the SVGNumberList interface inheriting from SVGListPropertyTearOff<SVGNumberListValues>.

  • svg/SVGPathSegList.cpp:
  • svg/SVGPathSegList.h:
  • svg/SVGPathSegListValues.cpp: Copied from svg/SVGPathSegList.cpp.
  • svg/SVGPathSegListValues.h: Copied from svg/SVGPathSegList.h.
  • svg/properties/SVGPathSegListPropertyTearOff.cpp: Removed.
  • svg/properties/SVGPathSegListPropertyTearOff.h: Removed.

Rename SVGPathSegList to SVGPathSegListValues and add an explicit implementation of
the SVGPathSegList interface inheriting from SVGListProperty<SVGPathSegListValues>.

  • svg/SVGPointList.cpp: Removed.
  • svg/SVGPointList.h:
  • svg/SVGPointListValues.cpp: Copied from svg/SVGPointList.cpp.
  • svg/SVGPointListValues.h: Copied from svg/SVGPointList.h.

Rename SVGPointList to SVGPointListValues and add an explicit implementation of
the SVGPointList interface inheriting from SVGListPropertyTearOff<SVGPointListValues>.

  • svg/SVGStringList.cpp: Removed.
  • svg/SVGStringList.h:
  • svg/SVGStringListValues.cpp: Copied from svg/SVGStringList.cpp.
  • svg/SVGStringListValues.h: Copied from svg/SVGStringList.h.

Rename SVGStringList to SVGStringListValues and add an explicit implementation of
the SVGStringList interface inheriting from SVGStaticListPropertyTearOff<SVGStringListValues>.

  • svg/SVGTransformList.cpp: Removed.
  • svg/SVGTransformList.h:
  • svg/SVGTransformListValues.cpp: Copied from svg/SVGTransformList.cpp.
  • svg/SVGTransformListValues.h: Copied from svg/SVGTransformList.h.
  • svg/properties/SVGTransformListPropertyTearOff.h: Removed.

Rename SVGTransformList to SVGTransformListValues and add an explicit implementation of
the SVGTransformList interface inheriting from SVGListPropertyTearOff<SVGTransformListValues>.

  • svg/properties/SVGAnimatedListPropertyTearOff.h:
  • svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
  • svg/properties/SVGAnimatedPropertyTearOff.h:
  • svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
  • svg/properties/SVGStaticListPropertyTearOff.h:

Convert to return fully specialized types for baseVal and animVal, removing many unnecessary casts
around the codebase. Also add some uses of Ref.

  • svg/properties/SVGListProperty.h:

(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):

  • svg/properties/SVGListPropertyTearOff.h:

(WebCore::SVGListPropertyTearOff::create):
(WebCore::SVGListPropertyTearOff::SVGListPropertyTearOff):
(WebCore::SVGListPropertyTearOff::~SVGListPropertyTearOff):
Store the AnimatedListPropertyTearOff as a Ref, and pass it around by reference.

  • svg/properties/SVGStaticPropertyTearOff.h:

Update to take the ContextElement by reference.

3:54 PM Changeset in webkit [208862] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Correct a typo in a TestExpectations file.

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:05 PM Changeset in webkit [208861] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Improve URL length handling
https://bugs.webkit.org/show_bug.cgi?id=164884
<rdar://problem/5909143>

Reviewed by David Kilzer.

Make sure the result of re-encoding and other fix-up stays within
expected parameters.

No new tests. No change in behavior.

  • platform/URL.cpp:

(WebCore::URL::parse):

1:37 PM Changeset in webkit [208860] by fpizlo@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

Speculatively disable eager object zero-fill on not-x86 to let the bots decide if that's a problem
https://bugs.webkit.org/show_bug.cgi?id=164885

Reviewed by Mark Lam.

This adds a useGCFences() function that we use to guard all eager object zero-fill and the
related fences. It currently returns true only on x86().

The goal here is to get the bots to tell us if this code is responsible for perf issues on
any non-x86 platforms. We have a few different paths that we can pursue if this turns out
to be the case. Eager zero-fill is merely the easiest way to optimize out some fences, but
we could get rid of it and instead teach B3 how to think about fences.

  • assembler/CPU.h:

(JSC::useGCFences):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateImpl):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::mutatorFence):
(JSC::AssemblyHelpers::storeButterfly):
(JSC::AssemblyHelpers::emitInitializeInlineStorage):
(JSC::AssemblyHelpers::emitInitializeOutOfLineStorage):

1:23 PM Changeset in webkit [208859] by Alan Bujtas
  • 4 edits in trunk

Render tree should be all clean by the end of FrameView::layout().
https://bugs.webkit.org/show_bug.cgi?id=162834

Reviewed by Simon Fraser.

Source/WebCore:

This is a preventive patch to ensure we don't introduce new bugs through
dirty renderers. There are still 3 failing cases and they are skipped for now (debug only).

  • page/FrameView.cpp:

(WebCore::RenderTreeNeedsLayoutChecker::~RenderTreeNeedsLayoutChecker):

LayoutTests:

1:20 PM Changeset in webkit [208858] by Brent Fulgham
  • 8 edits in trunk

keygen element should not support < 2048 RSA key lengths
https://bugs.webkit.org/show_bug.cgi?id=164874
<rdar://problem/22618141>

Reviewed by Dean Jackson.

Source/WebCore:

Remove the two insecure RSA choices (512-bit and 1024-bit) so that users
do not accidentally select a bad key length.

Tested by fast/html/keygen.html

  • platform/LocalizedStrings.cpp:

(WebCore::keygenMenuItem512): Deleted.
(WebCore::keygenMenuItem1024): Deleted.

  • platform/LocalizedStrings.h:
  • platform/mac/SSLKeyGeneratorMac.mm:

(WebCore::signedPublicKeyAndChallengeString): ASSERT on bad key size.
(WebCore::getSupportedKeySizes): Remove bad key sizes.
(WebCore::signedPublicKeyAndChallengeString): Ditto.

  • platform/win/SSLKeyGeneratorWin.cpp:

(WebCore::WebCore::getSupportedKeySizes): Ditto.

LayoutTests:

  • platform/mac/fast/html/keygen-expected.txt:
  • platform/mac-elcapitan/fast/html/keygen-expected.txt:
12:25 PM Changeset in webkit [208857] by commit-queue@webkit.org
  • 5 edits in trunk

Web Inspector: Shift clicking on named color value only shows its hex form
https://bugs.webkit.org/show_bug.cgi?id=162758

Patch by Devin Rousso <Devin Rousso> on 2016-11-17
Reviewed by Timothy Hatcher.

Source/WebInspectorUI:

  • UserInterface/Models/Color.js:

(WebInspector.Color.prototype.nextFormat):
Reworked the logic for the formatting order to be the following:

  • Long HEX and Long HEXAlpha
  • RGB and RGBA
  • HSL and HSLA
  • Keyword (if applicable)
  • Short HEX (if applicable)
  • Short HEXAlpha (if applicable)

It will only show formats with alpha values if the color value has an alpha that is not 1.
If the alpha is not 1, it will not show formats with non-alpha values.

The changes to this function have no effect on the context menu items of InlineSwatch
elements. The purpose of each of those items is to allow the user to change the format to
a specified type, whereas WebInspector.Color.prototype.nextFormat is used to cycle through
all of the relevant formats.

(WebInspector.Color.prototype._toRGBString):
(WebInspector.Color.prototype._toRGBAString):
(WebInspector.Color.prototype._toHSLString):
(WebInspector.Color.prototype._toHSLAString):
Unrelated fix of extra decimals when converting from HEX to RGB and HSL.

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor._inlineSwatchValueChanged):
Removed assertion for _hasActiveInlineSwatchEditor since the value may change from
switching the format of a color swatch (Shift-Click).

LayoutTests:

  • inspector/model/color.html:

Updated the WebInspector.Color.prototype.nextFormat test for the new nextFormat logic.

12:15 PM Changeset in webkit [208856] by caitp@igalia.com
  • 3 edits in trunk/Tools

[JSC] remove leftover references to ES2017_ASYNCFUNCTION_SYNTAX flag
https://bugs.webkit.org/show_bug.cgi?id=164879

Reviewed by Alex Christensen.

The flag was referenced in FeatureList.pm and in one of the
FeatureDefines.xcconfig files, despite being removed.

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
11:21 AM Changeset in webkit [208855] by keith_miller@apple.com
  • 9 edits in trunk

Add rotate to Wasm
https://bugs.webkit.org/show_bug.cgi?id=164871

Reviewed by Filip Pizlo.

JSTests:

  • wasm/wasm.json:

Source/JavaScriptCore:

Add rotate left and rotate right to Wasm. These directly map to B3 opcodes.
This also moves arm specific transformations of rotate left to lower macros
after optimization. It's a bad idea to have platform specific canonicalizations
in reduce strength since other optimizations may not be aware of it.

Add a bug to do pure CSE after lower macros after optimization since we want to
clean up RotL(value, Neg(Neg(shift))).

  • b3/B3Generate.cpp:

(JSC::B3::generateToAir):

  • b3/B3LowerMacrosAfterOptimizations.cpp:
  • b3/B3ReduceStrength.cpp:
  • wasm/wasm.json:

Websites/webkit.org:

Update docs for new rotate instructions.

  • docs/b3/intermediate-representation.html:
11:07 AM Changeset in webkit [208854] by keith_miller@apple.com
  • 4 edits in trunk

Add sqrt to Wasm
https://bugs.webkit.org/show_bug.cgi?id=164877

Reviewed by Mark Lam.

B3 already has a Sqrt opcode we just need to map Wasm to it.

  • wasm/wasm.json:
10:57 AM Changeset in webkit [208853] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/media/modern-media-controls/skip-back-support/skip-back-support-button-click.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164616

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:50 AM Changeset in webkit [208852] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/worker/debugger-multiple-targets-pause.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164872

Unreviewed test gardening.

  • platform/mac/TestExpectations:
10:43 AM Changeset in webkit [208851] by eric.carlson@apple.com
  • 21 edits
    1 copy in trunk/Source/WebCore

[MediaStream][Mac] Use AVCapturePreview object for camera/microphone rendering
https://bugs.webkit.org/show_bug.cgi?id=164837
<rdar://problem/29297727>

Reviewed by Jer Noble.

No new tests, the real capture devices can not be used in layout tests.

  • WebCore.xcodeproj/project.pbxproj:

Drive-by fix: clear m_settingMediaStreamSrcObject when the media player is destroyed unless
that happens as a side effect of setting video.srcObject.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::setSrcObject):
(WebCore::HTMLMediaElement::clearMediaPlayer):

  • html/HTMLMediaElement.h:

Add support for realtime media source that vend a preview interface, while keeping support
for those that do not (e.g. the mock capture devices).

  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSampleBuffer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareVideoSampleBufferFromTrack):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::internalSetVolume):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::platformLayer): Deleted, no longer used.

  • platform/mediastream/MediaStreamPrivate.h:

Enable/disable the preview when available.

  • platform/mediastream/MediaStreamTrackPrivate.cpp:

(WebCore::MediaStreamTrackPrivate::setEnabled):
(WebCore::MediaStreamTrackPrivate::endTrack):
(WebCore::MediaStreamTrackPrivate::preview):

  • platform/mediastream/MediaStreamTrackPrivate.h:
  • platform/mediastream/RealtimeMediaSource.h:

(WebCore::RealtimeMediaSource::preview):
(WebCore::RealtimeMediaSource::createWeakPtr):
(WebCore::RealtimeMediaSource::platformLayer): Deleted.

Define a realtime media source preview interface.

  • platform/mediastream/RealtimeMediaSourcePreview.h: Added.

(WebCore::RealtimeMediaSourcePreview::~RealtimeMediaSourcePreview):
(WebCore::RealtimeMediaSourcePreview::invalidate):
(WebCore::RealtimeMediaSourcePreview::createWeakPtr):
(WebCore::RealtimeMediaSourcePreview::RealtimeMediaSourcePreview):

Implement the preview interface.

  • platform/mediastream/mac/AVAudioCaptureSource.h:
  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioSourcePreview::create):
(WebCore::AVAudioSourcePreview::AVAudioSourcePreview):
(WebCore::AVAudioSourcePreview::invalidate):
(WebCore::AVAudioSourcePreview::play):
(WebCore::AVAudioSourcePreview::pause):
(WebCore::AVAudioSourcePreview::setEnabled):
(WebCore::AVAudioSourcePreview::setVolume):
(WebCore::AVAudioSourcePreview::updateState):
(WebCore::AVAudioCaptureSource::createPreview):

  • platform/mediastream/mac/AVMediaCaptureSource.h:

(WebCore::AVMediaCaptureSource::createWeakPtr):

  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::AVMediaCaptureSource):
(WebCore::AVMediaCaptureSource::reset):
(WebCore::AVMediaCaptureSource::preview):
(WebCore::AVMediaCaptureSource::removePreview):
(WebCore::AVMediaSourcePreview::AVMediaSourcePreview):
(WebCore::AVMediaSourcePreview::~AVMediaSourcePreview):
(WebCore::AVMediaSourcePreview::invalidate):

  • platform/mediastream/mac/AVVideoCaptureSource.h:
  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoSourcePreview::create):
(WebCore::AVVideoSourcePreview::AVVideoSourcePreview):
(WebCore::AVVideoSourcePreview::invalidate):
(WebCore::AVVideoSourcePreview::play):
(WebCore::AVVideoSourcePreview::pause):
(WebCore::AVVideoSourcePreview::setPaused):
(WebCore::AVVideoSourcePreview::setEnabled):
(WebCore::AVVideoCaptureSource::shutdownCaptureSession):
(WebCore::AVVideoCaptureSource::processNewFrame):
(WebCore::AVVideoCaptureSource::createPreview):
(WebCore::AVVideoCaptureSource::platformLayer): Deleted.

  • platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
  • platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:

(WebCore::MockRealtimeVideoSourceMac::platformLayer): Deleted.
(WebCore::MockRealtimeVideoSourceMac::updatePlatformLayer): Deleted.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSource::applyFrameRate):
(WebCore::MockRealtimeVideoSource::applySize):
(WebCore::MockRealtimeVideoSource::generateFrame):

  • platform/mock/MockRealtimeVideoSource.h:

(WebCore::MockRealtimeVideoSource::updatePlatformLayer): Deleted.

10:19 AM Changeset in webkit [208850] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking imported/w3c/web-platform-tests/IndexedDB/idbcursor_iterating.htm as flaky on mac-wk2 debug.
https://bugs.webkit.org/show_bug.cgi?id=164870

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:08 AM Changeset in webkit [208849] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix build after r208839.

  • dom/Node.h:

(WebCore::Node::isDescendantOf):

9:52 AM Changeset in webkit [208848] by keith_miller@apple.com
  • 21 edits in trunk/Source/JavaScriptCore

Add support for rotate in B3 and the relevant assemblers
https://bugs.webkit.org/show_bug.cgi?id=164869

Reviewed by Geoffrey Garen.

This patch runs RotR and RotL (rotate right and left respectively)
through B3 and B3's assemblers. One thing of note is that ARM64 does
not support rotate left instead it allows negative right rotations.

This patch also fixes a theoretical bug in the assembler where
on X86 doing someShiftOp(reg, edx) would instead shift the shift
amount by the value. Additionally, this patch refactors some
of the X86 assembler to use templates when deciding how to format
the appropriate shift instruction.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::rotateRight32):
(JSC::MacroAssemblerARM64::rotateRight64):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::rotateRight32):
(JSC::MacroAssemblerX86Common::rotateLeft32):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::lshift64):
(JSC::MacroAssemblerX86_64::rshift64):
(JSC::MacroAssemblerX86_64::urshift64):
(JSC::MacroAssemblerX86_64::rotateRight64):
(JSC::MacroAssemblerX86_64::rotateLeft64):
(JSC::MacroAssemblerX86_64::or64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::xorq_rm):
(JSC::X86Assembler::shiftInstruction32):
(JSC::X86Assembler::sarl_i8r):
(JSC::X86Assembler::shrl_i8r):
(JSC::X86Assembler::shll_i8r):
(JSC::X86Assembler::rorl_i8r):
(JSC::X86Assembler::rorl_CLr):
(JSC::X86Assembler::roll_i8r):
(JSC::X86Assembler::roll_CLr):
(JSC::X86Assembler::shiftInstruction64):
(JSC::X86Assembler::sarq_CLr):
(JSC::X86Assembler::sarq_i8r):
(JSC::X86Assembler::shrq_i8r):
(JSC::X86Assembler::shlq_i8r):
(JSC::X86Assembler::rorq_i8r):
(JSC::X86Assembler::rorq_CLr):
(JSC::X86Assembler::rolq_i8r):
(JSC::X86Assembler::rolq_CLr):

  • b3/B3Common.h:

(JSC::B3::rotateRight):
(JSC::B3::rotateLeft):

  • b3/B3Const32Value.cpp:

(JSC::B3::Const32Value::rotRConstant):
(JSC::B3::Const32Value::rotLConstant):

  • b3/B3Const32Value.h:
  • b3/B3Const64Value.cpp:

(JSC::B3::Const64Value::rotRConstant):
(JSC::B3::Const64Value::rotLConstant):

  • b3/B3Const64Value.h:
  • b3/B3LowerToAir.cpp:

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

  • b3/B3Opcode.cpp:

(WTF::printInternal):

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

(JSC::B3::Value::rotRConstant):
(JSC::B3::Value::rotLConstant):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):

  • b3/B3Value.h:
  • b3/B3ValueKey.cpp:

(JSC::B3::ValueKey::materialize):

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::isRotateRight32Valid):
(JSC::B3::Air::isRotateLeft32Valid):
(JSC::B3::Air::isRotateRight64Valid):
(JSC::B3::Air::isRotateLeft64Valid):

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

(JSC::B3::testRotR):
(JSC::B3::testRotL):
(JSC::B3::testRotRWithImmShift):
(JSC::B3::testRotLWithImmShift):
(JSC::B3::run):

9:28 AM Changeset in webkit [208847] by hyatt@apple.com
  • 31 edits
    30 deletes in trunk

[CSS Parser] Add @supports, @keyframe and media query parsing options
https://bugs.webkit.org/show_bug.cgi?id=164821

Reviewed by Sam Weinig and Zalan Bujtas.

Source/WebCore:

  • css/CSSKeyframeRule.cpp:

(WebCore::StyleKeyframe::setKeyText):

  • css/CSSKeyframeRule.h:
  • css/CSSKeyframesRule.cpp:

(WebCore::StyleRuleKeyframes::findKeyframeIndex):
Changed to call into CSSParserImpls implementation. The new parser
is now always used when parsing the key list.

  • css/MediaList.cpp:

(WebCore::MediaQuerySet::create):
(WebCore::MediaQuerySet::MediaQuerySet):
(WebCore::MediaQuerySet::set):
(WebCore::MediaQuerySet::add):
(WebCore::MediaQuerySet::remove):
(WebCore::MediaList::setMediaText):
(WebCore::parseMediaDescriptor): Deleted.
(WebCore::MediaQuerySet::internalParse): Deleted.
(WebCore::MediaQuerySet::parse): Deleted.

  • css/MediaList.h:

Rewritten to remove fallback descriptor support/parsing, since no other
browser supports it, and this was part of our initial 2005 landing that
nobody else appears to use. Media queries now call into the new parser always.

  • css/MediaQueryExp.cpp:

(WebCore::featureWithValidDensity):
(WebCore::featureWithPositiveNumber):
(WebCore::MediaQueryExpression::MediaQueryExpression):
Make sure to support transform2d, animation and transition.

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium):
Call the normal create now that fallback descriptor syntax is gone.

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseKeyframeRule):
(WebCore::CSSParser::parseSupportsCondition):
(WebCore::CSSParser::parseInlineStyleDeclaration):
(WebCore::CSSParser::parseDeclarationDeprecated):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::parseKeyframeKeyList):
(WebCore::CSSParser::parseMediaQuery): Deleted.
(WebCore::CSSParser::parseKeyframeSelector): Deleted.

  • css/parser/CSSParser.h:

Patched the old parser to have flags to call into the new parser
for supports conditions and keyframes. Rename the parseDeclaration that
is only used by the old parser to have the word Deprecated in it. Removed
the media query and key list parsing functions, since the new parser
now does it always.

  • css/parser/CSSParserIdioms.cpp:

(WebCore::convertToASCIILowercaseInPlace): Deleted.

  • css/parser/CSSParserIdioms.h:
  • css/parser/CSSParserToken.cpp:

(WebCore::convertToASCIILowercaseInPlace):
(WebCore::CSSParserToken::convertToASCIILowercaseInPlace):

  • css/parser/CSSParserToken.h:

(WebCore::CSSParserToken::value):
(WebCore::CSSParserToken::initValueFromStringView):

  • css/parser/CSSParserValues.cpp:

(WebCore::CSSParserSelector::parsePseudoElementSelectorFromStringView):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeAttr):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::CSSSelectorParser::consumeId):
(WebCore::CSSSelectorParser::consumeClass):
(WebCore::CSSSelectorParser::consumePseudo):
Moving convertToASCIILowercase to be a CSSParserToken member function instead
of operating on StringView. This saves an extra step, since the token itself
already had all the correct members. Note that converting in-place is bad,
and we'll be removing it once the new parser turns on.

  • css/parser/MediaQueryParser.cpp:

(WebCore::MediaQueryParser::readMediaType):
(WebCore::MediaQueryParser::readFeature):
(WebCore::MediaQueryParser::readFeatureEnd):
Require the closing ")" on features. Fix the in-place lowercasing to only
be done for features, not for types. This matches the old parser.

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createCSSStyleSheet):

  • dom/InlineStyleSheetOwner.cpp:

(WebCore::InlineStyleSheetOwner::createSheet):

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):
(WebCore::HTMLLinkElement::initializeStyleSheet):

  • html/HTMLSourceElement.cpp:

(WebCore::HTMLSourceElement::parseAttribute):

  • html/HTMLStyleElement.cpp:

(WebCore::HTMLStyleElement::parseAttribute):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::mediaAttributeMatches):
Patched to call the normal MediaQuerySet::create and not the one that had fallback
descriptor support.

Source/WebKit/mac:

Fix up the create call now that fallback descriptor syntax is gone.

  • DOM/DOM.mm:

(-[DOMHTMLLinkElement _mediaQueryMatches]):

LayoutTests:

Delete the fallback descriptor tests, since that feature has been
removed. Update some of the other tests based off some parsing changes
from using the new parser always.

  • fast/media/media-descriptor-syntax-01-expected.html: Removed.
  • fast/media/media-descriptor-syntax-01.html: Removed.
  • fast/media/media-descriptor-syntax-02-expected.html: Removed.
  • fast/media/media-descriptor-syntax-02.html: Removed.
  • fast/media/media-descriptor-syntax-03-expected.html: Removed.
  • fast/media/media-descriptor-syntax-03.html: Removed.
  • fast/media/media-descriptor-syntax-04-expected.html: Removed.
  • fast/media/media-descriptor-syntax-04.html: Removed.
  • fast/media/media-descriptor-syntax-06-expected.html: Removed.
  • fast/media/media-descriptor-syntax-06.html: Removed.
  • fast/media/media-query-list-02-expected.txt:
  • fast/media/media-query-list-03-expected.txt:
  • fast/media/media-query-list-04-expected.txt:
  • fast/media/media-query-list-05-expected.txt:
  • fast/media/media-query-list-06-expected.txt:
  • fast/media/mq-pointer-expected.txt:
  • fast/media/w3c/test_media_queries-expected.txt:
9:21 AM Changeset in webkit [208846] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Remove pass expectation for custom-elements tests on ios-sim because CEReactions were disabled in r208837.
https://bugs.webkit.org/show_bug.cgi?id=164852

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
2:59 AM Changeset in webkit [208845] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix link error after r208841 part2

Use static_cast to avoid referencing static storage.

  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItemIgnoringQuota):

2:53 AM Changeset in webkit [208844] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, attempt to fix link error after r208841

  • storage/StorageMap.h:
1:05 AM Changeset in webkit [208843] by sbarati@apple.com
  • 34 edits in trunk

Remove async/await compile time flag and enable tests
https://bugs.webkit.org/show_bug.cgi?id=164828
<rdar://problem/28639334>

Reviewed by Yusuke Suzuki.

.:

  • Source/cmake/WebKitFeatures.cmake:

JSTests:

  • stress/async-arrow-functions-lexical-arguments-binding.js:
  • stress/async-arrow-functions-lexical-new.target-binding.js:
  • stress/async-arrow-functions-lexical-super-binding.js:
  • stress/async-arrow-functions-lexical-this-binding.js:
  • stress/async-await-basic.js:
  • stress/async-await-long-loop.js:
  • stress/async-await-module-reserved-word.js:
  • stress/async-await-mozilla.js:

(mozSyntaxErrors):

  • stress/async-await-reserved-word.js:
  • stress/async-await-syntax.js:
  • stress/async-await-throw-loop.js:
  • stress/async-function-create-nobaseline.js:
  • stress/async-function-create-optimized.js:
  • stress/async-function-declaration-sinking-no-double-allocate.js:
  • stress/async-function-declaration-sinking-osrexit.js:
  • stress/async-function-declaration-sinking-put.js:
  • stress/async-function-expression-sinking-no-double-allocate.js:
  • stress/async-function-expression-sinking-osrexit.js:
  • stress/async-function-expression-sinking-put.js:
  • test262.yaml:

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:
  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseStatement):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
(JSC::Parser<LexerType>::parseUnaryExpression):

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:

Source/WTF:

  • wtf/FeatureDefines.h:
1:04 AM Changeset in webkit [208842] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] run-api-tests is failing.
https://bugs.webkit.org/show_bug.cgi?id=164818

Reviewed by Alexey Proskuryakov.

Make sure Visual Studio interprets string literal as utf8.

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

12:48 AM Changeset in webkit [208841] by Yusuke Suzuki
  • 67 edits
    2 moves
    1 delete in trunk

[JSC] WTF::TemporaryChange with WTF::SetForScope
https://bugs.webkit.org/show_bug.cgi?id=164761

Reviewed by Saam Barati.

Source/JavaScriptCore:

  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/SetForScope.h: Removed.
  • debugger/Debugger.cpp:
  • inspector/InspectorBackendDispatcher.cpp:

(Inspector::BackendDispatcher::dispatch):

  • inspector/ScriptDebugServer.cpp:

(Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe):
(Inspector::ScriptDebugServer::sourceParsed):
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):

  • parser/Parser.cpp:

Source/WebCore:

No behavior change.

  • Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:

(WebCore::IDBServer::MemoryBackingStoreTransaction::abort):

  • bindings/js/JSCustomElementRegistryCustom.cpp:

(WebCore::JSCustomElementRegistry::define):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateModule):

  • css/ElementRuleCollector.cpp:

(WebCore::ElementRuleCollector::matchSlottedPseudoElementRules):

  • css/StyleResolver.cpp:
  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFillShorthand):
(WebCore::CSSParser::parseShorthand):
(WebCore::CSSParser::parse4Values):
(WebCore::CSSParser::parseBorderRadius):

  • css/parser/SVGCSSParser.cpp:

(WebCore::CSSParser::parseSVGValue):

  • dom/CustomElementRegistry.h:
  • dom/Document.cpp:

(WebCore::Document::recalcStyle):
(WebCore::Document::styleForElementIgnoringPendingStylesheets):
(WebCore::Document::destroyRenderTree):

  • dom/EventTarget.cpp:

(WebCore::EventTarget::fireEventListeners):

  • dom/Microtasks.cpp:

(WebCore::MicrotaskQueue::performMicrotaskCheckpoint):

  • history/PageCache.cpp:

(WebCore::PageCache::pruneToSizeNow):

  • html/DOMTokenList.cpp:

(WebCore::DOMTokenList::updateAssociatedAttributeFromTokens):

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::scan):

  • html/parser/HTMLConstructionSite.h:
  • loader/ContentFilter.cpp:

(WebCore::ContentFilter::handleProvisionalLoadFailure):

  • loader/SubresourceLoader.cpp:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::pruneLiveResourcesToSize):
(WebCore::MemoryCache::pruneDeadResourcesToSize):

  • page/Chrome.cpp:

(WebCore::Chrome::runModal):

  • page/FrameView.cpp:

(WebCore::FrameView::layout):
(WebCore::FrameView::setScrollPosition):
(WebCore::FrameView::applyRecursivelyWithVisibleRect):
(WebCore::FrameView::autoSizeIfEnabled):

  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::didReceiveHeaders):

  • page/scrolling/ScrollingTree.cpp:

(WebCore::ScrollingTree::commitTreeState):

  • platform/graphics/ca/GraphicsLayerCA.cpp:

(WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
(WebCore::GraphicsLayerCA::commitLayerChangesAfterSublayers):

  • platform/graphics/opengl/TemporaryOpenGLSetting.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::TextureMapperGL::drawTexture):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::purgeBackingStores):

  • platform/graphics/win/GraphicsLayerDirect2D.cpp:
  • platform/gtk/PasteboardHelper.cpp:

(WebCore::PasteboardHelper::writeClipboardContents):

  • platform/mac/ScrollbarThemeMac.mm:

(WebCore::ScrollbarThemeMac::paint):

  • rendering/RenderBlock.cpp:
  • rendering/RenderGeometryMap.cpp:

(WebCore::RenderGeometryMap::pushMappingsToAncestor):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::updateLayerPositions):

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::updateCompositingLayers):

  • rendering/RenderView.cpp:

(WebCore::RenderView::hitTest):

  • replay/EventLoopInputDispatcher.cpp:

(WebCore::EventLoopInputDispatcher::dispatchInput):

  • storage/StorageMap.cpp:

(WebCore::StorageMap::setItemIgnoringQuota):

  • svg/SVGPathBlender.cpp:

(WebCore::SVGPathBlender::addAnimatedPath):

Source/WebKit:

  • WebCoreSupport/WebResourceLoadScheduler.cpp:

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView updateTextTouchBar]):

Source/WebKit2:

  • PluginProcess/PluginControllerProxy.cpp:

(WebKit::PluginControllerProxy::initialize):

  • PluginProcess/WebProcessConnection.cpp:

(WebKit::WebProcessConnection::didReceiveMessage):
(WebKit::WebProcessConnection::didReceiveSyncMessage):

  • Shared/API/Cocoa/WKRemoteObjectCoder.mm:

(createEncodedObject):
(decodeObject):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::WebViewImpl::updateTextTouchBar):

  • UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:

(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):

  • UIProcess/gtk/WebPasteboardProxyGtk.cpp:

(WebKit::WebPasteboardProxy::writeToClipboard):

  • WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp:

(WebKit::CompositingCoordinator::flushPendingLayerChanges):
(WebKit::CompositingCoordinator::purgeBackingStores):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::keyEvent):
(WebKit::WebPage::dispatchTouchEvent):
(WebKit::WebPage::setInitialFocus):
(WebKit::WebPage::insertTextAsync):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dynamicViewportSizeUpdate):

  • WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
  • WebProcess/WebPage/mac/WebPageMac.mm:

Source/WTF:

JavaScriptCore's bytecompiler/SetForScope.h is completely the same
to WTF::TemporaryChange. SetForScope sounds better name since it
says that this object works as Scope.

We rename WTF::TemporaryChange to WTF::SetForScope. And replace
all the use to this WTF::SetForScope.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/SetForScope.h: Renamed from Source/WTF/wtf/TemporaryChange.h.

(WTF::SetForScope::SetForScope):
(WTF::SetForScope::~SetForScope):

Tools:

  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WTF/SetForScope.cpp: Renamed from Tools/TestWebKitAPI/Tests/WTF/TemporaryChange.cpp.

(TestWebKitAPI::TEST):

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):

Nov 16, 2016:

10:47 PM Changeset in webkit [208840] by Yusuke Suzuki
  • 11 edits
    8 adds in trunk

[WebCore] Clean up script loading code in XML
https://bugs.webkit.org/show_bug.cgi?id=161651

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch cleans up XML document script handling by using PendingScript.
Previously, we directly used CachedScript. But it is not good since we
have PendingScript wrapper.

We also disable ES6 modules for non HTML document. While ES6 modules tag
requires "defer" semantics, "defer" semantics is not implemented in non
HTML documents. And ES6 module tag is only specified in whatwg HTML spec.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::execute):

  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::determineScriptType):
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::executeClassicScript):
(WebCore::ScriptElement::executePendingScript):
(WebCore::ScriptElement::executeScript): Deleted.
(WebCore::ScriptElement::executeScriptForScriptRunner): Deleted.

  • dom/ScriptElement.h:
  • dom/ScriptRunner.cpp:

(WebCore::ScriptRunner::timerFired):

  • html/parser/HTMLDocumentParser.cpp:
  • html/parser/HTMLScriptRunner.cpp:

(WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
(WebCore::HTMLScriptRunner::runScript):

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::notifyFinished):

  • xml/parser/XMLDocumentParser.h:
  • xml/parser/XMLDocumentParserLibxml2.cpp:

(WebCore::XMLDocumentParser::XMLDocumentParser):
(WebCore::XMLDocumentParser::~XMLDocumentParser):
(WebCore::XMLDocumentParser::endElementNs):

LayoutTests:

Add tests that ensure modules are not executed in XHTML documents.

  • js/dom/modules/module-inline-dynamic-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-inline-dynamic-in-xhtml.xhtml: Added.
  • js/dom/modules/module-inline-simple-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-inline-simple-in-xhtml.xhtml: Added.
  • js/dom/modules/module-src-dynamic-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-src-dynamic-in-xhtml.xhtml: Added.
  • js/dom/modules/module-src-simple-in-xhtml-expected.txt: Added.
  • js/dom/modules/module-src-simple-in-xhtml.xhtml: Added.
10:24 PM Changeset in webkit [208839] by Chris Dumez
  • 23 edits in trunk/Source/WebCore

Add Node::isDescendantOf() overload that takes in a reference
https://bugs.webkit.org/show_bug.cgi?id=164854

Reviewed by Ryosuke Niwa.

Add Node::isDescendantOf() overload that takes in a reference as a lot
of call sites have a reference or a pointer they know is not null.

No new tests, no Web-exposed behavior change.

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::press):

  • dom/Document.cpp:

(WebCore::isNodeInSubtree):
(WebCore::Document::removeFullScreenElementOfSubtree):
(WebCore::Document::setAnimatingFullScreen):

  • dom/Node.cpp:

(WebCore::Node::isDescendantOf):
(WebCore::Node::isDescendantOrShadowDescendantOf):
(WebCore::Node::contains):

  • dom/Node.h:

(WebCore::Node::isDescendantOf):

  • dom/NodeIterator.cpp:

(WebCore::NodeIterator::updateForNodeRemoval):

  • dom/SelectorQuery.cpp:

(WebCore::SelectorDataList::executeFastPathForIdSelector):
(WebCore::filterRootById):

  • dom/TypedElementDescendantIterator.h:

(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantIteratorAdapter<ElementType>::from):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::beginAt):
(WebCore::TypedElementDescendantConstIteratorAdapter<ElementType>::from):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::applyRelativeFontStyleChange):
(WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::handleGeneralDelete):
(WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
(WebCore::DeleteSelectionCommand::doApply):

  • editing/EditingStyle.cpp:

(WebCore::EditingStyle::textDirectionForSelection):

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::formatRange):

  • editing/TextIterator.cpp:

(WebCore::TextIterator::advance):

  • editing/VisiblePosition.cpp:

(WebCore::VisiblePosition::honorEditingBoundaryAtOrBefore):
(WebCore::VisiblePosition::honorEditingBoundaryAtOrAfter):

  • editing/htmlediting.cpp:

(WebCore::firstEditablePositionAfterPositionInRoot):
(WebCore::lastEditablePositionBeforePositionInRoot):
(WebCore::selectionForParagraphIteration):

  • editing/markup.cpp:

(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):

  • html/CachedHTMLCollection.h:

(WebCore::traversalType>::namedItem):

  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::formElementIndex):

  • html/canvas/CanvasRenderingContext2D.cpp:

(WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):

  • page/EventHandler.cpp:

(WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent):

  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::getElementById):

9:46 PM Changeset in webkit [208838] by rniwa@webkit.org
  • 5 edits in trunk/Source/WebCore

Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
https://bugs.webkit.org/show_bug.cgi?id=164845

Reviewed by Dan Bernstein.

Revert r208833 and fix the build by declaring AVFunctionBarMediaSelectionOption and AVThumbnail in AVKitSPI.h

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]):

  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

  • platform/spi/cocoa/AVKitSPI.h:
8:32 PM Changeset in webkit [208837] by rniwa@webkit.org
  • 5 edits in trunk

REGRESSION(r208082): 1% Speedometer regression on iOS
https://bugs.webkit.org/show_bug.cgi?id=164852

Reviewed by Chris Dumez.

Source/WebCore:

Temporarily disable CEReactions entirely to recover the regression in Speedometer since
reverting r208082 wouldn't remove CEReactions from other DOM APIs and if r208082 was a regression,
then they're likely causing a regression on Speedometer as well.

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionStack::ElementQueue::add): Removed the release assert added in r208785
since reactions can be inserted into the backup queue while the queue is running.
(WebCore::CustomElementReactionStack::ElementQueue::invokeAll): Ditto.

  • dom/CustomElementReactionQueue.h:

(WebCore::CustomElementReactionStack::CustomElementReactionStack): Removed all the code so that this
constructor would be optimized away by clang.
(WebCore::CustomElementReactionStack::~CustomElementReactionStack): Ditto.

LayoutTests:

Add failing test expectations for various custom elements now that CEReactions is not working.

7:30 PM Changeset in webkit [208836] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-603.1.13/Source/WebKit2

Merge r208835. rdar://problem/29277451

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

Unreviewed build fix after r208589

The generated com.apple.WebKit.plugin-common.sb file was not getting copied into
the Resources folder, so was not deployed with WebKit. We need to treat it like
com.apple.WebProcess.sb and the other generated files.

  • WebKit2.xcodeproj/project.pbxproj: Tell Xcode to include the generated file in

the framework Resources.

5:34 PM Changeset in webkit [208834] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

ExceptionFuzz needs to placate exception check verification before overwriting a thrown exception.
https://bugs.webkit.org/show_bug.cgi?id=164843

Reviewed by Keith Miller.

The ThrowScope will check for unchecked simulated exceptions before throwing a
new exception. This ensures that we don't quietly overwrite a pending exception
(which should never happen, with the only exception being to rethrow the same
exception). However, ExceptionFuzz works by intentionally throwing its own
exception even when one may already exist thereby potentially overwriting an
existing exception. This is ok for ExceptionFuzz testing, but we need to placate
the exception check verifier before ExceptionFuzz throws its own exception.

  • runtime/ExceptionFuzz.cpp:

(JSC::doExceptionFuzzing):

5:26 PM Changeset in webkit [208833] by rniwa@webkit.org
  • 4 edits in trunk/Source/WebCore

Fix build on macOS Sierra when WEB_PLAYBACK_CONTROLS_MANAGER is enabled
https://bugs.webkit.org/show_bug.cgi?id=164845

Reviewed by Wenson Hsieh.

Fix builds after r208802 by wrapping code inside USE(APPLE_INTERNAL_SDK).

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::setPlayBackControlsManager):

5:15 PM Changeset in webkit [208832] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Background tabs are often updating non-stop because they think they are visible
https://bugs.webkit.org/show_bug.cgi?id=164841
<rdar://problem/29298658>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-16
Reviewed by Matt Baker.

  • UserInterface/Views/NetworkGridContentView.js:

(WebInspector.NetworkGridContentView.prototype._networkTimelineRecordAdded):

  • UserInterface/Views/TimelineRecordingContentView.js:

(WebInspector.TimelineRecordingContentView.prototype._update):
Don't constantly update when this tab is not in the foreground.

5:14 PM Changeset in webkit [208831] by ap@apple.com
  • 4 edits in trunk

REGRESSION (r208455): LayoutTests swipe/pushState-cached-back-swipe.html and swipe/main-frame-pinning-requirement.html are failing
https://bugs.webkit.org/show_bug.cgi?id=164572

Reviewed by Tim Horton.

Tools:

  • WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::platformResetStateToConsistentValues):

Use the correct constant.

LayoutTests:

  • platform/mac-wk2/TestExpectations: Remove flakiness expectations.
5:02 PM Changeset in webkit [208830] by ggaren@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

UnlinkedCodeBlock should not have a starting line number
https://bugs.webkit.org/show_bug.cgi?id=164838

Reviewed by Mark Lam.

Here's how the starting line number in UnlinkedCodeBlock used to work:

(1) Assign the source code starting line number to the parser starting
line number.

(2) Assign (1) to the AST.

(3) Subtract (1) from (2) and assign to UnlinkedCodeBlock.

Then, when linking:

(4) Add (3) to (1).

This was an awesome no-op.

Generally, unlinked code is code that is not tied to any particular
web page or resource. So, it's inappropriate to think of it having a
starting line number.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::UnlinkedCodeBlock):

  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::recordParse):
(JSC::UnlinkedCodeBlock::hasCapturedVariables):
(JSC::UnlinkedCodeBlock::firstLine): Deleted.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):

  • runtime/CodeCache.h:

(JSC::generateUnlinkedCodeBlock):

4:59 PM Changeset in webkit [208829] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

ScriptExecutionContext::processMessagePortMessagesSoon() should only post task when necessary
https://bugs.webkit.org/show_bug.cgi?id=164812
<rdar://problem/29148465>

Reviewed by Geoffrey Garen.

ScriptExecutionContext::processMessagePortMessagesSoon() should only post task when necessary,
meaning when there is not already one pending.

  • dom/ScriptExecutionContext.cpp:

(WebCore::ScriptExecutionContext::processMessagePortMessagesSoon):
(WebCore::ScriptExecutionContext::dispatchMessagePortEvents):

  • dom/ScriptExecutionContext.h:
4:39 PM Changeset in webkit [208828] by Chris Dumez
  • 43 edits in trunk/Source/WebCore

Use more references in TreeScope / TreeScopeAdopter
https://bugs.webkit.org/show_bug.cgi?id=164836

Reviewed by Ryosuke Niwa.

Use more references in TreeScope / TreeScopeAdopter and avoid some
unnecessary null checks.

No new tests, no Web-exposed behavior change.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::insertBefore):
(WebCore::ContainerNode::replaceChild):
(WebCore::ContainerNode::removeBetween):
(WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck):
(WebCore::ContainerNode::parserAppendChild):

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::addChildNodesToDeletionQueue):

  • dom/Document.cpp:

(WebCore::Document::adoptNode):
(WebCore::Document::moveNodeIteratorsToNewDocument):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::didMoveToNewDocument):
(WebCore::Element::addShadowRoot):
(WebCore::Element::removeShadowRoot):
(WebCore::Element::setAttributeNode):
(WebCore::Element::setAttributeNodeNS):
(WebCore::Element::ensureAttr):

  • dom/Element.h:
  • dom/Node.cpp:

(WebCore::Node::didMoveToNewDocument):

  • dom/Node.h:
  • dom/NodeRareData.h:

(WebCore::NodeListsNodeData::adoptDocument):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::TreeScope):
(WebCore::TreeScope::setParentTreeScope):
(WebCore::TreeScope::adoptIfNeeded):

  • dom/TreeScope.h:

(WebCore::TreeScope::documentScope):
(WebCore::TreeScope::setDocumentScope):

  • dom/TreeScopeAdopter.cpp:

(WebCore::TreeScopeAdopter::moveTreeToNewScope):
(WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument):
(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::updateTreeScope):
(WebCore::TreeScopeAdopter::moveNodeToNewDocument):

  • dom/TreeScopeAdopter.h:

(WebCore::TreeScopeAdopter::ensureDidMoveToNewDocumentWasCalled):
(WebCore::TreeScopeAdopter::TreeScopeAdopter):

  • html/FormAssociatedElement.cpp:

(WebCore::FormAssociatedElement::didMoveToNewDocument):

  • html/FormAssociatedElement.h:
  • html/HTMLFieldSetElement.cpp:

(WebCore::HTMLFieldSetElement::didMoveToNewDocument):

  • html/HTMLFieldSetElement.h:
  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::didMoveToNewDocument):

  • html/HTMLFormControlElement.h:
  • html/HTMLFormElement.cpp:

(WebCore::HTMLFormElement::didMoveToNewDocument):

  • html/HTMLFormElement.h:
  • html/HTMLImageElement.cpp:

(WebCore::HTMLImageElement::didMoveToNewDocument):

  • html/HTMLImageElement.h:
  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::didMoveToNewDocument):

  • html/HTMLInputElement.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::didMoveToNewDocument):

  • html/HTMLMediaElement.h:
  • html/HTMLObjectElement.cpp:

(WebCore::HTMLObjectElement::didMoveToNewDocument):

  • html/HTMLObjectElement.h:
  • html/HTMLPictureElement.cpp:

(WebCore::HTMLPictureElement::didMoveToNewDocument):

  • html/HTMLPictureElement.h:
  • html/HTMLPlugInImageElement.cpp:

(WebCore::HTMLPlugInImageElement::didMoveToNewDocument):

  • html/HTMLPlugInImageElement.h:
  • html/HTMLTemplateElement.cpp:

(WebCore::HTMLTemplateElement::didMoveToNewDocument):

  • html/HTMLTemplateElement.h:
  • html/HTMLVideoElement.cpp:

(WebCore::HTMLVideoElement::didMoveToNewDocument):

  • html/HTMLVideoElement.h:
  • html/ImageDocument.cpp:

(WebCore::ImageDocumentElement::didMoveToNewDocument):

  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::didMoveToNewDocument):

  • svg/SVGImageElement.h:
  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::didMoveToNewDocument):

  • svg/SVGSVGElement.h:
4:37 PM Changeset in webkit [208827] by Jon Davis
  • 2 edits in trunk/Source/WebCore

Added Web App Manifest to the Feature Status page.
https://bugs.webkit.org/show_bug.cgi?id=162675

Reviewed by Timothy Hatcher.

  • features.json:
4:35 PM Changeset in webkit [208826] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Use more references for Document::removeFocusedNodeOfSubtree()
https://bugs.webkit.org/show_bug.cgi?id=164839

Reviewed by Andreas Kling.

Use more references for Document::removeFocusedNodeOfSubtree().

No new tests, no Web-exposed behavior change.

  • dom/Document.cpp:

(WebCore::isNodeInSubtree):
(WebCore::Document::removeFocusedNodeOfSubtree):
(WebCore::Document::nodeChildrenWillBeRemoved):
(WebCore::Document::nodeWillBeRemoved):
(WebCore::Document::removeFocusNavigationNodeOfSubtree):
(WebCore::Document::removeFullScreenElementOfSubtree):

  • dom/Document.h:
  • dom/Element.cpp:

(WebCore::Element::removeShadowRoot):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::clear):

4:35 PM Changeset in webkit [208825] by Brent Fulgham
  • 3 edits
    4 adds in trunk

Clear track client when removing a track
https://bugs.webkit.org/show_bug.cgi?id=164842
<rdar://problem/29213621>

Reviewed by Eric Carlson.

Source/WebCore:

Call 'clearClient' when removing a track from an HTMLMediaElement.

Test: media/track/audio-track-add-remove.html

media/track/video-track-add-remove.html

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::removeAudioTrack): Call 'clearClient'
(WebCore::HTMLMediaElement::removeVideoTrack): Ditto.

LayoutTests:

  • media/track/audio-track-add-remove-expected.txt: Added.
  • media/track/audio-track-add-remove.html: Added.
  • media/track/video-track-add-remove-expected.txt: Added.
  • media/track/video-track-add-remove.html: Added.
4:24 PM Changeset in webkit [208824] by Yusuke Suzuki
  • 43 edits in trunk

[ES6][WebCore] Change ES6_MODULES compile time flag to runtime flag
https://bugs.webkit.org/show_bug.cgi?id=164827

Reviewed by Ryosuke Niwa.

.:

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

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:

Source/WebCore:

Use Settings.in. And intentionally do not use RuntimeEnabledFeatures.
According to the pointer lock's issue[1], we should use Settings.

[1]: https://bugs.webkit.org/show_bug.cgi?id=163801

  • Configurations/FeatureDefines.xcconfig:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::determineScriptType):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • page/Settings.in:

A bit unfortunate thing is that the setter is named setEs6ModulesEnabled
if we use es6ModulesEnabled here.

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:
  • WebView/WebPreferenceKeysPrivate.h:
  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences es6ModulesEnabled]):
(-[WebPreferences setES6ModulesEnabled:]):

  • WebView/WebPreferencesPrivate.h:
  • WebView/WebView.mm:

(-[WebView _preferencesChanged:]):

Source/WebKit/win:

  • Interfaces/IWebPreferencesPrivate.idl:
  • WebPreferenceKeysPrivate.h:
  • WebPreferences.cpp:

(WebPreferences::setES6ModulesEnabled):
(WebPreferences::es6ModulesEnabled):

  • WebPreferences.h:
  • WebView.cpp:

(WebView::notifyPreferencesChanged):

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • Shared/WebPreferencesDefinitions.h:

Annotated ES6 Modules option with DEFAULT_EXPERIMENTAL_FEATURES_ENABLED.

  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetES6ModulesEnabled):
(WKPreferencesGetES6ModulesEnabled):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

Enabled ES6 Modules in test runners.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetWebPreferencesToConsistentValues):

  • DumpRenderTree/win/DumpRenderTree.cpp:

(resetWebPreferencesToConsistentValues):

  • Scripts/webkitperl/FeatureList.pm:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setES6ModulesEnabled):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

4:22 PM Changeset in webkit [208823] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, remove outdated comment about using PassRefPtr.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::parserAppendChild):

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

Unreviewed, roll out r208811. It's not sound.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):
(JSC::FTL::DFG::LowerDFGToB3::splatWordsIfMutatorIsFenced): Deleted.

3:34 PM Changeset in webkit [208821] by keith_miller@apple.com
  • 9 edits
    1 add in trunk/Source/JavaScriptCore

Wasm function parser should use template functions for each binary and unary opcode
https://bugs.webkit.org/show_bug.cgi?id=164835

Reviewed by Mark Lam.

This patch changes the wasm function parser to call into a template specialization
for each binary/unary opcode. This change makes it easier to have custom implementations
of various opcodes. It is also, in theory a speedup since it does not require switching
on the opcode twice.

  • CMakeLists.txt:
  • DerivedSources.make:
  • wasm/WasmB3IRGenerator.cpp:

(): Deleted.

  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::binaryCase):
(JSC::Wasm::FunctionParser<Context>::unaryCase):
(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmValidate.cpp:
  • wasm/generateWasm.py:

(isBinary):
(isSimple):

  • wasm/generateWasmB3IRGeneratorInlinesHeader.py: Added.

(generateSimpleCode):

  • wasm/generateWasmOpsHeader.py:

(opcodeMacroizer):

  • wasm/generateWasmValidateInlinesHeader.py:
3:32 PM Changeset in webkit [208820] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking inspector/worker/debugger-pause.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=164833

Unreviewed test gardening.

  • platform/mac/TestExpectations:
3:18 PM Changeset in webkit [208819] by mark.lam@apple.com
  • 6 edits in trunk/Source/JavaScriptCore

ExceptionFuzz functions should use its client's ThrowScope.
https://bugs.webkit.org/show_bug.cgi?id=164834

Reviewed by Geoffrey Garen.

This is because ExceptionFuzz's purpose is to throw exceptions from its client at
exception check sites. Using the client's ThrowScope solves 2 problems:

  1. If ExceptionFuzz instantiates its own ThrowScope, the simulated throw will be mis-attributed to ExceptionFuzz when it should be attributed to its client.
  1. One way exception scope verification works is by having ThrowScopes assert that there are no unchecked simulated exceptions when the ThrowScope is instantiated. However, ExceptionFuzz necessarily works by inserting doExceptionFuzzingIfEnabled() in between a ThrowScope that simulated a throw and an exception check. If we declare a ThrowScope in ExceptionFuzz's code, we will be instantiating the ThrowScope between the point where a simulated throw occurs and where the needed exception check can occur. Hence, having ExceptionFuzz instantiate its own ThrowScope will fail exception scope verification every time.

Changing ExceptionFuzz to use its client's ThrowScope resolves both problems.

Also fixed the THROW() macro in CommonSlowPaths.cpp to use the ThrowScope that
already exists in every slow path function instead of creating a new one.

  • jit/JITOperations.cpp:
  • llint/LLIntSlowPaths.cpp:
  • runtime/CommonSlowPaths.cpp:
  • runtime/ExceptionFuzz.cpp:

(JSC::doExceptionFuzzing):

  • runtime/ExceptionFuzz.h:

(JSC::doExceptionFuzzingIfEnabled):

3:17 PM Changeset in webkit [208818] by Simon Fraser
  • 2 edits in trunk/Tools

Hard to write reliable UIScriptController scrollingTreeAsText tests
https://bugs.webkit.org/show_bug.cgi?id=164764

Reviewed by Wenson Hsieh.

Fix one cause of flakiness by resetting the WKWebView's UIScrollView scale
and scroll position between tests.

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

3:06 PM Changeset in webkit [208817] by rniwa@webkit.org
  • 9 edits
    2 adds in trunk

slotchange event should bubble and dispatched once
https://bugs.webkit.org/show_bug.cgi?id=164770

Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Rebaselined the test. Some test cases fail as they do on Chrome because it's testing an outdated version of the spec.
Will fix the test upstream later.

  • web-platform-tests/shadow-dom/slotchange-event-expected.txt:

Source/WebCore:

Updated our implementation of slotchange event to match the latest specification after:
https://github.com/w3c/webcomponents/issues/571
https://dom.spec.whatwg.org/#signal-a-slot-change
The new behavior matches that of Google Chrome Canary.

In the latest specification, we no longer dispatch a separate event on ancestor slots.
Instead, we fire a single slotchange event to which a new node is assigned or from which
an existing assigned node is removed. This patch mostly removes the code that existed to
locate ancestor slot elements, and makes the event bubble up by changing a single line in
HTMLSlotElement::dispatchSlotChangeEvent.

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

  • dom/ShadowRoot.h:
  • dom/SlotAssignment.cpp:

(WebCore::recursivelyFireSlotChangeEvent): Deleted.
(WebCore::SlotAssignment::didChangeSlot): Removed ChangeType from the arguments since we
no longer notify the ancestor slot elements.
(WebCore::SlotAssignment::hostChildElementDidChange):

  • dom/SlotAssignment.h:

(WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost):
(WebCore::ShadowRoot::didChangeDefaultSlot):
(WebCore::ShadowRoot::hostChildElementDidChangeSlotAttribute):
(WebCore::ShadowRoot::innerSlotDidChange): Deleted.

  • html/HTMLDetailsElement.cpp:

(WebCore::DetailsSlotAssignment::hostChildElementDidChange):

  • html/HTMLSlotElement.cpp:

(WebCore::HTMLSlotElement::dispatchSlotChangeEvent): Make slotchange event bubble.

LayoutTests:

  • fast/shadow-dom/slotchange-event-bubbling-expected.txt: Added.
  • fast/shadow-dom/slotchange-event-bubbling.html: Added.
3:05 PM Changeset in webkit [208816] by Simon Fraser
  • 6 edits
    2 copies
    6 moves
    1 add in trunk

UIScriptController: script with no async tasks fails if an earlier script registered a callback
https://bugs.webkit.org/show_bug.cgi?id=164762

Reviewed by Wenson Hsieh.

Tools:

Make TestRunner::callUIScriptCallback() async in DumpRenderTree to match WebKitTestRunner behavior.
This fixes ui-side-script-with-callback.html in WK1, which failed because the second runUIScript()
would occur inside the completion callback from the first. This no longer happens.

  • DumpRenderTree/TestRunner.cpp:

(TestRunner::callUIScriptCallback):

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

LayoutTests:

Move the tests that use runUIScript into their own directory for easier TestExpectations management,
and fix TestExpectations to match.

  • TestExpectations:
  • fast/harness/uiscriptcontroller/concurrent-ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts-expected.txt.
  • fast/harness/uiscriptcontroller/concurrent-ui-side-scripts.html: Renamed from LayoutTests/fast/harness/concurrent-ui-side-scripts.html.
  • fast/harness/uiscriptcontroller/ui-side-script-unregister-callback-expected.txt: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt.
  • fast/harness/uiscriptcontroller/ui-side-script-unregister-callback.html: Copied from LayoutTests/fast/harness/ui-side-script-unregister-callback.html.
  • fast/harness/uiscriptcontroller/ui-side-script-with-callback-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback-expected.txt.
  • fast/harness/uiscriptcontroller/ui-side-script-with-callback.html: Renamed from LayoutTests/fast/harness/ui-side-script-unregister-callback.html.
  • fast/harness/uiscriptcontroller/ui-side-scripts-expected.txt: Renamed from LayoutTests/fast/harness/ui-side-scripts-expected.txt.
  • fast/harness/uiscriptcontroller/ui-side-scripts.html: Renamed from LayoutTests/fast/harness/ui-side-scripts.html.
  • platform/mac/TestExpectations:
2:53 PM Changeset in webkit [208815] by commit-queue@webkit.org
  • 6 edits in trunk

REGRESSION (r207162): [debug] loader/stateobjects LayoutTests timing out
https://bugs.webkit.org/show_bug.cgi?id=163307

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-16
Reviewed by Alexey Proskuryakov.

Source/WebCore:

  • platform/URLParser.cpp:

Removed some unnecessary and redundant assertions in iterators, which are inside inner loops.
(WebCore::URLParser::parsedDataView):
(WebCore::URLParser::parse):
Add a parsedDataView that just returns a UChar instead of a StringView for 1-length views.
This speeds up debug builds considerably, which spent most of the time parsing the path
making and destroying these 1-length StringViews. It can't hurt release builds.

  • platform/URLParser.h:

LayoutTests:

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:35 PM Changeset in webkit [208814] by achristensen@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed gardening.
https://bugs.webkit.org/show_bug.cgi?id=163127

  • platform/ios-simulator/TestExpectations:

Unskip passing tests.

2:30 PM Changeset in webkit [208813] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Micro-optimize ContainerNode::removeBetween()
https://bugs.webkit.org/show_bug.cgi?id=164832

Reviewed by Sam Weinig.

Micro-optimize ContainerNode::removeBetween() by updating pointers only
when strictly needed and reducing branching.

No new tests, no Web-exposed behavior change.

  • dom/ContainerNode.cpp:

(WebCore::ContainerNode::removeBetween):

2:28 PM Changeset in webkit [208812] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Micro-optimize AtomicHTMLToken::initializeAttributes()
https://bugs.webkit.org/show_bug.cgi?id=164826

Reviewed by Sam Weinig.

Micro-optimize AtomicHTMLToken::initializeAttributes():

  • Use uncheckedAppend() instead of append() since we reserve capacity before the loop.
  • Use a more efficient findAttribute() that only checks the local names since this function only adds attributes that have to namespace or prefix.

No new tests, no Web-exposed behavior change.

  • html/parser/AtomicHTMLToken.h:

(WebCore::hasAttribute):
(WebCore::AtomicHTMLToken::initializeAttributes):

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

Slight Octane regression from concurrent GC's eager object zero-fill
https://bugs.webkit.org/show_bug.cgi?id=164823

Reviewed by Geoffrey Garen.

During concurrent GC, we need to eagerly zero-fill objects we allocate prior to
executing the end-of-allocation fence. This causes some regressions. This is an attempt
to fix those regressions by making them conditional on whether the mutator is fenced.

This is a slight speed-up on raytrace and boyer, and hopefully it will fix the
regression.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::splatWordsIfMutatorIsFenced):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):

2:12 PM Changeset in webkit [208810] by Joseph Pecoraro
  • 3 edits in trunk/LayoutTests

Fix typo in LayoutTest.

Unreviewed follow-up comment.

  • inspector/page/setEmulatedMedia-expected.txt:
  • inspector/page/setEmulatedMedia.html:
1:10 PM Changeset in webkit [208809] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Another build fix.

  • platform/mac/WebPlaybackSessionInterfaceMac.mm:
1:05 PM Changeset in webkit [208808] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Fix exception scope checking in JSGlobalObject.cpp.
https://bugs.webkit.org/show_bug.cgi?id=164831

Reviewed by Saam Barati.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • Use a CatchScope here because we don't ever expect JSGlobalObject initialization to fail with errors.

(JSC::JSGlobalObject::put):

  • Fix exception check requirements.
1:02 PM Changeset in webkit [208807] by Yusuke Suzuki
  • 2 edits in trunk/LayoutTests

js/dom/domjit-function-get-element-by-id-licm.html and js/dom/domjit-function-get-element-by-id-changed.html are flaky timeouts
https://bugs.webkit.org/show_bug.cgi?id=164797

Reviewed by Saam Barati.

The performance of the both tests rely on PureGetById.
However, PureGetById is rolled out temporary[1], these tests become timed out.
This patch makes the both tests [ PASS TIMEOUT ] until PureGetById patch[1] is
relanded or impure object optimization patch[2] is landed.

[1]: https://bugs.webkit.org/show_bug.cgi?id=163305
[2]: https://bugs.webkit.org/show_bug.cgi?id=164175

1:00 PM Changeset in webkit [208806] by clopez@igalia.com
  • 2 edits in trunk/Source/WTF

[JSC] Build broken for 32-bit x86 after r208306 with GCC 4.9
https://bugs.webkit.org/show_bug.cgi?id=164588

Reviewed by Mark Lam.

Provide assembly for executing the cpuid instruction when compiling
in PIC mode with the GCC 4.9 EBX on 32-bit x86.

Note that the values returned by cpuid here are not used. The purpose
of calling this instruction is to force the CPU to complete and sync
any buffered modifications on registers, memory or flags before
fetching and executing the next instruction.

  • wtf/Atomics.h:

(WTF::x86_cpuid):

12:58 PM Changeset in webkit [208805] by Beth Dakin
  • 2 edits in trunk/Source/WebCore

Attempted build fix.

  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::durationChanged):
(WebCore::WebPlaybackSessionInterfaceMac::currentTimeChanged):
(WebCore::WebPlaybackSessionInterfaceMac::rateChanged):
(WebCore::WebPlaybackSessionInterfaceMac::beginScrubbing):
(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):
(WebCore::WebPlaybackSessionInterfaceMac::audioMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::legibleMediaSelectionOptionsChanged):
(WebCore::WebPlaybackSessionInterfaceMac::ensureControlsManager):

12:43 PM Changeset in webkit [208804] by beidson@apple.com
  • 7 edits in trunk/Source/WebCore

Re-indent some old headers.

Rubberstamped by Alex Christensen

No new tests (No behavior change).

(Also #pragma once a few of them)

  • loader/DocumentLoader.h:
  • loader/FrameLoaderClient.h:
  • page/Frame.h:
  • page/FrameTree.h:
  • page/PageGroup.h:
  • platform/Cursor.h:
12:26 PM Changeset in webkit [208803] by Darin Adler
  • 2 edits in trunk/Source/WebCore

REGRESSION (r208672): Crash in com.apple.WebCore: WebCore::DatabaseContext::stopDatabases + 34
https://bugs.webkit.org/show_bug.cgi?id=164820

Reviewed by Sam Weinig.

Crash seen in existing regression tests; reliably reproducible in some test configurations.

  • Modules/webdatabase/DatabaseContext.cpp:

(WebCore::DatabaseContext::contextDestroyed): Call through to base class before calling
stopDatabases, since that might cause this object to be deallocated.
(WebCore::DatabaseContext::stopDatabases): Be sure not to clear the possibly-last reference
to this database context until after all code that accesses data members, since it might
cause this object to be deallocated.

12:23 PM Changeset in webkit [208802] by Beth Dakin
  • 5 edits in trunk/Source/WebCore

Implement WebPlaybackControlsManager
https://bugs.webkit.org/show_bug.cgi?id=164789
-and corresponding-
rdar://problem/29275082

Reviewed by Dan Bernstein.

  • platform/mac/WebPlaybackControlsManager.h:
  • platform/mac/WebPlaybackControlsManager.mm:

(-[WebPlaybackControlsManager dealloc]):
(-[WebPlaybackControlsManager cancelThumbnailAndAudioAmplitudeSampleGeneration]):
(-[WebPlaybackControlsManager generateFunctionBarThumbnailsForTimes:size:completionHandler:]):
(-[WebPlaybackControlsManager generateFunctionBarAudioAmplitudeSamples:completionHandler:]):
(-[WebPlaybackControlsManager canBeginFunctionBarScrubbing]):
(-[WebPlaybackControlsManager beginFunctionBarScrubbing]):
(-[WebPlaybackControlsManager endFunctionBarScrubbing]):
(-[WebPlaybackControlsManager audioFunctionBarMediaSelectionOptions]):
(-[WebPlaybackControlsManager setAudioFunctionBarMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentAudioFunctionBarMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentAudioFunctionBarMediaSelectionOption:]):
(-[WebPlaybackControlsManager legibleFunctionBarMediaSelectionOptions]):
(-[WebPlaybackControlsManager setLegibleFunctionBarMediaSelectionOptions:]):
(-[WebPlaybackControlsManager currentLegibleFunctionBarMediaSelectionOption]):
(-[WebPlaybackControlsManager setCurrentLegibleFunctionBarMediaSelectionOption:]):
(mediaSelectionOptions):
(-[WebPlaybackControlsManager setAudioMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager setLegibleMediaSelectionOptions:withSelectedIndex:]):
(-[WebPlaybackControlsManager webPlaybackSessionInterfaceMac]):
(-[WebPlaybackControlsManager setWebPlaybackSessionInterfaceMac:]):
(-[WebPlaybackControlsManager togglePlayback]):
(-[WebPlaybackControlsManager setPlaying:]):
(-[WebPlaybackControlsManager isPlaying]):

  • platform/mac/WebPlaybackSessionInterfaceMac.h:
  • platform/mac/WebPlaybackSessionInterfaceMac.mm:

(WebCore::WebPlaybackSessionInterfaceMac::durationChanged):
(WebCore::WebPlaybackSessionInterfaceMac::currentTimeChanged):
(WebCore::WebPlaybackSessionInterfaceMac::rateChanged):
(WebCore::WebPlaybackSessionInterfaceMac::playBackControlsManager):

12:18 PM Changeset in webkit [208801] by jiewen_tan@apple.com
  • 3 edits
    20 adds in trunk

Add more tests for SubtleCrypto::importKey and SubtleCrypto::exportKey
https://bugs.webkit.org/show_bug.cgi?id=164815
<rdar://problem/29281660>

Reviewed by Brent Fulgham.

Source/WebCore:

Tests: crypto/subtle/aes-import-jwk-key-export-jwk-key.html

crypto/subtle/aes-import-jwk-key-export-raw-key.html
crypto/subtle/aes-import-raw-key-export-jwk-key.html
crypto/subtle/aes-import-raw-key-export-raw-key.html
crypto/subtle/hmac-import-jwk-key-export-jwk-key.html
crypto/subtle/hmac-import-jwk-key-export-raw-key.html
crypto/subtle/hmac-import-raw-key-export-jwk-key.html
crypto/subtle/hmac-import-raw-key-export-raw-key.html
crypto/subtle/rsa-import-jwk-key-export-jwk-key-private.html
crypto/subtle/rsa-import-jwk-key-export-jwk-key-public.html

  • crypto/mac/CryptoKeyRSAMac.cpp:

(WebCore::CryptoKeyRSA::create):
Add a comment.

LayoutTests:

  • crypto/subtle/aes-import-jwk-key-export-jwk-key.html: Added.
  • crypto/subtle/aes-import-jwk-key-export-raw-key.html: Added.
  • crypto/subtle/aes-import-raw-key-export-jwk-key.html: Added.
  • crypto/subtle/aes-import-raw-key-export-raw-key.html: Added.
  • crypto/subtle/hmac-import-jwk-key-export-jwk-key.html: Added.
  • crypto/subtle/hmac-import-jwk-key-export-raw-key.html: Added.
  • crypto/subtle/hmac-import-raw-key-export-jwk-key.html: Added.
  • crypto/subtle/hmac-import-raw-key-export-raw-key.html: Added.
  • crypto/subtle/rsa-import-jwk-key-export-jwk-key-private.html: Added.
  • crypto/subtle/rsa-import-jwk-key-export-jwk-key-public.html: Added.
12:09 PM Changeset in webkit [208800] by mitz@apple.com
  • 8 copies
    1 add in releases/Apple/Safari Technology Preview 18

Added a tag for Safari Technology Preview release 18.

11:13 AM Changeset in webkit [208799] by Simon Fraser
  • 4 edits in trunk/Source/WebKit2

Add logging support to VisibleContentRectUpdateInfo
https://bugs.webkit.org/show_bug.cgi?id=164825

Reviewed by Zalan Bujtas.

Add TextStream output to VisibleContentRectUpdateInfo. Just piping it into a logging
stream does single-line output, so also make a convenience dump() function that will
product multiline output. Result look like:

(VisibleContentRectUpdateInfo

(lastLayerTreeTransactionID 54)
(exposedContentRect (523.44,1258.63) width=676.20 height=901.60)
(unobscuredContentRect (523.44,1293.41) width=676.20 height=866.82)
(unobscuredRectInScrollViewCoordinates (0,39.50) width=768 height=984.50)
(customFixedPositionRect (219.64,935) width=980 height=1225)
(obscuredInset width=0 height=39.50)
(scale 1.14)
(inStableState 0)
(timestamp 736446.61)
(verticalVelocity -11.36))

  • Shared/VisibleContentRectUpdateInfo.cpp:

(WebKit::VisibleContentRectUpdateInfo::dump):
(WebKit::operator<<):

  • Shared/VisibleContentRectUpdateInfo.h:
  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

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

Updating TestExpectations for two http/tests/security/module-crossorigin tests.
https://bugs.webkit.org/show_bug.cgi?id=164539

Unreviewed test gardening.

10:08 AM Changeset in webkit [208797] by Antti Koivisto
  • 4 edits in trunk/Source/WebCore

Remove getMutableCachedPseudoStyle
https://bugs.webkit.org/show_bug.cgi?id=164819

Reviewed by Zalan Bujtas.

It is only used by styleForFirstLetter.

  • rendering/RenderBlock.cpp:

(WebCore::styleForFirstLetter):

Clone the original style before mutations.

(WebCore::RenderBlock::updateFirstLetterStyle):
(WebCore::RenderBlock::createFirstLetterRenderer):

Since we have a clone already just move it in place.

  • rendering/RenderElement.cpp:

(WebCore::RenderElement::getMutableCachedPseudoStyle): Deleted.

  • rendering/RenderElement.h:
10:07 AM Changeset in webkit [208796] by dbates@webkit.org
  • 4 edits
    1 add in trunk/LayoutTests

Make test sandbox-should-not-persist-on-navigation.html more representative of real-world scenario
https://bugs.webkit.org/show_bug.cgi?id=164752

Reviewed by Brent Fulgham.

Modify the test http-0.9/sandbox-should-not-persist-on-navigation.html so that it loads
a document on a default port using HTTP 0.9 to trigger the HTTP 0.9 sandbox as this
is more representative of a real-world scenario where we want a sandbox to be applied
and is the scenario that is currently covered by our HTTP 0.9 sandbox machinery.

Currently this test makes use of the pre r208549 behavior where the HTTP 0.9 sandbox
was applied to a document if one of its subresources loaded on a non-default port
using HTTP 0.9 in addition to the behavior where the sandbox is applied to a document
that loads on a default port using HTTP 0.9. Following r208549 we no longer apply the
sandbox to the document for the former case as this did not improve security much, if
any. The latter case is more representative of a real-world scenario where we want to
apply the sandbox policy and reflects our behavior following r208549.

  • http/tests/security/http-0.9/resources/nph-sandbox-should-not-persist-on-navigation.pl: Added.
  • http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation-expected.txt:
  • http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation.html:
  • platform/wk2/TestExpectations: Skip the HTTP-0.9 tests in WebKit2 as it uses internals.registerDefaultPortForProtocol().
10:00 AM Changeset in webkit [208795] by Ryan Haddad
  • 3 edits
    2 deletes in trunk

Unreviewed, rolling out r208770.

The test added with this change is timing out on mac-wk1.

Reverted changeset:

"UIScriptController: script with no async tasks fails if an
earlier script registered a callback"
https://bugs.webkit.org/show_bug.cgi?id=164762
http://trac.webkit.org/changeset/208770

9:29 AM Changeset in webkit [208794] by matthew_hanson@apple.com
  • 5 edits in trunk/Source

Versioning.

9:18 AM Changeset in webkit [208793] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-603.1.13

New tag.

8:19 AM Changeset in webkit [208792] by Simon Fraser
  • 2 edits in trunk/LayoutTests

Fix typo in bug url.

  • platform/mac/TestExpectations:
8:18 AM Changeset in webkit [208791] by keith_miller@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, ARM build fix.

  • b3/B3LowerToAir.cpp:

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

6:00 AM Changeset in webkit [208790] by commit-queue@webkit.org
  • 7 edits in trunk

[Readable Streams API] Implement ReadableByteStreamController close()
https://bugs.webkit.org/show_bug.cgi?id=164413

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-11-16
Reviewed by Darin Adler.

Source/WebCore:

Implemented close() method of ReadableByteStreamController.

Updated test expectations for close() tests and added tests
to ensure errors are thrown in various cases defined by spec.

  • Modules/streams/ReadableByteStreamController.js:

(close): Added.

  • Modules/streams/ReadableByteStreamInternals.js:

(readableByteStreamControllerClose): Added.

  • bindings/js/WebCoreBuiltinNames.h: Added bytesFilled.

LayoutTests:

Updated test expectations for close() tests and added tests
to ensure errors are thrown in various cases defined by spec.

  • streams/readable-byte-stream-controller.js: Updated.
4:00 AM Changeset in webkit [208789] by Philippe Normand
  • 2 edits in trunk/Source/WebCore

[GStreamer][GL] build broken when using gst-plugins-bad from git
https://bugs.webkit.org/show_bug.cgi?id=164776

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext): The
GStreamer GL context GType was renamed, add an ifdef taking this
into account.

3:39 AM Changeset in webkit [208788] by Yusuke Suzuki
  • 31 edits
    5 copies
    136 adds in trunk

[ES6] Integrate ES6 Modules into WebCore
https://bugs.webkit.org/show_bug.cgi?id=148897

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch introduces ES6 Modules into WebCore. We integrate JSC's JSModuleLoader into WebCore.
JSC constructs the module loader pipeline by the chains of the promises. To handle this,
the following components are added.

  1. CachedModuleScript

CachedModuleScript wraps the promise based JSModuleLoader pipeline and offers
similar APIs to CachedScript. ScriptElement and PendingScript interact with
CachedModuleScript when the script tag is the module tag instead of CachedScript.
ScriptElement and PendingScript will receive the notification from
CachedModuleScript by implementing CachedModuleScriptClient.

  1. ScriptModuleLoader

This is the module loader instantiated per document. It manages fetching and
offers the callbacks for the JSC's JSModuleLoader implementation. ScriptModuleLoader
will fetch the resource by creating CachedModuleScriptLoader per resource. ScriptModuleLoader
will receive the notification by implementing CachedModuleScriptLoaderClient. When the
resource is fetched, the module loader will drive the promise resolve/reject chain.

  1. CachedModuleScriptLoader

This fetches the resource by using CachedScript. Using CachedScript means that it
automatically reports the resource to the inspector. CachedModuleScriptLoader notify to
ScriptModuleLoader when the resource is fetched.

One tricky point is that the fetch requests issued from one module-graph should share the same
nonce, crossorigin attributes etc.

Here, we wrote the module graph like A -> B (A depends on B).

<script tag> -> A -> B -> C -> D

When fetching A, B, C, and D modules, we need to set the same nonce, crossorigin etc. configuration
derived from the original script tag. So per module-graph information should be shared throughout
the module loader pipeline. To do so, JSC's module loader implementation can take the value called
initiator. Since the loader will propagate & share this initiator throughout the pipeline,
we can transfer and share some metadata. Currently, we pass the JSWrapper of the script tag as the
initiator. Each fetch request is created by using this initiator script element.

More integration into the inspector should be done in the subsequent patch.

  • CMakeLists.txt:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/CachedModuleScript.cpp: Added.

CachedModuleScript offers similar interface to CachedScript to make ScriptElement things easier. It encapsulates the
detail of the JSC JSModuleLoader that this module loader is driven by the chain of the promises. CachedModuleScript's
callbacks are called from the promise's handlers configured in ScriptController::loadModuleScript.
(WebCore::CachedModuleScript::create):
(WebCore::CachedModuleScript::CachedModuleScript):
(WebCore::CachedModuleScript::load):
(WebCore::CachedModuleScript::notifyLoadCompleted):
(WebCore::CachedModuleScript::notifyLoadFailed):
(WebCore::CachedModuleScript::notifyLoadWasCanceled):
(WebCore::CachedModuleScript::notifyClientFinished):
(WebCore::CachedModuleScript::addClient):
(WebCore::CachedModuleScript::removeClient):

  • bindings/js/CachedModuleScript.h: Added.

(WebCore::CachedModuleScript::moduleKey):
(WebCore::CachedModuleScript::error):
(WebCore::CachedModuleScript::wasCanceled):
(WebCore::CachedModuleScript::isLoaded):
(WebCore::CachedModuleScript::nonce):
(WebCore::CachedModuleScript::crossOriginMode):
Save nonce and crossorigin attributes when we start ScriptElement::prepareScript.

  • bindings/js/CachedModuleScriptClient.h: Copied from Source/WebCore/dom/LoadableScript.h.

(WebCore::CachedModuleScriptClient::~CachedModuleScriptClient):

  • bindings/js/CachedModuleScriptLoader.cpp: Added.

CachedModuleScriptLoader is responsible to fetching the resource for the module script. It uses propagated initiator
to create the request. This initiator is the JS wrapper of the script element issuing this fetching request. The name
initiator is derived from the request.setInitiator(). Once the resource is fetched, the fetcher will notify to the
client. Currently, ScriptModuleLoader implements this client interface.
(WebCore::CachedModuleScriptLoader::create):
(WebCore::CachedModuleScriptLoader::CachedModuleScriptLoader):
(WebCore::CachedModuleScriptLoader::~CachedModuleScriptLoader):
(WebCore::CachedModuleScriptLoader::load):
Create the request. We call ScriptElement::requestCachedScript to initiate a new fetching request. At that time,
nonce and crossorigin (and charset) attributes of this element are applied to the new request.
(WebCore::CachedModuleScriptLoader::notifyFinished):

  • bindings/js/CachedModuleScriptLoader.h: Copied from Source/WebCore/bindings/js/ScriptModuleLoader.h.
  • bindings/js/CachedModuleScriptLoaderClient.h: Copied from Source/WebCore/dom/LoadableScript.h.

(WebCore::CachedModuleScriptLoaderClient::~CachedModuleScriptLoaderClient):

  • bindings/js/CachedScriptSourceProvider.h:

(WebCore::CachedScriptSourceProvider::create):
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
(WebCore::makeSource):

  • bindings/js/JSBindingsAllInOne.cpp:
  • bindings/js/JSDOMBinding.cpp:

(WebCore::retrieveErrorMessage):
(WebCore::reportException):

  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSMainThreadExecState.h:

(WebCore::JSMainThreadExecState::loadModule):
(WebCore::JSMainThreadExecState::linkAndEvaluateModule):

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::loadModuleScriptInWorld):
(WebCore::ScriptController::loadModuleScript):
This just performs loading and not executing the module graph. Once the module graph is loaded, it is notified to
the given CachedModuleScript.
(WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
(WebCore::ScriptController::linkAndEvaluateModuleScript):
This executes the linking and evaluation of the already instantiated module graph. After loading the module graph,
we call this function for the module to evaluate it. This is called from ScriptElement::executeModuleScript.
(WebCore::ScriptController::evaluateModule):
Every time we evaluate the module, the ScriptModuleLoader::evaluate hook is called. So the loader calls this function
to actually evaluate the module.
(WebCore::jsValueToModuleKey):
(WebCore::ScriptController::setupModuleScriptHandlers):
The JSC's module loader is driven by the chain of the promise. So here, we convert this to CachedModuleScript /
CachedModuleScriptClient style and encapsulate the details. This encapsulation makes CachedModuleScript similar
to CachedScript and it makes things simple in the rest of WebCore. If the propagated error is already reported
to the inspector, we receive moduleLoaderAlreadyReportedErrorSymbol as the error value. So at that case, we
don't report it twice. If the rejection is caused due to the canceled fetching, moduleLoaderFetchingIsCanceledSymbol
appears as the error value. In that case, we will call CachedModuleScript::notifyLoadWasCanceled.
(WebCore::ScriptController::executeScript):

  • bindings/js/ScriptController.h:

(WebCore::ScriptController::moduleLoaderAlreadyReportedErrorSymbol):
(WebCore::ScriptController::moduleLoaderFetchingIsCanceledSymbol):

  • bindings/js/ScriptModuleLoader.cpp:

We use DeferredWrapper to resolve promises used for the module pipeline. Thus, once the active DOM objects are
suspended, the module loader propagation stops.
(WebCore::ScriptModuleLoader::~ScriptModuleLoader):
Clear the clients of the fetchers issued from this loader.
(WebCore::isRootModule):
(WebCore::ScriptModuleLoader::resolve):
Resolve the module specifier (that is written in import from "XXX") to the unique module key. We use URL
string as module key. The edge case is that the module is inlined one. In that case, we don't have any URL
for that. Instead of URL, we use symbol at that time.
(WebCore::ScriptModuleLoader::fetch):
Start fetching for the requested module. It returns the promise that is resolved when the fetching is done.
The loader creates the fetcher, and the fetcher start loading the resource. Once the fetcher loads the resource,
it notify to the loader through CachedModuleScriptLoaderClient interface. Since we pass the original script
element as the initiator here, the fetcher can use this initiator to create the request. While the result of
CachedResource has 3 variations (loaded, canceled, error occurred), Promise only tells us whether it is resolved
or rejected. When CachedModuleScript gets the result from the promise chain, it needs to know which the result is.
To transfer the canceled information, we reject the promise with the special symbol moduleLoaderAlreadyReportedErrorSymbol.
This offers the way to distinguish the canceled error from the other errors.
(WebCore::ScriptModuleLoader::evaluate):
This is the hook function that is called when JSC's JSModuleLoader attempts to execute each module.
(WebCore::ScriptModuleLoader::notifyFinished):
This function is called when the fetcher completes. We will resolve the promise with the result of the fetching.
The module loader pipeline is constructed as a chain of promises.
Rejecting a promise when some error occurs is important because the execution flow of
the promise chain is driven by "rejected" or "fulfilled" events.
If the promise is not rejected while error occurs, reject handler won't be executed
and all the subsequent promise chain will wait the result forever.
As a result, even if the error is already reported to the inspector elsewhere,
it should be propagated in the pipeline. For example, the error of loading
CachedResource is already reported to the inspector by the loader. But we still need
to reject the promise to propagate this error to the script element.
At that time, we don't want to report the same error twice. When we propagate the error
that is already reported to the inspector, we throw moduleLoaderAlreadyReportedErrorSymbol
symbol instead. By comparing the thrown error with this symbol, we can distinguish errors raised
when checking syntax of a module script from errors reported already.
In the reject handler of the promise, we only report a error that is not this symbol.
And mime type checking is done here since the module script always require this check.

  • bindings/js/ScriptModuleLoader.h:

(WebCore::ScriptModuleLoader::document): Deleted.

  • bindings/js/ScriptSourceCode.h:

(WebCore::ScriptSourceCode::ScriptSourceCode):

  • dom/CurrentScriptIncrementer.h:

(WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer):

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::error):
(WebCore::LoadableClassicScript::execute):
(WebCore::LoadableClassicScript::wasErrored): Deleted.

  • dom/LoadableClassicScript.h:
  • dom/LoadableModuleScript.cpp: Copied from Source/WebCore/dom/LoadableScript.h.

This is the derived class from LoadableScript. It is used for the script module graphs.
(WebCore::LoadableModuleScript::create):
(WebCore::LoadableModuleScript::LoadableModuleScript):
(WebCore::LoadableModuleScript::~LoadableModuleScript):
(WebCore::LoadableModuleScript::isLoaded):
(WebCore::LoadableModuleScript::error):
(WebCore::LoadableModuleScript::wasCanceled):
(WebCore::LoadableModuleScript::notifyFinished):
(WebCore::LoadableModuleScript::execute):

  • dom/LoadableModuleScript.h: Copied from Source/WebCore/dom/LoadableScript.h.

(isType):

  • dom/LoadableScript.h:

(WebCore::LoadableScript::isModuleScript):
(WebCore::LoadableScript::isModuleGraph): Deleted.

  • dom/PendingScript.cpp:

(WebCore::PendingScript::error):
(WebCore::PendingScript::wasErrored): Deleted.

  • dom/PendingScript.h:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::ScriptElement):
(WebCore::ScriptElement::determineScriptType):
(WebCore::ScriptElement::prepareScript):
prepareScript is aligned to whatwg spec: the last sequence to setup flags has one-on-one correspondence to
the spec now. And prepareScript recognizes the type="module" case and call the requestModuleScript to setup
the CachedModuleScript.
(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestModuleScript):
We use the nonce and crossorigin attributes at the time of preparing the script tag. To do so, we store the
above values in CachedModuleScript.
Since inlined module scripts does not have "src" attribute, it is also affected by Content Security Policy's
inline script rules.
(WebCore::ScriptElement::requestScriptWithCacheForModuleScript):
The module loader will construct the fetching request by calling this function. This should be here since we
would like to set this Element to the initiator of the request. And nonce and crossorigin attributes of this
script tag will be used.
(WebCore::ScriptElement::requestScriptWithCache):
(WebCore::ScriptElement::executeScript):
(WebCore::ScriptElement::executeModuleScript):
The entry point to execute the module graph. Since the module graph is beyond the multiple CachedScript code,
we have the different entry point from ScriptElement::executeScript.
(WebCore::ScriptElement::executeScriptAndDispatchEvent):
(WebCore::ScriptElement::executeScriptForScriptRunner):

  • dom/ScriptElement.h:

(WebCore::ScriptElement::scriptType):

  • html/parser/CSSPreloadScanner.cpp:

(WebCore::CSSPreloadScanner::emitRule):

  • html/parser/HTMLPreloadScanner.cpp:

(WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
According to the spec, the module tag ignores the "charset" attribute as the same to the worker's
importScript. But WebKit supports the "charset" for importScript intentionally. So to be consistent,
even for the module tags, we handle the "charset" attribute. We explicitly note about it in the preloader.
(WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):

  • html/parser/HTMLResourcePreloader.cpp:

(WebCore::PreloadRequest::resourceRequest):

  • html/parser/HTMLResourcePreloader.h:

(WebCore::PreloadRequest::PreloadRequest):

  • html/parser/HTMLScriptRunner.h:
  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setAsPotentiallyCrossOrigin):

  • xml/parser/XMLDocumentParser.cpp:

(WebCore::XMLDocumentParser::notifyFinished):

LayoutTests:

  • TestExpectations:
  • http/tests/misc/module-absolute-url-expected.txt: Added.
  • http/tests/misc/module-absolute-url.html: Added.
  • http/tests/misc/module-script-async-expected.txt: Added.
  • http/tests/misc/module-script-async.html: Added.
  • http/tests/misc/resources/module-absolute-url.js: Added.
  • http/tests/misc/resources/module-absolute-url2.js: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-and-scripthash-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-and-scripthash.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-basic-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-basic-blocked.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-blocked.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-ignore-unsafeinline-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-ignore-unsafeinline.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-enforced-policy-and-not-in-report-only-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-enforced-policy-and-not-in-report-only.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-invalidnonce.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-multiple-policies-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-multiple-policies.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-same-origin-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect-same-origin.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/module-scriptnonce-redirect.html: Added.
  • http/tests/security/contentSecurityPolicy/1.1/resources/module-scriptnonce-in-enforced-policy-and-not-in-report-only.php: Added.
  • http/tests/security/contentSecurityPolicy/1.1/resources/module-scriptnonce-in-one-enforced-policy-neither-in-another-enforced-policy-nor-report-policy.php: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked-in-external-script-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked-in-external-script.html: Added.
  • http/tests/security/contentSecurityPolicy/module-eval-blocked.html: Added.
  • http/tests/security/contentSecurityPolicy/resources/echo-module-script-src.pl: Added.
  • http/tests/security/contentSecurityPolicy/resources/multiple-iframe-module-test.js: Added.

(testPreescapedPolicy):
(testExperimentalPolicy):
(test):
(iframe.onload):
(testImpl):
(finishTesting):

  • http/tests/security/module-correct-mime-types-expected.txt: Added.
  • http/tests/security/module-correct-mime-types.html: Added.
  • http/tests/security/module-crossorigin-error-event-information-expected.txt: Added.
  • http/tests/security/module-crossorigin-error-event-information.html: Added.
  • http/tests/security/module-crossorigin-loads-correctly-credentials-expected.txt: Added.
  • http/tests/security/module-crossorigin-loads-correctly-credentials.html: Added.
  • http/tests/security/module-crossorigin-loads-omit-expected.txt: Added.
  • http/tests/security/module-crossorigin-loads-omit.html: Added.
  • http/tests/security/module-crossorigin-loads-same-origin-expected.txt: Added.
  • http/tests/security/module-crossorigin-loads-same-origin.html: Added.
  • http/tests/security/module-crossorigin-onerror-information-expected.txt: Added.
  • http/tests/security/module-crossorigin-onerror-information.html: Added.
  • http/tests/security/module-incorrect-mime-types-expected.txt: Added.
  • http/tests/security/module-incorrect-mime-types.html: Added.
  • http/tests/security/module-no-mime-type-expected.txt: Added.
  • http/tests/security/module-no-mime-type.html: Added.
  • http/tests/security/resources/cors-script.php:
  • http/tests/security/resources/module-local-script.js: Added.
  • js/dom/modules/module-and-dom-content-loaded-expected.txt: Added.
  • js/dom/modules/module-and-dom-content-loaded.html: Added.
  • js/dom/modules/module-and-window-load-expected.txt: Added.
  • js/dom/modules/module-and-window-load.html: Added.
  • js/dom/modules/module-async-and-window-load-expected.txt: Added.
  • js/dom/modules/module-async-and-window-load.html: Added.
  • js/dom/modules/module-document-write-expected.txt: Added.
  • js/dom/modules/module-document-write-src-expected.txt: Added.
  • js/dom/modules/module-document-write-src.html: Added.
  • js/dom/modules/module-document-write.html: Added.
  • js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-expected.txt: Added.
  • js/dom/modules/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.html: Added.
  • js/dom/modules/module-execution-error-should-be-propagated-to-onerror-expected.txt: Added.
  • js/dom/modules/module-execution-error-should-be-propagated-to-onerror.html: Added.
  • js/dom/modules/module-execution-order-inline-expected.txt: Added.
  • js/dom/modules/module-execution-order-inline.html: Added.
  • js/dom/modules/module-execution-order-mixed-expected.txt: Added.
  • js/dom/modules/module-execution-order-mixed-with-classic-scripts-expected.txt: Added.
  • js/dom/modules/module-execution-order-mixed-with-classic-scripts.html: Added.
  • js/dom/modules/module-execution-order-mixed.html: Added.
  • js/dom/modules/module-incorrect-relative-specifier-expected.txt: Added.
  • js/dom/modules/module-incorrect-relative-specifier.html: Added.
  • js/dom/modules/module-incorrect-tag-expected.txt: Added.
  • js/dom/modules/module-incorrect-tag.html: Added.
  • js/dom/modules/module-inline-current-script-expected.txt: Added.
  • js/dom/modules/module-inline-current-script.html: Added.
  • js/dom/modules/module-inline-dynamic-expected.txt: Added.
  • js/dom/modules/module-inline-dynamic.html: Added.
  • js/dom/modules/module-inline-simple-expected.txt: Added.
  • js/dom/modules/module-inline-simple.html: Added.
  • js/dom/modules/module-load-event-expected.txt: Added.
  • js/dom/modules/module-load-event-with-src-expected.txt: Added.
  • js/dom/modules/module-load-event-with-src.html: Added.
  • js/dom/modules/module-load-event.html: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point-dynamic-expected.txt: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point-dynamic.html: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point-expected.txt: Added.
  • js/dom/modules/module-load-same-module-from-different-entry-point.html: Added.
  • js/dom/modules/module-not-found-error-event-expected.txt: Added.
  • js/dom/modules/module-not-found-error-event-with-src-and-import-expected.txt: Added.
  • js/dom/modules/module-not-found-error-event-with-src-and-import.html: Added.
  • js/dom/modules/module-not-found-error-event-with-src-expected.txt: Added.
  • js/dom/modules/module-not-found-error-event-with-src.html: Added.
  • js/dom/modules/module-not-found-error-event.html: Added.
  • js/dom/modules/module-src-current-script-expected.txt: Added.
  • js/dom/modules/module-src-current-script.html: Added.
  • js/dom/modules/module-src-dynamic-expected.txt: Added.
  • js/dom/modules/module-src-dynamic.html: Added.
  • js/dom/modules/module-src-simple-expected.txt: Added.
  • js/dom/modules/module-src-simple.html: Added.
  • js/dom/modules/module-type-case-insensitive-expected.txt: Added.
  • js/dom/modules/module-type-case-insensitive.html: Added.
  • js/dom/modules/module-will-fire-beforeload-expected.txt: Added.
  • js/dom/modules/module-will-fire-beforeload.html: Added.
  • js/dom/modules/script-tests/module-document-write-src.js: Added.
  • js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror-throw.js: Added.
  • js/dom/modules/script-tests/module-execution-error-inside-dependent-module-should-be-propagated-to-onerror.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-2.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-cappuccino.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-cocoa.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-matcha.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-2.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cappuccino.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-cocoa.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts-matcha.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed-with-classic-scripts.js: Added.
  • js/dom/modules/script-tests/module-execution-order-mixed.js: Added.
  • js/dom/modules/script-tests/module-inline-dynamic.js: Added.

(export.default.Cocoa.prototype.taste):
(export.default.Cocoa):

  • js/dom/modules/script-tests/module-inline-simple.js: Added.

(export.default.Cocoa.prototype.taste):
(export.default.Cocoa):

  • js/dom/modules/script-tests/module-load-event-with-src.js: Added.
  • js/dom/modules/script-tests/module-load-same-module-from-different-entry-point.js: Added.
  • js/dom/modules/script-tests/module-not-found-error-event-with-src-and-import.js: Added.
  • js/dom/modules/script-tests/module-src-current-script.js: Added.
  • js/dom/modules/script-tests/module-src-dynamic-cocoa.js: Added.

(Cocoa.prototype.taste):
(Cocoa):

  • js/dom/modules/script-tests/module-src-dynamic.js: Added.
  • js/dom/modules/script-tests/module-src-simple-cocoa.js: Added.

(Cocoa.prototype.taste):
(Cocoa):

  • js/dom/modules/script-tests/module-src-simple.js: Added.
  • js/dom/modules/script-tests/module-will-fire-beforeload.js: Added.
1:08 AM Changeset in webkit [208787] by pvollan@apple.com
  • 2 edits in trunk/Tools

[Win] WebCore test is failing.
https://bugs.webkit.org/show_bug.cgi?id=164772

Reviewed by Brent Fulgham.

The value of CGRectInfinite is not the same on Windows as on Mac.

  • TestWebKitAPI/Tests/WebCore/FloatRect.cpp:

(TestWebKitAPI::TEST):

Nov 15, 2016:

10:51 PM Changeset in webkit [208786] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Warning added in r208542
https://bugs.webkit.org/show_bug.cgi?id=164636

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-11-15
Reviewed by Eric Carlson.

Deleted the copy constructor, we now explicitly copy the object in
the clone method.

  • platform/mediastream/MediaStreamTrackPrivate.cpp: Delete the

copy constructor.
(WebCore::MediaStreamTrackPrivate::clone): Copy the relevant
information for the clone operation in the API.

  • platform/mediastream/MediaStreamTrackPrivate.h: Delete the copy

constructor.

10:18 PM Changeset in webkit [208785] by rniwa@webkit.org
  • 3 edits in trunk/Source/WebCore

Add more assertions to ElementQueue diagnose a bug
https://bugs.webkit.org/show_bug.cgi?id=164814

Reviewed by Yusuke Suzuki.

Add more assertions to check the sanity of the element queue.
Also made them all release assertions so that we can catch them better.

  • dom/CustomElementReactionQueue.cpp:

(WebCore::CustomElementReactionStack::ElementQueue::add):
(WebCore::CustomElementReactionStack::ElementQueue::invokeAll):

10:11 PM Changeset in webkit [208784] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

[iOS WK2] Scroll view scrolling and zooming animations can keep running across page loads
https://bugs.webkit.org/show_bug.cgi?id=164810

Reviewed by Tim Horton.

Scrolling and zooming animations can leak across page loads, which makes tests flakey,
and is unexpected by users.

Tested by scrollingcoordinator/ios/sync-layer-positions-after-scroll.html followed by
scrollingcoordinator/ios/ui-scrolling-tree.html

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLoadForMainFrame]):

10:03 PM Changeset in webkit [208783] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: SourceCodeTextEditor should display execution lines for background threads
https://bugs.webkit.org/show_bug.cgi?id=164679
<rdar://problem/29233026>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Timothy Hatcher.

There may be multiple threads paused in the same content view. With
this change we should a thread indicator for each primary line a
thread is paused on. It uses the same inline line indicator that
inline errors/warnings (issues) use.

When there is a single thread (just the Page) we don't show thread
indicators. But as soon as there are multiple threads we start
managing and showing them. The line indicator contains the name of
the thread on the side.

Note that SourceCodeTextEditor maintains the thread indicators, but
it still always handles the ActiveCallFrame as it used to, pushing
values down into TextEditor. The ActiveCallFrame styles override
the thread line indicators (albeit with the same styles). The reason
these are still separate is that TextEditor has some special styles
regarding its gutter for the active execution line. Eventually we
may want to find a way to push this up into SourceCodeTextEditor.

  • Localizations/en.lproj/localizedStrings.js:

New string "%d Threads" when multiple threads are on the same line.

  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:

(WebInspector.ScopeChainDetailsSidebarPanel):
(WebInspector.ScopeChainDetailsSidebarPanel.prototype._activeCallFrameDidChange):
Update Watch Expressions when the active call frame changes.

  • UserInterface/Views/SourceCodeTextEditor.css:

(.source-code.text-editor > .CodeMirror .line-indicator-widget):
(.source-code.text-editor > .CodeMirror .line-indicator-widget.inline):
(.source-code.text-editor > .CodeMirror .line-indicator-widget > .arrow):
(.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .arrow):
(.source-code.text-editor > .CodeMirror .line-indicator-widget > .icon):
(.source-code.text-editor > .CodeMirror .line-indicator-widget > .text):
(.source-code.text-editor > .CodeMirror .line-indicator-widget.inline > .text):
Share line indicator widget styles between issue widgets and thread widgets.

(.source-code.text-editor > .CodeMirror .thread-indicator):
(.source-code.text-editor > .CodeMirror .thread-widget):
(.source-code.text-editor > .CodeMirror .thread-widget.inline):
(.source-code.text-editor > .CodeMirror .thread-widget.inline > .arrow):
Colors for the thread-widget line-indicators.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.close):
New event listeners handling for Target added / removed events.

(WebInspector.SourceCodeTextEditor.prototype._targetAdded):
(WebInspector.SourceCodeTextEditor.prototype._targetRemoved):
Update thread indicators as needed.

(WebInspector.SourceCodeTextEditor.prototype._looselyMatchesSourceCodeLocation):
More generic match based just on the URLs. Even if the exact script comes
from a different target, if they share the same URL that is fine.

(WebInspector.SourceCodeTextEditor.prototype._callFramesDidChange):
(WebInspector.SourceCodeTextEditor.prototype._addThreadIndicatorForTarget):
(WebInspector.SourceCodeTextEditor.prototype._removeThreadIndicatorForTarget):
(WebInspector.SourceCodeTextEditor.prototype._threadIndicatorWidgetForLine):
(WebInspector.SourceCodeTextEditor.prototype._updateThreadIndicatorWidget):
(WebInspector.SourceCodeTextEditor.prototype._handleThreadIndicatorWidgetClick):
Manage thread line indicator widgets. There are 3 maps we maintain.

  1. line -> [threads]

List of threads paused on a line, needed for the UI text.

  1. line -> widget

Gets the widget on a line so we can modify and eventually remove it.

  1. target -> line

If a target is removed, we need to know what line it had an indicator on.

(WebInspector.SourceCodeTextEditor.prototype._isWidgetToggleable):
Generalize for all of our different line indicator widgets.

(WebInspector.SourceCodeTextEditor.prototype._contentDidPopulate):
(WebInspector.SourceCodeTextEditor.prototype.textEditorUpdatedFormatting):
(WebInspector.SourceCodeTextEditor.prototype._reinsertAllThreadIndicators):
When first populated, or reformatted, clear and reinsert all widgets.

(WebInspector.SourceCodeTextEditor.prototype._reinsertAllIssues):
(WebInspector.SourceCodeTextEditor.prototype._logCleared):
(WebInspector.SourceCodeTextEditor.prototype._clearIssueWidgets): Renamed.
Rename _clearWidgets to _clearIssueWidgets.

9:05 PM Changeset in webkit [208782] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

Make JSC test functions more robust.
https://bugs.webkit.org/show_bug.cgi?id=164807

Reviewed by Keith Miller.

JSTests:

  • stress/jsc-test-functions-should-be-more-robust.js: Added.

Source/JavaScriptCore:

  • jsc.cpp:

(functionGetHiddenValue):
(functionSetHiddenValue):

8:47 PM Changeset in webkit [208781] by keith_miller@apple.com
  • 25 edits in trunk

B3 should support UDiv/UMod
https://bugs.webkit.org/show_bug.cgi?id=164811

Reviewed by Filip Pizlo.

JSTests:

Link new instructions to wasm.

  • wasm/wasm.json:

Source/JavaScriptCore:

This patch adds support for UDiv and UMod in B3. Many of the magic number
cases have been ommited for now since they are unlikely to happen in wasm
code. Most wasm code we will see is generated via llvm, which has more
robust versions of what we would do anyway. Additionally, this patch
links the new opcodes up to the wasm parser.

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::uDiv32):
(JSC::MacroAssemblerARM64::uDiv64):

  • assembler/MacroAssemblerX86Common.h:

(JSC::MacroAssemblerX86Common::x86UDiv32):

  • assembler/MacroAssemblerX86_64.h:

(JSC::MacroAssemblerX86_64::x86UDiv64):

  • assembler/X86Assembler.h:

(JSC::X86Assembler::divq_r):

  • b3/B3Common.h:

(JSC::B3::chillUDiv):
(JSC::B3::chillUMod):

  • b3/B3Const32Value.cpp:

(JSC::B3::Const32Value::uDivConstant):
(JSC::B3::Const32Value::uModConstant):

  • b3/B3Const32Value.h:
  • b3/B3Const64Value.cpp:

(JSC::B3::Const64Value::uDivConstant):
(JSC::B3::Const64Value::uModConstant):

  • b3/B3Const64Value.h:
  • b3/B3LowerMacros.cpp:
  • b3/B3LowerToAir.cpp:

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

  • b3/B3Opcode.cpp:

(WTF::printInternal):

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

(JSC::B3::Value::uDivConstant):
(JSC::B3::Value::uModConstant):
(JSC::B3::Value::effects):
(JSC::B3::Value::key):
(JSC::B3::Value::typeFor):

  • b3/B3Value.h:
  • b3/B3ValueKey.cpp:

(JSC::B3::ValueKey::materialize):

  • b3/air/AirInstInlines.h:

(JSC::B3::Air::isX86UDiv32Valid):
(JSC::B3::Air::isX86UDiv64Valid):

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

(JSC::B3::testUDivArgsInt32):
(JSC::B3::testUDivArgsInt64):
(JSC::B3::testUModArgsInt32):
(JSC::B3::testUModArgsInt64):
(JSC::B3::run):

  • wasm/wasm.json:
8:07 PM Changeset in webkit [208780] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Simplify Element::stripScriptingAttributes()
https://bugs.webkit.org/show_bug.cgi?id=164785

Reviewed by Ryosuke Niwa.

Simplify Element::stripScriptingAttributes() by leveraging
Vector::removeAllMatching().

No new tests, no Web-exposed behavior change.

  • dom/Element.cpp:

(WebCore::Element::stripScriptingAttributes):

7:10 PM Changeset in webkit [208779] by commit-queue@webkit.org
  • 19 edits
    2 copies
    2 adds in trunk

Source/JavaScriptCore:
Web Inspector: Preview other CSS @media in browser window (print)
https://bugs.webkit.org/show_bug.cgi?id=13530
<rdar://problem/5712928>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Timothy Hatcher.

  • inspector/protocol/Page.json:

Update to preferred JSON style.

Source/WebInspectorUI:
Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
https://bugs.webkit.org/show_bug.cgi?id=164793

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Timothy Hatcher.

  • Localizations/en.lproj/localizedStrings.js:

Tooltips for new button.

  • UserInterface/Base/Main.js:

(WebInspector.loaded):
New global setting.

  • UserInterface/Views/DOMTreeContentView.js:

(WebInspector.DOMTreeContentView):
(WebInspector.DOMTreeContentView.prototype.get navigationItems):
(WebInspector.DOMTreeContentView.prototype._showPrintStylesSettingChanged):
(WebInspector.DOMTreeContentView.prototype._togglePrintStylesSetting):
New navigation bar button to toggle print styles.

  • UserInterface/Controllers/CSSStyleManager.js:

(WebInspector.CSSStyleManager.prototype.mediaTypeChanged):
After toggling styles we will need to refresh styles, so provide
a meaningful way to trigger refreshing styles from the frontend.

  • UserInterface/Images/Printer.svg: Added.
  • UserInterface/Images/gtk/Printer.svg: Added.

New Printer icon for enabling / disabling print styles.

  • UserInterface/Images/gtk/Crosshair.svg:
  • UserInterface/Images/gtk/LayerBorders.svg:
  • UserInterface/Images/gtk/NavigationItemCurleyBraces.svg:
  • UserInterface/Images/gtk/NavigationItemTypes.svg:
  • UserInterface/Images/gtk/PaintFlashing.svg:
  • UserInterface/Images/gtk/ShadowDOM.svg:
  • UserInterface/Images/gtk/ToggleLeftSidebar.svg:
  • UserInterface/Images/gtk/ToggleRightSidebar.svg:
  • UserInterface/Images/gtk/UpDownArrows.svg:

Fix a number of existing GTK images to have activated styles.

LayoutTests:
Web Inspector: Preview other CSS @media in browser window (print)
https://bugs.webkit.org/show_bug.cgi?id=13530
<rdar://problem/5712928>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Timothy Hatcher.

  • inspector/page/media-query-list-listener-exception-expected.txt: Copied from LayoutTests/inspector/page/setEmulatedMedia-expected.txt.
  • inspector/page/media-query-list-listener-exception.html: Copied from LayoutTests/inspector/page/setEmulatedMedia.html.

Rename this test which is about swallowing exceptions and happened to use inspector code.

  • inspector/page/setEmulatedMedia-expected.txt:
  • inspector/page/setEmulatedMedia.html:

Test for Page.setEmulatedMedia command.

6:55 PM Changeset in webkit [208778] by jonlee@apple.com
  • 13 edits in trunk

Report active video and audio capture devices separately
https://bugs.webkit.org/show_bug.cgi?id=164769

Reviewed by Eric Carlson.

Source/WebCore:

For UI purposes, separate the notion of any active capture device to
an active audio and video capture device.

  • page/MediaProducer.h: Replace HasActiveMediaCaptureDevice with

HasActiveAudioCaptureDevice and HasActiveVideoCaptureDevice.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::mediaState): Update the logic for mediaState().
Since it is possible to arbitrarily add tracks from various sources,
check specifically for a local AV source (meaning a capture device) that
is producing data.

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::hasLocalVideoSource): Iterate over the tracks
and look for video sources that are not remote.
(WebCore::MediaStreamPrivate::hasLocalAudioSource): Ditto for audio.

  • platform/mediastream/MediaStreamPrivate.h:
  • testing/Internals.cpp:

(WebCore::Internals::pageMediaState): Update internals reporting.

Source/WebKit2:

Replace kWKMediaHasActiveCaptureDevice with kWKMediaHasActiveAudioCaptureDevice and
kWKMediaHasActiveVideoCaptureDevice

  • UIProcess/API/C/WKPage.cpp:

(WKPageGetMediaState):

  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::isPlayingMediaDidChange): Update the mask to include the two
bits.

LayoutTests:

  • fast/mediastream/MediaStream-page-muted-expected.txt: Update test.
  • fast/mediastream/MediaStream-page-muted.html:
5:35 PM Changeset in webkit [208777] by fpizlo@apple.com
  • 7 edits in trunk/Source/JavaScriptCore

Unreviewed, revert renaming useConcurrentJIT to useConcurrentJS.

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • heap/Heap.cpp:

(JSC::Heap::addToRememberedSet):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/WriteBarrierInlines.h:

(JSC::WriteBarrierBase<T>::set):
(JSC::WriteBarrierBase<Unknown>::set):

5:16 PM Changeset in webkit [208776] by Chris Dumez
  • 9 edits in trunk/Source/WebCore

Avoid copying vector of attributes as much as possible in the HTML parser
https://bugs.webkit.org/show_bug.cgi?id=164778

Reviewed by Ryosuke Niwa.

Avoid copying vector of attributes as much as possible in the HTML parser by moving
AtomicHTMLToken around and making it obvious it is safe to move its attributes
vector as well.

No new tests, no Web-exposed behavior change.

  • html/parser/AtomicHTMLToken.h:

(WebCore::AtomicHTMLToken::AtomicHTMLToken):
(WebCore::findAttribute):

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagBeforeHTML):
(WebCore::HTMLConstructionSite::mergeAttributesFromTokenIntoElement):
(WebCore::HTMLConstructionSite::insertHTMLHtmlStartTagInBody):
(WebCore::HTMLConstructionSite::insertHTMLBodyStartTagInBody):
(WebCore::HTMLConstructionSite::insertDoctype):
(WebCore::HTMLConstructionSite::insertComment):
(WebCore::HTMLConstructionSite::insertCommentOnDocument):
(WebCore::HTMLConstructionSite::insertCommentOnHTMLHtmlElement):
(WebCore::HTMLConstructionSite::insertHTMLHeadElement):
(WebCore::HTMLConstructionSite::insertHTMLBodyElement):
(WebCore::HTMLConstructionSite::insertHTMLFormElement):
(WebCore::HTMLConstructionSite::insertHTMLElement):
(WebCore::HTMLConstructionSite::insertHTMLElementOrFindCustomElementInterface):
(WebCore::HTMLConstructionSite::insertSelfClosingHTMLElement):
(WebCore::HTMLConstructionSite::insertFormattingElement):
(WebCore::HTMLConstructionSite::insertScriptElement):
(WebCore::HTMLConstructionSite::insertForeignElement):
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
(WebCore::HTMLConstructionSite::createElementFromSavedToken):

  • html/parser/HTMLConstructionSite.h:
  • html/parser/HTMLDocumentParser.cpp:

(WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):

  • html/parser/HTMLStackItem.h:

(WebCore::HTMLStackItem::HTMLStackItem):
(WebCore::HTMLStackItem::create):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::CustomElementConstructionData::CustomElementConstructionData):
(WebCore::HTMLTreeBuilder::constructTree):
(WebCore::HTMLTreeBuilder::processToken):
(WebCore::HTMLTreeBuilder::processDoctypeToken):
(WebCore::HTMLTreeBuilder::processFakeStartTag):
(WebCore::HTMLTreeBuilder::processFakeEndTag):
(WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
(WebCore::HTMLTreeBuilder::processCloseWhenNestedTag):
(WebCore::HTMLTreeBuilder::processStartTagForInBody):
(WebCore::HTMLTreeBuilder::insertGenericHTMLElement):
(WebCore::HTMLTreeBuilder::processTemplateStartTag):
(WebCore::HTMLTreeBuilder::processTemplateEndTag):
(WebCore::HTMLTreeBuilder::processEndOfFileForInTemplateContents):
(WebCore::HTMLTreeBuilder::processStartTagForInTable):
(WebCore::HTMLTreeBuilder::processStartTag):
(WebCore::HTMLTreeBuilder::processHtmlStartTagForInBody):
(WebCore::HTMLTreeBuilder::processBodyEndTagForInBody):
(WebCore::HTMLTreeBuilder::processAnyOtherEndTagForInBody):
(WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
(WebCore::HTMLTreeBuilder::processEndTagForInTableBody):
(WebCore::HTMLTreeBuilder::processEndTagForInRow):
(WebCore::HTMLTreeBuilder::processEndTagForInCell):
(WebCore::HTMLTreeBuilder::processEndTagForInBody):
(WebCore::HTMLTreeBuilder::processEndTagForInTable):
(WebCore::HTMLTreeBuilder::processEndTag):
(WebCore::HTMLTreeBuilder::processComment):
(WebCore::HTMLTreeBuilder::processCharacter):
(WebCore::HTMLTreeBuilder::processEndOfFile):
(WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
(WebCore::HTMLTreeBuilder::defaultForBeforeHead):
(WebCore::HTMLTreeBuilder::defaultForInHead):
(WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
(WebCore::HTMLTreeBuilder::defaultForAfterHead):
(WebCore::HTMLTreeBuilder::processStartTagForInHead):
(WebCore::HTMLTreeBuilder::processGenericRCDATAStartTag):
(WebCore::HTMLTreeBuilder::processGenericRawTextStartTag):
(WebCore::HTMLTreeBuilder::processScriptStartTag):
(WebCore::HTMLTreeBuilder::shouldProcessTokenInForeignContent):
(WebCore::hasAttribute):
(WebCore::HTMLTreeBuilder::processTokenInForeignContent):
(WebCore::HTMLTreeBuilder::parseError):

  • html/parser/HTMLTreeBuilder.h:
  • html/parser/TextDocumentParser.cpp:

(WebCore::TextDocumentParser::insertFakePreElement):

5:06 PM Changeset in webkit [208775] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking js/regress-141098.html as flaky on ios-simulator.
https://bugs.webkit.org/show_bug.cgi?id=163046

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
5:03 PM Changeset in webkit [208774] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

REGRESSION (r208248): Web Inspector: Pressing Left Arrow breaks autocomplete
https://bugs.webkit.org/show_bug.cgi?id=164391
<rdar://problem/29102408>

Reviewed by Matt Baker.

Unroll r208248.

  • UserInterface/Controllers/CodeMirrorCompletionController.js:

(WebInspector.CodeMirrorCompletionController):
(WebInspector.CodeMirrorCompletionController.prototype.updateCompletions):
(WebInspector.CodeMirrorCompletionController.prototype.isCompletionChange):
(WebInspector.CodeMirrorCompletionController.prototype.hideCompletions):
(WebInspector.CodeMirrorCompletionController.prototype.close):
(WebInspector.CodeMirrorCompletionController.prototype.completionSuggestionsSelectedCompletion):
(WebInspector.CodeMirrorCompletionController.prototype._createCompletionHintMarker):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._applyCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._commitCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._removeLastChangeFromHistory):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.clearMarker):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint.update):
(WebInspector.CodeMirrorCompletionController.prototype._removeCompletionHint):
(WebInspector.CodeMirrorCompletionController.prototype._completeAtCurrentPosition):
(WebInspector.CodeMirrorCompletionController.prototype._generateJavaScriptCompletions):

5:01 PM Changeset in webkit [208773] by ap@apple.com
  • 2 edits in trunk/Tools

Update Youenn's e-mail addresses.

  • Scripts/webkitpy/common/config/contributors.json:
4:44 PM Changeset in webkit [208772] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Fix iOS API test assertion after r208534
https://bugs.webkit.org/show_bug.cgi?id=164751

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-15
Reviewed by Geoffrey Garen.

This removes a firing assertion in the WebKit1.AudioSessionCategoryIOS API test on the iOS simulator.

  • platform/MemoryPressureHandler.h:

(WebCore::MemoryPressureHandler::setLowMemoryHandler):
This assertion is no longer valid because we are using m_installed to determine if m_lowMemoryHandler xor m_releaseMemoryBlock is set,
and we should be setting both right now on iOS and they are both useful in freeing memory. These should be united.

4:25 PM Changeset in webkit [208771] by beidson@apple.com
  • 7 edits in trunk

IndexedDB 2.0: Key collation during SQLite lookups is insanely slow.
https://bugs.webkit.org/show_bug.cgi?id=164754

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by *all* existing tests, and unskips a previously-too-slow test)

The new serialization format is straight forward enough to get back with minimal documentation
in a comment with the code itself being the rest of the documentation.

It handles all current IDB key types and leaves room for future key types.

  • Modules/indexeddb/IDBKeyData.cpp:

(WebCore::IDBKeyData::setBinaryValue):

  • Modules/indexeddb/IDBKeyData.h:

(WebCore::IDBKeyData::binary):

  • Modules/indexeddb/server/IDBSerialization.cpp:

(WebCore::serializedTypeForKeyType):
(WebCore::writeLittleEndian):
(WebCore::readLittleEndian):
(WebCore::writeDouble):
(WebCore::readDouble):
(WebCore::encodeKey):
(WebCore::serializeIDBKeyData):
(WebCore::decodeKey):
(WebCore::deserializeIDBKeyData):

  • Modules/indexeddb/server/IDBSerialization.h:
  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey): Verify that Type == Invalid

keys don't get into the database. This was happening before and the previous serialization
supported it, but there's clearly no point in supporting it with the new serialization.

LayoutTests:

  • TestExpectations: Unskip a test that passes even in debug builds, and re-classify a test that used to be too-slow everywhere to be too-slow only in debug builds.
4:23 PM Changeset in webkit [208770] by Simon Fraser
  • 3 edits
    2 adds in trunk

UIScriptController: script with no async tasks fails if an earlier script registered a callback
https://bugs.webkit.org/show_bug.cgi?id=164762

Reviewed by Wenson Hsieh.
Tools:

UIScriptContext::runUIScript() considers a script to be "immediate" if that script doesn't
queue any async tasks. However, if an earlier UI script registered a callback, UIScriptContext::runUIScript()
would consider that an outstanding task.

Fix by unregistering any callbacks associated with the current UI script when uiScriptComplete() is called.

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::tryToCompleteUIScriptForCurrentParentCallback):

LayoutTests:

  • fast/harness/ui-side-script-with-callback-expected.txt: Added.
  • fast/harness/ui-side-script-with-callback.html: Added.
4:23 PM Changeset in webkit [208769] by Simon Fraser
  • 5 edits
    2 adds in trunk

UIScriptController: setting a callback to undefined should unregister it
https://bugs.webkit.org/show_bug.cgi?id=164796

Reviewed by Dean Jackson.
Tools:

"Immediate" UI scripts (those that don't schedule any async tasks) should return
immediately, without the need to call uiScriptComplete(). However, this is broken if
an earlier UI script registered a callback (since no-one clears that callback after the
first script completes).

Make possible the workaround of setting the callback to undefined, which previously did
not clear the callback registration.

  • TestRunnerShared/UIScriptContext/UIScriptContext.cpp:

(UIScriptContext::registerCallback):

  • TestRunnerShared/UIScriptContext/UIScriptContext.h:
  • WebKitTestRunner/ios/UIScriptControllerIOS.mm:

(WTR::UIScriptController::platformClearAllCallbacks):

LayoutTests:

  • fast/harness/ui-side-script-unregister-callback-expected.txt: Added.
  • fast/harness/ui-side-script-unregister-callback.html: Added.
4:23 PM Changeset in webkit [208768] by ggaren@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Debugging and other tools should not disable the code cache
https://bugs.webkit.org/show_bug.cgi?id=164802

Reviewed by Mark Lam.

  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::fromGlobalCode): Updated for interface
change.

  • parser/SourceCodeKey.h:

(JSC::SourceCodeFlags::SourceCodeFlags):
(JSC::SourceCodeFlags::bits):
(JSC::SourceCodeKey::SourceCodeKey): Treat debugging and other tools
as part of our key so that we can cache code while using tools. Be sure
to include these bits in our hash function so you don't get storms of
collisions as you open and close the Web Inspector.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable): Treat tools as
a part of our key instead of as a reason to disable caching.

  • runtime/CodeCache.h:
4:19 PM Changeset in webkit [208767] by mark.lam@apple.com
  • 10 edits in trunk/Source/JavaScriptCore

Remove JSString::SafeView and replace its uses with StringViewWithUnderlyingString.
https://bugs.webkit.org/show_bug.cgi?id=164777

Reviewed by Geoffrey Garen.

JSString::SafeView no longer achieves its intended goal to make it easier to
handle strings safely. Its clients still need to do explicit exception checks in
order to be correct. We'll remove it and replace its uses with
StringViewWithUnderlyingString instead which serves to gets the a StringView
(which is what we really wanted from SafeView) and keeps the backing String alive
while the view is in use.

Also added some missing exception checks.

  • jsc.cpp:

(printInternal):
(functionDebug):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncJoin):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck):

  • runtime/IntlCollatorPrototype.cpp:

(JSC::IntlCollatorFuncCompare):

  • runtime/JSGenericTypedArrayViewPrototypeFunctions.h:

(JSC::genericTypedArrayViewProtoFuncJoin):

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::toStringView):
(JSC::globalFuncParseFloat):

  • runtime/JSONObject.cpp:

(JSC::JSONProtoFuncParse):

  • runtime/JSString.h:

(JSC::JSString::SafeView::is8Bit): Deleted.
(JSC::JSString::SafeView::length): Deleted.
(JSC::JSString::SafeView::SafeView): Deleted.
(JSC::JSString::SafeView::get): Deleted.
(JSC::JSString::view): Deleted.

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncRepeatCharacter):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncIndexOf):
(JSC::stringProtoFuncNormalize):

4:09 PM Changeset in webkit [208766] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Marking http/tests/cache/disk-cache/disk-cache-remove-several-pending-writes.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=161650

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:06 PM Changeset in webkit [208765] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Ensure sufficient buffer for worst-case URL encoding
https://bugs.webkit.org/show_bug.cgi?id=164794
<rdar://problem/5905510>

Reviewed by David Kilzer.

Slightly increase the default allocation size for URL parsing to account for
the worst-case parsing case. Under these assumptions, we might need three times
the byte length of the URL, plus nine bytes for fix-up characters.

In short, increase the default buffer size by 9 bytes.

No new tests. No change in behavior.

  • platform/URL.cpp:

(WebCore::URL::parse): Slightly increase the default buffer size.

3:48 PM Changeset in webkit [208764] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Skip fast/forms/search-cancel-button-change-input.html on ios-simulator since the test relies upon mouse events.

Unreviewed test gardening.

  • platform/ios-simulator/TestExpectations:
3:42 PM Changeset in webkit [208763] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, remove bogus assertion.

  • heap/Heap.cpp:

(JSC::Heap::markToFixpoint):

3:32 PM Changeset in webkit [208762] by fpizlo@apple.com
  • 4 edits in trunk

[mac-wk1 debug] ASSERTION FAILED: thisObject->m_propertyTableUnsafe
https://bugs.webkit.org/show_bug.cgi?id=162986

Reviewed by Saam Barati.

Source/JavaScriptCore:

This assertion is wrong for concurrent GC anyway, so this removes it.

  • runtime/Structure.cpp:

(JSC::Structure::visitChildren):

LayoutTests:

This test should not crash anymore.

  • platform/mac-wk1/TestExpectations:
3:21 PM Changeset in webkit [208761] by fpizlo@apple.com
  • 73 edits
    1 move in trunk/Source

Rename CONCURRENT_JIT/ConcurrentJIT to CONCURRENT_JS/ConcurrentJS
https://bugs.webkit.org/show_bug.cgi?id=164791

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Just renaming.

(JSC::ArrayProfile::computeUpdatedPrediction):
(JSC::ArrayProfile::briefDescription):
(JSC::ArrayProfile::briefDescriptionWithoutUpdating):

  • bytecode/ArrayProfile.h:

(JSC::ArrayProfile::observedArrayModes):
(JSC::ArrayProfile::mayInterceptIndexedAccesses):
(JSC::ArrayProfile::mayStoreToHole):
(JSC::ArrayProfile::outOfBounds):
(JSC::ArrayProfile::usesOriginalArrayStructures):

  • bytecode/CallLinkStatus.cpp:

(JSC::CallLinkStatus::computeFromLLInt):
(JSC::CallLinkStatus::computeFor):
(JSC::CallLinkStatus::computeExitSiteData):
(JSC::CallLinkStatus::computeFromCallLinkInfo):
(JSC::CallLinkStatus::computeDFGStatuses):

  • bytecode/CallLinkStatus.h:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::dumpValueProfiling):
(JSC::CodeBlock::dumpArrayProfiling):
(JSC::CodeBlock::finishCreation):
(JSC::CodeBlock::setConstantRegisters):
(JSC::CodeBlock::getStubInfoMap):
(JSC::CodeBlock::getCallLinkInfoMap):
(JSC::CodeBlock::getByValInfoMap):
(JSC::CodeBlock::addStubInfo):
(JSC::CodeBlock::addByValInfo):
(JSC::CodeBlock::addCallLinkInfo):
(JSC::CodeBlock::resetJITData):
(JSC::CodeBlock::shrinkToFit):
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::addArrayProfile):
(JSC::CodeBlock::getOrAddArrayProfile):
(JSC::CodeBlock::updateAllPredictionsAndCountLiveness):
(JSC::CodeBlock::updateAllArrayPredictions):
(JSC::CodeBlock::nameForRegister):
(JSC::CodeBlock::livenessAnalysisSlow):

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::setJITCode):
(JSC::CodeBlock::valueProfilePredictionForBytecodeOffset):
(JSC::CodeBlock::addFrequentExitSite):
(JSC::CodeBlock::hasExitSite):
(JSC::CodeBlock::livenessAnalysis):

  • bytecode/DFGExitProfile.cpp:

(JSC::DFG::ExitProfile::add):
(JSC::DFG::ExitProfile::hasExitSite):
(JSC::DFG::QueryableExitProfile::initialize):

  • bytecode/DFGExitProfile.h:

(JSC::DFG::ExitProfile::hasExitSite):

  • bytecode/GetByIdStatus.cpp:

(JSC::GetByIdStatus::hasExitSite):
(JSC::GetByIdStatus::computeFor):
(JSC::GetByIdStatus::computeForStubInfo):
(JSC::GetByIdStatus::computeForStubInfoWithoutExitSiteFeedback):

  • bytecode/GetByIdStatus.h:
  • bytecode/LazyOperandValueProfile.cpp:

(JSC::CompressedLazyOperandValueProfileHolder::computeUpdatedPredictions):
(JSC::CompressedLazyOperandValueProfileHolder::add):
(JSC::LazyOperandValueProfileParser::initialize):
(JSC::LazyOperandValueProfileParser::prediction):

  • bytecode/LazyOperandValueProfile.h:
  • bytecode/MethodOfGettingAValueProfile.cpp:

(JSC::MethodOfGettingAValueProfile::emitReportValue):

  • bytecode/PutByIdStatus.cpp:

(JSC::PutByIdStatus::hasExitSite):
(JSC::PutByIdStatus::computeFor):
(JSC::PutByIdStatus::computeForStubInfo):

  • bytecode/PutByIdStatus.h:
  • bytecode/StructureStubClearingWatchpoint.cpp:

(JSC::StructureStubClearingWatchpoint::fireInternal):

  • bytecode/ValueProfile.h:

(JSC::ValueProfileBase::briefDescription):
(JSC::ValueProfileBase::computeUpdatedPrediction):

  • dfg/DFGArrayMode.cpp:

(JSC::DFG::ArrayMode::fromObserved):

  • dfg/DFGArrayMode.h:

(JSC::DFG::ArrayMode::withSpeculationFromProfile):
(JSC::DFG::ArrayMode::withProfile):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::injectLazyOperandSpeculation):
(JSC::DFG::ByteCodeParser::getPredictionWithoutOSRExit):
(JSC::DFG::ByteCodeParser::getArrayMode):
(JSC::DFG::ByteCodeParser::handleInlining):
(JSC::DFG::ByteCodeParser::parseBlock):
(JSC::DFG::ByteCodeParser::InlineStackEntry::InlineStackEntry):

  • dfg/DFGDriver.cpp:

(JSC::DFG::compileImpl):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::attemptToMakeGetArrayLength):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::tryGetConstantClosureVar):

  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGPredictionInjectionPhase.cpp:

(JSC::DFG::PredictionInjectionPhase::run):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationMaterializeObjectInOSR):

  • heap/Heap.cpp:

(JSC::Heap::addToRememberedSet):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

  • jit/JITInlines.h:

(JSC::JIT::chooseArrayMode):

  • jit/JITOperations.cpp:

(JSC::tryGetByValOptimize):

  • jit/JITPropertyAccess.cpp:

(JSC::JIT::privateCompileGetByValWithCachedId):
(JSC::JIT::privateCompilePutByValWithCachedId):

  • jit/JITWorklist.cpp:

(JSC::JITWorklist::compileLater):
(JSC::JITWorklist::compileNow):

  • jit/Repatch.cpp:

(JSC::repatchGetByID):
(JSC::repatchPutByID):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setupGetByIdPrototypeCache):
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
(JSC::LLInt::setUpCall):

  • profiler/ProfilerBytecodeSequence.cpp:

(JSC::Profiler::BytecodeSequence::BytecodeSequence):

  • runtime/CommonSlowPaths.cpp:

(JSC::SLOW_PATH_DECL):

  • runtime/CommonSlowPaths.h:

(JSC::CommonSlowPaths::tryCachePutToScopeGlobal):
(JSC::CommonSlowPaths::tryCacheGetFromScopeGlobal):

  • runtime/ConcurrentJITLock.h: Removed.
  • runtime/ConcurrentJSLock.h: Copied from Source/JavaScriptCore/runtime/ConcurrentJITLock.h.

(JSC::ConcurrentJSLockerBase::ConcurrentJSLockerBase):
(JSC::ConcurrentJSLockerBase::~ConcurrentJSLockerBase):
(JSC::GCSafeConcurrentJSLocker::GCSafeConcurrentJSLocker):
(JSC::GCSafeConcurrentJSLocker::~GCSafeConcurrentJSLocker):
(JSC::ConcurrentJSLocker::ConcurrentJSLocker):
(JSC::ConcurrentJITLockerBase::ConcurrentJITLockerBase): Deleted.
(JSC::ConcurrentJITLockerBase::~ConcurrentJITLockerBase): Deleted.
(JSC::ConcurrentJITLockerBase::unlockEarly): Deleted.
(JSC::GCSafeConcurrentJITLocker::GCSafeConcurrentJITLocker): Deleted.
(JSC::GCSafeConcurrentJITLocker::~GCSafeConcurrentJITLocker): Deleted.
(JSC::ConcurrentJITLocker::ConcurrentJITLocker): Deleted.

  • runtime/InferredType.cpp:

(JSC::InferredType::canWatch):
(JSC::InferredType::addWatchpoint):
(JSC::InferredType::willStoreValueSlow):
(JSC::InferredType::makeTopSlow):
(JSC::InferredType::set):
(JSC::InferredType::removeStructure):

  • runtime/InferredType.h:
  • runtime/InferredTypeTable.cpp:

(JSC::InferredTypeTable::visitChildren):
(JSC::InferredTypeTable::get):
(JSC::InferredTypeTable::willStoreValue):
(JSC::InferredTypeTable::makeTop):

  • runtime/InferredTypeTable.h:
  • runtime/JSEnvironmentRecord.cpp:

(JSC::JSEnvironmentRecord::heapSnapshot):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::addGlobalVar):
(JSC::JSGlobalObject::addStaticGlobals):

  • runtime/JSLexicalEnvironment.cpp:

(JSC::JSLexicalEnvironment::getOwnNonIndexPropertyNames):

  • runtime/JSObject.cpp:

(JSC::JSObject::deleteProperty):
(JSC::JSObject::shiftButterflyAfterFlattening):

  • runtime/JSObject.h:
  • runtime/JSObjectInlines.h:

(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/JSScope.cpp:

(JSC::abstractAccess):
(JSC::JSScope::collectClosureVariablesUnderTDZ):

  • runtime/JSSegmentedVariableObject.cpp:

(JSC::JSSegmentedVariableObject::findVariableIndex):
(JSC::JSSegmentedVariableObject::addVariables):
(JSC::JSSegmentedVariableObject::heapSnapshot):

  • runtime/JSSegmentedVariableObject.h:
  • runtime/JSSymbolTableObject.cpp:

(JSC::JSSymbolTableObject::getOwnNonIndexPropertyNames):

  • runtime/JSSymbolTableObject.h:

(JSC::symbolTableGet):
(JSC::symbolTablePut):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
  • runtime/ProgramExecutable.cpp:

(JSC::ProgramExecutable::initializeGlobalProperties):

  • runtime/RegExp.cpp:

(JSC::RegExp::compile):
(JSC::RegExp::matchConcurrently):
(JSC::RegExp::compileMatchOnly):
(JSC::RegExp::deleteCode):

  • runtime/RegExp.h:
  • runtime/Structure.cpp:

(JSC::Structure::materializePropertyTable):
(JSC::Structure::addPropertyTransitionToExistingStructureConcurrently):
(JSC::Structure::addNewPropertyTransition):
(JSC::Structure::takePropertyTableOrCloneIfPinned):
(JSC::Structure::nonPropertyTransition):
(JSC::Structure::flattenDictionaryStructure):
(JSC::Structure::ensurePropertyReplacementWatchpointSet):
(JSC::Structure::add):
(JSC::Structure::remove):
(JSC::Structure::visitChildren):

  • runtime/Structure.h:
  • runtime/StructureInlines.h:

(JSC::Structure::propertyReplacementWatchpointSet):
(JSC::Structure::add):
(JSC::Structure::remove):

  • runtime/SymbolTable.cpp:

(JSC::SymbolTable::visitChildren):
(JSC::SymbolTable::localToEntry):
(JSC::SymbolTable::entryFor):
(JSC::SymbolTable::prepareForTypeProfiling):
(JSC::SymbolTable::uniqueIDForVariable):
(JSC::SymbolTable::uniqueIDForOffset):
(JSC::SymbolTable::globalTypeSetForOffset):
(JSC::SymbolTable::globalTypeSetForVariable):

  • runtime/SymbolTable.h:
  • runtime/TypeSet.cpp:

(JSC::TypeSet::addTypeInformation):
(JSC::TypeSet::invalidateCache):

  • runtime/TypeSet.h:

(JSC::TypeSet::structureSet):

  • runtime/VM.h:
  • runtime/WriteBarrierInlines.h:

(JSC::WriteBarrierBase<T>::set):
(JSC::WriteBarrierBase<Unknown>::set):

  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::ByteCompiler::compile):
(JSC::Yarr::byteCompile):

  • yarr/YarrInterpreter.h:

(JSC::Yarr::BytecodePattern::BytecodePattern):

Source/WTF:

Both the concurrent GC and the concurrent JIT rely on concurrency support in fundamental
JSC runtime components like JSValue. So, the thing that guards it should be a "feature"
called CONCURRENT_JS not CONCURRENT_JIT.

  • wtf/Platform.h:
3:12 PM Changeset in webkit [208760] by commit-queue@webkit.org
  • 16 edits in trunk/Source

Web Inspector: Remove unused and untested Page.setTouchEmulationEnabled command
https://bugs.webkit.org/show_bug.cgi?id=164793

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Matt Baker.

Source/JavaScriptCore:

  • inspector/protocol/Page.json:

Source/WebCore:

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
(WebCore::InspectorPageAgent::updateTouchEventEmulationInPage): Deleted.
(WebCore::InspectorPageAgent::setTouchEmulationEnabled): Deleted.

  • inspector/InspectorPageAgent.h:

Source/WebInspectorUI:

  • UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
  • Versions/Inspector-iOS-10.0.json:
  • Versions/Inspector-iOS-7.0.json:
  • Versions/Inspector-iOS-8.0.json:
  • Versions/Inspector-iOS-9.0.json:
  • Versions/Inspector-iOS-9.3.json:
2:50 PM Changeset in webkit [208759] by jiewen_tan@apple.com
  • 6 edits in trunk/LayoutTests

js-test-pre.js::shouldReject doesn't need _rejectCallback and _resolveCallback
https://bugs.webkit.org/show_bug.cgi?id=164758

Reviewed by Youenn Fablet.

Since the function returns a promise, it doesn't need _rejectCallback and _resolveCallback.

  • crypto/subtle/generate-key-malformed-parameters.html:
  • crypto/subtle/rsa-generate-key-malformed-parameters.html:
  • crypto/workers/subtle/resources/rsa-generate-key.js:
  • crypto/workers/subtle/rsa-generate-key-expected.txt:
  • resources/js-test-pre.js:
2:48 PM Changeset in webkit [208758] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for Windows debug build after r208738
https://bugs.webkit.org/show_bug.cgi?id=164727

This static member variable can be touched outside of the JSC project
since inlined MacroAssembler member functions read / write it.
So it should be exported.

  • assembler/MacroAssemblerX86Common.h:
2:25 PM Changeset in webkit [208757] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, quick fix for r208751

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::jsSubtleCryptoFunctionExportKeyPromise):

2:16 PM Changeset in webkit [208756] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed, fix build after r208710.

Inline functions should not be marked as WEBCORE_EXPORT.

  • dom/QualifiedName.h:
2:12 PM Changeset in webkit [208755] by commit-queue@webkit.org
  • 4 edits in trunk

Web Inspector: inspector/worker/debugger-pause.html fails on WebKit1
https://bugs.webkit.org/show_bug.cgi?id=164787

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::cancelPauseOnNextStatement):
Clear this DebuggerAgent state when we resume.

LayoutTests:

  • inspector/worker/debugger-pause.html:

Make this test work for WebKit1 where the VM is shared between the
page and inspector page. We need to be able to stop the Inspector's
evaluation, so that we can evaluate and pause on the page, and then
come back to the inspector afterwards.

2:02 PM Changeset in webkit [208754] by fpizlo@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

It should be possible to disable concurrent GC timeslicing
https://bugs.webkit.org/show_bug.cgi?id=164788

Reviewed by Saam Barati.

Collector timeslicing means that the collector will try to pause once every 2ms. This is
great because it throttles the mutator and prevents it from outpacing the collector. But
it reduces some of the efficacy of the collectContinuously=true configuration: while
it's great that collecting continuously means that the collector will also pause more
frequently and so it will test the pausing code, it also means that the collector will
spend less time running concurrently. The primary purpose of collectContinuously is to
maximize the amount of time that the collector is running concurrently to the mutator to
maximize the likelihood that a race will cause a detectable error.

This adds an option to disable collector timeslicing (useCollectorTimeslicing=false).
The idea is that we will usually use this in conjunction with collectContinuously=true
to find race conditions during marking, but we can also use the two options
independently to focus our testing on other things.

  • heap/Heap.cpp:

(JSC::Heap::markToFixpoint):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::drainInParallel): We should have added this helper ages ago.

  • heap/SlotVisitor.h:
  • runtime/Options.h:
2:00 PM Changeset in webkit [208753] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

strncpy may leave unterminated string in WebCore::URL::init
https://bugs.webkit.org/show_bug.cgi?id=74473
<rdar://problem/10576626>

Reviewed by David Kilzer.

Reviving an old patch by David Kilzer! This should have been integrated years ago.

No new tests. No change in behavior.

  • platform/URL.cpp:

(WebCore::URL::init): Make sure we always enter 'parse' with a
null-terminated string.

1:51 PM Changeset in webkit [208752] by sbarati@apple.com
  • 2 edits in trunk/JSTests

Debug JSC test timeout: stress/has-own-property-name-cache-symbols-and-strings.js.ftl-no-cjit-small-pool
https://bugs.webkit.org/show_bug.cgi?id=163012

Unreviewed. This patch makes a test run for less time because it's timing out on the bots.

  • stress/has-own-property-name-cache-symbols-and-strings.js:
1:48 PM Changeset in webkit [208751] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Followup patch for r208737

Reviewed by Yusuke Suzuki.

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::jsSubtleCryptoFunctionExportKeyPromise):

1:15 PM Changeset in webkit [208750] by fpizlo@apple.com
  • 6 edits in trunk/Source

The concurrent GC should have a timeslicing controller
https://bugs.webkit.org/show_bug.cgi?id=164783

Reviewed by Geoffrey Garen.
Source/JavaScriptCore:


This adds a simple control system for deciding when the collector should let the mutator run
and when it should stop the mutator. We definitely have to stop the mutator during certain
collector phases, but during marking - which takes the most time - we can go either way.
Normally we want to let the mutator run, but if the heap size starts to grow then we have to
stop the mutator just to make sure it doesn't get too far ahead of the collector. That could
lead to memory exhaustion, so it's better to just stop in that case.

The controller tries to never stop the mutator for longer than short timeslices. It slices on
a 2ms period (configurable via Options). The amount of that period that the collector spends
with the mutator stopped is determined by the fraction of the collector's concurrent headroom
that has been allocated over. The headroom is currently configured at 50% of what was
allocated before the collector started.

This moves a bunch of parameters into Options so that it's easier to play with different
configurations.

I tried these different values for the period:

1ms: 30% worse than 2ms on splay-latency.
2ms: best score on splay-latency: the tick time above the 99.5% percentile is <2ms.
3ms: 40% worse than 2ms on splay-latency.
4ms: 40% worse than 2ms on splay-latency.

I also tried 100% headroom as an alternate to 50% and found it to be a worse.

This patch is a 2x improvement on splay-latency with the default parameters and concurrent GC
enabled. Prior to this change, the GC didn't have a good bound on its pause times, which
would cause these problems. Concurrent GC is now 5.6x better on splay-latency than no
concurrent GC.

  • heap/Heap.cpp:

(JSC::Heap::ResumeTheWorldScope::ResumeTheWorldScope):
(JSC::Heap::markToFixpoint):
(JSC::Heap::collectInThread):

  • runtime/Options.h:

Source/WTF:

  • wtf/LockAlgorithm.h: Added some comments.
  • wtf/Seconds.h: Added support for modulo. It's necessary for timeslicing.

(WTF::Seconds::operator%):
(WTF::Seconds::operator%=):

1:11 PM Changeset in webkit [208749] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for CLoop after r208738
https://bugs.webkit.org/show_bug.cgi?id=164727

  • jsc.cpp:

(WTF::DOMJITFunctionObject::unsafeFunction):
(WTF::DOMJITFunctionObject::finishCreation):

1:06 PM Changeset in webkit [208748] by Simon Fraser
  • 25 edits
    7 adds in trunk

[iOS WK2] Implement support for visual viewports
https://bugs.webkit.org/show_bug.cgi?id=164765

Reviewed by Tim Horton.

Adopt the visual viewport scrolling model in iOS WK2.
Source/WebCore:

This is more complex than the Mac implementation for two primary reasons. First,
WKWebView needs to to able to control the rectangle used for fixed position layout
to get the correct behavior when zooming all the way out, and because iOS displays
pages scaled down, exposing document overflow such that the layout viewport rectangle
has to get larger than the initial containing block size (which does not happen on Mac).

This is achieved by pushing a "layoutViewportOverrideRect" down onto FrameView, in
a similar way to the customFixedPositionRect that's used now. We share that name
for now in code that is agnostic to its use (e.g. VisibleContentRectUpdateInfo).

I tried so hard to write tests, but ran into various problems (webkit.org/b/164762,
webkit.org/b/164764). Will add tests via webkit.org/b/164764.

  • page/FrameView.cpp:

(WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling): layoutViewportOrigin()
was removed.
(WebCore::FrameView::setBaseLayoutViewportOrigin): Rename with "base" to make it clearer that
it can be overridden.
(WebCore::FrameView::setLayoutViewportOverrideRect):
(WebCore::FrameView::baseLayoutViewportSize): Renamed.
(WebCore::FrameView::updateLayoutViewport): Logging.
(WebCore::FrameView::layoutViewportRect):
(WebCore::FrameView::scrollPositionForFixedPosition):
(WebCore::FrameView::unscaledMaximumScrollPosition): During page transitions on iOS, it
was possible for unscaledDocumentRect to be empty, but visibleSize() to be non-empty, leading
to odd negative max scroll offsets, so clamp to 0,0.
(WebCore::FrameView::setLayoutViewportOrigin): Deleted.

  • page/FrameView.h:
  • page/scrolling/AsyncScrollingCoordinator.cpp:

(WebCore::AsyncScrollingCoordinator::reconcileScrollingState): scrollPositionForFixedPosition() already does the
visualViewportEnabled() check.

  • page/scrolling/mac/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):

  • platform/graphics/FloatSize.cpp:

(WebCore::FloatSize::constrainedBetween): Added for consistency with the other geometry types.

  • platform/graphics/FloatSize.h:
  • platform/graphics/LayoutSize.cpp:

(WebCore::LayoutSize::constrainedBetween): Ditto.

  • platform/graphics/LayoutSize.h:
  • rendering/RenderView.cpp:

(WebCore::RenderView::clientLogicalWidthForFixedPosition): If we have an override layout viewport, its size might be different
from the RenderView's size (the initial containing block), so we need to use the layoutViewportRect here.
(WebCore::RenderView::clientLogicalHeightForFixedPosition):

Source/WebKit2:

Pass the parameters used for computing the layout viewport up to WK2 via RemoteLayerTreeTransaction.
These are stored on WebPageProxy. When they change, _didCommitLayerTree triggers a -_updateVisibleContentRects.

WebPageProxy::computeCustomFixedPositionRect() is the function that computes the "override" layout viewport.
It starts with the baseLayoutViewportSize from the web process (which is based on the initial containing block
size), then ensures that it's no smaller than the unobscured content rect, since it makes no sense for the
layout viewport to be smaller than the visual viewport. The static FrameView::computeLayoutViewportOrigin()
is then use to "push" the layout viewport around as the visual viewport changes.

  • Shared/VisibleContentRectUpdateInfo.h:
  • Shared/WebCoreArgumentCoders.cpp: Encode LayoutSize and LayoutPoint.

(IPC::ArgumentCoder<LayoutSize>::encode):
(IPC::ArgumentCoder<LayoutSize>::decode):
(IPC::ArgumentCoder<LayoutPoint>::encode):
(IPC::ArgumentCoder<LayoutPoint>::decode):

  • Shared/WebCoreArgumentCoders.h:
  • Shared/mac/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::baseLayoutViewportSize):
(WebKit::RemoteLayerTreeTransaction::setBaseLayoutViewportSize):
(WebKit::RemoteLayerTreeTransaction::minStableLayoutViewportOrigin):
(WebKit::RemoteLayerTreeTransaction::setMinStableLayoutViewportOrigin):
(WebKit::RemoteLayerTreeTransaction::maxStableLayoutViewportOrigin):
(WebKit::RemoteLayerTreeTransaction::setMaxStableLayoutViewportOrigin):

  • Shared/mac/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::description):

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _didCommitLayerTree:]):

  • UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:

(WebKit::RemoteScrollingCoordinatorProxy::visualViewportEnabled): Accessor.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::customFixedPositionRect):

  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView _didCommitLayerTree:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computeCustomFixedPositionRect): When visual viewports are enabled, compute
the layout viewport rect, taking the baseLayoutViewportSize and the current unobscured rect into account.
(WebKit::WebPageProxy::updateLayoutViewportParameters):

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • WebProcess/WebPage/WebPage.cpp: Encode in the transaction the layout viewport parameters (with minor refactor).

(WebKit::WebPage::willCommitLayerTree):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::updateVisibleContentRects): This is where the web process receives the new override layout viewport
from the web process (with some logging).

LayoutTests:

These tests don't correctly test iOS WK2's async scrolling behavior (webkit.org/b/164779)
so rebaseline.

  • platform/ios-simulator-wk2/fast/visual-viewport/nonzoomed-rects-expected.txt: Added.
  • platform/ios-simulator-wk2/fast/visual-viewport/rtl-nonzoomed-rects-expected.txt: Added.
  • platform/ios-simulator-wk2/fast/visual-viewport/rtl-zoomed-rects-expected.txt: Added.
  • platform/ios-simulator-wk2/fast/visual-viewport/zoomed-fixed-expected.txt: Added.
  • platform/ios-simulator-wk2/fast/visual-viewport/zoomed-fixed-scroll-down-then-up-expected.txt: Added.
  • platform/ios-simulator-wk2/fast/visual-viewport/zoomed-rects-expected.txt: Added.
12:55 PM Changeset in webkit [208747] by mmaxfield@apple.com
  • 13 edits in trunk/Source/WebCore

[WebGL] Remove unused Chromium-specific OpenGL extensions
https://bugs.webkit.org/show_bug.cgi?id=164782

Reviewed by Dean Jackson.

No new tests because there is no behavior change.

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::copyBufferSubData):
(WebCore::WebGL2RenderingContext::clear):
(WebCore::WebGL2RenderingContext::getExtension):

  • html/canvas/WebGLCompressedTextureS3TC.cpp:

(WebCore::WebGLCompressedTextureS3TC::supported):

  • html/canvas/WebGLDepthTexture.cpp:

(WebCore::WebGLDepthTexture::supported):

  • html/canvas/WebGLDrawBuffers.cpp:

(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):

  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::WebGLFramebuffer::onAccess):

  • html/canvas/WebGLFramebuffer.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::clear):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::bufferData):
(WebCore::WebGLRenderingContextBase::bufferSubData):
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
(WebCore::WebGLRenderingContextBase::validateDrawArrays):
(WebCore::WebGLRenderingContextBase::validateDrawElements):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::texImage2DBase):
(WebCore::WebGLRenderingContextBase::copyTexImage2D):

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::WebGLRenderingContextBase::isGLES2NPOTStrict):
(WebCore::WebGLRenderingContextBase::isErrorGeneratedOnOutOfBoundsAccesses): Deleted.
(WebCore::WebGLRenderingContextBase::isResourceSafe): Deleted.

  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::texImage2DResourceSafe):

  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::isResourceSafe): Deleted.

12:35 PM Changeset in webkit [208746] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: URL Breakpoints that resolve in multiple workers should only appear in the UI once
https://bugs.webkit.org/show_bug.cgi?id=164334
<rdar://problem/29073523>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Matt Baker.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._addBreakpoint):
Don't add a duplicate BreakpointTreeElements for the same Breakpoint.

12:14 PM Changeset in webkit [208745] by Brent Fulgham
  • 6 edits
    2 adds in trunk

Correct handling of changing input type
https://bugs.webkit.org/show_bug.cgi?id=164759
<rdar://problem/29211174>

Reviewed by Darin Adler.

Source/WebCore:

Test: fast/forms/search-cancel-button-change-input.html

It is possible for JavaScript to change the type property of an input field. WebKit
needs to gracefully handle this case.

Add a type traits specialization so we can properly downcast InputType elements.
Use this to only call search functions on actual search input types.

  • html/HTMLInputElement.cpp:

(WebCore::HTMLInputElement::onSearch): Only perform search functions if the
input type is actually a search field.

  • html/InputType.h: Add type traits specialization for 'downcast' template.
  • html/SearchInputType.h: Ditto.

LayoutTests:

  • fast/forms/search-cancel-button-change-input-expected.txt: Added.
  • fast/forms/search-cancel-button-change-input.html: Added.
12:12 PM Changeset in webkit [208744] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

CounterNode::insertAfter and ::removeChild should take references.
https://bugs.webkit.org/show_bug.cgi?id=164780

Reviewed by Simon Fraser.

No change in functionality.

  • rendering/CounterNode.cpp:

(WebCore::CounterNode::insertAfter):
(WebCore::CounterNode::removeChild):

  • rendering/CounterNode.h:
  • rendering/RenderCounter.cpp:

(WebCore::makeCounterNode):
(WebCore::destroyCounterNodeWithoutMapRemoval):
(WebCore::updateCounters):

11:53 AM Changeset in webkit [208743] by Antti Koivisto
  • 11 edits
    2 adds in trunk

slot doesn't work as a flex container
https://bugs.webkit.org/show_bug.cgi?id=160740
<rdar://problem/28605080>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/shadow-dom/css-scoping-slot-flex.html

The style adjustment for flex children needs to be based on their parent box style rather
than the composed tree parent. This can be different when display:contents is involved.

  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::documentElementUserAgentStyle):

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::styleForElement):

Optionally provide parent box style so we can do adjustments based on it when computing style for rendering.

(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::pseudoStyleForElement):
(WebCore::equivalentBlockDisplay):

Avoid boolean parameters.

(WebCore::StyleResolver::adjustRenderStyle):

Do the display:contents adjustment first and treat 'content' like 'none' later'. We never want to override
'contents' with adjustments.
Use parent box style for flex/grid adjustments instead of the DOM parent style.

  • css/StyleResolver.h:
  • rendering/RenderNamedFlowFragment.cpp:

(WebCore::RenderNamedFlowFragment::computeStyleInRegion):

  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::styleForElement):

Call with parent box style.

(WebCore::Style::TreeResolver::parentBoxStyle):

Find the parent box style if any.

  • style/StyleTreeResolver.h:
  • svg/SVGElementRareData.h:

(WebCore::SVGElementRareData::overrideComputedStyle):

LayoutTests:

  • fast/shadow-dom/css-scoping-slot-flex-expected.html: Added.
  • fast/shadow-dom/css-scoping-slot-flex.html: Added.
  • fast/shadow-dom/slot-crash-expected.txt:
11:45 AM Changeset in webkit [208742] by commit-queue@webkit.org
  • 25 edits in trunk/Source/WebCore

Misc Inspector backend cleanup
https://bugs.webkit.org/show_bug.cgi?id=164768

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2016-11-15
Reviewed by Brian Burg.

  • inspector/DOMPatchSupport.cpp:
  • inspector/InspectorApplicationCacheAgent.cpp:
  • inspector/InspectorApplicationCacheAgent.h:
  • inspector/InspectorCSSAgent.cpp:
  • inspector/InspectorCSSAgent.h:
  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):

  • inspector/InspectorDOMAgent.h:
  • inspector/InspectorDOMDebuggerAgent.h:
  • inspector/InspectorDOMStorageAgent.cpp:
  • inspector/InspectorDOMStorageAgent.h:
  • inspector/InspectorDatabaseAgent.cpp:
  • inspector/InspectorDatabaseAgent.h:
  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::frontendLoaded):

  • inspector/InspectorIndexedDBAgent.cpp:

(WebCore::ClearObjectStoreListener::create): Deleted.
(WebCore::ClearObjectStoreListener::~ClearObjectStoreListener): Deleted.
(WebCore::ClearObjectStoreListener::ClearObjectStoreListener): Deleted.
(WebCore::ClearObjectStore::create): Deleted.
(WebCore::ClearObjectStore::ClearObjectStore): Deleted.

  • inspector/InspectorLayerTreeAgent.cpp:
  • inspector/InspectorLayerTreeAgent.h:
  • inspector/InspectorNetworkAgent.h:
  • inspector/InspectorPageAgent.cpp:
  • inspector/InspectorPageAgent.h:
  • inspector/InspectorReplayAgent.cpp:
  • inspector/InspectorReplayAgent.h:
  • inspector/InspectorTimelineAgent.cpp:

(WebCore::InspectorTimelineAgent::stopFromConsole):

  • inspector/InspectorTimelineAgent.h:
  • inspector/PageRuntimeAgent.h:
11:44 AM Changeset in webkit [208741] by mark.lam@apple.com
  • 3 edits
    1 add in trunk

The jsc shell's setImpureGetterDelegate() should ensure that the set value is an ImpureGetter.
https://bugs.webkit.org/show_bug.cgi?id=164781
<rdar://problem/28418590>

Reviewed by Geoffrey Garen and Michael Saboff.

JSTests:

  • stress/jsc-setImpureGetterDelegate-on-bad-type.js: Added.

Source/JavaScriptCore:

  • jsc.cpp:

(functionSetImpureGetterDelegate):

11:42 AM Changeset in webkit [208740] by mmaxfield@apple.com
  • 87 edits in trunk/Source/WebCore

[WebGL] Migrate construction functions from pointers to references
https://bugs.webkit.org/show_bug.cgi?id=164749

Reviewed by Zalan Bujtas.

Mechanical find/replace.

No new tests because there is no behavior change.

  • html/canvas/ANGLEInstancedArrays.cpp:

(WebCore::ANGLEInstancedArrays::ANGLEInstancedArrays):
(WebCore::ANGLEInstancedArrays::supported):
(WebCore::ANGLEInstancedArrays::drawArraysInstancedANGLE):
(WebCore::ANGLEInstancedArrays::drawElementsInstancedANGLE):
(WebCore::ANGLEInstancedArrays::vertexAttribDivisorANGLE):

  • html/canvas/ANGLEInstancedArrays.h:
  • html/canvas/EXTBlendMinMax.cpp:

(WebCore::EXTBlendMinMax::EXTBlendMinMax):

  • html/canvas/EXTBlendMinMax.h:
  • html/canvas/EXTFragDepth.cpp:

(WebCore::EXTFragDepth::EXTFragDepth):

  • html/canvas/EXTFragDepth.h:
  • html/canvas/EXTShaderTextureLOD.cpp:

(WebCore::EXTShaderTextureLOD::EXTShaderTextureLOD):

  • html/canvas/EXTShaderTextureLOD.h:
  • html/canvas/EXTTextureFilterAnisotropic.cpp:

(WebCore::EXTTextureFilterAnisotropic::EXTTextureFilterAnisotropic):

  • html/canvas/EXTTextureFilterAnisotropic.h:
  • html/canvas/EXTsRGB.cpp:

(WebCore::EXTsRGB::EXTsRGB):

  • html/canvas/EXTsRGB.h:
  • html/canvas/OESElementIndexUint.cpp:

(WebCore::OESElementIndexUint::OESElementIndexUint):

  • html/canvas/OESElementIndexUint.h:
  • html/canvas/OESStandardDerivatives.cpp:

(WebCore::OESStandardDerivatives::OESStandardDerivatives):

  • html/canvas/OESStandardDerivatives.h:
  • html/canvas/OESTextureFloat.cpp:

(WebCore::OESTextureFloat::OESTextureFloat):

  • html/canvas/OESTextureFloat.h:
  • html/canvas/OESTextureFloatLinear.cpp:

(WebCore::OESTextureFloatLinear::OESTextureFloatLinear):

  • html/canvas/OESTextureFloatLinear.h:
  • html/canvas/OESTextureHalfFloat.cpp:

(WebCore::OESTextureHalfFloat::OESTextureHalfFloat):

  • html/canvas/OESTextureHalfFloat.h:
  • html/canvas/OESTextureHalfFloatLinear.cpp:

(WebCore::OESTextureHalfFloatLinear::OESTextureHalfFloatLinear):

  • html/canvas/OESTextureHalfFloatLinear.h:
  • html/canvas/OESVertexArrayObject.cpp:

(WebCore::OESVertexArrayObject::OESVertexArrayObject):
(WebCore::OESVertexArrayObject::createVertexArrayOES):
(WebCore::OESVertexArrayObject::deleteVertexArrayOES):
(WebCore::OESVertexArrayObject::isVertexArrayOES):
(WebCore::OESVertexArrayObject::bindVertexArrayOES):

  • html/canvas/WebGL2RenderingContext.cpp:

(WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
(WebCore::WebGL2RenderingContext::initializeShaderExtensions):
(WebCore::WebGL2RenderingContext::drawBuffers):
(WebCore::WebGL2RenderingContext::createVertexArray):
(WebCore::WebGL2RenderingContext::isVertexArray):
(WebCore::WebGL2RenderingContext::bindVertexArray):
(WebCore::WebGL2RenderingContext::getExtension):
(WebCore::WebGL2RenderingContext::getSupportedExtensions):

  • html/canvas/WebGLBuffer.cpp:

(WebCore::WebGLBuffer::create):
(WebCore::WebGLBuffer::WebGLBuffer):

  • html/canvas/WebGLBuffer.h:
  • html/canvas/WebGLCompressedTextureATC.cpp:

(WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
(WebCore::WebGLCompressedTextureATC::supported):

  • html/canvas/WebGLCompressedTextureATC.h:
  • html/canvas/WebGLCompressedTexturePVRTC.cpp:

(WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
(WebCore::WebGLCompressedTexturePVRTC::supported):

  • html/canvas/WebGLCompressedTexturePVRTC.h:
  • html/canvas/WebGLCompressedTextureS3TC.cpp:

(WebCore::WebGLCompressedTextureS3TC::WebGLCompressedTextureS3TC):
(WebCore::WebGLCompressedTextureS3TC::supported):

  • html/canvas/WebGLCompressedTextureS3TC.h:
  • html/canvas/WebGLContextObject.cpp:

(WebCore::WebGLContextObject::WebGLContextObject):

  • html/canvas/WebGLContextObject.h:
  • html/canvas/WebGLDebugRendererInfo.cpp:

(WebCore::WebGLDebugRendererInfo::WebGLDebugRendererInfo):

  • html/canvas/WebGLDebugRendererInfo.h:
  • html/canvas/WebGLDebugShaders.cpp:

(WebCore::WebGLDebugShaders::WebGLDebugShaders):
(WebCore::WebGLDebugShaders::getTranslatedShaderSource):

  • html/canvas/WebGLDebugShaders.h:
  • html/canvas/WebGLDepthTexture.cpp:

(WebCore::WebGLDepthTexture::WebGLDepthTexture):
(WebCore::WebGLDepthTexture::supported):

  • html/canvas/WebGLDepthTexture.h:
  • html/canvas/WebGLDrawBuffers.cpp:

(WebCore::WebGLDrawBuffers::WebGLDrawBuffers):
(WebCore::WebGLDrawBuffers::supported):
(WebCore::WebGLDrawBuffers::drawBuffersWEBGL):
(WebCore::WebGLDrawBuffers::satisfiesWebGLRequirements):

  • html/canvas/WebGLDrawBuffers.h:
  • html/canvas/WebGLExtension.cpp:

(WebCore::WebGLExtension::WebGLExtension):

  • html/canvas/WebGLExtension.h:

(WebCore::WebGLExtension::ref):
(WebCore::WebGLExtension::deref):
(WebCore::WebGLExtension::context):

  • html/canvas/WebGLFramebuffer.cpp:

(WebCore::WebGLFramebuffer::create):
(WebCore::WebGLFramebuffer::WebGLFramebuffer):
(WebCore::WebGLFramebuffer::drawBuffersIfNecessary):

  • html/canvas/WebGLFramebuffer.h:
  • html/canvas/WebGLLoseContext.cpp:

(WebCore::WebGLLoseContext::WebGLLoseContext):
(WebCore::WebGLLoseContext::loseContext):
(WebCore::WebGLLoseContext::restoreContext):

  • html/canvas/WebGLLoseContext.h:
  • html/canvas/WebGLObject.cpp:

(WebCore::WebGLObject::WebGLObject):

  • html/canvas/WebGLObject.h:
  • html/canvas/WebGLProgram.cpp:

(WebCore::WebGLProgram::create):
(WebCore::WebGLProgram::WebGLProgram):

  • html/canvas/WebGLProgram.h:
  • html/canvas/WebGLQuery.cpp:

(WebCore::WebGLQuery::create):
(WebCore::WebGLQuery::WebGLQuery):

  • html/canvas/WebGLQuery.h:
  • html/canvas/WebGLRenderbuffer.cpp:

(WebCore::WebGLRenderbuffer::create):
(WebCore::WebGLRenderbuffer::WebGLRenderbuffer):

  • html/canvas/WebGLRenderbuffer.h:
  • html/canvas/WebGLRenderingContext.cpp:

(WebCore::WebGLRenderingContext::initializeVertexArrayObjects):
(WebCore::WebGLRenderingContext::getExtension):
(WebCore::WebGLRenderingContext::getSupportedExtensions):

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::create):
(WebCore::WebGLRenderingContextBase::setupFlags):
(WebCore::WebGLRenderingContextBase::checkObjectToBeBound):
(WebCore::WebGLRenderingContextBase::createBuffer):
(WebCore::WebGLRenderingContextBase::createFramebuffer):
(WebCore::WebGLRenderingContextBase::createTexture):
(WebCore::WebGLRenderingContextBase::createProgram):
(WebCore::WebGLRenderingContextBase::createRenderbuffer):
(WebCore::WebGLRenderingContextBase::createShader):
(WebCore::WebGLRenderingContextBase::deleteObject):
(WebCore::WebGLRenderingContextBase::validateWebGLObject):
(WebCore::WebGLRenderingContextBase::framebufferRenderbuffer):
(WebCore::WebGLRenderingContextBase::framebufferTexture2D):
(WebCore::WebGLRenderingContextBase::getUniform):
(WebCore::WebGLRenderingContextBase::readPixels):
(WebCore::WebGLRenderingContextBase::loseContextImpl):
(WebCore::WebGLRenderingContextBase::maybeRestoreContext):
(WebCore::WebGLRenderingContextBase::supportsDrawBuffers):

  • html/canvas/WebGLSampler.cpp:

(WebCore::WebGLSampler::create):
(WebCore::WebGLSampler::WebGLSampler):

  • html/canvas/WebGLSampler.h:
  • html/canvas/WebGLShader.cpp:

(WebCore::WebGLShader::create):
(WebCore::WebGLShader::WebGLShader):

  • html/canvas/WebGLShader.h:
  • html/canvas/WebGLSharedObject.cpp:

(WebCore::WebGLSharedObject::WebGLSharedObject):

  • html/canvas/WebGLSharedObject.h:
  • html/canvas/WebGLSync.cpp:

(WebCore::WebGLSync::create):
(WebCore::WebGLSync::WebGLSync):

  • html/canvas/WebGLSync.h:
  • html/canvas/WebGLTexture.cpp:

(WebCore::WebGLTexture::create):
(WebCore::WebGLTexture::WebGLTexture):

  • html/canvas/WebGLTexture.h:
  • html/canvas/WebGLTransformFeedback.cpp:

(WebCore::WebGLTransformFeedback::create):
(WebCore::WebGLTransformFeedback::WebGLTransformFeedback):

  • html/canvas/WebGLTransformFeedback.h:
  • html/canvas/WebGLVertexArrayObject.cpp:

(WebCore::WebGLVertexArrayObject::create):
(WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):

  • html/canvas/WebGLVertexArrayObject.h:
  • html/canvas/WebGLVertexArrayObjectBase.cpp:

(WebCore::WebGLVertexArrayObjectBase::WebGLVertexArrayObjectBase):

  • html/canvas/WebGLVertexArrayObjectBase.h:
  • html/canvas/WebGLVertexArrayObjectOES.cpp:

(WebCore::WebGLVertexArrayObjectOES::create):
(WebCore::WebGLVertexArrayObjectOES::WebGLVertexArrayObjectOES):
(WebCore::WebGLVertexArrayObjectOES::deleteObjectImpl):

  • html/canvas/WebGLVertexArrayObjectOES.h:
  • platform/graphics/GraphicsContext3D.h:
  • platform/graphics/gpu/Texture.cpp:

(WebCore::convertFormat):

  • platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:

(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::reshapeFBOs):
(WebCore::GraphicsContext3D::getIntegerv):
(WebCore::GraphicsContext3D::getExtensions):

  • platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:

(WebCore::GraphicsContext3D::validateDepthStencil):
(WebCore::GraphicsContext3D::drawArraysInstanced):
(WebCore::GraphicsContext3D::drawElementsInstanced):
(WebCore::GraphicsContext3D::vertexAttribDivisor):

11:31 AM Changeset in webkit [208739] by jdiggs@igalia.com
  • 5 edits
    2 adds in trunk

AX: Need to update implicit/default values for aria-valuemin, aria-valuenow, and aria-valuemax
https://bugs.webkit.org/show_bug.cgi?id=164773

Reviewed by Chris Fleizach.

Source/WebCore:

Return the values stated in the ARIA 1.1 spec, namely:

  • aria-valuemin is 0 for roles other than spinbutton
  • aria-valuemax is 100 for roles other than spinbutton
  • aria-valuenow is half way between aria-valuemax and aria-valuemin for roles other than spinbutton, and 0 for spinbutton

For spinbutton, the spec states that "there is no minimum/maximum value."
But at least in the case of ATK/AT-SPI2, the accessible value interface
is expected to provide a number. Therefore, expose the values we use to
constrain input type="number": -std::numeric_limits<float>::max() and
std::numeric_limits<float>::max().

Test: accessibility/spinbutton-implicit-values.html

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::valueForRange):
(WebCore::AccessibilityNodeObject::maxValueForRange):
(WebCore::AccessibilityNodeObject::minValueForRange):

LayoutTests:

  • accessibility/progressbar-expected.txt: Updated to reflect new behavior.
  • accessibility/progressbar.html: Updated to reflect new behavior.
  • accessibility/spinbutton-implicit-values-expected.txt: Added.
  • accessibility/spinbutton-implicit-values.html: Added.
11:21 AM Changeset in webkit [208738] by Yusuke Suzuki
  • 4 edits
    1 add in trunk

[DOMJIT] Allow using macro assembler scratches in FTL CheckDOM
https://bugs.webkit.org/show_bug.cgi?id=164727

Reviewed by Filip Pizlo.

JSTests:

  • stress/check-dom-with-signature.js: Added.

(shouldBe):
(calling):
(i.array.forEach):

Source/JavaScriptCore:

While CallDOMGetter can use macro assembler scratch registers, we previiously
assumed that CheckDOM code generator does not use macro assembler scratch registers.
It is currently true in x86 environment. But it is not true in the other environments.

We should not limit DOMJIT::Patchpoint's functionality in such a way. We should allow
arbitrary macro assembler operations inside the DOMJIT::Patchpoint. This patch allows
CheckDOM to use macro assembler scratch registers.

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileCheckDOM):

  • jsc.cpp:

(WTF::DOMJITFunctionObject::DOMJITFunctionObject):
(WTF::DOMJITFunctionObject::createStructure):
(WTF::DOMJITFunctionObject::create):
(WTF::DOMJITFunctionObject::unsafeFunction):
(WTF::DOMJITFunctionObject::safeFunction):
(WTF::DOMJITFunctionObject::checkDOMJITNode):
(WTF::DOMJITFunctionObject::finishCreation):
(GlobalObject::finishCreation):
(functionCreateDOMJITFunctionObject):

11:08 AM Changeset in webkit [208737] by jiewen_tan@apple.com
  • 26 edits
    2 moves
    73 adds in trunk

Update SubtleCrypto::exportKey to match the latest spec
https://bugs.webkit.org/show_bug.cgi?id=164722
<rdar://problem/29251740>

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

  • WebCryptoAPI/idlharness-expected.txt:

Source/WebCore:

This patch does following few things:

  1. It updates the SubtleCrypto::exportKey method to match the latest spec: https://www.w3.org/TR/WebCryptoAPI/#SubtleCrypto-method-exportKey. It also refers to the latest Editor's Draft to a certain degree: https://w3c.github.io/webcrypto/Overview.html#SubtleCrypto-method-exportKey.
  2. It implements exportKey operations of the following algorithms: AES-CBC, AES-KW, HMAC, RSAES-PKCS1-V1_5, RSASSA-PKCS1-V1_5, and RSA-OAEP.
  3. It also fixes the following bugs: https://bugs.webkit.org/show_bug.cgi?id=156114, <rdar://problem/21773066>.

Note: We currently only support Raw and Jwk key format.

Tests: crypto/subtle/aes-cbc-generate-export-key-jwk-length-128.html

crypto/subtle/aes-cbc-generate-export-key-jwk-length-192.html
crypto/subtle/aes-cbc-generate-export-key-jwk-length-256.html
crypto/subtle/aes-cbc-generate-export-key-raw.html
crypto/subtle/aes-export-key-malformed-parameters.html
crypto/subtle/aes-kw-generate-export-key-jwk-length-128.html
crypto/subtle/aes-kw-generate-export-key-jwk-length-192.html
crypto/subtle/aes-kw-generate-export-key-jwk-length-256.html
crypto/subtle/aes-kw-generate-export-raw-key.html
crypto/subtle/export-key-malformed-parameters.html
crypto/subtle/hmac-export-key-malformed-parameters.html
crypto/subtle/hmac-generate-export-key-jwk-sha1.html
crypto/subtle/hmac-generate-export-key-jwk-sha224.html
crypto/subtle/hmac-generate-export-key-jwk-sha256.html
crypto/subtle/hmac-generate-export-key-jwk-sha384.html
crypto/subtle/hmac-generate-export-key-jwk-sha512.html
crypto/subtle/hmac-generate-export-raw-key.html
crypto/subtle/hmac-import-key-malformed-parameters.html
crypto/subtle/rsa-export-key-malformed-parameters.html
crypto/subtle/rsa-oaep-generate-export-key-jwk-sha1.html
crypto/subtle/rsa-oaep-generate-export-key-jwk-sha224.html
crypto/subtle/rsa-oaep-generate-export-key-jwk-sha256.html
crypto/subtle/rsa-oaep-generate-export-key-jwk-sha384.html
crypto/subtle/rsa-oaep-generate-export-key-jwk-sha512.html
crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-jwk.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha1.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha224.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha256.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha384.html
crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha512.html
crypto/workers/subtle/aes-generate-export-key-jwk.html
crypto/workers/subtle/aes-generate-export-key-raw.html
crypto/workers/subtle/hmac-generate-export-key-jwk.html
crypto/workers/subtle/hmac-generate-export-key-raw.html
crypto/workers/subtle/rsa-generate-export-key-jwk.html

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::toJSValueFromJsonWebKey):
(WebCore::jsSubtleCryptoFunctionExportKeyPromise):
(WebCore::JSSubtleCrypto::exportKey):

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::exportKey):

  • crypto/CryptoAlgorithm.h:
  • crypto/SubtleCrypto.idl:
  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::importKey):
(WebCore::CryptoAlgorithmAES_CBC::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.h:
  • crypto/algorithms/CryptoAlgorithmAES_KW.cpp:

(WebCore::CryptoAlgorithmAES_KW::importKey):
(WebCore::CryptoAlgorithmAES_KW::exportKey):

  • crypto/algorithms/CryptoAlgorithmAES_KW.h:
  • crypto/algorithms/CryptoAlgorithmHMAC.cpp:

(WebCore::CryptoAlgorithmHMAC::importKey):
(WebCore::CryptoAlgorithmHMAC::exportKey):

  • crypto/algorithms/CryptoAlgorithmHMAC.h:
  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::importKey):
(WebCore::CryptoAlgorithmRSA_OAEP::exportKey):

  • crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
  • crypto/keys/CryptoKeyAES.cpp:

(WebCore::CryptoKeyAES::exportJwk):

  • crypto/keys/CryptoKeyAES.h:
  • crypto/keys/CryptoKeyHMAC.cpp:

(WebCore::CryptoKeyHMAC::exportJwk):

  • crypto/keys/CryptoKeyHMAC.h:
  • crypto/keys/CryptoKeyRSA.cpp:

(WebCore::CryptoKeyRSA::exportJwk):

  • crypto/keys/CryptoKeyRSA.h:

LayoutTests:

Besides adding test cases for SubtleCrypto::exportKey, this patch also corrects a typo:
hmac-import-malformed-parameters* => hmac-import-key-malformed-parameters*.

  • crypto/subtle/aes-cbc-generate-export-key-jwk-length-128-expected.txt: Added.
  • crypto/subtle/aes-cbc-generate-export-key-jwk-length-128.html: Added.
  • crypto/subtle/aes-cbc-generate-export-key-jwk-length-192-expected.txt: Added.
  • crypto/subtle/aes-cbc-generate-export-key-jwk-length-192.html: Added.
  • crypto/subtle/aes-cbc-generate-export-key-jwk-length-256-expected.txt: Added.
  • crypto/subtle/aes-cbc-generate-export-key-jwk-length-256.html: Added.
  • crypto/subtle/aes-cbc-generate-export-key-raw-expected.txt: Added.
  • crypto/subtle/aes-cbc-generate-export-key-raw.html: Added.
  • crypto/subtle/aes-export-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/aes-export-key-malformed-parameters.html: Added.
  • crypto/subtle/aes-kw-generate-export-key-jwk-length-128-expected.txt: Added.
  • crypto/subtle/aes-kw-generate-export-key-jwk-length-128.html: Added.
  • crypto/subtle/aes-kw-generate-export-key-jwk-length-192-expected.txt: Added.
  • crypto/subtle/aes-kw-generate-export-key-jwk-length-192.html: Added.
  • crypto/subtle/aes-kw-generate-export-key-jwk-length-256-expected.txt: Added.
  • crypto/subtle/aes-kw-generate-export-key-jwk-length-256.html: Added.
  • crypto/subtle/aes-kw-generate-export-raw-key-expected.txt: Added.
  • crypto/subtle/aes-kw-generate-export-raw-key.html: Added.
  • crypto/subtle/export-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/export-key-malformed-parameters.html: Added.
  • crypto/subtle/hmac-export-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/hmac-export-key-malformed-parameters.html: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha1-expected.txt: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha1.html: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha224-expected.txt: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha224.html: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha256-expected.txt: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha256.html: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha384-expected.txt: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha384.html: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha512-expected.txt: Added.
  • crypto/subtle/hmac-generate-export-key-jwk-sha512.html: Added.
  • crypto/subtle/hmac-generate-export-raw-key-expected.txt: Added.
  • crypto/subtle/hmac-generate-export-raw-key.html: Added.
  • crypto/subtle/hmac-import-key-malformed-parameters-expected.txt: Renamed from LayoutTests/crypto/subtle/hmac-import-malformed-parameters-expected.txt.
  • crypto/subtle/hmac-import-key-malformed-parameters.html: Renamed from LayoutTests/crypto/subtle/hmac-import-malformed-parameters.html.
  • crypto/subtle/rsa-export-key-malformed-parameters-expected.txt: Added.
  • crypto/subtle/rsa-export-key-malformed-parameters.html: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha1-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha1.html: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha224-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha224.html: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha256-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha256.html: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha384-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha384.html: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha512-expected.txt: Added.
  • crypto/subtle/rsa-oaep-generate-export-key-jwk-sha512.html: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-jwk-expected.txt: Added.
  • crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-jwk.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha1-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha1.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha224-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha224.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha256-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha256.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha384-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha384.html: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha512-expected.txt: Added.
  • crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-jwk-sha512.html: Added.
  • crypto/workers/subtle/aes-generate-export-key-jwk-expected.txt: Added.
  • crypto/workers/subtle/aes-generate-export-key-jwk.html: Added.
  • crypto/workers/subtle/aes-generate-export-key-raw-expected.txt: Added.
  • crypto/workers/subtle/aes-generate-export-key-raw.html: Added.
  • crypto/workers/subtle/hmac-generate-export-key-jwk-expected.txt: Added.
  • crypto/workers/subtle/hmac-generate-export-key-jwk.html: Added.
  • crypto/workers/subtle/hmac-generate-export-key-raw-expected.txt: Added.
  • crypto/workers/subtle/hmac-generate-export-key-raw.html: Added.
  • crypto/workers/subtle/resources/aes-generate-export-key-jwk.js: Added.
  • crypto/workers/subtle/resources/aes-generate-export-key-raw.js: Added.
  • crypto/workers/subtle/resources/hmac-generate-export-key-jwk.js: Added.
  • crypto/workers/subtle/resources/hmac-generate-export-key-raw.js: Added.
  • crypto/workers/subtle/resources/rsa-generate-export-key-jwk.js: Added.
  • crypto/workers/subtle/rsa-generate-export-key-jwk-expected.txt: Added.
  • crypto/workers/subtle/rsa-generate-export-key-jwk.html: Added.
11:04 AM Changeset in webkit [208736] by ggaren@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

CodeCache should stop pretending to cache builtins
https://bugs.webkit.org/show_bug.cgi?id=164750

Reviewed by Saam Barati.

We were passing JSParserBuiltinMode to all CodeCache functions, but the
passed-in value was always NotBuiltin.

Let's stop passing it.

  • parser/SourceCodeKey.h:

(JSC::SourceCodeFlags::SourceCodeFlags):
(JSC::SourceCodeKey::SourceCodeKey):

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock):
(JSC::CodeCache::getUnlinkedProgramCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalEvalCodeBlock):
(JSC::CodeCache::getUnlinkedModuleProgramCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

  • runtime/CodeCache.h:

(JSC::generateUnlinkedCodeBlock):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createLocalEvalCodeBlock):
(JSC::JSGlobalObject::createGlobalEvalCodeBlock):
(JSC::JSGlobalObject::createModuleProgramCodeBlock):

10:19 AM Changeset in webkit [208735] by jonlee@apple.com
  • 10 edits in trunk

Remove HasMediaCaptureDevice
https://bugs.webkit.org/show_bug.cgi?id=164767
<rdar://problem/29263696>

Reviewed by Eric Carlson.

Source/WebCore:

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::mediaState): Remove HasMediaCaptureDevice in state.

  • page/MediaProducer.h:
  • testing/Internals.cpp:

(WebCore::Internals::pageMediaState): Remove it in the media string.

Source/WebKit2:

  • UIProcess/API/C/WKPage.cpp: Remove kWKMediaHasCaptureDevice.

(WKPageGetMediaState):

  • UIProcess/API/C/WKPagePrivate.h:

LayoutTests:

  • fast/mediastream/MediaStream-page-muted-expected.txt: Remove check for HasMediaCaptureDevice.
  • fast/mediastream/MediaStream-page-muted.html:
9:32 AM Changeset in webkit [208734] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

REGRESSION (r208711-r208722): ASSERTION FAILED: hasInlineStorage()
https://bugs.webkit.org/show_bug.cgi?id=164775

Reviewed by Mark Lam and Keith Miller.

We were calling inlineStorage() which asserts that inline storage is not empty. But we
were calling it in a context where it could be empty and that's fine. So, we now call
inlineStorageUnsafe().

  • runtime/JSObject.h:

(JSC::JSFinalObject::JSFinalObject):

8:57 AM Changeset in webkit [208733] by hyatt@apple.com
  • 9 edits in trunk

[CSS Parser] Fix font-synthesis and text-decoration-skip parsing
https://bugs.webkit.org/show_bug.cgi?id=164736

Reviewed by Dean Jackson.

Source/WebCore:

Fix the properties to not allow duplicate values, to reject when
garbage values are included, to require that none be a singleton,
and to preserve the declaration order of the properties.

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertTextDecorationSkip):

  • css/parser/CSSParser.cpp:

(WebCore::CSSParser::parseFontSynthesis):
(WebCore::CSSParser::parseTextDecorationSkip):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontSynthesis):
(WebCore::consumeTextDecorationSkip):
(WebCore::CSSPropertyParser::parseSingleValue):

LayoutTests:

  • fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip-expected.txt:
  • fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-roundtrip.html:
  • fast/css3-text/font-synthesis-parse-expected.txt:
  • fast/css3-text/font-synthesis-parse.html:
8:40 AM Changeset in webkit [208732] by dbates@webkit.org
  • 32 edits
    1 move
    3 adds
    1 delete in trunk

Disallow loads using HTTP 0.9 at the ResourceHandle/NetworkDataTask level
https://bugs.webkit.org/show_bug.cgi?id=164662
<rdar://problem/29268514>

Source/WebCore:

Reviewed by Reviewed by Alex Christensen and Brady Eidson.

Currently we disallow non-default HTTP 0.9 loads at the ResourceLoader level and disallow
subresource loads using HTTP 0.9 on a default port when the embedding page loads using a
different HTTP version. However loads can still be initiated from other loaders (e.g. FrameLoader)
with regards to the first issue. The latter issue does not afford much protection and
increases code complexity. Instead we should simplify our policy and move our code to the
lowest networking abstraction level, ResourceHandle/NetworkDataTask, so that we disallow
all non-default port loads using HTTP 0.9 regardless of the loader used.

Tests: http/tests/security/http-0.9/image-default-port-allowed.html

http/tests/security/http-0.9/xhr-blocked.html

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::responseReceived): Remove logic to cancel an HTTP 0.9 load from here.
We will cancel the HTTP 0.9 load at the ResourceHandle/NetworkDataTask level.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::didReceiveResponse): Ditto.

  • platform/URL.h: Export stringCenterEllipsizedToLength() so that we can use it in WebKit2.
  • platform/network/BlobResourceHandle.cpp:

(WebCore::BlobResourceHandle::notifyResponseOnSuccess): Modified to call ResourceHandle::didReceiveResponse().
(WebCore::BlobResourceHandle::notifyResponseOnError): Ditto.

  • platform/network/ResourceHandle.cpp:

(WebCore::ResourceHandle::didReceiveResponse): Added. Fail the load if it is using HTTP 0.9.
Otherwise notify the client that we received a response.
(WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse): Added. Perform any
additional platform-specific logic after notifying the resource handle client of the received
response. Only the libsoup backend overwrites this member function to do something meaningful.

  • platform/network/ResourceHandle.h:
  • platform/network/ResourceResponseBase.h:
  • platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp:

(WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): Modified to
call ResourceHandle::didReceiveResponse().

  • platform/network/mac/WebCoreResourceHandleAsDelegate.mm:

(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]): Ditto.

  • platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:

(-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): Ditto.

  • platform/network/soup/ResourceHandleSoup.cpp:

(WebCore::nextMultipartResponsePartCallback): Ditto.
(WebCore::sendRequestCallback): Ditto.
(WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse): Added. Turns around and
calls continueAfterDidReceiveResponse().

Source/WebKit2:

Reviewed by Alex Christensen and Brady Eidson.

Make changes to NetworkDataTask similar to the changes made to ResourceHandle so as to
disallow non-default port HTTP 0.9 loads when using the ENABLE(NETWORK_SESSION) networking
code path in WebKit2.

  • NetworkProcess/NetworkDataTask.cpp:

(WebKit::NetworkDataTask::didReceiveResponse): Added. Fail the load if it is using HTTP 0.9.
Otherwise notify the client that we received a response.

  • NetworkProcess/NetworkDataTask.h:
  • NetworkProcess/NetworkDataTaskBlob.cpp:

(WebKit::NetworkDataTaskBlob::resume): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
as the latter has been renamed to the former.
(WebKit::NetworkDataTaskBlob::getSizeForNext): Ditto.
(WebKit::NetworkDataTaskBlob::dispatchDidReceiveResponse): Renamed from didReceiveResponse().

  • NetworkProcess/NetworkDataTaskBlob.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.h:
  • NetworkProcess/cocoa/NetworkDataTaskCocoa.mm:

(WebKit::NetworkDataTaskCocoa::didReceiveResponse): Deleted.

  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::didSendRequest): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
as the latter has been renamed to the former.
(WebKit::NetworkDataTaskSoup::dispatchDidReceiveResponse): Renamed from didReceiveResponse(). Also
remove the local variable response and inline its value into the call to ResourceHandle::didReceiveResponse()
as this variable is used exactly once in this function and its name does not describe its purpose any more
than its value.
(WebKit::NetworkDataTaskSoup::didRequestNextPart): Substitute dispatchDidReceiveResponse() for didReceiveResponse()
as the latter has been renamed to the former.

  • NetworkProcess/soup/NetworkDataTaskSoup.h:

LayoutTests:

Reviewed by Reviewed by Alex Christensen and Brady Eidson.

Add a test to ensure that we block a synchronous XHR load using HTTP 0.9.
Renamed test image-default-port-blocked.html to image-default-port-allowed.html
as we now allow a subresource load using HTTP 0.9 on a default port regardless
of the HTTP version the embedding page used.

Update test expectations as DRT/WTR do not emit a localized description for the
error associated with a load failure. Note that a message is emitted to
Web Inspector console.

  • http/tests/security/http-0.9/iframe-blocked-expected.txt:
  • http/tests/security/http-0.9/iframe-blocked.html: Dump frame load callbacks

to see that load was cancelled as there is no other unique visible indication
of success.

  • http/tests/security/http-0.9/image-blocked-expected.txt: Update expected result.
  • http/tests/security/http-0.9/image-default-port-allowed-expected.txt: Renamed from LayoutTests/http/tests/security/http-0.9/image-default-port-blocked-expected.txt.
  • http/tests/security/http-0.9/image-default-port-allowed.html: Renamed from LayoutTests/http/tests/security/http-0.9/image-default-port-blocked.html.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-page-blocked-expected.txt: Update expected result.
  • http/tests/security/http-0.9/image-on-HTTP-0.9-page-blocked.html: Ditto.
  • http/tests/security/http-0.9/sandbox-should-not-persist-on-navigation-expected.txt: Ditto.
  • http/tests/security/http-0.9/worker-connect-src-blocked-expected.txt: Ditto.
  • http/tests/security/http-0.9/worker-importScripts-blocked-expected.txt: Ditto.
  • http/tests/security/http-0.9/xhr-asynchronous-blocked-expected.txt: Ditto.
  • http/tests/security/http-0.9/xhr-blocked-expected.txt: Added.
  • http/tests/security/http-0.9/xhr-blocked.html: Added.
  • platform/wk2/TestExpectations: Skip the HTTP-0.9 tests in WebKit2 that use internals.registerDefaultPortForProtocol().

The function internals.registerDefaultPortForProtocol only updates the default-port-to-protocol map in the WebContent
process. However network loads in WebKit2 occur in the NetworkProcess. Further investigation is needed to determine
the best way to support testing with default ports. Ideally, we would run an HTTP server on port 80 for testing and
remove the need for internals.registerDefaultPortForProtocol().

8:02 AM Changeset in webkit [208731] by Alan Bujtas
  • 6 edits
    2 adds in trunk

[MultiCol] Render tree should be all clean by the end of FrameView::layout().
https://bugs.webkit.org/show_bug.cgi?id=162833

Reviewed by Simon Fraser.

Source/WebCore:

This is a temporary workaround until after we addressed render tree mutation during layout (webkit.org/b/163849).

Test: fast/inline/out-of-flow-quotation-text-with-multicolumn.html

  • page/FrameView.cpp:

(WebCore::FrameView::layout):

  • rendering/RenderMultiColumnFlowThread.cpp:

(WebCore::RenderMultiColumnFlowThread::populate):
(WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):

  • rendering/RenderQuote.cpp:

(WebCore::RenderQuote::attachQuote): Populating/evacuating the flow should not trigger quotation text changes.
(WebCore::RenderQuote::detachQuote):

  • rendering/RenderView.h:

(WebCore::RenderTreeInternalMutationScope::RenderTreeInternalMutationScope):
(WebCore::RenderTreeInternalMutationScope::~RenderTreeInternalMutationScope):

LayoutTests:

This patch actually fixes the renderering of the closing quotation mark. Currently, it is
not rendered at all.

  • fast/inline/out-of-flow-quotation-text-with-multicolumn-expected.html: Added.
  • fast/inline/out-of-flow-quotation-text-with-multicolumn.html: Added.
4:27 AM Changeset in webkit [208730] by eric.carlson@apple.com
  • 4 edits in trunk/Source

REGRESSION (r208606?): LayoutTest fast/mediastream/enumerating-crash.html is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=164715

Reviewed by Jon Lee.

No new tests, fixes a crash in an existing test.

  • Modules/mediastream/UserMediaRequest.cpp:

(WebCore::UserMediaRequest::document): Return nullptr when the script execution context has

been cleared.

  • Modules/mediastream/UserMediaRequest.h:

(WebCore::UserMediaRequest::document): Deleted.

4:13 AM Changeset in webkit [208729] by commit-queue@webkit.org
  • 7 edits in trunk

WebRTC: update MediaStream-MediaElement-srcObject.html test and unskip it
https://bugs.webkit.org/show_bug.cgi?id=159343

Patch by Alejandro G. Castro <alex@igalia.com> on 2016-11-15
Reviewed by Philippe Normand.

Source/WebCore:

Test updated.

We can not initialize the srcObject attribute when creating the mediaplayer
or we would be removing the srcObject we are going to use.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::createMediaPlayer):

LayoutTests:

Update the test to use the getUserMedia API and unskip it.

  • fast/mediastream/MediaStream-MediaElement-srcObject-expected.txt:

Update the result of using the getUserMedia API.

  • fast/mediastream/MediaStream-MediaElement-srcObject.html: Use

the getUserMedia API from the helper.

  • platform/gtk/TestExpectations: Unskip the test.
  • platform/mac/TestExpectations: Unskip the test.

Nov 14, 2016:

11:06 PM Changeset in webkit [208728] by Csaba Osztrogonác
  • 2 edits in trunk/Source/JavaScriptCore

[ARM] Unreviewed buildfix after r208720.

  • assembler/MacroAssemblerARM.h:

(JSC::MacroAssemblerARM::storeFence): Stub function copied from MacroAssemblerARMv7.h.

10:08 PM Changeset in webkit [208727] by commit-queue@webkit.org
  • 68 edits in trunk/Source

Move SecurityOrigin::createFromDatabaseIdentifier to SecurityOriginData
https://bugs.webkit.org/show_bug.cgi?id=164720

Patch by Alex Christensen <achristensen@webkit.org> on 2016-11-14
Reviewed by Brady Eidson.

Source/WebCore:

This is adding to r208558 where we moved databaseIdentifier to SecurityOriginData so we
don't have to use SecurityOrigin in the DatabaseProcess. This is a step towards only using
SecurityOrigin (and the SchemeRegistry) in the WebProcess. SecurityOriginData is for other
processes and IPC. There should be no change in behaviour.

  • Modules/webdatabase/Database.cpp:

(WebCore::Database::Database):
(WebCore::Database::securityOrigin):

  • Modules/webdatabase/Database.h:
  • Modules/webdatabase/DatabaseContext.cpp:

(WebCore::DatabaseContext::securityOrigin):

  • Modules/webdatabase/DatabaseContext.h:
  • Modules/webdatabase/DatabaseManager.cpp:

(WebCore::DatabaseManager::tryToOpenDatabaseBackend):
(WebCore::DatabaseManager::fullPathForDatabase):
(WebCore::DatabaseManager::detailsForNameAndOrigin):

  • Modules/webdatabase/DatabaseManager.h:
  • Modules/webdatabase/DatabaseManagerClient.h:

(WebCore::DatabaseManagerClient::dispatchDidAddNewOrigin):

  • Modules/webdatabase/DatabaseTracker.cpp:

(WebCore::DatabaseTracker::hasAdequateQuotaForOrigin):
(WebCore::DatabaseTracker::canEstablishDatabase):
(WebCore::DatabaseTracker::retryCanEstablishDatabase):
(WebCore::DatabaseTracker::hasEntryForOriginNoLock):
(WebCore::DatabaseTracker::hasEntryForDatabase):
(WebCore::DatabaseTracker::maximumSize):
(WebCore::DatabaseTracker::originPath):
(WebCore::DatabaseTracker::fullPathForDatabaseNoLock):
(WebCore::DatabaseTracker::fullPathForDatabase):
(WebCore::DatabaseTracker::origins):
(WebCore::DatabaseTracker::databaseNamesNoLock):
(WebCore::DatabaseTracker::databaseNames):
(WebCore::DatabaseTracker::detailsForNameAndOrigin):
(WebCore::DatabaseTracker::setDatabaseDetails):
(WebCore::DatabaseTracker::addOpenDatabase):
(WebCore::DatabaseTracker::removeOpenDatabase):
(WebCore::DatabaseTracker::originLockFor):
(WebCore::DatabaseTracker::deleteOriginLockFor):
(WebCore::DatabaseTracker::usage):
(WebCore::DatabaseTracker::quotaNoLock):
(WebCore::DatabaseTracker::quota):
(WebCore::DatabaseTracker::setQuota):
(WebCore::DatabaseTracker::addDatabase):
(WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
(WebCore::DatabaseTracker::deleteOrigin):
(WebCore::DatabaseTracker::isDeletingDatabaseOrOriginFor):
(WebCore::DatabaseTracker::recordCreatingDatabase):
(WebCore::DatabaseTracker::doneCreatingDatabase):
(WebCore::DatabaseTracker::creatingDatabase):
(WebCore::DatabaseTracker::canDeleteDatabase):
(WebCore::DatabaseTracker::recordDeletingDatabase):
(WebCore::DatabaseTracker::doneDeletingDatabase):
(WebCore::DatabaseTracker::isDeletingDatabase):
(WebCore::DatabaseTracker::canDeleteOrigin):
(WebCore::DatabaseTracker::isDeletingOrigin):
(WebCore::DatabaseTracker::recordDeletingOrigin):
(WebCore::DatabaseTracker::doneDeletingOrigin):
(WebCore::DatabaseTracker::deleteDatabase):
(WebCore::DatabaseTracker::deleteDatabaseFile):
(WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
(WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):

  • Modules/webdatabase/DatabaseTracker.h:
  • Modules/webdatabase/SQLTransactionCoordinator.cpp:

(WebCore::getDatabaseIdentifier):

  • inspector/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::findStorageArea):

  • loader/EmptyClients.cpp:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::sessionStorage):

  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::maybeCreateFromDatabaseIdentifier): Deleted.
(WebCore::SecurityOrigin::createFromDatabaseIdentifier): Deleted.

  • page/SecurityOrigin.h:
  • page/SecurityOriginData.cpp:

(WebCore::SecurityOriginData::fromDatabaseIdentifier):

  • page/SecurityOriginData.h:

(WebCore::SecurityOriginData::SecurityOriginData):

  • storage/StorageArea.h:
  • storage/StorageEventDispatcher.cpp:

(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
(WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):

  • storage/StorageEventDispatcher.h:
  • storage/StorageNamespace.h:
  • storage/StorageNamespaceProvider.cpp:

(WebCore::StorageNamespaceProvider::localStorageArea):

Source/WebKit:

  • Storage/StorageAreaImpl.cpp:

(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::create):
(WebKit::StorageAreaImpl::dispatchStorageEvent):

  • Storage/StorageAreaImpl.h:
  • Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::clearOriginForDeletion):

  • Storage/StorageNamespaceImpl.h:
  • Storage/StorageTracker.cpp:

(WebKit::StorageTracker::origins):
(WebKit::StorageTracker::deleteOriginWithIdentifier):
(WebKit::StorageTracker::deleteOrigin):

  • Storage/StorageTracker.h:
  • Storage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::clearLocalStorageForOrigin):

  • Storage/WebStorageNamespaceProvider.h:

Source/WebKit/mac:

  • Storage/WebDatabaseManager.mm:

(-[WebDatabaseManager origins]):
(-[WebDatabaseManager databasesWithOrigin:]):
(-[WebDatabaseManager deleteOrigin:]):
(-[WebDatabaseManager deleteDatabase:withOrigin:]):

  • Storage/WebDatabaseManagerClient.h:
  • Storage/WebDatabaseManagerClient.mm:

(DidModifyOriginData::dispatchToMainThread):
(DidModifyOriginData::DidModifyOriginData):
(WebDatabaseManagerClient::dispatchDidModifyOrigin):
(WebDatabaseManagerClient::dispatchDidModifyDatabase):

  • Storage/WebDatabaseQuotaManager.mm:

(-[WebDatabaseQuotaManager usage]):
(-[WebDatabaseQuotaManager quota]):
(-[WebDatabaseQuotaManager setQuota:]):

  • Storage/WebStorageManager.mm:

(-[WebStorageManager origins]):
(-[WebStorageManager deleteOrigin:]):

  • Storage/WebStorageTrackerClient.h:
  • Storage/WebStorageTrackerClient.mm:

(WebStorageTrackerClient::dispatchDidModifyOrigin):

  • WebCoreSupport/WebSecurityOrigin.mm:

(-[WebSecurityOrigin usage]):
(-[WebSecurityOrigin quota]):
(-[WebSecurityOrigin setQuota:]):

Source/WebKit/win:

  • WebDatabaseManager.cpp:

(DidModifyOriginData::dispatchToMainThread):
(DidModifyOriginData::DidModifyOriginData):
(WebDatabaseManager::dispatchDidModifyOrigin):
(WebDatabaseManager::dispatchDidModifyDatabase):

  • WebDatabaseManager.h:
  • WebSecurityOrigin.cpp:

(WebSecurityOrigin::usage):
(WebSecurityOrigin::quota):
(WebSecurityOrigin::setQuota):

Source/WebKit2:

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::indexedDatabaseOrigins):

  • DatabaseProcess/DatabaseProcess.h:
  • NetworkProcess/NetworkProcess.cpp:

(WebKit::fetchDiskCacheEntries):

  • Shared/API/c/WKSecurityOriginRef.cpp:

(WKSecurityOriginCreateFromDatabaseIdentifier):

  • Shared/WebsiteData/WebsiteData.cpp:

(WebKit::WebsiteData::Entry::encode):
(WebKit::WebsiteData::Entry::decode):

  • Shared/WebsiteData/WebsiteData.h:
  • UIProcess/API/C/WKKeyValueStorageManager.cpp:

(WKKeyValueStorageManagerGetStorageDetailsByOrigin):

  • UIProcess/Storage/LocalStorageDatabaseTracker.cpp:

(WebKit::LocalStorageDatabaseTracker::deleteDatabasesModifiedSince):
(WebKit::LocalStorageDatabaseTracker::origins):

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::enumerateMediaDevicesForFrame):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::reachedApplicationCacheOriginQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::removeData):
(WebKit::WebsiteDataStore::mediaKeyOrigins):

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetDatabaseQuota):

  • WebProcess/MediaCache/WebMediaKeyStorageManager.cpp:

(WebKit::WebMediaKeyStorageManager::getMediaKeyOrigins):

  • WebProcess/Storage/StorageAreaImpl.cpp:

(WebKit::StorageAreaImpl::create):
(WebKit::StorageAreaImpl::StorageAreaImpl):
(WebKit::StorageAreaImpl::securityOrigin):

  • WebProcess/Storage/StorageAreaImpl.h:
  • WebProcess/Storage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):

  • WebProcess/Storage/StorageAreaMap.h:

(WebKit::StorageAreaMap::securityOrigin):

  • WebProcess/Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::didDestroyStorageAreaMap):
(WebKit::StorageNamespaceImpl::storageArea):

  • WebProcess/Storage/StorageNamespaceImpl.h:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::exceededDatabaseQuota):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::fetchWebsiteData):

8:28 PM Changeset in webkit [208726] by caitp@igalia.com
  • 7 edits
    2 adds in trunk

[JSC] do not reference AwaitExpression Promises in async function Promise chain
https://bugs.webkit.org/show_bug.cgi?id=164753

Reviewed by Yusuke Suzuki.

JSTests:

  • asyncFunctionTests.yaml:
  • stress/async-await-long-loop.js: Added.

(shouldBe):
(async.longLoop):

  • stress/async-await-throw-loop.js: Added.

(shouldBe):
(async.thrower):
(async.throwLoop):

Source/JavaScriptCore:

Previously, long-running async functions which contained many AwaitExpressions
would allocate and retain references to intermediate Promise objects for each await,
resulting in a memory leak.

To mitigate this leak, a reference to the original Promise (and its resolve and reject
functions) associated with the async function are kept, and passed to each call to
@asyncFunctionResume, while intermediate Promises are discarded. This is done by adding
a new Register to the BytecodeGenerator to hold the PromiseCapability object associated
with an async function wrapper. The capability is used to reject the Promise if an
exception is thrown during parameter initialization, and is used to store the resulting
value once the async function has terminated.

  • builtins/AsyncFunctionPrototype.js:

(globalPrivate.asyncFunctionResume):

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::promiseCapabilityRegister):

  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionNode::emitBytecode):

8:02 PM Changeset in webkit [208725] by Joseph Pecoraro
  • 31 edits
    12 adds in trunk

Web Inspector: Worker debugging should pause all targets and view call frames in all targets
https://bugs.webkit.org/show_bug.cgi?id=164305
<rdar://problem/29056192>

Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

  • inspector/InjectedScriptSource.js:

(InjectedScript.prototype._propertyDescriptors):
Accessing proto does a ToThis(...) conversion on the receiver.
In the case of GlobalObjects (such as WorkerGlobalScope when paused)
this would return undefined and throw an exception. We can use
Object.getPrototypeOf to avoid that conversion and possible error.

  • inspector/protocol/Debugger.json:

Provide a new way to effectively resume + pause immediately.
This must be implemented on the backend to correctly synchronize
the resuming and pausing.

  • inspector/agents/InspectorDebuggerAgent.h:
  • inspector/agents/InspectorDebuggerAgent.cpp:

(Inspector::InspectorDebuggerAgent::continueUntilNextRunLoop):
Treat this as resume and pause. Resume now, and trigger
a pause if the VM becomes idle and we didn't pause before then
(such as hitting a breakpoint after we resumed).

(Inspector::InspectorDebuggerAgent::pause):
(Inspector::InspectorDebuggerAgent::resume):
(Inspector::InspectorDebuggerAgent::schedulePauseOnNextStatement):
(Inspector::InspectorDebuggerAgent::cancelPauseOnNextStatement):
Clean up and correct pause on next statement logic.

(Inspector::InspectorDebuggerAgent::registerIdleHandler):
(Inspector::InspectorDebuggerAgent::willStepAndMayBecomeIdle):
(Inspector::InspectorDebuggerAgent::didBecomeIdle):
(Inspector::InspectorDebuggerAgent::didBecomeIdleAfterStepping): Deleted.
The idle handler may now also trigger a pause in the case
where continueUntilNextRunLoop resumed and wants to pause.

(Inspector::InspectorDebuggerAgent::didPause):
Eliminate the useless didPause. The DOMDebugger was keeping track
of its own state that was worse then the state in DebuggerAgent.

Source/WebCore:

Tests: inspector/debugger/continueUntilNextRunLoop

inspector/worker/debugger-multiple-targets-pause

  • workers/WorkerMessagingProxy.cpp:

(WebCore::WorkerMessagingProxy::postMessageToPageInspector):
Switch from postTask (callOnMainThread) to RunLoop::main().dispatch so
that a paused Worker can send Inspector protocol messages responses
back through the Main Page's InspectorWorkerAgent even if the Page
itself is paused and MainThread callbacks are paused.

  • workers/WorkerRunLoop.h:

(WebCore::WorkerRunLoop::isNested):

  • workers/WorkerRunLoop.cpp:

(WebCore::WorkerRunLoop::runInMode):
When running a nested WorkerRunLoop, running inspector debugger
commands, we should not fire timers on the Worker. Timers would
then be happening out of order and would not be debuggable.

  • dom/EventTarget.cpp:

(WebCore::EventTarget::fireEventListeners):

  • inspector/InspectorDOMDebuggerAgent.cpp:

(WebCore::InspectorDOMDebuggerAgent::pauseOnNativeEventIfNeeded):
(WebCore::InspectorDOMDebuggerAgent::clear):
(WebCore::InspectorDOMDebuggerAgent::didPause): Deleted.

  • inspector/InspectorDOMDebuggerAgent.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::willHandleEventImpl):
(WebCore::InspectorInstrumentation::didFireTimerImpl):
(WebCore::InspectorInstrumentation::didHandleEventImpl): Deleted.
(WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent): Deleted.

  • inspector/InspectorInstrumentation.h:

(WebCore::InspectorInstrumentation::willHandleEvent):
(WebCore::InspectorInstrumentation::didHandleEvent): Deleted.
Remove unnecessary code where WebCore is trying to keep track
of pause on next statement but that state is already more
accurately provided by InspectorDebuggerAgent.

Source/WebInspectorUI:

This implements a policy where, when one Target ("Thread") pauses
the frontend triggers a pause in all other Targets. The intended
user experience is "all threads pause" whenever the frontend shows
the debugger paused UI.

DebuggerManager has a few straight forward changes:

  • The paused state reflects if any target is paused.
  • The Paused Event is fired when going from !paused -> paused. This means when the first target pauses.
  • The Resumed Event is fired when going from paused -> !paused. This means only after all targets have resumed.
  • The CallFrameDidChange Event now includes the Target that updated.

When a Target first pauses the frontend then immediately pauses all
other Targets. This puts them into a "pausing" state (we display as
Idle) and they will pause as soon as they start executing JavaScript.

When a Target steps the "paused" state isn't changing. So this is
just a CallFramesDidChange update.

When clicking Resume we resume all targets. This is will be the normal,
expected way users resume execution. Note that one of the threads may
then hit a breakpoint and re-pause all threads.

Sometimes when multiple threads are paused you may want to run an
individual thread to completion but keep other threads paused. There
is a context menu on the ThreadTreeElement to resume just that
single thread. It will continue and pause for its next run loop.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Images/Thread.svg: Added.
  • UserInterface/Images/gtk/Thread.svg: Added.
  • UserInterface/Main.html:

New strings and files.

  • UserInterface/Base/Main.js:

(WebInspector.loaded):

  • UserInterface/Test/Test.js:

(WebInspector.loaded):
Place the TargetManager first since other managers may want to listen
for TargetAdded / TargetRemoved events.

  • UserInterface/Controllers/DebuggerManager.js:

(WebInspector.DebuggerManager.prototype.get paused):
This is now a computed state.

(WebInspector.DebuggerManager.prototype.pause):
(WebInspector.DebuggerManager.prototype.resume):
Affect all targets.

(WebInspector.DebuggerManager.prototype.stepOver):
(WebInspector.DebuggerManager.prototype.stepInto):
(WebInspector.DebuggerManager.prototype.stepOut):
(WebInspector.DebuggerManager.prototype.reset):
Update to use the paused computed property.

(WebInspector.DebuggerManager.prototype.continueUntilNextRunLoop):
Issue the new Debugger.continueUntilNextRunLoop command
on a given target.

(WebInspector.DebuggerManager.prototype.initializeTarget):
When a new Target is created and we were already paused,
then start that Worker in a paused state.

(WebInspector.DebuggerManager.prototype.debuggerDidPause):
Recover from bad cases where the backend informs the frontend about
internal JavaScript that it shouldn't know about. Legacy backend do
this but also there are corner cases we need to handle.
Dispatch events appropriately now that multiple targets may be paused.

(WebInspector.DebuggerManager.prototype._didResumeInternal):
Dispatch events appropriately now that multiple targets may be paused.

(WebInspector.DebuggerManager.prototype._targetRemoved):
Remove debugger data for targets that go away to avoid leaks.

  • UserInterface/Models/DebuggerData.js:

(WebInspector.DebuggerData):
(WebInspector.DebuggerData.prototype.get paused):
(WebInspector.DebuggerData.prototype.get pausing):
Move some more per-Target state into DebuggerData.

(WebInspector.DebuggerData.prototype.pauseIfNeeded):
(WebInspector.DebuggerData.prototype.resumeIfNeeded):
(WebInspector.DebuggerData.prototype.continueUntilNextRunLoop):
These should only be called by DebuggerManager. They correctly
update the state of the DebuggerData for this Target, and also
issue the underlying command to the target.

(WebInspector.DebuggerData.prototype.updateForPause):
(WebInspector.DebuggerData.prototype.updateForResume):
Handle a special case where continueUntilNextRunLoop triggers
an invisible "pause" on the backend that we should mirror.

  • UserInterface/Protocol/Target.js:

(WebInspector.MainTarget):
(WebInspector.MainTarget.prototype.get displayName):
(WebInspector.MainTarget.prototype.initialize):
Better display names.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidPause):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerDidResume):
(WebInspector.DebuggerSidebarPanel.prototype._updateSingleThreadCallStacks):
(WebInspector.DebuggerSidebarPanel.prototype._selectActiveCallFrameTreeElement):
(WebInspector.DebuggerSidebarPanel.prototype._showSingleThreadCallStacks):
(WebInspector.DebuggerSidebarPanel.prototype._showMultipleThreadCallStacks):
(WebInspector.DebuggerSidebarPanel.prototype._findThreadTreeElementForTarget):
(WebInspector.DebuggerSidebarPanel.prototype._targetAdded):
(WebInspector.DebuggerSidebarPanel.prototype._targetRemoved):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerCallFramesDidChange):
(WebInspector.DebuggerSidebarPanel.prototype._debuggerActiveCallFrameDidChange):
The DebuggerSidebar still has a single "Call Stacks" section, but maintains
two TreeOutlines and only shows one at a time. The Single Thread view shows
a flat list of the call frames for the Main Target when it is the only target.
The Multiple Threads view shows a list of Threads and their call frames.
We always keep both up to date, because we may need to swap between them
purely as Targets are added / removed. There is a bit of extra logic to
ensure we select elements properly based only on the visible tree outline.

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype.didAppendConsoleMessageView):
When evaluating in a particular target, "runAfterPendingDispatches"
must wait for all other commands in that particular target to have
completed. So use the target specific version.

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel.prototype._isTreeElementWithoutRepresentedObject):
Gracefully handle a few more TreeElements without a represented object.

  • UserInterface/Views/IdleTreeElement.css: Added.

(.details-section.call-stack .idle .icon):

  • UserInterface/Views/IdleTreeElement.js: Added.

(WebInspector.IdleTreeElement):
Very basic tree element to encapsulate an Idle call frame with an
empty represented object.

  • UserInterface/Views/ThreadTreeElement.css: Added.

(.details-section.call-stack .thread .icon):

  • UserInterface/Views/ThreadTreeElement.js: Added.

(WebInspector.ThreadTreeElement):
(WebInspector.ThreadTreeElement.prototype.get target):
(WebInspector.ThreadTreeElement.prototype.refresh):
(WebInspector.ThreadTreeElement.prototype.onattach):
(WebInspector.ThreadTreeElement.prototype.oncontextmenu):
ThreadTreeElement has no represented object, but makes it easy
to refresh a list of CallFrameTreeElements for a given target.

LayoutTests:

  • inspector/debugger/continueUntilNextRunLoop-expected.txt: Added.
  • inspector/debugger/continueUntilNextRunLoop.html: Added.

New test for new Debugger.continueUntilNextRunLoop protocol method.

  • inspector/worker/debugger-multiple-targets-pause-expected.txt: Added.
  • inspector/worker/debugger-multiple-targets-pause.html: Added.
  • inspector/worker/resources/worker-debugger-thread-1.js: Added.
  • inspector/worker/resources/worker-debugger-thread-2.js: Added.

This tests uses a 250ms timeout because we have to have the worker thread
evaluate some work and trigger a pause on other threads before their work
starts. On debug builds, shorter times, like 100ms, would not be enough.

  • inspector/worker/debugger-pause-expected.txt:
  • inspector/worker/debugger-pause.html:

Now that all threads pause, the first InspectorTest.log evaluates JavaScript on
the page and causes a pause. So make the first log empty to keep the test unchanged.

  • inspector/worker/runtime-basic-expected.txt:
  • inspector/unit-tests/target-manager-expected.txt:

Updated display name of the mainTarget.

6:42 PM Changeset in webkit [208724] by mmaxfield@apple.com
  • 10 edits
    2 adds in trunk

[WebGL2] Teach WebGLRenderingContextBase about new texture internal formats
https://bugs.webkit.org/show_bug.cgi?id=164525

Reviewed by Dean Jackson.

Source/WebCore:

Test: fast/canvas/webgl/webgl2-texture-upload-enums.html

This patch migrates the existing WebGL calls texImage2D(), texSubImage2D(),
and readPixels() to understand the new WebGL 2 texture types. In WebGL1, the
format and the internalFormat were required to be the same, and we had this
assumption baked into many places in these functions. In WebGL 2, those two
values are often different, which means I had to fix all of these assumptions
in our code. Also, rather than have two completely separate parallel
implementations of these functions, a more forward-looking approach is to
have one implementation which has a few checks to isWebGL1() in strategic
places. (This way, bugs only have to be fixed in a single place). Therefore,
this patch deletes the WebGL 2 versions of these functions.

  • html/canvas/WebGL2RenderingContext.cpp: These functions are moved to

WebGLRenderingContextBase.
(WebCore::WebGL2RenderingContext::isIntegerFormat):
(WebCore::WebGL2RenderingContext::copyTexImage2D): Deleted.
(WebCore::WebGL2RenderingContext::texSubImage2DBase): Deleted.
(WebCore::WebGL2RenderingContext::texSubImage2DImpl): Deleted.
(WebCore::WebGL2RenderingContext::texSubImage2D): Deleted.
(WebCore::WebGL2RenderingContext::validateTexFuncParameters): Deleted.
(WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Deleted.
(WebCore::WebGL2RenderingContext::validateTexFuncData): Deleted.

  • html/canvas/WebGL2RenderingContext.h: Moved function implementations to

WebGLRenderingContextBase.

  • html/canvas/WebGLRenderingContext.cpp: Ditto.

(WebCore::WebGLRenderingContext::copyTexImage2D): Deleted.
(WebCore::WebGLRenderingContext::texSubImage2DBase): Deleted.
(WebCore::WebGLRenderingContext::texSubImage2DImpl): Deleted.
(WebCore::WebGLRenderingContext::texSubImage2D): Deleted.
(WebCore::WebGLRenderingContext::validateTexFuncParameters): Deleted.
(WebCore::WebGLRenderingContext::validateTexFuncFormatAndType): Deleted.
(WebCore::WebGLRenderingContext::validateTexFuncData): Deleted.

  • html/canvas/WebGLRenderingContext.h: Moved function implementations to

WebGLRenderingContextBase.

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::WebGLRenderingContextBase::validateSettableTexInternalFormat):
Teach about new depth texture formats.
(WebCore::WebGLRenderingContextBase::copyTexSubImage2D): Rename
"internalformat" to "internalFormat". Teach about the distinction between
format and internalFormat. When pre-filling textures with 0s to work around
buggy drivers, we need a new way of knowing which format/type arguments to
pass to texSubImage2D() which are compatible with the texture's internal
format. The implementation of this function was added to GraphicsContext3D
and is called here.
(WebCore::WebGLRenderingContextBase::generateMipmap): Teach about the
distinction between format and internalFormat.
(WebCore::internalFormatTheme): This is used so readPixels() knows what
kind of format/type arguments are compatible with the texture's internal
format.
(WebCore::numberOfComponentsForFormat): Ditto.
(WebCore::numberOfComponentsForInternalFormat): Ditto.
(WebCore::WebGLRenderingContextBase::readPixels): Many more format/type
combinations are required in order to test the various new kinds of
textures.
(WebCore::WebGLRenderingContextBase::texImage2DBase): Rename internalformat
to internalFormat, and teach about the distinction between format and
internalFormat.
(WebCore::WebGLRenderingContextBase::validateTexFunc): Ditto.
(WebCore::WebGLRenderingContextBase::texImage2D): Ditto.
(WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Moved from
WebGLRenderingContext.
(WebCore::WebGLRenderingContextBase::texSubImage2D): Ditto.
(WebCore::WebGLRenderingContextBase::validateArrayBufferType): Ditto.
(WebCore::WebGLRenderingContextBase::validateTexFuncData): Ditto.
(WebCore::WebGLRenderingContextBase::validateTexFuncParameters): Ditto.
(WebCore::WebGLRenderingContextBase::validateTexFuncFormatAndType): Ditto.
This is the main function where the new internalFormats are dealt with.
The OpenGL ES spec lists a table of all the internalFormats and all their
compatible format/type values. This table is entered into this function to
check that the combinations are correct.
(WebCore::WebGLRenderingContextBase::texSubImage2DBase): Moved from
WebGLRenderingContext.
(WebCore::WebGLRenderingContextBase::copyTexImage2D): Ditto.
(WebCore::WebGLRenderingContextBase::validateSettableTexFormat): Deleted.

  • html/canvas/WebGLRenderingContextBase.h: No longer overrides virtual

functions.

  • platform/graphics/GraphicsContext3D.cpp:

(WebCore::GraphicsContext3D::computeFormatAndTypeParameters): Because
this is inside GraphicsContext3D, it doesn't need any isWebGL1() checks.
Teach about new enums.
(WebCore::GraphicsContext3D::possibleFormatAndTypeForInternalFormat):
Ditto.
(WebCore::GraphicsContext3D::packImageData):
(WebCore::GraphicsContext3D::packPixels): It is possible to try to
copy data from a video into one of these new formats. Currently, we
implement this by swizzling on the CPU. Rather than implementing all the
swizzling functions in this patch (which would make this patch much
larger), simply bail in this case. We will implement this later.
(WebCore::GraphicsContext3D::getClearBitsByFormat): Update.

  • platform/graphics/GraphicsContext3D.h:

(WebCore::GraphicsContext3D::hasAlpha): Ditto.
(WebCore::GraphicsContext3D::hasColor): Ditto.

LayoutTests:

Test texture types without drawing. Instead, attach a texture to a framebuffer and
use readPixels() to make sure the texture retains its data.

  • fast/canvas/webgl/webgl2-texture-upload-enums-expected.txt: Added.
  • fast/canvas/webgl/webgl2-texture-upload-enums.html: Added.
6:20 PM Changeset in webkit [208723] by fpizlo@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, fix cloop.

  • runtime/JSCellInlines.h:
6:19 PM Changeset in webkit [208722] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Scrolling when zoomed doesn't always use the correct layout viewport
https://bugs.webkit.org/show_bug.cgi?id=164756

Reviewed by Dean Jackson.

The scrolling thread was always using the layout viewport rect pushed onto it and
never computing a new one, so when scrolling around after zooming position:fixed
elements would not get the expected visual viewport behavior.

Fix by having ScrollingTreeFrameScrollingNode updating its notion of the layout viewport
on scrolls.

Not testable because we can't dump the scrolling tree on Mac (yet).

  • page/scrolling/ScrollingTreeFrameScrollingNode.h:

(WebCore::ScrollingTreeFrameScrollingNode::setLayoutViewport):

  • page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:

(WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):

5:51 PM Changeset in webkit [208721] by fpizlo@apple.com
  • 2 edits in trunk/PerformanceTests

Unreviewed, revert unintended change.

  • ES6SampleBench/Air/benchmark.js:
5:49 PM Changeset in webkit [208720] by fpizlo@apple.com
  • 72 edits
    1 add in trunk

The GC should be optionally concurrent and disabled by default
https://bugs.webkit.org/show_bug.cgi?id=164454

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This started out as a patch to have the GC scan the stack at the end, and then the
outage happened and I decided to pick a more aggresive target: give the GC a concurrent
mode that can be enabled at runtime, and whose only effect is that it turns on the
ResumeTheWorldScope. This gives our GC a really intuitive workflow: by default, the GC
thread is running solo with the world stopped and the parallel markers converged and
waiting. We have a parallel work scope to enable the parallel markers and now we have a
ResumeTheWorldScope that will optionally resume the world and then stop it again.

It's easy to make a concurrent GC that always instantly crashes. I can't promise that
this one won't do that when you run it. I set a specific goal: I wanted to do >10
concurrent GCs in debug mode with generations, optimizing JITs, and parallel marking
disabled.

To reach this milestone, I needed to do a bunch of stuff:

  • The mutator needs a separate mark stack for the barrier, since it will mutate this stack concurrently to the collector's slot visitors.


  • The use of CellState to indicate whether an object is being scanned the first time or a subsequent time was racy. It fails spectacularly when a barrier is fired at the same time as visitChildren is running or if the barrier runs at the same time as the GC marks the same object. So, I split SlotVisitor's mark stacks. It's now the case that you know why you're being scanned by looking at which stack you came off of.


  • All of root marking must be in the collector fixpoint. I renamed markRoots to markToFixpoint. They say concurrency is hard, but the collector looks more intuitive this way. We never gained anything from forcing people to make a choice between scanning something in the fixpoint versus outside of it. Because root scanning is cheap, we can afford to do it repeatedly, which means all root scanning can now do constraint-based marking (like: I'll mark you if that thing is marked).


  • JSObject::visitChildren's scanning of the butterfly raced with property additions, indexed storage transitions and resizing, and a bunch of miscellaneous dirty butterfly reshaping functions - like the one that flattens a dictionary and some sneaky ArrayStorage transformations. Many of these can be fixed by using store-store fences in the mutator and load-load fences in the collector. I've adopted the rule that the collector must always see either a butterfly and structure that match or a newer butterfly with an older structure, where their age is just one transition apart. This can be achieved with fences. For the cases where it breaks down, I added a lock to every JSCell. This is a full-fledged WTF lock that we sneak into two available bits in the indexingType. See the WTF ChangeLog for details.


The mutator fencing rules are as follows:


  • Store-store fence before and after setting the butterfly.
  • Store-store fence before setting structure if you had changed the shape of the butterfly.
  • Store-store fence after initializing all fields in an allocation.


  • A dictionary Structure can change in strange ways while the GC is trying to scan it. So, JSObject::visitChildren will now grab the object's structure's lock if the object's structure is a dictionary. Dictionary structures are 1:1 with their object, so this does not reduce GC parallelism (super unlikely that the GC will simultaneously scan an object from two threads).


  • The GC can blow away a Structure's property table at any time. As a small consolation, it's now holding the Structure's lock when it does so. But there was tons of code in Structure that uses DeferGC to prevent the GC from blowing away the property table. This doesn't work with concurrent GC, since DeferGC only means that the GC won't run its safepoint (i.e. stop-the-world code) in the DeferGC region. It will still do marking and it was the Structure::visitChildren that would delete the table. It turns out that Structure's reliance on the property table not being deleted was the product of code rot. We already had functions that would materialize the table on demand. We were simply making the mistake of saying:


structure->materializePropertyMap();
...
structure->propertyTable()->things


Instead of saying:


PropertyTable* table = structure->ensurePropertyTable();
...
table->things


Switching the code to use the latter idiom allowed me to simplify the code a lot while
fixing the race.


  • The LLInt's get_by_val handling was broken because the indexing shape constants were wrong. Once I started putting more things into the IndexingType, that started causing crashes for me. So I fixed LLInt. That turned out to be a lot of work, since that code had rotted in subtle ways.


This is a speed-up in SunSpider, probably because of the LLInt fix. This is neutral on
Octane and Kraken. It's a smaller slow-down on LongSpider, but I think we can ignore
that (we don't view LongSpider as an official benchmark). By default, the concurrent GC
is disabled: in all of the places where it would have resumed the world to run marking
concurrently to the mutator, it will just skip the resume step. When you enable
concurrent GC (--useConcurrentGC=true), it can sometimes run Octane/splay to completion.
It seems to perform quite well: on my machine, it improves both splay-throughput and
splay-latency. It's probably unstable for other programs.

  • API/JSVirtualMachine.mm:

(-[JSVirtualMachine isOldExternalObject:]):

  • assembler/MacroAssemblerARMv7.h:

(JSC::MacroAssemblerARMv7::storeFence):

  • bytecode/InlineAccess.cpp:

(JSC::InlineAccess::dumpCacheSizesAndCrash):
(JSC::InlineAccess::generateSelfPropertyAccess):
(JSC::InlineAccess::generateArrayLength):

  • bytecode/ObjectAllocationProfile.h:

(JSC::ObjectAllocationProfile::offsetOfInlineCapacity):
(JSC::ObjectAllocationProfile::ObjectAllocationProfile):
(JSC::ObjectAllocationProfile::initialize):
(JSC::ObjectAllocationProfile::inlineCapacity):
(JSC::ObjectAllocationProfile::clear):

  • bytecode/PolymorphicAccess.cpp:

(JSC::AccessCase::generateWithGuard):
(JSC::AccessCase::generateImpl):

  • dfg/DFGArrayifySlowPathGenerator.h:
  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGOSRExitCompiler32_64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGOSRExitCompiler64.cpp:

(JSC::DFG::OSRExitCompiler::compileExit):

  • dfg/DFGOperations.cpp:
  • dfg/DFGPlan.cpp:

(JSC::DFG::Plan::markCodeBlocks):
(JSC::DFG::Plan::rememberCodeBlocks):

  • dfg/DFGPlan.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::emitAllocateRawObject):
(JSC::DFG::SpeculativeJIT::checkArray):
(JSC::DFG::SpeculativeJIT::arrayify):
(JSC::DFG::SpeculativeJIT::compileMakeRope):
(JSC::DFG::SpeculativeJIT::compileNewFunctionCommon):
(JSC::DFG::SpeculativeJIT::compileCreateActivation):
(JSC::DFG::SpeculativeJIT::compileCreateDirectArguments):
(JSC::DFG::SpeculativeJIT::compileSpread):
(JSC::DFG::SpeculativeJIT::compileAllocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileReallocatePropertyStorage):
(JSC::DFG::SpeculativeJIT::compileNewStringObject):
(JSC::DFG::SpeculativeJIT::compileNewTypedArray):
(JSC::DFG::SpeculativeJIT::compileStoreBarrier):

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGTierUpCheckInjectionPhase.cpp:

(JSC::DFG::TierUpCheckInjectionPhase::run):

  • dfg/DFGWorklist.cpp:

(JSC::DFG::Worklist::markCodeBlocks):
(JSC::DFG::Worklist::rememberCodeBlocks):
(JSC::DFG::markCodeBlocks):
(JSC::DFG::completeAllPlansForVM):
(JSC::DFG::rememberCodeBlocks):

  • dfg/DFGWorklist.h:
  • ftl/FTLAbstractHeapRepository.cpp:

(JSC::FTL::AbstractHeapRepository::AbstractHeapRepository):
(JSC::FTL::AbstractHeapRepository::computeRangesAndDecorateInstructions):

  • ftl/FTLAbstractHeapRepository.h:
  • ftl/FTLJITCode.cpp:

(JSC::FTL::JITCode::~JITCode):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compilePutStructure):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateDirectArguments):
(JSC::FTL::DFG::LowerDFGToB3::compileCreateRest):
(JSC::FTL::DFG::LowerDFGToB3::compileNewObject):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArray):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileSpread):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayBuffer):
(JSC::FTL::DFG::LowerDFGToB3::compileNewArrayWithSize):
(JSC::FTL::DFG::LowerDFGToB3::compileNewTypedArray):
(JSC::FTL::DFG::LowerDFGToB3::compileMakeRope):
(JSC::FTL::DFG::LowerDFGToB3::compileMultiPutByOffset):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeNewObject):
(JSC::FTL::DFG::LowerDFGToB3::compileMaterializeCreateActivation):
(JSC::FTL::DFG::LowerDFGToB3::splatWords):
(JSC::FTL::DFG::LowerDFGToB3::allocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::reallocatePropertyStorage):
(JSC::FTL::DFG::LowerDFGToB3::allocateObject):
(JSC::FTL::DFG::LowerDFGToB3::isArrayType):
(JSC::FTL::DFG::LowerDFGToB3::emitStoreBarrier):
(JSC::FTL::DFG::LowerDFGToB3::mutatorFence):
(JSC::FTL::DFG::LowerDFGToB3::setButterfly):

  • ftl/FTLOSRExitCompiler.cpp:

(JSC::FTL::compileStub):

  • ftl/FTLOutput.cpp:

(JSC::FTL::Output::signExt32ToPtr):
(JSC::FTL::Output::fence):

  • ftl/FTLOutput.h:
  • heap/CellState.h:
  • heap/GCSegmentedArray.h:
  • heap/Heap.cpp:

(JSC::Heap::ResumeTheWorldScope::ResumeTheWorldScope):
(JSC::Heap::ResumeTheWorldScope::~ResumeTheWorldScope):
(JSC::Heap::Heap):
(JSC::Heap::~Heap):
(JSC::Heap::harvestWeakReferences):
(JSC::Heap::finalizeUnconditionalFinalizers):
(JSC::Heap::completeAllJITPlans):
(JSC::Heap::markToFixpoint):
(JSC::Heap::gatherStackRoots):
(JSC::Heap::beginMarking):
(JSC::Heap::visitConservativeRoots):
(JSC::Heap::visitCompilerWorklistWeakReferences):
(JSC::Heap::updateObjectCounts):
(JSC::Heap::endMarking):
(JSC::Heap::addToRememberedSet):
(JSC::Heap::collectInThread):
(JSC::Heap::stopTheWorld):
(JSC::Heap::resumeTheWorld):
(JSC::Heap::setGCDidJIT):
(JSC::Heap::setNeedFinalize):
(JSC::Heap::setMutatorWaiting):
(JSC::Heap::clearMutatorWaiting):
(JSC::Heap::finalize):
(JSC::Heap::flushWriteBarrierBuffer):
(JSC::Heap::writeBarrierSlowPath):
(JSC::Heap::canCollect):
(JSC::Heap::reportExtraMemoryVisited):
(JSC::Heap::reportExternalMemoryVisited):
(JSC::Heap::notifyIsSafeToCollect):
(JSC::Heap::markRoots): Deleted.
(JSC::Heap::visitExternalRememberedSet): Deleted.
(JSC::Heap::visitSmallStrings): Deleted.
(JSC::Heap::visitProtectedObjects): Deleted.
(JSC::Heap::visitArgumentBuffers): Deleted.
(JSC::Heap::visitException): Deleted.
(JSC::Heap::visitStrongHandles): Deleted.
(JSC::Heap::visitHandleStack): Deleted.
(JSC::Heap::visitSamplingProfiler): Deleted.
(JSC::Heap::visitTypeProfiler): Deleted.
(JSC::Heap::visitShadowChicken): Deleted.
(JSC::Heap::traceCodeBlocksAndJITStubRoutines): Deleted.
(JSC::Heap::visitWeakHandles): Deleted.
(JSC::Heap::flushOldStructureIDTables): Deleted.
(JSC::Heap::stopAllocation): Deleted.

  • heap/Heap.h:

(JSC::Heap::collectorSlotVisitor):
(JSC::Heap::mutatorMarkStack):
(JSC::Heap::mutatorShouldBeFenced):
(JSC::Heap::addressOfMutatorShouldBeFenced):
(JSC::Heap::slotVisitor): Deleted.
(JSC::Heap::notifyIsSafeToCollect): Deleted.
(JSC::Heap::barrierShouldBeFenced): Deleted.
(JSC::Heap::addressOfBarrierShouldBeFenced): Deleted.

  • heap/MarkStack.cpp:

(JSC::MarkStackArray::transferTo):

  • heap/MarkStack.h:
  • heap/MarkedAllocator.cpp:

(JSC::MarkedAllocator::tryAllocateIn):

  • heap/MarkedBlock.cpp:

(JSC::MarkedBlock::MarkedBlock):
(JSC::MarkedBlock::Handle::specializedSweep):
(JSC::MarkedBlock::Handle::sweep):
(JSC::MarkedBlock::Handle::sweepHelperSelectMarksMode):
(JSC::MarkedBlock::Handle::stopAllocating):
(JSC::MarkedBlock::Handle::resumeAllocating):
(JSC::MarkedBlock::aboutToMarkSlow):
(JSC::MarkedBlock::Handle::didConsumeFreeList):
(JSC::SetNewlyAllocatedFunctor::SetNewlyAllocatedFunctor): Deleted.
(JSC::SetNewlyAllocatedFunctor::operator()): Deleted.

  • heap/MarkedBlock.h:
  • heap/MarkedSpace.cpp:

(JSC::MarkedSpace::resumeAllocating):

  • heap/SlotVisitor.cpp:

(JSC::SlotVisitor::SlotVisitor):
(JSC::SlotVisitor::~SlotVisitor):
(JSC::SlotVisitor::reset):
(JSC::SlotVisitor::clearMarkStacks):
(JSC::SlotVisitor::appendJSCellOrAuxiliary):
(JSC::SlotVisitor::setMarkedAndAppendToMarkStack):
(JSC::SlotVisitor::appendToMarkStack):
(JSC::SlotVisitor::appendToMutatorMarkStack):
(JSC::SlotVisitor::visitChildren):
(JSC::SlotVisitor::donateKnownParallel):
(JSC::SlotVisitor::drain):
(JSC::SlotVisitor::drainFromShared):
(JSC::SlotVisitor::containsOpaqueRoot):
(JSC::SlotVisitor::donateAndDrain):
(JSC::SlotVisitor::mergeOpaqueRoots):
(JSC::SlotVisitor::dump):
(JSC::SlotVisitor::clearMarkStack): Deleted.
(JSC::SlotVisitor::opaqueRootCount): Deleted.

  • heap/SlotVisitor.h:

(JSC::SlotVisitor::collectorMarkStack):
(JSC::SlotVisitor::mutatorMarkStack):
(JSC::SlotVisitor::isEmpty):
(JSC::SlotVisitor::bytesVisited):
(JSC::SlotVisitor::markStack): Deleted.
(JSC::SlotVisitor::bytesCopied): Deleted.

  • heap/SlotVisitorInlines.h:

(JSC::SlotVisitor::reportExtraMemoryVisited):
(JSC::SlotVisitor::reportExternalMemoryVisited):

  • jit/AssemblyHelpers.cpp:

(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):

  • jit/AssemblyHelpers.h:

(JSC::AssemblyHelpers::emitStoreStructureWithTypeInfo):
(JSC::AssemblyHelpers::barrierStoreLoadFence):
(JSC::AssemblyHelpers::mutatorFence):
(JSC::AssemblyHelpers::storeButterfly):
(JSC::AssemblyHelpers::jumpIfMutatorFenceNotNeeded):
(JSC::AssemblyHelpers::emitInitializeInlineStorage):
(JSC::AssemblyHelpers::emitInitializeOutOfLineStorage):
(JSC::AssemblyHelpers::jumpIfBarrierStoreLoadFenceNotNeeded): Deleted.

  • jit/JITInlines.h:

(JSC::JIT::emitArrayProfilingSiteWithCell):

  • jit/JITOperations.cpp:
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_to_scope):
(JSC::JIT::emit_op_put_to_arguments):

  • llint/LLIntData.cpp:

(JSC::LLInt::Data::performAssertions):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/ButterflyInlines.h:

(JSC::Butterfly::create):
(JSC::Butterfly::createOrGrowPropertyStorage):

  • runtime/ConcurrentJITLock.h:

(JSC::GCSafeConcurrentJITLocker::NoDefer::NoDefer): Deleted.

  • runtime/GenericArgumentsInlines.h:

(JSC::GenericArguments<Type>::getOwnPropertySlotByIndex):
(JSC::GenericArguments<Type>::putByIndex):

  • runtime/IndexingType.h:
  • runtime/JSArray.cpp:

(JSC::JSArray::unshiftCountSlowCase):
(JSC::JSArray::unshiftCountWithArrayStorage):

  • runtime/JSCell.h:

(JSC::JSCell::InternalLocker::InternalLocker):
(JSC::JSCell::InternalLocker::~InternalLocker):
(JSC::JSCell::atomicCompareExchangeCellStateWeakRelaxed):
(JSC::JSCell::atomicCompareExchangeCellStateStrong):
(JSC::JSCell::indexingTypeAndMiscOffset):
(JSC::JSCell::indexingTypeOffset): Deleted.

  • runtime/JSCellInlines.h:

(JSC::JSCell::JSCell):
(JSC::JSCell::finishCreation):
(JSC::JSCell::indexingTypeAndMisc):
(JSC::JSCell::indexingType):
(JSC::JSCell::setStructure):
(JSC::JSCell::callDestructor):
(JSC::JSCell::lockInternalLock):
(JSC::JSCell::unlockInternalLock):

  • runtime/JSObject.cpp:

(JSC::JSObject::visitButterfly):
(JSC::JSObject::visitChildren):
(JSC::JSFinalObject::visitChildren):
(JSC::JSObject::enterDictionaryIndexingModeWhenArrayStorageAlreadyExists):
(JSC::JSObject::createInitialUndecided):
(JSC::JSObject::createInitialInt32):
(JSC::JSObject::createInitialDouble):
(JSC::JSObject::createInitialContiguous):
(JSC::JSObject::createArrayStorage):
(JSC::JSObject::convertUndecidedToArrayStorage):
(JSC::JSObject::convertInt32ToArrayStorage):
(JSC::JSObject::convertDoubleToArrayStorage):
(JSC::JSObject::convertContiguousToArrayStorage):
(JSC::JSObject::deleteProperty):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::increaseVectorLength):
(JSC::JSObject::ensureLengthSlow):
(JSC::JSObject::reallocateAndShrinkButterfly):
(JSC::JSObject::allocateMoreOutOfLineStorage):
(JSC::JSObject::shiftButterflyAfterFlattening):
(JSC::JSObject::growOutOfLineStorage): Deleted.

  • runtime/JSObject.h:

(JSC::JSFinalObject::JSFinalObject):
(JSC::JSObject::setButterfly):
(JSC::JSObject::getOwnNonIndexPropertySlot):
(JSC::JSObject::fillCustomGetterPropertySlot):
(JSC::JSObject::getOwnPropertySlot):
(JSC::JSObject::getPropertySlot):
(JSC::JSObject::setStructureAndButterfly): Deleted.
(JSC::JSObject::setButterflyWithoutChangingStructure): Deleted.
(JSC::JSObject::putDirectInternal): Deleted.
(JSC::JSObject::putDirectWithoutTransition): Deleted.

  • runtime/JSObjectInlines.h:

(JSC::JSObject::getPropertySlot):
(JSC::JSObject::getNonIndexPropertySlot):
(JSC::JSObject::putDirectWithoutTransition):
(JSC::JSObject::putDirectInternal):

  • runtime/Options.h:
  • runtime/SparseArrayValueMap.h:
  • runtime/Structure.cpp:

(JSC::Structure::dumpStatistics):
(JSC::Structure::findStructuresAndMapForMaterialization):
(JSC::Structure::materializePropertyTable):
(JSC::Structure::addNewPropertyTransition):
(JSC::Structure::changePrototypeTransition):
(JSC::Structure::attributeChangeTransition):
(JSC::Structure::toDictionaryTransition):
(JSC::Structure::takePropertyTableOrCloneIfPinned):
(JSC::Structure::nonPropertyTransition):
(JSC::Structure::isSealed):
(JSC::Structure::isFrozen):
(JSC::Structure::flattenDictionaryStructure):
(JSC::Structure::pin):
(JSC::Structure::pinForCaching):
(JSC::Structure::willStoreValueSlow):
(JSC::Structure::copyPropertyTableForPinning):
(JSC::Structure::add):
(JSC::Structure::remove):
(JSC::Structure::getPropertyNamesFromStructure):
(JSC::Structure::visitChildren):
(JSC::Structure::materializePropertyMap): Deleted.
(JSC::Structure::addPropertyWithoutTransition): Deleted.
(JSC::Structure::removePropertyWithoutTransition): Deleted.
(JSC::Structure::copyPropertyTable): Deleted.
(JSC::Structure::createPropertyMap): Deleted.
(JSC::PropertyTable::checkConsistency): Deleted.
(JSC::Structure::checkConsistency): Deleted.

  • runtime/Structure.h:
  • runtime/StructureIDBlob.h:

(JSC::StructureIDBlob::StructureIDBlob):
(JSC::StructureIDBlob::indexingTypeIncludingHistory):
(JSC::StructureIDBlob::setIndexingTypeIncludingHistory):
(JSC::StructureIDBlob::indexingTypeIncludingHistoryOffset):
(JSC::StructureIDBlob::indexingType): Deleted.
(JSC::StructureIDBlob::setIndexingType): Deleted.
(JSC::StructureIDBlob::indexingTypeOffset): Deleted.

  • runtime/StructureInlines.h:

(JSC::Structure::get):
(JSC::Structure::checkOffsetConsistency):
(JSC::Structure::checkConsistency):
(JSC::Structure::add):
(JSC::Structure::remove):
(JSC::Structure::addPropertyWithoutTransition):
(JSC::Structure::removePropertyWithoutTransition):
(JSC::Structure::setPropertyTable):
(JSC::Structure::putWillGrowOutOfLineStorage): Deleted.
(JSC::Structure::propertyTable): Deleted.
(JSC::Structure::suggestedNewOutOfLineStorageCapacity): Deleted.

Source/WTF:

The reason why I went to such great pains to make WTF::Lock fit in two bits is that I
knew that I would eventually need to stuff one into some miscellaneous bits of the
JSCell header. That time has come, because the concurrent GC has numerous race
conditions in visitChildren that can be trivially fixed if each object just has an
internal lock. Some cell types might use it to simply protect their entire visitChildren
function and anything that mutates the fields it touches, while other cell types might
use it as a "lock of last resort" to handle corner cases of an otherwise wait-free or
lock-free algorithm. Right now, it's used to protect certain transformations involving
indexing storage.

To make this happen, I factored the WTF::Lock algorithm into a LockAlgorithm struct that
is templatized on lock type (uint8_t for WTF::Lock), the isHeldBit value (1 for
WTF::Lock), and the hasParkedBit value (2 for WTF::Lock). This could have been done as
a templatized Lock class that basically contains Atomic<LockType>. You could then make
any field into a lock by bitwise_casting it to TemplateLock<field type, bit1, bit2>. But
this felt too dirty, so instead, LockAlgorithm has static methods that take
Atomic<LockType>& as their first argument. I think that this makes it more natural to
project a LockAlgorithm onto an existing Atomic<> field. Sadly, some places have to cast
their non-Atomic<> field to Atomic<> in order for this to work. Like so many other things
we do, this just shows that the C++ style of labeling fields that are subject to atomic
ops as atomic is counterproductive. Maybe some day I'll change LockAlgorithm to use our
other Atomics API, which does not require Atomic<>.

WTF::Lock now uses LockAlgorithm. The slow paths are still outlined. I don't feel too
bad about the LockAlgorithm.h header being included in so many places because we change
that algorithm so infrequently.

Also, I added a hasElapsed(time) function. This function makes it so much more natural
to write timeslicing code, which the concurrent GC has to do a lot of.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/CMakeLists.txt:
  • wtf/ListDump.h:
  • wtf/Lock.cpp:

(WTF::LockBase::lockSlow):
(WTF::LockBase::unlockSlow):
(WTF::LockBase::unlockFairlySlow):
(WTF::LockBase::unlockSlowImpl): Deleted.

  • wtf/Lock.h:

(WTF::LockBase::lock):
(WTF::LockBase::tryLock):
(WTF::LockBase::unlock):
(WTF::LockBase::unlockFairly):
(WTF::LockBase::isHeld):
(): Deleted.

  • wtf/LockAlgorithm.h: Added.

(WTF::LockAlgorithm::lockFastAssumingZero):
(WTF::LockAlgorithm::lockFast):
(WTF::LockAlgorithm::lock):
(WTF::LockAlgorithm::tryLock):
(WTF::LockAlgorithm::unlockFastAssumingZero):
(WTF::LockAlgorithm::unlockFast):
(WTF::LockAlgorithm::unlock):
(WTF::LockAlgorithm::unlockFairly):
(WTF::LockAlgorithm::isLocked):
(WTF::LockAlgorithm::lockSlow):
(WTF::LockAlgorithm::unlockSlow):

  • wtf/TimeWithDynamicClockType.cpp:

(WTF::hasElapsed):

  • wtf/TimeWithDynamicClockType.h:
5:09 PM Changeset in webkit [208719] by keith_miller@apple.com
  • 6 edits
    1 add in trunk

Add Wasm select
https://bugs.webkit.org/show_bug.cgi?id=164743

Reviewed by Saam Barati.

JSTests:

  • wasm/function-tests/select.js: Added.

Source/JavaScriptCore:

Also, this patch fixes an issue with the jsc.cpp test harness where negative numbers would be sign extended
when they shouldn't be.

  • jsc.cpp:

(box):

  • wasm/WasmB3IRGenerator.cpp:
  • wasm/WasmFunctionParser.h:

(JSC::Wasm::FunctionParser<Context>::parseExpression):

  • wasm/WasmValidate.cpp:

(JSC::Wasm::Validate::addSelect):

5:06 PM Changeset in webkit [208718] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch/Source

Versioning.

4:35 PM Changeset in webkit [208717] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-602.3.12

New tag.

4:27 PM Changeset in webkit [208716] by rniwa@webkit.org
  • 7 edits
    4 adds in trunk

document.createElementNS doesn't construct a custom element
https://bugs.webkit.org/show_bug.cgi?id=164700

Reviewed by Darin Adler.

Source/WebCore:

Fixed the bug that document.createElementNS doesn't create a custom element or enqueue it to upgrade.

Also made constructCustomElementSynchronously not call the custom element constructors with the element's
local name as the first argument, which was a non-standard behavior added during prototyping.

Test: fast/custom-elements/DOMImplementation-createDocument.html

fast/custom-elements/document-createElementNS.html

  • bindings/js/JSCustomElementInterface.cpp:

(WebCore::JSCustomElementInterface::constructElementWithFallback): Added a variant that takes QualifiedName
instead of AtomicString.
(WebCore::constructCustomElementSynchronously): Don't add the local name as an argument.

  • bindings/js/JSCustomElementInterface.h:
  • dom/CustomElementRegistry.cpp:

(WebCore::CustomElementRegistry::findInterface): Just find the interface based on the local name after
checking the namespace URI to be that of the XHTML. We need to ignore the prefix for the purpose of looking
up the custom element definition as specified in the latest HTML specification:
https://html.spec.whatwg.org/multipage/scripting.html#look-up-a-custom-element-definition

  • dom/DOMImplementation.cpp:

(WebCore::DOMImplementation::createDocument): Added an assertion to make sure we don't invoke scripts while
constructing the document element.

  • dom/Document.cpp:

(WebCore::createUpgradeCandidateElement): Made this function create a HTMLUnknownElement instead of returning
nullptr to share more code. Also added a variant which takes QualifiedName.
(WebCore::isValidHTMLElementName): Added; helpers for createHTMLElementWithNameValidation to call isValidName
on Document with the right argument.
(WebCore::createHTMLElementWithNameValidation): Templatized the function to be called with either AtomicString
or QualifiedName for the name.
(WebCore::createFallbackHTMLElement):
(WebCore::Document::createElementNS): Call createHTMLElementWithNameValidation to create a custom element if
possible. This function ends up re-validating the element name before creating a HTMLUnknownElement but that
shouldn't be a common scenario to matter. In fact, createElementNS is a rarely used API.

LayoutTests:

Added W3C style testharness.js tests for createElementNS and DOMImplementation's createDocument.

  • fast/custom-elements/DOMImplementation-createDocument-expected.txt: Added.
  • fast/custom-elements/DOMImplementation-createDocument.html: Added.
  • fast/custom-elements/document-createElementNS-expected.txt: Added.
  • fast/custom-elements/document-createElementNS.html: Added.
4:19 PM Changeset in webkit [208715] by matthew_hanson@apple.com
  • 5 edits in branches/safari-602-branch

Merge r208691. rdar://problem/29250304

4:19 PM Changeset in webkit [208714] by matthew_hanson@apple.com
  • 5 edits
    1 add in branches/safari-602-branch

Merge r208655. rdar://problem/29250302

4:10 PM Changeset in webkit [208713] by jfbastien@apple.com
  • 2 edits in trunk/Source/WTF

Expected: add missing inline
https://bugs.webkit.org/show_bug.cgi?id=164735

Reviewed by Yusuke Suzuki.

Free functions and full template specializations need to be
inline, or in a .cpp file, otherwise each .o creates a duplicate
symbol which makes the linker very sad.

  • wtf/Expected.h:

(WTF::ExpectedDetail::Throw):
(WTF::makeExpected):

2:57 PM Changeset in webkit [208712] by ggaren@apple.com
  • 21 edits
    4 adds in trunk/Source/JavaScriptCore

JSC should distinguish between local and global eval
https://bugs.webkit.org/show_bug.cgi?id=164628

Reviewed by Saam Barati.

Local use of the 'eval' keyword and invocation of the global window.eval
function are distinct operations in JavaScript.

This patch splits out LocalEvalExecutable vs GlobalEvalExecutable in
order to help distinguish these operations in code.

Our code used to do some silly things for lack of distinguishing these
cases. For example, it would double cache local eval in CodeCache and
EvalCodeCache. This made CodeCache seem more complicated than it really
was.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj: Added some files.
  • bytecode/CodeBlock.h:
  • bytecode/EvalCodeCache.h:

(JSC::EvalCodeCache::tryGet):
(JSC::EvalCodeCache::set):
(JSC::EvalCodeCache::getSlow): Deleted. Moved code generation out of
the cache to avoid tight coupling. Now the cache just caches.

  • bytecode/UnlinkedEvalCodeBlock.h:
  • bytecode/UnlinkedFunctionExecutable.cpp:

(JSC::UnlinkedFunctionExecutable::fromGlobalCode):

  • bytecode/UnlinkedModuleProgramCodeBlock.h:
  • bytecode/UnlinkedProgramCodeBlock.h:
  • debugger/DebuggerCallFrame.cpp:

(JSC::DebuggerCallFrame::evaluateWithScopeExtension): Updated for interface
changes.

  • interpreter/Interpreter.cpp:

(JSC::eval): Moved code generation here so the cache didn't need to build
it in.

  • llint/LLIntOffsetsExtractor.cpp:
  • runtime/CodeCache.cpp:

(JSC::CodeCache::getUnlinkedGlobalCodeBlock): No need to check for TDZ
variables any more. We only cache global programs, and global variable
access always does TDZ checks.

(JSC::CodeCache::getUnlinkedProgramCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalEvalCodeBlock):
(JSC::CodeCache::getUnlinkedModuleProgramCodeBlock):
(JSC::CodeCache::getUnlinkedGlobalFunctionExecutable):

(JSC::CodeCache::CodeCache): Deleted.
(JSC::CodeCache::~CodeCache): Deleted.
(JSC::CodeCache::getGlobalCodeBlock): Deleted.
(JSC::CodeCache::getProgramCodeBlock): Deleted.
(JSC::CodeCache::getEvalCodeBlock): Deleted.
(JSC::CodeCache::getModuleProgramCodeBlock): Deleted.
(JSC::CodeCache::getFunctionExecutableFromGlobalCode): Deleted.

  • runtime/CodeCache.h:

(JSC::CodeCache::clear):
(JSC::generateUnlinkedCodeBlock): Moved unlinked code block creation
out of the CodeCache class and into a stand-alone function because
we need it for local eval, which does not live in CodeCache.

  • runtime/EvalExecutable.cpp:

(JSC::EvalExecutable::create): Deleted.

  • runtime/EvalExecutable.h:

(): Deleted.

  • runtime/GlobalEvalExecutable.cpp: Added.

(JSC::GlobalEvalExecutable::create):
(JSC::GlobalEvalExecutable::GlobalEvalExecutable):

  • runtime/GlobalEvalExecutable.h: Added.
  • runtime/LocalEvalExecutable.cpp: Added.

(JSC::LocalEvalExecutable::create):
(JSC::LocalEvalExecutable::LocalEvalExecutable):

  • runtime/LocalEvalExecutable.h: Added. Split out Local vs Global

EvalExecutable classes to distinguish these operations in code. The key
difference is that LocalEvalExecutable does not live in the CodeCache
and only lives in the EvalCodeCache.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::createProgramCodeBlock):
(JSC::JSGlobalObject::createLocalEvalCodeBlock):
(JSC::JSGlobalObject::createGlobalEvalCodeBlock):
(JSC::JSGlobalObject::createModuleProgramCodeBlock):
(JSC::JSGlobalObject::createEvalCodeBlock): Deleted.

  • runtime/JSGlobalObject.h:
  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::globalFuncEval):

  • runtime/JSScope.cpp:

(JSC::JSScope::collectClosureVariablesUnderTDZ):
(JSC::JSScope::collectVariablesUnderTDZ): Deleted. We don't include
global lexical variables in our concept of TDZ scopes anymore. Global
variable access always does TDZ checks unconditionally. So, only closure
scope accesses give specific consideration to TDZ checks.

  • runtime/JSScope.h:
2:54 PM Changeset in webkit [208711] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Avoid copying attributes vector when constructing a CustomElement in HTMLTreeBuilder
https://bugs.webkit.org/show_bug.cgi?id=164734

Reviewed by Ryosuke Niwa.

Avoid copying attributes vector when constructing a CustomElement in HTMLTreeBuilder.

  • html/parser/HTMLConstructionSite.cpp:

(WebCore::HTMLConstructionSite::insertCustomElement):

  • html/parser/HTMLConstructionSite.h:
  • html/parser/HTMLStackItem.h:

(WebCore::HTMLStackItem::HTMLStackItem):
(WebCore::HTMLStackItem::create):

  • html/parser/HTMLTreeBuilder.cpp:

(WebCore::HTMLTreeBuilder::didCreateCustomOrCallbackElement):

2:20 PM Changeset in webkit [208710] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Inline QualifiedName::toString() method
https://bugs.webkit.org/show_bug.cgi?id=164726

Reviewed by Ryosuke Niwa.

Inline QualifiedName::toString() method to limit performance impact of r208674.

  • dom/QualifiedName.cpp:

(WebCore::QualifiedName::toString): Deleted.

  • dom/QualifiedName.h:

(WebCore::QualifiedName::toString):

2:18 PM Changeset in webkit [208709] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

Build fix after r208690.
https://bugs.webkit.org/show_bug.cgi?id=164681

Not reviewed.

  • wtf/FastMalloc.h:
1:44 PM Changeset in webkit [208708] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[Mac][iOS][WK2] Tighten permissions to change CapsLock delay
https://bugs.webkit.org/show_bug.cgi?id=164725
<rdar://problem/28970910>

Reviewed by Alexey Proskuryakov.

  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in: Limit access

to the IOKit connection that actually needs it.

1:38 PM Changeset in webkit [208707] by Brent Fulgham
  • 3 edits in trunk/Source/WebKit2

Unreviewed sandbox fix after r208702

Correct version check to avoid breaking users in Safari Technology Preview
or WebKit nightlies.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
1:37 PM Changeset in webkit [208706] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support the font-synthesis property
https://bugs.webkit.org/show_bug.cgi?id=164728

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeFontSynthesis):
(WebCore::CSSPropertyParser::parseSingleValue):

1:18 PM Changeset in webkit [208705] by weinig@apple.com
  • 116 edits
    7 adds
    2 deletes in trunk/Source/WebCore

[SVG] Moving more special casing of SVG out of the bindings - SVGNumber/SVGPoint/SVGRect/SVGLength/SVGTransform/SVGMatrix
https://bugs.webkit.org/show_bug.cgi?id=164696

Reviewed by Darin Adler.

  • Make SVGNumber, SVGPoint, SVGRect, SVGLength, SVGTransform and SVGMatrix real classes and stop special casing them in the bindings generator. This removes the remaining non-list SVG specializations from the bindings generator.
  • Renamed existing SVGLength, SVGTransform and SVGMatrix to SVGLengthValue, SVGTransformValue and SVGMatrixValue. There are no SVNumberValue, SVGPointValue and SVGRectValue classes, as float, FloatPoint and FloatRect can be used directly. Going forward, we can get rid of SVGMatrixValue as well, and just use AffineTransform, but that will be done in a separate change.
  • WebCore.xcodeproj/project.pbxproj:
  • CMakeLists.txt:

Add new files.

  • bindings/js/JSSVGLengthCustom.cpp:

(WebCore::JSSVGLength::value): Deleted.
(WebCore::JSSVGLength::setValue): Deleted.
(WebCore::JSSVGLength::convertToSpecifiedUnits): Deleted.
Removed. This can now be generated completely.

  • bindings/scripts/CodeGenerator.pm:

(SkipIncludeHeader):
Remove special casing of SVGNumber. A header for it now exists.

(GetSVGWrappedTypeNeedingTearOff):
Remove special casing SVGPropertyTearOffs. None remain.

(ShouldPassWrapperByReference):
Allow all tear off types to be passed by reference.

(IsSVGTypeWithWritablePropertiesNeedingTearOff):
Remove now unused function.

  • bindings/scripts/CodeGeneratorJS.pm:

(GetImplClassName):
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateImplementationFunctionCall):
(GetSVGPropertyTypes):
(NativeToJSValue):
(GenerateConstructorDefinition):
Remove non-property tear off specific code.

(IsNativeType):
Remove unused function.

  • css/CSSPropertyNames.in:
  • css/SVGCSSComputedStyleDeclaration.cpp:

(WebCore::strokeDashArrayToCSSValueList):
(WebCore::ComputedStyleExtractor::svgPropertyValue):

  • css/StyleBuilderConverter.h:

(WebCore::StyleBuilderConverter::convertSVGLengthValue):
(WebCore::StyleBuilderConverter::convertSVGLengthVector):
(WebCore::StyleBuilderConverter::convertStrokeDashArray):

  • css/StyleBuilderCustom.h:

(WebCore::StyleBuilderCustom::applyValueBaselineShift):

  • page/animation/CSSPropertyAnimation.cpp:

(WebCore::blendFunc):
(WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::strokeDashArray):
(WebCore::RenderStyle::setStrokeDashArray):
(WebCore::RenderStyle::baselineShiftValue):
(WebCore::RenderStyle::setBaselineShiftValue):
(WebCore::RenderStyle::kerning):
(WebCore::RenderStyle::setKerning):

  • rendering/style/SVGRenderStyle.h:

(WebCore::SVGRenderStyle::initialStrokeDashArray):
(WebCore::SVGRenderStyle::initialBaselineShiftValue):
(WebCore::SVGRenderStyle::initialKerning):
(WebCore::SVGRenderStyle::setStrokeDashArray):
(WebCore::SVGRenderStyle::setKerning):
(WebCore::SVGRenderStyle::setBaselineShiftValue):
(WebCore::SVGRenderStyle::strokeDashArray):
(WebCore::SVGRenderStyle::kerning):
(WebCore::SVGRenderStyle::baselineShiftValue):

  • rendering/style/SVGRenderStyleDefs.h:

Update for name change of SVGLength to SVGLengthValue.

  • rendering/svg/RenderSVGImage.cpp:

Remove unused include.

  • html/canvas/DOMPath.h:

Add an overload that takes a DOMMatrix, now that it is distinct from
AffineTransform.

  • rendering/svg/RenderSVGRoot.cpp:

(WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):
Update for name change of SVGPoint to FloatPoint.

  • rendering/svg/SVGRenderSupport.cpp:

(WebCore::SVGRenderSupport::applyStrokeStyleToContext):

  • rendering/svg/SVGRenderTreeAsText.cpp:

(WebCore::writeStyle):

  • rendering/svg/SVGTextLayoutEngineBaseline.cpp:

(WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift):

  • rendering/svg/SVGTextLayoutEngineSpacing.cpp:

(WebCore::SVGTextLayoutEngineSpacing::calculateCSSKerningAndSpacing):
Update for name change of SVGLength to SVGLengthValue.

  • rendering/svg/SVGTextQuery.cpp:

(WebCore::SVGTextQuery::startPositionOfCharacter):
(WebCore::SVGTextQuery::endPositionOfCharacter):
(WebCore::SVGTextQuery::characterNumberAtPosition):

  • rendering/svg/SVGTextQuery.h:

Update for name change of SVGPoint to FloatPoint.

  • svg/LinearGradientAttributes.h:
  • svg/PatternAttributes.h:
  • svg/RadialGradientAttributes.h:

Update for name change of SVGLength to SVGLengthValue.

  • svg/SVGAllInOne.cpp:

Remove SVGLength.cpp

  • svg/SVGAngle.h:

Add missing newline.

  • svg/SVGAnimateTransformElement.cpp:

(WebCore::SVGAnimateTransformElement::SVGAnimateTransformElement):
(WebCore::SVGAnimateTransformElement::parseAttribute):

  • svg/SVGAnimateTransformElement.h:

Update for name change of SVGTransform to SVGTransformValue.

  • svg/SVGAnimatedLength.cpp:

(WebCore::SVGAnimatedLengthAnimator::SVGAnimatedLengthAnimator):
(WebCore::SVGAnimatedLengthAnimator::constructFromString):
(WebCore::SVGAnimatedLengthAnimator::addAnimatedTypes):
(WebCore::parseLengthFromString):
(WebCore::SVGAnimatedLengthAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedLengthAnimator::calculateDistance):

  • svg/SVGAnimatedLength.h:
  • svg/SVGAnimatedLengthList.cpp:

(WebCore::SVGAnimatedLengthListAnimator::SVGAnimatedLengthListAnimator):
(WebCore::SVGAnimatedLengthListAnimator::addAnimatedTypes):
(WebCore::parseLengthListFromString):
(WebCore::SVGAnimatedLengthListAnimator::calculateAnimatedValue):

  • svg/SVGAnimatedLengthList.h:

Update for name change of SVGLength to SVGLengthValue.

  • svg/SVGAnimatedNumberList.h:

Include the new SVGNumber.h and switch typedef to type alias.

  • svg/SVGAnimatedPointList.cpp:

Add now necessary include of SVGPoint.h

  • svg/SVGAnimatedRect.h:

Update for name change of SVGPropertyTearOff<FloatRect> to SVGRect.

  • svg/SVGAnimatedTransformList.cpp:

(WebCore::SVGAnimatedTransformListAnimator::SVGAnimatedTransformListAnimator):
(WebCore::SVGAnimatedTransformListAnimator::addAnimatedTypes):
(WebCore::SVGAnimatedTransformListAnimator::calculateAnimatedValue):
(WebCore::SVGAnimatedTransformListAnimator::calculateDistance):
Update for name change of SVGTransform to SVGTransformValue.

  • svg/SVGAnimatedType.cpp:

(WebCore::SVGAnimatedType::createLength):
(WebCore::SVGAnimatedType::setValueAsString):

  • svg/SVGAnimatedType.h:

(WebCore::SVGAnimatedType::length):

  • svg/SVGCircleElement.cpp:

(WebCore::SVGCircleElement::parseAttribute):

  • svg/SVGCursorElement.cpp:

(WebCore::SVGCursorElement::parseAttribute):

  • svg/SVGDocument.cpp:

(WebCore::SVGDocument::startPan):

  • svg/SVGEllipseElement.cpp:

(WebCore::SVGEllipseElement::parseAttribute):

  • svg/SVGFilterElement.cpp:

(WebCore::SVGFilterElement::parseAttribute):

  • svg/SVGFilterPrimitiveStandardAttributes.cpp:

(WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):

  • svg/SVGForeignObjectElement.cpp:

(WebCore::SVGForeignObjectElement::parseAttribute):

  • svg/SVGImageElement.cpp:

(WebCore::SVGImageElement::parseAttribute):

  • svg/SVGLengthContext.cpp:

(WebCore::SVGLengthContext::resolveRectangle):
(WebCore::SVGLengthContext::resolvePoint):
(WebCore::SVGLengthContext::resolveLength):

  • svg/SVGLengthContext.h:
  • svg/SVGLengthList.cpp:

(WebCore::SVGLengthList::parse):

  • svg/SVGLengthList.h:

(WebCore::SVGPropertyTraits<SVGLengthList>::initialValue):

  • svg/SVGLineElement.cpp:

(WebCore::SVGLineElement::parseAttribute):

  • svg/SVGLinearGradientElement.cpp:

(WebCore::SVGLinearGradientElement::parseAttribute):

  • svg/SVGMarkerElement.cpp:

(WebCore::SVGMarkerElement::parseAttribute):

  • svg/SVGMaskElement.cpp:

(WebCore::SVGMaskElement::parseAttribute):

  • svg/SVGPatternElement.cpp:

(WebCore::SVGPatternElement::parseAttribute):

  • svg/SVGRadialGradientElement.cpp:

(WebCore::SVGRadialGradientElement::parseAttribute):

  • svg/SVGRectElement.cpp:

(WebCore::SVGRectElement::parseAttribute):

  • svg/SVGTextPathElement.cpp:

(WebCore::SVGTextPathElement::parseAttribute):
Update for name change of SVGLength to SVGLengthValue.

  • svg/SVGLength.cpp: Removed.
  • svg/SVGLength.h:

(WebCore::SVGLength::create):
(WebCore::SVGLength::unitType):
(WebCore::SVGLength::valueForBindings):
(WebCore::SVGLength::setValueForBindings):
(WebCore::SVGLength::valueInSpecifiedUnits):
(WebCore::SVGLength::setValueInSpecifiedUnits):
(WebCore::SVGLength::valueAsString):
(WebCore::SVGLength::setValueAsString):
(WebCore::SVGLength::newValueSpecifiedUnits):
(WebCore::SVGLength::convertToSpecifiedUnits):
(WebCore::SVGLength::SVGLength):
Implement the SVGLength interface as a tear off.

  • svg/SVGLength.idl:

Add annotations for exceptions, custom naming, and remove now unnecessary
custom binding annotation.

  • svg/SVGLengthValue.cpp: Copied from Source/WebCore/svg/SVGLength.cpp.
  • svg/SVGLengthValue.h: Copied from Source/WebCore/svg/SVGLength.h.
  • svg/SVGGraphicsElement.cpp:

(WebCore::SVGGraphicsElement::getCTMForBindings):
(WebCore::SVGGraphicsElement::getScreenCTMForBindings):
(WebCore::SVGGraphicsElement::getBBoxForBindings):

  • svg/SVGGraphicsElement.h:

Add bindings specific versions of transformation access functions that return
tear offs.

  • svg/SVGGraphicsElement.idl:

Annotate tear off returning functions with NewObject and ImplementedAs as necessary.

  • svg/SVGLocatable.cpp:

(WebCore::SVGLocatable::getTransformToElement):

  • svg/SVGLocatable.h:

Change getTransformToElement to return a Ref<SVGMatrix> as that is what the binding
wants.

  • svg/SVGMatrix.h:

Implement the SVGMatrix interface as a tear off.

  • svg/SVGMatrix.idl:

Add annotations for exceptions. Remove meaningless Immutable annotation.

  • svg/SVGMatrixValue.h: Copied from Source/WebCore/svg/SVGMatrix.h.
  • svg/SVGNumber.h: Added.

(WebCore::SVGNumber::create):
(WebCore::SVGNumber::valueForBindings):
(WebCore::SVGNumber::setValueForBindings):
(WebCore::SVGNumber::SVGNumber):
Implement the SVGNumber interface as a tear off.

  • svg/SVGNumber.idl:

Add exception annotation and custom naming annotations.

  • svg/SVGNumberList.h:

Update for name change of SVGPropertyTearOff<float> to SVGNumber.

  • svg/SVGPathElement.cpp:

(WebCore::SVGPathElement::getPointAtLength):

  • svg/SVGPathElement.h:

Make getPointAtLength return a Ref<SVGPoint> to match the bindings.

  • svg/SVGPathElement.idl:

Annotate getPointAtLength with [NewObject].

  • svg/SVGPathTraversalStateBuilder.cpp:

(WebCore::SVGPathTraversalStateBuilder::currentPoint):

  • svg/SVGPathTraversalStateBuilder.h:
  • svg/SVGPathUtilities.cpp:

(WebCore::getPointAtLengthOfSVGPathByteStream):

  • svg/SVGPathUtilities.h:
  • svg/SVGPointList.cpp:

(WebCore::SVGPointList::valueAsString):

  • svg/SVGPointList.h:
  • svg/SVGPolyElement.cpp:

Update for name change of SVGPoint to FloatPoint.

  • svg/SVGPoint.h:

(WebCore::SVGPoint::create):
(WebCore::SVGPoint::x):
(WebCore::SVGPoint::setX):
(WebCore::SVGPoint::y):
(WebCore::SVGPoint::setY):
(WebCore::SVGPoint::matrixTransform):
(WebCore::SVGPoint::SVGPoint):
Implement the SVGPoint interface as a tear off. Remove typedef of FloatPoint
to SVGPoint.

  • svg/SVGPoint.idl:

Add exception and NewObject annotations.

  • svg/SVGRect.h:

(WebCore::SVGRect::create):
(WebCore::SVGRect::x):
(WebCore::SVGRect::setX):
(WebCore::SVGRect::y):
(WebCore::SVGRect::setY):
(WebCore::SVGRect::width):
(WebCore::SVGRect::setWidth):
(WebCore::SVGRect::height):
(WebCore::SVGRect::setHeight):
Implement the SVGRect interface as a tear off. FloatRect SVGPropertyTraits have
been moved to SVGRectTraits.h.

  • svg/SVGRect.idl:

Add exception annotations.

  • svg/SVGRectTraits.h: Copied from Source/WebCore/svg/SVGRect.cpp.


  • svg/SVGSVGElement.cpp:

(WebCore::SVGSVGElement::viewport):
(WebCore::SVGSVGElement::currentTranslate):
(WebCore::SVGSVGElement::parseAttribute):
(WebCore::SVGSVGElement::collectIntersectionOrEnclosureList):
(WebCore::SVGSVGElement::getIntersectionList):
(WebCore::SVGSVGElement::getEnclosureList):
(WebCore::SVGSVGElement::checkIntersection):
(WebCore::SVGSVGElement::checkEnclosure):
(WebCore::SVGSVGElement::createSVGNumber):
(WebCore::SVGSVGElement::createSVGLength):
(WebCore::SVGSVGElement::createSVGPoint):
(WebCore::SVGSVGElement::createSVGMatrix):
(WebCore::SVGSVGElement::createSVGRect):
(WebCore::SVGSVGElement::createSVGTransform):
(WebCore::SVGSVGElement::createSVGTransformFromMatrix):

  • svg/SVGSVGElement.h:

(WebCore::SVGSVGElement::currentTranslateValue):
(WebCore::SVGSVGElement::currentTranslate): Deleted.
(WebCore::SVGSVGElement::createSVGNumber): Deleted.
Update functions taking tear off values to take the wrappers, and update
the factory functions returning tear offs, to return the wrappers.

  • svg/SVGSVGElement.idl:

Annotate functions/properties returning tear offs with [NewObject].

  • svg/SVGTextContentElement.cpp:

(WebCore::SVGTextContentElement::synchronizeTextLength):
(WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper):
(WebCore::SVGTextContentElement::textLengthAnimated):
(WebCore::SVGTextContentElement::getStartPositionOfChar):
(WebCore::SVGTextContentElement::getEndPositionOfChar):
(WebCore::SVGTextContentElement::getExtentOfChar):
(WebCore::SVGTextContentElement::getCharNumAtPosition):
(WebCore::SVGTextContentElement::parseAttribute):

  • svg/SVGTextContentElement.h:

(WebCore::SVGTextContentElement::specifiedTextLength):
Update functions returning tear off values to return the wrappers
and ones taking the values to take the wrappers.

  • svg/SVGTextContentElement.idl:

Annotate functions/properties returning tear offs with [NewObject].

  • svg/SVGTransform.cpp:

(WebCore::SVGTransform::matrix):

  • svg/SVGTransform.h:

(WebCore::SVGTransform::create):
(WebCore::SVGTransform::type):
(WebCore::SVGTransform::angle):
(WebCore::SVGTransform::setMatrix):
(WebCore::SVGTransform::setTranslate):
(WebCore::SVGTransform::setScale):
(WebCore::SVGTransform::setRotate):
(WebCore::SVGTransform::setSkewX):
(WebCore::SVGTransform::setSkewY):
Implement the SVGTransform interface as a tear off.

  • svg/SVGTransform.idl:

Add ConstantsScope annotation to allow the constants to be defined on
SVGTransformValue. Add exception and NewObject annotations.

  • svg/SVGTransformDistance.cpp:

(WebCore::SVGTransformDistance::SVGTransformDistance):
(WebCore::SVGTransformDistance::scaledDistance):
(WebCore::SVGTransformDistance::addSVGTransforms):
(WebCore::SVGTransformDistance::addToSVGTransform):
(WebCore::SVGTransformDistance::distance):

  • svg/SVGTransformDistance.h:
  • svg/SVGTransformList.cpp:

(WebCore::SVGTransformList::createSVGTransformFromMatrix):
(WebCore::SVGTransformList::consolidate):

  • svg/SVGTransformList.h:

(WebCore::SVGPropertyTraits<SVGTransformList>::initialValue):

  • svg/SVGTransformable.cpp:

(WebCore::SVGTransformable::parseTransformValue):
(WebCore::parseAndSkipType):
(WebCore::SVGTransformable::parseTransformType):
(WebCore::SVGTransformable::parseTransformAttribute):

  • svg/SVGTransformable.h:
  • svg/SVGUseElement.cpp:

(WebCore::SVGUseElement::parseAttribute):
Update for name change of SVGTransform to SVGTransformValue.

  • svg/SVGTransformList.idl:

Annotate functions returning tear offs with NewObject.

  • svg/SVGTransformValue.cpp: Copied from Source/WebCore/svg/SVGTransform.cpp.
  • svg/SVGTransformValue.h: Copied from Source/WebCore/svg/SVGTransform.h.
  • svg/SVGZoomEvent.cpp:

(WebCore::SVGZoomEvent::zoomRectScreen):
(WebCore::SVGZoomEvent::previousTranslate):
(WebCore::SVGZoomEvent::newTranslate):

  • svg/SVGZoomEvent.h:

Update for change to SVGPoint/SVGRect. SVGPoint values become FloatPoints. Functions
returning SVGPoint/SVGRect now return Ref<SVGPoint>/Ref<SVGRect>.

  • svg/SVGZoomEvent.idl:

Annotate function returning tear off with NewObject.

  • svg/properties/SVGAnimatedListPropertyTearOff.h:

(WebCore::SVGAnimatedListPropertyTearOff::findItem):
Switch typedefs to type aliases. Define ListItemTearOff using SVGPropertyTraits
to get the correct tear off type (as we do for the other list property tear off
classes.)

  • svg/properties/SVGListProperty.h:

(WebCore::SVGListProperty::clearValues):
(WebCore::SVGListProperty::clearValuesAndWrappers):
(WebCore::SVGListProperty::initializeValues):
(WebCore::SVGListProperty::initializeValuesAndWrappers):
(WebCore::SVGListProperty::getItemValues):
(WebCore::SVGListProperty::getItemValuesAndWrappers):
(WebCore::SVGListProperty::insertItemBeforeValues):
(WebCore::SVGListProperty::insertItemBeforeValuesAndWrappers):
(WebCore::SVGListProperty::canReplaceItem):
(WebCore::SVGListProperty::replaceItemValues):
(WebCore::SVGListProperty::replaceItemValuesAndWrappers):
(WebCore::SVGListProperty::canRemoveItem):
(WebCore::SVGListProperty::removeItemValues):
(WebCore::SVGListProperty::removeItemValuesAndWrappers):
(WebCore::SVGListProperty::appendItemValues):
(WebCore::SVGListProperty::appendItemValuesAndWrappers):

  • svg/properties/SVGListPropertyTearOff.h:

(WebCore::SVGListPropertyTearOff::initialize):
(WebCore::SVGListPropertyTearOff::getItem):
(WebCore::SVGListPropertyTearOff::insertItemBefore):
(WebCore::SVGListPropertyTearOff::replaceItem):
(WebCore::SVGListPropertyTearOff::removeItem):
(WebCore::SVGListPropertyTearOff::appendItem):

  • svg/properties/SVGPathSegListPropertyTearOff.h:
  • svg/properties/SVGStaticListPropertyTearOff.h:
  • svg/properties/SVGTransformListPropertyTearOff.h:

Change functions returning PtrListItemTearOff, to instead return
Ref<ListItemTearOff>. To accomplish this, remove unreachable conditions
that were returning nullptr, and replace them with a assertions (these
were cases where a function like canGetItem() was called, and it only
did one of two things, returning an exception, or returned true).

  • svg/properties/SVGMatrixTearOff.h:

Update for SVGMatrix's addition, this can now inherit from SVGMatrix. Remove
incorrect comment and update some SVGMatrix types to SVGMatrixValues.

  • svg/properties/SVGStaticPropertyTearOff.h:

Require the use of SVGStaticPropertyTearOff to pass in the tear off type, rather
than the value type, so it can be directly inherited from. This allow the one user
of this class, SVGSVGElement::currentTranslate, to specialize on SVGPoint directly.

  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Update test results now that svg property tear offs are not handled specially.

1:14 PM Changeset in webkit [208704] by caitp@igalia.com
  • 28 edits
    8 adds in trunk

[JSC] Handle new_async_func / new_async_func_exp in DFG / FTL
https://bugs.webkit.org/show_bug.cgi?id=164037

Reviewed by Yusuke Suzuki.

JSTests:

Add tests based on tests from https://trac.webkit.org/changeset/194216.

  • asyncFunctionTests.yaml:
  • stress/async-function-create-nobaseline.js: Added.
  • stress/async-function-create-optimized.js: Added.
  • stress/async-function-declaration-sinking-no-double-allocate.js: Added.
  • stress/async-function-declaration-sinking-osrexit.js: Added.
  • stress/async-function-declaration-sinking-put.js: Added.
  • stress/async-function-expression-sinking-no-double-allocate.js: Added.
  • stress/async-function-expression-sinking-osrexit.js: Added.
  • stress/async-function-expression-sinking-put.js: Added.

Source/JavaScriptCore:

This patch introduces new_async_func / new_async_func_exp into DFG and FTL,
in much the same capacity that https://trac.webkit.org/changeset/194216 added
DFG / FTL support for generators: by adding new DFG nodes (NewAsyncFunction and
PhantomNewAsyncFunction), rather than extending the existing NewFunction node type.

Like NewFunction and PhantomNewFunction, and the Generator variants, allocation of
async wrapper functions may be deferred or eliminated during the allocation sinking
phase.

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::parseBlock):

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::capabilityLevel):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGClobbersExitState.cpp:

(JSC::DFG::clobbersExitState):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGMayExit.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::convertToPhantomNewFunction):
(JSC::DFG::Node::convertToPhantomNewAsyncFunction):
(JSC::DFG::Node::hasCellOperand):
(JSC::DFG::Node::isFunctionAllocation):
(JSC::DFG::Node::isPhantomFunctionAllocation):
(JSC::DFG::Node::isPhantomAllocation):

  • dfg/DFGNodeType.h:
  • dfg/DFGObjectAllocationSinkingPhase.cpp:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileNewFunction):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • dfg/DFGStoreBarrierInsertionPhase.cpp:
  • dfg/DFGStructureRegistrationPhase.cpp:

(JSC::DFG::StructureRegistrationPhase::run):

  • dfg/DFGValidate.cpp:
  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileNewFunction):

  • ftl/FTLOperations.cpp:

(JSC::FTL::operationPopulateObjectInOSR):
(JSC::FTL::operationMaterializeObjectInOSR):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildren):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::asyncFunctionPrototype):
(JSC::JSGlobalObject::asyncFunctionStructure):
(JSC::JSGlobalObject::lazyAsyncFunctionStructure): Deleted.
(JSC::JSGlobalObject::asyncFunctionPrototypeConcurrently): Deleted.
(JSC::JSGlobalObject::asyncFunctionStructureConcurrently): Deleted.

1:05 PM Changeset in webkit [208703] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Move updateSignalingState to PeerConnectionBackend
https://bugs.webkit.org/show_bug.cgi?id=164719

Patch by Youenn Fablet <youenn@apple.com> on 2016-11-14
Reviewed by Eric Carlson.

No change of behavior.

Refactoring MediaEndpointPeerConnection signaling state update to PeerConnectionBackend.
It is not specific to MediaEndpointPeerConnection and can be reused for other backends.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::setLocalDescriptionTask):
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::updateSignalingState):

  • Modules/mediastream/PeerConnectionBackend.h:
1:02 PM Changeset in webkit [208702] by pjumde@apple.com
  • 3 edits in trunk/Source/WebKit2

Keychain access in WebKit should be limited to a single process. Earlier this was blocked on the networking framework requiring direct access to keychain, this will be resolved in the upcoming version of macOS.
https://bugs.webkit.org/show_bug.cgi?id=163710
<rdar://problem/24357468>

Reviewed by Darin Adler.

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • WebProcess/com.apple.WebProcess.sb.in:
12:57 PM Changeset in webkit [208701] by timothy@apple.com
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Disable Warning Filter in Debugger Tab By Default
https://bugs.webkit.org/show_bug.cgi?id=164723
rdar://problem/29251780

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel): Made "debugger-show-resources-with-issues-only" false by default.

11:57 AM Changeset in webkit [208700] by dino@apple.com
  • 8 edits in trunk

Handle filter() image type in new CSS Parser
https://bugs.webkit.org/show_bug.cgi?id=164673
<rdar://problems/29231376>

Reviewed by Darin Adler.

Source/WebCore:

Add support for the <image> type filter() to the
new CSS Parser. This involved moving some functions
from CSSPropertyParser into CSSPropertyParserHelpers.

Covered by fast/filter-image tests.

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

(WebCore::consumeShadow):
(WebCore::parseSingleShadow): Deleted.
(WebCore::consumeFilterFunction): Deleted.
(WebCore::consumeFilter): Deleted.

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeFilterImage):
(WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
(WebCore::CSSPropertyParserHelpers::isGeneratedImage):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilter):
(WebCore::CSSPropertyParserHelpers::consumeSingleShadow):

  • css/parser/CSSPropertyParserHelpers.h:

LayoutTests:

Remove the test that allows a string value for the
image source rather than a url().

  • fast/filter-image/filter-image-animation-expected.txt:
  • fast/filter-image/filter-image-animation.html:
11:42 AM Changeset in webkit [208699] by mark.lam@apple.com
  • 6 edits
    1 add in trunk

Some of JSStringView::SafeView methods are not idiomatically safe for JSString to StringView conversions.
https://bugs.webkit.org/show_bug.cgi?id=164701
<rdar://problem/27462104>

Reviewed by Darin Adler.

JSTests:

  • stress/string-prototype-charCodeAt-on-too-long-rope.js: Added.

Source/JavaScriptCore:

The characters8(), characters16(), and operator[] in JSString::SafeView converts
the underlying JSString to a StringView via get(), and then uses the StringView
without first checking if an exception was thrown during the conversion. This is
unsafe because the conversion may have failed.

Instead, we should remove these 3 convenience methods, and make the caller
explicitly call get() and do the appropriate exception checks before using the
StringView.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::toStringView):
(JSC::encode):
(JSC::decode):
(JSC::globalFuncParseInt):
(JSC::globalFuncEscape):
(JSC::globalFuncUnescape):
(JSC::toSafeView): Deleted.

  • runtime/JSONObject.cpp:

(JSC::JSONProtoFuncParse):

  • runtime/JSString.h:

(JSC::JSString::SafeView::length):
(JSC::JSString::SafeView::characters8): Deleted.
(JSC::JSString::SafeView::characters16): Deleted.
(JSC::JSString::SafeView::operator[]): Deleted.

  • runtime/StringPrototype.cpp:

(JSC::stringProtoFuncRepeatCharacter):
(JSC::stringProtoFuncCharAt):
(JSC::stringProtoFuncCharCodeAt):
(JSC::stringProtoFuncNormalize):

11:26 AM Changeset in webkit [208698] by mark.lam@apple.com
  • 5 edits
    3 adds in trunk

RegExpObject::exec/match should handle errors gracefully.
https://bugs.webkit.org/show_bug.cgi?id=155145
<rdar://problem/27435934>

Reviewed by Keith Miller.

JSTests:

  • stress/regexp-prototype-exec-on-too-long-rope.js: Added.
  • stress/regexp-prototype-match-on-too-long-rope.js: Added.
  • stress/regexp-prototype-test-on-too-long-rope.js: Added.

Source/JavaScriptCore:

  1. Added some missing exception checks to RegExpObject::execInline() and RegExpObject::matchInline().
  2. Updated related code to work with ExceptionScope verification requirements.
  • dfg/DFGOperations.cpp:
  • runtime/RegExpObjectInlines.h:

(JSC::RegExpObject::execInline):
(JSC::RegExpObject::matchInline):

  • runtime/RegExpPrototype.cpp:

(JSC::regExpProtoFuncTestFast):
(JSC::regExpProtoFuncExec):
(JSC::regExpProtoFuncMatchFast):

11:16 AM Changeset in webkit [208697] by hyatt@apple.com
  • 2 edits in trunk/Source/WebCore

[CSS Parser] Support percentages in word-spacing
https://bugs.webkit.org/show_bug.cgi?id=164721

Reviewed by Dean Jackson.

  • css/parser/CSSPropertyParser.cpp:

(WebCore::consumeLetterSpacing):
(WebCore::consumeWordSpacing):
(WebCore::consumeSpacing): Deleted.

11:06 AM Changeset in webkit [208696] by jdiggs@igalia.com
  • 6 edits in trunk

AX: In ARIA 1.1, the implicit value for aria-level on headings is 2
https://bugs.webkit.org/show_bug.cgi?id=164714

Reviewed by Chris Fleizach.

Source/WebCore:

Return 2 rather than 0 if there is not a valid author-provided value
for aria-level on an ARIA heading.

No new tests required as we have sufficient coverage. Added one new
test case to heading-level.html and updated expectations for it and
for xml-roles-exposed.html.

  • accessibility/AccessibilityNodeObject.cpp:

(WebCore::AccessibilityNodeObject::headingLevel):

LayoutTests:

Added new test case to existing test and updated expectations.

  • accessibility/gtk/xml-roles-exposed-expected.txt: Updated.
  • accessibility/heading-level-expected.txt: Updated.
  • accessibility/heading-level.html: New test case added.
11:05 AM Changeset in webkit [208695] by hyatt@apple.com
  • 3 edits in trunk/LayoutTests

[CSS Parser] Remove incorrect cursor result
https://bugs.webkit.org/show_bug.cgi?id=164717

Reviewed by Dean Jackson.

  • fast/css/cursor-parsing-expected.txt:
  • fast/css/cursor-parsing.html:
10:52 AM Changeset in webkit [208694] by commit-queue@webkit.org
  • 26 edits in trunk

Refresh RTCDataChannel abstract infrastructure
https://bugs.webkit.org/show_bug.cgi?id=164680

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

Source/WebCore:

No real changes, except that a mock data channel is now returned for layout test.
Covered by activated and rebased test.

Adding support for mock data channel.
Updating data channel creation by using dictionary binding infrastructure.
Storing of options directly in RTCDataChannel to reduce the use of the data channel handler.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::createDataChannelHandler):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCDataChannel.cpp:

(WebCore::RTCDataChannel::create):
(WebCore::RTCDataChannel::RTCDataChannel):
(WebCore::RTCDataChannel::bufferedAmount):
(WebCore::RTCDataChannel::~RTCDataChannel): Deleted.
(WebCore::RTCDataChannel::label): Deleted.
(WebCore::RTCDataChannel::ordered): Deleted.
(WebCore::RTCDataChannel::maxRetransmitTime): Deleted.
(WebCore::RTCDataChannel::maxRetransmits): Deleted.
(WebCore::RTCDataChannel::protocol): Deleted.
(WebCore::RTCDataChannel::negotiated): Deleted.
(WebCore::RTCDataChannel::id): Deleted.

  • Modules/mediastream/RTCDataChannel.h:
  • Modules/mediastream/RTCDataChannelEvent.cpp:

(WebCore::RTCDataChannelEvent::create):
(WebCore::RTCDataChannelEvent::RTCDataChannelEvent):
(WebCore::RTCDataChannelEvent::~RTCDataChannelEvent): Deleted.

  • Modules/mediastream/RTCDataChannelEvent.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::createDataChannel):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCPeerConnection.idl:
  • platform/mediastream/MediaEndpoint.cpp:

(WebCore::EmptyMediaEndpoint::EmptyMediaEndpoint): Deleted.

  • platform/mediastream/MediaEndpoint.h:
  • platform/mediastream/RTCDataChannelHandler.h:
  • platform/mediastream/RTCDataChannelHandlerClient.h:
  • platform/mediastream/RTCPeerConnectionHandler.h:

(WebCore::RTCDataChannelInit::RTCDataChannelInit): Deleted.

  • platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:

(WebCore::MediaEndpointOwr::createDataChannelHandler):

  • platform/mediastream/openwebrtc/MediaEndpointOwr.h:
  • platform/mock/MockMediaEndpoint.cpp:

(WebCore::MockMediaEndpoint::createDataChannelHandler):

  • platform/mock/MockMediaEndpoint.h:
  • platform/mock/RTCDataChannelHandlerMock.cpp:

(WebCore::RTCDataChannelHandlerMock::RTCDataChannelHandlerMock):

  • platform/mock/RTCDataChannelHandlerMock.h:

LayoutTests:

  • fast/mediastream/RTCPeerConnection-datachannel-expected.txt:
  • fast/mediastream/RTCPeerConnection-datachannel.html:
  • platform/mac/TestExpectations:
10:40 AM Changeset in webkit [208693] by ddkilzer@apple.com
  • 2 edits in trunk/LayoutTests

REGRESSION (r83521): Fix malformed <canvas> tag in fast/canvas/DrawImageSinglePixelStretch.html

Unreviewed.

Before: <canvas id="c"</canvas>
Parsed: <canvas id="c" <="" canvas="" width="200" height="50"></canvas>

After: <canvas id="c"></canvas>
Parsed: <canvas id="c" width="200" height="50"></canvas>

  • fast/canvas/DrawImageSinglePixelStretch.html: Close <canvas>

tag. This does not affect test results, but the HTML5 parser
was covering for this mistake.

10:27 AM Changeset in webkit [208692] by mark.lam@apple.com
  • 12 edits in trunk

Enhance run-jsc-stress-test script to allow optional test specific options to be added for all test run configurations.
https://bugs.webkit.org/show_bug.cgi?id=164695

Reviewed by Keith Miller.

JSTests:

Replace use of runMisc* test run configurations with equivalents.

  • stress/licm-no-pre-header-nested.js:
  • stress/licm-no-pre-header.js:
  • stress/licm-pre-header-cannot-exit-nested.js:
  • stress/licm-pre-header-cannot-exit.js:
  • stress/make-dictionary-repatch.js:
  • stress/retry-cache-later.js:
  • stress/shadow-chicken-reading-from-scope-after-ftl-osr-exit-bytecode-liveness.js:
  • stress/slow-path-generator-updating-current-node-dfg.js:
  • stress/unshift-array-storage.js:

Tools:

This gives us more flexibility when specific tests needs to enable special JSC
options in order to exercise specific code paths to be tested. It also saves us
from having to create duplicate test run configurations e.g. runMiscFTLNoCJITTest.
We can now just use runFTLNoCJIT in its place.

Also replaced the ifJSCArgIsntProvidedAreWeReleaseBuild variable with $buildType
so that we have the ability to skip certain tests for release or debug builds.
This will be needed in the upcoming patch for https://webkit.org/b/155145.

  • Scripts/run-jsc-stress-tests:
10:20 AM Changeset in webkit [208691] by ddkilzer@apple.com
  • 5 edits in trunk

Bug 164702: WebContent crash due to checked unsigned overflow in WebCore: WebCore::RenderLayerCompositor::requiresCompositingLayer const + 1104
<https://webkit.org/b/164702>
<rdar://problem/29236368>

Reviewed by Darin Adler.

Source/WebCore:

Test: inspector/layers/layers-compositing-reasons.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::requiresCompositingForCanvas):
Don't composite if the canvas area overflows.

LayoutTests:

  • inspector/layers/layers-compositing-reasons-expected.txt:

Update results.

  • inspector/layers/layers-compositing-reasons.html: Update to

reproduce the crash. This does not reproduce the original crash
stack, but does exercise the same crashing code.

10:04 AM Changeset in webkit [208690] by mark.lam@apple.com
  • 6 edits in trunk/Source

Add debugging facility to limit the max single allocation size.
https://bugs.webkit.org/show_bug.cgi?id=164681

Reviewed by Keith Miller.

Source/JavaScriptCore:

Added JSC option to set FastMalloc's maxSingleAllocationSize for testing purposes.
This option is only available on Debug builds.

  • runtime/Options.cpp:

(JSC::Options::isAvailable):
(JSC::recomputeDependentOptions):

  • runtime/Options.h:

Source/WTF:

This is useful for simulating memory allocation failures on resource constraint
devices for testing purposes.

This facility is only conditionally compiled in on debug builds. It does not
have any burden on release builds at all. When in use, the max single allocation
size limit applies to individual allocations. For malloc (and similar), the
allocation will crash in FastMalloc if the requested size exceeds the set max
single allocation size. For tryMalloc (and similar), the allocation returns
nullptr if the requested size exceeds the set max single allocation size. The
max single allocation size is set to std::numeric_limit<size_t>::max() by default
(i.e. when not set and no limit is in effect).

Also fixed non-bmalloc versions of fastAlignedMalloc() to crash when allocation
fails.

  • wtf/FastMalloc.cpp:

(WTF::fastSetMaxSingleAllocationSize):
(WTF::fastAlignedMalloc):
(WTF::tryFastAlignedMalloc):
(WTF::tryFastMalloc):
(WTF::fastMalloc):
(WTF::tryFastCalloc):
(WTF::fastCalloc):
(WTF::fastRealloc):

  • wtf/FastMalloc.h:
9:59 AM Changeset in webkit [208689] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Fix the !ENABLE(FETCH_API) build after r208613
https://bugs.webkit.org/show_bug.cgi?id=164713

Reviewed by Youenn Fablet.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):

9:55 AM Changeset in webkit [208688] by Darin Adler
  • 107 edits
    1 delete in trunk/Source

Remove many includes of ExceptionCode.h
https://bugs.webkit.org/show_bug.cgi?id=164706

Reviewed by Alex Christensen.

Source/WebCore:

  • Modules/encryptedmedia/CDMPrivateClearKey.cpp: Removed include of ExceptionCode.h.
  • Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp: Ditto.
  • Modules/fetch/FetchBodyOwner.cpp: Ditto.
  • Modules/indexeddb/IDBDatabase.cpp: Added include of ExceptionCode.h.
  • Modules/indexeddb/IDBDatabase.h: Removed include of ExceptionCode.h.
  • Modules/indexeddb/IDBDatabaseException.cpp: Ditto.
  • Modules/indexeddb/IDBIndex.cpp: Added include of ExceptionCode.h.
  • Modules/indexeddb/IDBObjectStore.cpp: Ditto.
  • Modules/mediastream/MediaConstraintsImpl.cpp: Removed include of ExceptionCode.h.
  • Modules/mediastream/MediaDevicesEnumerationRequest.cpp: Ditto.
  • Modules/mediastream/MediaDevicesRequest.cpp: Ditto.
  • Modules/mediastream/MediaStream.cpp: Ditto.
  • Modules/mediastream/MediaStreamTrack.cpp: Ditto.
  • Modules/mediastream/RTCDTMFSender.cpp: Ditto.
  • Modules/mediastream/RTCDataChannel.cpp: Ditto.
  • Modules/mediastream/RTCPeerConnection.cpp: Ditto.
  • Modules/notifications/Notification.h: Removed definition of ExceptionCode.
  • Modules/streams/ReadableStreamSource.h: Ditto.
  • Modules/webaudio/BiquadFilterNode.cpp: Ditto.
  • Modules/webaudio/PannerNode.cpp: Removed inclde of ExceptionCode.h.
  • Modules/webaudio/WaveShaperNode.cpp: Ditto.
  • Modules/webdatabase/Database.cpp:

(WebCore::guidForOriginAndName): Reimplemented using HashMap::ensure.

  • Modules/webdatabase/Database.h: Renamed DatabaseGuid to DatabaseGUID and defined

it here instead of a in DatabaseBasicTypes.h; removed that include.

  • Modules/webdatabase/DatabaseBasicTypes.h: Removed.
  • Modules/webdatabase/DatabaseManager.h: Removed include of DatabaseBasicTypes.h.
  • Modules/webdatabase/DatabaseTask.h: Ditto.
  • Modules/webdatabase/SQLTransactionBackend.cpp: Removed include of ExceptionCode.h.
  • Modules/webdatabase/SQLTransactionBackend.h: Removed include of DatabaseBasicTypes.h.
  • WebCore.xcodeproj/project.pbxproj: Removed DatabaseBasicTypes.h, also let Xcode

edit the file.

  • bindings/js/ScriptModuleLoader.cpp: Removed include of ExceptionCode.h.
  • bindings/js/SerializedScriptValue.cpp: Ditto.
  • bindings/js/StructuredClone.cpp: Ditto.
  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateParametersCheck): Removed unnecessary include of ExceptionCode.h.

  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
  • bindings/scripts/test/JS/JSTestDOMJIT.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestNondeterministic.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Updated.

  • css/CSSMediaRule.cpp: Removed include of ExceptionCode.h.
  • css/CSSSupportsRule.cpp: Ditto.
  • dom/ClientRectList.cpp: Ditto.
  • dom/DOMCoreException.cpp: Added include of ExceptionCode.h.
  • dom/DOMImplementation.cpp: Removed include of ExceptionCode.h.
  • dom/ExceptionBase.h: Ditto.
  • dom/Node.cpp: Added include of ExceptionCode.h.
  • dom/NodeIterator.cpp: Removed include of ExceptionCode.h.

(WebCore::NodeIterator::NodePointer::NodePointer): Marked this inline.
(WebCore::NodeIterator::NodePointer::clear): Ditto.
(WebCore::NodeIterator::NodePointer::moveToNext): Ditto.
(WebCore::NodeIterator::NodePointer::moveToPrevious): Ditto.
(WebCore::NodeIterator::NodeIterator): Ditto.
(WebCore::NodeIterator::create): Moved this here from the header.
Now the constructor is inlined instead of this function.
(WebCore::NodeIterator::detach): Deleted. Moved to header.

  • dom/NodeIterator.h: Removed definition of ExceptionCode, fixed indentation

of this file and made a few changes as mentioned above.

  • dom/ProcessingInstruction.cpp: Removed include of ExceptionCode.h.
  • dom/Text.cpp: Added include of ExceptionCode.h.
  • dom/TreeWalker.cpp: Removed include of ExceptionCode.h.
  • editing/FrameSelection.cpp: Ditto.
  • fileapi/WebKitBlobBuilder.cpp: Ditto.
  • history/CachedFrame.cpp: Ditto.
  • html/HTMLDocument.cpp: Ditto.
  • html/HTMLMeterElement.cpp: Ditto.
  • html/HTMLObjectElement.cpp: Ditto.
  • html/HTMLOptionElement.cpp: Ditto.
  • html/HTMLOptionsCollection.cpp: Removed include of ExceptionCode.h.

(WebCore::HTMLOptionsCollection::add): Changed argument to const& to avoid a
little bit of reference count churn.

  • html/HTMLOptionsCollection.h: Updated for above.
  • html/HTMLProgressElement.cpp: Removed include of ExceptionCode.h.
  • html/HTMLSelectElement.cpp:

(WebCore::HTMLSelectElement::add): Changed argument to const& to avoid a
little bit of reference count churn.

  • html/HTMLSelectElement.h: Updated for above.
  • html/HTMLTextAreaElement.cpp: Removed include of ExceptionCode.h.
  • html/canvas/CanvasPattern.cpp: Ditto.
  • html/canvas/WebGLContextGroup.h: Removed definition of ExceptionCode.
  • html/track/AudioTrack.h: Removed include of ExceptionCode.h.
  • html/track/TextTrack.h: Ditto.
  • html/track/VTTCue.cpp: Added include of ExceptionCode.h.
  • html/track/VTTRegion.cpp: Ditto.
  • html/track/VideoTrack.h: Removed include of ExceptionCode.h.
  • inspector/DOMEditor.cpp: Ditto.
  • inspector/InspectorDatabaseAgent.cpp: Removed include of ExceptionCode.h.

Tweaked the code in the file a bit, marking more things final and making them
private. ALso simplified a couple of the functions a bit.
(WebCore::InspectorDatabaseAgent::didOpenDatabase):
(WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
(WebCore::InspectorDatabaseAgent::executeSQL):
(WebCore::InspectorDatabaseAgent::databaseForId):

  • inspector/InspectorIndexedDBAgent.cpp: Removed include of ExceptionCode.h.
  • inspector/InspectorStyleSheet.cpp: Added include of ExceptionCode.h.
  • page/FocusController.cpp: Removed include of ExceptionCode.h.
  • page/Location.h: Removed definition of ExceptionCode.
  • page/Page.cpp: Removed include of ExceptionCode.h.
  • platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: Ditto.
  • platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: Ditto.
  • platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm: Ditto.
  • platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: Ditto.
  • storage/StorageArea.h: Removed definition of ExceptionCode.
  • svg/SVGCircleElement.cpp: Removed include of ExceptionCode.h.
  • svg/SVGColor.cpp: Added include of ExceptionCode.h.
  • svg/SVGPaint.cpp: Ditto.
  • svg/SVGStyleElement.cpp: Removed include of ExceptionCode.h.
  • svg/properties/SVGListProperty.h: Added include of ExceptionCode.h.
  • workers/Worker.cpp: Removed include of ExceptionCode.h.
  • workers/WorkerMessagingProxy.cpp: Ditto.
  • xml/XMLSerializer.cpp: Removed unneeded includes.

(WebCore::XMLSerializer::serializeToString): Use nullptr.

  • xml/XMLSerializer.h: Removed definition of ExceptionCode, fixed indentation

of this file, and made a couple tweaks.

Source/WebKit2:

  • WebProcess/Storage/StorageAreaImpl.cpp: Removed include of ExceptionCode.h.
9:46 AM Changeset in webkit [208687] by commit-queue@webkit.org
  • 7 edits in trunk/Source/WebCore

MediaStreamPrivate::create should take vectors of Ref
https://bugs.webkit.org/show_bug.cgi?id=164670

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

No change of behavior.

  • Modules/webaudio/MediaStreamAudioDestinationNode.cpp:

(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):

  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::create):

  • platform/mediastream/MediaStreamPrivate.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):

  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):

9:40 AM Changeset in webkit [208686] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Settings tab should look more like a native macOS view
https://bugs.webkit.org/show_bug.cgi?id=164708
<rdar://problem/29241296>

Reviewed by Timothy Hatcher.

  • UserInterface/Views/SettingsTabContentView.css:

(.content-view.settings):
(.content-view.settings > .header):
(.content-view.settings > .setting-container):
Match macOS Sierra default font size for settings view.

(.content-view.settings > .setting-container > .setting-name):
(.content-view.settings > .setting-container > .setting-value-controller):
(.content-view.settings > .setting-container > .setting-value-controller input):
(.content-view.settings > .setting-container > .setting-value-controller input[type="checkbox"]):
Make checkbox larger.

(.content-view.settings > .setting-container > .setting-value-controller select):
(.content-view.settings > .setting-container > .setting-value-controller input[type="number"]):
Decrease the width of the number fields to make them just wide enough to fit 2 digit numbers.

9:39 AM Changeset in webkit [208685] by jdiggs@igalia.com
  • 13 edits
    2 adds in trunk

AX: [ATK] Expose STATE_SINGLE_LINE and STATE_MULTI_LINE for ARIA searchbox role
https://bugs.webkit.org/show_bug.cgi?id=164712

Reviewed by Chris Fleizach.

Source/WebCore:

Include SearchFieldRole when adding STATE_SINGLE_LINE and STATE_MULTI_LINE
to AtkStateSet.

Test: accessibility/gtk/singleline-and-multiline.html

  • accessibility/atk/WebKitAccessibleWrapperAtk.cpp:

(setAtkStateSetFromCoreObject):

Tools:

Add AccessibilityUIElement::isSingleLine, AccessibilityUIElement::isMultiLine
to DRT and WKTR. Implement it for ATK.

  • DumpRenderTree/AccessibilityUIElement.h:
  • DumpRenderTree/ios/AccessibilityUIElementIOS.mm:

(AccessibilityUIElement::isSingleLine):
(AccessibilityUIElement::isMultiLine):

  • DumpRenderTree/mac/AccessibilityUIElementMac.mm:

(AccessibilityUIElement::isSingleLine):
(AccessibilityUIElement::isMultiLine):

  • DumpRenderTree/win/AccessibilityUIElementWin.cpp:

(AccessibilityUIElement::isSingleLine):
(AccessibilityUIElement::isMultiLine):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:

(WTR::AccessibilityUIElement::isSingleLine):
(WTR::AccessibilityUIElement::isMultiLine):

  • WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:

(WTR::AccessibilityUIElement::isSingleLine):
(WTR::AccessibilityUIElement::isMultiLine):

  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::isSingleLine):
(WTR::AccessibilityUIElement::isMultiLine):

LayoutTests:

  • accessibility/gtk/singleline-and-multiline-expected.txt: Added.
  • accessibility/gtk/singleline-and-multiline.html: Added.
7:46 AM Changeset in webkit [208684] by commit-queue@webkit.org
  • 3 edits
    18 adds in trunk

Support WPT templated tests
https://bugs.webkit.org/show_bug.cgi?id=164707

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

LayoutTests/imported/w3c:

  • web-platform-tests/IndexedDB/interfaces.worker-expected.txt: Added.
  • web-platform-tests/IndexedDB/interfaces.worker.html: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker-expected.txt: Added.
  • web-platform-tests/WebIDL/ecmascript-binding/es-exceptions/constructor-object.worker.html: Added.
  • web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.any-expected.txt: Added.
  • web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.any.html: Added.
  • web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker-expected.txt: Added.
  • web-platform-tests/XMLHttpRequest/XMLHttpRequest-withCredentials.worker.html: Added.
  • web-platform-tests/XMLHttpRequest/abort-during-open.worker-expected.txt: Added.
  • web-platform-tests/XMLHttpRequest/abort-during-open.worker.html: Added.
  • web-platform-tests/XMLHttpRequest/send-send.worker-expected.txt: Added.
  • web-platform-tests/XMLHttpRequest/send-send.worker.html: Added.
  • web-platform-tests/XMLHttpRequest/send-usp.worker-expected.txt: Added.
  • web-platform-tests/XMLHttpRequest/send-usp.worker.html: Added.
  • web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID.worker-expected.txt: Added.
  • web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/NavigatorID.worker.html: Added.
  • web-platform-tests/url/historical.worker-expected.txt: Added.
  • web-platform-tests/url/historical.worker.html: Added.

Tools:

  • Scripts/webkitpy/w3c/test_importer.py:

(TestImporter.write_html_files_for_templated_js_tests): Generating empty HTML files for templated JS tests.
(TestImporter.import_tests):

7:46 AM Changeset in webkit [208683] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

RTCRtpTransceiver should have Ref of sender and receiver
https://bugs.webkit.org/show_bug.cgi?id=164665

Patch by Youenn Fablet <youennf@gmail.com> on 2016-11-14
Reviewed by Darin Adler.

No change of behavior.

Making RTCRptTransceiver have Ref<RTCRtpSender> and Ref<RTCRtpReceiver>.
Transforming transceiver set list of senders and receivers as vectors of references to reduce count churning.
Also making RTCRptTransceiver have a Ref<RTCIceTransport> instead of a RefPtr.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::createOfferTask):
(WebCore::MediaEndpointPeerConnection::createAnswerTask):
(WebCore::createSourceMap):
(WebCore::MediaEndpointPeerConnection::setRemoteDescriptionTask):
(WebCore::MediaEndpointPeerConnection::createReceiver):
(WebCore::MediaEndpointPeerConnection::replaceTrack):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::addTrack):
(WebCore::RTCPeerConnection::removeTrack):
(WebCore::RTCPeerConnection::close):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/RTCRtpTransceiver.cpp:

(WebCore::RTCRtpTransceiver::RTCRtpTransceiver):

  • Modules/mediastream/RTCRtpTransceiver.h:

(WebCore::RTCRtpTransceiver::create):
(WebCore::RTCRtpTransceiver::sender):
(WebCore::RTCRtpTransceiver::receiver):
(WebCore::RTCRtpTransceiver::iceTransport):
(WebCore::RtpTransceiverSet::senders):
(WebCore::RtpTransceiverSet::receivers):

7:39 AM Changeset in webkit [208682] by Csaba Osztrogonác
  • 4 edits in trunk/Source/WebCore

Fix various --minimal build issue
https://bugs.webkit.org/show_bug.cgi?id=164479

Reviewed by Darin Adler.

  • dom/Node.cpp:
  • platform/audio/PlatformMediaSessionManager.cpp:
  • testing/Internals.cpp:

(WebCore::Internals::captionsStyleSheetOverride):

7:39 AM Changeset in webkit [208681] by Csaba Osztrogonác
  • 4 edits in trunk/Source/WebCore

Fix the !ENABLE(VIDEO_TRACK) build
https://bugs.webkit.org/show_bug.cgi?id=164476

Reviewed by Darin Adler.

  • css/RuleSet.cpp:

(WebCore::RuleSet::addRule):

  • css/parser/CSSParserValues.h:

(WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):

  • css/parser/CSSSelectorParser.cpp:

(WebCore::isPseudoElementFunction):
(WebCore::CSSSelectorParser::consumePseudo):

7:21 AM Changeset in webkit [208680] by magomez@igalia.com
  • 2 edits in trunk/Source/WebCore

[GTK] Do not use gstreamer-gl when accelerated compositing is disabled
https://bugs.webkit.org/show_bug.cgi?id=164481

Reviewed by Žan Doberšek.

Check whether accelerated compositing is enabled before creating the gstreamer-gl video sink.

No new tests (Covered by existing tests).

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSink):

5:48 AM Changeset in webkit [208679] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

Fix the !ENABLE(CSS_BOX_DECORATION_BREAK) build
https://bugs.webkit.org/show_bug.cgi?id=164478

Reviewed by Darin Adler.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):

5:48 AM Changeset in webkit [208678] by Csaba Osztrogonác
  • 3 edits in trunk/Source/WebCore

Fix the !ENABLE(CSS_GRID_LAYOUT) build
https://bugs.webkit.org/show_bug.cgi?id=164477

Reviewed by Darin Adler.

  • css/parser/CSSParserFastPaths.cpp:

(WebCore::isSimpleLengthPropertyID):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::parseShorthand):

4:22 AM Changeset in webkit [208677] by Csaba Osztrogonác
  • 2 edits in trunk/Source/WebCore

[EFL] Suppress build warning in generated Geoclue2Interface.c
https://bugs.webkit.org/show_bug.cgi?id=164475

Reviewed by Darin Adler.

  • PlatformEfl.cmake:
1:56 AM Changeset in webkit [208676] by Philippe Normand
  • 4 edits in trunk/Source/WebCore

[GStreamer][OWR] poor video rendering in apprtc
https://bugs.webkit.org/show_bug.cgi?id=164585

Reviewed by Xabier Rodriguez-Calvar.

The apprtc service uses 3 video elements in total, one for local, one
for remote and one called preview. During a call only remote and
preview are displayed, preview being linked to the same mediastream as
local. The consequence is that 2 OWR video renderers of the same
source are created. When gst-gl is enabled this isn't a problem but
when it is disabled a performance issue appears and the webkit video
sink starts dropping frames.

The solution is to have the video renderer shared between the 2
media players in this scenario.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

(WebCore::MediaPlayerPrivateGStreamerBase::videoSink): Add video sink getter.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:

(WebCore::MediaPlayerPrivateGStreamerOwr::load): Make sure the m_streamPrivate is
set before creating the video sink.
(WebCore::MediaPlayerPrivateGStreamerOwr::createVideoSink): Re-use video renderer
and sink if they have previously been created for another media player.

  • platform/mediastream/MediaStreamPrivate.h: Store GStreamer sink and renderer so

they can be potentially used by multiple media players.
(WebCore::MediaStreamPrivate::setVideoRenderer):
(WebCore::MediaStreamPrivate::getVideoSinkElement):
(WebCore::MediaStreamPrivate::getVideoRenderer):

Note: See TracTimeline for information about the timeline view.