Timeline



Jun 12, 2017:

11:59 PM Changeset in webkit [218165] by Carlos Garcia Campos
  • 8 edits
    1 copy in trunk/Source/WebKit2

Add API::GeolocationProvider
https://bugs.webkit.org/show_bug.cgi?id=173150

Reviewed by Alex Christensen.

It will be used by GTK+ port instead of the C API.

  • UIProcess/API/APIGeolocationProvider.h: Added.

(API::GeolocationProvider::~GeolocationProvider):
(API::GeolocationProvider::startUpdating):
(API::GeolocationProvider::stopUpdating):
(API::GeolocationProvider::setEnableHighAccuracy):

  • UIProcess/API/C/WKGeolocationManager.cpp:

(WKGeolocationManagerSetProvider):

  • UIProcess/WebGeolocationManagerProxy.cpp:

(WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
(WebKit::WebGeolocationManagerProxy::setProvider):
(WebKit::WebGeolocationManagerProxy::processPoolDestroyed):
(WebKit::WebGeolocationManagerProxy::startUpdating):
(WebKit::WebGeolocationManagerProxy::removeRequester):
(WebKit::WebGeolocationManagerProxy::setEnableHighAccuracy):

  • UIProcess/WebGeolocationManagerProxy.h:
  • UIProcess/WebGeolocationProvider.cpp:

(WebKit::WebGeolocationProvider::WebGeolocationProvider):
(WebKit::WebGeolocationProvider::startUpdating):
(WebKit::WebGeolocationProvider::stopUpdating):
(WebKit::WebGeolocationProvider::setEnableHighAccuracy):

  • UIProcess/WebGeolocationProvider.h:
  • WebKit2.xcodeproj/project.pbxproj:
11:28 PM Changeset in webkit [218164] by Carlos Garcia Campos
  • 10 edits
    1 add in trunk/Source/WebKit2

Add API::InjectedBundle::PageLoaderClient
https://bugs.webkit.org/show_bug.cgi?id=173265

Reviewed by Alex Christensen.

It will be used by the GTK+ port instead of the C API.

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/InjectedBundle/API/APIInjectedBundlePageLoaderClient.h: Added.

(API::InjectedBundle::PageLoaderClient::willLoadURLRequest):
(API::InjectedBundle::PageLoaderClient::willLoadDataRequest):
(API::InjectedBundle::PageLoaderClient::shouldGoToBackForwardListItem):
(API::InjectedBundle::PageLoaderClient::didStartProvisionalLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::InjectedBundle::PageLoaderClient::didCommitLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFinishDocumentLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFinishLoadForFrame):
(API::InjectedBundle::PageLoaderClient::didFinishProgress):
(API::InjectedBundle::PageLoaderClient::didFailLoadWithErrorForFrame):
(API::InjectedBundle::PageLoaderClient::didSameDocumentNavigationForFrame):
(API::InjectedBundle::PageLoaderClient::didReceiveTitleForFrame):
(API::InjectedBundle::PageLoaderClient::didRemoveFrameFromHierarchy):
(API::InjectedBundle::PageLoaderClient::didDisplayInsecureContentForFrame):
(API::InjectedBundle::PageLoaderClient::didRunInsecureContentForFrame):
(API::InjectedBundle::PageLoaderClient::didDetectXSSForFrame):
(API::InjectedBundle::PageLoaderClient::didFirstLayoutForFrame):
(API::InjectedBundle::PageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(API::InjectedBundle::PageLoaderClient::didLayoutForFrame):
(API::InjectedBundle::PageLoaderClient::didReachLayoutMilestone):
(API::InjectedBundle::PageLoaderClient::didClearWindowObjectForFrame):
(API::InjectedBundle::PageLoaderClient::didCancelClientRedirectForFrame):
(API::InjectedBundle::PageLoaderClient::willPerformClientRedirectForFrame):
(API::InjectedBundle::PageLoaderClient::didHandleOnloadEventsForFrame):
(API::InjectedBundle::PageLoaderClient::globalObjectIsAvailableForFrame):
(API::InjectedBundle::PageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
(API::InjectedBundle::PageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
(API::InjectedBundle::PageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
(API::InjectedBundle::PageLoaderClient::shouldForceUniversalAccessFromLocalURL):
(API::InjectedBundle::PageLoaderClient::featuresUsedInPage):
(API::InjectedBundle::PageLoaderClient::willDestroyFrame):
(API::InjectedBundle::PageLoaderClient::userAgentForURL):
(API::InjectedBundle::PageLoaderClient::layoutMilestones):

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

(WKBundlePageSetPageLoaderClient):

  • WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:

(WebKit::InjectedBundlePageLoaderClient::InjectedBundlePageLoaderClient):
(WebKit::InjectedBundlePageLoaderClient::willLoadURLRequest):
(WebKit::InjectedBundlePageLoaderClient::willLoadDataRequest):
(WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem):
(WebKit::InjectedBundlePageLoaderClient::didStartProvisionalLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::InjectedBundlePageLoaderClient::didCommitLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishDocumentLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishLoadForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFinishProgress):
(WebKit::InjectedBundlePageLoaderClient::didFailLoadWithErrorForFrame):
(WebKit::InjectedBundlePageLoaderClient::didSameDocumentNavigationForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReceiveTitleForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy):
(WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
(WebKit::InjectedBundlePageLoaderClient::didDetectXSSForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFirstLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didLayoutForFrame):
(WebKit::InjectedBundlePageLoaderClient::didReachLayoutMilestone):
(WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
(WebKit::InjectedBundlePageLoaderClient::didCancelClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::willPerformClientRedirectForFrame):
(WebKit::InjectedBundlePageLoaderClient::didHandleOnloadEventsForFrame):
(WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame):
(WebKit::InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject):
(WebKit::InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension):
(WebKit::InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL):
(WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage):
(WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
(WebKit::InjectedBundlePageLoaderClient::layoutMilestones):

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

(WebKit::WebFrameLoaderClient::detachedFromParent2):
(WebKit::WebFrameLoaderClient::dispatchDidDispatchOnloadEvents):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidCancelClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
(WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone):
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
(WebKit::WebFrameLoaderClient::shouldGoToHistoryItem):
(WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
(WebKit::WebFrameLoaderClient::didRunInsecureContent):
(WebKit::WebFrameLoaderClient::didDetectXSS):
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
(WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable):
(WebKit::WebFrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject):
(WebKit::WebFrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject):
(WebKit::WebFrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension):
(WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):

  • WebProcess/WebCoreSupport/WebProgressTrackerClient.cpp:

(WebKit::WebProgressTrackerClient::progressFinished):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::setInjectedBundlePageLoaderClient):
(WebKit::WebPage::close):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::userAgent):
(WebKit::WebPage::reportUsedFeatures):
(WebKit::WebPage::dispatchDidReachLayoutMilestone):

  • WebProcess/WebPage/WebPage.h:

(WebKit::WebPage::injectedBundleLoaderClient):

8:14 PM Changeset in webkit [218163] by mmaxfield@apple.com
  • 3 edits in trunk/Source/WebCore

[iOS] [macOS] Stop soft-linking Core Text function in iOS 11 and macOS High Sierra
https://bugs.webkit.org/show_bug.cgi?id=173289

Reviewed by Lucas Forschler.

No new tests because there is no behavior change.

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::platformFontWithFamilySpecialCase):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformFontWithFamilySpecialCase):

8:10 PM Changeset in webkit [218162] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] skip fast/scrolling/scrolling-tree-includes-frame.html
https://bugs.webkit.org/show_bug.cgi?id=173258

Unreviewed gardening.

GTK doesn't appear to use the scrolling tree, only WK2 Mac and iOS do. Skip it here.

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-12

  • platform/gtk/TestExpectations:
6:35 PM Changeset in webkit [218161] by mmaxfield@apple.com
  • 36 edits
    13 adds in trunk

[Cocoa] Expand system-ui to include every item in the Core Text cascade list
https://bugs.webkit.org/show_bug.cgi?id=173043
<rdar://problem/21125708>

Reviewed by Simon Fraser.

Source/WebCore:

The concept of the system font on Cocoa platforms represents the entire Core Text cascade list.
However, previously, WebKit only represented system-ui by pulling out the first item in the Core
Text cascade list. Instead, we should make all text rendered with "system-ui" match what the
platform would natively render.

Previously, we walked through the strings in the font-family property and looked them up one by
one. However, now we want to abstract this idea of a font family to possibly hold a
CTFontDescriptorRef instead of a string. This way, we expand a font-family list of ["fontA",
"system-ui", "fontB"] to ["fontA", ... a bunch of CTFontDescriptorRefs ..., "FontB"]. We can
then modify the consumer of this object to have two codepaths: the old string-based codepath,
and a new, platform-specific codepath which simply embeds the CTFontDesriptorRefs inside a Font
object.

We don't want to simply pull out the family name from each item in the Core Text fallback list
because that is a lossy translation. There is more information in these font descriptors which
cannot be represented by CSS. Therefore, we must keep the descriptors alive and add the new
codepath for them.

We also don't want to run the CSS font matching algorithm on each member of the Core Text
fallback list because it may yield different results from Core Text's font matching algorithm.
Our goal is to draw text as closely as possible to the system APIs. If we ran it, we may find
a font which is closer to the requested traits, but it would look out of place on the system.

Tests: fast/text/system-font-fallback-emoji.html

fast/text/system-font-fallback.html

  • WebCore.xcodeproj/project.pbxproj:
  • page/MemoryRelease.cpp:

(WebCore::releaseNoncriticalMemory):

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::realizeNextFallback): The consumer of our new data type. Now uses WTF::visit().
(WebCore::FontCascadeFonts::realizeFallbackRangesAt): Now that the number of items to test
against the current character is larger than the number of strings in the font-family list,
we need to update the existing code to use the correct value.

  • platform/graphics/FontDescription.cpp: Default implementation for non-Cocoa ports.

(WebCore::FontDescription::invalidateCaches):
(WebCore::FontCascadeDescription::effectiveFamilyCount):
(WebCore::FontCascadeDescription::effectiveFamilyAt):

  • platform/graphics/FontDescription.h: Our new data type is a Variant of AtomicString and a

platform-specific class. Cocoa uses a class that holds a CTFontDescriptorRef and other ports
use an empty non-constructable class.

  • platform/graphics/FontFamilySpecificationNull.h: Added. The empty non-constructable

class.
(WebCore::FontFamilySpecificationNull::fontRanges):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::platformInit): Changing the system language will change the system font
fallback list, so we need to listen to this notification. This also matters for
FontCache::systemFallbackForCharacters(), so we should build off the same callback we are
already using for font installation.
(WebCore::invalidateFontCache):

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp: Added. The platform-specific creation of

our CTFontDescriptorRefs. We hold them cached in a SystemFontDatabase.
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator==):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash):
(WebCore::SystemFontDatabase::singleton):
(WebCore::SystemFontDatabase::systemFontCascadeList):
(WebCore::SystemFontDatabase::clear):
(WebCore::SystemFontDatabase::SystemFontDatabase):
(WebCore::SystemFontDatabase::applyWeightAndItalics):
(WebCore::SystemFontDatabase::removeCascadeList):
(WebCore::SystemFontDatabase::computeCascadeList):
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::hash):
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::equal):
(WebCore::isSystemFontString):
(WebCore::systemFontParameters):
(WebCore::FontDescription::invalidateCaches):
(WebCore::FontCascadeDescription::effectiveFamilyCount): We don't store the result of this
because it would probably be a bad idea to increase the size of every single FontCascade just
in case it might ask for the system font. Most fonts never mention system-ui. Because it's so
rare, we can just recalculate the result of this as necessary. This shouldn't be slow because
the results are cached.
(WebCore::FontCascadeDescription::effectiveFamilyAt):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: Added.

(WebCore::FontFamilySpecificationCoreText::fontRanges): Create a FontRanges from a
CTFontDescriptorRef.

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.h: Added.

(WebCore::FontFamilySpecificationCoreText::FontFamilySpecificationCoreText):

  • platform/graphics/ios/FontCacheIOS.mm: Delete the old handling for system-ui.

(WebCore::platformFontWithFamilySpecialCase):
(WebCore::baseSystemFontDescriptor): Deleted.
(WebCore::systemFontModificationAttributes): Deleted.
(WebCore::systemFontDescriptor): Deleted.

  • platform/graphics/mac/FontCacheMac.mm: Ditto.

(WebCore::platformFontWithFamilySpecialCase):
(WebCore::toNSFontWeight): Deleted.

LayoutTests:

Rebaseline tests which use non-English text in form controls

  • fast/text/system-font-fallback-emoji-expected.txt: Added.
  • fast/text/system-font-fallback-emoji.html: Added.
  • fast/text/system-font-fallback-expected.html: Added.
  • fast/text/system-font-fallback.html: Added.
  • platform/mac-elcapitan/fast/forms/listbox-bidi-align-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/listbox-bidi-align-expected.txt:
  • platform/mac-elcapitan/fast/forms/search-rtl-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/search-rtl-expected.txt:
  • platform/mac-elcapitan/fast/forms/searchfield-heights-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/searchfield-heights-expected.txt:
  • platform/mac-elcapitan/fast/forms/visual-hebrew-text-field-expected.txt:
  • platform/mac-elcapitan/fast/text/drawBidiText-expected.png: Added.
  • platform/mac-elcapitan/fast/text/drawBidiText-expected.txt:
  • platform/mac-elcapitan/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png: Added.
  • platform/mac-elcapitan/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/mac/TestExpectations:
  • platform/mac/fast/css/rtl-ordering-expected.png:
  • platform/mac/fast/css/rtl-ordering-expected.txt:
  • platform/mac/fast/forms/listbox-bidi-align-expected.png:
  • platform/mac/fast/forms/listbox-bidi-align-expected.txt:
  • platform/mac/fast/forms/listbox-hit-test-zoomed-expected.png:
  • platform/mac/fast/forms/listbox-hit-test-zoomed-expected.txt:
  • platform/mac/fast/forms/search-rtl-expected.png:
  • platform/mac/fast/forms/search-rtl-expected.txt:
  • platform/mac/fast/forms/searchfield-heights-expected.txt:
  • platform/mac/fast/forms/select-visual-hebrew-expected.png:
  • platform/mac/fast/forms/select-visual-hebrew-expected.txt:
  • platform/mac/fast/forms/visual-hebrew-text-field-expected.png:
  • platform/mac/fast/forms/visual-hebrew-text-field-expected.txt:
  • platform/mac/fast/text/drawBidiText-expected.png:
  • platform/mac/fast/text/drawBidiText-expected.txt:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/mac/fast/text/updateNewFont-expected.png:
  • platform/mac/fast/text/updateNewFont-expected.txt:
6:28 PM Changeset in webkit [218160] by commit-queue@webkit.org
  • 7 edits
    1 add in trunk/Source

Remove WebCore::unloadModule and related data types
https://bugs.webkit.org/show_bug.cgi?id=173231

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-12
Reviewed by Darin Adler.

Source/WebCore:

  • platform/FileSystem.h:

(WebCore::PlatformModuleVersion::PlatformModuleVersion): Deleted.

  • platform/glib/FileSystemGlib.cpp:

(WebCore::unloadModule): Deleted.

  • platform/win/FileSystemWin.cpp:

(WebCore::unloadModule): Deleted.

Source/WebKit/win:

  • Plugins/PlatformModule.h: Added.

(WebCore::PlatformModuleVersion::PlatformModuleVersion):

  • Plugins/PluginPackage.cpp:

(WebCore::PluginPackage::freeLibraryTimerFired):

  • Plugins/PluginPackage.h:
5:34 PM Changeset in webkit [218159] by Devin Rousso
  • 6 edits
    1 add in trunk/Source/WebInspectorUI

Web Inspector: Add grid to images to clarify transparency and image size
https://bugs.webkit.org/show_bug.cgi?id=173184

Reviewed by Matt Baker.

  • Localizations/en.lproj/localizedStrings.js:
  • UserInterface/Base/Setting.js:

Add setting for controlling the image grid.

  • UserInterface/Images/NavigationItemCheckers.svg: Added.
  • UserInterface/Views/ImageResourceContentView.css:

(.content-view.resource.image):
(.content-view.resource.image img):
Replace the border spacing around the image with padding on the container. This is required
because a border will extend the area that is effected by background-image, meaning that
the checkerboard would appear in that area as well, giving misleading information as to the
size of the image.

  • UserInterface/Views/ImageResourceContentView.js:

(WebInspector.ImageResourceContentView):
(WebInspector.ImageResourceContentView.prototype.get navigationItems): Added.
(WebInspector.ImageResourceContentView.prototype.contentAvailable):
(WebInspector.ImageResourceContentView.prototype.shown): Added.
(WebInspector.ImageResourceContentView.prototype._toggleImageGrid): Added.
(WebInspector.ImageResourceContentView.prototype._showGridButtonClicked): Added.
(WebInspector.ImageResourceContentView.prototype.get imageElement): Deleted.
Apply the CSS class for showing the grid when the added navigation item is activated.

  • UserInterface/Views/Main.css:

(img.show-grid):
Generates a checkerboard pattern via background-image using the following process:

  • four linear-gradients are drawn, one in each corner
  • each draws one half of a 20x20 square, specified by background-size
  • they are then repositioned using background-position so that the two halfs align

+------+ \--2
|1 /\ 2| |\ |
| / \ | => | \|
|/ \| => 4--\
|\ /| => 1--/
| \ / | => | /|
|4 \/ 3| |/ |
+------+ /--3

5:10 PM Changeset in webkit [218158] by Matt Lewis
  • 3 edits in trunk/Source/WebCore

Unreviewed build fix; fix a misspelling in CoreMediaSoftLink.{h,cpp}.

Patch by Jer Noble <jer.noble@apple.com> on 2017-06-12

  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:
5:05 PM Changeset in webkit [218157] by mmaxfield@apple.com
  • 4 edits
    3 adds in trunk

@font-face rules with invalid primary fonts never download their secondary fonts
https://bugs.webkit.org/show_bug.cgi?id=173138
<rdar://problem/32554450>

Reviewed by Simon Fraser.

Source/WebCore:

We have logic in CSSFontAccessor::font() which disallows downloading a CSSFontFace if that CSSFontFace
is already in the Succeeded state. However, it was possible for a succeeded CSSFontFace to still fail
to create a font. In this situation, we wouldn't be able to use the downloaded font, and we wouldn't
try to download the next item in the src: list because the CSSFontFace is succeeded.

This patch strengthens the meaning of the Succeeded state. Previously, it just meant that the bytes
in the file were downloaded successfully. This patch extends this to also mean that the bytes in the
file can be successfully interpreted as a font. This way, the CSSFontFace in the example above won't be
set to the Succeeded state, so we will continue follow the src: list and download the secondary fonts.

This has an added benefit that the CSS Font Loading API's promises will be called more appropriately.
The transition to the Succeeded state will trigger a resolve of the promise. Now, these promises will
only be resolved if the fonts are actually parsed and understood by our text system.

Test: fast/text/font-fallback-invalid-load.html

  • css/CSSFontFaceSource.cpp:

(WebCore::CSSFontFaceSource::fontLoaded): Move to the failed state if we can't understand the font
data. This is the crux of this patch.
(WebCore::CSSFontFaceSource::font): This function should only be called if we are in the Succeeded
state, which means now we know we should always be able to understand the bytes of the file. Therefore,
we can change some if statements into ASSERT()s.

  • loader/cache/CachedSVGFont.cpp:

(WebCore::CachedSVGFont::createFont): Ditto.
(WebCore::CachedSVGFont::platformDataFromCustomData): Similarly to CSSFontFaceSource::fontLoaded(), this
adds another check to our criteria for transitioning into the Succeeded state, which will guarantee that
later we will always be able to create the font object.

LayoutTests:

  • fast/text/font-fallback-invalid-load-expected.html: Added.
  • fast/text/font-fallback-invalid-load.html: Added.
  • fast/text/resources/bogus.svg: Added.
5:04 PM Changeset in webkit [218156] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25.2

Tag Safari-604.1.25.2.

4:55 PM Changeset in webkit [218155] by dbates@webkit.org
  • 5 edits
    25 adds in trunk/LayoutTests

Implement W3C Secure Contexts Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/26012994>

Reviewed by Ryosuke Niwa.

Part 3

LayoutTests/imported/w3c:

Import the Secure Contexts Web Platform Tests.

  • resources/import-expectations.json:
  • resources/resource-files.json:
  • web-platform-tests/secure-contexts/basic-dedicated-worker.html: Added.
  • web-platform-tests/secure-contexts/basic-dedicated-worker.https.html: Added.
  • web-platform-tests/secure-contexts/basic-popup-and-iframe-tests-expected.txt: Added.
  • web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.html: Added.
  • web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https-expected.txt: Added.
  • web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.html: Added.
  • web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.https.js: Added.

(LoadType):
(LoadTarget):
(LoadTarget.prototype.open):
(LoadTarget.prototype.close):
(LoadTarget.prototype.load_and_get_result_for):
(run_next_test.):
(run_next_test):
(begin):

  • web-platform-tests/secure-contexts/basic-shared-worker.html: Added.
  • web-platform-tests/secure-contexts/basic-shared-worker.https.html: Added.
  • web-platform-tests/secure-contexts/postMessage-helper.html: Added.
  • web-platform-tests/secure-contexts/postMessage-helper.https.html: Added.
  • web-platform-tests/secure-contexts/server-locations.sub.js: Added.
  • web-platform-tests/secure-contexts/shared-worker-insecure-first.https.html: Added.
  • web-platform-tests/secure-contexts/shared-worker-secure-first.https.html: Added.
  • web-platform-tests/secure-contexts/support/dedicated-worker-script.js: Added.
  • web-platform-tests/secure-contexts/support/https-subframe-dedicated.html: Added.
  • web-platform-tests/secure-contexts/support/https-subframe-shared.html: Added.
  • web-platform-tests/secure-contexts/support/parent-dedicated-worker-script.js: Added.

(w.onmessage):

  • web-platform-tests/secure-contexts/support/parent-shared-worker-script.js: Added.

(w.onmessage):

  • web-platform-tests/secure-contexts/support/shared-worker-insecure-popup.html: Added.
  • web-platform-tests/secure-contexts/support/shared-worker-script.js: Added.
  • web-platform-tests/secure-contexts/support/w3c-import.log: Added.
  • web-platform-tests/secure-contexts/w3c-import.log: Added.

LayoutTests:

Skip tests that exercise Shared Workers as WebKit does not support them. With the exception
of web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.html all other tests are
skipped because they time out. The following sub-tests in web-platform-tests/secure-contexts/basic-popup-and-iframe-tests.html
are expected to fail:

  • "Test Window.isSecureContext for HTTP creator"

Reason: Sub-test must be run from non-localhost server

  • "Test Window.isSecureContext in an iframe loading an http"

Reason: Sub-test must be run from non-localhost server

  • "Test Window.isSecureContext in a sandboxed iframe loading an http"

Reason: We do not implement the allow-secure-context flag

  • "Test Window.isSecureContext in a popup loading about:blank"

Reason: Times out; further investigation needed.

We will investigate the test failures and fix them in subsequent commits.

4:52 PM Changeset in webkit [218154] by dbates@webkit.org
  • 2 edits in trunk/Tools

Add unit tests for SecurityOrigin::IsPotentiallyTrustworthy()
https://bugs.webkit.org/show_bug.cgi?id=173286
<rdar://problem/32726102>

Reviewed by Brent Fulgham.

  • TestWebKitAPI/Tests/WebCore/SecurityOrigin.cpp:

(TestWebKitAPI::TEST_F):

4:39 PM Changeset in webkit [218153] by Chris Dumez
  • 3 edits
    2 adds in trunk

Add Arabic Kasra to list of blacklisted characters when puny-decoding URL
https://bugs.webkit.org/show_bug.cgi?id=173283
<rdar://problem/32725659>

Reviewed by Brent Fulgham.

Source/WebCore:

Add Arabic Kasra to list of blacklisted characters when puny-decoding URL as
it is almost invisible in the URL bar.

Test: fast/url/user-visible/arabic_kasra.html

  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::isLookalikeCharacter):

LayoutTests:

Add layout test coverage.

  • fast/url/user-visible/arabic_kasra-expected.txt: Added.
  • fast/url/user-visible/arabic_kasra.html: Added.
4:29 PM Changeset in webkit [218152] by Lucas Forschler
  • 7 edits
    1 add
    3 deletes in trunk

<rdar://problem/32683422>
Tools:

Teach copy-webkitlibraries-to-product-directory script about updated libraries.

Reviewed by Conrad Schultz.

  • Scripts/copy-webkitlibraries-to-product-directory:

WebKitLibraries:


Update existing WebKitSystemInterface libraries.
Add macOS 10.13 libraries.
Remove macOS 10.10 libraries.
Remove iOS 10.9 libraries.

Reviewed by Conrad Schultz.

  • libWebKitSystemInterfaceElCapitan.a:
  • libWebKitSystemInterfaceIOSDevice10.a:
  • libWebKitSystemInterfaceIOSDevice9.a: Removed.
  • libWebKitSystemInterfaceIOSSimulator10.a:
  • libWebKitSystemInterfaceIOSSimulator9.a: Removed.
  • libWebKitSystemInterfaceOSX10.12.a:
  • libWebKitSystemInterfaceOSX10.13.a: Added.
  • libWebKitSystemInterfaceYosemite.a: Removed.
4:01 PM Changeset in webkit [218151] by jer.noble@apple.com
  • 5 edits
    1 add in trunk/Source

Screen sleeps while doing WebRTC video
https://bugs.webkit.org/show_bug.cgi?id=173278

Reviewed by Eric Carlson.

Source/WebCore:

HTMLMediaElement triggers changing the sleep disabler token when the media engine
says that its rate has changed; the MediaPlayerPrivateMediaStreamAVFObjC needs to
notify its client (the HTMLMediaElement) that the rate has changed when the stream
is played or paused.

Drive-by fix: Don't set a sleep disabler token (i.e., allow the system and display
to sleep) if the stream is strictly local-capture.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::shouldDisableSleep):

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

(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause):

Source/WTF:

Drive-by fix: add some generic methods for iterating over collections.

  • WTF.xcodeproj/project.pbxproj:
  • wtf/Algorithms.h: Added.

(WTF::forEach):
(WTF::anyOf):
(WTF::allOf):

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

Seeking an MSE video will begin playing audio long before rendering video
https://bugs.webkit.org/show_bug.cgi?id=173269

Reviewed by Eric Carlson.

Add a notification listener which will be messaged when a to-be-displayed sample
is decoded to signal that the 'seeked' event should fire. Consolidate all the various
flush methods to funnel into a single flushVideo().

  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:
  • platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
  • platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:

