Timeline



Jul 1, 2017:

11:48 PM Changeset in webkit [219057] by timothy_horton@apple.com
  • 6 edits in trunk/Source/WebKit

Expose viewport-fit value to UIKit via viewport arguments dictionary
https://bugs.webkit.org/show_bug.cgi?id=174071
<rdar://problem/33096620>

Reviewed by Wenson Hsieh.

Source/WebKit/ios:

  • WebCoreSupport/WebChromeClientIOS.mm:

(nameForViewportFitValue):
(dictionaryForViewportArguments):
Make use of the named constants we already have for these; the code
that reads this dictionary uses them, so we might as well!

Add viewport-fit -> { auto, contain, cover } to the dictionary.

  • WebKit.iOS.exp:

Source/WebKit/mac:

  • History/WebHistoryItem.mm:
  • History/WebHistoryItemPrivate.h:

Add another dictionary key and three values.

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

<rdar://problem/33096441> r219055 broke non-iOS builds.

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::lookupFallbackFont):

7:06 PM Changeset in webkit [219055] by mitz@apple.com
  • 54 edits
    1 delete in trunk

[iOS] Remove code only needed when building for iOS 9.x
https://bugs.webkit.org/show_bug.cgi?id=174068

Reviewed by Tim Horton.

Source/bmalloc:

  • bmalloc/BPlatform.h:
  • bmalloc/VMAllocate.h:

(bmalloc::vmPageSizePhysical):

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:
  • jit/ExecutableAllocator.cpp:
  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

Source/WebCore:

  • Configurations/FeatureDefines.xcconfig:
  • editing/cocoa/DataDetection.mm:

(WebCore::DataDetection::isDataDetectorLink):
(WebCore::DataDetection::shouldCancelDefaultAction):
(WebCore::constructURLStringForResult):
(WebCore::DataDetection::detectContentInRange):

  • page/cocoa/ResourceUsageThreadCocoa.mm:

(WebCore::vmPageSize):

  • platform/cocoa/DataDetectorsCoreSoftLink.h:
  • platform/cocoa/DataDetectorsCoreSoftLink.mm:
  • platform/graphics/FontPlatformData.cpp:
  • platform/graphics/FontPlatformData.h:
  • platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:

(layerContentsFormat):
(PlatformCALayerCocoa::updateContentsFormat):
(PlatformCALayerCocoa::backingStoreBytesPerPixel):

  • platform/graphics/cg/GraphicsContextCG.cpp:

(WebCore::extendedSRGBColorSpaceRef):

  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::drawPDFPage):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::lookupFallbackFont):

  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::variantCapsSupportsCharacterForSynthesis):
(WebCore::Font::platformWidthForGlyph):

  • platform/graphics/cocoa/FontPlatformDataCocoa.mm:

(WebCore::FontPlatformData::FontPlatformData):
(WebCore::FontPlatformData::ctFont):

  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::sinkIntoImage):

  • platform/graphics/cocoa/WebCoreDecompressionSession.mm:

(WebCore::WebCoreDecompressionSession::setTimebase):

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::systemFontModificationAttributes):
(WebCore::systemFontDescriptor):

  • platform/graphics/mac/FontCustomPlatformData.cpp:

(WebCore::FontCustomPlatformData::supportsFormat):

  • platform/ios/LegacyTileGridTile.mm:

(WebCore::LegacyTileGridTile::LegacyTileGridTile):

  • platform/ios/PlatformScreenIOS.mm:

(WebCore::screenSupportsExtendedColor):

  • platform/ios/RemoteCommandListenerIOS.mm:

(WebCore::RemoteCommandListenerIOS::RemoteCommandListenerIOS):
(WebCore::RemoteCommandListenerIOS::~RemoteCommandListenerIOS):
(WebCore::RemoteCommandListenerIOS::updateSupportedCommands):

  • platform/spi/cf/CFNetworkSPI.h:
  • platform/spi/cg/CoreGraphicsSPI.h:
  • platform/spi/cocoa/DataDetectorsCoreSPI.h:
  • platform/spi/cocoa/QuartzCoreSPI.h:
  • platform/spi/mac/AVFoundationSPI.h:

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

  • Configurations/FeatureDefines.xcconfig:
  • Configurations/WebKit.xcconfig:
  • Platform/spi/ios/UIKitSPI.h:
  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView dealloc]):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFormInputSession setSuggestions:]):
(-[WKFormInputSession invalidate]):
(-[WKContentView insertTextSuggestion:]):
(contentTypeFromFieldName):
(-[WKContentView textInputTraits]):
(-[WKContentView _dataForPreviewItemController:atPosition:type:]):

  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::WebPage::getPositionInformation):

  • config.h:

Source/WTF:

  • wtf/Platform.h:
  • wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
  • wtf/spi/darwin/dyldSPI.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::initializeWebViewConfiguration):

  • WebKitTestRunner/ios/HIDEventGenerator.mm:

(-[HIDEventGenerator _createIOHIDEventType:]):

WebKitLibraries:

  • WebKitPrivateFrameworkStubs/iOS/9: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/AppSupport.framework: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/AppSupport.framework/AppSupport.tbd: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/AssertionServices.framework: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/AssertionServices.framework/AssertionServices.tbd: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/CorePDF.framework: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/CorePDF.framework/CorePDF.tbd: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/GraphicsServices.framework: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/GraphicsServices.framework/GraphicsServices.tbd: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/IOSurface.framework: Removed.
  • WebKitPrivateFrameworkStubs/iOS/9/IOSurface.framework/IOSurface.tbd: Removed.
4:29 PM Changeset in webkit [219054] by mmaxfield@apple.com
  • 5 edits
    2 adds in trunk

REGRESSION(r218371): Reeder's default font is Times instead of San Francisco
https://bugs.webkit.org/show_bug.cgi?id=173617
<rdar://problem/32969819>

Reviewed by Simon Fraser.

Source/WebCore:

On systems where USE_PLATFORM_SYSTEM_FALLBACK_LIST is set to true, the code in
platformFontWithFamilySpecialCase() is still used when @font-face blocks specify
src:local(system-ui), which made the assertion erroneously fire.

Unfortunately, our architecture is such that an @font-face block represents a
single entry in the font-family fallback list, which means it would be quite
difficult to make local(system-ui) in an @font-face block expand at the level
of the font cascade. So, this patch simply reverts to the previous behavior for
local(system-ui) (which doesn't include the entire Core Text cascade list).
This means that "font-family: system-ui" and "src: local(system-ui)" have
different behavior, which is undesirable, but architecturally difficult to
solve. I've added some FIXMEs to the code in the relevant places and filed
https://bugs.webkit.org/show_bug.cgi?id=174023.

Test: fast/text/font-face-local-system.html

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::FontCascadeDescription::effectiveFamilyAt):

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::systemFontDescriptor):
(WebCore::platformFontWithFamilySpecialCase):

  • platform/graphics/mac/FontCacheMac.mm:

(WebCore::platformFontWithFamilySpecialCase):

LayoutTests:

  • fast/text/font-face-local-system-expected.html: Added.
  • fast/text/font-face-local-system.html: Added.
2:42 PM Changeset in webkit [219053] by Caio Lima
  • 2 edits in trunk/Source/WTF

[JSC] WTFGetBacktrace can return numberOfFrames == 0 in some architectures
https://bugs.webkit.org/show_bug.cgi?id=172768

Reviewed by Mark Lam.

In some architectures, like ARMv6 running on a Raspberry pi, the
backtrace function from "execinfo.h" is returning 0. In
that case, the RELEASE_ASSERT in StackTrace::captureStackTrace
fails causing a runtime crash.
This patch is adding a guard for the case described above to
avoid a runtime crash in such case.

  • wtf/StackTrace.cpp:

(WTF::StackTrace::captureStackTrace):

2:37 PM Changeset in webkit [219052] by beidson@apple.com
  • 9 edits in trunk

When setting a custom cookie storage location on a WKWebsiteDataStore, cookies aren't actually removed.
<rdar://problem/32410662> and https://bugs.webkit.org/show_bug.cgi?id=174035

Reviewed by Alex Christensen.

Source/WebKit2:

  • UIProcess/API/Cocoa/WKProcessPool.mm:

(-[WKProcessPool _terminateNetworkProcess]):

  • UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
  • UIProcess/WebProcessPool.cpp:

(WebKit::WebProcessPool::ensureNetworkProcess): Take an optional WebsiteDataStore. If one is passed in,

send it to either the existing or new network process.

  • UIProcess/WebProcessPool.h:
  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters): Resolve paths first.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::removeData):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsiteDataStoreCustomPaths.mm:
2:26 PM Changeset in webkit [219051] by rniwa@webkit.org
  • 50 edits in trunk/Source

Frame.h doesn't need to include FrameLoader.h, IntRect.h, and NavigationScheduler.h
https://bugs.webkit.org/show_bug.cgi?id=174004

Reviewed by Simon Fraser.

Source/WebCore:

Made FrameLoader and NavigationScheduler UniqueRef in Frame so that we can forward declare them,
and forward declared IntPoint and IntRect to avoid including FrameLoader.h, IntRect.h,
and NavigationScheduler.h in Frame.h

  • Modules/mediastream/MediaStream.cpp:
  • Modules/webaudio/AudioContext.cpp:
  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect): Avoid calling loader().mixedContentChecker().canRunInsecureContent(~)
on a nullptr even though this used to work because we weren't de-referencing it.

  • bindings/js/ScriptController.cpp:
  • dom/Document.cpp:
  • dom/EventDispatcher.cpp:
  • editing/Editor.cpp:
  • editing/cocoa/EditorCocoa.mm:
  • editing/ios/EditorIOS.mm:
  • editing/mac/EditorMac.mm:
  • history/CachedPage.cpp:
  • html/HTMLObjectElement.cpp:
  • html/parser/HTMLDocumentParser.cpp:

(WebCore::DocumentLoader::~DocumentLoader): Check !isLoading() before accessing frameLoader to avoid
accessing m_frame->loader() inside ~FrameLoader.

  • html/parser/XSSAuditor.cpp:
  • html/parser/XSSAuditorDelegate.cpp:
  • inspector/InspectorInstrumentation.h:
  • loader/CrossOriginPreflightChecker.cpp:
  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::setOpener): Avoid accessing this FrameLoader via m_opener->loader() when it's
this FrameLoader inside ~FrameLoader since UniqueRef<FrameLoader> is clears itself before calling
the destructor of FrameLoader.

  • loader/ImageLoader.cpp:
  • loader/LinkLoader.cpp:
  • loader/SubframeLoader.cpp:
  • loader/appcache/ApplicationCacheGroup.cpp:
  • loader/appcache/DOMApplicationCache.cpp:
  • mathml/MathMLElement.cpp:
  • page/DOMWindow.cpp:
  • page/Frame.cpp:

(WebCore::Frame::Frame):
(WebCore::Frame::init): Moved here from Frame.h
(WebCore::Frame::setDocument):

  • page/Frame.h:

(WebCore::Frame::loader):
(WebCore::Frame::navigationScheduler):

  • page/History.cpp:
  • page/Location.cpp:
  • page/PerformanceLogging.cpp:
  • page/PerformanceNavigation.cpp:
  • page/UserContentProvider.cpp:
  • page/ios/FrameIOS.mm:

(WebCore::Frame::initWithSimpleHTMLDocument):

  • plugins/PluginInfoProvider.cpp:
  • replay/ReplayInputCreationMethods.cpp:
  • replay/UserInputBridge.cpp:
  • xml/XSLTProcessorLibxslt.cpp:
  • xml/parser/XMLDocumentParserLibxml2.cpp:

Source/WebKit/mac:

  • WebCoreSupport/WebPluginInfoProvider.mm:

Source/WebKit/win:

  • WebCoreSupport/WebFrameLoaderClient.cpp:

(WebFrameLoaderClient::transitionToCommittedForNewPage):

Source/WebKit2:

  • WebProcess/Plugins/WebPluginInfoProvider.cpp:
  • WebProcess/WebPage/WebInspector.cpp:
2:12 PM Changeset in webkit [219050] by mitz@apple.com
  • 155 edits
    3 deletes in trunk

[macOS] Remove code only needed when building for OS X Yosemite
https://bugs.webkit.org/show_bug.cgi?id=174067

Reviewed by Tim Horton.

Source/bmalloc:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:

Source/JavaScriptCore:

  • API/WebKitAvailability.h:
  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:

Source/ThirdParty/ANGLE:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:

Source/ThirdParty/libwebrtc:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:

Source/WebCore:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):

  • html/HTMLCanvasElement.cpp:
  • page/WheelEventDeltaFilter.cpp:

(WebCore::WheelEventDeltaFilter::create):

  • page/mac/WheelEventDeltaFilterMac.h:
  • page/mac/WheelEventDeltaFilterMac.mm:
  • page/scrolling/ScrollingMomentumCalculator.cpp:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
  • page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
  • platform/cocoa/NetworkExtensionContentFilter.mm:

(replacementDataFromDecisionInfo):
(WebCore::NetworkExtensionContentFilter::initialize):
(WebCore::NetworkExtensionContentFilter::willSendRequest):
(WebCore::NetworkExtensionContentFilter::responseReceived):
(WebCore::NetworkExtensionContentFilter::addData):
(WebCore::NetworkExtensionContentFilter::finishedAddingData):
(WebCore::NetworkExtensionContentFilter::unblockHandler):

  • platform/graphics/ComplexTextController.h:
  • platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm:

(PlatformCAAnimationCocoa::setTimingFunction):

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontCache::platformAlternateFamilyName):

  • platform/graphics/cocoa/FontCocoa.mm:

(WebCore::Font::platformInit):

  • platform/graphics/cocoa/IOSurface.mm:

(WebCore::IOSurface::sinkIntoImage):

  • platform/graphics/cocoa/WebGPULayer.mm:

(-[WebGPULayer initWithGPUDevice:]):

  • platform/graphics/mac/ComplexTextControllerCoreText.mm:

(WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):

  • platform/graphics/mac/WebGLLayer.mm:

(-[WebGLLayer initWithGraphicsContext3D:]):

  • platform/mac/BlacklistUpdater.mm:
  • platform/mac/PlatformScreenMac.mm:

(WebCore::screenSupportsExtendedColor):

  • platform/mac/ValidationBubbleMac.mm:

(WebCore::ValidationBubble::ValidationBubble):

  • platform/mac/WebGLBlacklist.mm:

(WebCore::WebGLBlacklist::create):

  • platform/network/cocoa/WebCoreNSURLSession.h:
  • platform/network/cocoa/WebCoreNSURLSession.mm:
  • platform/network/mac/CertificateInfoMac.mm:

(WebCore::CertificateInfo::containsNonRootSHA1SignedCertificate):

  • platform/network/mac/CookieJarMac.mm:

(WebCore::setCookiesFromDOM):

  • platform/spi/cf/CFNetworkSPI.h:
  • platform/spi/cg/CoreGraphicsSPI.h:
  • platform/spi/cocoa/NEFilterSourceSPI.h:
  • platform/spi/cocoa/NSURLConnectionSPI.h:
  • platform/spi/cocoa/QuartzCoreSPI.h:
  • platform/spi/mac/NSScrollingInputFilterSPI.h:
  • platform/spi/mac/NSScrollingMomentumCalculatorSPI.h:
  • platform/spi/mac/TUCallSPI.h:
  • rendering/RenderThemeMac.mm:

(WebCore::RenderThemeMac::levelIndicatorFor):

  • svg/SVGToOTFFontConversion.cpp:

(WebCore::SVGToOTFFontConverter::appendKERNTable):
(WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):

Source/WebCore/PAL:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:

Source/WebInspectorUI:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/Version.xcconfig:

Source/WebKit/mac:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/Version.xcconfig:
  • Plugins/WebBasePluginPackage.mm:

(-[WebBasePluginPackage getPluginInfoFromPLists]):

  • WebCoreSupport/PopupMenuMac.mm:

(PopupMenuMac::show):

  • WebCoreSupport/WebInspectorClient.mm:

(WebInspectorFrontendClient::startWindowDrag):
(-[WebInspectorWindowController window]):

  • WebView/WebView.mm:

(-[WebView _animationControllerForDictionaryLookupPopupInfo:]):

Source/WebKit2:

  • Configurations/Base.xcconfig:
  • Configurations/BaseTarget.xcconfig:
  • Configurations/BaseXPCService.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • Configurations/FeatureDefines.xcconfig:
  • Configurations/NetworkService.xcconfig:
  • Configurations/PluginService.32.xcconfig:
  • Configurations/PluginService.64.xcconfig:
  • Configurations/Version.xcconfig:
  • Configurations/WebContentService.xcconfig:
  • Configurations/WebKit.xcconfig:
  • DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in:
  • NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX-10.9-10.10.plist: Removed.
  • NetworkProcess/NetworkProcessCreationParameters.cpp:

(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):

  • NetworkProcess/NetworkProcessCreationParameters.h:
  • NetworkProcess/cocoa/NetworkProcessCocoa.mm:

(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):

  • NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
  • Platform/IPC/Connection.h:
  • Platform/IPC/mac/ConnectionMac.mm:

(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::open):
(IPC::Connection::exceptionSourceEventHandler): Deleted.
(IPC::Connection::setShouldCloseConnectionOnMachExceptions): Deleted.

  • Platform/mac/LayerHostingContext.h:
  • Platform/mac/LayerHostingContext.mm:

(WebKit::LayerHostingContext::createFencePort):

  • PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64-10.9-10.10.Info.plist: Removed.
  • PluginProcess/mac/PluginControllerProxyMac.mm:

(WebKit::PluginControllerProxy::updateLayerHostingContext):

  • PluginProcess/mac/PluginProcessShim.mm:
  • PluginProcess/mac/com.apple.WebKit.plugin-common.sb.in:
  • Shared/ChildProcess.h:
  • Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:

(WebKit::getPluginInfoFromPropertyLists):
(WebKit::NetscapePluginModule::getPluginInfo):
(WebKit::contentsOfPropertyListAtURL): Deleted.
(WebKit::getMIMETypesFromPluginBundle): Deleted.

  • Shared/Plugins/PluginProcessCreationParameters.cpp:

(WebKit::PluginProcessCreationParameters::encode):
(WebKit::PluginProcessCreationParameters::decode):

  • Shared/Plugins/PluginProcessCreationParameters.h:
  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • Shared/mac/ChildProcessMac.mm:

(WebKit::ChildProcess::setSharedHTTPCookieStorage):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):
(fixUpBotchedPageUIClient): Deleted.

  • UIProcess/ChildProcessProxy.cpp:

(WebKit::ChildProcessProxy::didFinishLaunching):

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):
(WebKit::WebProcessPool::platformInitializeNetworkProcess):
(WebKit::WebProcessPool::resetHSTSHostsAddedAfterDate):

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

(WebKit::WebViewImpl::updateLayer):
(WebKit::WebViewImpl::startWindowDrag):

  • UIProcess/DrawingAreaProxy.h:

(WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate): Deleted.

  • UIProcess/Plugins/PluginProcessProxy.cpp:

(WebKit::PluginProcessProxy::didFinishLaunching):

  • UIProcess/Plugins/PluginProcessProxy.h:
  • UIProcess/Plugins/mac/PluginProcessProxyMac.mm:

(WebKit::PluginProcessProxy::platformInitializePluginProcess):
(WebKit::PluginProcessProxy::createPropertyListFile): Deleted.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setTopContentInset):

  • UIProcess/mac/PageClientImpl.mm:

(WebKit::PageClientImpl::rootViewToWindow):
(WebKit::PageClientImpl::startWindowDrag):

  • UIProcess/mac/RemoteWebInspectorProxyMac.mm:

(WebKit::RemoteWebInspectorProxy::platformStartWindowDrag):

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

(WebKit::TiledCoreAnimationDrawingAreaProxy::createFence):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate): Deleted.

  • UIProcess/mac/WebInspectorProxyMac.mm:

(WebKit::WebInspectorProxy::createFrontendWindow):
(WebKit::WebInspectorProxy::platformStartWindowDrag):

  • UIProcess/mac/WebPopupMenuProxyMac.mm:

(WebKit::WebPopupMenuProxyMac::showPopupMenu):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX-10.9-10.10.plist: Removed.
  • WebProcess/WebPage/WebPage.cpp:
  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:

(WebKit::addAnimationToLayer):

  • WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:

(WebKit::RemoteLayerTreeDrawingArea::flushLayers):

  • WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeWebProcess):

  • WebProcess/com.apple.WebProcess.sb.in:

Source/WTF:

  • Configurations/Base.xcconfig:
  • Configurations/DebugRelease.xcconfig:
  • wtf/Platform.h:
  • wtf/mac/AppKitCompatibilityDeclarations.h:
  • wtf/spi/cocoa/SecuritySPI.h:
  • wtf/text/TextBreakIterator.cpp:

Tools:

  • DumpRenderTree/mac/Configurations/Base.xcconfig:
  • DumpRenderTree/mac/Configurations/DebugRelease.xcconfig:
  • DumpRenderTree/mac/DumpRenderTree.mm:

(setDefaultsToConsistentValuesForTesting):

  • DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:

(-[DumpRenderTreeDraggingInfo resetSpringLoading]):

  • MiniBrowser/Configurations/Base.xcconfig:
  • MiniBrowser/Configurations/DebugRelease.xcconfig:
  • TestWebKitAPI/Configurations/Base.xcconfig:
  • TestWebKitAPI/Configurations/DebugRelease.xcconfig:
  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
  • TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
  • TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:
  • TestWebKitAPI/Tests/mac/FullscreenZoomInitialFrame.mm:

(TestWebKitAPI::TEST_F):

  • TestWebKitAPI/Tests/mac/StringTruncator.mm:

(TestWebKitAPI::TEST):

  • WebKitTestRunner/Configurations/Base.xcconfig:
  • WebKitTestRunner/Configurations/DebugRelease.xcconfig:
  • WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:

(WTR::InjectedBundle::platformInitialize):

  • WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm:

(-[WebKitTestRunnerDraggingInfo resetSpringLoading]):

9:10 AM Changeset in webkit [219049] by Chris Dumez
  • 14 edits
    4 deletes in trunk

Replace ResourceLoadStatisticsStore C API with Cocoa SPI
https://bugs.webkit.org/show_bug.cgi?id=174060

Reviewed by Brent Fulgham.

Source/WebKit2:

Replace ResourceLoadStatisticsStore C API by Cocoa SPI. The new Cocoa SPI is on
WKWebsiteDataStore, which allows us to get rid of the WebResourceLoadStatisticsManager
singleton as the SPI can now interact directly with the WebResourceLoadStatisticsStore.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp: Removed.
  • UIProcess/API/C/WKResourceLoadStatisticsManager.h: Removed.

Drop old C API.

  • UIProcess/WebResourceLoadStatisticsManager.cpp: Removed.
  • UIProcess/WebResourceLoadStatisticsManager.h: Removed.

Drop WebResourceLoadStatisticsManager singleton which was only required by the
C API. This is because the C API was global, rather than working on a specific
store.

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
  • UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h:

Add new Cocoa SPI on WKWebsiteDataStore. This is only used for testing.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
Stop registering the store with the WebResourceLoadStatisticsManager singleton,
as this singleton is gone.

  • UIProcess/WebsiteData/WebsiteDataStore.h:

(WebKit::WebsiteDataStore::resourceLoadStatistics):
Add new getter to retrieve the WebResourceLoadStatisticsStore from the
WebsiteDataStore. This is needed by the new Cocoa SPI.

  • WebKit2.xcodeproj/project.pbxproj:

Drop some files.

Tools:

Port WebKitTestRunner over to the new Cocoa SPI.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::setStatisticsNotifyPagesWhenDataRecordsWereScanned):
(WTR::TestRunner::setStatisticsNotifyPagesWhenTelemetryWasCaptured):
Drop calls to the WKResourceLoadStatisticsStore C API here. Those were
no-ops since this code runs in the WebContent process, not the
UIProcess.

  • WebKitTestRunner/TestController.cpp:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:
7:28 AM Changeset in webkit [219048] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WTF

Add a warning if WEBGL2 is enabled without WEBGL
https://bugs.webkit.org/show_bug.cgi?id=174054

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-01
Reviewed by Sam Weinig.

  • wtf/FeatureDefines.h:
2:36 AM Changeset in webkit [219047] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

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

  • b3/testb3.cpp:

(JSC::B3::testDoubleLiteralComparison):

Jun 30, 2017:

11:24 PM Changeset in webkit [219046] by keith_miller@apple.com
  • 6 edits in trunk/Source

Force crashWithInfo to be out of line.
https://bugs.webkit.org/show_bug.cgi?id=174028

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

Update DFG_ASSERT macro to call CRASH_WITH_SECURITY_IMPLICATION_AND_INFO.

  • dfg/DFGGraph.cpp:

(JSC::DFG::logDFGAssertionFailure):
(JSC::DFG::Graph::logAssertionFailure):
(JSC::DFG::crash): Deleted.
(JSC::DFG::Graph::handleAssertionFailure): Deleted.

  • dfg/DFGGraph.h:

Source/WTF:

The first pass at making crashes hold information about why they
were crashing had the problem that it would inline the assertion.
This meant that clang could coalesce DFG_ASSERTS with other
assertion failures in the same function. This patch moves it out
of line to help fix that issue.

  • wtf/Assertions.cpp:

(WTFCrashWithInfo):

  • wtf/Assertions.h:

(WTF::isIntegralType):

11:23 PM Changeset in webkit [219045] by commit-queue@webkit.org
  • 26 edits
    4 adds in trunk

If an image appears more than once on a page, decoding for painting one instance repaints them all
https://bugs.webkit.org/show_bug.cgi?id=169944

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

Source/WebCore:

Make the Image::draw*() and GraphicsContext::draw*() functions return an
ImageDrawResult which indicates whether the image is drawn or has requested
an asynchronous image decoding.

If the image requested an asynchronous image decoding, the issuer of the
Image::draw(), which is of type CachedImageClient, will add itself to a
set of m_pendingImageDrawingClients, which owned by CachedImage.

When receiving the imageFrameAvailable() notification for a lrage image
from the decoding thread, CachedImage will loop through the clients that
are only in m_pendingImageDrawingClients to ask them to repaint their
rectangles.

Test: fast/images/async-image-multiple-clients-repaint.html

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::didRemoveClient):
(WebCore::CachedImage::addPendingImageDrawingClient):
(WebCore::CachedImage::allClientsRemoved):
(WebCore::CachedImage::clear):
(WebCore::CachedImage::imageFrameAvailable):

  • loader/cache/CachedImage.h:
  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::draw):

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

(WebCore::CrossfadeGeneratedImage::draw):

  • platform/graphics/CrossfadeGeneratedImage.h:
  • platform/graphics/GeneratedImage.h:
  • platform/graphics/GradientImage.cpp:

(WebCore::GradientImage::draw):

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

(WebCore::GraphicsContext::drawImage):
(WebCore::GraphicsContext::drawTiledImage):

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

(WebCore::Image::drawTiled):

  • platform/graphics/Image.h:
  • platform/graphics/ImageTypes.h:
  • platform/graphics/NamedImageGeneratedImage.cpp:

(WebCore::NamedImageGeneratedImage::draw):

  • platform/graphics/NamedImageGeneratedImage.h:
  • platform/graphics/cg/PDFDocumentImage.cpp:

(WebCore::PDFDocumentImage::draw):

  • platform/graphics/cg/PDFDocumentImage.h:
  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::paintFillLayerExtended):

  • rendering/RenderImage.cpp:

(WebCore::RenderImage::paintIntoRect):

  • svg/graphics/SVGImage.cpp:

(WebCore::SVGImage::drawForContainer):
(WebCore::SVGImage::draw):

  • svg/graphics/SVGImage.h:
  • svg/graphics/SVGImageForContainer.cpp:

(WebCore::SVGImageForContainer::draw):

  • svg/graphics/SVGImageForContainer.h:

LayoutTests:

  • fast/images/async-image-multiple-clients-repaint-expected.txt: Added.
  • fast/images/async-image-multiple-clients-repaint.html: Added.
  • platform/ios-simulator/fast/images: Added.
  • platform/ios-simulator/fast/images/async-image-multiple-clients-repaint-expected.txt: Added.
10:57 PM Changeset in webkit [219044] by Jonathan Bedard
  • 2 edits in trunk/LayoutTests

Run webgl tests on iOS ports
https://bugs.webkit.org/show_bug.cgi?id=173000

Unreviewed test gardening.

  • platform/ios/TestExpectations: Enable webgl, fast/canvas/webgl and http/tests/webgl.
10:24 PM Changeset in webkit [219043] by Yusuke Suzuki
  • 3 edits in trunk/Source/JavaScriptCore

[JSC] Use AbstractMacroAssembler::random instead of holding WeakRandom in JIT
https://bugs.webkit.org/show_bug.cgi?id=174053

Reviewed by Geoffrey Garen.

We already have AbstractMacroAssembler::random() function. Use it instead.

  • jit/JIT.cpp:

(JSC::JIT::JIT):
(JSC::JIT::compileWithoutLinking):

  • jit/JIT.h:
10:09 PM Changeset in webkit [219042] by Yusuke Suzuki
  • 6 edits in trunk/Source

[WTF] Drop SymbolRegistry::keyForSymbol
https://bugs.webkit.org/show_bug.cgi?id=174052

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • runtime/SymbolConstructor.cpp:

(JSC::symbolConstructorKeyFor):

Source/WTF:

Since we can know whether a given symbol is registered by checking RegisteredSymbolImpl,
we do not need to query key string for a given symbol by using SymbolRegistry::keyForSymbol.

  • wtf/text/SymbolImpl.h:

(WTF::SymbolImpl::extractFoldedString): Deleted.

  • wtf/text/SymbolRegistry.cpp:

(WTF::SymbolRegistry::keyForSymbol): Deleted.

  • wtf/text/SymbolRegistry.h:
10:06 PM Changeset in webkit [219041] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Type token background color in debugger looks poor
https://bugs.webkit.org/show_bug.cgi?id=174063

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-30
Reviewed by Devin Rousso.

  • UserInterface/Views/TextEditor.css:

CodeMirror widgets do not get range styles like our (.execution-range-highlight).
Make a best effort to carry over the styles to widgets. It isn't perfect, but it
covers all common situations unless a selection ends inside the widget. The
ultimate solution would be to get the expected range styles.

9:53 PM Changeset in webkit [219040] by jonlee@apple.com
  • 1 edit
    7 adds in trunk/Websites/webkit.org

Add a WebRTC example for a blog post
https://bugs.webkit.org/show_bug.cgi?id=174049

Reviewed by Youenn Fablet.

Example does a typical WebRTC video call, but uses canvas to do some image effects.
Image effects will last for 30 seconds.
After that time, the video stream is directly sent.
This illustrates using RTCPeerConnection, replaceTrack and canvas capture.

  • blog-files/webrtc/pc-with-effects/LICENSE: Added.
  • blog-files/webrtc/pc-with-effects/glfx.js: Added.
  • blog-files/webrtc/pc-with-effects/index.html: Added.
  • blog-files/webrtc/pc-with-effects/main.css: Added.
  • blog-files/webrtc/pc-with-effects/main.js: Added.
8:39 PM Changeset in webkit [219039] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r214194): Safari leaves a popup window open opened during before unload
https://bugs.webkit.org/show_bug.cgi?id=174016

Reviewed by Chris Dumez.

Address Dan's review comments.

  • loader/NavigationDisabler.h:

(WebCore::NavigationDisabler::NavigationDisabler):
(WebCore::NavigationDisabler::~NavigationDisabler):

8:35 PM Changeset in webkit [219038] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

B3ReduceStrength should reduce EqualOrUnordered over const float input
https://bugs.webkit.org/show_bug.cgi?id=174039

Reviewed by Michael Saboff.

We perform this folding for ConstDoubleValue. It is simply
an oversight that we didn't do it for ConstFloatValue.

  • b3/B3ConstFloatValue.cpp:

(JSC::B3::ConstFloatValue::equalOrUnorderedConstant):

  • b3/B3ConstFloatValue.h:
  • b3/testb3.cpp:

(JSC::B3::testFloatEqualOrUnorderedFolding):
(JSC::B3::testFloatEqualOrUnorderedFoldingNaN):
(JSC::B3::testFloatEqualOrUnorderedDontFold):
(JSC::B3::run):

8:24 PM Changeset in webkit [219037] by Megan Gardner
  • 2 edits in trunk/Tools

Unreviewed mac build fix.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKRequestActivatedElementInfo.mm:

(TestWebKitAPI::TEST):

8:08 PM Changeset in webkit [219036] by Megan Gardner
  • 3 edits in trunk/Source/WebKit2

Unreviewed mac build fix.

  • UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
  • UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
7:56 PM Changeset in webkit [219035] by Matt Baker
  • 3 edits
    2 adds in trunk

Web Inspector: AsyncStackTrace nodes can be corrupted when truncating
https://bugs.webkit.org/show_bug.cgi?id=173840
<rdar://problem/30840820>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

When truncating an asynchronous stack trace, the parent chain is traversed
until a locked node is found. The path from this node to the root is shared
by more than one stack trace, and cannot be safely modified. Starting at
the first locked node, the path is cloned and becomes a new stack trace tree.

However, the clone operation initialized each new AsyncStackTrace node with
the original node's parent. This would increment the child count of the original
node. When cloning nodes, new nodes should not have their parent set until the
next node up the parent chain is cloned.

  • inspector/AsyncStackTrace.cpp:

(Inspector::AsyncStackTrace::truncate):

LayoutTests:

Add a test for truncating a branching asynchronous stack trace.

  • inspector/debugger/truncate-async-stack-trace-expected.txt: Added.
  • inspector/debugger/truncate-async-stack-trace.html: Added.
7:25 PM Changeset in webkit [219034] by Megan Gardner
  • 8 edits
    1 add in trunk

Add API to get WKActivatedElementInfo
https://bugs.webkit.org/show_bug.cgi?id=174001
<rdar://problem/29165518>

Source/WebKit2:

Adding a way to get a WKActivatedElementInfo for a point on a WKWebView.

Reviewed by Tim Horton.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView requestActivatedElementAtPosition:completionBlock:]):

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

(+[_WKActivatedElementInfo infoWithType:withInteractionInformationAtPosition:]):
(-[_WKActivatedElementInfo infoWithType:withInteractionInformationAtPosition:]):

  • UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:

Tools:

Tests for now SPI to get activatedElementInfo.

