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

Timeline



Jul 22, 2017:

11:52 PM Changeset in webkit [219788] by jmarcell@apple.com
  • 10 edits in branches/safari-604-branch

Cherry-pick r219662. rdar://problem/33464110

11:52 PM Changeset in webkit [219787] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219711. rdar://problem/33465715

11:52 PM Changeset in webkit [219786] by jmarcell@apple.com
  • 17 edits in branches/safari-604-branch

Cherry-pick r219709. rdar://problem/33462692

11:51 PM Changeset in webkit [219785] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source

Cherry-pick r219703. rdar://problem/33462696

11:51 PM Changeset in webkit [219784] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source

Cherry-pick r219701. rdar://problem/33465715

11:51 PM Changeset in webkit [219783] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219683. rdar://problem/33464463

11:51 PM Changeset in webkit [219782] by jmarcell@apple.com
  • 28 edits
    1 copy in branches/safari-604-branch

Cherry-pick r219668. rdar://problem/33462676

11:51 PM Changeset in webkit [219781] by jmarcell@apple.com
  • 5 edits in branches/safari-604-branch

Cherry-pick r219666. rdar://problem/33464328

11:51 PM Changeset in webkit [219780] by jmarcell@apple.com
  • 10 edits in branches/safari-604-branch

Cherry-pick r219664. rdar://problem/33464115

11:51 PM Changeset in webkit [219779] by jmarcell@apple.com
  • 3 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219661. rdar://problem/33465132

11:51 PM Changeset in webkit [219778] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219645. rdar://problem/33464440

11:51 PM Changeset in webkit [219777] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219641. rdar://problem/33464325

11:51 PM Changeset in webkit [219776] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/JavaScriptCore

Cherry-pick r219633. rdar://problem/33465535

11:50 PM Changeset in webkit [219775] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Source/WebKitLegacy/mac

Cherry-pick r219626. rdar://problem/33465685

11:50 PM Changeset in webkit [219774] by jmarcell@apple.com
  • 4 edits
    2 adds in branches/safari-604-branch

Cherry-pick r219625. rdar://problem/33465689

11:50 PM Changeset in webkit [219773] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219621. rdar://problem/33465059

11:50 PM Changeset in webkit [219772] by jmarcell@apple.com
  • 4 edits in branches/safari-604-branch/Source/WebCore

Cherry-pick r219591. rdar://problem/33464112

11:50 PM Changeset in webkit [219771] by jmarcell@apple.com
  • 2 edits in branches/safari-604-branch/Tools

Cherry-pick r219590. rdar://problem/33465177

11:50 PM Changeset in webkit [219770] by jmarcell@apple.com
  • 3 edits in branches/safari-604-branch/Source/WebKit

Cherry-pick r219588. rdar://problem/33464447

11:50 PM Changeset in webkit [219769] by jmarcell@apple.com
  • 14 edits
    1 add in branches/safari-604-branch

Cherry-pick r219585. rdar://problem/33465177

10:28 PM Changeset in webkit [219768] by Wenson Hsieh
  • 10 edits
    4 deletes in trunk

[iOS WK2] Remove _WKDraggableElementInfo and fold PositionInformationTests into WKRequestActivatedElementInfo
https://bugs.webkit.org/show_bug.cgi?id=174758

Reviewed by Dan Bernstein.

Source/WebKit:

_WKDraggableElementInfo is no longer used in WebKit, so it should be removed. However, some of the scenarios
in PositionInformationTests that depend on _WKDraggableElementInfo are still useful to exercise: namely,
performing both synchronous and asynchronous position information updates while an async position information
update is in flight. This patch refactors these unit tests into 2 new unit tests in the existing
WKRequestActivatedElementInfo test suite.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView _draggableElementAtPosition:]): Deleted.
(-[WKWebView _requestDraggableElementAtPosition:completionBlock:]): Deleted.

  • UIProcess/API/Cocoa/WKWebViewPrivate.h:
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.h: Removed.
  • UIProcess/API/Cocoa/_WKDraggableElementInfo.mm: Removed.
  • UIProcess/API/Cocoa/_WKDraggableElementInfoInternal.h: Removed.
  • UIProcess/ios/WKContentViewInteraction.mm:
  • WebKit.xcodeproj/project.pbxproj:

Tools:

Migrate position-information-related unit tests from the PositionInformationTests suite to
WKRequestActivatedElementInfo as 2 new unit tests. See WebKit2 ChangeLog for more details.

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

(TestWebKitAPI::checkElementTypeAndBoundingRect):
(TestWebKitAPI::TEST):

  • TestWebKitAPI/Tests/ios/PositionInformationTests.mm: Removed.
  • TestWebKitAPI/cocoa/TestWKWebView.h:
  • TestWebKitAPI/cocoa/TestWKWebView.mm:

(-[TestWKWebView activatedElementAtPosition:]):

3:31 PM Changeset in webkit [219767] by mitz@apple.com
  • 2 edits in trunk/Source/WebCore

Fixed building for macOS 10.12 with the macOS 10.13 SDK after r219644.

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

(WebCore::CDMSessionAVStreamSession::update): Suppress the objc-literal-conversion warning

in one place where we are calling a class method on a Class and the compiler can’t tell
which class it is, so it chooses wrong and emits a warning.

2:20 PM Changeset in webkit [219766] by Chris Dumez
  • 71 edits
    2 deletes in trunk

Merge ExceptionBase into DOMException and drop custom toString
https://bugs.webkit.org/show_bug.cgi?id=174755

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline some tests now that DOMException's custom toString has been dropped
and we rely on Error's toString. This causes the exception message to be
slightly different.

  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_bits.https-expected.txt:
  • web-platform-tests/WebCryptoAPI/derive_bits_keys/test_ecdh_keys.https-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_match_origin-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_match_wildcard-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_multi-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_null-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_origin-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_origin_uppercase-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_space-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_wildcard-expected.txt:
  • web-platform-tests/resource-timing/resource_TAO_zero-expected.txt:
  • web-platform-tests/webrtc/RTCPeerConnection-addIceCandidate-expected.txt:

Source/WebCore:

Merge ExceptionBase into DOMException and drop custom toString, now that DOMException
is the only remaining exception type.

  • CMakeLists.txt:
  • Modules/mediastream/MediaStream.h:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::retrieveErrorMessage):

  • dom/DOMAllInOne.cpp:
  • dom/DOMException.cpp:

(WebCore::DOMException::DOMException):
(WebCore::DOMException::initializeDescription):

  • dom/DOMException.h:

(WebCore::DOMException::code):
(WebCore::DOMException::name):
(WebCore::DOMException::message):

  • dom/ExceptionBase.cpp: Removed.
  • dom/ExceptionBase.h: Removed.

LayoutTests:

Rebaseline some tests now that DOMException's custom toString has been dropped
and we rely on Error's toString. This causes the exception message to be
slightly different.

  • fast/canvas/canvas-getImageData-invalid-result-buffer-crash-expected.txt:
  • fast/frames/sandboxed-iframe-history-denied-expected.txt:
  • fast/frames/sandboxed-iframe-navigation-top-denied-expected.txt:
  • fast/inspector-support/uncaught-dom1-exception-expected.txt:
  • fast/inspector-support/uncaught-dom3-exception-expected.txt:
  • fast/inspector-support/uncaught-dom8-exception-expected.txt:
  • fast/regions/selection/crash-deselect-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-JSTargetNode-onclick-shortcut-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-addEventListener-expected.txt:
  • http/tests/security/listener/xss-XMLHttpRequest-shortcut-expected.txt:
  • http/tests/security/listener/xss-window-onclick-addEventListener-expected.txt:
  • http/tests/security/listener/xss-window-onclick-shortcut-expected.txt:
  • http/tests/security/sandboxed-iframe-blocks-access-from-parent-expected.txt:
  • http/tests/security/sandboxed-iframe-modify-self-expected.txt:
  • http/tests/security/srcdoc-in-sandbox-cannot-access-parent-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-hash-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-host-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-hostname-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-nonstandardProperty-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-pathname-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-protocol-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-reload-expected.txt:
  • http/tests/security/xss-DENIED-assign-location-search-expected.txt:
  • http/tests/security/xss-DENIED-frame-name-expected.txt:
  • http/tests/security/xss-DENIED-sandboxed-iframe-expected.txt:
  • http/tests/security/xss-DENIED-window-name-navigator-expected.txt:
  • inspector/debugger/command-line-api-exception-expected.txt:
  • inspector/debugger/regress-133182-expected.txt:
  • inspector/debugger/setPauseOnExceptions-all-expected.txt:
  • inspector/debugger/setPauseOnExceptions-none-expected.txt:
  • inspector/debugger/setPauseOnExceptions-uncaught-expected.txt:
  • platform/mac/fast/dynamic/015-expected.txt:
12:57 PM Changeset in webkit [219765] by Wenson Hsieh
  • 2 edits in trunk/Source/WebKit

[Mac WK2] Fix null dereference in asynchronous NSTextInputClient methods when deallocating a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=174751
<rdar://problem/33132405>

Reviewed by Darin Adler.

Tweaks -[WKWebView dealloc] to close the WebPageProxy at an earlier time, prior to destroying the WebViewImpl.
This fixes a NSTextInputClient crash in WKWebView when exercising the following scenario:

(1) Suppose that NSTextInputContext invokes an asynchronous text input query on WKWebView immediately before
WKWebView is deallocated, such that WebPageProxy's CallbackMap contains an NSTextInputContext callback at the
time that -[WKWebView dealloc] is called. Additionally, suppose that this callback from NSTextInputContext
invokes additional NSTextInputClient methods on the WKWebView that involve plumbing through to the WebViewImpl
(which is stored as _impl on the WKWebView).

(2) Observe that when calling [super dealloc] in [WKWebView dealloc], we will destroy the WebViewImpl as a
result of setting our unique pointer to _impl to be null. In ~WebViewImpl, we invoke WebPageProxy::close, which
in turn invokes WebPageProxy::resetState.

(3) WebPageProxy::resetState then calls m_callbacks.invalidate(error), which triggers all pending callbacks.
This invokes the block described in (1), which causes us to try and call back into WKWebView, invoking
NSTextInputClient methods. Without the fix in this patch, these methods currently assume that _impl is nonnull,
even though we've already cleared out the pointer in (2), so we segfault with a null dereference.

After this patch, we close the _page at an earlier time, such that the state is reset before the WebViewImpl
(and corresponding _impl unique_ptr in WKWebView) is torn down. This ensures that _impl will not be null for
callbacks invoked after beginning to deallocate the WKWebView.