(-[WebBufferConsumedContext initWithParent:buffer:]):
(-[WebBufferConsumedContext dealloc]):
(-[WebBufferConsumedContext parent]):
(-[WebBufferConsumedContext buffer]):
(WebCore::bufferWasConsumedCallback):
(WebCore::SourceBufferPrivateAVFObjC::SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
(WebCore::SourceBufferPrivateAVFObjC::flush):
(WebCore::SourceBufferPrivateAVFObjC::flushVideo):
(WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
(WebCore::SourceBufferPrivateAVFObjC::bufferWasConsumed):
(WebCore::SourceBufferPrivateAVFObjC::willSeek):

3:48 PM Changeset in webkit [218149] by Simon Fraser
  • 5 edits in trunk/Source/WebKit2

[iOS WK2] Peeking on an image could result in a preview at the wrong size
https://bugs.webkit.org/show_bug.cgi?id=173274
rdar://problem/30404627

Reviewed by Tim Horton.

There were a couple of issues with the way the page scale is communicated between the web process
and the UI process.

Generally, the page scale is computed by the web process, and sent to the UI process via
layer tree commits. UI-side scale is them communicated back to the web process via visibleContentRect
updates. When receiving a new scale, WebPage has a "scale was set by the UI process" flag to handle
the case where user interaction overrides the viewport-computed page scale. However, this flag would
get set erroneously in a couple of situations.

First, during page loading, layer flushing is suspended temporarily, so web process scale changes never
make it to the UI process. In that scenario, the UI process could send an old scale back to the web process,
setting the "scale was set by the UI process" when it really wasn't.

Secondly, web -> UI layer commit messages, and UI -> web updateVisibleContentRect messages can be in flight at the
same time, again causing a stale scale to reach the web process.

Fix this by only setting the "scale was set by the UI process" when we know the UI scale should be in sync, by comparing
commit IDs of sent and received scales.

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

(WebKit::WebPage::scaleFromUIProcess):
(WebKit::WebPage::updateVisibleContentRects):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:

(WebKit::RemoteLayerTreeDrawingArea::lastCommittedTransactionID):

3:41 PM Changeset in webkit [218148] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

[MediaStream iOS] Set audio session mode and options when capturing
https://bugs.webkit.org/show_bug.cgi?id=173276
<rdar://problem/32059254>

Reviewed by Jer Noble.

  • platform/audio/ios/AudioSessionIOS.mm:

(WebCore::AudioSession::setCategory): Set mode and options so the default output is to the speaker,
and so audio will be routed to bluetooth when appropriate.

3:39 PM Changeset in webkit [218147] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

Remove watchdog timer from WebVideoFullscreenInterfaceAVKit
https://bugs.webkit.org/show_bug.cgi?id=173272
rdar://problem/32260378

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-12
Reviewed by Jer Noble.

No new tests because no effect on DOM.

WebVideoFullscreenInterfaceAVKit's watchdog attempts to clean-up fullscreen if the page becomes unresponsive.
However, it is just calling exitfullscreen(), which initiates the animation, but leaves the fullscreen window
in place and doesn't initiate cleanup. This leaves the browser in an unusable state since all events will still
be captured by the fullscren window.

This change uses the same method of hiding fullscreen window as switching tabs does. This will
hide the fullscreen winodw and controller, leaving the browser available for interaction, and the page
can take its time to properly cleanup the fullscreen window while hidden.

  • platform/ios/WebVideoFullscreenInterfaceAVKit.mm:

(WebVideoFullscreenInterfaceAVKit::watchdogTimerFired):

3:37 PM Changeset in webkit [218146] by achristensen@apple.com
  • 10 edits in trunk/Source

Modernize UserScript.h
https://bugs.webkit.org/show_bug.cgi?id=173273

Reviewed by Tim Horton.

Source/WebCore:

No change in behavior. Moved encoders to UserScript.h. Use more Rvalues.

  • page/UserScript.h:

(WebCore::UserScript::UserScript):
(WebCore::UserScript::encode):
(WebCore::UserScript::decode):

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<UserScript>::encode): Deleted.
(IPC::ArgumentCoder<UserScript>::decode): Deleted.

  • Shared/WebCoreArgumentCoders.h:
  • UIProcess/API/C/WKPageGroup.cpp:

(WKPageGroupAddUserScript):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::addUserScript):

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

(WebKit::WebPage::addUserScript):

  • WebProcess/WebPage/WebPage.h:
3:37 PM Changeset in webkit [218145] by commit-queue@webkit.org
  • 11 edits in trunk

AX: Video/Audio Player Controls missing group container.
https://bugs.webkit.org/show_bug.cgi?id=171790
<rdar://problem/32008994>

Patch by Aaron Chu <aaron_chu@apple.com> on 2017-06-12
Reviewed by Antoine Quint.

Source/WebCore:

Added aria-label to group controls in media controls.

  • English.lproj/modern-media-controls-localized-strings.js:
  • Modules/modern-media-controls/controls/controls-bar.js:
  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls):
(InlineMediaControls.prototype.set shouldUseAudioLayout):
(InlineMediaControls.prototype._updateBottomControlsBarLabel):

LayoutTests:

Modified existing test cases to accommodate testing for controls bar aria-label.

  • media/modern-media-controls/audio/audio-controls-buttons-expected.txt:
  • media/modern-media-controls/audio/audio-controls-buttons.html:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor-expected.txt:
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-constructor.html:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt:
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html:
3:28 PM Changeset in webkit [218144] by timothy_horton@apple.com
  • 7 edits
    1 add in trunk

[iOS] Cmd-C doesn't copy text from WKWebView
https://bugs.webkit.org/show_bug.cgi?id=173277
<rdar://problem/32396742>

Reviewed by Dan Bernstein.

  • UIProcess/API/Cocoa/WKWebView.mm:
  • UIProcess/API/Cocoa/WKWebViewInternal.h:
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _lookupForWebView:]):
(-[WKContentView _shareForWebView:]):
(-[WKContentView _addShortcutForWebView:]):
(-[WKContentView _promptForReplaceForWebView:]):
(-[WKContentView _transliterateChineseForWebView:]):
(-[WKContentView _reanalyzeForWebView:]):
(-[WKContentView replaceForWebView:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView copyForWebView:]):
(-[WKContentView cutForWebView:]):
(-[WKContentView pasteForWebView:]):
(-[WKContentView selectForWebView:]):
(-[WKContentView selectAllForWebView:]):
(-[WKContentView toggleBoldfaceForWebView:]):
(-[WKContentView toggleItalicsForWebView:]):
(-[WKContentView toggleUnderlineForWebView:]):
(-[WKContentView _showTextStyleOptionsForWebView:]):
(-[WKContentView _defineForWebView:]):
(-[WKContentView _arrowKeyForWebView:]):
(-[WKContentView _lookup:]): Deleted.
(-[WKContentView _share:]): Deleted.
(-[WKContentView _addShortcut:]): Deleted.
(-[WKContentView _promptForReplace:]): Deleted.
(-[WKContentView _transliterateChinese:]): Deleted.
(-[WKContentView _reanalyze:]): Deleted.
(-[WKContentView replace:]): Deleted.
(-[WKContentView copy:]): Deleted.
(-[WKContentView cut:]): Deleted.
(-[WKContentView paste:]): Deleted.
(-[WKContentView select:]): Deleted.
(-[WKContentView selectAll:]): Deleted.
(-[WKContentView toggleBoldface:]): Deleted.
(-[WKContentView toggleItalics:]): Deleted.
(-[WKContentView toggleUnderline:]): Deleted.
(-[WKContentView _showTextStyleOptions:]): Deleted.
(-[WKContentView _define:]): Deleted.
(-[WKContentView _arrowKey:]): Deleted.
Similar to what r211897 did for canPerformAction, and other patches
have done for other selectors, forward methods for standard editing
commands from WKContentView up to WKWebView, and back down to WKContentView.

This is necessary because these are not treated as normal
responder-chain-respecting methods, so they do not bubble up the view tree.

In 211897, WKContentView (who is usually first responder and thus receives
the actions) stopped claiming to be able to perform these actions, depending
on this non-existent bubbling behavior to keep them working.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • Tests/WebKit2Cocoa/WKContentViewEditingActions.mm:

Add a test ensuring that -copy on WKContentView will cause text to be copied.

3:18 PM Changeset in webkit [218143] by matthew_hanson@apple.com
  • 19 edits in tags/Safari-604.1.25/Source

Revert r218112 and r218115..r218120.

This effectively resets the tag to r218032.

3:09 PM Changeset in webkit [218142] by commit-queue@webkit.org
  • 3 edits
    1 add in trunk/Source/WebCore

[Curl] Use SynchronousLoaderClient for platformLoadResourceSynchronously on WinCairo
https://bugs.webkit.org/show_bug.cgi?id=173195

Patch by Basuke Suzuki <Basuke Suzuki> on 2017-06-12
Reviewed by Alex Christensen.

  • PlatformWinCairo.cmake:
  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/curl/SynchronousLoaderClientCurl.cpp: Added.

(WebCore::SynchronousLoaderClient::didReceiveAuthenticationChallenge):
(WebCore::SynchronousLoaderClient::platformBadResponseError):

3:07 PM Changeset in webkit [218141] by sbarati@apple.com
  • 2 edits in trunk/JSTests

Update test262 test expectation since r218082 makes new tests pass.

  • test262.yaml:
2:56 PM Changeset in webkit [218140] by eric.carlson@apple.com
  • 13 edits in trunk/Source/WebCore

[MediaStream iOS] If a capturing tab is muted while it is in the background, it can not be unmuted
https://bugs.webkit.org/show_bug.cgi?id=173268
<rdar://problem/32259809>

Reviewed by Jer Noble.

No new tests, tested manually.

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::startProducingData): Mute the private stream if page capture is muted.
(WebCore::MediaStream::mediaState): Set new interrupted state.

  • dom/Document.cpp:

(WebCore::Document::notifyMediaCaptureOfVisibilityChanged): Don't track "muted for visibility"
state, let the source center deal with it.

  • dom/Document.h:
  • page/MediaProducer.h: Add bits for interrupted audio and video capture.
  • platform/mediastream/RealtimeMediaSource.cpp:

(WebCore::RealtimeMediaSource::RealtimeMediaSource): Drive-by fix: delete m_suppressNotifications,
it isn't used.
(WebCore::RealtimeMediaSource::setInterrupted): New. Mute capture when an interruption begins,
and unmute when it ends in an unmuted page.
(WebCore::RealtimeMediaSource::setMuted): Do not unmute if interrupted.
(WebCore::RealtimeMediaSource::settingsDidChange): Don't check m_suppressNotifications, it is
never set.

  • platform/mediastream/RealtimeMediaSource.h:
  • platform/mediastream/RealtimeMediaSourceCenter.cpp:

(WebCore::RealtimeMediaSourceCenter::setVideoCapturePageState): Renamed from
setVideoCaptureMutedForPageVisibility.
(WebCore::RealtimeMediaSourceCenter::setVideoCaptureMutedForPageVisibility): Deleted.

  • platform/mediastream/RealtimeMediaSourceCenter.h:
  • platform/mediastream/mac/AVMediaCaptureSource.h:
  • platform/mediastream/mac/AVMediaCaptureSource.mm:

(WebCore::AVMediaCaptureSource::stopProducingData): Clear m_interruption because the session
has been deleted, so we will never get an "end interruption" notification.
(WebCore::AVMediaCaptureSource::captureSessionIsRunningDidChange): Don't return early if
the muted state needs to be updated.
(WebCore::AVMediaCaptureSource::captureSessionEndInterruption): Return early if the session
has been cleared.
(WebCore::AVMediaCaptureSource::interrupted): New.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSourceFactory::setVideoCapturePageState): Renamed from
setVideoCaptureMutedForPageVisibility.
(WebCore::AVVideoCaptureSourceFactory::setVideoCaptureMutedForPageVisibility): Deleted.

  • platform/mock/MockRealtimeVideoSource.cpp:

(WebCore::MockRealtimeVideoSourceFactory::setVideoCapturePageState): Ditto.
(WebCore::MockRealtimeVideoSourceFactory::setVideoCaptureMutedForPageVisibility): Deleted.

2:35 PM Changeset in webkit [218139] by Jonathan Bedard
  • 6 edits
    1 copy
    1 delete in trunk/LayoutTests

Garden tests for on-device testing

Unreviewed test gardening.

The tests gardened here have not been investigated. https://bugs.webkit.org/show_bug.cgi?id=173275
tracks the investigation of the tests marked as failing, crashing or skipped because they timeout
when running layout tests on-device in this revision.

  • platform/ios-device/TestExpectations: Initial gardening of expectations for on-device testing.
  • platform/ios-simulator-wk2/TestExpectations: Moved simulator specific expectations from platfrom/ios-wk2.
  • platform/ios-simulator/TestExpectations: Moved simulator specific expectations from platfrom/ios.
  • platform/ios-simulator/compositing: Removed.
  • platform/ios-wk2/TestExpectations: Moved simulator specific expectation to platform/ios-simulator-wk2.
  • platform/ios/TestExpectations: Moved simulator specific expectation to platform/ios.
  • platform/ios/compositing/iframes/compositing-for-scrollable-iframe-expected.txt: Copied from

LayoutTests/platform/ios-simulator/compositing/iframes/compositing-for-scrollable-iframe-expected.txt.

2:31 PM Changeset in webkit [218138] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Null dereference under WebProcessPool::pageRemovedFromProcess()
https://bugs.webkit.org/show_bug.cgi?id=173271
<rdar://problem/32038814>

Reviewed by Ryosuke Niwa.

Null-check networkProcess() before dereferencing it in WebProcessPool::pageRemovedFromProcess().
This is the only place in this class where we failed to null check before dereferencing
networkProcess(). To my knowledge, there is no guarantee there is a network process.

  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::pageRemovedFromProcess):

2:01 PM Changeset in webkit [218137] by sbarati@apple.com
  • 9 edits
    1 add in trunk

We should not claim that SpecEmpty is filtered out of cell checks on 64 bit platforms
https://bugs.webkit.org/show_bug.cgi?id=172957
<rdar://problem/32602704>

Reviewed by Filip Pizlo.

JSTests:

  • stress/spec-empty-flows-through-cell-checks.js: Added.

(A):
(B):
(i.catch):

Source/JavaScriptCore:

Consider this program:
`
block#1:
n: GetClosureVar(..., |this|) this will load empty JSValue()
SetLocal(Cell:@n, locFoo)
Cell check succeeds because JSValue() looks like a cell
Branch(#2, #3)

Block#3:
x: GetLocal(locFoo)
y: CheckNotEmpty(@x)
`

If we claim that a cell check filters out the empty value, we will
incorrectly eliminate the CheckNotEmpty node @y. This patch fixes AI,
FTLLowerDFGToB3, and DFGSpeculativeJIT to no longer make this claim.

On 64 bit platforms:

  • Cell use kind *now allows* the empty value to pass through.
  • CellOrOther use kind *now allows* for the empty value to pass through
  • NotCell use kind *no longer allows* the empty value to pass through.
  • assembler/CPU.h:

(JSC::isARMv7IDIVSupported):
(JSC::isARM64):
(JSC::isX86):
(JSC::isX86_64):
(JSC::is64Bit):
(JSC::is32Bit):
(JSC::isMIPS):
Make these functions constexpr so we can use them in static variable assignment.

  • bytecode/SpeculatedType.h:
  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileValueToInt32):
(JSC::DFG::SpeculativeJIT::compileDoubleRep):
(JSC::DFG::SpeculativeJIT::compileLogicalNotStringOrOther):
(JSC::DFG::SpeculativeJIT::emitStringOrOtherBranch):
(JSC::DFG::SpeculativeJIT::speculateCell):
(JSC::DFG::SpeculativeJIT::speculateCellOrOther):
(JSC::DFG::SpeculativeJIT::speculateObjectOrOther):
(JSC::DFG::SpeculativeJIT::speculateString):
(JSC::DFG::SpeculativeJIT::speculateStringOrOther):
(JSC::DFG::SpeculativeJIT::speculateSymbol):
(JSC::DFG::SpeculativeJIT::speculateNotCell):

  • dfg/DFGSpeculativeJIT32_64.cpp:
  • dfg/DFGSpeculativeJIT64.cpp:

(JSC::DFG::SpeculativeJIT::fillSpeculateCell):
(JSC::DFG::SpeculativeJIT::compileObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compilePeepHoleObjectToObjectOrOtherEquality):
(JSC::DFG::SpeculativeJIT::compileObjectOrOtherLogicalNot):
(JSC::DFG::SpeculativeJIT::emitObjectOrOtherBranch):

  • dfg/DFGUseKind.h:

(JSC::DFG::typeFilterFor):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileDoubleRep):
(JSC::FTL::DFG::LowerDFGToB3::numberOrNotCellToInt32):
(JSC::FTL::DFG::LowerDFGToB3::compareEqObjectOrOtherToObject):
(JSC::FTL::DFG::LowerDFGToB3::boolify):
(JSC::FTL::DFG::LowerDFGToB3::equalNullOrUndefined):
(JSC::FTL::DFG::LowerDFGToB3::lowCell):
(JSC::FTL::DFG::LowerDFGToB3::lowNotCell):
(JSC::FTL::DFG::LowerDFGToB3::isCellOrMisc):
(JSC::FTL::DFG::LowerDFGToB3::isNotCellOrMisc):
(JSC::FTL::DFG::LowerDFGToB3::isNotCell):
(JSC::FTL::DFG::LowerDFGToB3::isCell):
(JSC::FTL::DFG::LowerDFGToB3::speculateCellOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateObjectOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateString):
(JSC::FTL::DFG::LowerDFGToB3::speculateStringOrOther):
(JSC::FTL::DFG::LowerDFGToB3::speculateSymbol):

1:52 PM Changeset in webkit [218136] by matthew_hanson@apple.com
  • 5 edits in branches/safari-604.1.25-branch/Source

Cherry-pick r218068. rdar://problem/32686871

1:52 PM Changeset in webkit [218135] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1.25-branch/Source/WebKit2

Cherry-pick r218022. rdar://problem/32598919

1:52 PM Changeset in webkit [218134] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1.25-branch/Source/WebKit2

Cherry-pick r218011. rdar://problem/32679311

1:52 PM Changeset in webkit [218133] by matthew_hanson@apple.com
  • 2 edits in branches/safari-604.1.25-branch/Source/WebKit2

Cherry-pick r218006. rdar://problem/32598919

1:52 PM Changeset in webkit [218132] by matthew_hanson@apple.com
  • 4 edits in branches/safari-604.1.25-branch/Source/WebKit2

Cherry-pick r218002. rdar://problem/32679311

1:52 PM Changeset in webkit [218131] by matthew_hanson@apple.com
  • 4 edits in branches/safari-604.1.25-branch/Source/WebKit2

Cherry-pick r217991. rdar://problem/32594952

1:52 PM Changeset in webkit [218130] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1.25-branch/Source

Versioning.

1:27 PM Changeset in webkit [218129] by jiewen_tan@apple.com
  • 18 edits in trunk

[WebCrypto] Remove experimental feature flag of SubtleCrypto
https://bugs.webkit.org/show_bug.cgi?id=173197
<rdar://problem/32688148>

Reviewed by Brent Fulgham.

Source/WebCore:

The SubtleCrypto implementation is no longer experimental and is ready for production use. We are therefore removing the runtime flag.

No tests.

  • page/Crypto.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setSubtleCryptoEnabled): Deleted.
(WebCore::RuntimeEnabledFeatures::subtleCryptoEnabled): Deleted.

Source/WebKit/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):
(-[WebPreferences subtleCryptoEnabled]): Deleted.
(-[WebPreferences setSubtleCryptoEnabled:]): Deleted.

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

(-[WebView _preferencesChanged:]):

Source/WebKit2:

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/C/WKPreferences.cpp:

(WKPreferencesSetSubtleCryptoEnabled): Deleted.
(WKPreferencesGetSubtleCryptoEnabled): Deleted.

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

(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Tools:

  • DumpRenderTree/mac/DumpRenderTree.mm:

(enableExperimentalFeatures):

  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::beginTesting):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setSubtleCryptoEnabled): Deleted.

  • WebKitTestRunner/InjectedBundle/TestRunner.h:
1:05 PM Changeset in webkit [218128] by wenson_hsieh@apple.com
  • 10 edits in trunk

[iOS DnD] Allow the injected bundle to add client data when writing an image to the pasteboard
https://bugs.webkit.org/show_bug.cgi?id=173238
<rdar://problem/31943370>

Reviewed by Ryosuke Niwa and Tim Horton.

Source/WebCore:

Add clientTypes and clientData to PasteboardImage, and call out to the injected bundle using
getClientPasteboardDataForRange when writing a PasteboardImage. When generating item providers for dragging in
the UI process in PlatformPasteboard, add any available client data as representations to the initialization
list used to set the WebItemProviderPasteboard.

Test: DataInteraction.InjectedBundleImageElementData

  • editing/ios/EditorIOS.mm:

(WebCore::Editor::writeImageToPasteboard):

  • platform/Pasteboard.h:
  • platform/ios/PlatformPasteboardIOS.mm:

(WebCore::PlatformPasteboard::writeObjectRepresentations):

Source/WebKit2:

Send PasteboardImage.clientTypes and PasteboardImage.clientData over IPC.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::encodeClientTypesAndData):
(IPC::decodeClientTypesAndData):

Factor out common logic used to encode and decode client types and data into static helpers.

(IPC::ArgumentCoder<PasteboardWebContent>::encode):
(IPC::ArgumentCoder<PasteboardWebContent>::decode):
(IPC::ArgumentCoder<PasteboardImage>::encode):
(IPC::ArgumentCoder<PasteboardImage>::decode):

Tools:

Add a new unit test to verify that data inserted by the injected bundle when beginning a drag on an image
element is plumbed across to the UI delegate. Also refactors injected bundle unit tests to use the new version
of adjustedDataInteractionItemProvidersForItemProvider: that takes representing objects and additional data.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

  • TestWebKitAPI/ios/DataInteractionSimulator.h:
  • TestWebKitAPI/ios/DataInteractionSimulator.mm:

(-[DataInteractionSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
(-[DataInteractionSimulator _webView:adjustedDataInteractionItemProviders:]): Deleted.

1:03 PM Renames edited by sam@webkit.org
(diff)
1:02 PM Renames edited by sam@webkit.org
(diff)
12:55 PM Renames edited by Simon Fraser
(diff)
12:54 PM Renames edited by sam@webkit.org
(diff)
12:52 PM Renames edited by sam@webkit.org
(diff)
12:52 PM Changeset in webkit [218127] by graouts@webkit.org
  • 3 edits
    3 adds in trunk/LayoutTests

Add tests for the SkipForwardButton class
https://bugs.webkit.org/show_bug.cgi?id=173214

Reviewed by Jon Lee.

  • media/modern-media-controls/skip-forward-button/skip-forward-button-expected.txt: Added.
  • media/modern-media-controls/skip-forward-button/skip-forward-button.html: Added.
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
12:51 PM Renames edited by sam@webkit.org
(diff)
12:50 PM Changeset in webkit [218126] by commit-queue@webkit.org
  • 50 edits
    4 deletes in trunk

[WebIDL] Re-implement GetOwnPropertySlot[ByIndex] generation to more closely follow WebIDL
https://bugs.webkit.org/show_bug.cgi?id=173229

Patch by Sam Weinig <sam@webkit.org> on 2017-06-12
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

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

Update results for more passing tests.

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • CMakeLists.txt:
  • bindings/js/JSBindingsAllInOne.cpp:

Remove JSHTMLFrameSetElementCustom.cpp which is no longer needed.

  • bindings/js/JSDOMAbstractOperations.h:

(WebCore::isVisibleNamedProperty):
Add OverrideBuiltins enum as requested by a previous review (and I forgot address) and adopt it
in isVisibleNamedProperty, switch to VMInquiry as we use elsewhere and add a missing FIXME.

(WebCore::accessVisibleNamedProperty):
Add variation of isVisibleNamedProperty that takes a functor and returns either the value the
functor returns, or std::nullopt. This allows getOwnPropertySlot to avoid doing two lookups for
property, once in the named property visibility algorithm and again when it needs the value.

  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowShell.cpp:
  • bindings/js/JSDOMWindowShell.h:

Standardize toJS functions to match generated code (have one that takes a reference, and does the
cast, and one that takes a pointer, does a null check and calls the one that takes a reference).

  • bindings/js/JSHTMLDocumentCustom.cpp:

(WebCore::JSHTMLDocument::getOwnPropertySlot):.
Update to use the implementation namedItem (which is also used by the generated getOwnPropertySlotByIndex)
and match the updated bindings rules. This cannot yet be generated due to the odd case of the 'open'
property requiring custom treatment. I tried removing this, but it cause tests to fail in a way that indicated
that accessing the lexical global object in the open implementation was not working correctly.

  • bindings/js/JSHTMLFrameSetElementCustom.cpp: Removed.

Now generated.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateIndexedGetter):
Add description from the spec and change to return the computed values rather than
print them to the output array. This will be useful for some clients going forward,
who only want the attributes.

(GenerateNamedGetter):
Add description from the spec and change to return the computed values rather than
print them to the output array. This will be useful for some clients going forward,
who only want the attributes. Also greatly simplifies things as [CustomNamedGetter]s
are no longer needed/supported and the exception / null value checks are performed
elsewhere.

(GenerateNamedGetterLambda):
This generates a lambda functor for use in accessVisibleNamedProperty(...). It
handles calling the named getter implementation, and transforming the result into
an one that can be reasoned about by accessVisibleNamedProperty, specifically,
converting it from using IDL's notion of nullability to std::optional.

(GenerateGetOwnPropertySlot):
(GenerateGetOwnPropertySlotByIndex):
Add spec annotations and use helper functions.

(GenerateGetOwnPropertyNames):
Add FIXME about supporting non-contiguous indices (should that ever come up)
and use JSObject explicitly, rather than base, to get the default getOwnPropertyNames
implementation.

(GeneratePut):
Use JSObject explicitly, rather than base, to get the default put implementation.

(GeneratePutByIndex):
Use JSObject explicitly, rather than base, to get the default putByIndex implementation.

(GenerateDefineOwnProperty):
Use JSObject explicitly, rather than base, to get the default getOwnPropertySlot/defineOwnProperty
implementations.

(GenerateDeletePropertyCommon):
Adopt new OverrideBuiltins enum.

(GenerateDeletePropertyDefinition):
Use JSObject explicitly, rather than base, to get the default deleteProperty implementation.

(GenerateDeletePropertyByIndexDefinition):
Use JSObject explicitly, rather than base, to get the default deletePropertyByIndex implementation.

(InstanceOverridesGetOwnPropertySlot):
Remove [CustomNamedGetter] use.

(GenerateHeader):
Remove [CustomNamedGetter] use and merge InstanceOverridesGetOwnPropertySlotByIndex into
InstanceOverridesGetOwnPropertySlot. Specifying either [CustomGetOwnPropertySlot] or
[CustomGetOwnPropertySlotByIndex] will now declare both hooks.

(GenerateImplementation):
Rename GenerateGetOwnPropertySlotBody/GenerateGetOwnPropertySlotByIndexBody to remove the 'Body',
and predicate their generation purely on InstanceOverridesGetOwnPropertySlot as noted for the
reasons above.

(GenerateGetOwnPropertySlotBody): Deleted.
(GenerateGetOwnPropertySlotBodyByIndex): Deleted.
(InstanceOverridesGetOwnPropertySlotByIndex): Deleted.

  • bindings/scripts/IDLAttributes.json:

Remove [CustomNamedGetter].

  • dom/ExceptionOr.h:

(WebCore::ExceptionOr<ReturnType>::returnValue):
Add a function to peek at the return value

  • html/HTMLDocument.h:
  • html/HTMLDocument.cpp:

(WebCore::HTMLDocument::clear):
(WebCore::HTMLDocument::captureEvents):
(WebCore::HTMLDocument::releaseEvents):
Move clear up to be with the other obsolete no-op functions. Add spec annotations
to clear up any confusion about why they are no-ops.

(WebCore::HTMLDocument::namedItem):
Add implementation of namedItem based on the one that was in JSDOMHTMLDocumentCustom.cpp.

(WebCore::HTMLDocument::supportedPropertyNames):
Add stub version of supportedPropertyNames with the algorithm we need to implement.
I don't want to change behavior in this patch, and since we have not enumerated the
properties of document in the past, I left this unimplemented for now.

  • html/HTMLDocument.idl:

Remove [CustomNamedGetter] and add named getter.

  • html/HTMLFrameSetElement.h:
  • html/HTMLFrameSetElement.cpp:

(WebCore::HTMLFrameSetElement::namedItem):
Add named getter based on the implementation in JSHTMLFrameSetElementCustom.cpp.

(WebCore::HTMLFrameSetElement::supportedPropertyNames):
As noted above, I don't want to change behavior with this change, so I have left this unimplemented
for now. However, we may not want to implement it at all, as this named getter is not specified and
at least Firefox does not support it.

  • html/HTMLFrameSetElement.idl:

Remove [CustomNamedGetter] and add named getter.

  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestInterface.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
  • bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestNode.cpp:
  • bindings/scripts/test/JS/JSTestObj.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:

Update test results.

  • bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Removed.
  • bindings/scripts/test/JS/JSTestCustomNamedGetter.h: Removed.
  • bindings/scripts/test/TestCustomNamedGetter.idl: Removed.

Remove test of [CustomNamedGetter] which no longer exists.

LayoutTests:

  • fast/dom/HTMLDocument/document-special-properties-expected.txt:

Update results. Named properties on HTMLDocument no longer override own properties, they
only override properties from the prototype chain (as per the WebIDL specification for
OverrideBuiltins). These results now also match Firefox.

  • js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html:
  • js/dom/dfg-prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html:
  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-4.html:
  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short.html:
  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html:

Update tests to use a property on the prototype, rather than the instance, to test
overriding the [GetOwnProperty] hook. This is needed now that HTMLDocument correctly
follows the OverrideBuiltins rules as explained above.

12:50 PM Renames edited by Simon Fraser
(diff)
12:49 PM Renames created by Simon Fraser
12:46 PM WikiStart edited by Simon Fraser
(diff)
12:34 PM Changeset in webkit [218125] by wenson_hsieh@apple.com
  • 4 edits in trunk

WebItemProviderPasteboard should call its completion block immediately after a synchronous load
https://bugs.webkit.org/show_bug.cgi?id=173225
<rdar://problem/32713144>

Reviewed by Tim Horton.

Source/WebCore:

Ensures that a completion block passed to doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout: will be
invoked immediately, if a synchronous timeout is specified and loading finishes before the synchronous timeout
is reached. To do this, we first factor out the completion logic into a new block. If the synchronous timeout
exists and dispatch_group_wait returns 0 (indicating that the dispatch group finished without hitting the
wait timeout) we simply invoke the block and return early; otherwise, we will register the completion block
using dispatch_group_notify.

Test: DataInteractionTests.WebItemProviderPasteboardLoading

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard doAfterLoadingProvidedContentIntoFileURLs:synchronousTimeout:]):

