Timeline



Jul 16, 2018:

10:07 PM Changeset in webkit [233884] by Dewei Zhu
  • 2 edits in trunk/Websites/perf.webkit.org

CustomConfigurationTestGroupForm should dispatch different arguments based on whether analysis task is created.
https://bugs.webkit.org/show_bug.cgi?id=187675

Reviewed by Ryosuke Niwa.

This change will fix the bug that no notification will be sent for any test groups except the
first one in any custom perf-try A/B task.

  • public/v3/components/custom-configuration-test-group-form.js:

(CustomConfigurationTestGroupForm.prototype.startTesting): Conditionally includes taskName based on
whether or not analysis task is created.

9:44 PM Changeset in webkit [233883] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Correctly adjust scroll offsets when a page is zoomed
https://bugs.webkit.org/show_bug.cgi?id=187673
<rdar://problem/41712829>

Reviewed by Wenson Hsieh.

Will add test later.

Make sure that distance is scaled by the pageScaleFactor, to
make sure that we scroll correctly when we are zoomed in.

  • page/ios/EventHandlerIOS.mm:

(WebCore::autoscrollAdjustmentFactorForScreenBoundaries):

9:22 PM Changeset in webkit [233882] by Simon Fraser
  • 61 edits
    58 deletes in trunk

Roll out r233873 and r233875 since they caused 8 new layout test crashes.

  • TestExpectations:
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key-expected.txt: Removed.
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html: Removed.
  • http/wpt/crypto/aes-cbc-crash.any-expected.txt: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.html: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.js: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/aes-cbc-crash.any.worker.html: Removed.
  • http/wpt/crypto/aes-ctr-crash.any-expected.txt: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.html: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.js: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/aes-ctr-crash.any.worker.html: Removed.
  • http/wpt/crypto/aes-gcm-crash.any-expected.txt: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.html: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.js: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/aes-gcm-crash.any.worker.html: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any-expected.txt: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.html: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.js: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker.html: Removed.
  • http/wpt/crypto/ecdsa-crash.any-expected.txt: Removed.
  • http/wpt/crypto/ecdsa-crash.any.html: Removed.
  • http/wpt/crypto/ecdsa-crash.any.js: Removed.
  • http/wpt/crypto/ecdsa-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/ecdsa-crash.any.worker.html: Removed.
  • http/wpt/crypto/hkdf-crash.any-expected.txt: Removed.
  • http/wpt/crypto/hkdf-crash.any.html: Removed.
  • http/wpt/crypto/hkdf-crash.any.js: Removed.
  • http/wpt/crypto/hkdf-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/hkdf-crash.any.worker.html: Removed.
  • http/wpt/crypto/pbkdf2-crash.any-expected.txt: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.html: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.js: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/pbkdf2-crash.any.worker.html: Removed.
  • http/wpt/crypto/resources/common.js: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any-expected.txt: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.html: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.js: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/rsa-oaep-crash.any.worker.html: Removed.
  • http/wpt/crypto/rsa-pss-crash.any-expected.txt: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.html: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.js: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/rsa-pss-crash.any.worker.html: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any-expected.txt: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.html: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.js: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker.html: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any-expected.txt: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.html: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.js: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker-expected.txt: Removed.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html: Removed.
8:38 PM Changeset in webkit [233881] by rniwa@webkit.org
  • 2 edits in trunk

Update ReadMe.md line 68
https://bugs.webkit.org/show_bug.cgi?id=187533

Reviewed by Wenson Hsieh.

  • ReadMe.md:
8:33 PM Changeset in webkit [233880] by rniwa@webkit.org
  • 3 edits in trunk/LayoutTests

[ WK2 ] Layout Test editing/selection/update-selection-by-style-change.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187649

Reviewed by Wenson Hsieh.

Force update the selection before ending the test.

  • editing/selection/update-selection-by-style-change.html:
7:50 PM Changeset in webkit [233879] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Release assert in ~TimerBase is getting hit in WK1 apps which uses JSC API directly
https://bugs.webkit.org/show_bug.cgi?id=187713
<rdar://problem/41759548>

Reviewed by Simon Fraser.

Turn this into a debug assertion in WebKit1 on iOS since JSC API doesn't grab the web thread lock,
which means that Timer can get destroyed without the web thread lock in the main thread.

  • platform/Timer.cpp:

(WebCore::TimerBase::~TimerBase):
(WebCore::TimerBase::setNextFireTime):

7:17 PM Changeset in webkit [233878] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

Fix API Test failures introduced by r233865
https://bugs.webkit.org/show_bug.cgi?id=187720

Unreviewed APITest fix after r233865.

Fullscreen can now only be initiated from a window that is on screen.

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-16

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm:

(TestWebKitAPI::TEST):

7:03 PM Changeset in webkit [233877] by Simon Fraser
  • 20 edits
    2 adds in trunk

Add color filter for transforming colors in Dark Mode
https://bugs.webkit.org/show_bug.cgi?id=187717
Source/WebCore:

rdar://problem/41146650

Reviewed by Dean Jackson.

Add a new filter function for use in -apple-color-filter for transforming colors
when in Dark Mode. The filter is called apple-invert-lightness(), and takes no parameters.
It's based on a lightness invert in HSL space, with some adjustments to improve the contrast
of some colors on dark backgrounds, so does a much better job that using invert() with hue-rotate().

Test: css3/color-filters/color-filter-apple-invert-lightness.html

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::ComputedStyleExtractor::valueForFilter):

  • css/CSSValueKeywords.in:
  • css/StyleResolver.cpp:

(WebCore::filterOperationForType):
(WebCore::StyleResolver::createFilterOperations):

  • css/parser/CSSPropertyParser.cpp:

(WebCore::CSSPropertyParser::parseSingleValue):

  • css/parser/CSSPropertyParserHelpers.cpp:

(WebCore::CSSPropertyParserHelpers::consumeFilterImage):
(WebCore::CSSPropertyParserHelpers::isPixelFilterFunction):
(WebCore::CSSPropertyParserHelpers::isColorFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
(WebCore::CSSPropertyParserHelpers::consumeFilter):
(WebCore::CSSPropertyParserHelpers::isValidPrimitiveFilterFunction): Deleted.

  • css/parser/CSSPropertyParserHelpers.h:
  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

  • platform/graphics/Color.cpp:
  • platform/graphics/ColorUtilities.cpp:

(WebCore::sRGBToLinearComponents):
(WebCore::linearToSRGBComponents):
(WebCore::sRGBToLinearColorComponentForLuminance):
(WebCore::luminance):
(WebCore::sRGBToHSL):
(WebCore::calcHue):
(WebCore::HSLToSRGB):
(WebCore::ColorMatrix::ColorMatrix):

  • platform/graphics/ColorUtilities.h:
  • platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:

(PlatformCAFilters::filterValueForOperation):
(PlatformCAFilters::colorMatrixValueForFilter):

  • platform/graphics/filters/FEColorMatrix.cpp:
  • platform/graphics/filters/FilterOperation.cpp:

(WebCore::InvertLightnessFilterOperation::operator== const):
(WebCore::InvertLightnessFilterOperation::blend):
(WebCore::InvertLightnessFilterOperation::transformColor const):
(WebCore::operator<<):

  • platform/graphics/filters/FilterOperation.h:
  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::build):

Source/WebKit:

Reviewed by Dean Jackson.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<FilterOperation>::encode):
(IPC::decodeFilterOperation):

LayoutTests:

rdar://problem/41146650

Reviewed by Dean Jackson.

  • css3/color-filters/color-filter-apple-invert-lightness-expected.html: Added.
  • css3/color-filters/color-filter-apple-invert-lightness.html: Added.
  • css3/color-filters/color-filter-parsing-expected.txt:
  • css3/color-filters/color-filter-parsing.html:
6:10 PM Changeset in webkit [233876] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

Black flash in content area when returning to Mail
https://bugs.webkit.org/show_bug.cgi?id=187719
<rdar://problem/42165340>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applicationDidFinishSnapshottingAfterEnteringBackground):
This still reproduces sometimes even after r233723, because:

If a pending commit arrives after ApplicationDidEnterBackground (when we
ask the web content process to freeze the layer tree), and after
ApplicationDidFinishSnapshottingAfterEnteringBackground (when we hide
WKContentView), but before the process sleeps, it will cause WKContentView
to be unhidden (potentially including layers with empty surfaces as contents).
Nothing will re-hide WKContentView. Instead, we should wait for the next
*pending* commit, which will necessarily not come until after the application
returns to the foreground because of the strict IPC ordering between
the message that freezes the layer tree and the "next commit" mechanism.

6:03 PM Changeset in webkit [233875] by jiewen_tan@apple.com
  • 2 edits in trunk/Source/WebCore

Unreviewed, build fix for r233873.

  • crypto/SubtleCrypto.cpp:

(WebCore::crossThreadCopyImportParams):

5:54 PM Changeset in webkit [233874] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.26

Tag Safari-606.1.26.

5:31 PM Changeset in webkit [233873] by jiewen_tan@apple.com
  • 61 edits
    60 adds in trunk

[WebCrypto] Crypto operations should copy their parameters before hoping to another thread
https://bugs.webkit.org/show_bug.cgi?id=187501
<rdar://problem/41438160>

Reviewed by Youenn Fablet.

Source/WebCore:

This patch aims at making all captured variables in all crypto lambdas that need to be passed
to a worker thread thread safe, which includes:
1) changing ref counted objects to thread safe ref counted object.
2) adding isolatedCopy methods to non ref counted classes, so they can be called by CrossThreadCopy().

In addition to above changes, this patch also does the following things:
1) change the name CryptoAlgorithm::dispatchOperation => CryptoAlgorithm::dispatchOperationInWorkQueue
to make it clear that lambdas will be passed to a secondary thread.
2) make CryptoAlgorithmParameters as const parameters for all methods.

Tests: crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html

http/wpt/crypto/aes-cbc-crash.any.html
http/wpt/crypto/aes-cbc-crash.any.worker.html
http/wpt/crypto/aes-ctr-crash.any.html
http/wpt/crypto/aes-ctr-crash.any.worker.html
http/wpt/crypto/aes-gcm-crash.any.html
http/wpt/crypto/aes-gcm-crash.any.worker.html
http/wpt/crypto/derive-hmac-key-crash.any.html
http/wpt/crypto/derive-hmac-key-crash.any.worker.html
http/wpt/crypto/ecdsa-crash.any.html
http/wpt/crypto/ecdsa-crash.any.worker.html
http/wpt/crypto/hkdf-crash.any.html
http/wpt/crypto/hkdf-crash.any.worker.html
http/wpt/crypto/pbkdf2-crash.any.html
http/wpt/crypto/pbkdf2-crash.any.worker.html
http/wpt/crypto/rsa-oaep-crash.any.html
http/wpt/crypto/rsa-oaep-crash.any.worker.html
http/wpt/crypto/rsa-pss-crash.any.html
http/wpt/crypto/rsa-pss-crash.any.worker.html
http/wpt/crypto/unwrap-ec-key-crash.any.html
http/wpt/crypto/unwrap-ec-key-crash.any.worker.html
http/wpt/crypto/unwrap-rsa-key-crash.any.html
http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::importKey):
(WebCore::dispatchAlgorithmOperation):
(WebCore::CryptoAlgorithm::dispatchOperationInWorkQueue):
(WebCore::CryptoAlgorithm::dispatchOperation): Deleted.

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

(WebCore::crossThreadCopyImportParams):
(WebCore::SubtleCrypto::encrypt):
(WebCore::SubtleCrypto::decrypt):
(WebCore::SubtleCrypto::sign):
(WebCore::SubtleCrypto::verify):
(WebCore::SubtleCrypto::deriveKey):
(WebCore::SubtleCrypto::deriveBits):
(WebCore::SubtleCrypto::importKey):
(WebCore::SubtleCrypto::wrapKey):
(WebCore::SubtleCrypto::unwrapKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::importKey):

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

(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CFB.h:
  • crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:

(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::encrypt):
(WebCore::CryptoAlgorithmAES_CTR::decrypt):
(WebCore::CryptoAlgorithmAES_CTR::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CTR.h:
  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
(WebCore::CryptoAlgorithmAES_GCM::importKey):

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

(WebCore::CryptoAlgorithmAES_KW::importKey):

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

(WebCore::CryptoAlgorithmECDH::deriveBits):
(WebCore::CryptoAlgorithmECDH::importKey):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp:

(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::importKey):

  • crypto/algorithms/CryptoAlgorithmECDSA.h:
  • crypto/algorithms/CryptoAlgorithmHKDF.cpp:

(WebCore::CryptoAlgorithmHKDF::deriveBits):
(WebCore::CryptoAlgorithmHKDF::importKey):

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

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::importKey):

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

(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
(WebCore::CryptoAlgorithmPBKDF2::importKey):

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

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):

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

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):

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

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):

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

(WebCore::CryptoAlgorithmRSA_PSS::sign):
(WebCore::CryptoAlgorithmRSA_PSS::verify):
(WebCore::CryptoAlgorithmRSA_PSS::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
  • crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:

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

  • crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

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

  • crypto/mac/CryptoAlgorithmAES_CFBMac.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/mac/CryptoAlgorithmHKDFMac.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h:
  • crypto/parameters/CryptoAlgorithmAesCtrParams.h:
  • crypto/parameters/CryptoAlgorithmAesGcmParams.h:
  • crypto/parameters/CryptoAlgorithmEcKeyParams.h:
  • crypto/parameters/CryptoAlgorithmEcdsaParams.h:
  • crypto/parameters/CryptoAlgorithmHkdfParams.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
  • crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
  • crypto/parameters/CryptoAlgorithmRsaPssParams.h:

LayoutTests:

crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html is an exception of this series of tests as
it only aims to test the correct behavoir of suggested algorithms. This patch aslo does some test
gardening.

  • TestExpectations:
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key-expected.txt: Added.
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any.js: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any.js: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any.js: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.js: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker.html: Added.
  • http/wpt/crypto/ecdsa-crash.any-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.html: Added.
  • http/wpt/crypto/ecdsa-crash.any.js: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker.html: Added.
  • http/wpt/crypto/hkdf-crash.any-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.html: Added.
  • http/wpt/crypto/hkdf-crash.any.js: Added.
  • http/wpt/crypto/hkdf-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.worker.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any.js: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker.html: Added.
  • http/wpt/crypto/resources/common.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.html: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any.js: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker-expected.txt: Added.
5:17 PM Changeset in webkit [233872] by commit-queue@webkit.org
  • 28 edits in trunk

Source/WebCore:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the flush immediate transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

An immediate-paint transaction should force all the images which are pending
decoding to be repainted.

To do that, FrameView::paintControlTints() will be re-factored to a new
generic function such that it takes PaintInvalidationReasons. The new function
which is named 'traverseForPaintInvalidation' will traverse the render tree
for a specific PaintInvalidationReasons.

invalidateImagesWithAsyncDecodes() will stop the asynchronous decoding for
the underlying image and repaint all the clients which are waiting for the
decoding to finish.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::didRemoveClient):
(WebCore::CachedImage::isClientWaitingForAsyncDecoding const):
(WebCore::CachedImage::addClientWaitingForAsyncDecoding):
(WebCore::CachedImage::removeAllClientsWaitingForAsyncDecoding):
(WebCore::CachedImage::allClientsRemoved):
(WebCore::CachedImage::clear):
(WebCore::CachedImage::createImage):
(WebCore::CachedImage::imageFrameAvailable):
(WebCore::CachedImage::addPendingImageDrawingClient): Deleted.

  • loader/cache/CachedImage.h:
  • page/FrameView.cpp:

(WebCore::FrameView::paintScrollCorner):
(WebCore::FrameView::updateControlTints):
(WebCore::FrameView::traverseForPaintInvalidation):
(WebCore::FrameView::adjustPageHeightDeprecated):
(WebCore::FrameView::paintControlTints): Deleted.

  • page/FrameView.h:
  • platform/ScrollView.cpp:

(WebCore::ScrollView::paint):

  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::paint):

  • platform/graphics/BitmapImage.h:
  • platform/graphics/GraphicsContext.cpp:

(WebCore::GraphicsContext::GraphicsContext):

  • platform/graphics/GraphicsContext.h:

(WebCore::GraphicsContext::performingPaintInvalidation const):
(WebCore::GraphicsContext::invalidatingControlTints const):
(WebCore::GraphicsContext::invalidatingImagesWithAsyncDecodes const):
(WebCore::GraphicsContext::updatingControlTints const): Deleted.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintReplaced):
(WebCore::RenderImage::paintAreaElementFocusRing):
(WebCore::RenderImage::paintIntoRect):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paintScrollCorner):
(WebCore::RenderLayer::paintResizer):
(WebCore::RenderLayer::paintLayer):

  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::paint):

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::paint):

  • testing/Internals.cpp:

(WebCore::Internals::invalidateControlTints):
(WebCore::Internals::paintControlTints): Deleted.

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

Source/WebKit:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

For immediate-paint transaction, we should force all the images which are
pending decoding to be repainted before building this transaction.

  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::updateControlTints):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

LayoutTests:
[iOS] When bringing MobileSafari to the foreground, images, which are pending decoding, won't be drawn into the immediate-paint transaction
https://bugs.webkit.org/show_bug.cgi?id=187375

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-16
Reviewed by Simon Fraser.