Reviewed by Tim Horton.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/WKRequestActivatedElementInfo.mm: Added.

(TestWebKitAPI::TEST):

6:44 PM Changeset in webkit [219033] by Wenson Hsieh
  • 4 edits in trunk/Source/WebCore

[iOS DnD] Text indicators for dragged links should always be legible if the link is legible
https://bugs.webkit.org/show_bug.cgi?id=173860
<rdar://problem/32974385>

Reviewed by Tim Horton.

Currently, TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges ensures that links backed by a
RenderReplaced element don't render blank text indicators by additionally forcing the
TextIndicatorOptionPaintAllContent option in order to capture the RenderReplaced content. If estimated
background color is requested, this patch adds an additional path for "upgrading" the text indicator to paint
all content: if the text color is not legible against the estimated background color, then it is likely that the
background color estimate failed or the link itself was not legible in the first place; in the former case, to
ensure that the link is still legible, we upgrade the given TextIndicatorOptions to paint all contents in the
range.

There is currently no way to test this, and also no simple way to introduce infrastructure to test text
indicators.

  • page/TextIndicator.cpp:

(WebCore::estimatedTextColorsForRange):

Estimates all text colors that appear in a range by iterating over the text node renderers and consulting their
render styles.

(WebCore::adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary):

If foreground text color is deemed not legible, force TextIndicatorOptionPaintAllContent instead of
TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges.

(WebCore::initializeIndicator):

  • rendering/TextPaintStyle.cpp:

(WebCore::textColorIsLegibleAgainstBackgroundColor):
(WebCore::adjustColorForVisibilityOnBackground):

Allow other parts of WebCore to check the legibility of text against a background color.

  • rendering/TextPaintStyle.h:
6:20 PM Changeset in webkit [219032] by msaboff@apple.com
  • 2 edits in trunk/JSTests

Skip a test on ARM64 platform since we run out of address space.

Rubber stamped by Saam Barati.

  • stress/dont-reserve-huge-capacity-lexer.js:
6:16 PM Changeset in webkit [219031] by msaboff@apple.com
  • 7 edits
    1 add in trunk

RegExp's anchored with .* with \g flag can return wrong match start for strings with multiple matches
https://bugs.webkit.org/show_bug.cgi?id=174044

Reviewed by Oliver Hunt.

JSTests:

New regression test.

  • stress/regress-174044.js: Added.

(test1):
(test2):

Source/JavaScriptCore:

The .* enclosure optimization didn't respect that we can start matching from a non-zero
index. This optimization treats /.*<some-terms>.*/ by first matching the <some-terms> and
then finding the extent of the match by going back to the beginning of the line and going
forward to the end of the line. The code that went back to the beginning of the line
checked for an index of 0 instead of comparing the index to the start position. This start
position is passed as the initial index.

Added another temporary register to the YARR JIT to contain the start position for
platforms that have spare registers.

  • yarr/Yarr.h:
  • yarr/YarrInterpreter.cpp:

(JSC::Yarr::Interpreter::matchDotStarEnclosure):
(JSC::Yarr::Interpreter::Interpreter):

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::generateDotStarEnclosure):
(JSC::Yarr::YarrGenerator::compile):

  • yarr/YarrPattern.cpp:

(JSC::Yarr::YarrPattern::YarrPattern):

  • yarr/YarrPattern.h:

(JSC::Yarr::YarrPattern::reset):

5:51 PM Changeset in webkit [219030] by achristensen@apple.com
  • 2 edits in trunk/LayoutTests

Rebase test after r219024
https://bugs.webkit.org/show_bug.cgi?id=174051

  • fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame-expected.txt:

This was an intentional change making URL parsing how it was before r215096 for URLs with non-special schemes.

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

Use API instead of SPI for content inset adjustment behavior
https://bugs.webkit.org/show_bug.cgi?id=174050

Reviewed by Sam Weinig.

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

(-[WKScrollView initWithFrame:]):
(-[WKScrollView setContentInsetAdjustmentBehavior:]):
(-[WKScrollView _setContentInsetAdjustmentBehaviorInternal:]):
(-[WKScrollView _setContentInsetAdjustmentBehavior:]): Deleted.
Switch over to the API. The old SPI calls the API internally, so our
override will now cover all callers.

4:38 PM Changeset in webkit [219028] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked test imported/w3c/web-platform-tests/IndexedDB/idbobjectstore_getKey.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173068

Unreviewed test gardening.

  • platform/mac/TestExpectations:
4:38 PM Changeset in webkit [219027] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

B3MoveConstants floatZero() returns the wrong ValueKey
https://bugs.webkit.org/show_bug.cgi?id=174040

Reviewed by Filip Pizlo.

It had a typo where the ValueKey for floatZero() produces a Double
instead of a Float.

  • b3/B3MoveConstants.cpp:
4:37 PM Changeset in webkit [219026] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

B3ReduceDoubleToFloat incorrectly reduces operations over two double constants
https://bugs.webkit.org/show_bug.cgi?id=174034
<rdar://problem/30793007>

Reviewed by Filip Pizlo.

B3ReduceDoubleToFloat had a bug in it where it would incorrectly
reduce binary operations over double constants into the same binary
operation over the double constants casted to floats. This is clearly
incorrect as these two things will produce different values. For example:

a = DoubleConst(bitwise_cast<double>(0x8000000000000001ull))
b = DoubleConst(bitwise_cast<double>(0x0000000000000000ull))
c = EqualOrUnordered(@a, @b) produces 0

into:

a = FloatConst(static_cast<float>(bitwise_cast<double>(0x8000000000000001ull)))
b = FloatConst(static_cast<float>(bitwise_cast<double>(0x0000000000000000ull)))
c = EqualOrUnordered(@a, @b) produces 1

Which produces a different value for @c.

  • b3/B3ReduceDoubleToFloat.cpp:
  • b3/testb3.cpp:

(JSC::B3::doubleEq):
(JSC::B3::doubleNeq):
(JSC::B3::doubleGt):
(JSC::B3::doubleGte):
(JSC::B3::doubleLt):
(JSC::B3::doubleLte):
(JSC::B3::testDoubleLiteralComparison):
(JSC::B3::run):

4:22 PM Changeset in webkit [219025] by Chris Dumez
  • 27 edits
    1 delete in trunk

Move store logic from WebResourceLoadStatisticsManager to WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=174038

Reviewed by Brent Fulgham.

Source/WebKit2:

Move store logic from WebResourceLoadStatisticsManager to WebResourceLoadStatisticsStore.
WebResourceLoadStatisticsManager is now essentially a proxy to the
WebResourceLoadStatisticsStore to support the current C API.

In a follow-up, I plan to to replace the C API with a Cocoa SPI which works on a
WebResourceLoadStatisticsStore directly instead of requiring a
WebResourceLoadStatisticsManager singleton.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerSetMinimumTimeBetweenDataRecordsRemoval):
(WKResourceLoadStatisticsManagerResetToConsistentState):

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm: Removed.
  • UIProcess/Cocoa/WebResourceLoadStatisticsStoreCocoa.mm:

(WebKit::WebResourceLoadStatisticsStore::registerUserDefaultsIfNeeded):

  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::WebResourceLoadStatisticsManager):
(WebKit::WebResourceLoadStatisticsManager::~WebResourceLoadStatisticsManager):
(WebKit::WebResourceLoadStatisticsManager::setStatisticsStore):
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryStore):
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):
(WebKit::WebResourceLoadStatisticsManager::logUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
(WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
(WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::primaryDomain):
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
(WebKit::WebResourceLoadStatisticsStore::logUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsStore::setGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::isGrandfathered):
(WebKit::WebResourceLoadStatisticsStore::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsStore::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsStore::fireDataModificationHandler):
(WebKit::WebResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
(WebKit::WebResourceLoadStatisticsStore::fireTelemetryHandler):
(WebKit::WebResourceLoadStatisticsStore::clearInMemory):
(WebKit::WebResourceLoadStatisticsStore::clearInMemoryAndPersistent):
(WebKit::WebResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsStore::setMinimumTimeBetweenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsStore::setGrandfatheringTime):

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

(WebKit::WebsiteDataStore::removeData):

  • WebKit2.xcodeproj/project.pbxproj:

Tools:

Fix typo in API name.

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

(WTR::TestRunner::setStatisticsMinimumTimeBetweenDataRecordsRemoval):

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

(WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

Fix typo in testRunner API.

  • http/tests/loading/resourceLoadStatistics/grandfathering.html:
  • http/tests/loading/resourceLoadStatistics/non-prevalent-resource-with-user-interaction.html:
  • http/tests/loading/resourceLoadStatistics/non-prevalent-resource-without-user-interaction.html:
  • http/tests/loading/resourceLoadStatistics/partitioned-and-unpartitioned-cookie-deletion.html:
  • http/tests/loading/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout.html:
  • http/tests/loading/resourceLoadStatistics/prevalent-resource-with-user-interaction.html:
  • http/tests/loading/resourceLoadStatistics/prevalent-resource-without-user-interaction.html:
4:21 PM Changeset in webkit [219024] by achristensen@apple.com
  • 4 edits in trunk

REGRESSION(r215096) Queries of URLs with non-special schemes should not percent-encode single quotes
https://bugs.webkit.org/show_bug.cgi?id=174051
<rdar://problem/33002846>

Reviewed by Tim Horton.

Source/WebCore:

In r215096 I added ' to the set of characters to be percent-encoded in queries,
but for interoperability and compatibility we need to do this only for special schemes, like http.

Covered by new API tests.

  • platform/URLParser.cpp:

(WebCore::isC0Control):
(WebCore::shouldPercentEncodeQueryByte):
(WebCore::URLParser::utf8QueryEncode):
(WebCore::URLParser::encodeQuery):

Tools:

  • TestWebKitAPI/Tests/WebCore/URLParser.cpp:

(TestWebKitAPI::TEST_F):

3:49 PM Changeset in webkit [219023] by dbates@webkit.org
  • 2 edits in trunk/Source/WebCore

Attempt to fix the build following <https://trac.webkit.org/changeset/219019>
(https://bugs.webkit.org/show_bug.cgi?id=165160)

Export the FrameLoadRequest move constructor and move operator so that they
can be used from WebKit.

  • loader/FrameLoadRequest.h:
3:47 PM Changeset in webkit [219022] by don.olmstead@sony.com
  • 2 edits in trunk/Source/WebCore

[WebCore] Update AXObjectCache for !HAVE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=174045

Reviewed by Konstantin Tokarev.

No new tests. No change in behavior.

  • accessibility/AXObjectCache.h:

(WebCore::AXObjectCache::checkedStateChanged):
(WebCore::AXObjectCache::childrenChanged):
(WebCore::AXObjectCache::deferRecomputeIsIgnored):
(WebCore::AXObjectCache::deferTextChangedIfNeeded):
(WebCore::AXObjectCache::focusAriaModalNodeTimerFired):
(WebCore::AXObjectCache::handleAriaExpandedChange):
(WebCore::AXObjectCache::handleAriaRoleChanged):
(WebCore::AXObjectCache::handleAttributeChanged):
(WebCore::AXObjectCache::handleScrollbarUpdate):
(WebCore::AXObjectCache::liveRegionChangedNotificationPostTimerFired):
(WebCore::AXObjectCache::notificationPostTimerFired):
(WebCore::AXObjectCache::passwordNotificationPostTimerFired):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::postNotification):
(WebCore::AXObjectCache::postPlatformNotification):
(WebCore::AXObjectCache::postTextReplacementNotification):
(WebCore::AXObjectCache::postTextReplacementNotificationForTextControl):
(WebCore::AXObjectCache::postTextStateChangeNotification):
(WebCore::AXObjectCache::recomputeIsIgnored):
(WebCore::AXObjectCache::textChanged):
(WebCore::AXObjectCache::updateCacheAfterNodeIsAttached):
(WebCore::AXObjectCache::focusAriaModalNode): Deleted.

3:45 PM Changeset in webkit [219021] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebInspectorUI

Web Inspector: Initial search is sometimes performed twice, produces duplicate results
https://bugs.webkit.org/show_bug.cgi?id=174047

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-06-30
Reviewed by Devin Rousso.

  • UserInterface/Views/SearchTabContentView.js:

(WebInspector.SearchTabContentView.prototype.performSearch):
The initial layout of the tab content view was setting state to force a search
which may happen after a delay, however the global search field was causing
its own search to happen. We can clear the flag when a search is being performed
to prevent duplicating the search.

3:31 PM Changeset in webkit [219020] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2] Resource load statistics code is spamming the WebProcess with a test-only message
https://bugs.webkit.org/show_bug.cgi?id=174048
<rdar://problem/33062376>

Patch by John Wilander <wilander@apple.com> on 2017-06-30
Reviewed by Brent Fulgham.

Fix the telemetry data message send so that it is not generated during normal operations.
This is only meant to be used by WebKitTestRunner.

  • UIProcess/WebResourceLoadStatisticsTelemetry.cpp:

(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):

3:30 PM Changeset in webkit [219019] by dbates@webkit.org
  • 3 edits in trunk/Source/WebCore

Attempt to fix the Apple Windows build following <https://trac.webkit.org/changeset/219013>
(https://bugs.webkit.org/show_bug.cgi?id=165160)

Make FrameLoadRequest move constructor and move operator out-of-line so that callers
do not need to include header SecurityOrigin.h.

  • loader/FrameLoadRequest.cpp:
  • loader/FrameLoadRequest.h:
3:01 PM Changeset in webkit [219018] by dbates@webkit.org
  • 2 edits in trunk/Source/WebKit2

Attempt to fix the WPE build following <https://trac.webkit.org/changeset/219013>
(https://bugs.webkit.org/show_bug.cgi?id=165160)

Update the prototype of UIClient::createNewPage() to take a API::FrameInfo& instead of
a WebFrameProxy* and a const WebCore::SecurityOriginData&.

  • UIProcess/API/glib/WebKitUIClient.cpp:
2:57 PM Changeset in webkit [219017] by Devin Rousso
  • 5 edits in trunk/Source/WebInspectorUI

Web Inspector: Add small delay before showing the progress spinner when loading resources
https://bugs.webkit.org/show_bug.cgi?id=173437

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/ResourceContentView.js:

(WebInspector.ResourceContentView):
(WebInspector.ResourceContentView.prototype.removeLoadingIndicator): Added.
(WebInspector.ResourceContentView.prototype._contentError):
(WebInspector.ResourceContentView.prototype._hasContent):
Delay the creation of the spinner for 100ms. If the content is available before then, just
clear the timeout and the spinner will never be created/shown.

We measured an average of 35ms to load and display images with slow cases being around 55ms.
100ms was chosen for the timeout to give some room to allow for abnormally slow loading
while not being too long as to be outright noticable.

  • UserInterface/Views/FontResourceContentView.js:

(WebInspector.FontResourceContentView.prototype.contentAvailable):

  • UserInterface/Views/ImageResourceContentView.js:

(WebInspector.ImageResourceContentView.prototype.contentAvailable):

  • UserInterface/Views/TextResourceContentView.js:

(WebInspector.TextResourceContentView.prototype._contentWillPopulate):
Calls the new protected function removeLoadingIndicator to ensure that the spinner (and any
other element) is removed.

This is necessary because TextResourceContentView effectively has two phases of loading its
content: getting the content and formatting it for display. The first follows the same path
as the other ResourceContentView subclasses, the second waits for the ContentWillPopulate
event on SourceCodeTextEditor before it actually adds the content as a subview. In this
case, the spinner should only be removed right before the content is actually added, not
once it's ready.

2:52 PM Changeset in webkit [219016] by achristensen@apple.com
  • 4 edits in trunk/Source

Stop soft linking with CFNetwork
https://bugs.webkit.org/show_bug.cgi?id=174029

Reviewed by Jer Noble.

Source/WebCore:

We link directly with CFNetwork. There's no reason to soft link,
and it is causing a problem with linking when doing interesting things with CFNetwork.

  • platform/spi/cf/CFNetworkSPI.h:

Source/WebKit2:

  • Shared/mac/CookieStorageShim.mm:
2:47 PM Changeset in webkit [219015] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebInspectorUI

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

Broke Debugger Call Stack TreeOutline (Requested by drousso on
#webkit).

Reverted changeset:

"Web Inspector: Remove unnecessary hasChildren from
TreeOutline"
https://bugs.webkit.org/show_bug.cgi?id=173986
http://trac.webkit.org/changeset/218983

2:47 PM Changeset in webkit [219014] by Devin Rousso
  • 26 edits in trunk

Web Inspector: Default string comparisons to treat numeric characters as numbers
https://bugs.webkit.org/show_bug.cgi?id=173984

Reviewed by Joseph Pecoraro.

Source/WebInspectorUI:

  • UserInterface/Base/Utilities.js:

(String.prototype.extendedLocaleCompare):

  • UserInterface/Controllers/JavaScriptRuntimeCompletionProvider.js:

(WebInspector.JavaScriptRuntimeCompletionProvider.prototype.completionControllerCompletionsNeeded.receivedPropertyNames.compare):

  • UserInterface/Controllers/ResourceQueryController.js:

(WebInspector.ResourceQueryController.prototype.executeQuery):

  • UserInterface/Views/ApplicationCacheFrameContentView.js:

(WebInspector.ApplicationCacheFrameContentView.prototype._sortDataGrid.localeCompare):

  • UserInterface/Views/CSSStyleDeclarationTextEditor.js:

(WebInspector.CSSStyleDeclarationTextEditor.prototype._iterateOverProperties):

  • UserInterface/Views/CookieStorageContentView.js:

(WebInspector.CookieStorageContentView.prototype._sortDataGrid.localeCompare):

  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:

(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshAttributes):
(WebInspector.DOMNodeDetailsSidebarPanel.prototype._refreshEventListeners.generateGroupsByNode):

  • UserInterface/Views/DOMStorageContentView.js:

(WebInspector.DOMStorageContentView.prototype._sortDataGrid.comparator):

  • UserInterface/Views/DebuggerSidebarPanel.js:

(WebInspector.DebuggerSidebarPanel.prototype._compareTopLevelTreeElements):

  • UserInterface/Views/FolderizedTreeElement.js:

(WebInspector.FolderizedTreeElement.prototype._compareTreeElementsByMainTitle):

  • UserInterface/Views/HeapSnapshotDataGridTree.js:

(WebInspector.HeapSnapshotDataGridTree.buildSortComparator):

  • UserInterface/Views/NetworkTimelineView.js:

(WebInspector.NetworkTimelineView.prototype.dataGridSortComparator):

  • UserInterface/Views/NewTabContentView.js:

(WebInspector.NewTabContentView.prototype._updateShownTabs):

  • UserInterface/Views/OverviewTimelineView.js:

(WebInspector.OverviewTimelineView.prototype._compareDataGridNodesByStartTime):

  • UserInterface/Views/ProbeDetailsSidebarPanel.js:

(WebInspector.ProbeDetailsSidebarPanel.prototype.inspect):

  • UserInterface/Views/QuickConsole.js:

(WebInspector.QuickConsole.prototype._compareExecutionContextPathComponents):

  • UserInterface/Views/ResourceDetailsSidebarPanel.js:

(WebInspector.ResourceDetailsSidebarPanel.prototype._createNameValueDataGrid.sortDataGrid.comparator):

  • UserInterface/Views/ResourceSidebarPanel.js:

(WebInspector.ResourceSidebarPanel.prototype._compareTreeElements):

  • UserInterface/Views/ResourceTreeElement.js:

(WebInspector.ResourceTreeElement.compareResourceTreeElements):
(WebInspector.ResourceTreeElement.compareFolderAndResourceTreeElements):

  • UserInterface/Views/ScriptDetailsTimelineView.js:

(WebInspector.ScriptDetailsTimelineView.prototype.dataGridSortComparator):

  • UserInterface/Views/StorageSidebarPanel.js:

(WebInspector.StorageSidebarPanel.prototype._compareTreeElements):

  • UserInterface/Views/TimelineDataGrid.js:

(WebInspector.TimelineDataGrid.prototype._sortComparator):

LayoutTests:

  • inspector/unit-tests/string-utilities.html:

Add tests for String.prototype.extendedLocaleCompare.

2:35 PM Changeset in webkit [219013] by dbates@webkit.org
  • 37 edits
    1 add in trunk

API::FrameInfo should know the web page that contains the frame; add API property webView to WKFrameInfo
https://bugs.webkit.org/show_bug.cgi?id=165160
<rdar://problem/29451999>

Reviewed by Brady Eidson.

Source/WebCore:

Pass the document that is requesting the load to the loader.

  • inspector/InspectorFrontendClientLocal.cpp:

(WebCore::InspectorFrontendClientLocal::openInNewTab): Pass the document when instantiating the FrameLoadRequest.
Also use C++11 brace initialization to instantiate ResourceRequest.

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::navigate): Pass the document when instantiating the FrameLoadRequest.

  • loader/FrameLoadRequest.cpp:

(WebCore::FrameLoadRequest::FrameLoadRequest): Moved from FrameLoadRequest.h.
(WebCore::FrameLoadRequest::requester): Added.
(WebCore::FrameLoadRequest::requesterSecurityOrigin): Added.

  • loader/FrameLoadRequest.h:

(WebCore::FrameLoadRequest::FrameLoadRequest): Marked as WEBCORE_EXPORT and modified to take
the document that requested the load.
(WebCore::FrameLoadRequest::requester): Deleted; made out-of-line/moved to FrameLoadRequest.cpp.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::urlSelected): Pass the document when instantiating the FrameLoadRequest. Also use C++11
brace initialization to instantiate ResourceRequest.
(WebCore::FrameLoader::loadURLIntoChildFrame): Pass the document when instantiating the FrameLoadRequest.
(WebCore::FrameLoader::loadFrameRequest): Substitute FrameLoadRequest::requesterSecurityOrigin() for
FrameLoadRequest::requester() as the former replaces the latter.
(WebCore::FrameLoader::loadURL): Pass the document when instantiating the NavigationAction.
(WebCore::FrameLoader::load): Ditto.
(WebCore::FrameLoader::loadWithDocumentLoader): Pass the document when instantiating the NavigationAction.
Also use C++11 brace initialization syntax to instantiate the NavigationAction.
(WebCore::FrameLoader::reload): Ditto.
(WebCore::FrameLoader::loadPostRequest): Ditto.
(WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): Pass the document when instantiating the NavigationAction.
(WebCore::FrameLoader::loadDifferentDocumentItem): Pass the document when instantiating the NavigationAction.
Also use C++11 brace initialization syntax to instantiate the NavigationAction.
(WebCore::createWindow): Pass the document when instantiating the NavigationAction.

  • loader/NavigationAction.cpp:

(WebCore::NavigationAction::NavigationAction): Modified to take the source document.

  • loader/NavigationAction.h:

(WebCore::NavigationAction::isEmpty): Consider a NavigationAction empty if does not have a source document
or the associated ResourceRequest has an empty URL.
(WebCore::NavigationAction::sourceDocument): Added.
(WebCore::NavigationAction::NavigationAction): Deleted; made out-of-line/moved to NavigationAction.cpp to
avoid the need to include the header Document.h.

  • loader/NavigationScheduler.cpp:

(WebCore::ScheduledURLNavigation::ScheduledURLNavigation): Store the document that scheduled the navigation.
Also use C++11 brace initialization to instantiate in the member initialization list.
(WebCore::ScheduledURLNavigation::initiatingDocument): Added. Retrieves the document that scheduled the navigation.
(WebCore::NavigationScheduler::scheduleLocationChange): Pass the document when instantiating the FrameLoadRequest.

  • loader/PolicyChecker.cpp:

(WebCore::PolicyChecker::checkNavigationPolicy): Pass the document when instantiating the NavigationAction.
Also use C++11 brace initialization syntax to instantiate the NavigationAction.

  • page/ContextMenuController.cpp:

(WebCore::openNewWindow):
(WebCore::ContextMenuController::contextMenuItemSelected): Pass the document when instantiating the FrameLoadRequest.
Also use C++11 brace initialization syntax to instantiate the FrameLoadRequest.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::createWindow): Pass the document when instantiating the FrameLoadRequest.

Source/WebKit/ios:

Pass the document that is requesting the load to the loader.

  • WebView/WebPDFViewPlaceholder.mm:

(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKit/mac:

Pass the document that is requesting the load to the loader.

  • WebView/WebPDFView.mm:

(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

Source/WebKit/win:

Pass the document that is requesting the load to the loader.

  • Plugins/PluginView.cpp:

(WebCore::PluginView::start):
(WebCore::PluginView::getURLNotify):
(WebCore::PluginView::getURL):
(WebCore::PluginView::handlePost):

Source/WebKit2:

Expose a property on WKFrameInfo to retrieve the WKWebView of the web page that contains the
frame. This will allow an embedding client to know the web view that initiated the navigation
request as well as differentiate between a navigation initiated by web content from one
initiated via API.

The majority of this change is passing the document D that initiated the targeted navigation
or called window.open() through the loading machinery to the FrameLoaderClient. The changes
to pass this information to the FrameLoaderClient when creating a new window are straightforward.
For targeted navigation, the WebKit2 FrameLoaderClient implementation now computes the info
for the originating frame regardless of the navigation type (NavigationAction::type()).
(Currently we only compute the originating frame for hyperlink activated navigations,
form submissions, and form resubmissions). The WebProcess computes the page ID of the page
that contains the originating frame and sends that to the UIProcess so that it can create
an API::FrameInfo for the originating frame and associate the page that contains the frame,
if the navigation was triggered by web content. If the navigation was triggered by API
(e.g. -[WKWebView goBack]) then the created API::FrameInfo does not have an associated page
so that an embedding client can distinguish between a navigation initiated by web content
from a navigation that it initiated via API depending on whether API::FrameInfo::page() is
nullptr. We expose property webView on the Mac and iOS API class WKFrameInfo to return the
WKWebView corresponding to API::FrameInfo::page().

A small change that this patch makes is to have the WebProcess compute the originating frame
info (call WebFrame::info()) and send it over to the UIProcess as opposed to sending the frame
ID of the originating frame and having the UIProcess compute the frame info from it. We do this
because the UIProcess may not be able to compute the frame info for the originating frame if
the window that it was contained in was closed between the time the WebProcess sent the frame
ID to the UIProcess and the UIProcess received it.

  • UIProcess/API/APIFrameInfo.cpp:

(API::FrameInfo::create):
(API::FrameInfo::FrameInfo):
(API::FrameInfo::clearPage):

  • UIProcess/API/APIFrameInfo.h:
  • UIProcess/API/APIUIClient.h:

(API::UIClient::createNewPage):
(API::UIClient::createNewPageAsync):

  • UIProcess/API/C/WKPage.cpp:

(WKPageSetPageUIClient):

  • UIProcess/API/Cocoa/WKFrameInfo.h:
  • UIProcess/API/Cocoa/WKFrameInfo.mm:

(-[WKFrameInfo description]):
(-[WKFrameInfo webView]):

  • UIProcess/API/Cocoa/WKUserContentController.mm:
  • UIProcess/Cocoa/UIDelegate.h:
  • UIProcess/Cocoa/UIDelegate.mm:

(WebKit::UIDelegate::UIClient::createNewPageCommon):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::createNewPageAsync):

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):

  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::loadURL):

  • WebProcess/WebCoreSupport/WebChromeClient.cpp:

(WebKit::WebChromeClient::createWindow):

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchCreatePage):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

  • WebProcess/WebPage/WebInspector.cpp:

(WebKit::WebInspector::openInNewTab):

Tools:

Add tests to ensure that -[WKFrameInfo webView] is computed correctly for the source and target frame
for navigations and window creation.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/DecidePolicyForNavigationAction.mm: Added. Derived from file ShouldOpenExternalURLsInNewWindowActions.mm.

(-[DecidePolicyForNavigationActionController webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[DecidePolicyForNavigationActionController webView:didFinishNavigation:]):
(-[DecidePolicyForNavigationActionController webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):

2:04 PM Changeset in webkit [219012] by jer.noble@apple.com
  • 35 edits in trunk

Make Legacy EME API controlled by RuntimeEnabled setting.
https://bugs.webkit.org/show_bug.cgi?id=173994

Reviewed by Sam Weinig.

Source/JavaScriptCore:

  • Configurations/FeatureDefines.xcconfig:
  • runtime/CommonIdentifiers.h:

Source/WebCore:

Add a new RuntimeEnabledFeatures setting to control the availability of the WebKit prefixed EME APIs.

  • Configurations/FeatureDefines.xcconfig:
  • Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl:
  • Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl:
  • Modules/encryptedmedia/legacy/WebKitMediaKeySession.idl:
  • Modules/encryptedmedia/legacy/WebKitMediaKeys.idl:
  • dom/Element.idl:
  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
(WebCore::HTMLMediaElement::webkitSetMediaKeys):
(WebCore::HTMLMediaElement::keyAdded):

  • html/HTMLMediaElement.idl:
  • html/WebKitMediaKeyError.idl:
  • page/RuntimeEnabledFeatures.h:

(WebCore::RuntimeEnabledFeatures::setLegacyEncryptedMediaAPIEnabled):
(WebCore::RuntimeEnabledFeatures::legacyEncryptedMediaAPIEnabled):

Source/WebCore/PAL:

  • Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Add a new preference used to control WebCore's new RuntimeEnabledFeature setting.

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

(+[WebPreferences initialize]):
(-[WebPreferences legacyEncryptedMediaAPIEnabled]):
(-[WebPreferences setLegacyEncryptedMediaAPIEnabled:]):

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

(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add a new WKWebViewConfiguration property, as well as a new WKPreferences function, both able to control
WebCore's new RuntimeEnabledFeature setting for the Legacy EME API.

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

(WKPreferencesGetLegacyEncryptedMediaAPIEnabled):
(WKPreferencesSetLegacyEncryptedMediaAPIEnabled):

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

(-[WKWebView _initializeWithConfiguration:]):

  • UIProcess/API/Cocoa/WKWebViewConfiguration.mm:

(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _setLegacyEncryptedMediaAPIEnabled:]):
(-[WKWebViewConfiguration _legacyEncryptedMediaAPIEnabled]):

  • UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::updatePreferences):

Source/WTF:

  • wtf/FeatureDefines.h:

Tools:

  • TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2:00 PM Changeset in webkit [219011] by jer.noble@apple.com
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r218757): Touch Bar's media scrubber timeline runs from 00:00 to 00:00 and has no playhead
https://bugs.webkit.org/show_bug.cgi?id=174032

Reviewed by Eric Carlson.

Fix a copypasta error where durationChange notifications were changing the value of muted.

  • UIProcess/Cocoa/WebPlaybackSessionManagerProxy.mm:

(WebKit::WebPlaybackSessionManagerProxy::durationChanged):

1:54 PM Changeset in webkit [219010] by Chris Dumez
  • 14 edits
    2 moves in trunk/Source

Move ResourceLoadStatisticsStore to WebKit2/UIProcess
https://bugs.webkit.org/show_bug.cgi?id=174033

Reviewed by Brent Fulgham.

Move ResourceLoadStatisticsStore to WebKit2/UIProcess since it is only
used in the WebKit2 UIProcess.

  • CMakeLists.txt:

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:
  • loader/ResourceLoadObserver.cpp:

(WebCore::primaryDomain):

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::primaryDomain):

  • loader/ResourceLoadStatistics.h:

Source/WebKit2:

  • UIProcess/Storage/ResourceLoadStatisticsStore.cpp: Renamed from Source/WebCore/loader/ResourceLoadStatisticsStore.cpp.

(WebKit::ResourceLoadStatisticsStore::createEncoderFromData):
(WebKit::ResourceLoadStatisticsStore::readDataFromDecoder):
(WebKit::ResourceLoadStatisticsStore::clearInMemory):
(WebKit::ResourceLoadStatisticsStore::clearInMemoryAndPersistent):
(WebKit::ResourceLoadStatisticsStore::mergeStatistics):
(WebKit::ResourceLoadStatisticsStore::fireDataModificationHandler):
(WebKit::ResourceLoadStatisticsStore::fireTelemetryHandler):
(WebKit::ResourceLoadStatisticsStore::fireShouldPartitionCookiesHandler):
(WebKit::ResourceLoadStatisticsStore::processStatistics):
(WebKit::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):
(WebKit::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
(WebKit::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):
(WebKit::ResourceLoadStatisticsStore::dataRecordsWereRemoved):
(WebKit::ResourceLoadStatisticsStore::statisticsLock):

  • UIProcess/Storage/ResourceLoadStatisticsStore.h: Renamed from Source/WebCore/loader/ResourceLoadStatisticsStore.h.
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::primaryDomain):

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebResourceLoadStatisticsTelemetry.cpp:
  • UIProcess/WebResourceLoadStatisticsTelemetry.h:
  • WebKit2.xcodeproj/project.pbxproj:
1:37 PM WebIDLToDo edited by sam@webkit.org
(diff)
1:36 PM BugsWebKitOrgImprovements created by sam@webkit.org
1:31 PM WikiStart edited by sam@webkit.org
(diff)
1:30 PM WebIDLToDo edited by sam@webkit.org
(diff)
1:28 PM Changeset in webkit [219009] by rniwa@webkit.org
  • 10 edits in trunk/Source

Ran sort-Xcode-project-file.

Source/bmalloc:

  • bmalloc.xcodeproj/project.pbxproj:

Source/JavaScriptCore:

Source/WebCore:

  • WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

  • WebKit2.xcodeproj/project.pbxproj:

Source/WTF:

  • WTF.xcodeproj/project.pbxproj:
12:32 PM Changeset in webkit [219008] by rniwa@webkit.org
  • 8 edits
    9 adds in trunk

REGRESSION(r214194): Safari leaves a popup window open opened during before unload
https://bugs.webkit.org/show_bug.cgi?id=174016

Reviewed by Chris Dumez.

Source/WebCore:

The bug was caused by WebKit allowing the opening of a new window via window.open but disallowing
the initial navigation within the newly opened window while a beforeunload event is being dispatched.

Because some websites which opens a window during a beforeunload event relies on the opened page
to communicate back in order to close it. This resulted in a newly opened popup window with about:blank
being left out on those websites.

Fixed the bug by allowing the navigation of a new window as well as an existing another window.
More concretely, we disallow navigations within the same frame tree as the one in which a beforeunload
event is being dispatched, and allow navigations elsewhere (i.e. different window / page).
During the destruction of a frame-less document, disallow all the navigations.

