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

Timeline



May 7, 2017:

10:31 PM Changeset in webkit [216354] by commit-queue@webkit.org
  • 365 edits in trunk/LayoutTests/imported/w3c

Regenerate w3c-import.log files after r215670
https://bugs.webkit.org/show_bug.cgi?id=171210

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-07
Reviewed by Chris Dumez.

Updating all w3c-import.log files of web-platform-tests.
Fixing some import expectations.
Fixing some tests to match the current import revision, only syntatic changes (meta annotations and links to resources).

  • resources/import-expectations.json:
  • web-platform-tests/WebCryptoAPI/OWNERS:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/pbkdf2.worker.js: meta annotation changes.
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CBC.worker.js: Ditto for all crypto tests.
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-CTR.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-GCM.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_AES-KW.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDH.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_ECDSA.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_HMAC.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-OAEP.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_RSA-PSS.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/failures_RSASSA-PKCS1-v1_5.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CBC.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-CTR.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-GCM.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_AES-KW.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDH.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_ECDSA.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_HMAC.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-OAEP.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_RSA-PSS.worker.js:
  • web-platform-tests/WebCryptoAPI/generateKey/successes_RSASSA-PKCS1-v1_5.worker.js:
  • web-platform-tests/WebCryptoAPI/tools/generate.py:
  • web-platform-tests/WebCryptoAPI/wrapKey_unwrapKey/wrapKey_unwrapKey.worker.js:
  • web-platform-tests/css/css-grid-1/grid-layout-properties.html:
  • web-platform-tests/css/selectors4/focus-within-009.html:
  • web-platform-tests/domparsing/DOMParser-parseFromString-html.html:
  • web-platform-tests/domparsing/createContextualFragment.html:
  • web-platform-tests/domparsing/innerhtml-01.xhtml:
  • web-platform-tests/domparsing/innerhtml-03.xhtml:
  • web-platform-tests/domparsing/innerhtml-04.html:
  • web-platform-tests/domparsing/innerhtml-05.xhtml:
  • web-platform-tests/domparsing/innerhtml-06.html:
  • web-platform-tests/domparsing/innerhtml-07.html:
  • web-platform-tests/domparsing/insert-adjacent.html:
  • web-platform-tests/domparsing/insert_adjacent_html.html:
  • web-platform-tests/domparsing/outerhtml-01.html:
  • web-platform-tests/domparsing/outerhtml-02.html:
  • web-platform-tests/domparsing/xml-serialization.xhtml:
5:01 PM Changeset in webkit [216353] by commit-queue@webkit.org
  • 7 edits in trunk

Set the Response.blob() type based on the content-type header value.
https://bugs.webkit.org/show_bug.cgi?id=170849

Patch by Ben Kelly <ben@wanderview.com> on 2017-05-07
Reviewed by Youenn Fablet.

LayoutTests/imported/w3c:

  • web-platform-tests/fetch/api/response/response-consume-expected.txt:

Source/WebCore:

There are two problems to fix here:

  1. Currently the FetchResponse class only called updateContentType()

when first created even though all the headers were not available. This
patch calls updateContentType() again after the headers are populated.

  1. The fetch design requires propagating the normalized blob

type to FetchBodyConsumer as well. Currently this is only done if
Response.blob() is called after the body is completely loaded. If
we hit the consumeOnceLoadingFinished() path, then the type is not
passed. This is similar to what was happening in bug 171489 with
ReadableStream bodies. This patch sets the type on the
FetchBodyConsumer in consumeOnceLoadingFinished() as well.

Theses changes allow WebKit to pass the "Consume response's body: from
fetch to blob" case in the WPT response-consume.html test.

Test: http://w3c-test.org/fetch/api/response/response-consume.html

  • Modules/fetch/FetchResponse.cpp:

(WebCore::FetchResponse::BodyLoader::didReceiveResponse): Modified to
call FetchBodyOwner::updateContentType() after filling m_headers.
(WebCore::FetchBody::consumeOnceLoadingFinished): Call
FetchBodyConsumer::setContentType() when being consumed as
a blob.

  • Modules/fetch/FetchBody.h: Modify consumeOnceLoadingFinished()

to take the content type string.

  • Modules/fetch/FetchBodyOwner.cpp:

(WebCore::FetchBodyOwner::consumeOnceLoadingFinished): Pass
the content type string down to FetchBody so it can be
propagated to the FetchBodyConsumer.

2:23 PM Changeset in webkit [216352] by Simon Fraser
  • 11 edits
    6 adds in trunk

[iOS] REGRESSION (r209409): getBoundingClientRect is wrong for fixed-position elements in resize/orientationchange
https://bugs.webkit.org/show_bug.cgi?id=171140
Source/WebCore:

Reviewed by Sam Weinig.

WebPage::dynamicViewportSizeUpdate() is called during rotation, and does a layout which needs to have
an up-to-date layout viewport, since the layout viewport state is detectable in orientationchange and
resize events via fetching the client rect of fixed elements. Normally we send in the layout viewport
from the UI process, but in this case we need to compute one in the web process. So factor code
into FrameView to do the computation, called from both places.

Tests: fast/events/ios/rotation/layout-viewport-during-rotation.html

fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html

  • page/FrameView.cpp:

(WebCore::FrameView::computeUpdatedLayoutViewportRect):

  • page/FrameView.h:

Source/WebKit2:

rdar://problem/31765167

Reviewed by Sam Weinig.

WebPage::dynamicViewportSizeUpdate() is called during rotation, and does a layout which needs to have
an up-to-date layout viewport, since the layout viewport state is detectable in orientationchange and
resize events via fetching the client rect of fixed elements. Normally we send in the layout viewport
from the UI process, but in this case we need to compute one in the web process. So factor code
into FrameView to do the computation, called from both places.

  • UIProcess/WebPageProxy.h:
  • UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:

(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInsets:unobscuredSafeAreaInsets:inputViewBounds:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):

  • UIProcess/ios/WebPageProxyIOS.mm:

(WebKit::WebPageProxy::computeCustomFixedPositionRect):

  • UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:

(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::dynamicViewportSizeUpdate):

LayoutTests:

Reviewed by Sam Weinig.

Tests that fetch the dimensions of a fixed element in resize and orientationchange handlers,
which is a proxy for reading the layout viewport.

  • fast/events/ios/rotation/layout-viewport-during-rotation-expected.txt: Added.
  • fast/events/ios/rotation/layout-viewport-during-rotation.html: Added.
  • fast/events/ios/rotation/layout-viewport-during-safari-type-rotation-expected.txt: Added.
  • fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html: Added.
  • fast/events/ios/rotation/resources/rotation-utils.js: Added.

(stringFromRect):
(accumulateLog):
(logFixedObject):
(logFixedAndViewports):
(doTest):

1:02 PM Changeset in webkit [216351] by Chris Dumez
  • 35 edits in trunk/Source/WebCore

Drop remaining uses of PassRefPtr in editing code
https://bugs.webkit.org/show_bug.cgi?id=171787

Reviewed by Darin Adler.

Drop remaining uses of PassRefPtr in editing code.

  • editing/AlternativeTextController.cpp:

(WebCore::AlternativeTextController::timerFired):

  • editing/ApplyStyleCommand.cpp:

(WebCore::toIdentifier):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::didApplyCommand):
(WebCore::CompositeEditCommand::moveParagraphs):

  • editing/CompositeEditCommand.h:
  • editing/Editor.cpp:

(WebCore::Editor::shouldInsertFragment):
(WebCore::Editor::replaceSelectionWithFragment):
(WebCore::Editor::appliedEditing):
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::willWriteSelectionToPasteboard):
(WebCore::Editor::advanceToNextMisspelling):
(WebCore::Editor::isSelectionUngrammatical):
(WebCore::Editor::guessesForMisspelledOrUngrammatical):
(WebCore::Editor::markMisspellingsOrBadGrammar):
(WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges):
(WebCore::correctSpellcheckingPreservingTextCheckingParagraph):
(WebCore::Editor::markAndReplaceFor):
(WebCore::Editor::changeBackToReplacedString):

  • editing/Editor.h:
  • editing/EditorCommand.cpp:

(WebCore::executeInsertFragment):
(WebCore::Editor::command):
(WebCore::Editor::Command::Command):

  • editing/FormatBlockCommand.cpp:

(WebCore::FormatBlockCommand::formatRange):

  • editing/IndentOutdentCommand.cpp:

(WebCore::IndentOutdentCommand::indentIntoBlockquote):
(WebCore::IndentOutdentCommand::outdentParagraph):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::fixOrphanedListChild):
(WebCore::InsertListCommand::mergeWithNeighboringLists):
(WebCore::InsertListCommand::doApplyForSingleParagraph):
(WebCore::InsertListCommand::unlistifyParagraph):
(WebCore::InsertListCommand::listifyParagraph):

  • editing/InsertListCommand.h:
  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::InsertTextCommand):

  • editing/InsertTextCommand.h:

(WebCore::InsertTextCommand::createWithMarkerSupplier):

  • editing/MoveSelectionCommand.cpp:

(WebCore::MoveSelectionCommand::MoveSelectionCommand):

  • editing/MoveSelectionCommand.h:

(WebCore::MoveSelectionCommand::create):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplacementFragment::removeNodePreservingChildren):
(WebCore::ReplacementFragment::removeNode):
(WebCore::ReplacementFragment::insertNodeBefore):
(WebCore::ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment):
(WebCore::ReplacementFragment::removeUnrenderedNodes):
(WebCore::ReplacementFragment::removeInterchangeNodes):
(WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder):
(WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor):
(WebCore::removeHeadContents):
(WebCore::ReplaceSelectionCommand::doApply):
(WebCore::ReplaceSelectionCommand::insertAsListItems):

  • editing/ReplaceSelectionCommand.h:
  • editing/SpellChecker.cpp:

(WebCore::SpellCheckRequest::SpellCheckRequest):
(WebCore::SpellCheckRequest::create):
(WebCore::SpellChecker::canCheckAsynchronously):
(WebCore::SpellChecker::isCheckable):
(WebCore::SpellChecker::requestCheckingFor):
(WebCore::SpellChecker::invokeRequest):
(WebCore::SpellChecker::enqueueRequest):
(WebCore::SpellChecker::didCheck):

  • editing/SpellChecker.h:

(WebCore::SpellCheckRequest::checkingRange):
(WebCore::SpellCheckRequest::paragraphRange):

  • editing/TextCheckingHelper.cpp:

(WebCore::expandToParagraphBoundary):
(WebCore::TextCheckingParagraph::TextCheckingParagraph):
(WebCore::TextCheckingParagraph::expandRangeToNextEnd):
(WebCore::TextCheckingParagraph::rangeLength):
(WebCore::TextCheckingParagraph::paragraphRange):
(WebCore::TextCheckingParagraph::subrange):
(WebCore::TextCheckingParagraph::offsetTo):
(WebCore::TextCheckingParagraph::offsetAsRange):
(WebCore::TextCheckingParagraph::text):
(WebCore::TextCheckingParagraph::checkingStart):
(WebCore::TextCheckingParagraph::checkingEnd):
(WebCore::TextCheckingParagraph::checkingLength):
(WebCore::TextCheckingHelper::TextCheckingHelper):
(WebCore::TextCheckingHelper::findFirstMisspelling):
(WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
(WebCore::TextCheckingHelper::findFirstGrammarDetail):
(WebCore::TextCheckingHelper::findFirstBadGrammar):
(WebCore::TextCheckingHelper::isUngrammatical):
(WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange):
(WebCore::TextCheckingHelper::unifiedTextCheckerEnabled):

  • editing/TextCheckingHelper.h:
  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::typingAddedToOpenCommand):

  • editing/cocoa/EditorCocoa.mm:

(WebCore::Editor::replaceSelectionWithAttributedString):

  • editing/gtk/EditorGtk.cpp:

(WebCore::Editor::pasteWithPasteboard):

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::pasteWithPasteboard):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::pasteWithPasteboard):
(WebCore::Editor::replaceNodeFromPasteboard):

  • editing/win/EditorWin.cpp:

(WebCore::Editor::pasteWithPasteboard):
(WebCore::createFragmentFromPlatformData):

  • page/DragController.cpp:

(WebCore::DragController::concludeEditDrag):
(WebCore::DragController::startDrag):

12:59 PM Changeset in webkit [216350] by Michael Catanzaro
  • 2 edits in trunk/Tools

[GTK] Cannot sign in with new Google sign-in page
https://bugs.webkit.org/show_bug.cgi?id=171770

Unreviewed. This just adds a test.

  • TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:

(TestWebKitAPI::TEST):

12:10 PM Changeset in webkit [216349] by commit-queue@webkit.org
  • 13 edits in trunk

[MediaStream] r216197 caused some webrtc tests to fail
https://bugs.webkit.org/show_bug.cgi?id=171728

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-07
Reviewed by Eric Carlson.

Source/WebCore:

Covered by existing tests.

Rename MediaStream::endStream to MediaStream::endCaptureTracks and only stopping capture tracks.
Using it when Document is asked to stop media capture.

Adding the ability to have only one active capture source at a time in a WebProcess.
This is done by keeping in its related factory the active capture source.
When a new source is created and started, it replaces the active capture source which becomes muted.
Using that mechanism for iOS.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::endCaptureTracks):
(WebCore::MediaStream::endStream): Deleted.

  • Modules/mediastream/MediaStream.h:
  • Modules/mediastream/MediaStreamTrack.h:

(WebCore::MediaStreamTrack::isCaptureTrack):

  • dom/Document.cpp:

(WebCore::Document::stopMediaCapture):

  • platform/mediastream/mac/AVAudioCaptureSource.mm:

(WebCore::AVAudioCaptureSourceFactory::setActiveSource):
(WebCore::AVAudioCaptureSource::setupCaptureSession):

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSourceFactory::setActiveSource):
(WebCore::AVVideoCaptureSource::setupCaptureSession):

  • platform/mediastream/mac/CoreAudioCaptureSource.cpp:

(WebCore::CoreAudioCaptureSourceFactory::setActiveSource):
(WebCore::CoreAudioSharedUnit::startProducingData):

Source/WebKit2:

  • UIProcess/UserMediaProcessManager.cpp:

(WebKit::UserMediaProcessManager::willEnableMediaStreamInPage): Removing muting streams of the page requesting
additional capture streams. This is now done in the WebProcess.

LayoutTests:

  • platform/ios-wk2/TestExpectations:
11:03 AM Changeset in webkit [216348] by timothy_horton@apple.com
  • 27 edits
    3 adds in trunk/Source

Clean up some WebProcessProxy, WebPage, and message handler includes
https://bugs.webkit.org/show_bug.cgi?id=171791

Reviewed by Sam Weinig.

This is worth another ~10% off WebKit2 clean build time on Mac.
This time, the most impactful change is the removal of
UserMediaPermissionRequestManager.h from WebPage.h, which completely
eradicates JSC's VM.h (which is enormous) from WebPage.h (at least on Mac).

  • Scripts/webkit/messages.py:

(headers_for_type):
Stop specializing CompositionUnderline now that it has its own file.

  • Shared/API/c/WKDeprecatedFunctions.cpp:
  • Shared/WebCoreArgumentCoders.cpp:
  • UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
  • UIProcess/Gamepad/UIGamepadProvider.cpp:
  • UIProcess/HiddenPageThrottlingAutoIncreasesCounter.h: Added.
  • UIProcess/HighPerformanceGraphicsUsageSampler.cpp:
  • UIProcess/Network/NetworkProcessProxy.cpp:
  • UIProcess/PerActivityStateCPUUsageSampler.cpp:
  • UIProcess/UserContent/WebUserContentControllerProxy.cpp:
  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::toWebCore):

  • UIProcess/VisibleWebPageCounter.h: Added.
  • UIProcess/VisitedLinkStore.h:
  • UIProcess/WebPageGroup.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebProcessLifetimeTracker.cpp:
  • UIProcess/WebProcessPool.h:
  • UIProcess/WebProcessProxy.h:

Remove WebPageProxy and forward-declare a whole bunch of things.

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/WebCoreSupport/WebUserMediaClient.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::userMediaAccessWasGranted):
(WebKit::WebPage::userMediaAccessWasDenied):
(WebKit::WebPage::didCompleteMediaDeviceEnumeration):
(WebKit::WebPage::grantUserMediaDeviceSandboxExtensions):
(WebKit::WebPage::revokeUserMediaDeviceSandboxExtensions):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::userMediaPermissionRequestManager):

  • WebProcess/WebPage/ios/FindControllerIOS.mm:
  • WebProcess/WebPage/ios/WebPageIOS.mm:
  • WebProcess/WebPage/mac/RemoteLayerTreeContext.h:

(WebKit::RemoteLayerTreeContext::deviceScaleFactor): Deleted.
(WebKit::RemoteLayerTreeContext::layerHostingMode): Deleted.

  • WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:

(WebKit::RemoteLayerTreeContext::deviceScaleFactor):
(WebKit::RemoteLayerTreeContext::layerHostingMode):

  • WebCore.xcodeproj/project.pbxproj:
  • editing/CompositionUnderline.h: Added.

(WebCore::CompositionUnderline::CompositionUnderline):

  • editing/Editor.h:

(WebCore::CompositionUnderline::CompositionUnderline): Deleted.
Move CompositionUnderline out of Editor.h, so that other files can
include that without Editor.h (which is quite large). Also, modernize it slightly.

3:24 AM Changeset in webkit [216347] by commit-queue@webkit.org
  • 20 edits
    24 adds in trunk

Implement Subresource Integrity (SRI)
https://bugs.webkit.org/show_bug.cgi?id=148363
LayoutTests/imported/w3c:

Patch by Sam Weinig <sam@webkit.org> on 2017-05-07
Reviewed by Daniel Bates.

  • web-platform-tests/html/dom/reflection-metadata-expected.txt:
  • web-platform-tests/html/dom/reflection-misc-expected.txt:

Update results now that we support the reflected 'integrity' property.

Source/WebCore:

<rdar://problem/18945879>

Patch by Sam Weinig <sam@webkit.org> on 2017-05-07
Reviewed by Daniel Bates.

Tests: http/tests/subresource-integrity/sri-disabled-with-setting.html

http/tests/subresource-integrity/sri-enabled-with-setting.html
http/tests/subresource-integrity/sri-script-cors.html
http/tests/subresource-integrity/sri-style-cors.html

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

Add new files.

  • dom/LoadableClassicScript.cpp:

(WebCore::LoadableClassicScript::create):
(WebCore::LoadableClassicScript::notifyFinished):

  • dom/LoadableClassicScript.h:
  • dom/LoadableScript.h:
  • dom/ScriptElement.cpp:

(WebCore::ScriptElement::requestClassicScript):
Store integrity metadata in the script fetcher so it can be passed to
the checked when script load finishes.

  • html/HTMLAttributeNames.in:

Add 'integrity'.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::process):
When requesting a stylesheet, cache the integrity metadata so it can
be used when the load completes (accessing the attribute at load completion
time is incorrect, as a script might have changed the attributes value since
the request was made).

(WebCore::HTMLLinkElement::setCSSStyleSheet):
Add an integrity check using the cached integrity metadata when a load
finishes.

  • html/HTMLLinkElement.h:

Add cached integrity metadata member.

  • html/HTMLLinkElement.idl:
  • html/HTMLScriptElement.idl:

Add integrity property.

  • html/parser/HTMLParserIdioms.h:

(WebCore::isNotHTMLSpace):
Templatize isNotHTMLSpace so it can work for both UChar and LChar.

  • loader/ResourceCryptographicDigest.cpp:

(WebCore::parseCryptographicDigestImpl):
(WebCore::parseEncodedCryptographicDigestImpl):
(WebCore::parseEncodedCryptographicDigest):
(WebCore::decodeEncodedResourceCryptographicDigest):

  • loader/ResourceCryptographicDigest.h:

Add concept of an encoded digest to more closely model the spec so that hashes
that match the grammar but are invalid (say, mixing base64 and base64URL) make
it through the algorithm longer, and don't cause us to load something that should
be blocked.

  • loader/SubresourceIntegrity.cpp: Added.
  • loader/SubresourceIntegrity.h: Added.

Add implementation of Subresource Integrity metadata validation allowing
for a CachedResource and integrity metadata to be passed for validation.

  • page/Settings.in:

Add setting for Subresource Integrity, defaulted to enabled.

LayoutTests:

<rdar://problem/18945879>

Patch by Sam Weinig <sam@webkit.org> on 2017-05-07
Reviewed by Daniel Bates.

Add tests for Subresource Integrity based off the ones from Web
Platform Tests. They have been changed to:

  • Split <link> and <script> testing.
  • Add additional tests:
    • Integrity hashes using base64URL encoding.
    • Integrity hashes using mixed base64 and base64URL encoding.
    • Integrity metadata that does not conform to the grammar at all.
    • Multiple valid, but only one matching, integrity hashes.
    • Non-matching integrity hash with options.
  • Run one at a time, so console output is consistent.

We can/should upstream these changes, but this avoids the possibility that
an update of the imported web-platform-tests could cause these tests to fail.

Also adds tests that show the Subresource Integrity setting works correctly.

  • http/tests/subresource-integrity: Added.
  • http/tests/subresource-integrity/.htaccess: Added.
  • http/tests/subresource-integrity/resources: Added.
  • http/tests/subresource-integrity/resources/alternate.css: Added.
  • http/tests/subresource-integrity/resources/crossorigin-anon-script.js: Added.
  • http/tests/subresource-integrity/resources/crossorigin-anon-style.css: Added.
  • http/tests/subresource-integrity/resources/crossorigin-creds-script.js: Added.
  • http/tests/subresource-integrity/resources/crossorigin-creds-style.css: Added.
  • http/tests/subresource-integrity/resources/crossorigin-ineligible-script.js: Added.
  • http/tests/subresource-integrity/resources/crossorigin-ineligible-style.css: Added.
  • http/tests/subresource-integrity/resources/matching-digest.js: Added.
  • http/tests/subresource-integrity/resources/non-matching-digest.js: Added.
  • http/tests/subresource-integrity/resources/sri-utilities.js: Added.
  • http/tests/subresource-integrity/resources/style.css: Added.
  • http/tests/subresource-integrity/sri-disabled-with-setting-expected.txt: Added.
  • http/tests/subresource-integrity/sri-disabled-with-setting.html: Added.
  • http/tests/subresource-integrity/sri-enabled-with-setting-expected.txt: Added.
  • http/tests/subresource-integrity/sri-enabled-with-setting.html: Added.
  • http/tests/subresource-integrity/sri-script-expected.txt: Added.
  • http/tests/subresource-integrity/sri-script.html: Added.
  • http/tests/subresource-integrity/sri-style-expected.txt: Added.
  • http/tests/subresource-integrity/sri-style.html: Added.
