Timeline
Aug 19, 2018:
- 11:57 PM Changeset in webkit [235023] by
-
- 8 edits in trunk
[GLIB] Complete the JSCException API
https://bugs.webkit.org/show_bug.cgi?id=188695
Reviewed by Michael Catanzaro.
Source/JavaScriptCore:
Add more API to JSCException:
- New function to get the column number
- New function get exception as string (toString())
- Add the possibility to create exceptions with a custom error name.
- New function to get the exception error name
- New function to get the exception backtrace.
- New convenience function to report a exception by returning a formatted string with all the exception details, to be shown as a user error message.
- API/glib/JSCContext.cpp:
(jsc_context_throw_with_name):
- API/glib/JSCContext.h:
- API/glib/JSCException.cpp:
(jscExceptionEnsureProperties):
(jsc_exception_new):
(jsc_exception_new_with_name):
(jsc_exception_get_name):
(jsc_exception_get_column_number):
(jsc_exception_get_back_trace_string):
(jsc_exception_to_string):
(jsc_exception_report):
- API/glib/JSCException.h:
- API/glib/docs/jsc-glib-4.0-sections.txt:
Tools:
Add cases to test the new API.
- TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCCheckSyntax):
(createCustomError):
(testJSCExceptions):
- 5:53 PM Changeset in webkit [235022] by
-
- 29 edits in trunk/Source/WebKit
[Cocoa] Update uses of wrapper template functions in WebKit for clarity, simplicity, better ARC readiness
https://bugs.webkit.org/show_bug.cgi?id=188735
Reviewed by Dan Bernstein.
Because of argument-dependent lookup, there should never be a reason to call
the wrapper function as WebKit::wrapper or API::wrapper unless there is a need
to resolve a name conflict, so removed the explicit namespacing.
- UIProcess/API/C/mac/WKPagePrivateMac.mm:
(WKPageLoadURLRequestReturningNavigation): Removed explicit null check and
leakRef/autorelease pair, both done by the wrapper template function now.
- UIProcess/API/Cocoa/WKBackForwardList.mm:
(toWKBackForwardListItem): Deleted.
(-[WKBackForwardList currentItem]): Use wrapper instead of toWKBackForwardListItem.
(-[WKBackForwardList backItem]): Ditto.
(-[WKBackForwardList forwardItem]): Ditto.
(-[WKBackForwardList itemAtIndex:]): Ditto.
(-[WKBackForwardList backList]): Removed leakRef/autorelease pair.
(-[WKBackForwardList forwardList]): Ditto.
- UIProcess/API/Cocoa/WKContentRuleListStore.mm:
(+[WKContentRuleListStore defaultStore]): Removed explicit WebKit namespace.
(+[WKContentRuleListStore storeWithURL:]): Fixed a storage leak by removing leakRef,
which was not balanced. This is not a copy or create function, so it should not
return an object that requires a release to balance it.
(-[WKContentRuleListStore _compileContentRuleListForIdentifier:encodedContentRuleList:completionHandler:releasesArgument:]):
Removed explicit WebKit namespace and unneeded get().
(-[WKContentRuleListStore lookUpContentRuleListForIdentifier:completionHandler:]):
Removed explicit WebKit namespace.
(+[WKContentRuleListStore defaultStoreWithLegacyFilename]): Ditto.
(+[WKContentRuleListStore storeWithURLAndLegacyFilename:]): Fixed storage leak,
as above in storeWithURL.
- UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo _handle]): Removed explicit WebKit namespace.
- UIProcess/API/Cocoa/WKHTTPCookieStore.mm:
(WKHTTPCookieStoreObserver::cookiesDidChange): Ditto.
- UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction sourceFrame]): Removed explicit null check, now done by
the wrapper template function.
(-[WKNavigationAction targetFrame]): Ditto.
(-[WKNavigationAction _userInitiatedAction]): Ditto.
(-[WKNavigationAction _mainFrameNavigation]): Ditto.
- UIProcess/API/Cocoa/WKOpenPanelParameters.mm:
(-[WKOpenPanelParameters _acceptedMIMETypes]): Removed leakRef/autorelease pair,
now done by the wrapper template function.
(-[WKOpenPanelParameters _acceptedFileExtensions]): Ditto.
- UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences copyWithZone:]): Use retain instead of leakRef; slightly clearer
for when we convert to ARC.
(+[WKPreferences _experimentalFeatures]): Removed leakRef/autorelease pair,
now done by the wrapper template function.
- UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _configuration]): Fixed a storage leak by removing leakRef,
which was not balanced. This is not a copy or create function, so it should not
return an object that requires a release to balance it.
- UIProcess/API/Cocoa/WKURLSchemeTaskInternal.h:
Replaced inline wrapper function with WrapperTraits structure template specialization.
- UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript _userContentWorld]): Removed explicit API namespace.
- UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadRequest:]): Removed explicit null check and
leakRef/autorelease pair, both done by the wrapper template function now.
(-[WKWebView loadFileURL:allowingReadAccessToURL:]): Ditto.
(-[WKWebView loadData:MIMEType:characterEncodingName:baseURL:]): Ditto.
(-[WKWebView goToBackForwardListItem:]): Ditto.
(-[WKWebView goBack]): Ditto.
(-[WKWebView goForward]): Ditto.
(-[WKWebView reload]): Ditto.
(-[WKWebView reloadFromOrigin]): Ditto.
(-[WKWebView _didInsertAttachment:withSource:]): Removed leakRef/autorelease pairs,
now done by the wrapper template function.
(-[WKWebView _didRemoveAttachment:]): Ditto.
(-[WKWebView _loadData:MIMEType:characterEncodingName:baseURL:userData:]): Removed
explicit null check and leakRef/autorelease pair, both done by the wrapper template
function now.
(-[WKWebView _loadRequest:shouldOpenExternalURLs:]): Ditto.
(-[WKWebView _reloadWithoutContentBlockers]): Ditto.
(-[WKWebView _reloadExpiredOnly]): Ditto.
(-[WKWebView _sessionStateData]): Removed explicit leakRef/autorelease pair, done
by the wrapper template function now. Also, the old version explicitly dereferenced
and would not work when the result of encodeLegacySessionState was null. Decided
not to add a call to releaseNonNull to preserve that possibly-incorrect optimization,
instead allowing the wrapper function to generate code to handle the null case.
(-[WKWebView _sessionState]): Use the Objective-C autorelease instead of adoptNS
and RetainPtr's autorelease.
(-[WKWebView _sessionStateWithFilter:]): Ditto.
(-[WKWebView _restoreSessionState:andNavigate:]): Removed explicit null check and
leakRef/autorelease pair, both done by the wrapper template function now.
(-[WKWebView _insertAttachmentWithFilename:contentType:data:options:completion:]):
Removed explicit leakRef/autorelease pair, done by the wrapper template function now.
(-[WKWebView _diagnosticLoggingDelegate]): Replaced a leakRef/autorelease pair with
use of RetainPtr's autorelease.
(-[WKWebView _findDelegate]): Ditto.
- UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _applicationManifest]): Removed explicit null check,
done by the wrapper template function now.
- UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
(+[WKWebsiteDataStore defaultDataStore]): Removed explicit WebKit namespace
and unneeded call to get().
(+[WKWebsiteDataStore nonPersistentDataStore]): Removed explicit WebKit namespace
and leakRef/autorelease pair, done by the wrapper template function now.
(-[WKWebsiteDataStore httpCookieStore]): Removed explicit WebKit namespace.
- UIProcess/API/Cocoa/_WKApplicationManifest.mm:
(+[_WKApplicationManifest applicationManifestFromJSON:manifestURL:documentURL:]):
Removed explicit leakRef/autorelease pair, done by the wrapper template function now.
- UIProcess/API/Cocoa/_WKGeolocationPosition.mm:
(WebKit::wrapper): Ditto.
- UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration copyWithZone:]): Use retain instead of leakRef;
slightly clearer for when we convert to ARC.
- UIProcess/API/Cocoa/_WKUserContentWorld.mm:
(+[_WKUserContentWorld worldWithName:]): Removed explicit leakRef/autorelease pair,
done by the wrapper template function now.
- UIProcess/API/Cocoa/_WKWebsitePolicies.mm:
(-[_WKWebsitePolicies websiteDataStore]): Removed explicit null check, done by
the wrapper template function now.
- UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::didChangeBackForwardList): Removed
explicit null check, done by the wrapper template function now.
(WebKit::NavigationState::NavigationClient::decidePolicyForNavigationAction): Ditto.
(WebKit::NavigationState::NavigationClient::didStartProvisionalNavigation): Ditto.
(WebKit::NavigationState::NavigationClient::didReceiveServerRedirectForProvisionalNavigation): Ditto.
(WebKit::NavigationState::NavigationClient::didFailProvisionalNavigationWithError): Ditto.
(WebKit::NavigationState::NavigationClient::didFailProvisionalLoadInSubframeWithError): Ditto.
(WebKit::NavigationState::NavigationClient::didCommitNavigation): Ditto.
(WebKit::NavigationState::NavigationClient::didFinishDocumentLoad): Ditto.
(WebKit::NavigationState::NavigationClient::didFinishNavigation): Ditto.
(WebKit::NavigationState::NavigationClient::didFailNavigationWithError): Ditto.
(WebKit::NavigationState::NavigationClient::didSameDocumentNavigation): Ditto.
- UIProcess/Cocoa/SessionStateCoding.mm:
(WebKit::encodeSessionState): Removed explicit leakRef/autorelease pair, done
by the wrapper template function now. Also, the old version explicitly dereferenced
and would not work when the result of encodeLegacySessionState was null. Decided
not to add a call to releaseNonNull to preserve that possibly-incorrect optimization,
instead allowing the wrapper function to generate code to handle the null case.
- UIProcess/mac/WKInspectorViewController.mm:
(-[WKInspectorViewController configuration]): Removed explicit WebKit namespace.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]): Removed explicit null check,
done by the wrapper template function now.
(-[WKWebProcessPlugInFrame hitTest:]): Removed explicit leakRef/autorelease pair, done
by the wrapper template function now. Also, the old version explicitly dereferenced
and would not work when the result of hitTest was null. Decided not to add a call to
releaseNonNull to preserve that possibly-incorrect optimization, instead allowing the
wrapper function to generate code to handle the null case.
(-[WKWebProcessPlugInFrame childFrames]): Removed explicit leakRef/autorelease pair,
done by the wrapper template function now.
(-[WKWebProcessPlugInFrame handle]): Ditto.
(-[WKWebProcessPlugInFrame _parentFrame]): Removed explicit null check, done by the
wrapper template function now.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
(-[WKWebProcessPlugInHitTestResult nodeHandle]): Removed explicit null check and
leakRef/autorelease pair, both done by the wrapper template function now.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(+[WKWebProcessPlugInNodeHandle nodeHandleWithJSValue:inContext:]): Ditto.
(-[WKWebProcessPlugInNodeHandle htmlIFrameElementContentFrame]): Ditto.
(-[WKWebProcessPlugInNodeHandle HTMLTableCellElementCellAbove]): Ditto.
(-[WKWebProcessPlugInNodeHandle frame]): Ditto.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandle.mm:
(+[WKWebProcessPlugInRangeHandle rangeHandleWithJSValue:inContext:]): Ditto.
(-[WKWebProcessPlugInRangeHandle frame]): Ditto.
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.mm:
(+[WKWebProcessPlugInScriptWorld world]): Ditto.
- WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController mainFrame]): Ditto.
(+[WKWebProcessPlugInBrowserContextController lookUpBrowsingContextFromHandle:]): Ditto.
- 5:24 PM Changeset in webkit [235021] by
-
- 2 edits in trunk/Source/JavaScriptCore
Unreviewed, rolling out r234852.
https://bugs.webkit.org/show_bug.cgi?id=188736
Workaround is not correct (Requested by yusukesuzuki on
#webkit).
Reverted changeset:
"[JSC] Should not rotate constant with 64"
https://bugs.webkit.org/show_bug.cgi?id=188556
https://trac.webkit.org/changeset/234852
- 4:59 PM Changeset in webkit [235020] by
-
- 3 edits in trunk/Source/WebCore
Shrink size of WebCore::Event further by reordering members
https://bugs.webkit.org/show_bug.cgi?id=188734
Reviewed by Daniel Bates.
Since WebCore::Event is ref-counted class, it has 4bytes m_refCount at the head of the class.
So placing 4bytes just after that before placing 8bytes aligned member (like pointers in 64bit
platforms) can save the size of WebCore::Event further.
This patch reorders members of WebCore::Event to shrink the size from 80bytes to 72bytes.
No behavior change.
- dom/Event.cpp:
(WebCore::Event::Event):
- dom/Event.h:
- 3:54 PM Changeset in webkit [235019] by
-
- 54 edits in trunk/Source/WebKit
[Cocoa] Consolidate inline "wrapper" functions in WebKit API into function templates and WrapperTraits
https://bugs.webkit.org/show_bug.cgi?id=188733
Reviewed by Sam Weinig.
Replaced all the different functions named "wrapper" that were all boilerplate doing Objective-C
casts with WrapperTraits specializations. The only thing about this that was at all tricky was
the loose mixing of the WebKit namespace, the API namespace, and the global namespace. My choice
for this first step was to put WrapperTraits into the WebKit namespace and to put the wrapper
function into both the WebKit and API namespaces with "using". This turned out pretty clean: did
not have to touch any of the code calling wrapper just to make things work, although we can now
clean up by changing call sites to get rid of unnecessary explicit use of leakRef and autorelease.
Doing this will make ARC conversion practical and easy, which is the motivation behind pursuing
this set of changes.
- Shared/Cocoa/WKObject.h: Tweaked style of the ObjectStorage structure template,
using a class name instead of "T". Added WrapperTraits structure template, checkedObjCCast
function template, and multiple wrapper functions templates that take a variety of pointer,
reference, smart pointer, and smart reference types, and return the wrapper for each one,
handling object lifetime appropriately.
- Shared/API/Cocoa/_WKFrameHandleInternal.h:
- Shared/API/Cocoa/_WKHitTestResultInternal.h:
- Shared/Cocoa/WKNSArray.h:
- Shared/Cocoa/WKNSData.h:
- Shared/Cocoa/WKNSDictionary.h:
- Shared/Cocoa/WKNSError.h:
- Shared/Cocoa/WKNSNumber.h:
- Shared/Cocoa/WKNSString.h:
- Shared/Cocoa/WKNSURL.h:
- Shared/Cocoa/WKNSURLRequest.h:
- UIProcess/API/Cocoa/WKBackForwardListInternal.h:
- UIProcess/API/Cocoa/WKBackForwardListItemInternal.h:
- UIProcess/API/Cocoa/WKBrowsingContextGroupInternal.h:
- UIProcess/API/Cocoa/WKConnectionInternal.h:
- UIProcess/API/Cocoa/WKContentRuleListInternal.h:
- UIProcess/API/Cocoa/WKContentRuleListStoreInternal.h:
- UIProcess/API/Cocoa/WKFrameInfoInternal.h:
- UIProcess/API/Cocoa/WKHTTPCookieStoreInternal.h:
- UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.h:
- UIProcess/API/Cocoa/WKNavigationActionInternal.h:
- UIProcess/API/Cocoa/WKNavigationDataInternal.h:
- UIProcess/API/Cocoa/WKNavigationInternal.h:
- UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
- UIProcess/API/Cocoa/WKOpenPanelParametersInternal.h:
- UIProcess/API/Cocoa/WKPreferencesInternal.h:
- UIProcess/API/Cocoa/WKProcessPoolInternal.h:
- UIProcess/API/Cocoa/WKSecurityOriginInternal.h:
- UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
- UIProcess/API/Cocoa/WKUserScriptInternal.h:
- UIProcess/API/Cocoa/WKWebsiteDataRecordInternal.h:
- UIProcess/API/Cocoa/WKWebsiteDataStoreInternal.h:
- UIProcess/API/Cocoa/WKWindowFeaturesInternal.h:
- UIProcess/API/Cocoa/_WKApplicationManifestInternal.h:
- UIProcess/API/Cocoa/_WKAttachmentInternal.h:
- UIProcess/API/Cocoa/_WKAutomationSessionInternal.h:
- UIProcess/API/Cocoa/_WKExperimentalFeatureInternal.h:
- UIProcess/API/Cocoa/_WKGeolocationPositionInternal.h:
- UIProcess/API/Cocoa/_WKProcessPoolConfigurationInternal.h:
- UIProcess/API/Cocoa/_WKUserContentWorldInternal.h:
- UIProcess/API/Cocoa/_WKUserInitiatedActionInternal.h:
- UIProcess/API/Cocoa/_WKUserStyleSheetInternal.h:
- UIProcess/API/Cocoa/_WKVisitedLinkStoreInternal.h:
- UIProcess/API/Cocoa/_WKWebsitePoliciesInternal.h:
- UIProcess/Cocoa/DownloadClient.mm:
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrameInternal.h:
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResultInternal.h:
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandleInternal.h:
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroupInternal.h:
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInRangeHandleInternal.h:
- WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorldInternal.h:
- WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerInternal.h:
- WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInInternal.h:
Replaced inline wrapper functions with WrapperTraits structure template
specializations. This is always in the WebKit namespace, unlike the functions,
which were in a mix of namespaces. Also deleted some unneeded "#pragma once".
- 3:50 PM Changeset in webkit [235018] by
-
- 9 edits1 add in trunk/Source
[WTF] Add WTF::unalignedLoad and WTF::unalignedStore
https://bugs.webkit.org/show_bug.cgi?id=188716
Reviewed by Darin Adler.
Source/JavaScriptCore:
Use WTF::unalignedLoad and WTF::unalignedStore to avoid undefined behavior.
The compiler can emit appropriate mov operations in x86 even if we use these
helper functions.
- assembler/AssemblerBuffer.h:
(JSC::AssemblerBuffer::LocalWriter::putIntegralUnchecked):
(JSC::AssemblerBuffer::putIntegral):
(JSC::AssemblerBuffer::putIntegralUnchecked):
- assembler/MacroAssemblerX86.h:
(JSC::MacroAssemblerX86::readCallTarget):
- assembler/X86Assembler.h:
(JSC::X86Assembler::linkJump):
(JSC::X86Assembler::readPointer):
(JSC::X86Assembler::replaceWithHlt):
(JSC::X86Assembler::replaceWithJump):
(JSC::X86Assembler::setPointer):
(JSC::X86Assembler::setInt32):
(JSC::X86Assembler::setInt8):
- interpreter/InterpreterInlines.h:
(JSC::Interpreter::getOpcodeID): Embedded opcode may be misaligned. Actually UBSan detects misaligned accesses here.
Source/WTF:
While some CPUs allow unaligned accesses to memory, doing it in C++ with
reinterpret_cast<>is
undefined behavior. This patch adds WTF::{unalignedLoad,unalignedStore} helper functions, which
can load from and store to the pointer in an unaligned manner.
Actual implementation usesmemcpy. This can be optimized to direct unaligned access operations
in supported CPUs like x86. Even though a CPU does not support unaligned accesses, memcpy is still
safe and the compiler emits appropriate code.
We name these functions
unalignedLoadandunalignedStoreinstead ofloadUnalignedandstoreUnaligned
in order to align them toatomicLoadandatomicStore.
- WTF.xcodeproj/project.pbxproj:
- wtf/CMakeLists.txt:
- wtf/UnalignedAccess.h: Added.
(WTF::unalignedLoad):
(WTF::unalignedStore):
- wtf/text/StringCommon.h:
(WTF::equal):
(WTF::loadUnaligned): Deleted.
- 3:46 PM Changeset in webkit [235017] by
-
- 1 copy in tags/Safari-606.1.36.1.7
Tag Safari-606.1.36.1.7.
- 8:16 AM Changeset in webkit [235016] by
-
- 2 edits in trunk/Source/WebKit
REGRESSION (r234396): Leak of CFURLRef in WebKit::NetworkProcess::deleteHSTSCacheForHostNames()
<https://webkit.org/b/188725>
Reviewed by Dan Bernstein.
- NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::deleteHSTSCacheForHostNames): Use
adoptCF() to prevent a leak.
Aug 18, 2018:
- 8:28 PM Changeset in webkit [235015] by
-
- 2 edits in trunk/Source/WebCore
Let Xcode have its way with the WebCore project
- WebCore.xcodeproj/project.pbxproj:
- Let Xcode sort recently added resources by unique ID.
- Manually change the
mainGroupname from "WebKit" to "WebCore". There's no need to do this other than to make the inside of the proverbial cabinet match the outside. It's been this way since the project file was committed in r9857.
- 4:45 PM Changeset in webkit [235014] by
-
- 37 edits2 adds in trunk
[IntersectionObserver] Fire an initial dummy notification
https://bugs.webkit.org/show_bug.cgi?id=188670
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
Rebaseline tests now that an initial notification is fired.
- web-platform-tests/intersection-observer/bounding-box-expected.txt:
- web-platform-tests/intersection-observer/client-rect-expected.txt:
- web-platform-tests/intersection-observer/containing-block-expected.txt:
- web-platform-tests/intersection-observer/cross-origin-iframe-expected.txt:
- web-platform-tests/intersection-observer/disconnect-expected.txt:
- web-platform-tests/intersection-observer/display-none-expected.txt:
- web-platform-tests/intersection-observer/edge-inclusive-intersection-expected.txt:
- web-platform-tests/intersection-observer/iframe-no-root-expected.txt:
- web-platform-tests/intersection-observer/inline-client-rect-expected.txt:
- web-platform-tests/intersection-observer/isIntersecting-change-events-expected.txt:
- web-platform-tests/intersection-observer/multiple-targets-expected.txt:
- web-platform-tests/intersection-observer/multiple-thresholds-expected.txt:
- web-platform-tests/intersection-observer/observer-without-js-reference-expected.txt:
- web-platform-tests/intersection-observer/remove-element-expected.txt:
- web-platform-tests/intersection-observer/root-margin-expected.txt:
- web-platform-tests/intersection-observer/same-document-no-root-expected.txt:
- web-platform-tests/intersection-observer/same-document-root-expected.txt:
- web-platform-tests/intersection-observer/same-document-zero-size-target-expected.txt:
- web-platform-tests/intersection-observer/shadow-content-expected.txt:
- web-platform-tests/intersection-observer/text-target-expected.txt:
- web-platform-tests/intersection-observer/timestamp-expected.txt:
- web-platform-tests/intersection-observer/unclipped-root-expected.txt:
- web-platform-tests/intersection-observer/zero-area-element-hidden-expected.txt:
- web-platform-tests/intersection-observer/zero-area-element-visible-expected.txt:
Source/WebCore:
Add logic to track ongoing intersection observations. Create an IntersectionObserverRegistration
and fire a single dummy notification for each one.
Test: intersection-observer/root-element-moved.html
Also tested by existing tests in imported/w3c/web-platform-tests/intersection-observer.
- dom/Document.cpp:
(WebCore::Document::~Document):
(WebCore::Document::addIntersectionObserver):
(WebCore::Document::removeIntersectionObserver):
(WebCore::Document::updateIntersectionObservations):
(WebCore::Document::notifyIntersectionObserversTimerFired):
- dom/Document.h:
(WebCore::Document::numberOfIntersectionObservers const):
- dom/Element.cpp:
(WebCore::Element::didMoveToNewDocument):
(WebCore::Element::disconnectFromIntersectionObservers):
- page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::create):
(WebCore::IntersectionObserver::IntersectionObserver):
(WebCore::IntersectionObserver::~IntersectionObserver):
(WebCore::IntersectionObserver::observe):
(WebCore::IntersectionObserver::unobserve):
(WebCore::IntersectionObserver::disconnect):
(WebCore::IntersectionObserver::takeRecords):
(WebCore::IntersectionObserver::targetDestroyed):
(WebCore::IntersectionObserver::removeTargetRegistration):
(WebCore::IntersectionObserver::removeAllTargets):
(WebCore::IntersectionObserver::rootDestroyed):
(WebCore::IntersectionObserver::appendQueuedEntry):
(WebCore::IntersectionObserver::notify):
- page/IntersectionObserver.h:
(WebCore::IntersectionObserver::trackingDocument):
(WebCore::IntersectionObserver:: const):
(WebCore::IntersectionObserver::hasObservationTargets const):
- page/IntersectionObserver.idl:
- testing/Internals.cpp:
(WebCore::Internals::numberOfIntersectionObservers const):
- testing/Internals.h:
- testing/Internals.idl:
LayoutTests:
- intersection-observer/root-element-deleted.html: Add additional assertions.
- intersection-observer/root-element-moved-expected.txt: Added.
- intersection-observer/root-element-moved.html: Added.
- 4:32 PM Changeset in webkit [235013] by
-
- 2 edits in trunk/Source/WebKit
[watchOS] NetworkProximityManager should use WTF_MAKE_FAST_ALLOCATED
https://bugs.webkit.org/show_bug.cgi?id=188723
Reviewed by Sam Weinig.
- NetworkProcess/watchos/NetworkProximityManager.h:
- 4:20 PM Changeset in webkit [235012] by
-
- 2 edits in trunk/Source/WebKit
[watchOS] Add more assertions to NetworkProximityAssertion
https://bugs.webkit.org/show_bug.cgi?id=188721
Reviewed by Wenson Hsieh.
- NetworkProcess/watchos/NetworkProximityAssertion.mm:
(WebKit::NetworkProximityAssertion::hold):
(WebKit::NetworkProximityAssertion::release):
(WebKit::NetworkProximityAssertion::releaseTimerFired):
- 3:59 PM Changeset in webkit [235011] by
-
- 12 edits in trunk
[iOS] Paste is missing from callout bar when pasteboard only contains custom data
https://bugs.webkit.org/show_bug.cgi?id=184271
<rdar://problem/39256708>
Reviewed by Ryosuke Niwa.
Source/WebCore:
Export a couple of WebCore functions for use in WebKit.
- dom/Document.h:
- platform/Pasteboard.h:
Source/WebKit:
Currently, the "paste:" selector action cannot be performed during editing if the pasteboard only contains
custom pasteboard data. This is because logic in -[WKContentView canPerformActionForWebView:withSender:] only
checks against a list of pasteboard types which does not include the type identifier for custom pasteboard data.
To fix this, we allow pasting only in the case where none of the other type identifiers exist in the pasteboard,
as long as the custom pasteboard data type identifier is present, and the custom pasteboard data's origin
matches the origin of the focused frame's document.
Test: PasteMixedContent.CopyAndPasteWithCustomPasteboardDataOnly
- Shared/EditorState.cpp:
(WebKit::EditorState::encode const):
(WebKit::EditorState::decode):
- Shared/EditorState.h:
Add a originIdentifierForPasteboard field, and add support for encoding it when propagating EditorState via IPC.
- UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView canPerformActionForWebView:withSender:]):
If none of the conventional pasteboard type identifiers for rich or plain text editing are present, check to see
if we have custom pasteboard data; if so, only allow pasting if the custom pasteboard data's origin matches that
of the focused frame's document origin.
Additionally refactor a bit of logic by pulling out
_page->editorState()into a separate local variable, used
throughout the rest of the method.
- WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState const):
Send the focused frame's document origin to the UI process via EditorState.
Tools:
Add a new API test to verify that on both iOS and macOS, copied custom pasteboard data can only be pasted in a
matching origin. Additionally verify that on iOS, the web view is capable of performing the "paste:" selector.
- TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
(TestWebKitAPI::TEST):
(imagePath): Deleted.
(writeTypesAndDataToPasteboard): Deleted.
(setUpWebView): Deleted.
(markupString): Deleted.
Make this test file no longer exclusive to macOS.
- TestWebKitAPI/cocoa/TestWKWebView.h:
- TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView synchronouslyLoadHTMLString:baseURL:]):
Tweak this helper to also take in a
baseURL. Defaults to using the TestWebKitAPI bundle resource URL.
(-[TestWKWebView synchronouslyLoadHTMLString:]):
- 1:09 PM Abandoned documents edited by
- (diff)
- 1:07 PM Abandoned documents edited by
- (diff)
- 1:04 PM Abandoned documents edited by
- (diff)
- 8:00 AM Changeset in webkit [235010] by
-
- 2 edits in trunk
Adjust CMAKE_MODULE_LINKER_FLAGS for asan
https://bugs.webkit.org/show_bug.cgi?id=188699
Reviewed by Konstantin Tokarev.
- Source/cmake/WebKitCompilerFlags.cmake: