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

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):

Note: See TracTimeline for information about the timeline view.