The Internals API paintControlTints() is now renamed to invalidateControlTints()
to be consistent with the new enum values and with the new name of the
C++ function.

  • fast/css/webkit-mask-crash-fieldset-legend.html:
  • fast/css/webkit-mask-crash-figure.html:
  • fast/css/webkit-mask-crash-table.html:
  • fast/css/webkit-mask-crash-td-2.html:
  • fast/css/webkit-mask-crash-td.html:
4:53 PM Changeset in webkit [233871] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ MacOS WK1 Debug ] Layout Test svg/custom/linking-uri-01-b.svg is flakey
https://bugs.webkit.org/show_bug.cgi?id=187711

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-16

  • platform/mac-wk1/TestExpectations:
4:46 PM Changeset in webkit [233870] by Ryan Haddad
  • 2 edits in trunk/Source/WebCore

Unreviewed attempt to fix the build.

  • rendering/RenderThemeMac.mm:
4:34 PM Changeset in webkit [233869] by dino@apple.com
  • 39 edits
    2 adds in trunk

Allow removal of white backgrounds
https://bugs.webkit.org/show_bug.cgi?id=187574
<rdar://problem/41146792>

Reviewed by Simon Fraser.

Source/WebCore:

Add a drawing mode that turns white backgrounds into transparent
regions, such that a hosting app can see through to its window.

Test: css3/color-filters/punch-out-white-backgrounds.html

  • page/Settings.yaml: New Setting.
  • rendering/InlineFlowBox.cpp: Draw with a destination out blend mode

if the background is white and we are punching out backgrounds, which means
that it will erase the destination.
(WebCore::InlineFlowBox::paintBoxDecorations):

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintBackground): Ditto.

  • rendering/RenderTableCell.cpp:

(WebCore::RenderTableCell::paintBackgroundsBehindCell): Ditto.

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended): Save and restore
the composition mode if necessary.

Source/WebKit:

Add a new WebPreference for punching out white backgrounds.

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetPunchOutWhiteBackgroundsInDarkMode):
(WKPreferencesGetPunchOutWhiteBackgroundsInDarkMode):

  • UIProcess/API/C/WKPreferencesRefPrivate.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _punchOutWhiteBackgroundsInDarkMode]):
(-[WKWebViewConfiguration _setPunchOutWhiteBackgroundsInDarkMode:]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:

Source/WebKitLegacy/mac:

Add a new WebPreference for punching out white backgrounds.

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

(+[WebPreferences initialize]):
(-[WebPreferences punchOutWhiteBackgroundsInDarkMode]):
(-[WebPreferences setPunchOutWhiteBackgroundsInDarkMode:]):

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

(-[WebView _preferencesChanged:]):

Tools:

Add a new menu item for punching out white backgrounds in MiniBrowser.
In WebKitTestRunner, expose the new setting and hook that up to
drawing a background in the WebView.

  • MiniBrowser/mac/AppDelegate.m:

(defaultConfiguration): Add _punchOutWhiteBackgroundsInDarkMode.

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

(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController togglePunchOutWhiteBackgroundsInDarkMode:]):
(-[SettingsController punchOutWhiteBackgroundsInDarkMode]):

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController didChangeSettings]): Set the new preference.

  • WebKitTestRunner/PlatformWebView.h: Expose a drawsBackground property.
  • WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: Null implementation.

(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Ditto.

(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm: Call into the WKWebView and

set its SPI.
(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/mac/PlatformWebViewMac.mm: Ditto.

(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):

  • WebKitTestRunner/TestController.cpp: Reset and copy the new preference.

(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::hasSameInitializationOptions const):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::platformCreateWebView): If the option for punching
out the background was set, tell the WebView to not draw its background.

4:11 PM Changeset in webkit [233868] by david_fenton@apple.com
  • 61 edits
    3 deletes in trunk

Unreviewed, rolling out r233867.

caused build failures on High Sierra, Sierra and iOS

Reverted changeset:

"[WebCrypto] Crypto operations should copy their parameters
before hoping to another thread"
https://bugs.webkit.org/show_bug.cgi?id=187501
https://trac.webkit.org/changeset/233867

2:58 PM Changeset in webkit [233867] by jiewen_tan@apple.com
  • 61 edits
    60 adds in trunk

[WebCrypto] Crypto operations should copy their parameters before hoping to another thread
https://bugs.webkit.org/show_bug.cgi?id=187501
<rdar://problem/41438160>

Reviewed by Youenn Fablet.

Source/WebCore:

This patch aims at making all captured variables in all crypto lambdas that need to be passed
to a worker thread thread safe, which includes:
1) changing ref counted objects to thread safe ref counted object.
2) adding isolatedCopy methods to non ref counted classes, so they can be called by CrossThreadCopy().

In addition to above changes, this patch also does the following things:
1) change the name CryptoAlgorithm::dispatchOperation => CryptoAlgorithm::dispatchOperationInWorkQueue
to make it clear that lambdas will be passed to a secondary thread.
2) make CryptoAlgorithmParameters as const parameters for all methods.

Tests: crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html

http/wpt/crypto/aes-cbc-crash.any.html
http/wpt/crypto/aes-cbc-crash.any.worker.html
http/wpt/crypto/aes-ctr-crash.any.html
http/wpt/crypto/aes-ctr-crash.any.worker.html
http/wpt/crypto/aes-gcm-crash.any.html
http/wpt/crypto/aes-gcm-crash.any.worker.html
http/wpt/crypto/derive-hmac-key-crash.any.html
http/wpt/crypto/derive-hmac-key-crash.any.worker.html
http/wpt/crypto/ecdsa-crash.any.html
http/wpt/crypto/ecdsa-crash.any.worker.html
http/wpt/crypto/hkdf-crash.any.html
http/wpt/crypto/hkdf-crash.any.worker.html
http/wpt/crypto/pbkdf2-crash.any.html
http/wpt/crypto/pbkdf2-crash.any.worker.html
http/wpt/crypto/rsa-oaep-crash.any.html
http/wpt/crypto/rsa-oaep-crash.any.worker.html
http/wpt/crypto/rsa-pss-crash.any.html
http/wpt/crypto/rsa-pss-crash.any.worker.html
http/wpt/crypto/unwrap-ec-key-crash.any.html
http/wpt/crypto/unwrap-ec-key-crash.any.worker.html
http/wpt/crypto/unwrap-rsa-key-crash.any.html
http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html

  • crypto/CryptoAlgorithm.cpp:

(WebCore::CryptoAlgorithm::encrypt):
(WebCore::CryptoAlgorithm::decrypt):
(WebCore::CryptoAlgorithm::sign):
(WebCore::CryptoAlgorithm::verify):
(WebCore::CryptoAlgorithm::deriveBits):
(WebCore::CryptoAlgorithm::importKey):
(WebCore::dispatchAlgorithmOperation):
(WebCore::CryptoAlgorithm::dispatchOperationInWorkQueue):
(WebCore::CryptoAlgorithm::dispatchOperation): Deleted.

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

(WebCore::crossThreadCopyImportParams):
(WebCore::SubtleCrypto::encrypt):
(WebCore::SubtleCrypto::decrypt):
(WebCore::SubtleCrypto::sign):
(WebCore::SubtleCrypto::verify):
(WebCore::SubtleCrypto::deriveKey):
(WebCore::SubtleCrypto::deriveBits):
(WebCore::SubtleCrypto::importKey):
(WebCore::SubtleCrypto::wrapKey):
(WebCore::SubtleCrypto::unwrapKey):

  • crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:

(WebCore::CryptoAlgorithmAES_CBC::encrypt):
(WebCore::CryptoAlgorithmAES_CBC::decrypt):
(WebCore::CryptoAlgorithmAES_CBC::importKey):

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

(WebCore::CryptoAlgorithmAES_CFB::encrypt):
(WebCore::CryptoAlgorithmAES_CFB::decrypt):
(WebCore::CryptoAlgorithmAES_CFB::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CFB.h:
  • crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:

(WebCore::parametersAreValid):
(WebCore::CryptoAlgorithmAES_CTR::encrypt):
(WebCore::CryptoAlgorithmAES_CTR::decrypt):
(WebCore::CryptoAlgorithmAES_CTR::importKey):

  • crypto/algorithms/CryptoAlgorithmAES_CTR.h:
  • crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:

(WebCore::CryptoAlgorithmAES_GCM::encrypt):
(WebCore::CryptoAlgorithmAES_GCM::decrypt):
(WebCore::CryptoAlgorithmAES_GCM::importKey):

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

(WebCore::CryptoAlgorithmAES_KW::importKey):

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

(WebCore::CryptoAlgorithmECDH::deriveBits):
(WebCore::CryptoAlgorithmECDH::importKey):

  • crypto/algorithms/CryptoAlgorithmECDH.h:
  • crypto/algorithms/CryptoAlgorithmECDSA.cpp:

(WebCore::CryptoAlgorithmECDSA::sign):
(WebCore::CryptoAlgorithmECDSA::verify):
(WebCore::CryptoAlgorithmECDSA::importKey):

  • crypto/algorithms/CryptoAlgorithmECDSA.h:
  • crypto/algorithms/CryptoAlgorithmHKDF.cpp:

(WebCore::CryptoAlgorithmHKDF::deriveBits):
(WebCore::CryptoAlgorithmHKDF::importKey):

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

(WebCore::CryptoAlgorithmHMAC::sign):
(WebCore::CryptoAlgorithmHMAC::verify):
(WebCore::CryptoAlgorithmHMAC::importKey):

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

(WebCore::CryptoAlgorithmPBKDF2::deriveBits):
(WebCore::CryptoAlgorithmPBKDF2::importKey):

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

(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
(WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):

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

(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
(WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):

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

(WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::importKey):

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

(WebCore::CryptoAlgorithmRSA_PSS::sign):
(WebCore::CryptoAlgorithmRSA_PSS::verify):
(WebCore::CryptoAlgorithmRSA_PSS::importKey):

  • crypto/algorithms/CryptoAlgorithmRSA_PSS.h:
  • crypto/gcrypt/CryptoAlgorithmAES_CBCGCrypt.cpp:

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

  • crypto/gcrypt/CryptoAlgorithmAES_CFBGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_CTRGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmHKDFGCrypt.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmPBKDF2GCrypt.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/gcrypt/CryptoAlgorithmRSA_OAEPGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/gcrypt/CryptoAlgorithmRSA_PSSGCrypt.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:

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

  • crypto/mac/CryptoAlgorithmAES_CFBMac.cpp:

(WebCore::CryptoAlgorithmAES_CFB::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CFB::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_CTRMac.cpp:

(WebCore::CryptoAlgorithmAES_CTR::platformEncrypt):
(WebCore::CryptoAlgorithmAES_CTR::platformDecrypt):

  • crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:

(WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
(WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):

  • crypto/mac/CryptoAlgorithmHKDFMac.cpp:

(WebCore::CryptoAlgorithmHKDF::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:

(WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):

  • crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:

(WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
(WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):

  • crypto/mac/CryptoAlgorithmRSA_PSSMac.cpp:

(WebCore::CryptoAlgorithmRSA_PSS::platformSign):
(WebCore::CryptoAlgorithmRSA_PSS::platformVerify):

  • crypto/parameters/CryptoAlgorithmAesCbcCfbParams.h:
  • crypto/parameters/CryptoAlgorithmAesCtrParams.h:
  • crypto/parameters/CryptoAlgorithmAesGcmParams.h:
  • crypto/parameters/CryptoAlgorithmEcKeyParams.h:
  • crypto/parameters/CryptoAlgorithmEcdsaParams.h:
  • crypto/parameters/CryptoAlgorithmHkdfParams.h:
  • crypto/parameters/CryptoAlgorithmHmacKeyParams.h:
  • crypto/parameters/CryptoAlgorithmPbkdf2Params.h:
  • crypto/parameters/CryptoAlgorithmRsaHashedImportParams.h:
  • crypto/parameters/CryptoAlgorithmRsaOaepParams.h:
  • crypto/parameters/CryptoAlgorithmRsaPssParams.h:

LayoutTests:

crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html is an exception of this series of tests as
it only aims to test the correct behavoir of suggested algorithms. This patch aslo does some test
gardening.

  • TestExpectations:
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key-expected.txt: Added.
  • crypto/subtle/aes-gcm-import-key-unwrap-ec-raw-key.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.html: Added.
  • http/wpt/crypto/aes-cbc-crash.any.js: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-cbc-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.html: Added.
  • http/wpt/crypto/aes-ctr-crash.any.js: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-ctr-crash.any.worker.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.html: Added.
  • http/wpt/crypto/aes-gcm-crash.any.js: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/aes-gcm-crash.any.worker.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.html: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.js: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/derive-hmac-key-crash.any.worker.html: Added.
  • http/wpt/crypto/ecdsa-crash.any-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.html: Added.
  • http/wpt/crypto/ecdsa-crash.any.js: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/ecdsa-crash.any.worker.html: Added.
  • http/wpt/crypto/hkdf-crash.any-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.html: Added.
  • http/wpt/crypto/hkdf-crash.any.js: Added.
  • http/wpt/crypto/hkdf-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/hkdf-crash.any.worker.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.html: Added.
  • http/wpt/crypto/pbkdf2-crash.any.js: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/pbkdf2-crash.any.worker.html: Added.
  • http/wpt/crypto/resources/common.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.html: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.js: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-oaep-crash.any.worker.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.html: Added.
  • http/wpt/crypto/rsa-pss-crash.any.js: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/rsa-pss-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker-expected.txt: Added.
  • http/wpt/crypto/unwrap-ec-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any-expected.txt: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.js: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker.html: Added.
  • http/wpt/crypto/unwrap-rsa-key-crash.any.worker-expected.txt: Added.
2:15 PM Changeset in webkit [233866] by commit-queue@webkit.org
  • 25 edits
    3 copies
    5 adds in trunk

[Datalist][macOS] Add suggestions UI for TextFieldInputTypes
https://bugs.webkit.org/show_bug.cgi?id=186531

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-16
Reviewed by Tim Horton.

Source/WebCore:

Tests: fast/forms/datalist/datalist-show-hide.html

fast/forms/datalist/datalist-textinput-keydown.html

  • html/TextFieldInputType.cpp:

(WebCore::TextFieldInputType::handleKeydownEvent):
(WebCore::TextFieldInputType::handleKeydownEventForSpinButton): The suggestions view takes precedence when handling arrow key events.

Source/WebKit:

Created WebDataListSuggestionsDropdownMac as a wrapper around the suggestions
view. The suggestions for TextFieldInputTypes are displayed using an NSTableView
in it's own child window. This is done so that suggestions can be presented
outside of the page if the parent window's size is too small. The maximum number
of suggestions that are visible at one time is 6, with additional suggestions made
available by scrolling.

Suggestions in the view can be selected via click or by using arrow keys. If the
input element associated with the suggestions is blurred, or the page is moved in
any way, the suggestions view is hidden.

Added IPC messages to the UIProcess to enable the display of the suggestions view.
This required a new ArgumentCoder for DataListSuggestionInformation.

  • Shared/WebCoreArgumentCoders.cpp:

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

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/PageClient.h:
  • UIProcess/WebDataListSuggestionsDropdown.cpp: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h.

(WebKit::WebDataListSuggestionsDropdown::WebDataListSuggestionsDropdown):
(WebKit::WebDataListSuggestionsDropdown::~WebDataListSuggestionsDropdown):
(WebKit::WebDataListSuggestionsDropdown::close):

  • UIProcess/WebDataListSuggestionsDropdown.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h.

(WebKit::WebDataListSuggestionsDropdown::Client::~Client):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::viewWillStartLiveResize):
(WebKit::WebPageProxy::viewDidLeaveWindow):
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::setPageZoomFactor):
(WebKit::WebPageProxy::setPageAndTextZoomFactors):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
(WebKit::WebPageProxy::pageDidScroll):
(WebKit::WebPageProxy::showDataListSuggestions):
(WebKit::WebPageProxy::handleKeydownInDataList):
(WebKit::WebPageProxy::endDataListSuggestions):
(WebKit::WebPageProxy::didCloseSuggestions):
(WebKit::WebPageProxy::didSelectOption):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::closeOverlayedViews):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::createDataListSuggestionsDropdown):

  • UIProcess/mac/PageClientImplMac.h:
  • UIProcess/mac/PageClientImplMac.mm:

(WebKit::PageClientImpl::createDataListSuggestionsDropdown):

  • UIProcess/mac/WebDataListSuggestionsDropdownMac.h: Copied from Source/WebKit/WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h.
  • UIProcess/mac/WebDataListSuggestionsDropdownMac.mm: Added.

(WebKit::WebDataListSuggestionsDropdownMac::create):
(WebKit::WebDataListSuggestionsDropdownMac::~WebDataListSuggestionsDropdownMac):
(WebKit::WebDataListSuggestionsDropdownMac::WebDataListSuggestionsDropdownMac):
(WebKit::WebDataListSuggestionsDropdownMac::show):
(WebKit::WebDataListSuggestionsDropdownMac::didSelectOption):
(WebKit::WebDataListSuggestionsDropdownMac::selectOption):
(WebKit::WebDataListSuggestionsDropdownMac::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionsDropdownMac::close):
(-[WKDataListSuggestionCell initWithFrame:]):
(-[WKDataListSuggestionCell setText:]):
(-[WKDataListSuggestionCell setActive:]):
(-[WKDataListSuggestionCell drawRect:]):
(-[WKDataListSuggestionCell mouseEntered:]):
(-[WKDataListSuggestionCell mouseExited:]):
(-[WKDataListSuggestionCell acceptsFirstResponder]):
(-[WKDataListSuggestionTable initWithElementRect:]):
(-[WKDataListSuggestionTable setVisibleRect:]):
(-[WKDataListSuggestionTable currentActiveRow]):
(-[WKDataListSuggestionTable setActiveRow:]):
(-[WKDataListSuggestionTable reload]):
(-[WKDataListSuggestionTable acceptsFirstResponder]):
(-[WKDataListSuggestionTable enclosingScrollView]):
(-[WKDataListSuggestionTable removeFromSuperviewWithoutNeedingDisplay]):
(-[WKDataListSuggestionsView initWithInformation:inView:]):
(-[WKDataListSuggestionsView currentSelectedString]):
(-[WKDataListSuggestionsView updateWithInformation:]):
(-[WKDataListSuggestionsView moveSelectionByDirection:]):
(-[WKDataListSuggestionsView invalidate]):
(-[WKDataListSuggestionsView dropdownRectForElementRect:]):
(-[WKDataListSuggestionsView showSuggestionsDropdown:]):
(-[WKDataListSuggestionsView selectedRow:]):
(-[WKDataListSuggestionsView numberOfRowsInTableView:]):
(-[WKDataListSuggestionsView tableView:heightOfRow:]):
(-[WKDataListSuggestionsView tableView:viewForTableColumn:row:]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebDataListSuggestionPicker.cpp:

(WebKit::WebDataListSuggestionPicker::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionPicker::didSelectOption):
(WebKit::WebDataListSuggestionPicker::didCloseSuggestions):
(WebKit::WebDataListSuggestionPicker::close):
(WebKit::WebDataListSuggestionPicker::displayWithActivationType):

  • WebProcess/WebCoreSupport/WebDataListSuggestionPicker.h:

Tools:

Added isShowingDatalistSuggestions testing hook in order to enable testing of the
visibility of the suggestions view.

  • DumpRenderTree/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::isShowingDataListSuggestions const):

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

(WTR::UIScriptController::isShowingDataListSuggestions const):

  • TestRunnerShared/UIScriptContext/UIScriptController.h:
  • WebKitTestRunner/mac/UIScriptControllerMac.mm:

(WTR::UIScriptController::isShowingDataListSuggestions const):

LayoutTests:

Added tests to verify that the suggestions are correctly shown and hidden, and that
suggestions can be selected and inserted into an input field.

  • fast/forms/datalist/datalist-show-hide-expected.txt: Added.
  • fast/forms/datalist/datalist-show-hide.html: Added.
  • fast/forms/datalist/datalist-textinput-keydown-expected.txt: Added.
  • fast/forms/datalist/datalist-textinput-keydown.html: Added.
  • platform/ios/TestExpectations:
  • resources/ui-helper.js:

(window.UIHelper.isShowingDataListSuggestions):

1:39 PM Changeset in webkit [233865] by commit-queue@webkit.org
  • 14 edits
    2 adds in trunk

Fullscreen requires active document.
https://bugs.webkit.org/show_bug.cgi?id=186226
rdar://problem/36187413

Patch by Jeremy Jones <jeremyj@apple.com> on 2018-07-16
Reviewed by Jer Noble.

Source/WebCore:

Test: media/no-fullscreen-when-hidden.html

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • dom/Document.cpp:

(WebCore::Document::requestFullScreenForElement):

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::enterFullscreen):

  • page/ChromeClient.h:

Source/WebKit:

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::getIsViewVisible):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::isViewVisible):

  • WebProcess/WebCoreSupport/WebChromeClient.h:

LayoutTests:

This change guarantees the document to be visible for both element fullscreen and video fullscreen.

User gesture is not enough to guarantee that the document is visible when fullscreen is initiated
because JavaScript can spin wait before initiating fullscreen. During that spin the page or window might
be hidden.

Document::hidden() can't be relied upon because it won't update while JavaScript spins.

This change adds a sync call to the UI process to get the current UI visibility state.

  • media/no-fullscreen-when-hidden.html: Added.
  • media/video-test.js:

(eventName.string_appeared_here.thunk):
(runWithKeyDown):

  • platform/ios-wk1/TestExpectations:
  • platform/mac-wk1/TestExpectations:
1:32 PM Changeset in webkit [233864] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r233502): Camera in <input type=file> becomes unresponsive after attempting to dismiss it
https://bugs.webkit.org/show_bug.cgi?id=187706
<rdar://problem/42137088>

Reviewed by Wenson Hsieh.

  • UIProcess/ios/forms/WKFileUploadPanel.mm:

Remove an unused member.

(-[WKFileUploadPanel _dismissDisplayAnimated:]):
Allow us to dismiss the camera view controller in addition to the menu.

1:23 PM Changeset in webkit [233863] by commit-queue@webkit.org
  • 7 edits in trunk/Source

Reduce size of NetworkLoadMetrics and therefore ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=187671

Patch by Alex Christensen <achristensen@webkit.org> on 2018-07-16
Reviewed by Darin Adler.

Source/WebCore:

  • inspector/agents/InspectorNetworkAgent.cpp:

(WebCore::toProtocol):
(WebCore::InspectorNetworkAgent::buildObjectForMetrics):

  • platform/network/NetworkLoadMetrics.h:

(WebCore::NetworkLoadMetrics::isolatedCopy const):
(WebCore::NetworkLoadMetrics::reset):
(WebCore::NetworkLoadMetrics::clearNonTimingData):

Source/WebKit:

  • Shared/WebCoreArgumentCoders.h:
1:10 PM Changeset in webkit [233862] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] UnlinkedCodeBlock::shrinkToFit miss m_constantIdentifierSets
https://bugs.webkit.org/show_bug.cgi?id=187709

Reviewed by Mark Lam.

UnlinkedCodeBlock::shrinkToFit accidentally misses m_constantIdentifierSets shrinking.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::shrinkToFit):

1:06 PM Changeset in webkit [233861] by Matt Baker
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Fix execution highlighting after r233820
https://bugs.webkit.org/show_bug.cgi?id=187703
<rdar://problem/42246167>

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.currentPositionToOriginalPosition):
(WI.TextEditor.prototype._updateExecutionRangeHighlight):

12:49 PM Changeset in webkit [233860] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Make SourceParseMode small
https://bugs.webkit.org/show_bug.cgi?id=187705

Reviewed by Mark Lam.

Each SourceParseMode is distinct. So we do not need to make it a set-style (power of 2 style).
Originally, this is done to make SourceParseModeSet faster because it is critical in our parser.
But we can keep SourceParseModeSet fast by 1U << mode | set. And we can make SourceParseMode
within 5 bits. This reduces the size of UnlinkedCodeBlock from 288 to 280.

  • parser/ParserModes.h:

(JSC::SourceParseModeSet::SourceParseModeSet):
(JSC::SourceParseModeSet::contains):
(JSC::SourceParseModeSet::mergeSourceParseModes):

12:09 PM Changeset in webkit [233859] by Kocsen Chung
  • 1 copy in branches/safari-606-branch

New Branch.

11:57 AM Changeset in webkit [233858] by commit-queue@webkit.org
  • 4 edits
    16 adds in trunk

AX: Audit Tab should have an Audit Manager
https://bugs.webkit.org/show_bug.cgi?id=184071
<rdar://problem/38946364>

Patch by Aaron Chu <aaron_chu@apple.com> on 2018-07-16
Reviewed by Brian Burg.

Source/WebInspectorUI:

This implements the AuditManager for the audit feature. This patch revolves
around building out an AuditManager that facilitates an audit. The AuditManager
is responsible for managing and storing AuditReports and AuditTestSuites. It is
also tasked to decide how to run a test -- whether as a test case or as a test
suite. This patch also includes 4 models with which the AuditManager works to
perform an audit and to generate a report. These models include AuditTestCase,
which as a collection is stored inside an AuditTestSuite; and AuditResult,
which, as a collection is stored inside an AuditReport.

  • UserInterface/Controllers/AuditManager.js: Added.

(WI.AuditManager):
(WI.AuditManager.prototype.get testSuites):
(WI.AuditManager.prototype.get reports):
(WI.AuditManager.prototype.async.runAuditTestByRepresentedObject):
(WI.AuditManager.prototype.reportForId):
(WI.AuditManager.prototype.removeAllReports):
(WI.AuditManager.prototype.async._runTestCase):

  • UserInterface/Main.html:
  • UserInterface/Models/AuditReport.js: Added.

(WI.AuditReport):
(WI.AuditReport.prototype.get representedTestCases):
(WI.AuditReport.prototype.get representedTestSuite):
(WI.AuditReport.prototype.get resultsData):
(WI.AuditReport.prototype.get isWritable):
(WI.AuditReport.prototype.get failedCount):
(WI.AuditReport.prototype.addResult):
(WI.AuditReport.prototype.close):

  • UserInterface/Models/AuditResult.js: Added.

(WI.AuditResult):
(WI.AuditResult.prototype.get testResult):
(WI.AuditResult.prototype.get name):
(WI.AuditResult.prototype.get logLevel):
(WI.AuditResult.prototype.get failed):

  • UserInterface/Models/AuditTestCase.js: Added.

(WI.AuditTestCase.prototype.get id):
(WI.AuditTestCase.prototype.get name):
(WI.AuditTestCase.prototype.get suite):
(WI.AuditTestCase.prototype.get test):
(WI.AuditTestCase.prototype.get setup):
(WI.AuditTestCase.prototype.get tearDown):
(WI.AuditTestCase.prototype.get errorDetails):
(WI.AuditTestCase):

  • UserInterface/Models/AuditTestSuite.js: Added.

(WI.AuditTestSuite):
(WI.AuditTestSuite.testCaseDescriptors):
(WI.AuditTestSuite.prototype.get id):
(WI.AuditTestSuite.prototype.get name):
(WI.AuditTestSuite.prototype.get testCases):
(WI.AuditTestSuite.prototype._buildTestCasesFromDescriptors):

  • UserInterface/Test.html:

LayoutTests:

Test cases for AuditManager, AuditTestCase, AuditTestSuite, AuditResult and AuditReport.

  • inspector/audit/audit-manager-expected.txt: Added.
  • inspector/audit/audit-manager.html: Added.
  • inspector/audit/audit-report-expected.txt: Added.
  • inspector/audit/audit-report.html: Added.
  • inspector/audit/audit-test-case-expected.txt: Added.
  • inspector/audit/audit-test-case.html: Added.
  • inspector/audit/audit-test-suite-expected.txt: Added.
  • inspector/audit/audit-test-suite.html: Added.
  • inspector/audit/resources/audit-test-fixtures.js: Added.

(TestPage.registerInitializer.window.testSuiteFixture1):
(TestPage.registerInitializer.window.testSuiteFixture1.testCaseDescriptors):
(TestPage.registerInitializer.window.testSuiteFixture2):
(TestPage.registerInitializer.window.testSuiteFixture2.testCaseDescriptors):
(TestPage.registerInitializer):

11:55 AM Changeset in webkit [233857] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Make sure LibWebRTCMediaEndpoint is always destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=187702

Reviewed by Youenn Fablet.

Make sure LibWebRTCMediaEndpoint is always constructed and destructed on the main thread since
it has a Timer data member and it would not be safe otherwise. LibWebRTCMediaEndpoint is
ThreadSafeRefCounted and frequently passed to other threads.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
11:52 AM Changeset in webkit [233856] by Yusuke Suzuki
  • 2 edits in trunk/Tools

Add --target-path option to dump-class-layout
https://bugs.webkit.org/show_bug.cgi?id=187687

Reviewed by Simon Fraser.

We add an escape hatch to dump-class-layout for specifying target path directly.
This --target-path allows us to use dump-class-layout in the other ports
like JSCOnly.

We can dump class layout if we build the target with clang by using the following command.

Tools/Scripts/dump-class-layout \

--architecture=x86_64 \
--target-path=path/to/libJavaScriptCore.so \
JavaScriptCore \
ScopeNode

  • Scripts/dump-class-layout:

(main):

11:49 AM Changeset in webkit [233855] by Yusuke Suzuki
  • 10 edits
    3 adds in trunk

[JSC] Generator and AsyncGeneratorMethod's prototype is incorrect
https://bugs.webkit.org/show_bug.cgi?id=187585

Reviewed by Darin Adler.

JSTests:

  • stress/default-proto-for-async-generator.js: Added.

(shouldBe):
(async.asyncGenerator):

  • stress/default-proto-for-generator.js: Added.

(shouldBe):
(generator):

  • stress/prototype-for-async-generator.js: Added.

(shouldBe):
(async.asyncGenerator):
(A.prototype.async.asyncGenerator):
(A):

  • test262/expectations.yaml:

Source/JavaScriptCore:

This patch fixes Generator and AsyncGenerator's prototype issues.

  1. Generator's default prototype is incorrect when generator.prototype = null is performed.

We fix this by changing JSFunction::prototypeForConstruction.

  1. AsyncGeneratorMethod is not handled. We change the name isAsyncGeneratorFunctionParseMode

to isAsyncGeneratorWrapperParseMode since it is aligned to Generator's code. And use it well
to fix prototype issues for AsyncGeneratorMethod.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitPutAsyncGeneratorFields):
(JSC::BytecodeGenerator::emitNewFunction):

  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionNode::emitBytecode):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::createFunctionMetadata):

  • parser/Parser.cpp:

(JSC::getAsynFunctionBodyParseMode):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseAsyncGeneratorFunctionSourceElements):

  • parser/ParserModes.h:

(JSC::isAsyncGeneratorParseMode):
(JSC::isAsyncGeneratorWrapperParseMode):
(JSC::isAsyncGeneratorFunctionParseMode): Deleted.

  • runtime/FunctionExecutable.h:
  • runtime/JSFunction.cpp:

(JSC::JSFunction::prototypeForConstruction):
(JSC::JSFunction::getOwnPropertySlot):

11:42 AM Changeset in webkit [233854] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

jsc shell's noFTL utility test function should be more robust.
https://bugs.webkit.org/show_bug.cgi?id=187704
<rdar://problem/42231988>

Reviewed by Michael Saboff and Keith Miller.

  • jsc.cpp:

(functionNoFTL):

  • only setNeverFTLOptimize() if the function is actually a JS function.
11:35 AM Changeset in webkit [233853] by sihui_liu@apple.com
  • 7 edits in trunk

IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins
https://bugs.webkit.org/show_bug.cgi?id=187631
<rdar://problem/42164227>

Reviewed by Brady Eidson.

Source/WebCore:

When asked to delete database for an origin, we deleted the databases whose mainFrameOrigin
is that origin. Given that the origin may create IndexedDB from subframes, we should delete
databases whose openingOrigin is that origin too.

Covered by modified API test: WebKit.WebsiteDataStoreCustomPaths.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::performCloseAndDeleteDatabasesForOrigins):

Source/WebKit:

We need to return all origins, both openingOrigin and mainFrameOrigin, of IndexedDB so users
could be better aware of which origins are using databases and decide what they want to
remove.

  • StorageProcess/StorageProcess.cpp:

(WebKit::StorageProcess::indexedDatabaseOrigins):

  • StorageProcess/StorageProcess.h:

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

11:28 AM Changeset in webkit [233852] by Kocsen Chung
  • 7 edits in trunk/Source

Versioning.

10:59 AM Changeset in webkit [233851] by Simon Fraser
  • 29 edits in trunk/Source/WebCore

Shrink some font-related classes and enums
https://bugs.webkit.org/show_bug.cgi?id=187686

Reviewed by Myles Maxfield.

Use enum class for enums in TextFlags.h and make them one byte big.

Re-order members of Font to shrink it from 360 to 328 bytes.

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator FontSmoothingMode const):
(WebCore::CSSPrimitiveValue::operator FontSmallCaps const):
(WebCore::CSSPrimitiveValue::operator TextRenderingMode const):

  • platform/graphics/Font.cpp:

(WebCore::Font::Font):
(WebCore::Font::verticalRightOrientationFont const):

  • platform/graphics/Font.h:
  • platform/graphics/FontCascade.cpp:

(WebCore::offsetToMiddleOfGlyph):

  • platform/graphics/FontCascade.h:

(WebCore::FontCascade::advancedTextRenderingMode const):

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::FontCascadeFonts::glyphDataForSystemFallback):
(WebCore::FontCascadeFonts::glyphDataForVariant):
(WebCore::glyphPageFromFontRanges):

  • platform/graphics/FontDescription.cpp:

(WebCore::FontCascadeDescription::FontCascadeDescription):

  • platform/graphics/FontDescription.h:

(WebCore::FontDescription::setTextRenderingMode):
(WebCore::FontDescription::setOrientation):
(WebCore::FontDescription::setWidthVariant):
(WebCore::FontCascadeDescription::setFontSmoothing):
(WebCore::FontCascadeDescription::initialSmallCaps):
(WebCore::FontCascadeDescription::initialFontSmoothing):
(WebCore::FontCascadeDescription::initialTextRenderingMode):

  • platform/graphics/FontPlatformData.h:

(WebCore::FontPlatformData::isForTextCombine const):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::preparePlatformFont):

  • platform/graphics/cocoa/FontCascadeCocoa.mm:

(WebCore::showLetterpressedGlyphsWithAdvances):
(WebCore::showGlyphsWithAdvances):
(WebCore::FontCascade::drawGlyphs):
(WebCore::FontCascade::fontForCombiningCharacterSequence const):

  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::platformInit):
(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::platformWidthForGlyph const):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::hash const):
(WebCore::mapFontWidthVariantToCTFeatureSelector):
(WebCore::FontPlatformData::ctFont const):
(WebCore::FontPlatformData::description const):

  • platform/graphics/freetype/FontPlatformDataFreeType.cpp:

(WebCore::FontPlatformData::buildScaledFont):

  • platform/graphics/freetype/SimpleFontDataFreeType.cpp:

(WebCore::Font::platformInit):
(WebCore::Font::platformWidthForGlyph const):

  • platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:

(WebCore::fontFeatures):
(WebCore::ComplexTextController::collectComplexTextRunsForCharacters):

  • platform/graphics/mac/SimpleFontDataCoreText.cpp:

(WebCore::Font::getCFStringAttributes const):

  • platform/graphics/win/FontCGWin.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/win/FontCascadeDirect2D.cpp:

(WebCore::FontCascade::drawGlyphs):

  • platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:

(WebCore::GlyphPage::fill):

  • platform/graphics/win/SimpleFontDataDirect2D.cpp:

(WebCore::Font::platformInit):
(WebCore::Font::platformBoundsForGlyph const):
(WebCore::Font::platformWidthForGlyph const):

  • platform/text/TextFlags.h:
  • rendering/RenderCombineText.cpp:

(WebCore::RenderCombineText::combineTextIfNeeded):

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::calculateClipRects const):

  • rendering/TextPainter.cpp:

(WebCore::TextPainter::paintTextWithShadows):

  • rendering/TextPainter.h:
  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::fontAndGlyphOrientation):

  • rendering/svg/RenderSVGInlineText.cpp:

(WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):

10:51 AM Changeset in webkit [233850] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ iOS ] Layout Test fast/forms/submit-change-fragment.html is a flaky Timeout
https://bugs.webkit.org/show_bug.cgi?id=187699

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-16

  • platform/ios-simulator-wk2/TestExpectations:
9:54 AM Changeset in webkit [233849] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

[ EWS ] http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html is Crashing on Win-EWS
https://bugs.webkit.org/show_bug.cgi?id=187700

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-16

  • platform/win/TestExpectations:
9:37 AM Changeset in webkit [233848] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: Console filter field buttons should be darker
https://bugs.webkit.org/show_bug.cgi?id=187626
<rdar://problem/42142744>

Reviewed by Brian Burg.

  • UserInterface/Views/FindBanner.css:

(@media (prefers-dark-interface)):
(.find-banner > button.segmented):
(.find-banner > button.segmented > .glyph):

9:29 AM Changeset in webkit [233847] by Nikita Vasilyev
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Dark Mode: selected item background color is too light
https://bugs.webkit.org/show_bug.cgi?id=187691
<rdar://problem/42225308>

Reviewed by Brian Burg.

  • UserInterface/Views/DarkMode.css:

(@media (prefers-dark-interface)):
(:root):
(.tree-outline.dom li.elements-drag-over .selection-area):
(.tree-outline.dom:focus li.selected .selection-area):

7:24 AM Changeset in webkit [233846] by svillar@igalia.com
  • 14 edits
    2 copies in trunk/Source/WebCore

[WebVR] Add support for connect/disconnect and mount/unmount device events
https://bugs.webkit.org/show_bug.cgi?id=187343

Reviewed by Žan Doberšek.

WebVR specs define a series of events as part of the Window Interface Extension. We're
adding support for the connect/disconnect and mount/unmount events both at the module level
and the platform level using OpenVR.

In order to do that we need to keep lists of VRPlatformDisplays at platform level and
VRDisplays at bindings level. We then update those lists accordingly to detect potential
additions/removals, and emit the corresponding signals. A new client interface
VRPlatformDisplayClient was also defined so that VRPlatformDisplay implementations could
notify their clients (typically a VRDisplay).

Last but not least, NavigatorWebVR was updated so it supplements Navigator instead of
supplementing Page.

  • Modules/webvr/NavigatorWebVR.cpp: Supplement Navigator not Page.

(WebCore::NavigatorWebVR::getVRDisplays): Keep a list of VRDisplays and update them
conveniently, also emitting the required events under certain conditions (like device
disconnection).
(WebCore::NavigatorWebVR::supplementName): New method.
(WebCore::NavigatorWebVR::from): Ditto.

  • Modules/webvr/NavigatorWebVR.h: Supplement Navigator not Page.
  • Modules/webvr/VRDisplay.cpp:

(WebCore::VRDisplay::create): Moved suspendIfNeeded() to constructor.
(WebCore::VRDisplay::VRDisplay): Set itself as VRPlatformDisplay client.
(WebCore::VRDisplay::~VRDisplay): Unset as VRPlatformDisplay client.
(WebCore::VRDisplay::VRPlatformDisplayConnected): Dispatch event on DOM window.
(WebCore::VRDisplay::VRPlatformDisplayDisconnected): Ditto.
(WebCore::VRDisplay::VRPlatformDisplayMounted): Ditto.
(WebCore::VRDisplay::VRPlatformDisplayUnmounted): Ditto.

  • Modules/webvr/VRDisplay.h: Extend from VRPlatformDisplayClient.

(WebCore::VRDisplay::document):

  • Modules/webvr/VRDisplayEvent.cpp: Updated Copyright.
  • Modules/webvr/VRDisplayEvent.h: Ditto.
  • Sources.txt: Added the two new files.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • platform/vr/VRManager.cpp:

(WebCore::VRManager::getVRDisplays): Keep a list of VRPlatformDisplays and update them conveniently,
also emitting the required events under certain conditions (like device disconnection).

  • platform/vr/VRManager.h:
  • platform/vr/VRPlatformDisplay.cpp: New file with common implementations for VRPlatformDisplays.

(WebCore::VRPlatformDisplay::setClient):
(WebCore::VRPlatformDisplay::notifyVRPlatformDisplayEvent):

  • platform/vr/VRPlatformDisplay.h: Added a generic method to notify about different

events. Added the client pointer.

  • platform/vr/VRPlatformDisplayClient.h: New file. VRPlatformDisplay implementations will

call the client methods in the event of some circumstances happening.
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayConnected):
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayDisconnected):
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayMounted):
(WebCore::VRPlatformDisplayClient::VRPlatformDisplayUnmounted):

  • platform/vr/openvr/VRPlatformDisplayOpenVR.cpp:

(WebCore::VRPlatformDisplayOpenVR::updateDisplayInfo): Poll the device for new events to
detect connection/disconnections or device activations/deactivations (HMD
mounted/unmounted).

  • platform/vr/openvr/VRPlatformDisplayOpenVR.h:
5:24 AM Changeset in webkit [233845] by zandobersek@gmail.com
  • 4 edits
    2 adds in trunk/Source/WebCore

[Nicosia] Add Nicosia::PlatformLayer, Nicosia::CompositionLayer classes
https://bugs.webkit.org/show_bug.cgi?id=187693

Reviewed by Carlos Garcia Campos.

Add the Nicosia::PlatformLayer class. This will be the base platform
layer class from which different derivatives will be created, addressing
different use cases. The generic PlatformLayer type alias will point to
this class in the future.

First class deriving from Nicosia::PlatformLayer is
Nicosia::CompositionLayer, purpose of which will be to mirror the state
that's stored in the platform-specific GraphicsLayer derivative. It will
also allow making thread-safe updates to that state.

CoordinatedGraphicsLayer implementation now spawns a CompositionLayer
object and tracks state changes in a separate
CompositionLayer::LayerState::Delta object. During flushing, the changed
state is applied to the layer's pending state before the delta is nulled
out. The updated state isn't used anywhere yet, but future changes will
implement committing this state into the rendering pipeline.

There's bits of state not yet being managed by CompositionLayer, e.g.
debug visuals, filters and animations. These will be addressed later.

The m_solidColor member variable is added to CoordinatedGraphicsLayer in
order to properly store the solid color value. Normally this would be
contained by the parent GraphicsLayer class, but no such member variable
exists there.

  • platform/TextureMapper.cmake:
  • platform/graphics/nicosia/NicosiaPlatformLayer.cpp: Added.

(Nicosia::PlatformLayer::PlatformLayer):
(Nicosia::CompositionLayer::CompositionLayer):

  • platform/graphics/nicosia/NicosiaPlatformLayer.h: Added.

(Nicosia::PlatformLayer::isCompositionLayer const):
(Nicosia::PlatformLayer::id const):
(Nicosia::CompositionLayer::create):
(Nicosia::CompositionLayer::LayerState::Flags::Flags):
(Nicosia::CompositionLayer::updateState):

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

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::setPosition):
(WebCore::CoordinatedGraphicsLayer::setAnchorPoint):
(WebCore::CoordinatedGraphicsLayer::setSize):
(WebCore::CoordinatedGraphicsLayer::setTransform):
(WebCore::CoordinatedGraphicsLayer::setChildrenTransform):
(WebCore::CoordinatedGraphicsLayer::setPreserves3D):
(WebCore::CoordinatedGraphicsLayer::setMasksToBounds):
(WebCore::CoordinatedGraphicsLayer::setDrawsContent):
(WebCore::CoordinatedGraphicsLayer::setContentsVisible):
(WebCore::CoordinatedGraphicsLayer::setContentsOpaque):
(WebCore::CoordinatedGraphicsLayer::setBackfaceVisibility):
(WebCore::CoordinatedGraphicsLayer::setOpacity):
(WebCore::CoordinatedGraphicsLayer::setContentsRect):
(WebCore::CoordinatedGraphicsLayer::setContentsTileSize):
(WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
(WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
(WebCore::CoordinatedGraphicsLayer::setMaskLayer):
(WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
(WebCore::CoordinatedGraphicsLayer::syncChildren):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
4:58 AM Changeset in webkit [233844] by Carlos Garcia Campos
  • 6 edits in trunk

[GLIB] Add API to evaluate code using a given object to store global symbols
https://bugs.webkit.org/show_bug.cgi?id=187639

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

Add jsc_context_evaluate_in_object(). It returns a new object as an out parameter. Global symbols in the
evaluated script are added as properties to the new object instead of to the context global object. This is
similar to JS::Evaluate in spider monkey when a scopeChain parameter is passed, but JSC doesn't support using a
scope for assignments, so we have to create a new context and get its global object. This patch also updates
jsc_context_evaluate_with_source_uri() to receive the starting line number for consistency with the new
jsc_context_evaluate_in_object().

  • API/glib/JSCContext.cpp:

(jsc_context_evaluate): Pass 0 as line number to jsc_context_evaluate_with_source_uri().
(evaluateScriptInContext): Helper function to evaluate a script in a JSGlobalContextRef.
(jsc_context_evaluate_with_source_uri): Use evaluateScriptInContext().
(jsc_context_evaluate_in_object): Create a new context and set the main context global object as extension
scope of it. Evaluate the script in the new context and get its global object to be returned as parameter.

  • API/glib/JSCContext.h:
  • API/glib/docs/jsc-glib-4.0-sections.txt:

Tools:

Add a new test case.

  • TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:

(testJSCEvaluateInObject):
(testJSCExceptions):
(main):

Jul 15, 2018:

11:43 PM Changeset in webkit [233843] by zandobersek@gmail.com
  • 3 edits in trunk/Tools

[webkitpy] run-web-platform-tests should allow specifying custom WPT metadata directories
https://bugs.webkit.org/show_bug.cgi?id=187353

Reviewed by Youenn Fablet.

When using run-web-platform-tests, allow specifying custom WPT metadata
directory. This will avoid generating such metadata-filled directory
from the port-specific JSON expectations file, and instead will search
for the metadata files and the include manifest inside the specified
directory. The MANIFEST.json file will also be generated under there.

Rationale for this change is prototyping using custom metadata
directories and avoiding generating all this content from a JSON file.
Using this by default in the future would avoid sporradic changes in how
WPT handles metadata .ini files and releases us from the obligation of
adjusting the generator for every such change. This would also allow
managing this metadata content in a separate repository, avoiding
polluting the main webkit.org repository with thousands of .ini files.

If this turns out to be the preferable way of managing the metadata
content, the JSON files under WebPlatformTests/ and the related code in
wpt_runner.py would be removed.

  • Scripts/webkitpy/w3c/wpt_runner.py:

(parse_args):
(WPTRunner._wpt_run_paths):
(WPTRunner.run):

  • Scripts/webkitpy/w3c/wpt_runner_unittest.py:

(WPTRunnerTest.test_run_with_specified_options):

10:22 PM Changeset in webkit [233842] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebKit

[SOUP] http/tests/misc/bubble-drag-events.html crashes
https://bugs.webkit.org/show_bug.cgi?id=182352

Reviewed by Youenn Fablet.

PingLoad is not refcounted and deletes itself when the load finishes. The problem is that the network data
task can also finish the load, causing the PingLoad to be deleted early. We tried to fix it in r233032 in the
network data task soup implementation, but it caused regressions.

  • NetworkProcess/PingLoad.cpp:

(WebKit::PingLoad::didReceiveChallenge): Create a weak ref for the ping load before calling the operation completion
handler and return early after the completion handler if it was deleted.
(WebKit::PingLoad::didReceiveResponseNetworkSession): Ditto.

  • NetworkProcess/PingLoad.h:
  • NetworkProcess/soup/NetworkDataTaskSoup.cpp:

(WebKit::NetworkDataTaskSoup::continueAuthenticate): Revert r233032.

10:19 PM Changeset in webkit [233841] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[iOS apps on macOS] Playing embedded Twitter videos in the News app crashes the web process
https://bugs.webkit.org/show_bug.cgi?id=187690
<rdar://problem/41869703>

Reviewed by Tim Horton.

Work around unexpected behavior when soft-linking AVFoundation. After using dlopen_preflight to check for the
existence of a library prior to loading the library using dlopen, dlsym subsequently returns null for some
symbols that would otherwise be available. This causes us to RELEASE_ASSERT later down the road when we try to
load AVAudioSessionModeDefault in AudioSessionIOS.mm.

To fix this for now, simply check for the library directly instead of using the more lightweight preflight
check. See clone: <rdar://problem/42224780> for more detail.

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

(WebCore::AVFoundationMIMETypeCache::isAvailable const):

Jul 14, 2018:

9:26 PM Changeset in webkit [233840] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Shrink StyleFillData, StyleStrokeData and StyleMiscData
https://bugs.webkit.org/show_bug.cgi?id=187681

Reviewed by Anders Carlsson.

Shrink these data structures by making more enum classes one byte in size, and
re-ordering. StyleFillData goes from 56 to 48, StyleStrokeData from 80 to 72,
StyleMiscData from 40 to 32 bytes.

  • rendering/style/SVGRenderStyleDefs.cpp:

(WebCore::StyleFillData::StyleFillData):
(WebCore::StyleFillData::operator== const):
(WebCore::StyleStrokeData::StyleStrokeData):
(WebCore::StyleStrokeData::operator== const):
(WebCore::StyleStopData::operator== const):
(WebCore::StyleMiscData::StyleMiscData):

  • rendering/style/SVGRenderStyleDefs.h:
7:13 PM Changeset in webkit [233839] by Simon Fraser
  • 11 edits in trunk/Source/WebCore

Shrink CachedResource and subclasses
https://bugs.webkit.org/show_bug.cgi?id=187546

Reviewed by Daniel Bates.

Shrink CachedResource down from 1384 to 1336 bytes, CachedImage from 1480 to
1424 bytes, and CachedFont a little.

This saves about 23KB on cnn.com.

  • loader/ResourceLoaderOptions.h:
  • loader/cache/CachedFont.h:
  • loader/cache/CachedImage.h:
  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::CachedResource):

  • loader/cache/CachedResource.h:
  • platform/network/CacheValidation.h:

(WebCore::RedirectChainCacheStatus::RedirectChainCacheStatus):

  • platform/network/NetworkLoadMetrics.h:
  • platform/network/ParsedContentRange.h:
  • platform/network/ResourceRequestBase.h:
  • platform/network/ResourceResponseBase.h:
5:29 PM Changeset in webkit [233838] by Simon Fraser
  • 11 edits in trunk/Source/WebCore

Shrink some style-related classes and enums
https://bugs.webkit.org/show_bug.cgi?id=187680

Reviewed by Antti Koivisto.

Make all the enum classes in RenderStyleConstants be one byte big (all have less
than 256 values).

Shrink DocumentRuleSet from 384 to 368 bytes by re-ordering, which also helps shrink
StyleResolver from 1024 to 952 bytes.

Shrink BorderValue by re-ordering (now that the layout of Color has changed) which
shrinks BorderData from 168 to 136 bytes.

Convert a couple of other enums to enum class so that they can have explicit size.

  • css/DocumentRuleSets.h:
  • css/MediaQueryMatcher.cpp:

(WebCore::MediaQueryMatcher::documentElementUserAgentStyle const):

  • css/StyleMedia.cpp:

(WebCore::StyleMedia::matchMedium const):

  • css/StyleResolver.cpp:

(WebCore::StyleResolver::StyleResolver):
(WebCore::StyleResolver::State::State):
(WebCore::StyleResolver::styleForElement):
(WebCore::StyleResolver::cascadedPropertiesForRollback):
(WebCore::StyleResolver::applyProperty):
(WebCore::cascadeLevelForIndex):

  • css/StyleResolver.h:
  • rendering/style/BorderValue.h:
  • rendering/style/RenderStyle.cpp:
  • rendering/style/RenderStyleConstants.h:
  • style/StyleTreeResolver.cpp:

(WebCore::Style::TreeResolver::styleForElement):

  • svg/SVGElementRareData.h:

(WebCore::SVGElementRareData::overrideComputedStyle):

4:44 PM Changeset in webkit [233837] by ap@apple.com
  • 14 edits in trunk/Source

Ensure WebKit stack is ad-hoc signed
https://bugs.webkit.org/show_bug.cgi?id=187667

Patch by Kocsen Chung <Kocsen Chung> on 2018-07-14
Reviewed by Alexey Proskuryakov.

  • Configurations/Base.xcconfig:
9:59 AM Changeset in webkit [233836] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Replace TR2_OPTIONAL_ASSERTED_EXPRESSION macro in <wtf/Optional.h>
<https://webkit.org/b/187672>

Reviewed by Frédéric Wang.

  • wtf/Optional.h:

(std::optional::operator -> const):
(std::optional::operator * const):
(std::optional<T::operator-> const):
(std::optional<T::operator* const):

  • Replace TR2_OPTIONAL_ASSERTED_EXPRESSION macro with ASSERT_UNDER_CONSTEXPR_CONTEXT macro and return statement.
2:19 AM Changeset in webkit [233835] by krit@webkit.org
  • 7 edits
    12 adds in trunk

[css-masking] Fully support -webkit-clip-path on SVG elements
https://bugs.webkit.org/show_bug.cgi?id=185829

Reviewed by Simon Fraser.

Source/WebCore:

-webkit-clip-path contributes to SVG elements with boxes, shapes and now with
element references to <clipPath> elements as well. Make sure that all types
contribute to hit-testing of the SVG element as well as they should.

Tests: svg/clip-path/webkit-clip-path-after-expected.svg

svg/clip-path/webkit-clip-path-after.svg
svg/clip-path/webkit-clip-path-before-expected.svg
svg/clip-path/webkit-clip-path-before.svg
svg/dynamic-updates/SVGClipPath-prefixed-influences-hitTesting.html
svg/dynamic-updates/SVGClipPath-prefixed-path-influences-hitTesting.html
svg/dynamic-updates/SVGClipPathElement-prefixed-css-transform-influences-hitTesting.html
svg/dynamic-updates/SVGClipPathElement-prefixed-transform-influences-hitTesting.html

  • rendering/svg/SVGRenderSupport.cpp: Share code as much as possible.

(WebCore::clipPathReferenceBox):
(WebCore::isPointInCSSClippingArea): Take -webkit-clip-path into account.
(WebCore::SVGRenderSupport::clipContextToCSSClippingArea):
(WebCore::SVGRenderSupport::pointInClippingArea):

  • rendering/svg/SVGRenderSupport.h:
  • rendering/svg/SVGRenderingContext.cpp: Clip to -webkit-clip-path boxes, shapes and references.

(WebCore::SVGRenderingContext::prepareToRenderSVGContent):

  • rendering/svg/SVGResources.cpp: Add -webkit-clip-path references to cached resources. Mimic SVG clip-path.

(WebCore::SVGResources::buildCachedResources):

LayoutTests:

Test -webkit-clip-path element references on SVG elements. Make sure, -webkit-clip-path
contributes to hit testing for element references and basic shapes.

  • svg/clip-path/webkit-clip-path-after-expected.svg: Added.
  • svg/clip-path/webkit-clip-path-after.svg: Added.
  • svg/clip-path/webkit-clip-path-before-expected.svg: Added.
  • svg/clip-path/webkit-clip-path-before.svg: Added.
  • svg/dynamic-updates/SVGClipPath-prefixed-influences-hitTesting-expected.txt: Added.
  • svg/dynamic-updates/SVGClipPath-prefixed-influences-hitTesting.html: Added.
  • svg/dynamic-updates/SVGClipPath-prefixed-path-influences-hitTesting-expected.txt: Added.
  • svg/dynamic-updates/SVGClipPath-prefixed-path-influences-hitTesting.html: Added.
  • svg/dynamic-updates/SVGClipPathElement-prefixed-css-transform-influences-hitTesting-expected.txt: Added.
  • svg/dynamic-updates/SVGClipPathElement-prefixed-css-transform-influences-hitTesting.html: Added.
  • svg/dynamic-updates/SVGClipPathElement-prefixed-transform-influences-hitTesting-expected.txt: Added.
  • svg/dynamic-updates/SVGClipPathElement-prefixed-transform-influences-hitTesting.html: Added.

Jul 13, 2018:

11:48 PM Changeset in webkit [233834] by Ross Kirsling
  • 3 edits in trunk/Tools

[WinCairo] run-api-tests is timing out for almost all test cases
https://bugs.webkit.org/show_bug.cgi?id=187547

Reviewed by Fujii Hironori.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess._wait_for_data_and_update_buffers_using_win32_apis):
Still attempt to read from stdout/stderr even if the process has exited, as long as it's before the deadline.

  • Scripts/webkitpy/port/server_process_unittest.py:

(TestServerProcess.test_read_after_process_exits):
Add test case.

7:15 PM Changeset in webkit [233833] by Simon Fraser
  • 3 edits in trunk/Source/WebCore

Avoid fetching visitedDependentColor() so many times in editing code
https://bugs.webkit.org/show_bug.cgi?id=187676

Reviewed by Zalan Bujtas.

editingAttributedStringFromRange called style.visitedDependentColor() twice for each property,
and fontAttributesForSelectionStart() called it two or three times. Use a local Color variable
to avoid so many calls. Also replace a call to alpha() with isVisible() which makes the usage more clear.

No behavior change.

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::fontAttributesForSelectionStart const):

  • editing/cocoa/HTMLConverter.mm:

(WebCore::editingAttributedStringFromRange):

6:53 PM Changeset in webkit [233832] by Ryan Haddad
  • 13 edits
    10 copies
    30 adds in trunk

Add TestExpectations and baselines for iOS 12
https://bugs.webkit.org/show_bug.cgi?id=187628

Reviewed by Alexey Proskuryakov.

Tools:

  • Scripts/webkitpy/port/ios.py:

(IOSPort): Bump current version to 12.

LayoutTests:

  • platform/ios-12/TestExpectations: Added.
6:16 PM Changeset in webkit [233831] by Ryan Haddad
  • 172 edits
    171 copies
    74 adds in trunk

Add TestExpectations and baselines for Mojave.
https://bugs.webkit.org/show_bug.cgi?id=187620

Reviewed by Alexey Proskuryakov.

Tools:

  • Scripts/webkitpy/port/mac.py:

(MacPort): Bump current version to 10.14.

LayoutTests:

  • platform/mac/TestExpectations:
6:07 PM Changeset in webkit [233830] by wilander@apple.com
  • 5 edits
    4 adds in trunk/LayoutTests

Flesh out WebSocket cookie tests to cover cookie policy for third-party resources
https://bugs.webkit.org/show_bug.cgi?id=187541
<rdar://problem/42048729>

Reviewed by Alex Christensen.

  • http/tests/cookies/resources/cookie-utilities.js:

Added a function for setting a cookie in a WebSocket handshake.

  • http/tests/websocket/tests/hybi/cookie_wsh.py:

(web_socket_do_extra_handshake):

Now sets the root path for new cookies so that they can be seen by
for example cookies/resources/echo-cookies.php.

  • http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party-expected.txt: Added.
  • http/tests/websocket/tests/hybi/websocket-allowed-setting-cookie-as-third-party.html: Added.
  • http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party-expected.txt: Added.
  • http/tests/websocket/tests/hybi/websocket-blocked-from-setting-cookie-as-third-party.html: Added.
  • http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior-expected.txt:
  • http/tests/websocket/tests/hybi/websocket-cookie-overwrite-behavior.html:

Now tests under the condition where localhost as third-party is
allowed to set a new cookie as third party. It also makes sure to use
cookies with the path set to the root so that all cookies are visible.

5:04 PM Changeset in webkit [233829] by youenn@apple.com
  • 10 edits
    3 adds
    1 delete in trunk

Support connecting a MediaStreamAudioDestinationNode to RTCPeerConnection
https://bugs.webkit.org/show_bug.cgi?id=187627
<rdar://problem/35334400>

Reviewed by Jer Noble.

Source/WebCore:

When MediaStreamAudioSource is called to read new audio samples,
convert these samples to a WebAudioBufferList and call RealtimeMediaSource::audioSamplesAvailable.
This makes its observers to get the audio data.

Test: webrtc/peer-connection-createMediaStreamDestination.html

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::create): Minor refactoring.

  • Modules/webaudio/MediaStreamAudioDestinationNode.cpp:

(WebCore::createMediaStream):
(WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):
(WebCore::MediaStreamAudioDestinationNode::process):

  • Modules/webaudio/MediaStreamAudioDestinationNode.h:
  • Modules/webaudio/MediaStreamAudioSource.cpp:

(WebCore::MediaStreamAudioSource::MediaStreamAudioSource):
(WebCore::MediaStreamAudioSource::consumeAudio):

  • Modules/webaudio/MediaStreamAudioSource.h:
  • Modules/webaudio/MediaStreamAudioSourceCocoa.cpp: Added.

(WebCore::streamDescription):
(WebCore::MediaStreamAudioSource::consumeAudio):

  • WebCore.xcodeproj/project.pbxproj:
  • platform/audio/AudioDestinationConsumer.h: Removed.
  • platform/mediastream/MediaStreamPrivate.cpp:

(WebCore::MediaStreamPrivate::create):

  • platform/mediastream/MediaStreamPrivate.h:

LayoutTests:

  • webrtc/peer-connection-createMediaStreamDestination-expected.txt: Added.
  • webrtc/peer-connection-createMediaStreamDestination.html: Added.
5:03 PM Changeset in webkit [233828] by timothy@apple.com
  • 9 edits in trunk

Add _drawsBackground to WKWebViewConfiguration.
https://bugs.webkit.org/show_bug.cgi?id=187665
rdar://problem/42182268

Reviewed by Tim Horton.

Source/WebKit:

  • UIProcess/API/APIPageConfiguration.cpp:

(API::PageConfiguration::copy const): Copy m_drawsBackground, and some missing values.

  • UIProcess/API/APIPageConfiguration.h:

(API::PageConfiguration::drawsBackground const): Added.
(API::PageConfiguration::setDrawsBackground): Added.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]): Transfer _drawsBackground to page config.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]): Set _drawsBackground to YES.
(-[WKWebViewConfiguration encodeWithCoder:]): Encode _drawsBackground.
(-[WKWebViewConfiguration initWithCoder:]): Decode _drawsBackground.
(-[WKWebViewConfiguration copyWithZone:]): Copy _drawsBackground.
(-[WKWebViewConfiguration _drawsBackground]): Added.
(-[WKWebViewConfiguration _setDrawsBackground:]): Added.

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • UIProcess/WebPageProxy.cpp: Set m_drawsBackground based on configuration.

Tools:

  • TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm:

(TestWebKitAPI.WebKit.ConfigurationDrawsBackground): Added.

4:20 PM Changeset in webkit [233827] by chris.reid@sony.com
  • 2 edits in trunk/Source/WebCore

[WinCairo] Enable WebGL when Accelerated Compositing is disabled
https://bugs.webkit.org/show_bug.cgi?id=187664

Reviewed by Fujii Hironori.

AC was disabled for WinCairo in r233725 but it can still run WebGL without AC.

  • html/HTMLCanvasElement.cpp:
4:15 PM Changeset in webkit [233826] by Kocsen Chung
  • 7 edits in tags/Safari-606.1.25.1/Source

Versioning.

4:11 PM Changeset in webkit [233825] by Kocsen Chung
  • 1 copy in tags/Safari-606.1.25.1

New tag.

4:11 PM Changeset in webkit [233824] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION (r195723): Improve support for resources with '\r' and '\r\n' line endings
https://bugs.webkit.org/show_bug.cgi?id=186453
<rdar://problem/39689180>

Reviewed by Joseph Pecoraro.

Now that the frontend no longer uses offsets from the original source
file to calculate positions within CodeMirror, it is possible to support
resources with '\r' and '\r\n' line endings in the editor.

  • UserInterface/Views/CodeMirrorEditor.js:

(WI.CodeMirrorEditor.create):
(WI.CodeMirrorEditor):

3:54 PM Changeset in webkit [233823] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Crash under ApplicationCacheGroup::didFailLoadingEntry()
https://bugs.webkit.org/show_bug.cgi?id=187661
<rdar://problem/42179755>

Reviewed by Youenn Fablet.

If ApplicationCacheResourceLoader::create() fails synchronously with
ApplicationCacheResourceLoader::Error::CannotCreateResource error, then
m_entryLoader will be null when didFailLoadingEntry() is called. However,
didFailLoadingEntry() fails to null check m_entryLoader before using it.

  • loader/appcache/ApplicationCacheGroup.cpp:

(WebCore::ApplicationCacheGroup::didFailLoadingEntry):
(WebCore::ApplicationCacheGroup::startLoadingEntry):

  • loader/appcache/ApplicationCacheGroup.h:
3:35 PM Changeset in webkit [233822] by timothy_horton@apple.com
  • 10 edits in trunk/Source/WebKit

WebKit sometimes holds WiFi/BT assertions while the Networking process is suspended
https://bugs.webkit.org/show_bug.cgi?id=187662
<rdar://problem/41999448>

Reviewed by Chris Dumez.

Inform WiFiAssertions when the Networking process is first going into the background,
so it has a chance of dropping its assertions even in cases where the system
suspends the process before we receive prepareToSuspend.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::processDidTransitionToForeground):
(WebKit::NetworkProcess::processDidTransitionToBackground):

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/NetworkProcess.messages.in:
  • NetworkProcess/curl/NetworkProcessCurl.cpp:

(WebKit::NetworkProcess::platformProcessDidTransitionToForeground):
(WebKit::NetworkProcess::platformProcessDidTransitionToBackground):

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformProcessDidTransitionToForeground):
(WebKit::NetworkProcess::platformProcessDidTransitionToBackground):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::sendProcessDidTransitionToForeground):
(WebKit::NetworkProcessProxy::sendProcessDidTransitionToBackground):

  • UIProcess/Network/NetworkProcessProxy.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::updateProcessAssertions):
Plumb the foreground/background transition to NetworkProcess.

  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformPrepareToSuspend):
(WebKit::NetworkProcess::platformProcessDidTransitionToBackground):
(WebKit::NetworkProcess::platformProcessDidTransitionToForeground):
Make use of SuspensionReason to explain to WiFiAssertions the
difference between prepareToSuspend and didTransitionToBackground,
so that it can adjust the timing of dropping the assertion.

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

Add release assertion to check thread in TimerBase::setNextFireTime
https://bugs.webkit.org/show_bug.cgi?id=187666

Reviewed by Ryosuke Niwa.

This should give us insight into what is causing <rdar://problem/33352721>

  • platform/Timer.cpp:

(WebCore::TimerBase::setNextFireTime):

3:27 PM Changeset in webkit [233820] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Basic blocks highlighting should use line/column locations instead of offsets
https://bugs.webkit.org/show_bug.cgi?id=187613
<rdar://problem/42131808>

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/BasicBlockAnnotator.js:

Basic blocks sent from the backend include offsets into the original
file, rather than line/column locations. In order to translate to positions
within CodeMirror, we need to calculate the original line and column
for each block.

(WI.BasicBlockAnnotator.prototype.insertAnnotations):
(WI.BasicBlockAnnotator.prototype._calculateBasicBlockPositions.offsetToPosition):
(WI.BasicBlockAnnotator.prototype._calculateBasicBlockPositions):
(WI.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges.):
(WI.BasicBlockAnnotator.prototype._annotateBasicBlockExecutionRanges):
(WI.BasicBlockAnnotator.prototype._highlightTextForBasicBlock):

  • UserInterface/Models/SourceCodePosition.js:

(WI.SourceCodePosition.prototype.offsetColumn):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.getTextInRange):
(WI.TextEditor.prototype.addStyleToTextRange):
Better encapsulation for CodeMirror positions.

  • UserInterface/Workers/Formatter/FormatterUtilities.js:

(get if):
Update String.prototype.lineEndings to support additional line separators.

3:26 PM Changeset in webkit [233819] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ MacOS WK1 ] Layout Tests in media/media-fragments/ are flaky
https://bugs.webkit.org/show_bug.cgi?id=187557

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-13

  • platform/mac-wk1/TestExpectations:
3:22 PM Changeset in webkit [233818] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebKit

REGRESSION (r231676): watchOS WebKit usually doesn't load in the background
https://bugs.webkit.org/show_bug.cgi?id=187663
<rdar://problem/42181185>

Reviewed by Chris Dumez.

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::applicationDidEnterBackground):
"Screen lock" is very aggressive on watchOS; we want to do our usual
30 seconds of loading in the background when you drop your wrist,
so disable this power optimization on that platform.

2:53 PM Changeset in webkit [233817] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Execution highlighting in the frontend should be line/column-based
https://bugs.webkit.org/show_bug.cgi?id=187532
<rdar://problem/42035580>

Reviewed by Joseph Pecoraro.

Source code offsets from Esprima should not be used to calculate ranges
in CodeMirror for expression highlighting.

This also fixes a long standing bug when adjusting for the starting
position of an inline script. Previously the start offset from the script
TextRange was used for this purpose, but the value is often incorrect (see
https://bugs.webkit.org/show_bug.cgi?id=187532#c5). By using the starting
line/column instead, we avoid the problem.

  • UserInterface/Models/ScriptSyntaxTree.js:

(WI.ScriptSyntaxTree.prototype.containersOfPosition):
(WI.ScriptSyntaxTree.prototype.containersOfOffset): Deleted.

  • UserInterface/Models/SourceCodePosition.js:

(WI.SourceCodePosition.prototype.offsetColumn):

  • UserInterface/Views/SourceCodeTextEditor.js:

(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange.toInlineScriptPosition):
(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange.fromInlineScriptPosition):
(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
(WI.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange.convertRangeOffsetsToSourceCodeOffsets): Deleted.

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype._updateExecutionRangeHighlight):

1:56 PM Changeset in webkit [233816] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

[iOS] [WK1] Crash inside IOSurfacePool::platformGarbageCollectNow() in WebThread
https://bugs.webkit.org/show_bug.cgi?id=187635
<rdar://problem/34297065>

Reviewed by Simon Fraser.

r167717 added code to trigger a CA commit in the web process via platformGarbageCollectNow() in order to free IOSurface-related memory.
However, that code is also running in the web thread in apps using WebKit1, causing unwanted UIView layout on the web thread.

Fix by not triggering this CA commit if it's called on the web thread.

  • platform/graphics/cocoa/IOSurfacePoolCocoa.mm:

(WebCore::IOSurfacePool::platformGarbageCollectNow):

1:40 PM Changeset in webkit [233815] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

WebResourceLoader may try to send a IPC with a destination ID that is 0
https://bugs.webkit.org/show_bug.cgi?id=187654
<rdar://problem/39265927>

Reviewed by Brady Eidson.

WebResourceLoader may try to send a IPC with a destination ID that is 0 according to release
assertion hits we see in the wild. This can lead to HashMap corruption on recipient side when
trying to lookup a key that is 0.

As per the crash traces, we see it starts from WebLoaderStrategy::internallyFailedLoadTimerFired()
which is likely due to the Network process crashing. WebLoaderStrategy::networkProcessCrashed()
calls scheduleInternallyFailedLoad() on each ResourceLoader and clears the WebResourceLoaders in
m_webResourceLoaders. When a ResourceLoader is cancelled (marked as failed), we clear its identifier
and we normally null out the WebLoaderStrategy's coreLoader. However, if we cannot find the
WebResourceLoader in m_webResourceLoaders (because that map was already cleared) then the
WebResourceLoader's coreLoader may not get nulled out, even if the coreLoader's identifier has
been reset. We have 2 lambdas in WebResourceLoader which keep the WebResourceLoader alive and
try to send IPC and are merely doing a null check on the coreLoader before trying to send the
IPC.

To address the issue, we now clear the WebResourceLoader's coreLoader in
WebLoaderStrategy::networkProcessCrashed(). For robustness, we also check that a coreLoader's
identifier is not 0 before trying to send IPC.

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::WebLoaderStrategy::networkProcessCrashed):

  • WebProcess/Network/WebResourceLoader.cpp:

(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponse):

1:34 PM Changeset in webkit [233814] by graouts@webkit.org
  • 19 edits in trunk/Source/WebCore

Dark Mode: document markers are difficult to see
https://bugs.webkit.org/show_bug.cgi?id=187632
<rdar://problem/41099719>

Reviewed by Simon Fraser.

We update the way we draw the document markers for macOS and use more constrasting colors in dark mode.
Paving the way for future improvements, we move the drawLineForDocumentMarker() method from GraphicsContext
to RenderTheme and implement a first version in RenderThemeMac. The circles used for the underline are now
drawn directly with Core Graphics and we no longer use an image resource. To allow both GraphicsContext
and RenderTheme to have different versions of the drawLineForDocumentMarker() method, the DocumentMarkerLineStyle
enum is now an "enum class".

No new test due to webkit.org/b/105616, webkit.org/b/187655 was raised to track the creation of new tests
when it becomes possible again.

  • platform/graphics/GraphicsContext.h:
  • platform/graphics/GraphicsContextImpl.h:
  • platform/graphics/cairo/CairoOperations.cpp:

(WebCore::Cairo::drawLineForDocumentMarker):

  • platform/graphics/cairo/CairoOperations.h:
  • platform/graphics/cairo/GraphicsContextImplCairo.cpp:

(WebCore::GraphicsContextImplCairo::drawLineForDocumentMarker):

  • platform/graphics/cairo/GraphicsContextImplCairo.h:
  • platform/graphics/cocoa/GraphicsContextCocoa.mm:

(WebCore::GraphicsContext::drawLineForDocumentMarker):

  • platform/graphics/displaylists/DisplayListItems.h:

(WebCore::DisplayList::DrawLineForDocumentMarker::create):
(WebCore::DisplayList::DrawLineForDocumentMarker::DrawLineForDocumentMarker):

  • platform/graphics/displaylists/DisplayListRecorder.cpp:

(WebCore::DisplayList::Recorder::drawLineForDocumentMarker):

  • platform/graphics/displaylists/DisplayListRecorder.h:
  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp:

(Nicosia::CairoOperationRecorder::drawLineForDocumentMarker):

  • platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.h:
  • platform/graphics/win/GraphicsContextCGWin.cpp:

(WebCore::GraphicsContext::drawLineForDocumentMarker):

  • rendering/InlineTextBox.cpp:

(WebCore::InlineTextBox::paintPlatformDocumentMarker): Call drawLineForDocumentMarker() on the RenderTheme on
macOS and on GraphicsContext in all other cases.

  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::drawLineForDocumentMarker):

  • rendering/RenderTheme.h:
  • rendering/RenderThemeMac.h:
  • rendering/RenderThemeMac.mm:

(WebCore::colorForStyle): Provide different colors for light and dark modes.
(WebCore::RenderThemeMac::drawLineForDocumentMarker): A new macOS-specific version of drawLineForDocumentMarker()
where we paint circles using Core Graphics directly.

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

[ WK2 ] Layout Test editing/selection/update-selection-by-style-change.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=187649

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-13

  • platform/mac-wk2/TestExpectations:
1:08 PM Changeset in webkit [233812] by ddkilzer@apple.com
  • 68 edits
    1 add in trunk/Source/ThirdParty/libwebrtc

libwebrtc.dylib Objective-C classes conflict with third-party frameworks
<https://webkit.org/b/187653>

Reviewed by Alex Christensen.

  • Source/webrtc/sdk/WebKit/WebKitUtilities.mm:
  • Manually add an attribute to change the class name.
  • Source/webrtc/sdk/objc/Framework/Classes/Common/RTCUIApplicationStatusObserver.h:
  • Source/webrtc/sdk/objc/Framework/Classes/Metal/RTCMTLI420Renderer.h:
  • Source/webrtc/sdk/objc/Framework/Classes/Metal/RTCMTLNV12Renderer.h:
  • Source/webrtc/sdk/objc/Framework/Classes/Metal/RTCMTLRenderer.h:
  • Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCDtmfSender+Private.h:
  • Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCVideoRendererAdapter.h:
  • Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoDecoder.h:
  • Source/webrtc/sdk/objc/Framework/Classes/PeerConnection/RTCWrappedNativeVideoEncoder.h:
  • Source/webrtc/sdk/objc/Framework/Classes/UI/RTCEAGLVideoView.m:
  • Source/webrtc/sdk/objc/Framework/Classes/Video/RTCAVFoundationVideoCapturerInternal.h:
  • Source/webrtc/sdk/objc/Framework/Classes/Video/RTCDefaultShader.h:
  • Source/webrtc/sdk/objc/Framework/Classes/Video/RTCI420TextureCache.h:
  • Source/webrtc/sdk/objc/Framework/Classes/Video/RTCNV12TextureCache.h:
  • Source/webrtc/sdk/objc/Framework/Classes/Video/objc_frame_buffer.h:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_decoder_factory.h:
  • Source/webrtc/sdk/objc/Framework/Classes/VideoToolbox/objc_video_encoder_factory.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAVFoundationVideoSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSession.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSessionConfiguration.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCAudioTrack.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCCameraPreviewView.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCCameraVideoCapturer.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCConfiguration.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCDataChannel.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCDataChannelConfiguration.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCDispatcher.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCDtmfSender.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCEAGLVideoView.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFileLogger.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCFileVideoCapturer.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceCandidate.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIceServer.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCIntervalRange.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCLegacyStatsReport.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMTLNSVideoView.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMTLVideoView.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaConstraints.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaStream.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMediaStreamTrack.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCMetricsSampleInfo.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCNSGLVideoView.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnection.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactory.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCPeerConnectionFactoryOptions.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpCodecParameters.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpEncodingParameters.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpParameters.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpReceiver.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCRtpSender.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCSessionDescription.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCapturer.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodec.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecFactory.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoCodecH264.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoDecoderVP8.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoDecoderVP9.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoEncoderVP8.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoEncoderVP9.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrame.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoFrameBuffer.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoRenderer.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoSource.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoTrack.h:
  • Source/webrtc/sdk/objc/Framework/Headers/WebRTC/RTCVideoViewShading.h:
  • Apply two shell scripts (see bug) to add an attribute to change the name of all classes and protocols.
  • WebKit/0012-Add-WK-prefix-to-Objective-C-classes-and-protocols.patch: Add.
12:41 PM Changeset in webkit [233811] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit

Allow BOCOM and ABC plug-ins to run unsandboxed
https://bugs.webkit.org/show_bug.cgi?id=187652
rdar://problem/42149182

Patch by Zach Li <zachli@apple.com> on 2018-07-13
Reviewed by Youenn Fablet.

  • UIProcess/Plugins/mac/PluginInfoStoreMac.mm:

(WebKit::PluginInfoStore::shouldAllowPluginToRunUnsandboxed):

12:17 PM Changeset in webkit [233810] by ddkilzer@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

REGRESSION (r233155): Remove last references to click_annotate.cc and rtpcat.cc

  • libwebrtc.xcodeproj/project.pbxproj: Let Xcode have its way

with the project file by removing orphaned entries.

12:17 PM Changeset in webkit [233809] by ddkilzer@apple.com
  • 2 edits in trunk/Source/ThirdParty/libwebrtc

REGRESSION (r222476): Add missing semi-colons to EXPORTED_SYMBOLS_FILE variables

  • Configurations/libwebrtc.xcconfig:

(EXPORTED_SYMBOLS_FILE): Add missing semi-colons.

11:47 AM Changeset in webkit [233808] by Chris Dumez
  • 4 edits in trunk/Source/WebKit

Add more threading release assertions
https://bugs.webkit.org/show_bug.cgi?id=187647

Reviewed by Alex Christensen.

Add more threading release assertions to help debug <rdar://problem/39265927>.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess):
(WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess):

  • UIProcess/WebProcessProxy.cpp:

(WebKit::m_isInPrewarmedPool):
(WebKit::WebProcessProxy::~WebProcessProxy):
(WebKit::WebProcessProxy::shutDown):
(WebKit::WebProcessProxy::didFinishLaunching):

11:28 AM Changeset in webkit [233807] by chris.reid@sony.com
  • 5 edits in trunk/Source/WebKit

[WinCairo] Add windows storage process connection implementation
https://bugs.webkit.org/show_bug.cgi?id=187531

Reviewed by Fujii Hironori.

  • NetworkProcess/NetworkProcess.cpp:
  • Platform/IPC/Attachment.h:
  • StorageProcess/StorageProcess.cpp:
  • UIProcess/Storage/StorageProcessProxy.cpp:
11:20 AM Changeset in webkit [233806] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[32bit JSC tests] stress/cow-convert-double-to-contiguous.js and stress/cow-convert-int32-to-contiguous.js are failing
https://bugs.webkit.org/show_bug.cgi?id=187561

Reviewed by Darin Adler.

This patch fixes the issue that CoW array handling is not introduced in 32bit put_by_val code.
We clean up 32bit put_by_val code.

  1. We remove inline out-of-bounds recording code since it is done in C operation code. This change

aligns 32bit implementation to 64bit implementation.

  1. We add CoW array checking, which is done in 64bit implementation.
  • jit/JITPropertyAccess.cpp:

(JSC::JIT::emit_op_put_by_val):

  • jit/JITPropertyAccess32_64.cpp:

(JSC::JIT::emit_op_put_by_val):
(JSC::JIT::emitSlow_op_put_by_val):

11:20 AM Changeset in webkit [233805] by cturner@igalia.com
  • 3 edits in trunk/Source/WebCore

[GStreamer] Use smart pointers for GstByteReader
https://bugs.webkit.org/show_bug.cgi?id=187638

Reviewed by Xabier Rodriguez-Calvar.

  • platform/graphics/gstreamer/GUniquePtrGStreamer.h: Add

specialisation for GstByteReader.

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

Use the new smart pointer class to avoid needing to remember where
to call gst_byte_reader_free.
(webKitMediaClearKeyDecryptorDecrypt):

10:46 AM Changeset in webkit [233804] by mitz@apple.com
  • 2 edits in trunk/Source/WebKit

[macOS] REGRESSION (r233536): Development WebContent service got opted back into Library Validation
https://bugs.webkit.org/show_bug.cgi?id=187640

Reviewed by Daniel Bates.

  • Scripts/process-webcontent-entitlements.sh: Add the com.apple.security.cs.disable-library-validation to the Development service regardless of whether restricted entitlements are to be used, because that entitlement is not restricted.
10:28 AM Changeset in webkit [233803] by Basuke Suzuki
  • 7 edits in trunk/Source/WebCore

[Curl] Move HTTP Setup logic from CurlRequest to CurlHandle for reuse.
https://bugs.webkit.org/show_bug.cgi?id=187427

Reviewed by Fujii Hironori.

CurlContext will be used by Secure WebSocket client, but HTTP setup code is
in CurlRequest, which is only for regular HTTP/HTTPS transaction. This patch
allows wss client to setup CurlHandle for HTTPS communication, such as TLS,
proxy or authentication.

No new tests because there's no behavior change.

  • platform/network/curl/CurlContext.cpp:

(WebCore::CurlHandle::CurlHandle):
(WebCore::CurlHandle::enableSSLForHost):
(WebCore::CurlHandle::willSetupSslCtx):
(WebCore::CurlHandle::willSetupSslCtxCallback):
(WebCore::CurlHandle::sslErrors const):
(WebCore::CurlHandle::setUrl):
(WebCore::CurlHandle::enableHttp):
(WebCore::CurlHandle::enableConnectionOnly):
(WebCore::CurlHandle::certificateInfo const):
(WebCore::CurlHandle::enableStdErrIfUsed):
(WebCore::CurlHandle::initialize): Deleted.

  • platform/network/curl/CurlContext.h:

(WebCore::CurlHandle::url const):

  • platform/network/curl/CurlRequest.cpp:

(WebCore::CurlRequest::setupTransfer):
(WebCore::CurlRequest::didReceiveHeader):
(WebCore::CurlRequest::didCompleteTransfer):
(WebCore::CurlRequest::finalizeTransfer):
(WebCore::CurlRequest::willSetupSslCtx): Deleted.
(WebCore::CurlRequest::willSetupSslCtxCallback): Deleted.

  • platform/network/curl/CurlRequest.h:
  • platform/network/curl/CurlSSLVerifier.cpp:

(WebCore::CurlSSLVerifier::CurlSSLVerifier):
(WebCore::CurlSSLVerifier::verify):

  • platform/network/curl/CurlSSLVerifier.h:
10:15 AM Changeset in webkit [233802] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[ MacOS Debug ] Layout Test inspector/view/asynchronous-layout.html is a Flaky Timeout
https://bugs.webkit.org/show_bug.cgi?id=187622

Unreviewed test gardening.

Patch by Truitt Savell <Truitt Savell> on 2018-07-13

  • platform/mac/TestExpectations:
10:14 AM Changeset in webkit [233801] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

NetworkConnectionToWebProcess::m_networkResourceLoaders should use Ref<> for its values
https://bugs.webkit.org/show_bug.cgi?id=187629

Reviewed by Youenn Fablet.

NetworkConnectionToWebProcess::m_networkResourceLoaders should use Ref<> for its values
since they cannot be null.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad):
(WebKit::NetworkConnectionToWebProcess::performSynchronousLoad):

  • NetworkProcess/NetworkConnectionToWebProcess.h:
10:10 AM Changeset in webkit [233800] by Matt Baker
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: SourceCodePosition.js missing from Test.html
https://bugs.webkit.org/show_bug.cgi?id=187644

Reviewed by Brian Burg.

  • UserInterface/Test.html:
9:19 AM Changeset in webkit [233799] by Chris Dumez
  • 2 edits in trunk/Tools

Add a FrameLoaderClient willInjectUserScriptForFrame callback
https://bugs.webkit.org/show_bug.cgi?id=187565
<rdar://problem/42095701>