Tests: fast/events/before-unload-navigate-different-window.html

fast/events/before-unload-open-window.html
fast/events/before-unload-sibling-frame.html

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

(WebCore::Document::prepareForDestruction):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::isNavigationAllowed):
(WebCore::FrameLoader::shouldClose):

  • loader/NavigationDisabler.h: Added. Extracted from NavigationScheduler.h

(WebCore::NavigationDisabler::NavigationDisabler): Increment the newly added counter on MainFrame unless
the frame is null (during the destruction of a frameless document) in which case we increment the global
disable count.
(WebCore::NavigationDisabler::~NavigationDisabler): Ditto for decrementation.
(WebCore::NavigationDisabler::isNavigationAllowed): Only allow the navigation when there is no frameless
document in destruction, and none of the frame in the same frame tree as the one given is currently in
the process of dispatching a beforeunload event.

  • loader/NavigationScheduler.cpp:

(WebCore::NavigationScheduler::shouldScheduleNavigation):

  • loader/NavigationScheduler.h:

(WebCore::NavigationDisabler): Moved to NavigationDisabler.h.

  • page/MainFrame.h:

(WebCore::MainFrame): Added s_globalNavigationDisableCount.

LayoutTests:

Added regression tests for navigating a new window, a sibling iframe, and another existing window.

  • fast/events/before-unload-navigate-different-window-expected.txt: Added.
  • fast/events/before-unload-navigate-different-window.html: Added.
  • fast/events/before-unload-open-window-expected.txt: Added.
  • fast/events/before-unload-open-window.html: Added.
  • fast/events/before-unload-sibling-frame-expected.txt: Added.
  • fast/events/before-unload-sibling-frame.html: Added.
  • fast/events/resources/message-opener.html: Added.
  • fast/events/resources/message-top.html: Added.
12:04 PM Changeset in webkit [219007] by commit-queue@webkit.org
  • 12 edits in trunk/Source/WebCore

[WebIDL] Add support for conditionally read-write attributes
https://bugs.webkit.org/show_bug.cgi?id=173993

Patch by Sam Weinig <sam@webkit.org> on 2017-06-30
Reviewed by Alex Christensen.

The MEDIA_SOURCE feature/conditional requires changing a few readonly
attributes into read-write attributes. In the past we handled this with
custom bindings. This patch adds a new extended attribute, ConditionallyReadWrite
which achieves the same result.

  • WebCore.xcodeproj/project.pbxproj:

Move a few custom binding to the "GC / Wrapping Only" group.

  • bindings/js/JSAudioTrackCustom.cpp:

(WebCore::JSAudioTrack::setKind): Deleted.
(WebCore::JSAudioTrack::setLanguage): Deleted.

  • bindings/js/JSTextTrackCustom.cpp:

(WebCore::JSTextTrack::setLanguage): Deleted.

  • bindings/js/JSVideoTrackCustom.cpp:

(WebCore::JSVideoTrack::setKind): Deleted.
(WebCore::JSVideoTrack::setLanguage): Deleted.
Remove no longer needed custom bindings.

  • bindings/scripts/CodeGeneratorJS.pm:

(GeneratePropertiesHashTable):
(GenerateImplementation):
(GenerateAttributeSetterDefinition):
(GenerateCallbackImplementationContent):
(GenerateHashTableValueArray):
(GenerateHashTable):
Pipe ConditionallyReadWrite through the generator.

  • bindings/scripts/IDLAttributes.json:

Add ConditionallyReadWrite.

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

Add tests for ConditionallyReadWrite.

  • html/track/AudioTrack.idl:
  • html/track/TextTrack.idl:
  • html/track/VideoTrack.idl:

Replace [Custom] with [ConditionallyReadWrite].

11:40 AM WebIDLToDo edited by sam@webkit.org
(diff)
11:39 AM WebIDLToDo edited by sam@webkit.org
(diff)
11:37 AM Changeset in webkit [219006] by Matt Lewis
  • 7 edits in trunk/Source

Unreviewed, rolling out r218992.

The patch broke the iOS device builds.

Reverted changeset:

"DFG_ASSERT should allow stuffing registers before trapping."
https://bugs.webkit.org/show_bug.cgi?id=174005
http://trac.webkit.org/changeset/218992

11:18 AM Changeset in webkit [219005] by Chris Dumez
  • 16 edits in trunk/Source

ResourceLoadObserver does not need a ResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=174013

Reviewed by Brent Fulgham.

ResourceLoadObserver does not need a ResourceLoadStatisticsStore. ResourceLoadStatisticsStore is too complicated for its needs.
ResourceLoadStatisticsStore can then be moved to WebKit2/UIProcess in a follow-up.

Source/WebCore:

  • Modules/websockets/WebSocket.cpp:

(WebCore::WebSocket::connect):

  • dom/UserGestureIndicator.cpp:

(WebCore::UserGestureIndicator::UserGestureIndicator):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::willSendRequest):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadResourceSynchronously):

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::shared):
(WebCore::ResourceLoadObserver::setNotificationCallback):
(WebCore::ResourceLoadObserver::shouldLog):
(WebCore::ResourceLoadObserver::logFrameNavigation):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::ensureResourceStatisticsForPrimaryDomain):
(WebCore::ResourceLoadObserver::takeResourceStatisticsForPrimaryDomain):
(WebCore::ResourceLoadObserver::isPrevalentResource):
(WebCore::ResourceLoadObserver::statisticsForOrigin):
(WebCore::ResourceLoadObserver::takeStatistics):

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:
  • loader/ResourceLoadStatisticsStore.h:
  • loader/SubresourceLoader.cpp:

(WebCore::SubresourceLoader::willSendRequestInternal):

  • testing/Internals.cpp:

(WebCore::Internals::resourceLoadStatisticsForOrigin):

Source/WebKit/mac:

  • WebView/WebView.mm:

(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit2:

  • WebProcess/WebProcess.cpp:

(WebKit::m_webSQLiteDatabaseTracker):
(WebKit::WebProcess::statisticsChangedTimerFired):

  • WebProcess/WebProcess.h:
11:10 AM Changeset in webkit [219004] by Jonathan Bedard
  • 2 edits in trunk/Tools

Follow-up fix for r218996

Unreviewed infrastructure fix.

Repeated calls to 'ios_version' make the log noisy, memoize the function.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort): Memoize ios_version().

10:28 AM Changeset in webkit [219003] by commit-queue@webkit.org
  • 3 edits
    3 adds in trunk

ASSERTION FAILED: !canAnimate() && !m_currentFrame
https://bugs.webkit.org/show_bug.cgi?id=173089

Patch by Fujii Hironori <Fujii Hironori> on 2017-06-30
Reviewed by Said Abou-Hallawa.

Source/WebCore:

WebCore::BitmapImage::draw() has an assertion which ensures
m_currentFrame is zero in case of async decoding. But, this
assertion failed if an GIF animation image which have finished its
animation was repainted. In that time, m_currentFrame was the last
frame index of the image.

Test: fast/images/animated-gif-paint-after-animation.html

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::draw): Assert m_currentFrame is zero or the animation finished.
Call requestFrameAsyncDecodingAtIndex with m_currentFrame instead of zero.

LayoutTests:

  • fast/images/animated-gif-paint-after-animation-expected.txt: Added.
  • fast/images/animated-gif-paint-after-animation.html: Added.
  • fast/images/resources/animated-red-green-1000x1000-repeat-1.gif: Added.
9:54 AM Changeset in webkit [219002] by Brent Fulgham
  • 4 edits in trunk/Source/WebKit2

[WK2][iOS][macOS] Update XPC services process launch dictionary
https://bugs.webkit.org/show_bug.cgi?id=173995
<rdar://problem/32797264>

Reviewed by Alex Christensen.

Update the WebProcess and Plugin Process XPC launch dictionaries to activate
improved ALSR features when launching.

  • PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
  • WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
9:37 AM Changeset in webkit [219001] by fpizlo@apple.com
  • 3 edits
    1 add in trunk

RegExpCachedResult::setInput should reify left and right contexts
https://bugs.webkit.org/show_bug.cgi?id=173818

Reviewed by Keith Miller.
JSTests:

  • stress/right-left-context-invalidated-by-input.js: Added.

(test.validateContexts):
(test):

Source/JavaScriptCore:


If you don't reify them in setInput, then when you later try to reify them, you'll end up
using indices into an old input string to create a substring of a new input string. That
never goes well.

  • runtime/RegExpCachedResult.cpp:

(JSC::RegExpCachedResult::setInput):

9:22 AM Changeset in webkit [219000] by Chris Dumez
  • 10 edits
    2 deletes in trunk/Source/WebKit2

Merge WebResourceLoadStatisticsManager and WebResourceLoadObserver
https://bugs.webkit.org/show_bug.cgi?id=174008

Reviewed by Brent Fulgham.

Merge WebResourceLoadStatisticsManager and WebResourceLoadObserver. One was basically
a proxy to the other.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerSetPrevalentResource):
(WKResourceLoadStatisticsManagerIsPrevalentResource):
(WKResourceLoadStatisticsManagerSetHasHadUserInteraction):
(WKResourceLoadStatisticsManagerIsHasHadUserInteraction):
(WKResourceLoadStatisticsManagerSetGrandfathered):
(WKResourceLoadStatisticsManagerIsGrandfathered):
(WKResourceLoadStatisticsManagerSetSubframeUnderTopFrameOrigin):
(WKResourceLoadStatisticsManagerSetSubresourceUnderTopFrameOrigin):
(WKResourceLoadStatisticsManagerSetSubresourceUniqueRedirectTo):
(WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
(WKResourceLoadStatisticsManagerSetTimeToLiveCookiePartitionFree):
(WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
(WKResourceLoadStatisticsManagerSetGrandfatheringTime):
(WKResourceLoadStatisticsManagerFireDataModificationHandler):
(WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandler):
(WKResourceLoadStatisticsManagerFireShouldPartitionCookiesHandlerForOneDomain):
(WKResourceLoadStatisticsManagerFireTelemetryHandler):
(WKResourceLoadStatisticsManagerSetNotifyPagesWhenDataRecordsWereScanned):
(WKResourceLoadStatisticsManagerSetShouldClassifyResourcesBeforeDataRecordsRemoval):
(WKResourceLoadStatisticsManagerSetNotifyPagesWhenTelemetryWasCaptured):
(WKResourceLoadStatisticsManagerSetShouldSubmitTelemetry):
(WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStore):
(WKResourceLoadStatisticsManagerClearInMemoryAndPersistentStoreModifiedSinceHours):
(WKResourceLoadStatisticsManagerResetToConsistentState):

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:

(WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):

  • UIProcess/WebResourceLoadObserver.cpp: Removed.
  • UIProcess/WebResourceLoadObserver.h: Removed.
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::primaryDomain):
(WebKit::WebResourceLoadStatisticsManager::shared):
(WebKit::WebResourceLoadStatisticsManager::setStatisticsStore):
(WebKit::WebResourceLoadStatisticsManager::setStatisticsQueue):
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryStore):
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):
(WebKit::WebResourceLoadStatisticsManager::logUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::clearUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::clearPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
(WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
(WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

  • WebKit2.xcodeproj/project.pbxproj:
9:12 AM Changeset in webkit [218999] by commit-queue@webkit.org
  • 19 edits
    5 moves
    4 adds
    1 delete in trunk/Source/WebCore

[PAL] Move Sound into PAL
https://bugs.webkit.org/show_bug.cgi?id=173999

Patch by Ross Kirsling <Ross Kirsling> on 2017-06-30
Reviewed by Alex Christensen.

Source/WebCore:

  • Configurations/WebCore.xcconfig:
  • PlatformGTK.cmake:
  • PlatformMac.cmake:
  • PlatformWPE.cmake:
  • PlatformWin.cmake:
  • WebCore.xcodeproj/project.pbxproj:
  • editing/Editor.cpp:

(WebCore::Editor::cut):
(WebCore::Editor::copy):
(WebCore::Editor::performDelete):

  • editing/EditorCommand.cpp:

(WebCore::executeSelectToMark):
(WebCore::executeSwapWithMark):

  • editing/mac/EditorMac.mm:

(WebCore::Editor::takeFindStringFromSelection):

  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::beep):

  • platform/Sound.h: Removed.

Source/WebCore/PAL:

  • Configurations/PAL.xcconfig:
  • PAL.xcodeproj/project.pbxproj:
  • pal/CMakeLists.txt:
  • pal/PlatformGTK.cmake:
  • pal/PlatformMac.cmake:
  • pal/PlatformWPE.cmake:
  • pal/PlatformWin.cmake:
  • pal/system/Sound.h: Renamed from Source/WebCore/platform/ios/SoundIOS.mm.
  • pal/system/SoundNone.cpp: Renamed from Source/WebCore/platform/wpe/SoundWPE.cpp.

(PAL::systemBeep):

  • pal/system/gtk/SoundGtk.cpp: Renamed from Source/WebCore/platform/gtk/SoundGtk.cpp.
  • pal/system/mac/SoundMac.mm: Renamed from Source/WebCore/platform/mac/SoundMac.mm.
  • pal/system/win/SoundWin.cpp: Renamed from Source/WebCore/platform/win/SoundWin.cpp.
9:08 AM Changeset in webkit [218998] by Wenson Hsieh
  • 14 edits
    1 add in trunk

[iOS DnD] Drag caret rect is incorrectly computed when dropping in editable content in iframes
https://bugs.webkit.org/show_bug.cgi?id=174017
<rdar://problem/32959782>

Reviewed by Simon Fraser.

Source/WebCore:

We're currenly computing the drag caret rect (for the purposes of presentation at the client layers)
incorrectly, in per-frame document coordinates instead of root view coordinates in the mainframe. This means
drag caret geometry from embedded iframes in the document will show up in the content view with a rect in the
coordinate space of the iframe.

To fix this, we need to convert the drag caret rect to root view coordinates. This patch teaches
DragCaretController to do this, and tweaks WebKit/WebKit2 to use caretRectInRootViewCoordinates.

Test: DataInteractionTests.ExternalSourcePlainTextToIFrame

  • editing/FrameSelection.cpp:

(WebCore::DragCaretController::caretRectInRootViewCoordinates):

  • editing/FrameSelection.h:

Source/WebKit/mac:

Use root view coordinates when computing the drag caret rect.

  • WebView/WebView.mm:

(-[WebView _dataInteractionCaretRect]):

Source/WebKit2:

Send the drag caret rect in root view coordinates over to the UI process.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _dragCaretRect]):

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:

Add basic test plumbing to fetch the current drag caret rect.

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::performDragControllerAction):

Tools:

Add a new test verifying that the drag caret is visually contained within the bounds of an iframe. Before these
changes, the caret would appear outside of the iframe.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/contenteditable-in-iframe.html: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(checkDragCaretRectIsContainedInRect):
(TestWebKitAPI::TEST):

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

(-[DataInteractionSimulator _resetSimulatedState]):
(-[DataInteractionSimulator _concludeDataInteractionAndPerformOperationIfNecessary]):
(-[DataInteractionSimulator _advanceProgress]):
(-[DataInteractionSimulator lastKnownDragCaretRect]):

8:45 AM Changeset in webkit [218997] by commit-queue@webkit.org
  • 55 edits in trunk/Source/WebCore

[WebIDL] Replace use of is_polymorphic with standard std::is_polymorphic<>::value
https://bugs.webkit.org/show_bug.cgi?id=174012

Patch by Sam Weinig <sam@webkit.org> on 2017-06-30
Reviewed by Alex Christensen.

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateImplementation):
Replace is_polymorphic with standard std::is_polymorphic<>::value. Remove clang
specific guard now that we are using something other compilers support.

  • bindings/scripts/test/JS/JSInterfaceName.cpp:
  • bindings/scripts/test/JS/JSMapLike.cpp:
  • bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
  • bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
  • bindings/scripts/test/JS/JSTestCEReactions.cpp:
  • bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
  • bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
  • bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
  • bindings/scripts/test/JS/JSTestEventConstructor.cpp:
  • bindings/scripts/test/JS/JSTestEventTarget.cpp:
  • bindings/scripts/test/JS/JSTestException.cpp:
  • bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
  • bindings/scripts/test/JS/JSTestGlobalObject.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/JSTestInterfaceLeadingUnderscore.cpp:
  • bindings/scripts/test/JS/JSTestIterable.cpp:
  • bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
  • bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedConstructor.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/JSTestNamedGetterCallWith.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.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/JSTestOverloadedConstructors.cpp:
  • bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
  • bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
  • bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
  • bindings/scripts/test/JS/JSTestSerialization.cpp:
  • bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
  • bindings/scripts/test/JS/JSTestStringifier.cpp:
  • bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
  • bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
  • bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
  • bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
  • bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
  • bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
  • bindings/scripts/test/JS/JSTestTypedefs.cpp:

Update test results.

8:33 AM Changeset in webkit [218996] by Jonathan Bedard
  • 5 edits in trunk/Tools

Add support for different versions of iOS when loading test expectations
https://bugs.webkit.org/show_bug.cgi?id=173774
<rdar://problem/32951132>

Rubber-stamped by Aakash Jain.

When running layout tests, we should support multiple version of iOS the same way we do Mac.

  • Scripts/webkitpy/port/ios.py:

(IOSPort.default_baseline_search_path): Add ios-<major version> test expectation.
(IOSPort.test_expectations_file_position): Added new file expectations, increment expected file position.
(IOSPort.ios_version): iOS ports must define a function to retrieve the iOS version.

  • Scripts/webkitpy/port/ios_device.py:

(IOSDevicePort.ios_version): Ask connected devices for implementation.

  • Scripts/webkitpy/port/ios_device_unittest.py:

(IOSDeviceTest.test_additional_platform_directory): Skip test until bug 173775 is finished.
(IOSDeviceTest.test_baseline_searchpath): Ditto.
(IOSDeviceTest.test_expectations_ordering): Ditto.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.ios_version): If a runtime is specified, ask the runtime for the iOS version. Otherwise,
ask the platform.

8:09 AM Changeset in webkit [218995] by wilander@apple.com
  • 2 edits in trunk/LayoutTests

Update expectations for layout tests.
https://bugs.webkit.org/show_bug.cgi?id=173940

Unreviewed test gardening, update test expectations for failing tests.

  • platform/wk2/TestExpectations:

http/tests/loading/resourceLoadStatistics/telemetry-generation.html
is still failing.

8:00 AM Changeset in webkit [218994] by commit-queue@webkit.org
  • 15 edits in trunk/Source

Source/WebCore:

Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
https://bugs.webkit.org/show_bug.cgi?id=169389

Reviewed by Alex Christensen.

Covered by manual testing (appr.tc and https://youennf.github.io/webrtc-tests/src/content/peerconnection/trickle-ice/).
Updated test is showing some more failing but this is due to the fact that we are no longer totally lying on the configuration of the

underlying libwebrtc backend.

Previously, we were creating a libwebrtc peer connection and then setting its configuration.
libwebrtc does not like the configuration to be changed and may refuse to set the configuration.
Instead of doing that, we are now creating the libwebrtc peer connection with the provided configuration.

ICE candidate pool size is disabled as it is creating issues with running tests on bots.

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-30

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::setConfiguration):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::initializeWith):
(WebCore::iceServersFromConfiguration):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
(WebCore::LibWebRTCMediaEndpoint::setConfiguration):
(WebCore::LibWebRTCMediaEndpoint::stop):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration):
(WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::createActualPeerConnection):
(WebCore::LibWebRTCProvider::createPeerConnection):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:

Source/WebKit2:
Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
https://bugs.webkit.org/show_bug.cgi?id=169389

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-30
Reviewed by Alex Christensen.

  • fast/mediastream/RTCPeerConnection-getConfiguration-expected.txt:
6:18 AM Changeset in webkit [218993] by commit-queue@webkit.org
  • 2 edits
    1 add in trunk/Tools

Fontconfig build breaks with glibc 2.15+
https://bugs.webkit.org/show_bug.cgi?id=174019

Patch by Jacobo Aragunde Pérez <jaragunde@igalia.com> on 2017-06-30
Reviewed by Carlos Alberto Lopez Perez.

Apply patch by Khem Raj adapted to fontconfig 2.11.1.

  • wpe/jhbuild.modules:
  • wpe/patches/fontconfig-avoid-conflicts-with-integer-width-macros-from-TS-18.patch: Added.
6:04 AM WebIDLToDo edited by sam@webkit.org
(diff)
6:03 AM WebIDLToDo edited by sam@webkit.org
(diff)
1:23 AM Changeset in webkit [218992] by keith_miller@apple.com
  • 7 edits in trunk/Source

DFG_ASSERT should allow stuffing registers before trapping.
https://bugs.webkit.org/show_bug.cgi?id=174005

Reviewed by Mark Lam.

Source/JavaScriptCore:

DFG_ASSERT currently prints error data to stderr before crashing,
which is nice for local development. In the wild, however, we
can't see this information in crash logs. This patch enables
stuffing some of the most useful information from DFG_ASSERTS into
up to five registers right before crashing. The values stuffed
should not impact any logging during local development.

  • assembler/AbortReason.h:
  • dfg/DFGAbstractInterpreterInlines.h:

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

  • dfg/DFGGraph.cpp:

(JSC::DFG::logForCrash):
(JSC::DFG::Graph::logAssertionFailure):
(JSC::DFG::crash): Deleted.
(JSC::DFG::Graph::handleAssertionFailure): Deleted.

  • dfg/DFGGraph.h:

Source/WTF:

Add new template functions that enable stuffing up to five values
into registers before crashing.

  • wtf/Assertions.h:

(CRASH_WITH_INFO):

12:48 AM Changeset in webkit [218991] by commit-queue@webkit.org
  • 11 edits
    6 adds in trunk

Top controls bars should invert with right-to-left user interface layout direction locale
https://bugs.webkit.org/show_bug.cgi?id=173989
<rdar://problem/32863552>

Patch by Antoine Quint <Antoine Quint> on 2017-06-30
Reviewed by Dean Jackson.

Source/WebCore:

When the user interface layout direction is set by the locale to be right-to-left, we now:

  • invert the two top controls bars
  • invert the layout order for the fullscreen / PiP controls bar
  • orient the volume button the opposite direction when presented in a top controls bar

Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html

  • Modules/modern-media-controls/controls/icon-service.js: Add new RTL variants for the mute and unmute icons.
  • Modules/modern-media-controls/controls/inline-media-controls.css: Invert the position of the two top controls

bars when we switch user interface layout direction.
(.media-controls.inline.uses-ltr-user-interface-layout-direction > .controls-bar.top-left,):
(.media-controls.inline.uses-ltr-user-interface-layout-direction > .controls-bar.top-right,):
(.media-controls.inline > .controls-bar.top-left): Deleted.
(.media-controls.inline > .controls-bar.top-right): Deleted.

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype.layout): Default to using the LTR variant for the mute button icon since
it should only use the RTL variant in case the locale requires it *and* we display the mute button in a
top controls bar rather than the bottom controls bar (ie. when width becomes constrained).
(InlineMediaControls.prototype._topLeftContainerButtons): Invert the order of the fullscreen and PiP
buttons based on the user interface layout direction.
(InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
(InlineMediaControls):

  • Modules/modern-media-controls/controls/media-controls.js:

(MediaControls.prototype.set usesLTRUserInterfaceLayoutDirection): Schedule a layout when the user interface
layout direction changes.

  • Modules/modern-media-controls/controls/mute-button.js: Add a new "usesRTLIconVariant" property, false by

default, to indicate we want to use the RTL variant of the button's icon.
(MuteButton):
(MuteButton.prototype.get muted):
(MuteButton.prototype.set muted):
(MuteButton.prototype.set usesRTLIconVariant):
(MuteButton.prototype.layout):

  • Modules/modern-media-controls/images/iOS/Mute-RTL.svg: Added.
  • Modules/modern-media-controls/images/iOS/VolumeHi-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/Mute-RTL.svg: Added.
  • Modules/modern-media-controls/images/macOS/VolumeHi-RTL.svg: Added.
  • Modules/modern-media-controls/media/media-controller.js: Use an ivar to track when it's worth notifying the

media controls that the user interface layout direction has changed. This means we won't need to schedule a
layout in case it's set to the current value.
(MediaController):
(MediaController.prototype.set usesLTRUserInterfaceLayoutDirection):

LayoutTests:

Add a new test to check we correctly layout the top controls bars in RTL and rebaseline a
test that now requires an asynchronous assertion.

  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-rtl.html: Added.
  • media/modern-media-controls/mute-button/mute-button-expected.txt:
  • media/modern-media-controls/mute-button/mute-button.html:
  • platform/mac/TestExpectations:
12:34 AM Changeset in webkit [218990] by dino@apple.com
  • 8 edits in trunk/LayoutTests

REGRESSION (High Sierra): Gradient LayoutTests are failing
https://bugs.webkit.org/show_bug.cgi?id=174015
<rdar://problem/32332022>

Reviewed by Tim Horton.

Add the fudge factor to more of the gradient tests.

  • canvas/philip/tests.js:

(_assertPixelWithGradientNoise): Bump the factor up a bit.

  • canvas/philip/tests/2d.gradient.interpolate.multiple.html:
  • canvas/philip/tests/2d.gradient.interpolate.solid.html:
  • canvas/philip/tests/2d.gradient.radial.transform.1.html:
  • canvas/philip/tests/2d.gradient.radial.transform.2.html:
  • canvas/philip/tests/2d.gradient.radial.transform.3.html:
  • canvas/philip/tests/initial.reset.gradient.html:

Jun 29, 2017:

11:21 PM Changeset in webkit [218989] by Alan Bujtas
  • 4 edits in trunk/Source/WebCore

BreakingContext::handleReplaced() should use replacedBox instead of m_current.renderer().
https://bugs.webkit.org/show_bug.cgi?id=174011

Reviewed by Simon Fraser.

No change in functionality.

  • rendering/line/BreakingContext.h:

(WebCore::BreakingContext::handleReplaced):

  • rendering/line/LineWidth.cpp:

(WebCore::LineWidth::applyOverhang):

  • rendering/line/LineWidth.h:
9:44 PM Changeset in webkit [218988] by Wenson Hsieh
  • 5 edits
    1 add in trunk

[iOS DnD] Web content process crashes when the selection is moved far offscreen in dragstart
https://bugs.webkit.org/show_bug.cgi?id=174010
<rdar://problem/32597802>

Reviewed by Tim Horton.

Source/WebCore:

The TextIndicator snapshot generated in createDragImageForSelection is not guaranteed to succeed; this patch
adds a null check following TextIndicator::createWithSelectionInFrame and bails early if the snapshot was not
successful.

Test: DataInteractionTests.DoNotCrashWhenSelectionMovesOffscreenAfterDragStart

  • platform/ios/DragImageIOS.mm:

(WebCore::createDragImageForSelection):

Tools:

Adds a new API test to ensure that we don't crash trying to dereference a null RefPtr when the TextIndicator
snapshot fails for any reason.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/dragstart-change-selection-offscreen.html: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

9:43 PM Changeset in webkit [218987] by rniwa@webkit.org
  • 5 edits in trunk/Websites/perf.webkit.org

UploadedFile should include the file extension in its url
https://bugs.webkit.org/show_bug.cgi?id=174009

Reviewed by Chris Dumez.

Some command line tools such as darwinup use the file extension to determine the file type.
Include the file extension in the URL of an uploaded file to make it work with these tools.

  • public/include/uploaded-file-helpers.php:

(format_uploaded_file): Include the file extension.

  • public/v3/models/uploaded-file.js:

(UploadedFile):
(UploadedFile.prototype.url): Return the URL with hthe file extension specified. /api/uploaded-file
already supports having the file extension specified.

  • server-tests/tools-sync-buildbot-integration-tests.js: Updated test cases.
  • unit-tests/buildbot-syncer-tests.js: Ditto.
8:56 PM WebIDLToDo edited by sam@webkit.org
(diff)
8:43 PM Changeset in webkit [218986] by Chris Fleizach
  • 8 edits
    2 adds in trunk

AX: Cannot call setValue() on contenteditable or ARIA text controls
https://bugs.webkit.org/show_bug.cgi?id=173520

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add support for changing the value of a contenteditable and any other aria text control in setValue().

Test: accessibility/mac/set-value-editable-types.html

  • accessibility/AccessibilityRenderObject.cpp:

(WebCore::AccessibilityRenderObject::setValue):

Tools:

Add setValue() method to WKTR (already existed in DRT).

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:

(WTR::AccessibilityUIElement::setValue):

  • WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
  • WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
  • WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:

(WTR::AccessibilityUIElement::setValue):

LayoutTests:

  • accessibility/mac/set-value-editable-types-expected.txt: Added.
  • accessibility/mac/set-value-editable-types.html: Added.
8:03 PM Changeset in webkit [218985] by rniwa@webkit.org
  • 36 edits
    2 adds in trunk/Source/WebKit2

Assert that callback ID is not 0 or -1 during encoding and decoding
https://bugs.webkit.org/show_bug.cgi?id=173803

Reviewed by Brady Eidson.

To diagnosing the hang inside Safari (<rdar://problem/32841256>), add assertions for the callback ID
to be not 0 or -1 during encoding and decoding of IPC messages since the latest analysis seems to
indicate the hang is caused by the hash map getting corrupted by the insertion of 0 (empty value).

Wrapped the uint64_t in CallbackID and OptionalCallbackID to add assertions.

  • NetworkProcess/soup/NetworkProcessSoup.cpp:

(WebKit::NetworkProcess::platformInitializeNetworkProcess):

  • Shared/CallbackID.h: Added.

(WebKit::CallbackID::CallbackID):
(WebKit::CallbackID::operator==):
(WebKit::CallbackID::toInteger):
(WebKit::CallbackID::isValid):
(WebKit::CallbackID::isValidCallbackID): A callback ID is valid when it's neither 0 nor -1.
(WebKit::CallbackID::fromInteger): Create a CallbackID object from potentially unsafe value.
(WebKit::CallbackID::generateID): Generates the next callback ID. Moved from CallbackBase.
(WebKit::CallbackID::encode): Added. Assert that it's neither 0 nor -1.
(WebKit::CallbackID::decode): Ditto.
(WTF::CallbackIDHash::hash):
(WTF::CallbackIDHash::equal):
(WTF::HashTraits<WebKit::CallbackID>::emptyValue):
(WTF::HashTraits<WebKit::CallbackID>::constructDeletedValue):
(WTF::HashTraits<WebKit::CallbackID>::isDeletedValue):

  • Shared/OptionalCallbackID.h: Added. Unlike CallbackID, callback ID here can be 0.

(WebKit::OptionalCallbackID::OptionalCallbackID):
(WebKit::OptionalCallbackID::toInteger):
(WebKit::OptionalCallbackID::callbackID): Returns a valid CallbackID object. The caller of
this function must have verified that the ID is neither 0 or -1 before calling this function.
(WebKit::OptionalCallbackID::operator bool):
(WebKit::OptionalCallbackID::isValid):
(WebKit::OptionalCallbackID::isValidCallbackID):
(WebKit::OptionalCallbackID::encode): Since OptionalCallbackID can be 0, only assert that it's not -1.
(WebKit::OptionalCallbackID::decode): Ditto.

  • Shared/mac/RemoteLayerTreeTransaction.h:
  • Shared/mac/RemoteLayerTreeTransaction.h:
  • UIProcess/GenericCallback.h:

(WebKit::CallbackBase::callbackID): Returns a CallbackID object instead of uint64_t.
(WebKit::CallbackBase::CallbackBase):
(WebKit::CallbackBase::generateCallbackID): Deleted.
(WebKit::CallbackMap::put): Returns a callback ID. Also added a version that doesn't take activity token
as used in WebCookieManagerProxy
(WebKit::CallbackMap::take): Takes a callback ID.

  • UIProcess/WebCookieManagerProxy.cpp: Updated the code as callback maps are merged.

(WebKit::WebCookieManagerProxy::processPoolDestroyed):
(WebKit::WebCookieManagerProxy::processDidClose):
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::deleteCookie):
(WebKit::WebCookieManagerProxy::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManagerProxy::setCookie):
(WebKit::WebCookieManagerProxy::setCookies):
(WebKit::WebCookieManagerProxy::getAllCookies):
(WebKit::WebCookieManagerProxy::getCookies):
(WebKit::WebCookieManagerProxy::didSetCookies):
(WebKit::WebCookieManagerProxy::didGetCookies):
(WebKit::WebCookieManagerProxy::didDeleteCookies):
(WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy):
(WebKit::WebCookieManagerProxy::didSetHTTPCookieAcceptPolicy):

  • UIProcess/WebCookieManagerProxy.h:
  • UIProcess/WebCookieManagerProxy.messages.in:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setInitialFocus):
(WebKit::WebPageProxy::validateCommand):
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getSamplingProfilerOutput):
(WebKit::WebPageProxy::getContentsAsMHTMLData):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::getSelectionAsWebArchiveData):
(WebKit::WebPageProxy::getMainResourceDataOfFrame):
(WebKit::WebPageProxy::getResourceDataFromFrame):
(WebKit::WebPageProxy::getWebArchiveOfFrame):
(WebKit::WebPageProxy::forceRepaint):
(WebKit::WebPageProxy::clearLoadDependentCallbacks):
(WebKit::WebPageProxy::voidCallback):
(WebKit::WebPageProxy::dataCallback):
(WebKit::WebPageProxy::imageCallback):
(WebKit::WebPageProxy::stringCallback):
(WebKit::WebPageProxy::invalidateStringCallback):
(WebKit::WebPageProxy::scriptValueCallback):
(WebKit::WebPageProxy::computedPagesCallback):
(WebKit::WebPageProxy::validateCommandCallback):
(WebKit::WebPageProxy::unsignedCallback):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::machSendRightCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::printFinishedCallback):
(WebKit::WebPageProxy::computePagesForPrinting):
(WebKit::WebPageProxy::drawRectToImage):
(WebKit::WebPageProxy::drawPagesToPDF):
(WebKit::WebPageProxy::drawPagesForPrinting):
(WebKit::WebPageProxy::getMarkedRangeAsync):
(WebKit::WebPageProxy::getSelectedRangeAsync):
(WebKit::WebPageProxy::characterIndexForPointAsync):
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
(WebKit::WebPageProxy::takeSnapshot):
(WebKit::WebPageProxy::installActivityStateChangeCompletionHandler):
(WebKit::WebPageProxy::getLoadDecisionForIcon):
(WebKit::WebPageProxy::finishedLoadingIcon):

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

(WebKit::WebPageProxy::gestureCallback):
(WebKit::WebPageProxy::touchesCallback):
(WebKit::WebPageProxy::autocorrectionDataCallback):
(WebKit::WebPageProxy::selectionContextCallback):
(WebKit::WebPageProxy::autocorrectionContextCallback):
(WebKit::WebPageProxy::selectionRectsCallback):
(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::updateSelectionWithTouches):
(WebKit::WebPageProxy::requestAutocorrectionData):
(WebKit::WebPageProxy::applyAutocorrection):
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::selectTextWithGranularityAtPoint):
(WebKit::WebPageProxy::selectPositionAtBoundaryWithDirection):
(WebKit::WebPageProxy::moveSelectionAtBoundaryWithDirection):
(WebKit::WebPageProxy::selectPositionAtPoint):
(WebKit::WebPageProxy::beginSelectionInDirection):
(WebKit::WebPageProxy::updateSelectionWithExtentPoint):
(WebKit::WebPageProxy::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPageProxy::requestDictationContext):
(WebKit::WebPageProxy::requestAutocorrectionContext):
(WebKit::WebPageProxy::getSelectionContext):
(WebKit::WebPageProxy::selectWithTwoTouches):
(WebKit::WebPageProxy::requestRectsForGranularityWithSelectionOffset):
(WebKit::WebPageProxy::requestRectsAtSelectionOffsetWithText):
(WebKit::WebPageProxy::moveSelectionByOffset):
(WebKit::WebPageProxy::focusNextAssistedNode):
(WebKit::WebPageProxy::computePagesForPrintingAndDrawToPDF):
(WebKit::WebPageProxy::drawToPDFCallback):

  • UIProcess/mac/WKPrintingView.mm:

(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]):
(-[WKPrintingView _askPageToComputePageRects]):
(-[WKPrintingView _drawPreview:]):

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
(WebKit::WebPageProxy::fontAtSelection):
(WebKit::WebPageProxy::fontAtSelectionCallback):

  • WebKit2.xcodeproj/project.pbxproj:
  • WebProcess/Cookies/WebCookieManager.cpp:

(WebKit::WebCookieManager::getHostnamesWithCookies):
(WebKit::WebCookieManager::deleteCookie):
(WebKit::WebCookieManager::deleteAllCookiesModifiedSince):
(WebKit::WebCookieManager::getAllCookies):
(WebKit::WebCookieManager::getCookies):
(WebKit::WebCookieManager::setCookie):
(WebKit::WebCookieManager::setCookies):
(WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
(WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):

  • WebProcess/Cookies/WebCookieManager.h:
  • WebProcess/Cookies/WebCookieManager.messages.in:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

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

  • WebProcess/WebPage/AcceleratedDrawingArea.cpp:

(WebKit::AcceleratedDrawingArea::forceRepaintAsync):
(WebKit::AcceleratedDrawingArea::activityStateDidChange):

  • WebProcess/WebPage/AcceleratedDrawingArea.h:
  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:

(WebKit::CoordinatedLayerTreeHost::forceRepaintAsync):
(WebKit::CoordinatedLayerTreeHost::renderNextFrame):

  • WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
  • WebProcess/WebPage/DrawingArea.h:

(WebKit::DrawingArea::forceRepaintAsync):
(WebKit::DrawingArea::activityStateDidChange):
(WebKit::DrawingArea::addTransactionCallbackID):

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

(WebKit::LayerTreeHost::forceRepaintAsync):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::validateCommand):
(WebKit::WebPage::setInitialFocus):
(WebKit::WebPage::setActivityState):
(WebKit::WebPage::runJavaScriptInMainFrame):
(WebKit::WebPage::getContentsAsString):
(WebKit::WebPage::getContentsAsMHTMLData):
(WebKit::WebPage::getRenderTreeExternalRepresentation):
(WebKit::WebPage::getSelectionAsWebArchiveData):
(WebKit::WebPage::getSelectionOrContentsAsString):
(WebKit::WebPage::getSourceForFrame):
(WebKit::WebPage::getMainResourceDataOfFrame):
(WebKit::WebPage::getResourceDataFromFrame):
(WebKit::WebPage::getWebArchiveOfFrame):
(WebKit::WebPage::forceRepaint):
(WebKit::WebPage::computePagesForPrinting):
(WebKit::WebPage::drawRectToImage):
(WebKit::WebPage::drawPagesToPDF):
(WebKit::WebPage::drawPagesForPrinting):
(WebKit::WebPage::didFinishPrintOperation):
(WebKit::WebPage::getMarkedRangeAsync):
(WebKit::WebPage::getSelectedRangeAsync):
(WebKit::WebPage::characterIndexForPointAsync):
(WebKit::WebPage::firstRectForCharacterRangeAsync):
(WebKit::WebPage::getBytecodeProfile):
(WebKit::WebPage::getSamplingProfilerOutput):
(WebKit::WebPage::didGetLoadDecisionForIcon):

  • WebProcess/WebPage/WebPage.h:
  • WebProcess/WebPage/WebPage.messages.in:
  • WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:

(WebKit::WebPrintOperationGtk::WebPrintOperationGtk):

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

(WebKit::WebPage::getSelectionContext):
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::updateSelectionWithTouches):
(WebKit::WebPage::selectWithTwoTouches):
(WebKit::WebPage::moveSelectionByOffset):
(WebKit::WebPage::getRectsForGranularityWithSelectionOffset):
(WebKit::WebPage::getRectsAtSelectionOffsetWithText):
(WebKit::WebPage::selectPositionAtPoint):
(WebKit::WebPage::selectPositionAtBoundaryWithDirection):
(WebKit::WebPage::moveSelectionAtBoundaryWithDirection):
(WebKit::WebPage::selectTextWithGranularityAtPoint):
(WebKit::WebPage::beginSelectionInDirection):
(WebKit::WebPage::updateSelectionWithExtentPointAndBoundary):
(WebKit::WebPage::updateSelectionWithExtentPoint):
(WebKit::WebPage::requestDictationContext):
(WebKit::WebPage::requestAutocorrectionData):
(WebKit::WebPage::applyAutocorrection):
(WebKit::WebPage::executeEditCommandWithCallback):
(WebKit::WebPage::requestAutocorrectionContext):
(WebKit::WebPage::focusNextAssistedNode):
(WebKit::WebPage::computePagesForPrintingAndDrawToPDF):

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

(WebKit::RemoteLayerTreeDrawingArea::activityStateDidChange):
(WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):

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

(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
(WebKit::TiledCoreAnimationDrawingArea::activityStateDidChange):
(WebKit::TiledCoreAnimationDrawingArea::didUpdateActivityStateTimerFired):

  • WebProcess/WebPage/mac/WebPageMac.mm:

(WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPage::fontAtSelection):

7:25 PM Changeset in webkit [218984] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Provide a way for creating a new tab but not making it immediately selected
https://bugs.webkit.org/show_bug.cgi?id=173983

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TabBar.js:

(WebInspector.TabBar):
(WebInspector.TabBar.prototype.addTabBarItem):
(WebInspector.TabBar.prototype.insertTabBarItem):
(WebInspector.TabBar.prototype.removeTabBarItem):
(WebInspector.TabBar.prototype._handleClick):
(WebInspector.TabBar.prototype._handleNewTabClick):

  • UserInterface/Views/TabBrowser.js:

(WebInspector.TabBrowser.prototype.addTabForContentView):
(WebInspector.TabBrowser.prototype.showTabForContentView):
(WebInspector.TabBrowser.prototype.closeTabForContentView):

  • UserInterface/Base/Main.js:

(WebInspector.contentLoaded):
(WebInspector._openDefaultTab):
(WebInspector._tryToRestorePendingTabs):
(WebInspector.showNewTabTab):
(WebInspector.createNewTabWithType):
Add options dictionaries instead of optional parameters.

(WebInspector.tabContentViewClassForRepresentedObject):
Drive-by fix: remove incorrect placement of WebInspector.Collection check. This function
determines TabContentView classes, not ContentView.

7:16 PM Changeset in webkit [218983] by Devin Rousso
  • 4 edits in trunk/Source/WebInspectorUI

Web Inspector: Remove unnecessary hasChildren from TreeOutline
https://bugs.webkit.org/show_bug.cgi?id=173986

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/TreeOutline.js:

(WebInspector.TreeOutline):
(WebInspector.TreeOutline.prototype.appendChild):
(WebInspector.TreeOutline.prototype.insertChild):
(WebInspector.TreeOutline.prototype.removeChildAtIndex):
(WebInspector.TreeOutline.prototype.removeChild):
(WebInspector.TreeOutline.prototype.get selectedTreeElementIndex):

  • UserInterface/Views/NavigationSidebarPanel.js:

(WebInspector.NavigationSidebarPanel.prototype._checkOutlinesForPendingViewStateCookie):

  • UserInterface/Views/VisualStyleCommaSeparatedKeywordEditor.js:

(WebInspector.VisualStyleCommaSeparatedKeywordEditor.prototype.get value):

7:09 PM Changeset in webkit [218982] by Simon Fraser
  • 17 edits
    4 adds in trunk

getBoundingClientRect returns wrong value for combination of page zoom and scroll
https://bugs.webkit.org/show_bug.cgi?id=173841
rdar://problem/32983841

Reviewed by Dean Jackson.

Source/WebCore:

The layout viewport returned by FrameView::layoutViewportRect() is affected by page (Command-+) zooming,
since it's computed using scroll positions, so when we use its origin to convert into client coordinates
(which are zoom-agnostic), we need to account for page zoom, so fix FrameView::documentToClientOffset()
to do this.

Callers of documentToClientOffset() were checked, revealing that event client coordinates were also
wrong with page zoom and are fixed in the same way. It was found that SimulatedClick was using an
entirely wrong rect to compute its location: Element::clientRect() is NOT in client coordinates,
so change this code to use getBoundingClientRect() instead.

Minor refactoring in MouseRelatedEvent to make getting to the FrameView cleaner.

Some geometry types enhanced to have non-mutating scale functions.

Tests: fast/events/simulated-click-zoomed.html

fast/visual-viewport/client-rects-relative-to-layout-viewport-zoomed.html

  • dom/MouseRelatedEvent.cpp:

(WebCore::MouseRelatedEvent::init):
(WebCore::MouseRelatedEvent::initCoordinates):
(WebCore::MouseRelatedEvent::frameView):
(WebCore::MouseRelatedEvent::documentToAbsoluteScaleFactor):
(WebCore::MouseRelatedEvent::computePageLocation):
(WebCore::MouseRelatedEvent::computeRelativePosition):
(WebCore::pageZoomFactor): Deleted.
(WebCore::frameScaleFactor): Deleted.

  • dom/MouseRelatedEvent.h:

(WebCore::MouseRelatedEvent::absoluteLocation):
(WebCore::MouseRelatedEvent::setAbsoluteLocation): Deleted.

  • dom/SimulatedClick.cpp:
  • page/FrameView.cpp:

(WebCore::FrameView::layoutViewportRect): baseLayoutViewportSize() is the same as the old code.
(WebCore::FrameView::documentToAbsoluteScaleFactor):
(WebCore::FrameView::absoluteToDocumentScaleFactor):
(WebCore::FrameView::absoluteToDocumentPoint):
(WebCore::FrameView::documentToClientOffset):

  • page/FrameView.h:
  • platform/graphics/FloatPoint.h:

(WebCore::FloatPoint::scale):
(WebCore::FloatPoint::scaled):

  • platform/graphics/FloatSize.h:

(WebCore::FloatSize::scaled):

  • platform/graphics/LayoutPoint.h:

(WebCore::LayoutPoint::scaled):

Tools:

Make "Zoom In" and "Zoom Out" work correctly in the WebKit1 window. Previously they
always did text zooming.

  • MiniBrowser/mac/WK1BrowserWindowController.m:

(-[WK1BrowserWindowController zoomIn:]):
(-[WK1BrowserWindowController zoomOut:]):
(-[WK1BrowserWindowController canResetZoom]):
(-[WK1BrowserWindowController resetZoom:]):

LayoutTests:

  • fast/events/clientXY-in-zoom-and-scroll.html: New baseline for progressed behavior.
  • fast/events/simulated-click-zoomed-expected.txt: Added.
  • fast/events/simulated-click-zoomed.html: Added.
  • fast/visual-viewport/client-rects-relative-to-layout-viewport-zoomed-expected.txt: Added.
  • fast/visual-viewport/client-rects-relative-to-layout-viewport-zoomed.html: Added.
  • platform/ios/TestExpectations:
  • platform/mac/fast/events/clientXY-in-zoom-and-scroll-expected.txt:
7:04 PM Changeset in webkit [218981] by matthew_hanson@apple.com
  • 1 copy in tags/Safari-604.1.28.1

New Tag.

7:03 PM Changeset in webkit [218980] by matthew_hanson@apple.com
  • 1 delete in tags/Safari-604.1.28.1

Delete Tag.

6:13 PM Changeset in webkit [218979] by Megan Gardner
  • 2 edits in trunk/Source/WebCore

Unreviewed, fixing Window's build after r218976

  • rendering/ScrollAlignment.cpp:

(WebCore::operator<<):

6:01 PM Changeset in webkit [218978] by aestes@apple.com
  • 2 edits in trunk/Source/WebKit2

[iOS] Don't confuse coordinate spaces when computing the size of PDF snapshots
https://bugs.webkit.org/show_bug.cgi?id=173996
<rdar://problem/32961028>

Reviewed by Tim Horton.

When computing the printing rect for PDF snapshots, we were getting the width the
WKContentView's bounds and the height from the WKScrollView's contentSize. These sizes are
in different coordinate spaces, leading to incorrect clipping on sites that have a non-1
scale factor.

Fix this by using the WKContentView's bounds for both width and height.

  • UIProcess/ios/WKContentView.mm:

(-[WKContentView _wk_pageCountForPrintFormatter:]):

5:58 PM Changeset in webkit [218977] by sbarati@apple.com
  • 3 edits
    1 add in trunk

Calculating postCapacity in unshiftCountSlowCase is wrong
https://bugs.webkit.org/show_bug.cgi?id=173992
<rdar://problem/32283199>

Reviewed by Keith Miller.

JSTests:

  • stress/unshiftCountSlowCase-correct-postCapacity.js: Added.

(temp):

Source/JavaScriptCore:

This patch fixes a bug inside unshiftCountSlowCase where we would use
more memory than we allocated. The bug was when deciding how much extra
space we have after the vector we've allocated. This area is called the
postCapacity. The largest legal postCapacity value we could use is the
space we allocated minus the space we need:
largestPossiblePostCapacity = newStorageCapacity - requiredVectorLength;
However, the code was calculating the postCapacity as:
postCapacity = max(newStorageCapacity - requiredVectorLength, count);

where count is how many elements we're appending. Depending on the inputs,
count could be larger than (newStorageCapacity - requiredVectorLength). This
would cause us to use more memory than we actually allocated.

  • runtime/JSArray.cpp:

(JSC::JSArray::unshiftCountSlowCase):

5:55 PM Changeset in webkit [218976] by Megan Gardner
  • 8 edits in trunk/Source/WebCore

Add TextStream operators for Range, VisiblePosition, VisibleSelection, and ScrollAlignment
https://bugs.webkit.org/show_bug.cgi?id=173997

Reviewed by Simon Fraser.

Adding logging that can be used with TextStream-based LOG_WITH_STREAM.

  • dom/Range.cpp:

(WebCore::operator<<):

  • dom/Range.h:
  • editing/VisiblePosition.h:
  • editing/VisibleSelection.cpp:

(WebCore::operator<<):

  • editing/VisibleSelection.h:
  • rendering/ScrollAlignment.cpp:

(WebCore::operator<<):

  • rendering/ScrollAlignment.h:
5:41 PM Changeset in webkit [218975] by Devin Rousso
  • 14 edits in trunk/Source/WebInspectorUI

Web Inspector: Cleanup unused/invalid parameters for SidebarPanels
https://bugs.webkit.org/show_bug.cgi?id=173985

Reviewed by Joseph Pecoraro.

  • UserInterface/Views/SidebarPanel.js:
  • UserInterface/Views/NavigationSidebarPanel.js:
  • UserInterface/Views/NavigationSidebarPanel.css:

(.sidebar > .panel.navigation > .overflow-shadow.top): Deleted.

  • UserInterface/Views/DetailsSidebarPanel.js:
  • UserInterface/Views/ApplicationCacheDetailsSidebarPanel.js:
  • UserInterface/Views/CSSStyleDetailsSidebarPanel.js:
  • UserInterface/Views/DOMDetailsSidebarPanel.js:
  • UserInterface/Views/DOMNodeDetailsSidebarPanel.js:
  • UserInterface/Views/IndexedDatabaseDetailsSidebarPanel.js:
  • UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
  • UserInterface/Views/ProbeDetailsSidebarPanel.js:
  • UserInterface/Views/ResourceDetailsSidebarPanel.js:
  • UserInterface/Views/ScopeChainDetailsSidebarPanel.js:
  • UserInterface/Views/StorageSidebarPanel.js:
5:25 PM Changeset in webkit [218974] by jmarcell@apple.com
  • 14 edits in branches/safari-604.1.28-branch/Source

Revert r218757. rdar://problem/32911535

5:15 PM Changeset in webkit [218973] by Matt Lewis
  • 15 edits in trunk/Source

Unreviewed, rolling out r218903.

This patch and its fix cause immediate flakiness on all WK2
testers

Reverted changeset:

"Support PeerConnectionStates::BundlePolicy::MaxBundle when
setting rtc configuration"
https://bugs.webkit.org/show_bug.cgi?id=169389
http://trac.webkit.org/changeset/218903

5:14 PM Changeset in webkit [218972] by Matt Lewis
  • 2 edits in trunk/Source/WebCore

Unreviewed, rolling out r218963.

This patch and its fix cause immediate flakiness on all WK2
testers

Reverted changeset:

"Support PeerConnectionStates::BundlePolicy::MaxBundle when
setting rtc configuration"
https://bugs.webkit.org/show_bug.cgi?id=169389
http://trac.webkit.org/changeset/218963

5:07 PM Changeset in webkit [218971] by jmarcell@apple.com
  • 20 edits
    1 delete in branches/safari-604.1.28-branch

Cherry-pick r218957.

5:07 PM Changeset in webkit [218970] by jmarcell@apple.com
  • 2 edits in branches/safari-604.1.28-branch/Source/WebCore

Cherry-pick r218932. rdar://problem/32937842

5:07 PM Changeset in webkit [218969] by jmarcell@apple.com
  • 2 edits in branches/safari-604.1.28-branch/Source/WebCore

Cherry-pick r218954. rdar://problem/33065684

4:52 PM WebIDLToDo edited by sam@webkit.org
(diff)
4:40 PM Changeset in webkit [218968] by Chris Dumez
  • 13 edits
    2 adds in trunk/Source

Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=173990

Reviewed by Brent Fulgham.

Split ResourceLoadObserver into 2 classes: one for WebCore and one for the UIProcess.
They really have different API and there is therefore close to no code duplication.

Source/WebCore:

  • loader/ResourceLoadObserver.cpp:

(WebCore::primaryDomain):
(WebCore::ResourceLoadObserver::setStatisticsQueue):
(WebCore::ResourceLoadObserver::shouldLog):

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::primaryDomain):

  • loader/ResourceLoadStatisticsStore.h:
  • platform/URL.h:

Source/WebKit2:

  • CMakeLists.txt:
  • UIProcess/Cocoa/WebResourceLoadStatisticsManagerCocoa.mm:

(WebKit::WebResourceLoadStatisticsManager::registerUserDefaultsIfNeeded):

  • UIProcess/WebResourceLoadObserver.cpp: Added.

(WebKit::primaryDomain):
(WebKit::WebResourceLoadObserver::sharedObserver):
(WebKit::WebResourceLoadObserver::setStatisticsStore):
(WebKit::WebResourceLoadObserver::setStatisticsQueue):
(WebKit::WebResourceLoadObserver::clearInMemoryStore):
(WebKit::WebResourceLoadObserver::clearInMemoryAndPersistentStore):
(WebKit::WebResourceLoadObserver::logUserInteraction):
(WebKit::WebResourceLoadObserver::clearUserInteraction):
(WebKit::WebResourceLoadObserver::hasHadUserInteraction):
(WebKit::WebResourceLoadObserver::setPrevalentResource):
(WebKit::WebResourceLoadObserver::isPrevalentResource):
(WebKit::WebResourceLoadObserver::clearPrevalentResource):
(WebKit::WebResourceLoadObserver::setGrandfathered):
(WebKit::WebResourceLoadObserver::isGrandfathered):
(WebKit::WebResourceLoadObserver::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadObserver::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadObserver::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadObserver::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadObserver::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
(WebKit::WebResourceLoadObserver::setGrandfatheringTime):
(WebKit::WebResourceLoadObserver::fireDataModificationHandler):
(WebKit::WebResourceLoadObserver::fireShouldPartitionCookiesHandler):
(WebKit::WebResourceLoadObserver::fireTelemetryHandler):

  • UIProcess/WebResourceLoadObserver.h: Added.
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::setPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::isPrevalentResource):
(WebKit::WebResourceLoadStatisticsManager::setHasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::hasHadUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::setGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::isGrandfathered):
(WebKit::WebResourceLoadStatisticsManager::setSubframeUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsManager::setSubresourceUnderTopFrameOrigin):
(WebKit::WebResourceLoadStatisticsManager::setSubresourceUniqueRedirectTo):
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):
(WebKit::WebResourceLoadStatisticsManager::fireDataModificationHandler):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandler):
(WebKit::WebResourceLoadStatisticsManager::fireShouldPartitionCookiesHandlerForOneDomain):
(WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStore):
(WebKit::WebResourceLoadStatisticsManager::clearInMemoryAndPersistentStoreModifiedSinceHours):
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::removeData):

  • WebKit2.xcodeproj/project.pbxproj:
4:13 PM Changeset in webkit [218967] by commit-queue@webkit.org
  • 12 edits
    2 copies
    1 move
    6 adds in trunk/Source

[WebIDL] Remove custom binding for UserMessageHandlersNamespace
https://bugs.webkit.org/show_bug.cgi?id=173956

Patch by Sam Weinig <sam@webkit.org> on 2017-06-29
Reviewed by Darin Adler.

Source/WebCore:

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

Remove JSUserMessageHandlersNamespaceCustom.cpp

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateNamedGetterLambda):
Add support for calling named getters with additional arguments from [CallWith].

(GenerateAttributeGetterBodyDefinition):
(GenerateAttributeSetterBodyDefinition):
(GenerateCallWithUsingReferences):
(GenerateCallWithUsingPointers):
(GenerateConstructorCallWithUsingPointers):
(GenerateCallWith):
(GenerateParametersCheck):
Update arguments to GenerateCallWith(Using...) to no longer pass an operation,
which was only needed for the no longer used ScriptArguments, pass a thisObject
reference, and optionally pass an indentation.

  • bindings/scripts/IDLAttributes.json:

Remove no longer used ScriptArguments and CallStack, add World.

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

(WebCore::jsTestObjWithScriptArgumentsAndCallStackAttributeGetter): Deleted.
(WebCore::jsTestObjWithScriptArgumentsAndCallStackAttribute): Deleted.
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttributeSetter): Deleted.
(WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute): Deleted.
(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStackBody): Deleted.
(WebCore::jsTestObjPrototypeFunctionWithScriptArgumentsAndCallStack): Deleted.

  • bindings/scripts/test/TestObj.idl:

Remove tests of ScriptArguments and CallStack.

  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp: Added.
  • bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: Added.
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp: Added.
  • bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: Added.
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp: Added.
  • bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: Added.
  • bindings/scripts/test/TestNamedGetterCallWith.idl: Added.
  • bindings/scripts/test/TestNamedGetterNoIdentifier.idl: Added.
  • bindings/scripts/test/TestNamedGetterWithIdentifier.idl: Added.

Add basic named getter tests and a specific test of named getters using CallWith.

  • page/UserMessageHandlersNamespace.cpp:

(WebCore::UserMessageHandlersNamespace::supportedPropertyNames):
(WebCore::UserMessageHandlersNamespace::namedItem):
(WebCore::UserMessageHandlersNamespace::handler): Deleted.

  • page/UserMessageHandlersNamespace.h:

Rename handler to namedItem, matching convention and the expectations of the
bindings generator and swap the order of the arguments for the same reason.

  • page/UserMessageHandlersNamespace.idl:

Remove CustomGetOwnPropertySlotAndDescriptor, and add the anonymous named getter.

Source/WebKit2:

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

(webkit_dom_dom_window_webkit_message_handlers_post_message):
Update for name change.

4:07 PM Changeset in webkit [218966] by Chris Dumez
  • 5 edits in trunk/Source/WebCore

Avoid copying ResourceLoadStatistics objects
https://bugs.webkit.org/show_bug.cgi?id=173972

Reviewed by Brent Fulgham.

Avoid copying ResourceLoadStatistics objects given that they are big. Make the type move-only
to avoid such mistakes in the future.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logFrameNavigation):

  • loader/ResourceLoadStatistics.h:

(WebCore::ResourceLoadStatistics::ResourceLoadStatistics):

3:22 PM Changeset in webkit [218965] by wilander@apple.com
  • 14 edits in trunk

Fix for intermittent Layout Test fail http/tests/loading/resourceLoadStatistics/telemetry-generation.html
https://bugs.webkit.org/show_bug.cgi?id=173940
<rdar://problem/33018125>

Reviewed by Brent Fulgham.

Source/WebCore:

No new tests. This change enables the exiting test to pass.

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):

Added an assert.

Source/WebKit2:

This change allows the TestController to turn off
regular resource load statistics telemetry submission
and to manually control when telemetry is calculated
and submitted.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerSetShouldSubmitTelemetry):

New test infrastructure.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::setShouldSubmitTelemetry):

New test infrastructure.

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::setShouldSubmitTelemetry):

New test infrastructure.

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

The test function now calls
WebResourceLoadStatisticsStore::submitTelemetry() directly
instead of firing the timer.

(WebKit::WebResourceLoadStatisticsStore::telemetryTimerFired):

Now checks whether it should submit telemetry or not.

(WebKit::WebResourceLoadStatisticsStore::submitTelemetry):

Split out so that the test code doesn't have to fire the timer.

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebResourceLoadStatisticsTelemetry.cpp:

(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):

Now doesn't submit if it's executed by test code.

Tools:

This change allows the TestController to turn off
regular resource load statistics telemetry submission
and to manually control when telemetry is calculated
and submitted.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::initialize):

Turns off automatic resource load statistics telemetry submission.

LayoutTests:

  • platform/wk2/TestExpectations:

http/tests/loading/resourceLoadStatistics/telemetry-generation.html
is now expected to pass.

3:16 PM Changeset in webkit [218964] by jmarcell@apple.com
  • 2 edits in branches/safari-604.1.28-branch/Source/WebKit2

Revert r218727. rdar://problem/32873545

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

Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
https://bugs.webkit.org/show_bug.cgi?id=169389

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-29

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration): Reactivating CPU overuse detection as it might be the cause of the bots regressions.

2:58 PM Changeset in webkit [218962] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

[Curl] ResourceHandleManager violate the class responsibility of ResourceHandle
https://bugs.webkit.org/show_bug.cgi?id=173630

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

  • platform/network/ResourceHandle.h:
  • platform/network/curl/ResourceHandleCurl.cpp:

(WebCore::ResourceHandle::platformLoadResourceSynchronously):
(WebCore::calculateWebTimingInformations):
(WebCore::handleLocalReceiveResponse):
(WebCore::writeCallback):
(WebCore::isHttpInfo):
(WebCore::isHttpRedirect):
(WebCore::isHttpAuthentication):
(WebCore::isHttpNotModified):
(WebCore::isAppendableHeader):
(WebCore::removeLeadingAndTrailingQuotes):
(WebCore::getProtectionSpace):
(WebCore::headerCallback):
(WebCore::readCallback):
(WebCore::getFormElementsCount):
(WebCore::setupFormData):
(WebCore::ResourceHandle::setupPUT):
(WebCore::ResourceHandle::setupPOST):
(WebCore::ResourceHandle::handleDataURL):
(WebCore::ResourceHandle::dispatchSynchronousJob):
(WebCore::ResourceHandle::applyAuthentication):
(WebCore::ResourceHandle::initialize):
(WebCore::ResourceHandle::handleCurlMsg):

  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::ResourceHandleManager::startJob):
(WebCore::calculateWebTimingInformations): Deleted.
(WebCore::isHttpInfo): Deleted.
(WebCore::isHttpRedirect): Deleted.
(WebCore::isHttpAuthentication): Deleted.
(WebCore::isHttpNotModified): Deleted.
(WebCore::handleLocalReceiveResponse): Deleted.
(WebCore::writeCallback): Deleted.
(WebCore::isAppendableHeader): Deleted.
(WebCore::removeLeadingAndTrailingQuotes): Deleted.
(WebCore::getProtectionSpace): Deleted.
(WebCore::headerCallback): Deleted.
(WebCore::readCallback): Deleted.
(WebCore::getFormElementsCount): Deleted.
(WebCore::setupFormData): Deleted.
(WebCore::ResourceHandleManager::setupPUT): Deleted.
(WebCore::ResourceHandleManager::setupPOST): Deleted.
(WebCore::handleDataURL): Deleted.
(WebCore::ResourceHandleManager::dispatchSynchronousJob): Deleted.
(WebCore::ResourceHandleManager::applyAuthenticationToRequest): Deleted.
(WebCore::ResourceHandleManager::initializeHandle): Deleted.

  • platform/network/curl/ResourceHandleManager.h:
1:54 PM Changeset in webkit [218961] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WebCore

Async image decoding should be disabled for iBooks on tvOS
https://bugs.webkit.org/show_bug.cgi?id=173945

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

The iBooks on tvOS is an AppStore application. We need to disable async
image decoding for iBooks on tvOS permanently through WebKit.

  • platform/cocoa/RuntimeApplicationChecksCocoa.mm:

(WebCore::IOSApplication::isIBooks):

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::updateFromSettings):

1:38 PM Changeset in webkit [218960] by commit-queue@webkit.org
  • 12 edits
    4 deletes in trunk

[WebIDL] Add a new extended attribute to model the forced return value optimization used on Node and Crypto
https://bugs.webkit.org/show_bug.cgi?id=173961

Patch by Sam Weinig <sam@webkit.org> on 2017-06-29
Reviewed by Darin Adler.

Source/WebCore:

Node and Crypto were both using custom bindings to implement an optimization
for operations that always returned one one of the arguments passed in. The
optimization directly returns the JSValue argument, avoiding wrapping and
unwrapping, and all the cache lookups that might entail. This allows that
optimization to work without custom bindings by adding a new extended attribute
[ReturnValue] that can annotate an argument. When used, the implementation
function is expected to return either void or ExceptionOr<void>.

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

Remove JSCryptoCustom.cpp.

  • bindings/js/JSNodeCustom.cpp:

(WebCore::JSNode::insertBefore): Deleted.
(WebCore::JSNode::replaceChild): Deleted.
(WebCore::JSNode::removeChild): Deleted.
(WebCore::JSNode::appendChild): Deleted.
Remove custom functions.

  • bindings/scripts/CodeGeneratorJS.pm:

(OperationHasForcedReturnValue):
Add helper to determine if an operation has [ReturnValue] on any argument.

(NeedsExplicitPropagateExceptionCall):
We must treat operations with a [ReturnValue] argument like we do operations
returning void, and explicitly check for exceptions.

(GenerateParametersCheck):
Pull out the argument in a variable called 'returnValue' if it is annotated
with [ReturnValue].

(GenerateImplementationFunctionCall):
Special case operations with a [ReturnValue] argument to return the previously
set aside 'returnValue' variable.

  • bindings/scripts/IDLAttributes.json:

Add [ReturnValue].

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

(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationBody):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimization):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithExceptionBody):
(WebCore::jsTestObjPrototypeFunctionTestReturnValueOptimizationWithException):

  • bindings/scripts/test/TestObj.idl:

Add tests for [ReturnValue].

  • dom/Node.idl:
  • page/Crypto.idl:

Add [ReturnValue] annotations and remove [Custom] annotations.

LayoutTests:

  • js/dom/dot-node-base-exception-expected.txt: Removed.
  • js/dom/dot-node-base-exception.html: Removed.
  • js/dom/script-tests/dot-node-base-exception.js: Removed.

Remove now obsolete test.

1:15 PM Changeset in webkit [218959] by Devin Rousso
  • 3 edits in trunk/Source/WebInspectorUI

Web Inspector: Create a single -webkit-canvas for use inside popovers
https://bugs.webkit.org/show_bug.cgi?id=173820

Reviewed by Matt Baker.

  • UserInterface/Views/Popover.css:

(.popover):

  • UserInterface/Views/Popover.js:

(WebInspector.Popover):
(WebInspector.Popover.prototype._drawBackground):

12:51 PM Changeset in webkit [218958] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Slight clean up of WebResourceLoadStatisticsStore
https://bugs.webkit.org/show_bug.cgi?id=173976

Reviewed by Brent Fulgham.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::dataTypesToRemove):
(WebKit::WebResourceLoadStatisticsStore::classifyResource):
(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):
(WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled):
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):
(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):
(WebKit::WebResourceLoadStatisticsStore::stopMonitoringStatisticsStorage):
(WebKit::initializeDataTypesToRemove): Deleted.

  • UIProcess/WebResourceLoadStatisticsStore.h:

(WebKit::WebResourceLoadStatisticsStore::coreStore): Deleted.

12:34 PM Changeset in webkit [218957] by commit-queue@webkit.org
  • 20 edits
    1 delete in trunk

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

"It changes the behavior of the JS API's JSEvaluateScript
which breaks TurboTax" (Requested by saamyjoon on #webkit).

Reverted changeset:

"test262: Completion values for control flow do not match the
spec"
https://bugs.webkit.org/show_bug.cgi?id=171265
http://trac.webkit.org/changeset/218512

12:31 PM Changeset in webkit [218956] by achristensen@apple.com
  • 3 edits
    3 adds in trunk

WKContentRuleLists with if-top-url or unless-top-url should run regex against entire top URL
https://bugs.webkit.org/show_bug.cgi?id=173980

Reviewed by Tim Horton.

Source/WebKit2:

if-top-url and unless-top-url were broken inside WebKit2 apps. This fixes them and adds a test.
ContentExtension::populateConditionCacheIfNeeded was calling WebCompiledContentRuleList::conditionsApplyOnlyToDomain
but m_data.conditionsApplyOnlyToDomainOffset was always 0 instead of ConditionsApplyOnlyToDomainOffset because
it wasn't being encoded and decoded when telling the WebProcess about the content rule list. This was causing us
to use whatever was at offset 0 in the file instead of the correct value stored in the file to determine
whether to run regular expressions against the entire top URL for if-top-url or unless-top-url or against
just the domain for if-top-domain or unless-top-domain. Luckily, offset 0 in the file is always
ContentRuleListStore::CurrentContentRuleListFileVersion, so it was deterministic and easy to debug.

I should have added a LayoutTest with r213669 to verify correct behavior in an actual WKWebView,
but I didn't because it wouldn't have caught regressions since the contentextension tests are
marked as flaky since r206914, but once that is fixed the new test http/tests/contentextensions/top-url.html
will verify that this feature is behaving correctly. It failed before this change and passes after.

  • Shared/WebCompiledContentRuleListData.cpp:

(WebKit::WebCompiledContentRuleListData::encode):
(WebKit::WebCompiledContentRuleListData::decode):

LayoutTests:

  • http/tests/contentextensions/top-url-expected.txt: Added.
  • http/tests/contentextensions/top-url.html: Added.
  • http/tests/contentextensions/top-url.html.json: Added.
12:24 PM Changeset in webkit [218955] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Unreviewed, rolling out r218944.

Optimization is incorrect

Reverted changeset:

"Avoid copying ResourceLoadStatistics objects"
https://bugs.webkit.org/show_bug.cgi?id=173972
http://trac.webkit.org/changeset/218944

12:19 PM Changeset in webkit [218954] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

REGRESSION(r218896): ASSERT in WebPageProxy::dataCallback
https://bugs.webkit.org/show_bug.cgi?id=173968

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-06-29
Reviewed by Michael Catanzaro.

The problem is that WebPageProxy::getLoadDecisionForIcon() sends 0 as callback ID when the decision is to not
load the icon. Since r218896 we always notify the client even when the decision is to not load the icon, in
which case the UI doesn't really expect a callback. When WebPageProxy::dataCallback is called with a 0 callback ID,
CallbackMap::take() crashes in RELEASE_ASSERT(callbackID).

Fixes several GTK+ unit tests that are crashing.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::didGetLoadDecisionForIcon): Return earlier if decision is false or frame is nullptr.
(WebCore::DocumentLoader::finishedLoadingIcon): Move RELEASE_ASSERT to notifyFinishedLoadingIcon().
(WebCore::DocumentLoader::notifyFinishedLoadingIcon): Assert if callbackIdentifier is 0 or m_frame is nullptr,
since it's no longer expected to happen.

12:13 PM Changeset in webkit [218953] by Chris Dumez
  • 7 edits in trunk/Source

statistics.mostRecentUserInteraction should be of type WallTime
https://bugs.webkit.org/show_bug.cgi?id=173974

Reviewed by Brent Fulgham.

statistics.mostRecentUserInteraction should be of type WallTime for clarity.

Source/WebCore:

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logUserInteraction):
(WebCore::ResourceLoadObserver::clearUserInteraction):

  • loader/ResourceLoadStatistics.cpp:

(WebCore::ResourceLoadStatistics::encode):
(WebCore::ResourceLoadStatistics::decode):
(WebCore::ResourceLoadStatistics::toString):
(WebCore::ResourceLoadStatistics::merge):

  • loader/ResourceLoadStatistics.h:

(WebCore::ResourceLoadStatistics::mostRecentUserInteractionTime): Deleted.

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::shouldPartitionCookies):
(WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
(WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):

Source/WebKit2:

  • Shared/WebCoreArgumentCoders.cpp:

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

12:11 PM Changeset in webkit [218952] by Jonathan Bedard
  • 3 edits
    2 adds in trunk

Add WebKitSystemInterface for iOS 11
https://bugs.webkit.org/show_bug.cgi?id=173936

Reviewed by Lucas Forschler.

Tools:

  • Scripts/copy-webkitlibraries-to-product-directory: Copy iOS 11 WebKitSystemInterface libraries.

WebKitLibraries:

  • libWebKitSystemInterfaceIOSDevice11.a: Added.
  • libWebKitSystemInterfaceIOSSimulator11.a: Added.
11:49 AM Changeset in webkit [218951] by jfbastien@apple.com
  • 24 edits
    11 adds in trunk

WebAssembly: disable some APIs under CSP
https://bugs.webkit.org/show_bug.cgi?id=173892
<rdar://problem/32914613>

Reviewed by Daniel Bates.

Source/JavaScriptCore:

We should disable parts of WebAssembly under Content Security
Policy as discussed here:

https://github.com/WebAssembly/design/issues/1092

Exactly what should be disabled isn't super clear, so we may as
well be conservative and disable many things if developers already
opted into CSP. It's easy to loosen what we disable later.

This patch disables:

  • WebAssembly.Instance
  • WebAssembly.instantiate
  • WebAssembly.Memory
  • WebAssembly.Table

And leaves:

  • WebAssembly on the global object
  • WebAssembly.Module
  • WebAssembly.compile
  • WebAssembly.CompileError
  • WebAssembly.LinkError

Nothing because currently unimplmented:

  • WebAssembly.compileStreaming
  • WebAssembly.instantiateStreaming

That way it won't be possible to call WebAssembly-compiled code,
or create memories (which use fancy 4GiB allocations
sometimes). Table isn't really useful on its own, and eventually
we may make them shareable so without more details it seems benign
to disable them (and useless if we don't).

I haven't done anything with postMessage, so you can still
postMessage a WebAssembly.Module cross-CSP, but you can't
instantiate it so it's useless. Because of this I elected to leave
WebAssembly.Module and friends available.

I haven't added any new directives. It's still unsafe-eval. We can
add something else later, but it seems odd to add a WebAssembly as
a new capability and tell developers "you should have been using
this directive which we just implemented if you wanted to disable
WebAssembly which didn't exist when you adopted CSP". So IMO we
should keep unsafe-eval as it currently is, add WebAssembly to
what it disables, and later consider having two new directives
which do each individually or something.

In all cases I throw an EvalError *before* other WebAssembly
errors would be produced.

Note that, as for eval, reporting doesn't work and is tracked by
https://webkit.org/b/111869

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::webAssemblyEnabled):
(JSC::JSGlobalObject::webAssemblyDisabledErrorMessage):
(JSC::JSGlobalObject::setWebAssemblyEnabled):

  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::create):

  • wasm/js/JSWebAssemblyMemory.cpp:

(JSC::JSWebAssemblyMemory::create):

  • wasm/js/JSWebAssemblyMemory.h:
  • wasm/js/JSWebAssemblyTable.cpp:

(JSC::JSWebAssemblyTable::create):

  • wasm/js/WebAssemblyMemoryConstructor.cpp:

(JSC::constructJSWebAssemblyMemory):

Source/WebCore:

This does the basic separation of eval-blocked and
WebAssembly-blocked, but currently only blocks neither or both. I
think we'll eventually consider allowing one to be blocked but not
the other, so this separation makes sense and means that when we
want to do the change it'll be tiny. At a minimum we want a
different error message, which this patch provides (a lot of the
code ties blocking to the error message).

Tests: http/tests/security/contentSecurityPolicy/WebAssembly-allowed.html

http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe.html
http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script.html
http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe.html
http/tests/security/contentSecurityPolicy/WebAssembly-blocked.html

  • bindings/js/ScriptController.cpp:

(WebCore::ScriptController::enableWebAssembly):
(WebCore::ScriptController::disableWebAssembly):

  • bindings/js/ScriptController.h:
  • bindings/js/WorkerScriptController.cpp:

(WebCore::WorkerScriptController::disableWebAssembly):

  • bindings/js/WorkerScriptController.h:
  • dom/Document.cpp:

(WebCore::Document::disableWebAssembly):

  • dom/Document.h:
  • dom/ScriptExecutionContext.h:
  • page/csp/ContentSecurityPolicy.cpp:

(WebCore::ContentSecurityPolicy::didCreateWindowProxy):
(WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext):

  • page/csp/ContentSecurityPolicy.h:
  • page/csp/ContentSecurityPolicyDirectiveList.cpp:

(WebCore::ContentSecurityPolicyDirectiveList::create):

  • page/csp/ContentSecurityPolicyDirectiveList.h:

(WebCore::ContentSecurityPolicyDirectiveList::webAssemblyDisabledErrorMessage):
(WebCore::ContentSecurityPolicyDirectiveList::setWebAssemblyDisabledErrorMessage):

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::disableWebAssembly):

  • workers/WorkerGlobalScope.h:

LayoutTests:

These tests are basically the same as eval-blocked, but with
WebAssembly APIs instead of eval.

Disable all of them on iOS simulator which doesn't support
WebAssembly (whereas iOS does).

  • http/tests/security/contentSecurityPolicy/WebAssembly-allowed-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-allowed.html: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-about-blank-iframe.html: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-external-script.html: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe-expected.txt: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked-in-subframe.html: Added.
  • http/tests/security/contentSecurityPolicy/WebAssembly-blocked.html: Added.
  • http/tests/security/contentSecurityPolicy/resources/WebAssembly-blocked-in-external-script.js: Added.
  • platform/ios-simulator/TestExpectations:
11:47 AM Changeset in webkit [218950] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

Make InlineBox::m_topLeft and m_logicalWidth protected.
https://bugs.webkit.org/show_bug.cgi?id=173973

Reviewed by Simon Fraser.

I don't think this reasoning from 10 years ago is valid anymore ->

"FIXME: Would like to make this protected, but methods are accessing these members over in the part."

(comment was conveniently removed in a later commit).

No change in functionality.

  • rendering/InlineBox.h:

(WebCore::InlineBox::InlineBox):

11:14 AM Changeset in webkit [218949] by Wenson Hsieh
  • 2 edits in trunk/Source/WebCore

[iOS DnD] Adopt +objectWithItemProviderData: for serializing NSItemProviderReading-conformant objects
https://bugs.webkit.org/show_bug.cgi?id=173971
<rdar://problem/33006605>

Reviewed by Tim Horton.

Moves off of a very-recently-deprecated API, in favor of its replacement. Guarded by a runtime check and staging
declarations. No change in behavior.

  • platform/ios/WebItemProviderPasteboard.mm:

(-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):

11:13 AM Changeset in webkit [218948] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.28.1

New Tag.

11:07 AM Changeset in webkit [218947] by commit-queue@webkit.org
  • 7 edits
    2 moves
    2 adds in trunk/Source/WebCore

[Curl] Separate global curl settings from ResourceHandleManager as CurlContext class
https://bugs.webkit.org/show_bug.cgi?id=173629

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

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

(WebCore::setCookiesFromDOM):
(WebCore::cookiesForSession):

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

(WebCore::certificatePath):
(WebCore::cookieJarPath):
(WebCore::CurlContext::CurlContext):
(WebCore::CurlContext::~CurlContext):
(WebCore::CurlContext::initCookieSession):
(WebCore::CurlContext::ProxyInfo::url):
(WebCore::CurlContext::setProxyInfo):
(WebCore::CurlContext::getEffectiveURL):
(WebCore::CurlContext::createMultiHandle):
(WebCore::CurlContext::mutexFor):
(WebCore::CurlContext::lock):
(WebCore::CurlContext::unlock):

  • platform/network/curl/CurlContext.h: Added.

(WebCore::CurlContext::singleton):
(WebCore::CurlContext::curlShareHandle):
(WebCore::CurlContext::getCookieJarFileName):
(WebCore::CurlContext::setCookieJarFileName):
(WebCore::CurlContext::getCertificatePath):
(WebCore::CurlContext::shouldIgnoreSSLErrors):
(WebCore::CurlContext::proxyInfo):
(WebCore::CurlContext::setProxyInfo):
(WebCore::CurlContext::getLogFile):
(WebCore::CurlContext::isVerbose):

  • platform/network/curl/CurlDownload.cpp:

(WebCore::CurlDownload::init):
(WebCore::CurlDownload::start):
(WebCore::CurlDownload::cancel):
(WebCore::CurlDownload::didReceiveHeader):

  • platform/network/curl/CurlDownload.h:
  • platform/network/curl/CurlJobManager.cpp: Renamed from Source/WebCore/platform/network/curl/CurlManager.cpp.

(WebCore::CurlJobManager::CurlJobManager):
(WebCore::CurlJobManager::~CurlJobManager):
(WebCore::CurlJobManager::add):
(WebCore::CurlJobManager::remove):
(WebCore::CurlJobManager::getActiveCount):
(WebCore::CurlJobManager::getPendingCount):
(WebCore::CurlJobManager::startThreadIfNeeded):
(WebCore::CurlJobManager::stopThread):
(WebCore::CurlJobManager::stopThreadIfIdle):
(WebCore::CurlJobManager::updateHandleList):
(WebCore::CurlJobManager::addToCurl):
(WebCore::CurlJobManager::removeFromCurl):
(WebCore::CurlJobManager::workerThread):

  • platform/network/curl/CurlJobManager.h: Renamed from Source/WebCore/platform/network/curl/CurlManager.h.

(WebCore::CurlJobManager::singleton):

  • platform/network/curl/ResourceHandleManager.cpp:

(WebCore::ResourceHandleManager::ResourceHandleManager):
(WebCore::ResourceHandleManager::~ResourceHandleManager):
(WebCore::handleLocalReceiveResponse):
(WebCore::getProtectionSpace):
(WebCore::headerCallback):
(WebCore::ResourceHandleManager::downloadTimerCallback):
(WebCore::ResourceHandleManager::initializeHandle):
(WebCore::certificatePath): Deleted.
(WebCore::cookieJarPath): Deleted.
(WebCore::ResourceHandleManager::setCookieJarFileName): Deleted.
(WebCore::ResourceHandleManager::getCookieJarFileName): Deleted.
(WebCore::ResourceHandleManager::setProxyInfo): Deleted.
(WebCore::ResourceHandleManager::initCookieSession): Deleted.

  • platform/network/curl/ResourceHandleManager.h:

(): Deleted.

11:06 AM Changeset in webkit [218946] by jmarcell@apple.com
  • 15 edits in branches/safari-604.1.28-branch

rdar://problem/32913370

11:05 AM Changeset in webkit [218945] by jmarcell@apple.com
  • 7 edits in branches/safari-604.1.28-branch/Source

Versioning.

10:58 AM Changeset in webkit [218944] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

Avoid copying ResourceLoadStatistics objects
https://bugs.webkit.org/show_bug.cgi?id=173972

Reviewed by Geoffrey Garen.

Avoid copying ResourceLoadStatistics objects given that they are big. Make the type move-only
to avoid such mistakes in the future.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::logFrameNavigation):

  • loader/ResourceLoadStatistics.h:

(WebCore::ResourceLoadStatistics::ResourceLoadStatistics):

10:54 AM Changeset in webkit [218943] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Full stop shows to the right of the picture-in-picture localised string in Hebrew
https://bugs.webkit.org/show_bug.cgi?id=173966
<rdar://problem/32847376>

Patch by Antoine Quint <Antoine Quint> on 2017-06-29
Reviewed by Dean Jackson.

Source/WebCore:

We manually set the CSS "direction" property to "rtl" when we're not using an LTR language for a placard.

Test: media/modern-media-controls/placard/placard-ltr.html

  • Modules/modern-media-controls/controls/placard.css:

(.media-controls:not(.uses-ltr-user-interface-layout-direction) .placard):

LayoutTests:

  • media/modern-media-controls/placard/placard-ltr-expected.txt: Added.
  • media/modern-media-controls/placard/placard-ltr.html: Added.
10:50 AM Changeset in webkit [218942] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

10:45 AM Changeset in webkit [218941] by jmarcell@apple.com
  • 7 edits in trunk/Source

Versioning.

10:41 AM Changeset in webkit [218940] by jmarcell@apple.com
  • 1 copy in branches/safari-604.1.28-branch

New Branch.

10:40 AM Changeset in webkit [218939] by jmarcell@apple.com
  • 1 delete in branches/safari-604.1.28-branch

Delete branch.

10:37 AM Changeset in webkit [218938] by jmarcell@apple.com
  • 1 copy in branches/safari-604.1.28-branch/Safari-604.1.28

New Branch.

10:35 AM Changeset in webkit [218937] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.28

New Tag.

10:34 AM Changeset in webkit [218936] by keith_miller@apple.com
  • 11 edits in trunk

VMTraps has some races
https://bugs.webkit.org/show_bug.cgi?id=173941

Reviewed by Michael Saboff.

Source/JavaScriptCore:

This patch refactors much of the VMTraps API.

On the message sending side:

1) No longer uses the Yarr JIT check to determine if we are in
RegExp code. That was unsound because RegExp JIT code can be run
on compilation threads. Instead it looks at the current frame's
code block slot and checks if it is valid, which is the same as
what it did for JIT code previously.

2) Only have one signal sender thread, previously, there could be
many at once, which caused some data races. Additionally, the
signal sender thread is an automatic thread so it will deallocate
itself when not in use.

On the VMTraps breakpoint side:

1) We now have a true mapping of if we hit a breakpoint instead of
a JIT assertion. So the exception handler won't eat JIT assertions
anymore.

2) It jettisons all CodeBlocks that have VMTraps breakpoints on
them instead of every CodeBlock on the stack. This both prevents
us from hitting stale VMTraps breakpoints and also doesn't OSR
codeblocks that otherwise don't need to be jettisoned.

3) The old exception handler could theoretically fail for a couple
of reasons then resume execution with a clobbered instruction
set. This patch will kill the program if the exception handler
would fail.

This patch also refactors some of the jsc.cpp functions to take the
CommandLine options object instead of individual options. Also, there
is a new command line option that makes exceptions due to watchdog
timeouts an acceptable result.

  • API/tests/testapi.c:

(main):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::installVMTrapBreakpoints):

  • dfg/DFGCommonData.cpp:

(JSC::DFG::pcCodeBlockMap):
(JSC::DFG::CommonData::invalidate):
(JSC::DFG::CommonData::~CommonData):
(JSC::DFG::CommonData::installVMTrapBreakpoints):
(JSC::DFG::codeBlockForVMTrapPC):

  • dfg/DFGCommonData.h:
  • jsc.cpp:

(functionDollarAgentStart):
(checkUncaughtException):
(checkException):
(runWithOptions):
(printUsageStatement):
(CommandLine::parseArguments):
(jscmain):
(runWithScripts): Deleted.

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):

  • runtime/VMTraps.cpp:

(JSC::sanitizedTopCallFrame):
(JSC::VMTraps::tryInstallTrapBreakpoints):
(JSC::VMTraps::willDestroyVM):
(JSC::VMTraps::fireTrap):
(JSC::VMTraps::handleTraps):
(JSC::VMTraps::VMTraps):
(JSC::VMTraps::~VMTraps):
(JSC::findActiveVMAndStackBounds): Deleted.
(JSC::installSignalHandler): Deleted.
(JSC::VMTraps::addSignalSender): Deleted.
(JSC::VMTraps::removeSignalSender): Deleted.
(JSC::VMTraps::SignalSender::willDestroyVM): Deleted.
(JSC::VMTraps::SignalSender::send): Deleted.

  • runtime/VMTraps.h:

(JSC::VMTraps::~VMTraps): Deleted.
(JSC::VMTraps::SignalSender::SignalSender): Deleted.

Tools:

Add new testing mode for testing the Watchdog with our stress
tests.

  • Scripts/run-jsc-stress-tests:
10:21 AM Changeset in webkit [218935] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.28

Delete tag.

10:12 AM Changeset in webkit [218934] by jmarcell@apple.com
  • 1 copy in branches/safari-604.1.28-branch

New Branch.

10:01 AM Changeset in webkit [218933] by jmarcell@apple.com
  • 1 delete in tags/Safari-604.1.28.1

Delete tag.

9:47 AM Changeset in webkit [218932] by Brent Fulgham
  • 2 edits in trunk/Source/WebCore

Unreviewed Apple CMake build after r218901

I did not add 'cocoa/FileMonitorCocoa.mm' to the PlatformMac.cmake file as part of r218901.):

  • PlatformMac.cmake:
9:44 AM Changeset in webkit [218931] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.28.1

New tag.

9:42 AM Changeset in webkit [218930] by jmarcell@apple.com
  • 7 edits in tags/Safari-604.1.28/Source

Versioning.

9:30 AM Changeset in webkit [218929] by jmarcell@apple.com
  • 15 edits in tags/Safari-604.1.28

rdar://problem/32913370

9:25 AM Changeset in webkit [218928] by fred.wang@free.fr
  • 3 edits in trunk/Source/WebCore

Small improvement of calls to RenderLayerBacking members
https://bugs.webkit.org/show_bug.cgi?id=173969

Patch by Frederic Wang <fwang@igalia.com> on 2017-06-29
Reviewed by Simon Fraser.

No new tests, behavior unchanged.

  • page/FrameView.cpp:

(WebCore::FrameView::tiledBacking): Access the member with RenderLayerBacking::tiledBacking.
(WebCore::FrameView::updateTilesForExtendedBackgroundMode): Ditto.

  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::usesCompositedScrolling): Use RenderLayerBacking::hasScrollingLayer as
it better matches the intention of the check here.

9:24 AM Changeset in webkit [218927] by jmarcell@apple.com
  • 1 copy in tags/Safari-604.1.28

Tag Safari-604.1.28.

9:19 AM Changeset in webkit [218926] by commit-queue@webkit.org
  • 8 edits in trunk

[Readable Streams API] Fix ReadableStream "strategy" argument handling
https://bugs.webkit.org/show_bug.cgi?id=172716

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2017-06-29
Reviewed by Xabier Rodriguez-Calvar.

LayoutTests/imported/w3c:

Updated expectations.

  • web-platform-tests/streams/readable-byte-streams/general-expected.txt: Updated.
  • web-platform-tests/streams/readable-byte-streams/general.dedicatedworker-expected.txt: Updated.

Source/WebCore:

Aligned default strategy parameter with spec, as defined in [1].

[1] https://streams.spec.whatwg.org/#rs-constructor

Added new tests and updated some existing ones based on the newly
expected behavior. Also updated expectations for WPT streams tests.

  • Modules/streams/ReadableStream.js:

(initializeReadableStream): Fixed initialization of strategy.

LayoutTests:

Added new tests and updated some existing ones based on the newly
expected behavior.

  • streams/readable-byte-stream-controller-expected.txt: Updated.
  • streams/readable-byte-stream-controller.js: Updated.
9:10 AM Changeset in webkit [218925] by Antti Koivisto
  • 4 edits
    2 adds in trunk

Source/WebCore:
REGRESSION(r215347): NAS4Free Pop-down menus fail to appear
https://bugs.webkit.org/show_bug.cgi?id=173967
<rdar://problem/32690114>

Reviewed by Andreas Kling.

Menus on this configuration page operate by mutating visibility. We fail to trigger required
compositing updates when visibility changes on non-composited layer. Visibility of a non-composited
descendant may affect geometry of the composited ancestor layer.

Test: compositing/backing/non-composited-visibility-change.html

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::layerStyleChanged):
(WebCore::RenderLayerCompositor::needsCompositingUpdateForStyleChangeOnNonCompositedLayer): Added.

Trigger compositing update for non-composited layers on visibility change.
Factor tests into function.

  • rendering/RenderLayerCompositor.h:

LayoutTests:
NAS4Free Pop-down menus take 3 seconds to appear
https://bugs.webkit.org/show_bug.cgi?id=173967
<rdar://problem/32690114>

Reviewed by Andreas Kling.

  • compositing/backing/non-composited-visibility-change-expected.html: Added.
  • compositing/backing/non-composited-visibility-change.html: Added.
9:09 AM Changeset in webkit [218924] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

Replace staging-prefixed UIKit drag and drop delegate methods with their public SDK versions
https://bugs.webkit.org/show_bug.cgi?id=173959

Reviewed by Sam Weinig.

Remove references to _api_-prefixed UIDragInteractionDelegate and UIDropInteractionDelegate methods,
and replace them with their counterparts in the public SDK.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dragInteraction:previewForLiftingItem:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidUpdate:]):
(-[WKContentView _simulateDataInteractionEntered:]):
(-[WKContentView _simulateDataInteractionUpdated:]):
(-[WKContentView _simulateDataInteractionSessionDidEnd:]):
(-[WKContentView _api_dragInteraction:previewForLiftingItem:session:]): Deleted.
(-[WKContentView _api_dragInteraction:session:didEndWithOperation:]): Deleted.
(-[WKContentView _api_dragInteraction:item:willAnimateCancelWithAnimator:]): Deleted.
(-[WKContentView _api_dropInteraction:sessionDidEnter:]): Deleted.
(-[WKContentView _api_dropInteraction:sessionDidUpdate:]): Deleted.

5:09 AM Changeset in webkit [218923] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit2

Unreviewed. Fix GTK+ unit tests crashing after r218922.

We need to check if icon database exists and is open now on dispose and API entry points.

  • UIProcess/API/glib/WebKitFaviconDatabase.cpp:

(webkitFaviconDatabaseDispose):
(webkit_favicon_database_get_favicon_uri):
(webkit_favicon_database_clear):

3:00 AM Changeset in webkit [218922] by Carlos Garcia Campos
  • 10 edits
    1 copy
    3 adds in trunk

[GTK][WPE] Implement API::IconLoadingClient and rework WebKitFaviconDatabase to use IconDatabase directly
https://bugs.webkit.org/show_bug.cgi?id=173877

Reviewed by Brady Eidson.

Source/WebKit2:

This way IconDatabase and its related classes can be removed from WebCore, as well as the WebKit2 implementation
and C API. For now I've copied IconDatabase from WebCore to WebKit2 under the glib API directory, adding the
related classes as private inside IconDatabase, and removing some methods that are not used by the GLib API.

  • PlatformGTK.cmake:
  • UIProcess/API/glib/IconDatabase.cpp: Added.

(WebKit::urlForLogging):
(WebKit::defaultClient):
(WebKit::IconDatabase::IconRecord::IconRecord):
(WebKit::IconDatabase::IconRecord::~IconRecord):
(WebKit::IconDatabase::IconRecord::image):
(WebKit::IconDatabase::IconRecord::setImageData):
(WebKit::IconDatabase::IconRecord::loadImageFromResource):
(WebKit::IconDatabase::IconRecord::imageDataStatus):
(WebKit::IconDatabase::IconRecord::snapshot):
(WebKit::IconDatabase::PageURLRecord::PageURLRecord):
(WebKit::IconDatabase::PageURLRecord::~PageURLRecord):
(WebKit::IconDatabase::PageURLRecord::setIconRecord):
(WebKit::IconDatabase::PageURLRecord::snapshot):
(WebKit::IconDatabase::setClient):
(WebKit::IconDatabase::open):
(WebKit::IconDatabase::close):
(WebKit::IconDatabase::removeAllIcons):
(WebKit::documentCanHaveIcon):
(WebKit::IconDatabase::synchronousIconForPageURL):
(WebKit::IconDatabase::synchronousIconURLForPageURL):
(WebKit::IconDatabase::retainIconForPageURL):
(WebKit::IconDatabase::performRetainIconForPageURL):
(WebKit::IconDatabase::releaseIconForPageURL):
(WebKit::IconDatabase::performReleaseIconForPageURL):
(WebKit::IconDatabase::setIconDataForIconURL):
(WebKit::IconDatabase::setIconURLForPageURL):
(WebKit::IconDatabase::synchronousLoadDecisionForIconURL):
(WebKit::IconDatabase::synchronousIconDataKnownForIconURL):
(WebKit::IconDatabase::setEnabled):
(WebKit::IconDatabase::isEnabled):
(WebKit::IconDatabase::setPrivateBrowsingEnabled):
(WebKit::IconDatabase::isPrivateBrowsingEnabled):
(WebKit::IconDatabase::delayDatabaseCleanup):
(WebKit::IconDatabase::allowDatabaseCleanup):
(WebKit::IconDatabase::checkIntegrityBeforeOpening):
(WebKit::IconDatabase::IconDatabase):
(WebKit::IconDatabase::~IconDatabase):
(WebKit::IconDatabase::wakeSyncThread):
(WebKit::IconDatabase::scheduleOrDeferSyncTimer):
(WebKit::IconDatabase::syncTimerFired):
(WebKit::IconDatabase::isOpen):
(WebKit::IconDatabase::isOpenBesidesMainThreadCallbacks):
(WebKit::IconDatabase::databasePath):
(WebKit::IconDatabase::defaultDatabaseFilename):
(WebKit::IconDatabase::getOrCreateIconRecord):
(WebKit::IconDatabase::getOrCreatePageURLRecord):
(WebKit::IconDatabase::shouldStopThreadActivity):
(WebKit::IconDatabase::iconDatabaseSyncThread):
(WebKit::databaseVersionNumber):
(WebKit::isValidDatabase):
(WebKit::createDatabaseTables):
(WebKit::IconDatabase::performOpenInitialization):
(WebKit::IconDatabase::checkIntegrity):
(WebKit::IconDatabase::performURLImport):
(WebKit::IconDatabase::syncThreadMainLoop):
(WebKit::IconDatabase::performPendingRetainAndReleaseOperations):
(WebKit::IconDatabase::readFromDatabase):
(WebKit::IconDatabase::writeToDatabase):
(WebKit::IconDatabase::pruneUnretainedIcons):
(WebKit::IconDatabase::checkForDanglingPageURLs):
(WebKit::IconDatabase::removeAllIconsOnThread):
(WebKit::IconDatabase::deleteAllPreparedStatements):
(WebKit::IconDatabase::cleanupSyncThread):
(WebKit::readySQLiteStatement):
(WebKit::IconDatabase::setIconURLForPageURLInSQLDatabase):
(WebKit::IconDatabase::setIconIDForPageURLInSQLDatabase):
(WebKit::IconDatabase::removePageURLFromSQLDatabase):
(WebKit::IconDatabase::getIconIDForIconURLFromSQLDatabase):
(WebKit::IconDatabase::addIconURLToSQLDatabase):
(WebKit::IconDatabase::getImageDataForIconURLFromSQLDatabase):
(WebKit::IconDatabase::removeIconFromSQLDatabase):
(WebKit::IconDatabase::writeIconSnapshotToSQLDatabase):
(WebKit::IconDatabase::checkClosedAfterMainThreadCallback):
(WebKit::IconDatabase::dispatchDidImportIconURLForPageURLOnMainThread):
(WebKit::IconDatabase::dispatchDidImportIconDataForPageURLOnMainThread):
(WebKit::IconDatabase::dispatchDidRemoveAllIconsOnMainThread):
(WebKit::IconDatabase::dispatchDidFinishURLImportOnMainThread):

  • UIProcess/API/glib/IconDatabase.h: Added.

(WebKit::IconDatabaseClient::didImportIconURLForPageURL):
(WebKit::IconDatabaseClient::didImportIconDataForPageURL):
(WebKit::IconDatabaseClient::didChangeIconForPageURL):
(WebKit::IconDatabaseClient::didRemoveAllIcons):
(WebKit::IconDatabaseClient::didFinishURLImport):
(WebKit::IconDatabaseClient::didClose):
(WebKit::IconDatabase::IconSnapshot::IconSnapshot):
(WebKit::IconDatabase::IconSnapshot::iconURL):
(WebKit::IconDatabase::IconSnapshot::timestamp):
(WebKit::IconDatabase::IconSnapshot::data):
(WebKit::IconDatabase::IconRecord::create):
(WebKit::IconDatabase::IconRecord::getTimestamp):
(WebKit::IconDatabase::IconRecord::setTimestamp):
(WebKit::IconDatabase::IconRecord::iconURL):
(WebKit::IconDatabase::IconRecord::retainingPageURLs):
(WebKit::IconDatabase::PageURLSnapshot::PageURLSnapshot):
(WebKit::IconDatabase::PageURLSnapshot::pageURL):
(WebKit::IconDatabase::PageURLSnapshot::iconURL):
(WebKit::IconDatabase::PageURLRecord::url):
(WebKit::IconDatabase::PageURLRecord::iconRecord):
(WebKit::IconDatabase::PageURLRecord::retain):
(WebKit::IconDatabase::PageURLRecord::release):
(WebKit::IconDatabase::PageURLRecord::retainCount):

  • UIProcess/API/glib/WebKitFaviconDatabase.cpp:

(_WebKitFaviconDatabasePrivate::~_WebKitFaviconDatabasePrivate):
(getIconSurfaceSynchronously):
(webkitFaviconDatabaseSetIconURLForPageURL):
(webkitFaviconDatabaseCreate):
(webkitFaviconDatabaseOpen):
(webkitFaviconDatabaseIsOpen):
(webkitFaviconDatabaseSetPrivateBrowsingEnabled):
(webkitFaviconDatabaseGetLoadDecisionForIcon):
(webkitFaviconDatabaseSetIconForPageURL):
(webkit_favicon_database_get_favicon):
(webkit_favicon_database_get_favicon_uri):

  • UIProcess/API/glib/WebKitFaviconDatabasePrivate.h:
  • UIProcess/API/glib/WebKitIconLoadingClient.cpp: Added.

(IconLoadingClient::IconLoadingClient):
(attachIconLoadingClientToView):

  • UIProcess/API/glib/WebKitIconLoadingClient.h: Copied from Source/WebKit2/UIProcess/API/glib/WebKitFaviconDatabasePrivate.h.
  • UIProcess/API/glib/WebKitWebContext.cpp:

(ensureFaviconDatabase):
(webkitWebContextEnableIconDatabasePrivateBrowsingIfNeeded):
(webkitWebContextDisableIconDatabasePrivateBrowsingIfNeeded):
(webkit_web_context_set_favicon_database_directory):

  • UIProcess/API/glib/WebKitWebView.cpp:

(webkitWebViewConstructed):
(webkitWebViewGetLoadDecisionForIcon):
(webkitWebViewSetIcon):

  • UIProcess/API/glib/WebKitWebViewPrivate.h:

Tools:

Update favicons unit test to ensure we wait until the database is updated in testGetFavicon() before starting
the next tests.

  • TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:

(testGetFavicon):

12:43 AM Changeset in webkit [218921] by fred.wang@free.fr
  • 5 edits in trunk

Align Document::canNavigate on the HTM5 specification
https://bugs.webkit.org/show_bug.cgi?id=173162

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

LayoutTests/imported/w3c:

Test expectation for popup navigation are updated now that the following tests pass:

  • iframe_sandbox_popups_escaping-3
  • iframe_sandbox_popups_nonescaping-3
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3-expected.txt: Update expectation to PASS.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3-expected.txt: Update expectation to PASS.

Source/WebCore:

Currently when a frame A with a sandboxed navigation flag tries and navigates another frame B
then Document::canNavigate verifies the cases where we try to navigate A's top frame (in
that case the allow-top-navigation flag is needed) or not (in that case, B must be a
descendant of A). This patch refines that a bit to check the case where B is a popup (in that
case navigation is permitted if A is the opener of B). This change aligns on the HTML5
specification and allows to pass more W3C Web Platform tests.
See https://html.spec.whatwg.org/multipage/browsers.html#allowed-to-navigate

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

imported/w3c/web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3.html

  • dom/Document.cpp:

(WebCore::Document::canNavigate): This refines the case where the document's frame has the
sandbox navigation flag set in order to handle popup navigation. New comments referring to
the HTML5 specification are also added.

Jun 28, 2017:

11:07 PM Changeset in webkit [218920] by pvollan@apple.com
  • 2 edits in trunk/LayoutTests

[Win] Update expectations for layout tests.
https://bugs.webkit.org/show_bug.cgi?id=172437

Unreviewed test gardening, update test expectations for failing tests.

  • platform/win/TestExpectations:
10:45 PM Changeset in webkit [218919] by mmaxfield@apple.com
  • 2 edits in trunk/Source/WebCore

Only apply font features for the particular type of font they are being applied to
https://bugs.webkit.org/show_bug.cgi?id=172661
<rdar://problem/31534119>
<rdar://problem/32799624>

Reviewed by Simon Fraser.

There are two types of font formats which support features: AAT and OTF. Each of them has
a different idea about what the identity of a feature is. We were specifying both types
of feature identities to Core Text; however, this is causing Core Text to get confused.
Instead, we should only apply AAT features to AAT fonts and OTF features to OTF fonts.

Test: Un-marking these tests as failure on High Sierra:

css3/font-variant-petite-caps-synthesis-coverage.html
css3/font-variant-small-caps-synthesis-coverage.html

  • platform/graphics/cocoa/FontCacheCoreText.cpp:

(WebCore::FontType::FontType):
(WebCore::preparePlatformFont):
(WebCore::variationCapabilitiesForFontDescriptor):
(WebCore::isGXVariableFont): Deleted.

10:43 PM Changeset in webkit [218918] by Chris Dumez
  • 3 edits in trunk/Source/WebCore

[ResourceLoadStatistics] Simplify PrevalentResourceTelemetry struct
https://bugs.webkit.org/show_bug.cgi?id=173953

Reviewed by Sam Weinig.

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):

  • loader/ResourceLoadStatisticsStore.h:

(WebCore::PrevalentResourceTelemetry::PrevalentResourceTelemetry): Deleted.

10:25 PM WebIDLToDo edited by sam@webkit.org
(diff)
9:37 PM Changeset in webkit [218917] by timothy_horton@apple.com
  • 4 edits
    1 add in trunk

MobileSafari was constantly using 10-15% CPU viewing a PDF
https://bugs.webkit.org/show_bug.cgi?id=173944
<rdar://problem/33039910>

Reviewed by Simon Fraser.

Source/WebKit2:

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _doAfterNextStablePresentationUpdate:]):
(-[WKWebView _doAfterNextPresentationUpdate:]):
(-[WKWebView _doAfterNextPresentationUpdateWithoutWaitingForPainting:]):
Bail early and just dispatch_async the completion block if we are using a custom
content view; these methods are very specific to the implementation of WKContentView
and don't make sense with custom content views.

doAfterNextStablePresentationUpdate is particularly egregious because, since
we will never call the stable update callbacks (because we bail from didCommitLayerTree
if we aren't using WKContentView), it will keep calling doAfterNextPresentationUpdate
over and over again.

Tools:

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

Add a test that we ever call the stable presentation update callback
when we have a WKPDFView up, instead of infinitely looping.

9:04 PM Changeset in webkit [218916] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][macOS][iOS] Don't request microphone access for clients that don't need it.
https://bugs.webkit.org/show_bug.cgi?id=173948
<rdar://problem/32103275>

Reviewed by Eric Carlson.

Don't bother requesting a sandbox extension to access the microphone for any clients
on the Cocoa platform that are not Safari. Other clients don't have the necessary
system entitlements, and always fail leading to annoying SandboxViolation reports.

  • UIProcess/Cocoa/WebProcessPoolCocoa.mm:

(WebKit::WebProcessPool::platformInitializeWebProcess):

8:58 PM Changeset in webkit [218915] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebCore

Crash in WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange
https://bugs.webkit.org/show_bug.cgi?id=173958

Reviewed by Simon Fraser.

The crashed is most likely caused by updateLayersAfterAncestorChange calling [CALayer setPosition]
with a CGPoint which contains the x coordinate or the y coordinate of NaN.

Simon and I inpected the code but we couldn't figure out how we get there. Detect this case and bail out.
Also log the relevant values and debug assert when this condition is hit to help identifying the root cause.

  • page/scrolling/mac/ScrollingTreeFixedNode.mm:

(WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):

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

ResourceLoadObserver clean up
https://bugs.webkit.org/show_bug.cgi?id=173955

Reviewed by Sam Weinig and Brent Fulgham.

ResourceLoadObserver clean up: Modernize code a bit and get rid of unused variables.

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::clearInMemoryStore):
(WebCore::ResourceLoadObserver::clearInMemoryAndPersistentStore):
(WebCore::ResourceLoadObserver::shouldLog):
(WebCore::ResourceLoadObserver::logFrameNavigation):
(WebCore::ResourceLoadObserver::logSubresourceLoading):
(WebCore::ResourceLoadObserver::logWebSocketLoading):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::logUserInteraction):
(WebCore::ResourceLoadObserver::setSubframeUnderTopFrameOrigin):
(WebCore::ResourceLoadObserver::setSubresourceUnderTopFrameOrigin):
(WebCore::ResourceLoadObserver::setSubresourceUniqueRedirectTo):
(WebCore::ResourceLoadObserver::fireDataModificationHandler):
(WebCore::ResourceLoadObserver::fireShouldPartitionCookiesHandler):
(WebCore::ResourceLoadObserver::primaryDomain):
(WebCore::ResourceLoadObserver::statisticsForOrigin):

8:54 PM Changeset in webkit [218913] by Alan Bujtas
  • 8 edits in trunk/Source

Move RenderEmbeddedObject::isReplacementObscured to HTMLPlugInElement
https://bugs.webkit.org/show_bug.cgi?id=173802
<rdar://problem/32884389>

Reviewed by Simon Fraser.

Source/WebCore:

Hittesting could potentially destroy "this" renderer so calling it inside RenderEmbeddedObject
could leave the caller with a stale pointer.
This patch protects the plugin element from getting destroyed and checks if the renderer got
deleted during the hittest to avoid nullptr dereference.

Speculative fix.

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::isReplacementObscured):

  • html/HTMLPlugInElement.h:
  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::isReplacementObscured): Deleted.

  • rendering/RenderEmbeddedObject.h:
  • testing/Internals.cpp:

(WebCore::Internals::isPluginUnavailabilityIndicatorObscured):

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::createPlugin):

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

Avoid copying statistics in ResourceLoadStatisticsStore::readDataFromDecoder()
https://bugs.webkit.org/show_bug.cgi?id=173951

Reviewed by Ryosuke Niwa.

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):

7:56 PM Changeset in webkit [218911] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit2

REGRESSION (r218842): com.apple.WebKit crash in WebKit::ProcessLauncher::launchProcess
https://bugs.webkit.org/show_bug.cgi?id=173950

Reviewed by Chris Dumez.

Added a null check as m_xpcConnection could be nullptr here in the case platformInvalidate had been called.

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::launchProcess):

7:54 PM Changeset in webkit [218910] by rniwa@webkit.org
  • 13 edits
    2 adds in trunk/Source/WebCore

Safari's Speedometer score massively regresses when accessibility is enabled
https://bugs.webkit.org/show_bug.cgi?id=173912

Reviewed by Chris Fleizach.

The bug was caused by HTMLTextFormControlElement::setInnerTextValue triggering a synchronous layout
via constructing VisiblePosition when the accessibility tree is present.

Added AXObjectCache::postTextReplacementNotificationForTextControl which avoids the construction of
VisiblePosition and other means of triggering a synchronous layout. This patch also fixes a subtle bug
that HTMLTextFormControlElement was creating TextMarkerData with axID set to that of the text control
element instead of the root editable element inside its shadow tree even though the typing command uses
axID of the root editable element. While I couldn't find any user-visible behavioral change from this
code change, new code is more self-consistent.

Also added LayoutDisallowedScope which asserts that no synchronous layout happens in setInnerTextValue
so that we don't introduce a new performance regression like this in the future.

No new tests. Existing tests in accessibility directory covers this.

  • CMakeLists.txt: Added LayoutDisallowedScope.cpp.
  • WebCore.xcodeproj/project.pbxproj: Ditto.
  • accessibility/AXObjectCache.cpp:

(WebCore::AXObjectCache::postTextReplacementNotificationForTextControl): Added.
(WebCore::AXObjectCache::textMarkerDataForVisiblePosition): Modernized. Returns optional<TextMarkerData>
instead of taking TextMarkerData as an out-argument, and returning with axID of 0.
(WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl): Added. This specialized version
constructs TextMarkerData for the first position inside the editable region in a text control without
triggering a synchronous layout.

  • accessibility/AXObjectCache.h:

(WebCore::TextMarkerData): Initialize each member automatically.
(WebCore::AXObjectCache::postTextReplacementNotificationForTextControl):

  • accessibility/ios/AXObjectCacheIOS.mm:

(WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): Added.

  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(+[WebAccessibilityTextMarker textMarkerWithVisiblePosition:cache:]):

  • accessibility/mac/AXObjectCacheMac.mm:

(WebCore::addTextMarkerFor): Extracted from textReplacementChangeDictionary. Added a new variant which
takes a text form control instead.
(WebCore::textReplacementChangeDictionary): Templatized this function to either take VisiblePosition
and call textMarkerForVisiblePosition or take HTMLTextFormControlElement and call
textMarkerForFirstPositionInTextControl.
(WebCore::postUserInfoForChanges): Extracted from postTextReplacementPlatformNotification.
(WebCore::AXObjectCache::postTextReplacementPlatformNotification):
(WebCore::AXObjectCache::postTextReplacementPlatformNotificationForTextControl): Added.

  • accessibility/mac/WebAccessibilityObjectWrapperBase.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.h:
  • accessibility/mac/WebAccessibilityObjectWrapperMac.mm:

(textMarkerForVisiblePosition):
(-[WebAccessibilityObjectWrapper textMarkerForFirstPositionInTextControl:]): Added.

  • dom/Document.cpp:

(WebCore::Document::updateLayout): Assert that LayoutDisallowedScope is not in the stack frame.

  • html/HTMLTextFormControlElement.cpp:

(WebCore::HTMLTextFormControlElement::setInnerTextValue): Call postTextReplacementNotificationForTextControl
to avoid triggering a synchronous layout. Also create LayoutDisallowedScope to avoid a similar performance
regression from being introduced in the future in this function. Finally, made innerText a RefPtr for extra
safety since we're using it after updating the DOM tree.

  • rendering/LayoutDisallowedScope.cpp: Added.
  • rendering/LayoutDisallowedScope.h: Added.

(WebCore::LayoutDisallowedScope::LayoutDisallowedScope):
(WebCore::LayoutDisallowedScope::~LayoutDisallowedScope):
(WebCore::LayoutDisallowedScope::isLayoutAllowed):

7:46 PM Changeset in webkit [218909] by mmaxfield@apple.com
  • 5 edits
    3 adds in trunk

[iOS] Cannot italicize or bold text rendered with text styles
https://bugs.webkit.org/show_bug.cgi?id=173634

Reviewed by Darin Adler.

Source/WebCore:

r218616 enabled the new cascade list codepath for "system-ui," but didn't do it for the named
text styles (like "font: -apple-system-tall-body;"). This new codepath is better because it
correctly specifies weights and italics (using kCTFontWeightTrait and kCTFontSlantTrait) instead
of using symbolic traits, and because it correctly handles fonts in the Core Text fallback chain.
This patch migrates the named text styles to this new codepath.

Test: fast/text/ipad/bold-tall-body-text-style.html

  • platform/graphics/cocoa/FontDescriptionCocoa.cpp:

(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParameters):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::isHashTableDeletedValue):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::operator==):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::hash):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::hash):
(WebCore::SystemFontDatabase::CoreTextCascadeListParameters::CoreTextCascadeListParametersHash::equal):
(WebCore::SystemFontDatabase::systemFontCascadeList):
(WebCore::convertArray):
(WebCore::convertArray):
(WebCore::makeNeverDestroyed):
(WebCore::isUIFontTextStyle):
(WebCore::systemFontParameters):
(WebCore::FontCascadeDescription::effectiveFamilyCount):
(WebCore::FontCascadeDescription::effectiveFamilyAt):
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::hash): Deleted.
(WebCore::SystemFontDatabase::CoreTextCascadeListParametersHash::equal): Deleted.

  • platform/graphics/ios/FontCacheIOS.mm:

(WebCore::platformFontWithFamilySpecialCase):

LayoutTests:

  • fast/text/ipad/bold-tall-body-text-style-expected-mismatch.html: Added.
  • fast/text/ipad/bold-tall-body-text-style.html: Added.
6:43 PM WebIDLToDo edited by sam@webkit.org
More WebIDL todos (diff)
6:34 PM Changeset in webkit [218908] by Devin Rousso
  • 17 edits
    2 adds in trunk

Web Inspector: Instrument active pixel memory used by canvases
https://bugs.webkit.org/show_bug.cgi?id=173087
<rdar://problem/32719261>

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

  • inspector/protocol/Canvas.json:
    • Add optional memoryCost attribute to the Canvas type.
    • Add canvasMemoryChanged event that is dispatched when the memoryCost of a canvas changes.

Source/WebCore:

Test: inspector/canvas/memory.html

  • html/HTMLCanvasElement.cpp:

(WebCore::HTMLCanvasElement::setImageBuffer):

  • inspector/InspectorCanvasAgent.h:
  • inspector/InspectorCanvasAgent.cpp:

(WebCore::InspectorCanvasAgent::didChangeCanvasMemory):
(WebCore::InspectorCanvasAgent::buildObjectForCanvas):

  • inspector/InspectorInstrumentation.h:
  • inspector/InspectorInstrumentation.cpp:

(WebCore::InspectorInstrumentation::didChangeCanvasMemory):
(WebCore::InspectorInstrumentation::didChangeCanvasMemoryImpl):

Source/WebInspectorUI:

  • .eslintrc:
  • UserInterface/Controllers/CanvasManager.js:

(WebInspector.CanvasManager.prototype.canvasMemoryChanged):

  • UserInterface/Models/Canvas.js:

(WebInspector.Canvas.fromPayload):
(WebInspector.Canvas.prototype.get memoryCost):
(WebInspector.Canvas.prototype.set memoryCost):

  • UserInterface/Protocol/CanvasObserver.js:

(WebInspector.CanvasObserver.prototype.canvasMemoryChanged):

  • UserInterface/Views/CanvasDetailsSidebarPanel.js:

(WebInspector.CanvasDetailsSidebarPanel.prototype.initialLayout):
(WebInspector.CanvasDetailsSidebarPanel.prototype._refreshIdentitySection):
(WebInspector.CanvasDetailsSidebarPanel.prototype._formatMemoryRow):
(WebInspector.CanvasDetailsSidebarPanel.prototype._canvasMemoryChanged):

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

(Number.bytesToString.value):
Add support for gigabyte numbers.

LayoutTests:

  • inspector/canvas/memory-expected.txt: Added.
  • inspector/canvas/memory.html: Added.
6:28 PM WebIDLToDo edited by sam@webkit.org
Add more todos (diff)
6:11 PM Changeset in webkit [218907] by achristensen@apple.com
  • 4 edits in trunk

Prevent displaying URLs with small capital letters
https://bugs.webkit.org/show_bug.cgi?id=173949
<rdar://problem/32952058>

Reviewed by Brent Fulgham.

Source/WebCore:

Covered by new API tests.

  • platform/mac/WebCoreNSURLExtras.mm:

(WebCore::isLookalikeCharacter):

Tools:

  • TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:

(TestWebKitAPI::TEST):

5:51 PM Changeset in webkit [218906] by Brent Fulgham
  • 2 edits in trunk/Tools

Unreviewed test fix.

Disable the file monitor tests on iOS because the 'system' API is unavailable on that platform.

  • TestWebKitAPI/Tests/WebCore/FileMonitor.cpp:
5:34 PM WebIDLToDo edited by sam@webkit.org
Update WebIDL todos to note complete tasks (diff)
5:21 PM Changeset in webkit [218905] by Wenson Hsieh
  • 1 edit in trunk/Source/WebKit2/ChangeLog

Unreviewed, fix a bad ChangeLog entry in r218899.

Remove a leading space from the first line of the ChangeLog entry.

5:08 PM Changeset in webkit [218904] by sbarati@apple.com
  • 2 edits in trunk/Websites/webkit.org

Add a Object rest/spread test to the experimental features test page
https://bugs.webkit.org/show_bug.cgi?id=173947

Rubber stamped by Dean Jackson.

  • experimental-features.html:
4:24 PM Changeset in webkit [218903] by commit-queue@webkit.org
  • 15 edits in trunk/Source

Support PeerConnectionStates::BundlePolicy::MaxBundle when setting rtc configuration
https://bugs.webkit.org/show_bug.cgi?id=169389

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-28
Reviewed by Alex Christensen.

Source/WebCore:

Covered by manual testing (appr.tc and https://youennf.github.io/webrtc-tests/src/content/peerconnection/trickle-ice/).
Previously, we were creating a libwebrtc peer connection and then setting its configuration.
libwebrtc does not like the configuration to be changed and may refuse to set the configuration.
Instead of doing that, we are now creating the libwebrtc peer connection with the provided configuration.

  • Modules/mediastream/MediaEndpointPeerConnection.cpp:

(WebCore::MediaEndpointPeerConnection::setConfiguration):

  • Modules/mediastream/MediaEndpointPeerConnection.h:
  • Modules/mediastream/PeerConnectionBackend.h:
  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::initializeWith):
(WebCore::iceServersFromConfiguration):
(WebCore::RTCPeerConnection::initializeConfiguration):
(WebCore::RTCPeerConnection::setConfiguration):

  • Modules/mediastream/RTCPeerConnection.h:
  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::LibWebRTCMediaEndpoint):
(WebCore::LibWebRTCMediaEndpoint::setConfiguration):
(WebCore::LibWebRTCMediaEndpoint::stop):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:

(WebCore::configurationFromMediaEndpointConfiguration):
(WebCore::LibWebRTCPeerConnectionBackend::setConfiguration):

  • Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h:
  • platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:

(WebCore::createActualPeerConnection):
(WebCore::LibWebRTCProvider::createPeerConnection):

  • platform/mediastream/libwebrtc/LibWebRTCProvider.h:

Source/WebKit2:

Updating according new WebCore LIbWebRTCProvider API.

  • WebProcess/Network/webrtc/LibWebRTCProvider.cpp:

(WebKit::LibWebRTCProvider::createPeerConnection):

  • WebProcess/Network/webrtc/LibWebRTCProvider.h:
4:22 PM Changeset in webkit [218902] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

[iOS] Allow WKWebView clients to play audio in the background
https://bugs.webkit.org/show_bug.cgi?id=173932
<rdar://problem/32851547>

Reviewed by Ryosuke Niwa.

Allow WKWebView clients (such as MobileSafari) to play audio in the background
by taking a process assertion whenever a WebPage is audible.

  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::updateThrottleState):

4:21 PM Changeset in webkit [218901] by Brent Fulgham
  • 17 edits
    5 adds in trunk

Teach ResourceLoadStatistics to recognize changes in the file system
https://bugs.webkit.org/show_bug.cgi?id=173800
<rdar://problem/32937842>

Reviewed by Chris Dumez.

Source/WebCore:

We want to support the case where multiple UI processes choose to share the same
statistics file. To support this, update the ResourceLoadStatistics logic to be aware
that the statistics data file might change underneath it, and to take appropriate
action when it does.

  • WebCore.xcodeproj/project.pbxproj: Update for new sources.
  • WebCore/CMakeLists.txt: Update for new FileMonitor source file.
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::clearInMemoryAndPersistent): Use the new deletion
handler for the data file instead of writing out an empty file.
(WebCore::ResourceLoadStatisticsStore::setDeletePersistentStoreCallback): Added.

  • loader/ResourceLoadStatisticsStore.h:
  • platform/FileMonitor.cpp: Added.

(WebCore::FileMonitor::create):
(WebCore::FileMonitor::FileMonitor): Register handlers and begin monitoring file.
(WebCore::FileMonitor::~FileMonitor): Stop any active file monitoring.
(WebCore::FileMonitor::startMonitoringPath): Stub implementation.
(WebCore::FileMonitor::stopMonitoring): Ditto.

  • platform/FileMonitor.h: Added.
  • platform/FileSystem.h: Export files needed by WebKit2. Add support for O_EVTONLY

Darwin file handles.

  • platform/Logging.h: Add 'ResourceLoadStatistics' category.
  • platform/cocoa/FileMonitorCocoa.mm: Added.

(WebCore::FileMonitor::startMonitoringPath): Create a new VNODE type dispatch_source
to receive notifications when the specified file changes.
(WebCore::FileMonitor::stopMonitoring): Cancel the dispatch_source when we are done
monitoring the file.

  • platform/posix/FileSystemPOSIX.cpp: Update 'openFile' to understand the O_EVTONLY

mode of file handles (Darwin-only).

Source/WebKit2:

We want to support the case where multiple UI processes choose to share the same
statistics file. To support this, update the ResourceLoadStatistics logic to be aware
that the statistics data file might change underneath it, and to take appropriate
action when it does.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::setResourceLoadStatisticsEnabled): When we enable
the statistics, read in the data and then watch for changes.
(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver): Add a
'delete data' handler to remove the file on disk, not just write an empty store.
(WebKit::WebResourceLoadStatisticsStore::readDataFromDiskIfNeeded): Use ASCIILiteral.
(WebKit::WebResourceLoadStatisticsStore::refreshFromDisk): Convenience function.
(WebKit::WebResourceLoadStatisticsStore::writeStoreToDisk): Sync with any on-disk
storage before writing out.
(WebKit::openAndLockFile): Convenience function.
(WebKit::closeAndUnlockFile): Ditto.
(WebKit::WebResourceLoadStatisticsStore::writeEncoderToDisk): Revise to lock file (on
platforms that support it) before writing to disk.
(WebKit::WebResourceLoadStatisticsStore::deleteStoreFromDisk): Added convenience function.
(WebKit::WebResourceLoadStatisticsStore::clearInMemoryData): Ditto.
(WebKit::WebResourceLoadStatisticsStore::startMonitoringStatisticsStorage): Create a
file system monitor to watch for file changes.
(WebKit::WebResourceLoadStatisticsStore::syncWithExistingStatisticsStorageIfNeeded): Added
convenience function.
(WebKit::WebResourceLoadStatisticsStore::createDecoderFromDisk): Revise to read data
directly so we can control file locking.

  • UIProcess/WebResourceLoadStatisticsStore.h:

2017-06-28 Wenson Hsieh <Wenson Hsieh>

Followup to r218885: adjust for further UIKit SPI changes
https://bugs.webkit.org/show_bug.cgi?id=173927
<rdar://problem/33020792>

Reviewed by Tim Horton.

On ToT, UIKit now invokes -_dragInteraction:item:shouldDelaySetDownAnimationWithCompletion: before the
completion block of -dragInteraction:willAnimateLiftWithAnimator:session: is called. This means we now need to
store the completion block in -shouldDelaySetDownAnimationWithCompletion: and wait until the UIDragAnimating
completion block in -willAnimateCancelWithAnimator: before invoking it.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanUpDragSourceSessionState]):

Ensure that the set-down completion block is invoked when a drag session ends (e.g., if the web content process
crashes).

(-[WKContentView _dragInteraction:item:shouldDelaySetDownAnimationWithCompletion:]):
(-[WKContentView _api_dragInteraction:item:willAnimateCancelWithAnimator:]):

Source/WTF:

  • wtf/DispatchPtr.h: Added (moved from WebKit2)
  • wtf/Platform.h: Make sure USE_FILE_LOCK is enabled.

Tools:

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: Added.

(TestWebKitAPI::FileMonitorTest::tempFilePath):
(TestWebKitAPI::handleFileModification):
(TestWebKitAPI::handleFileDeletion):
(TestWebKitAPI::resetTestState):
(TestWebKitAPI::TEST_F):

4:04 PM Changeset in webkit [218900] by commit-queue@webkit.org
  • 4 edits in trunk

[Win] Build JSCOnly on Windows with clang-cl
https://bugs.webkit.org/show_bug.cgi?id=173889

Patch by Stephan Szabo <stephan.szabo@am.sony.com> on 2017-06-28
Reviewed by Konstantin Tokarev.

  • CMakeLists.txt:
  • Source/cmake/OptionsCommon.cmake:
  • Source/cmake/OptionsMSVC.cmake:
3:58 PM Changeset in webkit [218899] by Wenson Hsieh
  • 3 edits in trunk/Source/WebKit2

2017-06-28 Wenson Hsieh <Wenson Hsieh>

Followup to r218885: adjust for further UIKit SPI changes
https://bugs.webkit.org/show_bug.cgi?id=173927
<rdar://problem/33020792>

Reviewed by Tim Horton.

On ToT, UIKit now invokes -_dragInteraction:item:shouldDelaySetDownAnimationWithCompletion: before the
completion block of -dragInteraction:willAnimateLiftWithAnimator:session: is called. This means we now need to
store the completion block in -shouldDelaySetDownAnimationWithCompletion: and wait until the UIDragAnimating
completion block in -willAnimateCancelWithAnimator: before invoking it.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView cleanUpDragSourceSessionState]):

Ensure that the set-down completion block is invoked when a drag session ends (e.g., if the web content process
crashes).

(-[WKContentView _dragInteraction:item:shouldDelaySetDownAnimationWithCompletion:]):
(-[WKContentView _api_dragInteraction:item:willAnimateCancelWithAnimator:]):

3:53 PM Changeset in webkit [218898] by Joseph Pecoraro
  • 11 edits in trunk/Source/JavaScriptCore

Web Inspector: Cleanup Protocol JSON files
https://bugs.webkit.org/show_bug.cgi?id=173934

Reviewed by Matt Baker.

  • inspector/protocol/ApplicationCache.json:
  • inspector/protocol/CSS.json:
  • inspector/protocol/Console.json:
  • inspector/protocol/DOM.json:
  • inspector/protocol/DOMDebugger.json:
  • inspector/protocol/Debugger.json:
  • inspector/protocol/LayerTree.json:
  • inspector/protocol/Network.json:
  • inspector/protocol/Page.json:
  • inspector/protocol/Runtime.json:

Be more consistent about placement of description property.

3:53 PM Changeset in webkit [218897] by Joseph Pecoraro
  • 16 edits in trunk/Source

Web Inspector: Remove unused Inspector domain events
https://bugs.webkit.org/show_bug.cgi?id=173905

Reviewed by Matt Baker.

Source/JavaScriptCore:

  • inspector/protocol/Inspector.json:

Source/WebInspectorUI:

  • UserInterface/Protocol/InspectorObserver.js:

(WebInspector.InspectorObserver.prototype.detached): Deleted.

  • UserInterface/Protocol/Legacy/10.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/10.3/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/7.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/8.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.0/InspectorBackendCommands.js:
  • UserInterface/Protocol/Legacy/9.3/InspectorBackendCommands.js:
  • Versions/Inspector-iOS-10.0.json:
  • Versions/Inspector-iOS-10.3.json:
  • Versions/Inspector-iOS-7.0.json:
  • Versions/Inspector-iOS-8.0.json:
  • Versions/Inspector-iOS-9.0.json:
  • Versions/Inspector-iOS-9.3.json:

Remove from legacy backends as well since they did not send it.

3:40 PM Changeset in webkit [218896] by beidson@apple.com
  • 5 edits in trunk

DocumentLoader should always notify the client if there are pending icon loads when the load is stopped.
https://bugs.webkit.org/show_bug.cgi?id=173874

Reviewed by Alex Christensen.

Source/WebCore:

Covered by API tests.

Patch started by Carlos Garcia Campos, finished by me.

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::stopLoading): Make all of the callbacks for cancelled IconLoaders.
(WebCore::DocumentLoader::didGetLoadDecisionForIcon): Make the callback even if there's no IconLoader.
(WebCore::DocumentLoader::finishedLoadingIcon):
(WebCore::DocumentLoader::notifyFinishedLoadingIcon):

  • loader/DocumentLoader.h:

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/IconLoadingDelegate.mm:
3:27 PM Changeset in webkit [218895] by don.olmstead@sony.com
  • 2 edits in trunk/Tools

Unreviewed, adding Don Olmstead to contributors.json

  • Scripts/webkitpy/common/config/contributors.json:
3:06 PM Changeset in webkit [218894] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

dropInteraction:sessionDidEnd: invokes dragEnded with a UIDragOperation rather than a WebCore::DragOperation
https://bugs.webkit.org/show_bug.cgi?id=173935

Reviewed by Tim Horton.

Replaces a use of UIDragOperationNone with DragOperationNone.
Currently, there is no change in behavior since these are currently the same value (0).

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidEnd:]):

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

Skip webrtc/video-replace-muted-track.html on iOS.
https://bugs.webkit.org/show_bug.cgi?id=173608

Unreviewed test gardening.

  • platform/ios-wk2/TestExpectations:
2:04 PM Changeset in webkit [218892] by achristensen@apple.com
  • 4 edits in trunk

WebsitePolicies given with navigation policy for redirects should apply to the provisional document
https://bugs.webkit.org/show_bug.cgi?id=173886
<rdar://problem/32543191>

Reviewed by Andy Estes.
Source/WebKit2:


If, for example, we deny video autoplay for the initial request but allow it for the redirect destination
location, the document should allow video autoplay. We were putting these settings onto the wrong DocumentLoader.
When a navigation policy is given to a response of a redirect location, we currently have the DocumentLoader
for the loading document in the FrameLoader's provisionalDocumentLoader, not the documentLoader.

Covered by a new API test.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):

Tools:

  • TestWebKitAPI/Tests/WebKit2Cocoa/WebsitePolicies.mm:

(ParsedRange::ParsedRange):
(-[TestSchemeHandler initWithVideoData:]):
(-[TestSchemeHandler webView:startURLSchemeTask:]):
(-[TestSchemeHandler webView:stopURLSchemeTask:]):
(TEST):

1:59 PM Changeset in webkit [218891] by commit-queue@webkit.org
  • 8 edits
    4 adds in trunk

Volume controls should be hidden when AirPlay is active
https://bugs.webkit.org/show_bug.cgi?id=173933
<rdar://problem/33011931>

Patch by Antoine Quint <Antoine Quint> on 2017-06-28
Reviewed by Dean Jackson.

Source/WebCore:

Ensure we don't show any volume controls during AirPlay. We set the mute button's enabled state to "false"
when AirPlay is active and key off this enabled stated to control the display of all volume-related controls
throughout the UI.

Tests: media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-controls-hidden-when-mute-button-disabled.html

media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):
(InlineMediaControls):

  • Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:

(MacOSFullscreenMediaControls.prototype.layout):

  • Modules/modern-media-controls/media/airplay-support.js:

(AirplaySupport.prototype.syncControl):
(AirplaySupport):

LayoutTests:

Expand the AirplaySupport testing to check that the mute button's enabled state is set to "false"
in AirPlay and add new tests to check that volume controls are correctly hidden when the mute button
is disabled.

  • media/modern-media-controls/airplay-support/airplay-support-expected.txt:
  • media/modern-media-controls/airplay-support/airplay-support.html:
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-controls-hidden-when-mute-button-disabled-expected.txt: Added.
  • media/modern-media-controls/macos-fullscreen-media-controls/macos-fullscreen-media-controls-volume-controls-hidden-when-mute-button-disabled.html: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-top-right-controls-bar-hidden-when-mute-button-disabled.html: Added.
  • platform/mac/TestExpectations:
1:58 PM Changeset in webkit [218890] by Konstantin Tokarev
  • 60 edits in trunk/Source/WebCore

Remove excessive includes from WebCore/css sources
https://bugs.webkit.org/show_bug.cgi?id=173919

Reviewed by Simon Fraser.

No new tests needed.

  • css/CSSCanvasValue.cpp:
  • css/CSSComputedStyleDeclaration.cpp:
  • css/CSSContentDistributionValue.cpp:
  • css/CSSCrossfadeValue.cpp:
  • css/CSSCursorImageValue.cpp:
  • css/CSSCustomPropertyValue.cpp:
  • css/CSSDefaultStyleSheets.cpp:
  • css/CSSFilterImageValue.cpp:
  • css/CSSFontFace.cpp:
  • css/CSSFontFaceSet.cpp:
  • css/CSSFontFaceSource.cpp:
  • css/CSSFontFaceSrcValue.cpp:
  • css/CSSFontFeatureValue.cpp:
  • css/CSSFontSelector.cpp:
  • css/CSSFontValue.cpp:
  • css/CSSImageGeneratorValue.cpp:
  • css/CSSImageSetValue.cpp:
  • css/CSSImageValue.cpp:
  • css/CSSImportRule.cpp:
  • css/CSSKeyframesRule.cpp:
  • css/CSSMediaRule.cpp:
  • css/CSSNamedImageValue.cpp:
  • css/CSSPrimitiveValue.cpp:
  • css/CSSProperty.cpp:
  • css/CSSPropertySourceData.cpp:
  • css/CSSReflectValue.cpp:
  • css/CSSRuleList.cpp:
  • css/CSSSegmentedFontFace.cpp:
  • css/CSSSelector.cpp:
  • css/CSSStyleRule.cpp:
  • css/CSSStyleSheet.cpp:
  • css/CSSSupportsRule.cpp:
  • css/CSSToStyleMap.cpp:
  • css/CSSValueList.cpp:
  • css/CSSValuePool.cpp:
  • css/CSSVariableData.cpp:
  • css/ElementRuleCollector.cpp:
  • css/InspectorCSSOMWrappers.cpp:
  • css/MediaList.cpp:
  • css/MediaQueryEvaluator.cpp:
  • css/MediaQueryExpression.cpp:
  • css/PropertySetCSSStyleDeclaration.cpp:
  • css/RGBColor.cpp:
  • css/SelectorChecker.cpp:
  • css/StyleProperties.cpp:
  • css/StyleResolver.cpp:
  • css/StyleRule.cpp:
  • css/StyleSheetContents.cpp:
  • css/TransformFunctions.cpp:
  • css/ViewportStyleResolver.cpp:
  • css/WebKitCSSRegionRule.cpp:
  • css/parser/CSSParser.cpp:
  • css/parser/CSSParserFastPaths.cpp:
  • css/parser/CSSParserIdioms.cpp:
  • css/parser/CSSParserSelector.cpp:
  • css/parser/CSSParserToken.cpp:
  • css/parser/CSSPropertyParser.cpp:
  • css/parser/CSSSelectorParser.cpp:
  • css/parser/MediaQueryParser.cpp:
1:24 PM Changeset in webkit [218889] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked imported/w3c/web-platform-tests/IndexedDB/idbindex_getAllKeys.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=172834

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
1:02 PM Changeset in webkit [218888] by Konstantin Tokarev
  • 3 edits in trunk/Source/WebKit2

[cmake] Improve configuration tests for librt and libatomic
https://bugs.webkit.org/show_bug.cgi?id=173921

Reviewed by Michael Catanzaro.

  1. Both tests are converted to use specialized CMake modules
  2. Both libraries are now linked only if they are really needed and usable by compiler
  3. librt is no more required to be detected by find_library(), which may fail in case of cross-compilation
  4. libatomic test moved to port-independent CMakeLists.txt
  • CMakeLists.txt:
  • PlatformGTK.cmake:
12:53 PM Changeset in webkit [218887] by mitz@apple.com
  • 9 copies
    1 add in releases/Apple/Safari Technology Preview 34

Added a tag for Safari Technology Preview release 34.

12:46 PM Changeset in webkit [218886] by achristensen@apple.com
  • 4 edits in trunk/Source

Fix CMake build.

  • PlatformMac.cmake:
12:35 PM Changeset in webkit [218885] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

[iOS DnD] [WK2] Dragged content flashes after the preview sets down when cancelling a drag
https://bugs.webkit.org/show_bug.cgi?id=173927
<rdar://problem/33020792>

Reviewed by Tim Horton.

When a drag is cancelled, UIKit normally animates fly-back and set-down animations back-to-back. However, for
WebKit2, we need to call out to the web process in order to trigger a repaint of the dragged content at normal
opacity when the drag cancel animation completes. Thus, we can hook into UIKit SPI to split the cancellation
animation into two discrete phases: the fly-back and the set-down (the latter of which may be deferred using a
completion block).

To do this, we implement a new SPI hook, _dragInteraction:item:shouldDelaySetDownAnimationWithCompletion:, to
indicate that the set-down should be deferred, and call the completion block after the next layer tree commit.
Since -shouldDelaySetDownAnimationWithCompletion: is invoked after the UIDragAnimating completion block in
-willAnimateCancelWithAnimator:, this layer tree commit is guaranteed to come after we've told the web process
to repaint at full opacity.

This patch also accounts for additional changes in UIKit. Once -shouldDelaySetDownAnimationWithCompletion:
becomes available, -sessionDidEnd: will no longer be invoked after a cancelled drag lift if the user did not
begin moving. This means that our cleanup logic in -sessionDidEnd: will no longer be executed in this case,
leaving the view with an inconsistent dragging state. To fix this, we need to implement
-dragInteraction:willAnimateLiftWithAnimator:session: to perform drag session cleanup following a cancelled drag
lift, for which the drag animator's final position will be UIViewAnimatingPositionStart.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView _dragInteraction:item:shouldDelaySetDownAnimationWithCompletion:]):

12:17 PM Changeset in webkit [218884] by Jonathan Bedard
  • 2 edits in trunk/Source/WebCore/PAL

Build fix for PAL
https://bugs.webkit.org/show_bug.cgi?id=173896

Reviewed by Dan Bernstein.

Remove the workaround build fix in r218863.

  • PAL.xcodeproj/project.pbxproj: We should be using PROJECT_DIR instead of SRCROOT

when in a nested Xcode project.

11:12 AM Changeset in webkit [218883] by jfbastien@apple.com
  • 16 edits
    1 add in trunk/Source/JavaScriptCore

Ensure that computed new stack pointer values do not underflow.

Re-apply this patch, it originally broke the ARM build because the llint code
generated subs xzr, x3, sp which isn't valid ARM64: the third operand cannot
be SP (that encoding would be ZR instead, subtracting zero). Flip the comparison
and operands to emit valid code (because the second operand can be SP).

10:47 AM Changeset in webkit [218882] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Adjusted test expectations for http/tests/loading/resourceLoadStatistics/telemetry-generation.html.
https://bugs.webkit.org/show_bug.cgi?id=173499

Unreviewed test gardening.

  • platform/wk2/TestExpectations:
10:16 AM Changeset in webkit [218881] by commit-queue@webkit.org
  • 5 edits in trunk/Source/WebCore

Remove unnecessary const double method arguments
https://bugs.webkit.org/show_bug.cgi?id=173925

Patch by Antoine Quint <Antoine Quint> on 2017-06-28
Reviewed by Dean Jackson.

Addressing post-landing feedback from webkit.org/b/173858.

  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::formattedStringForDuration):

  • Modules/mediacontrols/MediaControlsHost.h:
  • rendering/RenderTheme.h:

(WebCore::RenderTheme::mediaControlsFormattedStringForDuration):

  • rendering/RenderThemeCocoa.h:
9:57 AM Changeset in webkit [218880] by Simon Fraser
  • 4 edits in trunk/Source/WebKit/mac

Mark the GraphicsContext as accelerated when the WebHTMLView's layer is drawing asynchronously
https://bugs.webkit.org/show_bug.cgi?id=173899
rdar://problem/32994474

Reviewed by Tim Horton.

When the WebHTMLView is layer-backed, and -drawsAsynchronously on its layer is YES,
then mark the GraphicsContext that WebCore is using for drawing as accelerated, so
that ImageBuffer::createCompatibleBuffer() creates appropriately matched buffers.

Also clean up WebFrame a little, sharing code that checks whether the WebFrame's
documentView is a WebHTMLView.

  • WebView/WebFrame.mm:

(-[WebFrame _webHTMLDocumentView]):
(-[WebFrame _paintBehaviorForDestinationContext:]):
(-[WebFrame _drawRect:contentsOnly:]):
(-[WebFrame setTimeoutsPaused:]):
(-[WebFrame prepareForPause]):
(-[WebFrame resumeFromPause]):
(-[WebFrame resetTextAutosizingBeforeLayout]):

  • WebView/WebHTMLView.mm:

(-[WebHTMLView drawLayer:inContext:]):
(-[WebHTMLView _web_isDrawingIntoAcceleratedLayer]):

  • WebView/WebHTMLViewInternal.h:
9:45 AM Changeset in webkit [218879] by Alan Bujtas
  • 35 edits in trunk/Source/WebCore

Unreviewed, rolling out r218373.

Output is not right

Reverted changeset:

"Use WTFLogAlways for debug logging so that it shows up in
device system logs"
https://bugs.webkit.org/show_bug.cgi?id=173450
http://trac.webkit.org/changeset/218373

9:32 AM Changeset in webkit [218878] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebCore

[GTK] Some web pages disappear immediately after rendering
https://bugs.webkit.org/show_bug.cgi?id=173768

Reviewed by Xabier Rodriguez-Calvar.

This is happening with websites having a "hidden" class in HTML tag when a media element is added. In the GTK+
port the media controls CSS contains the following code:

.hidden {

display: none !important;

}

That causes the whole HTML document to become display: none. That's why we just render a white page, and also
the reason why it only happens with the GTK+ port and only with some specific websites. We should limit the
scope of the hidden class to the media control elements.

  • css/mediaControlsGtk.css:

(audio::-webkit-media-controls-panel.hidden,):
(audio::-webkit-media-controls-panel div.mute-box.hidden,):
(audio::-webkit-media-controls-current-time-display.hidden,):
(audio::-webkit-media-controls-timeline.hidden,):
(audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
(audio::-webkit-media-controls-toggle-closed-captions-button.hidden,):
(video::-webkit-media-controls-closed-captions-container.hidden):
(audio::-webkit-media-controls-fullscreen-button.hidden,):
(.hidden): Deleted.

9:05 AM Changeset in webkit [218877] by graouts@webkit.org
  • 6 edits
    2 adds in trunk

Media controls volume glyph does not have the correct material
https://bugs.webkit.org/show_bug.cgi?id=173918
<rdar://problem/33012697>

Reviewed by Eric Carlson.

Source/WebCore:

Test: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar.html

All buttons were hosted in a ControlsBar save for the MuteButton, so we now host it in a controls bar as well
to ensure compositing is similar to all other buttons.

  • Modules/modern-media-controls/controls/inline-media-controls.css:

(.media-controls.inline > .controls-bar.top-right):
(.media-controls.inline > button.mute): Deleted.

  • Modules/modern-media-controls/controls/inline-media-controls.js:

(InlineMediaControls):
(InlineMediaControls.prototype.layout):
(InlineMediaControls.prototype._addTopRightBarWithMuteButtonToChildren):

  • Modules/modern-media-controls/controls/macos-inline-media-controls.js:

(MacOSInlineMediaControls.prototype.handleEvent):

LayoutTests:

Add a new test to check the mute button is correctly hosted in the top-right controls bar
when width becomes scarce.

  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar-expected.txt: Added.
  • media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-mute-button-in-bottom-or-top-right-controls-bar.html: Added.
  • platform/mac/TestExpectations:
8:55 AM Changeset in webkit [218876] by Chris Dumez
  • 16 edits
    1 delete in trunk/Source/JavaScriptCore

Unreviewed, rolling out r218869.

Broke the iOS build

Reverted changeset:

"Ensure that computed new stack pointer values do not
underflow."
https://bugs.webkit.org/show_bug.cgi?id=173700
http://trac.webkit.org/changeset/218869

8:54 AM Changeset in webkit [218875] by Chris Dumez
  • 2 edits in trunk/Source/JavaScriptCore

Unreviewed, rolling out r218873.

Broke the iOS build

Reverted changeset:

"Gardening: CLoop build fix."
https://bugs.webkit.org/show_bug.cgi?id=173700
http://trac.webkit.org/changeset/218873

7:24 AM Changeset in webkit [218874] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

[GTK] LayoutTest webaudio/silent-audio-interrupted-in-background.html makes its subsequent test flaky crash
https://bugs.webkit.org/show_bug.cgi?id=173916

Unreviewed test gardening.

Patch by Fujii Hironori <Fujii Hironori> on 2017-06-28

  • platform/gtk/TestExpectations: Marked it Skip.
5:35 AM Changeset in webkit [218873] by mark.lam@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Gardening: CLoop build fix.
https://bugs.webkit.org/show_bug.cgi?id=173700
<rdar://problem/32926032>

Not reviewed.

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

4:23 AM Changeset in webkit [218872] by ddkilzer@apple.com
  • 2 edits in trunk/Source/WTF

Fix typo in comment: WordResult => WorkResult

  • wtf/AutomaticThread.h:
12:34 AM Changeset in webkit [218871] by Chris Dumez
  • 3 edits in trunk/Source/WebKit2

Avoid double thread dispatch in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains()
https://bugs.webkit.org/show_bug.cgi?id=173904

Reviewed by Brent Fulgham.

Avoid double thread dispatch in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains().
It calls fetchData() which dispatches to the main queue, then fetchDataForTopPrivatelyControlledDomains()
dispatches to the background queue. It should be possible to get fetchData() to dispatch directly
on the right queue.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchData):
(WebKit::WebsiteDataStore::fetchDataAndApply):
(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):

  • UIProcess/WebsiteData/WebsiteDataStore.h:
12:20 AM Changeset in webkit [218870] by Carlos Garcia Campos
  • 4 edits in trunk/Source/WebCore

REGRESSION(r218799): [GTK][WPE] Critical warning at exit
https://bugs.webkit.org/show_bug.cgi?id=173907

Reviewed by Konstantin Tokarev.

GLib-GObject-CRITICAL : g_object_unref: assertion 'G_IS_OBJECT (object)' failed

This is now always happening when closing the MeiniBrowser and it's causing a lot of unit tests to fail. In
r218799, GRefPtrGtk.h include was removed from PasteboardHelper.h that contains a GRefPtr<GtkTargetList>. The
targets are destroyed at exit, but now trying to use g_object_unref instead of gtk_target_list_unref(). I've
found two more cases like this in r218799, that removes GUniquePtrSoup.h from ResourceHandleInternal.h and
ResourceRequest.h that have GUniquePtr<SoupBuffer> and GUniquePtr<SoupURI>.

Fixes several GTK+ and WPE unit tests.

  • platform/gtk/PasteboardHelper.h: Bring back GRefPtrGtk.h.
  • platform/network/ResourceHandleInternal.h: Bring back GUniquePtrSoup.h.
  • platform/network/soup/ResourceRequest.h: Ditto.
12:11 AM Changeset in webkit [218869] by mark.lam@apple.com
  • 16 edits
    1 add in trunk/Source/JavaScriptCore

Ensure that computed new stack pointer values do not underflow.
https://bugs.webkit.org/show_bug.cgi?id=173700
<rdar://problem/32926032>

Reviewed by Filip Pizlo and Saam Barati.

  1. Added a RELEASE_ASSERT to BytecodeGenerator::generate() to ensure that m_numCalleeLocals is sane.
  1. Added underflow checks in LLInt code and VarargsFrame code.
  1. Introduce minimumReservedZoneSize, which is hardcoded to 16K. Ensure that Options::reservedZoneSize() is at least minimumReservedZoneSize. Ensure that Options::softReservedZoneSize() is at least greater than Options::reservedZoneSize() by minimumReservedZoneSize.
  1. Ensure that stack checks emitted by JIT tiers include an underflow check if and only if the max size of the frame is greater than Options::reservedZoneSize().

By design, we are guaranteed to have at least Options::reservedZoneSize() bytes
of memory at the bottom (end) of the stack. This means that, at any time, the
frame pointer must be at least Options::reservedZoneSize() bytes away from the
end of the stack. Hence, if the max frame size is less than
Options::reservedZoneSize(), there's no way that frame pointer - max
frame size can underflow, and we can elide the underflow check.

Note that we use Options::reservedZoneSize() instead of
Options::softReservedZoneSize() for determine if we need an underflow check.
This is because the softStackLimit that is used for stack checks can be set
based on Options::reservedZoneSize() during error handling (e.g. when creating
strings for instantiating the Error object). Hence, the guaranteed minimum of
distance between the frame pointer and the end of the stack is
Options::reservedZoneSize() and nor Options::softReservedZoneSize().

Note also that we ensure that Options::reservedZoneSize() is at least
minimumReservedZoneSize (i.e. 16K). In typical deployments,
Options::reservedZoneSize() may be larger. Using Options::reservedZoneSize()
instead of minimumReservedZoneSize gives us more chances to elide underflow
checks.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::generate):

  • dfg/DFGGraph.cpp:

(JSC::DFG::Graph::requiredRegisterCountForExecutionAndExit):

  • dfg/DFGJITCompiler.cpp:

(JSC::DFG::JITCompiler::compile):
(JSC::DFG::JITCompiler::compileFunction):

  • ftl/FTLLowerDFGToB3.cpp:

(JSC::FTL::DFG::LowerDFGToB3::lower):

  • jit/JIT.cpp:

(JSC::JIT::compileWithoutLinking):

  • jit/SetupVarargsFrame.cpp:

(JSC::emitSetupVarargsFrameFastCase):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

  • llint/LowLevelInterpreter.asm:
  • llint/LowLevelInterpreter32_64.asm:
  • llint/LowLevelInterpreter64.asm:
  • runtime/MinimumReservedZoneSize.h: Added.
  • runtime/Options.cpp:

(JSC::recomputeDependentOptions):

  • runtime/VM.cpp:

(JSC::VM::updateStackLimits):

  • wasm/WasmB3IRGenerator.cpp:

(JSC::Wasm::B3IRGenerator::B3IRGenerator):

  • wasm/js/WebAssemblyFunction.cpp:

(JSC::callWebAssemblyFunction):

Jun 27, 2017:

11:42 PM Changeset in webkit [218868] by jfbastien@apple.com
  • 15 edits
    4 adds in trunk

WebAssembly: running out of executable memory should throw OoM
https://bugs.webkit.org/show_bug.cgi?id=171537
<rdar://problem/32963338>

Reviewed by Saam Barati.

JSTests:

  • wasm.yaml:
  • wasm/lowExecutableMemory/executable-memory-oom.js: Added.

(const.invoke):
(failCount.0.catch):
(failCount.0.module.undefined.catch):

  • wasm/lowExecutableMemory/exports-oom.js: Added.

(const.type):
(const.params):
(const.randomProgram):
(failCount.0.catch):
(failCount.0.module.undefined.catch):

  • wasm/lowExecutableMemory/imports-oom.js: Added.

(const.type):
(const.params):
(const.randomProgram):
(f.imports.push):
(failCount.0.catch):
(failCount.0.module.undefined.catch):

Source/JavaScriptCore:

Both on first compile with BBQ as well as on tier-up with OMG,
running out of X memory shouldn't cause the entire program to
terminate. An exception will do when compiling initial code (since
we don't have any other fallback at the moment), and refusal to
tier up will do as well (it'll just be slower).

This is useful because programs which generate huge amounts of
code simply look like crashes, which developers report to
us. Getting a JavaScript exception instead is much clearer.

  • jit/ExecutableAllocator.cpp:

(JSC::ExecutableAllocator::allocate):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::shouldJIT):

  • runtime/Options.h:
  • wasm/WasmBBQPlan.cpp:

(JSC::Wasm::BBQPlan::prepare):
(JSC::Wasm::BBQPlan::complete):

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):
(JSC::Wasm::wasmToWasm):

  • wasm/WasmBinding.h:
  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::OMGPlan::work):

  • wasm/js/JSWebAssemblyCodeBlock.cpp:

(JSC::JSWebAssemblyCodeBlock::JSWebAssemblyCodeBlock):

  • wasm/js/JSWebAssemblyCodeBlock.h:
  • wasm/js/JSWebAssemblyInstance.cpp:

(JSC::JSWebAssemblyInstance::finalizeCreation):

Tools:

  • Scripts/run-jsc-stress-tests: add a configuration which runs the

tests under limited executable memory and avoids non-WebAssembly
code generation so that we more reliably run out of executable
memory in WebAssembly.

11:23 PM Changeset in webkit [218867] by sbarati@apple.com
  • 4 edits in trunk/Source/JavaScriptCore

JITStubRoutine::passesFilter should use isJITPC
https://bugs.webkit.org/show_bug.cgi?id=173906

Reviewed by JF Bastien.

This patch makes JITStubRoutine use the isJITPC abstraction defined
inside ExecutableAllocator.h. Before, JITStubRoutine was using a
hardcoded platform size constant. This means it'd do the wrong thing
if Options::jitMemoryReservationSize() was larger than the defined
constant for that platform. This patch also removes a bunch of
dead code in that file.

  • jit/ExecutableAllocator.cpp:
  • jit/ExecutableAllocator.h:
  • jit/JITStubRoutine.h:

(JSC::JITStubRoutine::passesFilter):
(JSC::JITStubRoutine::canPerformRangeFilter): Deleted.
(JSC::JITStubRoutine::filteringStartAddress): Deleted.
(JSC::JITStubRoutine::filteringExtentSize): Deleted.

10:45 PM Changeset in webkit [218866] by sbarati@apple.com
  • 3 edits in trunk/Source/JavaScriptCore

Fix some stale comments in Wasm code base
https://bugs.webkit.org/show_bug.cgi?id=173814

Reviewed by Mark Lam.

  • wasm/WasmBinding.cpp:

(JSC::Wasm::wasmToJs):

  • wasm/WasmOMGPlan.cpp:

(JSC::Wasm::runOMGPlanForIndex):

10:14 PM Changeset in webkit [218865] by Chris Dumez
  • 12 edits in trunk/Source

[ResourceLoadStatistics] Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute
https://bugs.webkit.org/show_bug.cgi?id=173895
<rdar://problem/32984366>

Reviewed by Brent Fulgham.

Update minimumTimeBetweeenDataRecordsRemoval to 1 hour instead of 1 minute to save battery.
Also port code to modern time types.

Source/WebCore:

  • loader/ResourceLoadObserver.cpp:

(WebCore::reduceTimeResolution):
(WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
(WebCore::ResourceLoadObserver::setTimeToLiveUserInteraction):
(WebCore::ResourceLoadObserver::setTimeToLiveCookiePartitionFree):
(WebCore::ResourceLoadObserver::setMinimumTimeBetweeenDataRecordsRemoval):
(WebCore::ResourceLoadObserver::setReducedTimestampResolution):
(WebCore::ResourceLoadObserver::setGrandfatheringTime):

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatistics.h:

(WebCore::ResourceLoadStatistics::mostRecentUserInteractionTime):

  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::createEncoderFromData):
(WebCore::ResourceLoadStatisticsStore::readDataFromDecoder):
(WebCore::shouldPartitionCookies):
(WebCore::ResourceLoadStatisticsStore::setTimeToLiveUserInteraction):
(WebCore::ResourceLoadStatisticsStore::setTimeToLiveCookiePartitionFree):
(WebCore::ResourceLoadStatisticsStore::setMinimumTimeBetweeenDataRecordsRemoval):
(WebCore::ResourceLoadStatisticsStore::setGrandfatheringTime):
(WebCore::ResourceLoadStatisticsStore::hasHadRecentUserInteraction):
(WebCore::ResourceLoadStatisticsStore::topPrivatelyControlledDomainsToRemoveWebsiteDataFor):
(WebCore::ResourceLoadStatisticsStore::handleFreshStartWithEmptyOrNoStore):
(WebCore::ResourceLoadStatisticsStore::shouldRemoveDataRecords):
(WebCore::ResourceLoadStatisticsStore::dataRecordsBeingRemoved):

  • loader/ResourceLoadStatisticsStore.h:

Source/WebKit2:

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerSetTimeToLiveUserInteraction):
(WKResourceLoadStatisticsManagerSetTimeToLiveCookiePartitionFree):
(WKResourceLoadStatisticsManagerSetMinimumTimeBetweeenDataRecordsRemoval):
(WKResourceLoadStatisticsManagerSetGrandfatheringTime):

  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveUserInteraction):
(WebKit::WebResourceLoadStatisticsManager::setTimeToLiveCookiePartitionFree):
(WebKit::WebResourceLoadStatisticsManager::setMinimumTimeBetweeenDataRecordsRemoval):
(WebKit::WebResourceLoadStatisticsManager::setGrandfatheringTime):

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.h:
10:06 PM Changeset in webkit [218864] by Chris Dumez
  • 5 edits in trunk/Source

Port HysteresisActivity to Seconds type
https://bugs.webkit.org/show_bug.cgi?id=173902

Reviewed by Simon Fraser.

Source/WebCore:

  • platform/HysteresisActivity.h:

(WebCore::HysteresisActivity::HysteresisActivity):
(WebCore::HysteresisActivity::stop):

  • platform/ios/WebSQLiteDatabaseTrackerClient.mm:

Source/WebKit2:

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::m_pageScrolledHysteresis):

9:52 PM Changeset in webkit [218863] by Jonathan Bedard
  • 2 edits in trunk/Source/WebCore/PAL

Build fix for PAL
https://bugs.webkit.org/show_bug.cgi?id=173896

Reviewed by Myles C. Maxfield.

  • PAL.xcodeproj/project.pbxproj: Ensure that the SRCROOT is WebCore/PAL and not

just WebCore.

9:23 PM Changeset in webkit [218862] by Joseph Pecoraro
  • 4 edits
    2 adds
    1 delete in trunk/LayoutTests

Web Inspector: Cleanup RemoteObject tests
https://bugs.webkit.org/show_bug.cgi?id=173885

Reviewed by Matt Baker.

  • inspector/model/remote-object-dom.html: Added.
  • inspector/model/remote-object-expected.txt:
  • inspector/model/remote-object.html:

Split out DOM results (which differ across ports and features).

  • inspector/model/resources/remote-object-utilities.js:

(TestPage.registerInitializer.window.runSteps):
This should have been a continue not a return.

  • platform/mac/inspector/model/remote-object-dom-expected.txt: Added.
  • platform/mac/inspector/model/remote-object-expected.txt: Removed.

Platform expectations are now limited to just the DOM test.

8:05 PM Changeset in webkit [218861] by Caio Lima
  • 25 edits
    1 add in trunk

[ESnext] Implement Object Rest - Implementing Object Rest Destructuring
https://bugs.webkit.org/show_bug.cgi?id=167962

Reviewed by Saam Barati.

JSTests:

  • stress/object-rest-deconstruct.js: Added.

(let.assert):
(let.assertPropDescriptor):
(catch):
(get 3):
(foo):
(let.src.get y):
(let.src.set y):
(let.gen):

Source/JavaScriptCore:

Object Rest/Spread Destructing proposal is in stage 3[1] and this
Patch is a prototype implementation of it. A simple change over the
parser was necessary to support the new '...' token on Object Pattern
destruction rule. In the bytecode generator side, We changed the
bytecode generated on ObjectPatternNode::bindValue to store in an
set the identifiers of already destructured properties, following spec draft
section[2], and then pass it as excludedNames to CopyDataProperties.
The rest destructuring calls copyDataProperties to perform the
copy of rest properties in rhs.

We also implemented CopyDataProperties as private JS global operation
on builtins/GlobalOperations.js following it's specification on [3].
It is implemented using Set object to verify if a property is on
excludedNames to keep this algorithm with O(n + m) complexity, where n

number of source's own properties and m = excludedNames.length.

In this implementation we aren't using excludeList as constant if
destructuring pattern contains computed property, i.e. we can
just determine the key to be excluded at runtime. If we can define all
identifiers in the pattern in compile time, we then create a
constant JSSet. This approach gives a good performance improvement,
since we allocate the excludeSet just once, reducing GC pressure.

[1] - https://github.com/tc39/proposal-object-rest-spread
[2] - https://tc39.github.io/proposal-object-rest-spread/#Rest-RuntimeSemantics-PropertyDestructuringAssignmentEvaluation
[3] - https://tc39.github.io/proposal-object-rest-spread/#AbstractOperations-CopyDataProperties

  • builtins/BuiltinNames.h:
  • builtins/GlobalOperations.js:

(globalPrivate.copyDataProperties):

  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finishCreation):

  • bytecompiler/NodesCodegen.cpp:

(JSC::ObjectPatternNode::bindValue):

  • parser/ASTBuilder.h:

(JSC::ASTBuilder::appendObjectPatternEntry):
(JSC::ASTBuilder::appendObjectPatternRestEntry):
(JSC::ASTBuilder::setContainsObjectRestElement):

  • parser/Nodes.h:

(JSC::ObjectPatternNode::appendEntry):
(JSC::ObjectPatternNode::setContainsRestElement):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseProperty):

  • parser/SyntaxChecker.h:

(JSC::SyntaxChecker::operatorStackPop):

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::asyncFunctionStructure):
(JSC::JSGlobalObject::setStructure): Deleted.

  • runtime/JSGlobalObjectFunctions.cpp:

(JSC::privateToObject):

  • runtime/JSGlobalObjectFunctions.h:
  • runtime/ObjectConstructor.cpp:

(JSC::ObjectConstructor::finishCreation):

  • runtime/SetPrototype.cpp:

(JSC::SetPrototype::finishCreation):

Source/WTF:

  • wtf/HashSet.h:

(WTF::=):

LayoutTests:

  • js/parser-syntax-check-expected.txt:
  • js/script-tests/parser-syntax-check.js:
6:47 PM Changeset in webkit [218860] by Chris Dumez
  • 2 edits in trunk/Source/WebKit2

Move WebsiteDataRecord processing off-thread in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains()
https://bugs.webkit.org/show_bug.cgi?id=173882
<rdar://problem/32984366>

Reviewed by Darin Adler.

Move WebsiteDataRecord processing off-thread in WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains()
as we have data showing it is slow and hangs the UIProcess' main thread.

  • UIProcess/WebsiteData/WebsiteDataStore.cpp:

(WebKit::WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains):

6:09 PM Changeset in webkit [218859] by Yusuke Suzuki
  • 5 edits in trunk/LayoutTests

Unreviewed, unmark workers/bomb.html flakiness after r218856

  • platform/gtk-wayland/TestExpectations:
  • platform/ios-device/TestExpectations:
  • platform/ios-wk2/TestExpectations:
  • platform/mac/TestExpectations:
6:06 PM Changeset in webkit [218858] by Brent Fulgham
  • 2 edits in trunk/Source/WebKit2

[WK2][macOS] Expand sandbox to allow access to the CoreMedia volume control endpoint
https://bugs.webkit.org/show_bug.cgi?id=173898
<rdar://problem/32930754>

Reviewed by Ryosuke Niwa.

  • WebProcess/com.apple.WebProcess.sb.in:
6:04 PM Changeset in webkit [218857] by commit-queue@webkit.org
  • 2 edits in trunk/Source/WebCore

MediaPlayerPrivate m_private may not yet be created when setPrivateBrowsingMode is called.
https://bugs.webkit.org/show_bug.cgi?id=173893
rdar://problem/32986872

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-27
Reviewed by Ryosuke Niwa.

No new tests because no reproducable case.

setPrivateBrowsingMode can be called on MediaPlayer before the MediaPlayerPrivate is created.
The value should only be pushed down the m_private if it has been created.

  • platform/graphics/MediaPlayer.cpp:

(WebCore::MediaPlayer::setPrivateBrowsingMode):

5:46 PM Changeset in webkit [218856] by Yusuke Suzuki
  • 2 edits in trunk/Source/JavaScriptCore

[JSC] Do not touch VM after notifying Ready in DFG::Worklist
https://bugs.webkit.org/show_bug.cgi?id=173888

Reviewed by Saam Barati.

After notifying Plan::Ready and releasing Worklist lock, VM can be destroyed.
Thus, Plan::vm() can return a destroyed VM. Do not touch it.
This causes occasional SEGV / assertion failures in workers/bomb test.

  • dfg/DFGWorklist.cpp:
5:36 PM Changeset in webkit [218855] by Wenson Hsieh
  • 12 edits
    1 add in trunk

[iOS DnD] Support dragging out of contenteditable areas without a prior selection
https://bugs.webkit.org/show_bug.cgi?id=173854
<rdar://problem/32236827>

Reviewed by Ryosuke Niwa and Tim Horton.

Source/WebCore:

Allows elements to be dragged from contenteditable areas for both WebKit1 and WebKit2 iOS. There are two main
changes in WebCore: move the touch point adjustment code into EventHandler::tryToBeginDataInteractionAtPoint, so
that the clientPosition specified will be adjusted to an appropriate clickable node if needed. This is necessary
because UIWebDocumentView and WKContentView no longer send adjusted points to WebCore when requesting drag
start. See <https://bugs.webkit.org/show_bug.cgi?id=173855> for a followup regarding the globalPosition and
clientPositions passed in to the MouseEvents when performing a drag or synthetic click.

Secondly, image elements in Mail's contenteditable area are not draggable unless the heuristic in
DragController::draggableElement is tweaked to not reject image dragging across the board if the
loadsImagesAutomatically setting is turned off. Instead, even if images are not automatically loaded, allow the
image drag to commence if the image renderer already has a cached image.

Test: DataInteractionTests.DragImageFromContentEditable

  • page/DragController.cpp:

(WebCore::imageElementIsDraggable):
(WebCore::DragController::draggableElement):

  • page/ios/EventHandlerIOS.mm:

(WebCore::EventHandler::tryToBeginDataInteractionAtPoint):

Source/WebKit/mac:

Vends some information from the DragItem passed into -[WebView _startDrag:] through the WebView as SPI for
WebKit1 clients. No behavior change with these changes alone -- see <rdar://problem/32991062> for more detail.

  • WebView/WebView.mm:

(-[WebView _startDrag:]):
(-[WebView _dragSourceAction]):
(-[WebView _draggedLinkTitle]):
(-[WebView _draggedLinkURL]):
(-[WebView _draggedElementBounds]):
(-[WebView _endedDataInteraction:global:]):

  • WebView/WebViewData.h:
  • WebView/WebViewPrivate.h:

Source/WebKit2:

Instead of allowing a drag to occur only if a position information request discovers a clickable node, remove
the position information request entirely and just call into WebCore to try and begin the drag. Currently, the
position information request serves two purposes:

  1. To adjust the hit-test location to account for nearby clickable nodes.
  2. To obtain information about the content being dragged.

The first requirement is fulfilled by performing the drag location adjustment in WebCore instead (see
ChangeLogs for more detail). The second requirement is fulfilled by refactoring in
https://bugs.webkit.org/show_bug.cgi?id=173832 to fold all information relevant to starting a drag into the
DragItem struct, and then propagating the DragItem struct. The relevant information from the position
information update is now populated when the UI process receives the drag start response.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _startDrag:item:]):
(-[WKContentView computeClientAndGlobalPointsForDropSession:outClientPoint:outGlobalPoint:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView _api_dropInteraction:sessionDidEnter:]):
(-[WKContentView _api_dropInteraction:sessionDidUpdate:]):
(positionInformationMayStartDataInteraction): Deleted.

Tools:

Adds a new test to check that an image can be dragged out of a contenteditable and dropped.

  • TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
  • TestWebKitAPI/Tests/WebKit2Cocoa/contenteditable-and-target.html: Added.
  • TestWebKitAPI/Tests/ios/DataInteractionTests.mm:

(TestWebKitAPI::TEST):

4:55 PM Changeset in webkit [218854] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Marked http/tests/loading/resourceLoadStatistics/telemetry-generation.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=173499

Unreviewed test gardening.

  • platform/wk2/TestExpectations:
4:48 PM Changeset in webkit [218853] by commit-queue@webkit.org
  • 14 edits in trunk

[Modern Media Controls] Accessibility labels should be formatted using NSDateComponentsFormatter
https://bugs.webkit.org/show_bug.cgi?id=173858
<rdar://problem/32643171>

Patch by Antoine Quint <Antoine Quint> on 2017-06-27
Reviewed by Dean Jackson.

Source/WebCore:

We shouldn't be manually trying to create a formatted string for media controls and instead rely
on NSDateComponentsFormatter to perform this task for us. So we remove the ad-hoc code in the JS
media controls code and instead add a new MediaControlsHost method to format durations which calls
into RenderTheme to provide a formatted duration string relevant to the current platform and locale.

  • English.lproj/modern-media-controls-localized-strings.js:
  • Modules/mediacontrols/MediaControlsHost.cpp:

(WebCore::MediaControlsHost::formattedStringForDuration):

  • Modules/mediacontrols/MediaControlsHost.h:
  • Modules/mediacontrols/MediaControlsHost.idl:
  • Modules/modern-media-controls/controls/slider.js:

(Slider.prototype.set inputAccessibleLabel):

  • Modules/modern-media-controls/controls/time-label.js:

(TimeLabel.prototype.commitProperty):

  • Modules/modern-media-controls/main.js:

(createControls):
(formattedStringForDuration):
(formatTimeToString): Deleted.

  • rendering/RenderTheme.h:

(WebCore::RenderTheme::mediaControlsFormattedStringForDuration):

  • rendering/RenderThemeCocoa.h:
  • rendering/RenderThemeCocoa.mm:

(WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):

LayoutTests:

  • media/modern-media-controls/scrubber/scrubber-has-correct-ax-label-expected.txt:
  • media/modern-media-controls/scrubber/scrubber-has-correct-ax-label.html:
4:40 PM Changeset in webkit [218852] by eric.carlson@apple.com
  • 2 edits in trunk/Source/WebCore

r218647 causes getUserMedia to fail on some machines
https://bugs.webkit.org/show_bug.cgi?id=173894

Reviewed by Youenn Fablet.

  • platform/mediastream/mac/AVVideoCaptureSource.mm:

(WebCore::AVVideoCaptureSource::isFrameRateSupported): Change frame rate epsilon from 0.00001
to 0.001.

4:29 PM Changeset in webkit [218851] by commit-queue@webkit.org
  • 5 edits in trunk

Placard icons act like buttons (can get keyboard focus and shows up in VoiceOver)
https://bugs.webkit.org/show_bug.cgi?id=173891
<rdar://problem/33011855>

Patch by Antoine Quint <Antoine Quint> on 2017-06-27
Reviewed by Dean Jackson.

Source/WebCore:

Ensure that we disable buttons inside placards as they're only decorative and should
not be interactive.

  • Modules/modern-media-controls/controls/placard.js:

(Placard.):

LayoutTests:

Update the Placard test to check that its <button> is disabled.

  • media/modern-media-controls/placard/placard-expected.txt:
  • media/modern-media-controls/placard/placard.html:
4:05 PM Changeset in webkit [218850] by achristensen@apple.com
  • 343 edits
    269 adds
    60 deletes in trunk/Source/ThirdParty/libwebrtc

Update boringssl to c8ff30cbe716c72279a6f6a9d7d7d0d4091220fa
https://bugs.webkit.org/show_bug.cgi?id=173676

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-27
Reviewed by Alex Christensen.

  • Configurations/boringssl.xcconfig: Enabling ASM.
  • Source/third_party/boringssl/BUILD.generated.gni:
  • Source/third_party/boringssl: Updated folder according new revision.
  • WebKit/patch-boringssl: Added, needed to fix some files to disable warnings.
  • libwebrtc.xcodeproj/project.pbxproj:
3:54 PM Changeset in webkit [218849] by achristensen@apple.com
  • 48 edits
    5 adds in trunk/Source/ThirdParty/libwebrtc

Refresh usrsctp to Source/ThirdParty/libwebrtc/WebKit/patch-usrsctp and libsrtp to ccf84786f8ef803cb9c75e919e5a3976b9f5a67
https://bugs.webkit.org/show_bug.cgi?id=173673

Patch by Youenn Fablet <youenn@apple.com> on 2017-06-27
Reviewed by Sam Weinig.

  • Source/third_party/libsrtp/README.chromium:
  • Source/third_party/libsrtp/srtp/srtp.c:

(srtp_stream_init_keys):
(srtp_calc_aead_iv_srtcp):
(srtp_protect_rtcp_aead):
(srtp_unprotect_rtcp_aead):

  • Source/third_party/libsrtp/test/srtp_driver.c:

(srtp_validate_encrypted_extensions_headers_gcm):

  • Source/third_party/usrsctp/usrsctplib/.gitignore: Added.
  • Source/third_party/usrsctp/usrsctplib/CMakeLists.txt:
  • Source/third_party/usrsctp/usrsctplib/Makefile.am:
  • Source/third_party/usrsctp/usrsctplib/README.md:
  • Source/third_party/usrsctp/usrsctplib/configure.ac:
  • Source/third_party/usrsctp/usrsctplib/programs/CMakeLists.txt:
  • Source/third_party/usrsctp/usrsctplib/programs/Makefile.am:
  • Source/third_party/usrsctp/usrsctplib/programs/client.c:

(main):

  • Source/third_party/usrsctp/usrsctplib/programs/datachan_serv.c:

(main):

  • Source/third_party/usrsctp/usrsctplib/programs/ekr_loop_offload.c: Added.

(handle_packets):

  • Source/third_party/usrsctp/usrsctplib/programs/test_timer.c: Added.

(main):

  • Source/third_party/usrsctp/usrsctplib/usrsctp.pc.in: Added.
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/CMakeLists.txt:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_asconf.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_asconf.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_auth.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_bsd_addr.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_bsd_addr.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_cc_functions.c:

(sctp_cwnd_update_after_fr):
(sctp_hs_cwnd_update_after_fr):
(sctp_htcp_cwnd_update_after_fr):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_constants.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_crc32.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_crc32.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_header.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_indata.c:

(sctp_build_readq_entry):
(sctp_place_control_in_stream):
(sctp_abort_in_reasm):
(sctp_queue_data_to_stream):
(sctp_build_readq_entry_from_ctl):
(sctp_handle_old_unordered_data):
(sctp_inject_old_unordered_data):
(sctp_deliver_reasm_check):
(sctp_add_chk_to_control):
(sctp_queue_data_for_reasm):
(sctp_find_reasm_entry):
(sctp_process_a_data_chunk):
(sctp_sack_check):
(sctp_process_segment_range):
(sctp_check_for_revoked):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_indata.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.c:

(sctp_process_init):
(sctp_process_cookie_existing):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_input.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_output.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_pcb.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_peeloff.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_ss_functions.c:

(sctp_ss_rr_add):
(sctp_ss_fcfs_select):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_structs.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_sysctl.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_timer.c:

(sctp_recover_sent_list):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_uio.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_usrreq.c:

(sctp_init):
(sctp_pathmtu_adjustment):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctp_var.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctputil.c:

(sctp_log_strm_del):
(sctp_init_asoc):
(sctp_notify_send_failed):
(sctp_notify_send_failed2):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet/sctputil.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_usrreq.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/netinet6/sctp6_var.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_mbuf.c:

(m_get):
(mbuf_initialize):

  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_mbuf.h:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/user_socket.c:
  • Source/third_party/usrsctp/usrsctplib/usrsctplib/usrsctp.h:
  • WebKit/patch-usrsctp: Added.
3:43 PM Changeset in webkit [218848] by sbarati@apple.com
  • 2 edits in trunk/Source/JavaScriptCore

Remove an inaccurate comment inside DFGClobberize.h
https://bugs.webkit.org/show_bug.cgi?id=163874

Reviewed by Filip Pizlo.

The comment said that Clobberize may or may not be sound if run prior to
doing type inference. This is not correct, though. Clobberize *must* be sound
prior do doing type inference since we use it inside the BytecodeParser, which
is the very first thing the DFG does.

  • dfg/DFGClobberize.h:

(JSC::DFG::clobberize):

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

Disable m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause
https://bugs.webkit.org/show_bug.cgi?id=173843
rdar://problem/32982431

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-06-27
Reviewed by Eric Carlson.

Source/WebCore:

Test: media/media-fullscreen-pause-inline.html

Some pages may not have a fullscreen button, so disabled m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause.

  • html/HTMLMediaElement.cpp:

(WebCore::HTMLMediaElement::pause):

LayoutTests:

Some pages may not have a fullscreen button, so disabled m_temporarilyAllowingInlinePlaybackAfterFullscreen on pause.

  • media/media-fullscreen-pause-inline-expected.txt: Added.
  • media/media-fullscreen-pause-inline.html: Added.
  • platform/mac-wk2/TestExpectations:
2:49 PM Changeset in webkit [218846] by Chris Dumez
  • 5 edits in trunk/Source

[iOS] Avoid taking / releasing process assertions too quickly due to database activity
https://bugs.webkit.org/show_bug.cgi?id=173879
<rdar://problem/32412701>

Reviewed by Antti Koivisto.

Source/WebCore:

Add HysteresisActivity to WebSQLiteDatabaseTrackerClient to avoid taking / releasing
process assertion too quickly due to database activity.

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

(WebCore::WebSQLiteDatabaseTrackerClient::WebSQLiteDatabaseTrackerClient):
(WebCore::WebSQLiteDatabaseTrackerClient::willBeginFirstTransaction):
(WebCore::WebSQLiteDatabaseTrackerClient::didFinishLastTransaction):
(WebCore::WebSQLiteDatabaseTrackerClient::hysteresisUpdated):

Source/WebKit2:

Specify an activity name when taking the process assertion to facilitate
debugging in the future. It took me a while to figure out this assertion
was the one that was too aggressive because it was anonymous.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _setUpSQLiteDatabaseTrackerClient]):

2:37 PM Changeset in webkit [218845] by sbarati@apple.com
  • 14 edits
    1 add in trunk

Function constructor needs to follow the spec and validate parameters and body independently
https://bugs.webkit.org/show_bug.cgi?id=173303
<rdar://problem/32732526>

Reviewed by Keith Miller.

JSTests:

  • ChakraCore/test/Function/FuncBodyES5.baseline-jsc:
  • stress/function-constructor-semantics.js: Added.

(assert):
(hasSyntaxError):
(foo):
(async.foo):
(testError):
(testOK.toString):
(toString):

LayoutTests/imported/w3c:

  • web-platform-tests/html/webappapis/scripting/events/inline-event-handler-ordering-expected.txt:
  • web-platform-tests/html/webappapis/scripting/events/invalid-uncompiled-raw-handler-compiled-late-expected.txt:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-attribute-expected.txt:
  • web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-in-body-onerror-expected.txt:

Source/JavaScriptCore:

The Function constructor must check the arguments and body strings
independently for syntax errors. People rely on this specified behavior
to verify that a particular string is a valid function body. We used
to check these things strings concatenated together, instead of
independently. For example, this used to be valid: Function("/*", "*/){").
However, we should throw a syntax error here since "(/*)" is not a valid
parameter list, and "*/){" is not a valid body.

To implement the specified behavior, we check the syntax independently of
both the body and the parameter list. To check that the parameter list has
valid syntax, we check that it is valid if in a function with an empty body.
To check that the body has valid syntax, we check it is valid in a function
with an empty parameter list.

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck):

LayoutTests:

  • fast/dom/attribute-event-listener-errors-expected.txt:
  • fast/events/attribute-listener-deletion-crash-expected.txt:
  • fast/events/window-onerror-syntax-error-in-attr-expected.txt:
  • js/dom/invalid-syntax-for-function-expected.txt:
2:35 PM Changeset in webkit [218844] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

Using public logging for WebRTC release logging
https://bugs.webkit.org/show_bug.cgi?id=173881

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

No change of behavior.

  • Modules/mediastream/PeerConnectionBackend.cpp:

(WebCore::PeerConnectionBackend::createOfferSucceeded):
(WebCore::PeerConnectionBackend::createOfferFailed):
(WebCore::PeerConnectionBackend::createAnswerSucceeded):
(WebCore::PeerConnectionBackend::createAnswerFailed):
(WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
(WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
(WebCore::PeerConnectionBackend::addIceCandidateFailed):
(WebCore::PeerConnectionBackend::newICECandidate):

  • Modules/mediastream/RTCPeerConnection.cpp:

(WebCore::RTCPeerConnection::queuedSetLocalDescription):
(WebCore::RTCPeerConnection::queuedSetRemoteDescription):
(WebCore::RTCPeerConnection::queuedAddIceCandidate):
(WebCore::RTCPeerConnection::updateIceGatheringState):
(WebCore::RTCPeerConnection::updateIceConnectionState):

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):

2:30 PM Changeset in webkit [218843] by don.olmstead@sony.com
  • 16 edits
    1 copy
    1 add in trunk

[PAL] Add symbol export macros for PAL
https://bugs.webkit.org/show_bug.cgi?id=171519

Reviewed by Konstantin Tokarev.

Source/WebCore:

No new tests. No change in behavior.

  • CMakeLists.txt:
  • config.h:
  • platform/PlatformExportMacros.h:

Source/WebCore/PAL:

No new tests. No change in behavior.

  • Configurations/CopyPALHeaders.xcconfig: Added.
  • PAL.xcodeproj/project.pbxproj:
  • config.h:
  • pal/ExportMacros.h: Copied from Source/WebCore/platform/PlatformExportMacros.h.
  • pal/PlatformWin.cmake:
  • pal/crypto/CryptoDigest.h:

Source/WebKit2:

  • config.h:

Tools:

  • DumpRenderTree/config.h:
  • TestWebKitAPI/CMakeLists.txt:
  • TestWebKitAPI/config.h:
  • WebKitTestRunner/config.h:
2:23 PM Changeset in webkit [218842] by rniwa@webkit.org
  • 2 edits in trunk/Source/WebKit2

ProcessLauncherMac could leak a xpc connection when the process had failed to launch
https://bugs.webkit.org/show_bug.cgi?id=173865

Reviewed by Antti Koivisto.

Explicitly cancel the XPC connection even When the process launch had failed to avoid a leak.

  • UIProcess/Launcher/mac/ProcessLauncherMac.mm:

(WebKit::ProcessLauncher::launchProcess):

2:10 PM Changeset in webkit [218841] by wilander@apple.com
  • 30 edits
    4 adds in trunk

Resource Load Statistics: Add telemetry
https://bugs.webkit.org/show_bug.cgi?id=173499
<rdar://problem/32826094>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: http/tests/loading/resourceLoadStatistics/telemetry-generation.html

  • loader/ResourceLoadObserver.cpp:

(WebCore::ResourceLoadObserver::fireTelemetryHandler):

Test infrastructure.

  • loader/ResourceLoadObserver.h:
  • loader/ResourceLoadStatisticsStore.cpp:

(WebCore::ResourceLoadStatisticsStore::setFireTelemetryCallback):
(WebCore::ResourceLoadStatisticsStore::fireTelemetryHandler):

Test infrastructure.

(WebCore::ResourceLoadStatisticsStore::sortedPrevalentResourceTelemetry):

Convenience function for telemetry.

  • loader/ResourceLoadStatisticsStore.h:

Added struct WebCore::PrevalentResourceTelemetry.

  • page/DiagnosticLoggingKeys.cpp:

(WebCore::DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey):

Added.

  • page/DiagnosticLoggingKeys.h:

Source/WebKit2:

  • PlatformGTK.cmake:

Added UIProcess/WebResourceLoadStatisticsTelemetry.cpp

  • PlatformMac.cmake:

Added UIProcess/WebResourceLoadStatisticsTelemetry.cpp

  • PlatformWPE.cmake:

Added UIProcess/WebResourceLoadStatisticsTelemetry.cpp

  • UIProcess/API/C/WKResourceLoadStatisticsManager.cpp:

(WKResourceLoadStatisticsManagerFireTelemetryHandler):
(WKResourceLoadStatisticsManagerSetNotifyPagesWhenTelemetryWasCaptured):

Test infrastructure.

  • UIProcess/API/C/WKResourceLoadStatisticsManager.h:
  • UIProcess/WebProcessProxy.cpp:

(WebKit::WebProcessProxy::notifyPageStatisticsTelemetryFinished):

Test infrastructure.

  • UIProcess/WebProcessProxy.h:
  • UIProcess/WebResourceLoadStatisticsManager.cpp:

(WebKit::WebResourceLoadStatisticsManager::fireTelemetryHandler):
(WebKit::WebResourceLoadStatisticsManager::setNotifyPagesWhenTelemetryWasCaptured):
(WebKit::WebResourceLoadStatisticsManager::resetToConsistentState):

Test infrastructure.

  • UIProcess/WebResourceLoadStatisticsManager.h:
  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::WebResourceLoadStatisticsStore):

Configures a timer for telemetry capture. Fires 5 seconds after launch
and then every 24 hours.

(WebKit::WebResourceLoadStatisticsStore::setNotifyPagesWhenDataRecordsWereScanned):

Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.

(WebKit::WebResourceLoadStatisticsStore::removeDataRecords):

Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.

(WebKit::WebResourceLoadStatisticsStore::processStatisticsAndDataRecords):

Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.

(WebKit::WebResourceLoadStatisticsStore::registerSharedResourceLoadObserver):

Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.

(WebKit::WebResourceLoadStatisticsStore::grandfatherExistingWebsiteData):

Variable renamed notifyPages -> notifyPagesWhenDataRecordsWereScanned.

(WebKit::WebResourceLoadStatisticsStore::telemetryTimerFired):

Calls WebResourceLoadStatisticsTelemetry::calculateAndSubmit().

  • UIProcess/WebResourceLoadStatisticsStore.h:
  • UIProcess/WebResourceLoadStatisticsTelemetry.cpp: Added.

(WebKit::numberOfResourcesWithUserInteraction):
(WebKit::median):
(WebKit::nonEphemeralWebPageProxy):
(WebKit::submitTopList):
(WebKit::submitTopLists):
(WebKit::notifyPages):
(WebKit::WebResourceLoadStatisticsTelemetry::calculateAndSubmit):
(WebKit::WebResourceLoadStatisticsTelemetry::setNotifyPagesWhenTelemetryWasCaptured):

  • UIProcess/WebResourceLoadStatisticsTelemetry.h: Added.
  • WebKit2.xcodeproj/project.pbxproj:

Tools:

Adds three new testRunner functions:

  • installStatisticsDidRunTelemetryCallback()
  • statisticsFireTelemetryHandler()
  • setStatisticsNotifyPagesWhenTelemetryWasCaptured()
  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:

(WTR::InjectedBundle::didReceiveMessageToPage):

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp:

(WTR::TestRunner::installStatisticsDidRunTelemetryCallback):
(WTR::TestRunner::statisticsDidRunTelemetryCallback):
(WTR::TestRunner::statisticsFireTelemetryHandler):
(WTR::TestRunner::setStatisticsNotifyPagesWhenTelemetryWasCaptured):

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

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::statisticsFireTelemetryHandler):
(WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured):

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

(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):

LayoutTests:

  • http/tests/loading/resourceLoadStatistics/telemetry-generation-expected.txt: Added.
  • http/tests/loading/resourceLoadStatistics/telemetry-generation.html: Added.
  • platform/wk2/TestExpectations:

Enabled here since ResourceLoadStatistics is WK2-only.

2:06 PM Changeset in webkit [218840] by commit-queue@webkit.org
  • 13 edits in trunk

Add missing includes to fix compilation error on FreeBSD
https://bugs.webkit.org/show_bug.cgi?id=172919

Patch by Ting-Wei Lan <Ting-Wei Lan> on 2017-06-27
Reviewed by Mark Lam.

Source/JavaScriptCore:

  • API/JSRemoteInspector.h:
  • API/tests/GlobalContextWithFinalizerTest.cpp:
  • API/tests/TypedArrayCTest.cpp:

Source/WebCore:

No new tests needed.

  • crypto/gcrypt/CryptoKeyECGCrypt.cpp:
  • platform/audio/ReverbAccumulationBuffer.cpp:

Source/WebKit2:

  • UIProcess/API/C/WKContextPrivate.h:
  • UIProcess/API/C/WKPagePrivate.h:
  • UIProcess/ProcessAssertion.h:

Tools:

  • ImageDiff/cairo/PlatformImageCairo.cpp:
2:01 PM Changeset in webkit [218839] by Matt Baker
  • 7 edits
    1 move
    3 adds in trunk/Source/WebInspectorUI

Web Inspector: no discoverable way to dismiss the split console
https://bugs.webkit.org/show_bug.cgi?id=167034
<rdar://problem/30023436>

Reviewed by Devin Rousso.

This patch adds an Xcode-style toggle button to the left of the
split console navigation bar. Additionally, the split console code
has been broken out into it's own class to reduce the clutter in
Main.js/css, and simplify future console maintenance.

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

(WebInspector.loaded):
Replace the "split" ContentBrowser with a new ConsoleDrawer class,
which encapsulates the drawer height setting and resize behavior.
(WebInspector.contentLoaded):
The console drawer manages its own height.

  • UserInterface/Images/HideConsoleDrawer.svg: Added.
  • UserInterface/Images/ShowConsoleDrawer.svg: Added.

Console drawer toggle button images. Styled after corresponding Xcode button.

  • UserInterface/Main.html:
  • UserInterface/Views/ConsoleDrawer.css: Added.

Moved old #split-content-browser styles over from Main.css.
(.console-drawer):
(.console-drawer > .navigation-bar):
(.console-drawer > .navigation-bar > .item.button:not(.clear-log)):
Make button spacing less cramped.
(.console-drawer > .navigation-bar > .item:not(.flexible-space)):
(.console-drawer > .navigation-bar > :matches(.item.button, .log-scope-bar)):
(.console-drawer > .navigation-bar > .item > .glyph,):

  • UserInterface/Views/ConsoleDrawer.js: Added.

New class responsible for console drawer expand / collapse and resizer
dragging, which was previously part of Main.js. The console drawer toolbar
now has a toggle button, debugging controls, and a call frames path item.
The "Show Console Tab" button has been removed.

(WebInspector.ConsoleDrawer):
(WebInspector.ConsoleDrawer.prototype.get collapsed):
(WebInspector.ConsoleDrawer.prototype.set collapsed):
(WebInspector.ConsoleDrawer.prototype.get height):
(WebInspector.ConsoleDrawer.prototype.shown):
(WebInspector.ConsoleDrawer.prototype.layout):
(WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDrag):
(WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown.dockedResizerDragEnd):
(WebInspector.ConsoleDrawer.prototype._consoleResizerMouseDown):
(WebInspector.ConsoleDrawer.prototype._restoreDrawerHeight):
(WebInspector.ConsoleDrawer.prototype._updateDrawerHeight):
(WebInspector.ConsoleDrawer.prototype._selectedTabContentViewDidChange):
When switching to a tab that doesn't support showing the console drawer,
hide it without altering the collapsed state.

  • UserInterface/Views/LogContentView.js:

(WebInspector.LogContentView.prototype.get navigationItems):

  • UserInterface/Views/Main.css:

Renamed #split-content-browser to #console-drawer, and moved related
styles to ConsoleDrawer.css.

(#split-content-browser): Deleted.
(#split-content-browser > .navigation-bar): Deleted.
(#split-content-browser > .navigation-bar :matches(.find-banner, .find-banner + .divider)): Deleted.
(#split-content-browser > .navigation-bar .item): Deleted.
(#split-content-browser > .navigation-bar .item:not(.flexible-space)): Deleted.
(#split-content-browser .hierarchical-path-component.log-icon .icon): Deleted.
(#split-content-browser .hierarchical-path-component.log-icon .title): Deleted.
(#split-content-browser .hierarchical-path-component.log-icon select): Deleted.
(#split-content-browser > .navigation-bar > :matches(.hierarchical-path, .log-scope-bar)): Deleted.
(#split-content-browser > .navigation-bar > .log-scope-bar > li): Deleted.

  • UserInterface/Views/QuickConsole.js:

(WebInspector.QuickConsole):
(WebInspector.QuickConsole.prototype._toggleOrFocus):
(WebInspector.QuickConsole.prototype._updateStyles):
Update top border style in response to change in selected TabBrowser
tab or the console drawer collapsed state.

(WebInspector.QuickConsole.prototype.consoleLogVisibilityChanged): Deleted.
(WebInspector.QuickConsole.prototype.set keyboardShortcutDisabled): Deleted.

12:52 PM Changeset in webkit [218838] by Alan Bujtas
  • 3 edits in trunk/Source/WebCore

Add RenderEmbeddedObject::getReplacementTextGeometry helper.
https://bugs.webkit.org/show_bug.cgi?id=173847

Reviewed by Simon Fraser.

...and remove getReplacementTextGeometry's redundant return value.

No change in functionality.

  • rendering/RenderEmbeddedObject.cpp:

(WebCore::RenderEmbeddedObject::paintReplaced):
(WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
(WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
(WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):

  • rendering/RenderEmbeddedObject.h:
12:11 PM Changeset in webkit [218837] by Wenson Hsieh
  • 31 edits in trunk/Source

Refactor drag start codepaths to plumb a DragItem to client layers
https://bugs.webkit.org/show_bug.cgi?id=173832
Work towards <rdar://problem/32236827>

Reviewed by Ryosuke Niwa and Tim Horton.

Source/WebCore:

Refactor drag start logic in WebCore to set up a DragItem and propagate it to WebDragClient. No change in behavior.

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

(WebCore::DragController::startDrag):
(WebCore::DragController::doImageDrag):
(WebCore::DragController::doSystemDrag):

Refactor to pass along a DragItem. Also, remove unused drag image anchor computation.

  • page/DragController.h:
  • platform/DragImage.h:
  • platform/DragItem.h:

Add additional information needed to begin a drag on iOS.

(WebCore::DragItem::encode):
(WebCore::DragItem::decode):

Add IPC serialization/deserialization support for DragItem.

  • platform/PasteboardWriterData.cpp:

(WebCore::PasteboardWriterData::isEmpty):

  • platform/PasteboardWriterData.h:

Source/WebKit/mac:

Refactor code used to start a drag in WebKit1 to plumb a single DragItem from DragController to the client layer
in WebDragClient that contains all the information needed to begin a drag. Also renames _setDataInteractionData:
to _startDrag: to match logic used to start a drag on other platforms.

No behavior change -- the same information should be propagated to AppKit and UIKit when beginning a drag, only
through the DragItem struct.

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

(WebDragClient::startDrag):
(WebDragClient::dragSourceActionMaskForPoint):
(WebDragClient::willPerformDragSourceAction):
(WebDragClient::beginDrag):

  • WebView/WebView.mm:

(-[WebView _startDrag:]):
(-[WebView _setDataInteractionData:textIndicator:atClientPosition:anchorPoint:action:]): Deleted.

  • WebView/WebViewInternal.h:

Source/WebKit/win:

Adjust for changes to WebDragClient::startDrag by pulling information out of DragItem.

  • WebCoreSupport/WebDragClient.cpp:

(WebDragClient::startDrag):

  • WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Add support for serializing a DragItem over IPC. This encodes and decodes all members of DragItem except for the
PasteboardWriterData and the DragImage's image. The DragItem is sent over to the UI process in
WebDragClient::startDrag via the WebPageProxy::startDrag IPC message (renamed from WebPageProxy::setDragImage)
which now takes a DragItem.

  • UIProcess/Cocoa/WebPageProxyCocoa.mm:

(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::setDragImage): Deleted.

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:

Rename SetDragImage to StartDrag and refactor to receive only a DragItem and shareable bitmap handle.

  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::startDrag):
(WebKit::PageClientImpl::startDataInteractionWithImage): Deleted.

  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView _startDrag:item:]):
(-[WKContentView _startDataInteractionWithImage:withIndicatorData:atClientPosition:anchorPoint:action:]): Deleted.

Rename startDataInteractionWithImage to startDrag.

  • UIProcess/mac/WebPageProxyMac.mm:

(WebKit::WebPageProxy::startDrag):
(WebKit::WebPageProxy::setDragImage): Deleted.

  • WebProcess/WebCoreSupport/WebDragClient.cpp:

(WebKit::WebDragClient::startDrag):

  • WebProcess/WebCoreSupport/WebDragClient.h:
  • WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:

(WebKit::WebDragClient::startDrag):

  • WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:

(WebKit::WebDragClient::startDrag):

10:43 AM Changeset in webkit [218836] by Joseph Pecoraro
  • 15 edits
    3 adds in trunk

Web Inspector: Crash generating object preview for ArrayIterator
https://bugs.webkit.org/show_bug.cgi?id=173754
<rdar://problem/32859012>

Reviewed by Saam Barati.

Source/JavaScriptCore:

When Inspector generates an object preview for an ArrayIterator instance it made
a "clone" of the original ArrayIterator instance by constructing a new object with
the instance's structure. However, user code could have modified that instance's
structure, such as adding / removing properties. The return property had special
meaning, and our clone did not fill that slot. This approach is brittle in that
we weren't satisfying the expectations of an object with a particular Structure,
and the original goal of having Web Inspector peek values of built-in Iterators
was to avoid observable behavior.

This tightens Web Inspector's Iterator preview to only peek values if the
Iterators would actually be non-observable. It also builds an ArrayIterator
clone like a regular object construction.

  • inspector/JSInjectedScriptHost.cpp:

(Inspector::cloneArrayIteratorObject):
Build up the Object from scratch with a new ArrayIterator prototype.

(Inspector::JSInjectedScriptHost::iteratorEntries):
Only clone and peek iterators if it would not be observable.
Also update iteration to be more in line with IterationOperations, such as when
we call iteratorClose.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::JSGlobalObject):
(JSC::JSGlobalObject::init):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::stringIteratorProtocolWatchpoint):

  • runtime/JSGlobalObjectInlines.h:

(JSC::JSGlobalObject::isStringPrototypeIteratorProtocolFastAndNonObservable):
Add a StringIterator WatchPoint in line with the Array/Map/Set iterator watchpoints.

  • runtime/JSMap.cpp:

(JSC::JSMap::isIteratorProtocolFastAndNonObservable):
(JSC::JSMap::canCloneFastAndNonObservable):

  • runtime/JSMap.h:
  • runtime/JSSet.cpp:

(JSC::JSSet::isIteratorProtocolFastAndNonObservable):
(JSC::JSSet::canCloneFastAndNonObservable):

  • runtime/JSSet.h:

Promote isIteratorProtocolFastAndNonObservable to a method.

  • runtime/JSObject.cpp:

(JSC::canDoFastPutDirectIndex):

  • runtime/JSTypeInfo.h:

(JSC::TypeInfo::isArgumentsType):
Helper to detect if an Object is an Arguments type.

LayoutTests:

  • platform/mac/inspector/model/remote-object-expected.txt:
  • inspector/model/remote-object-expected.txt:
  • inspector/model/remote-object.html:

Test generating a preview for an ArrayIterator that has had a return property added to it.

  • inspector/model/remote-object-mutated-iterators-expected.txt: Added.
  • inspector/model/remote-object-mutated-iterators.html: Added.

Test generating a preview for different iterators after the IteratorPrototypes have been mutated.

  • inspector/model/resources/remote-object-utilities.js: Added.

(runInBrowserTest):
(TestPage.registerInitializer):
(TestPage.registerInitializer.checkComplete):
(TestPage.registerInitializer.window.runSteps):
Share code for remote-object dump tests.

8:59 AM Changeset in webkit [218835] by fred.wang@free.fr
  • 14 edits in trunk

Some tests to verify forbidden frame navigation time out
https://bugs.webkit.org/show_bug.cgi?id=173657

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

LayoutTests/imported/w3c:

  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation-2-expected.txt: Update the text expectation to PASS.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_allow_top_navigation_by_user_activation_without_user_gesture-expected.txt: Ditto.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_navigate_ancestor-1-expected.txt: Ditto.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-3-expected.txt: Add the security error until bug 173162 is fixed.
  • web-platform-tests/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_nonescaping-3-expected.txt: Ditto.

Source/WebCore:

Currently some tests try and perform a forbidden frame navigation and verify the
corresponding console error. However, WebKit does not raise any exception for such error so
the tests have to wait until the timeout limit to complete, which makes execution slow.
This patch modifies the setters of window.location for which such error may happen in order
to raise an exception so the tests behave as expected.

No new tests, already covered by existing tests.

  • page/Location.cpp: Adjust Location::setLocation to return a security exception and pass it

to the callers.
(WebCore::Location::setHref): Adjust function to possibly return an exception.
(WebCore::Location::setProtocol): Ditto.
(WebCore::Location::setHost): Ditto.
(WebCore::Location::setHostname): Ditto.
(WebCore::Location::setPort): Ditto.
(WebCore::Location::setPathname): Ditto.
(WebCore::Location::setSearch): Ditto.
(WebCore::Location::setHash): Ditto.
(WebCore::Location::assign): Ditto.
(WebCore::Location::setLocation): FrameLoader::findFrameForNavigation is really only used
to verify whether navigating m_frame is permitted so it is more simple and clearer to do it
directly. When navigation is not permitted, this function now raises a security exception.

  • page/Location.h: Modify some setters to return an ExceptionOr<void>.
  • page/Location.idl: Allow some setters to raise an exception.

LayoutTests:

  • fast/frames/sandboxed-iframe-navigation-top-denied-expected.txt: Add the security error.
  • http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child.html: Adjust

the test to catch and dump the exception and complete immediately.

  • http/tests/security/frameNavigation/inactive-function-in-popup-navigate-child-expected.txt:

Add the dumped security error exception.

7:49 AM Changeset in webkit [218834] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit2

[iOS DnD] [WK2] WKWebView does not handle drag sessions that exit and re-enter
https://bugs.webkit.org/show_bug.cgi?id=173856
<rdar://problem/32957100>

Reviewed by Ryosuke Niwa.

Upon exiting a WKContentView, the dropSession tracked by _dataInteractionState is not cleared out. If the drag
session re-enters the WKWebView, a _different_ UIDropSession is sent to the drop delegate, causing us to bail
from handling the session altogether in -dropInteraction:canHandleSession:. To fix this, we need to clear out
the dropSession when the drag session exits the view.

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKContentView dropInteraction:sessionDidExit:]):

7:47 AM Changeset in webkit [218833] by commit-queue@webkit.org
  • 2 edits in trunk/LayoutTests

LayoutTest webrtc/datachannel/multiple-connections.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=173853

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

  • webrtc/datachannel/multiple-connections.html:
4:13 AM WebKitGTK/2.16.x edited by clopez@igalia.com
(diff)
Note: See TracTimeline for information about the timeline view.