2:56 AM Changeset in webkit [216346] by Carlos Garcia Campos
  • 5 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215347 - Don't invalidate composition for style changes in non-composited layers
https://bugs.webkit.org/show_bug.cgi?id=170805
<rdar://problem/31606185>

Reviewed by Simon Fraser.

Source/WebCore:

Test: compositing/updates/animation-non-composited.html

In most cases they can't affect composition. Composition updates are expensive, this can
save a lot of work (tumblr.com animations hit this at the moment).

  • rendering/RenderElement.h:

(WebCore::RenderElement::createsGroup):
(WebCore::RenderElement::createsGroupForStyle):

Factor to a static function so we can test style directly.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::styleChangeMayAffectIndirectCompositingReasons):

Test if style change might cause compositing change that can't be determined without compositing update.

  • rendering/RenderLayerCompositor.h:

LayoutTests:

  • compositing/updates/animation-non-composited-expected.txt: Added.
  • compositing/updates/animation-non-composited.html: Added.
2:45 AM Changeset in webkit [216345] by Carlos Garcia Campos
  • 26 edits
    4 adds
    2 deletes in releases/WebKitGTK/webkit-2.16

Merge r215315 - QuotaExceededError when saving to localStorage in private mode.
https://bugs.webkit.org/show_bug.cgi?id=157010

Reviewed by Alex Christensen.

Source/WebCore:

No new tests (Covered by changes to existing test).

LocalStorage in private browsing is now effectively SessionStorage.
It's ephemeral, per-tab, and copied over to tabs window.open()'ed from the current.

  • loader/EmptyClients.cpp:

(WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):

  • page/Chrome.cpp:

(WebCore::Chrome::createWindow):

  • page/Page.cpp:

(WebCore::Page::ephemeralLocalStorage):
(WebCore::Page::setEphemeralLocalStorage):

  • page/Page.h:
  • page/SecurityOriginData.h:
  • storage/Storage.cpp:

(WebCore::Storage::length):
(WebCore::Storage::key):
(WebCore::Storage::getItem):
(WebCore::Storage::setItem):
(WebCore::Storage::removeItem):
(WebCore::Storage::clear):
(WebCore::Storage::contains):
(WebCore::Storage::isDisabledByPrivateBrowsing): Deleted.

  • storage/StorageMap.h:
  • storage/StorageNamespaceProvider.cpp:

(WebCore::StorageNamespaceProvider::localStorageArea):

  • storage/StorageNamespaceProvider.h:
  • storage/StorageType.h:

(WebCore::isLocalStorage):
(WebCore::isPersistentLocalStorage):

Source/WebKit:

  • Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::close):

  • Storage/StorageNamespaceImpl.h:
  • Storage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace):

  • Storage/WebStorageNamespaceProvider.h:

Source/WebKit2:

  • WebProcess/Storage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::~StorageAreaMap):

  • WebProcess/Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createEphemeralLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::storageArea):
(WebKit::StorageNamespaceImpl::ephemeralLocalStorageArea):
(WebKit::StorageNamespaceImpl::copy):

  • WebProcess/Storage/StorageNamespaceImpl.h:
  • WebProcess/Storage/WebStorageNamespaceProvider.cpp:

(WebKit::WebStorageNamespaceProvider::createEphemeralLocalStorageNamespace):

  • WebProcess/Storage/WebStorageNamespaceProvider.h:

LayoutTests:

  • platform/mac-wk2/TestExpectations:
  • storage/domstorage/localstorage/private-browsing-affects-storage-expected.txt:
  • storage/domstorage/localstorage/private-browsing-affects-storage.html:
  • storage/domstorage/localstorage/resources/private-browsing-1.html: Added.
  • storage/domstorage/localstorage/resources/private-browsing-2.html: Added.
  • storage/domstorage/localstorage/resources/private-browsing-3.html: Added.
  • storage/domstorage/localstorage/resources/private-browsing-storage-2.html: Added.
  • storage/domstorage/sessionstorage/private-browsing-affects-storage-expected.txt: Removed.
  • storage/domstorage/sessionstorage/private-browsing-affects-storage.html: Removed.
2:44 AM Changeset in webkit [216344] by Carlos Garcia Campos
  • 14 edits
    1 copy in releases/WebKitGTK/webkit-2.16/Source

Merge r214680 - Clean up the "StorageType" enum.
https://bugs.webkit.org/show_bug.cgi?id=170349

Reviewed by Tim Horton.

Source/WebCore:

  • Make this enum into an enum class
  • Add a new type specific for "transient local storage"

No new tests (No behavior change).

  • WebCore.xcodeproj/project.pbxproj:
  • inspector/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::didDispatchDOMStorageEvent):

  • inspector/InspectorInstrumentation.h:
  • loader/EmptyClients.cpp:
  • storage/Storage.cpp:

(WebCore::Storage::isDisabledByPrivateBrowsing):

  • storage/StorageArea.h:

(): Deleted.

  • storage/StorageEventDispatcher.cpp:

(WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):

  • storage/StorageType.h:

(WebCore::isLocalStorage):

Source/WebKit:

  • Storage/StorageAreaImpl.cpp:

(WebKit::StorageAreaImpl::dispatchStorageEvent):

  • Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::getOrCreateLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::~StorageNamespaceImpl):
(WebKit::StorageNamespaceImpl::copy):
(WebKit::StorageNamespaceImpl::close):

Source/WebKit2:

  • WebProcess/Storage/StorageAreaMap.cpp:

(WebKit::StorageAreaMap::StorageAreaMap):
(WebKit::StorageAreaMap::dispatchStorageEvent):
(WebKit::StorageAreaMap::dispatchSessionStorageEvent):
(WebKit::StorageAreaMap::dispatchLocalStorageEvent):

  • WebProcess/Storage/StorageNamespaceImpl.cpp:

(WebKit::StorageNamespaceImpl::createSessionStorageNamespace):
(WebKit::StorageNamespaceImpl::createLocalStorageNamespace):
(WebKit::StorageNamespaceImpl::createTransientLocalStorageNamespace):

2:29 AM Changeset in webkit [216343] by Michael Catanzaro
  • 2 edits in trunk/Source/WebCore

[GTK] Cannot sign in with new Google sign-in page
https://bugs.webkit.org/show_bug.cgi?id=171770

Reviewed by Carlos Garcia Campos.

Google's new authentication page does not work with the Firefox user
agent that's required to make various Google websites work. Special-case
accounts.google.com so that it receives our standard user agent.

  • platform/UserAgentQuirks.cpp:

(WebCore::isGoogle):
(WebCore::urlRequiresFirefoxBrowser):

May 6, 2017:

10:43 PM Changeset in webkit [216342] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

[Cocoa] CTFontDescriptorCreateMatchingFontDescriptor() is not case insensitive
https://bugs.webkit.org/show_bug.cgi?id=171636
<rdar://problem/30811218>

Reviewed by Dean Jackson.

Source/WebCore:

LastResort is the only name which needs to be looked up case-sensitively. We can handle
this in our existing function which handles special font names (like -apple-system) to
make sure that we always do the right thing.

Test: fast/text/lastResort.html

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::platformFontWithFamilySpecialCase):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformFontWithFamilySpecialCase):

  • platform/spi/cocoa/CoreTextSPI.h:

LayoutTests:

  • fast/text/lastResort-expected.html: Added.
  • fast/text/lastResort.html: Added.
10:18 PM Changeset in webkit [216341] by Chris Dumez
  • 4 edits
    2 adds in trunk

Implement the concept of cookie-averse document
https://bugs.webkit.org/show_bug.cgi?id=171746
<rdar://problem/32004466>

Reviewed by Sam Weinig.

Source/WebCore:

Implement the concept of cookie-averse document:

Test: fast/cookies/cookie-averse-document.html

  • dom/Document.cpp:

(WebCore::Document::isCookieAverse):
(WebCore::Document::cookie):
(WebCore::Document::setCookie):

  • dom/Document.h:

LayoutTests:

Add layout test coverage.

  • fast/cookies/cookie-averse-document-expected.txt: Added.
  • fast/cookies/cookie-averse-document.html: Added.
8:57 PM Changeset in webkit [216340] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

Unreviewed build fix after r216339.

  • dom/Document.h:

(WebCore::Document::readyState):

8:48 PM Changeset in webkit [216339] by Chris Dumez
  • 32 edits in trunk

Align our IDL files with the latest DOM specification
https://bugs.webkit.org/show_bug.cgi?id=171777

Reviewed by Sam Weinig.

Source/WebCore:

Align our IDL files with the latest DOM specification:

No Web-facing behavior change. Things that do not match the specification
have been annotated with FIXME comments.

  • dom/CharacterData.idl:
  • dom/Comment.idl:
  • dom/CustomEvent.idl:
  • dom/DOMImplementation.idl:
  • dom/Document.cpp:
  • dom/Document.h:

(WebCore::Document::readyState):

  • dom/Document.idl:
  • dom/MutationObserver.idl:
  • dom/NamedNodeMap.idl:
  • dom/NodeFilter.idl:
  • dom/NodeIterator.idl:
  • dom/NodeList.idl:
  • dom/NonDocumentTypeChildNode.idl:
  • dom/ParentNode.idl:
  • dom/ProcessingInstruction.idl:
  • dom/Range.idl:
  • dom/ShadowRoot.idl:
  • dom/Text.idl:
  • dom/TreeWalker.idl:
  • html/DOMTokenList.idl:

Source/WebKit/mac:

Build fix.

  • DOM/DOMDocument.mm:

(-[DOMDocument readyState]):

Source/WebKit2:

GTK build fix.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDocument.cpp:

(webkit_dom_document_get_ready_state):

LayoutTests:

Rebaseline a few tests.

  • fast/dom/Document/adoptNode-null-expected.txt:
  • fast/dom/Document/adoptNode-null.html:
  • fast/dom/Document/importNode-null-expected.txt:
  • fast/dom/Document/importNode-null.html:
  • fast/dom/Range/range-intersectsNode-expected.txt:
  • fast/text/text-combine-crash-expected.txt:
8:25 PM Changeset in webkit [216338] by timothy_horton@apple.com
  • 18 edits in trunk/Source

Reduce the number of includes in WebPage.h and WebProcess.h
https://bugs.webkit.org/show_bug.cgi?id=171779

Reviewed by Sam Weinig.

  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:
  • WebProcess/Network/NetworkProcessConnection.cpp:
  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:
  • WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
  • WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
  • WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
  • WebProcess/WebPage/FindController.cpp:
  • WebProcess/WebPage/WebFrame.cpp:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::disableEnumeratingAllNetworkInterfaces):
(WebKit::WebPage::enableEnumeratingAllNetworkInterfaces):
(WebKit::WebPage::didReceivePolicyDecision):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::disableEnumeratingAllNetworkInterfaces): Deleted.
(WebKit::WebPage::enableEnumeratingAllNetworkInterfaces): Deleted.

  • WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
  • WebProcess/WebProcess.cpp:
  • WebProcess/WebProcess.h:

In my measurement, this improves WebKit2 debug clean build time by
~10% for Mac and ~5% for iOS. The most valuable change is the one to
remove LibWebRTC headers..

  • page/TextIndicator.h:
8:18 PM Changeset in webkit [216337] by ap@apple.com
  • 2 edits in trunk/LayoutTests

Mark http/tests/loading/resourceLoadStatistics/prevalent-resource-without-user-interaction.html as flaky
https://bugs.webkit.org/show_bug.cgi?id=171785

  • platform/wk2/TestExpectations:
7:58 PM Changeset in webkit [216336] by ap@apple.com
  • 30 edits
    5 deletes in trunk

REGRESSION (r216294): The new test fails on WebKit1
https://bugs.webkit.org/show_bug.cgi?id=171780

Rolling back https://trac.webkit.org/r216294, https://trac.webkit.org/r216296,
https://trac.webkit.org/216299, https://trac.webkit.org/216330

Source/WebCore:

  • page/FrameView.cpp:

(WebCore::FrameView::paintContents):

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

(WebCore::ScrollView::paint):

  • platform/ScrollView.h:
  • platform/Scrollbar.cpp:

(WebCore::Scrollbar::paint):

  • platform/Scrollbar.h:
  • platform/Widget.h:
  • platform/graphics/filters/FilterOperation.h:

(WebCore::FilterOperation::movesPixels):
(WebCore::FilterOperation::shouldBeRestrictedBySecurityOrigin): Deleted.

  • platform/graphics/filters/FilterOperations.cpp:

(WebCore::FilterOperations::hasFilterThatShouldBeRestrictedBySecurityOrigin): Deleted.

  • platform/graphics/filters/FilterOperations.h:
  • platform/gtk/WidgetGtk.cpp:

(WebCore::Widget::paint):

  • platform/ios/WidgetIOS.mm:

(WebCore::Widget::paint):

  • platform/mac/WidgetMac.mm:

(WebCore::Widget::paint):

  • platform/win/WidgetWin.cpp:

(WebCore::Widget::paint):

  • rendering/FilterEffectRenderer.cpp:

(WebCore::FilterEffectRenderer::build):

  • rendering/FilterEffectRenderer.h:
  • rendering/PaintInfo.h:

(WebCore::PaintInfo::PaintInfo):
(): Deleted.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::paint):
(WebCore::RenderLayer::setupFilters):
(WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):

  • rendering/RenderLayer.h:
  • rendering/RenderScrollbar.cpp:

(WebCore::RenderScrollbar::paint):

  • rendering/RenderScrollbar.h:
  • rendering/RenderWidget.cpp:

(WebCore::RenderWidget::paintContents):

Source/WebKit/win:

  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::paint):

Source/WebKit2:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::paint):

  • WebProcess/Plugins/PluginView.h:

LayoutTests:

  • http/tests/css/filters-on-iframes-expected.html: Removed.
  • http/tests/css/filters-on-iframes.html: Removed.
  • http/tests/css/resources/blank.html: Removed.
  • http/tests/css/resources/references-external.html: Removed.
  • http/tests/css/resources/solid-red.html: Removed.
7:53 PM Changeset in webkit [216335] by Simon Fraser
  • 9 edits in trunk

[iOS WK2] Make rotation tests more reliable
https://bugs.webkit.org/show_bug.cgi?id=171778

Reviewed by Tim Horton.

Source/WebKit2:

Switching between "safari-style" rotation and normal rotation left state on the WKWebView
that would cause later viewport-sensitive tests to fail. The WKWebView would be left
with override layout parameters, and an override orientation, and these caused viewport
size to leak into later tests, and WebCore orientation to not get reset correctly.

Also, WKWebView was unregistering for UIWindowDidRotateNotification notifications when
an override orientation was set, and would never re-register, causing lost orientationchanged
events.

Fix by exposing WKWebView SPI to clear the various bits of overide state. Also don't unregister
from the UIWindowDidRotateNotification notification; it's already ignored anyway if it fires.