Forcing this scenario in a custom AppKit root that triggers async NSTextInputClient methods immediately when a
WKWebView is being deallocated produces a crash with the same stack trace as what we observe in the radar, but
there are no known steps to actually reproduce this crash in shipping software.

  • UIProcess/API/Cocoa/WKWebView.mm:

(-[WKWebView dealloc]):

10:31 AM Changeset in webkit [219764] by Chris Dumez
  • 6 edits in trunk

REGRESSION(r204565): WKObject is broken
https://bugs.webkit.org/show_bug.cgi?id=174736
<rdar://problem/33246169>

Reviewed by Dan Bernstein.

Source/WebKit:

Revert r204565 as making WKObject a root class caused unexpected crashes.
Instead, we now have WKObject inherit from NSProxy (instead of previously
NSObject) and we forward calls to the target.

We also need to provide an implementation for private methods such as
isNSString to address the issue with NSStrings that r204565 was trying
to fix.

  • Shared/Cocoa/APIObject.mm:

(API::Object::unwrap):

  • Shared/Cocoa/WKObject.h:
  • Shared/Cocoa/WKObject.mm:

(-[WKObject dealloc]):
(-[WKObject hash]):
(-[WKObject isKindOfClass:]):
(-[WKObject isMemberOfClass:]):
(-[WKObject respondsToSelector:]):
(-[WKObject conformsToProtocol:]):
(-[WKObject forwardingTargetForSelector:]):
(-[WKObject description]):
(-[WKObject debugDescription]):
(-[WKObject classForCoder]):
(-[WKObject classForKeyedArchiver]):
(-[WKObject _web_createTarget]):
(-[WKObject forwardInvocation:]):
(-[WKObject methodSignatureForSelector:]):
(-[WKObject isNSObject]):
(-[WKObject isNSArray
]):
(-[WKObject isNSCFConstantString]):
(-[WKObject isNSData
]):
(-[WKObject isNSDate]):
(-[WKObject isNSDictionary
]):
(-[WKObject isNSNumber]):
(-[WKObject isNSOrderedSet
]):
(-[WKObject isNSSet]):
(-[WKObject isNSString
]):
(-[WKObject isNSTimeZone]):
(-[WKObject isNSValue
]):

Tools:

Add API test that used to crash.

  • TestWebKitAPI/Tests/WebKit2Cocoa/WKObject.mm:

(TestWebKitAPI::TEST):

7:36 AM Changeset in webkit [219763] by fpizlo@apple.com
  • 31 edits
    1 add in trunk/Source

It should be easy to decide how WebKit yields
https://bugs.webkit.org/show_bug.cgi?id=174298

Reviewed by Saam Barati.
Source/bmalloc:


Use sched_yield() explicitly.

  • bmalloc/StaticMutex.cpp:

(bmalloc::StaticMutex::lockSlowCase):

Source/JavaScriptCore:


Use the new WTF::Thread::yield() function for yielding instead of the C++ function.

  • heap/Heap.cpp:

(JSC::Heap::resumeThePeriphery):

  • heap/VisitingTimeout.h:
  • runtime/JSCell.cpp:

(JSC::JSCell::lockSlow):
(JSC::JSCell::unlockSlow):

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

(JSC::JSCell::lock):
(JSC::JSCell::unlock):

  • runtime/JSLock.cpp:

(JSC::JSLock::grabAllLocks):

  • runtime/SamplingProfiler.cpp:

Source/WebCore:

No new tests because the WebCore change is just a change to how we #include things.

  • inspector/InspectorPageAgent.h:
  • inspector/TimelineRecordFactory.h:
  • workers/Worker.h:
  • workers/WorkerGlobalScopeProxy.h:
  • workers/WorkerMessagingProxy.h:

Source/WebKitLegacy:

  • Storage/StorageTracker.h:

Source/WTF:


Created a Thread::yield() abstraction for sched_yield(), and made WTF use it everywhere that it
had previously used std::this_thread::yield().

To make it less annoying to experiment with changes to the lock algorithm in the future, this also
moves the meat of the algorithm into LockAlgorithmInlines.h. Only two files include that header.
Since LockAlgorithm.h no longer includes ParkingLot.h, a bunch of files in WK now need to include
timing headers (Seconds, MonotonicTime, etc) manually.

  • WTF.xcodeproj/project.pbxproj:
  • benchmarks/ToyLocks.h:
  • wtf/CMakeLists.txt:
  • wtf/Lock.cpp:
  • wtf/LockAlgorithm.h:

(WTF::LockAlgorithm::lockSlow): Deleted.
(WTF::LockAlgorithm::unlockSlow): Deleted.

  • wtf/LockAlgorithmInlines.h: Added.

(WTF::hasParkedBit>::lockSlow):
(WTF::hasParkedBit>::unlockSlow):

  • wtf/MainThread.cpp:
  • wtf/RunLoopTimer.h:
  • wtf/Threading.cpp:
  • wtf/Threading.h:
  • wtf/ThreadingPthreads.cpp:

(WTF::Thread::yield):

  • wtf/ThreadingWin.cpp:

(WTF::Thread::yield):

  • wtf/WordLock.cpp:

(WTF::WordLockBase::lockSlow):
(WTF::WordLockBase::unlockSlow):

5:12 AM Changeset in webkit [219762] by commit-queue@webkit.org
  • 18 edits in trunk/Source/WebCore

REGRESSION(r219045): A partially loaded image may not be repainted when its complete frame finishes decoding
https://bugs.webkit.org/show_bug.cgi?id=174230

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

Because of r219045, we now only repaint the CachedImageClinets which tried
to draw the image but they could not because they have to wait for the image
decoding to finish. This was done by keeping a HashSet of these clients
and make CachedImage own it. This HashSet is cleared once the image frame
finishes decoding and all the waited clients are repainted.

But Multiple asynchronous image decoding requests are allowed for the same
frame if new data is added to the image source. If we tried to draw the
same image twice before it finishes decoding the first request, we will
not be to record this second request since the HashSet will not add the
same client twice. When he second request finishes decoding, CachedImage
will not repaint any client since its HashSet is empty.

To fix this problem we can do the following. When an image frame finishes
decoding, CachedImage will keep its HashSet of pending drawing clients as
long as the image frame is a partially loaded frame.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::CachedImageObserver::imageFrameAvailable):
(WebCore::CachedImage::imageFrameAvailable):

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

(WebCore::BitmapImage::destroyDecodedData):
(WebCore::BitmapImage::dataChanged):
(WebCore::BitmapImage::setCurrentFrameDecodingStatusIfNecessary):
(WebCore::BitmapImage::draw):
(WebCore::BitmapImage::internalStartAnimation):
(WebCore::BitmapImage::internalAdvanceAnimation):
(WebCore::BitmapImage::imageFrameAvailableAtIndex):

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

(WebCore::ImageFrame::decodingStatus):

  • platform/graphics/ImageFrame.h: Move DecodingStatus out of this class

to ImageTypes.h to avoid adding other header files to ImageObvsever.h

  • platform/graphics/ImageFrameCache.cpp:

(WebCore::ImageFrameCache::setNativeImage):
(WebCore::ImageFrameCache::cacheMetadataAtIndex):
(WebCore::ImageFrameCache::cacheNativeImageAtIndex):
(WebCore::ImageFrameCache::cacheNativeImageAtIndexAsync):
(WebCore::ImageFrameCache::requestFrameAsyncDecodingAtIndex):
(WebCore::ImageFrameCache::frameDecodingStatusAtIndex):

  • platform/graphics/ImageFrameCache.h:
  • platform/graphics/ImageObserver.h:
  • platform/graphics/ImageSource.h:

(WebCore::ImageSource::frameDecodingStatusAtIndex):

  • platform/graphics/ImageTypes.h:
  • platform/image-decoders/bmp/BMPImageReader.cpp:

(WebCore::BMPImageReader::decodeBMP):

  • platform/image-decoders/gif/GIFImageDecoder.cpp:

(WebCore::GIFImageDecoder::frameComplete):
(WebCore::GIFImageDecoder::initFrameBuffer):

  • platform/image-decoders/jpeg/JPEGImageDecoder.cpp:

(WebCore::JPEGImageDecoder::outputScanlines):
(WebCore::JPEGImageDecoder::jpegComplete):

  • platform/image-decoders/png/PNGImageDecoder.cpp:

(WebCore::PNGImageDecoder::rowAvailable):
(WebCore::PNGImageDecoder::pngComplete):
(WebCore::PNGImageDecoder::frameComplete):

  • platform/image-decoders/webp/WEBPImageDecoder.cpp:

(WebCore::WEBPImageDecoder::decode):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::RenderBoxModelObject::decodingModeForImageDraw):

1:12 AM Changeset in webkit [219761] by timothy_horton@apple.com
  • 3 edits in trunk/Source/WebCore

Drag and Drop preview image for Twitter link is the wrong shape
https://bugs.webkit.org/show_bug.cgi?id=174731
<rdar://problem/33335616>

  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText):

  • page/TextIndicator.cpp:

(WebCore::initializeIndicator):
Apply some post-landing review feedback for r219756.

12:27 AM Changeset in webkit [219760] by Yusuke Suzuki
  • 8 edits in trunk

[WTF] Extend ThreadGroup::add results from bool to ThreadGroupAddResult
https://bugs.webkit.org/show_bug.cgi?id=174705

Reviewed by Mark Lam.

Source/WTF:

After starting using ThreadGroup to bookkeep active threads for Signals,
we would like to know tristate of ThreadGroup::add result, NewlyAdded, AlreadyAdded, NotAdded.
This patch extends the result of ThreadGroup::add from bool to ThreadGroupAddResult tristate.
Note that NotAdded is returned if the target thread is dying.

  • wtf/ThreadGroup.cpp:

(WTF::ThreadGroup::add):
(WTF::ThreadGroup::addCurrentThread):

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

(WTF::Thread::addToThreadGroup):

  • wtf/Threading.h:
  • wtf/threads/Signals.cpp:

(WTF::registerThreadForMachExceptionHandling):

Tools:

  • TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:

(TestWebKitAPI::testThreadGroup):
(TestWebKitAPI::TEST):

Jul 21, 2017:

10:14 PM Changeset in webkit [219759] by commit-queue@webkit.org
  • 3 edits in trunk/Source/WTF

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