Unreviewed WKTR fix after r233782.

  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

9:13 AM Changeset in webkit [233798] by Chris Dumez
  • 3 edits
    1 move
    2 deletes in trunk/Tools

Reduce size of WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=186820
<rdar://problem/42087508>

Unreviewed, re-generates Service worker registrations database used by API tests after r233789.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3-shm: Removed.
  • TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-3.sqlite3: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3-wal.
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

3:47 AM Changeset in webkit [233797] by calvaris@igalia.com
  • 4 edits in trunk/Source/WebCore

[GStreamer][MSE] Add GstFlowCombiner to handle non-linked inactive branches
https://bugs.webkit.org/show_bug.cgi?id=187636

Reviewed by Carlos Garcia Campos.

When we have more than one source buffer, only one will be
rendered and the inactive branch will report linking errors that
we have to deal with.

  • platform/graphics/gstreamer/GUniquePtrGStreamer.h: Added GstFlowCombiner.
  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:

(webkitMediaSrcChain): Combine the flow in the flow combiner.
(webkit_media_src_init): Initialize the flow combiner.
(webKitMediaSrcLinkStreamToSrcPad): Add the proxypad to the
combiner and set the chain function.

  • platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamerPrivate.h:

Declare the flow combiner.

1:10 AM Changeset in webkit [233796] by cturner@igalia.com
  • 5 edits in trunk/Source/WebCore

[GStreamer] Add GstBufferMapped abstraction
https://bugs.webkit.org/show_bug.cgi?id=187600

Reviewed by Xabier Rodriguez-Calvar.

There is a similar abstraction called mapGstBuffer and friends,
which have a slightly different use-case: wanting a buffer that is
mapped for a longer lifetime without have to keep track of the map
infos separately. They could be subsumed by this abstraction, but
everytime they need to write to the buffer, they'd have to remap
the memory blocks.

This abstraction is more for one-short reads and writes saving the user
from remembering to unmap the buffer and having to manage to
auxiliary GstMapInfo structures.

  • platform/graphics/gstreamer/GStreamerCommon.h:

(WebCore::GstMappedBuffer::GstMappedBuffer):
(WebCore::GstMappedBuffer::~GstMappedBuffer):
(WebCore::GstMappedBuffer::data):
(WebCore::GstMappedBuffer::size const):
(WebCore::GstMappedBuffer::operator bool const):

  • platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:

(WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
(WebCore::MediaPlayerPrivateGStreamerBase::initializationDataEncountered):

  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:

(webKitMediaClearKeyDecryptorSetupCipher):
(webKitMediaClearKeyDecryptorDecrypt):

12:04 AM Changeset in webkit [233795] by mark.lam@apple.com
  • 2 edits in trunk/Source/WTF

Signal.cpp's activeThreads() should only create its ThreadGroup once.
https://bugs.webkit.org/show_bug.cgi?id=187634
<rdar://problem/40662311>

Reviewed by Yusuke Suzuki.

registerThreadForMachExceptionHandling() is relying on the activeThreads()
ThreadGroup being a singleton.

  • wtf/threads/Signals.cpp:

(WTF::activeThreads):

Jul 12, 2018:

11:22 PM Changeset in webkit [233794] by Wenson Hsieh
  • 9 edits
    1 copy in trunk

Make it easier to hit the significant rendered text layout milestone on pages with main article elements
https://bugs.webkit.org/show_bug.cgi?id=187578
<rdar://problem/42104637>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Our current heuristics for triggering the significant rendered text layout milestone are very conservative, with
the intention of avoiding false positives. In practice, we can relax some of these constraints when we've
detected the presence of a main article element on the page. (e.g. in New York Times articles). See per-method
changes below for more detail.

Test: RenderingProgressTests.DidRenderSignificantAmountOfText

  • dom/Document.cpp:

(WebCore::Document::registerArticleElement):
(WebCore::Document::unregisterArticleElement):
(WebCore::Document::updateMainArticleElementAfterLayout):

As a post layout task, update the main article element by looping through the articles (up to a maximum limit of
10) in search of an article element that is several times larger than the second largest article element.

  • dom/Document.h:

Store a set containing the article elements in the document, as well as the current main article on the page.

(WebCore::Document::hasMainArticleElement const):

  • html/Element.cpp:

(WebCore::Element::insertedIntoAncestor):
(WebCore::Element::removedFromAncestor):

Keep track of the article elements that exist in the document whenever elements with the article tag are added
to or removed from the document.

  • page/FrameView.cpp:

Add new minimum thresholds for firing the significant rendered text milestone when there exists a main article.

(WebCore::FrameView::performPostLayoutTasks):
(WebCore::FrameView::updateSignificantRenderedTextMilestoneIfNeeded):

Take the main article element into consideration when determining whether to fire the significant text
layout milestone.

Tools:

Tweak an existing layout test to additionally check that the significant text layout milestone is fired on a
page with an article element that is clearly the "main" content on the page (i.e. much taller than all other
articles).

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone-article.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html.
  • TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html:
  • TestWebKitAPI/Tests/ios/RenderingProgressTests.mm:

(TEST):

8:13 PM Changeset in webkit [233793] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

JavaScript URL gives incorrect result when frame is navigated
https://bugs.webkit.org/show_bug.cgi?id=187203
<rdar://problem/41438443>

Reviewed by David Kilzer.

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::requestFrame):

7:06 PM Changeset in webkit [233792] by Matt Baker
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Type token positioning should use line/column locations from Esprima instead of offsets
https://bugs.webkit.org/show_bug.cgi?id=187612
<rdar://problem/42131910>

Reviewed by Joseph Pecoraro.

  • UserInterface/Controllers/TypeTokenAnnotator.js:

(WI.TypeTokenAnnotator.prototype.insertAnnotations):
(WI.TypeTokenAnnotator.prototype._insertTypeToken):
(WI.TypeTokenAnnotator.prototype._insertToken):
Use line/column locations, instead of offsets, from the AST when calculating
token positions for CodeMirror. Once in CodeMirror's string space, we
can safely convert to/from offsets.

  • UserInterface/Models/ScriptSyntaxTree.js:

Retrieve line/column locations for AST nodes, in addition to offsets.
Offsets into the original file are still needed for getting type information
from the profiler in the backend.

(WI.ScriptSyntaxTree):
(WI.ScriptSyntaxTree.prototype.filterByRange):
Filter by positions, which can be safely used from CodeMirror, instead of offsets.

(WI.ScriptSyntaxTree.prototype._createInternalSyntaxTree):
(WI.ScriptSyntaxTree.prototype.filterByRange.filterForNodesInRange): Deleted.

  • UserInterface/Models/SourceCodePosition.js:

Add convenience methods for comparing line/column positions, and for
converting to the format expected by CodeMirror. SourceCodePosition could
be made to interoperate with CodeMirror by exposing properties line
and ch, but making the conversion explicit improves code readability.

(WI.SourceCodePosition.prototype.equals):
(WI.SourceCodePosition.prototype.isBefore):
(WI.SourceCodePosition.prototype.isAfter):
(WI.SourceCodePosition.prototype.isWithin):
(WI.SourceCodePosition.prototype.toCodeMirror):
(WI.SourceCodePosition):

  • UserInterface/Views/TextEditor.js:

(WI.TextEditor.prototype.visibleRangePositions):
(WI.TextEditor.prototype.originalPositionToCurrentPosition):
(WI.TextEditor.prototype.currentOffsetToCurrentPosition):
(WI.TextEditor.prototype.currentPositionToCurrentOffset):
(WI.TextEditor.prototype.setInlineWidget):

6:20 PM Changeset in webkit [233791] by Fujii Hironori
  • 2 edits in trunk/Tools

Change my status to be a WebKit reviewer.

Unreviewed status update.

  • Scripts/webkitpy/common/config/contributors.json:
6:16 PM Changeset in webkit [233790] by Fujii Hironori
  • 2 edits in trunk/Tools

Unreviewed contributors.json update

Just run "validate-committer-lists -c" to canonicalize the style.

  • Scripts/webkitpy/common/config/contributors.json:
5:28 PM Changeset in webkit [233789] by achristensen@apple.com
  • 9 edits in trunk

Reduce size of WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=186820

Reviewed by Yusuke Suzuki and Youenn Fablet.

Source/WebCore:

We were using 32 bits for the length of the port, which is always between 0 and 5 inclusive
because port numbers are missing or between 0 and 65535. Let's just use 3 bits here.
We were using 32 bits for the length of the scheme, which is usually 3-5 characters and can be
longer for some custom schemes, but I've never seen one more than 20 characters. If we assume
schemes are always less than 64MB, we can save 8 bytes per URL!

No change in behavior, just less memory use!

To restore the IPC encoding to how it was before r221165, I just encode the string and reparse it.

  • platform/URL.cpp:

(WebCore::URL::invalidate):
(WebCore::URL::lastPathComponent const):
(WebCore::URL::port const):
(WebCore::URL::protocolHostAndPort const):
(WebCore::URL::path const):
(WebCore::URL::removePort):
(WebCore::URL::setPort):
(WebCore::URL::setHostAndPort):
(WebCore::URL::setPath):

  • platform/URL.h:

(WebCore::URL::encode const):
(WebCore::URL::decode):
(WebCore::URL::hasPath const):
(WebCore::URL::pathStart const):

  • platform/URLParser.cpp:

(WebCore::URLParser::copyBaseWindowsDriveLetter):
(WebCore::URLParser::urlLengthUntilPart):
(WebCore::URLParser::copyURLPartsUntil):
(WebCore::URLParser::shouldPopPath):
(WebCore::URLParser::popPath):
(WebCore::URLParser::parse):
(WebCore::URLParser::parsePort):
(WebCore::URLParser::parseHostAndPort):
(WebCore::URLParser::allValuesEqual):
(WebCore::URLParser::internalValuesConsistent):

  • workers/service/server/RegistrationDatabase.cpp:

Increment the service worker registration schema version because of the URL encoding change.

Source/WebKit:

  • NetworkProcess/cache/NetworkCacheStorage.h:

Increment cache version because of URL encoding change.

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

5:03 PM Changeset in webkit [233788] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

[Cocoa] Make sure NetworkProcess::createNetworkConnectionToWebProcess() returns a valid mach port
https://bugs.webkit.org/show_bug.cgi?id=187625

Reviewed by Youenn Fablet.

Make sure NetworkProcess::createNetworkConnectionToWebProcess() returns a valid mach port to help
debug <rdar://problem/41995022>.

  • NetworkProcess/NetworkProcess.cpp:

(WebKit::NetworkProcess::createNetworkConnectionToWebProcess):

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::didCreateNetworkConnectionToWebProcess):

4:46 PM Changeset in webkit [233787] by Chris Dumez
  • 3 edits in trunk/Source/WebKit

PingLoad does not need to ref the NetworkConnectionToWebProcess
https://bugs.webkit.org/show_bug.cgi?id=187624

Reviewed by Youenn Fablet.

PingLoad does not need to ref the NetworkConnectionToWebProcess and keep it alive longer than it needs to be.
Instead, ref the IPC::Connection which is lighter weight and gets invalidated when the NetworkConnectionToWebProcess
is destroyed.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::loadPing):
(WebKit::NetworkConnectionToWebProcess::didFinishPingLoad): Deleted.

  • NetworkProcess/NetworkConnectionToWebProcess.h:
4:37 PM Changeset in webkit [233786] by beidson@apple.com
  • 9 edits in trunk

Make process-swap-on-navigation an experimental feature.
<rdar://problem/41995053> and https://bugs.webkit.org/show_bug.cgi?id=187558

Reviewed by Chris Dumez.

Source/WebKit:

  • Shared/WebPreferences.yaml:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetProcessSwapOnNavigationEnabled):
(WKPreferencesGetProcessSwapOnNavigationEnabled):

  • UIProcess/API/C/WKPreferencesRef.h:
  • UIProcess/WebPreferences.cpp:

(WebKit::WebPreferences::updateBoolValueForExperimentalFeatureKey):

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::createWebPage): If the new web page has PSON enabled via WebPreferences,

absorb that setting into this process pool's configuration.

Tools:

Make sure WKTR doesn't enable ProcessSwapOnNavigation by default simply because it's an experimental feature.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::resetPreferencesToConsistentValues):

  • WebKitTestRunner/TestOptions.h:

(WTR::TestOptions::shouldEnableProcessSwapOnNavigation const):

4:29 PM Changeset in webkit [233785] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Simplify code in NetworkConnectionToWebProcess::didReceiveMessage()
https://bugs.webkit.org/show_bug.cgi?id=187621

Reviewed by Youenn Fablet.

Simplify code in NetworkConnectionToWebProcess::didReceiveMessage() by not using HashMap iterators and
calling get() directly.

  • NetworkProcess/NetworkConnectionToWebProcess.cpp:

(WebKit::NetworkConnectionToWebProcess::didReceiveMessage):

3:24 PM Changeset in webkit [233784] by Chris Dumez
  • 4 edits in trunk/Source

Make sure WebProcess::ensureNetworkProcessConnection() is always called on the main thread
https://bugs.webkit.org/show_bug.cgi?id=187607

Reviewed by Alex Christensen.

Add release assertion to make sure that ensureNetworkProcessConnection() is always called on the main
thread. Calling it on a background thread would not be safe. It would not be safe because:

  1. We check if we have a network process connection and then create one if we don't without any locking.
  2. It is not safe to construct or use a NetworkProcessConnection object from a non-main thread
  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::ensureNetworkProcessConnection):

3:21 PM Changeset in webkit [233783] by Chris Dumez
  • 2 edits in trunk/Source/WebKit

Assert that the IPC::Connection is valid in Connection::dispatchMessage(Decoder&)
https://bugs.webkit.org/show_bug.cgi?id=187617

Reviewed by Youenn Fablet.

Assert that the IPC::Connection is valid in Connection::dispatchMessage(Decoder&) as
m_client would be stale otherwise.

  • Platform/IPC/Connection.cpp:

(IPC::Connection::dispatchMessage):

2:34 PM Changeset in webkit [233782] by youenn@apple.com
  • 23 edits
    2 adds in trunk

Add a FrameLoaderClient willInjectUserScriptForFrame callback
https://bugs.webkit.org/show_bug.cgi?id=187565

Reviewed by Alex Christensen.

Source/WebCore:

Test: http/tests/contentextensions/injected-script-callback.html.

  • loader/FrameLoaderClient.h:
  • page/Frame.cpp:

(WebCore::Frame::injectUserScriptImmediately):
Calling the new callback whenever being about to inject a new script.

Source/WebKit:

Introduce a new WKBundlePageLoaderClient callback that is called everytime a user script is injected.
Implement WebFrameLoaderClient::willInjectUserScript by calling this new callback.

  • WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h:

(API::InjectedBundle::PageLoaderClient::willInjectUserScriptForFrame):

  • WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(setUpPageLoaderClient):

  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:

(WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
(WebKit::InjectedBundlePageLoaderClient::willInjectUserScriptForFrame):

  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::willInjectUserScript):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Tools:

Added new test runner API to check for willInjectUserScriptForFrame callback.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.h:

(WTR::InjectedBundle::resetUserScriptInjectedCount):
(WTR::InjectedBundle::increaseUserScriptInjectedCount):
(WTR::InjectedBundle::userScriptInjectedCount const):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::resetAfterTest):
(WTR::InjectedBundlePage::willInjectUserScriptForFrame):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::userScriptInjectedCount const):
(WTR::TestRunner::injectUserScript):

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::injectUserScript):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/TestInvocation.cpp:

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::injectUserScript):

LayoutTests:

  • http/tests/contentextensions/injected-script-callback-expected.txt: Added.
  • http/tests/contentextensions/injected-script-callback.html: Added.
2:24 PM Changeset in webkit [233781] by commit-queue@webkit.org
  • 22 edits in trunk/Source/WebKit

[iOS] When bringing MobileSafari to the foreground, images are drawn asynchronously after removing a snapshot that included them
https://bugs.webkit.org/show_bug.cgi?id=187374
<rdar://problem/41249545>

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2018-07-12
Reviewed by Tim Horton.

UIProcess should block committing all the layer tree transactions for
immediate update until it receives a one whose activityStateChangeID is
greater than or equal to the one it sends with SetActivityState message.

  • Scripts/webkit/messages.py:

Fix the messages code generator to include DrawingAreaInfo.h for the WebKit
typedef ActivityStateChangeID.

  • Shared/DrawingAreaInfo.h:

Define ActivityStateChangeID to be uint64_t. Add a definition for the case
when the UIProcess won't be blocked for a reply back from the WebProcess.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:

(WebKit::RemoteLayerTreeTransaction::activityStateChangeID const):
(WebKit::RemoteLayerTreeTransaction::setActivityStateChangeID):
Add a member for activityStateChangeID in the LayerTreeTransaction.

  • Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:

(WebKit::RemoteLayerTreeTransaction::encode const):
(WebKit::RemoteLayerTreeTransaction::decode):
Make LayerTreeTransaction know how to encode and decode activityStateChangeID.

  • UIProcess/DrawingAreaProxy.h:

(WebKit::DrawingAreaProxy::waitForDidUpdateActivityState):

  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
  • UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateActivityState):