Also wait for a visible content rect update after resizing the WKWebVeiw between tests, to make sure
the WebProcess is caught up before proceeding with the test.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setInterfaceOrientationOverride:]):
(-[WKWebView _clearInterfaceOrientationOverride]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _clearOverrideLayoutParameters]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Tools:

Switching between "safari-style" rotation and normal rotation left state on the WKWebView
that would cause later viewport-sensitive tests to fail. The WKWebView would be left
with override layout parameters, and an override orientation, and these caused viewport
size to leak into later tests, and WebCore orientation to not get reset correctly.

Also, WKWebView was unregistering for UIWindowDidRotateNotification notifications when
an override orientation was set, and would never re-register, causing lost orientationchanged
events.

Fix by exposing WKWebView SPI to clear the various bits of overide state. Also don't unregister
from the UIWindowDidRotateNotification notification; it's already ignored anyway if it fires.

Also wait for a visible content rect update after resizing the WKWebVeiw between tests, to make sure
the WebProcess is caught up before proceeding with the test.

  • WebKitTestRunner/ios/PlatformWebViewIOS.mm:

(-[PlatformWebViewController viewWillTransitionToSize:withTransitionCoordinator:]):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):
(WTR::TestController::platformConfigureViewForTest):

LayoutTests:

New baseline.

  • fast/events/ios/rotation/zz-no-rotation-expected.txt:
  • fast/events/ios/rotation/zz-no-rotation.html:
4:39 PM Changeset in webkit [216334] by Chris Dumez
  • 4 edits
    2 deletes in trunk

Unreviewed, rolling out r216333.

Caused layout test failures

Reverted changeset:

"Implement the concept of cookie-averse document"
https://bugs.webkit.org/show_bug.cgi?id=171746
http://trac.webkit.org/changeset/216333

1:32 PM Changeset in webkit [216333] by Chris Dumez
  • 4 edits
    2 adds in trunk

Implement the concept of cookie-averse document
https://bugs.webkit.org/show_bug.cgi?id=171746
<rdar://problem/32004466>

Reviewed by Sam Weinig.

Source/WebCore:

Implement the concept of cookie-averse document:

Test: fast/cookies/cookie-averse-document.html

  • dom/Document.cpp:

(WebCore::Document::isCookieAverse):
(WebCore::Document::cookie):
(WebCore::Document::setCookie):

  • dom/Document.h:

LayoutTests:

Add layout test coverage.

  • fast/cookies/cookie-averse-document-expected.txt: Added.
  • fast/cookies/cookie-averse-document.html: Added.
11:06 AM Changeset in webkit [216332] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Fix 32bit Windows build by giving correct parameters to MASM
https://bugs.webkit.org/show_bug.cgi?id=170833

Patch by Bill Ming <mbbill@gmail.com> on 2017-05-06
Reviewed by Alex Christensen.

  • CMakeLists.txt:
10:54 AM Changeset in webkit [216331] by mmaxfield@apple.com
  • 3 edits
    2 adds in trunk

REGERSSION(r213499): Emoji with Fitzpatrick modifiers are drawn as two separate glyphs
https://bugs.webkit.org/show_bug.cgi?id=171750
<rdar://problem/31122612>

Reviewed by Zalan Bujtas.

Source/WebCore:

Emoji with Fitzpatrick modifiers need to take our complex text codepath. When looking through
the string to determine which code path to use, we ask if a particular codepoint is an emoji
group candidate. r213499 expanded the set of these candidates to include Fitzpatrick modifiers,
which means the next "if" statement would never be hit. Instead, we should check that "if"
statement first (because order is not important here). The next checks do not intersect with
any emoji group candidates.

Test: fast/text/fitzpatrick-combination.html

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::characterRangeCodePath):

LayoutTests:

  • fast/text/fitzpatrick-combination-expected.html: Added.
  • fast/text/fitzpatrick-combination.html: Added.
10:31 AM Changeset in webkit [216330] by Simon Fraser
  • 3 edits in trunk/Source/WebKit/win

Fix Windows build after r216294.

  • Plugins/PluginView.h:
  • Plugins/PluginViewWin.cpp:

(WebCore::PluginView::paint):

10:16 AM Changeset in webkit [216329] by gskachkov@gmail.com
  • 4 edits in trunk

[ES6] Arrow function. Issue in access to this after eval('super()') within constructor
https://bugs.webkit.org/show_bug.cgi?id=171543

Reviewed by Saam Barati.

JSTests:

  • stress/arrowfunction-lexical-bind-supercall-4.js:

(J):
(K):

Source/JavaScriptCore:

Current patch force to use 'this' within arrow function or eval
from virtual scope each time, instead of using thisRegister.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::ensureThis):

10:15 AM Changeset in webkit [216328] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit2

Remove unused lambda capture
https://bugs.webkit.org/show_bug.cgi?id=171772

Reviewed by Yusuke Suzuki.

  • DatabaseProcess/DatabaseProcess.cpp:

(WebKit::DatabaseProcess::fetchWebsiteData):

8:05 AM Changeset in webkit [216327] by ddkilzer@apple.com
  • 8 edits in trunk/Source/WebKit2
messages_unittest.py should support a [-rreset-results] switch

<https://webkit.org/b/171627>

Reviewed by Daniel Bates.

This change adds support for a [-rreset-results] switch when

running messages_unittest.py to make it easy to update the
expected file results.

This also cleans up a lot of duplicate code in
messages_unittest.py by extracting common code into new methods
and by pushing code down into methods where it's actually used.

  • Scripts/webkit/LegacyMessageReceiver-expected.cpp:
  • Scripts/webkit/LegacyMessages-expected.h:
  • Scripts/webkit/MessageReceiver-expected.cpp:
  • Scripts/webkit/MessageReceiverSuperclass-expected.cpp:
  • Scripts/webkit/Messages-expected.h:
  • Scripts/webkit/MessagesSuperclass-expected.h:
  • Update expected files using the new --reset-results switch.
  • Scripts/webkit/messages_unittest.py:
  • Remove what appears to be a debugging print statement.
  • Replace the code that reads in expected files with variables that contain the expected file names. The code to read in the contents moved into GeneratedFileContentsTest.assertGeneratedFileContentsEqual().

(ParsingTest.check_message):

  • Drive-by fix to change "!= None" to "is not None".

(GeneratedFileContentsTest.assertGeneratedFileContentsEqual):

Add support for [-rreset-results] switch here. This will

write out updated expected file contents when the switch is
used.

  • Push down most of the global code that reads in file contents into this method.
  • Change use of split('\n') into splitlines(False).

(GeneratedFileContentsTest.assertHeaderEqual): Add.

  • Extracts common code from test_receiver_headers().

(GeneratedFileContentsTest.assertImplementationEqual): Add.

  • Extracts common code from test_receiver_implementations().

(HeaderTest):
(HeaderTest.test_receiver_headers):

  • Rename from HeaderTest.test_header().
  • Simplify by calling assertHeaderEqual().

(ReceiverImplementationTest):
(ReceiverImplementationTest.test_receiver_implementations):

  • Rename from ReceiverImplementationTest.test_receiver_implementation().
  • Simplify by calling assertImplementationEqual().

(add_reset_results_to_unittest_help): Add.

Inserts help text for [-rreset-results] switch.

(parse_sys_argv): Add.

Parses [-rreset-results] switch, and then removes it from

sys.argv. We do this instead of using argparse so that the
original help for the unittest module is still shown when
using --help.

4:34 AM Changeset in webkit [216326] by Csaba Osztrogonác
  • 2 edits in trunk/Tools