Tools:

Adds a new unit test to verify whether the completion block is called synchronously or asynchronously, in both
cases where the synchronous timeout is very large, and the synchronous timeout is not used (0).

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

12:19 PM Changeset in webkit [218124] by wenson_hsieh@apple.com
  • 2 edits in trunk/Source/WebKit2

[iOS DnD] Introduce hooks to override targeted drag previews when lifting and cancelling
https://bugs.webkit.org/show_bug.cgi?id=173240
<rdar://problem/31943370>

Reviewed by Ryosuke Niwa and Tim Horton.

Adds two new delegate hooks: _webView:previewForLiftingItem:session: and
_webView:previewForCancellingItem:withDefault:.

  • UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
12:07 PM Changeset in webkit [218123] by Jonathan Bedard
  • 2 edits in trunk/Tools

Return correct process names for iOS on-device testing
https://bugs.webkit.org/show_bug.cgi?id=173263

Reviewed by Alex Christensen.

When running tests on iOS devices, process names do not end with '.Development'
as they do on Mac and iOS simulator.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::webProcessName): Return correct process name without '.Development'
for iOS on-device testing.
(WTR::TestController::networkProcessName): Ditto.
(WTR::TestController::databaseProcessName): Ditto.

12:00 PM Changeset in webkit [218122] by sbarati@apple.com
  • 2 edits in trunk/LayoutTests

Unreviewed. Unmark test as flaky after fix in r217944. The test should now pass.

  • platform/mac/TestExpectations:
11:55 AM Changeset in webkit [218121] by Chris Dumez
  • 4 edits in trunk

Regression(r217867): Legacy SessionHistoryEntryData format should not change
https://bugs.webkit.org/show_bug.cgi?id=173267
<rdar://problem/32701257>

Reviewed by Simon Fraser.

Source/WebKit2:

Revert changes to Legacy SessionHistoryEntryData format that were made in r217867,
as this apparently breaks compatiblity.

  • UIProcess/mac/LegacySessionStateCoding.cpp:

(WebKit::encodeFrameStateNode):
(WebKit::decodeBackForwardTreeNode):

Tools:

Restrict test to stop covering saving / restore of scrollRestoration via the legacy
SessionHistoryEntryData. Maintain coverage for the default value of scrollRestoration
though as this covers the crash that r217867 was fixing.

  • TestWebKitAPI/Tests/WebKit2/RestoreSessionState.cpp:

(TestWebKitAPI::createSessionStateData):
(TestWebKitAPI::TEST):
(TestWebKitAPI::createSessionStateDataContainingScrollRestoration): Deleted.

11:49 AM Changeset in webkit [218120] by matthew_hanson@apple.com
  • 5 edits in tags/Safari-604.1.25/Source

Cherry-pick r218068. rdar://problem/32686871

11:49 AM Changeset in webkit [218119] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-604.1.25/Source/WebKit2

Cherry-pick r218022. rdar://problem/32598919

11:49 AM Changeset in webkit [218118] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.25/Source/WebKit2

Cherry-pick r218011. rdar://problem/32679311

11:49 AM Changeset in webkit [218117] by matthew_hanson@apple.com
  • 2 edits in tags/Safari-604.1.25/Source/WebKit2

Cherry-pick r218006. rdar://problem/32598919

11:49 AM Changeset in webkit [218116] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.25/Source/WebKit2

Cherry-pick r218002. rdar://problem/32679311

11:49 AM Changeset in webkit [218115] by matthew_hanson@apple.com
  • 4 edits in tags/Safari-604.1.25/Source/WebKit2

Cherry-pick r217991. rdar://problem/32594952

11:45 AM Changeset in webkit [218114] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

WebAVPlayerController minTime and maxTime should be calculated properties to provide correct values when streaming.
https://bugs.webkit.org/show_bug.cgi?id=173193
rdar://problem/32684807

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-12
Reviewed by Jer Noble.

No new tests because no affect on the DOM. This only affects properties consumed to AVKit.

-minTime and -maxTime should be calculated properties so they supply the exptected values to AVKit while streaming.

  • platform/ios/WebAVPlayerController.h:
  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController maxTime]):
(+[WebAVPlayerController keyPathsForValuesAffectingMaxTime]):
(-[WebAVPlayerController minTime]):
(+[WebAVPlayerController keyPathsForValuesAffectingMinTime]):
(-[WebAVPlayerController resetMediaState]):

  • platform/ios/WebPlaybackSessionInterfaceAVKit.mm:

(WebCore::WebPlaybackSessionInterfaceAVKit::durationChanged):

11:42 AM Changeset in webkit [218113] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, suppress invalid register alloation validation assertion in 32 bit
https://bugs.webkit.org/show_bug.cgi?id=172421

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):

11:30 AM Changeset in webkit [218112] by matthew_hanson@apple.com
  • 7 edits in tags/Safari-604.1.25/Source

Versioning.

11:23 AM Changeset in webkit [218111] by gskachkov@gmail.com
  • 9 edits in trunk

We incorrectly allow escaped characters in keyword tokens
https://bugs.webkit.org/show_bug.cgi?id=171310

Reviewed by Yusuke Suzuki.

JSTests:

  • stress/destructuring-assignment-syntax.js:
  • stress/error-messages-for-in-operator-should-not-crash.js:

(catch):

  • stress/reserved-word-with-escape.js:

(testSyntaxError.String.raw.v):
(String.raw.SyntaxError.Cannot.use.the.keyword.string_appeared_here.as.a.name):
(testSyntaxError.String.raw.a):

  • JSTests/ChakraCore/test/Basics/IdsWithEscapes.baseline-jsc:

Source/JavaScriptCore:

According spec it is not allow to use escaped characters in
keywords. https://tc39.github.io/ecma262/#sec-reserved-words
Current patch implements this requirements.

  • parser/Lexer.cpp:

(JSC::Lexer<CharacterType>::parseIdentifierSlowCase):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::printUnexpectedTokenText):

  • parser/ParserTokens.h:
10:40 AM Changeset in webkit [218110] by Matt Lewis
  • 1 edit in trunk/LayoutTests/ChangeLog

Updated test expectations for fast/mediastream/getUserMedia-webaudio.html.
https://bugs.webkit.org/show_bug.cgi?id=170960

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
10:38 AM Changeset in webkit [218109] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][macOS] Alow iokit-get-properties for additional media features
https://bugs.webkit.org/show_bug.cgi?id=173082
<rdar://problem/32597547>

Reviewed by Alex Christensen.

  • WebProcess/com.apple.WebProcess.sb.in:
10:28 AM Changeset in webkit [218108] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Call _sqlite3_purgeEligiblePagerCacheMemory() on memory pressure only if sqlite is initialized
https://bugs.webkit.org/show_bug.cgi?id=173264

Reviewed by Ryosuke Niwa.

Call _sqlite3_purgeEligiblePagerCacheMemory() on memory pressure only if sqlite is initialized.
Otherwise, not only is it no needed, it is also potentially unsafe.

  • page/MemoryRelease.cpp:

(WebCore::registerSQLiteMemoryPressureHandler):

  • page/MemoryRelease.h:
  • page/cocoa/MemoryReleaseCocoa.mm:

(WebCore::platformReleaseMemory):
(WebCore::registerSQLiteMemoryPressureHandler):

  • platform/sql/SQLiteDatabase.cpp:

(WebCore::initializeSQLiteIfNecessary):

10:19 AM Changeset in webkit [218107] by Carlos Garcia Campos
  • 7 edits
    1 copy in trunk/Source/WebKit2

Add API::IconDatabaseClient
https://bugs.webkit.org/show_bug.cgi?id=173145

Reviewed by Alex Christensen.

It will be used by GTK+ port instead of the C API.

  • UIProcess/API/APIIconDatabaseClient.h:

(API::IconDatabaseClient::~IconDatabaseClient):
(API::IconDatabaseClient::didChangeIconForPageURL):
(API::IconDatabaseClient::didRemoveAllIcons):
(API::IconDatabaseClient::iconDataReadyForPageURL):

  • UIProcess/API/C/WKIconDatabase.cpp:

(WKIconDatabaseSetIconDatabaseClient):

  • UIProcess/WebIconDatabase.cpp:

(WebKit::WebIconDatabase::WebIconDatabase):
(WebKit::WebIconDatabase::setClient):
(WebKit::WebIconDatabase::didChangeIconForPageURL):
(WebKit::WebIconDatabase::didRemoveAllIcons):
(WebKit::WebIconDatabase::notifyIconDataReadyForPageURL):

  • UIProcess/WebIconDatabase.h:
  • UIProcess/WebIconDatabaseClient.cpp:

(WebKit::WebIconDatabaseClient::WebIconDatabaseClient):
(WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
(WebKit::WebIconDatabaseClient::didRemoveAllIcons):
(WebKit::WebIconDatabaseClient::iconDataReadyForPageURL):

  • UIProcess/WebIconDatabaseClient.h:
  • WebKit2.xcodeproj/project.pbxproj:
10:10 AM Changeset in webkit [218106] by Carlos Garcia Campos
  • 9 edits in trunk

[GTK] Stop dismissing menus attached to the web view for every injected event
https://bugs.webkit.org/show_bug.cgi?id=172708

Reviewed by Alex Christensen.

Source/WebKit2:

To actually simulate a right-click event we should also send the button release after the press, and let the page
handle the events in addition to sending the event to the context menu controller, like we do with normal
events. So, this is mostly the same as a real right-click event but without actually showing the menu.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::contextMenuAtPointInWindow):

Tools:

It's a workaround we added in r184015 that has worked so far for the context menu, but doesn't really work now
that we also attach popup menus to the web view. We really need to be able to show a popup menu, and then send
events while the menu is open.

  • WebKitTestRunner/InjectedBundle/EventSendingController.cpp:

(WTR::EventSendingController::contextClick): Use WKBundlePageCopyContextMenuAtPointInWindow() also in GTK+ port.

  • WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:

(WTR::EventSenderProxy::dispatchEvent): Stop calling PlatformWebView::dismissAllPopupMenus().

LayoutTests:

  • editing/selection/5354455-1.html: No need to click on editable area to focus it, contextClick already focuses

it, we even have another test to ensure it. Those fast clicks were causing a double click in GTK+ port which
selected the whole line. We don't need to dismiss the context menu either, because contextClick() doesn't really
show the menu.

  • fast/events/context-activated-by-key-event.html: Dismiss the context menu every time we show it.
  • fast/events/mouse-click-events.html: Dimiss the context menu when testing right click events.
10:02 AM Changeset in webkit [218105] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/mediastream/getUserMedia-webaudio.html as flaky on mac-wk2.
https://bugs.webkit.org/show_bug.cgi?id=170960

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
9:01 AM Changeset in webkit [218104] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=172255

Unreviewed test gardening.

  • platform/mac/TestExpectations:
8:48 AM Changeset in webkit [218103] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

transforms/hittest-translated-content-off-to-infinity-and-back.html is passing

Ureviewed gardening.

  • platform/wpe/TestExpectations: This started passing lately, remove.
8:27 AM Changeset in webkit [218102] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[CoordinatedGraphics] Behavior change of DrawingAreaImpl after r217779
https://bugs.webkit.org/show_bug.cgi?id=173153

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-12
Reviewed by Carlos Garcia Campos.

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::mainFrameContentSizeChanged):

8:19 AM Changeset in webkit [218101] by Claudio Saavedra
  • 4 edits in trunk/LayoutTests

[WPE][GTK] Rebaseline js/dom/global-constructors-attributes.html

Unreviewed gardening.

Needs to be updated in WPE due to enabling ENCRYPTED_MEDIA. GTK+
port was skipping this but it just needs an updated expectations.

  • platform/gtk/TestExpectations: Unskip.
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/wpe/js/dom/global-constructors-attributes-expected.txt:
7:56 AM Changeset in webkit [218100] by zandobersek@gmail.com
  • 4 edits in trunk/Source/WebCore

[GCrypt] Use utility functions in CryptoKeyEC, CryptoKeyRSA
https://bugs.webkit.org/show_bug.cgi?id=173253

Reviewed by Michael Catanzaro.

Use the utility functions from the GCryptUtilities.h header instead
of writing the same code in both CryptoKeyEC and CryptoKeyRSA
implementations. The switches are straightforward, the only difference
is that the GCryptUtilities functions return a std::optional<> object,
meaning we have to address possibly invalid return value.

The mpiData() function is overloaded, making it possible to pass to it
either a gcry_sexp_t or gcry_mpi_t object. Additionally, mpiLength()
function is added, overloading again for gcry_sexp_t and gcry_mpi_t.
This function is used from mpiData() as well as in CryptoKeyRSA when
retrieving the RSA modulus length.

No new tests -- no changes in behavior.

  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:

(WebCore::CryptoKeyEC::platformExportRaw):
(WebCore::CryptoKeyEC::platformAddFieldElements):
(WebCore::extractMPIData): Deleted.

  • crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:

(WebCore::getRSAModulusLength):
(WebCore::getRSAKeyParameter):
(WebCore::CryptoKeyRSA::exportData):
(WebCore::getParameterMPIData): Deleted.

  • crypto/gcrypt/GCryptUtilities.h:

(WebCore::mpiLength):
(WebCore::mpiData):

6:27 AM Changeset in webkit [218099] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, add branch64(Cond, BaseIndex, RegisterID) for ARM64
https://bugs.webkit.org/show_bug.cgi?id=172421

  • assembler/MacroAssemblerARM64.h:

(JSC::MacroAssemblerARM64::branch64):
(JSC::MacroAssemblerARM64::branchPtr):

5:58 AM Changeset in webkit [218098] by Carlos Garcia Campos
  • 12 edits in trunk/Source/WebKit2

[GTK] Prefer to use private WebKitWebView API over WebKitWebViewBase
https://bugs.webkit.org/show_bug.cgi?id=173254

Reviewed by Žan Doberšek.

WebKitWebViewBase is specific to the GTK+ API, but WebKitWebView should be present in any glib-based API. Add
webkitWebViewCreatePage() and webkitWebViewGetPage() and use them when possible instead of the WebKitWebViewBase
ones.

  • UIProcess/API/gtk/WebKitAutomationSession.cpp:
  • UIProcess/API/gtk/WebKitContextMenuClient.cpp:

(attachContextMenuClientToView):

  • UIProcess/API/gtk/WebKitFindController.cpp:

(getPage):
(webkitFindControllerDispose):
(webkitFindControllerConstructed):
(webKitFindControllerPerform):
(webkit_find_controller_search_finish):

  • UIProcess/API/gtk/WebKitFormClient.cpp:

(attachFormClientToView):

  • UIProcess/API/gtk/WebKitLoaderClient.cpp:

(attachLoaderClientToView):

  • UIProcess/API/gtk/WebKitPolicyClient.cpp:

(attachPolicyClientToView):

  • UIProcess/API/gtk/WebKitPrintOperation.cpp:

(drawPagesForPrintingCompleted):
(webkitPrintOperationPrintPagesForFrame):
(webkit_print_operation_run_dialog):
(webkit_print_operation_print):

  • UIProcess/API/gtk/WebKitUIClient.cpp:

(attachUIClientToView):

  • UIProcess/API/gtk/WebKitWebContext.cpp:

(webkitWebContextCreatePageForWebView):
(webkitWebContextWebViewDestroyed):

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewCreatePage):
(webkitWebViewGetPage):

  • UIProcess/API/gtk/WebKitWebViewPrivate.h:
5:54 AM Changeset in webkit [218097] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] getPage() in WebKitWebView should return a reference instead of a pointer
https://bugs.webkit.org/show_bug.cgi?id=173251

Reviewed by Žan Doberšek.

The WebPageProxy is created on WebKitWebView construction, so getPage() can only return nullptr if it's called
during construction. And that can only happen when construct properties are set. It's better to check that the
view has been constructed only in these particular cases and make getPage() return a reference.

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewCreateJavaScriptDialog):
(allowModalDialogsChanged): Settings signals are only connected after the page has been created, so we don't
need to check page is available here.
(zoomTextOnlyChanged):
(userAgentChanged):
(webkitWebViewIsConstructed): Helper method to check if the view has been constructed.
(webkitWebViewUpdateSettings): Return early if view hasn't been constructed.
(webkitWebViewDisconnectSettingsSignalHandlers): Ditto.
(webkitWebViewConstructed):
(webkitWebViewDispose):
(webkitWebViewCreateNewPage):
(webkitWebViewSelectionDidChange):
(webkit_web_view_try_close):
(webkit_web_view_load_uri):
(webkit_web_view_load_html):
(webkit_web_view_load_alternate_html):
(webkit_web_view_load_plain_text):
(webkit_web_view_load_bytes):
(webkit_web_view_load_request):
(webkit_web_view_get_page_id):
(webkit_web_view_reload):
(webkit_web_view_reload_bypass_cache):
(webkit_web_view_stop_loading):
(webkit_web_view_is_playing_audio):
(webkit_web_view_go_back):
(webkit_web_view_can_go_back):
(webkit_web_view_go_forward):
(webkit_web_view_can_go_forward):
(webkit_web_view_get_custom_charset):
(webkit_web_view_set_custom_charset):
(webkit_web_view_get_estimated_load_progress):
(webkit_web_view_go_to_back_forward_list_item):
(webkit_web_view_set_zoom_level):
(webkit_web_view_get_zoom_level):
(webkit_web_view_can_execute_editing_command):
(webkit_web_view_execute_editing_command):
(webkit_web_view_execute_editing_command_with_argument):
(webkit_web_view_run_javascript):
(resourcesStreamReadCallback):
(webkit_web_view_get_inspector):
(webkit_web_view_can_show_mime_type):
(webkit_web_view_save):
(webkit_web_view_save_to_file):
(webkit_web_view_download_uri):
(webkit_web_view_get_tls_info):
(webkit_web_view_get_snapshot):
(webkit_web_view_set_background_color):
(webkit_web_view_get_background_color):
(webkit_web_view_is_editable):
(webkit_web_view_set_editable):
(webkit_web_view_get_editor_state):
(webkit_web_view_get_session_state):
(webkit_web_view_restore_session_state):

5:50 AM Changeset in webkit [218096] by Carlos Garcia Campos
  • 3 edits
    1 copy in trunk/Source

[GTK] Move WebKit GType macros to WTF
https://bugs.webkit.org/show_bug.cgi?id=173249

Reviewed by Žan Doberšek.

Source/WebKit2:

Moving to a common place where they could be shared by all ports using a glib-based API.

  • UIProcess/API/gtk/WebKitPrivate.h:

Source/WTF:

They can be used by glib-based ports and eventually by JavaScriptCore glib bindings too.

  • wtf/glib/WTFGType.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h.
5:23 AM Changeset in webkit [218095] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

Mark fast/mediastream/getUserMedia-grant-persistency3.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173257

Unreviewed gardening.

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-12

  • platform/gtk/TestExpectations:
5:17 AM Changeset in webkit [218094] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r218093.
https://bugs.webkit.org/show_bug.cgi?id=173259

Break builds (Requested by yusukesuzuki on #webkit).

Reverted changeset:

"Unreviewed, build fix for ARM64"
https://bugs.webkit.org/show_bug.cgi?id=172421
http://trac.webkit.org/changeset/218093

4:51 AM Changeset in webkit [218093] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, build fix for ARM64
https://bugs.webkit.org/show_bug.cgi?id=172421

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):

2:40 AM Changeset in webkit [218092] by magomez@igalia.com
  • 2 edits in trunk/Tools

[GTK][WPE] Enable GStreamer GL on development builds
https://bugs.webkit.org/show_bug.cgi?id=173248

Enable GStreamer GL for GTK and WPE.

Reviewed by Carlos Garcia Campos.

  • Scripts/webkitperl/FeatureList.pm:
1:14 AM Changeset in webkit [218091] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK+ test /webkit2/WebKitWebView/notification after r216641.

Notifications are no longer cleared on page navigation.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebView.cpp:

(testWebViewNotification):

Jun 11, 2017:

11:54 PM Changeset in webkit [218090] by Carlos Garcia Campos
  • 2 edits in trunk/Tools

Unreviewed. Fix GTK+ test /webkit2/WebKitAutomationSession/request-session after r217831.

DBus interface and object path names were updated in r217831.

  • TestWebKitAPI/Tests/WebKit2Gtk/TestAutomationSession.cpp:
11:05 PM Changeset in webkit [218089] by Carlos Garcia Campos
  • 7 edits
    1 move
    3 deletes in trunk/Source/WebKit2

[GTK] Remove WKInspectorClientGtk
https://bugs.webkit.org/show_bug.cgi?id=173142

Reviewed by Michael Catanzaro.

It's only used internally in GTk+ API, we can simplify it by using a C++ client instead.

  • PlatformGTK.cmake:
  • UIProcess/API/C/gtk/WKInspectorClientGtk.cpp: Removed.
  • UIProcess/API/C/gtk/WKInspectorClientGtk.h: Removed.
  • UIProcess/API/gtk/WebKitPrivate.h:
  • UIProcess/API/gtk/WebKitWebInspector.cpp:

(_WebKitWebInspectorPrivate::~_WebKitWebInspectorPrivate):
(webkitWebInspectorCreate):

  • UIProcess/WebInspectorProxy.cpp:
  • UIProcess/WebInspectorProxy.h:
  • UIProcess/gtk/WebInspectorClientGtk.cpp: Removed.
  • UIProcess/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h.
  • UIProcess/gtk/WebInspectorProxyGtk.cpp:

(WebKit::WebInspectorProxy::setClient):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):

10:19 PM Changeset in webkit [218088] by bshafiei@apple.com
  • 7 edits in tags/Safari-604.1.25.0.1/Source

Versioning.

10:17 PM Changeset in webkit [218087] by bshafiei@apple.com
  • 1 copy in tags/Safari-604.1.25.0.1

New tag.

10:03 PM Changeset in webkit [218086] by mmaxfield@apple.com
  • 1 edit
    1 move in trunk/LayoutTests

[iOS 11] fast/text/international/system-language/arabic-glyph-cache-fill-combine.html hardcodes the system UI Arabic font
https://bugs.webkit.org/show_bug.cgi?id=173244
<rdar://problem/32659595>

Reviewed by Ryosuke Niwa.

iOS 11 changed this font, so we shouldn't hardcode it. Instead,
we can simply change this to an -expected-mismatch.html test to
specifically test against the ".notdef" glyph.

  • fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected-mismatch.html: Renamed from LayoutTests/fast/text/international/system-language/arabic-glyph-cache-fill-combine-expected.html.
10:02 PM Changeset in webkit [218085] by mmaxfield@apple.com
  • 2 edits in trunk/LayoutTests

fast/text/variations/getComputedStyle.html does not need to be asynchronous
https://bugs.webkit.org/show_bug.cgi?id=173246
<rdar://problem/31393842>

Reviewed by Sam Weinig.

I dont know why I made it asynchronous in the first place.

  • fast/text/variations/getComputedStyle.html:
8:58 PM Changeset in webkit [218084] by Yusuke Suzuki
  • 23 edits
    15 adds in trunk

[DFG] Add ArrayIndexOf intrinsic
https://bugs.webkit.org/show_bug.cgi?id=172421

Reviewed by Saam Barati.

JSTests:

  • stress/array-indexof-array-prototype-change.js: Added.

(shouldBe):
(indexOfInt32):

  • stress/array-indexof-have-a-bad-time-getter.js: Added.

(shouldBe):
(indexOfInt32):

  • stress/array-indexof-have-a-bad-time.js: Added.

(shouldBe):
(indexOfInt32):

  • stress/array-indexof-hole-with-prototype.js: Added.

(shouldBe):
(indexOf):

  • stress/array-indexof-hole.js: Added.

(shouldBe):
(indexOf):

  • stress/array-indexof-index.js: Added.

(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):
(indexOfValue):

  • stress/array-indexof-negative-index.js: Added.

(shouldBe):
(indexOfInt32):
(indexOfDouble):
(indexOfString):
(indexOfObject):
(indexOfValue):

  • stress/array-indexof-non-int32-start-index.js: Added.

(shouldBe):
(indexOf):
(object.valueOf):

  • stress/array-indexof-object-prototype-change.js: Added.

(shouldBe):
(indexOfInt32):

  • stress/array-indexof-object.js: Added.

(shouldBe):
(indexOf):

  • stress/array-indexof-original-array.js: Added.

(shouldBe):
(indexOfInt32):

  • stress/array-indexof-string.js: Added.

(shouldBe):
(indexOf):

  • stress/array-indexof-structure-change-convert.js: Added.

(shouldBe):
(indexOf):

  • stress/array-indexof-structure-change.js: Added.