Make the DrawingArea in the UIProcess wait the layer tree with a certain
activityStateChangeID.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::waitForDidUpdateActivityState):
If m_activityStateChangeWantsSynchronousReply is true, generate a new
activityStateChangeID and send it in the SetActivityState message.

  • UIProcess/WebPageProxy.h:

(WebKit::WebPageProxy::takeNextActivityStateChangeID):
A simple way to generate a new activityStateChangeID.

  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
  • UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:

(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateActivityState):
Fix the UIProcess functions' prototype for Mac.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::activityStateDidChange):

  • WebProcess/WebPage/AcceleratedDrawingArea.h:

Fix the UIProcess functions' prototype for GTK.

  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::activityStateDidChange):

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.h:

Replace wantsDidUpdateActivityState with activityStateChangeID. Treat
activityStateChangeID == ActivityStateChangeAsynchronous as if
wantsDidUpdateActivityState == false.

  • WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Make the WebPrcess pass the activityStateChangeID which it receives from
the SetActivityState message to the LayerTreeTransaction.

(WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
When receiving the SetActivityState, treat activityStateChangeID !=
ActivityStateChangeAsynchronous as if wantsDidUpdateActivityState == true.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::setActivityState):

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

Replace the boolean wantsDidUpdateActivityState with activityStateChangeID
in the SetActivityState message.

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
(WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):
Fix the WebProcess functions' prototype for Mac.

1:11 PM Changeset in webkit [233780] by Antti Koivisto
  • 4 edits in trunk/Source/WebKit

REGRESSION (r232356): After zooming a page in and out, it's possible to temporarily have missing tiles (google.com, apple.com)
https://bugs.webkit.org/show_bug.cgi?id=187553
<rdar://problem/41863803>

Reviewed by Simon Fraser.

We ignore zoom scale from UI process if it doesn't match the last remote layer tree transaction. However nothing
guarantees that we receive the real scale again until user interacts with the page. This means the web process
scale and the UI process scale can be wildly out of sync.

This problem becomes more likely to be visible when

  • we are under memory pressure so we don't update tiles during zooming and rely on the one final update afterwards
  • the page generates lots of layer tree transactions
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::willCommitLayerTree):

Remember the last transaction where we actually changed the page scale.

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

(WebKit::WebPage::scaleFromUIProcess const):

Only reject the UI process scale if there has been a scale changing transaction meanwhile.
The transaction id test was added in r218149 and the problem it fixed remains fixed. This change also matches better
what it was purpoted to implement.

12:52 PM Changeset in webkit [233779] by Ross Kirsling
  • 4 edits in trunk/LayoutTests/dom/xhtml/level3/core

UTF-16 XHTML files need svn:mime-type to be handled correctly by Windows SVN
https://bugs.webkit.org/show_bug.cgi?id=187571

Reviewed by Alex Christensen.

svn propsets cannot be committed with webkit-patch land.
This commit actually does what the previous one claimed to.

  • dom/xhtml/level3/core/documentgetinputencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetinputencoding02.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion02.xhtml:
  • dom/xhtml/level3/core/external_foo.ent:

Added property svn:mime-type and removed property svn:eol-style (to align with documentgetxmlencoding03.xhtml).

12:46 PM Changeset in webkit [233778] by Megan Gardner
  • 7 edits in trunk/Source

Keep Selections within Shadow DOM boundaries
https://bugs.webkit.org/show_bug.cgi?id=187556
<rdar://problem/41664567>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Expose needed functionality to WebKit to help with determing editing and shadow dom boundries.

Only exposing functionality to WebKit.

  • dom/TreeScope.h:
  • editing/Editing.h:
  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::adjustPositionForEnd const):
(WebCore::VisibleSelection::adjustPositionForStart const):
(WebCore::adjustPositionForEnd): Deleted.
(WebCore::adjustPositionForStart): Deleted.

  • editing/VisibleSelection.h:

Source/WebKit:

Update rangeForPosition to take into account both editing and shadow DOM boundries.

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::rangeForPoint):
(WebKit::WebPage::updateSelectionWithTouches):
(WebKit::rangeForPosition): Deleted.

12:14 PM Changeset in webkit [233777] by sihui_liu@apple.com
  • 5 edits
    3 adds in trunk

IndexedDB: database file of subframe cannot be removed
https://bugs.webkit.org/show_bug.cgi?id=187564

Reviewed by Youenn Fablet.

Source/WebCore:

For IndexedDB, if openingOrigin is different from mainFrameOrigin, there will be another
layer in the database file path.
IDBServer should delete database files recursively to make sure all files are removed.

Covered by modified test: WebKit.WebsiteDataStoreCustomPaths.

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::removeAllDatabasesForOriginPath):

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:

(TEST):

12:07 PM Changeset in webkit [233776] by Ross Kirsling
  • 1 edit in trunk/LayoutTests/ChangeLog

UTF-16 XHTML files need svn:mime-type to be handled correctly by Windows SVN
https://bugs.webkit.org/show_bug.cgi?id=187571

Reviewed by Alex Christensen.

  • dom/xhtml/level3/core/documentgetinputencoding03.xhtml:
  • dom/xhtml/level3/core/entitygetinputencoding02.xhtml:
  • dom/xhtml/level3/core/entitygetxmlversion02.xhtml:
  • dom/xhtml/level3/core/external_foo.ent:

Added property svn:mime-type and removed property svn:eol-style (to align with documentgetxmlencoding03.xhtml).

11:37 AM Changeset in webkit [233775] by timothy@apple.com
  • 2 edits in trunk/Tools

Make WebKit.LinkColorWithSystemAppearance work across system versions.
https://bugs.webkit.org/show_bug.cgi?id=187573

Reviewed by Wenson Hsieh.

  • TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:

(TestWebKitAPI.WebKit.LinkColorWithSystemAppearance): Dynamically generate the expected string.

11:35 AM Changeset in webkit [233774] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Revert: iOS port should define HAVE_RUNLOOP_TIMER
<https://webkit.org/b/187370>

  • wtf/Platform.h: This is only needed on macOS when using

-[WebView scheduleInRunLoop:forMode:] and
-[WebView unscheduleFromRunLoop:forMode:] to make WK1 WebViews
load synchronously using -loadHTMLString: or -loadData:.

11:27 AM Changeset in webkit [233773] by msaboff@apple.com
  • 6 edits
    1 add in trunk/Source/bmalloc

Disable IsoHeaps when Gigacage is off
https://bugs.webkit.org/show_bug.cgi?id=187160

Reviewed by Saam Barati.

Relanding change sets 233547 and 233550 with the added fix that Gigacage is also
enabled for DumpRenderTree.

Updated determineMallocFallbackState to base enabling of Iso Heaps on Gigacage
being enabled. We do this because if Gigacage is disabled, it may be due to lack
of address space.

To work around a compiler issue uncovered by the change above, I added explicit
instantiation of PerThread's static variables. Defined the same explicit
instantiated static variables with export scope in the new file PerThread.cpp
to eliminate separate variables allocations in each linked framework / library.

  • CMakeLists.txt:
  • bmalloc.xcodeproj/project.pbxproj:
  • bmalloc/IsoTLS.cpp:

(bmalloc::IsoTLS::determineMallocFallbackState):

  • bmalloc/PerThread.cpp: Added.
  • bmalloc/PerThread.h:
  • bmalloc/ProcessCheck.mm:

(bmalloc::gigacageEnabledForProcess):

10:39 AM Changeset in webkit [233772] by mark.lam@apple.com
  • 5 edits in trunk/Source/JavaScriptCore

Need to handle CodeBlock::replacement() being null.
https://bugs.webkit.org/show_bug.cgi?id=187569
<rdar://problem/41468692>

Reviewed by Saam Barati.

CodeBlock::replacement() may return a nullptr. Some of our code already checks
for this while others do not. We should add null checks in all the places that
need it.

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::hasOptimizedReplacement):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::numberOfDFGCompiles):
(JSC::CodeBlock::setOptimizationThresholdBasedOnCompilationResult):

  • dfg/DFGOperations.cpp:
  • dfg/DFGToFTLDeferredCompilationCallback.cpp:

(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidBecomeReadyAsynchronously):
(JSC::DFG::ToFTLDeferredCompilationCallback::compilationDidComplete):

  • jit/JITOperations.cpp:
10:03 AM Changeset in webkit [233771] by jer.noble@apple.com
  • 9 edits in trunk/Source/WebKit

REGRESSION (r230163): Videos cannot be seen full screen in Complete Anatomy app
https://bugs.webkit.org/show_bug.cgi?id=187527
<rdar://problem/40511527>

Reviewed by Ryosuke Niwa.

Do not enable element fullscreen mode unless apps specifically opt-in. The Fullscreen API is
an experimental feature on iOS, but not on Mac, but we can't simply not return the ExperimentalFeature
object from the list of experimental features, as this keeps Safari from being able to apply a
NSUserDefault value for that feature. Instead, add a property to API::ExperimentalFeature and
_WKExperimentalFeature called "hidden", which signals to clients whether to display the feature
in their UI.

  • Scripts/GeneratePreferences.rb:
  • Scripts/PreferencesTemplates/WebPreferencesExperimentalFeatures.cpp.erb:
  • Shared/WebPreferences.yaml:
  • Shared/WebPreferencesDefaultValues.h:
  • UIProcess/API/APIExperimentalFeature.cpp:

(API::ExperimentalFeature::create):
(API::ExperimentalFeature::ExperimentalFeature):

  • UIProcess/API/APIExperimentalFeature.h:
  • UIProcess/API/Cocoa/_WKExperimentalFeature.h:
  • UIProcess/API/Cocoa/_WKExperimentalFeature.mm:

(-[_WKExperimentalFeature isHidden]):

10:00 AM Changeset in webkit [233770] by ap@apple.com
  • 2 edits in trunk/Source/WebKit

[Mac] Run Unlock Keychain more reliably
https://bugs.webkit.org/show_bug.cgi?id=187604

Reviewed by Dan Bernstein.

Move unlocking to a separate target, and make it a dependency for all targets that
produce binaries.

This is more than strictly required to fix the build, but this way, we won't need
to remember about keychain when project structure changes. Another consideration that
wasn't initially apparent to me is that is should be possible to build any target,
not just "All", so projects aren't necessarily built in the same order even now.

  • WebKit.xcodeproj/project.pbxproj:
9:02 AM Changeset in webkit [233769] by pvollan@apple.com
  • 17 edits in trunk/Source

Add compile guard for enabling NSRunLoop in the WebContent process.
https://bugs.webkit.org/show_bug.cgi?id=187563

Reviewed by Chris Dumez.

Source/WebCore:

No new tests, no change in behavior.

  • platform/mac/EventLoopMac.mm:

(WebCore::EventLoop::cycle):

Source/WebKit:

Also, replace MAC_OS_X_VERSION_MIN_REQUIRED >= 101400 with ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) where appropriate.

  • Platform/mac/LayerHostingContext.mm:

(WebKit::LayerHostingContext::createForExternalHostingProcess):

  • Shared/ChildProcess.h:
  • Shared/mac/ChildProcessMac.mm:
  • Shared/mac/HangDetectionDisablerMac.mm:

(WebKit::setClientsMayIgnoreEvents):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::registerNotificationObservers):
(WebKit::WebProcessPool::unregisterNotificationObservers):

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::shouldLeakBoost):

  • UIProcess/WebProcessPool.h:
  • WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
  • WebProcess/Plugins/PDF/PDFPlugin.mm:

(WebKit::PDFPlugin::PDFPlugin):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):
(WebKit::WebProcess::stopRunLoop):

Source/WTF:

  • wtf/FeatureDefines.h:
8:02 AM WebKitGTK/Gardening/Calendar/2018Logs edited by magomez@igalia.com
(diff)
7:35 AM Changeset in webkit [233768] by magomez@igalia.com
  • 3 edits in trunk/LayoutTests

Unreviewed GTK+ and WPE gardening after r233765.

  • platform/gtk/TestExpectations:
  • platform/wpe/TestExpectations:
7:23 AM Changeset in webkit [233767] by Alan Bujtas
  • 3 edits
    2 adds in trunk

Newly added float should trigger full layout on the block.
https://bugs.webkit.org/show_bug.cgi?id=187251
<rdar://problem/41726137>

Reviewed by David Kilzer.

Source/WebCore:

RenderBlockFlow::determineStartPosition() is one of the places where we decide the extent of the line layout for the current block.
In here we try to figure out the first line in the block that requires layout. In certain cases when floats are present,
(due to their intrusive behavior) we just trigger a full layout on the entire block.
One of the special cases is when a new float is added to the block. determineStartPosition() checks for such floats (floats inserted
after the "last known float") and marks the block for full layout. However it missed the case when other, unrelated mutations happened
in addition to this newly inserted float. This patch fixes this case by checking if the floats after the "last know float" actually need layout.

Test: fast/inline/new-float-needs-layout-when-line-is-dirty.html

  • rendering/RenderBlockLineLayout.cpp:

(WebCore::RenderBlockFlow::determineStartPosition):

LayoutTests:

  • fast/inline/new-float-needs-layout-when-line-is-dirty-expected.txt: Added.
  • fast/inline/new-float-needs-layout-when-line-is-dirty.html: Added.
6:19 AM Changeset in webkit [233766] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

[GStreamer] Add pads to the GstFlowCombiner in MediaStreamSrc
https://bugs.webkit.org/show_bug.cgi?id=187552

Patch by Thibault Saunier <tsaunier@igalia.com> on 2018-07-12
Reviewed by Alejandro G. Castro.

This was overlooked and it is the way the API is supposed to be used.

  • platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:

(WebCore::webkitMediaStreamSrcAddPad):

1:43 AM Changeset in webkit [233765] by Yusuke Suzuki
  • 43 edits in trunk/Source

[JSC] Thread VM& to JSCell::methodTable(VM&)
https://bugs.webkit.org/show_bug.cgi?id=187548

Reviewed by Saam Barati.

Source/JavaScriptCore:

This patch threads VM& to methodTable(VM&) and remove methodTable().
We add VM& parameter to estimatedSize() to thread VM& in estimatedSize implementations.

  • API/APICast.h:

(toJS):

  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:

(JSC::JSCallbackObject<Parent>::className):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::estimatedSize):

  • bytecode/CodeBlock.h:
  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedCodeBlock::estimatedSize):

  • bytecode/UnlinkedCodeBlock.h:
  • debugger/DebuggerScope.cpp:

(JSC::DebuggerScope::className):

  • debugger/DebuggerScope.h:
  • heap/Heap.cpp:

(JSC::GatherHeapSnapshotData::GatherHeapSnapshotData):
(JSC::GatherHeapSnapshotData::operator() const):
(JSC::Heap::gatherExtraHeapSnapshotData):

  • heap/HeapSnapshotBuilder.cpp:

(JSC::HeapSnapshotBuilder::json):

  • runtime/ArrayPrototype.cpp:

(JSC::arrayProtoFuncToString):

  • runtime/ClassInfo.h:
  • runtime/DirectArguments.cpp:

(JSC::DirectArguments::estimatedSize):

  • runtime/DirectArguments.h:
  • runtime/HashMapImpl.cpp:

(JSC::HashMapImpl<HashMapBucket>::estimatedSize):

  • runtime/HashMapImpl.h:
  • runtime/JSArrayBuffer.cpp:

(JSC::JSArrayBuffer::estimatedSize):

  • runtime/JSArrayBuffer.h:
  • runtime/JSBigInt.cpp:

(JSC::JSBigInt::estimatedSize):

  • runtime/JSBigInt.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::dump const):
(JSC::JSCell::estimatedSizeInBytes const):
(JSC::JSCell::estimatedSize):
(JSC::JSCell::className):

  • runtime/JSCell.h:
  • runtime/JSCellInlines.h:
  • runtime/JSGenericTypedArrayView.h:
  • runtime/JSGenericTypedArrayViewInlines.h:

(JSC::JSGenericTypedArrayView<Adaptor>::estimatedSize):

  • runtime/JSObject.cpp:

(JSC::JSObject::estimatedSize):
(JSC::JSObject::className):
(JSC::JSObject::toStringName):
(JSC::JSObject::calculatedClassName):

  • runtime/JSObject.h:
  • runtime/JSProxy.cpp:

(JSC::JSProxy::className):

  • runtime/JSProxy.h:
  • runtime/JSString.cpp:

(JSC::JSString::estimatedSize):

  • runtime/JSString.h:
  • runtime/RegExp.cpp:

(JSC::RegExp::estimatedSize):

  • runtime/RegExp.h:
  • runtime/WeakMapImpl.cpp:

(JSC::WeakMapImpl<WeakMapBucket>::estimatedSize):

  • runtime/WeakMapImpl.h:

Source/WebCore:

  • bindings/js/JSDOMConstructorBase.h:

(WebCore::JSDOMConstructorBase::className):

  • bindings/js/JSPluginElementFunctions.cpp:

(WebCore::pluginElementCustomGetCallData):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateHeader):
(GenerateImplementation):

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

(WebCore::JSInterfaceName::estimatedSize):

  • bindings/scripts/test/JS/JSInterfaceName.h:
1:40 AM Changeset in webkit [233764] by yousuke.kimoto@sony.com
  • 1 edit in trunk/Tools/Scripts/webkitpy/common/config/contributors.json

Unreviewed, add myself as a WebKit committer.

  • Scripts/webkitpy/common/config/contributors.json:
Note: See TracTimeline for information about the timeline view.