[Mac][cmake] Buildfix after r216047
https://bugs.webkit.org/show_bug.cgi?id=171769

Unreviewed buildfix.

  • WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
3:58 AM Changeset in webkit [216325] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WTF

Merge r215180 - [GTK] Fix x32 build
https://bugs.webkit.org/show_bug.cgi?id=170673

Patch by Thorsten Glaser <tg@mirbsd.de> on 2017-04-10
Reviewed by Carlos Alberto Lopez Perez.

  • wtf/Platform.h:
3:24 AM Changeset in webkit [216324] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16

Merge r215172 - REGRESSION(r205841): [GTK] Test fast/images/animated-png.html is failing since r205841
https://bugs.webkit.org/show_bug.cgi?id=168425

Reviewed by Said Abou-Hallawa.

Source/WebCore:

There is a problem with animations that are blending their frames into the previous frame. Due to a change
in how pixel components are premultiplied (the result is now rounded up), the parameters to the blending
operation may vary in one unit, causing the result of the blending to be different from the expected result.
In order to fix this, a new parameter is added to indicate whether we want to use rounding up when
premultiplying or not, and ImageBackingStore uses that parameter to disable rounding up.

Adjusted the expectation for fast/images/animated-png.html, as it must pass now.

  • platform/graphics/Color.cpp:

(WebCore::premultipliedChannel):
(WebCore::makePremultipliedRGBA):

  • platform/graphics/Color.h:
  • platform/graphics/ImageBackingStore.h:

(WebCore::ImageBackingStore::blendPixel):
(WebCore::ImageBackingStore::pixelValue):

LayoutTests:

Adjusted expectation for fast/images/animated-png.html. It must pass now.

  • platform/gtk/TestExpectations:
1:55 AM Changeset in webkit [216323] by commit-queue@webkit.org
  • 8 edits in trunk/Source/WebCore

RealtimeMediaSourceCenter callbacks should be passed as r-values
https://bugs.webkit.org/show_bug.cgi?id=171407

Patch by Youenn Fablet <youenn@apple.com> on 2017-05-06
Reviewed by Eric Carlson.

No change of behavior, this is mostly style here.

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:

(WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
(WebCore::RealtimeMediaSourceCenterMac::createMediaStream):

  • platform/mediastream/mac/RealtimeMediaSourceCenterMac.h:
  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:

(WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):

  • platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
  • platform/mock/MockRealtimeMediaSourceCenter.cpp:

(WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
(WebCore::MockRealtimeMediaSourceCenter::createMediaStream):

  • platform/mock/MockRealtimeMediaSourceCenter.h:
1:49 AM Changeset in webkit [216322] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16

Merge r215156 - Elftoolchain ar doesn't support response files
https://bugs.webkit.org/show_bug.cgi?id=170105

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2017-04-08
Reviewed by Michael Catanzaro.

WebKit enables the use of response files when cmake and ninja is used.
However, the default implementation of ar command used in FreeBSD, which
is part of elftoolchain project, doesn't support reading arguments from
response files. To avoid causing undefined reference error on FreeBSD,
we disable the use of response files when elftoolchain ar is detected.

  • Source/cmake/OptionsCommon.cmake:
1:46 AM Changeset in webkit [216321] by Carlos Garcia Campos
  • 4 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215124 - Simple line layout: FlowContents::segmentIndexForRunSlow skips empty runs.
https://bugs.webkit.org/show_bug.cgi?id=170552

Reviewed by Antti Koivisto.

Source/WebCore:

The compare function passed to std::lower_bound completely misses empty runs.

Test: fast/text/simple-line-layout-hover-over-subsequent-linebreaks.html

  • rendering/SimpleLineLayoutFlowContents.cpp:

(WebCore::SimpleLineLayout::FlowContents::segmentIndexForRunSlow):

LayoutTests:

  • fast/text/simple-line-layout-hover-over-subsequent-linebreaks-expected.txt: Added.
  • fast/text/simple-line-layout-hover-over-subsequent-linebreaks.html: Added.
1:36 AM Changeset in webkit [216320] by Carlos Garcia Campos
  • 5 edits in releases/WebKitGTK/webkit-2.16

Merge r215117 - REGRESSION(r211382): Complex text with justification erroneously overflows containers
https://bugs.webkit.org/show_bug.cgi?id=170399
<rdar://problem/31442008>

Reviewed by Simon Fraser.

Source/WebCore:

When we perform justification, we adjust glyphs' advances to add extra space between words.
ComplexTextController maintains an invariant where m_totalWidth is equal to the sum of these
advances. However, in RTL text, inserting extra justification space to the left of a glyph
would break that invariant, and would increase the advances of two glyphs instead of just
one. Then, when we go to draw the text, the sum of the advances is wider than m_totalWidth,
which means the glyphs would be drawn outside of their container.

This regressed in r211382 simply because of an oversight and because there were no tests for
this codepath.

Test: ComplexTextControllerTest.TotalWidthWithJustification

  • platform/graphics/ComplexTextController.cpp:

(WebCore::ComplexTextController::adjustGlyphsAndAdvances):

  • rendering/InlineBox.h:

(WebCore::InlineBox::InlineBox):

Tools:

Check for the invariant that the sum of the advances is equal to m_totalWidth.

  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

1:30 AM Changeset in webkit [216319] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WTF

Merge r215107 - Include cstdio before using sscanf and stderr
https://bugs.webkit.org/show_bug.cgi?id=170098

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2017-04-07
Reviewed by Michael Catanzaro.

  • wtf/NumberOfCores.cpp:
1:30 AM Changeset in webkit [216318] by Carlos Garcia Campos
  • 6 edits in releases/WebKitGTK/webkit-2.16

Merge r215106 - [GTK] Various build errors when plugin support is disabled
https://bugs.webkit.org/show_bug.cgi?id=170015

Reviewed by Carlos Garcia Campos.

.:

Allow building with ENABLE_NETSCAPE_PLUGIN_API=ON and ENABLE_X11_TARGET=OFF. This should be
possible as Carlos worked to ensure windowless plugins work properly outside X11. The GTK2
plugin process still depends on ENABLE_X11_TARGET because a plugin that uses GTK+ surely
wants to display a window, and is not going to work outside X11. (If the plugin links to
GTK+ but does not display a window, it's dumb and deserves to be broken.)

Also, make ENABLE_PLUGIN_PROCESS conditional on ENABLE_NETSCAPE_PLUGIN_API, not
ENABLE_X11_TARGET.

  • Source/cmake/OptionsGTK.cmake:

Source/WebKit2:

  • PluginProcess/unix/PluginControllerProxyUnix.cpp:
  • UIProcess/API/gtk/WebKitWebsiteData.cpp:

(recordContainsSupportedDataTypes):
(toWebKitWebsiteDataTypes):

  • UIProcess/API/gtk/WebKitWebsiteDataManager.cpp:

(toWebsiteDataTypes):

1:28 AM Changeset in webkit [216317] by Carlos Garcia Campos
  • 3 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215102 - REGRESSION(r204512): WebSocket errors with "Failed to send WebSocket frame." if too much data is sent
https://bugs.webkit.org/show_bug.cgi?id=170463

Reviewed by Michael Catanzaro.

This only reproduces when using WebSockets to communicate with an external server.
When communicating with a local server, CFWriteStreamWrite succeeds too reliably, so
CFWriteStreamCanAcceptBytes returns true, when sometimes it doesn't when communicating
across the real internet.

  • platform/network/cf/SocketStreamHandleImplCFNet.cpp:

(WebCore::SocketStreamHandleImpl::platformSendInternal):

  • platform/network/soup/SocketStreamHandleImplSoup.cpp:

(WebCore::SocketStreamHandleImpl::platformSendInternal):
Returning std::nullopt means there was an error, which is not true when the socket stream
is in a state where it cannot be written to because it is actively communicating.
Returning 0 means 0 new bytes were sent, so we will try again later.

1:23 AM Changeset in webkit [216316] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/LayoutTests/imported/w3c

Merge r215110 - Rebaseline another test after r215096.
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>

Unreviewed test gardening.

  • web-platform-tests/url/url-setters-expected.txt:
1:23 AM Changeset in webkit [216315] by Carlos Garcia Campos
  • 13 edits in releases/WebKitGTK/webkit-2.16/LayoutTests

Merge r215098 - Rebaseline additional tests after r215096.
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>

LayoutTests/imported/w3c:

  • web-platform-tests/cors/allow-headers-expected.txt:
  • web-platform-tests/cors/origin-expected.txt:

LayoutTests:

  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-cross-self-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-cross-in-same-self-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-cross-self-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-nested-same-in-same-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-none-block-expected.txt:
  • http/tests/security/contentSecurityPolicy/1.1/frame-ancestors/frame-ancestors-self-block-expected.txt:
  • http/tests/security/no-popup-from-sandbox-top-expected.txt:
  • http/tests/xmlhttprequest/origin-exact-matching-expected.txt:
1:21 AM Changeset in webkit [216314] by Carlos Garcia Campos
  • 50 edits in releases/WebKitGTK/webkit-2.16

Merge r215096 - WebKit should percent encode single quotes in query strings
https://bugs.webkit.org/show_bug.cgi?id=170561
<rdar://problem/7415154>

Reviewed by Alex Christensen.

Source/WebCore:

Modify the characterClassTable to instruct the URLParser to convert
the single-quote character ' to %27 in URL query strings.

Tests: URLParserTest in TestWebKitAPI.

fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html
fast/frames/xss-auditor-handles-file-urls.html
http/tests/security/xssAuditor

  • platform/URLParser.cpp:

Tools:

Add a test case for single-quote in the URL query string.

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

LayoutTests:

Rebaseline tests after change.

  • fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame-expected.txt:
  • fast/frames/xss-auditor-handles-file-urls-expected.txt:
  • http/tests/security/xssAuditor/base-href-control-char-expected.txt:
  • http/tests/security/xssAuditor/base-href-expected.txt:
  • http/tests/security/xssAuditor/base-href-null-char-expected.txt:
  • http/tests/security/xssAuditor/base-href-scheme-relative-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-control-char-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-javascript-url-expected.txt:
  • http/tests/security/xssAuditor/embed-tag-null-char-expected.txt:
  • http/tests/security/xssAuditor/form-action-expected.txt:
  • http/tests/security/xssAuditor/formaction-on-button-expected.txt:
  • http/tests/security/xssAuditor/formaction-on-input-expected.txt:
  • http/tests/security/xssAuditor/frameset-injection-expected.txt:
  • http/tests/security/xssAuditor/full-block-base-href-expected.txt:
  • http/tests/security/xssAuditor/full-block-link-onclick-expected.txt:
  • http/tests/security/xssAuditor/full-block-object-tag-expected.txt:
  • http/tests/security/xssAuditor/full-block-script-tag-with-source-expected.txt:
  • http/tests/security/xssAuditor/iframe-injection-expected.txt:
  • http/tests/security/xssAuditor/iframe-javascript-url-more-encoding-expected.txt:
  • http/tests/security/xssAuditor/img-onerror-non-ASCII-char-default-encoding-expected.txt:
  • http/tests/security/xssAuditor/img-onerror-non-ASCII-char-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-ampersand-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-control-char-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-entities-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-expected.txt:
  • http/tests/security/xssAuditor/link-onclick-null-char-expected.txt:
  • http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
  • http/tests/security/xssAuditor/object-embed-tag-expected.txt:
  • http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
  • http/tests/security/xssAuditor/object-tag-expected.txt:
  • http/tests/security/xssAuditor/object-tag-javascript-url-expected.txt:
  • http/tests/security/xssAuditor/script-tag-expression-follows-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-16bit-unicode4-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-16bit-unicode5-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-comma-01-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-control-char-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-entities-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-null-char-expected.txt:
  • http/tests/security/xssAuditor/script-tag-with-source-same-host-with-query-expected.txt:
  • http/tests/security/xssAuditor/svg-animate-expected.txt:
  • http/tests/security/xssAuditor/svg-script-tag-expected.txt:
  • http/tests/security/xssAuditor/xss-filter-bypass-big5-expected.txt:
  • http/tests/security/xssAuditor/xss-filter-bypass-sjis-expected.txt:
1:17 AM Changeset in webkit [216313] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebCore

Merge r215089 - AX: Don't crash if no renderer is available for AccessibilityRenderObject
https://bugs.webkit.org/show_bug.cgi?id=170448

Reviewed by Chris Fleizach.

Don't crash or assert if no renderer is available, but early return
gracefully (as in other places in the AccessibilityRenderObject.cpp).
Spotted by running some tests through dogtail.

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::isOffScreen):
(WebCore::AccessibilityRenderObject::isUnvisited):
(WebCore::AccessibilityRenderObject::isVisited):

1:14 AM Changeset in webkit [216312] by Carlos Garcia Campos
  • 7 edits
    2 adds in releases/WebKitGTK/webkit-2.16

Merge r215054 - Simple line layout: Hittest always returns the first renderer in the block.
https://bugs.webkit.org/show_bug.cgi?id=170520
<rdar://problem/30979175>

Reviewed by Antti Koivisto.

Source/WebCore:

This is incorrect now with <br> support (multiple renderers within the same block flow).

Test: fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point.html

  • rendering/RenderText.cpp:

(WebCore::RenderText::positionForPoint): Related fix. We don't yet support positionForPoint with multiple renderes.

  • rendering/SimpleLineLayoutFlowContents.h:

(WebCore::SimpleLineLayout::FlowContents::segmentForRun): Empty runs are all valid.

  • rendering/SimpleLineLayoutFunctions.cpp:

(WebCore::SimpleLineLayout::hitTestFlow):
(WebCore::SimpleLineLayout::collectFlowOverflow):

  • rendering/SimpleLineLayoutResolver.cpp:

(WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): This should eventually return a list of renderes.

  • rendering/SimpleLineLayoutResolver.h:

(WebCore::SimpleLineLayout::RunResolver::flowContents):

LayoutTests:

  • fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point-expected.html: Added.
  • fast/dom/Document/CaretRangeFromPoint/simple-line-layout-hittest-with-caret-range-from-point.html: Added.
1:08 AM Changeset in webkit [216311] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16

Merge r215001 - [GTK] Build fails when using icecream, ccache and cmake 3.6
https://bugs.webkit.org/show_bug.cgi?id=170498

Reviewed by Michael Catanzaro.

Disable ninja response file when using icecream, ccache and cmake > 3.5.

  • Source/cmake/OptionsCommon.cmake:
1:08 AM Changeset in webkit [216310] by Carlos Garcia Campos
  • 2 edits in releases/WebKitGTK/webkit-2.16/Source/WebKit2

Merge r215009 - [GTK] Fix build with MEDIA_CAPTURE enabled
https://bugs.webkit.org/show_bug.cgi?id=170539

Patch by Adrian Perez de Castro <Adrian Perez de Castro> on 2017-04-06
Reviewed by Carlos Garcia Campos.

  • WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMDeprecated.cpp:

(webkit_dom_html_input_element_get_capture): Add missing namespace in usage of WebCore::MediaCaptureTypeNone.

Note: See TracTimeline for information about the timeline view.