static is not threadsafe in WebKit tree (Requested by
yusukesuzuki on #webkit).

Reverted changeset:

"[WTF] Drop initializeDate"
https://bugs.webkit.org/show_bug.cgi?id=174714
http://trac.webkit.org/changeset/219732

9:43 PM Changeset in webkit [219758] by Chris Dumez
  • 46 edits
    3 deletes in trunk

Drop IDBDatabaseException class
https://bugs.webkit.org/show_bug.cgi?id=174743

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline test as the exception message is slightly different.

  • web-platform-tests/IndexedDB/keypath-special-identifiers-expected.txt:

Source/WebCore:

Drop IDBDatabaseException class and use DOMException directly. IDBDatabaseException was
only an internal concept and was already exposed to the Web as a DOMException. This
simplifies the code a bit and will allow for further simplification in a follow-up patch.

No new tests, no Web-facing behavior change, except for some exception messages
being slightly different.

  • CMakeLists.txt:
  • Modules/indexeddb/IDBCursor.cpp:

(WebCore::IDBCursor::update):
(WebCore::IDBCursor::advance):
(WebCore::IDBCursor::continuePrimaryKey):
(WebCore::IDBCursor::continueFunction):
(WebCore::IDBCursor::deleteFunction):

  • Modules/indexeddb/IDBDatabase.cpp:

(WebCore::IDBDatabase::createObjectStore):
(WebCore::IDBDatabase::transaction):
(WebCore::IDBDatabase::deleteObjectStore):

  • Modules/indexeddb/IDBDatabaseError.h: Removed.
  • Modules/indexeddb/IDBDatabaseException.cpp: Removed.
  • Modules/indexeddb/IDBDatabaseException.h: Removed.
  • Modules/indexeddb/IDBFactory.cpp:

(WebCore::IDBFactory::cmp):

  • Modules/indexeddb/IDBIndex.cpp:

(WebCore::IDBIndex::setName):
(WebCore::IDBIndex::openCursor):
(WebCore::IDBIndex::openKeyCursor):
(WebCore::IDBIndex::count):
(WebCore::IDBIndex::doCount):
(WebCore::IDBIndex::get):
(WebCore::IDBIndex::doGet):
(WebCore::IDBIndex::getKey):
(WebCore::IDBIndex::doGetKey):
(WebCore::IDBIndex::getAll):
(WebCore::IDBIndex::getAllKeys):

  • Modules/indexeddb/IDBKeyRange.cpp:

(WebCore::IDBKeyRange::only):
(WebCore::IDBKeyRange::lowerBound):
(WebCore::IDBKeyRange::upperBound):
(WebCore::IDBKeyRange::bound):
(WebCore::IDBKeyRange::includes):

  • Modules/indexeddb/IDBObjectStore.cpp:

(WebCore::IDBObjectStore::setName):
(WebCore::IDBObjectStore::openCursor):
(WebCore::IDBObjectStore::openKeyCursor):
(WebCore::IDBObjectStore::get):
(WebCore::IDBObjectStore::getKey):
(WebCore::IDBObjectStore::putOrAdd):
(WebCore::IDBObjectStore::doDelete):
(WebCore::IDBObjectStore::deleteFunction):
(WebCore::IDBObjectStore::clear):
(WebCore::IDBObjectStore::createIndex):
(WebCore::IDBObjectStore::index):
(WebCore::IDBObjectStore::deleteIndex):
(WebCore::IDBObjectStore::count):
(WebCore::IDBObjectStore::doCount):
(WebCore::IDBObjectStore::getAll):
(WebCore::IDBObjectStore::getAllKeys):

  • Modules/indexeddb/IDBOpenDBRequest.cpp:

(WebCore::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):

  • Modules/indexeddb/IDBRequest.cpp:

(WebCore::IDBRequest::result):
(WebCore::IDBRequest::error):
(WebCore::IDBRequest::uncaughtExceptionInEventHandler):

  • Modules/indexeddb/IDBTransaction.cpp:

(WebCore::IDBTransaction::objectStore):
(WebCore::IDBTransaction::abort):
(WebCore::IDBTransaction::abortOnServerAndCancelRequests):
(WebCore::IDBTransaction::didCreateIndexOnServer):
(WebCore::IDBTransaction::putOrAddOnServer):

  • Modules/indexeddb/server/IndexValueStore.cpp:

(WebCore::IDBServer::IndexValueStore::addRecord):

  • Modules/indexeddb/server/MemoryIDBBackingStore.cpp:

(WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
(WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::renameIndex):
(WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
(WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
(WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::MemoryIDBBackingStore::getCount):
(WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
(WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
(WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/MemoryIndex.cpp:

(WebCore::IDBServer::MemoryIndex::putIndexKey):

  • Modules/indexeddb/server/MemoryObjectStore.cpp:

(WebCore::IDBServer::MemoryObjectStore::createIndex):
(WebCore::IDBServer::MemoryObjectStore::deleteIndex):

  • Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:

(WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
(WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
(WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
(WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getAllIndexRecords):
(WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
(WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
(WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
(WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
(WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):

  • Modules/indexeddb/server/SQLiteIDBTransaction.cpp:

(WebCore::IDBServer::SQLiteIDBTransaction::begin):
(WebCore::IDBServer::SQLiteIDBTransaction::commit):
(WebCore::IDBServer::SQLiteIDBTransaction::abort):

  • Modules/indexeddb/server/UniqueIDBDatabase.cpp:

(WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
(WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
(WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
(WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
(WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
(WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
(WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):

  • Modules/indexeddb/shared/IDBError.cpp:

(WebCore::IDBError::name):
(WebCore::IDBError::message):
(WebCore::IDBError::toDOMError):

  • Modules/indexeddb/shared/IDBError.h:

(WebCore::IDBError::userDeleteError):
(WebCore::IDBError::isNull):

  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::createDOMException):

  • dom/DOMException.cpp:

(WebCore::DOMException::initializeDescription):
Initialize description->code from using the actual error codes in the
coreExceptions table, instead of initializing it using |ec|. |ec| is
the index in the ExceptionCode enumeration and it matches the error
code only for legacy exceptions. New exceptions such as DataError
should have a code of 0. Without this change, w3c for IDB would start
failing.

  • dom/ExceptionCodeDescription.cpp:

(WebCore::ExceptionCodeDescription::ExceptionCodeDescription):

  • dom/ExceptionCodeDescription.h:

Source/WebKit:

  • WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:

(WebKit::WebIDBConnectionToServer::connectionToServerLost):

LayoutTests:

Rebaseline test as the exception messages are slightly different.

  • storage/indexeddb/createIndex-after-failure-expected.txt:
  • storage/indexeddb/createIndex-after-failure-private-expected.txt:
  • storage/indexeddb/get-keyrange-expected.txt:
  • storage/indexeddb/get-keyrange-private-expected.txt:
  • storage/indexeddb/keypath-edges-expected.txt:
  • storage/indexeddb/keypath-edges-private-expected.txt:
  • storage/indexeddb/keyrange-expected.txt:
  • storage/indexeddb/keyrange-private-expected.txt:
  • storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-expected.txt:
  • storage/indexeddb/modern/idbdatabase-deleteobjectstore-failures-private-expected.txt:
  • storage/indexeddb/transaction-active-flag-expected.txt:
  • storage/indexeddb/transaction-active-flag-private-expected.txt:
8:54 PM Changeset in webkit [219757] by commit-queue@webkit.org
  • 5 edits
    1 delete in trunk/Source/WebCore

[WebIDL] Simplify XMLHttpRequest bindings by removing built-ins
https://bugs.webkit.org/show_bug.cgi?id=174740

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

The behavior we were getting from XMLHttpRequest.js can be implemented
with the [CachedAttribute] extended attribute. This reduces the number
of JS -> C++ jumps required and makes the code more similar to other
bindings that need caching of an IDL any value.

  • CMakeLists.txt:
  • DerivedSources.make:
  • xml/XMLHttpRequest.js: Removed.

Remove XMLHttpRequest.js.

  • bindings/js/JSXMLHttpRequestCustom.cpp:

(WebCore::JSXMLHttpRequest::response):
(WebCore::JSXMLHttpRequest::retrieveResponse): Deleted.

  • xml/XMLHttpRequest.idl:

Replace builtin with a [CachedAttribute] and [CustomGetter]
for the response property.

8:01 PM Changeset in webkit [219756] by timothy_horton@apple.com
  • 8 edits in trunk/Source/WebCore

Drag and Drop preview image for Twitter link is the wrong shape
https://bugs.webkit.org/show_bug.cgi?id=174731
<rdar://problem/33335616>

Reviewed by Zalan Bujtas.

TextIndicator uses Range::borderAndTextQuads and ::absoluteTextRects
in order to get the rects of the indicated text. Currently, these
functions do not respect clipping, so clipped-out text (e.g. as seen
inside links on Twitter) generates lots of meaningless indicated rects.

  • page/TextIndicator.cpp:

(WebCore::estimatedBackgroundColorForRange):
(WebCore::hasAnyIllegibleColors):
Change adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary
to instead be hasAnyIllegibleColors, and referred to in the same place
as hasNonInlineOrReplacedElements, so that it follows the same
upgrade path (leaving textRects empty, so that it is later filled in
with the absoluteBoundingRect). This was a mistake in r219033, which
instead would end up painting all content, but filling in textRects
with the actual individual text rects.

This alone changes the behavior on Twitter from lots of jagged misplaced
rects to a too-large bounding rect. Combined with the following changes,
the bounding rect is reduced to the right size:

(WebCore::initializeIndicator):
Adopt the new Range::borderAndTextQuads and ::absoluteTextRects parameter
and opt-in to respecting clipping for text rects.

  • dom/DOMRectList.cpp:

(WebCore::DOMRectList::DOMRectList):

  • dom/DOMRectList.h:

(WebCore::DOMRectList::create):
Add a DOMRectList constructor and create() that take FloatRects, similar
to the one that takes FloatQuads, but without the boundingRect() calls.

  • dom/Document.h:
  • dom/Document.cpp:

(WebCore::Document::convertAbsoluteToClientRects):
Add convertAbsoluteToClientRects, similar to covertAbsoluteToClientQuads,
except acting on rects instead of quads.

  • dom/Range.cpp:

(WebCore::Range::absoluteRectsForRangeInText):
(WebCore::Range::absoluteTextRects):
(WebCore::Range::getClientRects):
(WebCore::Range::borderAndTextRects):
(WebCore::Range::boundingRect):
(WebCore::Range::absoluteBoundingRect):
(WebCore::Range::borderAndTextQuads): Deleted.

  • dom/Range.h:

Replace borderAndTextQuads with borderAndTextRects, because all callers
just ended up calling boundingBox() on the quads.

Factor absoluteRectsForRangeInText out of absoluteTextRects and
borderAndTextQuads, and teach it to optionally intersect the text rects
with their renderer's absoluteClippedOverflowRect.

5:41 PM Changeset in webkit [219755] by pvollan@apple.com
  • 5 edits
    2 adds in trunk

Round-tripping stroke-width styles through getComputedStyle cause the text to gain a stroke.
https://bugs.webkit.org/show_bug.cgi?id=174701
Source/WebCore:

<rdar://problem/32903679>

Reviewed by Simon Fraser.

The initial value of stroke-color should be transparent, see https://www.w3.org/TR/fill-stroke-3/#stroke-color.
Also, there is no need to set the graphics context in text stroke mode, if the stroke color is not visible.

Test: fast/css/round-trip-stroke-width-using-computed-style.html

  • rendering/TextPaintStyle.cpp:

(WebCore::updateGraphicsContext):

  • rendering/style/RenderStyle.h:

(WebCore::RenderStyle::initialStrokeWidth):
(WebCore::RenderStyle::initialStrokeColor):

  • rendering/style/StyleRareInheritedData.cpp:

(WebCore::StyleRareInheritedData::StyleRareInheritedData):

LayoutTests:

Reviewed by Simon Fraser.

  • fast/css/round-trip-stroke-width-using-computed-style-expected.html: Added.
  • fast/css/round-trip-stroke-width-using-computed-style.html: Added.
5:15 PM Changeset in webkit [219754] by beidson@apple.com
  • 2 edits in trunk/Source/WebKit

Crash in many WebKit apps marking a connection invalid under Messages::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace.
<rdar://problem/28822272> and https://bugs.webkit.org/show_bug.cgi?id=174729

Reviewed by Tim Horton.

Previously, when a NetworkLoad generated a "CanAuthenticateAgainstProtectionSpace" event, the message went from
Network process -> Web process -> UI process.

In that case, MESSAGE_CHECKing the validity of the frame in WebPageProxy made sense.

In r202511 we cut the WebProcess out of this and had Networking go straight to UI process.

As a result, the message check became invalid. The Networking process cannot possible know the validity of
particular WebPage or WebFrame identifiers.

We simply need to validate the input in NetworkProcessProxy.

  • UIProcess/Network/NetworkProcessProxy.cpp:

(WebKit::NetworkProcessProxy::canAuthenticateAgainstProtectionSpace): Validate both the page and frame ids before

passing the call along to the WebPageProxy. Also, if either of those validations fail, respond to the network process.

5:13 PM Changeset in webkit [219753] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

Remove an inaccurate comment from RenderTextLineBoxes

  • rendering/RenderTextLineBoxes.cpp:

(WebCore::RenderTextLineBoxes::absoluteRectsForRange):
This comment has been wrong for at least 4 years.

4:34 PM Changeset in webkit [219752] by timothy_horton@apple.com
  • 2 edits in trunk/Source/WebCore

TextIndicator::estimatedTextColorsForRange asserts inside HashSet code (inserting reserved value)
https://bugs.webkit.org/show_bug.cgi?id=174733

Reviewed by Wenson Hsieh.

  • page/TextIndicator.cpp:

(WebCore::estimatedTextColorsForRange):
(WebCore::adjustTextIndicatorDataOptionsForEstimatedColorsIfNecessary):
RGBA32 isn't a valid hash key, because we have no traits that define the
empty or deleted values, nor do we have any bits we could feasibly
use -- the full range of RGBA32 is easy to reach with various colors.

Instead, hash Color directly.

4:25 PM Changeset in webkit [219751] by n_wang@apple.com
  • 7 edits
    2 adds in trunk

AX: Expose form validation on iOS as hint
https://bugs.webkit.org/show_bug.cgi?id=174722
<rdar://problem/33459761>

Reviewed by Chris Fleizach.

Source/WebCore:

Adding the validation message to the hint of the form control element.

Test: accessibility/ios-simulator/form-control-validation-message.html

  • accessibility/AccessibilityObject.cpp:

(WebCore::AccessibilityObject::isShowingValidationMessage):
(WebCore::AccessibilityObject::validationMessage):

  • accessibility/AccessibilityObject.h:
  • accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:

(-[WebAccessibilityObjectWrapper accessibilityHint]):
(-[WebAccessibilityObjectWrapper accessibilityIsShowingValidationMessage]):

  • html/HTMLFormControlElement.cpp:

(WebCore::HTMLFormControlElement::isShowingValidationMessage):

  • html/HTMLFormControlElement.h:

LayoutTests:

  • accessibility/ios-simulator/form-control-validation-message-expected.txt: Added.
  • accessibility/ios-simulator/form-control-validation-message.html: Added.
3:44 PM Changeset in webkit [219750] by aestes@apple.com
  • 3 edits
    1 delete in trunk/Source/WebKit

[iOS] Adopt UIImagePickerControllerImageURL for photo uploads
https://bugs.webkit.org/show_bug.cgi?id=174723
<rdar://problem/33223962>

Reviewed by Joseph Pecoraro.

In iOS 11, use the URL provided by UIImagePickerControllerImageURL, if available, as the
file URL for photo uploads. Since we use the UIImagePickerController imageExportPreset of
UIImagePickerControllerImageURLExportPresetCompatible, UIKit will take care of converting
HEIF images to JPEG for us. For other types (GIF, JPEG, and PNG), it will preserve the
original format.

Since UIImagePickerController now provides GIF and PNG representations, we no longer need to
use PHImageManager to access the original assets. This patch removes the
PHAsset/PHImageManager code added in r185241.

  • Platform/spi/ios/PhotosSPI.h: Removed.
  • UIProcess/ios/forms/WKFileUploadPanel.mm:

(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemForImage:withAssetURL:successBlock:failureBlock:]): Deleted.

  • WebKit.xcodeproj/project.pbxproj:
3:41 PM Changeset in webkit [219749] by commit-queue@webkit.org
  • 3 edits
    2 adds in trunk

Web Inspector: inspect(aFunction) should jump to function definition
https://bugs.webkit.org/show_bug.cgi?id=149344
<rdar://problem/11563607>

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-21
Reviewed by Matt Baker.

Source/WebInspectorUI:

  • UserInterface/Protocol/InspectorObserver.js:

(WebInspector.InspectorObserver.prototype.inspect):
If we receive a function remote object jump to its location if available.

LayoutTests:

  • inspector/runtime/CommandLineAPI-inspect-expected.txt: Added.
  • inspector/runtime/CommandLineAPI-inspect.html: Added.

Add tests for the CommandLineAPI's inspect() and how it triggers the
Inspector.inspect event with a RemoteObject and hints.

3:22 PM Changeset in webkit [219748] by Matt Lewis
  • 2 edits in trunk/LayoutTests

Adjusted test expectations.
https://bugs.webkit.org/show_bug.cgi?id=173861

Unreviewed test gardening.

  • platform/mac-wk2/TestExpectations:
3:20 PM Changeset in webkit [219747] by Jonathan Bedard
  • 2 edits in trunk/Tools

Fail gracefully when xcrun fails in IOSSimulatorPort constructor
https://bugs.webkit.org/show_bug.cgi?id=174724

Reviewed by Aakash Jain.

  • Scripts/webkitpy/port/ios_simulator.py:

(IOSSimulatorPort.init): Ignore any errors when attempting to find a running
simulator. Errors here should be treated the same as no simulators found.

3:04 PM Changeset in webkit [219746] by Konstantin Tokarev
  • 2 edits in trunk/Source/WebKitLegacy

Unreviewed, fix Mac cmake build after r219733

  • PlatformMac.cmake:
2:26 PM Changeset in webkit [219745] by Konstantin Tokarev
  • 6 edits in trunk/Source

[cmake][Mac] Unreviewed, fix linking WebKitSystemInterface

After r219560 link_directories() in PlatformXXX.cmake files does not
affect corresponding targets.

  • PlatformMac.cmake:
2:20 PM Changeset in webkit [219744] by commit-queue@webkit.org
  • 27 edits in trunk/Source/WebCore

[WebIDL] Remove the need for the side map of DeprecatedCSSOMValue roots
https://bugs.webkit.org/show_bug.cgi?id=174713

Patch by Sam Weinig <sam@webkit.org> on 2017-07-21
Reviewed by Andreas Kling.

We used to not want to bloat the size of CSSValues with a pointer to the
owner CSSStyleDeclaration, so, for GC purposes we need kept a mapping of
them on DOMWrapperWorld that only got set if a wrapper was made. Now that
we have DeprecatedCSSOMValue, a wrapper for CSSValue that only gets created
for the bindings, we no longer need the side table, and simply have the
DeprecatedCSSOMValue maintain a reference to the CSSStyleDeclaration.

  • bindings/js/DOMWrapperWorld.h:

(WebCore::DOMWrapperWorld::wrappers):
Remove m_deprecatedCSSOMValueRoots and make m_wrappers private with a getter.

  • bindings/js/JSCSSStyleDeclarationCustom.cpp:

(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Deleted.
Remove custom implementation of getPropertyCSSValue, now that it no longer
needs to update m_deprecatedCSSOMValueRoots.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):

  • bindings/js/JSDOMWrapperCache.h:

(WebCore::getCachedWrapper):
(WebCore::cacheWrapper):
(WebCore::uncacheWrapper):

  • bindings/js/JSNodeCustom.cpp:

(WebCore::getOutOfLineCachedWrapper):
Use wrappers getter rather than direct member variable.

  • bindings/js/JSDeprecatedCSSOMValueCustom.cpp:

(WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
Rather than checking the side table for roots, now get the root
via the reference CSSStyleDeclaration.

(WebCore::JSDeprecatedCSSOMValueOwner::finalize): Deleted.
Remove custom finalize now that we don't have to remove ourself
from m_deprecatedCSSOMValueRoots.

  • css/CSSStyleDeclaration.idl:

Remove [Custom] from getPropertyCSSValue.

  • css/DeprecatedCSSOMValue.idl:

Remove [JSCustomFinalize].

  • css/CSSComputedStyleDeclaration.cpp:

(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):

  • css/CSSImageValue.cpp:

(WebCore::CSSImageValue::createDeprecatedCSSOMWrapper):

  • css/CSSImageValue.h:
  • css/CSSPrimitiveValue.cpp:

(WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper):

  • css/CSSPrimitiveValue.h:
  • css/CSSStyleDeclaration.h:
  • css/CSSValue.cpp:

(WebCore::CSSValue::createDeprecatedCSSOMWrapper):

  • css/CSSValue.h:
  • css/DeprecatedCSSOMCounter.h:
  • css/DeprecatedCSSOMPrimitiveValue.cpp:

(WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue):
(WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue):

  • css/DeprecatedCSSOMPrimitiveValue.h:

(WebCore::DeprecatedCSSOMPrimitiveValue::create):
(WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue):

  • css/DeprecatedCSSOMRGBColor.h:
  • css/DeprecatedCSSOMRect.h:
  • css/DeprecatedCSSOMValue.h:

(WebCore::DeprecatedCSSOMValue::owner):
(WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue):
(WebCore::DeprecatedCSSOMComplexValue::create):
(WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue):

  • css/DeprecatedCSSOMValueList.h:

(WebCore::DeprecatedCSSOMValueList::create):
(WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList):

  • css/PropertySetCSSStyleDeclaration.cpp:

(WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):

  • css/PropertySetCSSStyleDeclaration.h:
  • svg/SVGElement.cpp:

(WebCore::SVGElement::getPresentationAttribute):
Pass owning CSSStyleDeclaration to DeprecatedCSSOMValue and derived classes.

2:16 PM Changeset in webkit [219743] by akling@apple.com
  • 43 edits in trunk/Source

Use more references in event dispatch code
https://bugs.webkit.org/show_bug.cgi?id=174681

Reviewed by Geoffrey Garen.

Source/WebCore:

Make EventListener::handleEvent() take a ScriptExecutionContext&, Event&.
Then make everything build again. Various null checks and assertions
disappear in the process.

  • bindings/js/JSErrorHandler.cpp:

(WebCore::JSErrorHandler::handleEvent):

  • bindings/js/JSErrorHandler.h:
  • bindings/js/JSEventListener.cpp:

(WebCore::JSEventListener::initializeJSFunction):
(WebCore::JSEventListener::handleEvent):
(WebCore::eventHandlerAttribute):

  • bindings/js/JSEventListener.h:

(WebCore::JSEventListener::jsFunction):

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::JSLazyEventListener::initializeJSFunction):

  • bindings/js/JSLazyEventListener.h:
  • dom/EventListener.h:
  • dom/EventTarget.cpp:

(WebCore::EventTarget::fireEventListeners):

  • html/HTMLPlugInElement.cpp:

(WebCore::HTMLPlugInElement::defaultEventHandler):

  • html/ImageDocument.cpp:

(WebCore::ImageEventListener::handleEvent):

  • inspector/CommandLineAPIHost.cpp:

(WebCore::listenerEntriesFromListenerInfo):

  • inspector/InspectorDOMAgent.cpp:

(WebCore::InspectorDOMAgent::buildObjectForEventListener):

  • inspector/InspectorIndexedDBAgent.cpp:
  • platform/Widget.h:

(WebCore::Widget::handleEvent):

  • platform/cocoa/WebPlaybackSessionModelMediaElement.h:
  • platform/cocoa/WebPlaybackSessionModelMediaElement.mm:

(WebCore::WebPlaybackSessionModelMediaElement::handleEvent):

  • platform/cocoa/WebVideoFullscreenModelVideoElement.h:
  • platform/cocoa/WebVideoFullscreenModelVideoElement.mm:

(WebVideoFullscreenModelVideoElement::handleEvent):

  • svg/SVGTRefElement.cpp:

(WebCore::SVGTRefTargetEventListener::handleEvent):

  • svg/animation/SVGSMILElement.cpp:

(WebCore::ConditionEventListener::handleEvent):
(WebCore::SVGSMILElement::handleConditionEvent):

  • svg/animation/SVGSMILElement.h:

Source/WebKit:

  • WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
  • WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:

(WebKit::PDFPluginAnnotation::handleEvent):
(WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent):

  • WebProcess/Plugins/PDF/PDFPluginPasswordField.h:
  • WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:

(WebKit::PDFPluginPasswordField::handleEvent):

  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
  • WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:

(WebKit::PDFPluginTextAnnotation::handleEvent):

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::createWebEvent):
(WebKit::PluginView::handleEvent):

  • WebProcess/Plugins/PluginView.h:

Source/WebKitLegacy/mac:

  • DOM/ObjCEventListener.h:
  • DOM/ObjCEventListener.mm:

(WebCore::ObjCEventListener::handleEvent):

  • WebCoreSupport/WebFrameLoaderClient.mm:

(NetscapePluginWidget::handleEvent):

Source/WebKitLegacy/win:

  • DOMEventsClasses.cpp:

(WebEventListener::handleEvent):

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

(WebCore::PluginView::handleEvent):

  • Plugins/PluginView.h:
2:04 PM Changeset in webkit [219742] by Alan Bujtas
  • 2 edits in trunk/Source/WebCore

iBooks: Overlapping/missing content at beginning/end of paragraph.
https://bugs.webkit.org/show_bug.cgi?id=174717
<rdar://problem/33117912>

Reviewed by Simon Fraser.

By definiton simple and normal line layout should always produce the exact same lineboxes. It enables us not
to force repaint while swapping between these 2 line layouts.
However in certain cases (font size pixel rounding as an example) they don't agree on how much content fits the line and
that could result in missing/overlapping content due to the lack of repaint.

Unable to test.

  • rendering/RenderBlockFlow.cpp:

(WebCore::RenderBlockFlow::ensureLineBoxes):

1:53 PM Changeset in webkit [219741] by Chris Dumez
  • 9 edits
    2 adds
    2 deletes in trunk/Source/WebCore

Drop make_dom_exceptions.pl script that we only have DOMException
https://bugs.webkit.org/show_bug.cgi?id=174699

Reviewed by Darin Adler.

Drop make_dom_exceptions.pl script that we only have DOMException.

  • CMakeLists.txt:
  • DerivedSources.make:
  • WebCore.xcodeproj/project.pbxproj:
  • WebCoreMacros.cmake:
  • bindings/js/JSDOMExceptionHandling.cpp:
  • css/FontFaceSet.cpp:
  • dom/DOMAllInOne.cpp:
  • dom/DOMExceptions.in: Removed.
  • dom/ExceptionCodeDescription.cpp: Added.

(WebCore::ExceptionCodeDescription::ExceptionCodeDescription):

  • dom/ExceptionCodeDescription.h: Added.
  • dom/make_dom_exceptions.pl: Removed.
  • inspector/WebInjectedScriptHost.cpp:

(WebCore::WebInjectedScriptHost::subtype):

1:44 PM Changeset in webkit [219740] by mark.lam@apple.com
  • 16 edits in trunk/Source/JavaScriptCore

Refactor MASM probe CPUState to use arrays for register storage.
https://bugs.webkit.org/show_bug.cgi?id=174694

Reviewed by Keith Miller.

Using arrays for register storage in CPUState allows us to do away with the
huge switch statements to decode each register id. We can now simply index into
the arrays.

With this patch, we now:

  1. Remove the need for macros for defining the list of CPU registers. We can go back to simple enums. This makes the code easier to read.
  1. Make the assembler the authority on register names. Most of this code is moved into the assembler from GPRInfo and FPRInfo. GPRInfo and FPRInfo now forwards to the assembler.
  1. Make the assembler the authority on the number of registers of each type.
  1. Fix a "bug" in ARMv7's lastRegister(). It was previously omitting lr and pc. This is inconsistent with how every other CPU architecture implements lastRegister(). This patch fixes it to return the true last GPR i.e. pc, but updates RegisterSet::reservedHardwareRegisters() to exclude those registers.
  • assembler/ARM64Assembler.h:

(JSC::ARM64Assembler::numberOfRegisters):
(JSC::ARM64Assembler::firstSPRegister):
(JSC::ARM64Assembler::lastSPRegister):
(JSC::ARM64Assembler::numberOfSPRegisters):
(JSC::ARM64Assembler::numberOfFPRegisters):
(JSC::ARM64Assembler::gprName):
(JSC::ARM64Assembler::sprName):
(JSC::ARM64Assembler::fprName):

  • assembler/ARMAssembler.h:

(JSC::ARMAssembler::numberOfRegisters):
(JSC::ARMAssembler::firstSPRegister):
(JSC::ARMAssembler::lastSPRegister):
(JSC::ARMAssembler::numberOfSPRegisters):
(JSC::ARMAssembler::numberOfFPRegisters):
(JSC::ARMAssembler::gprName):
(JSC::ARMAssembler::sprName):
(JSC::ARMAssembler::fprName):

  • assembler/ARMv7Assembler.h:

(JSC::ARMv7Assembler::lastRegister):
(JSC::ARMv7Assembler::numberOfRegisters):
(JSC::ARMv7Assembler::firstSPRegister):
(JSC::ARMv7Assembler::lastSPRegister):
(JSC::ARMv7Assembler::numberOfSPRegisters):
(JSC::ARMv7Assembler::numberOfFPRegisters):
(JSC::ARMv7Assembler::gprName):
(JSC::ARMv7Assembler::sprName):
(JSC::ARMv7Assembler::fprName):

  • assembler/AbstractMacroAssembler.h:

(JSC::AbstractMacroAssembler::numberOfRegisters):
(JSC::AbstractMacroAssembler::gprName):
(JSC::AbstractMacroAssembler::firstSPRegister):
(JSC::AbstractMacroAssembler::lastSPRegister):
(JSC::AbstractMacroAssembler::numberOfSPRegisters):
(JSC::AbstractMacroAssembler::sprName):
(JSC::AbstractMacroAssembler::numberOfFPRegisters):
(JSC::AbstractMacroAssembler::fprName):

  • assembler/MIPSAssembler.h:

(JSC::MIPSAssembler::numberOfRegisters):
(JSC::MIPSAssembler::firstSPRegister):
(JSC::MIPSAssembler::lastSPRegister):
(JSC::MIPSAssembler::numberOfSPRegisters):
(JSC::MIPSAssembler::numberOfFPRegisters):
(JSC::MIPSAssembler::gprName):
(JSC::MIPSAssembler::sprName):
(JSC::MIPSAssembler::fprName):

  • assembler/MacroAssembler.h:

(JSC::MacroAssembler::CPUState::gprName):
(JSC::MacroAssembler::CPUState::sprName):
(JSC::MacroAssembler::CPUState::fprName):
(JSC::MacroAssembler::CPUState::gpr):
(JSC::MacroAssembler::CPUState::spr):
(JSC::MacroAssembler::CPUState::fpr):
(JSC::MacroAssembler::CPUState::pc):
(JSC::MacroAssembler::CPUState::fp):
(JSC::MacroAssembler::CPUState::sp):
(JSC::ProbeContext::gpr):
(JSC::ProbeContext::spr):
(JSC::ProbeContext::fpr):
(JSC::ProbeContext::gprName):
(JSC::ProbeContext::sprName):
(JSC::ProbeContext::fprName):
(JSC::MacroAssembler::numberOfRegisters): Deleted.
(JSC::MacroAssembler::numberOfFPRegisters): Deleted.

  • assembler/MacroAssemblerARM.cpp:
  • assembler/MacroAssemblerARM64.cpp:

(JSC::arm64ProbeTrampoline):

  • assembler/MacroAssemblerARMv7.cpp:
  • assembler/MacroAssemblerPrinter.cpp:

(JSC::Printer::nextID):
(JSC::Printer::printAllRegisters):
(JSC::Printer::printPCRegister):
(JSC::Printer::printRegisterID):
(JSC::Printer::printAddress):

  • assembler/MacroAssemblerX86Common.cpp:
  • assembler/X86Assembler.h:

(JSC::X86Assembler::numberOfRegisters):
(JSC::X86Assembler::firstSPRegister):
(JSC::X86Assembler::lastSPRegister):
(JSC::X86Assembler::numberOfSPRegisters):
(JSC::X86Assembler::numberOfFPRegisters):
(JSC::X86Assembler::gprName):
(JSC::X86Assembler::sprName):
(JSC::X86Assembler::fprName):

  • jit/FPRInfo.h:

(JSC::FPRInfo::debugName):

  • jit/GPRInfo.h:

(JSC::GPRInfo::debugName):

  • jit/RegisterSet.cpp:

(JSC::RegisterSet::reservedHardwareRegisters):

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

WebResourceLoadStatisticsStore::m_operatingDates is unsafely modified from several threads
https://bugs.webkit.org/show_bug.cgi?id=174721
<rdar://problem/33400343>

Reviewed by Brent Fulgham.

WebResourceLoadStatisticsStore::m_operatingDates is supposed to only be modified on
the background thread. However, WebResourceLoadStatisticsStore::performDailyTasks()
was mistakenly calling includeTodayAsOperatingDateIfNecessary() on the main thread,
which would modify m_operatingDates. This could lead to crashes such as the
one in <rdar://problem/33400343>, as the main thread may modify m_operatingDates
while we are interating over it on the background thread to save it to disk.

  • UIProcess/WebResourceLoadStatisticsStore.cpp:

(WebKit::WebResourceLoadStatisticsStore::performDailyTasks):
(WebKit::WebResourceLoadStatisticsStore::includeTodayAsOperatingDateIfNecessary):

1:38 PM Changeset in webkit [219738] by commit-queue@webkit.org
  • 4 edits in trunk/Source/WebCore

[CG] An image should not invoke many system calls before confirming its format is supported
https://bugs.webkit.org/show_bug.cgi?id=174692

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

We should be careful when invoking system calls before confirming that the
image type is available and it is one of the whitelist formats. Otherwise
we will be calling the parsers of the unsupported formats.

  • loader/cache/CachedImage.cpp:

(WebCore::CachedImage::setImageDataBuffer): The check isAllowedImageUTI()
is now done in ImageDecoder::encodedDataStatus() which will return Error
if there is an error in the data or "isAllowedImageUTI() returns false."

  • platform/graphics/BitmapImage.cpp:

(WebCore::BitmapImage::dataChanged): Avoid calling canUseAsyncDecodingForLargeImages()
before confirming the image type is available and it's supported by WebKit.
canUseAsyncDecodingForLargeImages() tries to cache the first frame of the
image to know its size. Asking the ImageFrameCache to destroy its decoded
frames is not needed unless ImageFrameCache::decodedSize() is not zero.

  • platform/graphics/cg/ImageDecoderCG.cpp:

(WebCore::ImageDecoder::encodedDataStatus): Avoid calling CGImageSourceGetStatus()
before knowing the UTI of the image. When knowing it, we call CGImageSourceGetStatus()
and if it returns kCGImageStatusIncomplete or kCGImageStatusComplete, we
check whether isAllowedImageUTI() or not. If isAllowedImageUTI() returns
false, return Error which will make the CachedImage cancel loading the
rest of the image.

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

AudioTrackPrivateMediaStreamCocoa shouldn't set AudioSession::setPreferredBufferSize
https://bugs.webkit.org/show_bug.cgi?id=174707
rdar://problem/33446809

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-21
Reviewed by Eric Carlson.

Manually tested for audio side effects.

AudioChannel::copyFrom fails when AudioChannel lengths don't match.

This happens because PlatformMediaSessionManager::updateSessionState() owns and sets
AudioSession::setPreferredBufferSize().

However, AudioTrackPrivateMediaStreamCocoa::createAudioUnit, when it creates an input
audio unit is setting AudioSession::setPreferredBufferSize() directly to its own arbitrary value.

AudioSession::setPreferredBufferSize() should be managed by the higher level
PlatformMediaSessionManager, and not modified by audio unit creation, in order to keep harmony
within the audio pipeline.

  • platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:

(WebCore::AudioTrackPrivateMediaStreamCocoa::createAudioUnit):

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

Noise when AudioChannel lengths don't match.
https://bugs.webkit.org/show_bug.cgi?id=174706
rdar://problem/33389856

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-07-21
Reviewed by Eric Carlson.

When AudioChannel lengths don't match, copyFrom() returns early leaving uninitialized data in the audio buffer.
This change zeros out the data, so there isn't objectionable noise sent to the speaker.

  • platform/audio/AudioChannel.cpp:

(WebCore::AudioChannel::copyFrom):

12:39 PM Changeset in webkit [219735] by commit-queue@webkit.org
  • 11 edits in trunk/Source/WebCore

[WebIDL] Make a few parameters non-nullable in inspector IDL files
https://bugs.webkit.org/show_bug.cgi?id=174719

Patch by Sam Weinig <sam@webkit.org> on 2017-07-21
Reviewed by Joseph Pecoraro.

  • inspector/CommandLineAPIHost.cpp:

(WebCore::CommandLineAPIHost::databaseId):
(WebCore::CommandLineAPIHost::storageId):

  • inspector/CommandLineAPIHost.h:
  • inspector/CommandLineAPIHost.idl:
  • inspector/InspectorDOMStorageAgent.cpp:

(WebCore::InspectorDOMStorageAgent::storageId):

  • inspector/InspectorDOMStorageAgent.h:
  • inspector/InspectorDatabaseAgent.cpp:

(WebCore::InspectorDatabaseAgent::databaseId):

  • inspector/InspectorDatabaseAgent.h:
  • inspector/InspectorFrontendHost.cpp:

(WebCore::InspectorFrontendHost::showContextMenu):
(WebCore::InspectorFrontendHost::dispatchEventAsContextMenuEvent):

  • inspector/InspectorFrontendHost.h:
  • inspector/InspectorFrontendHost.idl:

Remove nullability from arguments that should never be null.

12:36 PM Changeset in webkit [219734] by commit-queue@webkit.org
  • 65 edits in trunk/Source/WebInspectorUI

Web Inspector: Avoid subclassing WebInspector.Object if we do not need to
https://bugs.webkit.org/show_bug.cgi?id=174703

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2017-07-21
Reviewed by Brian Burg.

  • UserInterface/Models/LogObject.js:

(WebInspector.LogObject):
(WebInspector.LogObject.prototype.get startDate): Deleted.
Remove unused startDate property as well.

  • UserInterface/Base/YieldableTask.js:
  • UserInterface/Debug/ProtocolTrace.js:
  • UserInterface/Models/AnalyzerMessage.js:
  • UserInterface/Models/ApplicationCacheFrame.js:
  • UserInterface/Models/ApplicationCacheManifest.js:
  • UserInterface/Models/BackForwardEntry.js:
  • UserInterface/Models/Branch.js:
  • UserInterface/Models/BreakpointAction.js:
  • UserInterface/Models/CSSMedia.js:
  • UserInterface/Models/CSSSelector.js:
  • UserInterface/Models/CallFrame.js:
  • UserInterface/Models/CallingContextTree.js:
  • UserInterface/Models/CallingContextTreeNode.js:
  • UserInterface/Models/CollectionEntry.js:
  • UserInterface/Models/CollectionEntryPreview.js:
  • UserInterface/Models/ConsoleMessage.js:
  • UserInterface/Models/DOMSearchMatchObject.js:
  • UserInterface/Models/DatabaseObject.js:
  • UserInterface/Models/DatabaseTableObject.js:
  • UserInterface/Models/DebuggerDashboard.js:
  • UserInterface/Models/DebuggerData.js:
  • UserInterface/Models/ExecutionContext.js:
  • UserInterface/Models/ExecutionContextList.js:
  • UserInterface/Models/GarbageCollection.js:
  • UserInterface/Models/HeapSnapshotRootPath.js:
  • UserInterface/Models/IndexedDatabase.js:
  • UserInterface/Models/IndexedDatabaseObjectStore.js:
  • UserInterface/Models/IndexedDatabaseObjectStoreIndex.js:
  • UserInterface/Models/Instrument.js:
  • UserInterface/Models/KeyboardShortcut.js:
  • UserInterface/Models/LineWidget.js:
  • UserInterface/Models/MemoryCategory.js:
  • UserInterface/Models/MemoryPressureEvent.js:
  • UserInterface/Models/ObjectPreview.js:
  • UserInterface/Models/Probe.js:
  • UserInterface/Models/ProbeSetDataFrame.js:
  • UserInterface/Models/Profile.js:
  • UserInterface/Models/ProfileNode.js:
  • UserInterface/Models/ProfileNodeCall.js:
  • UserInterface/Models/PropertyDescriptor.js:
  • UserInterface/Models/PropertyPath.js:
  • UserInterface/Models/PropertyPreview.js:
  • UserInterface/Models/ResourceQueryMatch.js:
  • UserInterface/Models/ResourceQueryResult.js:
  • UserInterface/Models/ResourceTimingData.js:
  • UserInterface/Models/Revision.js:
  • UserInterface/Models/ScopeChainNode.js:
  • UserInterface/Models/ScriptSyntaxTree.js:
  • UserInterface/Models/SourceCodePosition.js:
  • UserInterface/Models/SourceCodeSearchMatchObject.js:
  • UserInterface/Models/SourceMap.js:
  • UserInterface/Models/StackTrace.js:
  • UserInterface/Models/StructureDescription.js:
  • UserInterface/Models/TextMarker.js:
  • UserInterface/Models/TextRange.js:
  • UserInterface/Models/TimelineRange.js:
  • UserInterface/Models/TypeDescription.js:
  • UserInterface/Models/TypeSet.js:
  • UserInterface/Protocol/ProtocolTracer.js:
  • UserInterface/Proxies/FormatterWorkerProxy.js:
  • UserInterface/Proxies/HeapSnapshotDiffProxy.js:
  • UserInterface/Proxies/HeapSnapshotWorkerProxy.js:
  • UserInterface/Test/TestSuite.js:
11:48 AM Changeset in webkit [219733] by beidson@apple.com
  • 29 edits
    13 deletes in trunk

Get rid of WebCore IconDatabase code.
https://bugs.webkit.org/show_bug.cgi?id=174700

Reviewed by Tim Horton.

Source/WebCore:

No new tests (No behavior change).

Tons of red.
Very little green.
No further explanation.

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

(WebCore::Document::implicitClose):

  • history/HistoryItem.cpp:

(WebCore::HistoryItem::HistoryItem):
(WebCore::HistoryItem::~HistoryItem):
(WebCore::HistoryItem::reset):
(WebCore::HistoryItem::setURLString):

  • inspector/InspectorNetworkAgent.cpp:

(WebCore::InspectorNetworkAgent::willSendRequest):

  • loader/DocumentLoader.cpp:

(WebCore::DocumentLoader::~DocumentLoader):
(WebCore::DocumentLoader::startIconLoading):
(WebCore::DocumentLoader::iconLoadDecisionAvailable): Deleted.
(WebCore::iconLoadDecisionCallback): Deleted.
(WebCore::DocumentLoader::getIconLoadDecisionForIconURL): Deleted.
(WebCore::DocumentLoader::continueIconLoadWithDecision): Deleted.
(WebCore::iconDataCallback): Deleted.
(WebCore::DocumentLoader::getIconDataForIconURL): Deleted.

  • loader/DocumentLoader.h:

(WebCore::DocumentLoader::linkIcons):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::FrameLoader):
(WebCore::FrameLoader::stop):

  • loader/FrameLoader.h:

(WebCore::FrameLoader::subframeLoader):
(WebCore::FrameLoader::icon): Deleted.

  • loader/FrameLoaderClient.h:
  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create):

  • loader/icon/IconController.cpp: Removed.
  • loader/icon/IconController.h: Removed.
  • loader/icon/IconDatabase.cpp: Removed.
  • loader/icon/IconDatabase.h: Removed.
  • loader/icon/IconDatabaseBase.cpp: Removed.
  • loader/icon/IconDatabaseBase.h: Removed.
  • loader/icon/IconDatabaseClient.h: Removed.
  • loader/icon/IconLoader.cpp:

(WebCore::IconLoader::IconLoader):
(WebCore::IconLoader::startLoading):
(WebCore::IconLoader::notifyFinished):

  • loader/icon/IconLoader.h:
  • loader/icon/IconRecord.cpp: Removed.
  • loader/icon/IconRecord.h: Removed.
  • loader/icon/PageURLRecord.cpp: Removed.
  • loader/icon/PageURLRecord.h: Removed.
  • testing/Internals.cpp:

(WebCore::Internals::shortcutIconURLs):

Source/WebKit:

  • UIProcess/API/glib/WebKitWebContext.cpp:
  • WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:

(WebKit::WebFrameLoaderClient::useIconLoadingClient): Deleted.

  • WebProcess/WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKitLegacy:

  • WebKitLegacy.xcodeproj/project.pbxproj:

Source/WebKitLegacy/mac:

  • Misc/WebCoreStatistics.mm:

(+[WebCoreStatistics iconPageURLMappingCount]):
(+[WebCoreStatistics iconRetainedPageURLCount]):
(+[WebCoreStatistics iconRecordCount]):
(+[WebCoreStatistics iconsWithDataCount]):

  • WebCoreSupport/WebFrameLoaderClient.h:
  • WebCoreSupport/WebFrameLoaderClient.mm:
  • WebCoreSupport/WebIconDatabaseClient.h: Removed.
  • WebCoreSupport/WebIconDatabaseClient.mm: Removed.
  • WebView/WebView.mm:

(-[WebView mainFrameIconURL]):

LayoutTests:

  • fast/dom/icon-url-list-expected.txt:
  • fast/dom/icon-url-list.html:
9:59 AM Changeset in webkit [219732] by Yusuke Suzuki
  • 3 edits in trunk/Source/WTF

[WTF] Drop initializeDate
https://bugs.webkit.org/show_bug.cgi?id=174714

Reviewed by Darin Adler.

minYear static variable will be initialized in an exclusive manner, which is ensured by C++ "static" semantics.
Thus, we do not need to call initializeDate() explicitly.

  • wtf/DateMath.cpp:

(WTF::equivalentYearForDST):
(WTF::initializeDates): Deleted.

  • wtf/Threading.cpp:

(WTF::initializeThreading):

9:41 AM Changeset in webkit [219731] by Yusuke Suzuki
  • 12 edits
    1 add in trunk/Source

[JSC] Introduce static symbols
https://bugs.webkit.org/show_bug.cgi?id=158863

Reviewed by Darin Adler.

Source/JavaScriptCore:

We use StaticSymbolImpl to initialize PrivateNames and builtin Symbols.
As a result, we can share the same Symbol values between VMs and threads.
And we do not need to allocate Ref<SymbolImpl> for these symbols at runtime.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • builtins/BuiltinNames.cpp: Added.

Suppress warning C4307, integral constant overflow. It is intentional in constexpr hash value calculation.

  • builtins/BuiltinNames.h:

(JSC::BuiltinNames::BuiltinNames):

  • builtins/BuiltinUtils.h:

Source/WTF:

We add a new class StaticSymbolImpl. StaticSymbolImpl can offer
the way to create static SymbolImpl. It can be shared between
multiple VMs and multiple threads.

  • wtf/text/SymbolImpl.h:

(WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl):
(WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&):
For StaticSymbolImpl's hashForSymbol, we use usual string hash value.
Since all the SymbolImpls are unique, basically, any value is OK here.
Non-confilicting to the other SymbolImpls is ideal.

9:35 AM Changeset in webkit [219730] by Chris Dumez
  • 15 edits
    3 moves in trunk/Source/WebCore

Rename DOMCoreException class to DOMException
https://bugs.webkit.org/show_bug.cgi?id=174698

Reviewed by Darin Adler.

Rename DOMCoreException class to DOMException to match its Web-exposed name.

  • CMakeLists.txt:
  • DerivedSources.cpp:
  • DerivedSources.make:
  • Modules/quota/StorageErrorCallback.cpp:

(WebCore::StorageErrorCallback::CallbackTask::CallbackTask):

  • Modules/quota/StorageErrorCallback.h:
  • Modules/quota/StorageErrorCallback.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSDOMExceptionHandling.cpp:

(WebCore::retrieveErrorMessage):
(WebCore::createDOMException):

  • bindings/scripts/CodeGeneratorJS.pm:

(GenerateOverloadDispatcher):

  • css/FontFaceSet.cpp:
  • css/FontFaceSet.h:
  • dom/DOMAllInOne.cpp:
  • dom/DOMException.cpp: Renamed from Source/WebCore/dom/DOMCoreException.cpp.

(WebCore::DOMException::create):
(WebCore::DOMException::DOMException):
(WebCore::DOMException::initializeDescription):

  • dom/DOMException.h: Renamed from Source/WebCore/dom/DOMCoreException.h.

(WebCore::DOMException::create):
(WebCore::DOMException::DOMException):

  • dom/DOMException.idl: Renamed from Source/WebCore/dom/DOMCoreException.idl.
  • dom/DOMExceptions.in:
  • dom/make_dom_exceptions.pl:

(generateImplementation):

9:34 AM Changeset in webkit [219729] by Chris Dumez
  • 10 edits in trunk/LayoutTests

Unreviewed, rebaseline test after r219708.

  • js/dom/global-constructors-attributes-expected.txt:
  • platform/gtk/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-highsierra-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-highsierra/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
  • platform/mac/js/dom/global-constructors-attributes-expected.txt:
  • platform/win/js/dom/global-constructors-attributes-expected.txt:
9:02 AM Changeset in webkit [219728] by commit-queue@webkit.org
  • 3 edits in trunk/Tools

[CMake] Add an option to stop build after generating project files
https://bugs.webkit.org/show_bug.cgi?id=174664

Patch by Yousuke Kimoto <Yousuke.Kimoto@sony.com> on 2017-07-21
Reviewed by Konstantin Tokarev.

Add "--generate-project-only" to stop build after generating project files.

  • Scripts/build-webkit: Add '--generate-project-only' option and a checker to stop build.
  • Scripts/webkitdirs.pm: Add a function to check '--generate-project-only' option and the same checker as the above

(buildCMakeProjectOrExit): Add a cheker to stop build stop build after generating project files.
(determineIsGenerateProjectOnly): Check if '--generate-project-only' option is specified
(isGenerateProjectOnly): ditto

9:01 AM Changeset in webkit [219727] by Yusuke Suzuki
  • 5 edits
    2 adds in trunk

[FTL] Arguments elimination is suppressed by unreachable blocks
https://bugs.webkit.org/show_bug.cgi?id=174352

Reviewed by Filip Pizlo.

JSTests:

  • stress/arguments-elimination-force-exit.js: Added.

(shouldBe):
(strict):
(sloppy):

  • stress/arguments-elimination-throw.js: Added.

(shouldBe):
(shouldThrow):
(sloppy):
(isArguments):

Source/JavaScriptCore:

If we do not execute op_get_by_id, our value profiling tells us unpredictable and DFG emits ForceOSRExit.
The problem is that arguments elimination phase checks escaping even when ForceOSRExit preceeds.
Since GetById without information can escape arguments if it is specified, non-executed code including
op_get_by_id with arguments can escape arguments.

For example,

function test(flag)
{

if (flag) {

This is not executed, but emits GetById with arguments.
It prevents us from eliminating materialization.
return arguments.length;

}
return arguments.length;

}
noInline(test);
while (true)

test(false);

We do not perform CFA and dead-node clipping yet when performing arguments elimination phase.
So this GetById exists and escapes arguments.

To solve this problem, our arguments elimination phase checks preceding pseudo-terminal nodes.
If it is shown, following GetById does not escape arguments. Compared to performing AI, it is
lightweight. But it catches much of typical cases we failed to perform arguments elimination.

  • dfg/DFGArgumentsEliminationPhase.cpp:
  • dfg/DFGNode.h:

(JSC::DFG::Node::isPseudoTerminal):

  • dfg/DFGValidate.cpp:
8:50 AM Changeset in webkit [219726] by weinig@apple.com
  • 2 edits in trunk/Source/WebCore

Follow up to https://bugs.webkit.org/show_bug.cgi?id=174659.

  • inspector/InspectorFrontendHost.idl:

Remove unnecessary JSGenerateToJSObject noticed in review.

8:37 AM Changeset in webkit [219725] by Yusuke Suzuki
  • 5 edits in trunk

[WTF] Newly added AtomicStringImpl should use BufferInternal static string if StringImpl is static
https://bugs.webkit.org/show_bug.cgi?id=174501

Reviewed by Darin Adler.

Source/WTF:

When creating AtomicStringImpl from static StringImpl, we can just use createWithoutCopying
to create a BufferInternal AtomicStringImpl which m_data{8,16} is static string's one.

  • wtf/text/AtomicStringImpl.cpp:

(WTF::CStringTranslator::hash):
(WTF::CStringTranslator::equal):
(WTF::CStringTranslator::translate):
(WTF::AtomicStringImpl::add):
(WTF::HashTranslatorCharBuffer::HashTranslatorCharBuffer):
(WTF::UCharBufferTranslator::hash):
(WTF::UCharBufferTranslator::equal):
(WTF::UCharBufferTranslator::translate):
(WTF::LCharBufferTranslator::hash):
(WTF::LCharBufferTranslator::equal):
(WTF::LCharBufferTranslator::translate):
(WTF::BufferFromStaticDataTranslator::hash):
(WTF::BufferFromStaticDataTranslator::equal):
(WTF::BufferFromStaticDataTranslator::translate):
(WTF::AtomicStringImpl::addLiteral):
(WTF::addSymbol):
(WTF::addStatic):
(WTF::AtomicStringImpl::addSlowCase):
(WTF::AtomicStringImpl::lookUp):
(WTF::CharBufferFromLiteralDataTranslator::hash): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::equal): Deleted.
(WTF::CharBufferFromLiteralDataTranslator::translate): Deleted.
(WTF::addSubstring): Deleted.

  • wtf/text/StringImpl.h:

Tools:

  • TestWebKitAPI/Tests/WTF/StringImpl.cpp:

(TestWebKitAPI::TEST):

6:46 AM Changeset in webkit [219724] by Konstantin Tokarev
  • 5 edits in trunk

[cmake] Unreviewed, add definitions necessary to use ICU shipped with macOS

macOS system ICU libraries are built with U_DISABLE_RENAMING=1 and
U_SHOW_CPLUSPLUS_API=0. After r219155 we have to pass this definitons
explicitly, because ICU headers in the tree are not modified anymore.

.:

  • Source/cmake/OptionsJSCOnly.cmake:
  • Source/cmake/OptionsMac.cmake:

Source/WTF:

  • wtf/PlatformMac.cmake: Rely on ICU_LIBRARIES instead of passing ICU

library name explicitly in WTF_LIBRARIES.

3:22 AM Changeset in webkit [219723] by Carlos Garcia Campos
  • 2 edits in trunk/Source/WebKit

Web Automation: implicit navigations don't cause browsing context switch
https://bugs.webkit.org/show_bug.cgi?id=174633
<rdar://problem/33387797>

Reviewed by Brian Burg.

When a new page load replaces the current frameset, for example when a link in the current browser context has a
_top target, there's no explicit context switch, so the web driver doesn't know that the current browsing
context is no longer valid. Following commands will still be using the previous frame as the current browsing
context, but they don't fail with no such frame because the frame is still alive in the page cache and
referenced in the internal maps used in both UI and web processes. This causes test
testShouldFocusOnTheReplacementWhenAFrameFollowsALinkToA_TopTargetedPage to fail, since it expects a no such
frame exception. When a new page navigation happens we can simply remove references to frames from
m_handleWebFrameMap in WebAutomationSession, because any existing frame reference in the map should be for a
previous page. With this, before the next command is executed, waitForNavigationToComplete will be called and it
will fail with no such frame, condition that is handled to switch to the top level browser context. The test
still fails, because the find element command is called with the top level browsing context, returning no such
element, instead of no such frame. This is consistent with Chrome.

  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::navigationOccurredForFrame): Clear the m_handleWebFrameMap when a new page load
finished.

2:50 AM Changeset in webkit [219722] by Carlos Garcia Campos
  • 9 edits in trunk/Source

WebDriver: wait until navigation is complete before running new commands and after a click
https://bugs.webkit.org/show_bug.cgi?id=174670

Reviewed by Brian Burg.

Source/WebDriver:

We are already waiting for navigation to complete after navigation commands (go, back, forward, refresh), but
the spec says we should always wait before executing a new command and also after a click. This is causing test
testShouldBeAbleToNavigateBackInTheBrowserHistoryInPresenceOfIframes to sometimes fail, because it does .click()
+ .title and expects the title to tbe the one of the page loaded by the click. Since the load happens very fast,
the test usually passes, but in a real case with a slower load, the title of the previous page will be returned
most of the times.

6.3 Processing Model. Step 7. Wait for navigation to complete. If this returns an error return its value and
jump to step 1 in this overall algorithm, otherwise continue.
https://www.w3.org/TR/webdriver/#processing-model

14.1 Element Click. Step 10. If the click causes navigation: 1. Run the post-navigation checks and return its
value if it is an error. 2. Try to wait for navigation to complete.
https://www.w3.org/TR/webdriver/#element-click

  • Session.cpp:

(WebDriver::Session::waitForNavigationToComplete): Send waitForNavigationToComplete message to the browser to
wait for any pending navigation of current browsing context to complete.
(WebDriver::Session::elementClick): Call waitForNavigationToComplete() after the click.

  • Session.h:
  • WebDriverService.cpp:

(WebDriver::WebDriverService::go): Wait for navigations to complete before running the command.
(WebDriver::WebDriverService::getCurrentURL): Ditto.
(WebDriver::WebDriverService::back): Ditto.
(WebDriver::WebDriverService::forward): Ditto.
(WebDriver::WebDriverService::refresh): Ditto.
(WebDriver::WebDriverService::getTitle): Ditto.
(WebDriver::WebDriverService::switchToFrame): Ditto.
(WebDriver::WebDriverService::switchToParentFrame): Ditto.
(WebDriver::WebDriverService::findElement): Ditto.
(WebDriver::WebDriverService::findElements): Ditto.
(WebDriver::WebDriverService::executeScript): Ditto.
(WebDriver::WebDriverService::executeAsyncScript): Ditto.

Source/WebKit:

Add waitForNavigationToComplete method to Automation to allow WebDriver to wait for pending navigations to
complete. The new method already receives page load strategy and timeout, but they are not implemented yet.

  • UIProcess/Automation/Automation.json: Add waitForNavigationToComplete method and PageLoadStrategy new type.
  • UIProcess/Automation/WebAutomationSession.cpp:

(WebKit::WebAutomationSession::waitForNavigationToComplete): Call waitForNavigationToCompleteOnPage or
waitForNavigationToCompleteOnFrame depending on whether the current borwsing context is the main frame or not.
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnPage): Check if there's an ongoing load for the page,
and wait for it to complete if needed.
(WebKit::WebAutomationSession::waitForNavigationToCompleteOnFrame): Check if there's an ongoing load for the frame,
and wait for it to complete if needed.
(WebKit::WebAutomationSession::navigateBrowsingContext): Use waitForNavigationToCompleteOnPage() now.
(WebKit::WebAutomationSession::goBackInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::goForwardInBrowsingContext): Ditto.
(WebKit::WebAutomationSession::reloadBrowsingContext): Ditto.
(WebKit::WebAutomationSession::navigationOccurredForFrame): Renamed since it now receives the notification for
all the frames. Complete page operations if it's a main frame, or frame operations otherwise.

  • UIProcess/Automation/WebAutomationSession.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::didFinishLoadForFrame): Notify about all frames, not only the main one.
(WebKit::WebPageProxy::didFailLoadForFrame): Ditto.
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Ditto.

2:43 AM Changeset in webkit [219721] by Carlos Garcia Campos
  • 3 edits in trunk/Source/WebDriver

WebDriver: correctly handle main frame handles
https://bugs.webkit.org/show_bug.cgi?id=174668

Reviewed by Brian Burg.

When I switched to use std::optional instead of empty strings for the browsing contexts in WebDriver, I forgot
that automation uses empty string for frames to refer to the main frame. We should handle that case, because we
are currently considering empty strings as valid browsing context. It's not a big deal because Automation
converts back the empty string received to the main frame, though. We should also ensure we close the current
browsing context when switching to a new top level browsing context. This patch adds to helper private methods
to switch browsing contexts that deal with the special cases.

  • Session.cpp:

(WebDriver::Session::close):
(WebDriver::Session::switchToTopLevelBrowsingContext):
(WebDriver::Session::switchToBrowsingContext):
(WebDriver::Session::createTopLevelBrowsingContext):
(WebDriver::Session::go):
(WebDriver::Session::back):
(WebDriver::Session::forward):
(WebDriver::Session::refresh):
(WebDriver::Session::switchToWindow):
(WebDriver::Session::switchToFrame):
(WebDriver::Session::switchToParentFrame):

  • Session.h:
1:22 AM Changeset in webkit [219720] by Claudio Saavedra
  • 11 edits in trunk/LayoutTests

[GTK] Update test expectations after r219663

Unreviewed gardening

DOMException got its toString() removed so the output changes.

  • platform/gtk/crypto/subtle/aes-cbc-cfb-decrypt-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-cbc-cfb-encrypt-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-export-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-generate-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/aes-import-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/rsa-generate-key-malformed-parameters-expected.txt:
  • platform/gtk/crypto/subtle/rsa-import-key-malformed-parameters-expected.txt:
  • platform/gtk/fast/mediastream/RTCPeerConnection-closed-state-expected.txt:
  • platform/gtk/fast/text/font-selection-font-loading-api-parse-expected.txt:
  • platform/gtk/http/tests/dom/document-attributes-null-handling-expected.txt:
12:40 AM Changeset in webkit [219719] by Claudio Saavedra
  • 2 edits in trunk/LayoutTests

[WPE] Update expectation file

Unreviewed gardening.

Drop XPathException after r219708.

  • platform/wpe/js/dom/global-constructors-attributes-expected.txt:
Note: See TracTimeline for information about the timeline view.