(shouldBe):
(indexOf):

  • stress/array-indexof.js: Added.

(shouldBe):
(indexOf):

Source/JavaScriptCore:

This patch introduces ArrayIndexOfInstrinsic for DFG and FTL optimizations.
We emit array check and go fast path if the array is Array::Int32, Array::Double
or Array::Continugous. In addition, for Array::Int32 and Array::Double case,
we have inlined fast paths.

With updated ARES-6 Babylon,

Before

firstIteration: 45.76 +- 3.87 ms
averageWorstCase: 24.41 +- 2.17 ms
steadyState: 8.01 +- 0.22 ms

After

firstIteration: 45.64 +- 4.23 ms
averageWorstCase: 23.03 +- 3.34 ms
steadyState: 7.33 +- 0.34 ms

In SixSpeed.

baseline patched

map-set-lookup.es5 734.4701+-10.4383 102.0968+-2.6357 definitely 7.1939x faster
map-set.es5 41.1396+-1.0558 33.1916+-0.7986 definitely 1.2395x faster
map-set-object.es5 62.8317+-1.2518 45.6944+-0.8369 definitely 1.3750x faster

  • dfg/DFGAbstractInterpreterInlines.h:

(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):

  • dfg/DFGByteCodeParser.cpp:

(JSC::DFG::ByteCodeParser::handleIntrinsicCall):

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

  • dfg/DFGDoesGC.cpp:

(JSC::DFG::doesGC):

  • dfg/DFGFixupPhase.cpp:

(JSC::DFG::FixupPhase::fixupNode):

  • dfg/DFGNode.h:

(JSC::DFG::Node::hasArrayMode):

  • dfg/DFGNodeType.h:
  • dfg/DFGOperations.cpp:
  • dfg/DFGOperations.h:
  • dfg/DFGPredictionPropagationPhase.cpp:
  • dfg/DFGSafeToExecute.h:

(JSC::DFG::safeToExecute):

  • dfg/DFGSpeculativeJIT.cpp:

(JSC::DFG::SpeculativeJIT::compileArrayIndexOf):
(JSC::DFG::SpeculativeJIT::speculateObject):

  • dfg/DFGSpeculativeJIT.h:

(JSC::DFG::SpeculativeJIT::callOperation):

  • dfg/DFGSpeculativeJIT32_64.cpp:

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

  • dfg/DFGSpeculativeJIT64.cpp:

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

  • ftl/FTLCapabilities.cpp:

(JSC::FTL::canCompile):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::compileNode):
(JSC::FTL::DFG::LowerDFGToB3::compileArrayIndexOf):

  • jit/JITOperations.h:
  • runtime/ArrayPrototype.cpp:

(JSC::ArrayPrototype::finishCreation):

  • runtime/Intrinsic.cpp:

(JSC::intrinsicName):

  • runtime/Intrinsic.h:
8:46 PM Changeset in webkit [218083] by rniwa@webkit.org
  • 6 edits
    2 adds in trunk

didMoveToNewDocument doesn't get called on an Attr inside a shadow tree
https://bugs.webkit.org/show_bug.cgi?id=173133

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by moveShadowTreeToNewDocument never calling didMoveToNewDocument on Attr nodes.
Fixed the bug by using the same traversal code as moveTreeToNewScope in moveShadowTreeToNewDocument
by extracting the traversal code as a templatized traverseSubtreeToUpdateTreeScope.

Also removed the code to increment the DOM tree version in moveTreeToNewScope. This code was there
to invalidate the HTML collection caches which used to clear the cache whenever the DOM tree version
changed before r122621 (five years ago! by me). Since we now eagerly invalidate each node list and
HTML collection's caches via NodeListsNodeData::adoptTreeScope and NodeListsNodeData::adoptDocument.

Test: fast/dom/adopt-attr-with-shadow-tree.html

  • dom/Node.cpp:

(WebCore::moveNodeToNewDocument): Assert that the node had been adopted to a new document.
(WebCore::traverseSubtreeToUpdateTreeScope): Extracted from moveTreeToNewScope.
(WebCore::moveShadowTreeToNewDocument): Use traverseSubtreeToUpdateTreeScope to adopt each node
to the new document.
(WebCore::Node::moveTreeToNewScope): See above.

  • testing/Internals.cpp:

(WebCore::Internals::referencingNodeCount): Added. Used in the newly added regression test.

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

LayoutTests:

Added a regression test for moving a shadow tree with an Attr node across a document.
The test hits an assertion in a debug build and fails in a release build without the fix.

  • fast/dom/adopt-attr-with-shadow-tree-expected.txt: Added.
  • fast/dom/adopt-attr-with-shadow-tree.html: Added.
7:40 PM Changeset in webkit [218082] by keith_miller@apple.com
  • 10 edits in trunk

TypedArray constructor with string shouldn't throw
https://bugs.webkit.org/show_bug.cgi?id=173181

Reviewed by JF Bastien.

JSTests:

We should be coercing primitive arguments to numbers in the various
TypedArray constructors.

  • stress/typedarray-constructor.js:

Source/JavaScriptCore:

We should be coercing primitive arguments to numbers in the various
TypedArray constructors.

  • runtime/JSGenericTypedArrayViewConstructorInlines.h:

(JSC::constructGenericTypedArrayViewWithArguments):

LayoutTests:

Update tests to allow null buffers.

  • fast/canvas/webgl/array-unit-tests-expected.txt:
  • fast/canvas/webgl/array-unit-tests.html:
  • fast/canvas/webgl/webgl-array-invalid-ranges-expected.txt:
  • fast/canvas/webgl/webgl-array-invalid-ranges.html:
  • webgl/1.0.2/resources/webgl_test_files/conformance/typedarrays/array-unit-tests.html:
6:57 PM Changeset in webkit [218081] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

[Mac] Unaligned pointers in static CMBufferCallbacks structs defined in WebCoreDecompressionSession.mm
https://bugs.webkit.org/show_bug.cgi?id=173245

Reviewed by Sam Weinig.

  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::enqueueSample): Prepend 4 bytes of padding to the

structs so that the pointers are properly aligned.

5:47 PM Changeset in webkit [218080] by Yusuke Suzuki
  • 11 edits in trunk/Source

[WTF] Make ThreadMessage portable
https://bugs.webkit.org/show_bug.cgi?id=172073

Reviewed by Keith Miller.

Source/JavaScriptCore:

  • runtime/MachineContext.h:

(JSC::MachineContext::stackPointer):

  • tools/CodeProfiling.cpp:

(JSC::profilingTimer):

Source/WTF:

Recently, we change ThreadMessage semantics: message handler
can be executed in the sender thread.
This allows ThreadMessage to be implemented in a portable way.

This patch implements ThreadMessage for all the platforms.
We use platform-independent Thread APIs, suspend(), resume(),
and getRegisters().

  • wtf/PlatformRegisters.h:

(WTF::registersFromUContext):

  • wtf/ThreadMessage.cpp:

(WTF::sendMessageScoped):
(WTF::ThreadMessageData::ThreadMessageData): Deleted.
(): Deleted.
(WTF::initializeThreadMessages): Deleted.
(WTF::sendMessageUsingSignal): Deleted.
(WTF::sendMessageUsingMach): Deleted.
(WTF::deliverMessagesUsingMach): Deleted.

  • wtf/ThreadMessage.h:
  • wtf/Threading.cpp:

(WTF::initializeThreading):

  • wtf/Threading.h:

(WTF::Thread::threadMessages): Deleted.

  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::signalHandlerSuspendResume):
(WTF::threadStateMetadata):
(WTF::Thread::getRegisters):

  • wtf/threads/Signals.cpp:

(WTF::handleSignalsWithMach):

2:54 PM Changeset in webkit [218079] by graouts@webkit.org
  • 3 edits
    2 deletes in trunk/LayoutTests

Rebaseline media/modern-media-controls/scrubber
https://bugs.webkit.org/show_bug.cgi?id=173212

Reviewed by Jon Lee.

Remove a media/modern-media-controls/scrubber test that is no longer relevant now that there is no standalone scrubber class.

  • media/modern-media-controls/scrubber/scrubber-expected.txt: Removed.
  • media/modern-media-controls/scrubber/scrubber.html: Removed.
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:53 PM Changeset in webkit [218078] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Enable media/modern-media-controls/scheduler
https://bugs.webkit.org/show_bug.cgi?id=173211

Reviewed by Jon Lee.

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:51 PM Changeset in webkit [218077] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/rewind-button
https://bugs.webkit.org/show_bug.cgi?id=173210

Reviewed by Jon Lee.

Use SVG assets.

  • media/modern-media-controls/rewind-button/rewind-button-expected.txt:
  • media/modern-media-controls/rewind-button/rewind-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:49 PM Changeset in webkit [218076] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/play-pause-button
https://bugs.webkit.org/show_bug.cgi?id=173209

Reviewed by Jon Lee.

Use SVG assets.

  • media/modern-media-controls/play-pause-button/play-pause-button-expected.txt:
  • media/modern-media-controls/play-pause-button/play-pause-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:48 PM Changeset in webkit [218075] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/placard
https://bugs.webkit.org/show_bug.cgi?id=173208

Reviewed by Jon Lee.

IconButton is now simply Button.

  • media/modern-media-controls/placard/placard-expected.txt:
  • media/modern-media-controls/placard/placard.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:46 PM Changeset in webkit [218074] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Enable media/modern-media-controls/pip-placard tests
https://bugs.webkit.org/show_bug.cgi?id=173207

Reviewed by Jon Lee.

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:45 PM Changeset in webkit [218073] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/pip-button.
https://bugs.webkit.org/show_bug.cgi?id=173206

Reviewed by Jon Lee.

Use SVG assets.

  • media/modern-media-controls/pip-button/pip-button-expected.txt:
  • media/modern-media-controls/pip-button/pip-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:43 PM Changeset in webkit [218072] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/mute-button
https://bugs.webkit.org/show_bug.cgi?id=173205

Reviewed by Jon Lee.

We now use SVG assets, so let the test reflect that.

  • media/modern-media-controls/mute-button/mute-button-expected.txt:
  • media/modern-media-controls/mute-button/mute-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
2:40 PM Changeset in webkit [218071] by graouts@webkit.org
  • 1 edit
    1 delete in trunk/LayoutTests

Remove media/modern-media-controls/macos-media-controls
https://bugs.webkit.org/show_bug.cgi?id=173204

Reviewed by Jon Lee.

There no longer is a MacOSMediaControls class and this test no longer makes sense.

  • media/modern-media-controls/macos-media-controls/macos-media-controls-expected.txt: Removed.
  • media/modern-media-controls/macos-media-controls/macos-media-controls.html: Removed.
10:02 AM Changeset in webkit [218070] by Yusuke Suzuki
  • 4 edits in trunk/Source/JavaScriptCore

[JSC] Shrink Structure size
https://bugs.webkit.org/show_bug.cgi?id=173239

Reviewed by Mark Lam.

We find that the size of our Structure is slightly enlarged due to paddings.
By changing the order of members, we can reduce the size from 120 to 112.
This is good because 120 and 112 are categorized into different size classes.
For 120, we allocate 128 bytes. And for 112, we allocate 112 bytes.
We now save 16 bytes per Structure for free.

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

(JSC::Structure::Structure):

  • runtime/Structure.h:
9:59 AM Changeset in webkit [218069] by Yusuke Suzuki
  • 5 edits in trunk/Source/WTF

[WTF] Drop unnecessary includes in Threading.h
https://bugs.webkit.org/show_bug.cgi?id=173167

Reviewed by Darin Adler.

Threading.h includes bunch of headers. But some of them are not necessary.
This patch cleans up it a bit.

  • wtf/Assertions.cpp:
  • wtf/LocklessBag.h:
  • wtf/Threading.h:
  • wtf/ThreadingPrimitives.h:
9:03 AM Changeset in webkit [218068] by timothy_horton@apple.com
  • 5 edits in trunk/Source

REGRESSION (r217870): Null deref under PageOverlayController::uninstallPageOverlay using find in page
https://bugs.webkit.org/show_bug.cgi?id=173196
<rdar://problem/32686871>

Reviewed by Simon Fraser.

Source/WebCore:

  • page/TextIndicator.cpp:

(WebCore::initializeIndicator):

  • page/TextIndicator.h:

The change in r217870 had an expected but not thought-through side-effect
that you cannot create a TextIndicator for far-off-screen elements. This
is a problem for find-in-page, which uses TextIndicator to paint the yellow
highlight before scrolling it into view.

Bring back TextIndicatorOptionDoNotClipToVisibleRect and revert to it for
find in page, since it needs different behavior than something like
drag and drop, which always operates on content near the visible viewport.

Source/WebKit2:

  • WebProcess/WebPage/ios/FindControllerIOS.mm:

(WebKit::FindController::updateFindIndicator):
The reason this caused a crash instead of just a missing indicator
is that FindControllerIOS would early return after uninstalling
the old overlay, before installing a new one, and leave m_isShowingFindIndicator
set to true. Instead, reset it (and m_findIndicatorOverlay, which
we would never re-use but might as well be freed immediately).

This likely already crashed in other less reproducible cases where a
TextIndicator was not created for a find match, so clean it up.

3:12 AM Changeset in webkit [218067] by Konstantin Tokarev
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, attempt to fix JSC tests on Win after r217771

  • jsc.cpp:

(currentWorkingDirectory): buffer is not NULL-terminated

1:33 AM Changeset in webkit [218066] by Yusuke Suzuki
  • 9 edits in trunk/Source

[WTF] Add RegisteredSymbolImpl
https://bugs.webkit.org/show_bug.cgi?id=173230

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • runtime/SymbolConstructor.cpp:

(JSC::symbolConstructorKeyFor):

Source/WTF:

Most symbols are not registered in SymbolRegistry. However, we currently always
allocate a pointer member to point to a SymbolRegistry, and this pointer is always null.
SymbolImpl is immutable, and it will never be registered with a SymbolRegistry
after it is created. Hence, this member is wasteful.

Instead, we add a new derived class RegisteredSymbolImpl, which will set a flag in
SymbolImpl to indicate that it is registered with a SymbolRegistry. The only way to
create a RegisteredSymbolImpl is via a factory method provided by the SymbolRegistry.
The factory method will pass the SymbolRegistry this pointer to the RegisteredSymbolImpl's
constructor for initializing the RegisteredSymbolImpl's m_symbolRegistry field.
By doing so,

  1. We do not need to set m_symbolRegistry after creating a Symbol. It is clean.
  2. We reduce the size of SymbolImpls that do not need to be registered.
  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::~StringImpl):

  • wtf/text/StringImpl.h:
  • wtf/text/SymbolImpl.cpp:

(WTF::SymbolImpl::create):
(WTF::RegisteredSymbolImpl::create):

  • wtf/text/SymbolImpl.h:

(WTF::SymbolImpl::hashForSymbol):
(WTF::SymbolImpl::isRegistered):
(WTF::SymbolImpl::SymbolImpl):
(WTF::RegisteredSymbolImpl::symbolRegistry):
(WTF::RegisteredSymbolImpl::clearSymbolRegistry):
(WTF::RegisteredSymbolImpl::RegisteredSymbolImpl):
(WTF::SymbolImpl::symbolRegistry):

  • wtf/text/SymbolRegistry.cpp:

(WTF::SymbolRegistry::~SymbolRegistry):
(WTF::SymbolRegistry::symbolForKey):
(WTF::SymbolRegistry::keyForSymbol):
(WTF::SymbolRegistry::remove):

  • wtf/text/SymbolRegistry.h:
12:53 AM Changeset in webkit [218065] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, update test results part 3
https://bugs.webkit.org/show_bug.cgi?id=173227

  • microbenchmarks/regexp-prototype-search-observable-side-effects.js:

Jun 10, 2017:

11:30 PM Changeset in webkit [218064] by Carlos Garcia Campos
  • 8 edits
    6 deletes in trunk/Source/WebKit2

[GTK] Remove WKFullScreenClientGtk
https://bugs.webkit.org/show_bug.cgi?id=173140

Reviewed by Michael Catanzaro.

It's only used internally in the GTK+ API. Implementation is a lot simpler without using it, we can simply use
either WebKitWebView or WebKitWebViewBase from PageClient directly.

  • PlatformGTK.cmake:
  • UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp: Removed.
  • UIProcess/API/C/gtk/WKFullScreenClientGtk.h: Removed.
  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::isFullScreen):
(WebKit::PageClientImpl::enterFullScreen):
(WebKit::PageClientImpl::exitFullScreen):

  • UIProcess/API/gtk/WebKitFullscreenClient.cpp: Removed.
  • UIProcess/API/gtk/WebKitFullscreenClient.h: Removed.
  • UIProcess/API/gtk/WebKitPrivate.h:
  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewConstructed):
(webkitWebViewEnterFullScreen):
(webkitWebViewExitFullScreen):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseEnterFullScreen):
(webkitWebViewBaseExitFullScreen):
(webkitWebViewBaseIsFullScreen):

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/WebKitWebViewPrivate.h:
  • UIProcess/gtk/WebFullScreenClientGtk.cpp: Removed.
  • UIProcess/gtk/WebFullScreenClientGtk.h: Removed.
11:28 PM Changeset in webkit [218063] by Carlos Garcia Campos
  • 6 edits in trunk/Source/WebKit2

[GTK] Handle page download request in WebKitWebView directly
https://bugs.webkit.org/show_bug.cgi?id=173137

Reviewed by Žan Doberšek.

We don't need to pass through WebKitWebViewBase, since the base doesn't have an implementation.

  • UIProcess/API/gtk/PageClientImpl.cpp:

(WebKit::PageClientImpl::handleDownloadRequest):

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkitWebViewConstructed):
(webkitWebViewHandleDownloadRequest):

  • UIProcess/API/gtk/WebKitWebViewBase.cpp:

(webkitWebViewBaseSetDownloadRequestHandler): Deleted.
(webkitWebViewBaseHandleDownloadRequest): Deleted.

  • UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
  • UIProcess/API/gtk/WebKitWebViewPrivate.h:
11:25 PM Changeset in webkit [218062] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] Use a lambda in webkit_cookie_manager_get_accept_policy instead of toGenericCallbackFunction
https://bugs.webkit.org/show_bug.cgi?id=173134

Reviewed by Žan Doberšek.

It's simpler and easier to read.

  • UIProcess/API/gtk/WebKitCookieManager.cpp:

(webkit_cookie_manager_get_accept_policy):
(webkitCookieManagerGetAcceptPolicyCallback): Deleted.

7:16 PM Changeset in webkit [218061] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/layout-node
https://bugs.webkit.org/show_bug.cgi?id=173203

Reviewed by Jon Lee.

The "visible" property no longer sets "display: initial" when true, but rather removes the "display" property altogether.

  • media/modern-media-controls/layout-node/visible-expected.txt:
  • media/modern-media-controls/layout-node/visible.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
7:14 PM Changeset in webkit [218060] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Enable media/modern-media-controls/layout-item
https://bugs.webkit.org/show_bug.cgi?id=173202

Reviewed by Jon Lee.

  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
7:12 PM Changeset in webkit [218059] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/invalid-placard
https://bugs.webkit.org/show_bug.cgi?id=173201

Reviewed by Jon Lee.

The only required change was to update IconButton to Button since IconButton has been folded in its superclass Button.

  • media/modern-media-controls/invalid-placard/invalid-placard-constrained-metrics-expected.txt:
  • media/modern-media-controls/invalid-placard/invalid-placard-constrained-metrics.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
7:10 PM Changeset in webkit [218058] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline media/modern-media-controls/icon-service
https://bugs.webkit.org/show_bug.cgi?id=173200

Reviewed by Jon Lee.

The method we were testing has changed name and the pause icon is no longer a good
test since it doesn't have a fullscreen variant, so we use the AirPlay icon instead.

  • media/modern-media-controls/icon-service/icon-service-expected.txt:
  • media/modern-media-controls/icon-service/icon-service.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
6:37 PM Changeset in webkit [218057] by mitz@apple.com
  • 31 edits in trunk

Reverted r218056 because it made the IDE reindex constantly.

PerformanceTests:

  • MediaTime/Configurations/DebugRelease.xcconfig:

Source/bmalloc:

  • Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore/PAL:

  • Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit/mac:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit2:

  • Configurations/DebugRelease.xcconfig:

Source/WTF:

  • Configurations/DebugRelease.xcconfig:

Tools:

  • ContentExtensionTester/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • ImageDiff/cg/Configurations/DebugRelease.xcconfig:
  • MiniBrowser/Configurations/DebugRelease.xcconfig:
  • MobileMiniBrowser/Configurations/DebugRelease.xcconfig:
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig:
  • WebEditingTester/Configurations/DebugRelease.xcconfig:
  • WebKitTestRunner/Configurations/DebugRelease.xcconfig:
1:32 PM Changeset in webkit [218056] by mitz@apple.com
  • 31 edits in trunk

[Xcode] With Xcode 9 developer beta, everything rebuilds when switching between command-line and IDE
https://bugs.webkit.org/show_bug.cgi?id=173223

Reviewed by Sam Weinig.

The rebuilds were happening due to a difference in the compiler options that the IDE and
xcodebuild were specifying. Only the IDE was passing the -index-store-path option. To make
xcodebuild pass that option, too, set CLANG_INDEX_STORE_ENABLE to YES if it is unset, and
specify an appropriate path in CLANG_INDEX_STORE_PATH.

PerformanceTests:

  • MediaTime/Configurations/DebugRelease.xcconfig:

Source/bmalloc:

  • Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore:

  • Configurations/DebugRelease.xcconfig:

Source/WebCore/PAL:

  • Configurations/DebugRelease.xcconfig:

Source/WebInspectorUI:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit/mac:

  • Configurations/DebugRelease.xcconfig:

Source/WebKit2:

  • Configurations/DebugRelease.xcconfig:

Source/WTF:

  • Configurations/DebugRelease.xcconfig:

Tools:

  • ContentExtensionTester/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • ImageDiff/cg/Configurations/DebugRelease.xcconfig:
  • MiniBrowser/Configurations/DebugRelease.xcconfig:
  • MobileMiniBrowser/Configurations/DebugRelease.xcconfig:
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig:
  • WebEditingTester/Configurations/DebugRelease.xcconfig:
  • WebKitTestRunner/Configurations/DebugRelease.xcconfig:
12:51 PM Changeset in webkit [218055] by Jonathan Bedard
  • 6 edits in trunk/Tools

webkitpy: Reduce polling in ServerProcess
https://bugs.webkit.org/show_bug.cgi?id=173116

Reviewed by Ryosuke Niwa.

We should be smarter about polling. We do not need to poll every time a line is read from
stdout and stderr since lines are usually read from cached data. We should only poll
when extracting that cached data from stdout and stderr.

  • Scripts/webkitpy/port/driver.py:

(Driver._read_block): Rely on output of the ServerProcess to detect a crash or a timeout
and on ServerProcess to poll the process if not data is available in stdout and stderr.

  • Scripts/webkitpy/port/driver_unittest.py:

(DriverTest.test_read_block_crashed_process): Test that the Driver will handle a crashing
ServerProcess.

  • Scripts/webkitpy/port/server_process.py:

(ServerProcess._read): Allow for data to be read from _output even if the process has
crashed. Only poll the process if data needs to be extracted from stdout or stderr.

  • Scripts/webkitpy/port/server_process_mock.py:

(MockServerProcess): Add number_of_times_polled.
(MockServerProcess.poll): Increment number_of_times_polled.
(MockServerProcess.has_crashed): Poll before returning crash state.
(MockServerProcess.read_stdout_line): MockServerProcess should return None if it has crashed,
just like a ServerProcess would.
(MockServerProcess.read_stdout): Ditto.

  • Scripts/webkitpy/port/server_process_unittest.py:

(TestServerProcess.test_basic): Use stdin.readline() instead of time.sleep() to prevent the
process from ending before stdout and stderr are read. This is the reason this test was flakey.
(TestServerProcess):
(TestServerProcess.test_process_crashing): Test that when a process crashes, data can be read until
the processes is polled.
(TestServerProcess.test_process_crashing_no_data): Test that when a process which has not output any
data to stdout and stderr crashes, ServerProcess._read(...) polls the process to detect the crash.

12:20 PM Changeset in webkit [218054] by Yusuke Suzuki
  • 2 edits in trunk/JSTests

Unreviewed, update test results part 2
https://bugs.webkit.org/show_bug.cgi?id=173227

  • test262.yaml:
11:35 AM Changeset in webkit [218053] by Yusuke Suzuki
  • 3 edits in trunk/JSTests

Unreviewed, update test results
https://bugs.webkit.org/show_bug.cgi?id=173227

  • microbenchmarks/string-prototype-search-observable-side-effects.js:
  • test262.yaml:
11:33 AM Changeset in webkit [218052] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

[macOS] REGRESSION: Link drag images blend into the background in Sierra and earlier
https://bugs.webkit.org/show_bug.cgi?id=172933
<rdar://problem/32580649>

Reviewed by Tim Horton.

  • platform/mac/DragImageMac.mm:

(WebCore::createDragImageForLink): When targeting macOS Sierra and earlier, give the link

drag image a drop shadow that resembles the one that macOS High Sierra applies to drag
image layers.

11:01 AM Changeset in webkit [218051] by Yusuke Suzuki
  • 4 edits in trunk

[JSC] Update RegExp.prototype.[@@search]] implementation according to the latest spec
https://bugs.webkit.org/show_bug.cgi?id=173227

Reviewed by Mark Lam.

JSTests:

Update the test.

  • es6/Proxy_internal_get_calls_RegExp.prototype[Symbol.search].js:

Source/JavaScriptCore:

The latest spec introduces slight change to RegExp.prototype.[@@search].
This patch applies this change. Basically, this change is done in the slow path of
the RegExp.prototype[@@search].
https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search

  • builtins/RegExpPrototype.js:

(search):

12:25 AM Changeset in webkit [218050] by aestes@apple.com
  • 4 edits in trunk

[QuickLook] PreviewLoader needs to check if its ResourceLoader has reached the terminal state before calling didReceiveResponse() and friends
https://bugs.webkit.org/show_bug.cgi?id=173190
<rdar://problem/31360659>

Reviewed by Brady Eidson.
Source/WebCore:

WebPreviewLoader's SubresourceLoader can reach a terminal state while data is loading from
QLPreviewConverter (the user can cancel, for instance). We can't call functions like
didReceiveResponse() in this state, because the loader no longer points to a CachedResource,
leading to null pointer dereferences.

Fix this in WebPreviewLoader by checking if the SubresourceLoader is in a terminal state
before calling didReceiveResponse(), didReceiveData(), didFinishLoading(), and didFail().

Fixes web process crashes in the QuickLook.CancelNavigationAfterResponse API test.

  • loader/ios/PreviewLoader.mm:

(-[WebPreviewLoader _sendDidReceiveResponseIfNecessary]):
(-[WebPreviewLoader connection:didReceiveData:lengthReceived:]):
(-[WebPreviewLoader connectionDidFinishLoading:]):
(-[WebPreviewLoader connection:didFailWithError:]):

Tools:

Added a release assert that tries to create a proper test failure if the web process crashes.

  • TestWebKitAPI/Tests/WebKit2Cocoa/QuickLook.mm:

(-[QuickLookDecidePolicyDelegate _webViewWebProcessDidCrash:]):

