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

Timeline



Jan 7, 2018:

11:23 PM Changeset in webkit [226500] by Ms2ger@igalia.com
  • 9 edits in trunk

Implement createImageBitmap(ImageBitmap)
https://bugs.webkit.org/show_bug.cgi?id=181287

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

  • web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: rebaseline.

Source/WebCore:

Tests: imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage.html

imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args.html

  • html/ImageBitmap.cpp:

(WebCore::ImageBitmap::createPromise):

LayoutTests:

  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: rebaseline.
  • platform/gtk/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: rebaseline.
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-drawImage-expected.txt: rebaseline.
  • platform/wpe/imported/w3c/web-platform-tests/2dcontext/imagebitmap/createImageBitmap-invalid-args-expected.txt: rebaseline.
10:00 PM Changeset in webkit [226499] by ddkilzer@apple.com
  • 28 edits
    1 move in trunk/Source

Enable -Wcast-qual for WebInspectorUI, WebKitLegacy, WebKit projects
<https://webkit.org/b/181256>
<rdar://problem/36281730>

Reviewed by Darin Adler.

Source/WebInspectorUI:

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Add -Wcast-qual.

Source/WebKit:

  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Add -Wcast-qual.

  • NetworkProcess/cache/NetworkCacheCodersCocoa.cpp:

(WTF::Persistence::encodeCertificateChain): Include
TypeCastsCF.h from WTF, and use
checked_cf_cast<SecCertificateRef>() to fix warning.

  • Platform/cocoa/WKCrashReporter.mm:

(WebKit::setCrashReportApplicationSpecificInformation):

  • Move oldMessage check above nullptr check to fix a leak when passing in nullptr after previously setting the crash string.
  • Change C-style cast to const_cast<char*>() to fix warning.
  • PluginProcess/mac/PluginProcessShim.mm:

(WebKit::shim_shmat): Change C-style cast to
const_cast<void*>() to fix warning.

  • Shared/Authentication/mac/AuthenticationManager.mac.mm:

(WebKit::leafCertificate): Include TypeCastsCF.h from
WTF, and use checked_cf_cast<SecCertificateRef>() to fix
warning.

  • Shared/cf/ArgumentCodersCF.cpp:

(IPC::encode): Use static_cast<>(const_cast<void*>() to
fix warnings since the CFTypeID has already been
checked.

  • Shared/mac/WebCoreArgumentCodersMac.mm:

(IPC::decodeNSError): Use an auto variable to hold the
CFMutableDictionaryRef, then WTFMove() to assign it back to
userInfo.

  • UIProcess/Cocoa/WebViewImpl.mm:

(WebKit::takeWindowSnapshot): Include TypeCastsCF.h from
WTF, and use checked_cf_cast<CGImageRef>() to fix
warning.

Source/WebKitLegacy:

  • PlatformMac.cmake:
  • WebKitLegacy.xcodeproj/project.pbxproj:
  • Rename WebNSDataExtras.m to WebNSDataExtras.mm and change file type to Objective-C++.

Source/WebKitLegacy/mac:

  • Carbon/CarbonUtils.m:

(PoolCleaner):

  • Use #pragmas to ignore -Wcast-qual warnings when using a C-style cast from CFTypeRef to CFRunloopRef.
  • Carbon/CarbonWindowFrame.m:

(-[CarbonWindowFrame title]):

  • Use #pragmas to ignore -Wcast-qual warnings when using a C-style cast from CFStringRef to NSString *.
  • Carbon/HIViewAdapter.m:

(+[HIViewAdapter getHIViewForNSView:]):

  • Use #pragmas to ignore -Wcast-qual warnings when using a C-style cast from CFTypeRef to HIViewRef.
  • Configurations/Base.xcconfig:

(WARNING_CFLAGS): Add -Wcast-qual.

  • Misc/WebElementDictionary.mm:

(-[WebElementDictionary objectForKey:]):

  • Use static_cast<SEL>(const_cast<void*>()) to fix warning.
  • Misc/WebNSDataExtras.mm: Renamed from Source/WebKitLegacy/mac/Misc/WebNSDataExtras.m.

(-[NSString _web_capitalizeRFC822HeaderFieldName]):
(-[NSData _webkit_guessedMIMETypeForXML]):
(-[NSData _webkit_guessedMIMEType]):
(-[NSData _web_isCaseInsensitiveEqualToCString:]):
(_findEOL):
(-[NSData _webkit_parseRFC822HeaderFields]):
(-[NSData _web_startsWithBlankLine]):
(-[NSData _web_locationAfterFirstBlankLine]):

  • Rename WebNSDataExtras.m to WebNSDataExtras.mm and change file type to Objective-C++. This fixes the warnings about discarding the const modifier when casing from CFStringRef to NSString * because in older clang versions, -Wcast-qual was completely broken when compiling C++ and Objective-C++ source files. In newer clang versions, discarding the const modifier for toll-free bridged types is ignored when compiling Objective-C++ source.
  • Update copyright and license header.
  • Use reinterpret_cast<> and static_cast<> to fix warnings unrelated to (NSString *) C-style casts.
  • Replace use of MIN() macro with std::min<> template functions.
  • Fix location of * for local variables modified above.
  • Plugins/Hosted/NetscapePluginHostManager.mm:

(WebKit::NetscapePluginHostManager::spawnPluginHost):
(WebKit::NetscapePluginHostManager::initializeVendorPort):
(WebKit::NetscapePluginHostManager::instantiatePlugin):

  • Use static_cast<uint8_t*>(const_cast<void*>()) to fix warnings.
  • Plugins/Hosted/NetscapePluginHostProxy.mm:

(WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):

  • Use reinterpret_cast<mig_subsystem_t>(const_cast<struct WKWebKitPluginClient_subsystem*>()) to fix warning.
  • Plugins/Hosted/ProxyInstance.mm:

(WebKit::ProxyInstance::invoke):

  • Use static_cast<char*>(const_cast<void*>()) to fix warning when using -[NSData bytes].

(WebKit::ProxyInstance::fieldValue const):

  • Use reinterpret_cast<char*>(const_cast<unsigned char*>()) to fix warning when using CFDataGetBytePtr().
  • Plugins/Hosted/WebTextInputWindowController.m:

(-[WebTextInputPanel _interpretKeyEvent:string:]):

  • Use #pragma to ignore -Wcast-qual warning since there is not a good way to avoid this warning in Objective-C.
  • Plugins/WebNetscapePluginStream.mm:

(WebNetscapePluginStream::deliverData):

  • Use const_cast<void*>() to fix warning when using -[NSData bytes].
  • Plugins/WebNetscapePluginView.mm:

(-[WebNetscapePluginView _createPlugin]):

  • Change C-style cast to const_cast<char*>() to fix warning.
  • WebCoreSupport/WebChromeClient.mm:

(WebChromeClient::wrapCryptoKey const):
(WebChromeClient::unwrapCryptoKey const):

  • Change C-style cast to static_cast<uint8_t*>(const_cast<void*>() to fix warning.
  • WebView/WebPDFView.mm:

(_applicationInfoForMIMEType):

  • Change local variable type from 'NSURL *' to 'CFURLRef' to fix warning. Cast back to 'NSURL *' when calling -[NSURL path].
9:33 PM Changeset in webkit [226498] by jmarcell@apple.com
  • 4 edits in tags/Safari-605.1.19.1

Cherry-pick r226359. rdar://problem/36146670

9:32 PM Changeset in webkit [226497] by jmarcell@apple.com
  • 7 edits in tags/Safari-605.1.19.1/Source

Versioning.

9:24 PM Changeset in webkit [226496] by jmarcell@apple.com
  • 1 copy in tags/Safari-605.1.19.1

New tag.

5:22 PM Changeset in webkit [226495] by rniwa@webkit.org
  • 5 edits in trunk

Reduce the precision of "high" resolution time to 1ms
https://bugs.webkit.org/show_bug.cgi?id=180910
<rdar://problem/36085943>

Reviewed by Saam Barati.

Source/WebCore:

Reduced the high prevision time's resolution to 1ms, the same precision as Date.now().

Also fixed the bug in fillRTCStats that we weren't reducing the time resolution in RTCStats dictionaries.

  • Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:

(WebCore::fillRTCStats):

  • page/Performance.cpp:

(WebCore::Performance::reduceTimeResolution):

LayoutTests:

Add a flaky test expectation to imported/w3c/web-platform-tests/workers/worker-performance.worker.html
due to a test bug. The test fix is tracked in https://github.com/w3c/web-platform-tests/pull/8711

2:50 PM Changeset in webkit [226494] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKit

[cmake] Unset CMAKE_REQUIRED_LIBRARIES after check_function_exists test
https://bugs.webkit.org/show_bug.cgi?id=181371

Reviewed by Michael Catanzaro.

This variable is used by check_function_exists internally, its value
should be never used for anything else.

  • CMakeLists.txt:
2:22 PM Changeset in webkit [226493] by sbarati@apple.com
  • 2 edits in trunk/Tools

Add total exits and total compilations sorting mode to the "full" command in display-profiler-output
https://bugs.webkit.org/show_bug.cgi?id=181372

Reviewed by Filip Pizlo.

Adding these sorting modes makes it easier to analyze functions
that recompile a lot and exit a lot.

  • Scripts/display-profiler-output:

Jan 6, 2018:

10:31 PM Changeset in webkit [226492] by Simon Fraser
  • 6 edits
    2 adds in trunk

Possible crash computing event regions
https://bugs.webkit.org/show_bug.cgi?id=181368
rdar://problem/34847081

Reviewed by Zalan Bujtas.

Source/WebCore:

Don't trigger layout in Element::absoluteEventHandlerBounds(), since this can run arbirary script
which might delete elements or re-enter Document::absoluteRegionForEventTargets().

It's OK to not trigger layout, because if layout is dirty, the next layout will update event regions again.

Add a LayoutDisallowedScope to check that Document::absoluteRegionForEventTargets() doesn't
trigger layout, and move the check for LayoutDisallowedScope::isLayoutAllowed() from Document::updateLayout()
to LayoutContext::layout(), since some layouts don't happen via the former (e.g. the one being removed here).

The test checks that the assertion does not fire. I was not able to get a reliable test for any crash.

Test: fast/events/event-handler-regions-layout.html

  • dom/Document.cpp:

(WebCore::Document::updateLayout):
(WebCore::Document::absoluteRegionForEventTargets):

  • dom/Element.cpp:

(WebCore::Element::absoluteEventHandlerBounds):

  • page/LayoutContext.cpp:

(WebCore::LayoutContext::layout):

  • rendering/LayoutDisallowedScope.h: Move the #ifdefs around to avoid defining the enum twice.

(WebCore::LayoutDisallowedScope::LayoutDisallowedScope):
(WebCore::LayoutDisallowedScope::isLayoutAllowed):

LayoutTests:

  • fast/events/event-handler-regions-layout-expected.txt: Added.
  • fast/events/event-handler-regions-layout.html: Added.
9:48 PM Changeset in webkit [226491] by Simon Fraser
  • 5 edits
    2 adds in trunk

Crash under RenderLayer::scrollTo() with marquee
https://bugs.webkit.org/show_bug.cgi?id=181349
rdar://problem/36190168

Reviewed by Zalan Bujtas.

Source/WebCore:

Don't call updateWidgetPositions() synchonously during RenderLayer scrolling, because it
can run arbitrary script which may trigger destruction of this RenderLayer.

Instead, queue up updateWidgetPositions() on a zero-delay timer.

Under some circumstances this may allow a paint to occur before the widgets have been
updated (which could be fixed with a more invasive change), but in practice I saw no
painting issues with plug-ins or iframes inside overflow scroll, in WebKit or LegacyWebKit.

Test: fast/scrolling/marquee-scroll-crash.html

  • page/FrameView.cpp:

(WebCore::FrameView::FrameView):
(WebCore::FrameView::updateWidgetPositions):
(WebCore::FrameView::scheduleUpdateWidgetPositions):
(WebCore::FrameView::updateWidgetPositionsTimerFired):

  • page/FrameView.h:
  • rendering/RenderLayer.cpp:

(WebCore::RenderLayer::scrollTo):

LayoutTests:

  • fast/scrolling/marquee-scroll-crash-expected.txt: Added.
  • fast/scrolling/marquee-scroll-crash.html: Added.
9:18 PM Changeset in webkit [226490] by dino@apple.com
  • 4 edits
    4 adds in trunk

Accurately clip copyTexImage2D and copyTexSubImage2D
https://bugs.webkit.org/show_bug.cgi?id=181356
<rdar://problem/35083877>

Reviewed by Eric Carlson.

Source/WebCore:

The code to make sure copyTexSubImage2D and copyTexImage2D will not try to read
out of bounds had a bad bug introduced here:
https://bugs.webkit.org/show_bug.cgi?id=51421

With appropriate parameters, it would produce a rectangle with
negative dimensions. Most GL drivers just ignored this, but some
are not happy.

Test: fast/canvas/webgl/copy-tex-image-and-sub-image-2d-bad-input.html

  • html/canvas/WebGLRenderingContextBase.cpp:

(WebCore::clip2D): Reimplement this in a more sane manner, and use
checked arithmetic while here.

  • html/canvas/WebGLRenderingContextBase.h:

(WebCore::clip1D): Deleted.
(WebCore::clip2D): Deleted.

LayoutTests:

  • fast/canvas/webgl/copy-tex-image-and-sub-image-2d-bad-input-expected.txt: Added.
  • fast/canvas/webgl/copy-tex-image-and-sub-image-2d-bad-input.html: Added.
4:15 PM Changeset in webkit [226489] by Yusuke Suzuki
  • 9 edits
    1 add in trunk

Object.getOwnPropertyNames includes "arguments" and "caller" for bound functions
https://bugs.webkit.org/show_bug.cgi?id=181321

Reviewed by Saam Barati.

JSTests:

  • stress/bound-function-does-not-have-caller-and-arguments.js: Added.

(shouldBe):
(testFunction):

  • test262.yaml:

Source/JavaScriptCore:

According to ECMA262 16.2[1], functions created using the bind method must not have
"caller" and "arguments" own properties.

[1]: https://tc39.github.io/ecma262/#sec-forbidden-extensions

  • runtime/JSBoundFunction.cpp:

(JSC::JSBoundFunction::finishCreation):

LayoutTests:

  • inspector/model/remote-object-get-properties-expected.txt:
  • inspector/runtime/getProperties-expected.txt:
  • js/script-tests/strict-throw-type-error.js:
  • js/strict-throw-type-error-expected.txt:
1:01 PM Changeset in webkit [226488] by Antti Koivisto
  • 3 edits in trunk/Source/WebCore

Use WeakPtr for RenderTreePosition::m_nextSibling
https://bugs.webkit.org/show_bug.cgi?id=181363

Reviewed by Zalan Bujtas.

For safety. In most cases it is null and won't cause us to instantiate WeakReferences for
many new objects.

  • rendering/updating/RenderTreePosition.cpp:

(WebCore::RenderTreePosition::computeNextSibling):

  • rendering/updating/RenderTreePosition.h:

(WebCore::RenderTreePosition::RenderTreePosition):
(WebCore::RenderTreePosition::nextSibling const):

8:52 AM Changeset in webkit [226487] by mitz@apple.com
  • 5 edits
    2 moves
    2 adds in trunk/Source/WebKit

REGRESSION (r226218): iOS-only assets are installed on macOS
https://bugs.webkit.org/show_bug.cgi?id=181362

Reviewed by Anders Carlsson.

  • Configurations/WebKit.xcconfig: Exclude everything under Resources/ios when not targeting iOS.
  • Resources/mac: Added.
  • Resources/mac/mediaIcon.pdf: Moved here…
  • Resources/mediaIcon.pdf: …from here.
  • WebKit.xcassets: Moved under Resources/ios.
  • WebKit.xcodeproj/project.pbxproj: Created an ios group under the Resources group, and cleaned up the mac group. Removed the Recovered References group.
12:56 AM Changeset in webkit [226486] by Julien Brianceau
  • 2 edits in trunk/Tools

Unreviewed, remove my Cisco email from contributors.json

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