12:13 AM Changeset in webkit [218049] by Devin Rousso
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r217749): Event listeners are removed even if they haven't been added
https://bugs.webkit.org/show_bug.cgi?id=173185

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel):
(WebInspector.ResourceDetailsSidebarPanel.prototype.set resource):
(WebInspector.ResourceDetailsSidebarPanel.prototype._applyResourceEventListeners):
Maintain a member variable flag such that event listeners are only removed if it is true.
It is only set to true once the event listeners are added.

Jun 9, 2017:

10:24 PM Changeset in webkit [218048] by Chris Dumez
  • 13 edits in trunk/Source/WebCore

Use WTF::Function instead of std::function in indexeddb code
https://bugs.webkit.org/show_bug.cgi?id=173198

Reviewed by Sam Weinig.

Use WTF::Function instead of std::function in indexeddb code to avoid copying.

  • Modules/indexeddb/IDBFactory.cpp:

(WebCore::IDBFactory::getAllDatabaseNames):

  • Modules/indexeddb/IDBFactory.h:
  • Modules/indexeddb/client/IDBConnectionProxy.cpp:

(WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNames):

  • Modules/indexeddb/client/IDBConnectionProxy.h:
  • Modules/indexeddb/client/IDBConnectionToServer.cpp:

(WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNames):

  • Modules/indexeddb/client/IDBConnectionToServer.h:
  • Modules/indexeddb/client/TransactionOperation.h:

(WebCore::IDBClient::TransactionOperation::doComplete):

  • Modules/indexeddb/server/IDBServer.cpp:

(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
(WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):

  • Modules/indexeddb/server/IDBServer.h:
  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError):
(WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::createIndex):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::getRecord):
(WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
(WebCore::IDBServer::UniqueIDBDatabase::getCount):
(WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
(WebCore::IDBServer::UniqueIDBDatabase::openCursor):
(WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):

  • Modules/indexeddb/server/UniqueIDBDatabase.h:
10:19 PM Changeset in webkit [218047] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Tried to fix the build when targrting macOS 10.12 using the macOS 10.13 developer beta SDK.

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval):

10:11 PM Changeset in webkit [218046] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit2

Crash inside WebKit::PluginView::getAuthenticationInfo
https://bugs.webkit.org/show_bug.cgi?id=173083
<rdar://problem/32513144>

Address Darin's review comment.

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::getAuthenticationInfo):

10:11 PM Changeset in webkit [218045] by yoav@yoav.ws
  • 2 edits in trunk/Source/WebCore

[preload] Fix builds with ENABLE_VIDEO_TRACK set to false
https://bugs.webkit.org/show_bug.cgi?id=173221

Reviewed by Chris Dumez.

https://bugs.webkit.org/show_bug.cgi?id=173047 introduced a build error for builds with video track support disabled.
This fixes that build issue.

No new tests since there's no functional change.

  • html/HTMLLinkElement.cpp:

(WebCore::HTMLLinkElement::as):

10:08 PM Changeset in webkit [218044] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

IsInShadowTreeFlag does not get updated for a non-container node
https://bugs.webkit.org/show_bug.cgi?id=173084

Address Darin's review comment.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument):
(WebCore::notifyNodeInsertedIntoTree):
(WebCore::notifyNodeRemovedFromDocument):

9:38 PM Changeset in webkit [218043] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Fixed building with the macOS 10.13 Apple Internal SDK when targeting macOS 10.12.

  • platform/spi/mac/AVFoundationSPI.h:
9:35 PM Changeset in webkit [218042] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: REGRESSION(r217258): Misspelled variable names
https://bugs.webkit.org/show_bug.cgi?id=173189

Reviewed by Joseph Pecoraro.

  • UserInterface/Base/Main.js:

(WebInspector.tabContentViewClassForRepresentedObject):

  • UserInterface/Views/ResourceIcons.css:

(.large :matches(.resource-icon.resource-type-stylesheet, .stylesheet-icon) .icon):
(.large .resource-icon.resource-type-stylesheet .icon): Deleted.

9:32 PM Changeset in webkit [218041] by beidson@apple.com
  • 5 edits
    3 adds in trunk

Crash when IndexedDB's getAll is used inside a Web Worker.
https://bugs.webkit.org/show_bug.cgi?id=172434

Reviewed by Andy Estes.

Source/WebCore:

Test: storage/indexeddb/modern/worker-getall.html

  • Modules/indexeddb/IDBGetAllResult.cpp:

(WebCore::IDBGetAllResult::IDBGetAllResult): Add an isolated-copying constructor.
(WebCore::IDBGetAllResult::isolatedCopy):

  • Modules/indexeddb/IDBGetAllResult.h:
  • Modules/indexeddb/shared/IDBResultData.cpp:

(WebCore::IDBResultData::isolatedCopy): Actually copy the IDBGetAllResult.

LayoutTests:

  • storage/indexeddb/modern/resources/worker-getall.js: Added.
  • storage/indexeddb/modern/worker-getall-expected.txt: Added.
  • storage/indexeddb/modern/worker-getall.html: Added.
9:30 PM Changeset in webkit [218040] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed attempt to fix Mac build after r218039.

  • loader/ResourceLoader.cpp:

(WebCore::ResourceLoader::loadDataURL):

  • platform/network/DataURLDecoder.h:
9:07 PM Changeset in webkit [218039] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Use WTF::Function instead of std::function in DataURLDecoder
https://bugs.webkit.org/show_bug.cgi?id=173194

Reviewed by Sam Weinig.

Use WTF::Function instead of std::function in DataURLDecoder to avoid copying.

  • platform/network/DataURLDecoder.cpp:

(WebCore::DataURLDecoder::DecodeTask::DecodeTask):
(WebCore::DataURLDecoder::createDecodeTask):

  • platform/network/DataURLDecoder.h:
7:51 PM Changeset in webkit [218038] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Image should clear its ImageObserver* when CachedImage releases the last reference to its RefCounted<ImageObserver>
https://bugs.webkit.org/show_bug.cgi?id=173077

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

Before dereferencing ImageObserver, CachedImage::clearImage() should check
whether it is the only object that holds a reference to this ImageObserver.
And if this is true, m_image have to clear its raw pointer to the deleted
ImageObserver by calling m_image->setImageObserver(nullptr).

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setBodyDataFrom):
(WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
(WebCore::CachedImage::clearImage):

  • loader/cache/CachedImage.h:
7:11 PM Changeset in webkit [218037] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Attempt to fix layout test failures following <https://trac.webkit.org/changeset/218028/webkit>
(https://bugs.webkit.org/show_bug.cgi?id=158121)
<rdar://problem/26012994>

For now, if we do not have a frame then consider the document a secure context. One way this can happen
is the page accesses a frame that was removed from the document as demonstrated by the test:
fast/dom/Window/property-access-on-cached-window-after-frame-removed.html. Treating a frameless
document as a secure context also matches Blink's implementation:
<https://chromium.googlesource.com/chromium/src/+/fc202b2b1174f5732f7b9e63a6c46fd01ac2be02/third_party/WebKit/Source/core/dom/Document.cpp#4079>.

  • dom/Document.cpp:

(WebCore::Document::isSecureContext):

6:14 PM Changeset in webkit [218036] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25.1

Tag Safari-604.1.25.1.

6:14 PM Changeset in webkit [218035] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-604.1.25.1

Remove tag.

6:12 PM Changeset in webkit [218034] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25.1/safari-604.1.25-branch

Tag Safari-604.1.25.1.

6:07 PM Changeset in webkit [218033] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25.1

Tag Safari-604.1.25.1.

5:56 PM Changeset in webkit [218032] by matthew_hanson@apple.com
  • 36 edits
    13 deletes in tags/Safari-604.1.25

Cherry-pick r218009. rdar://problem/32677465

5:37 PM Changeset in webkit [218031] by Ryan Haddad
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r218003.

This change caused assertion failures in existing LayoutTests.

Reverted changeset:

"Image should clear its ImageObserver* when CachedImage
releases the last reference to its RefCounted<ImageObserver>"
https://bugs.webkit.org/show_bug.cgi?id=173077
http://trac.webkit.org/changeset/218003

5:08 PM Changeset in webkit [218030] by jiewen_tan@apple.com
  • 6 edits in trunk/Source/WebCore

[WebCrypto] Remove unsupported CryptoAlgorithmIdentifier
https://bugs.webkit.org/show_bug.cgi?id=173128
<rdar://problem/32666826>

Reviewed by Brent Fulgham.

This patch remove AES_CMAC, DH and CONCAT as they are not implemented and not recommended
by the spec. Hence there is no plan to support them in short term.

No change of behaviour.

  • bindings/js/JSCryptoAlgorithmDictionary.cpp:

(WebCore::JSCryptoAlgorithmDictionary::createParametersForEncrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDecrypt):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForSign):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForVerify):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDigest):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForGenerateKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForDeriveBits):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForImportKey):
(WebCore::JSCryptoAlgorithmDictionary::createParametersForExportKey):

  • bindings/js/JSSubtleCryptoCustom.cpp:

(WebCore::normalizeCryptoAlgorithmParameters):
(WebCore::supportExportKeyThrow):

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::read):

  • crypto/CryptoAlgorithmIdentifier.h:
  • crypto/keys/CryptoKeyAES.cpp:

(WebCore::CryptoKeyAES::isValidAESAlgorithm):

5:00 PM Changeset in webkit [218029] by Ryan Haddad
  • 2 edits in trunk/LayoutTests

Mark fast/mediastream/getUserMedia-grant-persistency3.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173188

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
4:56 PM Changeset in webkit [218028] by dbates@webkit.org
  • 12 edits in trunk/Source/WebCore

Implement W3C Secure Contexts Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/26012994>

Reviewed by Alex Christensen.

Part 2

Implements the Secure Contexts spec., <https://w3c.github.io/webappsec-secure-contexts/> (Editor's
Draft, 17 November 2016) except for the allow-secure-context sandbox flag and restrictions on window.opener
as the former is at risk of being dropped from the specification and the latter is being discussed in
<https://github.com/w3c/webappsec-secure-contexts/issues/42>. We are not making use of the Secure
Contexts functionality at the moment. We will make use of it in a subsequent commit.

  • dom/Document.cpp:

(WebCore::Document::isSecureContext): Added,

  • dom/Document.h:
  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::isSecureContext): Deleted; moved to class SecurityContext.

  • dom/SecurityContext.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::isSecureContext): Added.

  • page/DOMWindow.h:
  • page/SecurityOrigin.cpp:

(WebCore::isLoopbackIPAddress): Convenience function to determine whether the host portion
of the specified URL is a valid loopback address.
(WebCore::shouldTreatAsPotentionallyTrustworthy): Implements the "Is origin potentially trustworthy?"
algorithm from the Secure Context specification.
(WebCore::SecurityOrigin::SecurityOrigin): Compute whether this origin is potentially trustworthy.
Also, use C++ brace initialization syntax in member initialization list.

  • page/SecurityOrigin.h:

(WebCore::SecurityOrigin::isPotentionallyTrustworthy): Added.

  • page/WindowOrWorkerGlobalScope.idl: Expose attribute isSecureContext. Fix style nit; remove

period from a comment that is not meant to be a complete sentence.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::isSecureContext): Added.

  • workers/WorkerGlobalScope.h:
4:38 PM Changeset in webkit [218027] by dbates@webkit.org
  • 13 edits in trunk/Source/WebCore

Implement W3C Secure Contexts Draft Specification
https://bugs.webkit.org/show_bug.cgi?id=158121
<rdar://problem/26012994>

Reviewed by Chris Dumez.

Part 1

Teach the bindings code generator to generate a runtime check for an interface, attribute or
function annotated with the extended attribute [SecureContext]. For now, the runtime check
(ScriptExecutionContext::isSecureContext()) always returns true. We will flesh out the
implementation of this runtime check in a subsequent commit.

  • bindings/scripts/CodeGeneratorJS.pm:

(NeedsRuntimeCheck):
(GenerateRuntimeEnableConditionalString):
Generate a runtime check for an interface, attribute, or function that is annotated with
the extended attribute [SecureContext].

  • bindings/scripts/IDLAttributes.json: Update JSON now that we support SecureContext.
  • bindings/scripts/preprocess-idls.pl:

(GenerateConstructorAttributes): Add the SecureContext extended attribute to a constructor,
if applicable.

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

(WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
(WebCore::IDLAttribute<JSTestGenerateIsReachable>::cast):
(WebCore::jsTestGenerateIsReachableASecretAttributeGetter):
(WebCore::jsTestGenerateIsReachableASecretAttribute):

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

(WebCore::JSTestGlobalObject::finishCreation):
(WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResultBody):
(WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBooleanBody):
(WebCore::jsTestGlobalObjectInstanceFunctionGetSecretBoolean):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestGlobalObjectInstanceFunctionTestFeatureGetSecretBoolean):

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

(WebCore::JSTestNodePrototype::finishCreation):
(WebCore::jsTestNodePrototypeFunctionCalculateSecretResultBody):
(WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
(WebCore::jsTestNodePrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestNodePrototypeFunctionGetSecretBoolean):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestNodePrototypeFunctionTestFeatureGetSecretBoolean):

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

(WebCore::JSTestObjPrototype::finishCreation):
(WebCore::jsTestObjPrototypeFunctionCalculateSecretResultBody):
(WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
(WebCore::jsTestObjPrototypeFunctionGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionGetSecretBoolean):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBooleanBody):
(WebCore::jsTestObjPrototypeFunctionTestFeatureGetSecretBoolean):
Update expected results.

  • bindings/scripts/test/TestGenerateIsReachable.idl:
  • bindings/scripts/test/TestGlobalObject.idl:
  • bindings/scripts/test/TestNode.idl:
  • bindings/scripts/test/TestObj.idl:

Add test cases.

  • dom/ScriptExecutionContext.h:

(WebCore::ScriptExecutionContext::isSecureContext): Added. For now, always returns true.
We will implement this function in a subsequent commit.

4:13 PM Changeset in webkit [218026] by dbates@webkit.org
  • 2 edits in trunk/LayoutTests

CSP: Apply img-src directive to favicon loads
https://bugs.webkit.org/show_bug.cgi?id=172733

Remove CONSOLE MESSAGE line from expected result that I inadvertently left in from an earlier iteration
of the test that did not call testRunner.queueReload(). Calling testRunner.queueReload() clears out
any emitted console messages. The dump of the resource load callbacks is sufficient to ensure that
the favicon was blocked as expected.

  • http/tests/security/contentSecurityPolicy/block-favicon-expected.txt:
3:45 PM Changeset in webkit [218025] by Darin Adler
  • 4 edits in trunk/LayoutTests

REGRESSION: LayoutTest js/intl-datetimeformat.html is failing
https://bugs.webkit.org/show_bug.cgi?id=172720

Patch by Andy VanWagoner <thetalecrafter@gmail.com> on 2017-06-09
Reviewed by Darin Adler.

Reenable DateTimeFormat tests, allowing for some variation in the
formatting of time zone names.

  • js/intl-datetimeformat-expected.txt:
  • js/script-tests/intl-datetimeformat.js:
  • platform/mac/TestExpectations:
3:38 PM Changeset in webkit [218024] by Chris Dumez
  • 9 edits in trunk/Source/WebKit2

Use WTF::Function instead of std::function in NetworkProcess code
https://bugs.webkit.org/show_bug.cgi?id=173182

Reviewed by Alex Christensen.

Use WTF::Function instead of std::function in NetworkProcess code to avoid
unnecessary copying.

  • NetworkProcess/NetworkProcess.h:
  • NetworkProcess/cache/NetworkCacheIOChannel.h:
  • NetworkProcess/cache/NetworkCacheIOChannelCocoa.mm:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp:

(WebKit::NetworkCache::IOChannel::read):
(WebKit::NetworkCache::IOChannel::readSyncInThread):
(WebKit::NetworkCache::IOChannel::write):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoad.h:
  • NetworkProcess/cache/NetworkCacheStatistics.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::clearNSURLCache):
(WebKit::NetworkProcess::clearDiskCache):

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::clearDiskCache):

3:35 PM Changeset in webkit [218023] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebKit2

REGRESSION (r213584): WeChat app can not switch to next text field
https://bugs.webkit.org/show_bug.cgi?id=173183
<rdar://problem/32323478>

Reviewed by Wenson Hsieh.

  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/ios/InputViewUpdateDeferrer.mm:

(WebKit::InputViewUpdateDeferrer::~InputViewUpdateDeferrer):
It turns out that _endIgnoringReloadInputViews doesn't actually perform
the update if there was one ignored. It does, however, return whether
there was a change ignored, and we can force an update.

This remains untestable without sizable additional API test infrastructure
for the same reasons as the original patch.

3:16 PM Changeset in webkit [218022] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Make sure we protect |this| in lambdas in WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver()
https://bugs.webkit.org/show_bug.cgi?id=173174
<rdar://problem/32598919>

Reviewed by Darin Adler.

Follow-up fix to r218006, which caused a crash on the bots. We cannot WTFMove() protectedThis
here because the callback gets called several times.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

3:09 PM Changeset in webkit [218021] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

Crash in -[WKWebView _initializeWithConfiguration:]
https://bugs.webkit.org/show_bug.cgi?id=173126
<rdar://problem/32664993>

Reviewed by Darin Adler.

Follow up to previous fix; when setting NSString properties, store a copy of
the string rather than the NSString itself.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _overrideContentSecurityPolicy]):
(-[WKWebViewConfiguration _setOverrideContentSecurityPolicy:]):
(-[WKWebViewConfiguration _setMediaContentTypesRequiringHardwareSupport:]):

2:59 PM Changeset in webkit [218020] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Web Inspector: Web inspector does not show non-shadow children of an element with a shadow root (e.g. <video>)
https://bugs.webkit.org/show_bug.cgi?id=173121
<rdar://problem/30948943>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-09
Reviewed by Matt Baker.

Source/WebInspectorUI:

  • UserInterface/Models/DOMNode.js:

(WebInspector.DOMNode):
Only populate _children when we have both the shadowRoots and
actual children payloads. Backends always send shadowRoots but
only send children when requested. So if we have shadowRoots
but expect actual children, don't populate _children until we
request the child nodes.

LayoutTests:

  • inspector/dom/shadow-and-non-shadow-children-expected.txt: Added.
  • inspector/dom/shadow-and-non-shadow-children.html: Added.
2:53 PM Changeset in webkit [218019] by commit-queue@webkit.org
  • 3 edits in trunk/LayoutTests

LayoutTest fast/images/animated-image-different-dest-size.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=170203

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

Instead of using setTimeout(), listen to the webkitImageFrameReady event
to know relaibly when to draw the next frame of an animated image to a
canvas.

  • fast/images/animated-image-different-dest-size.html:
  • platform/mac-wk2/TestExpectations:
2:25 PM Changeset in webkit [218018] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Skipped layout test svg/animations/svglength-element-removed-crash.svg.
https://bugs.webkit.org/show_bug.cgi?id=173178

Unreviewed test gardening.

  • platform/ios-simulator-wk2/TestExpectations:
2:09 PM Changeset in webkit [218017] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Use WTF::Function instead of std::function in StorageManager
https://bugs.webkit.org/show_bug.cgi?id=173177

Reviewed by Brady Eidson.

Use WTF::Function instead of std::function in StorageManager. This eliminates some
potential implicit copying of captured variables, which is important here because
we pass those lambdas to other threads.

  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::getSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageOrigins):
(WebKit::StorageManager::deleteSessionStorageEntriesForOrigins):
(WebKit::StorageManager::getLocalStorageOrigins):
(WebKit::StorageManager::getLocalStorageOriginDetails):
(WebKit::StorageManager::deleteLocalStorageOriginsModifiedSince):
(WebKit::StorageManager::deleteLocalStorageEntriesForOrigins):

  • UIProcess/Storage/StorageManager.h:
1:55 PM Changeset in webkit [218016] by jer.noble@apple.com
  • 8 edits in trunk/Source/WebCore

Media elements are allowed to continue to load media data after navigation
https://bugs.webkit.org/show_bug.cgi?id=173179

Reviewed by Eric Carlson.

Deny media sessions the ability to load media data when suspended.

  • Modules/webaudio/AudioContext.cpp:

(WebCore::AudioContext::isSuspended):

  • Modules/webaudio/AudioContext.h:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::isSuspended):

  • html/HTMLMediaElement.h:
  • platform/audio/PlatformMediaSession.cpp:

(WebCore::PlatformMediaSession::isSuspended):

  • platform/audio/PlatformMediaSession.h:

(WebCore::PlatformMediaSessionClient::isSuspended):

  • platform/audio/PlatformMediaSessionManager.cpp:

(WebCore::PlatformMediaSessionManager::sessionCanLoadMedia):

1:45 PM Changeset in webkit [218015] by dbates@webkit.org
  • 16 edits
    4 adds in trunk

CSP: Apply img-src directive to favicon loads
https://bugs.webkit.org/show_bug.cgi?id=172733
<rdar://problem/32082654>

Reviewed by Brady Eidson.

Source/WebCore:

Differentiate favicon requests from raw resources requests so that we can apply the Content
Security Policy to favicon requests.

Tests: http/tests/security/contentSecurityPolicy/allow-favicon.html

http/tests/security/contentSecurityPolicy/block-favicon.html

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResourceContent): Keep our current behavior and treat a
favicon resource analogous to a raw resource.
(WebCore::InspectorPageAgent::cachedResourceType): Ditto.

  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient): Now that we differentiate between a favicon
and a raw resource we add favicons to the list of unsupported <link as="..."> types. This
makes the list of handled request destination types more closely match the list of valid types
documented in <https://fetch.spec.whatwg.org/#concept-request-destination> (24 May 2017).

  • loader/ResourceLoadInfo.cpp:

(WebCore::toResourceType): Keep our current behavior and treat a favicon resource analogous
to a raw resource.

  • loader/SubresourceLoader.cpp:

(WebCore::logResourceLoaded): Ditto.

  • loader/cache/CachedRawResource.cpp:

(WebCore::CachedRawResource::CachedRawResource): Update for renaming.

  • loader/cache/CachedRawResource.h:

(isType): Ditto.

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::defaultPriorityForResourceType): Keep our current behavior and treat
a favicon resource analogous to a raw resource.

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::isMainOrMediaOrFaviconOrRawResource): Renamed; formerly named isMainOrMediaOrRawResource.
Also return true if the this resource is a favicon.
(WebCore::CachedResource::ignoreForRequestCount): Keep our current behavior and treat a
favicon resource analogous to a raw resource.
(WebCore::CachedResource::isMainOrMediaOrRawResource): Deleted; renamed to isMainOrMediaOrFaviconOrRawResource.

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::createResource): Keep our current behavior and treat a favicon resource analogous
to a raw resource.
(WebCore::CachedResourceLoader::requestFavicon): Added.
(WebCore::contentTypeFromResourceType): Keep our current behavior and treat a favicon
resource analogous to a raw resource.
(WebCore::CachedResourceLoader::checkInsecureContent): Ditto.
(WebCore::CachedResourceLoader::allowedByContentSecurityPolicy): Check if the favicon is
allowed by the CSP of the page.
(WebCore::CachedResourceLoader::determineRevalidationPolicy): Update for renaming.

  • loader/cache/CachedResourceLoader.h:
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::startLoading): Substitute call CachedResourceLoader::requestFavicon() for CachedResourceLoader::requestRawResource()
and remove comment about ContentSecurityPolicyImposition::DoPolicyCheck being a placeholder. This is no longer the
case. This resource request option is now meaningful as we want to apply the CSP of the page with respect to the
request for the favicon.

Source/WebKit2:

Return 0 seconds for the maximum buffering time for favicons (no change in behavior).

  • WebProcess/Network/WebLoaderStrategy.cpp:

(WebKit::maximumBufferingTime):

LayoutTests:

Adds tests to ensure the CSP policy is applied to favicon loads.

  • http/tests/security/contentSecurityPolicy/allow-favicon-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/allow-favicon.html: Added.
  • http/tests/security/contentSecurityPolicy/block-favicon-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/block-favicon.html: Added.
  • platform/wk2/TestExpectations: Skip the tests until we fix <https://bugs.webkit.org/show_bug.cgi?id=115809>.
1:10 PM Changeset in webkit [218014] by wenson_hsieh@apple.com
  • 25 edits in trunk

[iOS DnD] Add a hook to perform two-step drops in editable content
https://bugs.webkit.org/show_bug.cgi?id=172992
<rdar://problem/32590174>

Reviewed by Tim Horton.

Source/WebCore:

Adds hooks in DragController::concludeEditDrag to give the client layer a chance to perform custom handling when
dropping in editable content.
Tests: DataInteractionTests.InjectedBundleOverridePerformTwoStepDrop

DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop

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

(WebCore::DragController::concludeEditDrag):

  • page/EditorClient.h:

Source/WebKit/ios:

Add an empty implementation of performTwoStepDrop for WebDefaultUIKitDelegate. See WebCore ChangeLogs.

  • DefaultDelegates/WebDefaultUIKitDelegate.m:

(-[WebDefaultUIKitDelegate performTwoStepDrop:atDestination:isMove:]):

  • WebView/WebUIKitDelegate.h:

Source/WebKit/mac:

Adds a new SPI to WebUIKitDelegate to allow WK1 clients to override default drop behavior. Returning YES from
-performTwoStepDrop:atDestination:isMove: will prevent content from being inserted on drop in WebKit; otherwise,
returning NO will continue with default WebKit behavior.

  • WebCoreSupport/WebEditorClient.h:
  • WebCoreSupport/WebEditorClient.mm:

(WebEditorClient::performTwoStepDrop):

Source/WebKit/win:

Add a stub implementation for performTwoStepDrop on Windows.

  • WebCoreSupport/WebEditorClient.h:

Source/WebKit2:

Add plumbing to support an injected bundle hook for overriding two-step drops. See WebCore ChangeLog.

  • WebProcess/InjectedBundle/API/APIInjectedBundleEditorClient.h:

(API::InjectedBundle::EditorClient::performTwoStepDrop):

  • WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInEditingDelegate.h:
  • WebProcess/InjectedBundle/API/c/WKBundlePageEditorClient.h:
  • WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:

(-[WKWebProcessPlugInBrowserContextController _setEditingDelegate:]):

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:

(WebKit::InjectedBundlePageEditorClient::performTwoStepDrop):

  • WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
  • WebProcess/WebCoreSupport/WebEditorClient.cpp:

(WebKit::WebEditorClient::performTwoStepDrop):

  • WebProcess/WebCoreSupport/WebEditorClient.h:

Tools:

Adds 2 new API tests to cover using the injected editing bundle to override performTwoStepDrop.
Tests: DataInteractionTests.InjectedBundleOverridePerformTwoStepDrop

DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop

  • TestWebKitAPI/Tests/WebKit2Cocoa/BundleEditingDelegatePlugIn.mm:

(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:performTwoStepDrop:atDestination:isMove:]):

Allow the BundleOverridePerformTwoStepDrop bundle parameter to determine whether or not two-step drops should
be overridden. Currently, this is overridden to just return true.

  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:

(WTR::InjectedBundlePage::InjectedBundlePage):

12:47 PM Changeset in webkit [218013] by Ryan Haddad
  • 1 edit
    1 add in trunk/LayoutTests

Add a result file for js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short.html.
https://bugs.webkit.org/show_bug.cgi?id=161156

Unreviewed test gardening.

  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short-expected.txt: Added.
12:41 PM Changeset in webkit [218012] by Chris Dumez
  • 5 edits in trunk/Source

Update Thread::create() to take in a WTF::Function instead of a std::function
https://bugs.webkit.org/show_bug.cgi?id=173175

Reviewed by Mark Lam.

Source/JavaScriptCore:

  • API/tests/CompareAndSwapTest.cpp:

(testCompareAndSwap):

Source/WTF:

Update Thread::create() to take in a WTF::Function instead of a std::function. Unlike
std::function, WTF:Function is not copyable and does not make implicit copies of captured
variables. Doing captures such as [string = string.isolatedCopy()] when passing an
std::function to another thread has lead to bugs in the past due to implicit copying of
the captured string.

  • wtf/Threading.cpp:

(WTF::Thread::create):

  • wtf/Threading.h:
12:40 PM Changeset in webkit [218011] by Brent Fulgham
  • 7 edits in trunk/Source/WebKit2

Use Function rather than std::function for thread safety in WebsiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=173172

Reviewed by Chris Dumez.
<rdar://problem/32679311>

Remove a few more instances of std::function in the WebsiteDataStore, and WTFMove completion handler to
avoid unnecessary copies.

  • Shared/WebsiteData/WebsiteDataType.h: Remove redundant WebsiteDataType from name.
  • UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:

(WebKit::toWebsiteDataType): Update for revised name.
(WebKit::toWKWebsiteDataTypes): Ditto.

  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::deleteWebsiteDataForTopPrivatelyControlledDomainsInAllPersistentDataStores): ASSERT that
this function, as well as its completion handler, are getting called from the main thread.
(WebKit::WebProcessProxy::topPrivatelyControlledDomainsWithWebiteData): Ditto.
(WebKit::WebProcessProxy::fetchWebsiteData): Move the completionHandler.
(WebKit::WebProcessProxy::deleteWebsiteData): Ditto.
(WebKit::WebProcessProxy::deleteWebsiteDataForOrigins): Ditto.

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchData): Switch to Function, and move completion handler.
(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains): Ditto.
(WebKit::WebsiteDataStore::topPrivatelyControlledDomainsWithWebsiteData): Ditto.
(WebKit::WebsiteDataStore::removeData): Ditto.
(WebKit::WebsiteDataStore::removeDataForTopPrivatelyControlledDomains): Ditto.

  • UIProcess/WebsiteData/WebsiteDataStore.h:
12:00 PM Changeset in webkit [218010] by matthew_hanson@apple.com
  • 36 edits
    13 deletes in branches/safari-604.1.25-branch

Cherry-pick r218009. rdar://problem/32677465

11:56 AM Changeset in webkit [218009] by matthew_hanson@apple.com
  • 36 edits
    13 deletes in trunk

Revert r217955. rdar://problem/21125708

11:56 AM Changeset in webkit [218008] by matthew_hanson@apple.com
  • 7 edits in trunk/Source

Versioning.

11:55 AM Changeset in webkit [218007] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[DFG] Add verboseDFGOSRExit
https://bugs.webkit.org/show_bug.cgi?id=173156

Reviewed by Saam Barati.

This patch adds verboseDFGOSRExit which is similar to verboseFTLOSRExit.

  • dfg/DFGOSRExitCompiler.cpp:
  • runtime/Options.h:
11:52 AM Changeset in webkit [218006] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Make sure we protect |this| in lambdas in WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver()
https://bugs.webkit.org/show_bug.cgi?id=173174
<rdar://problem/32598919>

Reviewed by Darin Adler.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

11:46 AM Changeset in webkit [218005] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[JSC][MIPS] Add MacroAssemblerMIPS::xor32(Address, RegisterID) implementation
https://bugs.webkit.org/show_bug.cgi?id=173170

Patch by Guillaume Emont <guijemont@igalia.com> on 2017-06-09
Reviewed by Yusuke Suzuki.

MIPS does not build since r217711 because it is missing this
implementation. This patch fixes the build.

  • assembler/MacroAssemblerMIPS.h:

(JSC::MacroAssemblerMIPS::xor32):

11:42 AM Changeset in webkit [218004] by Konstantin Tokarev
  • 3 edits in trunk/Source/WebCore

[MediaFoundation] Volume controls of different media elements should be independent
https://bugs.webkit.org/show_bug.cgi?id=172967

Based on patch by Vitaly Slobodin <vitaliy.slobodin@gmail.com>
Reviewed by Alex Christensen.

IMFSimpleAudioVolume interface controls master volume of the
application. We should use IMFAudioStreamVolume interface instead.

No new tests needed.

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:

(WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
(WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes):
(WebCore::MediaPlayerPrivateMediaFoundation::setVolume):
(WebCore::MediaPlayerPrivateMediaFoundation::setMuted):

  • platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
11:38 AM Changeset in webkit [218003] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Image should clear its ImageObserver* when CachedImage releases the last reference to its RefCounted<ImageObserver>
https://bugs.webkit.org/show_bug.cgi?id=173077

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

Before dereferencing ImageObserver, CachedImage::clearImage() should check
whether it is the only object that holds a reference to this ImageObserver.
And if this is true, m_image have to clear its raw pointer to the deleted
ImageObserver by calling m_image->setImageObserver(nullptr).

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setBodyDataFrom):
(WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
(WebCore::CachedImage::clearImage):

  • loader/cache/CachedImage.h:
11:32 AM Changeset in webkit [218002] by Chris Dumez
  • 4 edits in trunk/Source/WebKit2

Avoid some ref counting churn in WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=173168

Reviewed by Brent Fulgham.

Move the protectedThis around instead of ref'ing it every time we capture it
in a lambda. Also add a missing protectedThis in WebResourceLoadStatisticsStore::removeDataRecords()
which likely fixes crashes.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):

11:28 AM Changeset in webkit [218001] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

[ios-sim] Cleaning-up timeouts WebKit1
https://bugs.webkit.org/show_bug.cgi?id=173169

Unreviewed test gardening.

The intention of this change is to allow the iOS WK1 bots to finish their
test runs. Because these tests are being gardened based on the output of
bots, there will likely be follow-up fixes.

  • platform/ios-wk1/TestExpectations: Skip tests timing out in iOS WK1.
10:59 AM Changeset in webkit [218000] by commit-queue@webkit.org
  • 8 edits in trunk

Add flag allow-popups-to-escape-sandbox to iframe sandbox
https://bugs.webkit.org/show_bug.cgi?id=158875

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-09
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Update expected results for iframe popup escaping tests.

  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1-expected.txt: This test passes.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2-expected.txt: This test passes.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3-expected.txt: Remove error message from text expectation.

Source/WebCore:

This patch adds support for the iframe@allow-popups-to-escape-sandbox attribute.
This allows to pass more W3C Web Platform tests.

Tests: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html

imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-2.html

  • dom/SecurityContext.cpp: Add allow-popups-to-escape-sandbox flag.

(WebCore::SecurityContext::isSupportedSandboxPolicy):
(WebCore::SecurityContext::parseSandboxPolicy):

  • dom/SecurityContext.h: Ditto.
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Do not force sandbox flags when we have allow-popups-to-escape-sandbox.
(WebCore::createWindow): Ditto.

10:57 AM Changeset in webkit [217999] by jer.noble@apple.com
  • 14 edits
    2 adds in trunk

[iOS] Video occasionally mixes with other system audio instead of interrupting
https://bugs.webkit.org/show_bug.cgi?id=173127

Reviewed by Eric Carlson.

Source/WebCore:

Tests: platform/mac/audio-session-category-video-track-change.html

When an HTMLMediaElement's tracks change their enabled state, make sure to update
the PlatformMediaElement, for canProduceAudio() may have changed.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):

  • platform/audio/cocoa/MediaSessionManagerCocoa.cpp:

(PlatformMediaSessionManager::updateSessionState):

The rest of the changes in this revision are to allow the above to be testable.

  • page/Settings.cpp:
  • page/Settings.h:
  • platform/audio/AudioSession.h:
  • platform/audio/mac/AudioSessionMac.cpp:

(WebCore::AudioSession::category):
(WebCore::AudioSession::setCategory):

  • testing/InternalSettings.cpp:

(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setShouldManageAudioSessionCategory):

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

(WebCore::Internals::audioSessionCategory):

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

LayoutTests:

  • platform/mac/media/audio-session-category-video-track-change-expected.txt: Added.
  • platform/mac/media/audio-session-category-video-track-change.html: Added.
10:54 AM Changeset in webkit [217998] by Chris Dumez
  • 4 edits in trunk/Source/WTF

Update WorkQueue::concurrentApply() to take a WTF::Function instead of an std::function
https://bugs.webkit.org/show_bug.cgi?id=173165

Reviewed by Saam Barati.

Update WorkQueue::concurrentApply() to take a WTF::Function instead of an std::function
as std::function has issues with regards to thread safety.

  • wtf/WorkQueue.h:
  • wtf/cocoa/WorkQueueCocoa.cpp:

(WTF::WorkQueue::concurrentApply):

10:52 AM Changeset in webkit [217997] by Chris Dumez
  • 8 edits
    2 adds in trunk

CSS transitions added while page is not visible do not start when the page becomes visible
https://bugs.webkit.org/show_bug.cgi?id=173166
<rdar://problem/32250351>

Reviewed by Darin Adler.

Source/WebCore:

CSS transitions added while page is not visible would not start when the page becomes
visible. The issue was that when CompositeAnimation::updateTransitions() was called
while the page is hidden (and animations are therefore suspended), it would not
populate m_transations with ImplicitAnimation objects. We would therefore have later
no transitions to resume when the page becomes visible later on. This patch updates
CompositeAnimation::updateTransitions() to properly populate m_transitions and instead
pause the ImplicitAnimation it creates if animations are currently suspended. This
behavior is more consistent with the one of CompositeAnimation::updateKeyframeAnimations().

I also needed to update ImplicitAnimation::animate() to not restart a paused animation
if the animation is currently paused. This is similar to what is done in
KeyframeAnimation::animate(). Without this, the paused ImplicitAnimation we add to
m_transition would incorrectly get unpaused while the page is still hidden and the
animations are still supposed to be suspended. This issue was showing when running the
test I am adding in this patch.

Test: fast/animation/css-animation-resuming-when-visible.html

  • page/animation/CompositeAnimation.cpp:

(WebCore::CompositeAnimation::updateTransitions):

  • page/animation/ImplicitAnimation.cpp:

(WebCore::ImplicitAnimation::animate):
(WebCore::ImplicitAnimation::reset):

  • page/animation/ImplicitAnimation.h:

LayoutTests:

Add layout test coverage.

  • fast/animation/css-animation-resuming-when-visible-expected.txt: Added.
  • fast/animation/css-animation-resuming-when-visible.html: Added.
10:48 AM Changeset in webkit [217996] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebKit2

Add SubresourceIntegrity as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=173164

Patch by Sam Weinig <sam@webkit.org> on 2017-06-09
Reviewed by Darin Adler.

  • Shared/WebPreferencesDefinitions.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):
Add SubresourceIntegrity to the list of experimental features. Also, sort the experimental features
as requested by the comment above it.

10:44 AM Changeset in webkit [217995] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] FTL does not require dlfcn
https://bugs.webkit.org/show_bug.cgi?id=173143

Reviewed by Darin Adler.

We no longer use LLVM library. Thus, dlfcn.h is not necessary.
Also, ProcessID is not used in FTLLowerDFGToB3.cpp.

  • ftl/FTLLowerDFGToB3.cpp:
10:01 AM Changeset in webkit [217994] by Yusuke Suzuki
  • 2 edits in trunk/Source/WebCore

Unreviewed, Use FALLTHROUGH

  • loader/LinkLoader.cpp:

(WebCore::createLinkPreloadResourceClient):

9:55 AM Changeset in webkit [217993] by Yusuke Suzuki
  • 4 edits in trunk/Source/JavaScriptCore

[DFG] Add --verboseDFGFailure
https://bugs.webkit.org/show_bug.cgi?id=173155

Reviewed by Sam Weinig.

Similar to verboseFTLFailure, JSC should have verboseDFGFailure flag to show DFG failures quickly.

  • dfg/DFGCapabilities.cpp:

(JSC::DFG::verboseCapabilities):
(JSC::DFG::debugFail):

  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/Options.h:
9:48 AM Changeset in webkit [217992] by matthew_hanson@apple.com
  • 14 edits in branches/safari-604.1.25-branch

<rdar://problem/32621736> Seed 2: Disable WebKit features we don't want to ship after branching

9:38 AM Changeset in webkit [217991] by Chris Dumez
  • 4 edits in trunk/Source/WebKit2

Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
https://bugs.webkit.org/show_bug.cgi?id=173163

Reviewed by Brent Fulgham.

Make sure |this| is protected in lambda capture in WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData()
or it may end up getting destroyed before the lambda executing and crash when calling m_statisticsQueue->dispatch().

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):

9:35 AM Changeset in webkit [217990] by matthew_hanson@apple.com
  • 7 edits in branches/safari-604.1.25-branch/Source

Versioning.

9:19 AM Changeset in webkit [217989] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1.25-branch

New branch.

9:19 AM Changeset in webkit [217988] by pvollan@apple.com
  • 2 edits in trunk/Source/WebKit

[Win64] Build error when compiling PaintHooks.asm.
https://bugs.webkit.org/show_bug.cgi?id=173132

Reviewed by Brent Fulgham.

There seems to be too many include paths on the command line for ml64. According to the documentation,
a maximum of 10 /I options is allowed. Create a separate static library for asm files, in order to
avoid all the include paths.

  • PlatformWin.cmake:
9:18 AM Changeset in webkit [217987] by matthew_hanson@apple.com
  • 1 delete in branches/safari-604.1.25-bran

Remove incorrectly named branch.

9:18 AM Changeset in webkit [217986] by matthew_hanson@apple.com
  • 1 copy in branches/safari-604.1.25-bran

New branch.

9:14 AM Changeset in webkit [217985] by eric.carlson@apple.com
  • 10 edits
    2 adds in trunk

fast/mediastream/MediaStream-page-muted.html times out and asserts
https://bugs.webkit.org/show_bug.cgi?id=170355
<rdar://problem/31376041>

Source/WebCore:

MediaStream and MediaStreamTrack need to prevent JS wrapper collection while it is possible
to fire an event or event listeners won't be notified.

Reviewed by Chris Dumez.

Test: fast/mediastream/media-stream-wrapper-collected.html

  • Modules/mediastream/MediaStream.cpp:

(WebCore::MediaStream::MediaStream): Initialize ActiveDOMObject.
(WebCore::MediaStream::stop): New.
(WebCore::MediaStream::activeDOMObjectName): Ditto.
(WebCore::MediaStream::canSuspendForDocumentSuspension): Ditto.
(WebCore::MediaStream::hasPendingActivity): Ditto, prevent collection if there
are registered event listeners.
(WebCore::MediaStream::contextDestroyed): Deleted.

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

(WebCore::MediaStreamTrack::hasPendingActivity): Prevent collection if there
are registered event listeners.

  • Modules/mediastream/MediaStreamTrack.h:
  • testing/Internals.cpp:

(WebCore::Internals::removeMediaStreamTrack): stream.removeTrack doesn't generate a 'removetrack'
event, so call private method that does.

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

LayoutTests:

Reviewed by Chris Dumez.

  • fast/mediastream/media-stream-wrapper-collected-expected.txt: Added.
  • fast/mediastream/media-stream-wrapper-collected.html: Added.
9:13 AM Changeset in webkit [217984] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

[CoordinatedGraphics] Remove unneeded interfaces in PageClient
https://bugs.webkit.org/show_bug.cgi?id=173149

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Michael Catanzaro.

  • UIProcess/PageClient.h:
9:11 AM Changeset in webkit [217983] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Fix test linter reported errors
https://bugs.webkit.org/show_bug.cgi?id=173160

Unreviewed gardening.

webrtc/audio-peer-connection-webaudio.html failed ambiguity checks, it typically fails

in release and times out in debug, but it could have bother outcomes in both build
configurations, so removing the first instance seems like the right approach.
See: https://bugs.webkit.org/show_bug.cgi?id=169110

https://bugs.webkit.org/show_bug.cgi?id=131218 no longer crashing
https://bugs.webkit.org/show_bug.cgi?id=131216 no longer crashing
https://bugs.webkit.org/show_bug.cgi?id=119255 no longer flaky, stablized at r195130.

Linter is now quiet, aside from non-existent path errors,
which I think is tracked by https://bugs.webkit.org/show_bug.cgi?id=172471

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-09

  • platform/gtk/TestExpectations:
8:55 AM Changeset in webkit [217982] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.25

Tag Safari-604.1.25.

8:00 AM Changeset in webkit [217981] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Drop OS(DARWIN) for VM_TAG_FOR_WEBASSEMBLY_MEMORY
https://bugs.webkit.org/show_bug.cgi?id=173147

Reviewed by JF Bastien.

Because this value becomes -1 in non-Darwin environments.
Thus, we do not need to use OS(DARWIN) here.

  • wasm/WasmMemory.cpp:
5:53 AM Changeset in webkit [217980] by Claudio Saavedra
  • 1 edit
    1 add in trunk/LayoutTests

[GTK] Add baseline for media/media-fullscreen-inline-expected.html

Unreviewed gardening.

mediaElement.webkitSupportsPresentationMode is only present with
VIDEO_PRESENTATION_MODE enabled, and this option is only enabled
for Cocoa builds. Add a baseline without this property.

  • platform/gtk/media/media-fullscreen-inline-expected.txt: Added.
5:18 AM Changeset in webkit [217979] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Use WTF::Function instead of std::function in SpeculativeLoadManager::ExpiringEntry
https://bugs.webkit.org/show_bug.cgi?id=173125

Reviewed by Antti Koivisto.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::ExpiringEntry::ExpiringEntry):
(WebKit::NetworkCache::SpeculativeLoadManager::PreloadedEntry::PreloadedEntry):

4:44 AM Changeset in webkit [217978] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Unskip passing userscripts tests

Unreviewed gardening.

  • platform/wpe/TestExpectations:
4:00 AM Changeset in webkit [217977] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

[cURL] Remove a call to Windows API
https://bugs.webkit.org/show_bug.cgi?id=172079

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Yusuke Suzuki.

  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownload::moveFileToDestination):

  • platform/win/FileSystemWin.cpp:

(WebCore::moveFile):

3:52 AM Changeset in webkit [217976] by magomez@igalia.com
  • 3 edits in trunk/Source/WebCore

[GTK][WPE] Fix alpha premultiplying when using cairo to draw the video frames
https://bugs.webkit.org/show_bug.cgi?id=173097

Reviewed by Carlos Garcia Campos.

We need to premultiply alpha when creating a cairo surface from a GStreamer video frame, if the frame
has an alpha component. Currently this is wrongly done in VideoSinkGStreamer, as it assumes that every
frame is going to be rendered with cairo, which is not the case when using accelerated compositing.
The premultiply must happen inside ImageGStreamerCairo, which is where we know that the frame is
going to be rendered with cairo, and where the premultiply can be performed when gstreamer-gl is
enabled as well.

Covered by existent tests.

  • platform/graphics/gstreamer/ImageGStreamerCairo.cpp:

(ImageGStreamer::ImageGStreamer):

  • platform/graphics/gstreamer/VideoSinkGStreamer.cpp:

(webkitVideoSinkRequestRender):

3:39 AM Changeset in webkit [217975] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebKit2

Use WTF::getCurrentProcessID() instead of getpid()
https://bugs.webkit.org/show_bug.cgi?id=173130

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Tim Horton.

  • UIProcess/API/APIProcessPoolConfiguration.h:
2:59 AM Changeset in webkit [217974] by Claudio Saavedra
  • 2 edits in trunk/Source/WebKit2

struct does not accept initializer-form if member has initializers in GCC 4.9

Unreviewed speculative build fix.

Remove the default initializers for DeniedRequest struct,
since it's only initialized in one place, to keep gcc 4.9
happy.

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
2:09 AM Changeset in webkit [217973] by zandobersek@gmail.com
  • 10 edits
    48 adds in trunk

[WPE] Enable ENCRYPTED_MEDIA for build-webkit builds
https://bugs.webkit.org/show_bug.cgi?id=173103

Reviewed by Xabier Rodriguez-Calvar.

.:

  • Source/cmake/OptionsWPE.cmake: Expose the ENABLE_ENCRYPTED_MEDIA

configuration option, keeping it disabled by default.

LayoutTests/imported/w3c:

  • web-platform-tests/encrypted-media/idlharness-expected.txt:

Update the idlharness.html baseline. All the test cases pass.

Source/WebCore:

  • Modules/encryptedmedia/CDM.cpp:

(WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
Pass the ParsedContentType's mime type string to the explicit ContentType
constructor and assign that to the MediaEngineSupportParameters' type
member.

Tools:

  • Scripts/webkitperl/FeatureList.pm: Enable ENCRYPTED_MEDIA flag

when building the WPE port through build-webkit.

LayoutTests:

Enable the imported W3C tests covering Encrypted Media API for the WPE port,
but only tests that use the ClearKey key system. WPE-specific baselines for
those tests are also added, despite the test cases universally failing. This
will allow us to spot any change in behavior that's introduced.

  • platform/wpe/TestExpectations: Skip tests that test PlayReady or Widevine key systems.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-check-initdata-type-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-destroy-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-usage-record-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-usage-record-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-usage-record-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-requestmediakeysystemaccess-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysystemaccess-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-unique-origin-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession-expected.txt: Added.
  • platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input-expected.txt: Added.
1:59 AM Changeset in webkit [217972] by rniwa@webkit.org
  • 12 edits in trunk/Source/WebCore

Move TreeScope::adoptIfNeeded to Node and rename it to setTreeScopeRecursively
https://bugs.webkit.org/show_bug.cgi?id=173129

Reviewed by Antti Koivisto.

Renamed TreeScope::adoptIfNeeded to setTreeScopeRecursively and moved to Node.

The old name was really confusing because due to the existence of Document::adoptNode, a DOM API,
which removes the adopted node from its parent if there was one before adopting the node.
Most confusingly, this function called TreeScope::adoptIfNeeded.

Also inlined the tree scope check to avoid calling to moveTreeToNewScope when there is nothing to do.

This patch effectively reverts r104528.

No new tests. Existing tests cover this.

  • dom/Attr.cpp:

(WebCore::Attr::detachFromElementWithValue):
(WebCore::Attr::attachToElement):

  • dom/ContainerNode.cpp:

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

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::addChildNodesToDeletionQueue):

  • dom/Document.cpp:

(WebCore::Document::adoptNode):

  • dom/Element.cpp:

(WebCore::Element::ensureAttr):

  • dom/Node.cpp:

(WebCore::DidMoveToNewDocumentAssertionScope): Added. The old assertion wasn't sufficient when
HTMLTemplateElement made a recursive call to setTreeScopeRecursively.
(WebCore::DidMoveToNewDocumentAssertionScope::DidMoveToNewDocumentAssertionScope):
(WebCore::DidMoveToNewDocumentAssertionScope::~DidMoveToNewDocumentAssertionScope):
(WebCore::DidMoveToNewDocumentAssertionScope::didRecieveCall):
(WebCore::moveNodeToNewDocument): Moved from TreeScope. Calls to incrementReferencingNodeCount
and decrementReferencingNodeCount to Node::didMoveToNewDocument. This function is now eliminated
in a release build.
(WebCore::moveShadowTreeToNewDocument): Moved from TreeScope.
(WebCore::Node::moveTreeToNewScope): Ditto.
(WebCore::Node::didMoveToNewDocument): See the description for moveNodeToNewDocument above.

  • dom/Node.h:

(WebCore::Node::isParsingChildrenFinished): Moved to avoid having its own protected section.
(WebCore::Node::setIsParsingChildrenFinished): Ditto.
(WebCore::Node::clearIsParsingChildrenFinished): Ditto.
(WebCore::Node::setTreeScopeRecursively): Moved from TreeScope::adoptIfNeeded.

  • dom/ShadowRoot.cpp:

(WebCore::ShadowRoot::~ShadowRoot):

  • dom/TreeScope.cpp:

(WebCore::TreeScope::adoptIfNeeded): Deleted.
(WebCore::TreeScope::moveTreeToNewScope): Deleted.
(WebCore::TreeScope::ensureDidMoveToNewDocumentWasCalled): Deleted.
(WebCore::TreeScope::moveNodeToNewDocument): Deleted.
(WebCore::TreeScope::moveShadowTreeToNewDocument): Deleted.

  • dom/TreeScope.h:
  • html/HTMLTemplateElement.cpp:

(WebCore::HTMLTemplateElement::didMoveToNewDocument):

1:58 AM Changeset in webkit [217971] by Yusuke Suzuki
  • 19 edits
    1 copy
    1 add in trunk/Source

[GTK] Add kinetic scrolling
https://bugs.webkit.org/show_bug.cgi?id=155750

Patch by Adrien Plazas <aplazas@igalia.com> on 2017-06-09
Reviewed by Carlos Garcia Campos.

Patch by Adrien Plazas and Yusuke Suzuki.

Source/WebCore:

Add the ScrollAnimationKinetic scrolling animation allowing to perform momentum scrolling; it is based on GTK+'s
GtkKineticScrolling type.

Add the notion of phase, momentum phase and swipe velocity to PlatformWheelEvent.

Depending on whether the scrolling ended normally or triggered a swipe, the scroll animator will either compute
the swipe velocity from the previous scrolling events or use the one from the swipe gesture to initiate the
momentum scrolling.

  • PlatformGTK.cmake:
  • platform/PlatformWheelEvent.h:

(WebCore::PlatformWheelEvent::setHasPreciseScrollingDeltas):
(WebCore::PlatformWheelEvent::phase):
(WebCore::PlatformWheelEvent::momentumPhase):
(WebCore::PlatformWheelEvent::isTransitioningToMomentumScroll):

  • platform/ScrollAnimation.h:

(WebCore::ScrollAnimation::scroll):
(WebCore::ScrollAnimation::updateVisibleLengths):
(WebCore::ScrollAnimation::setCurrentPosition):

  • platform/ScrollAnimationKinetic.cpp: Added.

(WebCore::ScrollAnimationKinetic::PerAxisData::PerAxisData):
(WebCore::ScrollAnimationKinetic::PerAxisData::animateScroll):
(WebCore::ScrollAnimationKinetic::ScrollAnimationKinetic):
(WebCore::ScrollAnimationKinetic::~ScrollAnimationKinetic):
(WebCore::ScrollAnimationKinetic::stop):
(WebCore::ScrollAnimationKinetic::start):
(WebCore::ScrollAnimationKinetic::animationTimerFired):

  • platform/ScrollAnimationKinetic.h: Copied from Source/WebCore/platform/ScrollAnimation.h.
  • platform/gtk/PlatformWheelEventGtk.cpp:

(WebCore::PlatformWheelEvent::PlatformWheelEvent):
(WebCore::PlatformWheelEvent::swipeVelocity):

  • platform/gtk/ScrollAnimatorGtk.cpp:

(WebCore::ScrollAnimatorGtk::ScrollAnimatorGtk):
(WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation):
(WebCore::ScrollAnimatorGtk::scroll):
(WebCore::ScrollAnimatorGtk::scrollToOffsetWithoutAnimation):
(WebCore::ScrollAnimatorGtk::computeVelocity):
(WebCore::ScrollAnimatorGtk::handleWheelEvent):
(WebCore::ScrollAnimatorGtk::willEndLiveResize):
(WebCore::ScrollAnimatorGtk::updatePosition):
(WebCore::ScrollAnimatorGtk::didAddVerticalScrollbar):
(WebCore::ScrollAnimatorGtk::didAddHorizontalScrollbar):

  • platform/gtk/ScrollAnimatorGtk.h:

Source/WebKit2:

Add the notion of phase and momentum phase to WebWheelEvent.

Make WebWheelEvent manage the 'is_stop' attribute of GdkEventScroll to create the corresponding WebWheelEvent
with the correct phases and deltas.

Make GestureController manage swipes to create the corresponding WebWheelEvent with the correct phases and
deltas.

  • Shared/NativeWebWheelEvent.h:
  • Shared/WebEvent.h:
  • Shared/WebEventConversion.cpp:

(WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):

  • Shared/WebWheelEvent.cpp:

(WebKit::WebWheelEvent::WebWheelEvent):
(WebKit::WebWheelEvent::encode):
(WebKit::WebWheelEvent::decode):

  • Shared/gtk/NativeWebWheelEventGtk.cpp:

(WebKit::NativeWebWheelEvent::NativeWebWheelEvent):

  • Shared/gtk/WebEventFactory.cpp:

(WebKit::WebEventFactory::createWebWheelEvent):

  • Shared/gtk/WebEventFactory.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::shouldProcessWheelEventNow):

  • UIProcess/WebPageProxy.h:
  • UIProcess/gtk/GestureController.cpp:

(WebKit::GestureController::GestureController):
(WebKit::GestureController::handleEvent):
(WebKit::GestureController::isProcessingGestures):
(WebKit::createScrollEvent):
(WebKit::GestureController::DragGesture::startDrag):
(WebKit::GestureController::DragGesture::handleDrag):
(WebKit::GestureController::DragGesture::begin):
(WebKit::GestureController::DragGesture::end):
(WebKit::GestureController::SwipeGesture::startMomentumScroll):
(WebKit::GestureController::SwipeGesture::swipe):
(WebKit::GestureController::SwipeGesture::SwipeGesture):

  • UIProcess/gtk/GestureController.h:
1:49 AM Changeset in webkit [217970] by zandobersek@gmail.com
  • 4 edits in trunk

[WPE] Enable MEDIA_SOURCE for build-webkit builds
https://bugs.webkit.org/show_bug.cgi?id=173136

Reviewed by Xabier Rodriguez-Calvar.

Tools:

  • Scripts/webkitperl/FeatureList.pm: Enable the MEDIA_SOURCE feature for WPE.

LayoutTests:

  • platform/wpe/TestExpectations: Enable the media/media-source/ layout tests

for the WPE port, adding half a dozen failure or timeout expectations for
tests that are currently failing.

1:47 AM Changeset in webkit [217969] by zandobersek@gmail.com
  • 2 edits in trunk/Source/WebCore

[GCrypt] ECDSA signing results can be smaller than the EC key size
https://bugs.webkit.org/show_bug.cgi?id=171535

Reviewed by Jiewen Tan.

The libgcrypt-based implementation of the ECDSA signing operation does not
properly address the resulting r and s integers that do not potentially
match the EC key in terms of size.

To address that, the retrieved MPI data for both integers is handled depending
on the size of said data. Strictly requiring an amount of bytes that matches
the key data size N, we simply take the last N bytes if the MPI data is equal
or larger than N in size. If smaller, we first append enough zero bytes to the
output Vector object before attaching the MPI data in whole so that the amount
of appended bytes matches N.

No new tests -- covers an implementation detail that is not trivial to test,
but can rely sufficiently on existing tests.

  • crypto/gcrypt/CryptoAlgorithmECDSAGCrypt.cpp:

(WebCore::extractECDSASignatureInteger):
(WebCore::gcryptSign):

1:21 AM Changeset in webkit [217968] by commit-queue@webkit.org
  • 8 edits in trunk/Source

Reduce compiler warnings
https://bugs.webkit.org/show_bug.cgi?id=172078

Patch by Daewoong Jang <daewoong.jang@navercorp.com> on 2017-06-09
Reviewed by Yusuke Suzuki.

Source/JavaScriptCore:

  • runtime/IntlDateTimeFormat.h:

Source/WebCore:

  • platform/network/curl/CookieJarCurl.cpp:

(WebCore::addMatchingCurlCookie):
(WebCore::getHostnamesWithCookies):
(WebCore::deleteCookiesForHostnames):
(WebCore::deleteCookiesForHostname): Deleted.

  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownloadManager::downloadThread):
(WebCore::CurlDownload::didReceiveHeader):

  • platform/network/curl/CurlDownload.h:

(WebCore::CurlDownloadListener::didReceiveDataOfLength):

  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::WebCoreSynchronousLoader::didReceiveResponse):
(WebCore::ResourceHandle::platformLoadResourceSynchronously):

  • platform/network/curl/SocketStreamHandleImplCurl.cpp:

(WebCore::createCopy):
(WebCore::SocketStreamHandleImpl::readData):

1:05 AM Changeset in webkit [217967] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

Crash in -[WKWebView _initializeWithConfiguration:]
https://bugs.webkit.org/show_bug.cgi?id=173126

Reviewed by Antti Koivisto.

Crash occurs when passing an autoreleased NSString into _setMediaContentTypesRequiringHardwareSupport.
The ivar should be a RetainPtr rather than a bare NSString *.

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration _mediaContentTypesRequiringHardwareSupport]):

1:03 AM Changeset in webkit [217966] by calvaris@igalia.com
  • 19 edits in trunk

[GStreamer][EME] Remove the legacy code that was not even official and is deprecated
https://bugs.webkit.org/show_bug.cgi?id=173096

Reviewed by Žan Doberšek.

.:

  • Source/cmake/OptionsWPE.cmake: Remove LEGACY_ENCRYPTED_MEDIA support

Source/WebCore:

We are removing the LEGACY_ENCRYPTED_MEDIA code that we was not
official, is deprecated and we are not planning to support it
anymore in any way.

This also helps implementing current ENCRYPTED_MEDIA in a cleaner
way.

  • platform/GStreamer.cmake:
  • platform/graphics/gstreamer/GStreamerUtilities.cpp:
  • platform/graphics/gstreamer/GStreamerUtilities.h:
  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:

(WebCore::MediaPlayerPrivateGStreamer::handleMessage):

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::registerWebKitGStreamerElements):
(WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
(WebCore::extractEventsAndSystemsFromMessage): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::needKey): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::setCDMSession): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::keyAdded): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::handleProtectionEvent): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::receivedGenerateKeyRequest): Deleted.
(WebCore::keySystemIdToUuid): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::createSession): Deleted.
(WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey): Deleted.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
  • platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
  • platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
  • platform/graphics/gstreamer/mse/AppendPipeline.cpp:

(WebCore::AppendPipeline::AppendPipeline):
(WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
(WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
(WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
(WebCore::appendPipelineElementMessageCallback): Deleted.
(WebCore::AppendPipeline::dispatchPendingDecryptionKey): Deleted.
(WebCore::AppendPipeline::dispatchDecryptionKey): Deleted.
(WebCore::AppendPipeline::handleElementMessage): Deleted.

  • platform/graphics/gstreamer/mse/AppendPipeline.h:
  • platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:

(WebCore::MediaPlayerPrivateGStreamerMSE::dispatchDecryptionKey): Deleted.

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

LayoutTests:

  • platform/gtk/TestExpectations: Mark legacy tests as deprecated
1:02 AM Changeset in webkit [217965] by commit-queue@webkit.org
  • 6 edits in trunk

AX: Media Controls: Missing labels for the Time Labels.
https://bugs.webkit.org/show_bug.cgi?id=171715
<rdar://problem/32009214>

Patch by Aaron Chu <aaron_chu@apple.com> on 2017-06-09
Reviewed by Antoine Quint.

Source/WebCore:

Added aria-label to describe time labels in media controls.

  • Modules/modern-media-controls/controls/slider.js:

(Slider.prototype.set inputAccessibleLabel):
(Slider.prototype._formatTime): Deleted.

  • Modules/modern-media-controls/controls/time-label.js:

(TimeLabel.prototype.commitProperty):

  • Modules/modern-media-controls/main.js:

(formatTimeToString):

LayoutTests:

Modified existing test case to accommodate testing for time label description.

  • media/modern-media-controls/time-label/time-label.html:

Jun 8, 2017:

11:12 PM Changeset in webkit [217964] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

Unreviewed. Fix unused parameter warning after r217955.

  • platform/graphics/FontFamilySpecificationNull.h:

(WebCore::FontFamilySpecificationNull::fontRanges):

10:26 PM Changeset in webkit [217963] by Carlos Garcia Campos
  • 7 edits in trunk

[GTK] Use API::FormClient instead of the C API in WebKitFormClient
https://bugs.webkit.org/show_bug.cgi?id=173098

Reviewed by Žan Doberšek.

Source/WebKit2:

  • UIProcess/API/gtk/WebKitFormClient.cpp:

(attachFormClientToView):
(willSubmitForm): Deleted.

  • UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp:

(webkitFormSubmissionRequestCreate):
(webkit_form_submission_request_get_text_fields):

  • UIProcess/API/gtk/WebKitFormSubmissionRequestPrivate.h:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

(webkitWebPageCreate):

Tools:

Fix memory leak and runtime warning when running /webkit2/WebKitWebView/submit-form. The web extension is
assuming that all tests containing forms define ids for the form elements like
/webkit2/WebKitWebExtension/form-controls-associated-signal does.

  • TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:

(formControlsAssociatedCallback):

10:25 PM Changeset in webkit [217962] by yoav@yoav.ws
  • 21 edits in trunk

[preload] Mandatory as value and related spec alignments
https://bugs.webkit.org/show_bug.cgi?id=173047

Reviewed by Dean Jackson.

Source/WebCore:

Align preload's implementation according to latest spec changes: as is mandatory and "fetch" replaces the previous empty as value,
onerror no longer fires for invalid as values, and the IDL for as reflects only valid values, to enable feature detection.

Related standard discussions:
https://github.com/w3c/preload/issues/80
https://github.com/whatwg/fetch/pull/547
https://github.com/whatwg/fetch/pull/549
https://github.com/whatwg/html/pull/2588

No new tests but modified existing ones as well as their expectations.

  • html/HTMLLinkElement.cpp: Add "enumerated attribute" reflection methods to as.

(WebCore::HTMLLinkElement::setAs):
(WebCore::HTMLLinkElement::as):

  • html/HTMLLinkElement.h:
  • html/HTMLLinkElement.idl:
  • loader/LinkLoader.cpp:

(WebCore::LinkLoader::loadLinksFromHeader): preloadIfNeeded signature change.
(WebCore::LinkLoader::resourceTypeFromAsAttribute): Replace the empty value by "fetch".
(WebCore::LinkLoader::preloadIfNeeded): Change the signature, as a LinkLoaderClient is no longer needed, since we don't fire error
events from inside the function.
(WebCore::LinkLoader::loadLink): preloadIfNeeded signature change.

  • loader/LinkLoader.h: preloadIfNeeded signature change.

LayoutTests:

Fix tests and expectations to this patch's changes: as is mandatory and "fetch" replaces the previous empty as value,
onerror no longer fires for invalid as values, and the IDL for as reflects only valid values, to enable feature detection.

  • http/tests/fetch/redirectmode-and-preload.html:
  • http/tests/preload/download_resources-expected.txt:
  • http/tests/preload/download_resources.html:
  • http/tests/preload/download_resources_from_header_iframe-expected.txt:
  • http/tests/preload/onerror_event-expected.txt:
  • http/tests/preload/onerror_event.html:
  • http/tests/preload/onload_event-expected.txt:
  • http/tests/preload/onload_event.html:
  • http/tests/preload/preloadscanner_download_resources.html:
  • http/tests/preload/resources/download_resources_from_header.php:
  • http/tests/preload/resources/nph-invalid_resources_from_header.pl:
  • http/tests/preload/single_download_preload.html:
  • http/tests/preload/single_download_preload_headers.php:
  • imported/w3c/web-platform-tests/html/dom/reflection-metadata-expected.txt: PProgressions related to correct reflection.
10:24 PM Changeset in webkit [217961] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

[GTK] Use API::Findclient instead of the C API in WebKitFindController
https://bugs.webkit.org/show_bug.cgi?id=173095

Reviewed by Žan Doberšek.

  • UIProcess/API/gtk/WebKitFindController.cpp:

(getPage):
(webkitFindControllerDispose):
(webkitFindControllerConstructed):
(webkit_find_controller_class_init):

10:22 PM Changeset in webkit [217960] by Carlos Garcia Campos
  • 10 edits
    1 delete in trunk/Source/WebKit2

[GTK] Get rid of custom marshallers of signals
https://bugs.webkit.org/show_bug.cgi?id=173094

Reviewed by Žan Doberšek.

Use g_cclosure_marshal_generic instead.

  • PlatformGTK.cmake:
  • UIProcess/API/gtk/WebKitBackForwardList.cpp:
  • UIProcess/API/gtk/WebKitDownload.cpp:

(webkit_download_class_init):

  • UIProcess/API/gtk/WebKitFaviconDatabase.cpp:

(webkit_favicon_database_class_init):

  • UIProcess/API/gtk/WebKitWebInspector.cpp:

(webkit_web_inspector_class_init):

  • UIProcess/API/gtk/WebKitWebResource.cpp:

(webkit_web_resource_class_init):

  • UIProcess/API/gtk/WebKitWebView.cpp:

(webkit_web_view_class_init):

  • UIProcess/API/gtk/webkit2marshal.list: Removed.
  • WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:
  • WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:

(webkit_web_page_class_init):

7:59 PM Changeset in webkit [217959] by Chris Dumez
  • 2 edits in trunk/Source/WebCore

[iOS] LowPowerModeNotifier notifies client on non-main thread
https://bugs.webkit.org/show_bug.cgi?id=173115
<rdar://problem/32644703>

Reviewed by Ryosuke Niwa.

Update iOS's implementation of the LowPowerModeNotifier to make sure
we notify the client of low power mode changes on the main thread.

  • platform/ios/LowPowerModeNotifierIOS.mm:

(-[WebLowPowerModeObserver _didReceiveLowPowerModeChange]):

7:13 PM Changeset in webkit [217958] by rniwa@webkit.org
  • 3 edits
    2 adds in trunk

Crash inside InsertNodeBeforeCommand via InsertParagraphSeparatorCommand
https://bugs.webkit.org/show_bug.cgi?id=173085
Source/WebCore:

<rdar://problem/32575059>

Reviewed by Wenson Hsieh.

The crash was caused by the condition to check for special cases failing when visiblePos is null.
Exit early in these extreme cases.

Also replaced the use of deprecatedNode and deprecatedEditingOffset to modern idioms.

Test: editing/inserting/insert-horizontal-rule-in-empty-document-crash.html

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

LayoutTests:

Reviewed by Wenson Hsieh.

Added a regresion test.

  • editing/inserting/insert-horizontal-rule-in-empty-document-crash-expected.txt: Added.
  • editing/inserting/insert-horizontal-rule-in-empty-document-crash.html: Added.
7:09 PM Changeset in webkit [217957] by rniwa@webkit.org
  • 4 edits
    2 adds in trunk

The tree scope of an Attr node inside a shadow tree does not updated upon detach.
https://bugs.webkit.org/show_bug.cgi?id=173122

Reviewed by Chris Dumez.

Source/WebCore:

The crash was caused by the tree scope of an Attr detached from an element inside a shadow root
not getting updated.

Test: fast/dom/detaching-attr-node-in-shadow-tree-crash.html

  • dom/Attr.cpp:

(WebCore::Attr::~Attr): Added assertions.
(WebCore::Attr::detachFromElementWithValue): Fixed the bug by adopting Attr to Document.
(WebCore::Attr::attachToElement): Moved the adoptIfNeeded call here from attachAttributeNodeIfNeeded.

  • dom/Element.cpp:

(WebCore::Element::attachAttributeNodeIfNeeded):

LayoutTests:

Added a regression test which hits the newly added assertion.

  • fast/dom/detaching-attr-node-in-shadow-tree-crash-expected.txt: Added.
  • fast/dom/detaching-attr-node-in-shadow-tree-crash.html: Added.
5:46 PM Changeset in webkit [217956] by Simon Fraser
  • 2 edits in trunk/Source/WebKit2

Crash under -[WKWebView _updateVisibleContentRects]
https://bugs.webkit.org/show_bug.cgi?id=173123
rdar://problem/32650112

Reviewed by Tim Horton.

Make sure the WKWebView is valid in places where we dispatch_async or use
a pre-commit handler.

Speculative fix for a rare crasher.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _isValid]):
(-[WKWebView _addUpdateVisibleContentRectPreCommitHandler]):
(-[WKWebView _scheduleVisibleContentRectUpdateAfterScrollInView:]):

5:31 PM Changeset in webkit [217955] by mmaxfield@apple.com
  • 36 edits
    13 adds in trunk

[Cocoa] Expand system-ui to include every item in the Core Text cascade list
https://bugs.webkit.org/show_bug.cgi?id=173043
<rdar://problem/21125708>

Reviewed by Simon Fraser.

Source/WebCore:

The concept of the system font on Cocoa platforms represents the entire Core Text cascade list.
However, previously, WebKit only represented system-ui by pulling out the first item in the Core
Text cascade list. Instead, we should make all text rendered with "system-ui" match what the
platform would natively render.

Previously, we walked through the strings in the font-family property and looked them up one by
one. However, now we want to abstract this idea of a font family to possibly hold a
CTFontDescriptorRef instead of a string. This way, we expand a font-family list of ["fontA",
"system-ui", "fontB"] to ["fontA", ... a bunch of CTFontDescriptorRefs ..., "FontB"]. We can
then modify the consumer of this object to have two codepaths: the old string-based codepath,
and a new, platform-specific codepath which simply embeds the CTFontDesriptorRefs inside a Font
object.

We don't want to simply pull out the family name from each item in the Core Text fallback list
because that is a lossy translation. There is more information in these font descriptors which
cannot be represented by CSS. Therefore, we must keep the descriptors alive and add the new
codepath for them.

We also don't want to run the CSS font matching algorithm on each member of the Core Text
fallback list because it may yield different results from Core Text's font matching algorithm.
Our goal is to draw text as closely as possible to the system APIs. If we ran it, we may find
a font which is closer to the requested traits, but it would look out of place on the system.

Tests: fast/text/system-font-fallback-emoji.html

fast/text/system-font-fallback.html

  • WebCore.xcodeproj/project.pbxproj:
  • page/MemoryRelease.cpp:

(WebCore::releaseNoncriticalMemory):

  • platform/graphics/FontCascadeFonts.cpp:

(WebCore::realizeNextFallback): The consumer of our new data type. Now uses WTF::visit().
(WebCore::FontCascadeFonts::realizeFallbackRangesAt): Now that the number of items to test
against the current character is larger than the number of strings in the font-family list,
we need to update the existing code to use the correct value.

  • platform/graphics/FontDescription.cpp: Default implementation for non-Cocoa ports.

(WebCore::FontDescription::invalidateCaches):
(WebCore::FontCascadeDescription::effectiveFamilyCount):
(WebCore::FontCascadeDescription::effectiveFamilyAt):

  • platform/graphics/FontDescription.h: Our new data type is a Variant of AtomicString and a

platform-specific class. Cocoa uses a class that holds a CTFontDescriptorRef and other ports
use an empty non-constructable class.

  • platform/graphics/FontFamilySpecificationNull.h: Added. The empty non-constructable

class.
(WebCore::FontFamilySpecificationNull::fontRanges):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::platformInit): Changing the system language will change the system font
fallback list, so we need to listen to this notification. This also matters for
FontCache::systemFallbackForCharacters(), so we should build off the same callback we are
already using for font installation.
(WebCore::invalidateFontCache):

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp: Added. The platform-specific creation of

our CTFontDescriptorRefs. We hold them cached in a SystemFontDatabase.
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator==):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash):
(WebCore::SystemFontDatabase::singleton):
(WebCore::SystemFontDatabase::systemFontCascadeList):
(WebCore::SystemFontDatabase::clear):
(WebCore::SystemFontDatabase::SystemFontDatabase):
(WebCore::SystemFontDatabase::applyWeightAndItalics):
(WebCore::SystemFontDatabase::computeCascadeList):
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::hash):
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::equal):
(WebCore::isSystemFontString):
(WebCore::systemFontParameters):
(WebCore::FontDescription::invalidateCaches):
(WebCore::FontCascadeDescription::effectiveFamilyCount): We don't store the result of this
because it would probably be a bad idea to increase the size of every single FontCascade just
in case it might ask for the system font. Most fonts never mention system-ui. Because it's so
rare, we can just recalculate the result of this as necessary. This shouldn't be slow because
the results are cached.
(WebCore::FontCascadeDescription::effectiveFamilyAt):

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp: Added.

(WebCore::FontFamilySpecificationCoreText::fontRanges): Create a FontRanges from a
CTFontDescriptorRef.

  • platform/graphics/cocoa/FontFamilySpecificationCoreText.h: Added.

(WebCore::FontFamilySpecificationCoreText::FontFamilySpecificationCoreText):

  • platform/graphics/ios/FontCacheIOS.mm: Delete the old handling for system-ui.

(WebCore::platformFontWithFamilySpecialCase):
(WebCore::baseSystemFontDescriptor): Deleted.
(WebCore::systemFontModificationAttributes): Deleted.
(WebCore::systemFontDescriptor): Deleted.

  • platform/graphics/mac/FontCacheMac.mm: Ditto.

(WebCore::platformFontWithFamilySpecialCase):
(WebCore::toNSFontWeight): Deleted.

LayoutTests:

Rebaseline tests which use non-English text in form controls

  • fast/text/system-font-fallback-emoji-expected.txt: Added.
  • fast/text/system-font-fallback-emoji.html: Added.
  • fast/text/system-font-fallback-expected.html: Added.
  • fast/text/system-font-fallback.html: Added.
  • platform/mac-elcapitan/fast/forms/listbox-bidi-align-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/listbox-bidi-align-expected.txt:
  • platform/mac-elcapitan/fast/forms/search-rtl-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/search-rtl-expected.txt:
  • platform/mac-elcapitan/fast/forms/searchfield-heights-expected.png: Added.
  • platform/mac-elcapitan/fast/forms/searchfield-heights-expected.txt:
  • platform/mac-elcapitan/fast/forms/visual-hebrew-text-field-expected.txt:
  • platform/mac-elcapitan/fast/text/drawBidiText-expected.png: Added.
  • platform/mac-elcapitan/fast/text/drawBidiText-expected.txt:
  • platform/mac-elcapitan/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png: Added.
  • platform/mac-elcapitan/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/mac/TestExpectations:
  • platform/mac/fast/css/rtl-ordering-expected.png:
  • platform/mac/fast/css/rtl-ordering-expected.txt:
  • platform/mac/fast/forms/listbox-bidi-align-expected.png:
  • platform/mac/fast/forms/listbox-bidi-align-expected.txt:
  • platform/mac/fast/forms/listbox-hit-test-zoomed-expected.png:
  • platform/mac/fast/forms/listbox-hit-test-zoomed-expected.txt:
  • platform/mac/fast/forms/search-rtl-expected.png:
  • platform/mac/fast/forms/search-rtl-expected.txt:
  • platform/mac/fast/forms/searchfield-heights-expected.txt:
  • platform/mac/fast/forms/select-visual-hebrew-expected.png:
  • platform/mac/fast/forms/select-visual-hebrew-expected.txt:
  • platform/mac/fast/forms/visual-hebrew-text-field-expected.png:
  • platform/mac/fast/forms/visual-hebrew-text-field-expected.txt:
  • platform/mac/fast/text/drawBidiText-expected.png:
  • platform/mac/fast/text/drawBidiText-expected.txt:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.png:
  • platform/mac/fast/text/international/pop-up-button-text-alignment-and-direction-expected.txt:
  • platform/mac/fast/text/updateNewFont-expected.png:
  • platform/mac/fast/text/updateNewFont-expected.txt:
4:05 PM Changeset in webkit [217954] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Update Timer to take a WTF::Function instead of a std::function
https://bugs.webkit.org/show_bug.cgi?id=173113

Reviewed by Brady Eidson.

Update Timer to take a WTF::Function instead of a std::function as we prefer
to use WTF::Function in WebKit.

  • platform/GenericTaskQueue.cpp:

(WebCore::TaskDispatcher<Timer>::sharedTimer):

  • platform/Timer.h:

(WebCore::Timer::Timer):
(WebCore::DeferrableOneShotTimer::DeferrableOneShotTimer):

3:36 PM Changeset in webkit [217953] by clopez@igalia.com
  • 3 edits in trunk/Source/WebCore

[WebRTC] enableMockMediaEndpoint() is only used for the OpenWebRTC backend.
https://bugs.webkit.org/show_bug.cgi?id=173108

Reviewed by Eric Carlson.

Covered by existing tests.

  • testing/Internals.cpp:

(WebCore::Internals::Internals):
(WebCore::Internals::enableMockMediaEndpoint):

  • testing/Internals.h:
3:24 PM Changeset in webkit [217952] by commit-queue@webkit.org
  • 2 edits in trunk/Source/JavaScriptCore

[Cocoa] JSWrapperMap leaks for all JSContexts
https://bugs.webkit.org/show_bug.cgi?id=173110
<rdar://problem/32602198>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-08
Reviewed by Geoffrey Garen.

  • API/JSContext.mm:

(-[JSContext ensureWrapperMap]):
Ensure this allocation gets released.

3:17 PM Changeset in webkit [217951] by Simon Fraser
  • 3 edits in trunk/Source/WebKit2

Use initializers in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=173073

Reviewed by Tim Horton.

Initialize the member variables the modern way.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::WebPageProxy):

  • UIProcess/WebPageProxy.h:
3:12 PM Changeset in webkit [217950] by Chris Dumez
  • 4 edits in trunk/LayoutTests

REGRESSION: fast/images/animated-gif-webkit-transform.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=170410
<rdar://problem/31409381>

Reviewed by Simon Fraser.

Fix flakiness and unskip test.

  • fast/images/animated-gif-webkit-transform-expected.txt:
  • fast/images/animated-gif-webkit-transform.html:
  • platform/mac-wk2/TestExpectations:
3:03 PM Changeset in webkit [217949] by commit-queue@webkit.org
  • 4 edits
    2 adds in trunk

[iOS] Buttons in top-left and bottom media controls bar are positioned too high
https://bugs.webkit.org/show_bug.cgi?id=173111
<rdar://problem/32650615>

Patch by Antoine Quint <Antoine Quint> on 2017-06-08
Reviewed by Jon Lee.

Source/WebCore:

Test: media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-button-padding.html

Since we use flex box to vertically center buttons in a buttons container, there is no
need to offset the button due to padding in the y-axis.

  • Modules/modern-media-controls/controls/buttons-container.css:

(.ios .buttons-container button):

LayoutTests:

Add a test that checks that the appropriate styles as set in buttons-container.css
are applied to a button in a buttons container on iOS.

  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-button-padding-expected.txt: Added.
  • media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-button-padding.html: Added.
  • platform/ios-simulator/TestExpectations:
2:47 PM Changeset in webkit [217948] by commit-queue@webkit.org
  • 28 edits in trunk/Source

Implement additional AVPlayerController interfaces for minTime and maxTime.
https://bugs.webkit.org/show_bug.cgi?id=172396
rdar://problem/30737452

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-08
Reviewed by Jer Noble.

Source/WebCore:

No new tests because no change to DOM.

Add support for new HLS UI in AVKit.

This adds new properties (seekableTimeRangesLastModifiedTime, liveUpdateInterval, minTiming, maxTiming) to WebAVPlayerController.
Plumb these properties from AVPlayer up to AVKit.

Switch WebPlaybackSessionModelMediaElement from updating seekableRangesChanged using timeupdate event to using progress event.

Enable progress events on iOS.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::HTMLMediaElement):
(WebCore::HTMLMediaElement::loadResource):
(WebCore::HTMLMediaElement::seekableTimeRangesLastModifiedTime):
(WebCore::HTMLMediaElement::liveUpdateInterval):

  • html/HTMLMediaElement.h:
  • platform/cf/CoreMediaSoftLink.cpp:
  • platform/cf/CoreMediaSoftLink.h:
  • platform/cocoa/WebPlaybackSessionModel.h:

(WebCore::WebPlaybackSessionModelClient::seekableRangesChanged):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::updateForEventName):
(WebCore::WebPlaybackSessionModelMediaElement::observedEventNames):
(WebCore::WebPlaybackSessionModelMediaElement::seekableTimeRangesLastModifiedTime):
(WebCore::WebPlaybackSessionModelMediaElement::liveUpdateInterval):

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayer::liveUpdateInterval):

  • platform/graphics/MediaPlayer.h:
  • platform/graphics/MediaPlayerPrivate.h:

(WebCore::MediaPlayerPrivateInterface::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayerPrivateInterface::liveUpdateInterval):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime):
(WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval):

  • platform/ios/WebAVPlayerController.h:
  • platform/ios/WebAVPlayerController.mm:

(-[WebAVPlayerController init]):
(-[WebAVPlayerController dealloc]):
(-[WebAVPlayerController observeValueForKeyPath:ofObject:change:context:]):
(-[WebAVPlayerController updateMinMaxTiming]):
(-[WebAVPlayerController hasSeekableLiveStreamingContent]):
(+[WebAVPlayerController keyPathsForValuesAffectingHasSeekableLiveStreamingContent]):
(-[WebAVPlayerController resetMediaState]):

  • platform/ios/WebPlaybackSessionInterfaceAVKit.h:
  • platform/ios/WebPlaybackSessionInterfaceAVKit.mm:

(WebCore::WebPlaybackSessionInterfaceAVKit::WebPlaybackSessionInterfaceAVKit):
(WebCore::WebPlaybackSessionInterfaceAVKit::resetMediaState):
(WebCore::WebPlaybackSessionInterfaceAVKit::seekableRangesChanged):

  • platform/ios/WebVideoFullscreenControllerAVKit.mm:

(WebVideoFullscreenControllerContext::seekableRangesChanged):
(WebVideoFullscreenControllerContext::seekableTimeRangesLastModifiedTime):
(WebVideoFullscreenControllerContext::liveUpdateInterval):

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

(WebCore::WebPlaybackSessionInterfaceMac::seekableRangesChanged):

  • platform/spi/cocoa/AVKitSPI.h:
  • platform/spi/mac/AVFoundationSPI.h:

Source/WebKit2:

Add support for new HLS UI in AVKit.

Plumb seekableTimeRangesLastModifiedTime and liveUpdateInterval across process boundaries.

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.h:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.messages.in:
  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionModelContext::setSeekableRanges):
(WebKit::WebPlaybackSessionManagerProxy::setSeekableRangesVector):

  • WebProcess/cocoa/WebPlaybackSessionManager.h:
  • WebProcess/cocoa/WebPlaybackSessionManager.mm:

(WebKit::WebPlaybackSessionInterfaceContext::seekableRangesChanged):
(WebKit::WebPlaybackSessionManager::seekableRangesChanged):

2:37 PM Changeset in webkit [217947] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Use WTF::Function more in SpeculativeLoadManager
https://bugs.webkit.org/show_bug.cgi?id=173109

Reviewed by Antti Koivisto.

Use WTF::Function more in SpeculativeLoadManager.

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::create):
(WebKit::NetworkCache::SpeculativeLoadManager::PendingFrameLoad::PendingFrameLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::registerLoad):
(WebKit::NetworkCache::SpeculativeLoadManager::retrieveSubresourcesEntry):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.h:
1:39 PM Changeset in webkit [217946] by Jonathan Bedard
  • 5 edits in trunk/Tools

webkitpy: Run sample/spindump on iOS devices
https://bugs.webkit.org/show_bug.cgi?id=171881
<rdar://problem/32084602>

Reviewed by Daniel Bates.

  • Scripts/webkitpy/port/darwin.py:

(DarwinPort.sample_process): Only add sudo prefix if the platform is Mac, which
requires sudo to run spindump.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort.look_for_new_samples): Deleted.
(IOSDevicePort.sample_process): Deleted.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest): iOS devices use 'ios' and their os_name.
(IOSDeviceTest.test_spindump):
(IOSDeviceTest.test_sample_process):
(IOSDeviceTest.test_sample_process_exception):

  • Scripts/webkitpy/port/ios_simulator_unittest.py:

(IOSSimulatorTest): iOS Simulators run on Mac and use 'mac' as their os_name.

1:37 PM Changeset in webkit [217945] by commit-queue@webkit.org
  • 6 edits
    12 adds in trunk

getUserMedia should not be prompted again if user denied access
https://bugs.webkit.org/show_bug.cgi?id=173104

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-08
Reviewed by Geoff Garen.

Source/WebKit2:

Store denied requests to be able to replay them.
If mic is denied, user might be prompted for camera, not for mic and camera.
Same principle applies to the case of denied camera.
Clearing the stored denied requests when reloading/navigating away.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::userMediaAccessWasDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::resetAccess):
(WebKit::UserMediaPermissionRequestManagerProxy::isRequestDenied):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:

LayoutTests:

Splitting grant test due to remembering deny decisions.

  • fast/mediastream/getUserMedia-deny-persistency-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency-reload-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency-reload.html: Added.
  • fast/mediastream/getUserMedia-deny-persistency.html: Added.
  • fast/mediastream/getUserMedia-deny-persistency2-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency2.html: Added.
  • fast/mediastream/getUserMedia-deny-persistency3-expected.txt: Added.
  • fast/mediastream/getUserMedia-deny-persistency3.html: Added.
  • fast/mediastream/getUserMedia-grant-persistency-expected.txt:
  • fast/mediastream/getUserMedia-grant-persistency.html:
  • fast/mediastream/getUserMedia-grant-persistency2-expected.txt: Added.
  • fast/mediastream/getUserMedia-grant-persistency2.html: Added.
  • fast/mediastream/getUserMedia-grant-persistency3-expected.txt: Added.
  • fast/mediastream/getUserMedia-grant-persistency3.html: Added.
1:08 PM Changeset in webkit [217944] by fpizlo@apple.com
  • 3 edits
    1 add in trunk

REGRESSION: js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5.html has a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=161156

Reviewed by Saam Barati.

Source/JavaScriptCore:

Since LLInt does not register impure property watchpoints for self property accesses, it
shouldn't try to cache accesses that require a watchpoint.

This manifested as a flaky failure because the test would fire the watchpoint after we had
usually already tiered up. Without concurrent JIT, we would have always tiered up before
getting to the bad case. With concurrent JIT, we would sometimes not tier up by that time. This
also adds a test that deterministically failed in LLInt without this change; it does so by just
running a lot shorter.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

LayoutTests:

Add a version of the test that's guaranteed to fail if the problem it's testing for manifests
in the LLInt.

  • js/dom/prototype-chain-caching-with-impure-get-own-property-slot-traps-5-short.html: Added.
1:06 PM Changeset in webkit [217943] by hyatt@apple.com
  • 8 edits
    3 adds
    3 deletes in trunk

Laili restaurant menu page does not display full menu
https://bugs.webkit.org/show_bug.cgi?id=173062
rdar://problem/32436486

Reviewed by Simon Fraser.

Source/WebCore:

Percentage heights inside auto containing blocks were handled correctly by
hasReplacedLogicalHeight, which checked hasAutoHeightOrContainingBlockWithAutoHeight
properly. min-max-height were not handled properly though and need to do the same check.

There is also now a quirk for iBooks to preserve the old behavior, since they depend
on the old behavior to constrain the height of images to a page.

Test: fast/replaced/max-height-percent-inside-auto-block.html

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::replacedMinMaxLogicalHeightComputesAsNone):
Add a new helper that resolves min and max logical height values to none for
replaced elements with percentage min/max heights inside auto containing blocks.

(WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
Change the min/max-height constraint function for replaced elements to call the
new helper function.

  • rendering/RenderBox.h:
  • rendering/RenderBoxModelObject.h:

Move a function from private to protected so that RenderBox can access it.

LayoutTests:

  • fast/hidpi/percent-height-image-nested-expected.html:
  • fast/hidpi/percent-height-image-nested.html:
  • fast/multicol/pagination/RightToLeft-max-width.html:
  • fast/replaced/max-height-percent-inside-auto-block-expected.html: Added.
  • fast/replaced/max-height-percent-inside-auto-block.html: Added.
  • platform/mac/fast/multicol/pagination/RightToLeft-max-width-expected.txt:
12:13 PM Changeset in webkit [217942] by keith_miller@apple.com
  • 17 edits
    26 deletes in trunk

WebAssembly: We should only create wrappers for functions that can be exported
https://bugs.webkit.org/show_bug.cgi?id=173088

Reviewed by Saam Barati.

JSTests:

Remove a bunch of old tests that are actually duplicates of the spec-tests and rely
on the old testWasmModuleFunctions api, which has been removed.

  • wasm/function-tests/copysign.js: Removed.
  • wasm/function-tests/ctz.js: Removed.
  • wasm/function-tests/drop.js: Removed.
  • wasm/function-tests/dumb-eq-if-then-else.js: Removed.
  • wasm/function-tests/dumb-less-than-fallthrough.js: Removed.
  • wasm/function-tests/dumb-less-than-ite.js: Removed.
  • wasm/function-tests/eqz.js: Removed.
  • wasm/function-tests/i32-trunc-s-f32.js: Removed.
  • wasm/function-tests/i32-trunc-s-f64.js: Removed.
  • wasm/function-tests/i32-trunc-u-f32.js: Removed.
  • wasm/function-tests/i32-trunc-u-f64.js: Removed.
  • wasm/function-tests/i64-trunc-s-f32.js: Removed.
  • wasm/function-tests/i64-trunc-s-f64.js: Removed.
  • wasm/function-tests/i64-trunc-u-f32.js: Removed.
  • wasm/function-tests/i64-trunc-u-f64.js: Removed.
  • wasm/function-tests/if-then-else-fallthrough.js: Removed.
  • wasm/function-tests/if-then-fallthrough.js: Removed.
  • wasm/function-tests/int-to-floating-point.js: Removed.
  • wasm/function-tests/loop-mult.js:
  • wasm/function-tests/loop-sum.js:
  • wasm/function-tests/max.js: Removed.
  • wasm/function-tests/min.js: Removed.
  • wasm/function-tests/nearest.js: Removed.
  • wasm/function-tests/nop.js: Removed.
  • wasm/function-tests/popcnt.js: Removed.
  • wasm/function-tests/ret5.js:
  • wasm/function-tests/select.js: Removed.
  • wasm/function-tests/tee-local.js: Removed.
  • wasm/function-tests/trunc.js: Removed.

Source/JavaScriptCore:

This patch makes it so we only create wrappers for WebAssembly functions that
can actually be exported. It appears to be a ~2.5% speedup on WasmBench compile times.

This patch also removes most of the old testWasmModuleFunctions api from the jsc CLI.
Most of the tests were duplicates of ones in the spec-tests directory. The others I
have converted to use the normal API.

  • jsc.cpp:

(GlobalObject::finishCreation):
(valueWithTypeOfWasmValue): Deleted.
(box): Deleted.
(callWasmFunction): Deleted.
(functionTestWasmModuleFunctions): Deleted.

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::createJSToWasmWrapper):
(JSC::Wasm::parseAndCompile):

  • wasm/WasmB3IRGenerator.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::prepare):
(JSC::Wasm::BBQPlan::compileFunctions):
(JSC::Wasm::BBQPlan::complete):

  • wasm/WasmBBQPlan.h:
  • wasm/WasmBBQPlanInlines.h:

(JSC::Wasm::BBQPlan::initializeCallees):

  • wasm/WasmCodeBlock.cpp:

(JSC::Wasm::CodeBlock::CodeBlock):

  • wasm/WasmCodeBlock.h:

(JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace):

  • wasm/WasmFormat.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

Tools:

Add quick mode for wasm tests.

  • Scripts/run-jsc-stress-tests:
11:56 AM Changeset in webkit [217941] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/fullscreen-button
https://bugs.webkit.org/show_bug.cgi?id=173101

Reviewed by Dean Jackson.

Update the test to check an SVG asset now that we use those.

  • media/modern-media-controls/fullscreen-button/fullscreen-button-expected.txt:
  • media/modern-media-controls/fullscreen-button/fullscreen-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
11:54 AM Changeset in webkit [217940] by graouts@webkit.org
  • 5 edits in trunk/LayoutTests

Rebaseline and enable media/modern-media-controls/forward-button
https://bugs.webkit.org/show_bug.cgi?id=173100

Reviewed by Dean Jackson.

Update the test to check an SVG asset now that we use those.

  • media/modern-media-controls/forward-button/forward-button-expected.txt:
  • media/modern-media-controls/forward-button/forward-button.html:
  • platform/ios-simulator/TestExpectations:
  • platform/mac/TestExpectations:
11:53 AM Changeset in webkit [217939] by graouts@webkit.org
  • 3 edits in trunk/LayoutTests

Layout Test media/modern-media-controls/button/button-icon-name.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=173099

Reviewed by Dean Jackson.

Rewrite the test to use asynchronous assertions, the number of frames running is immaterial to this test.

  • media/modern-media-controls/button/button-icon-name-expected.txt:
  • media/modern-media-controls/button/button-icon-name.html:
11:27 AM Changeset in webkit [217938] by Darin Adler
  • 4 edits in trunk/Tools

WTF tests have incorrect RefLogger lifetimes making it impossible to test with Address Sanitizer
https://bugs.webkit.org/show_bug.cgi?id=173106

Reviewed by Sam Weinig.

  • TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: Define RefLogger objects first, so they are

destroyed last.

  • TestWebKitAPI/Tests/WTF/HashMap.cpp: Ditto.
  • TestWebKitAPI/Tests/WTF/HashSet.cpp: Ditto.
11:08 AM Changeset in webkit [217937] by timothy_horton@apple.com
  • 11 edits
    4 adds in trunk

Add a borderless mode to <attachment>, and make it respect its layout size
https://bugs.webkit.org/show_bug.cgi?id=173079
<rdar://problem/32491584>

Reviewed by Simon Fraser.

Source/WebCore:

Tests: fast/attachment/attachment-borderless.html

fast/attachment/attachment-respects-css-size.html

  • css/CSSPrimitiveValueMappings.h:

(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):

  • css/CSSValueKeywords.in:
  • platform/ThemeTypes.h:
  • rendering/RenderAttachment.cpp:

(WebCore::RenderAttachment::shouldDrawBorder):

  • rendering/RenderAttachment.h:
  • rendering/RenderTheme.cpp:

(WebCore::RenderTheme::adjustStyle):
(WebCore::RenderTheme::paint):
Add "-webkit-appearance: borderless-attachment;" in addition to "attachment",
so clients can specify the borderless appearance. This isn't specified as a
CSS border because it's a very custom appearance that isn't achievable that way.

  • rendering/RenderThemeIOS.mm:

(WebCore::AttachmentInfo::AttachmentInfo):
Use the layout size of the attachment, not the fixed size; we use the fixed
size as our intrinsic size, so most attachments will still be that size,
but if a client specifies a different size, we'll lay out correctly.

LayoutTests:

  • TestExpectations:
  • platform/ios/TestExpectations:
  • fast/attachment/attachment-borderless-expected-mismatch.html: Added.
  • fast/attachment/attachment-borderless.html: Added.
  • fast/attachment/attachment-respects-css-size-expected-mismatch.html: Added.
  • fast/attachment/attachment-respects-css-size.html: Added.

Add mismatch tests ensuring that CSS width/height and borderless-attachment
have *some* kind of impact on rendering.

10:57 AM Changeset in webkit [217936] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebCore

YouTube audio stutters when page changes visibility.
https://bugs.webkit.org/show_bug.cgi?id=173102

Reviewed by Eric Carlson.

Don't change renderers when the visibility changes; only use the decompression session
when we were explicitly asked to paint into an accelerated surface.

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::acceleratedRenderingStateChanged):

10:51 AM Changeset in webkit [217935] by jer.noble@apple.com
  • 10 edits in trunk/Source

Clients of the WK2 C-API don't have their mediaContentTypesRequiringHardwareSupport setting initialized correctly.
https://bugs.webkit.org/show_bug.cgi?id=173091

Reviewed by Eric Carlson.

Source/WebCore:

Add a new default setting value, defined separately in Settings and SettingsCocoa.

  • page/Settings.cpp:

(WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport):

  • page/Settings.h:
  • page/cocoa/SettingsCocoa.mm:

(WebCore::Settings::defaultMediaContentTypesRequiringHardwareSupport):

Source/WebKit/mac:

  • WebView/WebPreferences.mm:

(+[WebPreferences initialize]):

Source/WebKit2:

Rather than add yet a third way of setting this preference, centralize everything by moving the
definition of the default value into WebCore.

  • Shared/WebPreferencesDefinitions.h:
  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

10:26 AM Changeset in webkit [217934] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

[WK2] mediaContentTypesRequiringHardwareSupport setting not being propogated
https://bugs.webkit.org/show_bug.cgi?id=173090

Reviewed by Eric Carlson.

Passing a NSString* into the WebPreferencesStore::Value constructor would rather cast the NSString*
into a bool than a const String&. So explicitly cast the NSString* into a String before passing.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _initializeWithConfiguration:]):

10:23 AM Changeset in webkit [217933] by jer.noble@apple.com
  • 7 edits in trunk/Source/WebCore

Take the mediaContentTypesRequiringHardwareSupport Setting into account when answering HTMLMediaElement::canPlayType()
https://bugs.webkit.org/show_bug.cgi?id=173092

Reviewed by Eric Carlson.

Pass the value of mediaContentTypesRequiringHardwareSupport into the MediaPlayer when querying canPlayType().
Then, use the existing code in AVAssetTrackUtilities to know whether to bail out early from the codec check.

Drive-by fix: FourCC was converting String -> FourCC in reverse.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::canPlayType):

  • platform/graphics/FourCC.cpp:

(WebCore::FourCC::fromString):

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

(WebCore::contentTypesToCodecs):
(WebCore::codecsMeetHardwareDecodeRequirements):
(WebCore::contentTypeMeetsHardwareDecodeRequirements):
(WebCore::assetTrackMeetsHardwareDecodeRequirements):

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

(WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):

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

(WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType):

10:13 AM Changeset in webkit [217932] by Chris Dumez
  • 3 edits in trunk/Source/WebCore
ASSERTION FAILED: !m_isolatedWorld->isNormal()
m_wrapper !m_jsFunction on webrtc/ephemeral-certificates-and-cnames.html

https://bugs.webkit.org/show_bug.cgi?id=173039
<rdar://problem/32600412>

Reviewed by Youenn Fablet.

RTCPeerConnection was an ActiveDOMObject but failed to override ActiveDOMObject::hasPendingActivity()
to make sure its JS wrapper stays alive as long as it needs to. In this patch, we override
ActiveDOMObject::hasPendingActivity() and have it return true if !m_isStopped. I believe this is
the right thing to do to keep the wrapper alive as long as the connection is not closed.
RTCPeerConnection::close() closes the connection and then posts a task to call
RTCPeerConnection::doStop(), setting m_isStopped to true.

No new tests, already covered by webrtc/ephemeral-certificates-and-cnames.html which
was a flaky crash.

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
(WebCore::RTCPeerConnection::hasPendingActivity):

  • Modules/mediastream/RTCPeerConnection.h:
10:01 AM Changeset in webkit [217931] by commit-queue@webkit.org
  • 6 edits in trunk/LayoutTests

Modify security test to avoid spacing differences.
https://bugs.webkit.org/show_bug.cgi?id=141709

Patch by Marcos Chavarría Teijeiro <chavarria1991@gmail.com> on 2017-06-08
Reviewed by Carlos Alberto Lopez Perez.

  • http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients-expected.txt:
  • http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html:
  • http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW-expected.txt:
  • http/tests/security/cross-frame-access-callback-explicit-domain-ALLOW.html:
  • platform/gtk/TestExpectations:
9:28 AM Changeset in webkit [217930] by commit-queue@webkit.org
  • 8 edits in trunk

getUserMedia request should not be allowed for background tabs unless the tab is already capturing
https://bugs.webkit.org/show_bug.cgi?id=172989

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

Source/WebKit2:

Covered by updated test and manual testing.

In case a getUserMedia can be granted, we check for visbility of the view.
If the view is visible, the getUserMedia request is allowed and promise is resolved.
Otherwise we store the pregranted request and will allow it when the view gets visible.
Pregranted requests will be cleared if the document of the view is changed.

Pregranted requests will not be used when capture page is muted.
In that case, a prompt will appear.

  • UIProcess/UserMediaPermissionRequestManagerProxy.cpp:

(WebKit::UserMediaPermissionRequestManagerProxy::removeGrantedAccess):
(WebKit::allowRequest):
(WebKit::UserMediaPermissionRequestManagerProxy::requestUserMediaPermissionForFrame):
(WebKit::UserMediaPermissionRequestManagerProxy::processPregrantedRequests):

  • UIProcess/UserMediaPermissionRequestManagerProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::viewIsBecomingVisible):

  • UIProcess/WebPageProxy.h:

LayoutTests:

  • fast/mediastream/getUserMedia-grant-persistency-expected.txt:
  • fast/mediastream/getUserMedia-grant-persistency.html: Using testRunner.setPageVisibility so that UIProcess is made aware of the change.

Removing test about capture muted page since there is no API for setting a page as muted right now.
This test should be readded later on.

6:24 AM Changeset in webkit [217929] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] Test gardening
https://bugs.webkit.org/show_bug.cgi?id=173093

Unreviewed GTK gardening.

r147201 added a crash expectation for the following test, but did so in a manner
that failed linter checks:

LayoutTests/platform/gtk/TestExpectations:1302 More specific entry for

http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html on line
LayoutTests/platform/gtk/TestExpectations:992 overrides line LayoutTests/platform/gtk/TestExpectations:1302.
http/tests/security/XFrameOptions/x-frame-options-deny-multiple-clients.html

Furthermore, this test no longer crashes in Debug builds, it fails due to whitespace
oddities that are addressed by webkit.org/b/141709 (unreviewed)

Patch by Charlie Turner <cturner@igalia.com> on 2017-06-08

  • platform/gtk/TestExpectations:
6:10 AM Changeset in webkit [217928] by calvaris@igalia.com
  • 8 edits in trunk

MediaTime class has rounding issues in different platforms
https://bugs.webkit.org/show_bug.cgi?id=172640

Reviewed by Jer Noble.

Source/WTF:

The way a timescale is set when creating a MediaTime from a double
can create rounding issues in different platforms because in some
rounding is made and in others, it truncates. This way we ensure a
common behavior.

Dumping MediaTimes is also confusing and by the output you don't
know if it's containing a double or a fraction. Now, if it
contains a double, it only prints the double because printing the
fraction is misleading (it currently prints the double read as an
integer) and if it contains a fraction it shows the fraction and
its double representation separated by an = instead of a ,.

  • wtf/MediaTime.cpp:

(WTF::MediaTime::createWithDouble): When creating MediaTime from
double, we round instead of leaving it to the cast operation.
(WTF::MediaTime::dump):

LayoutTests:

Update expectations because the MediaTime printing changed, but
results are the same.

  • media/media-source/media-source-overlapping-append-expected.txt:
  • media/media-source/media-source-overlapping-decodetime-expected.txt:
  • media/media-source/media-source-seek-back-expected.txt:
  • media/media-source/media-source-sequence-timestamps-expected.txt:
  • media/media-source/media-source-timeoffset-expected.txt:
3:16 AM Changeset in webkit [217927] by magomez@igalia.com
  • 6 edits in trunk/Source/WebCore

[GTK][WPE][GSTREAMER_GL] Change the colorspace used by the video frames provided by GStreamer
https://bugs.webkit.org/show_bug.cgi?id=173050

Reviewed by Žan Doberšek.

We are currently requesting RGBA as the color format of the video frames to gstreamer. This is a problem
because when those frames are rendered with the CPU, the R and B components are swapped as cairo expects
ARGB and GStreamer delivers ABGR.

In order to fix this without performing color conversions on the CPU, what we do is change the format
used by GStreamer for the video frames. We do that taking into account the endianness used. So with
little endian we will use BGRx or BGRA and with big endian xRGB or ARGB. Thanks to this, when downloading
the frames to the CPU they will automatically be turned into the ARGB expected by cairo. Also, when
rendering the frames using OpenGL, we indicate that the color space needs to be converted to the RGBA
expected by the destination texture (but this color conversion is performed by the GPU so there's no
penalty).

Covered by existent tests.

  • platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:

(WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
(WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
(WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
(WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:

(WebCore::VideoTextureCopierGStreamer::VideoTextureCopierGStreamer):
(WebCore::VideoTextureCopierGStreamer::updateColorConversionMatrix):
(WebCore::VideoTextureCopierGStreamer::copyVideoTextureToPlatformTexture):

  • platform/graphics/gstreamer/VideoTextureCopierGStreamer.h:
  • platform/graphics/texmap/TextureMapperGL.cpp:

(WebCore::colorSpaceMatrixForFlags):

  • platform/graphics/texmap/TextureMapperGL.h:
12:30 AM Changeset in webkit [217926] by rniwa@webkit.org
  • 4 edits in trunk

IsInShadowTreeFlag does not get updated for a non-container node
https://bugs.webkit.org/show_bug.cgi?id=173084

Reviewed by Antti Koivisto.

.:

  • WebKit.xcworkspace/xcshareddata/xcschemes/All Source.xcscheme:

Source/WebCore:

insertedInto and removedFrom were only called on ContainerNode nodes when they're not connected to a document.
As a result IsInShadowTreeFlag could have gotten out-of-date when a node was inserted or removed from a shadow root
which is not connected to a document.

Fixed this inconsistency by always falling insertedInto and removedFrom on all nodes.

  • dom/ContainerNodeAlgorithms.cpp:

(WebCore::notifyNodeInsertedIntoDocument): Merged notifyDescendantInsertedIntoDocument. Now takes a Node instead
of a ContainerNode.
(WebCore::notifyNodeInsertedIntoTree): Merged notifyDescendantInsertedIntoTree. Now takes a Node instead of
a ContainerNode.
(WebCore::notifyChildNodeInserted): Always call notifyNodeInsertedIntoTree on an inserted node.
(WebCore::notifyNodeRemovedFromDocument): Now takes a Node instead of a ContainerNode.
(WebCore::notifyNodeRemovedFromTree): Ditto.
(WebCore::notifyChildNodeRemoved): Always call notifyNodeRemovedFromTree on an inserted node.
(WebCore::addChildNodesToDeletionQueue): Directly call adoptIfNeeded on document() since onwerDocument() only returns
nullptr on a Document node but this function is never called on a root node and Document can only be a root node.
Also assert that a node not put into the deletion queue is no longer in a document or a shadow tree.

  • dom/Node.cpp:

(WebCore::Node::insertedInto): Removed the assertion that's no longer true.
(WebCore::Node::removedFrom): Ditto.

Note: See TracTimeline for information about the timeline view.