| 2020-06-29 Rob Buis <rbuis@igalia.com> |
| |
| window.location.replace with invalid urls should throw |
| https://bugs.webkit.org/show_bug.cgi?id=153121 |
| |
| Reviewed by Darin Adler. |
| |
| Throw SyntaxError if the url resulting from the |
| location.replace operation is not valid. |
| |
| Behavior matches Firefox and Chrome. |
| |
| Tests: imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_replace.html |
| |
| [1] https://html.spec.whatwg.org/multipage/history.html#dom-location-replace |
| |
| * page/Location.cpp: |
| (WebCore::Location::replace): |
| * page/Location.h: |
| * page/Location.idl: |
| |
| 2020-06-28 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Adjust table content vertical position to match vertical-align |
| https://bugs.webkit.org/show_bug.cgi?id=213692 |
| |
| Reviewed by Antti Koivisto. |
| |
| Child boxes (and runs) are always in the coordinate system of the containing block's border box. |
| The content box (where the child content lives) is inside the padding box, which is inside the border box. |
| In order to compute the child box top/left position, we need to know both the padding and the border offsets. |
| |
| <div style="border: 2px solid green; padding-top: 10px;"><div></div></div> |
| The inner div's top left position is at [12px, 2px] (let's ignore margin collapsing for now). |
| |
| Normally by the time we start positioning the child content, we already have computed borders and paddings for the containing block. |
| This is different with table cells where the final padding offset depends on the content height as we use |
| the padding box to vertically align the table cell content. |
| |
| Let's adjust the child boxes and runs to match the new content box position. |
| |
| Test: fast/layoutformattingcontext/table-cell-vertical-alignment-simple.html |
| |
| * layout/displaytree/DisplayLineBox.h: |
| (WebCore::Display::LineBox::moveVertically): |
| * layout/displaytree/DisplayRun.h: |
| (WebCore::Display::Run::moveVertically): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): |
| |
| 2020-06-28 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][Painting] Use the table section as the paint container for table cells |
| https://bugs.webkit.org/show_bug.cgi?id=213693 |
| |
| Reviewed by Antti Koivisto. |
| |
| The cell's containing block is the table box (skipping both the row and the section), |
| but it's positioned relative to the table section. |
| |
| Let's skip the row and go right to the section box when painting the cells. |
| |
| * layout/displaytree/DisplayPainter.cpp: |
| (WebCore::Display::absoluteDisplayBox): |
| |
| 2020-06-28 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| Improve error message for primitive callback interfaces |
| https://bugs.webkit.org/show_bug.cgi?id=213684 |
| |
| Reviewed by Darin Adler. |
| |
| This patch rewords TypeError message for non-object callback interfaces |
| because apart from function, an object with certain method is also allowed. |
| New error message matches Chrome and Firefox. |
| |
| Tests: fast/dom/createNodeIterator-parameters.html |
| fast/dom/createTreeWalker-parameters.html |
| |
| * bindings/js/JSDOMExceptionHandling.cpp: |
| (WebCore::throwArgumentMustBeObjectError): |
| * bindings/js/JSDOMExceptionHandling.h: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GetArgumentExceptionFunction): |
| * bindings/scripts/test/*: Updated. |
| |
| 2020-06-28 Rob Buis <rbuis@igalia.com> |
| |
| Setting url.search="??" (two questionmarks) has incorrect behavior |
| https://bugs.webkit.org/show_bug.cgi?id=170452 |
| |
| Reviewed by Darin Adler. |
| |
| There is no need to strip leading "?" character since |
| URLParser expects it to be there. This differs from the |
| specification algorithm [1], which relies on state override, |
| which URLParser does not support. |
| |
| Behavior matches Firefox and Chrome. |
| |
| Test: imported/w3c/web-platform-tests/url/url-setters.html |
| |
| [1] https://url.spec.whatwg.org/#dom-url-search |
| |
| * html/URLDecomposition.cpp: |
| (WebCore::URLDecomposition::setSearch): |
| |
| 2020-06-28 Geoffrey Garen <ggaren@apple.com> |
| |
| Rename initializeThreading to initialize |
| https://bugs.webkit.org/show_bug.cgi?id=213674 |
| |
| Reviewed by Mark Lam. |
| |
| * Modules/webdatabase/DatabaseManager.cpp: |
| (WebCore::DatabaseManager::openDatabase): |
| * WebCore.order: |
| * bindings/js/CommonVM.cpp: |
| (WebCore::commonVMSlow): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::initializeMainThread): |
| (WebCore::ScriptController::initializeThreading): Deleted. |
| * bindings/js/ScriptController.h: |
| * bridge/objc/WebScriptObject.mm: |
| (+[WebScriptObject initialize]): |
| * platform/cocoa/SharedBufferCocoa.mm: |
| (+[WebCoreSharedBufferData initialize]): |
| * platform/ios/wak/WebCoreThread.mm: |
| (RunWebThread): |
| |
| 2020-06-28 Youenn Fablet <youenn@apple.com> |
| |
| MediaRecorder stopRecorder() returns empty Blob after first use |
| https://bugs.webkit.org/show_bug.cgi?id=212274 |
| <rdar://problem/63601298> |
| |
| Reviewed by Eric Carlson. |
| |
| Refactor code to create/destroy MediaRecorderPrivate on MediaRecorder start/stop. |
| This allows reusing a MediaRecorder after a stop and restarting with a clean state. |
| |
| We introduce MediaRecorderPrivate::startRecording to do the initialization, |
| which allows to fix a potential ref cycle as part of the error callback handling. |
| |
| Make some improvements to the platform implementation, in particular add default initialization to all fields. |
| Align the code using AudioConverterRef to what is done in AudioSampleDataSource. |
| Also call VTCompressionSessionInvalidate when destroying the VideoSampleBufferCompressor. |
| |
| Test: http/wpt/mediarecorder/MediaRecorder-multiple-start-stop.html |
| |
| * Modules/mediarecorder/MediaRecorder.cpp: |
| (WebCore::MediaRecorder::create): |
| (WebCore::MediaRecorder::MediaRecorder): |
| (WebCore::MediaRecorder::startRecording): |
| (WebCore::MediaRecorder::stopRecording): |
| (WebCore::MediaRecorder::requestData): |
| * Modules/mediarecorder/MediaRecorder.h: |
| * platform/mediarecorder/MediaRecorderPrivateMock.cpp: |
| (WebCore::MediaRecorderPrivateMock::fetchData): |
| * platform/mediarecorder/MediaRecorderPrivate.h: |
| (WebCore::MediaRecorderPrivate::startRecording): |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: |
| (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor): |
| (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription): |
| (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded): |
| (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount): |
| (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets): |
| (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime): |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (WebCore::MediaRecorderPrivateWriter::stopRecording): |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: |
| (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor): |
| |
| 2020-06-27 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][IFC] Replaced inline boxes sit on the baseline with their margins |
| https://bugs.webkit.org/show_bug.cgi?id=213679 |
| |
| Reviewed by Antti Koivisto. |
| |
| Take the margin box into account when computing the top position of a baseline aligned replaced inline box. |
| |
| Test: fast/layoutformattingcontext/replaced-box-with-margin-on-baseline.html |
| |
| * layout/inlineformatting/InlineLineBuilder.cpp: |
| (WebCore::Layout::LineBuilder::alignContentVertically): |
| |
| 2020-06-27 Mark Lam <mark.lam@apple.com> |
| |
| Fix missing exception check in createIDBKeyFromValue(). |
| https://bugs.webkit.org/show_bug.cgi?id=213681 |
| <rdar://problem/64804893> |
| |
| Reviewed by Chris Dumez. |
| |
| Test: storage/indexeddb/missing-exception-check-in-IDBKey.html |
| |
| Also fixed up miscellaneous other exception check related code to enable the |
| new test to run with exception check validation. |
| |
| * bindings/js/IDBBindingUtilities.cpp: |
| (WebCore::createIDBKeyFromValue): |
| * bindings/js/JSDOMBindingSecurity.cpp: |
| (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow): |
| * bindings/js/JSDOMWindowBase.cpp: |
| (WebCore::JSDOMWindowBase::updateDocument): |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::JSDOMWindow::put): |
| (WebCore::JSDOMWindow::defineOwnProperty): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::initScriptForWindowProxy): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateAttributeGetterBodyDefinition): |
| (GenerateAttributeSetterBodyDefinition): |
| (GenerateOperationBodyDefinition): |
| * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: |
| (WebCore::jsTestActiveDOMObjectExcitingAttrGetter): |
| (WebCore::jsTestActiveDOMObjectPrototypeFunctionExcitingFunctionBody): |
| (WebCore::jsTestActiveDOMObjectPrototypeFunctionOverloadedMethodOverloadDispatcher): |
| * bridge/objc/WebScriptObject.mm: |
| (-[WebScriptObject _isSafeScript]): |
| * testing/js/WebCoreTestSupport.cpp: |
| (WebCoreTestSupport::injectInternalsObject): |
| |
| 2020-06-27 Jer Noble <jer.noble@apple.com> |
| |
| iOS Safari incorrectly reports "AppleCoreMedia" as UA string |
| https://bugs.webkit.org/show_bug.cgi?id=213245 |
| <rdar://problem/64471582> |
| |
| Reviewed by Youenn Fablet. |
| |
| Tests: TestWebKitAPI.MediaLoading.UserAgentStringCRABS |
| TestWebKitAPI.MediaLoading.UserAgentStringHLS |
| |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (-[WebCoreNSURLSessionDataTask initWithSession:identifier:request:]): |
| |
| 2020-06-27 Rob Buis <rbuis@igalia.com> |
| |
| Require <form> to be connected |
| https://bugs.webkit.org/show_bug.cgi?id=177356 |
| |
| Reviewed by Sam Weinig. |
| |
| Implement step 1 of [1], i.e. do not submit form if it |
| is not connected. |
| |
| Test: imported/w3c/web-platform-tests/html/semantics/forms/form-submission-0/submission-checks.html |
| |
| [1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#concept-form-submit |
| |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::submit): |
| |
| 2020-06-27 Youenn Fablet <youenn@apple.com> |
| |
| Log capture device information in case of getUserMedia failing to select a device |
| https://bugs.webkit.org/show_bug.cgi?id=213643 |
| |
| Reviewed by Eric Carlson. |
| |
| Log constraints and device in case of a failing getUserMedia call. |
| No obserable change, logging addition. |
| |
| * platform/mediastream/mac/CoreAudioCaptureDevice.cpp: |
| (WebCore::getDeviceInfo): |
| (WebCore::CoreAudioCaptureDevice::deviceClock): |
| * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp: |
| (WebCore::isValidCaptureDevice): |
| * platform/mediastream/MediaConstraints.cpp: |
| (WebCore::MediaConstraint::log const): |
| (WebCore::BooleanConstraint::logAsBoolean const): |
| (WebCore::DoubleConstraint::logAsDouble const): |
| (WebCore::IntConstraint::logAsInt const): |
| * platform/mediastream/MediaConstraints.h: |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::supportsSizeAndFrameRate): |
| (WebCore::RealtimeMediaSource::selectSettings): |
| * platform/mediastream/RealtimeMediaSourceCenter.cpp: |
| (WebCore::RealtimeMediaSourceCenter::validateRequestConstraints): |
| * platform/mediastream/RealtimeVideoCaptureSource.cpp: |
| (WebCore::RealtimeVideoCaptureSource::bestSupportedSizeAndFrameRate): |
| * platform/mediastream/VideoPreset.h: |
| (WebCore::VideoPreset::log const): |
| |
| 2020-06-27 Youenn Fablet <youenn@apple.com> |
| |
| Protect SWServer::claim from a registration without active worker |
| https://bugs.webkit.org/show_bug.cgi?id=213597 |
| |
| Reviewed by Chris Dumez. |
| |
| SWServerWorker might be active while being terminated. |
| If terminated as part of SWServerRegistration::clear, the registration no longer has a service worker. |
| SWServer::claim should therefore check for registration active worker. |
| This is difficult to test as one needs to claim at the time the service worker is being terminated but not yet terminated. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::claim): |
| |
| 2020-06-27 Sam Weinig <weinig@apple.com> |
| |
| Convert SVG related parsers over to using StringParsingBuffer |
| https://bugs.webkit.org/show_bug.cgi?id=213635 |
| |
| Reviewed by Darin Adler. |
| |
| - Adopt StringParsingBuffer across SVG code. |
| - Remove UTF-16 upconversions in SVGAnimationElement, SVGFitToViewBox, SVGLengthList, |
| SVGLengthValue, SVGNumberList, SVGParserUtilities, SVGPointList, SVGPreserveAspectRatioValue, |
| SVGStringList, SVGTransformList, SVGTransformable and SVGViewSpec. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| Export ParsingUtilities.h, which is now included by SVGParserUtilities.h |
| |
| * Sources.txt: |
| Add implementation files for SVGLengthList, SVGNumberList, SVGPointList, SVGStringList |
| and SVGTransformList to hold large functions are unlikely to benefit from inlining. |
| |
| * html/parser/ParsingUtilities.h: |
| (WebCore::skipCharactersExactly): |
| Add new skipCharactersExactly, which takes a c-array (NOT null-terminated) of characters |
| to compare against. |
| |
| * svg/SVGAngleValue.cpp: |
| (WebCore::parseAngleType): |
| (WebCore::SVGAngleValue::setValueAsString): |
| Adopt StringParsingBuffer. |
| |
| * svg/SVGAnimateTransformElement.cpp: |
| (WebCore::SVGAnimateTransformElement::parseAttribute): |
| Adapt to new shared parseTransformType, which now returns an Optional and default to |
| SVG_TRANSFORM_UNKNOWN on parse failure as the old parseTransformType did. |
| |
| * svg/SVGAnimationElement.cpp: |
| (WebCore::parseKeySplines): |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters() |
| |
| * svg/SVGFitToViewBox.cpp: |
| (WebCore::SVGFitToViewBox::parseViewBox): |
| (WebCore::SVGFitToViewBox::parseViewBoxGeneric): |
| * svg/SVGFitToViewBox.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters() |
| |
| * svg/SVGLengthList.cpp: Added. |
| (WebCore::SVGLengthList::parse): |
| (WebCore::SVGLengthList::valueAsString const): |
| * svg/SVGLengthList.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Move parse and valueAsString out of line. |
| |
| * svg/SVGLengthValue.cpp: |
| (WebCore::parseLengthType): |
| (WebCore::SVGLengthValue::construct): |
| (WebCore::SVGLengthValue::setValueAsString): |
| * svg/SVGLengthValue.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters() |
| |
| * svg/SVGNumberList.cpp: Added. |
| (WebCore::SVGNumberList::parse): |
| (WebCore::SVGNumberList::valueAsString const): |
| * svg/SVGNumberList.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Move parse and valueAsString out of line. |
| |
| * svg/SVGParserUtilities.cpp: |
| (WebCore::genericParseNumber): |
| (WebCore::parseNumber): |
| (WebCore::genericParseArcFlag): |
| (WebCore::parseArcFlag): |
| (WebCore::parseNumberOptionalNumber): |
| (WebCore::parsePoint): |
| (WebCore::parseRect): |
| (WebCore::parseGlyphName): |
| (WebCore::parseUnicodeRange): |
| (WebCore::parseKerningUnicodeString): |
| (WebCore::genericParseFloatPoint): |
| (WebCore::parseFloatPoint): |
| * svg/SVGParserUtilities.h: |
| (WebCore::isSVGSpaceOrComma): |
| (WebCore::skipOptionalSVGSpaces): |
| (WebCore::skipOptionalSVGSpacesOrDelimiter): |
| (WebCore::skipString): Deleted. |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Move parse and valueAsString out of line. |
| |
| * svg/SVGPathSource.h: |
| Add missing include, which is now needed do to removing unncessary includes in other files. |
| |
| * svg/SVGPathStringSource.cpp: |
| (WebCore::SVGPathStringSource::SVGPathStringSource): |
| (WebCore::SVGPathStringSource::hasMoreData const): |
| (WebCore::SVGPathStringSource::moveToNextToken): |
| (WebCore::nextCommandHelper): |
| (WebCore::SVGPathStringSource::nextCommand): |
| (WebCore::SVGPathStringSource::parse): |
| (WebCore::SVGPathStringSource::parseSVGSegmentType): |
| (WebCore::SVGPathStringSource::parseMoveToSegment): |
| (WebCore::SVGPathStringSource::parseLineToSegment): |
| (WebCore::SVGPathStringSource::parseLineToHorizontalSegment): |
| (WebCore::SVGPathStringSource::parseLineToVerticalSegment): |
| (WebCore::SVGPathStringSource::parseCurveToCubicSegment): |
| (WebCore::SVGPathStringSource::parseCurveToCubicSmoothSegment): |
| (WebCore::SVGPathStringSource::parseCurveToQuadraticSegment): |
| (WebCore::SVGPathStringSource::parseCurveToQuadraticSmoothSegment): |
| (WebCore::SVGPathStringSource::parseArcToSegment): |
| (WebCore::parseSVGSegmentTypeHelper): Deleted. |
| * svg/SVGPathStringSource.h: |
| Adopt StringParsingBuffer. Replace existing set of unions with a single |
| union of StringParsingBuffers. |
| |
| * svg/SVGPointList.cpp: Added. |
| (WebCore::SVGPointList::parse): |
| (WebCore::SVGPointList::valueAsString const): |
| * svg/SVGPointList.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Move parse and valueAsString out of line. |
| |
| * svg/SVGPreserveAspectRatioValue.cpp: |
| (WebCore::SVGPreserveAspectRatioValue::SVGPreserveAspectRatioValue): |
| (WebCore::SVGPreserveAspectRatioValue::parse): |
| (WebCore::SVGPreserveAspectRatioValue::parseInternal): |
| (WebCore::SVGPreserveAspectRatioValue::valueAsString const): |
| * svg/SVGPreserveAspectRatioValue.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). |
| |
| * svg/SVGStringList.cpp: Added. |
| (WebCore::SVGStringList::parse): |
| (WebCore::SVGStringList::valueAsString const): |
| * svg/SVGStringList.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Move parse and valueAsString out of line. |
| |
| * svg/SVGTransformList.cpp: Added. |
| (WebCore::SVGTransformList::consolidate): |
| (WebCore::SVGTransformList::concatenate const): |
| (WebCore::SVGTransformList::parseGeneric): |
| (WebCore::SVGTransformList::parse): |
| (WebCore::SVGTransformList::valueAsString const): |
| * svg/SVGTransformList.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Move parse, valueAsString, consolidate and |
| concatenate out of line. |
| |
| * svg/SVGTransformable.cpp: |
| (WebCore::parseTransformParamList): |
| (WebCore::parseTransformValueGeneric): |
| (WebCore::SVGTransformable::parseTransformValue): |
| (WebCore::parseTransformTypeGeneric): |
| (WebCore::SVGTransformable::parseTransformType): |
| (WebCore::SVGTransformable::parseAndSkipType): Deleted. |
| * svg/SVGTransformable.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Unify parseTransformType implementations to all |
| use a single implementation and return an Optional<SVGTransformType>. |
| |
| * svg/SVGViewSpec.cpp: |
| (WebCore::SVGViewSpec::parseViewSpec): |
| * svg/SVGViewSpec.h: |
| Adopt StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). |
| |
| * svg/SVGZoomAndPan.cpp: |
| (WebCore::parseZoomAndPanGeneric): |
| (WebCore::SVGZoomAndPan::parseZoomAndPan): |
| * svg/SVGZoomAndPan.h: |
| Adopt StringParsingBuffer. |
| |
| 2020-06-26 Jer Noble <jer.noble@apple.com> |
| |
| CRASH: incompatible downcast<> operation in SourceBufferPrivateAVFObjC::setCDMInstance() |
| https://bugs.webkit.org/show_bug.cgi?id=213660 |
| <rdar://problem/63831593> |
| |
| Reviewed by Eric Carlson. |
| |
| Test: platform/mac/media/encrypted-media/fps-clearkey-crash.html |
| |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| (WebCore::SourceBufferPrivateAVFObjC::setCDMInstance): |
| |
| 2020-06-26 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][BFC] Add support for <center> |
| https://bugs.webkit.org/show_bug.cgi?id=213649 |
| |
| Reviewed by Antti Koivisto. |
| |
| Adjust the margin box to center the block content (this is very similar to [style="margin-left: auto; margin-right: auto;"]). |
| |
| Test: fast/layoutformattingcontext/center-alignment-with-block-content-simple.html |
| |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): |
| |
| 2020-06-26 Jason Lawrence <lawrence.j@apple.com> |
| |
| Unreviewed, reverting r263511, r263514, and r263565. |
| |
| r263511 caused MediaRecorder test crashes on internal testers. |
| |
| Reverted changesets: |
| |
| "MediaRecorder stopRecorder() returns empty Blob after first |
| use" |
| https://bugs.webkit.org/show_bug.cgi?id=212274 |
| https://trac.webkit.org/changeset/263511 |
| |
| "Unreviewed iOS build fix after r263511." |
| https://trac.webkit.org/changeset/263514 |
| |
| "MediaRecorder.start() Method is Ignoring the "timeslice" |
| Parameter" |
| https://bugs.webkit.org/show_bug.cgi?id=202233 |
| https://trac.webkit.org/changeset/263565 |
| |
| 2020-06-26 Sam Weinig <weinig@apple.com> |
| |
| Convert ContentSecurityPolicy related parsers over to using StringParsingBuffer |
| https://bugs.webkit.org/show_bug.cgi?id=213631 |
| |
| Reviewed by Darin Adler. |
| |
| - Adopt StringParsingBuffer across CSP code. |
| - Remove UTF-16 upconversions in ContentSecurityPolicy, ContentSecurityPolicyDirectiveList, |
| ContentSecurityPolicyMediaListDirective and ContentSecurityPolicySourceList. |
| |
| * html/parser/ParsingUtilities.h: |
| (WebCore::isNotASCIISpace): |
| (WebCore::skipExactly): |
| (WebCore::characterPredicate): |
| (WebCore::skipUntil): |
| (WebCore::skipExactlyIgnoringASCIICase): |
| Add overloads for each helper that take a StringParsingBuffer. |
| |
| * loader/ResourceCryptographicDigest.cpp: |
| (WebCore::parseHashAlgorithmAdvancingPosition): |
| Convert to use an Optional return value rather than outparameter + bool. |
| |
| (WebCore::parseCryptographicDigestImpl): |
| (WebCore::parseCryptographicDigest): |
| (WebCore::parseEncodedCryptographicDigestImpl): |
| (WebCore::parseEncodedCryptographicDigest): |
| * loader/ResourceCryptographicDigest.h: |
| Use StringParsingBuffer rather than raw pointers for parsing. |
| |
| * loader/SubresourceIntegrity.cpp: |
| (WebCore::splitOnSpaces): |
| (WebCore::parseIntegrityMetadata): |
| Use StringParsingBuffer and readCharactersForParsing rather than raw pointers for parsing. |
| |
| * page/csp/ContentSecurityPolicy.cpp: |
| (WebCore::ContentSecurityPolicy::didReceiveHeader): |
| Use StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). |
| |
| * page/csp/ContentSecurityPolicyDirectiveList.cpp: |
| (WebCore::isDirectiveNameCharacter): |
| (WebCore::isDirectiveValueCharacter): |
| (WebCore::ContentSecurityPolicyDirectiveList::parse): |
| (WebCore::ContentSecurityPolicyDirectiveList::parseDirective): |
| (WebCore::ContentSecurityPolicyDirectiveList::parseReportURI): |
| (WebCore::ContentSecurityPolicyDirectiveList::setCSPDirective): |
| (WebCore::ContentSecurityPolicyDirectiveList::applySandboxPolicy): |
| (WebCore::ContentSecurityPolicyDirectiveList::setUpgradeInsecureRequests): |
| (WebCore::ContentSecurityPolicyDirectiveList::setBlockAllMixedContentEnabled): |
| (WebCore::ContentSecurityPolicyDirectiveList::addDirective): |
| * page/csp/ContentSecurityPolicyDirectiveList.h: |
| Use StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Also switch to using Optional for return values |
| rather than outparameter + bool. To make things read more cleanly, package up name |
| and value pair into a new ParsedDirective struct that can be passed around more easily. |
| |
| * page/csp/ContentSecurityPolicyMediaListDirective.cpp: |
| (WebCore::isMediaTypeCharacter): |
| (WebCore::ContentSecurityPolicyMediaListDirective::parse): |
| Use StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). |
| |
| * page/csp/ContentSecurityPolicySourceList.cpp: |
| (WebCore::isSourceCharacter): |
| (WebCore::isHostCharacter): |
| (WebCore::isPathComponentCharacter): |
| (WebCore::isSchemeContinuationCharacter): |
| (WebCore::isNotColonOrSlash): |
| (WebCore::isSourceListNone): |
| (WebCore::ContentSecurityPolicySourceList::parse): |
| (WebCore::ContentSecurityPolicySourceList::parseSource): |
| (WebCore::ContentSecurityPolicySourceList::parseScheme): |
| (WebCore::ContentSecurityPolicySourceList::parseHost): |
| (WebCore::ContentSecurityPolicySourceList::parsePath): |
| (WebCore::ContentSecurityPolicySourceList::parsePort): |
| (WebCore::isNonceCharacter): |
| (WebCore::ContentSecurityPolicySourceList::parseNonceSource): |
| (WebCore::ContentSecurityPolicySourceList::parseHashSource): |
| * page/csp/ContentSecurityPolicySourceList.h: |
| Use StringParsingBuffer and readCharactersForParsing to replace unnecessary call to |
| StringView::upconvertedCharacters(). Also switch to using Optional for return values |
| rather than outparameter + bool. To make things read more cleanly, package up source |
| return values into structs that can be more easily returned / passed around. |
| |
| 2020-06-26 Simon Fraser <simon.fraser@apple.com> |
| |
| Content sometimes missing in nested scrollers with border-radius |
| https://bugs.webkit.org/show_bug.cgi?id=213580 |
| <rdar://problem/64460373> |
| |
| Reviewed by Zalan Bujtas. |
| |
| RenderLayer::clipToRect() has a special case for clips involving border-radius, |
| involving an ancestor tree walk which applies the rounded clips. |
| |
| When inside composited overflow, don't include the border-radius from the scroller since |
| that does its own clipping. |
| |
| Test: compositing/clipping/nested-overflow-with-border-radius.html |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::clipToRect): |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderLayer.h: |
| |
| 2020-06-26 Geoffrey Garen <ggaren@apple.com> |
| |
| Initializing the main thread should initialize the main run loop |
| https://bugs.webkit.org/show_bug.cgi?id=213637 |
| |
| Reviewed by Anders Carlsson. |
| |
| * platform/ios/wak/WebCoreThread.mm: |
| (RunWebThread): Removed call to initializeMainThread() because the main |
| thread calls it before starting the web thread, so it's a no-op. (And if |
| it were an op, it would be broken.) |
| (StartWebThread): Merged RunLoop::initializeMain and initializeThreading |
| into initializeMainThread. |
| |
| 2020-06-26 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for crash in AXIsolatedObject::relativeFrame. |
| https://bugs.webkit.org/show_bug.cgi?id=213363 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing testss. |
| |
| Between the time an isolated object dispatches the method to the main |
| thread and the time the lambda is executed, the isolated object is |
| detached and hence its object ID becomes invalid. Thus, trying to get |
| the associated AX object results in an assert/crash. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-06-26 Andres Gonzalez <andresg_22@apple.com> |
| |
| Access to AXIsolatedTree:m_readerThreadNodeMap should happen only on the secondary AX thread. |
| https://bugs.webkit.org/show_bug.cgi?id=213575 |
| |
| Reviewed by Chris Fleizach. |
| |
| After calling AXObjectCache::initializeSecondaryAXThread, there may |
| still be some client requests coming in on the main thread. Thus |
| AXIsolatedTree::applyPendingchanges and nodeForID can be called on the |
| main thread. Since these two methods access the member variable |
| m_readerThreadNodeMap which should be accessed only on the secondary AX |
| thread, we now check for this condition and bail out if needed. |
| |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::nodeForID const): |
| (WebCore::AXIsolatedTree::applyPendingChanges): |
| * accessibility/isolatedtree/AXIsolatedTree.h: Reordered private methods |
| above member variables to comply with WebKit coding conventions, |
| pointed out by Darin Adler in review for https://bugs.webkit.org/show_bug.cgi?id=213435. |
| |
| 2020-06-26 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for crash in accessibility/roles-exposed.html in isolated tree mode. |
| https://bugs.webkit.org/show_bug.cgi?id=213648 |
| |
| Reviewed by Chris Fleizach. |
| |
| LayoutTest: accessibility/roles-exposed.html. |
| |
| - In layout tests, when AXObjectCache::notificationPostTimerFired is |
| triggered, and we try to update the isolated tree, some of the |
| underlying objects may already be gone. So this change ensure we don't |
| try to update an isolated object that corresponds to an already detached |
| live object. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::cacheAndInitializeWrapper): Sanity check. |
| * accessibility/AccessibilityListBox.cpp: |
| (WebCore::AccessibilityListBox::addChildren): m_renderer can be null |
| when trying to update the isolated tree. |
| * accessibility/AccessibilityListBoxOption.cpp: |
| (WebCore::AccessibilityListBoxOption::computeAccessibilityIsIgnored const): |
| Parent object may be gone when trying to update the isolated tree. |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::updateChildrenIDs): |
| (WebCore::AXIsolatedTree::generateSubtree): |
| (WebCore::AXIsolatedTree::updateChildren): |
| |
| 2020-06-26 Youenn Fablet <youenn@apple.com> |
| |
| MediaRecorder.start() Method is Ignoring the "timeslice" Parameter |
| https://bugs.webkit.org/show_bug.cgi?id=202233 |
| <rdar://problem/55720555> |
| |
| Reviewed by Eric Carlson. |
| |
| Use a timer to implement timeSlice parameter. |
| Schedule timer either when start is called or as part of requestData callback. |
| This should ensure that, if requestData is called by the application, the timer will be rescheduled appropriately. |
| |
| Test: http/wpt/mediarecorder/MediaRecorder-start-timeSlice.html |
| |
| * Modules/mediarecorder/MediaRecorder.cpp: |
| (WebCore::MediaRecorder::MediaRecorder): |
| (WebCore::MediaRecorder::startRecording): |
| (WebCore::MediaRecorder::requestData): |
| * Modules/mediarecorder/MediaRecorder.h: |
| |
| 2020-06-26 Jack Lee <shihchieh_lee@apple.com> |
| |
| ASSERTION FAILED: (it != m_map.end()) in TreeScopeOrderedMap::remove |
| https://bugs.webkit.org/show_bug.cgi?id=213611 |
| <rdar://problem/64493506> |
| |
| Reviewed by Geoffrey Garen. |
| |
| In function HTMLImageElement::parseAttribute(), empty name attribute is considered valid |
| which makes the function skip handling of subsequent name changes. Modified the check of |
| name attribute so only non-empty name is considered valid. This code change is to match |
| <https://trac.webkit.org/changeset/262360>. |
| |
| Test: fast/images/img-change-name-assert.html |
| |
| * html/HTMLImageElement.cpp: |
| (WebCore::HTMLImageElement::parseAttribute): |
| |
| 2020-06-26 Sihui Liu <sihui_liu@apple.com> |
| |
| Text manipulation should observe adjacent elements with new renderer together |
| https://bugs.webkit.org/show_bug.cgi?id=213333 |
| |
| Reviewed by Geoffrey Garen. |
| |
| TextManipulationController only keeps track of manipulated Elements. For other types of Node, like Text, |
| TextManipulationController does not mark them as manipulated and may manipulate it again. r263132 tried to solve |
| the problem by marking Element with only manipulated children as manipulated, but it did not iterate all |
| children of Element. So, if one Element has children in different paragraphs, it may fail to mark the Element |
| manipulated. See updated test. |
| To fix this issue completely, TextManipulationController now tracks all manipulated Nodes, so it can skip the |
| manipulated Nodes during observation. |
| |
| For elements with new renderer, TextManipulationController observes them one by one. However, adjacent elements |
| can be in the same paragraph, if there is no delimiter in their text, and should be observed together. To solve |
| this problem, TextManipulationController now starts observing from the common ancestor of these elements. If a |
| Node in range is manipulated, split the paragrph there. This makes sure content in paragraph is not manipulated. |
| Relevant test is updated for this new behavior. |
| |
| Tests: TextManipulation.StartTextManipulationFindNewlyDisplayedParagraph |
| TextManipulation.CompleteTextManipulationAvoidExtractingManipulatedTextAfterManipulation |
| |
| * dom/Node.cpp: |
| (WebCore::Node::~Node): |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::observeParagraphs): |
| (WebCore::TextManipulationController::didCreateRendererForElement): |
| (WebCore::TextManipulationController::scheduleObservationUpdate): |
| (WebCore::TextManipulationController::updateInsertions): |
| (WebCore::TextManipulationController::replace): |
| (WebCore::TextManipulationController::removeNode): |
| (WebCore::makePositionTuple): Deleted. |
| (WebCore::makeHashablePositionRange): Deleted. |
| * editing/TextManipulationController.h: |
| |
| 2020-06-26 Simon Fraser <simon.fraser@apple.com> |
| |
| Clean up some PaintBehavior-related code in RenderLayer |
| https://bugs.webkit.org/show_bug.cgi?id=213634 |
| |
| Reviewed by Sam Weinig. |
| |
| Move the computation of paintBehavior into a lambda, and share the flags between |
| normal painting and mask painting. |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::paintLayerContents): |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderLayer.h: |
| |
| 2020-06-26 Alicia Boya García <aboya@igalia.com> |
| |
| [GStreamer] Initialize m_currentState and m_oldState |
| https://bugs.webkit.org/show_bug.cgi?id=213604 |
| |
| Reviewed by Eric Carlson. |
| |
| MediaPlayerPrivateGStreamer was not initializing m_currentState and |
| m_oldState, causing them to be checked e.g. updateStates() while they |
| still contain garbage. |
| |
| Because the biggest uninitialized usage is a != comparison, in |
| practice things still worked, but that's still a bug. I detected the |
| bug after seeing this in the logs: |
| |
| playbin3SendSelectStreamsIfAppropriate:<media-player-0> Checking if to send SELECT_STREAMS, m_waitingForStreamsSelectedEvent = false, haveDifferentStreamIds = false, m_currentState = UNKNOWN!(-8421505)... shouldSendSelectStreams = false |
| |
| This patch fixes a slight memory error which doesn't alter |
| TestExpectations. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| |
| 2020-06-25 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r263537. |
| https://bugs.webkit.org/show_bug.cgi?id=213640 |
| |
| Broke watchOS and tvOS builds |
| |
| Reverted changeset: |
| |
| "iOS Safari incorrectly reports "AppleCoreMedia" as UA string" |
| https://bugs.webkit.org/show_bug.cgi?id=213245 |
| https://trac.webkit.org/changeset/263537 |
| |
| 2020-06-25 Zalan Bujtas <zalan@apple.com> |
| |
| [Inline] Overlapping content when margin-right is present |
| https://bugs.webkit.org/show_bug.cgi?id=213629 |
| <rdar://problem/64391403> |
| |
| Reviewed by Simon Fraser. |
| |
| 1. computeInlineDirectionPositionsForSegment loops through the Bidi runs and computes their logical widths. |
| 2. Text measuring needs the current logical left position in order to compute the run width properly (e.g tab size) |
| 3. The current logical left includes margins, boders and paddings (e.g <span style="margin: 100px;">text content</span> 'text content' starts at 100px -ignore the line offset for now) |
| 4. The BiDi loop jumps over empty inline containers (e.g. text<span style="border: 10px solid green"></span>content) and it lacks the information to be able to resolve nested inline containers. |
| |
| This patch pre-computes the spacing offset for each InlineTextBox so that we could use it later to compute the logical left position for the text measuring. |
| |
| <span style="margin-right: 1px">[1]<span style="margin: 2px">[2]</span>[3]</span>[4] |
| [1] -> 0px offset |
| [2] -> 2px offset |
| [3] -> 4px offset |
| [4] -> 5px offset |
| |
| Test: fast/inline/incorrect-tab-position.html |
| |
| * rendering/ComplexLineLayout.cpp: |
| (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment): |
| |
| 2020-06-25 Alex Christensen <achristensen@webkit.org> |
| |
| REGRESSION(r256166, r260596) WKNavigationAction.request.allHTTPHeaderFields needs to contain User-Agent and Accept |
| https://bugs.webkit.org/show_bug.cgi?id=213626 |
| <rdar://problem/62374208> |
| |
| Reviewed by Darin Adler. |
| |
| Those two revisions seemed to just subtly move things around, but they caused API-breaking changes that caused real problems. |
| This effectively reverts the parts of those changes that caused the breakages. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::addExtraFieldsToRequest): |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::acceptHeaderValueFromType): |
| (WebCore::acceptHeaderValueFromType): Deleted. |
| * loader/cache/CachedResourceRequest.h: |
| |
| 2020-06-25 Simon Fraser <simon.fraser@apple.com> |
| |
| Convert the PaintLayerFlag enum to an enum class |
| https://bugs.webkit.org/show_bug.cgi?id=213624 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Convert enum PaintLayerFlag to an enum class. |
| |
| * html/shadow/MediaControlTextTrackContainerElement.cpp: |
| (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::paint): |
| (WebCore::RenderLayer::paintOverlayScrollbars): |
| (WebCore::paintForFixedRootBackground): |
| (WebCore::RenderLayer::paintLayer): |
| (WebCore::RenderLayer::paintLayerWithEffects): |
| (WebCore::RenderLayer::paintLayerContentsAndReflection): |
| (WebCore::RenderLayer::filtersForPainting const): |
| (WebCore::RenderLayer::paintLayerContents): |
| (WebCore::RenderLayer::updatePaintingInfoForFragments): |
| (WebCore::RenderLayer::paintTransformedLayerIntoFragments): |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderLayer.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::paintIntoLayer): |
| (WebCore::RenderLayerBacking::paintFlagsForLayer const): |
| * rendering/RenderReplica.cpp: |
| (WebCore::RenderReplica::paint): |
| |
| 2020-06-25 Daniel Bates <dabates@apple.com> |
| |
| [iOS] Event region briefly missing editable element after typing second character in question field on discussions.apple.com |
| https://bugs.webkit.org/show_bug.cgi?id=213618 |
| <rdar://problem/62656131> |
| |
| Reviewed by Simon Fraser. |
| |
| Ensure the event region is updated for the foreground layer, if there is one. The foreground layer paints |
| into a different backing and so will not be included in normal layer paint (i.e. RenderLayer::paintLayer() |
| will bail out). A "z-index: -1" can create such a layer. An element with "z-index: -1" is above the |
| background, but below other content. Although the original reported bug was only concerned about the |
| editable region the fix is applicable to all regions tracked by EventRegion. I included a test for touch-action |
| region too. |
| |
| Tests: editing/editable-region/text-field-inside-composited-negative-z-index-layer.html |
| pointerevents/ios/touch-action-none-relative-inside-composited-negative-z-index-layer.html |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateEventRegion): |
| |
| 2020-06-25 Jer Noble <jer.noble@apple.com> |
| |
| iOS Safari incorrectly reports "AppleCoreMedia" as UA string |
| https://bugs.webkit.org/show_bug.cgi?id=213245 |
| <rdar://problem/64471582> |
| |
| Reviewed by Youenn Fablet. |
| |
| Tests: TestWebKitAPI.MediaLoading.UserAgentStringCRABS |
| TestWebKitAPI.MediaLoading.UserAgentStringHLS |
| |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (-[WebCoreNSURLSessionDataTask initWithSession:identifier:request:]): |
| |
| 2020-06-25 Megan Gardner <megan_gardner@apple.com> |
| |
| Unreviewed. Fixing misspellings of 'position'. |
| |
| * editing/DeleteSelectionCommand.cpp: |
| (WebCore::DeleteSelectionCommand::smartDeleteParagraphSpacers): |
| * platform/ScrollAnimator.cpp: |
| (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation): |
| * rendering/line/BreakingContext.h: |
| (WebCore::BreakingContext::handleText): |
| |
| 2020-06-25 Daniel Bates <dabates@apple.com> |
| |
| [iOS] -_requestTextInputContextsInRect cannot find empty Quip spreadsheet title |
| https://bugs.webkit.org/show_bug.cgi?id=213564 |
| <rdar://problem/59355847> |
| |
| Reviewed by Simon Fraser. |
| |
| Special case for a focused editable inline element that has no line box, which is |
| what the Quip spreadsheet title can become if its contents are deleted. The engine |
| optimizes to avoid creating lines and line boxes for empty inlines, hit testing, |
| and painting them. It's complicated to patch all this up with a 100% correct |
| solution without forcing more line box creation. So, just add a special case. |
| |
| * page/Page.cpp: |
| (WebCore::Page::editableElementsInRect const): Add the root editable element of |
| the focused element to the result set if its rect intersects the search rect. Note |
| that its rect can be empty e.g. <span contenteditable="true"></span>. So, I use |
| a new function on FloatRect to perform the intersection test. I also updated the |
| ASSERT() to also use this new function. This was not necessary, but I did it to |
| future the proof this code should hit testing one day return empty inlines. |
| * platform/graphics/FloatRect.cpp: |
| (WebCore::FloatRect::inclusivelyIntersects const): Added. |
| (WebCore::FloatRect::intersects const): While I was in this file I fixed up a comment |
| in this function to be more precise. |
| * platform/graphics/FloatRect.h: |
| |
| 2020-06-25 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Unreviewed, fix the macOS 11 build after r263519 |
| |
| * rendering/RenderThemeMac.mm: |
| (WebCore::createAttachmentPlaceholderImage): |
| |
| 2020-06-25 Megan Gardner <megan_gardner@apple.com> |
| |
| Cannot delete last line of Mail Message |
| https://bugs.webkit.org/show_bug.cgi?id=213536 |
| <rdar://problem/63420928> |
| |
| Reviewed by Wenson Hsieh. |
| |
| LayoutTests/editing/deleting/smart-delete-paragraph-005.html |
| |
| The smart paragraph deletion code did not take into account that |
| the previous blank line could be the start of editable content without |
| a paragraph before it. If this was the case, the deletion code backed up |
| too far, and the delete command failed. This case should be handled |
| in the same way that the deleting the last paragraph in editable content is |
| handled, by checking if we are already at the beginning of the editable |
| content when expanding the selection for smart paragraph deletion. |
| |
| * editing/DeleteSelectionCommand.cpp: |
| (WebCore::DeleteSelectionCommand::smartDeleteParagraphSpacers): |
| |
| 2020-06-25 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation should exclude text rendered using icon-only fonts |
| https://bugs.webkit.org/show_bug.cgi?id=213446 |
| <rdar://problem/63734298> |
| |
| Reviewed by Myles Maxfield. |
| |
| See below for more details. |
| |
| Test: TextManipulation.StartTextManipulationExcludesTextRenderedAsIcons |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::shouldExcludeNodeBasedOnStyle): |
| (WebCore::TextManipulationController::parse): |
| |
| Augment token exclusion rules so that we're able to exclude certain text nodes from text manipulation, based on |
| their style (more specifically, based on their font family). Ask the text node's primary font if it is likely to |
| be used only for rendering icons, and cache the result in TextManipulationController to avoid running the |
| heuristic an excessive number of times for each font that appears in the document. We currently only run this |
| for the node's primary font when initiating translation, though we may want to change this in the future so that |
| node exclusion is recomputed when the primary font of a node changes. |
| |
| Note that in the case where an icon font fails to load, we won't exclude the text node from translation, |
| since the primary font will be a fallback. This is intentional, since the node would appear in the document as |
| normally rendered text (rather than icons), which should be translated. |
| |
| * editing/TextManipulationController.h: |
| * platform/graphics/Font.cpp: |
| (WebCore::Font::isProbablyOnlyUsedToRenderIcons const): |
| * platform/graphics/Font.h: |
| * platform/graphics/FontPlatformData.cpp: |
| (WebCore::FontPlatformData::familyName const): |
| * platform/graphics/FontPlatformData.h: |
| * platform/graphics/cocoa/FontCocoa.mm: |
| (WebCore::Font::isProbablyOnlyUsedToRenderIcons const): |
| |
| Add a heuristic to detect whether a platform font should be excluded from text manipulation. For now, we only |
| return true if we suspect that this font is an "icon-only" font (for instance, the "Material Icons" font). We |
| guess that a font is *probably* an icon-only font if the font supports only characters from the basic or PUA |
| unicode planes, and the glyph bounds for the set of supported non-control basic latin characters are all empty. |
| |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::FontPlatformData::familyName const): |
| |
| Add a platform `familyName()` helper method on `FontPlatformData`. On Cocoa platforms, this wraps a call to |
| `CTFontCopyFamilyName`. |
| |
| 2020-06-25 Kate Cheney <katherine_cheney@apple.com> |
| |
| App-bound domain service worker registrations should be limited |
| https://bugs.webkit.org/show_bug.cgi?id=213601 |
| <rdar://problem/64717589> |
| |
| Reviewed by Brent Fulgham. |
| |
| Limit number of service worker registrations for app-bound domains. |
| The current proposal is 3, but this could be changed in the future. |
| |
| No new tests, currently TestWebKitAPI is unable to test failed |
| service worker registration (test will timeout). Confirmed behavior |
| manually. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::validateRegistrationDomain): |
| |
| 2020-06-25 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Upstream macOS 11 additions to RenderThemeMac.mm and ThemeMac.mm |
| https://bugs.webkit.org/show_bug.cgi?id=213608 |
| <rdar://problem/64758299> |
| |
| Reviewed by Darin Adler. |
| |
| Replace WebKitAdditions imports with the imported code. No change in behavior. |
| |
| * css/html.css: |
| (input::-webkit-contacts-auto-fill-button): |
| * platform/mac/ThemeMac.mm: |
| (WebCore::ThemeMac::supportsLargeFormControls): |
| * rendering/RenderThemeMac.h: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::createAttachmentPlaceholderImage): |
| (WebCore::RenderThemeMac::extraDefaultStyleSheet): Deleted. |
| |
| Remove the override for extraDefaultStyleSheet altogether, since this was only used to temporarily hide the new |
| contact AutoFill button appearance from open source WebKit. |
| |
| 2020-06-25 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed build fix for WebXR enabled non-OpenXR builds. |
| |
| * platform/xr/openxr/PlatformXROpenXR.cpp: |
| (PlatformXR::Instance::Impl::enumerateApiLayerProperties const): Guard method with USE_OPENXR. |
| (PlatformXR::Instance::Impl::enumerateInstanceExtensionProperties const): Ditto. |
| (PlatformXR::Instance::Impl::Impl): Guard method body with USE_OPENXR. |
| (PlatformXR::Instance::Impl::~Impl): Ditto. |
| |
| 2020-06-25 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed iOS build fix after r263511. |
| |
| * platform/mediastream/MediaStreamPrivate.h: |
| |
| 2020-06-25 Youenn Fablet <youenn@apple.com> |
| |
| MediaRecorder stopRecorder() returns empty Blob after first use |
| https://bugs.webkit.org/show_bug.cgi?id=212274 |
| <rdar://problem/63601298> |
| |
| Reviewed by Eric Carlson. |
| |
| Refactor code to create/destroy MediaRecorderPrivate on MediaRecorder start/stop. |
| This allows reusing a MediaRecorder after a stop and restarting with a clean state. |
| |
| We introduce MediaRecorderPrivate::startRecording to do the initialization, |
| which allows to fix a potential ref cycle as part of the error callback handling. |
| |
| Make some improvements to the platform implementation, in particular add default initialization to all fields. |
| Align the code using AudioConverterRef to what is done in AudioSampleDataSource. |
| Also call VTCompressionSessionInvalidate when destroying the VideoSampleBufferCompressor. |
| |
| Test: http/wpt/mediarecorder/MediaRecorder-multiple-start-stop.html |
| |
| * Modules/mediarecorder/MediaRecorder.cpp: |
| (WebCore::MediaRecorder::create): |
| (WebCore::MediaRecorder::MediaRecorder): |
| (WebCore::MediaRecorder::startRecording): |
| (WebCore::MediaRecorder::stopRecording): |
| (WebCore::MediaRecorder::requestData): |
| * Modules/mediarecorder/MediaRecorder.h: |
| * platform/mediarecorder/MediaRecorderPrivate.h: |
| (WebCore::MediaRecorderPrivate::startRecording): |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: |
| (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor): |
| (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription): |
| (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded): |
| (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount): |
| (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets): |
| (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime): |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (WebCore::MediaRecorderPrivateWriter::stopRecording): |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: |
| (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor): |
| |
| 2020-06-25 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Use the flexing value as the base for the available horizontal space distribution |
| https://bugs.webkit.org/show_bug.cgi?id=213599 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-min-max-flex-distribution-simple.html |
| |
| * layout/tableformatting/TableLayout.cpp: |
| (WebCore::Layout::TableFormattingContext::TableLayout::distributedHorizontalSpace): |
| |
| 2020-06-25 Antoine Quint <graouts@webkit.org> |
| |
| REGRESSION (r260360): easing curves are broken on JS-originated animations |
| https://bugs.webkit.org/show_bug.cgi?id=213495 |
| <rdar://problem/64649747> |
| |
| Reviewed by Darin Adler. |
| |
| Prior to Web Animations, there was no way for an animation to set an animation-wide timing function while |
| also setting a per-keyframe timing function. As such GraphicsLayerCA would sometimes decide to set the |
| timing function on keyframes or on the entire CAAnimation. However, we can no longer do this with Web |
| Animations where an animation can set an animation-wide timing function and also keyframe-specific |
| timing functions. |
| |
| In this patch we create CAKeyframeAnimation objects for any animation that has at least two keyframes |
| if Web Animations are enabled, whereas the legacy code path requires at least three keyframes. We allow |
| PlatformCAAnimation::setTimingFunction() to be called in the Web Animations code path only under |
| GraphicsLayerCA::setupAnimation() while leaving the only call sites in place only for the legacy code |
| path. |
| |
| Finally, we modify GraphicsLayerCA::timingFunctionForAnimationValue() to only ever return a keyframe- |
| specific timing function or fall back to a default linear timing function in the Web Animations code |
| path, leaving the function to behave the same way as it used to in the legacy code path. |
| |
| Test: webanimations/accelerated-animation-with-easing.html |
| |
| * platform/animation/TimingFunction.h: |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::isKeyframe): |
| (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): |
| (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): |
| (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): |
| |
| 2020-06-25 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed, WPE Debug build fix after r263503. |
| |
| * platform/xr/openxr/PlatformXROpenXR.cpp: |
| (PlatformXR::OpenXRDevice::OpenXRDevice): Use m_instance instead of m_impl->xrInstance(). |
| |
| 2020-06-25 Alicia Boya García <aboya@igalia.com> |
| |
| [GStreamer] Don't invalidate MainThreadNotifier until the streaming threads are joined |
| https://bugs.webkit.org/show_bug.cgi?id=213197 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| ~MediaPlayerPrivateGStreamer() used to call m_notifier->invalidate() |
| before setting the pipeline to NULL state. This caused a race where |
| the streaming threads could post a task to the MainThreadNotifier |
| between these two events and cause a crash in |
| ASSERT(m_isValid.load()) -- that is, the notifier was used while |
| invalidated. |
| |
| Fixing this is actually easy. ~MediaPlayerPrivateGStreamer() is always |
| run from the main thread, so no MainThreadNotifier tasks will be run |
| before the destructor is complete. By moving the |
| m_notifier->invalidate() call to after the pipeline has been set to |
| NULL (and therefore all streaming threads torn down) we are ensuring |
| no more taks will be posted, and since the MainThreadNotifier is |
| invalidated by that point, already posted tasks will not be run. |
| |
| The race fixed by this patch is rare and wide-arching, so this patch |
| doesn't introduce TestExpectations changes, but it should avoid |
| further crashes like the ones reported in the Bugzilla issue attached. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): |
| |
| 2020-06-23 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Check device orientation support when requesting a reference space |
| https://bugs.webkit.org/show_bug.cgi?id=213519 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| When requesting a local reference space the specs mandate us to check whether or not the device |
| supports orientation tracking. This was not implemented in the OpenXR backend, so we were unconditionally |
| returning true. |
| |
| The OpenXR devices now properly check whether or not orientation tracking is initialized. We took the chance |
| to refactor a bit the OpenXR backend moving all the device initialization code to the OpenXRDevice class. |
| |
| The current tests already check this functionality. |
| |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::referenceSpaceIsSupported const): Call supportsOrientationTracking() on device. |
| * platform/xr/PlatformXR.h: |
| (PlatformXR::Device::supportsOrientationTracking const): Added. |
| * platform/xr/openxr/PlatformXROpenXR.cpp: |
| (PlatformXR::Instance::enumerateImmersiveXRDevices): Just create the OpenXR device, it will automatically |
| initialize itself. |
| (PlatformXR::OpenXRDevice::OpenXRDevice): Get XrSystem and XrInstance as parametters. |
| (PlatformXR::OpenXRDevice::collectSupportedSessionModes): Moved from Instance::Impl. |
| (PlatformXR::Instance::Impl::collectSupportedSessionModes): Deleted. |
| * platform/xr/openxr/PlatformXROpenXR.h: |
| * testing/WebFakeXRDevice.h: Mark the SimulatedXRDevice as supporting orientation tracking. |
| |
| 2020-06-24 James Savage <james.savage@apple.com> |
| |
| Upstream iPadOS 13.0 multi-window support |
| https://bugs.webkit.org/show_bug.cgi?id=213590 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::doSetup): Always construct a UIWindow |
| using the expected UIWindowScene. |
| (makeWindowFromView): Deleted. |
| |
| 2020-06-24 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Running spellcheck on https://developer.apple.com/forums/thread/650317 hangs the web process |
| https://bugs.webkit.org/show_bug.cgi?id=213585 |
| <rdar://problem/64681632> |
| |
| Reviewed by Simon Fraser. |
| |
| In `TextCheckingHelper::findFirstMisspellingOrBadGrammar`, we attempt to find the first misspelled piece of text |
| by iterating over the current paragraph range; when we exhaust the current paragraph range, we try to move on to |
| the next paragraph range by setting the current paragraph range to the start and end of the next paragraph, |
| using `startOfNextParagraph`. |
| |
| However, `startOfNextParagraph` may return the null position in some cases (as seen in this bug, and the |
| associated layout test). This logic isn't robust against this possibility, and will end up looping infinitely in |
| the while loop, since `setStart` and `setEnd` are no-ops when given a null position, and so the current |
| paragraph remains the same. |
| |
| Make this logic for finding the next misspelled word more robust by allowing us to bail out of the while loop in |
| the case where setStart or setEnd failed to advance the paragraph range (e.g. due to a null position, or DOM |
| exception). |
| |
| Test: editing/mac/spelling/advance-to-next-misspelling.html |
| |
| * editing/TextCheckingHelper.cpp: |
| (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): |
| * testing/Internals.cpp: |
| (WebCore::Internals::advanceToNextMisspelling): |
| |
| Add an internal testing hook to advance to the next misspelling. |
| |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-24 David Kilzer <ddkilzer@apple.com> |
| |
| Use ObjectIdentifier<>instead of WebCore::nextPlaybackTargetClientContextId() in Document.cpp |
| <https://webkit.org/b/213546> |
| <rdar://problem/61803576> |
| |
| Reviewed by Youenn Fablet. |
| |
| Switch from uint64_t to WebCore::PlaybackTargetClientContextIdentifier |
| for contextId values. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| - Add PlaybackTargetClientContextIdentifier.h to the project. |
| |
| * Modules/mediasession/PlaybackTargetClientContextIdentifier.h: Add. |
| * Modules/mediasession/WebMediaSessionManager.cpp: |
| (WebCore::ClientState::ClientState): |
| (WebCore::WebMediaSessionLogger::logAlways const): |
| (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): |
| (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): |
| (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): |
| (WebCore::WebMediaSessionManager::clientStateDidChange): |
| (WebCore::WebMediaSessionManager::find): |
| * Modules/mediasession/WebMediaSessionManager.h: |
| * Modules/mediasession/WebMediaSessionManagerClient.h: |
| * dom/Document.cpp: |
| (WebCore::Document::addPlaybackTargetPickerClient): |
| (WebCore::Document::removePlaybackTargetPickerClient): |
| (WebCore::Document::playbackTargetAvailabilityDidChange): |
| (WebCore::Document::setPlaybackTarget): |
| (WebCore::Document::setShouldPlayToPlaybackTarget): |
| (WebCore::Document::playbackTargetPickerWasDismissed): |
| (WebCore::nextPlaybackTargetClientContextId): Delete. |
| - Replace with PlaybackTargetClientContextIdentifier::generate(). |
| * dom/Document.h: |
| * page/ChromeClient.h: |
| (WebCore::ChromeClient::addPlaybackTargetPickerClient): |
| (WebCore::ChromeClient::removePlaybackTargetPickerClient): |
| (WebCore::ChromeClient::showPlaybackTargetPicker): |
| (WebCore::ChromeClient::playbackTargetPickerClientStateDidChange): |
| * page/Page.cpp: |
| (WebCore::Page::addPlaybackTargetPickerClient): |
| (WebCore::Page::removePlaybackTargetPickerClient): |
| (WebCore::Page::showPlaybackTargetPicker): |
| (WebCore::Page::playbackTargetPickerClientStateDidChange): |
| (WebCore::Page::setPlaybackTarget): |
| (WebCore::Page::playbackTargetAvailabilityDidChange): |
| (WebCore::Page::setShouldPlayToPlaybackTarget): |
| (WebCore::Page::playbackTargetPickerWasDismissed): |
| * page/Page.h: |
| |
| 2020-06-24 Clark Wang <clark_wang@apple.com> |
| |
| Removed unrestricted keyword from attributes in PannerNode |
| https://bugs.webkit.org/show_bug.cgi?id=213523 |
| |
| Updated refDistance, maxDistance, rolloffFactor, coneOuterGain, coneInnerAngle, coneOuterAngle attributes according to spec: |
| https://www.w3.org/TR/webaudio/#PannerNode-attributes. |
| |
| Reviewed by Darin Adler. |
| |
| Test: webaudio/prefixed-pannernode-basic.html |
| |
| * Modules/webaudio/PannerNode.cpp: |
| (WebCore::PannerNode::setRefDistance): |
| (WebCore::PannerNode::setMaxDistance): |
| (WebCore::PannerNode::setRolloffFactor): |
| (WebCore::PannerNode::setConeOuterGain): |
| * Modules/webaudio/PannerNode.h: |
| * Modules/webaudio/PannerNode.idl: |
| |
| 2020-06-24 Peng Liu <peng.liu6@apple.com> |
| |
| Black rectangle appears when closing PIP on iPhone |
| https://bugs.webkit.org/show_bug.cgi?id=213570 |
| |
| Reviewed by Eric Carlson. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::willStopPictureInPicture): |
| Don't unhide the window and view of WebAVPlayerViewController before exiting Picture-in-Picture. |
| |
| 2020-06-24 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r260276): Scrolling through shelves on music.apple.com is not smooth |
| https://bugs.webkit.org/show_bug.cgi?id=213572 |
| |
| Reviewed by Wenson Hsieh. |
| |
| The scroll position for an overflow:scroll element with scroll-snap could jump around |
| during scrolling, if layout triggered a call to ScrollableArea::updateScrollSnapState(). |
| The crux of the issue is that isScrollSnapInProgress() returned false for overflow:scrollers |
| which are scrolling asynchronously. |
| |
| Fix by extending the existing ScrollingTree::isScrollSnapInProgress() to track all scrolling |
| nodes by storing a HashSet<ScrollingNodeID> rather than just a flag for the main frame. |
| |
| RenderLayer::isScrollSnapInProgress() then consults the ScrollingCoordinator, which consults |
| the scrolling tree for this state. |
| |
| Add the ability to test via internals.isScrollSnapInProgress(). |
| |
| Test: fast/scrolling/mac/scroll-snapping-in-progress.html |
| |
| * dom/Document.h: |
| * page/FrameView.cpp: |
| (WebCore::FrameView::isScrollSnapInProgress const): The main thread can run snapping logic |
| even for async-scrollable frames, so consult the ScrollingCoordinator and FrameView's ScrollAnimator. |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::isScrollSnapInProgress const): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::isScrollSnapInProgress const): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::isScrollSnapInProgressForNode): |
| (WebCore::ScrollingTree::setNodeScrollSnapInProgress): |
| (WebCore::ScrollingTree::isScrollSnapInProgress): Deleted. |
| (WebCore::ScrollingTree::setMainFrameIsScrollSnapping): Deleted. |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::setScrollSnapInProgress): |
| (WebCore::ScrollingTreeScrollingNode::isScrollSnapInProgress const): |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): |
| * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::willStartScrollSnapAnimation): |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::didStopScrollSnapAnimation): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::requestScrollPositionUpdate): |
| (WebCore::RenderLayer::isScrollSnapInProgress const): |
| (WebCore::RenderLayer::setupFontSubpixelQuantization): |
| * testing/Internals.cpp: |
| (WebCore:: const): |
| (WebCore::Internals::scrollSnapOffsets): |
| (WebCore::Internals::isScrollSnapInProgress): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-24 Jason Lawrence <lawrence.j@apple.com> |
| |
| Unreviewed, reverting r263466. |
| |
| This commit caused 50+ crashes on multiple queues internally. |
| |
| Reverted changeset: |
| |
| "REGRESSION (r260360): easing curves are broken on JS- |
| originated animations" |
| https://bugs.webkit.org/show_bug.cgi?id=213495 |
| https://trac.webkit.org/changeset/263466 |
| |
| 2020-06-24 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Allow the async clipboard API to write data when copying via menu action or key binding |
| https://bugs.webkit.org/show_bug.cgi?id=213568 |
| <rdar://problem/64711653> |
| |
| Reviewed by Darin Adler. |
| |
| Makes a couple of minor adjustments to allow `clipboard.write` and `clipboard.writeText` to work during a user- |
| triggered copy event (that is, from menu or key binding). See below for more details. |
| |
| Test: editing/async-clipboard/clipboard-write-in-copy-event-handler.html |
| |
| * Modules/async-clipboard/Clipboard.cpp: |
| (WebCore::shouldProceedWithClipboardWrite): |
| |
| Add a mechanism to keep track of when Editor is handling a copy or cut event that is the result of interacting |
| with a key binding or menu action. Use this mechanism to grant write access via the async clipboard API. |
| |
| * editing/Editor.cpp: |
| (WebCore::dispatchClipboardEvent): |
| |
| Only attempt to commit the static pasteboard to the platform pasteboard during a copy event when preventing |
| default if the StaticPasteboard-backed DataTransfer actually contains data. This fixes a race condition when |
| writing to the pasteboard using the async clipboard API during the "copy" event, where the changeCount when |
| beginning to write is incremented due to the pasteboard getting cleared. |
| |
| This change will also make it so that calling `preventDefault()` on the copy event will result in no change to |
| the system pasteboard, instead of clearing out any existing content on the pasteboard. |
| |
| (WebCore::Editor::cut): |
| (WebCore::Editor::copy): |
| * editing/Editor.h: |
| (WebCore::Editor::isCopyingFromMenuOrKeyBinding const): |
| * editing/EditorCommand.cpp: |
| (WebCore::executeCopy): |
| (WebCore::executeCut): |
| |
| 2020-06-24 Umar Iqbal <uiqbal@apple.com> |
| |
| We should resurrect the older patch that collects some statistics of web API calls |
| https://bugs.webkit.org/show_bug.cgi?id=213319 |
| |
| Reviewed by Brent Fulgham. |
| |
| No new tests. Enabled existing tests. |
| Enabled http/tests/webAPIStatistics that test the functionality behind WEB_API_STATISTICS flag. |
| |
| + Brought back WebCore::encodeHashSet(KeyedEncoder& encoder, const String& label, |
| const String& key, const HashSet<String>& hashSet) because it was needed by |
| WebCore::encodeFontHashSet(KeyedEncoder& encoder, const String& label, const HashSet<String>& hashSet) |
| + Changed the type of HashCountedSet to HashSet because of earlier patch |
| (https://bugs.webkit.org/attachment.cgi?id=363033) updated other HashCountedSet to HashSet, |
| stating that the counted statistics were never used (see change log in the mentioned patch). |
| + Also changed the type of topFrameRegistrableDomainsWhichAccessedWebAPIs HashSet |
| from String to RegistrableDomain. See the earlier bug (https://bugs.webkit.org/show_bug.cgi?id=194791) |
| that explains the switch from String to RegistrableDomain for eTLD+1's |
| + Enabled WEB_API_STATISTICS flag in FeatureDefines.xcconfig and PlatformEnableCocoa.h |
| + Added WTF::EnumTraits<> for OptionSet<> enum in ResourceLoadStatistics.h due to an earlier change. |
| |
| * loader/ResourceLoadStatistics.h: |
| * Configurations/FeatureDefines.xcconfig: |
| * loader/CanvasActivityRecord.h: |
| * loader/ResourceLoadStatistics.cpp: |
| (WebCore::encodeHashSet): |
| (WebCore::ResourceLoadStatistics::encode const): |
| (WebCore::decodeHashSet): |
| (WebCore::decodeCanvasActivityRecord): |
| (WebCore::ResourceLoadStatistics::decode): |
| (WebCore::appendHashSet): |
| (WebCore::ResourceLoadStatistics::toString const): |
| |
| 2020-06-24 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Null Ptr Deref READ @ WTF::Optional<WTF::Seconds>::clear |
| https://bugs.webkit.org/show_bug.cgi?id=213543 |
| |
| Reviewed by Geoffrey Garen. |
| |
| While performing an animation request, the callback functions modifies the iframe's srcdoc attribute, leading to domWindow being null during |
| rendering, and resulting into crash. |
| |
| Test: fast/rendering/iframe-window-animation-modifies-iframe-srcdoc-crash.html |
| |
| * page/Page.cpp: |
| (WebCore::Page::updateRendering): |
| |
| 2020-06-24 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] -webkit-font-smoothing:antialiased makes fonts blurry |
| https://bugs.webkit.org/show_bug.cgi?id=206573 |
| |
| Reviewed by Alex Christensen. |
| |
| After -webkit-font-smoothing support was added to Cairo port in |
| r254506 (Bug 54763), fonts looks jaggy and faint in WinCairo port |
| in some web sites using -webkit-font-smoothing:antialiased, for |
| example Google News, GMail, https://apple.com. |
| |
| 'antialiased' of -webkit-font-smoothing was mapped to |
| CAIRO_ANTIALIAS_GRAY. And, CAIRO_ANTIALIAS_GRAY is mapped to |
| ANTIALIASED_QUALITY in cairo-win32-font.c. ANTIALIASED_QUALITY |
| makes fonts jaggy and faint. |
| |
| Use CAIRO_ANTIALIAS_SUBPIXEL instead of CAIRO_ANTIALIAS_GRAY for |
| 'antialiased' as well as 'subpixel-antialiased' does. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawGlyphsToContext): Don't use CAIRO_ANTIALIAS_GRAY for Win32 Cairo. |
| |
| 2020-06-24 Antoine Quint <graouts@webkit.org> |
| |
| REGRESSION (r260360): easing curves are broken on JS-originated animations |
| https://bugs.webkit.org/show_bug.cgi?id=213495 |
| <rdar://problem/64649747> |
| |
| Reviewed by Darin Adler. |
| |
| Prior to Web Animations, there was no way for an animation to set an animation-wide timing function while |
| also setting a per-keyframe timing function. As such GraphicsLayerCA would sometimes decide to set the |
| timing function on keyframes or on the entire CAAnimation. However, we can no longer do this with Web |
| Animations where an animation can set an animation-wide timing function and also keyframe-specific |
| timing functions. |
| |
| In this patch we create CAKeyframeAnimation objects for any animation that has at least two keyframes |
| if Web Animations are enabled, whereas the legacy code path requires at least three keyframes. We allow |
| PlatformCAAnimation::setTimingFunction() to be called in the Web Animations code path only under |
| GraphicsLayerCA::setupAnimation() while leaving the only call sites in place only for the legacy code |
| path. |
| |
| Finally, we modify GraphicsLayerCA::timingFunctionForAnimationValue() to only ever return a keyframe- |
| specific timing function or fall back to a default linear timing function in the Web Animations code |
| path, leaving the function to behave the same way as it used to in the legacy code path. |
| |
| Test: webanimations/accelerated-animation-with-easing.html |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::isKeyframe): |
| (WebCore::GraphicsLayerCA::createAnimationFromKeyframes): |
| (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): |
| (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): |
| |
| 2020-06-24 Antoine Quint <graouts@webkit.org> |
| |
| REGRESSION: Delayed updating of the parallax images on pacificvoyages.net/posts |
| https://bugs.webkit.org/show_bug.cgi?id=212213 |
| <rdar://problem/63497946> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: webanimations/css-transition-retargeting-during-ready-promise.html |
| |
| When a transition's ready promise is resolved, its start time is the same as the timeline's current time. This means |
| that retargeting a transition at that moment will yield a progress of zero even though the transition was started before |
| the current animation frame. This means that retargeting a property on each page rendering may start a new transition |
| with the same from value, which can have an undesirable effect such as on the website reported in this bug. |
| |
| We now keep track of the timeline time when a transition is created and use this time as a start time override when |
| applying the animation to compute the before-change style in AnimationTimeline::updateCSSTransitionsForElementAndProperty(). |
| |
| To do so, we pass an optional start time all the way from WebAnimation::resolve() through to WebAnimation::currentTime() and |
| via the animation effect timing computation. |
| |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::getBasicTiming const): |
| (WebCore::AnimationEffect::getComputedTiming const): |
| * animation/AnimationEffect.h: |
| * animation/AnimationTimeline.cpp: |
| (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty): |
| * animation/CSSTransition.cpp: |
| (WebCore::CSSTransition::CSSTransition): |
| (WebCore::CSSTransition::resolve): |
| * animation/CSSTransition.h: |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::apply): |
| * animation/KeyframeEffect.h: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::currentTime const): |
| (WebCore::WebAnimation::resolve): |
| * animation/WebAnimation.h: |
| |
| 2020-06-24 Eric Carlson <eric.carlson@apple.com> |
| |
| Don't claim to support fullscreen mode unless fullScreenEnabled setting is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=213142 |
| <rdar://63753327> |
| |
| Reviewed by Jer Noble. |
| |
| Test: media/video-supports-fullscreen.html |
| |
| * html/HTMLVideoElement.cpp: |
| (WebCore::HTMLVideoElement::supportsFullscreen const): Check settings.fullScreenEnabled. |
| |
| 2020-06-24 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] webrtc/disable-encryption.html is a crashing flaky |
| https://bugs.webkit.org/show_bug.cgi?id=211166 |
| <rdar://problem/63223973> |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Simplify the process to create internal appsrc elements. I suspect something bad was ongoing |
| with these moves of GRefPtr. |
| |
| * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: |
| (WebCore::_WebKitMediaStreamSrc::SourceData::ensureAppSrc): |
| (WebCore::webkitMediaStreamSrcSetupAppSrc): |
| (WebCore::_WebKitMediaStreamSrc::SourceData::setSrc): Deleted. |
| |
| 2020-06-24 Antti Koivisto <antti@apple.com> |
| |
| Style resolution sometimes fails to create all style resolvers for shadow trees. |
| https://bugs.webkit.org/show_bug.cgi?id=212946 |
| <rdar://problem/60916215>> |
| |
| Reviewed by Anders Carlsson. |
| |
| This can cause problems later. |
| |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::Scope::Scope): |
| |
| Ensure all style resolvers are constructed before traversing. |
| |
| 2020-06-24 Youenn Fablet <youenn@apple.com> |
| |
| Add logging to WebRTC video pipeline to check for frame rate stability |
| https://bugs.webkit.org/show_bug.cgi?id=213369 |
| |
| Reviewed by Eric Carlson. |
| |
| Add a FrameRateMonitor class to compute frame stability. |
| Use this class at end of the video pipeline (LocalSampleBufferDisplayLayer). |
| Log messages in case a frame gets frozen at LocalSampleBufferDisplayLayer time. |
| We compute that a frame takes too long by checking whether it is delayed by more than three expected frames. |
| This logging is complemented with encoded frame reception logging (at the beginning of the video pipeline) |
| and WebRTC stats logging (freezeCount, totalFreezeDuration, shortly after decoding the frames). |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/FrameRateMonitor.cpp: Added. |
| (WebCore::FrameRateMonitor::newFrame): |
| * platform/FrameRateMonitor.h: Added. |
| (WebCore::FrameRateMonitor::frameRate const): |
| (WebCore::FrameRateMonitor::frameCount const): |
| (WebCore::FrameRateMonitor::FrameRateMonitor): |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: |
| (WebCore::LocalSampleBufferDisplayLayer::LocalSampleBufferDisplayLayer): |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSample): |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer): |
| (WebCore::LocalSampleBufferDisplayLayer::onFrameRateNotification): |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h: |
| Unified build fix. |
| |
| 2020-06-24 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| Remove [CallbackNeedsOperatorEqual] extended attribute |
| https://bugs.webkit.org/show_bug.cgi?id=213538 |
| |
| Reviewed by Chris Dumez. |
| |
| This change removes now unused [CallbackNeedsOperatorEqual] extended attribute. |
| It was added to accommodate MediaQueryListListener, which was removed in r260243. |
| |
| We are safe to remove [CallbackNeedsOperatorEqual] since its implementation |
| expects certain constructor signature, and callback interfaces are considered |
| legacy by spec authors anyway. |
| |
| Also, this patch removes 2 resolved FIXMEs: |
| 1. OrdinaryDefineOwnProperty() is performed correctly, no dynamic dispatch there. |
| 2. Set() is performed correctly, with `false` as last argument. |
| (changed in https://github.com/heycam/webidl/pull/832, covered by WPT) |
| |
| No new tests, no behavior change. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateDefineOwnProperty): |
| (GenerateAttributeSetterBodyDefinition): |
| (GenerateCallbackHeaderContent): |
| (GenerateCallbackImplementationContent): |
| * bindings/scripts/IDLAttributes.json: |
| |
| 2020-06-23 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Fix PlatformXR initialization/destruction |
| https://bugs.webkit.org/show_bug.cgi?id=213509 |
| |
| Reviewed by Youenn Fablet. |
| |
| There were two different issues, one at creation time and the other one at destruction. At creation |
| time we were not calling construct() for the LazyNeverDestroyed object. That was making the WebProcess |
| crash in Debug builds. At destruction time we were calling xrDestroyInstance() without checking that the |
| passed instance was a valid one, although OpenXR implementations deal with it the spec is pretty clear. |
| |
| * platform/xr/PlatformXR.h: Mark LazyNeverDestroyed as friend and default constructor&destructor. |
| * platform/xr/openxr/PlatformXROpenXR.cpp: |
| (PlatformXR::Instance::Impl::~Impl): Check that instance is not XR_NULL_HANDLE before destroying. |
| (PlatformXR::Instance::singleton): Call construct() on the Lazy instance. |
| |
| 2020-06-24 Youenn Fablet <youenn@apple.com> |
| |
| Use signalling thread as worker thread instead of network thread |
| https://bugs.webkit.org/show_bug.cgi?id=213512 |
| |
| Reviewed by Eric Carlson. |
| |
| This is probably better since network thread is always busy |
| while the siganlling thread is mostly busy at negotiation time. |
| This also aligns with Chromium current setup. |
| No change of behavior. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::LibWebRTCProvider::createPeerConnectionFactory): |
| |
| 2020-06-24 Rob Buis <rbuis@igalia.com> |
| |
| Add referrerpolicy attribute support for <link> |
| https://bugs.webkit.org/show_bug.cgi?id=213342 |
| |
| Reviewed by Darin Adler. |
| |
| Give the referrer policy member a clear default. |
| |
| * loader/LinkLoader.h: |
| |
| 2020-06-23 Zalan Bujtas <zalan@apple.com> |
| |
| [Multicol] Reset the childrenInline state on the RenderBlockFlow when destroying the multicolumn context |
| https://bugs.webkit.org/show_bug.cgi?id=213535 |
| <rdar://problem/64541835> |
| |
| Reviewed by Simon Fraser. |
| |
| The "childrenInline" flags tells the tree builder whether a newly inserted inline content needs an anonymous block wrapper or not. |
| RenderBlockFlows with multicolumn content have this flag set to false as the RenderMultiColumnFlowThread is a block renderer. |
| As part of the mulicolumn context destruction, we move all the descendants from RenderMultiColumnFlowThread back to |
| the original parent (the parent of the RenderMultiColumnFlowThread renderer). |
| This patch sets this flag back to the initial value of true so that we don't end up constructing redundant wrappers for the incoming inline content. |
| |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::RenderTreeBuilder::MultiColumn::destroyFragmentedFlow): |
| |
| 2020-06-23 Geoffrey Garen <ggaren@apple.com> |
| |
| Remove WTF::setMainThreadCallbacksPaused |
| https://bugs.webkit.org/show_bug.cgi?id=213112 |
| |
| Reviewed by Tim Horton. |
| |
| * inspector/PageScriptDebugServer.cpp: |
| (WebCore::PageScriptDebugServer::setJavaScriptPaused): |
| |
| 2020-06-23 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, update xcfilelist files after some recent WebXR changes. |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| |
| 2020-06-23 Chris Dumez <cdumez@apple.com> |
| |
| Remove a lot of unnecessary calls to Ref::copyRef() |
| https://bugs.webkit.org/show_bug.cgi?id=213533 |
| |
| Reviewed by Darin Adler. |
| |
| Remove a lot of unnecessary calls to Ref::copyRef() now that Ref is copyable. |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::addAll): |
| * Modules/indexeddb/IDBTransaction.cpp: |
| (WebCore::IDBTransaction::doRequestOpenCursor): |
| (WebCore::IDBTransaction::requestGetAllObjectStoreRecords): |
| (WebCore::IDBTransaction::requestGetAllIndexRecords): |
| (WebCore::IDBTransaction::requestGetRecord): |
| (WebCore::IDBTransaction::requestIndexRecord): |
| (WebCore::IDBTransaction::requestCount): |
| (WebCore::IDBTransaction::requestDeleteRecord): |
| (WebCore::IDBTransaction::requestClearObjectStore): |
| (WebCore::IDBTransaction::requestPutOrAdd): |
| * Modules/mediarecorder/MediaRecorder.cpp: |
| (WebCore::MediaRecorder::create): |
| * Modules/mediastream/CanvasCaptureMediaStreamTrack.cpp: |
| (WebCore::CanvasCaptureMediaStreamTrack::Source::create): |
| * Modules/webdatabase/Database.cpp: |
| (WebCore::Database::scheduleTransactionCallback): |
| * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::send): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::bufferedAmount): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpdateBufferedAmount): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didStartClosingHandshake): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessageError): |
| (WebCore::WorkerThreadableWebSocketChannel::Peer::didUpgradeURL): |
| (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize): |
| (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld): |
| * crypto/SubtleCrypto.cpp: |
| (WebCore::SubtleCrypto::wrapKey): |
| * loader/DocumentWriter.cpp: |
| (WebCore::DocumentWriter::begin): |
| * loader/NetscapePlugInStreamLoader.cpp: |
| (WebCore::NetscapePlugInStreamLoader::create): |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::create): |
| * platform/graphics/ImageSource.cpp: |
| (WebCore::ImageSource::startAsyncDecodingQueue): |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: |
| (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequests): |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: |
| (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples): |
| * workers/WorkerGlobalScope.cpp: |
| (WebCore::WorkerGlobalScope::wrapCryptoKey): |
| (WebCore::WorkerGlobalScope::unwrapCryptoKey): |
| * workers/service/WorkerSWClientConnection.cpp: |
| (WebCore::WorkerSWClientConnection::matchRegistration): |
| (WebCore::WorkerSWClientConnection::getRegistrations): |
| (WebCore::WorkerSWClientConnection::whenRegistrationReady): |
| (WebCore::WorkerSWClientConnection::scheduleUnregisterJobInServer): |
| * workers/service/context/ServiceWorkerFetch.cpp: |
| (WebCore::ServiceWorkerFetch::dispatchFetchEvent): |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::queueTaskToFireFetchEvent): |
| (WebCore::ServiceWorkerThread::queueTaskToPostMessage): |
| (WebCore::ServiceWorkerThread::queueTaskToFireInstallEvent): |
| (WebCore::ServiceWorkerThread::queueTaskToFireActivateEvent): |
| |
| 2020-06-23 Chris Dumez <cdumez@apple.com> |
| |
| Drop AudioContextBase class |
| https://bugs.webkit.org/show_bug.cgi?id=213522 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Drop AudioContextBase class and have WebKitAudioContext subclass the new BaseAudioContext class instead. |
| We recently introduced BaseAudioContext to match the specification and keeping AudioContextBase is now confusing. |
| |
| No new tests, this simplifies our code but there is no Web-facing behavior change. |
| |
| * Modules/webaudio/AnalyserNode.cpp: |
| (WebCore::AnalyserNode::AnalyserNode): |
| * Modules/webaudio/AnalyserNode.h: |
| * Modules/webaudio/AudioBasicInspectorNode.cpp: |
| (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode): |
| * Modules/webaudio/AudioBasicInspectorNode.h: |
| * Modules/webaudio/AudioBasicProcessorNode.cpp: |
| (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): |
| * Modules/webaudio/AudioBasicProcessorNode.h: |
| * Modules/webaudio/AudioBufferSourceNode.cpp: |
| (WebCore::AudioBufferSourceNode::create): |
| (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): |
| (WebCore::AudioBufferSourceNode::setBuffer): |
| * Modules/webaudio/AudioBufferSourceNode.h: |
| * Modules/webaudio/AudioContext.cpp: |
| * Modules/webaudio/AudioDestinationNode.cpp: |
| (WebCore::AudioDestinationNode::AudioDestinationNode): |
| * Modules/webaudio/AudioDestinationNode.h: |
| * Modules/webaudio/AudioNode.cpp: |
| (WebCore::AudioNode::AudioNode): |
| (WebCore::AudioNode::connect): |
| (WebCore::AudioNode::disconnect): |
| (WebCore::AudioNode::setChannelCount): |
| (WebCore::AudioNode::setChannelCountMode): |
| (WebCore::AudioNode::setChannelInterpretation): |
| (WebCore::AudioNode::enableOutputsIfNecessary): |
| * Modules/webaudio/AudioNode.h: |
| (WebCore::AudioNode::context): |
| (WebCore::AudioNode::context const): |
| * Modules/webaudio/AudioNode.idl: |
| * Modules/webaudio/AudioNodeOutput.h: |
| (WebCore::AudioNodeOutput::context): |
| * Modules/webaudio/AudioParam.cpp: |
| (WebCore::AudioParam::AudioParam): |
| * Modules/webaudio/AudioParam.h: |
| * Modules/webaudio/AudioParamTimeline.cpp: |
| (WebCore::AudioParamTimeline::valueForContextTime): |
| * Modules/webaudio/AudioParamTimeline.h: |
| * Modules/webaudio/AudioScheduledSourceNode.cpp: |
| (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode): |
| * Modules/webaudio/AudioScheduledSourceNode.h: |
| * Modules/webaudio/AudioSummingJunction.cpp: |
| (WebCore::AudioSummingJunction::AudioSummingJunction): |
| * Modules/webaudio/AudioSummingJunction.h: |
| (WebCore::AudioSummingJunction::context): |
| * Modules/webaudio/BaseAudioContext.cpp: |
| (WebCore::BaseAudioContext::BaseAudioContext): |
| (WebCore::BaseAudioContext::document const): |
| (WebCore::BaseAudioContext::scriptExecutionContext const): |
| * Modules/webaudio/BaseAudioContext.h: |
| (WebCore::BaseAudioContext::isOfflineContext const): |
| (WebCore::BaseAudioContext::isWebKitAudioContext const): |
| (WebCore::BaseAudioContext::currentSampleFrame const): |
| (WebCore::BaseAudioContext::currentTime const): |
| (WebCore::BaseAudioContext::sampleRate const): |
| (WebCore::BaseAudioContext::incrementConnectionCount): |
| (WebCore::BaseAudioContext::setAudioThread): |
| (WebCore::BaseAudioContext::isAudioThreadFinished): |
| (WebCore::BaseAudioContext::behaviorRestrictions const): |
| (WebCore::BaseAudioContext::addBehaviorRestriction): |
| (WebCore::BaseAudioContext::removeBehaviorRestriction): |
| (WebCore::BaseAudioContext::nextAudioNodeLogIdentifier): |
| (WebCore::BaseAudioContext::nextAudioParameterLogIdentifier): |
| (WebCore::BaseAudioContext::isStopped const): |
| (WebCore::BaseAudioContext::AutoLocker::AutoLocker): |
| (WebCore::BaseAudioContext::AutoLocker::~AutoLocker): |
| * Modules/webaudio/BiquadFilterNode.cpp: |
| (WebCore::BiquadFilterNode::BiquadFilterNode): |
| * Modules/webaudio/BiquadFilterNode.h: |
| * Modules/webaudio/BiquadProcessor.cpp: |
| (WebCore::BiquadProcessor::BiquadProcessor): |
| * Modules/webaudio/BiquadProcessor.h: |
| * Modules/webaudio/ChannelMergerNode.cpp: |
| (WebCore::ChannelMergerNode::create): |
| (WebCore::ChannelMergerNode::ChannelMergerNode): |
| * Modules/webaudio/ChannelMergerNode.h: |
| * Modules/webaudio/ChannelSplitterNode.cpp: |
| (WebCore::ChannelSplitterNode::create): |
| (WebCore::ChannelSplitterNode::ChannelSplitterNode): |
| * Modules/webaudio/ChannelSplitterNode.h: |
| * Modules/webaudio/ConvolverNode.cpp: |
| (WebCore::ConvolverNode::ConvolverNode): |
| * Modules/webaudio/ConvolverNode.h: |
| * Modules/webaudio/DefaultAudioDestinationNode.cpp: |
| (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode): |
| * Modules/webaudio/DefaultAudioDestinationNode.h: |
| * Modules/webaudio/DelayNode.cpp: |
| (WebCore::DelayNode::DelayNode): |
| (WebCore::DelayNode::create): |
| * Modules/webaudio/DelayNode.h: |
| * Modules/webaudio/DelayProcessor.cpp: |
| (WebCore::DelayProcessor::DelayProcessor): |
| * Modules/webaudio/DelayProcessor.h: |
| * Modules/webaudio/DynamicsCompressorNode.cpp: |
| (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): |
| * Modules/webaudio/DynamicsCompressorNode.h: |
| * Modules/webaudio/GainNode.cpp: |
| (WebCore::GainNode::GainNode): |
| * Modules/webaudio/GainNode.h: |
| * Modules/webaudio/MediaElementAudioSourceNode.cpp: |
| (WebCore::MediaElementAudioSourceNode::create): |
| (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): |
| (WebCore::MediaElementAudioSourceNode::setFormat): |
| * Modules/webaudio/MediaElementAudioSourceNode.h: |
| * Modules/webaudio/MediaStreamAudioDestinationNode.cpp: |
| (WebCore::MediaStreamAudioDestinationNode::create): |
| (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): |
| * Modules/webaudio/MediaStreamAudioDestinationNode.h: |
| * Modules/webaudio/MediaStreamAudioSourceNode.cpp: |
| (WebCore::MediaStreamAudioSourceNode::create): |
| (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): |
| * Modules/webaudio/MediaStreamAudioSourceNode.h: |
| * Modules/webaudio/OfflineAudioDestinationNode.cpp: |
| (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode): |
| * Modules/webaudio/OfflineAudioDestinationNode.h: |
| * Modules/webaudio/OscillatorNode.cpp: |
| (WebCore::OscillatorNode::create): |
| (WebCore::OscillatorNode::OscillatorNode): |
| * Modules/webaudio/OscillatorNode.h: |
| * Modules/webaudio/PannerNode.cpp: |
| (WebCore::PannerNodeBase::PannerNodeBase): |
| * Modules/webaudio/PannerNode.h: |
| * Modules/webaudio/ScriptProcessorNode.cpp: |
| (WebCore::ScriptProcessorNode::create): |
| (WebCore::ScriptProcessorNode::ScriptProcessorNode): |
| * Modules/webaudio/ScriptProcessorNode.h: |
| * Modules/webaudio/WaveShaperNode.cpp: |
| (WebCore::WaveShaperNode::WaveShaperNode): |
| * Modules/webaudio/WaveShaperNode.h: |
| * Modules/webaudio/WebKitAudioContext.cpp: |
| (WebCore::WebKitAudioContext::WebKitAudioContext): |
| (WebCore::WebKitAudioContext::createMediaElementSource): |
| (WebCore::WebKitAudioContext::createMediaStreamSource): |
| (WebCore::WebKitAudioContext::createMediaStreamDestination): |
| (WebCore::WebKitAudioContext::createWebKitPanner): |
| (WebCore::WebKitAudioContext::close): |
| * Modules/webaudio/WebKitAudioContext.h: |
| (isType): |
| * Modules/webaudio/WebKitAudioContext.idl: |
| * dom/EventTargetFactory.in: |
| * testing/Internals.cpp: |
| (WebCore::Internals::setAudioContextRestrictions): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-22 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Introducing XRLayer |
| https://bugs.webkit.org/show_bug.cgi?id=213462 |
| |
| Reviewed by Youenn Fablet. |
| |
| The most recent drafts of the WebXR spec have added a new object called XRLayer which is the base class |
| of the already known XRWebGLLayer. The spec only defines the latter but future extensions might define |
| some other layer subclasses. |
| |
| This patch fixes several checks in the IDL tests. |
| |
| * CMakeLists.txt: Added new files. |
| * DerivedSources.make: Ditto. |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| * Modules/webxr/WebXRLayer.cpp: Added. |
| (WebCore::WebXRLayer::WebXRLayer): |
| * Modules/webxr/WebXRLayer.h: Ditto. |
| * Modules/webxr/WebXRLayer.idl: Ditto. |
| * Modules/webxr/WebXRSession.h: Export scriptExecutionContext() so it could be used from the outside. |
| * Modules/webxr/WebXRWebGLLayer.cpp: |
| (WebCore::WebXRWebGLLayer::WebXRWebGLLayer): Call the superclass. |
| * Modules/webxr/WebXRWebGLLayer.h: Inherit from WebXRLayer. |
| * Modules/webxr/WebXRWebGLLayer.idl: Ditto. |
| * Sources.txt: Added new files. |
| * bindings/js/WebCoreBuiltinNames.h: Added XRLayer. |
| * dom/EventTargetFactory.in: Ditto. |
| |
| 2020-06-23 Devin Rousso <drousso@apple.com> |
| |
| Keyframe animation doesn't 't show up in the Animations timeline |
| https://bugs.webkit.org/show_bug.cgi?id=213441 |
| |
| Reviewed by Brian Burg. |
| |
| Test: inspector/animation/lifecycle-css-animation.html |
| |
| * inspector/agents/InspectorAnimationAgent.cpp: |
| (WebCore::buildObjectForEffect): |
| |
| 2020-06-23 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them |
| https://bugs.webkit.org/show_bug.cgi?id=212264 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Implement https://github.com/w3c/csswg-drafts/commit/5b5db39d21f3658ae2f4d7992daaf822aca178d8 which modified |
| the way percentages were resolved in flexible items with indefinite sizes. From now on we can pretend that |
| they're really definite. |
| |
| This allows us to mark 3 tests which were testing percentages in flex items as correct. |
| |
| Based on Blink's crrev.com/1247184 by <cbiesinger@chromium.org> |
| |
| This is a reland of r262124 which got reverted due to the bug fixed in r263389. |
| |
| * rendering/RenderFlexibleBox.cpp: |
| (WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): Do only check flex container main size |
| definiteness when computing the main size for percentage resolution, no need to check flex basis at all. |
| |
| 2020-06-18 Sergio Villar Senin <svillar@igalia.com> |
| |
| REGRESSION (r262124): Twitter videos go blank after exiting fullscreen |
| https://bugs.webkit.org/show_bug.cgi?id=213110 |
| |
| Reviewed by Darin Adler. |
| |
| Test: fullscreen/video-inside-flex-item.html |
| |
| Setting/unsetting position:absolute on a flex/grid item can potentially create/remove flex/grid items because |
| absolutely positioned children of those containers are out-of-flow and thus, do not generate flex/grid items. |
| Flex/grid items are potentially stretched by their containers so the style recalculation is not enough to get |
| a correct layout because the override size set by flex/grid containers is not reset. |
| In the particular case of this bug we had this hierarchy (highly simplified from twitter page): |
| |
| Flexbox container |
| |___DIV (absolutelly positioned) |
| |___<video> (height: 100% width: 100%) |
| |
| When the <video> goes fullscreen the FullscreenManager replaces the |
| style of the DIV because it inserts a RenderFullScreen object in between |
| the DIV and the <video> (along with some anonymous blocks). This means |
| that the DIV which was not a flex item (as it was absolutely positioned) |
| became a flex item and thus its size is stretched as the flexbox |
| container mandates. When exiting fullscreen, the original style is |
| restored (and thus the position absolute). The DIV is then no longer a |
| flex item but the stretched size (overrideContentSize) is still set, |
| causing issues with the sizes of the <video>. |
| |
| Note that it isn't possible to reproduce this bug with the current trunk because there is a bug in the flexbox |
| implementation (see bug 212264) preventing this to happen. However it becomes 100% reproducible with the patch for bug 212264 |
| which is correct and fixes several tests related to wrapping in flexbox. It's also reproducible when the FULLSCREEN_API is |
| enabled, otherwise the codepath for full screen is totally different (there are no placeholders). |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::styleDidChange): clear the override sizes for grid/flex when flex/grid items become out-of-flow, |
| for example by changing position to absolute. |
| |
| 2020-06-22 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| REGRESSION(r258741): [GTK] anchor-file-blob-download-includes-backslash.html is failing |
| https://bugs.webkit.org/show_bug.cgi?id=209329 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Sanitize the suggested filename. We replace characters that can be problematic in filenames with '_' to match |
| what Chromium and Firefox do. |
| |
| * platform/network/soup/ResourceResponseSoup.cpp: |
| (WebCore::sanitizeFilename): |
| (WebCore::ResourceResponse::platformSuggestedFilename const): |
| |
| 2020-06-22 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Add the capability to call the Storage Access API as a quirk, on behalf of websites that should be doing it themselves |
| https://bugs.webkit.org/show_bug.cgi?id=213418 |
| <rdar://problem/64549429> |
| |
| Reviewed by Alex Christensen. |
| |
| No new tests. This patch adds quirks for specific websites. |
| The general functionality that's touched has tests under |
| LayoutTests/http/tests/storageAccess/. |
| |
| * dom/Document.h: |
| (WebCore::Document::isTopDocument const): |
| New convenience function. |
| (WebCore::Document::setUserDidInteractWithPage): |
| Use of the new convenience function. |
| (WebCore::Document::userDidInteractWithPage const): |
| Use of the new convenience function. |
| * dom/DocumentStorageAccess.cpp: |
| (WebCore::DocumentStorageAccess::hasStorageAccessQuickCheck): |
| (WebCore::DocumentStorageAccess::hasStorageAccess): |
| (WebCore::DocumentStorageAccess::hasStorageAccessForDocumentQuirk): |
| (WebCore::DocumentStorageAccess::requestStorageAccess): |
| (WebCore::DocumentStorageAccess::requestStorageAccessQuickCheck): |
| (WebCore::DocumentStorageAccess::requestStorageAccessForDocumentQuirk): |
| (WebCore::DocumentStorageAccess::requestStorageAccessForNonDocumentQuirk): |
| (WebCore::DocumentStorageAccess::requestStorageAccessQuirk): |
| These functions are split up to allow quirks to call directly into the |
| implementation of the Storage Access API without the JavaScript |
| promise that goes with the web API. It also allows for quirks to call |
| the API without an iframe document. |
| * dom/DocumentStorageAccess.h: |
| * dom/Element.cpp: |
| (WebCore::Element::dispatchMouseEvent): |
| The two existing quirks are for click events. |
| * loader/ResourceLoadObserver.h: |
| (WebCore::ResourceLoadObserver::setDomainsWithUserInteraction): |
| (WebCore::ResourceLoadObserver::hasHadUserInteraction const): |
| These two new functions allow the Storage Access API quirks |
| to synchronously check if it's worth calling the API or not. |
| If there has been no user interaction for the requesting |
| domain, there is no need to call the API. |
| * page/Quirks.cpp: |
| (WebCore::Quirks::triggerOptionalStorageAccessQuirk const): |
| This is the new quirks function, hiding the specifics of |
| certain elements clicked and for which websites. It also |
| calls the Storage Access API. |
| * page/Quirks.h: |
| |
| 2020-06-22 Chris Dumez <cdumez@apple.com> |
| |
| Introduce BaseAudioContext interface |
| https://bugs.webkit.org/show_bug.cgi?id=213491 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Introduce BaseAudioContext interface as per W3C WebAudio specification: |
| - https://www.w3.org/TR/webaudio/#BaseAudioContext |
| |
| No new tests, rebaselined existing test. |
| |
| * CMakeLists.txt: |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::AudioContext::AudioContext): |
| (WebCore::AudioContext::close): |
| (WebCore::AudioContext::createMediaElementSource): |
| (WebCore::AudioContext::createMediaStreamSource): |
| (WebCore::AudioContext::createMediaStreamDestination): |
| * Modules/webaudio/AudioContext.h: |
| * Modules/webaudio/AudioContext.idl: |
| * Modules/webaudio/AudioNode.cpp: |
| (WebCore::AudioNode::contextForBindings const): |
| * Modules/webaudio/AudioNode.h: |
| * Modules/webaudio/AudioNode.idl: |
| * Modules/webaudio/BaseAudioContext.cpp: Copied from Source/WebCore/Modules/webaudio/AudioContext.cpp. |
| (WebCore::BaseAudioContext::isSampleRateRangeGood): |
| (WebCore::AudioContextBase::AudioContextBase): |
| (WebCore::BaseAudioContext::BaseAudioContext): |
| (WebCore::BaseAudioContext::constructCommon): |
| (WebCore::BaseAudioContext::~BaseAudioContext): |
| (WebCore::BaseAudioContext::lazyInitialize): |
| (WebCore::BaseAudioContext::clear): |
| (WebCore::BaseAudioContext::uninitialize): |
| (WebCore::BaseAudioContext::isInitialized const): |
| (WebCore::BaseAudioContext::addReaction): |
| (WebCore::BaseAudioContext::setState): |
| (WebCore::BaseAudioContext::stop): |
| (WebCore::BaseAudioContext::suspend): |
| (WebCore::BaseAudioContext::resume): |
| (WebCore::BaseAudioContext::activeDOMObjectName const): |
| (WebCore::AudioContextBase::document const): |
| (WebCore::BaseAudioContext::hostingDocumentIdentifier const): |
| (WebCore::BaseAudioContext::isSuspended const): |
| (WebCore::BaseAudioContext::visibilityStateChanged): |
| (WebCore::BaseAudioContext::wouldTaintOrigin const): |
| (WebCore::BaseAudioContext::createBuffer): |
| (WebCore::BaseAudioContext::decodeAudioData): |
| (WebCore::BaseAudioContext::createBufferSource): |
| (WebCore::BaseAudioContext::createScriptProcessor): |
| (WebCore::BaseAudioContext::createBiquadFilter): |
| (WebCore::BaseAudioContext::createWaveShaper): |
| (WebCore::BaseAudioContext::createPanner): |
| (WebCore::BaseAudioContext::createConvolver): |
| (WebCore::BaseAudioContext::createDynamicsCompressor): |
| (WebCore::BaseAudioContext::createAnalyser): |
| (WebCore::BaseAudioContext::createGain): |
| (WebCore::BaseAudioContext::createDelay): |
| (WebCore::BaseAudioContext::createChannelSplitter): |
| (WebCore::BaseAudioContext::createChannelMerger): |
| (WebCore::BaseAudioContext::createOscillator): |
| (WebCore::BaseAudioContext::createPeriodicWave): |
| (WebCore::BaseAudioContext::notifyNodeFinishedProcessing): |
| (WebCore::BaseAudioContext::derefFinishedSourceNodes): |
| (WebCore::BaseAudioContext::refNode): |
| (WebCore::BaseAudioContext::derefNode): |
| (WebCore::BaseAudioContext::derefUnfinishedSourceNodes): |
| (WebCore::BaseAudioContext::lock): |
| (WebCore::BaseAudioContext::tryLock): |
| (WebCore::BaseAudioContext::unlock): |
| (WebCore::BaseAudioContext::isAudioThread const): |
| (WebCore::BaseAudioContext::isGraphOwner const): |
| (WebCore::BaseAudioContext::addDeferredFinishDeref): |
| (WebCore::BaseAudioContext::handlePreRenderTasks): |
| (WebCore::BaseAudioContext::handlePostRenderTasks): |
| (WebCore::BaseAudioContext::handleDeferredFinishDerefs): |
| (WebCore::BaseAudioContext::markForDeletion): |
| (WebCore::BaseAudioContext::scheduleNodeDeletion): |
| (WebCore::BaseAudioContext::deleteMarkedNodes): |
| (WebCore::BaseAudioContext::markSummingJunctionDirty): |
| (WebCore::BaseAudioContext::removeMarkedSummingJunction): |
| (WebCore::BaseAudioContext::eventTargetInterface const): |
| (WebCore::BaseAudioContext::markAudioNodeOutputDirty): |
| (WebCore::BaseAudioContext::handleDirtyAudioSummingJunctions): |
| (WebCore::BaseAudioContext::handleDirtyAudioNodeOutputs): |
| (WebCore::BaseAudioContext::addAutomaticPullNode): |
| (WebCore::BaseAudioContext::removeAutomaticPullNode): |
| (WebCore::BaseAudioContext::updateAutomaticPullNodes): |
| (WebCore::BaseAudioContext::processAutomaticPullNodes): |
| (WebCore::AudioContextBase::scriptExecutionContext const): |
| (WebCore::BaseAudioContext::nodeWillBeginPlayback): |
| (WebCore::shouldDocumentAllowWebAudioToAutoPlay): |
| (WebCore::BaseAudioContext::willBeginPlayback): |
| (WebCore::BaseAudioContext::willPausePlayback): |
| (WebCore::BaseAudioContext::startRendering): |
| (WebCore::BaseAudioContext::mediaCanStart): |
| (WebCore::BaseAudioContext::mediaState const): |
| (WebCore::BaseAudioContext::pageMutedStateDidChange): |
| (WebCore::BaseAudioContext::isPlayingAudioDidChange): |
| (WebCore::BaseAudioContext::finishedRendering): |
| (WebCore::BaseAudioContext::dispatchEvent): |
| (WebCore::BaseAudioContext::incrementActiveSourceCount): |
| (WebCore::BaseAudioContext::decrementActiveSourceCount): |
| (WebCore::BaseAudioContext::suspendRendering): |
| (WebCore::BaseAudioContext::resumeRendering): |
| (WebCore::BaseAudioContext::suspendPlayback): |
| (WebCore::BaseAudioContext::mayResumePlayback): |
| (WebCore::BaseAudioContext::postTask): |
| (WebCore::BaseAudioContext::origin const): |
| (WebCore::BaseAudioContext::addConsoleMessage): |
| (WebCore::BaseAudioContext::clearPendingActivity): |
| (WebCore::BaseAudioContext::makePendingActivity): |
| (WebCore::BaseAudioContext::logChannel const): |
| * Modules/webaudio/BaseAudioContext.h: Copied from Source/WebCore/Modules/webaudio/AudioContext.h. |
| (WebCore::AudioContextBase::AutoLocker::AutoLocker): |
| (WebCore::AudioContextBase::AutoLocker::~AutoLocker): |
| (WebCore::BaseAudioContext::destination): |
| (WebCore::BaseAudioContext::activeSourceCount const): |
| (WebCore::BaseAudioContext::listener): |
| (WebCore::BaseAudioContext::state const): |
| (WebCore::BaseAudioContext::isClosed const): |
| (WebCore::BaseAudioContext::connectionCount const): |
| (WebCore::BaseAudioContext::audioThread const): |
| (WebCore::BaseAudioContext::maxNumberOfChannels): |
| (WebCore::BaseAudioContext::destinationNode const): |
| (WebCore::BaseAudioContext::userGestureRequiredForAudioStart const): |
| (WebCore::BaseAudioContext::pageConsentRequiredForAudioStart const): |
| (isType): |
| * Modules/webaudio/BaseAudioContext.idl: Copied from Source/WebCore/Modules/webaudio/AudioContext.idl. |
| * Modules/webaudio/OfflineAudioContext.cpp: |
| (WebCore::OfflineAudioContext::OfflineAudioContext): |
| * Modules/webaudio/OfflineAudioContext.h: |
| * Modules/webaudio/OfflineAudioContext.idl: |
| * Modules/webaudio/PannerNode.cpp: |
| (WebCore::PannerNode::PannerNode): |
| * Modules/webaudio/PannerNode.h: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * dom/EventTargetFactory.in: |
| * testing/Internals.cpp: |
| (WebCore::Internals::setAudioContextRestrictions): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-22 Andres Gonzalez <andresg_22@apple.com> |
| |
| AXIsolatedTree::generateSubtree should properly assign the generated subtree to its parent node. |
| https://bugs.webkit.org/show_bug.cgi?id=213435 |
| |
| Reviewed by Darin Adler. |
| |
| AXIsolatedTree::generateSubtree now properly updates the children IDs |
| of the parent node of the subtree being generated. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::generateIsolatedTree): |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::updateChildrenIDs): |
| (WebCore::AXIsolatedTree::generateSubtree): Takes the parent object |
| instead of the parent ID. This allows to retrieve the children IDs of |
| the parent object. |
| (WebCore::AXIsolatedTree::createSubtree): |
| (WebCore::AXIsolatedTree::updateSubtree): |
| (WebCore::AXIsolatedTree::updateChildren): |
| (WebCore::AXIsolatedTree::setRootNode): |
| (WebCore::AXIsolatedTree::removeSubtree): |
| (WebCore::AXIsolatedTree::appendNodeChanges): R-value parameter instead |
| of by reference. |
| * accessibility/isolatedtree/AXIsolatedTree.h: |
| |
| 2020-06-22 Tim Horton <timothy_horton@apple.com> |
| |
| Update macOS version macros |
| https://bugs.webkit.org/show_bug.cgi?id=213484 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * Configurations/Base.xcconfig: |
| * Configurations/DebugRelease.xcconfig: |
| * Configurations/Version.xcconfig: |
| * Configurations/WebKitTargetConditionals.xcconfig: |
| |
| 2020-06-22 Clark Wang <clark_wang@apple.com> |
| |
| Added getFloatTimeDomainData method to AnalyserNode |
| https://bugs.webkit.org/show_bug.cgi?id=213393 |
| |
| Reviewed by Chris Dumez. |
| |
| Added getFloatTimeDomainData method, as per spec: https://www.w3.org/TR/webaudio/#analysernode. |
| Implementation of RealtimeAnalyser::getFloatTimeDomainData(Float32Array* destinationArray) is based on: |
| https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/modules/webaudio/realtime_analyser.cc. |
| Removed nullable option from some AnalyserNode methods. |
| |
| Re-baselined existing tests to show new passing test. |
| |
| * Modules/webaudio/AnalyserNode.h: |
| * Modules/webaudio/AnalyserNode.idl: |
| * Modules/webaudio/RealtimeAnalyser.cpp: |
| (WebCore::RealtimeAnalyser::getFloatFrequencyData): |
| (WebCore::RealtimeAnalyser::getByteFrequencyData): |
| (WebCore::RealtimeAnalyser::getFloatTimeDomainData): |
| (WebCore::RealtimeAnalyser::getByteTimeDomainData): |
| * Modules/webaudio/RealtimeAnalyser.h: |
| |
| 2020-06-22 Rob Buis <rbuis@igalia.com> |
| |
| Add referrerpolicy attribute support for <link> |
| https://bugs.webkit.org/show_bug.cgi?id=213342 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for referrerpolicy attribute handling on |
| link prefetch/preload/stylesheet. |
| |
| Tests: http/tests/security/referrer-policy-attribute-style-no-referrer.html |
| http/wpt/preload/refferer-policy.html |
| |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::process): |
| (WebCore::HTMLLinkElement::setReferrerPolicyForBindings): |
| (WebCore::HTMLLinkElement::referrerPolicyForBindings const): |
| (WebCore::HTMLLinkElement::referrerPolicy const): |
| * html/HTMLLinkElement.h: |
| * html/parser/HTMLPreloadScanner.cpp: |
| (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): |
| * html/parser/HTMLResourcePreloader.cpp: |
| (WebCore::PreloadRequest::resourceRequest): |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::loadLinksFromHeader): |
| (WebCore::LinkLoader::preloadIfNeeded): |
| (WebCore::LinkLoader::prefetchIfNeeded): |
| * loader/LinkLoader.h: |
| |
| 2020-06-22 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix build error with release build and "#define LOG_DISABLED 0" |
| https://bugs.webkit.org/show_bug.cgi?id=213420 |
| |
| Reviewed by Sam Weinig. |
| |
| AnimationBase::updateStateMachine() uses LOG_ERROR so needs to test ERROR_DISABLED not LOG_DISABLED. |
| |
| * page/animation/AnimationBase.cpp: |
| (WebCore::AnimationBase::updateStateMachine): |
| |
| 2020-06-22 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Fix the case of "null type Blob slice" in wpt/FileAPI/blob/Blob-slice.html |
| https://bugs.webkit.org/show_bug.cgi?id=213370 |
| |
| Reviewed by Darin Adler. |
| |
| * fileapi/Blob.h: |
| (WebCore::Blob::slice const): |
| Remove unnecessary default arguments |
| These default arguments are introduced in r83873 |
| but we don't need them because WebIDL binding handles them. |
| |
| * fileapi/Blob.idl: |
| - Update the definition of `Blob.slice()` to match the latest spec. |
| https://w3c.github.io/FileAPI/#blob-section |
| |
| - We should use empty string as a default value by step 4-a of |
| https://w3c.github.io/FileAPI/#dfn-slice |
| |
| - In the previous code, we use `optional DOMString?` for the |
| _contentType_ arguments for `Blob.slice()`. |
| Then, our codegen generates a code which uses `convert<IDLNullable<IDLDOMString>>` |
| and it returns `String()` if the JS value is `null`. |
| This caused the failure case in this change. |
| |
| |
| 2020-06-22 Andres Gonzalez <andresg_22@apple.com> |
| |
| Code cleanup in WebAccessibilityObjectWrapper updateObjectBackingStore and position. |
| https://bugs.webkit.org/show_bug.cgi?id=213438 |
| |
| Reviewed by Darin Adler. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: |
| (-[WebAccessibilityObjectWrapperBase updateObjectBackingStore]): |
| Removed unnecessary call to axBackingObject. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper position]): |
| Check for isIsolatedTreeEnabled instead of for the request thread, |
| since isolated tree mode = 1 runs on the main thread. |
| |
| 2020-06-22 Youenn Fablet <youenn@apple.com> |
| |
| [WebRTC] Add support for freeze/pause receiver stats |
| https://bugs.webkit.org/show_bug.cgi?id=212938 |
| <rdar://problem/64141493> |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by updated tests. |
| |
| Receiver stats are useful to check for freezes. |
| Let's introduce it in 'track' stats for now, we will later on move all |
| 'receiver' stats to its own object once we fully align with spec. |
| |
| * Modules/mediastream/RTCStatsReport.h: |
| * Modules/mediastream/RTCStatsReport.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp: |
| (WebCore::fillRTCMediaStreamTrackStats): |
| |
| 2020-06-22 Rob Buis <rbuis@igalia.com> |
| |
| Image `crossorigin` mutations should be considered "relevant mutations" |
| https://bugs.webkit.org/show_bug.cgi?id=213335 |
| |
| Reviewed by Darin Adler. |
| |
| As follow up to r263345, this check is not needed after all since the for loop |
| already does the same check. |
| |
| * html/HTMLImageElement.cpp: |
| (WebCore::HTMLImageElement::bestFitSourceFromPictureElement): |
| |
| 2020-06-22 Jason Lawrence <lawrence.j@apple.com> |
| |
| Unreviewed, reverting r263331. |
| |
| This commit was causing 50+ iOS debug tests to crash. |
| |
| Reverted changeset: |
| |
| "Convert DateComponents parsing code to use Optional based |
| return values rather than out-parameters" |
| https://bugs.webkit.org/show_bug.cgi?id=213440 |
| https://trac.webkit.org/changeset/263331 |
| |
| 2020-06-10 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Add a preliminary implementation of XRWebGLLayer |
| https://bugs.webkit.org/show_bug.cgi?id=213022 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Added a preliminary implementation of XRWebGLLayer. It does not have any functionality at the moment so |
| it cannot be used to render WebXR stuff. This patch adds all the machinery required to create and properly |
| initialize the layer according to the spec. |
| |
| Two new wpt tests are passing now. |
| |
| * Modules/webxr/WebXRSession.h: Expose session mode. |
| * Modules/webxr/WebXRWebGLLayer.cpp: |
| (WebCore::WebXRWebGLLayer::create): Implemented spec for XRWebGLLayer creation. |
| (WebCore::WebXRWebGLLayer::computeNativeWebGLFramebufferResolution): Added with mock implementation. |
| (WebCore::WebXRWebGLLayer::computeRecommendedWebGLFramebufferResolution): Added. |
| (WebCore::WebXRWebGLLayer::WebXRWebGLLayer): |
| (WebCore::WebXRWebGLLayer::framebuffer const): Returned type should be a pointer. |
| (WebCore::WebXRWebGLLayer::framebufferWidth const): Return framebuffer width if available, otherwise return |
| the base context width. |
| (WebCore::WebXRWebGLLayer::framebufferHeight const): Ditto but with heights. |
| (WebCore::WebXRWebGLLayer::getNativeFramebufferScaleFactor): Implemented. |
| * Modules/webxr/WebXRWebGLLayer.h: New methods and type adjustments. |
| |
| 2020-06-22 Rob Buis <rbuis@igalia.com> |
| |
| Image `crossorigin` mutations should be considered "relevant mutations" |
| https://bugs.webkit.org/show_bug.cgi?id=213335 |
| |
| Reviewed by Darin Adler. |
| |
| Make crossorigin attribute's state changes relevant mutations [1]. This change |
| also fixes several picture related mutations to be relevant [2]. |
| |
| Test: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html |
| |
| [1] https://html.spec.whatwg.org/#reacting-to-dom-mutations:attr-img-crossorigin |
| [2] https://html.spec.whatwg.org/#reacting-to-dom-mutations |
| |
| * html/HTMLImageElement.cpp: |
| (WebCore::HTMLImageElement::bestFitSourceFromPictureElement): |
| (WebCore::HTMLImageElement::evaluateDynamicMediaQueryDependencies): |
| (WebCore::HTMLImageElement::selectImageSource): |
| (WebCore::parseCrossoriginState): |
| (WebCore::HTMLImageElement::attributeChanged): |
| (WebCore::HTMLImageElement::parseAttribute): |
| (WebCore::HTMLImageElement::insertedIntoAncestor): |
| (WebCore::HTMLImageElement::removedFromAncestor): |
| * html/HTMLImageElement.h: |
| * html/HTMLPictureElement.cpp: |
| (WebCore::HTMLPictureElement::sourcesChanged): |
| * html/HTMLSourceElement.cpp: |
| (WebCore::HTMLSourceElement::insertedIntoAncestor): |
| (WebCore::HTMLSourceElement::removedFromAncestor): |
| (WebCore::HTMLSourceElement::parseAttribute): |
| * html/HTMLSourceElement.h: |
| * loader/ImageLoader.h: |
| |
| 2020-06-21 Sam Weinig <weinig@apple.com> |
| |
| Convert much of the SVG string parsing code to use Optional based return values rather than out-parameters |
| https://bugs.webkit.org/show_bug.cgi?id=213416 |
| |
| Reviewed by Darin Adler. |
| |
| Update SVG parsers to use Optional style return programming rather than out parameters. |
| To make things even nicer, SVGPathSource based parsers now have a type per-parse function, |
| which makes working with them much easier. In the future, we should consider exanding these |
| new types to be used by SVGPathConsumer family of classes as well. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| Add SVGPathSegValue.h, which was missing from the Xcode project. |
| |
| * svg/SVGAngleValue.cpp: |
| (WebCore::parseAngleType): |
| (WebCore::SVGAngleValue::setValueAsString): |
| Adopt updated parseNumber() function, and do a drive by removal of an easy to remove |
| upconvertedCharacters. |
| |
| * svg/SVGAnimateMotionElement.cpp: |
| (WebCore::SVGAnimateMotionElement::calculateToAtEndOfDurationValue): |
| (WebCore::SVGAnimateMotionElement::calculateFromAndToValues): |
| (WebCore::SVGAnimateMotionElement::calculateFromAndByValues): |
| (WebCore::SVGAnimateMotionElement::calculateDistance): |
| Now uses new parsePoint() function. Using Optional.valueOr() where |
| the old code would have had parsePoint() doing the clearing. |
| |
| * svg/SVGAnimationElement.cpp: |
| (WebCore::parseKeySplines): |
| Now returns an Optional<Vector<UnitBezier>>. |
| (WebCore::SVGAnimationElement::parseAttribute): |
| Now uses new parseKeySplines, and does an explicit clear on parse failure (old code |
| did it implicitly in the parse function). |
| |
| * svg/SVGFEConvolveMatrixElement.cpp: |
| (WebCore::SVGFEConvolveMatrixElement::parseAttribute): |
| * svg/SVGFEDiffuseLightingElement.cpp: |
| (WebCore::SVGFEDiffuseLightingElement::parseAttribute): |
| * svg/SVGFEDropShadowElement.cpp: |
| (WebCore::SVGFEDropShadowElement::parseAttribute): |
| * svg/SVGFEGaussianBlurElement.cpp: |
| (WebCore::SVGFEGaussianBlurElement::parseAttribute): |
| * svg/SVGFEMorphologyElement.cpp: |
| (WebCore::SVGFEMorphologyElement::parseAttribute): |
| * svg/SVGFESpecularLightingElement.cpp: |
| (WebCore::SVGFESpecularLightingElement::parseAttribute): |
| * svg/SVGFETurbulenceElement.cpp: |
| (WebCore::SVGFETurbulenceElement::parseAttribute): |
| Adopt Optional based parseNumberOptionalNumber. |
| |
| * svg/SVGImageElement.cpp: |
| (WebCore::SVGImageElement::parseAttribute): |
| * svg/SVGFEImageElement.cpp: |
| (WebCore::SVGFEImageElement::parseAttribute): |
| Simplify by using the SVGPreserveAspectRatioValue constructor |
| which calls parse. No need for three lines. |
| |
| * svg/SVGFitToViewBox.cpp: |
| (WebCore::SVGFitToViewBox::parseAttribute): |
| Adopt new Optional based parseViewBox. |
| Simplify by using the SVGPreserveAspectRatioValue constructor |
| which calls parse. No need for three lines. |
| |
| (WebCore::SVGFitToViewBox::parseViewBox): |
| Convert to be Optional based, and adopt new parseNumber functions. |
| |
| * svg/SVGFitToViewBox.h: |
| Updated signatures for new Optional based functions. |
| |
| * svg/SVGGlyphRefElement.cpp: |
| (WebCore::parseFloat): |
| Adopt Optional based parseNumber. |
| |
| * svg/SVGHKernElement.cpp: |
| (WebCore::SVGHKernElement::buildHorizontalKerningPair const): |
| * svg/SVGHKernElement.h: |
| * svg/SVGVKernElement.cpp: |
| (WebCore::SVGVKernElement::buildVerticalKerningPair const): |
| * svg/SVGVKernElement.h: |
| Convert to be Optional based. Update a few callers to use makeString. |
| |
| * svg/SVGToOTFFontConversion.cpp: |
| (WebCore::SVGToOTFFontConverter::addKerningPair const): |
| (WebCore::SVGToOTFFontConverter::appendKERNSubtable): |
| Adopt new Optional based kerning pair builders. Add some moves |
| to avoid some copies. |
| |
| * svg/SVGLengthValue.cpp: |
| (WebCore::SVGLengthValue::setValueAsString): |
| Adopt Optional based parseNumber. |
| |
| * svg/SVGNumberList.h: |
| (WebCore::SVGNumberList::parse): |
| Adopt Optional based parseNumber. |
| |
| * svg/SVGParserUtilities.cpp: |
| (WebCore::genericParseNumber): |
| (WebCore::parseNumber): |
| (WebCore::genericParseArcFlag): |
| (WebCore::parseArcFlag): |
| (WebCore::parseNumberOptionalNumber): |
| (WebCore::parsePoint): |
| (WebCore::parseRect): |
| (WebCore::parseGlyphName): |
| (WebCore::parseUnicodeRange): |
| (WebCore::parseKerningUnicodeString): |
| (WebCore::genericParseFloatPoint): |
| (WebCore::parseFloatPoint): |
| (WebCore::parseSVGNumber): Deleted. |
| (WebCore::parseNumberFromString): Deleted. |
| (WebCore::parseDelimitedString): Deleted. |
| (WebCore::parseFloatPoint2): Deleted. |
| (WebCore::parseFloatPoint3): Deleted. |
| * svg/SVGParserUtilities.h: |
| (WebCore::isSVGSpace): |
| (WebCore::skipOptionalSVGSpaces): |
| (WebCore::skipOptionalSVGSpacesOrDelimiter): |
| - Converts parse* functions to return Optional values rather than using outparameters. |
| - Removes unused parseSVGNumber and parseDelimitedString. |
| - Removes parseFloatPoint2 and parseFloatPoint3. They weren't useful enough to keep around. |
| - Renames parseNumberFromString to parseNumber. The argument is a String, it's clear enough. |
| - Replace boolean skip parameters with new enum SuffixSkippingPolicy. |
| - Make parseFloatPoint have two overloads rather than being templatized to be consistent. |
| |
| |
| * svg/SVGPathBlender.cpp: |
| (WebCore::pullFromSources): |
| (WebCore::SVGPathBlender::blendMoveToSegment): |
| (WebCore::SVGPathBlender::blendLineToSegment): |
| (WebCore::SVGPathBlender::blendLineToHorizontalSegment): |
| (WebCore::SVGPathBlender::blendLineToVerticalSegment): |
| (WebCore::SVGPathBlender::blendCurveToCubicSegment): |
| (WebCore::SVGPathBlender::blendCurveToCubicSmoothSegment): |
| (WebCore::SVGPathBlender::blendCurveToQuadraticSegment): |
| (WebCore::SVGPathBlender::blendCurveToQuadraticSmoothSegment): |
| (WebCore::SVGPathBlender::blendArcToSegment): |
| (WebCore::SVGPathBlender::canBlendPaths): |
| (WebCore::SVGPathBlender::blendAnimatedPath): |
| Update to adopt new SVGPathSource interface. Added pullFromSources helper |
| which substantially simplifies pulling from both the from and to source at |
| the same time and is now possible due to all the SVGPathSource functions |
| returning the segment types rather than taking them as out parameters. |
| |
| * svg/SVGPathByteStreamSource.cpp: |
| (WebCore::SVGPathByteStreamSource::nextCommand): |
| (WebCore::SVGPathByteStreamSource::parseSVGSegmentType): |
| (WebCore::SVGPathByteStreamSource::parseMoveToSegment): |
| (WebCore::SVGPathByteStreamSource::parseLineToSegment): |
| (WebCore::SVGPathByteStreamSource::parseLineToHorizontalSegment): |
| (WebCore::SVGPathByteStreamSource::parseLineToVerticalSegment): |
| (WebCore::SVGPathByteStreamSource::parseCurveToCubicSegment): |
| (WebCore::SVGPathByteStreamSource::parseCurveToCubicSmoothSegment): |
| (WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSegment): |
| (WebCore::SVGPathByteStreamSource::parseCurveToQuadraticSmoothSegment): |
| (WebCore::SVGPathByteStreamSource::parseArcToSegment): |
| * svg/SVGPathByteStreamSource.h: |
| Adopt new SVGPathSource interface. |
| |
| * svg/SVGPathParser.cpp: |
| (WebCore::SVGPathParser::parseMoveToSegment): |
| (WebCore::SVGPathParser::parseLineToSegment): |
| (WebCore::SVGPathParser::parseLineToHorizontalSegment): |
| (WebCore::SVGPathParser::parseLineToVerticalSegment): |
| (WebCore::SVGPathParser::parseCurveToCubicSegment): |
| (WebCore::SVGPathParser::parseCurveToCubicSmoothSegment): |
| (WebCore::SVGPathParser::parseCurveToQuadraticSegment): |
| (WebCore::SVGPathParser::parseCurveToQuadraticSmoothSegment): |
| (WebCore::SVGPathParser::parseArcToSegment): |
| (WebCore::SVGPathParser::parsePathData): |
| Adapt to new SVGPathSource interface. Code reads a bit nicer now |
| that we don't have a ton of local variables in each method. Could |
| be made nicer in the future by adopting Segment types in the path |
| consumer code. |
| |
| * svg/SVGPathSegListSource.cpp: |
| (WebCore::SVGPathSegListSource::nextCommand): |
| (WebCore::SVGPathSegListSource::parseSVGSegmentType): |
| (WebCore::SVGPathSegListSource::parseMoveToSegment): |
| (WebCore::SVGPathSegListSource::parseLineToSegment): |
| (WebCore::SVGPathSegListSource::parseLineToHorizontalSegment): |
| (WebCore::SVGPathSegListSource::parseLineToVerticalSegment): |
| (WebCore::SVGPathSegListSource::parseCurveToCubicSegment): |
| (WebCore::SVGPathSegListSource::parseCurveToCubicSmoothSegment): |
| (WebCore::SVGPathSegListSource::parseCurveToQuadraticSegment): |
| (WebCore::SVGPathSegListSource::parseCurveToQuadraticSmoothSegment): |
| (WebCore::SVGPathSegListSource::parseArcToSegment): |
| * svg/SVGPathSegListSource.h: |
| Adopt new SVGPathSource interface. |
| |
| * svg/SVGPathSource.h: |
| Update interface to return Optionals, with a specific type for |
| segment kind that be parsed. |
| |
| * svg/SVGPathStringSource.cpp: |
| (WebCore::nextCommandHelper): |
| (WebCore::SVGPathStringSource::nextCommand): |
| (WebCore::parseSVGSegmentTypeHelper): |
| (WebCore::SVGPathStringSource::parseSVGSegmentType): |
| (WebCore::SVGPathStringSource::parseMoveToSegment): |
| (WebCore::SVGPathStringSource::parseLineToSegment): |
| (WebCore::SVGPathStringSource::parseLineToHorizontalSegment): |
| (WebCore::SVGPathStringSource::parseLineToVerticalSegment): |
| (WebCore::SVGPathStringSource::parseCurveToCubicSegment): |
| (WebCore::SVGPathStringSource::parseCurveToCubicSmoothSegment): |
| (WebCore::SVGPathStringSource::parseCurveToQuadraticSegment): |
| (WebCore::SVGPathStringSource::parseCurveToQuadraticSmoothSegment): |
| (WebCore::SVGPathStringSource::parseArcToSegment): |
| (WebCore::parseArcToSegmentHelper): Deleted. |
| * svg/SVGPathStringSource.h: |
| Adopt new SVGPathSource interface. Replace out of line helpers (or use of things |
| like parseFloatPoint2) with generic lambda helpers, helping to keep the code more |
| localized. |
| |
| * svg/SVGPointList.h: |
| (WebCore::SVGPointList::parse): |
| Adopt Optional based parseNumber. |
| |
| * svg/SVGTransformList.h: |
| * svg/SVGTransformable.cpp: |
| (WebCore::parseTransformParamList): |
| (WebCore::SVGTransformable::parseTransformValue): |
| (WebCore::SVGTransformable::parseAndSkipType): |
| (WebCore::SVGTransformable::parseTransformType): |
| * svg/SVGTransformable.h: |
| Convert parseTransformValue/parseAndSkipType to be Optional based. |
| |
| * svg/SVGViewSpec.cpp: |
| (WebCore::SVGViewSpec::parseViewSpec): |
| Adopt Optional based parseViewBox. |
| |
| * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: |
| Adopt Optional based parseNumber. |
| |
| * svg/properties/SVGPropertyTraits.h: |
| (WebCore::SVGPropertyTraits<float>::fromString): |
| (WebCore::SVGPropertyTraits<float>::parse): |
| (WebCore::SVGPropertyTraits<FloatPoint>::fromString): |
| (WebCore::SVGPropertyTraits<FloatPoint>::parse): |
| (WebCore::SVGPropertyTraits<FloatRect>::fromString): |
| (WebCore::SVGPropertyTraits<FloatRect>::parse): |
| Adopt Optional based parsers. |
| |
| 2020-06-21 Sam Weinig <weinig@apple.com> |
| |
| Convert DateComponents parsing code to use Optional based return values rather than out-parameters |
| https://bugs.webkit.org/show_bug.cgi?id=213440 |
| |
| Reviewed by Darin Adler. |
| |
| Rework DateComponents and Date/Time related InputTypes to use Optional based programming |
| for parsing results. Also take the opportunity to remove unicode upconversion from |
| DateComponent parsing and instead separate UChar and LChar variants via templates. |
| |
| * html/BaseDateAndTimeInputType.cpp: |
| * html/BaseDateAndTimeInputType.h: |
| * html/DateInputType.cpp: |
| * html/DateInputType.h: |
| * html/DateTimeInputType.cpp: |
| * html/DateTimeInputType.h: |
| * html/DateTimeLocalInputType.cpp: |
| * html/DateTimeLocalInputType.h: |
| * html/HTMLInputElement.cpp: |
| * html/HTMLInputElement.h: |
| * html/InputType.cpp: |
| * html/InputType.h: |
| * html/MonthInputType.cpp: |
| * html/MonthInputType.h: |
| * html/TimeInputType.cpp: |
| * html/TimeInputType.h: |
| * html/WeekInputType.cpp: |
| * html/WeekInputType.h: |
| - Removes parseToDateComponentsInternal. No need it and parseToDateComponents. |
| - Makes parseToDateComponents pure virtual. The old code had a default implementations |
| down in InputType, but it had no callers. |
| - Remove iOS vs. non-iOS difference for dateType(). It is now available on InputType |
| on all platforms. |
| - Make setMillisecondToDateComponents and parseToDateComponents return an Optional. |
| |
| * platform/DateComponents.cpp: |
| * platform/DateComponents.h: |
| - Replace member function based interfaces for parsing/setting explicit time offsets |
| with new factory functions that return Optional<DateComponents>. |
| - These factories are implemented using the existing member functions, which are |
| now private. |
| - Make max/min constants constexpr. |
| - Make parse* member functions templates to allow factory parse functions to |
| call them without upconverting. |
| - Replace header guard with #pragma once. |
| |
| 2020-06-21 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] Add basic support for width: fit-content |
| https://bugs.webkit.org/show_bug.cgi?id=213444 |
| |
| Reviewed by Antti Koivisto. |
| |
| At this point this is just a shrink-to-fit sizing (missing the case when the available horizontal space is not specified). |
| |
| Test: fast/layoutformattingcontext/fit-content-width-simple.html |
| |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedWidthValue): |
| |
| 2020-06-21 Jer Noble <jer.noble@apple.com> |
| |
| WebKit fails to leave audio routing arbitration during navigation, closing. |
| https://bugs.webkit.org/show_bug.cgi?id=213426 |
| <rdar://problem/64395051> |
| |
| Reviewed by Eric Carlson. |
| |
| When setting the AudioSession category, make sure to leave routing arbitration before bailing out early. Also, |
| HTMLMediaElement::canProduceAudio() should return `false` when the element's document is suspended or stopped. |
| Otherwise, the AudioSession will continue in the `MediaPlayback` category indefinitely, and routing arbitration |
| will remain active. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::canProduceAudio const): |
| * platform/audio/mac/AudioSessionMac.mm: |
| (WebCore::AudioSession::setCategory): |
| |
| 2020-06-21 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for percentage min/max-width |
| https://bugs.webkit.org/show_bug.cgi?id=213436 |
| |
| Reviewed by Antti Koivisto. |
| |
| 1. The table generates a principal block container box called the table wrapper box that contains the table box itself and any caption boxes. |
| 2. The table wrapper box establishes a block formatting context, and the table box establishes a table formatting context. |
| 3. The computed values of properties 'position', 'float', 'margin-*', 'top', 'right', 'bottom', and 'left' on |
| the table element are used on the table wrapper box and not the table box; all other values of non-inheritable |
| properties are used on the table box and not the table wrapper box. |
| 4. In a block formatting context, each box's left outer edge touches the left edge of the containing block. |
| This is true even in the presence of floats, unless the box establishes a new block formatting context (in which case the |
| box itself may become narrower due to the floats) |
| |
| Now consider the following case: |
| <div style="display: block; width: 500px;"> |
| <div style="float: left; width: 100px;"></div> |
| <div style="display: table; width: 10%;"></div> |
| </div> |
| 1. We create a table wrapper box to wrap the "display: table" block level box (#1). |
| 2. The table wrapper box's width property is set to auto (#3). |
| 3. Since it establishes a new block formatting context, the available horizontal space gets shrunk by the float (#4) |
| 4. The table wrapper box's used width computes to 500px - 100px -> 400px; |
| |
| Now we are inside the BFC established by the table wrapper box and try to resolve the table's width -> %10. |
| According to the normal BFC rules, it should compute to 10% of the containing block's logical width: 400px -> 40px. |
| However in practice it computes to 50px (10% of 500px). |
| |
| Similar setup with non-table content would resolve the inner block level box's width to 40px; |
| <div style="display: block; width: 500px"> |
| <div style="float: left; width: 100px;"></div> |
| <div style="display: block; overflow: hidden;"> |
| <div style="display: block; width: 10%"></div> |
| </div> |
| </div> |
| This needs clarification. |
| |
| Test: fast/layoutformattingcontext/float-avoider-available-horizontal-space3.html |
| |
| * layout/FormattingContext.h: |
| (WebCore::Layout::FormattingContext::isTableWrapperBlockFormattingContext const): |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::layoutInFlowContent): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h: |
| |
| 2020-06-20 Jer Noble <jer.noble@apple.com> |
| |
| RecoveryOS: PAL::getAVPlayerLayerClass() will crash when AVFoundation is missing |
| https://bugs.webkit.org/show_bug.cgi?id=213437 |
| <rdar://problem/64563064> |
| |
| Reviewed by Eric Carlson. |
| |
| Check PAL::isAVFoundationAvailable() before calling PAL::getAVPlayerLayerClass(); |
| |
| * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: |
| (WebCore::VideoLayerManagerObjC::setVideoLayer): |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: |
| (WebCore::PlatformCALayerCocoa::layerTypeForPlatformLayer): |
| (WebCore::PlatformCALayerCocoa::PlatformCALayerCocoa): |
| (WebCore::PlatformCALayerCocoa::clone const): |
| (WebCore::PlatformCALayerCocoa::avPlayerLayer const): |
| |
| 2020-06-20 Simon Fraser <simon.fraser@apple.com> |
| |
| Crash under ScrollController::startSnapRubberbandTimer() firing |
| https://bugs.webkit.org/show_bug.cgi?id=213439 |
| <rdar://problem/63986013> |
| |
| Reviewed by Tim Horton. |
| |
| A wholesale destruction of the ScrollingTree (e.g. via ScrollingCoordinatorMac::pageDestroyed()) never |
| ran the code to stop CFRunLoopTimers in ScrollController, which could lead to this crash. |
| Fix by calling removeAllNodes() in ThreadedScrollingTree::invalidate(). |
| |
| Add an assertion in ScrollController's destructor that stopAllTimers() has been called, and have |
| ScrollAnimator's destructor call stopAllTimers() too. |
| |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::invalidate): |
| * platform/ScrollAnimator.cpp: |
| (WebCore::ScrollAnimator::~ScrollAnimator): |
| * platform/cocoa/ScrollController.h: |
| * platform/cocoa/ScrollController.mm: |
| (WebCore::ScrollController::~ScrollController): |
| (WebCore::ScrollController::stopAllTimers): |
| |
| 2020-06-20 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC][Quirk] Table height needs quirk handling |
| https://bugs.webkit.org/show_bug.cgi?id=213430 |
| |
| Reviewed by Antti Koivisto. |
| |
| In quirks mode the used table height of an empty table is 0, while in standards mode |
| we take the specified value into account and size the table accordingly. |
| |
| Tests: fast/layoutformattingcontext/empty-table-with-specified-height-quirk-simple.html |
| fast/layoutformattingcontext/empty-table-with-specified-height-standards-simple.html |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * layout/FormattingContext.h: |
| * layout/blockformatting/BlockFormattingContext.h: |
| (WebCore::Layout::BlockFormattingContext::Quirks::geometry const): |
| * layout/blockformatting/BlockFormattingContextQuirks.cpp: |
| (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeHeightAndMarginForTableBox): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::Quirks::Quirks): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContextQuirks.cpp: Copied from Source/WebCore/layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h. |
| (WebCore::Layout::TableWrapperBlockFormattingContext::Quirks::usedTableHeight const): |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| [Cocoa] Delay issuing ManagedSession & Network Extension sandbox extensions until a load is actually issued |
| https://bugs.webkit.org/show_bug.cgi?id=213414 |
| <rdar://problem/64548684> |
| |
| Reviewed by Per Arne Vollan. |
| |
| setHasConsumedSandboxExtensions() can now get called several times, every time a WebPage is created. |
| Once a sandbox extension has been consumed, there is no going back so return early if the state is |
| already "Consumed". |
| |
| * platform/cocoa/NetworkExtensionContentFilter.mm: |
| (WebCore::NetworkExtensionContentFilter::setHasConsumedSandboxExtensions): |
| * platform/cocoa/ParentalControlsContentFilter.mm: |
| (WebCore::ParentalControlsContentFilter::setHasConsumedSandboxExtension): |
| |
| 2020-06-19 Zalan Bujtas <zalan@apple.com> |
| |
| [AutoSizing] Resolve viewport units against the preferred content size |
| https://bugs.webkit.org/show_bug.cgi?id=213408 |
| <rdar://problem/64267539> |
| |
| Reviewed by Tim Horton. |
| |
| Instead of resolving the viewport units against the maximum content size constraints, let's use the preferred content size. |
| It ensures that content with vw, vh units does not grow beyond the preferred content size. |
| |
| Test: fast/dynamic/size-to-content-autosize-with-viewport-units.html |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::performSizeToContentAutoSize): |
| (WebCore::FrameView::enableAutoSizeMode): Let's "ignore" viewport units during the initial |
| pass and use the preferred width to finalize the vw vh unit values (we don't really ignore them, but they are resolved against a [ 1, 1 ] viewport). |
| This approach fails if the main content has 100vw with overflow hidden. Such content would end up with a [ 1, 1 ] size (we might want to detect it |
| and resolved the values against the horizontal constraint). |
| (WebCore::FrameView::overrideViewportWidthForCSSViewportUnits): |
| (WebCore::FrameView::resetOverriddenViewportWidthForCSSViewportUnits): |
| * page/FrameView.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::enableSizeToContentAutoSizeMode): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-19 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] Move progress bar painting code off of Carbon API |
| https://bugs.webkit.org/show_bug.cgi?id=213405 |
| <rdar://problem/63958537> |
| |
| Reviewed by Tim Horton. |
| |
| Adopts CoreUI constants and AppKit SPI (`-[NSAppearance _drawInRect:context:options:]`) when painting progress |
| elements. This is being done in light of recent changes around how `HIThemeDrawTrack` draws progress bars on |
| recent versions of macOS; it has been recommended to us that we move away from using Carbon, and instead use |
| AppKit. |
| |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::paintProgressBar): |
| |
| The `NSControlSize` to `CUISize` mapping here looks counterintuitive, but matches our current behavior. This is |
| because `kThemeLargeProgressBar` and `kThemeLargeIndeterminateBar` both map to `kCUISizeRegular`, while |
| `kThemeMediumIndeterminateBar` and `kThemeMediumProgressBar` map to `kCUISizeSmall`. |
| |
| 2020-06-19 Clark Wang <clark_wang@apple.com> |
| |
| Remove setVelocity() from PannerNode |
| https://bugs.webkit.org/show_bug.cgi?id=213360 |
| |
| Reviewed by Chris Dumez. |
| |
| Removed setVelocity() and other velocity dependencies, as per spec: https://www.w3.org/TR/webaudio/#pannernode. |
| Simplified dopplerRate, since sourceVelocity is always zero. |
| |
| Re-baselined previous test that now passes with velocity removed. |
| |
| * Modules/webaudio/PannerNode.cpp: |
| (WebCore::PannerNode::PannerNode): |
| (WebCore::PannerNode::dopplerRate): |
| * Modules/webaudio/PannerNode.h: |
| * Modules/webaudio/PannerNode.idl: |
| |
| 2020-06-19 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| REGRESSION (r263253): Search field results and cancel buttons have their own focus rings |
| https://bugs.webkit.org/show_bug.cgi?id=213413 |
| <rdar://problem/64548419> |
| |
| Reviewed by Tim Horton. |
| |
| After r263253, `paintCellAndSetFocusedElementNeedsRepaintIfNecessary` is used when painting the buttons in a |
| search field's shadow root. However, the renderer that is passed in (which is used to determine whether we |
| should additionally draw focus rings) is the input element's renderer rather than the renderers of the results |
| and cancel buttons themselves. This means that when the search field is focused, we will draw focus rings around |
| each of the buttons in the shadow root as well. |
| |
| Address this by using `box` (the buttons' RenderBoxes) instead. |
| |
| Test: fast/forms/search-field-buttons-do-not-have-focus-rings.html |
| |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::paintSearchFieldCancelButton): |
| (WebCore::RenderThemeMac::paintSearchFieldResultsButton): |
| |
| 2020-06-19 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Crash in WebCore::Range::borderAndTextRects |
| https://bugs.webkit.org/show_bug.cgi?id=209379 |
| |
| Reviewed by Darin Adler. |
| |
| When a parentless node is moved to a new document, then all ranges associated with this node and its children also should |
| be updated with new document information. |
| |
| Test woould be submitted later. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::parentlessNodeMoveToNewDocument): |
| * dom/Document.h: |
| * dom/Node.cpp: |
| (WebCore::Node::moveNodeToNewDocument): |
| * dom/Range.cpp: |
| (WebCore::Range::parentlessNodeMoveToNewDocumentAffectsRange): |
| (WebCore::Range::updateRangeForParentlessNodeMoveToNewDocument): |
| * dom/Range.h: |
| |
| 2020-06-19 Truitt Savell <tsavell@apple.com> |
| |
| Unreviewed, reverting r263121. |
| |
| Broke media/video-fullscreen-only-playback.html on Catalina |
| Debug |
| |
| Reverted changeset: |
| |
| "Don't claim to support fullscreen mode unless |
| fullScreenEnabled setting is enabled" |
| https://bugs.webkit.org/show_bug.cgi?id=213142 |
| https://trac.webkit.org/changeset/263121 |
| |
| 2020-06-19 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| [CG] REGRESSION (r256892): Luminance SVG mask is not applied when accelerated drawing is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=213403 |
| <rdar://problem/64489419> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: svg/masking/mask-css-luminance.html |
| |
| If the ImageBuffer is backed by an IOSurface, its context has to be flushed |
| out before convertToLuminanceMask() can access its data. |
| |
| * platform/graphics/ConcreteImageBuffer.h: |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Avoid initializing RenderTheme singleton unnecessarily in the UIProcess |
| https://bugs.webkit.org/show_bug.cgi?id=213406 |
| |
| Reviewed by Per Arne Vollan. |
| |
| Avoid initializing RenderTheme singleton unnecessarily in the UIProcess. Instead, introduce |
| a static function to get the focus ring color on iOS. |
| |
| * rendering/RenderThemeIOS.h: |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::systemFocusRingColor): |
| (WebCore::RenderThemeIOS::platformFocusRingColor const): |
| |
| 2020-06-19 Andres Gonzalez <andresg_22@apple.com> |
| |
| AX: web process crash in AXObjectCache::postNotification. |
| https://bugs.webkit.org/show_bug.cgi?id=213398 |
| |
| Reviewed by Chris Fleizach. |
| |
| AXObjectCache was being instantiated on the AX secondary thread. |
| Therefore the timers for the different delayed notifications where |
| initialized with the secondary thread. When postNotification was triggered |
| on the main thread as it should, and the timer was accessed, the timer |
| would assert/crash for being accessed in a thread different than where |
| it was created. This change guaranties that AXObjectCache is always |
| created on the main thread. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::enableAccessibility): |
| (WebCore::AXObjectCache::AXObjectCache): |
| (WebCore::AXObjectCache::postNotification): |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] RenderThemeIOS::cssValueToSystemColorMap() does an unnecessary linear search under systemColorFromCSSValueID() |
| https://bugs.webkit.org/show_bug.cgi?id=213396 |
| |
| Reviewed by Timothy Hatcher. |
| |
| RenderThemeIOS::cssValueToSystemColorMap() does an unnecessary linear search under systemColorFromCSSValueID(). |
| cssValueToSystemColorMap() already has the selector, yet it passes a CSSValueID to systemColorFromCSSValueID() which |
| then does a linear search to match the CSSValueID to a selector. This was very inefficient / unfortunate. |
| |
| This patch introduces a systemColorFromCSSValueIDSelector() which takes in a selector instead of a CSSValueID. I have |
| also moved the constructor of the LocalCurrentTraitCollection variable to the call site so that we don't keep |
| constructing / destroying it for each loop iteration. The traces show us spending a lot of time in its constructor / |
| destructor. |
| |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::systemColorFromCSSValueIDSelector): |
| (WebCore::RenderThemeIOS::cssValueToSystemColorMap): |
| |
| 2020-06-19 James Darpinian <jdarpinian@chromium.org> |
| |
| [WebGL2] Uniform Buffer Objects |
| https://bugs.webkit.org/show_bug.cgi?id=209518 |
| |
| Reviewed by Dean Jackson. |
| |
| All uniform buffer object conformance tests pass. |
| |
| Implemented Uniform Buffer Object related functions: |
| bindBufferBase, bindBufferRange, getUniformIndices, getActiveUniforms, getUniformBlockIndex, |
| getActiveUniformBlockParameter, getActiveUniformBlockName, uniformBlockBinding |
| |
| Additionally, fixed many tangentially related issues: |
| getIntegeri_v and getInteger64i_v were not present. |
| drawArraysInstances and drawElementsInstanced did not work for WebGL 2. |
| drawRangeElements was not implemented. |
| WebGLAny did not support Vector<unsigned>, so Uint32Arrays could not be returned from WebGL functions. |
| The maximum uniform location length was wrong for WebGL 2. |
| Transform feedback indexed binding points weren't being tracked. |
| Some functions in ExtensionsGLANGLE didn't call makeContextCurrent. |
| New WebGL 2 buffer usage types COPY and READ weren't supported in bufferData. |
| pause/resumeTransformFeedback were unimplemented. |
| getParameter(READ_BUFFER) was unimplemented. |
| readBuffer conformance test was incorrect. |
| |
| * bindings/js/JSDOMConvertWebGL.cpp: |
| (WebCore::convertToJSValue): |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::~WebGL2RenderingContext): |
| (WebCore::WebGL2RenderingContext::initializeNewContext): |
| (WebCore::WebGL2RenderingContext::drawRangeElements): |
| (WebCore::WebGL2RenderingContext::setIndexedBufferBinding): |
| (WebCore::WebGL2RenderingContext::bindBufferBase): |
| (WebCore::WebGL2RenderingContext::bindBufferRange): |
| (WebCore::WebGL2RenderingContext::getIndexedParameter): |
| (WebCore::WebGL2RenderingContext::getUniformIndices): |
| (WebCore::WebGL2RenderingContext::getActiveUniforms): |
| (WebCore::WebGL2RenderingContext::getUniformBlockIndex): |
| (WebCore::WebGL2RenderingContext::getActiveUniformBlockParameter): |
| (WebCore::WebGL2RenderingContext::getActiveUniformBlockName): |
| (WebCore::WebGL2RenderingContext::uniformBlockBinding): |
| * html/canvas/WebGL2RenderingContext.h: |
| * html/canvas/WebGLAny.h: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::validateLocationLength): |
| (WebCore::WebGLRenderingContextBase::validateBufferDataParameters): |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::didFinishLoading): |
| * platform/graphics/GraphicsContextGL.h: |
| * platform/graphics/angle/ExtensionsGLANGLE.cpp: |
| (WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE): |
| (WebCore::ExtensionsGLANGLE::blitFramebuffer): |
| (WebCore::ExtensionsGLANGLE::renderbufferStorageMultisample): |
| (WebCore::ExtensionsGLANGLE::drawBuffersEXT): |
| (WebCore::ExtensionsGLANGLE::getBooleanvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getBufferParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getFloatvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getFramebufferAttachmentParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getIntegervRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getProgramivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getRenderbufferParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getShaderivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getTexParameterfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getTexParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getUniformfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getUniformivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getVertexAttribfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getVertexAttribivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getVertexAttribPointervRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::readPixelsRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texImage2DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texParameterfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texSubImage2DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::compressedTexImage2DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::compressedTexSubImage2DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::compressedTexImage3DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::compressedTexSubImage3DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texImage3DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texSubImage3DRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getQueryivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getQueryObjectuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getBufferPointervRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getIntegeri_vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getInternalformativRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getVertexAttribIivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getVertexAttribIuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getActiveUniformBlockivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getInteger64vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getInteger64i_vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getBufferParameteri64vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::samplerParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::samplerParameterfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getSamplerParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getSamplerParameterfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getFramebufferParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getProgramInterfaceivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getBooleani_vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getMultisamplefvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getPointervRobustANGLERobustANGLE): |
| (WebCore::ExtensionsGLANGLE::readnPixelsRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texParameterIivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::texParameterIuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getTexParameterIivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getTexParameterIuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::samplerParameterIivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::samplerParameterIuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getSamplerParameterIivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getSamplerParameterIuivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getQueryObjectivRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getQueryObjecti64vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getQueryObjectui64vRobustANGLE): |
| * platform/graphics/angle/GraphicsContextGLANGLE.cpp: |
| (WebCore::GraphicsContextGLOpenGL::getIntegeri_v): |
| (WebCore::GraphicsContextGLOpenGL::getInteger64v): |
| (WebCore::GraphicsContextGLOpenGL::getInteger64i_v): |
| (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): |
| (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): |
| (WebCore::GraphicsContextGLOpenGL::getUniformBlockIndex): |
| (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockiv): |
| (WebCore::GraphicsContextGLOpenGL::getActiveUniformBlockName): |
| (WebCore::GraphicsContextGLOpenGL::uniformBlockBinding): |
| (WebCore::GraphicsContextGLOpenGL::drawRangeElements): |
| (WebCore::GraphicsContextGLOpenGL::pauseTransformFeedback): |
| (WebCore::GraphicsContextGLOpenGL::resumeTransformFeedback): |
| (WebCore::GraphicsContextGLOpenGL::bindBufferRange): |
| (WebCore::GraphicsContextGLOpenGL::getUniformIndices): |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.h: |
| * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: |
| (WebCore::GraphicsContextGLOpenGL::getIntegeri_v): |
| * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: |
| (WebCore::GraphicsContextGLOpenGL::getInteger64v): |
| (WebCore::GraphicsContextGLOpenGL::getInteger64i_v): |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Drop std::call_once() from RenderThemeIOS::cssValueToSystemColorMap() |
| https://bugs.webkit.org/show_bug.cgi?id=213392 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Drop std::call_once() from RenderThemeIOS::cssValueToSystemColorMap() since this function |
| is always called from the main thread. |
| |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::cssValueToSystemColorMap): |
| |
| 2020-06-19 Rob Buis <rbuis@igalia.com> |
| |
| Enable referrer policy attribute support by default |
| https://bugs.webkit.org/show_bug.cgi?id=213285 |
| |
| Reviewed by Youenn Fablet. |
| |
| Enable referrer policy attribute support by default by flipping the switch. |
| |
| * page/RuntimeEnabledFeatures.h: |
| |
| 2020-06-19 Chris Dumez <cdumez@apple.com> |
| |
| Move Prefixed WebAudio interfaces behind their own feature flag |
| https://bugs.webkit.org/show_bug.cgi?id=213356 |
| |
| Reviewed by Darin Adler. |
| |
| Move Prefixed WebAudio interfaces behind their own feature flag, on by default. This will |
| allow us to easily disable the prefixed API and will also allow it to live independently |
| from the unprefixed API. |
| |
| * Modules/webaudio/AudioContext.idl: |
| * Modules/webaudio/WebKitAudioContext.idl: |
| * Modules/webaudio/WebKitAudioPannerNode.idl: |
| * Modules/webaudio/WebKitOfflineAudioContext.idl: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * page/Settings.yaml: |
| |
| 2020-06-19 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Do not special-case empty tables |
| https://bugs.webkit.org/show_bug.cgi?id=213378 |
| |
| Reviewed by Antti Koivisto. |
| |
| Now that min/max-width support is added, empty tables can just go through the normal width computation path. |
| |
| Test: fast/layoutformattingcontext/table-min-max-width-empty-content-simple.html |
| |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox): |
| |
| 2020-06-10 Sergio Villar Senin <svillar@igalia.com> |
| |
| REGRESSION(r262254?): [WPE] imported/w3c/web-platform-tests/webxr/idlharness.https.window.html is failing |
| https://bugs.webkit.org/show_bug.cgi?id=212897 |
| |
| Reviewed by Youenn Fablet. |
| |
| WPT tests were updated in r262254 and they already include the latest changes in the specs. Among others the |
| XR interface was renamed to XRSystem. We were already using that name in the C++ code but not in the JS interface. |
| The WPT update brings in another set of changes like the new XRLayer which is already not supported (I am |
| adding it soon in another patch). Last but not least, the new tests include checks for the XRPermissionStatus interface |
| which is not going to be implemented soon as it requires the Permission API which is not supported in WebKit yet. All in |
| all, this patch renames XR to XRSystem and marks as failing the XRLayer (temporarily) and XRPermissionStatus checks. |
| |
| No new tests as there is no change in functionality. |
| |
| * Modules/webxr/WebXRSystem.idl: Rename XR to XRSystem. |
| * bindings/js/WebCoreBuiltinNames.h: Ditto. |
| |
| 2020-06-19 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][BFC] Min/max-width should always be resolved against the containing block width |
| https://bugs.webkit.org/show_bug.cgi?id=213365 |
| |
| Reviewed by Antti Koivisto. |
| |
| Even when neighboring floats shrink the available horizontal space, the min/max(normal) widths should |
| be resolved against the containing block's logical width. |
| |
| Test: fast/layoutformattingcontext/float-avoider-available-horizontal-space2.html |
| |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin): |
| * layout/blockformatting/BlockFormattingContext.h: |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::computedWidthAndMargin): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox): |
| |
| 2020-06-10 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] unsigned long in IDL should be translated as unsigned in C++ code |
| https://bugs.webkit.org/show_bug.cgi?id=213020 |
| |
| Reviewed by Darin Adler. |
| |
| The "unsigned long" type definition in IDL must be translated to unsigned in C++ code. |
| |
| I'm also replacing the very long XRFrameRequestCallback::Identifier by simply unsigned as it |
| isn't adding anything. |
| |
| No new test required as there is no change in functionality, just removing an alias. |
| |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::requestAnimationFrame): |
| (WebCore::WebXRSession::cancelAnimationFrame): |
| * Modules/webxr/WebXRSession.h: |
| * Modules/webxr/XRFrameRequestCallback.h: |
| (WebCore::XRFrameRequestCallback::callbackId): |
| (WebCore::XRFrameRequestCallback::setCallbackId): |
| |
| 2020-06-19 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] Unify "font:" CSS shorthand values between macOS and iOS family |
| https://bugs.webkit.org/show_bug.cgi?id=213332 |
| <rdar://problem/64479189> |
| |
| Reviewed by Tim Horton and Darin Adler. |
| |
| They exist on all Cocoa platforms, so we might as well hook them up. |
| |
| This unifies the shorthand CSS value handling from RenderThemeMac and |
| RenderThemeIOS into RenderThemeCocoa. This has two effects: |
| |
| - It hooks up the -apple-system keywords on macOS (they previously were |
| only implemented for the iOS family). |
| - It hooks up the CSS2 keywords (caption, menu, etc.) on the iOS family |
| (they previously were only implemented on Mac). |
| |
| All these fonts have been around since Mojave, so there is no need to |
| introduce any new platform guards. |
| |
| Tests: fast/text/text-styles/-apple-system/-apple-system-body.html |
| fast/text/text-styles/-apple-system/-apple-system-caption1.html |
| fast/text/text-styles/-apple-system/-apple-system-caption2.html |
| fast/text/text-styles/-apple-system/-apple-system-footnote.html |
| fast/text/text-styles/-apple-system/-apple-system-headline.html |
| fast/text/text-styles/-apple-system/-apple-system-short-body.html |
| fast/text/text-styles/-apple-system/-apple-system-short-caption1.html |
| fast/text/text-styles/-apple-system/-apple-system-short-footnote.html |
| fast/text/text-styles/-apple-system/-apple-system-short-headline.html |
| fast/text/text-styles/-apple-system/-apple-system-short-subheadline.html |
| fast/text/text-styles/-apple-system/-apple-system-subheadline.html |
| fast/text/text-styles/-apple-system/-apple-system-tall-body.html |
| fast/text/text-styles/-apple-system/-apple-system-title0.html |
| fast/text/text-styles/-apple-system/-apple-system-title1.html |
| fast/text/text-styles/-apple-system/-apple-system-title2.html |
| fast/text/text-styles/-apple-system/-apple-system-title3.html |
| fast/text/text-styles/-apple-system/-apple-system-title4.html |
| fast/text/text-styles/-webkit-control.html |
| fast/text/text-styles/-webkit-mini-control.html |
| fast/text/text-styles/-webkit-small-control.html |
| fast/text/text-styles/bogus.html |
| fast/text/text-styles/caption.html |
| fast/text/text-styles/icon.html |
| fast/text/text-styles/menu.html |
| fast/text/text-styles/message-box.html |
| fast/text/text-styles/small-caption.html |
| fast/text/text-styles/status-bar.html |
| |
| * css/CSSValueKeywords.in: All Cocoa ports should be able to parse these values |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::fontWithFamilySpecialCase): Move code that used to be in the Mac and |
| iOS implementations of platformFontWithFamilySpecialCase() (inside FontCacheMac.mm |
| and FontCacheIOS.mm) to be shared to be shared inside fontWithFamilySpecialCase(). |
| * platform/graphics/cocoa/FontDescriptionCocoa.cpp: Remove platform guards. |
| (WebCore::convertArray): |
| (WebCore::matchSystemFontUse): |
| * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: Ditto. |
| (WebCore::SystemFontDatabaseCoreText::createTextStyleFont): |
| * platform/graphics/ios/FontCacheIOS.mm: Move code from here into FontCacheCoreText. |
| (WebCore::platformFontWithFamilySpecialCase): |
| * platform/graphics/mac/FontCacheMac.mm: Ditto. |
| (WebCore::platformFontWithFamilySpecialCase): |
| * platform/mac/ThemeMac.h: Delete systemFontSizeFor(NSControlSize) because |
| <rdar://problem/60350699> is fixed. |
| * platform/mac/ThemeMac.mm: Ditto. |
| (WebCore::ThemeMac::controlFont const): |
| (WebCore::ThemeMac::systemFontSizeFor): Deleted. |
| * rendering/RenderThemeCocoa.h: Previously, code was calling |
| RenderThemeIOS::contentSizeCategory(), which was a static function. Now, both Mac |
| and iOS need to be able to call this. However, the implementation of this function |
| is different between Mac and iOS. So, turn it from a static function in RenderThemeIOS |
| into a method in RenderThemeCocoa, and give RenderThemeCocoa a singleton() function |
| that downcasts the return of RenderTheme::singleton(). This way, instead of calling |
| RenderThemeIOS::contentSizeCategory(), code can call |
| RenderThemeCocoa::singleton().contentSizeCategory(). |
| * rendering/RenderThemeCocoa.mm: Move code from RenderThemeIOS and RenderThemeMac |
| into RenderThemeCocoa. |
| (WebCore::RenderThemeCocoa::singleton): |
| (WebCore::RenderThemeCocoa::cachedSystemFontDescription const): |
| (WebCore::cssWeightOfSystemFont): |
| (WebCore::RenderThemeCocoa::updateCachedSystemFontDescription const): |
| * rendering/RenderThemeIOS.h: Ditto. |
| * rendering/RenderThemeIOS.mm: Ditto. |
| (WebCore::RenderThemeIOS::contentSizeCategory const): |
| (WebCore::attachmentActionFont): |
| (WebCore::attachmentTitleFont): |
| (WebCore::RenderThemeIOS::contentSizeCategory): Deleted. |
| (WebCore::RenderThemeIOS::cachedSystemFontDescription const): Deleted. |
| (WebCore::cssWeightOfSystemFont): Deleted. |
| (WebCore::RenderThemeIOS::updateCachedSystemFontDescription const): Deleted. |
| * rendering/RenderThemeMac.h: Ditto. |
| * rendering/RenderThemeMac.mm: Ditto. |
| (WebCore::RenderThemeMac::contentSizeCategory const): |
| (WebCore::RenderThemeMac::setFontFromControlSize const): |
| (WebCore::RenderThemeMac::controlSizeForSystemFont const): |
| (WebCore::toFontWeight): Deleted. |
| (WebCore::RenderThemeMac::updateCachedSystemFontDescription const): Deleted. |
| |
| 2020-06-18 Doug Kelly <dougk@apple.com> |
| |
| Use paintCellAndSetFocusedElementNeedsRepaintIfNecessary() for search field buttons |
| https://bugs.webkit.org/show_bug.cgi?id=213352 |
| <rdar://problem/57129008> |
| |
| Reviewed by Simon Fraser. |
| |
| The search fields cancel and results buttons should use the common |
| paintCellAndSetFocusedElementNeedsRepaintIfNecessary() function instead of directly painting the cell. |
| This allows for an image buffer to be used for drawing specifically in cases when it becomes needed, |
| when a scale (either via zoom or CSS transform) is applied. |
| |
| This also moves the logic for determining if an image buffer should be used into |
| ThemeMac::drawCellOrFocusRingWithViewIntoContext(), which uses the current user-defined CTM |
| (inverting the base CTM to negate the effect of a device-specific scale factor). This also negates |
| the need for the page scale factor and the effective zoom applied to the renderer style, since it is |
| computed into the CTM already. |
| |
| * platform/mac/ThemeMac.h: |
| * platform/mac/ThemeMac.mm: |
| (WebCore::paintToggleButton): |
| (WebCore::paintButton): |
| (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): |
| (WebCore::paintColorWell): |
| (WebCore::ThemeMac::paint): |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): |
| (WebCore::RenderThemeMac::paintSliderThumb): |
| (WebCore::RenderThemeMac::paintSearchFieldCancelButton): |
| (WebCore::RenderThemeMac::paintSearchFieldResultsButton): |
| |
| 2020-06-18 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: ASSERTION FAILED: decodedLength >= dataLength at WebCore::NetworkResourcesData::ResourceData::decodeDataToContent() |
| https://bugs.webkit.org/show_bug.cgi?id=213271 |
| <rdar://problem/64168350> |
| |
| Reviewed by Brian Burg. |
| |
| Remove the invalid `ASSERT(decodedLength >= dataLength)` as it's very possible for decoded |
| content to be smaller than encoded content (e.g. something gzipped). |
| |
| Use `String::sizeInBytes` instead of `StringImpl::sizeInBytes` as the latter also includes |
| `sizeof(*this)`, which is not really part of the resource's size, as it's really more of an |
| implementation detail. |
| |
| * inspector/NetworkResourcesData.h: |
| * inspector/NetworkResourcesData.cpp: |
| (WebCore::NetworkResourcesData::ResourceData::removeContent): |
| (WebCore::NetworkResourcesData::ResourceData::decodeDataToContent): |
| (WebCore::NetworkResourcesData::setResourceContent): |
| (WebCore::NetworkResourcesData::maybeDecodeDataToContent): |
| (WebCore::contentSizeInBytes): Deleted. |
| |
| 2020-06-18 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Fix a log message typo in PaymentCoordinator::didAuthorizePayment |
| |
| Rubber-stamped by Beth Dakin. |
| |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::didAuthorizePayment): Logged the correct function name. |
| |
| 2020-06-18 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][BFC] Available space computation for the float avoider needs coordinate mapping |
| https://bugs.webkit.org/show_bug.cgi?id=213339 |
| |
| Reviewed by Antti Koivisto. |
| |
| The FloatConstraints position values are in formatting root coordinates but the available space |
| requires containing block coordinates. |
| |
| Test: fast/layoutformattingcontext/float-avoider-available-horizontal-space.html |
| |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::usedAvailableWidthForFloatAvoider): |
| |
| 2020-06-18 Stephan Szabo <stephan.szabo@sony.com> |
| |
| [PlayStation] Build fix for errors with structured bindings to const structure |
| https://bugs.webkit.org/show_bug.cgi?id=213323 |
| |
| Reviewed by Fujii Hironori. |
| |
| Our system seems to have trouble with these structured bindings, |
| similar to what was previously seen for clang-cl. |
| |
| No new tests, build fix. |
| |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| |
| 2020-06-18 Youenn Fablet <youenn@apple.com> |
| |
| REGRESSION (r263098): [Win10] http/tests/security/cross-origin-clean-css-resource-timing.html and http/tests/security/cross-origin-css-resource-timing.html are failing |
| https://bugs.webkit.org/show_bug.cgi?id=213303 |
| <rdar://problem/64452203> |
| |
| Reviewed by Alex Christensen. |
| |
| Covered by existing tests. |
| |
| * loader/ResourceLoaderOptions.h: |
| Reverting part of https://trac.webkit.org/changeset/263098/webkit that might have broken win10 bots. |
| |
| 2020-06-18 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> |
| |
| [GStreamer] Avoid setting GstContext twice in GLVideoSinkGStreamer |
| https://bugs.webkit.org/show_bug.cgi?id=213029 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| There is a reported issued in GStrearGL < 1.17 for GLBaseFilter |
| can't handle its GLContext and Display reassignation. This patch |
| aims to to avoid setting Display or GL Context in GL video sink |
| multiple times by checking if the video sink bin already has those |
| contexts. |
| |
| Also, instead of relying on an assert if something goes wrong at |
| fetching the GL parameters, it returns an error at state change. |
| |
| No new tests required. |
| |
| * platform/graphics/gstreamer/GLVideoSinkGStreamer.cpp: |
| (requestGLContext): |
| (setGLContext): new function. |
| (webKitGLVideoSinkChangeState): |
| |
| 2020-06-18 Doug Kelly <dougk@apple.com> |
| |
| Clamp text run width to zero |
| https://bugs.webkit.org/show_bug.cgi?id=212655 |
| <rdar://problem/61462335> |
| |
| Reviewed by Said Abou-Hallawa. |
| |
| It's possible to end up with a text run with negative width, if the text run is relatively short |
| and the character spacing is relatively large (but negative). If this occurs, clamp the value to |
| zero. This also adds additional asserts and checks to ensure the value remains non-negative. |
| |
| * platform/graphics/cg/GraphicsContextCG.cpp: |
| (WebCore::GraphicsContext::drawLinesForText): |
| * rendering/ComplexLineLayout.cpp: |
| (WebCore::setLogicalWidthForTextRun): |
| * rendering/RenderText.cpp: |
| (WebCore::RenderText::width const): |
| |
| 2020-06-18 David Kilzer <ddkilzer@apple.com> |
| |
| Fix misspellings of "namespace" in comments |
| |
| * page/SpatialNavigation.h: |
| * platform/gtk/RenderThemeScrollbar.cpp: |
| |
| 2020-06-18 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] OptionSet<> values should be validated |
| <https://webkit.org/b/213199> |
| <rdar://problem/64369963> |
| |
| Reviewed by Anders Carlsson. |
| |
| Summary: |
| - Add WTF::EnumTraits<> for all OptionSet<> enums. |
| - Specify unsigned backing types for enum classes. |
| |
| * loader/CrossOriginAccessControl.h: |
| * page/ActivityState.h: |
| * page/AutoplayEvent.h: |
| * page/CrossSiteNavigationDataTransfer.h: |
| * page/LayoutMilestone.h: |
| * page/TextIndicator.h: |
| * platform/PlatformEvent.h: |
| * platform/graphics/GraphicsContext.h: |
| |
| 2020-06-17 Clark Wang <clark_wang@apple.com> |
| |
| Added missing orientation attributes to PannerNode |
| https://bugs.webkit.org/show_bug.cgi?id=213301 |
| |
| Reviewed by Chris Dumez. |
| |
| Implemented orientation attributes in PannerNode interface, as per spec: https://www.w3.org/TR/webaudio/#pannernode. |
| Added FIXME comments for removing velocity later. |
| |
| Re-baselined previous tests that now have passing test cases. |
| |
| * Modules/webaudio/PannerNode.cpp: |
| (WebCore::PannerNode::PannerNode): |
| (WebCore::PannerNode::orientation const): |
| (WebCore::PannerNode::setOrientation): |
| (WebCore::PannerNode::distanceConeGain): |
| * Modules/webaudio/PannerNode.h: |
| * Modules/webaudio/PannerNode.idl: |
| |
| 2020-06-17 Chris Dumez <cdumez@apple.com> |
| |
| Add experimental feature flag for modern & unprefixed WebAudio API |
| https://bugs.webkit.org/show_bug.cgi?id=213268 |
| |
| Reviewed by Jer Noble. |
| |
| Add experimental feature flag for modern & unprefixed WebAudio API, |
| off by default. |
| |
| This patch split the AudioContext, OfflineAudioContext and PannerNode |
| IDL interfaces into their prefixed and unprefixed versions. The |
| unprefixed versions are behind the new experimental feature flag that |
| is currently off by default but automatically gets turned on in the |
| context of layout tests. |
| |
| This will give us more flexibility when working on the modern and |
| unprefixed WebAudio API as we will not have to worry about backward |
| compatibility. This also allows us to easily turn it on or off via |
| the experimental features menu in Safari. |
| |
| No new tests, rebaselined existing tests. |
| |
| * CMakeLists.txt: |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Modules/webaudio/AnalyserNode.cpp: |
| (WebCore::AnalyserNode::AnalyserNode): |
| * Modules/webaudio/AnalyserNode.h: |
| * Modules/webaudio/AudioBasicInspectorNode.cpp: |
| (WebCore::AudioBasicInspectorNode::AudioBasicInspectorNode): |
| * Modules/webaudio/AudioBasicInspectorNode.h: |
| * Modules/webaudio/AudioBasicProcessorNode.cpp: |
| (WebCore::AudioBasicProcessorNode::AudioBasicProcessorNode): |
| * Modules/webaudio/AudioBasicProcessorNode.h: |
| * Modules/webaudio/AudioBufferSourceNode.cpp: |
| (WebCore::AudioBufferSourceNode::create): |
| (WebCore::AudioBufferSourceNode::AudioBufferSourceNode): |
| (WebCore::AudioBufferSourceNode::setBuffer): |
| (WebCore::AudioBufferSourceNode::setPannerNode): |
| * Modules/webaudio/AudioBufferSourceNode.h: |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::AudioContextBase::AudioContextBase): |
| (WebCore::AudioContext::AudioContext): |
| (WebCore::AudioContextBase::document const): |
| (WebCore::AudioContextBase::scriptExecutionContext const): |
| * Modules/webaudio/AudioContext.h: |
| (WebCore::AudioContextBase::AutoLocker::AutoLocker): |
| (WebCore::AudioContextBase::AutoLocker::~AutoLocker): |
| (WebCore::AudioContext::maxNumberOfChannels): |
| (isType): |
| * Modules/webaudio/AudioContext.idl: |
| * Modules/webaudio/AudioContextState.h: Copied from Source/WebCore/Modules/webaudio/OfflineAudioContext.idl. |
| * Modules/webaudio/AudioContextState.idl: Copied from Source/WebCore/Modules/webaudio/OfflineAudioContext.idl. |
| * Modules/webaudio/AudioDestinationNode.cpp: |
| (WebCore::AudioDestinationNode::AudioDestinationNode): |
| * Modules/webaudio/AudioDestinationNode.h: |
| * Modules/webaudio/AudioNode.cpp: |
| (WebCore::AudioNode::AudioNode): |
| (WebCore::AudioNode::connect): |
| (WebCore::AudioNode::disconnect): |
| (WebCore::AudioNode::setChannelCount): |
| (WebCore::AudioNode::setChannelCountMode): |
| (WebCore::AudioNode::setChannelInterpretation): |
| (WebCore::AudioNode::enableOutputsIfNecessary): |
| (WebCore::AudioNode::deref): |
| (WebCore::AudioNode::contextForBindings const): |
| * Modules/webaudio/AudioNode.h: |
| (WebCore::AudioNode::context): |
| (WebCore::AudioNode::context const): |
| * Modules/webaudio/AudioNode.idl: |
| * Modules/webaudio/AudioNodeOutput.h: |
| (WebCore::AudioNodeOutput::context): |
| * Modules/webaudio/AudioParam.cpp: |
| (WebCore::AudioParam::AudioParam): |
| * Modules/webaudio/AudioParam.h: |
| * Modules/webaudio/AudioParamTimeline.cpp: |
| (WebCore::AudioParamTimeline::valueForContextTime): |
| * Modules/webaudio/AudioParamTimeline.h: |
| * Modules/webaudio/AudioScheduledSourceNode.cpp: |
| (WebCore::AudioScheduledSourceNode::AudioScheduledSourceNode): |
| * Modules/webaudio/AudioScheduledSourceNode.h: |
| * Modules/webaudio/AudioSummingJunction.cpp: |
| (WebCore::AudioSummingJunction::AudioSummingJunction): |
| * Modules/webaudio/AudioSummingJunction.h: |
| (WebCore::AudioSummingJunction::context): |
| * Modules/webaudio/BiquadFilterNode.cpp: |
| (WebCore::BiquadFilterNode::BiquadFilterNode): |
| * Modules/webaudio/BiquadFilterNode.h: |
| * Modules/webaudio/BiquadProcessor.cpp: |
| (WebCore::BiquadProcessor::BiquadProcessor): |
| * Modules/webaudio/BiquadProcessor.h: |
| * Modules/webaudio/ChannelMergerNode.cpp: |
| (WebCore::ChannelMergerNode::create): |
| (WebCore::ChannelMergerNode::ChannelMergerNode): |
| * Modules/webaudio/ChannelMergerNode.h: |
| * Modules/webaudio/ChannelSplitterNode.cpp: |
| (WebCore::ChannelSplitterNode::create): |
| (WebCore::ChannelSplitterNode::ChannelSplitterNode): |
| * Modules/webaudio/ChannelSplitterNode.h: |
| * Modules/webaudio/ConvolverNode.cpp: |
| (WebCore::ConvolverNode::ConvolverNode): |
| * Modules/webaudio/ConvolverNode.h: |
| * Modules/webaudio/DefaultAudioDestinationNode.cpp: |
| (WebCore::DefaultAudioDestinationNode::DefaultAudioDestinationNode): |
| * Modules/webaudio/DefaultAudioDestinationNode.h: |
| * Modules/webaudio/DelayNode.cpp: |
| (WebCore::DelayNode::DelayNode): |
| (WebCore::DelayNode::create): |
| * Modules/webaudio/DelayNode.h: |
| * Modules/webaudio/DelayProcessor.cpp: |
| (WebCore::DelayProcessor::DelayProcessor): |
| * Modules/webaudio/DelayProcessor.h: |
| * Modules/webaudio/DistanceModelType.h: Copied from Source/WebCore/Modules/webaudio/OfflineAudioContext.idl. |
| * Modules/webaudio/DistanceModelType.idl: Copied from Source/WebCore/Modules/webaudio/OfflineAudioContext.idl. |
| * Modules/webaudio/DynamicsCompressorNode.cpp: |
| (WebCore::DynamicsCompressorNode::DynamicsCompressorNode): |
| * Modules/webaudio/DynamicsCompressorNode.h: |
| * Modules/webaudio/GainNode.cpp: |
| (WebCore::GainNode::GainNode): |
| * Modules/webaudio/GainNode.h: |
| * Modules/webaudio/MediaElementAudioSourceNode.cpp: |
| (WebCore::MediaElementAudioSourceNode::create): |
| (WebCore::MediaElementAudioSourceNode::MediaElementAudioSourceNode): |
| (WebCore::MediaElementAudioSourceNode::setFormat): |
| * Modules/webaudio/MediaElementAudioSourceNode.h: |
| * Modules/webaudio/MediaStreamAudioDestinationNode.cpp: |
| (WebCore::MediaStreamAudioDestinationNode::create): |
| (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode): |
| * Modules/webaudio/MediaStreamAudioDestinationNode.h: |
| * Modules/webaudio/MediaStreamAudioSourceNode.cpp: |
| (WebCore::MediaStreamAudioSourceNode::create): |
| (WebCore::MediaStreamAudioSourceNode::MediaStreamAudioSourceNode): |
| * Modules/webaudio/MediaStreamAudioSourceNode.h: |
| * Modules/webaudio/OfflineAudioContext.idl: |
| * Modules/webaudio/OfflineAudioDestinationNode.cpp: |
| (WebCore::OfflineAudioDestinationNode::OfflineAudioDestinationNode): |
| * Modules/webaudio/OfflineAudioDestinationNode.h: |
| * Modules/webaudio/OscillatorNode.cpp: |
| (WebCore::OscillatorNode::create): |
| (WebCore::OscillatorNode::OscillatorNode): |
| * Modules/webaudio/OscillatorNode.h: |
| * Modules/webaudio/PannerNode.cpp: |
| (WebCore::PannerNodeBase::PannerNodeBase): |
| (WebCore::PannerNode::PannerNode): |
| * Modules/webaudio/PannerNode.h: |
| * Modules/webaudio/PannerNode.idl: |
| * Modules/webaudio/PanningModelType.h: Copied from Source/WebCore/Modules/webaudio/OfflineAudioContext.idl. |
| * Modules/webaudio/PanningModelType.idl: Copied from Source/WebCore/Modules/webaudio/OfflineAudioContext.idl. |
| * Modules/webaudio/ScriptProcessorNode.cpp: |
| (WebCore::ScriptProcessorNode::create): |
| (WebCore::ScriptProcessorNode::ScriptProcessorNode): |
| * Modules/webaudio/ScriptProcessorNode.h: |
| * Modules/webaudio/WaveShaperNode.cpp: |
| (WebCore::WaveShaperNode::WaveShaperNode): |
| * Modules/webaudio/WaveShaperNode.h: |
| * Modules/webaudio/WebKitAudioContext.cpp: Copied from Source/WebCore/Modules/webaudio/AudioContext.cpp. |
| (WebCore::WebKitAudioContext::isSampleRateRangeGood): |
| (WebCore::WebKitAudioContext::create): |
| (WebCore::WebKitAudioContext::WebKitAudioContext): |
| (WebCore::WebKitAudioContext::constructCommon): |
| (WebCore::WebKitAudioContext::~WebKitAudioContext): |
| (WebCore::WebKitAudioContext::lazyInitialize): |
| (WebCore::WebKitAudioContext::clear): |
| (WebCore::WebKitAudioContext::uninitialize): |
| (WebCore::WebKitAudioContext::isInitialized const): |
| (WebCore::WebKitAudioContext::addReaction): |
| (WebCore::WebKitAudioContext::setState): |
| (WebCore::WebKitAudioContext::stop): |
| (WebCore::WebKitAudioContext::suspend): |
| (WebCore::WebKitAudioContext::resume): |
| (WebCore::WebKitAudioContext::activeDOMObjectName const): |
| (WebCore::WebKitAudioContext::hostingDocumentIdentifier const): |
| (WebCore::WebKitAudioContext::isSuspended const): |
| (WebCore::WebKitAudioContext::visibilityStateChanged): |
| (WebCore::WebKitAudioContext::wouldTaintOrigin const): |
| (WebCore::WebKitAudioContext::createBuffer): |
| (WebCore::WebKitAudioContext::decodeAudioData): |
| (WebCore::WebKitAudioContext::createBufferSource): |
| (WebCore::WebKitAudioContext::createMediaElementSource): |
| (WebCore::WebKitAudioContext::createMediaStreamSource): |
| (WebCore::WebKitAudioContext::createMediaStreamDestination): |
| (WebCore::WebKitAudioContext::createScriptProcessor): |
| (WebCore::WebKitAudioContext::createBiquadFilter): |
| (WebCore::WebKitAudioContext::createWaveShaper): |
| (WebCore::WebKitAudioContext::createPanner): |
| (WebCore::WebKitAudioContext::createConvolver): |
| (WebCore::WebKitAudioContext::createDynamicsCompressor): |
| (WebCore::WebKitAudioContext::createAnalyser): |
| (WebCore::WebKitAudioContext::createGain): |
| (WebCore::WebKitAudioContext::createDelay): |
| (WebCore::WebKitAudioContext::createChannelSplitter): |
| (WebCore::WebKitAudioContext::createChannelMerger): |
| (WebCore::WebKitAudioContext::createOscillator): |
| (WebCore::WebKitAudioContext::createPeriodicWave): |
| (WebCore::WebKitAudioContext::notifyNodeFinishedProcessing): |
| (WebCore::WebKitAudioContext::derefFinishedSourceNodes): |
| (WebCore::WebKitAudioContext::refNode): |
| (WebCore::WebKitAudioContext::derefNode): |
| (WebCore::WebKitAudioContext::derefUnfinishedSourceNodes): |
| (WebCore::WebKitAudioContext::lock): |
| (WebCore::WebKitAudioContext::tryLock): |
| (WebCore::WebKitAudioContext::unlock): |
| (WebCore::WebKitAudioContext::isAudioThread const): |
| (WebCore::WebKitAudioContext::isGraphOwner const): |
| (WebCore::WebKitAudioContext::addDeferredFinishDeref): |
| (WebCore::WebKitAudioContext::handlePreRenderTasks): |
| (WebCore::WebKitAudioContext::handlePostRenderTasks): |
| (WebCore::WebKitAudioContext::handleDeferredFinishDerefs): |
| (WebCore::WebKitAudioContext::markForDeletion): |
| (WebCore::WebKitAudioContext::scheduleNodeDeletion): |
| (WebCore::WebKitAudioContext::deleteMarkedNodes): |
| (WebCore::WebKitAudioContext::markSummingJunctionDirty): |
| (WebCore::WebKitAudioContext::removeMarkedSummingJunction): |
| (WebCore::WebKitAudioContext::markAudioNodeOutputDirty): |
| (WebCore::WebKitAudioContext::handleDirtyAudioSummingJunctions): |
| (WebCore::WebKitAudioContext::handleDirtyAudioNodeOutputs): |
| (WebCore::WebKitAudioContext::addAutomaticPullNode): |
| (WebCore::WebKitAudioContext::removeAutomaticPullNode): |
| (WebCore::WebKitAudioContext::updateAutomaticPullNodes): |
| (WebCore::WebKitAudioContext::processAutomaticPullNodes): |
| (WebCore::WebKitAudioContext::nodeWillBeginPlayback): |
| (WebCore::shouldDocumentAllowWebAudioToAutoPlay): |
| (WebCore::WebKitAudioContext::willBeginPlayback): |
| (WebCore::WebKitAudioContext::willPausePlayback): |
| (WebCore::WebKitAudioContext::startRendering): |
| (WebCore::WebKitAudioContext::mediaCanStart): |
| (WebCore::WebKitAudioContext::mediaState const): |
| (WebCore::WebKitAudioContext::pageMutedStateDidChange): |
| (WebCore::WebKitAudioContext::isPlayingAudioDidChange): |
| (WebCore::WebKitAudioContext::finishedRendering): |
| (WebCore::WebKitAudioContext::dispatchEvent): |
| (WebCore::WebKitAudioContext::incrementActiveSourceCount): |
| (WebCore::WebKitAudioContext::decrementActiveSourceCount): |
| (WebCore::WebKitAudioContext::suspendRendering): |
| (WebCore::WebKitAudioContext::resumeRendering): |
| (WebCore::WebKitAudioContext::close): |
| (WebCore::WebKitAudioContext::suspendPlayback): |
| (WebCore::WebKitAudioContext::mayResumePlayback): |
| (WebCore::WebKitAudioContext::postTask): |
| (WebCore::WebKitAudioContext::origin const): |
| (WebCore::WebKitAudioContext::addConsoleMessage): |
| (WebCore::WebKitAudioContext::clearPendingActivity): |
| (WebCore::WebKitAudioContext::makePendingActivity): |
| (WebCore::WebKitAudioContext::logChannel const): |
| * Modules/webaudio/WebKitAudioContext.h: Copied from Source/WebCore/Modules/webaudio/AudioContext.h. |
| (WebCore::WebKitAudioContext::destination): |
| (WebCore::WebKitAudioContext::activeSourceCount const): |
| (WebCore::WebKitAudioContext::listener): |
| (WebCore::WebKitAudioContext::isClosed const): |
| (WebCore::WebKitAudioContext::connectionCount const): |
| (WebCore::WebKitAudioContext::audioThread const): |
| (WebCore::WebKitAudioContext::maxNumberOfChannels): |
| (WebCore::WebKitAudioContext::userGestureRequiredForAudioStart const): |
| (WebCore::WebKitAudioContext::pageConsentRequiredForAudioStart const): |
| (WebCore::WebKitAudioContext::state const): |
| (isType): |
| * Modules/webaudio/WebKitAudioContext.idl: Copied from Source/WebCore/Modules/webaudio/AudioContext.idl. |
| * Modules/webaudio/WebKitAudioPannerNode.cpp: Copied from Source/WebCore/Modules/webaudio/PannerNode.cpp. |
| (WebCore::fixNANs): |
| (WebCore::WebKitAudioPannerNode::WebKitAudioPannerNode): |
| (WebCore::WebKitAudioPannerNode::~WebKitAudioPannerNode): |
| (WebCore::WebKitAudioPannerNode::pullInputs): |
| (WebCore::WebKitAudioPannerNode::process): |
| (WebCore::WebKitAudioPannerNode::reset): |
| (WebCore::WebKitAudioPannerNode::initialize): |
| (WebCore::WebKitAudioPannerNode::uninitialize): |
| (WebCore::WebKitAudioPannerNode::listener): |
| (WebCore::WebKitAudioPannerNode::setPanningModel): |
| (WebCore::WebKitAudioPannerNode::distanceModel const): |
| (WebCore::WebKitAudioPannerNode::setDistanceModel): |
| (WebCore::WebKitAudioPannerNode::getAzimuthElevation): |
| (WebCore::WebKitAudioPannerNode::dopplerRate): |
| (WebCore::WebKitAudioPannerNode::distanceConeGain): |
| (WebCore::WebKitAudioPannerNode::notifyAudioSourcesConnectedToNode): |
| * Modules/webaudio/WebKitAudioPannerNode.h: Copied from Source/WebCore/Modules/webaudio/PannerNode.h. |
| * Modules/webaudio/WebKitAudioPannerNode.idl: Copied from Source/WebCore/Modules/webaudio/PannerNode.idl. |
| * Modules/webaudio/WebKitOfflineAudioContext.cpp: Copied from Source/WebCore/Modules/webaudio/DelayNode.cpp. |
| (WebCore::WebKitOfflineAudioContext::WebKitOfflineAudioContext): |
| (WebCore::WebKitOfflineAudioContext::create): |
| * Modules/webaudio/WebKitOfflineAudioContext.h: Copied from Source/WebCore/Modules/webaudio/DelayNode.h. |
| * Modules/webaudio/WebKitOfflineAudioContext.idl: Copied from Source/WebCore/Modules/webaudio/OfflineAudioContext.idl. |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * dom/EventTargetFactory.in: |
| * page/Settings.yaml: |
| * testing/Internals.cpp: |
| (WebCore::Internals::setAudioContextRestrictions): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-17 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] Shift-tab in a bullet list in Mail Compose jumps back to Subject field |
| https://bugs.webkit.org/show_bug.cgi?id=213320 |
| <rdar://problem/63831962> |
| |
| Reviewed by Tim Horton. |
| |
| After the changes in r262051, pressing shift-tab in a bulleted list in Mail compose on macOS no longer triggers |
| an outdent command. This is because the default behavior of the "keydown" event will now relinquish focus to the |
| embedding client (i.e. the "chrome"). In this case, Mail makes the Subject field above the compose web view the |
| first responder. |
| |
| This is necessary on iOS, where Mail does not attempt to intercept shift+tab and move focus to the subject line. |
| However, Mail on macOS intercepts the keypress event, and either triggers outdent (if the selection is inside a |
| list or blockquote) or focuses the Subject line. Since focus is relinquished during "keydown", this logic no |
| longer runs, and hitting shift+tab in a list always relinquishes focus. |
| |
| To address this, refactor the changes made in r262051 so that we treat the default behavior of the "keypress" |
| event (rather than "keydown") as relinquishing focus. See WebKit/ChangeLog for more details. |
| |
| Test: WebKit.ShiftTabDoesNotTakeFocusFromEditableWebViewWhenPreventingKeyPress |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::defaultTabEventHandler): |
| |
| Remove a call to relinquish focus when handling tab. |
| |
| * page/FocusController.h: |
| |
| 2020-06-16 Antoine Quint <graouts@webkit.org> |
| |
| quikr.com: unable to select item from dropdown |
| https://bugs.webkit.org/show_bug.cgi?id=213260 |
| <rdar://problem/58106011> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Only account for box-shadow when computing the background rect if the clipping element itself has non-zero used width and height. |
| |
| Tests: fast/box-shadow/hit-test-box-shadow-and-margin-on-zero-height-clipping-container.html |
| fast/box-shadow/hit-test-box-shadow-and-margin-on-zero-width-clipping-container.html |
| fast/box-shadow/hit-test-box-shadow-on-zero-height-clipping-container.html |
| fast/box-shadow/hit-test-box-shadow-on-zero-width-clipping-container.html |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::addVisualEffectOverflow): |
| |
| 2020-06-17 David Kilzer <ddkilzer@apple.com> |
| |
| Replace OptionSetTraits/OptionSetValues with EnumTraits/EnumValues |
| <https://webkit.org/b/213264> |
| |
| Reviewed by Brent Fulgham. |
| |
| * page/DragActions.h: |
| (EnumTraits<WebCore::DragDestinationAction>): |
| - Rename from OptionSetTraits<WebCore::DragDestinationAction>. |
| (OptionSetTraits<WebCore::DragOperation>): |
| (OptionSetTraits<WebCore::DragSourceAction>): |
| - Remove since EnumTraits<> already exist for both. |
| |
| 2020-06-17 Geoffrey Garen <ggaren@apple.com> |
| |
| media/remoteplayback-target-availability.html was a flaky failure after r262904 |
| https://bugs.webkit.org/show_bug.cgi?id=213294 |
| |
| Reviewed by Sam Weinig. |
| |
| AirPlay availability is a global that depends on a timer (and/or an |
| external piece of hardware). Therefore, the first value RemotePlayback |
| sees for AirPlay availability, while usually 'unavailable', is sometimes |
| 'available'. Flaky! |
| |
| In this case, media/remoteplayback-prompt.html triggered an AirPlay |
| availability check, and then media/remoteplayback-target-availability.html, |
| if run in the same process, sometimes saw 'available' as its initial |
| availability state. |
| |
| Make RemotePlayback's initial availability state deterministic by |
| recording availability state at the time we enqueue our task, rather |
| than at the time we dequeue our task. (By specification and |
| implementation, RemotePlayback's initial availability state is always |
| 'unavailable', regardless of AirPlay state.) This is OK to do because, |
| if the state ever changes after we enqueue our task, we'll get an update |
| notification and enqueue a new task. |
| |
| * Modules/remoteplayback/RemotePlayback.cpp: |
| (WebCore::RemotePlayback::watchAvailability): Copy the availability |
| state when we enqueue our task, and do not update it when we dequeue our |
| task. This is the heart of the bug fix. |
| |
| Make sure to manually update availability state when we first register |
| to monitor availability, since we never got an update notification for |
| the current state. |
| |
| (WebCore::RemotePlayback::prompt): For consistency with |
| watchAvailability, do not update availability state when we dequeue our |
| task. (This means that prompting before watching availability is always |
| an error, which is fine, and consistent with the spec, which says, "If |
| the user agent stops monitoring the list of available remote playback |
| devices... It SHOULD also set the availability value for all media |
| elements to false.") |
| |
| Make sure to manually update availability state when we first register |
| to monitor availability, since we never got an update notification for |
| the current state. |
| |
| (WebCore::RemotePlayback::availabilityChanged): For consistency with |
| watchAvailability, do not update availability state when we dequeue our |
| task. |
| |
| (WebCore::RemotePlayback::updateAvailability): Deleted. We never |
| synchronously update our state anymore. All state changes are queued and |
| processed in order. |
| * Modules/remoteplayback/RemotePlayback.h: |
| |
| 2020-06-17 Rob Buis <rbuis@igalia.com> |
| |
| Image `referrerpolicy` mutations should be considered "relevant mutations" |
| https://bugs.webkit.org/show_bug.cgi?id=209970 |
| |
| Reviewed by Youenn Fablet. |
| |
| Make referrerpolicy state changes a relevant mutation [1]. In order to indicate |
| that we are dealing with a relevant mutation add an enum to updateFromElement, in |
| order to run "update the image data" algorithm [2] in case it is a relevant mutation. |
| |
| Tests: imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/relevant-mutations.html |
| imported/w3c/web-platform-tests/html/semantics/embedded-content/the-img-element/image-loading-lazy-referrerpolicy-change.sub.html |
| |
| [1] https://html.spec.whatwg.org/#reacting-to-dom-mutations:attr-img-referrerpolicy |
| [2] https://html.spec.whatwg.org/#when-to-obtain-images |
| |
| * html/HTMLImageElement.cpp: |
| (WebCore::HTMLImageElement::attributeChanged): |
| * html/HTMLImageElement.h: |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::updateFromElement): |
| (WebCore::ImageLoader::updateFromElementIgnoringPreviousError): |
| (WebCore::ImageLoader::loadDeferredImage): |
| * loader/ImageLoader.h: |
| |
| 2020-06-17 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed attempt to fix internal macOS build after r263157. |
| |
| * rendering/RenderThemeMac.mm: |
| |
| 2020-06-17 Sam Weinig <weinig@apple.com> |
| |
| Use constructor operations in WebIDL |
| https://bugs.webkit.org/show_bug.cgi?id=201397 |
| |
| Reviewed by Eric Carlson. |
| |
| Add support for constructor syntax in WebIDL (https://heycam.github.io/webidl/#idl-constructors) |
| |
| - [Constructor(...)] extended attributes become constructor(...) operations |
| - [JSBuiltinConstructor] becomes [JSBuiltin] constructor(...) |
| - [CustomConstructor] becomes [Custom] constructor(...) |
| - [ConstructorMayThrowException] becomes [MayThrowException] constructor(...) and can |
| now be unique per-overload |
| - [ConstructorCallWith=Foo] becomes [CallWith=Foo] constructor(...) and can now also be |
| unique per-overload |
| |
| This change leaves NamedConstructor as is, but a subsequent change will replace it with the |
| specified LegacyFactoryFunction extended attribute. |
| |
| * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl: |
| * Modules/applepay/ApplePayError.idl: |
| * Modules/applepay/ApplePaySession.idl: |
| * Modules/applepay/ApplePaySetup.idl: |
| * Modules/async-clipboard/ClipboardItem.idl: |
| * Modules/encryptedmedia/MediaKeyMessageEvent.idl: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.idl: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.idl: |
| * Modules/encryptedmedia/legacy/WebKitMediaKeys.idl: |
| * Modules/fetch/FetchHeaders.idl: |
| * Modules/fetch/FetchRequest.idl: |
| * Modules/fetch/FetchResponse.idl: |
| * Modules/gamepad/GamepadEvent.idl: |
| * Modules/highlight/HighlightMap.idl: |
| * Modules/highlight/HighlightRangeGroup.idl: |
| * Modules/indexeddb/IDBVersionChangeEvent.idl: |
| * Modules/mediarecorder/BlobEvent.idl: |
| * Modules/mediarecorder/MediaRecorder.idl: |
| * Modules/mediarecorder/MediaRecorderErrorEvent.idl: |
| * Modules/mediasession/MediaRemoteControls.idl: |
| * Modules/mediasession/MediaSession.idl: |
| * Modules/mediasource/MediaSource.idl: |
| * Modules/mediastream/MediaStream.idl: |
| * Modules/mediastream/MediaStreamTrackEvent.idl: |
| * Modules/mediastream/OverconstrainedError.idl: |
| * Modules/mediastream/OverconstrainedErrorEvent.idl: |
| * Modules/mediastream/RTCDTMFToneChangeEvent.idl: |
| * Modules/mediastream/RTCDataChannelEvent.idl: |
| * Modules/mediastream/RTCIceCandidate.idl: |
| * Modules/mediastream/RTCPeerConnection.idl: |
| * Modules/mediastream/RTCPeerConnectionIceEvent.idl: |
| * Modules/mediastream/RTCSessionDescription.idl: |
| * Modules/mediastream/RTCTrackEvent.idl: |
| * Modules/notifications/Notification.idl: |
| * Modules/paymentrequest/MerchantValidationEvent.idl: |
| * Modules/paymentrequest/PaymentMethodChangeEvent.idl: |
| * Modules/paymentrequest/PaymentRequest.idl: |
| * Modules/paymentrequest/PaymentRequestUpdateEvent.idl: |
| * Modules/pictureinpicture/EnterPictureInPictureEvent.idl: |
| * Modules/speech/SpeechSynthesisUtterance.idl: |
| * Modules/streams/ByteLengthQueuingStrategy.idl: |
| * Modules/streams/CountQueuingStrategy.idl: |
| * Modules/streams/ReadableByteStreamController.idl: |
| * Modules/streams/ReadableStream.idl: |
| * Modules/streams/ReadableStreamBYOBReader.idl: |
| * Modules/streams/ReadableStreamBYOBRequest.idl: |
| * Modules/streams/ReadableStreamDefaultController.idl: |
| * Modules/streams/ReadableStreamDefaultReader.idl: |
| * Modules/streams/WritableStream.idl: |
| * Modules/webaudio/AudioContext.idl: |
| * Modules/webaudio/OfflineAudioContext.idl: |
| * Modules/webgpu/GPUOutOfMemoryError.idl: |
| * Modules/webgpu/GPUUncapturedErrorEvent.idl: |
| * Modules/webgpu/GPUValidationError.idl: |
| * Modules/websockets/CloseEvent.idl: |
| * Modules/websockets/WebSocket.idl: |
| * Modules/webxr/WebXRRigidTransform.idl: |
| * Modules/webxr/WebXRWebGLLayer.idl: |
| * Modules/webxr/XRInputSourceEvent.idl: |
| * Modules/webxr/XRInputSourcesChangeEvent.idl: |
| * Modules/webxr/XRReferenceSpaceEvent.idl: |
| * Modules/webxr/XRSessionEvent.idl: |
| * animation/AnimationPlaybackEvent.idl: |
| * animation/DocumentTimeline.idl: |
| * animation/KeyframeEffect.idl: |
| * animation/WebAnimation.idl: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (ShouldGenerateToJSDeclaration): |
| (GetFullyQualifiedImplementationCallName): |
| (GenerateParametersCheck): |
| (GetConstructorTemplateClassName): |
| (GenerateConstructorDefinition): |
| (GenerateConstructorHelperMethods): |
| (HasCustomConstructor): |
| (IsConstructable): |
| (HasJSBuiltinConstructor): |
| (AddJSBuiltinIncludesIfNeeded): |
| (IsJSBuiltinConstructor): Deleted. |
| * bindings/scripts/IDLAttributes.json: |
| * bindings/scripts/IDLParser.pm: |
| (assertExtendedAttributesValidForContext): |
| (copyExtendedAttributes): |
| (cloneOperation): |
| (applyTypedefs): |
| (parseInterfaceMember): |
| (parseConstructor): |
| (parseExtendedAttributeRest): |
| (applyMemberList): |
| (applyExtendedAttributeList): |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| (WebCore::JSTestNamedConstructorConstructor::initializeProperties): |
| (WebCore::JSTestNamedConstructorNamedConstructor::construct): |
| (WebCore::JSTestNamedConstructorNamedConstructor::initializeProperties): |
| * bindings/scripts/test/TestClassWithJSBuiltinConstructor.idl: |
| * bindings/scripts/test/TestEventConstructor.idl: |
| * bindings/scripts/test/TestInterface.idl: |
| * bindings/scripts/test/TestJSBuiltinConstructor.idl: |
| * bindings/scripts/test/TestNamedConstructor.idl: |
| * bindings/scripts/test/TestNode.idl: |
| * bindings/scripts/test/TestObj.idl: |
| * bindings/scripts/test/TestOverloadedConstructors.idl: |
| * bindings/scripts/test/TestOverloadedConstructorsWithSequence.idl: |
| * bindings/scripts/test/TestPromiseRejectionEvent.idl: |
| * bindings/scripts/test/TestTypedefs.idl: |
| * css/DOMMatrix.idl: |
| * css/DOMMatrixReadOnly.idl: |
| * css/FontFace.idl: |
| * css/FontFaceSet.idl: |
| * css/MediaQueryListEvent.idl: |
| * css/WebKitCSSMatrix.idl: |
| * css/typedom/TypedOMCSSUnitValue.idl: |
| * css/typedom/TypedOMCSSUnparsedValue.idl: |
| * dom/AbortController.idl: |
| * dom/AnimationEvent.idl: |
| * dom/BeforeLoadEvent.idl: |
| * dom/ClipboardEvent.idl: |
| * dom/Comment.idl: |
| * dom/CompositionEvent.idl: |
| * dom/CustomEvent.idl: |
| * dom/DOMException.idl: |
| * dom/DOMPoint.idl: |
| * dom/DOMPointReadOnly.idl: |
| * dom/DOMQuad.idl: |
| * dom/DOMRect.idl: |
| * dom/DOMRectReadOnly.idl: |
| * dom/Document.idl: |
| * dom/DocumentFragment.idl: |
| * dom/DragEvent.idl: |
| * dom/ErrorEvent.idl: |
| * dom/Event.idl: |
| * dom/EventTarget.idl: |
| * dom/FocusEvent.idl: |
| * dom/HashChangeEvent.idl: |
| * dom/InputEvent.idl: |
| * dom/KeyboardEvent.idl: |
| * dom/MessageChannel.idl: |
| * dom/MessageEvent.idl: |
| * dom/MouseEvent.idl: |
| * dom/MutationObserver.idl: |
| * dom/OverflowEvent.idl: |
| * dom/PageTransitionEvent.idl: |
| * dom/PointerEvent.idl: |
| * dom/PopStateEvent.idl: |
| * dom/ProgressEvent.idl: |
| * dom/PromiseRejectionEvent.idl: |
| * dom/Range.idl: |
| * dom/SecurityPolicyViolationEvent.idl: |
| * dom/StaticRange.idl: |
| * dom/Text.idl: |
| * dom/TextDecoder.idl: |
| * dom/TextEncoder.idl: |
| * dom/TransitionEvent.idl: |
| * dom/UIEvent.idl: |
| * dom/WebKitAnimationEvent.idl: |
| * dom/WebKitTransitionEvent.idl: |
| * dom/WheelEvent.idl: |
| * fileapi/Blob.idl: |
| * fileapi/File.idl: |
| * fileapi/FileReader.idl: |
| * fileapi/FileReaderSync.idl: |
| * html/DOMFormData.idl: |
| * html/DOMURL.idl: |
| * html/HTMLElement.idl: |
| * html/HTMLOptionElement.idl: |
| * html/ImageData.idl: |
| * html/MediaController.idl: |
| * html/MediaEncryptedEvent.idl: |
| * html/OffscreenCanvas.idl: |
| * html/URLSearchParams.idl: |
| * html/canvas/Path2D.idl: |
| * html/canvas/WebGLContextEvent.idl: |
| * html/track/DataCue.idl: |
| * html/track/TextTrackCue.idl: |
| * html/track/TrackEvent.idl: |
| * html/track/VTTCue.idl: |
| * html/track/VTTRegion.idl: |
| * page/EventSource.idl: |
| * page/IntersectionObserver.idl: |
| * page/IntersectionObserverEntry.idl: |
| * page/PerformanceObserver.idl: |
| * page/ResizeObserver.idl: |
| * page/UndoItem.idl: |
| * page/WebKitPoint.idl: |
| * storage/StorageEvent.idl: |
| * workers/Worker.idl: |
| * workers/service/ExtendableEvent.idl: |
| * workers/service/ExtendableMessageEvent.idl: |
| * workers/service/FetchEvent.idl: |
| * xml/DOMParser.idl: |
| * xml/XMLHttpRequest.idl: |
| * xml/XMLSerializer.idl: |
| * xml/XPathEvaluator.idl: |
| * xml/XSLTProcessor.idl: |
| |
| 2020-06-17 Darryl Pogue <darryl@dpogue.ca> |
| |
| IndexedDB: Support IDBFactory databases method |
| https://bugs.webkit.org/show_bug.cgi?id=211043 |
| |
| Reviewed by Youenn Fablet. |
| |
| Add support for fetching the list of IDB database names and versions |
| from the IDBServer, and expose the functionality as |
| `IDBFactory.prototype.databases()`. |
| |
| Spec: https://w3c.github.io/IndexedDB/#dom-idbfactory-databases |
| |
| * Headers.cmake: |
| * Modules/indexeddb/IDBActiveDOMObject.h: |
| (WebCore::IDBActiveDOMObject::performCallbackOnOriginThread): |
| * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp: Added. |
| (WebCore::IDBDatabaseNameAndVersionRequest::create): |
| (WebCore::IDBDatabaseNameAndVersionRequest::IDBDatabaseNameAndVersionRequest): |
| (WebCore::IDBDatabaseNameAndVersionRequest::~IDBDatabaseNameAndVersionRequest): |
| (WebCore::IDBDatabaseNameAndVersionRequest::complete): |
| (WebCore::IDBDatabaseNameAndVersionRequest::activeDOMObjectName const): |
| (WebCore::IDBDatabaseNameAndVersionRequest::virtualHasPendingActivity const): |
| (WebCore::IDBDatabaseNameAndVersionRequest::stop): |
| * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h: Added. |
| * Modules/indexeddb/IDBFactory.cpp: |
| (WebCore::IDBFactory::databases): |
| (WebCore::IDBFactory::getAllDatabaseNames): |
| * Modules/indexeddb/IDBFactory.h: |
| * Modules/indexeddb/IDBFactory.idl: |
| * Modules/indexeddb/client/IDBConnectionProxy.cpp: |
| (WebCore::IDBClient::IDBConnectionProxy::connectionToServerLost): |
| (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionProxy::didGetAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionProxy::forgetActivityForCurrentThread): |
| (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNames): Deleted. |
| * Modules/indexeddb/client/IDBConnectionProxy.h: |
| * Modules/indexeddb/client/IDBConnectionToServer.cpp: |
| (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNames): Deleted. |
| (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNames): Deleted. |
| * Modules/indexeddb/client/IDBConnectionToServer.h: |
| * Modules/indexeddb/client/IDBConnectionToServerDelegate.h: |
| * Modules/indexeddb/server/IDBConnectionToClient.cpp: |
| (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNamesAndVersions): |
| (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNames): Deleted. |
| * Modules/indexeddb/server/IDBConnectionToClient.h: |
| * Modules/indexeddb/server/IDBConnectionToClientDelegate.h: |
| * Modules/indexeddb/server/IDBServer.cpp: |
| (WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): |
| (WebCore::IDBServer::IDBServer::getAllDatabaseNames): Deleted. |
| * Modules/indexeddb/server/IDBServer.h: |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameAndVersionFromFile): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromFile): Deleted. |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.h: |
| * Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h: Added. |
| (WebCore::IDBDatabaseNameAndVersion::encode const): |
| (WebCore::IDBDatabaseNameAndVersion::decode): |
| (WebCore::IDBDatabaseNameAndVersion::isolatedCopy const): |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * inspector/agents/InspectorIndexedDBAgent.cpp: |
| (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): |
| * loader/EmptyClients.cpp: |
| |
| 2020-06-17 Sam Weinig <weinig@apple.com> |
| |
| [WPT] infrastructure/assumptions/html-elements.html fails due to changes in style when all: initial is used |
| https://bugs.webkit.org/show_bug.cgi?id=213171 |
| |
| Reviewed by Antti Koivisto. |
| |
| Update existing test results that now pass. |
| |
| * css/CSSProperties.json: |
| Use initialStrokeColor (the default) rather than hardcoding the incorrect currentColor. The spec (and initialStrokeColor) |
| say this should be transparent. |
| |
| * style/StyleBuilderCustom.h: |
| (WebCore::Style::ApplyPropertyBorderImageModifier::applyInitialValue): |
| Match the mask image NinePieceImage constructor, and set fill to true for mask image slices. |
| |
| 2020-06-17 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][Float] Move float avoiders' final position compute next to when the static position is computed |
| https://bugs.webkit.org/show_bug.cgi?id=213250 |
| |
| Reviewed by Antti Koivisto. |
| |
| Now that the float avoider's final position has no dependecy on the computed height, we can |
| move it all the way up, next to where we computed the static position. |
| |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats): |
| (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin): |
| (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForAncestors): Deleted. |
| * layout/blockformatting/BlockFormattingContext.h: |
| |
| 2020-06-17 Antoine Quint <graouts@webkit.org> |
| |
| [Modern Media Controls] CSS "cursor" property shoud be respected in media controls shadow root |
| https://bugs.webkit.org/show_bug.cgi?id=213295 |
| <rdar://problem/61911638> |
| |
| Reviewed by Timothy Hatcher. |
| |
| Allow the "cursor" property to be inherited in the media controls shadow root, but still overriden |
| for interactive objects in the media controls as well as placard text. |
| |
| Test: media/modern-media-controls/css/cursor.html |
| |
| * Modules/modern-media-controls/controls/controls-bar.css: |
| (.controls-bar): |
| * Modules/modern-media-controls/controls/media-controls.css: |
| (.media-controls-container): |
| (.media-controls): |
| * Modules/modern-media-controls/controls/placard.css: |
| (.placard .title,): |
| |
| 2020-06-08 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Enable layout tests on more platforms |
| https://bugs.webkit.org/show_bug.cgi?id=212955 |
| <rdar://problem/64174156> |
| |
| Reviewed by Alex Christensen. |
| |
| Added runtime checks to determine the Apple Pay API version when installments are enabled. |
| |
| Enabled tests in http/tests/ssl/applepay on iOS. |
| |
| * Modules/applepay/ApplePayInstallmentConfiguration.idl: |
| * Modules/applepay/ApplePayInstallmentConfigurationWebCore.h: |
| * Modules/applepay/ApplePayInstallmentItem.h: |
| * Modules/applepay/ApplePayInstallmentItem.idl: |
| * Modules/applepay/ApplePayInstallmentItemType.h: |
| * Modules/applepay/ApplePayInstallmentItemType.idl: |
| * Modules/applepay/ApplePayInstallmentRetailChannel.h: |
| * Modules/applepay/ApplePayInstallmentRetailChannel.idl: Removed uses of |
| APPLE_PAY_INSTALLMENT_IDENTIFIERS and APPLE_PAY_INSTALLMENT_ITEMS (or replaced with |
| APPLE_PAY_INSTALLMENTS). |
| |
| * Modules/applepay/PaymentAPIVersion.h: |
| * Modules/applepay/cocoa/PaymentAPIVersionCocoa.mm: |
| (WebCore::PaymentAPIVersion::current): Moved the computation of current API version from |
| PaymentCoordinatorClient::supportsVersion to here. Added runtime checks to determine the |
| level of PassKit installments support since we don't have enough information to tell at |
| compile time. |
| |
| * Modules/applepay/PaymentCoordinatorClient.cpp: |
| (WebCore::PaymentCoordinatorClient::supportsVersion): Changed to call |
| PaymentAPIVersion::current. |
| |
| * Modules/applepay/PaymentInstallmentConfiguration.mm: |
| (WebCore::makeNSArrayElement): |
| (WebCore::createPlatformConfiguration): |
| (WebCore::PaymentInstallmentConfiguration::create): |
| (WebCore::PaymentInstallmentConfiguration::applePayInstallmentConfiguration const): Removed |
| uses of HAVE_PASSKIT_INSTALLMENT_ITEMS and HAVE_PASSKIT_INSTALLMENT_IDENTIFIERS. Used |
| runtime checks to determine support for PKPaymentInstallmentConfiguration and |
| PKPaymentInstallmentItem. |
| |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: Added source files for PaymentAPIVersion. |
| |
| 2020-06-17 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][Floats] Remove redundant mapping functions |
| https://bugs.webkit.org/show_bug.cgi?id=213249 |
| |
| Reviewed by Antti Koivisto. |
| |
| It's incorrect to map the entire display box when the height is no even computed yet. |
| |
| * layout/floats/FloatingContext.cpp: |
| (WebCore::Layout::FloatingContext::positionForFloat const): |
| (WebCore::Layout::FloatingContext::positionForNonFloatingFloatAvoider const): |
| (WebCore::Layout::FloatingContext::verticalPositionWithClearance const): |
| (WebCore::Layout::FloatingContext::append): |
| (WebCore::Layout::FloatingContext::absoluteDisplayBoxCoordinates const): |
| (WebCore::Layout::FloatingContext::mapTopLeftToFloatingStateRoot const): |
| (WebCore::Layout::FloatingContext::mapToFloatingStateRoot const): Deleted. |
| (WebCore::Layout::FloatingContext::mapTopToFloatingStateRoot const): Deleted. |
| * layout/floats/FloatingContext.h: |
| |
| 2020-06-17 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC]Floats] Cleanup FloatAvoider interface |
| https://bugs.webkit.org/show_bug.cgi?id=213195 |
| |
| Reviewed by Antti Koivisto. |
| |
| Remove redundant functions/parameters. |
| |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats): |
| * layout/floats/FloatAvoider.cpp: |
| (WebCore::Layout::FloatAvoider::FloatAvoider): |
| (WebCore::Layout::FloatAvoider::topLeftInContainingBlock const): Deleted. |
| * layout/floats/FloatAvoider.h: |
| * layout/floats/FloatingContext.cpp: |
| (WebCore::Layout::findAvailablePosition): |
| (WebCore::Layout::FloatingContext::positionForFloat const): |
| (WebCore::Layout::FloatingContext::positionForNonFloatingFloatAvoider const): |
| (WebCore::Layout::FloatingContext::positionForFormattingContextRoot const): Deleted. |
| (WebCore::Layout::FloatingContext::findPositionForFloatBox const): Deleted. |
| * layout/floats/FloatingContext.h: |
| |
| 2020-06-17 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][Floats] Remove FloatBox class |
| https://bugs.webkit.org/show_bug.cgi?id=213184 |
| |
| Reviewed by Antti Koivisto. |
| |
| Apparently the only difference between a non-floating float avoider (regular formatting context root) |
| and a float box is that while float boxes intersect their margin box, simple float avoiders use their border box. |
| We can do that without subclassing FloatAvoider. |
| |
| This patch is also in preparation for moving "computeFloatPosition" next to the static position computation when |
| the height value is not computed yet. So instead of passing in the display box, let's just pass in top/left and width. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * layout/floats/FloatAvoider.cpp: |
| (WebCore::Layout::FloatAvoider::FloatAvoider): |
| (WebCore::Layout::FloatAvoider::setHorizontalPosition): |
| (WebCore::Layout::FloatAvoider::setVerticalPosition): |
| (WebCore::Layout::FloatAvoider::initialHorizontalPosition const): |
| (WebCore::Layout::FloatAvoider::overflowsContainingBlock const): |
| (WebCore::Layout::FloatAvoider::topLeftInContainingBlock const): |
| (WebCore::Layout::FloatAvoider::setHorizontalConstraints): Deleted. |
| (WebCore::Layout::FloatAvoider::setVerticalConstraint): Deleted. |
| (WebCore::Layout::FloatAvoider::horizontalPositionCandidate): Deleted. |
| (WebCore::Layout::FloatAvoider::verticalPositionCandidate): Deleted. |
| (WebCore::Layout::FloatAvoider::rectInContainingBlock const): Deleted. |
| * layout/floats/FloatAvoider.h: |
| (WebCore::Layout::FloatAvoider::resetHorizontalPosition): |
| (WebCore::Layout::FloatAvoider::isLeftAligned const): |
| (WebCore::Layout::FloatAvoider::borderBoxWidth const): |
| (WebCore::Layout::FloatAvoider::marginBefore const): |
| (WebCore::Layout::FloatAvoider::marginAfter const): |
| (WebCore::Layout::FloatAvoider::marginStart const): |
| (WebCore::Layout::FloatAvoider::marginEnd const): |
| (WebCore::Layout::FloatAvoider::marginBoxWidth const): |
| (WebCore::Layout::FloatAvoider::isFloatingBox const): |
| (WebCore::Layout::FloatAvoider::layoutBox const): |
| (WebCore::Layout::FloatAvoider::top const): |
| (WebCore::Layout::FloatAvoider::left const): |
| (WebCore::Layout::FloatAvoider::right const): |
| (WebCore::Layout::FloatAvoider::rect const): Deleted. |
| (WebCore::Layout::FloatAvoider::displayBox const): Deleted. |
| (WebCore::Layout::FloatAvoider::displayBox): Deleted. |
| * layout/floats/FloatBox.cpp: Removed. |
| * layout/floats/FloatBox.h: Removed. |
| * layout/floats/FloatingContext.cpp: |
| (WebCore::Layout::FloatingContext::positionForFloat const): |
| (WebCore::Layout::FloatingContext::positionForFormattingContextRoot const): |
| (WebCore::Layout::findAvailablePosition): |
| (WebCore::Layout::FloatingContext::findPositionForFloatBox const): |
| (WebCore::Layout::FloatingContext::findPositionForFormattingContextRoot const): |
| (WebCore::Layout::FloatPair::intersects const): |
| (WebCore::Layout::FloatPair::horizontalConstraints const): |
| * layout/floats/FloatingContext.h: |
| |
| 2020-06-17 Youenn Fablet <youenn@apple.com> |
| |
| Make ReadableStream robust against user code |
| https://bugs.webkit.org/show_bug.cgi?id=212915 |
| <rdar://problem/64133221> |
| |
| Reviewed by Darin Adler. |
| |
| Create tee source with private slots instead of public ones. |
| When source has one of this private slot, we directly go to the creation of a ReadableStream. |
| Covered by existing tests. |
| |
| * Modules/streams/ReadableStream.js: |
| (initializeReadableStream): |
| * Modules/streams/ReadableStreamInternals.js: |
| (setupReadableStreamDefaultController): |
| (readableStreamTee): |
| (readableStreamDefaultControllerCallPullIfNeeded): |
| (readableStreamDefaultControllerCancel): |
| * Modules/streams/StreamInternals.js: |
| (promiseInvokeOrNoopMethodNoCatch): |
| (promiseInvokeOrNoopNoCatch): |
| (promiseInvokeOrNoopMethod): |
| (promiseInvokeOrNoop): |
| * bindings/js/WebCoreBuiltinNames.h: |
| |
| 2020-06-17 Antti Koivisto <antti@apple.com> |
| |
| Fix spelling of evaluteDynamicMediaQueryRules |
| https://bugs.webkit.org/show_bug.cgi?id=213287 |
| |
| Unreviewed. |
| |
| * style/RuleSet.cpp: |
| (WebCore::Style::RuleSet::addRulesFromSheet): |
| (WebCore::Style::RuleSet::evaluateDynamicMediaQueryRules): |
| (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules): Deleted. |
| * style/RuleSet.h: |
| * style/StyleResolver.cpp: |
| (WebCore::Style::Resolver::evaluateDynamicMediaQueries): |
| * style/StyleScopeRuleSets.cpp: |
| (WebCore::Style::ScopeRuleSets::evaluateDynamicMediaQueryRules): |
| (WebCore::Style::ScopeRuleSets::evaluteDynamicMediaQueryRules): Deleted. |
| * style/StyleScopeRuleSets.h: |
| |
| 2020-06-17 Diego Pino Garcia <dpino@igalia.com> |
| |
| REGRESSION(r262994): [GTK] More than 100 tests are failing |
| https://bugs.webkit.org/show_bug.cgi?id=213173 |
| |
| Unreviewed gardening. |
| |
| Add default initialization for WebCore::PluginInfo::clientLoadPolicy and |
| WebCore::PluginInfo::isApplicationPlugin. |
| |
| * plugins/PluginData.h: |
| |
| 2020-06-16 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r255037): Broken position while comparing watch bands on www.apple.com/shop/studio/apple-watch |
| https://bugs.webkit.org/show_bug.cgi?id=213282 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/scrolling/ios/user-then-programmatic-scroll.html |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::applyLayerPositionsAfterCommit): |
| * page/scrolling/ScrollingTree.h: |
| (WebCore::ScrollingTree::setNeedsApplyLayerPositionsAfterCommit): |
| (WebCore::ScrollingTree::didScrollByDelegatedScrolling): Deleted. |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling): |
| |
| 2020-06-16 Zalan Bujtas <zalan@apple.com> |
| |
| [Subpixel] Replaced content bleeds over content box when border radius is set |
| https://bugs.webkit.org/show_bug.cgi?id=213275 |
| <rdar://problem/64320995> |
| |
| Reviewed by Simon Fraser. |
| |
| Snap the border to device pixels on the replaced box when border radius is set. |
| |
| * rendering/RenderReplaced.cpp: |
| (WebCore::RenderReplaced::paint): |
| |
| 2020-06-16 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation should not re-extract elements whose children have been manipulated |
| https://bugs.webkit.org/show_bug.cgi?id=213276 |
| <rdar://problem/64193446> |
| |
| Reviewed by Tim Horton. |
| |
| After an element has undergone text manipulation, we have a mechanism for not extracting that element again, |
| if the element is later hidden and shown, or relocated in the DOM. This works by adding the inserted text |
| manipulation node to a weak element map (`m_manipulatedElements`) if the inserted node is an element. However, |
| this mechanism is bypassed in the case where text nodes are inserted, since these child nodes are not elements. |
| This means that if the element containing this manipulated text is hidden and later shown, we'll attempt to re- |
| extract its contents, which is problematic for text manipulation clients. |
| |
| To mitigate this, when inserting content during text manipulation, if a new parent of the inserted content |
| contains _only_ manipulated child nodes, then avoid trying to manipulate it in the future by adding it to |
| `m_manipulatedElements`. |
| |
| Test: TextManipulation.CompleteTextManipulationAvoidExtractingManipulatedTextAfterManipulation |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::updateInsertions): |
| |
| Drive-by style fix: add a space after the assignment operator. |
| |
| (WebCore::TextManipulationController::replace): |
| |
| If the parent node that we're inserting a text manipulation node underneath has only 1 child (i.e. the node that |
| we've just inserted), then flag it as having only manipulated children. This parent may be un-flagged later when |
| applying `NodeInsertion`s, if the `NodeInsertion`'s child has not been manipulated. |
| |
| 2020-06-16 Andy Estes <aestes@apple.com> |
| |
| FileListCreator should only be used for resolving directories |
| https://bugs.webkit.org/show_bug.cgi?id=213259 |
| <rdar://problem/64375709> |
| |
| Reviewed by David Kilzer. |
| |
| Depending on whether directories should be resolved, FileListCreator::create would either |
| synchronously execute its completion handler then return nullptr or asynchronously dispatch |
| its completion handler then return a non-null RefPtr. Interfaces with sometimes-synchronous |
| callbacks can be hard to use correctly; e.g., r262962 fixes a problem where |
| FileInputType::m_fileListCreator was being modified in an unexpected order. |
| |
| This patch makes the interface between FileInputType and FileListCreator less error-prone |
| and more explicit by renaming FileListCreator to DirectoryFileListCreator, making its job |
| solely to create directory FileLists on a background queue, and giving it an explicit start |
| member function. For non-directories, FileInputType::filesChosen now bypasses |
| DirectoryFileListCreator and directly converts from Vector<FileChooserFileInfo> to FileList. |
| |
| Covered by existing tests. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * html/DirectoryFileListCreator.cpp: Renamed from html/FileListCreator.cpp. |
| (WebCore::createFileList): Removed the template and ShouldResolveDirectories parameter. |
| (WebCore::DirectoryFileListCreator::DirectoryFileListCreator): Moved the work queue |
| dispatching to DirectoryFileListCreator::start. |
| (WebCore::DirectoryFileListCreator::start): Added; moved the work queue dispatching here |
| from the ctor. |
| |
| * html/DirectoryFileListCreator.h: Renamed from html/FileListCreator.h. |
| (WebCore::DirectoryFileListCreator::create): Stopped performing non-directory creation and |
| changed the return value back to Ref<>. |
| |
| * html/FileInputType.cpp: |
| (WebCore::FileInputType::filesChosen): Moved most of the work done in the FileListCreator |
| completion handler to didCreateFileList. When !FileInputType::allowsDirectories, used |
| Vector::map to convert paths to a Vector<Ref<File>>, used that to create a FileList, then |
| called didCreateFileList. Otherwise, created and started a DirectoryFileListCreator that |
| calls didCreateFileList in its completion handler. |
| (WebCore::FileInputType::didCreateFileList): Added; sets the new file list and icon and |
| clears m_directoryFileListCreator. |
| |
| * html/FileInputType.h: |
| |
| 2020-06-16 Dean Jackson <dino@apple.com> |
| |
| REGRESSION (r262643): DumpRenderTree at com.apple.WebCore: WebCore::Document::prepareCanvasesForDisplayIfNeeded |
| https://bugs.webkit.org/show_bug.cgi?id=213221 |
| rdar://64260400 |
| |
| Reviewed by Simon Fraser. |
| |
| A Document could still be holding a pointer to an HTMLCanvasElement after the |
| canvas had been deleted because the CanvasObserver protocol was disconnected |
| too early. The fix is to explicitly clear the canvas from the Document as it |
| stops observing. |
| |
| Test: webgl/preparation-removed-from-document.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::prepareCanvasesForDisplayIfNeeded): Copy the HashSet to a Vector |
| just in case something weird happens to the set during iteration. |
| (WebCore::Document::clearCanvasPreparation): Remove the canvas from the list of |
| of elements that need preparation. |
| * dom/Document.h: Add the new clearCanvasPreparation method. |
| |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Clear the document. |
| (WebCore::HTMLCanvasElement::didMoveToNewDocument): Ditto. |
| (WebCore::HTMLCanvasElement::removedFromAncestor): Ditto. |
| |
| 2020-06-16 Dean Jackson <dino@apple.com> |
| |
| [WebGL] Lose the context if IOSurface allocation fails |
| https://bugs.webkit.org/show_bug.cgi?id=213265 |
| <rdar://problem/64424742> |
| |
| Reviewed by Simon Fraser. |
| |
| If we are unable to allocate the backing store for the WebGL |
| content, we should immediately lose the context. |
| |
| * platform/graphics/angle/GraphicsContextGLANGLE.cpp: |
| (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): Lose the context if the |
| call to allocateIOSurfaceBackingStore didn't work. |
| * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: |
| (WebCore::GraphicsContextGLOpenGL::allocateIOSurfaceBackingStore): |
| * platform/graphics/cocoa/WebGLLayer.h: |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer allocateIOSurfaceBackingStoreWithSize:usingAlpha:]): Return a boolean |
| so that we can detect if the allocation failed. |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.h: |
| * platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp: |
| (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): |
| |
| 2020-06-16 Eric Carlson <eric.carlson@apple.com> |
| |
| Don't claim to support fullscreen mode unless fullScreenEnabled setting is enabled |
| https://bugs.webkit.org/show_bug.cgi?id=213142 |
| <rdar://63753327> |
| |
| Reviewed by Jer Noble. |
| |
| Test: media/video-supports-fullscreen.html |
| |
| * html/HTMLVideoElement.cpp: |
| (WebCore::HTMLVideoElement::supportsFullscreen const): Check settings.fullScreenEnabled. |
| |
| 2020-06-16 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for accessibility/textarea-selected-text-range.html in isolated tree mode. |
| https://bugs.webkit.org/show_bug.cgi?id=213257 |
| |
| Reviewed by Chris Fleizach. |
| |
| accessibility/textarea-selected-text-range.html. |
| |
| Implementation of AXIsolatedObject::selectedTextRange. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::selectedTextRange const): |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-06-16 Pavel Feldman <pavel.feldman@gmail.com> |
| |
| Web Inspector: replace completion handler with a function in interception. |
| https://bugs.webkit.org/show_bug.cgi?id=213252 |
| |
| Reviewed by Devin Rousso. |
| |
| Don't use a `CompletionHandler` as it asserts that it's been called when it's destroyed. |
| Both `Network.interceptRequestWithResponse` and `Network.interceptRequestWithError` essentially |
| "skip" the network pipeline, so the `CompletionHandler` is not invoked for those commands. |
| |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::interceptRequestImpl): |
| * inspector/InspectorInstrumentation.h: |
| (WebCore::InspectorInstrumentation::interceptRequest): |
| * inspector/InspectorInstrumentationWebKit.cpp: |
| (WebCore::InspectorInstrumentationWebKit::interceptRequestInternal): |
| * inspector/InspectorInstrumentationWebKit.h: |
| (WebCore::InspectorInstrumentationWebKit::interceptRequest): |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::interceptRequest): |
| (WebCore::InspectorNetworkAgent::interceptRequestWithResponse): |
| (WebCore::InspectorNetworkAgent::interceptRequestWithError): |
| * inspector/agents/InspectorNetworkAgent.h: |
| (WebCore::InspectorNetworkAgent::PendingInterceptRequest::PendingInterceptRequest): |
| (WebCore::InspectorNetworkAgent::PendingInterceptRequest::continueAsHandled): |
| |
| 2020-06-16 Clark Wang <clark_wang@apple.com> |
| |
| Added missing position attributes to PannerNode |
| https://bugs.webkit.org/show_bug.cgi?id=213151 |
| |
| Reviewed by Chris Dumez. |
| |
| Implemented position attributes in PannerNode interface, as per spec: |
| https://www.w3.org/TR/webaudio/#pannernode. |
| |
| Re-baselined tests previous tests that either now pass, or fail at a further stage than before. |
| |
| * Modules/webaudio/PannerNode.cpp: |
| (WebCore::PannerNode::PannerNode): |
| (WebCore::PannerNode::position const): |
| (WebCore::PannerNode::setPosition): |
| (WebCore::PannerNode::getAzimuthElevation): |
| (WebCore::PannerNode::dopplerRate): |
| (WebCore::PannerNode::distanceConeGain): |
| * Modules/webaudio/PannerNode.h: |
| * Modules/webaudio/PannerNode.idl: |
| |
| 2020-06-16 Mark Lam <mark.lam@apple.com> |
| |
| Make Options::useJIT() be the canonical source of truth on whether we should use the JIT. |
| https://bugs.webkit.org/show_bug.cgi?id=212556 |
| <rdar://problem/63780436> |
| |
| Reviewed by Saam Barati. |
| |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::compileSelector): |
| |
| 2020-06-16 Sam Weinig <weinig@apple.com> |
| |
| [WPT] form.action does not return document.url when unset (part of https://wpt.live/html/dom/reflection-forms.html) |
| https://bugs.webkit.org/show_bug.cgi?id=213205 |
| |
| Reviewed by David Kilzer. |
| |
| Update existing test results that now pass. |
| |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::formAction const): |
| Call document.completeURL() directly rather than getURLAttribute() as that |
| will cause the attribute to have to be looked up again. |
| |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::action const): |
| Match HTMLFormControlElement::formAction (and the spec) and return the document's |
| url if the attribute value is missing. |
| |
| * html/HTMLFormElement.idl: |
| Remove Reflect/URL extended attributes, as we need custom handling for the empty |
| case. |
| |
| 2020-06-16 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r262994): Web Inspector is killed when context-clicking anywhere |
| <https://webkit.org/b/213224> |
| <rdar://problem/64383320> |
| |
| Reviewed by Darin Adler. |
| |
| Test: TestWebKitAPI.WebCore.ContextMenuAction_IsValidEnum |
| |
| The issue is that using WTF::isValidEnum() with |
| WTF::EnumTraits<WebCore::ContextMenuAction> didn't explicitly |
| list all 1000 custom tags, or any application tags (besides the |
| base), so the unlisted tags were marked as invalid during enum |
| validation. |
| |
| The fix is to define a custom validation function for |
| WebCore::ContextMenuAction enum values. |
| |
| * platform/ContextMenuItem.h: |
| (WTF::isValidEnum): |
| |
| * platform/ContextMenuItem.cpp: |
| (WebCore::isValidContextMenuAction): Add. |
| - Validates CustomTag and ApplicationTag ranges. |
| * platform/ContextMenuItem.h: |
| (WebCore::isValidContextMenuAction): Add declaration. |
| (WTF::EnumTraits<WebCore::ContextMenuAction>): Delete. |
| (WTF::HasCustomIsValidEnum<WebCore::ContextMenuAction>): Add. |
| (WTF::isValidEnum): Add. |
| - Call WebCore::isValidContextMenuAction() to validate all enum |
| values. |
| |
| 2020-06-16 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [CMake][Visual Studio] CSSPropertyNames.h is generated twice in WebCore.vcxproj and WebCore_CopyPrivateHeaders.vcxproj |
| https://bugs.webkit.org/show_bug.cgi?id=213226 |
| |
| Reviewed by Don Olmstead. |
| |
| WebCore_CopyPrivateHeaders needs to have a direct or indirect |
| dependency of WebCore target for CMake Visual Studio generator to |
| eliminate duplicated custom commands. |
| |
| * CMakeLists.txt: Added add_dependencies(WebCore_CopyPrivateHeaders WebCore). |
| |
| 2020-06-16 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation should handle nested item boundary elements |
| https://bugs.webkit.org/show_bug.cgi?id=213251 |
| <rdar://problem/63371514> |
| |
| Reviewed by Sihui Liu. |
| |
| In the case where there are nested item boundary elements (e.g. block-level list items or links), text |
| manipulation will currently only observe that we've crossed the top-level item boundary, and proceed to extract |
| text from the nested boundary elements as tokens in the same item. |
| |
| Address this by maintaining a stack of boundary elements rather than just a single item. Additionally, create |
| and add an item when crossing into a new item boundary, rather than only when we exit a boundary; this handles |
| the case where we descend from one boundary element into another boundary element that is a child. |
| |
| Test: TextManipulation.StartTextManipulationTreatsNestedInlineBlockListItemsAndLinksAsParagraphs |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::observeParagraphs): |
| |
| 2020-06-16 Youenn Fablet <youenn@apple.com> |
| |
| Loads triggered by an opaque stylesheet should not be visible to service workers |
| https://bugs.webkit.org/show_bug.cgi?id=213246 |
| |
| Reviewed by Alex Christensen. |
| |
| Test: http/wpt/service-workers/no-cors-css-with-subresources.https.html |
| |
| * loader/ResourceLoaderOptions.h: |
| Move it to boolean |
| |
| 2020-06-16 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: <address> element should no longer map to ARIA `contentinfo` role |
| https://bugs.webkit.org/show_bug.cgi?id=212617 |
| <rdar://problem/63848604> |
| |
| Reviewed by Joanmarie Diggs. |
| |
| Change the mapping of <address> to be a basic group. Update tests. |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::determineAccessibilityRole): |
| |
| 2020-06-16 Truitt Savell <tsavell@apple.com> |
| |
| Unreviewed, reverting r263079. |
| |
| Broke Internal builds. |
| |
| Reverted changeset: |
| |
| "IndexedDB: Support IDBFactory databases method" |
| https://bugs.webkit.org/show_bug.cgi?id=211043 |
| https://trac.webkit.org/changeset/263079 |
| |
| 2020-06-16 Antti Koivisto <antti@apple.com> |
| |
| O(n^2) behavior in media query resolution |
| https://bugs.webkit.org/show_bug.cgi?id=213243 |
| |
| Reviewed by Anders Carlsson. |
| |
| We were traversing all rules in a RuleSet inside a loop over all media queries that change value. |
| This becomes problematic when you have thousands of media queries. |
| |
| * style/RuleSet.cpp: |
| (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules): |
| |
| Instead collect the rule positions that need flipping into a map and then traverse only once |
| to do the actual flipping. |
| |
| Longer term we should maintain a data stucture that can map directly from a position to RuleDatas. |
| This will require some data structure rethink so this patch takes a simpler approach. |
| |
| (WebCore::Style::RuleSet::MediaQueryCollector::pop): |
| * style/RuleSet.h: |
| |
| 2020-06-16 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Collecting screen properties in the UI process introduced a Safari launch time regression. |
| https://bugs.webkit.org/show_bug.cgi?id=213217 |
| <rdar://problem/64374461> |
| |
| Reviewed by Brent Fulgham. |
| |
| Calling collectScreenProperties() in WebProcessPool::platformInitializeWebProcess() introduced a Safari launch time regression on iOS. |
| It turns out that calling screenIsMonochrome on iOS is expensive, but this call can still be done in the WebContent process, since there |
| are no sandbox restrictions making that call fail in the WebContent process. Call this function in the WebContent process instead of in |
| the UI process. |
| |
| No new tests, since this change should not introduce a change in behavior. It goes back to calling the screenIsMonochrome function in the |
| WebContent process. |
| |
| * platform/ScreenProperties.h: |
| (WebCore::ScreenData::encode const): |
| (WebCore::ScreenData::decode): |
| * platform/ios/PlatformScreenIOS.mm: |
| (WebCore::screenIsMonochrome): |
| (WebCore::collectScreenProperties): |
| * platform/mac/PlatformScreenMac.mm: |
| (WebCore::collectScreenProperties): |
| |
| 2020-06-16 Xabier Rodriguez Calvar <calvaris@igalia.com> |
| |
| [EME] Create CDMProxyFactory |
| https://bugs.webkit.org/show_bug.cgi?id=212695 |
| |
| Reviewed by Youenn Fablet. |
| |
| Currently in the GStreamer port we have the CDMProxy cabled in the |
| player private and set to the instance. Setting this too late can |
| create key sync issues that are worked around. This does not seem |
| to be needed because it can be created in the constructor from a |
| CDMProxyFactory if we just use the key system that we already |
| have. |
| |
| This patch declares a CDMProxyFactory that is used in the |
| CDMInstanceProxy to instantiate the proper CDMProxy in its |
| constructor. |
| |
| CDMProxyFactoryClearKey is created and added to the GStreamer |
| platform CDMProxyFactories. |
| |
| Initializing too fast creates flakyness in several ClearKey tests |
| because of asking for protected memory so we need to initialize it |
| in a lazy way. |
| |
| No new tests, just a rework. |
| |
| * platform/encryptedmedia/CDMProxy.cpp: |
| (WebCore::CDMProxyFactory::registerFactory): |
| (WebCore::CDMProxyFactory::unregisterFactory): |
| (WebCore::CDMProxyFactory::createCDMProxyForKeySystem): |
| (WebCore::CDMProxyFactory::platformRegisterFactories): |
| * platform/encryptedmedia/CDMProxy.h: |
| (WebCore::CDMProxyFactory::~CDMProxyFactory): |
| (WebCore::CDMInstanceProxy::CDMInstanceProxy): |
| * platform/encryptedmedia/clearkey/CDMClearKey.cpp: |
| (WebCore::CDMInstanceClearKey::CDMInstanceClearKey): |
| (WebCore::CDMInstanceClearKey::keySystem const): |
| * platform/encryptedmedia/clearkey/CDMClearKey.h: |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceAttached): |
| * platform/graphics/gstreamer/eme/CDMFactoryGStreamer.cpp: |
| (WebCore::CDMProxyFactory::platformRegisterFactories): |
| * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: |
| (WebCore::CDMProxyFactoryClearKey::singleton): |
| (WebCore::CDMProxyFactoryClearKey::createCDMProxy): |
| (WebCore::CDMProxyFactoryClearKey::supportsKeySystem): |
| * platform/graphics/gstreamer/eme/CDMProxyClearKey.h: |
| |
| 2020-06-16 youenn fablet <youenn@apple.com> |
| |
| Make sure MediaRecorder.requestData returns data with the new writer backend |
| https://bugs.webkit.org/show_bug.cgi?id=206929 |
| |
| Reviewed by Darin Adler. |
| |
| Test: http/wpt/mediarecorder/MediaRecorder-requestData.html |
| |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (WebCore::MediaRecorderPrivateWriter::fetchData): |
| Flush data whenever calling fetchData. |
| |
| 2020-06-16 Darryl Pogue <darryl@dpogue.ca> |
| |
| IndexedDB: Support IDBFactory databases method |
| https://bugs.webkit.org/show_bug.cgi?id=211043 |
| |
| Reviewed by Youenn Fablet. |
| |
| Add support for fetching the list of IDB database names and versions |
| from the IDBServer, and expose the functionality as |
| `IDBFactory.prototype.databases()`. |
| |
| Spec: https://w3c.github.io/IndexedDB/#dom-idbfactory-databases |
| |
| * Headers.cmake: |
| * Modules/indexeddb/IDBActiveDOMObject.h: |
| (WebCore::IDBActiveDOMObject::performCallbackOnOriginThread): |
| * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.cpp: Added. |
| (WebCore::IDBDatabaseNameAndVersionRequest::create): |
| (WebCore::IDBDatabaseNameAndVersionRequest::IDBDatabaseNameAndVersionRequest): |
| (WebCore::IDBDatabaseNameAndVersionRequest::~IDBDatabaseNameAndVersionRequest): |
| (WebCore::IDBDatabaseNameAndVersionRequest::complete): |
| (WebCore::IDBDatabaseNameAndVersionRequest::activeDOMObjectName const): |
| (WebCore::IDBDatabaseNameAndVersionRequest::virtualHasPendingActivity const): |
| (WebCore::IDBDatabaseNameAndVersionRequest::stop): |
| * Modules/indexeddb/IDBDatabaseNameAndVersionRequest.h: Added. |
| * Modules/indexeddb/IDBFactory.cpp: |
| (WebCore::IDBFactory::databases): |
| (WebCore::IDBFactory::getAllDatabaseNames): |
| * Modules/indexeddb/IDBFactory.h: |
| * Modules/indexeddb/IDBFactory.idl: |
| * Modules/indexeddb/client/IDBConnectionProxy.cpp: |
| (WebCore::IDBClient::IDBConnectionProxy::connectionToServerLost): |
| (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionProxy::didGetAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionProxy::forgetActivityForCurrentThread): |
| (WebCore::IDBClient::IDBConnectionProxy::getAllDatabaseNames): Deleted. |
| * Modules/indexeddb/client/IDBConnectionProxy.h: |
| * Modules/indexeddb/client/IDBConnectionToServer.cpp: |
| (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNamesAndVersions): |
| (WebCore::IDBClient::IDBConnectionToServer::getAllDatabaseNames): Deleted. |
| (WebCore::IDBClient::IDBConnectionToServer::didGetAllDatabaseNames): Deleted. |
| * Modules/indexeddb/client/IDBConnectionToServer.h: |
| * Modules/indexeddb/client/IDBConnectionToServerDelegate.h: |
| * Modules/indexeddb/server/IDBConnectionToClient.cpp: |
| (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNamesAndVersions): |
| (WebCore::IDBServer::IDBConnectionToClient::didGetAllDatabaseNames): Deleted. |
| * Modules/indexeddb/server/IDBConnectionToClient.h: |
| * Modules/indexeddb/server/IDBConnectionToClientDelegate.h: |
| * Modules/indexeddb/server/IDBServer.cpp: |
| (WebCore::IDBServer::IDBServer::getAllDatabaseNamesAndVersions): |
| (WebCore::IDBServer::IDBServer::getAllDatabaseNames): Deleted. |
| * Modules/indexeddb/server/IDBServer.h: |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameAndVersionFromFile): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromFile): Deleted. |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.h: |
| * Modules/indexeddb/shared/IDBDatabaseNameAndVersion.h: Added. |
| (WebCore::IDBDatabaseNameAndVersion::encode const): |
| (WebCore::IDBDatabaseNameAndVersion::decode): |
| (WebCore::IDBDatabaseNameAndVersion::isolatedCopy const): |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * inspector/agents/InspectorIndexedDBAgent.cpp: |
| (WebCore::InspectorIndexedDBAgent::requestDatabaseNames): |
| * loader/EmptyClients.cpp: |
| |
| 2020-06-15 ChangSeok Oh <changseok@webkit.org> |
| |
| [GTK] Rename GC3D to GCGL. |
| https://bugs.webkit.org/show_bug.cgi?id=211117 |
| |
| Reviewed by Fujii Hironori. |
| |
| GraphicsContext3D has been renamed to GraphicsContextGL after r254103 but some files |
| still follow the old name. This change reflects the new name to them for consistency. |
| |
| No new tests because of no new functionalities. |
| |
| * platform/TextureMapper.cmake: |
| * platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.cpp. |
| (Nicosia::GCGLANGLELayer::ANGLEContext::errorString): |
| (Nicosia::GCGLANGLELayer::ANGLEContext::lastErrorString): |
| (Nicosia::GCGLANGLELayer::ANGLEContext::createContext): |
| (Nicosia::GCGLANGLELayer::ANGLEContext::ANGLEContext): |
| (Nicosia::GCGLANGLELayer::ANGLEContext::~ANGLEContext): |
| (Nicosia::GCGLANGLELayer::ANGLEContext::makeContextCurrent): |
| (Nicosia::GCGLANGLELayer::ANGLEContext::platformContext const): |
| (Nicosia::GCGLANGLELayer::GCGLANGLELayer): |
| (Nicosia::GCGLANGLELayer::~GCGLANGLELayer): |
| (Nicosia::GCGLANGLELayer::makeContextCurrent): |
| (Nicosia::GCGLANGLELayer::platformContext const): |
| * platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DANGLELayer.h. |
| * platform/graphics/nicosia/texmap/NicosiaGCGLLayer.cpp: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp. |
| (Nicosia::GCGLLayer::GCGLLayer): |
| (Nicosia::GCGLLayer::~GCGLLayer): |
| (Nicosia::GCGLLayer::makeContextCurrent): |
| (Nicosia::GCGLLayer::platformContext const): |
| (Nicosia::GCGLLayer::swapBuffersIfNeeded): |
| * platform/graphics/nicosia/texmap/NicosiaGCGLLayer.h: Renamed from Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h. |
| (Nicosia::GCGLLayer::contentLayer const): |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.h: |
| * platform/graphics/texmap/GraphicsContextGLTextureMapper.cpp: |
| (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): |
| * platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp. |
| (WebCore::TextureMapperGCGLPlatformLayer::TextureMapperGCGLPlatformLayer): |
| (WebCore::TextureMapperGCGLPlatformLayer::~TextureMapperGCGLPlatformLayer): |
| (WebCore::TextureMapperGCGLPlatformLayer::makeContextCurrent): |
| (WebCore::TextureMapperGCGLPlatformLayer::platformContext const): |
| (WebCore::TextureMapperGCGLPlatformLayer::proxy const): |
| (WebCore::TextureMapperGCGLPlatformLayer::swapBuffersIfNeeded): |
| (WebCore::TextureMapperGCGLPlatformLayer::paintToTextureMapper): |
| * platform/graphics/texmap/TextureMapperGCGLPlatformLayer.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h. |
| |
| 2020-06-15 Megan Gardner <megan_gardner@apple.com> |
| |
| Text form controls can scroll by 1px when value is the same length as size. No scrolling should happen. |
| https://bugs.webkit.org/show_bug.cgi?id=212856 |
| <rdar://problem/63541707> |
| |
| Reviewed by Zalan Bujtas. |
| |
| We were only adding caret width to an input when determining if the input should start to be scrolled, |
| but that additional width was not included in the initial calculation, which could result in fields being |
| scrollable by 1px when they had the same number of fixed-width characters as the size of the field. This was |
| incorrect, and caused fast/forms/password-scrolled-after-caps-lock-toggled.html to fail when the default size |
| of the security dots increased to be the same as the average character width. Adding the caret width when the |
| size of the input field is calculated brings consistency to when an input field is scrollable. |
| |
| Tested by fixing: |
| fast/forms/password-scrolled-after-caps-lock-toggled.html |
| |
| And rebasing: |
| * editing/editable-region/overflow-scroll-text-field-and-contenteditable-expected.txt: |
| * editing/editable-region/search-field-basic-expected.txt: |
| * editing/editable-region/text-field-basic-expected.txt: |
| * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly-expected.html: |
| * fast/forms/auto-fill-button/hide-auto-fill-button-when-input-becomes-readonly.html: |
| * fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: |
| * fast/forms/fieldset/fieldset-elements-htmlcollection-expected.txt: |
| * fast/forms/fieldset/fieldset-elements-htmlcollection.html: |
| * fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled-expected.html: |
| * fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html: |
| * fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly-expected.html: |
| * fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html: |
| * platform/ios-simulator/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt: |
| * platform/ios-simulator/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: |
| * platform/ios-simulator/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt: |
| * platform/ios-simulator/fast/forms/datalist/datalist-searchinput-appearance-expected.txt: |
| * platform/ios-simulator/fast/forms/datalist/datalist-textinput-appearance-expected.txt: |
| * platform/ios-wk2/editing/input/caret-at-the-edge-of-contenteditable-expected.txt: |
| * platform/ios-wk2/editing/input/caret-at-the-edge-of-input-expected.txt: |
| * platform/ios-wk2/editing/inserting/before-after-input-element-expected.txt: |
| * platform/ios-wk2/editing/pasteboard/input-field-1-expected.txt: |
| * platform/ios-wk2/editing/selection/4895428-3-expected.txt: |
| * platform/ios-wk2/editing/selection/drag-select-1-expected.txt: |
| * platform/ios-wk2/editing/selection/select-from-textfield-outwards-expected.txt: |
| * platform/ios-wk2/fast/forms/input-appearance-preventDefault-expected.txt: |
| * platform/ios-wk2/fast/forms/input-text-click-inside-expected.txt: |
| * platform/ios-wk2/fast/forms/input-text-click-outside-expected.txt: |
| * platform/ios-wk2/fast/forms/input-text-double-click-expected.txt: |
| * platform/ios-wk2/fast/forms/input-text-drag-down-expected.txt: |
| * platform/ios-wk2/fast/forms/input-text-option-delete-expected.txt: |
| * platform/ios-wk2/fast/forms/input-text-self-emptying-click-expected.txt: |
| * platform/ios-wk2/fast/forms/tabbing-input-iframe-expected.txt: |
| * platform/ios-wk2/fast/forms/textfield-outline-expected.txt: |
| * platform/ios-wk2/fast/overflow/overflow-focus-ring-expected.txt: |
| * platform/ios-wk2/fast/repaint/placeholder-after-caps-lock-hidden-expected.txt: |
| * platform/ios-wk2/fast/transforms/transformed-focused-text-input-expected.txt: |
| * platform/ios/editing/pasteboard/4806874-expected.txt: |
| * platform/ios/editing/selection/3690703-2-expected.txt: |
| * platform/ios/editing/selection/3690703-expected.txt: |
| * platform/ios/editing/selection/3690719-expected.txt: |
| * platform/ios/editing/selection/4975120-expected.txt: |
| * platform/ios/fast/clip/outline-overflowClip-expected.txt: |
| * platform/ios/fast/css/focus-ring-exists-for-search-field-expected.txt: |
| * platform/ios/fast/css/input-search-padding-expected.txt: |
| * platform/ios/fast/css/line-height-expected.txt: |
| * platform/ios/fast/css/text-overflow-input-expected.txt: |
| * platform/ios/fast/events/context-no-deselect-expected.txt: |
| * platform/ios/fast/forms/auto-fill-button/input-contacts-auto-fill-button-expected.txt: |
| * platform/ios/fast/forms/basic-inputs-expected.txt: |
| * platform/ios/fast/forms/box-shadow-override-expected.txt: |
| * platform/ios/fast/forms/control-restrict-line-height-expected.txt: |
| * platform/ios/fast/forms/encoding-test-expected.txt: |
| * platform/ios/fast/forms/fieldset-align-expected.txt: |
| * platform/ios/fast/forms/form-element-geometry-expected.txt: |
| * platform/ios/fast/forms/input-align-expected.txt: |
| * platform/ios/fast/forms/input-appearance-bkcolor-expected.txt: |
| * platform/ios/fast/forms/input-appearance-default-bkcolor-expected.txt: |
| * platform/ios/fast/forms/input-appearance-focus-expected.txt: |
| * platform/ios/fast/forms/input-appearance-height-expected.txt: |
| * platform/ios/fast/forms/input-appearance-selection-expected.txt: |
| * platform/ios/fast/forms/input-appearance-visibility-expected.txt: |
| * platform/ios/fast/forms/input-appearance-width-expected.txt: |
| * platform/ios/fast/forms/input-disabled-color-expected.txt: |
| * platform/ios/fast/forms/input-double-click-selection-gap-bug-expected.txt: |
| * platform/ios/fast/forms/input-placeholder-visibility-1-expected.txt: |
| * platform/ios/fast/forms/input-placeholder-visibility-3-expected.txt: |
| * platform/ios/fast/forms/input-spaces-expected.txt: |
| * platform/ios/fast/forms/input-table-expected.txt: |
| * platform/ios/fast/forms/input-text-click-inside-expected.txt: |
| * platform/ios/fast/forms/input-text-scroll-left-on-blur-expected.txt: |
| * platform/ios/fast/forms/input-text-self-emptying-click-expected.txt: |
| * platform/ios/fast/forms/input-type-text-min-width-expected.txt: |
| * platform/ios/fast/forms/input-value-expected.txt: |
| * platform/ios/fast/forms/input-width-expected.txt: |
| * platform/ios/fast/forms/minWidthPercent-expected.txt: |
| * platform/ios/fast/forms/number/number-appearance-rtl-expected.txt: |
| * platform/ios/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt: |
| * platform/ios/fast/forms/number/number-appearance-spinbutton-layer-expected.txt: |
| * platform/ios/fast/forms/placeholder-pseudo-style-expected.txt: |
| * platform/ios/fast/forms/search-cancel-button-style-sharing-expected.txt: |
| * platform/ios/fast/forms/search-display-none-cancel-button-expected.txt: |
| * platform/ios/fast/forms/search-input-rtl-expected.txt: |
| * platform/ios/fast/forms/search-styled-expected.txt: |
| * platform/ios/fast/forms/tabbing-input-iframe-expected.txt: |
| * platform/ios/fast/forms/text-control-intrinsic-widths-expected.txt: |
| * platform/ios/fast/forms/textfield-focus-ring-expected.txt: |
| * platform/ios/fast/forms/textfield-overflow-expected.txt: |
| * platform/ios/fast/frames/take-focus-from-iframe-expected.txt: |
| * platform/ios/fast/html/details-no-summary4-expected.txt: |
| * platform/ios/fast/html/details-open-javascript-expected.txt: |
| * platform/ios/fast/html/details-open2-expected.txt: |
| * platform/ios/fast/html/details-open4-expected.txt: |
| * platform/ios/fast/lists/dynamic-marker-crash-expected.txt: |
| * platform/ios/fast/replaced/replaced-breaking-expected.txt: |
| * platform/ios/fast/replaced/replaced-breaking-mixture-expected.txt: |
| * platform/ios/fast/table/colspanMinWidth-expected.txt: |
| * platform/ios/fast/table/spanOverlapRepaint-expected.txt: |
| * platform/ios/fast/table/text-field-baseline-expected.txt: |
| * platform/ios/svg/custom/inline-svg-in-xhtml-expected.txt: |
| * platform/ios/svg/hixie/mixed/003-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug1188-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug12384-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug18359-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug24200-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug2479-2-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug2479-3-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug2479-4-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug28928-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug4382-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug4527-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug46368-1-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug46368-2-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug51037-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug55545-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug59354-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug7342-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug96334-expected.txt: |
| * platform/ios/tables/mozilla/bugs/bug99948-expected.txt: |
| * platform/ios/tables/mozilla/dom/tableDom-expected.txt: |
| * platform/ios/tables/mozilla/other/move_row-expected.txt: |
| * platform/ios/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt: |
| * platform/ios/tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt: |
| * platform/ios/transforms/3d/general/perspective-non-layer-expected.txt: |
| * platform/mac-mojave/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt: |
| * platform/mac/editing/input/caret-at-the-edge-of-input-expected.txt: |
| * platform/mac/editing/inserting/before-after-input-element-expected.txt: |
| * platform/mac/editing/pasteboard/4806874-expected.txt: |
| * platform/mac/editing/pasteboard/drop-text-without-selection-expected.txt: |
| * platform/mac/editing/pasteboard/input-field-1-expected.txt: |
| * platform/mac/editing/selection/3690703-2-expected.txt: |
| * platform/mac/editing/selection/3690703-expected.txt: |
| * platform/mac/editing/selection/3690719-expected.txt: |
| * platform/mac/editing/selection/4895428-3-expected.txt: |
| * platform/mac/editing/selection/4975120-expected.txt: |
| * platform/mac/editing/selection/drag-select-1-expected.txt: |
| * platform/mac/editing/selection/select-from-textfield-outwards-expected.txt: |
| * platform/mac/fast/css/focus-ring-exists-for-search-field-expected.txt: |
| * platform/mac/fast/css/line-height-expected.txt: |
| * platform/mac/fast/css/text-overflow-input-expected.txt: |
| * platform/mac/fast/events/context-no-deselect-expected.txt: |
| * platform/mac/fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset-expected.txt: |
| * platform/mac/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: |
| * platform/mac/fast/forms/auto-fill-button/input-contacts-auto-fill-button-expected.txt: |
| * platform/mac/fast/forms/auto-fill-button/input-strong-password-viewable-expected.txt: |
| * platform/mac/fast/forms/basic-inputs-expected.txt: |
| * platform/mac/fast/forms/box-shadow-override-expected.txt: |
| * platform/mac/fast/forms/control-restrict-line-height-expected.txt: |
| * platform/mac/fast/forms/datalist/datalist-searchinput-appearance-expected.txt: |
| * platform/mac/fast/forms/datalist/datalist-textinput-appearance-expected.txt: |
| * platform/mac/fast/forms/encoding-test-expected.txt: |
| * platform/mac/fast/forms/fieldset-align-expected.txt: |
| * platform/mac/fast/forms/form-element-geometry-expected.txt: |
| * platform/mac/fast/forms/input-align-expected.txt: |
| * platform/mac/fast/forms/input-appearance-bkcolor-expected.txt: |
| * platform/mac/fast/forms/input-appearance-default-bkcolor-expected.txt: |
| * platform/mac/fast/forms/input-appearance-focus-expected.txt: |
| * platform/mac/fast/forms/input-appearance-height-expected.txt: |
| * platform/mac/fast/forms/input-appearance-preventDefault-expected.txt: |
| * platform/mac/fast/forms/input-appearance-selection-expected.txt: |
| * platform/mac/fast/forms/input-appearance-spinbutton-expected.txt: |
| * platform/mac/fast/forms/input-appearance-spinbutton-up-expected.txt: |
| * platform/mac/fast/forms/input-appearance-visibility-expected.txt: |
| * platform/mac/fast/forms/input-appearance-width-expected.txt: |
| * platform/mac/fast/forms/input-baseline-expected.txt: |
| * platform/mac/fast/forms/input-disabled-color-expected.txt: |
| * platform/mac/fast/forms/input-double-click-selection-gap-bug-expected.txt: |
| * platform/mac/fast/forms/input-placeholder-visibility-1-expected.txt: |
| * platform/mac/fast/forms/input-placeholder-visibility-3-expected.txt: |
| * platform/mac/fast/forms/input-spaces-expected.txt: |
| * platform/mac/fast/forms/input-table-expected.txt: |
| * platform/mac/fast/forms/input-text-click-inside-expected.txt: |
| * platform/mac/fast/forms/input-text-click-outside-expected.txt: |
| * platform/mac/fast/forms/input-text-double-click-expected.txt: |
| * platform/mac/fast/forms/input-text-drag-down-expected.txt: |
| * platform/mac/fast/forms/input-text-option-delete-expected.txt: |
| * platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt: |
| * platform/mac/fast/forms/input-text-self-emptying-click-expected.txt: |
| * platform/mac/fast/forms/input-text-word-wrap-expected.txt: |
| * platform/mac/fast/forms/input-type-text-min-width-expected.txt: |
| * platform/mac/fast/forms/input-value-expected.txt: |
| * platform/mac/fast/forms/input-width-expected.txt: |
| * platform/mac/fast/forms/number/number-appearance-rtl-expected.txt: |
| * platform/mac/fast/forms/number/number-appearance-spinbutton-disabled-readonly-expected.txt: |
| * platform/mac/fast/forms/number/number-appearance-spinbutton-layer-expected.txt: |
| * platform/mac/fast/forms/placeholder-position-expected.txt: |
| * platform/mac/fast/forms/placeholder-pseudo-style-expected.txt: |
| * platform/mac/fast/forms/search-cancel-button-style-sharing-expected.txt: |
| * platform/mac/fast/forms/search-display-none-cancel-button-expected.txt: |
| * platform/mac/fast/forms/search-input-rtl-expected.txt: |
| * platform/mac/fast/forms/search-styled-expected.txt: |
| * platform/mac/fast/forms/search-vertical-alignment-expected.txt: |
| * platform/mac/fast/forms/search/search-padding-cancel-results-buttons-expected.txt: |
| * platform/mac/fast/forms/search/search-size-with-decorations-expected.txt: |
| * platform/mac/fast/forms/tabbing-input-iframe-expected.txt: |
| * platform/mac/fast/forms/text-control-intrinsic-widths-expected.txt: |
| * platform/mac/fast/forms/textfield-focus-ring-expected.txt: |
| * platform/mac/fast/forms/textfield-outline-expected.txt: |
| * platform/mac/fast/forms/textfield-overflow-expected.txt: |
| * platform/mac/fast/forms/visual-hebrew-text-field-expected.txt: |
| * platform/mac/fast/frames/take-focus-from-iframe-expected.txt: |
| * platform/mac/fast/html/details-no-summary4-expected.txt: |
| * platform/mac/fast/html/details-open-javascript-expected.txt: |
| * platform/mac/fast/html/details-open2-expected.txt: |
| * platform/mac/fast/html/details-open4-expected.txt: |
| * platform/mac/fast/lists/dynamic-marker-crash-expected.txt: |
| * platform/mac/fast/repaint/renderer-destruction-by-invalidateSelection-crash-expected.txt: |
| * platform/mac/fast/repaint/search-field-cancel-expected.txt: |
| * platform/mac/fast/repaint/subtree-root-skipped-expected.txt: |
| * platform/mac/fast/replaced/replaced-breaking-expected.txt: |
| * platform/mac/fast/replaced/replaced-breaking-mixture-expected.txt: |
| * platform/mac/fast/table/colspanMinWidth-expected.txt: |
| * platform/mac/fast/table/spanOverlapRepaint-expected.txt: |
| * platform/mac/fast/table/text-field-baseline-expected.txt: |
| * platform/mac/fast/text/textIteratorNilRenderer-expected.txt: |
| * platform/mac/fast/transforms/transformed-focused-text-input-expected.txt: |
| * platform/mac/http/tests/navigation/javascriptlink-frames-expected.txt: |
| * platform/mac/plugins/mouse-click-plugin-clears-selection-expected.txt: |
| * platform/mac/svg/custom/inline-svg-in-xhtml-expected.txt: |
| * platform/mac/svg/hixie/mixed/003-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug1188-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug12384-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug18359-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug24200-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug2479-2-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug2479-3-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug2479-4-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug28928-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug4382-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug4527-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug46368-1-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug46368-2-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug51037-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug55545-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug59354-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug7342-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug96334-expected.txt: |
| * platform/mac/tables/mozilla/bugs/bug99948-expected.txt: |
| * platform/mac/tables/mozilla/dom/tableDom-expected.txt: |
| * platform/mac/tables/mozilla/other/move_row-expected.txt: |
| * platform/mac/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt: |
| * platform/mac/tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt: |
| * platform/mac/transforms/3d/general/perspective-non-layer-expected.txt: |
| * platform/win/editing/input/caret-at-the-edge-of-input-expected.txt: |
| * platform/win/editing/inserting/before-after-input-element-expected.txt: |
| * platform/win/fast/css/focus-ring-exists-for-search-field-expected.txt: |
| * platform/win/fast/events/context-no-deselect-expected.txt: |
| * platform/win/fast/forms/auto-fill-button/input-auto-fill-button-expected.txt: |
| * platform/win/fast/forms/auto-fill-button/input-contacts-auto-fill-button-expected.txt: |
| * platform/win/fast/forms/auto-fill-button/input-credit-card-auto-fill-button-expected.txt: |
| * platform/win/fast/forms/basic-inputs-expected.txt: |
| * platform/win/fast/forms/box-shadow-override-expected.txt: |
| * platform/win/fast/forms/control-restrict-line-height-expected.txt: |
| * platform/win/fast/forms/encoding-test-expected.txt: |
| * platform/win/fast/forms/fieldset-align-expected.txt: |
| * platform/win/fast/forms/form-element-geometry-expected.txt: |
| * platform/win/fast/forms/input-align-expected.txt: |
| * platform/win/fast/forms/input-appearance-bkcolor-expected.txt: |
| * platform/win/fast/forms/input-appearance-default-bkcolor-expected.txt: |
| * platform/win/fast/forms/input-appearance-disabled-expected.txt: |
| * platform/win/fast/forms/input-appearance-focus-expected.txt: |
| * platform/win/fast/forms/input-appearance-height-expected.txt: |
| * platform/win/fast/forms/input-appearance-readonly-expected.txt: |
| * platform/win/fast/forms/input-appearance-selection-expected.txt: |
| * platform/win/fast/forms/input-appearance-visibility-expected.txt: |
| * platform/win/fast/forms/input-appearance-width-expected.txt: |
| * platform/win/fast/forms/input-baseline-expected.txt: |
| * platform/win/fast/forms/input-disabled-color-expected.txt: |
| * platform/win/fast/forms/input-double-click-selection-gap-bug-expected.txt: |
| * platform/win/fast/forms/input-placeholder-visibility-1-expected.txt: |
| * platform/win/fast/forms/input-placeholder-visibility-3-expected.txt: |
| * platform/win/fast/forms/input-readonly-autoscroll-expected.txt: |
| * platform/win/fast/forms/input-readonly-dimmed-expected.txt: |
| * platform/win/fast/forms/input-readonly-empty-expected.txt: |
| * platform/win/fast/forms/input-spaces-expected.txt: |
| * platform/win/fast/forms/input-table-expected.txt: |
| * platform/win/fast/forms/input-text-click-inside-expected.txt: |
| * platform/win/fast/forms/input-text-click-outside-expected.txt: |
| * platform/win/fast/forms/input-text-double-click-expected.txt: |
| * platform/win/fast/forms/input-text-drag-down-expected.txt: |
| * platform/win/fast/forms/input-text-option-delete-expected.txt: |
| * platform/win/fast/forms/input-text-scroll-left-on-blur-expected.txt: |
| * platform/win/fast/forms/input-text-self-emptying-click-expected.txt: |
| * platform/win/fast/forms/input-text-word-wrap-expected.txt: |
| * platform/win/fast/forms/input-type-text-min-width-expected.txt: |
| * platform/win/fast/forms/input-value-expected.txt: |
| * platform/win/fast/forms/input-width-expected.txt: |
| * platform/win/fast/forms/placeholder-pseudo-style-expected.txt: |
| * platform/win/fast/forms/search-cancel-button-style-sharing-expected.txt: |
| * platform/win/fast/forms/search-display-none-cancel-button-expected.txt: |
| * platform/win/fast/forms/search-styled-expected.txt: |
| * platform/win/fast/forms/search-vertical-alignment-expected.txt: |
| * platform/win/fast/forms/search/search-size-with-decorations-expected.txt: |
| * platform/win/fast/forms/tabbing-input-iframe-expected.txt: |
| * platform/win/fast/forms/text-control-intrinsic-widths-expected.txt: |
| * platform/win/fast/forms/textfield-focus-ring-expected.txt: |
| * platform/win/fast/forms/textfield-outline-expected.txt: |
| * platform/win/fast/forms/textfield-overflow-expected.txt: |
| * platform/win/fast/forms/visual-hebrew-text-field-expected.txt: |
| * platform/win/fast/frames/take-focus-from-iframe-expected.txt: |
| * platform/win/fast/html/details-no-summary4-expected.txt: |
| * platform/win/fast/html/details-open-javascript-expected.txt: |
| * platform/win/fast/html/details-open2-expected.txt: |
| * platform/win/fast/html/details-open4-expected.txt: |
| * platform/win/fast/lists/dynamic-marker-crash-expected.txt: |
| * platform/win/fast/replaced/replaced-breaking-expected.txt: |
| * platform/win/fast/replaced/replaced-breaking-mixture-expected.txt: |
| * platform/win/fast/table/colspanMinWidth-expected.txt: |
| * platform/win/fast/table/spanOverlapRepaint-expected.txt: |
| * platform/win/fast/table/text-field-baseline-expected.txt: |
| * platform/win/fast/text/textIteratorNilRenderer-expected.txt: |
| * platform/win/fast/transforms/transformed-focused-text-input-expected.txt: |
| * platform/win/svg/hixie/mixed/003-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug1188-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug12384-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug18359-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug24200-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug2479-2-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug2479-3-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug2479-4-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug28928-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug4382-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug4527-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug46368-1-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug46368-2-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug51037-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug55545-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug59354-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug7342-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug96334-expected.txt: |
| * platform/win/tables/mozilla/bugs/bug99948-expected.txt: |
| * platform/win/tables/mozilla/dom/tableDom-expected.txt: |
| * platform/win/tables/mozilla/other/move_row-expected.txt: |
| * platform/win/tables/mozilla_expected_failures/bugs/bug2479-5-expected.txt: |
| * platform/win/tables/mozilla_expected_failures/bugs/bug92647-1-expected.txt: |
| |
| * rendering/ComplexLineLayout.cpp: |
| (WebCore::ComplexLineLayout::addOverflowFromInlineChildren): |
| * rendering/RenderBlockFlow.h: |
| (WebCore::RenderBlockFlow::endPaddingWidthForCaret const): |
| * rendering/RenderTextControlSingleLine.cpp: |
| (WebCore::RenderTextControlSingleLine::preferredContentLogicalWidth const): |
| |
| 2020-06-15 Pavel Feldman <pavel.feldman@gmail.com> |
| |
| Web Inspector: introduce request interception |
| https://bugs.webkit.org/show_bug.cgi?id=207446 |
| |
| Reviewed by Devin Rousso. |
| |
| This change introduces network request interception to the Network |
| protocol domain. It adds Network.interceptWithRequest notification that |
| can be continued, modified or fulfilled. NetworkStage enum can now have |
| 'request' and 'response' values. |
| |
| Tests: http/tests/inspector/network/intercept-aborted-request.html |
| http/tests/inspector/network/intercept-request-continue.html |
| http/tests/inspector/network/intercept-request-fragment.html |
| http/tests/inspector/network/intercept-request-main-resource-with-response.html |
| http/tests/inspector/network/intercept-request-main-resource.html |
| http/tests/inspector/network/intercept-request-properties.html |
| http/tests/inspector/network/intercept-request-subresource-with-error.html |
| http/tests/inspector/network/intercept-request-subresource-with-response.html |
| http/tests/inspector/network/intercept-request-subresource.html |
| http/tests/inspector/network/intercept-request-with-response.html |
| |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::willInterceptImpl): |
| (WebCore::InspectorInstrumentation::shouldInterceptRequestImpl): |
| (WebCore::InspectorInstrumentation::interceptRequestImpl): |
| * inspector/InspectorInstrumentation.h: |
| (WebCore::InspectorInstrumentation::willIntercept): |
| (WebCore::InspectorInstrumentation::shouldInterceptRequest): |
| (WebCore::InspectorInstrumentation::interceptRequest): |
| * inspector/InspectorInstrumentationWebKit.cpp: |
| (WebCore::InspectorInstrumentationWebKit::shouldInterceptRequestInternal): |
| (WebCore::InspectorInstrumentationWebKit::interceptRequestInternal): |
| * inspector/InspectorInstrumentationWebKit.h: |
| (WebCore::InspectorInstrumentationWebKit::shouldInterceptRequest): |
| (WebCore::InspectorInstrumentationWebKit::interceptRequest): |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::disable): |
| (WebCore::InspectorNetworkAgent::shouldIntercept): |
| (WebCore::InspectorNetworkAgent::continuePendingRequests): |
| (WebCore::InspectorNetworkAgent::setInterceptionEnabled): |
| (WebCore::InspectorNetworkAgent::addInterception): |
| (WebCore::InspectorNetworkAgent::removeInterception): |
| (WebCore::InspectorNetworkAgent::willIntercept): |
| (WebCore::InspectorNetworkAgent::shouldInterceptRequest): |
| (WebCore::InspectorNetworkAgent::shouldInterceptResponse): |
| (WebCore::InspectorNetworkAgent::interceptRequest): |
| (WebCore::InspectorNetworkAgent::interceptContinue): |
| (WebCore::InspectorNetworkAgent::interceptWithRequest): |
| (WebCore::InspectorNetworkAgent::interceptRequestWithResponse): |
| (WebCore::InspectorNetworkAgent::interceptRequestWithError): |
| * inspector/agents/InspectorNetworkAgent.h: |
| (WebCore::InspectorNetworkAgent::PendingInterceptRequest::PendingInterceptRequest): |
| (WebCore::InspectorNetworkAgent::PendingInterceptRequest::continueWithOriginalRequest): |
| (WebCore::InspectorNetworkAgent::PendingInterceptRequest::continueWithRequest): |
| (WebCore::InspectorNetworkAgent::Intercept::operator== const): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::requestResource): |
| (WebCore::CachedResourceLoader::preload): |
| |
| 2020-06-15 Keith Miller <keith_miller@apple.com> |
| |
| JIT thunks should work on arm64_32 |
| https://bugs.webkit.org/show_bug.cgi?id=213103 |
| |
| Reviewed by Saam Barati. |
| |
| Refactor timesPtr() to ScalePtr. |
| |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasClasses): |
| |
| 2020-06-15 Sihui Liu <sihui_liu@apple.com> |
| |
| Text manipulation does not observe newly displayed element inside previously observed content |
| https://bugs.webkit.org/show_bug.cgi?id=213156 |
| |
| Reviewed by Darin Adler. |
| |
| Fix two issues: |
| 1. Some inserted nodes are marked as manipulated, but they are inserted because they get removed in the |
| replacement process, not because they are manipulated or in the range of item. |
| 2. TextManipulationController does not perform manipulation on an element if its ancestor is manipulated. This |
| means the newly inserted/displayed children of a manipulated element are ruled out for manipulation. |
| |
| Test: TextManipulation.CompleteTextManipulationForNewlyDisplayedParagraph |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::observeParagraphs): |
| (WebCore::TextManipulationController::didCreateRendererForElement): |
| (WebCore::TextManipulationController::updateInsertions): |
| (WebCore::TextManipulationController::replace): |
| (WebCore::TextManipulationController::isInManipulatedElement): Deleted. |
| * editing/TextManipulationController.h: |
| |
| 2020-06-15 Víctor Manuel Jáquez Leal <vjaquez@igalia.com> |
| |
| Suppress compiler warnings |
| https://bugs.webkit.org/show_bug.cgi?id=213034 |
| |
| Reviewed by Darin Adler. |
| |
| Use PRIu64 formatter for uint64_t instead of %llu. |
| |
| No functional changes. |
| |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd): |
| |
| 2020-06-15 ChangSeok Oh <changseok@webkit.org> |
| |
| [GTK] Use GRefPtr for ManetteMonitor |
| https://bugs.webkit.org/show_bug.cgi?id=213094 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| We should use GRefPtr for ManetteMonitor, but not GUniquePtr. Because it is a gobject instance. |
| |
| No new tests because of no functionality changed. |
| |
| * platform/gamepad/manette/ManetteGamepadProvider.h: |
| |
| 2020-06-15 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| super should not depend on __proto__ |
| https://bugs.webkit.org/show_bug.cgi?id=157972 |
| |
| Reviewed by Saam Barati. |
| |
| No new tests, no behavior change. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): Set OverridesGetPrototype structure flag for CustomGetPrototype IDL attribute. |
| |
| 2020-06-15 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] ImageDecoder hits Debug ASSERTs |
| https://bugs.webkit.org/show_bug.cgi?id=213178 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Pass a reference of the decoder to its inner implementation instead of a WeakPtr, which |
| can't be used across multiple threads. |
| |
| Covered by fast/images/animated-image-mp4{,-crash}.html tests. |
| |
| * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: |
| (WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad): |
| * platform/graphics/gstreamer/ImageDecoderGStreamer.h: |
| |
| 2020-06-15 Youenn Fablet <youenn@apple.com> |
| |
| Simplify MediaRecorderPrivateWriterCocoa threading logic |
| https://bugs.webkit.org/show_bug.cgi?id=213126 |
| |
| Reviewed by Eric Carlson. |
| |
| Always hop to the main thread when receiving compressed samples. |
| This makes the threading model simpler and pushing enqueued samples in the writer is not very performance sensitive. |
| |
| Add handling of the special case of video samples being pushed but no compressed sample is yet produced. |
| In that case, when stopping recording, the samples will be pushed and we will start the writer. |
| |
| Minor refactoring to remove some unnecessary checks and make sure some of the member fields gets initialized in their declaration. |
| Covered by existing tests. |
| |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: |
| (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor): |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback): |
| (WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback): |
| (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::stopRecording): |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: |
| (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor): |
| |
| 2020-06-15 Youenn Fablet <youenn@apple.com> |
| |
| Add a quirk to allow starting AudioContext if document was interacted |
| https://bugs.webkit.org/show_bug.cgi?id=213118 |
| |
| Reviewed by Eric Carlson. |
| |
| Manually tested on bing.com. |
| |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::isDocumentAllowingAutoplayWebAudio): |
| (WebCore::AudioContext::willBeginPlayback): |
| * page/Quirks.cpp: |
| (WebCore::Quirks::shouldAutoplayWebAudioForArbitraryUserGesture const): |
| * page/Quirks.h: |
| |
| 2020-06-15 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Move textFromUTF8() to TextResourceDecoder from FetchBodyConsumer |
| https://bugs.webkit.org/show_bug.cgi?id=213170 |
| |
| Reviewed by Youenn Fablet. |
| |
| This function abstracts https://encoding.spec.whatwg.org/#utf-8-decode |
| so I think it's better to place to `TextResourceDecoder`. |
| |
| * Modules/fetch/FetchBodyConsumer.cpp: |
| (WebCore::resolveWithTypeAndData): |
| (WebCore::FetchBodyConsumer::takeAsText): |
| * loader/TextResourceDecoder.cpp: |
| (WebCore::shouldPrependBOM): |
| (WebCore::TextResourceDecoder::textFromUTF8): |
| * loader/TextResourceDecoder.h: |
| |
| 2020-06-15 Youenn Fablet <youenn@apple.com> |
| |
| MediaRecorder should not be collectable when fetching data from its backend |
| https://bugs.webkit.org/show_bug.cgi?id=213121 |
| |
| Reviewed by Eric Carlson. |
| |
| Take a pending activity when fetching data since we might want dispatch an event when receiving the fetch data. |
| Covered by existing tests no longer crashing in debug. |
| |
| * Modules/mediarecorder/MediaRecorder.cpp: |
| (WebCore::MediaRecorder::stopRecording): |
| (WebCore::MediaRecorder::requestData): |
| |
| 2020-06-14 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed, reverting r262124. |
| |
| Twitter videos go blank after exiting fullscreen |
| |
| Reverted changeset: |
| |
| "[css-flex] Allow indefinite size flex items to be definite |
| wrt resolving percentages inside them" |
| https://bugs.webkit.org/show_bug.cgi?id=212264 |
| https://trac.webkit.org/changeset/262124 |
| |
| 2020-06-14 Sam Weinig <weinig@apple.com> |
| |
| [WPT] html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray.html fails due to lack of caching of Plugin objects |
| https://bugs.webkit.org/show_bug.cgi?id=213185 |
| |
| Reviewed by Darin Adler. |
| |
| Tests: |
| - Updates results for web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/navigator-pluginarray.html |
| which now passes. |
| - Splits up http/tests/plugins/plugin-javascript-access.html, adding |
| http/tests/plugins/plugin-javascript-access-allow-all-plugins.html |
| which tests the internals.setShowAllPlugins(true) case. This was |
| required now that the plugin and mimetype arrays are immutable after |
| creation. |
| |
| Overhaul web exposed plugin APIs: |
| - All DOMPlugin and DOMMimeTypes are now created together (along with the DOMPluginArray and |
| DOMMimeTypeArray) on first access of either navigator.plugins or navigator.mimeTypes. |
| - DOMPlugins are created and stored in the DOMPluginArray (fixing the initial lack of caching issue) |
| - DOMMimeTypes are created and stored in the DOMMimeTypeArray. |
| - DOMPlugins hold a strong reference to their associated DOMMimeType. The DOMMimeType has |
| a weak reference back to the DOMPlugin. This means for a single executation context, we only |
| ever create one DOMPlugin / DOMMimeType for each underlying plugin / mimetype. |
| - Update GC so that DOMPlugin and DOMMimeType (in addition to DOMPluginArray and DOMMimeTypeArray |
| which were already doing this) use navigator reachability for their lifetime. This is almost |
| correct, except if we ever implement DOMPluginArray.refresh(false) to match the spec, in which |
| case you could end up with some DOMPlugins and DOMMimeTypes that are marked as reachable when |
| they really are not, but only plugins that were removed. This seems so unlikely to matter that |
| implementing a more strict reachability function seems like the wrong way to go. |
| |
| * CMakeLists.txt: |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources.make: |
| * WebCore.xcodeproj/project.pbxproj: |
| Add NavigatorPlugins.idl |
| |
| * loader/SubframeLoader.cpp: |
| (WebCore::findPluginMIMETypeFromURL): |
| (WebCore::logPluginRequest): |
| Simplify and cleanup code making use of the new webVisibleMimeTypes() rather than the |
| clunky getWebVisibleMimesAndPluginIndices(). |
| |
| * page/Navigator.cpp: |
| * page/Navigator.h: |
| (WebCore::Navigator::initializePluginAndMIMETypeArrays): |
| (WebCore::Navigator::plugins): |
| (WebCore::Navigator::mimeTypes): |
| Fully initialize Navigator.plugins/mimeTypes on first access of either, following |
| the specified behavior that they should not change after initial access for a script |
| execution context. This also ensures we always return the same wrappers for these |
| objects on multiple accesses, something the spec mandates but we failed to do prior. |
| In addition, we now correctly sort the plugins by name and mimeTypes by type, also as |
| specified. |
| |
| * page/Navigator.idl: |
| * page/NavigatorPlugins.idl: Added. |
| Split NavigatorPlugins out of Navigator.idl as specified. No functional change but |
| makes things nicer when we match the spec closer. |
| |
| * plugins/DOMMimeType.cpp: |
| (WebCore::DOMMimeType::DOMMimeType): |
| (WebCore::DOMMimeType::suffixes const): |
| (WebCore::DOMMimeType::enabledPlugin const): |
| * plugins/DOMMimeType.h: |
| (WebCore::DOMMimeType::create): |
| (WebCore::DOMMimeType::navigator): |
| * plugins/DOMMimeType.idl: |
| * plugins/DOMMimeTypeArray.cpp: |
| (WebCore::DOMMimeTypeArray::DOMMimeTypeArray): |
| (WebCore::DOMMimeTypeArray::length const): |
| (WebCore::DOMMimeTypeArray::item): |
| (WebCore::DOMMimeTypeArray::namedItem): |
| (WebCore::DOMMimeTypeArray::supportedPropertyNames): |
| (WebCore::DOMMimeTypeArray::getPluginData const): Deleted. |
| * plugins/DOMMimeTypeArray.h: |
| * plugins/DOMPlugin.cpp: |
| (WebCore::DOMPlugin::DOMPlugin): |
| (WebCore::DOMPlugin::item): |
| (WebCore::DOMPlugin::namedItem): |
| (WebCore::DOMPlugin::supportedPropertyNames): |
| * plugins/DOMPlugin.h: |
| * plugins/DOMPlugin.idl: |
| * plugins/DOMPluginArray.cpp: |
| (WebCore::DOMPluginArray::DOMPluginArray): |
| (WebCore::DOMPluginArray::length const): |
| (WebCore::DOMPluginArray::item): |
| (WebCore::DOMPluginArray::namedItem): |
| (WebCore::DOMPluginArray::supportedPropertyNames): |
| (WebCore::DOMPluginArray::pluginData const): Deleted. |
| * plugins/DOMPluginArray.h: |
| Rather than dynamically accessing plugin information through Page |
| on each interaction with the DOM plugin objects, we now fully initialize |
| them on creation, allowing for correct wrapper caching and behavior if |
| plugins are added / removed (e.g. the arrays should not change). |
| |
| * plugins/PluginData.cpp: |
| (WebCore::PluginData::initPlugins): |
| (WebCore::PluginData::publiclyVisiblePluginsAndAdditionalWebVisiblePlugins const): |
| (WebCore::PluginData::webVisibleMimeTypes const): |
| (WebCore::supportsMimeTypeForPlugins): |
| (WebCore::PluginData::supportsMimeType const): |
| (WebCore::PluginData::supportsWebVisibleMimeType const): |
| (WebCore::PluginData::supportsWebVisibleMimeTypeForURL const): |
| (WebCore::PluginData::pluginFileForWebVisibleMimeType const): |
| (WebCore::PluginData::publiclyVisiblePlugins const): Deleted. |
| (WebCore::PluginData::getWebVisibleMimesAndPluginIndices const): Deleted. |
| (WebCore::PluginData::getMimesAndPluginIndices const): Deleted. |
| (WebCore::PluginData::getMimesAndPluginIndiciesForPlugins const): Deleted. |
| (WebCore::PluginData::getPluginInfoForWebVisibleMimeType const): Deleted. |
| * plugins/PluginData.h: |
| Simplify interface by removing out parameter based getWebVisibleMimesAndPluginIndices |
| (and helpers) and adding more straigtword alternatives. getWebVisibleMimesAndPluginIndices |
| was useful for the old DOM plugin model, but now that the arrays are initialized all |
| together, it no longer provides an optimization. Instead, all callers really just want |
| a either a list of MimeClassInfos or to know if one is supported under a specific scenario, |
| so we now just expose that. |
| |
| 2020-06-14 Sam Weinig <weinig@apple.com> |
| |
| [WPT] websockets/Close-reason-unpaired-surrogates.any.html fails due to failure to convert unpaired surrogates to replacement character for close reason |
| https://bugs.webkit.org/show_bug.cgi?id=213182 |
| |
| Reviewed by Darin Adler. |
| |
| Now passing the following tests: |
| imported/w3c/web-platform-tests/websockets/Close-reason-unpaired-surrogates.any.html |
| imported/w3c/web-platform-tests/websockets/Close-reason-unpaired-surrogates.any.worker.html |
| imported/w3c/web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.html |
| imported/w3c/web-platform-tests/websockets/Secure-Close-Reason-Unpaired-surrogates.any.worker.html |
| |
| * Modules/websockets/WebSocket.idl: |
| Match spec (https://html.spec.whatwg.org/multipage/web-sockets.html#the-websocket-interface) |
| by making the reason argument in close() a USVString rather than a DOMString. This causes |
| all unpaired surrogates to be replaced with \uFFFD, the replacement character. |
| |
| 2020-06-14 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Withdraw FileReaderSync from ServiceWorker |
| https://bugs.webkit.org/show_bug.cgi?id=213136 |
| |
| Reviewed by Darin Adler. |
| |
| `FileReaderSync` is not exposed for ServiceWorker. |
| |
| - https://w3c.github.io/FileAPI/#FileReaderSync |
| - https://github.com/w3c/FileAPI/issues/16 |
| |
| We does not support SharedWorker. We don't have to care about it. |
| |
| |
| * fileapi/FileReaderSync.idl: |
| |
| 2020-06-13 Rob Buis <rbuis@igalia.com> |
| |
| https://bugs.webkit.org/show_bug.cgi?id=213166 |
| Rename executeIfJavaScriptURL to executeJavaScriptURL |
| |
| Reviewed by Darin Adler. |
| |
| Rename executeIfJavaScriptURL to executeJavaScriptURL in order to make the function |
| unconditional, i.e. the passed url is expected to have the javascript protocol, this |
| is asserted first thing in the method. This allows us to remove the return parameter |
| since the remaining return statements all return true. |
| |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::executeJavaScriptURL): |
| (WebCore::ScriptController::executeIfJavaScriptURL): Deleted. |
| * bindings/js/ScriptController.h: |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::changeLocation): |
| (WebCore::FrameLoader::submitForm): |
| * loader/SubframeLoader.cpp: |
| (WebCore::FrameLoader::SubframeLoader::requestFrame): |
| |
| 2020-06-13 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][Floats] Floating positioned box is always a float avoider. |
| https://bugs.webkit.org/show_bug.cgi?id=213162 |
| |
| Reviewed by Darin Adler. |
| |
| Test: fast/layoutformattingcontext/inline-float-simple.html |
| |
| * layout/layouttree/LayoutBox.cpp: |
| (WebCore::Layout::Box::isFloatAvoider const): also fix the independent formatting context case. |
| |
| 2020-06-13 Sam Weinig <weinig@apple.com> |
| |
| [WPT] dom/nodes/Document-createCDATASection-xhtml.xhtml fails due to missing exception in Document.createCDATASection() |
| https://bugs.webkit.org/show_bug.cgi?id=213167 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Tested by existing (formerly failing) test: imported/w3c/web-platform-tests/dom/nodes/Document-createCDATASection-xhtml.xhtml |
| |
| Throw an "InvalidCharacterError" DOMException if the data passed to createCDATASection |
| contains the string "]]>" as specified by https://dom.spec.whatwg.org/#dom-document-createcdatasection |
| |
| * dom/Document.cpp: |
| (WebCore::Document::createCDATASection): |
| |
| 2020-06-13 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| Obsolete comment in FontCustomPlatformDataFreeType.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=213169 |
| |
| Unreviewed, remove the stale comment. |
| |
| * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: |
| (WebCore::defaultFontconfigOptions): |
| |
| 2020-06-13 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Experiment with strongly typed ColorComponents |
| https://bugs.webkit.org/show_bug.cgi?id=212396 |
| |
| Reviewed by Darin Adler. |
| |
| Adds simple explicit types for sRGBA, LinearSRGBA, DisplayP3, |
| LinearDisplayP3, XYZA and HSLA colors. Conversion to/from |
| ColorComponents<float> is easy but explicit to make conversions |
| easier to spot. |
| |
| The goal is to add type clarity (you know when you are dealing |
| with an sRGB color vs. a DisplayP3 color) and make dealing with |
| the colors nicer (color.red rather than color[0]). It also allows |
| us to simplify the naming of functions that convert between color |
| types as now only the output type needs to be in the function name. |
| |
| * Headers.cmake: |
| Add new header, ColorTypes.h |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| Add new header, ColorTypes.h |
| |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::parseHSLParameters): |
| Switch from hslToSRGB({ ... }) to toSRGBA(HSLAColor { ... }) |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::DataDetection::detectContentInRange): |
| Update to use toHSLA() and HSLA<float> making the code a bit more readable. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::lightened const): |
| (WebCore::Color::darkened const): |
| (WebCore::Color::isDark const): |
| (WebCore::Color::lightness const): |
| (WebCore::Color::luminance const): |
| (WebCore::Color::colorSpaceAndComponents const): |
| (WebCore::Color::toSRGBASimpleColorLossy const): |
| (WebCore::Color::toSRGBALossy const): |
| (WebCore::Color::toSRGBAComponentsLossy const): Deleted. |
| * platform/graphics/Color.h: |
| Renames toSRGBAComponentsLossy() to toSRGBALossy() which now returns |
| a SRGBA<float>. |
| |
| * platform/graphics/ColorMatrix.h: |
| (WebCore::ColorMatrix::transformColorComponents const): Deleted. |
| Remove transformColorComponents, keeping just transformedColorComponents |
| to simplify the interface. With late conversion to ColorComponents, the |
| latter is more straightforward to use in most cases anyway. |
| |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::linearToRGBColorComponent): |
| (WebCore::rgbToLinearColorComponent): |
| (WebCore::toLinearSRGBA): |
| (WebCore::toSRGBA): |
| (WebCore::toLinearDisplayP3): |
| (WebCore::toDisplayP3): |
| (WebCore::toXYZ): |
| (WebCore::lightness): |
| (WebCore::luminance): |
| (WebCore::contrastRatio): |
| (WebCore::toHSLA): |
| (WebCore::premultiplied): |
| (WebCore::rgbToLinearComponents): Deleted. |
| (WebCore::linearToRGBComponents): Deleted. |
| (WebCore::xyzToLinearSRGB): Deleted. |
| (WebCore::linearSRGBToXYZ): Deleted. |
| (WebCore::XYZToLinearP3): Deleted. |
| (WebCore::linearP3ToXYZ): Deleted. |
| (WebCore::p3ToSRGB): Deleted. |
| (WebCore::sRGBToP3): Deleted. |
| (WebCore::sRGBToHSL): Deleted. |
| (WebCore::hslToSRGB): Deleted. |
| * platform/graphics/ColorUtilities.h: |
| Rename / rework conversion and utility functions to operate on explicit Color |
| types. In doing so, simplify the names of the conversion functions so only name |
| the output type. For instance: |
| |
| ColorComponents<float> p3ToSRGB(const ColorComponents<float>&); |
| |
| is now |
| |
| SRGBA<float> toSRGBA(const DisplayP3<float>&); |
| |
| as the input type is implicit in the call. A little duplication was needed |
| for linearToRGBColorComponent/rgbToLinearColorComponent (as it was used for |
| both sRGB and DisplayP3 linearization), but mostly things stay the same. |
| |
| * platform/graphics/ExtendedColor.cpp: |
| (WebCore::ExtendedColor::toSRGBALossy const): |
| (WebCore::ExtendedColor::toSRGBAComponentsLossy const): Deleted. |
| * platform/graphics/ExtendedColor.h: |
| Renamed toSRGBAComponentsLossy() to toSRGBALossy() and have it |
| return a SRGBA<float>. |
| |
| * platform/graphics/SimpleColor.h: |
| (WebCore::SimpleColor::asSRGBA const): |
| (WebCore::makeSimpleColor): |
| (WebCore::SimpleColor::asSRGBFloatComponents const): Deleted. |
| Rename asSRGBFloatComponents() to asSRGBA<T>() and have it |
| return a SRGBA<float>. Replace makeSimpleColor taking FloatComponents |
| with one taking a SRGBA<float>, making it much clearer that this |
| is only valid for sRGB. |
| |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::drawLighting): |
| Rework to support seperate types for SRGB<float> and LinearSRGBA<float>. |
| |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::drawLighting): |
| * platform/graphics/filters/FilterOperation.cpp: |
| (WebCore::BasicColorMatrixFilterOperation::transformColor const): |
| (WebCore::BasicComponentTransferFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): |
| * platform/graphics/filters/FilterOperation.h: |
| (WebCore::FilterOperation::transformColor const): |
| (WebCore::FilterOperation::inverseTransformColor const): |
| * platform/graphics/filters/FilterOperations.cpp: |
| (WebCore::FilterOperations::transformColor const): |
| (WebCore::FilterOperations::inverseTransformColor const): |
| Use SRGBA<float> rather than ColorComponents<float> to make it clear |
| that the filters only work on sRGB colors right now. |
| |
| * rendering/RenderTheme.cpp: |
| (WebCore::RenderTheme::disabledTextColor const): |
| * rendering/TextPaintStyle.cpp: |
| (WebCore::textColorIsLegibleAgainstBackgroundColor): |
| * platform/graphics/cairo/CairoUtilities.cpp: |
| (WebCore::setSourceRGBAFromColor): |
| * platform/graphics/cairo/GradientCairo.cpp: |
| (WebCore::addColorStopRGBA): |
| (WebCore::setCornerColorRGBA): |
| (WebCore::interpolateColorStop): |
| * platform/graphics/gtk/ColorGtk.cpp: |
| (WebCore::Color::operator GdkRGBA const): |
| * platform/graphics/texmap/TextureMapperGL.cpp: |
| (WebCore::TextureMapperGL::drawBorder): |
| (WebCore::TextureMapperGL::drawNumber): |
| (WebCore::prepareFilterProgram): |
| (WebCore::TextureMapperGL::drawSolidColor): |
| (WebCore::TextureMapperGL::clearColor): |
| * platform/graphics/win/ColorDirect2D.cpp: |
| (WebCore::Color::operator D2D1_COLOR_F const): |
| (WebCore::Color::operator D2D1_VECTOR_4F const): |
| * platform/graphics/win/GradientDirect2D.cpp: |
| (WebCore::Gradient::generateGradient): |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: |
| (WebCore::GraphicsContext::colorWithGlobalAlpha const): |
| Update to call toSRGBALossy() rather than toSRGBAComponentsLossy(). |
| |
| 2020-06-13 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Remove FileError.h |
| https://bugs.webkit.org/show_bug.cgi?id=213119 |
| |
| Reviewed by Chris Dumez. |
| |
| * Headers.cmake: |
| * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: |
| (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::didFail): |
| * Modules/async-clipboard/ClipboardItemBindingsDataSource.h: |
| * Modules/mediastream/RTCDataChannel.cpp: |
| (WebCore::RTCDataChannel::createMessageQueue): |
| * Modules/websockets/WebSocketChannel.cpp: |
| (WebCore::WebSocketChannel::didFail): |
| (WebCore::WebSocketChannel::abortOutgoingFrameQueue): |
| * Modules/websockets/WebSocketChannel.h: |
| * WebCore.xcodeproj/project.pbxproj: |
| * fileapi/BlobLoader.h: |
| (WebCore::BlobLoader::didFail): |
| * fileapi/FileError.h: Removed. |
| * fileapi/FileReader.cpp: |
| (WebCore::FileReader::didFail): |
| * fileapi/FileReader.h: |
| * fileapi/FileReaderLoader.cpp: |
| (WebCore::FileReaderLoader::start): |
| (WebCore::FileReaderLoader::cancel): |
| (WebCore::FileReaderLoader::cleanup): |
| (WebCore::FileReaderLoader::didReceiveResponse): |
| (WebCore::FileReaderLoader::didReceiveData): |
| (WebCore::FileReaderLoader::didFail): |
| (WebCore::FileReaderLoader::failed): |
| (WebCore::FileReaderLoader::toErrorCode): |
| (WebCore::FileReaderLoader::httpStatusCodeToErrorCode): |
| (WebCore::FileReaderLoader::arrayBufferResult const): |
| (WebCore::FileReaderLoader::stringResult): |
| * fileapi/FileReaderLoader.h: |
| (WebCore::FileReaderLoader::errorCode const): |
| * fileapi/FileReaderLoaderClient.h: |
| * fileapi/FileReaderSync.cpp: |
| (WebCore::FileReaderSync::startLoading): |
| * fileapi/FileReaderSync.h: |
| * fileapi/NetworkSendQueue.cpp: |
| (WebCore::NetworkSendQueue::processMessages): |
| * fileapi/NetworkSendQueue.h: |
| * html/ImageBitmap.cpp: |
| |
| 2020-06-12 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION(r261985): Unable to respond to large comments on Bugzilla with always-on scrollbars |
| https://bugs.webkit.org/show_bug.cgi?id=213135 |
| <rdar://problem/64302086> |
| |
| Reviewed by Tim Horton. |
| |
| The combination of programmatic scrolls (e.g. anchor click, reveal selection) and user scrolling |
| could result in a mismatch between the main thread and scrolling thread scroll positions, resulting |
| in missing tiles and offset cursor handling. |
| |
| This happened if a programmatic scroll occurred and 'scrolledSinceLastCommit' was true for |
| the equivalent scrolling node at the start of a rendering update. synchronizeStateFromScrollingTree() |
| would take the scrolling thread's notion of the scroll position, clobbering the position resulting |
| from the programmatic scroll. |
| |
| To fix this, call commitTreeStateIfNeeded() before synchronizeStateFromScrollingTree() to ensure that |
| any programmatic scrolls have been pushed to the scrolling tree before we fetch its state. |
| |
| Some infrastructure is needed for testing; getting into the state where a programmatic |
| scroll and 'scrolledSinceLastCommit' happened in the same event loop cycle required adding |
| internals.scrollBySimulatingWheelEvent(), which just pokes the scrolling tree directly |
| without the complexities of wheel events dispatched via the UI process. |
| |
| Test: scrollingcoordinator/mac/reveal-selection-tile-coverage.html |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::scrollBySimulatingWheelEventForTesting): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::scrollBySimulatingWheelEventForTesting): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::scrollBySimulatingWheelEventForTesting): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::willStartRenderingUpdate): |
| * testing/Internals.cpp: |
| (WebCore::Internals::scrollBySimulatingWheelEvent): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-12 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC hardening] Check enum values in IPC::Decoder::decodeEnum() an IPC::Encoder::encodeEnum() |
| <https://webkit.org/b/211988> |
| <rdar://problem/63137695> |
| |
| Reviewed by Darin Adler. |
| |
| Replace decodeEnum() with decode() and encodeEnum() with |
| operator<<(). |
| |
| * Modules/applicationmanifest/ApplicationManifest.h: |
| (WebCore::ApplicationManifest::decode): |
| * Modules/indexeddb/IDBKeyData.h: |
| (WebCore::IDBKeyData::encode const): |
| (WebCore::IDBKeyData::decode): |
| * Modules/indexeddb/shared/IDBCursorInfo.h: |
| (WebCore::IDBCursorInfo::encode const): |
| (WebCore::IDBCursorInfo::decode): |
| * Modules/indexeddb/shared/IDBError.h: |
| (WebCore::IDBError::encode const): |
| (WebCore::IDBError::decode): |
| * Modules/indexeddb/shared/IDBGetAllRecordsData.h: |
| (WebCore::IDBGetAllRecordsData::encode const): |
| (WebCore::IDBGetAllRecordsData::decode): |
| * Modules/indexeddb/shared/IDBGetRecordData.h: |
| (WebCore::IDBGetRecordData::encode const): |
| (WebCore::IDBGetRecordData::decode): |
| * Modules/indexeddb/shared/IDBIterateCursorData.h: |
| (WebCore::IDBIterateCursorData::encode const): |
| (WebCore::IDBIterateCursorData::decode): |
| * Modules/indexeddb/shared/IDBRequestData.h: |
| (WebCore::IDBRequestData::encode const): |
| (WebCore::IDBRequestData::decode): |
| * Modules/indexeddb/shared/IDBResultData.h: |
| (WebCore::IDBResultData::encode const): |
| (WebCore::IDBResultData::decode): |
| * Modules/indexeddb/shared/IDBTransactionInfo.h: |
| (WebCore::IDBTransactionInfo::encode const): |
| (WebCore::IDBTransactionInfo::decode): |
| * Modules/webauthn/PublicKeyCredentialCreationOptions.h: |
| (WebCore::PublicKeyCredentialCreationOptions::Parameters::decode): |
| (WebCore::PublicKeyCredentialCreationOptions::AuthenticatorSelectionCriteria::decode): |
| * Modules/webauthn/PublicKeyCredentialDescriptor.h: |
| (WebCore::PublicKeyCredentialDescriptor::decode): |
| * dom/ExceptionData.h: |
| (WebCore::ExceptionData::encode const): |
| (WebCore::ExceptionData::decode): |
| * html/DataListSuggestionInformation.h: |
| (WebCore::DataListSuggestionInformation::encode const): |
| (WebCore::DataListSuggestionInformation::decode): |
| * page/SecurityOrigin.h: |
| (WebCore::SecurityOrigin::encode const): |
| (WebCore::SecurityOrigin::decode): |
| * platform/ContextMenuItem.h: |
| (WTF::EnumTraits<WebCore::ContextMenuAction>): |
| - Add missing ContextMenuItemTagPasteAsPlainText that was added |
| in r261800. |
| * platform/LinkIcon.h: |
| (WebCore::LinkIcon::encode const): |
| (WebCore::LinkIcon::decode): |
| * platform/PasteboardItemInfo.h: |
| (WebCore::PasteboardItemInfo::encode const): |
| (WebCore::PasteboardItemInfo::decode): |
| * platform/ScreenProperties.h: |
| (WebCore::ScreenData::encode const): |
| (WebCore::ScreenData::decode): |
| * platform/graphics/InbandGenericCue.h: |
| (WebCore::GenericCueData::encode const): |
| * platform/graphics/Path.h: |
| (WebCore::Path::encode const): |
| (WebCore::Path::decode): |
| * platform/graphics/displaylists/DisplayListItems.h: |
| (WebCore::DisplayList::SetState::encode const): |
| (WebCore::DisplayList::SetState::decode): |
| (WebCore::DisplayList::DrawTiledScaledImage::encode const): |
| (WebCore::DisplayList::DrawTiledScaledImage::decode): |
| * platform/mediastream/CaptureDevice.h: |
| (WebCore::CaptureDevice::encode const): |
| * platform/mediastream/MediaConstraints.h: |
| (WebCore::MediaConstraint::encode const): |
| (WebCore::MediaConstraint::decode): |
| * platform/mediastream/MediaStreamRequest.h: |
| (WebCore::MediaStreamRequest::encode const): |
| (WebCore::MediaStreamRequest::decode): |
| * platform/mediastream/RealtimeMediaSourceCapabilities.h: |
| (WebCore::CapabilityValueOrRange::encode const): |
| (WebCore::CapabilityValueOrRange::decode): |
| (WebCore::RealtimeMediaSourceCapabilities::encode const): |
| (WebCore::RealtimeMediaSourceCapabilities::decode): |
| * platform/mediastream/RealtimeMediaSourceSettings.h: |
| (WebCore::RealtimeMediaSourceSettings::encode const): |
| (WebCore::RealtimeMediaSourceSettings::decode): |
| * platform/mock/MockMediaDevice.h: |
| (WebCore::MockDisplayProperties::encode const): |
| * platform/network/HTTPHeaderMap.h: |
| (WebCore::HTTPHeaderMap::CommonHeader::encode const): |
| (WebCore::HTTPHeaderMap::CommonHeader::decode): |
| * testing/MockWebAuthenticationConfiguration.h: |
| (WebCore::MockWebAuthenticationConfiguration::HidConfiguration::decode): |
| (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode): |
| * workers/service/ServiceWorkerContextData.h: |
| (WebCore::ServiceWorkerContextData::decode): |
| * workers/service/ServiceWorkerJobData.h: |
| (WebCore::ServiceWorkerJobData::encode const): |
| (WebCore::ServiceWorkerJobData::decode): |
| |
| 2020-06-12 Chris Dumez <cdumez@apple.com> |
| |
| Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache |
| https://bugs.webkit.org/show_bug.cgi?id=213147 |
| <rdar://problem/64249683> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Stop allowing pages served over HTTPS with "Cache-Control: no-store" into the back/forward cache. |
| This is a revert of r250437 due to push back from Web developers. |
| |
| No new tests, updated existing tests. |
| |
| * history/BackForwardCache.cpp: |
| (WebCore::canCacheFrame): |
| |
| 2020-06-12 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Stop to use ActiveDOMObject::setPendingActivity() for Modules/fetch |
| https://bugs.webkit.org/show_bug.cgi?id=213037 |
| |
| Reviewed by Youenn Fablet. |
| |
| By ActiveDOMObject's comments, |
| these methods should be replaced with using makePendingActivity(). |
| |
| `JSFetchRequest`/`JSFetchResponse` (as derived class of `JSDOMWrapper`) hold |
| `FetchRequest`/`FetchResponse`, and they have `FetchBodyOwner` |
| as a base class and keep alive it. We can replace |
| `setPendingActivity()` calling from `FetchBodyOwner`. |
| |
| * Modules/fetch/FetchBodyOwner.cpp: |
| (WebCore::FetchBodyOwner::loadBlob): |
| (WebCore::FetchBodyOwner::finishBlobLoading): |
| (WebCore::FetchBodyOwner::virtualHasPendingActivity const): |
| * Modules/fetch/FetchBodyOwner.h: |
| * Modules/fetch/FetchBodySource.cpp: |
| (WebCore::FetchBodySource::setActive): |
| (WebCore::FetchBodySource::setInactive): |
| * Modules/fetch/FetchBodySource.h: |
| |
| |
| 2020-06-12 Takashi Komori <Takashi.Komori@sony.com> |
| |
| [Curl] Implement functions to use ResourceLoadStatistics. |
| https://bugs.webkit.org/show_bug.cgi?id=207692 |
| |
| Reviewed by Don Olmstead. |
| |
| Implement functions which are required to implement ResourceLoadStatistics for Curl port. |
| |
| Tests: http/tests/resourceLoadStatistics/ |
| |
| * CMakeLists.txt: |
| * platform/network/curl/CookieJarDB.cpp: |
| (WebCore::CookieJarDB::openDatabase): |
| (WebCore::CookieJarDB::setCookie): |
| (WebCore::CookieJarDB::allDomains): |
| (WebCore::CookieJarDB::deleteCookiesForHostname): |
| * platform/network/curl/CookieJarDB.h: |
| * platform/network/curl/NetworkStorageSessionCurl.cpp: |
| (WebCore::NetworkStorageSession::setCookiesFromDOM const): |
| (WebCore::NetworkStorageSession::setCookies): |
| (WebCore::NetworkStorageSession::deleteCookiesForHostnames): |
| (WebCore::NetworkStorageSession::getHostnamesWithCookies): |
| |
| 2020-06-12 Andres Gonzalez <andresg_22@apple.com> |
| |
| In isolated tree mode 2, AXIsolatedObject::setChildrenIDs should be called only on secondary thread. |
| https://bugs.webkit.org/show_bug.cgi?id=213124 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| - AXIsolatedTree::createSubtree was calling AXIsolatedObject::setChildrenIDs |
| which should be called only on the secondary thread. Now it is queueing |
| the children update under lock. |
| - The unsigned int range for object IDs was being overrun for large |
| number of objects like in the case of the sample page in <rdar://problem/59331146>. |
| Increased the size of AXID to size_t. |
| - Better handle the case of invalid object IDs, although this needs |
| more work, since we should never encounter this case. |
| |
| * accessibility/AccessibilityObjectInterface.h: AXID are now size_t instead of unsigned ints. |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::AXIsolatedObject): |
| (WebCore::AXIsolatedObject::setChildrenIDs): Inlined in header. |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::createSubtree): |
| |
| 2020-06-12 Andy Estes <aestes@apple.com> |
| |
| FileInputType should use WeakPtr for FileListCreator lambdas |
| https://bugs.webkit.org/show_bug.cgi?id=213130 |
| <rdar://problem/64276591> |
| |
| Reviewed by David Kilzer. |
| |
| FileInputType::filesChosen was passing a completion handler to FileListCreator::create that |
| captured |this|. If the FileListCreator instance still existed when |this| was destroyed, |
| FileInputType::~FileInputType would clear the captured |this| by calling |
| FileListCreator::clear. This can be simplified by having the FileListCreator completion |
| handler capture a WeakPtr to |this|. |
| |
| Also, when FileInputType::allowsDirectories is false, m_fileListCreator would not be |
| properly cleared after creating the file list. The FileListCreator completion handler would |
| set m_fileListCreator to nullptr, but would be executed *before* FileListCreator::create |
| returned and set m_fileListCreator to the newly-created FileListCreator object. Fixed this |
| by having FileListCreator::create execute the completion handler immediately and return |
| nullptr in cases where a FileListCreator does not need to be created for directory |
| resolution. |
| |
| Covered by existing tests. |
| |
| * html/FileInputType.cpp: |
| (WebCore::FileInputType::~FileInputType): |
| (WebCore::FileInputType::filesChosen): |
| * html/FileInputType.h: |
| * html/FileListCreator.cpp: |
| (WebCore::createFileList): |
| (WebCore::FileListCreator::create): |
| (WebCore::FileListCreator::FileListCreator): |
| (WebCore::FileListCreator::createFileList): |
| * html/FileListCreator.h: |
| (WebCore::FileListCreator::create): Deleted. |
| |
| 2020-06-12 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (r262618): Very slow typing in a github issue |
| https://bugs.webkit.org/show_bug.cgi?id=213137 |
| <rdar://problem/64214117> |
| |
| Reviewed by Darin Adler. |
| |
| Test: fast/media/media-query-keyframes-resolution-count.html |
| |
| If a stylesheet had multiple media queries and one of them forced static resolution |
| (by containing @keyframes rule for example) we would end up reseting the style multiple |
| times and forcing unneeded style resolutions. |
| |
| * style/RuleSet.cpp: |
| (WebCore::Style::RuleSet::evaluteDynamicMediaQueryRules): |
| |
| We can't bail out from the loop. Even though the result is known we still need to loop to |
| save the evaluation result for all media queries. |
| |
| 2020-06-12 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| FileReader.error should be DOMException now |
| https://bugs.webkit.org/show_bug.cgi?id=213117 |
| |
| Reviewed by Chris Dumez. |
| |
| By the [lastest spec](https://w3c.github.io/FileAPI/), |
| `FileReader.error` should return `DOMException` |
| and this remove obsoleted `FileError` from exposed interfaces. |
| |
| Internally, our codebase still depends on `fileapi/FileError.h` |
| in everywhere. I'll plan to create a patch to refactor them. |
| |
| * CMakeLists.txt: |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.order: |
| * WebCore.xcodeproj/project.pbxproj: |
| * fileapi/FileError.idl: Removed. |
| * fileapi/FileReader.cpp: |
| (WebCore::FileReader::abort): |
| (WebCore::FileReader::didFail): |
| * fileapi/FileReader.h: |
| * fileapi/FileReader.idl: |
| * fileapi/FileReaderSync.cpp: |
| (WebCore::FileReaderSync::errorCodeToException): |
| * fileapi/FileReaderSync.h: |
| |
| 2020-06-12 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for min/max-width |
| https://bugs.webkit.org/show_bug.cgi?id=213111 |
| |
| Reviewed by Antti Koivisto. |
| |
| Apply min/max-width to constrain the available width for the table content. |
| |
| Test: fast/layoutformattingcontext/table-min-max-width-simple.html |
| |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin): |
| (WebCore::Layout::BlockFormattingContext::computedWidthAndMargin): |
| * layout/blockformatting/BlockFormattingContext.h: |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox): |
| |
| 2020-06-12 Antti Koivisto <antti@apple.com> |
| |
| Relative font size values (em) within CSS animations compound |
| https://bugs.webkit.org/show_bug.cgi?id=194749 |
| <rdar://problem/48171898> |
| |
| Reviewed by Antoine Quint. |
| |
| The em unit should be relative to the font size of the parent style when resolving 'font-size' property. |
| We weren't passing the parent style when resolving keyframes. |
| |
| Test case by Scott Kellum. |
| |
| Test: animations/keyframe-em-unit.html |
| |
| * style/StyleResolver.cpp: |
| (WebCore::Style::Resolver::styleForKeyframe): |
| * style/StyleResolver.h: |
| (WebCore::Style::Resolver::overrideDocumentElementStyle const): |
| (WebCore::Style::Resolver::setOverrideDocumentElementStyle): |
| (WebCore::Style::Resolver::setParentElementStyleForKeyframes): |
| |
| Add a way to pass the parent element style directly to the style resolver. |
| This should really be passed via the animation system like other context but that requires |
| lots of refactoring. |
| |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::createAnimatedElementUpdate): |
| |
| Pass it. |
| |
| 2020-06-11 Sam Weinig <weinig@apple.com> |
| |
| Document.currentScript does not work for SVGScriptElements |
| https://bugs.webkit.org/show_bug.cgi?id=213104 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Updates results for existing tests. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| Add CurrentScriptIncrementer.h to the Xcode project as it was missing. |
| |
| * dom/CurrentScriptIncrementer.h: |
| (WebCore::CurrentScriptIncrementer::CurrentScriptIncrementer): |
| (WebCore::CurrentScriptIncrementer::~CurrentScriptIncrementer): |
| Re-work using ScriptElement, removing the HTMLScriptElement checks. Also changes |
| scriptType check to explicitly check that against classic scripts, as they are |
| the only supported type, and if any types other than modules are added in the |
| future, we would not want this to change behavior. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::pushCurrentScript): |
| * dom/Document.h: |
| (WebCore::Document::currentScript const): |
| Use an Element, rather than an HTMLScriptElement for currentScript/currentScriptStack |
| so that either an HTMLScriptElement or an SVGScriptElement can be stored. Using a |
| ScriptElement would be possible, but would complicate the implementation unnecessarily |
| by requiring currentScript to have an additional checks before extracting the Element. |
| Variant<RefPtr<HTMLScriptElement>, RefPtr<SVGScriptElement>> could also have been used |
| but also would unnecessarily complicated the interface and caused more memory to be used. |
| |
| * dom/Document.idl: |
| Update interface to use Element rather HTMLScriptElement with a comment explaining why we |
| are not using HTMLOrSVGScriptElement but retaining the same observable behavior. |
| |
| * dom/ScriptElement.cpp: |
| (WebCore::ScriptElement::executeClassicScript): |
| (WebCore::ScriptElement::executeModuleScript): |
| Pass *this directly to CurrentScriptIncrementer to simplify implementation. |
| |
| 2020-06-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make WebDriver work |
| https://bugs.webkit.org/show_bug.cgi?id=212316 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add helper gtk definitions to avoid ifdefs and implement currentScreenMonitor() for GTK4. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gtk_window_move): |
| (gtk_window_minimize): |
| (gtk_window_unminimize): |
| * platform/gtk/PlatformScreenGtk.cpp: |
| (WebCore::currentScreenMonitor): |
| (WebCore::screenRect): |
| (WebCore::screenAvailableRect): |
| (WebCore::getCurrentScreenMonitor): Deleted. |
| |
| 2020-06-11 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Add WTF::EnumTraits<> for every enum type used in IPC |
| <https://webkit.org/b/213093> |
| |
| Reviewed by Darin Adler. |
| |
| Summary: |
| - Change underlying type of enum class to `bool` when there are |
| only two values. In some cases, reorder the two values so the |
| mapping to 0 and 1 makes more sense. Converting every enum to |
| an enum class is not a goal of this patch, so some two-value |
| enums stil have WTF::EnumTraits<> defined as noted below. |
| - Add WTF::EnumTraits<> for the remaining enum types that are |
| used by IPC::Encoder::encodeEnum() and |
| IPC::Decoder::decodeEnum() so that WTF::isValidEnum<>() checks |
| may be added next. |
| - Add #include <WebCore/LibWebRTCEnumTraits.h> as needed. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| - Add LibWebRTCEnumTraits.h to project. Keep these definitions |
| separate from the libwebrtc project cut down on changes to |
| re-merge after updating. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCEnumTraits.h: Add. |
| |
| * Modules/applepay/ApplePaySessionPaymentRequest.h: |
| * Modules/indexeddb/IDBTransactionMode.h: |
| * Modules/indexeddb/IndexedDB.h: |
| (WTF::EnumTraits<WebCore::IndexedDB::IndexRecordType>): |
| - Remove after changing enum class to bool. |
| * Modules/indexeddb/shared/IDBGetRecordData.h: |
| * Modules/indexeddb/shared/IDBResultData.h: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/ExceptionCode.h: |
| * editing/CompositionUnderline.h: |
| * html/Autofill.h: |
| * html/DataListSuggestionInformation.h: |
| * html/EnterKeyHint.h: |
| * html/LinkIconType.h: |
| * loader/FrameLoaderTypes.h: |
| - Alphabetize WTF::EnumTraits<> definitions. |
| * loader/ResourceLoaderOptions.h: |
| * page/SecurityOrigin.h: |
| * page/UserStyleSheetTypes.h: |
| (WTF::EnumTraits<WebCore::UserStyleLevel>): |
| - Define this since UserStyleLevel is not an enum class. |
| * page/scrolling/ScrollingCoordinatorTypes.h: |
| * platform/ContextMenuItem.h: |
| * platform/Cursor.h: |
| * platform/DragData.h: |
| * platform/FileChooser.h: |
| * platform/PopupMenuStyle.h: |
| * platform/ScreenProperties.h: |
| * platform/ScrollTypes.h: |
| * platform/SerializedPlatformDataCueValue.h: |
| (WebCore::SerializedPlatformDataCueValue::PlatformType): |
| - Convert from enum to enum class. |
| * platform/UserInterfaceLayoutDirection.h: |
| * platform/animation/TimingFunction.h: |
| * platform/graphics/GraphicsContext.h: |
| * platform/graphics/GraphicsLayer.h: |
| * platform/graphics/GraphicsTypes.h: |
| - Alphabetize WTF::EnumTraits<> definitions. |
| * platform/graphics/Image.h: |
| * platform/graphics/Path.h: |
| * platform/graphics/ca/PlatformCAAnimation.h: |
| * platform/graphics/ca/PlatformCALayer.h: |
| * platform/graphics/filters/FilterOperation.h: |
| * platform/mediastream/MediaConstraints.h: |
| * platform/mediastream/MediaStreamRequest.h: |
| (WTF::EnumTraits<WebCore::MediaStreamRequest::Type>): |
| - Fix EnumTraits definition (missing "::Type"). |
| * platform/mediastream/RealtimeMediaSourceCapabilities.h: |
| * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h: |
| * platform/network/CredentialBase.h: |
| * platform/network/ProtectionSpaceBase.h: |
| * platform/network/ResourceErrorBase.h: |
| * platform/network/soup/SoupNetworkProxySettings.h: |
| * platform/text/TextChecking.h: |
| (WTF::EnumTraits<WebCore::TextCheckingProcessType): |
| - Define this since TextCheckingProcessType is not an enum class. |
| * platform/text/WritingMode.h: |
| * rendering/Pagination.h: |
| * workers/service/ServiceWorkerJobType.h: |
| |
| 2020-06-11 Beth Dakin <bdakin@apple.com> |
| |
| Fix comment after blocklist transition |
| https://bugs.webkit.org/show_bug.cgi?id=213100 |
| |
| Reviewed by Wenson Hsieh. |
| |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::cocoaTypeFromHTMLClipboardType): |
| |
| 2020-06-11 Rob Buis <rbuis@igalia.com> |
| |
| REGRESSION (r262776): Flaky crash under -[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:] |
| https://bugs.webkit.org/show_bug.cgi?id=213059 |
| |
| Reviewed by Alex Christensen. |
| |
| My r262776 patch did not null check m_handle and it can cause crashes |
| in some cases, so add the check. |
| |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): |
| |
| 2020-06-11 Beth Dakin <bdakin@apple.com> |
| |
| Replace instances of whitelist in WebCore with allowlist |
| https://bugs.webkit.org/show_bug.cgi?id=213068 |
| |
| Reviewed by Tim Horton. |
| |
| * Modules/webdatabase/DatabaseAuthorizer.cpp: |
| (WebCore::DatabaseAuthorizer::DatabaseAuthorizer): |
| (WebCore::DatabaseAuthorizer::addAllowedFunctions): |
| (WebCore::DatabaseAuthorizer::allowFunction): |
| (WebCore::DatabaseAuthorizer::addWhitelistedFunctions): Deleted. |
| * Modules/webdatabase/DatabaseAuthorizer.h: |
| * dom/ExtensionStyleSheets.cpp: |
| (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const): |
| * loader/CrossOriginAccessControl.cpp: |
| (WebCore::isOnAccessControlSimpleRequestMethodAllowlist): |
| (WebCore::isSimpleCrossOriginAccessRequest): |
| (WebCore::isOnAccessControlSimpleRequestMethodWhitelist): Deleted. |
| * loader/CrossOriginAccessControl.h: |
| * loader/CrossOriginPreflightResultCache.cpp: |
| (WebCore::CrossOriginPreflightResultCacheItem::allowsCrossOriginMethod const): |
| * loader/appcache/ApplicationCache.cpp: |
| (WebCore::ApplicationCache::setOnlineAllowlist): |
| (WebCore::ApplicationCache::isURLInOnlineAllowlist): |
| (WebCore::ApplicationCache::setOnlineWhitelist): Deleted. |
| (WebCore::ApplicationCache::isURLInOnlineWhitelist): Deleted. |
| * loader/appcache/ApplicationCache.h: |
| (WebCore::ApplicationCache::onlineAllowlist const): |
| (WebCore::ApplicationCache::onlineWhitelist const): Deleted. |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): |
| * loader/appcache/ApplicationCacheHost.cpp: |
| (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache): |
| (WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource): |
| * loader/appcache/ApplicationCacheStorage.cpp: |
| (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): |
| (WebCore::ApplicationCacheStorage::openDatabase): |
| (WebCore::ApplicationCacheStorage::store): |
| (WebCore::ApplicationCacheStorage::loadCache): |
| * loader/appcache/ManifestParser.cpp: |
| (WebCore::parseManifest): |
| * loader/appcache/ManifestParser.h: |
| * page/Frame.cpp: |
| (WebCore::Frame::injectUserScriptImmediately): |
| * page/SecurityOrigin.cpp: |
| (WebCore::SecurityOrigin::canRequest const): |
| (WebCore::SecurityOrigin::canDisplay const): |
| * page/SecurityPolicy.cpp: |
| (WebCore::SecurityPolicy::isAccessAllowed): |
| (WebCore::SecurityPolicy::addOriginAccessAllowlistEntry): |
| (WebCore::SecurityPolicy::removeOriginAccessAllowlistEntry): |
| (WebCore::SecurityPolicy::resetOriginAccessAllowlists): |
| (WebCore::SecurityPolicy::isAccessWhiteListed): Deleted. |
| (WebCore::SecurityPolicy::addOriginAccessWhitelistEntry): Deleted. |
| (WebCore::SecurityPolicy::removeOriginAccessWhitelistEntry): Deleted. |
| (WebCore::SecurityPolicy::resetOriginAccessWhitelists): Deleted. |
| * page/SecurityPolicy.h: |
| * page/UserContentURLPattern.cpp: |
| (WebCore::UserContentURLPattern::matchesPatterns): |
| * page/UserContentURLPattern.h: |
| * page/UserScript.h: |
| (WebCore::UserScript::UserScript): |
| (WebCore::UserScript::allowlist const): |
| (WebCore::UserScript::encode const): |
| (WebCore::UserScript::decode): |
| (WebCore::UserScript::whitelist const): Deleted. |
| * page/UserStyleSheet.h: |
| (WebCore::UserStyleSheet::UserStyleSheet): |
| (WebCore::UserStyleSheet::allowlist const): |
| (WebCore::UserStyleSheet::whitelist const): Deleted. |
| * platform/graphics/FontCache.h: |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::fontAllowlist): |
| (WebCore::FontCache::setFontAllowlist): |
| (WebCore::platformFontLookupWithFamily): |
| (WebCore::fontWhitelist): Deleted. |
| (WebCore::FontCache::setFontWhitelist): Deleted. |
| * platform/network/HTTPParsers.cpp: |
| (WebCore::isValidAcceptHeaderValue): |
| * rendering/FloatingObjects.h: |
| * style/ElementRuleCollector.cpp: |
| (WebCore::Style::ElementRuleCollector::transferMatchedRules): |
| * style/ElementRuleCollector.h: |
| * style/PropertyCascade.cpp: |
| (WebCore::Style::PropertyCascade::addMatch): |
| * style/RuleData.cpp: |
| (WebCore::Style::determinePropertyAllowlistType): |
| (WebCore::Style::RuleData::RuleData): |
| (WebCore::Style::determinePropertyWhitelistType): Deleted. |
| * style/RuleData.h: |
| (WebCore::Style::RuleData::propertyAllowlistType const): |
| (WebCore::Style::RuleData::propertyWhitelistType const): Deleted. |
| |
| 2020-06-11 Andy Estes <aestes@apple.com> |
| |
| [iOS] nullptr deref in FileInputType::iconLoaded when the input's type attribute is modified by a change event listener |
| https://bugs.webkit.org/show_bug.cgi?id=208244 |
| <rdar://problem/41855350> |
| |
| Reviewed by Wenson Hsieh. |
| |
| When an <input> element's type attribute changes, its existing InputType is detached from |
| the HTMLInputElement by nulling InputType::m_element. When FileInputType::filesChosen is |
| called, it dispatches the input and change events, which can run arbitrary JavaScript that |
| might modify the element's type attribute. If this happens, FileInputType::m_element will be |
| null after returning from FileInputType::setFiles and if there is an icon will be |
| dereferenced by FileInputType::iconLoaded. |
| |
| Fixed this by checking for a non-null m_element before calling iconLoaded. While here, also |
| fixed a bug where we sometimes checked the length of m_fileList before FileListCreator had |
| finished setting m_fileList. This bug resulted in missing file icons whenever an |
| <input type=file> had the webkitdirectory attribute. |
| |
| Tests: fast/forms/file/file-input-type-detached-on-change.html |
| fast/forms/file/file-input-webkitdirectory-icon.html |
| |
| * html/FileInputType.cpp: |
| (WebCore::FileInputType::filesChosen): |
| |
| 2020-06-11 Beth Dakin <bdakin@apple.com> |
| |
| Remove references to "slave" in WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=213085 |
| |
| Reviewed by Wenson Hsieh. |
| |
| This feature is referred to as a mediagroup in html, so let's use that terminology here as |
| well. |
| * html/MediaController.cpp: |
| (WebCore::MediaController::buffered const): |
| (WebCore::MediaController::seekable const): |
| (WebCore::MediaController::played): |
| (WebCore::MediaController::duration const): |
| (WebCore::MediaController::setCurrentTime): |
| (WebCore::MediaController::play): |
| (WebCore::MediaController::updateReadyState): |
| (WebCore::MediaController::updatePlaybackState): |
| (WebCore::MediaController::isBlocked const): |
| (WebCore::MediaController::hasEnded const): |
| |
| 2020-06-11 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for DragSourceAction |
| <https://webkit.org/b/212885> |
| <rdar://problem/64094134> |
| |
| Reviewed by Darin Adler. |
| |
| Summary: |
| - Convert DragSourceAction to enum class. |
| - Remove DragSourceActionNone by using Optional<> and |
| OptionSet<> (as dictated by how the code used the value). |
| - Remove DragSourceActionAny and replace (as needed) with |
| anyDragSourceAction(). (Some--but not all--uses were removed.) |
| - Add both WTF::EnumTraits<> and WTF::OptionSetTraits<> for |
| DragSourceAction since both Optional<> and OptionSet<> are |
| used with IPC. |
| |
| * loader/EmptyClients.cpp: |
| * page/DragActions.h: |
| (WebCore::DragSourceAction): |
| - Convert to enum class. |
| (WebCore::anyDragSourceAction): Add. |
| - Replaces WebCore::DragSourceActionAny. |
| (WTF::EnumTraits<WebCore::DragSourceAction>): Add. |
| (WTF::OptionSetTraits<WebCore::DragSourceAction>): Add. |
| * page/DragClient.h: |
| * page/DragController.cpp: |
| (WebCore::DragController::delegateDragSourceAction): |
| (WebCore::DragController::draggableElement const): |
| (WebCore::DragController::prepareForDragStart const): |
| (WebCore::DragController::startDrag): |
| (WebCore::DragController::doSystemDrag): |
| - Use OptionSet<>::toSingleValue() and add ASSERT() that it does |
| not return WTF::nullopt. |
| * page/DragController.h: |
| (WebCore::DragController::dragSourceAction const): |
| * page/DragState.h: |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::updateDragSourceActionsAllowed const): |
| (WebCore::EventHandler::dragHysteresisExceeded const): |
| - Use OptionSet<>::toSingleValue() and add ASSERT() that it does |
| not return WTF::nullopt. |
| - Remove case statements for DragSourceActionNone and |
| DragSourceActionAny, along with ASSERT_NOT_REACHED(). The |
| ASSERT() for toSingleValue() replaces the DragSourceActionNone |
| case. |
| (WebCore::EventHandler::didStartDrag): |
| (WebCore::ExactlyOneBitSet): Delete. |
| - Move to WTF::OptionSet<>::hasExactlyOneBitSet(). |
| (WebCore::EventHandler::handleDrag): |
| - Add code to #ifndef NDEBUG/#endif instead of modifying |
| dragState().type in-place since it seemed weird to modify it |
| just to check an ASSERT(), even though it was overwritten |
| immediately after that. |
| * page/EventHandler.h: |
| * platform/DragItem.h: |
| (WebCore::DragItem::encode const): |
| (WebCore::DragItem::decode): |
| - Stop using decodeEnum()/encodeEnum() with |
| Optional<DragSourceAction>. |
| |
| 2020-06-11 Youenn Fablet <youenn@apple.com> |
| |
| End a remote MediaStreamTrack if its source is ended |
| https://bugs.webkit.org/show_bug.cgi?id=213074 |
| |
| Reviewed by Eric Carlson. |
| |
| Make remote audio/video source observers of their webrtc source. |
| In case the webrtc source ends, end the source, thus its related tracks as well. |
| This is covered by the above test. |
| |
| Test: webrtc/receiver-track-should-stay-live-even-if-receiver-is-inactive.html |
| |
| * platform/mediastream/RealtimeIncomingAudioSource.cpp: |
| (WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource): |
| (WebCore::RealtimeIncomingAudioSource::~RealtimeIncomingAudioSource): |
| (WebCore::RealtimeIncomingAudioSource::startProducingData): |
| (WebCore::RealtimeIncomingAudioSource::stopProducingData): |
| (WebCore::RealtimeIncomingAudioSource::OnChanged): |
| * platform/mediastream/RealtimeIncomingAudioSource.h: |
| * platform/mediastream/RealtimeIncomingVideoSource.cpp: |
| (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource): |
| (WebCore::RealtimeIncomingVideoSource::~RealtimeIncomingVideoSource): |
| (WebCore::RealtimeIncomingVideoSource::startProducingData): |
| (WebCore::RealtimeIncomingVideoSource::stopProducingData): |
| (WebCore::RealtimeIncomingVideoSource::OnChanged): |
| * platform/mediastream/RealtimeIncomingVideoSource.h: |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::requestToEnd): |
| (WebCore::RealtimeMediaSource::end): |
| * platform/mediastream/RealtimeMediaSource.h: |
| |
| 2020-06-11 Rob Buis <rbuis@igalia.com> |
| |
| Improve url-setters.html WPT test |
| https://bugs.webkit.org/show_bug.cgi?id=213046 |
| |
| Reviewed by Darin Adler. |
| |
| Improve url-setters.html WPT test by testing for failure that can occur |
| when setting host or hostname [1]. |
| |
| [1] https://url.spec.whatwg.org/#host-state |
| |
| * html/URLDecomposition.cpp: |
| (WebCore::URLDecomposition::setHost): |
| (WebCore::URLDecomposition::setHostname): |
| |
| 2020-06-11 ChangSeok Oh <changseok@webkit.org> |
| |
| [GTK] Implement button-press-event, button-release-event, and absolute-axis-event of GAMEPAD API. |
| https://bugs.webkit.org/show_bug.cgi?id=133850 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| This is a follow-up change after r261965, implementing the rest of missing GAMEPAD API |
| for the gtk port. Buttons and analog sticks of standard gamepads work with this change. |
| |
| No new tests since existing tests can cover this change. |
| |
| * html/OffscreenCanvas.h: |
| * platform/gamepad/manette/ManetteGamepad.cpp: |
| (WebCore::toStandardGamepadAxis): |
| (WebCore::onAbsoluteAxisEvent): |
| (WebCore::toStandardGamepadButton): |
| (WebCore::onButtonPressEvent): |
| (WebCore::onButtonReleaseEvent): |
| (WebCore::ManetteGamepad::ManetteGamepad): |
| (WebCore::ManetteGamepad::~ManetteGamepad): |
| (WebCore::ManetteGamepad::buttonPressedOrReleased): |
| (WebCore::ManetteGamepad::absoluteAxisChanged): |
| * platform/gamepad/manette/ManetteGamepad.h: |
| * platform/gamepad/manette/ManetteGamepadProvider.cpp: |
| (WebCore::ManetteGamepadProvider::ManetteGamepadProvider): |
| (WebCore::ManetteGamepadProvider::~ManetteGamepadProvider): |
| (WebCore::ManetteGamepadProvider::gamepadHadInput): |
| (WebCore::ManetteGamepadProvider::inputNotificationTimerFired): |
| * platform/gamepad/manette/ManetteGamepadProvider.h: |
| |
| 2020-06-10 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Pass an unsigned long to cancelAnimationCallback() as handle |
| https://bugs.webkit.org/show_bug.cgi?id=212529 |
| |
| Reviewed by Youenn Fablet. |
| |
| The type of the handle returned by XRSession::requestAnimationFrame() was recently changed |
| to unsigned long from long as there was no point in using signed integers for that. However |
| we forgot to update the cancelAnimationFrame() in the specs as well as it receives the handle |
| returned by requestAnimationFrame(). |
| |
| We landed https://github.com/immersive-web/webxr/pull/1069 in the WebXR specs so we can now |
| safely also replace signed by unsigned integers in our implementation. |
| |
| No new tests as there is no change in functionality. |
| |
| Reland r262718. |
| |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::cancelAnimationFrame): Use unsigned ids. |
| * Modules/webxr/WebXRSession.h: Ditto. |
| * Modules/webxr/WebXRSession.idl: Ditto. |
| |
| 2020-06-11 Antoine Quint <graouts@webkit.org> |
| |
| [Web Animations] Setting the style at the last style change event to null should not create an ElementAnimationRareData object |
| https://bugs.webkit.org/show_bug.cgi?id=213070 |
| <rdar://problem/63841893> |
| |
| Reviewed by Tim Horton. |
| |
| In r262154 we added code that records the pre-animation style for a given element in |
| Style::TreeResolver::createAnimatedElementUpdate(), which is in Web Animations spec |
| parlance the style at the last style change event. This style is set on the backing |
| ElementAnimationRareData object for the given Element. For any element that did not |
| actually have any animations, we would set this style to null, but the function on |
| Element acting as a go-between would always create the backing ElementAnimationRareData |
| even though it would set a null value. We now only creaste the ElementAnimationRareData |
| object if there is a value to be stored, which fixes a performance regression in the |
| Speedometer2 test. |
| |
| * dom/Element.cpp: |
| (WebCore::Element::setLastStyleChangeEventStyle): |
| |
| 2020-06-10 Beth Dakin <bdakin@apple.com> |
| |
| Replace instances of blacklist in WebCore with blocklist |
| https://bugs.webkit.org/show_bug.cgi?id=213064 |
| |
| Reviewed by Tim Horton. |
| |
| * dom/ExtensionStyleSheets.cpp: |
| (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const): |
| * page/Frame.cpp: |
| (WebCore::Frame::injectUserScriptImmediately): |
| * page/UserContentURLPattern.cpp: |
| (WebCore::UserContentURLPattern::matchesPatterns): |
| * page/UserContentURLPattern.h: |
| * page/UserScript.h: |
| (WebCore::UserScript::UserScript): |
| (WebCore::UserScript::blocklist const): |
| (WebCore::UserScript::encode const): |
| (WebCore::UserScript::decode): |
| (WebCore::UserScript::blacklist const): Deleted. |
| * page/UserStyleSheet.h: |
| (WebCore::UserStyleSheet::UserStyleSheet): |
| (WebCore::UserStyleSheet::blocklist const): |
| (WebCore::UserStyleSheet::blacklist const): Deleted. |
| * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: |
| (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): |
| (WebCore::GraphicsContextGLOpenGL::checkGPUStatus): |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::cocoaTypeFromHTMLClipboardType): |
| * platform/text/TextEncodingRegistry.cpp: |
| (WebCore::pruneBlocklistedCodecs): |
| (WebCore::extendTextCodecMaps): |
| (WebCore::pruneBlacklistedCodecs): Deleted. |
| |
| 2020-06-10 Frank Yang <guowei_yang@apple.com> |
| |
| Multiple SVG Filters Unexpectedly lightens image using linearRGB |
| https://bugs.webkit.org/show_bug.cgi?id=212649 |
| |
| Reviewed by Myles C. Maxfield, Simon Fraser, Darin Adler |
| |
| Added color space conversion of input FilterEffect ImageBuffer and ImageData |
| for filters that directly manipulates pixel values. The conversion |
| is missing only on CG platforms because on CG platforms, |
| FilterEffect::transformResultColorSpace doesn't perform any operations |
| Its author assumed all filters are using CG ImageBuffers, and that |
| CG will handle the conversion which is not the case. The following filters |
| operates on the raw pixels inside an ImageBuffer, and this requires an explicit |
| color space conversion of the pixel values when the ImageData are retrieved |
| by calling FilterEffect::copy{Pre/Un}multipliedData(). |
| |
| The filters affected are feComponentTransfer, feComposite, feConvolveMatrix |
| feGaussianBlur, FELighting, feMorphology. The conversion is done |
| by CG, by drawing the input ImageBuffer to a new ImageBuffer that |
| has the correct color space tag. The ImageData is then pulled from |
| this new ImageBuffer and used in platformApplySoftware() |
| |
| Tests: svg/filters/feComponentTransfer-clipped-expected.svg |
| svg/filters/feComponentTransfer-clipped.svg |
| svg/filters/feComposite-clipped-expected.svg |
| svg/filters/feComposite-clipped.svg |
| svg/filters/feConvolveMatrix-clipped-expected.svg |
| svg/filters/feConvolveMatrix-clipped.svg |
| svg/filters/feGaussianBlur-clipped-expected.svg |
| svg/filters/feGaussianBlur-clipped.svg |
| svg/filters/feLighting-clipped-expected.svg |
| svg/filters/feLighting-clipped.svg |
| svg/filters/feMorphology-clipped-expected.svg |
| svg/filters/feMorphology-clipped.svg |
| |
| * platform/graphics/filters/FEComponentTransfer.cpp: |
| (WebCore::FEComponentTransfer::platformApplySoftware): Modified function call to |
| FilterEffect::premultipliedResult, color space conversion is required on CG |
| platforms, so operatingColorSpace is passed in and input will be converted to |
| that color space |
| * platform/graphics/filters/FEComposite.cpp: |
| (WebCore::FEComposite::platformApplySoftware): Similarly, color space conversion |
| Required on CG color space conversion is required on CG |
| platforms, so operatingColorSpace is passed in and input will be converted to |
| that color space |
| * platform/graphics/filters/FEConvolveMatrix.cpp: |
| (WebCore::FEConvolveMatrix::platformApplySoftware): converting to operating space |
| * platform/graphics/filters/FEGaussianBlur.cpp: |
| (WebCore::FEGaussianBlur::platformApplySoftware): converting to operating space |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::platformApplySoftware): converting to operating space |
| * platform/graphics/filters/FEMorphology.cpp: |
| (WebCore::FEMorphology::platformApplyDegenerate): converting to operating space |
| (WebCore::FEMorphology::platformApplySoftware): converting to operating space |
| * platform/graphics/filters/FilterEffect.cpp: |
| (WebCore::FilterEffect::unmultipliedResult): modified function signature so that |
| The Optional ColorSpace enum could be passed in to copyUnmultipliedResult() |
| (WebCore::FilterEffect::premultipliedResult): modified function signature so that |
| The Optional ColorSpace enum could be passed in to copyUnmultipliedResult() |
| (WebCore::FilterEffect::convertImageDataToColorSpace): helper function that takes an ImageData ptr |
| as input, put it into an ImageBuffer, and calls convertImageBufferToColorSpace to |
| perform color conversion, and returns the converted ImageData |
| (WebCore::FilterEffect::convertImageBufferToColorSpace): helper function that takes an ImageBuffer ptr |
| as input, create a new ImageBuffer with target color space, write input ImageBuffer to this new buffer |
| (CG backend handles the conversion) and returns the ImageData in the buffer. |
| (WebCore::FilterEffect::copyConvertedImageBufferToDestination): helper function that copies data from ImageBuffer |
| whose data is converted to the correct color space, to the destination array |
| (WebCore::FilterEffect::copyConvertedImageDataToDestination): helper function that copies data from ImageData |
| whose data is converted to the correct color space, to the destination array |
| (WebCore::FilterEffect::copyUnmultipliedResult): added an optional argument, colorSpace, which will be passed |
| into requiresAdditionalColorSpaceConversion, in order to determine if color space conversion is required |
| when obtaining the unmultiplied result. Then, added code to convert color space before writing to the |
| destination array |
| (WebCore::FilterEffect::copyPremultipliedResult): added an optional argument, colorSpace, which will be passed |
| into requiresAdditionalColorSpaceConversion, in order to determine if color space conversion is required |
| when obtaining the premultiplied result. Then, added code to convert color space before writing to the |
| destination array. |
| (WebCore::FilterEffect::requiresImageDataColorSpaceConversion): unction that only returns true |
| when 1) destination color space is non-null and is different than current color space AND |
| 2) the code is running on CG platforms |
| This function will only be called inside copy{Un, Pre}multipliedResult, to address the issue |
| where color space is needed for filters that modifies raw pixels. |
| * platform/graphics/filters/FilterEffect.h: Added function declarations |
| |
| 2020-06-10 Zalan Bujtas <zalan@apple.com> |
| |
| [Line clamp] Do not apply the special anchor handling when the anchor content is visible after clamping |
| https://bugs.webkit.org/show_bug.cgi?id=213052 |
| <rdar://problem/59739131> |
| |
| Reviewed by Simon Fraser. |
| |
| Line clamping tries to preserve the anchor text if it is at the bottom of the paragraph to support cases like "... Read more", where the "read more" is an actual link. |
| This patch makes sure that we only apply the special case handling if the anchor text get clamped. |
| |
| Test: fast/flexbox/line-clamp-with-anchor-content-only.html |
| |
| * rendering/RenderDeprecatedFlexibleBox.cpp: |
| (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): |
| |
| 2020-06-10 Jer Noble <jer.noble@apple.com> |
| |
| [Cocoa] CRASH: imported/w3c/web-platform-tests/remote-playback/watch-availability-initial-callback.html is flaky crashing |
| https://bugs.webkit.org/show_bug.cgi?id=213044 |
| <rdar://problem/62317723> |
| |
| Reviewed by Eric Carlson. |
| |
| Add null-checks around previously non-null-checked derefs of WeakPtr<HTMLMediaElement>. |
| |
| * Modules/remoteplayback/RemotePlayback.cpp: |
| (WebCore::RemotePlayback::watchAvailability): |
| (WebCore::RemotePlayback::shouldPlayToRemoteTargetChanged): |
| (WebCore::RemotePlayback::playbackTargetPickerWasDismissed): |
| |
| 2020-06-10 Sihui Liu <sihui_liu@apple.com> |
| |
| Text manipulation does not observe inserted elements that are invisible |
| https://bugs.webkit.org/show_bug.cgi?id=213057 |
| <rdar://problem/63768253> |
| |
| Reviewed by Wenson Hsieh. |
| |
| TextManipulationController gets notification when renderer of an element is created and starts observing the |
| element. It currently sets the observing range to be the visible start position and visible end position of the |
| element. When the invisible content becomes visible later, TextManipulationController does not get notification |
| and will miss the content. Therefore, TextManipulationController should use the actual start and end positions |
| of the element for range. |
| |
| Test: TextManipulation.StartTextManipulationFindsInsertedClippedText |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::makeHashablePositionRange): |
| (WebCore::TextManipulationController::scheduleObservationUpdate): |
| |
| 2020-06-10 Geoffrey Garen <ggaren@apple.com> |
| |
| Some style improvements to main thread code |
| https://bugs.webkit.org/show_bug.cgi?id=213051 |
| |
| Reviewed by Darin Adler. |
| |
| Updated for rename. |
| |
| * WebCore.order: |
| * platform/ios/wak/WebCoreThread.mm: |
| (StartWebThread): |
| |
| 2020-06-10 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=212714 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Replaced call to WTFMove(widgetNewParentMap()) with std::exchange(widgetNewParentMap(), { }) in the |
| WidgetHierarchyUpdatesSuspensionScope::moveWidgets(), thereby making it explicit to set the source map empty. |
| |
| Test would be added later. |
| |
| * rendering/RenderWidget.cpp: |
| (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets): |
| |
| 2020-06-10 Brent Fulgham <bfulgham@apple.com> |
| |
| Improve CSP compliance under PSON |
| https://bugs.webkit.org/show_bug.cgi?id=212995 |
| <rdar://problem/62996186> |
| |
| Reviewed by Chris Dumez. |
| |
| Tests: http/tests/security/contentSecurityPolicy/1.1/form-action-src-self-blocked.html |
| |
| The form submission logic was only considering CSP if the form |
| action was a JavaScript URL. This is incorrect, as CSP might |
| apply to any URL. |
| |
| This is also covered by the existing form-action CSP tests. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::submitForm): All URLs should be evaluted for |
| compliance with CSP. |
| |
| 2020-06-10 Brian Burg <bburg@apple.com> |
| |
| WebDriver on non-iOS ports cannot perform ActionChain which has scrolling down to the element and click it |
| https://bugs.webkit.org/show_bug.cgi?id=208232 |
| <rdar://problem/59859491> |
| |
| Reviewed by Devin Rousso. |
| |
| * platform/ScrollView.h: |
| * platform/ScrollView.cpp: |
| (WebCore::ScrollView::rootViewToContents const): |
| Create a version of this function that works with FloatPoint. |
| |
| 2020-06-10 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r262718. |
| https://bugs.webkit.org/show_bug.cgi?id=213047 |
| |
| Broke WPE Debug too |
| |
| Reverted changeset: |
| |
| "[WebXR] Pass an unsigned long to cancelAnimationCallback() as |
| handle" |
| https://bugs.webkit.org/show_bug.cgi?id=212529 |
| https://trac.webkit.org/changeset/262718 |
| |
| 2020-06-10 Antoine Quint <graouts@webkit.org> |
| |
| Subframes should not autosize independently |
| https://bugs.webkit.org/show_bug.cgi?id=212984 |
| <rdar://problem/64175493> |
| |
| Reviewed by Simon Fraser. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::enableAutoSizeMode): |
| |
| 2020-06-10 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, WPE Debug build fix attempt after r262838. |
| |
| Second attempt. :) Still broken because of r262718 though... |
| |
| * platform/xr/openxr/PlatformXROpenXR.cpp: |
| |
| 2020-06-10 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, WPE Debug build fix attempt after r262838. |
| |
| Still broken because of r262718 though... |
| |
| * platform/xr/openxr/PlatformXROpenXR.cpp: |
| |
| 2020-06-10 Youenn Fablet <youenn@apple.com> |
| |
| BaseAudioSharedUnit does not need to restart its audio unit at resume time. |
| https://bugs.webkit.org/show_bug.cgi?id=213021 |
| |
| Reviewed by Eric Carlson. |
| |
| Removing a case that should not happen, and was guarded by ASSERT. |
| Keeping ASSERT to make sure we do not break this assumption. |
| |
| * platform/mediastream/mac/BaseAudioSharedUnit.cpp: |
| (WebCore::BaseAudioSharedUnit::resume): |
| (WebCore::BaseAudioSharedUnit::suspend): |
| |
| 2020-06-10 Youenn Fablet <youenn@apple.com> |
| |
| REGRESSION(r262798): fast/mediastream/media-stream-track-interrupted.html is failing |
| https://bugs.webkit.org/show_bug.cgi?id=213011 |
| |
| Reviewed by Eric Carlson. |
| |
| Before the patch, a source that is muted and for which its observers get ended will not be ended. |
| This is a potential issue as the source can get unmuted, in which case, the audio shared unit might be asked to restart. |
| This is crashing in debug as we would not have the AudioSession correct category for audio capture. |
| |
| Test: fast/mediastream/track-ended-while-muted.html |
| Also covered by fast/mediastream/media-stream-track-interrupted.html no longer flakily crashing in debug. |
| |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::requestToEnd): |
| End the source even if muted. |
| * platform/mediastream/RealtimeMediaSource.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::isMediaStreamSourceEnded const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| Add necessary test infrastructure. |
| |
| 2020-06-05 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Refactor OpenXR platform code |
| https://bugs.webkit.org/show_bug.cgi?id=212470 |
| |
| Reviewed by Youenn Fablet. |
| |
| Refactored a bit the platform code because we want to extend the PlatformXR::Device for the OpenXR |
| library. Also we're removing all the device id code because there is no need to expose it. |
| |
| The idea from now on is to only define interfaces in PlatformXR.h and then add all the OpenXR specifics |
| in the newly renamed PlatformXROpenXR.[ch] files. We're also renaming PlatformXR.cpp to |
| PlatformXROpenXR.cpp to clearly state that it's the OpenXR implementation and to differentiate it from |
| the implementation agnostic PlatformXR.h file. |
| |
| No new tests as there is no change in functionality. |
| |
| * Sources.txt: Added renamed files. Removed PlatformXR.cpp. |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| * platform/xr/PlatformXR.cpp: Removed. |
| * platform/xr/PlatformXR.h: |
| (PlatformXR::Device::id const): Deleted. |
| (PlatformXR::Device::operator== const): Deleted. |
| * platform/xr/openxr/PlatformXROpenXR.cpp: Renamed from Source/WebCore/platform/xr/openxr/PlatformXR.cpp. |
| (PlatformXR::Instance::Impl::~Impl): Call xrDestroyInstance() on m_instance. |
| (PlatformXR::Instance::Impl::collectSupportedSessionModes): Do not pass XrSystemId as argument |
| as it's stored in the OpenXRDevice object. |
| (PlatformXR::Instance::enumerateImmersiveXRDevices): Create an OpenXRDevice instead of a Device. |
| * platform/xr/openxr/PlatformXROpenXR.h: Added. |
| |
| 2020-06-09 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=212714 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Made change in the WidgetHierarchyUpdatesSuspensionScope::moveWidgets() to handle all widgets scheduled to move, |
| including new widgets scheduled during moveWidgets(). |
| |
| Test would be added later. |
| |
| * rendering/RenderWidget.cpp: |
| (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets): |
| |
| 2020-06-09 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| Unreviewed, reverting r262791. |
| |
| WinCairo WebKit1 is crashing. |
| |
| Reverted changeset: |
| |
| "[Curl] Implement functions to use ResourceLoadStatistics." |
| https://bugs.webkit.org/show_bug.cgi?id=207692 |
| https://trac.webkit.org/changeset/262791 |
| |
| 2020-06-09 Simon Fraser <simon.fraser@apple.com> |
| |
| Minor overflow layers cleanup |
| https://bugs.webkit.org/show_bug.cgi?id=213002 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Now that we parent scrollbar and scroll corner layers into the overflowControlsContainer |
| layer, we no need to parent these layers in RenderLayerCompositor::updateBackingAndHierarchy(). |
| |
| Also rename overflowControlsHostLayerBox to overflowControlsHostLayerRect to avoid |
| ambiguity with RenderBox. |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateDebugIndicators): |
| (WebCore::overflowControlsHostLayerRect): |
| (WebCore::RenderLayerBacking::updateGeometry): |
| (WebCore::overflowControlsHostLayerBox): Deleted. |
| * rendering/RenderLayerBacking.h: |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): |
| |
| 2020-06-09 Mark Lam <mark.lam@apple.com> |
| |
| Disambiguate the OverridesGetPropertyNames structure flag |
| https://bugs.webkit.org/show_bug.cgi?id=212909 |
| <rdar://problem/63823557> |
| |
| Reviewed by Saam Barati. |
| |
| 1. JSDOMWindowProperties was not defining its Base. As a result, its |
| StructureFlags was inheriting from JSDOMObject's Base instead of from JSDOMObject |
| as one would expect. This turns out to be harmless because JSDOMObject did not |
| define any StructureFlags. Regardless, this is not fixed so that if JSDOMObject |
| adds any StructureFlags, it will be inherited properly by JSDOMWindowProperties. |
| |
| 2. Updated CodeGeneratorJS.pm and rebased the binding test results. |
| |
| * bindings/js/JSDOMWindowProperties.h: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| * bindings/scripts/test/JS/JSTestEventTarget.h: |
| * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h: |
| * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h: |
| * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h: |
| * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h: |
| * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h: |
| * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h: |
| * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h: |
| * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h: |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: |
| * bridge/runtime_array.h: |
| * bridge/runtime_object.h: |
| |
| 2020-06-09 Dean Jackson <dino@apple.com> |
| |
| Stop using discriminatory names for WebGL and Plugin blocking |
| https://bugs.webkit.org/show_bug.cgi?id=213000 |
| |
| Reviewed by Simon Fraser. |
| |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mac/BlocklistUpdater.h: Renamed from Source/WebCore/platform/mac/BlacklistUpdater.h. |
| (WebCore::BlocklistUpdater::pluginBlocklist): |
| (WebCore::BlocklistUpdater::webGLBlocklist): |
| * platform/mac/BlocklistUpdater.mm: Renamed from Source/WebCore/platform/mac/BlacklistUpdater.mm. |
| (WebCore::BlocklistUpdater::readBlocklistData): |
| (WebCore::BlocklistUpdater::reloadIfNecessary): |
| (WebCore::BlocklistUpdater::initializeQueue): |
| * platform/mac/PluginBlocklist.h: Renamed from Source/WebCore/platform/mac/PluginBlacklist.h. |
| * platform/mac/PluginBlocklist.mm: Renamed from Source/WebCore/platform/mac/PluginBlacklist.mm. |
| (WebCore::PluginBlocklist::loadPolicyForPluginVersion): |
| (WebCore::PluginBlocklist::isPluginUpdateAvailable): |
| (WebCore::PluginBlocklist::create): |
| (WebCore::PluginBlocklist::~PluginBlocklist): |
| (WebCore::PluginBlocklist::splitOSVersion): |
| (WebCore::PluginBlocklist::loadPolicyForPlugin const): |
| (WebCore::PluginBlocklist::isUpdateAvailable const): |
| (WebCore::PluginBlocklist::PluginBlocklist): |
| * platform/mac/WebGLBlocklist.h: Renamed from Source/WebCore/platform/mac/WebGLBlacklist.h. |
| * platform/mac/WebGLBlocklist.mm: Renamed from Source/WebCore/platform/mac/WebGLBlacklist.mm. |
| (WebCore::buildInfoFromOSBuildString): |
| (WebCore::WebGLBlocklist::shouldBlockWebGL): |
| (WebCore::WebGLBlocklist::shouldSuggestBlockingWebGL): |
| (WebCore::matchesBuildInfo): |
| (WebCore::WebGLBlocklist::create): |
| (WebCore::WebGLBlocklist::shouldBlock const): |
| (WebCore::WebGLBlocklist::shouldSuggestBlocking const): |
| (WebCore::WebGLBlocklist::WebGLBlocklist): |
| (WebCore::WebGLBlocklist::~WebGLBlocklist): |
| |
| 2020-06-09 Simon Fraser <simon.fraser@apple.com> |
| |
| Logging and tree dumping crash fix |
| https://bugs.webkit.org/show_bug.cgi?id=212988 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Add scrolling logging to RenderLayer::requestScrollPositionUpdate(). |
| |
| Null-check the scrollerImp in ScrollbarThemeMac::isLayoutDirectionRTL, because this is |
| called from renderTreeAsText() which can be invoked from the debugger, and should not crash. |
| |
| * platform/mac/ScrollbarThemeMac.mm: |
| (WebCore::ScrollbarThemeMac::isLayoutDirectionRTL): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::requestScrollPositionUpdate): |
| |
| 2020-06-09 Andy Estes <aestes@apple.com> |
| |
| Unreviewed change for post-commit feedback after r262682. |
| |
| * DerivedSources.make: Replaced tabs with spaces. |
| |
| 2020-06-09 Frank Yang <guowei_yang@apple.com> |
| |
| WebKit Crashes when SVG Filter Logging is Turned On |
| https://bugs.webkit.org/show_bug.cgi?id=212415 |
| |
| Reviewed by Darin Adler. |
| |
| No new tests are required because this is just |
| fixing a simple pointer access inside logging code |
| |
| * html/ImageData.cpp: |
| (WebCore::operator<<): Overloaded << operator to print the |
| address of pixel data it stores |
| * html/ImageData.h: Declare overloaded << operator |
| * platform/graphics/filters/FilterEffect.cpp: |
| (WebCore::FilterEffect::imageBufferResult): Modified logging code |
| so that it does a null check by calling ValueOrNull on |
| m_premultipliedImageResult and m_unmultipliedImageResult |
| (WebCore::FilterEffect::copyUnmultipliedResult): Modified logging code |
| so that it does a null check by calling ValueOrNull on |
| m_premultipliedImageResult and m_unmultipliedImageResult |
| (WebCore::FilterEffect::copyPremultipliedResult): Modified logging code |
| so that it does a null check by calling ValueOrNull on |
| m_premultipliedImageResult and m_unmultipliedImageResult |
| |
| 2020-06-09 Dean Jackson <dino@apple.com> |
| |
| REGRESSION: [Safari Mojave for High Sierra] Accessing some of the featured pages on apple.com causes the webpage to crash |
| https://bugs.webkit.org/show_bug.cgi?id=212940 |
| rdar://63839405 |
| |
| Reviewed by Tim Horton. |
| |
| The code to use the singleton for a SwitchingGPUClient was assuming it |
| has always been set, which was not the case when |
| ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING) was not true. |
| |
| * platform/graphics/opengl/GraphicsContextGLOpenGLManager.cpp: Check the state of the |
| singleton before calling it. |
| (WebCore::GraphicsContextGLOpenGLManager::updateHighPerformanceState): |
| (WebCore::GraphicsContextGLOpenGLManager::disableHighPerformanceGPUTimerFired): |
| * platform/graphics/mac/SwitchingGPUClient.h: Return a pointer to the singleton which |
| will allow the code to check for its existence. |
| (WebCore::SwitchingGPUClient::singletonIfExists): |
| |
| 2020-06-09 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Streamline SimpleColor premulitply/unpremultiply code |
| https://bugs.webkit.org/show_bug.cgi?id=212945 |
| |
| Reviewed by Darin Adler. |
| |
| Simplify / streamline the premulitply/unpremultiply code by: |
| - Removing the overloads that didn't take individual components, keeping |
| only the ones taking a SimpleColor. |
| - Replacing the "ceiling" bool in makePremultipliedSimpleColor and converting |
| it into two functions. |
| - Simplifying the names from makePremultipliedSimpleColor/makeUnpremultipliedSimpleColor |
| to premultiplyFlooring/premultiplyCeiling/unpremultiply. |
| - Where component order is important, use valueAsARGB() explicitly to |
| show what the resulting value's format will be. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::blend): |
| Update to call premultiplyCeiling/unpremultiply. |
| |
| * platform/graphics/ImageBackingStore.h: |
| (WebCore::ImageBackingStore::blendPixel): |
| (WebCore::ImageBackingStore::pixelValue const): |
| Update to call premultiplyFlooring/unpremultiply and valueAsARGB(). |
| |
| * platform/graphics/SimpleColor.h: |
| * platform/graphics/SimpleColor.cpp: |
| (WebCore::premultiplyFlooring): |
| (WebCore::premultiplyCeiling): |
| (WebCore::unpremultiplyChannel): |
| (WebCore::unpremultiply): |
| (WebCore::premultipliedChannel): Deleted. |
| (WebCore::unpremultipliedChannel): Deleted. |
| (WebCore::makePremultipliedSimpleColor): Deleted. |
| (WebCore::makeUnpremultipliedSimpleColor): Deleted. |
| Simplify premulitply/unpremultiply interfaces. Use structured bindings to make |
| the code a bit easier to follow as well. |
| |
| * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: |
| (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): |
| Update to call premultiplyFlooring/unpremultiply and valueAsARGB(). |
| |
| * platform/graphics/cairo/NativeImageCairo.cpp: |
| (WebCore::nativeImageSinglePixelSolidColor): |
| Update to call premultiplyFlooring/unpremultiply and valueAsARGB(). Also removes |
| reinterpret cast to SimpleColor, instead following the model in ImageBufferCairoImageSurfaceBackend |
| and casting to unsigned, and building the SimpleColor from that. This will allow |
| SimpleColor to change its underlying representation in the future without breaking things. |
| |
| 2020-06-09 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r261841. |
| https://bugs.webkit.org/show_bug.cgi?id=212991 |
| |
| Caused spotify pages to scroll to the top |
| (<http://webkit.org/b/212983|webkit.org/b/212983>) |
| |
| Reverted changeset: |
| |
| "[css-grid] Clear the override width for computing percent |
| margins" |
| https://bugs.webkit.org/show_bug.cgi?id=209461 |
| https://trac.webkit.org/changeset/261841 |
| |
| 2020-06-09 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [Win] ComplexTextControllerUniscribe: Retry ScriptShape with SCRIPT_UNDEFINED if it failed as USP_E_SCRIPT_NOT_IN_FONT |
| https://bugs.webkit.org/show_bug.cgi?id=212947 |
| |
| Reviewed by Don Olmstead. |
| |
| If the given font doesn't support the givin text, ScriptShape API |
| fails as USP_E_SCRIPT_NOT_IN_FONT. In the case, the complex run |
| was simply ignored and nothing was drawn for the text. |
| |
| According to Uniscribe document, We should retry ScriptShape with |
| SCRIPT_UNDEFINED to get missing glyphs. |
| <https://docs.microsoft.com/en-us/windows/win32/intl/displaying-text-with-uniscribe> |
| |
| * platform/graphics/win/ComplexTextControllerUniscribe.cpp: |
| (WebCore::shapeByUniscribe): |
| |
| 2020-06-09 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| ComplexTextController: Use std::sort to calculate m_runIndices |
| https://bugs.webkit.org/show_bug.cgi?id=212944 |
| |
| Reviewed by Myles C. Maxfield. |
| |
| ComplexTextController was using O(n²) sort to lazily calculate |
| m_runIndices. And, exact matching stringBegin and stringEnd can |
| cause infinite loop (Bug 212670 and Bug 108877). |
| |
| Use std::sort instead. |
| |
| * platform/graphics/ComplexTextController.cpp: |
| (WebCore::ComplexTextController::finishConstruction): |
| (WebCore::ComplexTextController::indexOfCurrentRun): |
| |
| 2020-06-09 Youenn Fablet <youenn@apple.com> |
| |
| BaseAudioSharedUnit should unmute its clients in case of suspension even if not having any audio unit |
| https://bugs.webkit.org/show_bug.cgi?id=212970 |
| |
| Reviewed by Eric Carlson. |
| |
| CoreAudioCaptureSource(s), when muted, are now calling stopProducingData. |
| This will, in turn, make the BaseAudioSharedUnit stop and no longer have any audio unit. |
| In that case, when resume is called on the BaseAudioSharedUnit, it will exit early as the audio unit is null. |
| This will prevent to unmute the CoreAudioCaptureSource(s). |
| |
| Fix this by removing the audio unit check in BaseAudioSharedUnit::resume. |
| Add infrastructure testing to be able to write a test. |
| |
| Covered by added test. |
| |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/mac/BaseAudioSharedUnit.cpp: |
| (WebCore::BaseAudioSharedUnit::resume): |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::setInterruptedForTesting): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::isMediaStreamSourceInterrupted const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-09 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| lang=zh needs to defer to system preferences to know whether it should be simplified or traditional |
| https://bugs.webkit.org/show_bug.cgi?id=212626 |
| <rdar://problem/60227623> |
| |
| Reviewed by Darin Adler. |
| |
| If the content says lang="zh" font-family: sans-serif, we have no signal for whether |
| the content should be traditional or simplified. In this case, we should pick based |
| on system preferences to make it more likely that we get the right answer. |
| |
| This is actually what some Cocoa platform text functions were doing, but not all of them. |
| We need to do it at our level in WebKit to make sure that all our calls to the platform |
| have consistent behavior. Also, we can cache the result at our level, which is more |
| performant than if the platform cached it at each platform entry point. |
| |
| We already started consulting with system preferences to make this decision in r189038. |
| This patch extends that and fixes it to throughout WebKit. |
| |
| This doesn't expose any new fingerprinting data, because this information was already |
| exposed (e.g. by drawing fallback fonts to the canvas and then reading back the pixels). |
| |
| Tests: fast/text/locale-getComputedStyle.html |
| fast/text/international/generic-font-family-language-traditional.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): |
| * css/CSSFontSelector.cpp: |
| (WebCore::resolveGenericFamily): |
| * css/CSSProperties.json: |
| * layout/inlineformatting/InlineLineBreaker.cpp: |
| (WebCore::Layout::LineBreaker::wordBreakBehavior const): |
| (WebCore::Layout::LineBreaker::tryBreakingTextRun const): |
| * platform/graphics/Font.cpp: |
| (WebCore::Font::systemFallbackFontForCharacter const): |
| * platform/graphics/FontCache.h: |
| (WebCore::FontDescriptionKey::FontDescriptionKey): |
| * platform/graphics/FontCascade.cpp: |
| (WebCore::FontCascade::widthForSimpleText const): |
| * platform/graphics/FontCascadeDescription.cpp: |
| * platform/graphics/FontCascadeDescription.h: |
| (WebCore::FontCascadeDescription::initialSpecifiedLocale): |
| (WebCore::FontCascadeDescription::initialLocale): Deleted. |
| * platform/graphics/FontDescription.cpp: |
| (WebCore::computeSpecializedChineseLocale): |
| (WebCore::cachedSpecializedChineseLocale): |
| (WebCore::fontDescriptionLanguageChanged): |
| (WebCore::specializedChineseLocale): |
| (WebCore::FontDescription::setSpecifiedLocale): |
| (WebCore::FontDescription::setLocale): Deleted. |
| * platform/graphics/FontDescription.h: |
| (WebCore::FontDescription::computedLocale const): |
| (WebCore::FontDescription::specifiedLocale const): |
| (WebCore::FontDescription::operator== const): |
| (WebCore::FontDescription::encode const): |
| (WebCore::FontDescription::decode): |
| (WebCore::FontDescription::locale const): Deleted. |
| * platform/graphics/WidthIterator.cpp: |
| (WebCore::WidthIterator::applyFontTransforms): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontCache::systemFallbackForCharacters): |
| * platform/graphics/cocoa/FontDescriptionCocoa.cpp: |
| (WebCore::FontDescription::platformResolveGenericFamily): |
| (WebCore::computeSpecializedChineseLocale): Deleted. |
| (WebCore::cachedSpecializedChineseLocale): Deleted. |
| (WebCore::languageChanged): Deleted. |
| * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: |
| (WebCore::SystemFontDatabaseCoreText::systemFontParameters): |
| * platform/graphics/mac/ComplexTextControllerCoreText.mm: |
| (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): |
| * rendering/RenderQuote.cpp: |
| (WebCore::RenderQuote::computeText const): |
| * rendering/RenderText.cpp: |
| (WebCore::maxWordFragmentWidth): |
| (WebCore::RenderText::computePreferredLogicalWidths): |
| (WebCore::applyTextTransform): |
| * rendering/RenderThemeCocoa.mm: |
| (WebCore::RenderThemeCocoa::paintApplePayButton): |
| * rendering/SimpleLineLayoutTextFragmentIterator.cpp: |
| (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style): |
| (WebCore::SimpleLineLayout::TextFragmentIterator::TextFragmentIterator): |
| * rendering/line/BreakingContext.h: |
| (WebCore::BreakingContext::handleText): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::computedLocale const): |
| (WebCore::RenderStyle::specifiedLocale const): |
| (WebCore::RenderStyle::locale const): Deleted. |
| * style/StyleBuilderCustom.h: |
| (WebCore::Style::BuilderCustom::applyValueWebkitLocale): |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| |
| 2020-06-09 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for empty table |
| https://bugs.webkit.org/show_bug.cgi?id=212971 |
| |
| Reviewed by Antti Koivisto. |
| |
| No need to run formatting context layout when the table box has no descendant. |
| |
| Test: fast/layoutformattingcontext/empty-table-box.html |
| |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::layoutTableBox): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::ensureTableGrid): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::isEmpty const): |
| |
| 2020-06-09 Youenn Fablet <youenn@apple.com> |
| |
| Forward declare MediaKeys/MediaKeySession in Internals.h |
| https://bugs.webkit.org/show_bug.cgi?id=212965 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| No change of behavior. |
| |
| * testing/Internals.cpp: |
| * testing/Internals.h: |
| |
| 2020-06-09 Youenn Fablet <youenn@apple.com> |
| |
| Fix two MediaStream tests |
| https://bugs.webkit.org/show_bug.cgi?id=208926 |
| <rdar://problem/60329008> |
| |
| Reviewed by Eric Carlson. |
| |
| Previously, the mock capture sample rate was the one of the mock audio shared unit, which is the sample rate of the audio session by default. |
| This sample rate may change according the bots. |
| For that reason, explicitly set the mock shared unit sample rate to the default sample rate of the device, just before creating the source. |
| MediaConstraints may still apply after this step. |
| |
| Fix an issue where we would use the real core audio unit in CoreAudioCaptureSource constructor. |
| We now pass the unit override if any in constructor. |
| |
| Covered by unflaked tests. |
| |
| * platform/mediastream/mac/BaseAudioSharedUnit.cpp: |
| (WebCore::BaseAudioSharedUnit::BaseAudioSharedUnit): |
| * platform/mediastream/mac/BaseAudioSharedUnit.h: |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::initializeCoreAudioCaptureSource): |
| (WebCore::CoreAudioSharedUnit::CoreAudioSharedUnit): |
| (WebCore::CoreAudioCaptureSource::create): |
| (WebCore::CoreAudioCaptureSource::createForTesting): |
| (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource): |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| * platform/mediastream/mac/MockAudioSharedUnit.mm: |
| (WebCore::MockRealtimeAudioSource::create): |
| (WebCore::MockAudioSharedUnit::MockAudioSharedUnit): |
| Do not disable echo cancellation to mimick what the real unit is doing. |
| |
| 2020-06-09 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][Table][Floats] Multi-pass table layout needs clean floating state |
| https://bugs.webkit.org/show_bug.cgi?id=212889 |
| |
| Reviewed by Antti Koivisto. |
| |
| When laying out the cell content multiple times to accommodate flex table layout, |
| the float state needs be cleared to avoid having redundant float content. |
| |
| Test: fast/layoutformattingcontext/float-inside-table-cell-simple.html |
| |
| * layout/floats/FloatingState.cpp: |
| (WebCore::Layout::FloatingState::append): |
| * layout/floats/FloatingState.h: |
| (WebCore::Layout::FloatingState::FloatItem::floatBox const): |
| * layout/layouttree/LayoutTreeBuilder.cpp: |
| (WebCore::Layout::TreeBuilder::createLayoutBox): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| |
| 2020-06-09 Takashi Komori <Takashi.Komori@sony.com> |
| |
| [Curl] Implement functions to use ResourceLoadStatistics. |
| https://bugs.webkit.org/show_bug.cgi?id=207692 |
| |
| Reviewed by Don Olmstead. |
| |
| Implement functions which are required to implement ResourceLoadStatistics for Curl port. |
| |
| Tests: http/tests/resourceLoadStatistics/ |
| |
| * CMakeLists.txt: |
| * platform/network/curl/CookieJarDB.cpp: |
| (WebCore::CookieJarDB::openDatabase): |
| (WebCore::CookieJarDB::setCookie): |
| (WebCore::CookieJarDB::allDomains): |
| (WebCore::CookieJarDB::deleteCookiesForHostname): |
| * platform/network/curl/CookieJarDB.h: |
| * platform/network/curl/NetworkStorageSessionCurl.cpp: |
| (WebCore::NetworkStorageSession::setCookiesFromDOM const): |
| (WebCore::NetworkStorageSession::setCookies): |
| (WebCore::NetworkStorageSession::deleteCookiesForHostnames): |
| (WebCore::NetworkStorageSession::getHostnamesWithCookies): |
| |
| 2020-06-09 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Switch ColorMac.mm's nsColor() function over to using TinyLRUCache |
| https://bugs.webkit.org/show_bug.cgi?id=212918 |
| |
| Reviewed by Darin Adler. |
| |
| * platform/graphics/Color.h: |
| (WebCore::Color::isExtended const): |
| Make asSimple() public, so nsColor() can use it. This also allows us to unfriend cachedCGColor(). |
| |
| * platform/graphics/mac/ColorMac.mm: |
| (WTF::RetainPtr<NSColor>>::createValueForKey): |
| (WebCore::nsColor): |
| Mimic the structure of cachedCGColor() by switching over simpleColor values for common |
| colors and using a 32 value TinyLRUCache for the rest. |
| |
| 2020-06-09 Xabier Rodriguez Calvar <calvaris@igalia.com> |
| |
| [EME] CDMProxyInstance should not keep CDMInstanceSessions hard referenced |
| https://bugs.webkit.org/show_bug.cgi?id=212689 |
| |
| Reviewed by Youenn Fablet. |
| |
| Sessions are now tracked as WeakPtr inside the CDMInstanceProxy |
| instead of RefPtr because this creates referencing issues as the |
| internal objects should be released when the backing JS object is |
| garbage collected. |
| |
| Test: media/encrypted-media/clearKey/clearKey-session-life-cycle.html |
| |
| * Modules/encryptedmedia/MediaKeySession.h: |
| * Modules/encryptedmedia/MediaKeySession.idl: |
| * Modules/encryptedmedia/MediaKeys.h: |
| * Modules/encryptedmedia/MediaKeys.idl: |
| * platform/encryptedmedia/CDMProxy.cpp: |
| (WebCore::CDMInstanceProxy::trackSession): |
| * platform/encryptedmedia/CDMProxy.h: |
| (WebCore::CDMInstanceProxy::trackSession): |
| * platform/encryptedmedia/clearkey/CDMClearKey.cpp: |
| (WebCore::CDMInstanceClearKey::createSession): |
| * platform/encryptedmedia/clearkey/CDMClearKey.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::mediaKeysInternalInstanceObjectRefCount const): |
| (WebCore::Internals::mediaKeySessionInternalInstanceSessionObjectRefCount const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-09 Sihui Liu <sihui_liu@apple.com> |
| |
| TextManipulationController range of paragraph may be wrong after r262601 |
| https://bugs.webkit.org/show_bug.cgi?id=212874 |
| |
| Reviewed by Wenson Hsieh. |
| |
| Start and end position of item are not properly set in r262601. |
| |
| Test: TextManipulation.CompleteTextManipulationSuccedsWhenContentOutOfParagraphIsAdded |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::addItemIfPossible): |
| |
| 2020-06-08 Sihui Liu <sihui_liu@apple.com> |
| |
| TextManipulation should only convert text from Node's text content to tokens |
| https://bugs.webkit.org/show_bug.cgi?id=212928 |
| |
| Reviewed by Wenson Hsieh. |
| |
| TextIterator may emit text like line breaks between nodes. This kind of text is generated based on the range of |
| TextIterator and style of node. We need this text for splitting tokens or splitting paragraphs, but we should |
| not convert it to normal tokens. This is because tokens should be created from content of node and text |
| manipulation fails if content does not match. The change of this kind of text does not indicate change in |
| content and we may still be able to finish text manipulation. |
| |
| Test: TextManipulation.CompleteTextManipulationReplaceTwoSimpleParagraphs |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::isInPrivateUseArea): |
| (WebCore::isTokenDelimiter): |
| (WebCore::ParagraphContentIterator::currentContent): |
| (WebCore::ParagraphContentIterator::appendToText): |
| (WebCore::ParagraphContentIterator::advanceIteratorNodeAndUpdateText): |
| (WebCore::TextManipulationController::createUnit): |
| (WebCore::TextManipulationController::parse): |
| (WebCore::TextManipulationController::observeParagraphs): |
| (WebCore::TextManipulationController::replace): |
| * editing/TextManipulationController.h: |
| |
| 2020-06-08 Rob Buis <rbuis@igalia.com> |
| |
| XMLHTTPRequest.send should not send Content-Type headers when Blob has no type |
| https://bugs.webkit.org/show_bug.cgi?id=211999 |
| |
| Reviewed by Alex Christensen. |
| |
| XMLHTTPRequest.send should not send Content-Type headers when Blob has no type [1, 2]. |
| This behavior overrides the behavior of the File API spec [3]. |
| |
| Behavior matches Firefox and Chrome. |
| |
| Test: imported/w3c/web-platform-tests/xhr/send-blob-with-no-mime-type.html |
| |
| [1] https://xhr.spec.whatwg.org/#dom-xmlhttprequest-send |
| [2] https://fetch.spec.whatwg.org/#concept-bodyinit-extract |
| [3] http://dev.w3.org/2006/webapi/FileAPI/#dfn-type |
| |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: |
| (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::send): |
| |
| 2020-06-08 Simon Fraser <simon.fraser@apple.com> |
| |
| Horizontally scrolling elements are broken when revealed by toggling visibility |
| https://bugs.webkit.org/show_bug.cgi?id=212439 |
| <rdar://problem/63739559> |
| |
| Reviewed by Zalan Bujtas. |
| |
| When revealing an overflow:scroll by toggling the visibility property, make sure that |
| we use composited scrolling. |
| |
| computeScrollDimensions() is only updated on layout, so we need to recompute m_hasCompositedScrollableOverflow |
| on style change as well. |
| |
| Test: compositing/scrolling/async-overflow-scrolling/toggle-visibility-on-scroller.html |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::computeScrollDimensions): |
| (WebCore::RenderLayer::computeHasCompositedScrollableOverflow): |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderLayer.h: |
| |
| 2020-06-08 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Rename Color::lighten() and Color::darken() to Color::lightened() and Color::darkened() |
| https://bugs.webkit.org/show_bug.cgi?id=212917 |
| |
| Reviewed by Darin Adler. |
| |
| Addresses feedback from Darin. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::lightened const): |
| (WebCore::Color::darkened const): |
| (WebCore::Color::lighten const): Deleted. |
| (WebCore::Color::darken const): Deleted. |
| * platform/graphics/Color.h: |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::calculateBorderStyleColor): |
| * rendering/RenderTheme.cpp: |
| (WebCore::RenderTheme::disabledTextColor const): |
| * rendering/TextPaintStyle.cpp: |
| (WebCore::adjustColorForVisibilityOnBackground): |
| |
| 2020-06-08 Devin Rousso <drousso@apple.com> |
| |
| Remove unnecessary variable in `WindowProxy::createJSWindowProxy` |
| https://bugs.webkit.org/show_bug.cgi?id=212929 |
| |
| Reviewed by Darin Adler. |
| |
| * bindings/js/WindowProxy.cpp: |
| (WebCore::WindowProxy::createJSWindowProxy): |
| |
| 2020-06-08 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=212714 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Widget removal in the middle of building a Render Tree causes side effects, leading to Release Assert. Moved the scope for suspension of widgets |
| update to RenderTreeBuilder instead of having it in RenderTreeUpdater. |
| |
| Test would be added later. |
| |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::tearDownRenderers): |
| |
| 2020-06-08 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Use usual promise in readableStreamTee |
| https://bugs.webkit.org/show_bug.cgi?id=212715 |
| |
| Reviewed by Mark Lam. |
| |
| The spec[1] is organized to be OK to use usual promises here. This patch uses usual promises instead of internal ones. |
| |
| [1]: https://streams.spec.whatwg.org/#readable-stream-tee |
| |
| * Modules/streams/ReadableStreamInternals.js: |
| (readableStreamTee): |
| |
| 2020-06-08 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for DragOperation |
| <https://webkit.org/b/212870> |
| <rdar://problem/64069940> |
| |
| Reviewed by Darin Adler. |
| |
| * dom/DataTransfer.cpp: |
| (WebCore::dragOpFromIEOp): |
| (WebCore::IEOpFromDragOp): |
| (WebCore::DataTransfer::sourceOperationMask const): |
| (WebCore::DataTransfer::destinationOperationMask const): |
| (WebCore::DataTransfer::setSourceOperationMask): |
| (WebCore::DataTransfer::setDestinationOperationMask): |
| (WebCore::DataTransfer::setEffectAllowed): |
| * page/DragActions.h: |
| (WebCore::DragOperation): |
| - Convert to enum class. |
| (WebCore::anyDragOperation): |
| * page/DragController.cpp: |
| (WebCore::DragController::platformGenericDragOperation): |
| (WebCore::DragController::dragEnteredOrUpdated): |
| (WebCore::DragController::tryDocumentDrag): |
| (WebCore::defaultOperationForDrag): |
| (WebCore::DragController::startDrag): |
| * page/EventHandler.cpp: |
| (WebCore::convertDropZoneOperationToDragOperation): |
| (WebCore::convertDragOperationToDropZoneOperation): |
| * page/gtk/DragControllerGtk.cpp: |
| (WebCore::DragController::dragOperation): |
| * page/mac/DragControllerMac.mm: |
| (WebCore::DragController::dragOperation): |
| (WebCore::DragController::platformGenericDragOperation): |
| * page/win/DragControllerWin.cpp: |
| (WebCore::DragController::dragOperation): |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::gdkDragActionToDragOperation): |
| (WebCore::dragOperationToGdkDragActions): |
| (WebCore::dragOperationToSingleGdkDragAction): |
| |
| 2020-06-08 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Unify rounding / clamping conversions between 0-1 float components and 0-255 byte components |
| https://bugs.webkit.org/show_bug.cgi?id=212871 |
| |
| Reviewed by Simon Fraser. |
| |
| Unify all conversions of 0.0f - 1.0f float based color components to 0-255 int based color components |
| to use the new convertToComponentByte() function which scales, rounds (using lroundf) and clamps the |
| value. For consistency, a convertToComponentFloat() function, which just scales down an int based value |
| to a float based value, is also added. |
| |
| - Removes *UsingAlternativeRounding variants (actually, we now only have this variant) for color functions |
| which allowed callers to pick from truncation vs. rounding when overriding alpha. |
| - Replaces all uses of scaleRoundAndClampColorChannel() with convertToComponentByte() (really just a rename). |
| - Replaces uses of nextafter(256, 0) based conversions with convertToComponentByte(). |
| |
| Also: |
| - Moves roundAndClampColorChannel() functions to SVGAnimationAdditiveValueFunctionImpl.h, which was |
| the only places they were used. |
| - Removes areEssentiallyEqual() overload taking ColorComponents<float>. It was ununsed. |
| - Removes makeSimpleColorFromHSLA(...) and just inlines makeSimpleColor(hslToSRGB(...)) which now |
| does the same thing. |
| |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::clampRGBComponent): |
| Use convertPrescaledToComponentByte() to round and clamp the components. |
| |
| (WebCore::CSSPropertyParserHelpers::parseRGBParameters): |
| Use uint8_t more consistently now that helpers ensure that is the return type |
| of conversion functions. |
| |
| (WebCore::CSSPropertyParserHelpers::parseHSLParameters): |
| Switch to using makeSimpleColor(hslToSRGB(...)) directly. |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::DataDetection::detectContentInRange): |
| Switch to using makeSimpleColor(hslToSRGB(...)) directly. |
| |
| * html/HTMLElement.cpp: |
| (WebCore::parseLegacyColorValue): |
| Use uint8_t since that is what toASCIIHexValue() returns. |
| |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::setStrokeStyle): |
| (WebCore::CanvasRenderingContext2DBase::setFillStyle): |
| (WebCore::CanvasRenderingContext2DBase::setShadow): |
| * html/canvas/CanvasStyle.cpp: |
| (WebCore::CanvasStyle::createFromStringWithOverrideAlpha): |
| Replaces uses of colorWithAlphaUsingAlternativeRounding() with colorWithAlpha(). |
| |
| * inspector/agents/InspectorDOMAgent.cpp: |
| (WebCore::parseColor): |
| Use convertToComponentByte() rather than a simple truncating cast. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::light const): |
| (WebCore::Color::dark const): |
| Use makeSimpleColorFromFloats() rather than nextafterf(256.0f, 0.0f) conversion. |
| |
| (WebCore::Color::colorWithAlpha const): |
| (WebCore::Color::invertedColorWithAlpha const): |
| Use convertToComponentByte() for alpha conversion. |
| |
| (WebCore::Color::toSRGBASimpleColorLossy const): |
| Call asExtended().toSRGBAComponentsLossy() directly to avoid unnecessary branch. |
| |
| (WebCore::Color::colorWithAlphaMultipliedBy const): Deleted. |
| (WebCore::Color::colorWithAlphaMultipliedByUsingAlternativeRounding const): Deleted. |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): Deleted. |
| Remove UsingAlternativeRounding variants. |
| |
| * platform/graphics/Color.h: |
| (WebCore::Color::alpha const): |
| Use convertToComponentByte() for alpha conversion. |
| |
| (WebCore::Color::invertedColorWithAlpha const): |
| Add an overload taking an Optional<float> for consistency. |
| |
| (WebCore::Color::colorWithAlphaMultipliedBy const): |
| (WebCore::Color::colorWithAlpha const): |
| Simplify by inlining all variants except the main colorWithAlpha(). |
| |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::areEssentiallyEqual): Deleted. |
| Remove unused function. |
| |
| * platform/graphics/ColorUtilities.h: |
| (WebCore::convertPrescaledToComponentByte): |
| Added. Useful for callers who already have prescaled values but need rounding/clamping. |
| |
| (WebCore::convertToComponentByte): |
| Added. Bottleneck for float to byte based color component conversions. |
| (WebCore::convertToComponentFloat): |
| Added. Bottleneck for byte to float based color component conversions. |
| |
| * platform/graphics/SimpleColor.cpp: |
| (WebCore::makeSimpleColorFromCMYKA): |
| Use makeSimpleColorFromFloats() rather than nextafterf(256.0f, 0.0f) conversion. Eventually, |
| when we probably want this to go away and store CMYKA colors as ExtendedColors with their own |
| color space. |
| |
| (WebCore::makeSimpleColorFromFloats): |
| Moved to header. |
| |
| * platform/graphics/SimpleColor.h: |
| (WebCore::SimpleColor::alphaComponentAsFloat const): |
| Use convertToComponentFloat(). |
| |
| (WebCore::SimpleColor::asSRGBFloatComponents const): |
| Use convertToComponentFloat(). |
| |
| (WebCore::makeSimpleColor): |
| Avoid unncessary clamping of the alpha component by calling constructor directly. |
| |
| (WebCore::makeSimpleColorFromFloats): |
| Inlined. Calls convertToComponentByte now rather than the older (identical) scaleRoundAndClampColorChannel(). |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::prepareCairoContextSource): |
| Replaces use of colorWithAlphaMultipliedByUsingAlternativeRounding with colorWithAlphaMultipliedBy(). |
| |
| * platform/graphics/cg/ColorCG.cpp: |
| (WebCore::makeSimpleColorFromCGColor): |
| Use makeSimpleColorFromFloats() rather than nextafter(256.0, 0.0) conversion. |
| |
| * platform/graphics/filters/FEFlood.cpp: |
| (WebCore::FEFlood::platformApplySoftware): |
| Replaces use of colorWithAlphaMultipliedByUsingAlternativeRounding with colorWithAlphaMultipliedBy(). |
| |
| * platform/graphics/mac/ColorMac.mm: |
| (WebCore::makeSimpleColorFromNSColor): |
| Use makeSimpleColorFromFloats() rather than nextafter(256.0, 0.0) conversion. |
| |
| * platform/ios/ColorIOS.mm: |
| (WebCore::colorFromUIColor): |
| Use makeSimpleColorFromFloats() rather than nextafter(256.0, 0.0) conversion. |
| |
| * svg/SVGStopElement.cpp: |
| (WebCore::SVGStopElement::stopColorIncludingOpacity const): |
| Replaces use of colorWithAlphaMultipliedByUsingAlternativeRounding with colorWithAlphaMultipliedBy(). |
| |
| * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: |
| (WebCore::SVGAnimationColorFunction::roundAndClampColorChannel): |
| Moved from ColorUtilities.h as this was the only use. |
| |
| 2020-06-08 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Replace uses of differenceSquared() with luminance based computations |
| https://bugs.webkit.org/show_bug.cgi?id=212872 |
| |
| Reviewed by Darin Adler. |
| |
| Replace all uses of differenceSquared() with luminance based comparisons. This is |
| possible because all of the uses of differenceSquared() were about identifying a |
| distance from black or white to determine relative brightness. It is more accurate |
| to do this in terms of luminance, and has the added benefit of being something that |
| is expressible in all colorspaces (since luminance is defined as the Y-component |
| of the XYZ colorspace which all colorspaces are convertable to). |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::lighten const): |
| Renamed Color::light() to Color::lighten(), which makes more sense. The algorithm |
| used should be updated at some point to also use luminance, but is unchanged for |
| now. |
| |
| (WebCore::Color::darken const): |
| Renamed Color::dark() to Color::darken(), which makes more sense. The algorithm |
| used should be updated at some point to also use luminance, but is unchanged for |
| now. |
| |
| (WebCore::Color::luminance const): |
| Added. Converts to sRGB for now, but can be updated to work with other color spaces |
| when needed. |
| |
| * platform/graphics/Color.h: |
| Removed differenceSquared. |
| |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::luminance): |
| Updated to use the standard conversion to linear-sRGB. While there are certainly |
| some places that specify a 0.03928 cutoff, the much more accepted value (and value |
| specified by the IEC) is 0.04045, which we use for all other gamma correction. |
| (See https://entropymine.com/imageworsener/srgbformula/ or https://en.wikipedia.org/wiki/SRGB#The_forward_transformation_(CIE_XYZ_to_sRGB) |
| for more information on this). |
| |
| Also added a FIXME about how in the future we can avoid hardcoding the specific values |
| multiple times by extracting them from the linear-sRGB to XYZ matrix. |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::calculateBorderStyleColor): |
| Use luminance, rather than distance as a better comparison for whether the color |
| is too dark or too light for modification. |
| |
| * rendering/RenderTheme.cpp: |
| (WebCore::RenderTheme::disabledTextColor const): |
| Use luminance, rather than distance as a better comparison for whether the color |
| is too dark or too light for modification. Also us the contrastRatio utility |
| function to determine illegibility issues due to contrast, picking a new minimum |
| that roughly matches the old one based fast/forms/input-disabled-color.html |
| |
| * rendering/TextPaintStyle.cpp: |
| (WebCore::adjustColorForVisibilityOnBackground): |
| Use luminance, rather than distance as a better comparison for whether the color |
| is too dark or too light for modification. |
| |
| 2020-06-08 Youenn Fablet <youenn@apple.com> |
| |
| Missing WebRTC Metrics in iOS Safari |
| https://bugs.webkit.org/show_bug.cgi?id=212668 |
| <rdar://problem/63902458> |
| |
| Reviewed by Eric Carlson. |
| |
| Expose more transports related stats. |
| Covered by updated test. |
| |
| * Modules/mediastream/RTCStatsReport.h: |
| * Modules/mediastream/RTCStatsReport.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp: |
| (WebCore::fillRTCTransportStats): |
| |
| 2020-06-08 Youenn Fablet <youenn@apple.com> |
| |
| Add missed WebRTC media-source and remote-inbound-rtp stats |
| https://bugs.webkit.org/show_bug.cgi?id=206645 |
| <rdar://problem/58833958> |
| |
| Reviewed by Eric Carlson. |
| |
| Update stats according latest spec and webrtc backend. |
| We still expose obsolete trackId for consistency with existing WPT tests. |
| Covered by existing and updated tests. |
| |
| * Modules/mediastream/RTCStatsReport.h: |
| (WebCore::RTCStatsReport::InboundRtpStreamStats::InboundRtpStreamStats): |
| (WebCore::RTCStatsReport::RemoteInboundRtpStreamStats::RemoteInboundRtpStreamStats): |
| (WebCore::RTCStatsReport::OutboundRtpStreamStats::OutboundRtpStreamStats): |
| (WebCore::RTCStatsReport::InboundRTPStreamStats::InboundRTPStreamStats): Deleted. |
| (WebCore::RTCStatsReport::OutboundRTPStreamStats::OutboundRTPStreamStats): Deleted. |
| * Modules/mediastream/RTCStatsReport.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp: |
| (WebCore::fillRtpStreamStats): |
| (WebCore::fillReceivedRtpStreamStats): |
| (WebCore::fillInboundRtpStreamStats): |
| (WebCore::fillRemoteInboundRtpStreamStats): |
| (WebCore::fillSentRtpStreamStats): |
| (WebCore::fillOutboundRtpStreamStats): |
| (WebCore::initializeRTCStatsReportBackingMap): |
| (WebCore::fillRTCRTPStreamStats): Deleted. |
| (WebCore::fillInboundRTPStreamStats): Deleted. |
| (WebCore::fillOutboundRTPStreamStats): Deleted. |
| |
| 2020-06-08 Jonathan Bedard <jbedard@apple.com> |
| |
| WebCore: Add tvOS and watchOS SPI headers |
| https://bugs.webkit.org/show_bug.cgi?id=212853 |
| <rdar://problem/64048485> |
| |
| Reviewed by Andy Estes. |
| |
| No new tests, no behavior changed. |
| |
| * platform/ios/WebCoreMotionManager.h: Forward-declare CMMotionManager. |
| * platform/ios/WebCoreMotionManager.mm: Include CoreMotionSPI.h. |
| |
| 2020-06-08 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][IFC] Add support for min/max-width/height |
| https://bugs.webkit.org/show_bug.cgi?id=212904 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/inline-max-width-height-simple.html |
| |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedWidthValue): Adjust assert to check inline, non-replaced boxes only (inline-block is an |
| inline level element but not an inline element) |
| * layout/inlineformatting/InlineFormattingContext.cpp: |
| (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin): |
| (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin): |
| |
| 2020-06-05 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Add missing interfaces from the AR module |
| https://bugs.webkit.org/show_bug.cgi?id=212826 |
| |
| Reviewed by Youenn Fablet. |
| |
| Added the XRInteractionMode partial interface from the WebXR AR module spec. This spec |
| https://immersive-web.github.io/webxr-ar-module/ expands the WebXR Device API with |
| functionality available in AR hardware. |
| |
| Some WebXR wpt tests are now passing. |
| |
| * CMakeLists.txt: Added new files. |
| * DerivedSources.make: Ditto. |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::interactionMode const): Added. |
| * Modules/webxr/WebXRSession.h: Added interactionMode attribute and getter; |
| * Modules/webxr/WebXRSession.idl: Added interactionMode attribute; |
| * Modules/webxr/XRInteractionMode.h: Added. |
| * Modules/webxr/XRInteractionMode.idl: Added. |
| * Sources.txt: Added new files. |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| |
| 2020-05-29 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Pass an unsigned long to cancelAnimationCallback() as handle |
| https://bugs.webkit.org/show_bug.cgi?id=212529 |
| |
| Reviewed by Youenn Fablet. |
| |
| The type of the handle returned by XRSession::requestAnimationFrame() was recently changed |
| to unsigned long from long as there was no point in using signed integers for that. However |
| we forgot to update the cancelAnimationFrame() in the specs as well as it receives the handle |
| returned by requestAnimationFrame(). |
| |
| We landed https://github.com/immersive-web/webxr/pull/1069 in the WebXR specs so we can now |
| safely also replace signed by unsigned integers in our implementation. |
| |
| No new tests as there is no change in functionality. |
| |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::cancelAnimationFrame): Use unsigned ids. |
| * Modules/webxr/WebXRSession.h: Ditto. |
| * Modules/webxr/WebXRSession.idl: Ditto. |
| |
| 2020-06-01 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-flexbox] align-content should apply even when there's just a single line |
| https://bugs.webkit.org/show_bug.cgi?id=209871 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| The 'align-content' property should have no effect on single line flex containers according to |
| the specs https://drafts.csswg.org/css-flexbox/#propdef-align-content. The current code was not |
| differentiating between single-line containers and multi-line containers with just 1 line. |
| |
| Also in order not to introduce regressions and properly support replaced elements as flex items |
| we replaced the computation of child's width for 'flex-direction:column' by a direct call to |
| computeLogicalWidthForFragment() which already properly handles all the cases. It used to be |
| just the shrink-to-fit computation but that was not enough for replaced elements for example or |
| elements with min/max-size restrictions. |
| |
| Several align-content-wrap-* subtests are working now. Updated expectations. |
| |
| * rendering/RenderFlexibleBox.cpp: |
| (WebCore::initialAlignContentOffset): Removed check for #lines <= 1, as it is incorrect because it |
| is true for multi-line containers with just 1 line. |
| (WebCore::RenderFlexibleBox::alignFlexLines): Use isMultiline() instead of "#lines == 1". |
| (WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth const): Replace shrink-to-fit computation |
| by a call computeLogicalWidthForFragment(). |
| (WebCore::RenderFlexibleBox::repositionLogicalHeightDependentFlexItems): Use the whole crossAxisExtent |
| for single line containers. Moved from alignFlexLines() as it fits much better here. |
| |
| |
| 2020-06-08 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Remove ENABLE_APPLE_PAY_SETUP, ENABLE_APPLE_PAY_SESSION_V7, and HAVE_PASSKIT_PAYMENT_SETUP |
| https://bugs.webkit.org/show_bug.cgi?id=212883 |
| <rdar://problem/64090763> |
| |
| Reviewed by Youenn Fablet. |
| |
| These macros evaluate to true whenever ENABLE(APPLE_PAY) is true on platforms supported by |
| trunk WebKit, so we can either remove them or replace them with ENABLE(APPLE_PAY). |
| |
| * Modules/applepay/ApplePaySetup.cpp: |
| * Modules/applepay/ApplePaySetup.idl: |
| * Modules/applepay/ApplePaySetupConfiguration.h: |
| * Modules/applepay/ApplePaySetupConfiguration.idl: |
| * Modules/applepay/ApplePaySetupFeature.idl: |
| * Modules/applepay/ApplePaySetupFeature.mm: |
| * Modules/applepay/ApplePaySetupFeatureState.h: |
| * Modules/applepay/ApplePaySetupFeatureState.idl: |
| * Modules/applepay/ApplePaySetupFeatureType.idl: |
| * Modules/applepay/ApplePaySetupFeatureTypeWebCore.h: |
| * Modules/applepay/ApplePaySetupFeatureWebCore.h: |
| * Modules/applepay/ApplePaySetupWebCore.h: |
| * Modules/applepay/PaymentCoordinator.cpp: |
| * Modules/applepay/PaymentCoordinator.h: |
| * Modules/applepay/PaymentCoordinatorClient.cpp: |
| (WebCore::PaymentCoordinatorClient::supportsVersion): |
| * Modules/applepay/PaymentCoordinatorClient.h: |
| (WebCore::PaymentCoordinatorClient::endApplePaySetup): |
| * testing/MockApplePaySetupFeature.cpp: |
| * testing/MockApplePaySetupFeature.h: |
| * testing/MockPaymentCoordinator.cpp: |
| * testing/MockPaymentCoordinator.h: |
| * testing/MockPaymentCoordinator.idl: |
| |
| 2020-06-08 Antti Koivisto <antti@apple.com> |
| |
| Pseudo-elements (::after) in shadow roots don't animate |
| https://bugs.webkit.org/show_bug.cgi?id=173027 |
| <rdar://problem/42842994> |
| |
| Reviewed by Antoine Quint. |
| |
| Test: animations/keyframe-pseudo-shadow.html |
| |
| * animation/AnimationTimeline.cpp: |
| (WebCore::shouldConsiderAnimation): |
| |
| We should use the actual element instead of the PseudoElement when calling Style::Scope::forOrdinal. |
| The keyframe code that computes the style already does this correctly. |
| |
| 2020-06-08 Youenn Fablet <youenn@apple.com> |
| |
| Use one audio unit for all tracks of a given process |
| https://bugs.webkit.org/show_bug.cgi?id=212406 |
| |
| Reviewed by Eric Carlson. |
| |
| Before the patch, we were creating one audio unit per track to render. |
| This is potentially inefficient as this requires to IPC on iOS each audio data. |
| Instead, we could have one single remote unit that will receive the mixed content of all tracks. |
| For that purpose, introduce AudioMediaStreamTrackRendererUnit as a singleton. |
| |
| AudioMediaStreamTrackRendererCocoa will just register/unregister sources to AudioMediaStreamTrackRendererUnit. |
| AudioMediaStreamTrackRendererUnit will then start/stop as needed and do the mixing. |
| |
| This requires a change in AudioSampleDataSource to support mixing in case track volumes are different. |
| If we have to mix and with different volumes, we first pull the samples in a scratch buffer, apply volume and then mix it with the other tracks. |
| |
| In the future, we might also do the audio rendering with the CoreAudioSharedUnit directly so as to improve as much as possible echo cancellation. |
| |
| Interruption is handled by the fact that all tracks should stop playing, thus stop their renderer, thus unregister themselves from the renderer unit. |
| it might be more future proof to add the unit as an interruption observer as a follow-up. |
| |
| Manually tested plus LayoutTests/webrtc/multi-audio.html |
| |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/audio/mac/AudioSampleBufferList.cpp: |
| (WebCore::mixBuffers): |
| (WebCore::AudioSampleBufferList::mixFrom): |
| * platform/audio/mac/AudioSampleBufferList.h: |
| * platform/audio/mac/AudioSampleDataSource.mm: |
| (WebCore::AudioSampleDataSource::pullSamplesInternal): |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: |
| (WebCore::AudioMediaStreamTrackRendererCocoa::start): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::stop): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::clear): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::setVolume): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::createAudioUnit): Deleted. |
| (WebCore::AudioMediaStreamTrackRendererCocoa::render): Deleted. |
| (WebCore::AudioMediaStreamTrackRendererCocoa::inputProc): Deleted. |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h: |
| (): Deleted. |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.cpp: Added. |
| (WebCore::AudioMediaStreamTrackRendererUnit::singleton): |
| (WebCore::AudioMediaStreamTrackRendererUnit::~AudioMediaStreamTrackRendererUnit): |
| (WebCore::AudioMediaStreamTrackRendererUnit::addSource): |
| (WebCore::AudioMediaStreamTrackRendererUnit::removeSource): |
| (WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnitIfNeeded): |
| (WebCore::AudioMediaStreamTrackRendererUnit::start): |
| (WebCore::AudioMediaStreamTrackRendererUnit::stop): |
| (WebCore::AudioMediaStreamTrackRendererUnit::formatDescription): |
| (WebCore::AudioMediaStreamTrackRendererUnit::createAudioUnit): |
| (WebCore::AudioMediaStreamTrackRendererUnit::render): |
| (WebCore::AudioMediaStreamTrackRendererUnit::inputProc): |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererUnit.h: Copied from Source/WebCore/platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h. |
| |
| 2020-06-08 youenn fablet <youenn@apple.com> |
| |
| [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| <rdar://problem/58985368> |
| |
| Reviewed by Eric Carlson. |
| |
| AVAssetWriterDelegate allows to grab recorded data whenever wanted. |
| This delegate requires passing compressed samples to AVAssetWriter. |
| Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter. |
| These classes are AudioSampleBufferCompressor and VideoSampleBufferCompressor. |
| They support AAC and H264 so far and should be further improved to support more encoding options. |
| |
| Instantiate real writer only for platforms supporting AVAssetWriterDelegate, since it is not supported everywhere. |
| The writer, doing the pacakging, is receiving compressed buffer from the audio/video compressors. |
| It then sends data when being request to flush to its delegate, which will send data to the MediaRecorderPrivateWriter. |
| The MediaRecorderPrivateWriter stores the data in a SharedBuffer until MediaRecorder asks for data. |
| |
| Note that, whenever we request data, we flush the writer and insert an end of video sample to make sure video data gets flushed. |
| Therefore data should not be requested too fast to get adequate video compression. |
| |
| Covered by existing tests. |
| |
| * Modules/mediarecorder/MediaRecorderProvider.cpp: |
| (WebCore::MediaRecorderProvider::createMediaRecorderPrivate): |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: |
| (WebCore::MediaRecorderPrivateAVFImpl::create): |
| * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: Added. |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: Added. |
| (WebCore::AudioSampleBufferCompressor::create): |
| (WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor): |
| (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor): |
| (WebCore::AudioSampleBufferCompressor::initialize): |
| (WebCore::AudioSampleBufferCompressor::finish): |
| (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription): |
| (WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat): |
| (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded): |
| (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount): |
| (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets): |
| (WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc): |
| (WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets): |
| (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime): |
| (WebCore::AudioSampleBufferCompressor::processSampleBuffer): |
| (WebCore::AudioSampleBufferCompressor::addSampleBuffer): |
| (WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer): |
| (WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer): |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (-[WebAVAssetWriterDelegate initWithWriter:]): |
| (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]): |
| (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]): |
| (-[WebAVAssetWriterDelegate close]): |
| (WebCore::MediaRecorderPrivateWriter::create): |
| (WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback): |
| (WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback): |
| (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter): |
| (WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter): |
| (WebCore::MediaRecorderPrivateWriter::initialize): |
| (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::startAssetWriter): |
| (WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::appendCompressedSampleBuffers): |
| (WebCore::appendEndsPreviousSampleDurationMarker): |
| (WebCore::MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded): |
| (WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::clear): |
| (WebCore::copySampleBufferWithCurrentTimeStamp): |
| (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer): |
| (WebCore::createAudioFormatDescription): |
| (WebCore::createAudioSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::stopRecording): |
| (WebCore::MediaRecorderPrivateWriter::appendData): |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: Copied from Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h. |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: Added. |
| (WebCore::VideoSampleBufferCompressor::create): |
| (WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor): |
| (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor): |
| (WebCore::VideoSampleBufferCompressor::initialize): |
| (WebCore::VideoSampleBufferCompressor::finish): |
| (WebCore::VideoSampleBufferCompressor::videoCompressionCallback): |
| (WebCore::VideoSampleBufferCompressor::initCompressionSession): |
| (WebCore::VideoSampleBufferCompressor::processSampleBuffer): |
| (WebCore::VideoSampleBufferCompressor::addSampleBuffer): |
| (WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer): |
| (WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer): |
| |
| 2020-06-08 Youenn Fablet <youenn@apple.com> |
| |
| File URLs with hostnames are misleading |
| https://bugs.webkit.org/show_bug.cgi?id=212739 |
| <rdar://problem/63754917> |
| |
| Reviewed by Alex Christensen. |
| |
| Showing a file URL like file://example.org/test is misleading to users. |
| To prevent this, we just do a redirection to the same file URL with an empty host. |
| Remove the port at the same time. |
| Covered by added API test. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::willSendRequest): |
| |
| 2020-06-08 Rob Buis <rbuis@igalia.com> |
| |
| Simplify fallback content handling in FrameLoader |
| https://bugs.webkit.org/show_bug.cgi?id=212880 |
| |
| Reviewed by Youenn Fablet. |
| |
| Simplify fallback content handling in FrameLoader, this can be inlined |
| and some HTMLObjectElement checks can be combined. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::continueAfterContentPolicy): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::receivedMainResourceError): |
| (WebCore::FrameLoader::handleFallbackContent): Deleted. |
| (WebCore::FrameLoader::isHostedByObjectElement const): Deleted. |
| * loader/FrameLoader.h: |
| * loader/HistoryController.cpp: |
| (WebCore::FrameLoader::HistoryController::createItemTree): |
| |
| 2020-06-07 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][Height percentage] Skip anonymous wrappers when searching for fixed height |
| https://bugs.webkit.org/show_bug.cgi?id=212881 |
| |
| Reviewed by Antti Koivisto. |
| |
| When the block level box is a direct child of an inline level box (<span><div></div></span>) and we wrap it into a continuation, |
| the containing block (anonymous wrapper) is not the box we need to check for fixed height. |
| |
| Test: fast/layoutformattingcontext/height-precentage-with-anonymous-wrapper.html |
| |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedHeightValue const): |
| |
| 2020-06-07 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][BFC] Intrinsic width computation should take min/max-width into account. |
| https://bugs.webkit.org/show_bug.cgi?id=212876 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/min-max-content-width-simple2.html |
| |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedWidthValue): Address Sam's post-landing comment. |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints): |
| |
| 2020-06-07 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] Pass in the element attributes to Layout::ReplacedBox |
| https://bugs.webkit.org/show_bug.cgi?id=212879 |
| |
| Reviewed by Antti Koivisto. |
| |
| The information whether the replace box is an image box is required to see if the box has intrinsic ratio (used for sizing inflow replaced content). |
| |
| * layout/layouttree/LayoutReplacedBox.cpp: |
| (WebCore::Layout::ReplacedBox::ReplacedBox): |
| (): Deleted. |
| * layout/layouttree/LayoutReplacedBox.h: |
| * layout/layouttree/LayoutTreeBuilder.cpp: |
| (WebCore::Layout::TreeBuilder::createReplacedBox): |
| (WebCore::Layout::TreeBuilder::createLayoutBox): |
| * layout/layouttree/LayoutTreeBuilder.h: |
| |
| 2020-06-07 Philippe Normand <pnormand@igalia.com> |
| |
| Remove ENABLE_VIDEO_TRACK ifdef guards |
| https://bugs.webkit.org/show_bug.cgi?id=212568 |
| |
| Reviewed by Youenn Fablet. |
| |
| * CMakeLists.txt: |
| * Configurations/FeatureDefines.xcconfig: |
| * Modules/mediacontrols/MediaControlsHost.cpp: |
| * Modules/mediasource/AudioTrackMediaSource.h: |
| * Modules/mediasource/AudioTrackMediaSource.idl: |
| * Modules/mediasource/SourceBuffer.h: |
| * Modules/mediasource/SourceBuffer.idl: |
| * Modules/mediasource/TextTrackMediaSource.h: |
| * Modules/mediasource/TextTrackMediaSource.idl: |
| * Modules/mediasource/VideoTrackMediaSource.h: |
| * Modules/mediasource/VideoTrackMediaSource.idl: |
| * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp: |
| (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture): |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSAudioTrackCustom.cpp: |
| * bindings/js/JSAudioTrackListCustom.cpp: |
| * bindings/js/JSTextTrackCueCustom.cpp: |
| * bindings/js/JSTextTrackCustom.cpp: |
| * bindings/js/JSTextTrackListCustom.cpp: |
| * bindings/js/JSTrackCustom.cpp: |
| * bindings/js/JSTrackCustom.h: |
| * bindings/js/JSVideoTrackCustom.cpp: |
| * bindings/js/JSVideoTrackListCustom.cpp: |
| * css/CSSSelector.cpp: |
| (WebCore::CSSSelector::pseudoId): |
| (WebCore::CSSSelector::selectorText const): |
| * css/CSSSelector.h: |
| * css/SelectorChecker.cpp: |
| (WebCore::SelectorChecker::checkOne const): |
| * css/SelectorCheckerTestFunctions.h: |
| (WebCore::matchesLangPseudoClass): |
| * css/SelectorPseudoClassAndCompatibilityElementMap.in: |
| * css/SelectorPseudoElementTypeMap.in: |
| * css/parser/CSSParserSelector.h: |
| (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching const): |
| (WebCore::CSSParserSelector::isPseudoElementCueFunction const): |
| * css/parser/CSSSelectorParser.cpp: |
| (WebCore::CSSSelectorParser::consumePseudo): |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::addPseudoClassType): |
| * dom/Document.cpp: |
| * dom/Document.h: |
| * dom/EventNames.in: |
| * dom/EventTargetFactory.in: |
| * dom/Node.h: |
| * history/BackForwardCache.cpp: |
| * history/BackForwardCache.h: |
| * history/CachedPage.cpp: |
| (WebCore::CachedPage::restore): |
| (WebCore::CachedPage::clear): |
| * history/CachedPage.h: |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::as const): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::HTMLMediaElement): |
| (WebCore::HTMLMediaElement::~HTMLMediaElement): |
| (WebCore::HTMLMediaElement::registerWithDocument): |
| (WebCore::HTMLMediaElement::unregisterWithDocument): |
| (WebCore::HTMLMediaElement::finishParsingChildren): |
| (WebCore::HTMLMediaElement::prepareForLoad): |
| (WebCore::HTMLMediaElement::selectMediaResource): |
| (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay const): |
| (WebCore::HTMLMediaElement::setReadyState): |
| (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): |
| (WebCore::HTMLMediaElement::playInternal): |
| (WebCore::HTMLMediaElement::setVolume): |
| (WebCore::HTMLMediaElement::playbackProgressTimerFired): |
| (WebCore::HTMLMediaElement::configureTextTracks): |
| (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): |
| (WebCore::HTMLMediaElement::userCancelledLoad): |
| (WebCore::HTMLMediaElement::clearMediaPlayer): |
| (WebCore::HTMLMediaElement::syncTextTrackBounds): |
| (WebCore::HTMLMediaElement::setVideoFullscreenStandby): |
| (WebCore::HTMLMediaElement::setVideoFullscreenLayer): |
| (WebCore::HTMLMediaElement::hasClosedCaptions const): |
| (WebCore::HTMLMediaElement::setClosedCaptionsVisible): |
| (WebCore::HTMLMediaElement::createMediaPlayer): |
| (WebCore::HTMLMediaElement::bufferingPolicy const): |
| * html/HTMLMediaElement.h: |
| * html/HTMLMediaElement.idl: |
| * html/HTMLTagNames.in: |
| * html/HTMLTrackElement.cpp: |
| * html/HTMLTrackElement.h: |
| * html/HTMLTrackElement.idl: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::texImageSourceHelper): |
| (WebCore::WebGLRenderingContextBase::validateTexFuncParameters): |
| * html/shadow/MediaControlTextTrackContainerElement.cpp: |
| * html/shadow/MediaControlTextTrackContainerElement.h: |
| * html/track/AudioTrack.cpp: |
| * html/track/AudioTrack.h: |
| * html/track/AudioTrack.idl: |
| * html/track/AudioTrackList.cpp: |
| * html/track/AudioTrackList.h: |
| * html/track/AudioTrackList.idl: |
| * html/track/DataCue.cpp: |
| * html/track/DataCue.h: |
| * html/track/DataCue.idl: |
| * html/track/InbandDataTextTrack.cpp: |
| * html/track/InbandDataTextTrack.h: |
| * html/track/InbandGenericTextTrack.cpp: |
| * html/track/InbandGenericTextTrack.h: |
| * html/track/InbandTextTrack.cpp: |
| * html/track/InbandTextTrack.h: |
| * html/track/InbandWebVTTTextTrack.cpp: |
| * html/track/InbandWebVTTTextTrack.h: |
| * html/track/LoadableTextTrack.cpp: |
| * html/track/LoadableTextTrack.h: |
| * html/track/TextTrack.cpp: |
| * html/track/TextTrack.h: |
| * html/track/TextTrack.idl: |
| * html/track/TextTrackCue.cpp: |
| * html/track/TextTrackCue.h: |
| * html/track/TextTrackCue.idl: |
| * html/track/TextTrackCueGeneric.cpp: |
| * html/track/TextTrackCueGeneric.h: |
| * html/track/TextTrackCueGeneric.idl: |
| * html/track/TextTrackCueList.cpp: |
| * html/track/TextTrackCueList.h: |
| * html/track/TextTrackCueList.idl: |
| * html/track/TextTrackList.cpp: |
| * html/track/TextTrackList.h: |
| * html/track/TextTrackList.idl: |
| * html/track/TrackBase.cpp: |
| * html/track/TrackBase.h: |
| * html/track/TrackEvent.cpp: |
| * html/track/TrackEvent.h: |
| * html/track/TrackEvent.idl: |
| * html/track/TrackListBase.cpp: |
| * html/track/TrackListBase.h: |
| * html/track/VTTCue.cpp: |
| * html/track/VTTCue.h: |
| * html/track/VTTCue.idl: |
| * html/track/VTTRegion.cpp: |
| * html/track/VTTRegion.h: |
| * html/track/VTTRegion.idl: |
| * html/track/VTTRegionList.cpp: |
| * html/track/VTTRegionList.h: |
| * html/track/VTTRegionList.idl: |
| * html/track/VideoTrack.cpp: |
| * html/track/VideoTrack.h: |
| * html/track/VideoTrack.idl: |
| * html/track/VideoTrackList.cpp: |
| * html/track/VideoTrackList.h: |
| * html/track/VideoTrackList.idl: |
| * html/track/WebVTTElement.cpp: |
| * html/track/WebVTTElement.h: |
| * html/track/WebVTTParser.cpp: |
| * html/track/WebVTTParser.h: |
| * html/track/WebVTTToken.h: |
| * html/track/WebVTTTokenizer.cpp: |
| * html/track/WebVTTTokenizer.h: |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::resourceTypeFromAsAttribute): |
| (WebCore::createLinkPreloadResourceClient): |
| (WebCore::LinkLoader::isSupportedType): |
| * loader/ResourceLoadInfo.cpp: |
| (WebCore::ContentExtensions::toResourceType): |
| * loader/SubresourceLoader.cpp: |
| (WebCore::logResourceLoaded): |
| * loader/TextTrackLoader.cpp: |
| * loader/TextTrackLoader.h: |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::defaultPriorityForResourceType): |
| * loader/cache/CachedResource.h: |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::createResource): |
| (WebCore::contentTypeFromResourceType): |
| (WebCore::CachedResourceLoader::checkInsecureContent const): |
| (WebCore::CachedResourceLoader::allowedByContentSecurityPolicy const): |
| (WebCore::destinationForType): |
| * loader/cache/CachedResourceLoader.h: |
| * loader/cache/CachedTextTrack.cpp: |
| * loader/cache/CachedTextTrack.h: |
| * page/CaptionUserPreferences.cpp: |
| * page/CaptionUserPreferences.h: |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| * page/CaptionUserPreferencesMediaAF.h: |
| * page/Page.cpp: |
| (WebCore::Page::setPageScaleFactor): |
| (WebCore::Page::setUserInterfaceLayoutDirection): |
| (WebCore::Page::doAfterUpdateRendering): |
| (WebCore::Page::forEachMediaElement): |
| * page/Page.h: |
| * page/PageGroup.cpp: |
| * page/PageGroup.h: |
| * page/Settings.yaml: |
| * platform/LocalizedStrings.cpp: |
| * platform/LocalizedStrings.h: |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType): |
| * platform/SerializedPlatformDataCue.cpp: |
| * platform/graphics/AudioTrackPrivate.h: |
| * platform/graphics/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::create): |
| (WebCore::ImageDecoder::supportsMediaType): |
| * platform/graphics/InbandGenericCue.cpp: |
| * platform/graphics/InbandGenericCue.h: |
| * platform/graphics/InbandTextTrackPrivate.h: |
| * platform/graphics/InbandTextTrackPrivateClient.h: |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::buildMediaEnginesVector): |
| * platform/graphics/MediaPlayer.h: |
| (WebCore::MediaPlayerClient::textTrackRepresentationBoundsChanged): |
| * platform/graphics/MediaPlayerPrivate.h: |
| (WebCore::MediaPlayerPrivateInterface::tracksChanged): |
| * platform/graphics/TextTrackRepresentation.cpp: |
| * platform/graphics/TextTrackRepresentation.h: |
| * platform/graphics/TrackPrivateBase.cpp: |
| * platform/graphics/TrackPrivateBase.h: |
| * platform/graphics/VideoTrackPrivate.h: |
| * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: |
| * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: |
| * platform/graphics/avfoundation/AudioTrackPrivateAVF.h: |
| * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: |
| * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: |
| * platform/graphics/avfoundation/VideoTrackPrivateAVF.h: |
| * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: |
| * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.cpp: |
| * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.cpp: |
| * platform/graphics/avfoundation/objc/VideoTrackPrivateAVFObjC.h: |
| * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h: |
| * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm: |
| * platform/graphics/cocoa/TextTrackRepresentationCocoa.h: |
| * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: |
| * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: |
| * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: |
| * platform/graphics/gstreamer/GStreamerCommon.cpp: |
| (WebCore::initializeGStreamer): |
| * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: |
| * platform/graphics/gstreamer/ImageDecoderGStreamer.h: |
| * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h: |
| * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: |
| * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer): |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): |
| (WebCore::MediaPlayerPrivateGStreamer::newTextSample): |
| (WebCore::MediaPlayerPrivateGStreamer::updateTracks): |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): |
| (WebCore::MediaPlayerPrivateGStreamer::purgeInvalidTextTracks): |
| (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| * platform/graphics/gstreamer/TextCombinerGStreamer.cpp: |
| * platform/graphics/gstreamer/TextCombinerGStreamer.h: |
| * platform/graphics/gstreamer/TextSinkGStreamer.cpp: |
| * platform/graphics/gstreamer/TextSinkGStreamer.h: |
| * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: |
| * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: |
| * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: |
| * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: |
| * platform/mac/SerializedPlatformDataCueMac.h: |
| * platform/mac/SerializedPlatformDataCueMac.mm: |
| * platform/mediastream/AudioMediaStreamTrackRenderer.cpp: |
| * platform/mediastream/AudioMediaStreamTrackRenderer.h: |
| * platform/mediastream/AudioTrackPrivateMediaStream.cpp: |
| * platform/mediastream/AudioTrackPrivateMediaStream.h: |
| * platform/mediastream/VideoTrackPrivateMediaStream.h: |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h: |
| * rendering/RenderVTTCue.cpp: |
| * rendering/RenderVTTCue.h: |
| * style/ElementRuleCollector.cpp: |
| (WebCore::Style::ElementRuleCollector::collectMatchingShadowPseudoElementRules): |
| * style/PropertyCascade.cpp: |
| (WebCore::Style::PropertyCascade::addMatch): |
| * style/RuleData.cpp: |
| (WebCore::Style::determinePropertyWhitelistType): |
| * style/RuleData.h: |
| * style/RuleSet.cpp: |
| (WebCore::Style::RuleSet::addRule): |
| (WebCore::Style::RuleSet::traverseRuleDatas): |
| (WebCore::Style::RuleSet::hasShadowPseudoElementRules const): |
| (WebCore::Style::RuleSet::shrinkToFit): |
| * style/RuleSet.h: |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const): |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| (WebCore::InternalSettings::setShouldDisplayTrackKind): |
| (WebCore::InternalSettings::shouldDisplayTrackKind): |
| * testing/InternalSettings.h: |
| * testing/InternalSettings.idl: |
| * testing/Internals.cpp: |
| (WebCore::Internals::resetToConsistentState): |
| (WebCore::Internals::Internals): |
| (WebCore::Internals::userPreferredAudioCharacteristics const): |
| (WebCore::Internals::setUserPreferredAudioCharacteristic): |
| (WebCore::Internals::captionsStyleSheetOverride): |
| (WebCore::Internals::setCaptionsStyleSheetOverride): |
| (WebCore::Internals::setPrimaryAudioTrackLanguageOverride): |
| (WebCore::Internals::setCaptionDisplayMode): |
| (WebCore::Internals::textTrackBCP47Language): |
| (WebCore::Internals::getCurrentMediaControlsStatusForElement): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-06-06 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Crash when running web-apis data collection |
| https://bugs.webkit.org/show_bug.cgi?id=212458 |
| |
| Reviewed by Mark Lam. |
| |
| Test: js/dom/dom-attribute-getter-setter.html |
| |
| For properties using DOMAttribute property attribute in the table, code generator must use DOMAttributeGetterSetter instead of CustomGetterSetter. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::JSTestObjPrototype::finishCreation): |
| |
| 2020-06-06 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] Add support for width: min/max-content |
| https://bugs.webkit.org/show_bug.cgi?id=212869 |
| |
| Reviewed by Antti Koivisto. |
| |
| Use the existing intrinsic width logic to compute min/max-content width. |
| |
| Test: fast/layoutformattingcontext/min-max-content-width-simple.html |
| |
| * layout/FormattingContext.h: |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedWidthValue): |
| (WebCore::Layout::FormattingContext::Geometry::computedWidth): |
| (WebCore::Layout::FormattingContext::Geometry::fixedValue const): |
| (WebCore::Layout::FormattingContext::Geometry::computedMinWidth): |
| (WebCore::Layout::FormattingContext::Geometry::computedMaxWidth): |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry): |
| (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin): |
| (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin): |
| (WebCore::Layout::FormattingContext::Geometry::computedWidth const): Deleted. |
| (WebCore::Layout::FormattingContext::Geometry::computedMinWidth const): Deleted. |
| (WebCore::Layout::FormattingContext::Geometry::computedMaxWidth const): Deleted. |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const): Deleted. |
| (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin const): Deleted. |
| (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const): Deleted. |
| * layout/blockformatting/BlockFormattingContext.h: |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin): |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin): |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const): Deleted. |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin const): Deleted. |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::computedColumnWidth): |
| (WebCore::Layout::TableFormattingContext::Geometry::computedColumnWidth const): Deleted. |
| |
| 2020-06-06 Devin Rousso <drousso@apple.com> |
| |
| [ macOS wk2 ] inspector/page/setBootstrapScript-sub-frame.html is flaky failing |
| https://bugs.webkit.org/show_bug.cgi?id=207053 |
| <rdar://problem/59064908> |
| |
| Reviewed by Timothy Hatcher. |
| |
| Test: inspector/page/setBootstrapScript-sub-frame.html |
| |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::didCommitLoadImpl): |
| Ensure the `InspectorPageAgent` sends the new `Page.Frame` payload to the frontend before |
| the `PageRuntimeAgent` so that a `WI.Frame` exists before adding any `WI.ExecutionContext`. |
| |
| 2020-06-06 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION (r262364): Disney Plus crashes playing videos |
| https://bugs.webkit.org/show_bug.cgi?id=212862 |
| <rdar://problem/64044841> |
| |
| Reviewed by Eric Carlson. |
| |
| In r262364, we specified an incorrect number size for CFNumberGetValue, which nevertheless |
| worked fine in debug builds, but overwrote stack data in release builds, leading to a crash when |
| the returned pointer was ref()d. The correct size for a FourCharCode is a |
| kCFNumberSInt32Type, not a kCFNumberLongType. |
| |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| |
| 2020-06-06 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for GradientSpreadMethod |
| <https://webkit.org/b/212868> |
| <rdar://problem/64069035> |
| |
| Reviewed by Anders Carlsson. |
| |
| Summary: |
| - Convert GradientSpreadMethod to an enum class. |
| - Add WTF::EnumTraits<AutocapitalizeType> for IPC. |
| - Remove use of decodeEnum() and encodeEnum(). |
| |
| * platform/graphics/Gradient.h: |
| (WebCore::Gradient::encode const): |
| (WebCore::Gradient::decode): |
| * platform/graphics/GraphicsTypes.h: |
| * platform/graphics/cairo/GradientCairo.cpp: |
| (WebCore::Gradient::createPlatformGradient): |
| * platform/graphics/cg/GradientCG.cpp: |
| (WebCore::Gradient::paint): |
| * rendering/svg/RenderSVGResourceGradient.cpp: |
| (WebCore::RenderSVGResourceGradient::applyResource): |
| |
| 2020-06-06 Rob Buis <rbuis@igalia.com> |
| |
| Reduce includes for CustomHeaderFields |
| https://bugs.webkit.org/show_bug.cgi?id=212691 |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Reduce includes for CustomHeaderFields, I guess these were needed |
| at some point but not anymore. |
| |
| * Modules/applepay/ApplePaySession.cpp: |
| * Modules/applepay/PaymentSession.cpp: |
| * bindings/js/ScriptController.cpp: |
| * contentextensions/ContentExtensionsBackend.cpp: |
| * dom/Document.cpp: |
| * editing/cocoa/EditorCocoa.mm: |
| * editing/cocoa/HTMLConverter.mm: |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| * editing/markup.cpp: |
| * history/CachedFrame.cpp: |
| * html/HTMLDocument.cpp: |
| * html/HTMLHtmlElement.cpp: |
| * html/HTMLMediaElement.cpp: |
| * html/ImageDocument.cpp: |
| * html/MediaDocument.cpp: |
| * html/PluginDocument.cpp: |
| * html/parser/HTMLDocumentParser.cpp: |
| * html/parser/XSSAuditor.cpp: |
| * inspector/InspectorInstrumentation.cpp: |
| * inspector/agents/InspectorApplicationCacheAgent.cpp: |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| * inspector/agents/InspectorPageAgent.cpp: |
| * inspector/agents/page/PageNetworkAgent.cpp: |
| * loader/ApplicationManifestLoader.cpp: |
| * loader/FrameLoader.cpp: |
| * loader/LoadTiming.cpp: |
| * loader/NetscapePlugInStreamLoader.cpp: |
| * loader/ResourceLoader.cpp: |
| * loader/SubresourceLoader.cpp: |
| * loader/appcache/ApplicationCacheHost.cpp: |
| * loader/archive/cf/LegacyWebArchive.cpp: |
| * loader/icon/IconLoader.cpp: |
| * page/ContextMenuController.cpp: |
| * page/FrameView.cpp: |
| * page/Page.cpp: |
| * page/Performance.cpp: |
| * page/PerformanceNavigation.cpp: |
| * page/Quirks.cpp: |
| * page/UserContentProvider.cpp: |
| * page/csp/ContentSecurityPolicy.cpp: |
| * page/mac/PageMac.mm: |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: |
| * svg/graphics/SVGImage.cpp: |
| * testing/Internals.cpp: |
| |
| 2020-06-06 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Add testing and logging for ApplePaySetup |
| https://bugs.webkit.org/show_bug.cgi?id=211972 |
| <rdar://problem/63291965> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: http/tests/ssl/applepay/ApplePaySetup.https.html |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Modules/applepay/ApplePaySetup.cpp: |
| (WebCore::ApplePaySetup::getSetupFeatures): |
| (WebCore::ApplePaySetup::begin): |
| (WebCore::ApplePaySetup::ApplePaySetup): |
| (WebCore::ApplePaySetup::stop): |
| * Modules/applepay/ApplePaySetup.idl: |
| * Modules/applepay/ApplePaySetupConfiguration.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupConfiguration.idl: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeature.idl: |
| * Modules/applepay/ApplePaySetupFeature.mm: |
| (WebCore::ApplePaySetupFeature::state const): |
| * Modules/applepay/ApplePaySetupFeatureState.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeatureState.idl: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeatureType.idl: |
| * Modules/applepay/ApplePaySetupFeatureWebCore.h: |
| * Modules/applepay/ApplePaySetupWebCore.h: |
| (WebCore::ApplePaySetup::create): |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const): |
| (WebCore::PaymentCoordinator::getSetupFeatures): |
| (WebCore::PaymentCoordinator::beginApplePaySetup): |
| (WebCore::PaymentCoordinator::endApplePaySetup): |
| * Modules/applepay/PaymentCoordinator.h: |
| * Modules/applepay/PaymentCoordinatorClient.h: |
| (WebCore::PaymentCoordinatorClient::getSetupFeatures): |
| (WebCore::PaymentCoordinatorClient::beginApplePaySetup): |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * testing/MockApplePaySetupFeature.cpp: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureWebCore.h. |
| (WebCore::MockApplePaySetupFeature::create): |
| (WebCore::MockApplePaySetupFeature::MockApplePaySetupFeature): |
| * testing/MockApplePaySetupFeature.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureWebCore.h. |
| * testing/MockPaymentCoordinator.cpp: |
| (WebCore::MockPaymentCoordinator::addSetupFeature): |
| (WebCore::MockPaymentCoordinator::getSetupFeatures): |
| (WebCore::MockPaymentCoordinator::beginApplePaySetup): |
| * testing/MockPaymentCoordinator.h: |
| * testing/MockPaymentCoordinator.idl: |
| |
| 2020-06-06 David Kilzer <ddkilzer@apple.com> |
| |
| Follow-up: Use OptionSet<DragOperation> for mask values |
| <https://webkit.org/b/212605> |
| <rdar://problem/64069091> |
| |
| * dom/DataTransfer.cpp: |
| (WebCore::DataTransfer::destinationOperationMask const): |
| - Don't compare to anyDragOperation(). Darin suggested this |
| change during patch review, but this use was missed. |
| |
| 2020-06-06 David Kilzer <ddkilzer@apple.com> |
| |
| Use OptionSet<DragOperation> for mask values |
| <https://webkit.org/b/212605> |
| |
| Reviewed by Darin Adler. |
| |
| In broad strokes: |
| - Replace use of DragOperation with OptionSet<DragOperation> or |
| Optional<DragOperation>. |
| - Rename function parameters and local variables to denote use |
| of mask values. |
| - Remove DragOperationNone enum value. |
| - Replace DragOperationEvery enum value with anyDragOperation(). |
| |
| * dom/DataTransfer.cpp: |
| (WebCore::DataTransfer::createForDrop): |
| (WebCore::DataTransfer::createForUpdatingDropTarget): |
| (WebCore::dragOpFromIEOp): |
| (WebCore::IEOpFromDragOp): |
| (WebCore::DataTransfer::sourceOperation const): Rename. |
| (WebCore::DataTransfer::sourceOperationMask const): |
| (WebCore::DataTransfer::destinationOperation const): Rename. |
| (WebCore::DataTransfer::destinationOperationMask const): |
| (WebCore::DataTransfer::setSourceOperation): Rename. |
| (WebCore::DataTransfer::setSourceOperationMask): |
| (WebCore::DataTransfer::setDestinationOperation): Rename. |
| (WebCore::DataTransfer::setDestinationOperationMask): |
| * dom/DataTransfer.h: |
| (WebCore::DataTransfer::createForDrop): |
| (WebCore::DataTransfer::createForUpdatingDropTarget): |
| (WebCore::DataTransfer::sourceOperation const): Rename. |
| (WebCore::DataTransfer::sourceOperationMask const): |
| (WebCore::DataTransfer::destinationOperation const): Rename. |
| (WebCore::DataTransfer::destinationOperationMask const): |
| (WebCore::DataTransfer::setSourceOperation): Rename. |
| (WebCore::DataTransfer::setSourceOperationMask): |
| (WebCore::DataTransfer::setDestinationOperation): Rename. |
| (WebCore::DataTransfer::setDestinationOperationMask): |
| * page/DragActions.h: |
| (WebCore::anyDragOperation): Add. |
| (WTF::EnumTraits<WebCore::DragOperation>): Add. |
| (WTF::OptionSet<WebCore::DragOperation>): Add. |
| * page/DragController.cpp: |
| (WebCore::DragController::dragEntered): |
| (WebCore::DragController::dragUpdated): |
| (WebCore::DragController::performDragOperation): |
| (WebCore::DragController::dragEnteredOrUpdated): |
| (WebCore::DragController::tryDocumentDrag): |
| (WebCore::DragController::operationForLoad): |
| (WebCore::defaultOperationForDrag): |
| (WebCore::DragController::tryDHTMLDrag): |
| - Change logic to call defaultOperationForDrag() to convert |
| targetResponse.operationMask to a single operation when |
| targetResponse.operationMask but doesn't contain with any |
| bit values set in sourceOperationMask. |
| (WebCore::DragController::startDrag): |
| * page/DragController.h: |
| (WebCore::DragController::dragEntered): |
| (WebCore::DragController::dragUpdated): |
| (WebCore::DragController::sourceDragOperation const): Rename. |
| (WebCore::DragController::sourceDragOperationMask const): |
| (WebCore::DragController::startDrag): |
| (WebCore::DragController::dragEnteredOrUpdated): |
| (WebCore::DragController::operationForLoad): |
| (WebCore::DragController::tryDocumentDrag): |
| (WebCore::DragController::tryDHTMLDrag): |
| (WebCore::DragController::dragOperation): |
| * page/EventHandler.cpp: |
| (WebCore::convertDropZoneOperationToDragOperation): |
| (WebCore::convertDragOperationToDropZoneOperation): |
| (WebCore::findDropZone): |
| (WebCore::EventHandler::dispatchDragEnterOrDragOverEvent): |
| (WebCore::EventHandler::updateDragAndDrop): |
| (WebCore::EventHandler::cancelDragAndDrop): |
| (WebCore::EventHandler::performDragAndDrop): |
| (WebCore::EventHandler::dragSourceEndedAt): |
| (WebCore::EventHandler::handleDrag): |
| * page/EventHandler.h: |
| (WebCore::EventHandler::updateDragAndDrop): |
| (WebCore::EventHandler::cancelDragAndDrop): |
| (WebCore::EventHandler::performDragAndDrop): |
| (WebCore::EventHandler::dragSourceEndedAt): |
| (WebCore::EventHandler::dispatchDragEnterOrDragOverEvent): |
| * page/gtk/DragControllerGtk.cpp: |
| (WebCore::DragController::dragOperation): |
| * page/mac/DragControllerMac.mm: |
| (WebCore::DragController::dragOperation): |
| * page/win/DragControllerWin.cpp: |
| (WebCore::DragController::dragOperation): |
| - Clean up comment. |
| * platform/DragData.cpp: |
| (WebCore::DragData::DragData): |
| * platform/DragData.h: |
| (WebCore::DragData::DragData): |
| (WebCore::DragData::draggingSourceOperationMask const): |
| * platform/cocoa/DragDataCocoa.mm: |
| (WebCore::DragData::DragData): |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::gdkDragActionToDragOperation): |
| (WebCore::dragOperationToGdkDragActions): |
| (WebCore::dragOperationToSingleGdkDragAction): |
| * platform/gtk/GtkUtilities.h: |
| (WebCore::gdkDragActionToDragOperation): |
| (WebCore::dragOperationToGdkDragActions): |
| (WebCore::dragOperationToSingleGdkDragAction): |
| * platform/win/DragDataWin.cpp: |
| (WebCore::DragData::DragData): |
| |
| 2020-06-06 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] FormattingContext::Geometry::computedValue should not try to resolve values when layout is required |
| https://bugs.webkit.org/show_bug.cgi?id=212867 |
| |
| Reviewed by Antti Koivisto. |
| |
| This is in preparation for adding min/max/fit-content support. |
| |
| * layout/FormattingContext.h: |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedWidth const): |
| (WebCore::Layout::FormattingContext::Geometry::computedValue const): |
| (WebCore::Layout::FormattingContext::Geometry::computedMinWidth const): |
| (WebCore::Layout::FormattingContext::Geometry::computedMaxWidth const): |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const): |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry): |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry const): |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry const): |
| (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset const): |
| (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin const): |
| (WebCore::Layout::FormattingContext::Geometry::computedVerticalMargin const): |
| (WebCore::Layout::FormattingContext::Geometry::computedValueIfNotAuto const): Deleted. |
| * layout/inlineformatting/InlineFormattingContextGeometry.cpp: |
| (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin): |
| |
| 2020-06-06 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: unify the naming scheme for agents used by instrumentation |
| https://bugs.webkit.org/show_bug.cgi?id=212859 |
| |
| Reviewed by Timothy Hatcher. |
| |
| Inspector agents fall into one of three categories: |
| - "persistent" when Web Inspector is connected |
| - "enabled" when that agent is `enable`d, such as if the corresponding tab is visible |
| - "tracking" when that agent is part of a timeline recording. |
| |
| The only exception to this is the Console agent, as that exists regardless of whether Web |
| Inspector is connected as it needs to preserve messages logged before Web Inspector connects. |
| |
| Also remove the "Inspector" prefix from getter/setter methods as it adds confusion if that |
| agent also has subclasses (e.g. `InspectorRuntimeAgent` and `PageRuntimeAgent`). |
| |
| * inspector/InstrumentingAgents.h: |
| * inspector/InstrumentingAgents.cpp: |
| Use macros to simplify the process of adding an agent. |
| |
| * inspector/CommandLineAPIHost.cpp: |
| * inspector/InspectorController.h: |
| * inspector/InspectorController.cpp: |
| * inspector/InspectorInstrumentation.cpp: |
| * inspector/agents/InspectorAnimationAgent.cpp: |
| * inspector/agents/InspectorApplicationCacheAgent.cpp: |
| * inspector/agents/InspectorCPUProfilerAgent.cpp: |
| * inspector/agents/InspectorCSSAgent.cpp: |
| * inspector/agents/InspectorCanvasAgent.cpp: |
| * inspector/agents/InspectorDOMAgent.cpp: |
| * inspector/agents/InspectorDOMDebuggerAgent.cpp: |
| * inspector/agents/InspectorDOMStorageAgent.cpp: |
| * inspector/agents/InspectorDatabaseAgent.cpp: |
| * inspector/agents/InspectorLayerTreeAgent.cpp: |
| * inspector/agents/InspectorMemoryAgent.cpp: |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| * inspector/agents/InspectorPageAgent.cpp: |
| * inspector/agents/InspectorTimelineAgent.cpp: |
| * inspector/agents/InspectorWorkerAgent.cpp: |
| * inspector/agents/WebDebuggerAgent.cpp: |
| * inspector/agents/WebHeapAgent.cpp: |
| * inspector/agents/page/PageConsoleAgent.cpp: |
| * inspector/agents/page/PageDOMDebuggerAgent.cpp: |
| * inspector/agents/page/PageDebuggerAgent.cpp: |
| * inspector/agents/page/PageHeapAgent.cpp: |
| * inspector/agents/page/PageNetworkAgent.cpp: |
| * inspector/agents/page/PageRuntimeAgent.cpp: |
| Simple naming changes elided to avoid a long ChangeLog. |
| |
| 2020-06-05 Andy Estes <aestes@apple.com> |
| |
| REGRESSION (r256648): Apple Pay <button> elements no longer use the default corner radius on iOS (affects Stripe.js) |
| https://bugs.webkit.org/show_bug.cgi?id=212860 |
| <rdar://problem/64054728> |
| |
| Reviewed by Wenson Hsieh. |
| |
| As part of drawing iOS native form controls, RenderThemeIOS applies a round border to |
| un-styled <button> elements in RenderThemeIOS::adjustRoundBorderRadius. Prior to r256648, |
| this adjusted border radius would be ignored by RenderThemeCocoa::paintApplePayButton when |
| painting <button> elements with the ApplePayButtonPart appearance, but now it's respected. |
| Apple Pay <button>s with default width and height previously had a 4px corner radius but now |
| have a 15px corner radius. |
| |
| Fixed the issue by skipping RenderThemeIOS::adjustRoundBorderRadius for elements with the |
| ApplePayButtonPart appearance so that the correct border radius adjustment can be made by |
| RenderThemeCocoa::adjustApplePayButtonStyle. |
| |
| Four existing tests were skipped on iOS that would have caught this; un-skipped them. |
| |
| Un-skipped tests: fast/css/appearance-apple-pay-button.html |
| fast/css/appearance-apple-pay-button-border-radius.html |
| fast/css/appearance-apple-pay-button-default-corners.html |
| fast/css/getComputedStyle/computed-style-apple-pay-button.html |
| |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::canAdjustBorderRadiusForAppearance): Added a helper to check if border radius can |
| be adjusted for a given ControlPart. Added ApplePayButtonPart to the list of appearances |
| where border radius cannot be adjusted. |
| (WebCore::RenderThemeIOS::adjustRoundBorderRadius): Changed to call |
| canAdjustBorderRadiusForAppearance. |
| |
| 2020-06-05 Peng Liu <peng.liu6@apple.com> |
| |
| HTMLMediaElement::m_waitingToEnterFullscreen is not initialized in the constructor |
| https://bugs.webkit.org/show_bug.cgi?id=212861 |
| |
| Reviewed by Jer Noble. |
| |
| Covered by existing tests. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::HTMLMediaElement): |
| |
| 2020-06-05 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for AutocapitalizeType |
| <https://webkit.org/b/212846> |
| <rdar://problem/64042825> |
| |
| Reviewed by Darin Adler. |
| |
| Summary: |
| - Move AutocapitalizeType into WebCore namespace. |
| - Convert AutocapitalizeType to an enum class. |
| - Add WTF::EnumTraits<AutocapitalizeType> for IPC. |
| |
| * html/Autocapitalize.cpp: |
| (WebCore::autocapitalizeTypeForAttributeValue): |
| (WebCore::stringForAutocapitalizeType): |
| * html/AutocapitalizeTypes.h: |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::autocapitalizeType const): |
| |
| 2020-06-05 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r262619, r262625, and r262641. |
| |
| Caused mediarecorder layout test crashes. |
| |
| Reverted changesets: |
| |
| "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder" |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| https://trac.webkit.org/changeset/262619 |
| |
| "[Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder" |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| https://trac.webkit.org/changeset/262625 |
| |
| "Unreviewed, silence deprecation warning to fix build with |
| latest SDK." |
| https://trac.webkit.org/changeset/262641 |
| |
| 2020-06-05 Kate Cheney <katherine_cheney@apple.com> |
| |
| ITP SQLite Database should only vacuum once per day |
| https://bugs.webkit.org/show_bug.cgi?id=212712 |
| <rdar://problem/63939711> |
| |
| Reviewed by Brent Fulgham. |
| |
| Add WEBCORE_EXPORT macro to function needed in WebKit. |
| |
| * platform/sql/SQLiteDatabase.h: |
| |
| 2020-06-05 Sam Weinig <weinig@apple.com> |
| |
| Some tests in css/css-color/parsing/system-color-valid.html are failing |
| https://bugs.webkit.org/show_bug.cgi?id=212703 |
| |
| Reviewed by Darin Adler. |
| |
| Add support for the following system color keywords, added in CSS Color 4 (https://www.w3.org/TR/css-color-4/#css-system-colors): |
| ActiveText (Text in active links) |
| Implemented identically to -webkit-activelink |
| Canvas (Background of application content or documents) |
| [NSColor textBackgroundColor] on macOS, Color::white by default. |
| CanvasText (Text in application content or documents) |
| [NSColor textBackgroundColor] on macOS, Color::black by default. |
| Field |
| [NSColor controlColor] on macOS, Color::white by default. |
| FieldText |
| [NSColor controlTextColor] on macOS, Color::black by default. |
| LinkText |
| [NSColor linkColor] on macOS (when UseSystemAppearance is true), same as -webkit-link (non-visited) by default. |
| VisitedText |
| [NSColor systemPurpleColor] on macOS (when UseSystemAppearance is true), same as -webkit-link (visited) by default. |
| |
| * css/CSSValueKeywords.in: |
| * platform/ThemeTypes.cpp: |
| (WebCore::operator<<): |
| * platform/ThemeTypes.h: |
| * rendering/RenderTheme.cpp: |
| (WebCore::RenderTheme::systemColor const): |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::systemColor const): |
| |
| 2020-06-05 Jason Lawrence <lawrence.j@apple.com> |
| |
| Unreviewed, reverting r262524. |
| |
| Reverting because this commit may have caused issues with |
| other tests. |
| |
| Reverted changeset: |
| |
| "Release Assert @ |
| WebCore::RenderTreeBuilder::RenderTreeBuilder" |
| https://bugs.webkit.org/show_bug.cgi?id=212714 |
| https://trac.webkit.org/changeset/262524 |
| |
| 2020-06-05 Jonathan Bedard <jbedard@apple.com> |
| |
| WebCore: Link to framework stubs for watchOS and tvOS |
| https://bugs.webkit.org/show_bug.cgi?id=212834 |
| <rdar://problem/64033712> |
| |
| Reviewed by Tim Horton. |
| |
| No new tests, no behavior changed. |
| |
| * Configurations/Base.xcconfig: Ignore 64 to 32 bit conversion errors for watchOS |
| simulators, add tvOS and watchOS major version macros. |
| * Configurations/WebCore.xcconfig: Link to framework stubs for watchOS and tvOS. |
| |
| 2020-06-05 David Kilzer <ddkilzer@apple.com> |
| |
| [IPC] Adopt enum class for PluginLoadClientPolicy |
| <https://webkit.org/b/212827> |
| <rdar://problem/64030431> |
| |
| Reviewed by Alex Christensen. |
| |
| * plugins/PluginData.h: |
| (WebCore::PluginLoadClientPolicy): |
| - Make this an enum class. |
| (WTF::EnumTraits<WebCore::PluginLoadClientPolicy>): |
| - Add for use with strongly-typed IPC parameters. |
| |
| 2020-06-05 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation should exclude characters outside of the unicode private use area |
| https://bugs.webkit.org/show_bug.cgi?id=212800 |
| <rdar://problem/63736417> |
| |
| Reviewed by Sihui Liu. |
| |
| Consider characters that fall outside of unicode PUA (in addition to line breaks) as excluded when extracting |
| tokens during text manipulation. In doing this, we also rename a few member variables in `ManipulationUnit` to |
| refer to "token delimiters" rather than line breaks. |
| |
| Test: TextManipulation.StartTextManipulationExtractsPrivateUseCharactersAsExcludedTokens |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::isInPrivateUseArea): |
| (WebCore::isTokenDelimiter): |
| (WebCore::TextManipulationController::parse): |
| (WebCore::TextManipulationController::observeParagraphs): |
| * editing/TextManipulationController.h: |
| |
| 2020-06-05 Dean Jackson <dino@apple.com> |
| |
| REGRESSION (r262366): [ Mac wk1 ] webgl/webgl-backing-store-size-update.html is failing |
| https://bugs.webkit.org/show_bug.cgi?id=212647 |
| <rdar://problem/63882960> |
| |
| Reviewed by Eric Carlson. |
| |
| In some unusual cases, specifically WebKit 1, a WebGLLayer could prepareForDisplay |
| but never get told to actually display, producing incorrect results. Fix this by |
| simply calling setNeedsDisplay. |
| |
| While here, address some comments from Simon Fraser that were made |
| after r262366. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::prepareCanvasesForDisplayIfNeeded): |
| * platform/graphics/cocoa/WebGLLayer.h: Move the instance variables into the implementation file |
| since they are not exposed as an interface. |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer initWithGraphicsContextGL:]): |
| (-[WebGLLayer prepareForDisplay]): |
| (-[WebGLLayer display]): |
| |
| 2020-06-05 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, silence deprecation warning to fix build with latest SDK. |
| |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (WebCore::MediaRecorderPrivateWriter::stopRecording): |
| |
| 2020-06-05 Andres Gonzalez <andresg_22@apple.com> |
| |
| Accessibility isolated tree mode: crashes when navigating websites, com.apple.AppKit: ConvertOutgoingValueForAttribute. |
| https://bugs.webkit.org/show_bug.cgi?id=212829 |
| <rdar://problem/63756267> |
| |
| Reviewed by Chris Fleizach. |
| |
| - [WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions] must |
| retrieve an autoreleased id from the main thread. |
| - [WebAccessibilityObjectWrapper textMarkerRangeForSelection] must also |
| retrieve an autoreleased id from the main thread. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]): |
| (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): |
| |
| 2020-06-05 Jonathan Bedard <jbedard@apple.com> |
| |
| WebCore: Guard variable declarations on ENABLE(VIDEO_PRESENTATION_MODE) |
| https://bugs.webkit.org/show_bug.cgi?id=212831 |
| <rdar://problem/64033028> |
| |
| Reviewed by Tim Horton. |
| |
| No new tests, no behavior changed. |
| |
| * html/HTMLVideoElement.h: |
| |
| 2020-06-05 Peng Liu <peng.liu6@apple.com> |
| |
| Fix a tvOS build failure |
| https://bugs.webkit.org/show_bug.cgi?id=212833 |
| |
| Reviewed by Jer Noble. |
| |
| * platform/cocoa/PlaybackSessionModelMediaElement.mm: |
| (WebCore::PlaybackSessionModelMediaElement::togglePictureInPicture): |
| |
| 2020-06-05 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| DOM constructor should only accept Ref<> / ExceptionOr<Ref<>> for creation to ensure toJSNewlyCreated is always returning object |
| https://bugs.webkit.org/show_bug.cgi?id=212767 |
| |
| Reviewed by Darin Adler. |
| |
| When using toJSNewlyCreated in DOM constructor, we should ensure that this only returns JSObject* (if exception is not happening) to |
| avoid `isObject()` check after that. However AudioContext and ImageData is not following this and can return nullptr from `create` factory |
| function. We should not allow this. |
| |
| In this patch, |
| |
| 1. AudioContext should throw an error instead of returning null. AudioContext had a limit derived from OS, but this limit is reasonable only |
| in Windows. We should insert `OS(WINDOWS)` around this check, and throw an error instead of returning null. |
| |
| 2. ImageData::create can return nullptr potentially, and it can be converted to null. This is not acceptable for DOM constructor. We should throw |
| an error if we failed to create ImageData. |
| |
| 3. We inserted static_asserts in CodeGeneratorJS.pm to ensure that XXX::create only returns Ref<> or ExceptionOr<Ref<>>. This ensures that toJSNewlyCreated |
| will return JSObject*. |
| |
| This patch is relanding of the completely same patch since internal build is fixed. |
| |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::AudioContext::create): |
| * Modules/webaudio/AudioContext.h: |
| * Modules/webaudio/AudioContext.idl: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateConstructorDefinition): |
| * bindings/scripts/test/JS/JSTestEventConstructor.cpp: |
| (WebCore::JSTestEventConstructorConstructor::construct): |
| * bindings/scripts/test/JS/JSTestInterface.cpp: |
| (WebCore::JSTestInterfaceConstructor::construct): |
| * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: |
| (WebCore::JSTestNamedConstructorNamedConstructor::construct): |
| * bindings/scripts/test/JS/JSTestNode.cpp: |
| (WebCore::JSTestNodeConstructor::construct): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::JSTestObjConstructor::construct): |
| * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: |
| (WebCore::constructJSTestOverloadedConstructors1): |
| (WebCore::constructJSTestOverloadedConstructors2): |
| (WebCore::constructJSTestOverloadedConstructors3): |
| (WebCore::constructJSTestOverloadedConstructors4): |
| (WebCore::constructJSTestOverloadedConstructors5): |
| * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: |
| (WebCore::constructJSTestOverloadedConstructorsWithSequence1): |
| (WebCore::constructJSTestOverloadedConstructorsWithSequence2): |
| * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp: |
| (WebCore::JSTestPromiseRejectionEventConstructor::construct): |
| * bindings/scripts/test/JS/JSTestTypedefs.cpp: |
| (WebCore::JSTestTypedefsConstructor::construct): |
| * dom/ExceptionOr.h: |
| * html/ImageData.cpp: |
| (WebCore::ImageData::create): |
| * html/ImageData.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::videoSampleAvailable): |
| |
| 2020-06-05 Tyler Wilcock <twilco.o@protonmail.com> |
| |
| CSS Variables: Color on specific `border` properties does not work. |
| https://bugs.webkit.org/show_bug.cgi?id=211672 |
| |
| Reviewed by Antti Koivisto. |
| |
| Properly mark CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, and CSSPropertyBorderInlineEnd as |
| direction-aware properties in CSSProperty::isDirectionAwareProperty. Also reordered a few properties in this switch so it's more |
| alphabetically ordered. Prior to this change, CSS variables were not able to be resolved when used in these properties. |
| |
| Test: fast/borders/logical-border-props-with-variables.html |
| |
| * css/CSSProperty.cpp: |
| (WebCore::CSSProperty::isDirectionAwareProperty): |
| Add CSSPropertyBorderBlockStart, CSSPropertyBorderBlockEnd, CSSPropertyBorderInlineStart, CSSPropertyBorderInlineEnd. |
| |
| 2020-06-05 Andres Gonzalez <andresg_22@apple.com> |
| |
| AXIsolatedTree::updateChildren should not call nodeForID. |
| https://bugs.webkit.org/show_bug.cgi?id=212794 |
| |
| Reviewed by Chris Fleizach. |
| |
| AXIsolatedTree::updateChildren is executed on the main thread and |
| therfore should not call nodeForID. Since it requires the children IDs |
| for the isolated object whose children are being updated, we need to |
| store those children IDs outside the isolated object. For this reason |
| we added the m_nodeMap member variable which will maintain a map between |
| object ID and its children IDs. |
| In addition, since retrieving the root node happens very often and |
| required also a call to nodeForID, we now store a pointer to the root node instead of its ID, so there is no need to look it up in the reading map. |
| |
| * accessibility/AXLogger.cpp: |
| (WebCore::operator<<): |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::setChildrenIDs): |
| (WebCore::AXIsolatedObject::appendChild): Renamed setChildrenIDs. |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::clear): |
| (WebCore::AXIsolatedTree::create): |
| (WebCore::AXIsolatedTree::removeTreeForPageID): |
| (WebCore::AXIsolatedTree::nodeForID const): |
| (WebCore::AXIsolatedTree::generateSubtree): |
| (WebCore::AXIsolatedTree::createSubtree): |
| (WebCore::AXIsolatedTree::updateChildren): |
| (WebCore::AXIsolatedTree::rootNode): |
| (WebCore::AXIsolatedTree::setRootNode): |
| (WebCore::AXIsolatedTree::removeSubtree): |
| (WebCore::AXIsolatedTree::applyPendingChanges): |
| (WebCore::AXIsolatedTree::nodeInTreeForID): Deleted, not used. |
| (WebCore::AXIsolatedTree::setRootNodeID): Renamed setRootNode. |
| * accessibility/isolatedtree/AXIsolatedTree.h: |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: |
| (-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]): |
| |
| 2020-06-05 Youenn Fablet <youenn@apple.com> |
| |
| [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| <rdar://problem/58985368> |
| |
| Unreviewed. |
| |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (WebCore::MediaRecorderPrivateWriter::initialize): |
| Allow deprecation warnings. |
| |
| 2020-06-05 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| Unreviewed, fix unused parameter warnings in EventRegion.cpp and RenderLayerBacking.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=212823 |
| |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::unite): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::paintDebugOverlays): |
| |
| 2020-06-05 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes, early summer 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=212819 |
| |
| Unreviewed build fix. |
| |
| No new tests needed. |
| |
| * animation/ElementAnimationRareData.cpp: Add missing RenderStyle.h header. |
| * animation/ElementAnimationRareData.h: Add forward declaration for RenderStyle. |
| * editing/TextManipulationController.cpp: Sprinkle missing HTMLNames:: prefixes. |
| (WebCore::shouldExtractValueForTextManipulation): |
| (WebCore::TextManipulationController::observeParagraphs): |
| (WebCore::makePositionTuple): |
| (WebCore::TextManipulationController::replace): |
| * platform/graphics/SimpleColor.h: Add missing ColorComponents.h and wtf/text/WTFString.h |
| headers. |
| * workers/service/context/ServiceWorkerThread.cpp: Add missing Logging.h header. |
| |
| 2020-06-05 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Remove conditionals for ENABLE_APPLE_PAY_SESSION_V(3|4) |
| https://bugs.webkit.org/show_bug.cgi?id=212541 |
| <rdar://problem/63781452> |
| |
| Reviewed by Darin Adler. |
| |
| APPLE_PAY_SESSION_V(3|4) is now enabled whenever APPLE_PAY itself is enabled. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * Modules/applepay/ApplePayError.idl: |
| * Modules/applepay/ApplePayPaymentAuthorizationResult.idl: |
| * Modules/applepay/ApplePayPaymentContact.idl: |
| * Modules/applepay/ApplePayPaymentMethodUpdate.idl: |
| * Modules/applepay/ApplePayRequestBase.idl: |
| * Modules/applepay/ApplePaySession.idl: |
| * Modules/applepay/ApplePayShippingContactUpdate.idl: |
| * Modules/applepay/ApplePayShippingMethodUpdate.idl: |
| * Modules/applepay/PaymentCoordinatorClient.cpp: |
| (WebCore::PaymentCoordinatorClient::supportsVersion): |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: |
| (WebCore::ApplePayPaymentHandler::computePaymentMethodErrors const): |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::applePayButtonDescription const): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const): |
| * css/CSSValueKeywords.in: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): |
| * rendering/RenderThemeCocoa.mm: |
| (WebCore::toPKPaymentButtonType): |
| * rendering/style/RenderStyleConstants.cpp: |
| (WebCore::operator<<): |
| * rendering/style/RenderStyleConstants.h: |
| |
| 2020-06-05 youenn fablet <youenn@apple.com> |
| |
| [Cocoa] Use AVAssetWriterDelegate to implement MediaRecorder |
| https://bugs.webkit.org/show_bug.cgi?id=206582 |
| <rdar://problem/58985368> |
| |
| Reviewed by Eric Carlson. |
| |
| AVAssetWriterDelegate allows to grab recorded data whenever wanted. |
| This delegate requires passing compressed samples to AVAssetWriter. |
| Implement video encoding and audio encoding in dedicated classes and use these classes before adding buffers to AVAssetWriter. |
| These classes are AudioSampleBufferCompressor and VideoSampleBufferCompressor. |
| They support AAC and H264 so far and should be further improved to support more encoding options. |
| |
| Instantiate real writer only for platforms supporting AVAssetWriterDelegate, since it is not supported everywhere. |
| The writer, doing the pacakging, is receiving compressed buffer from the audio/video compressors. |
| It then sends data when being request to flush to its delegate, which will send data to the MediaRecorderPrivateWriter. |
| The MediaRecorderPrivateWriter stores the data in a SharedBuffer until MediaRecorder asks for data. |
| |
| Note that, whenever we request data, we flush the writer and insert an end of video sample to make sure video data gets flushed. |
| Therefore data should not be requested too fast to get adequate video compression. |
| |
| Covered by existing tests. |
| |
| * Modules/mediarecorder/MediaRecorderProvider.cpp: |
| (WebCore::MediaRecorderProvider::createMediaRecorderPrivate): |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: |
| (WebCore::MediaRecorderPrivateAVFImpl::create): |
| * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.h: Added. |
| * platform/mediarecorder/cocoa/AudioSampleBufferCompressor.mm: Added. |
| (WebCore::AudioSampleBufferCompressor::create): |
| (WebCore::AudioSampleBufferCompressor::AudioSampleBufferCompressor): |
| (WebCore::AudioSampleBufferCompressor::~AudioSampleBufferCompressor): |
| (WebCore::AudioSampleBufferCompressor::initialize): |
| (WebCore::AudioSampleBufferCompressor::finish): |
| (WebCore::AudioSampleBufferCompressor::initAudioConverterForSourceFormatDescription): |
| (WebCore::AudioSampleBufferCompressor::computeBufferSizeForAudioFormat): |
| (WebCore::AudioSampleBufferCompressor::attachPrimingTrimsIfNeeded): |
| (WebCore::AudioSampleBufferCompressor::gradualDecoderRefreshCount): |
| (WebCore::AudioSampleBufferCompressor::sampleBufferWithNumPackets): |
| (WebCore::AudioSampleBufferCompressor::audioConverterComplexInputDataProc): |
| (WebCore::AudioSampleBufferCompressor::provideSourceDataNumOutputPackets): |
| (WebCore::AudioSampleBufferCompressor::processSampleBuffersUntilLowWaterTime): |
| (WebCore::AudioSampleBufferCompressor::processSampleBuffer): |
| (WebCore::AudioSampleBufferCompressor::addSampleBuffer): |
| (WebCore::AudioSampleBufferCompressor::getOutputSampleBuffer): |
| (WebCore::AudioSampleBufferCompressor::takeOutputSampleBuffer): |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h: |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| (-[WebAVAssetWriterDelegate initWithWriter:]): |
| (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedHeaderData:]): |
| (-[WebAVAssetWriterDelegate assetWriter:didProduceFragmentedMediaData:fragmentedMediaDataReport:]): |
| (-[WebAVAssetWriterDelegate close]): |
| (WebCore::MediaRecorderPrivateWriter::create): |
| (WebCore::MediaRecorderPrivateWriter::compressedVideoOutputBufferCallback): |
| (WebCore::MediaRecorderPrivateWriter::compressedAudioOutputBufferCallback): |
| (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter): |
| (WebCore::MediaRecorderPrivateWriter::~MediaRecorderPrivateWriter): |
| (WebCore::MediaRecorderPrivateWriter::initialize): |
| (WebCore::MediaRecorderPrivateWriter::processNewCompressedVideoSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::processNewCompressedAudioSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::startAssetWriter): |
| (WebCore::MediaRecorderPrivateWriter::appendCompressedAudioSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::appendCompressedVideoSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::appendCompressedSampleBuffers): |
| (WebCore::appendEndsPreviousSampleDurationMarker): |
| (WebCore::MediaRecorderPrivateWriter::appendEndOfVideoSampleDurationIfNeeded): |
| (WebCore::MediaRecorderPrivateWriter::flushCompressedSampleBuffers): |
| (WebCore::MediaRecorderPrivateWriter::clear): |
| (WebCore::copySampleBufferWithCurrentTimeStamp): |
| (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer): |
| (WebCore::createAudioFormatDescription): |
| (WebCore::createAudioSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer): |
| (WebCore::MediaRecorderPrivateWriter::stopRecording): |
| (WebCore::MediaRecorderPrivateWriter::appendData): |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.h: Copied from Source/WebCore/platform/mediarecorder/MediaRecorderPrivateAVFImpl.h. |
| * platform/mediarecorder/cocoa/VideoSampleBufferCompressor.mm: Added. |
| (WebCore::VideoSampleBufferCompressor::create): |
| (WebCore::VideoSampleBufferCompressor::VideoSampleBufferCompressor): |
| (WebCore::VideoSampleBufferCompressor::~VideoSampleBufferCompressor): |
| (WebCore::VideoSampleBufferCompressor::initialize): |
| (WebCore::VideoSampleBufferCompressor::finish): |
| (WebCore::VideoSampleBufferCompressor::videoCompressionCallback): |
| (WebCore::VideoSampleBufferCompressor::initCompressionSession): |
| (WebCore::VideoSampleBufferCompressor::processSampleBuffer): |
| (WebCore::VideoSampleBufferCompressor::addSampleBuffer): |
| (WebCore::VideoSampleBufferCompressor::getOutputSampleBuffer): |
| (WebCore::VideoSampleBufferCompressor::takeOutputSampleBuffer): |
| |
| 2020-06-05 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (r253875?): Element styles incorrect after media query evaluation changes |
| https://bugs.webkit.org/show_bug.cgi?id=211505 |
| <rdar://problem/62983242> |
| |
| Reviewed by Zalan Bujtas. |
| |
| If there are keyframe rules in media queries we fall back to wiping the style resolver when |
| something changes. This fallback code didn't work correctly when a rule flipped from matching |
| to non-matching because MediaQueryCollector bailed out and didn't create DynamicMediaQueryRules |
| structure needed to detect something has changed. |
| |
| Test: fast/media/media-query-dynamic-with-keyframes.html |
| |
| * style/RuleSet.cpp: |
| (WebCore::Style::RuleSet::addChildRules): |
| (WebCore::Style::RuleSet::addRulesFromSheet): |
| |
| Call both push and pop even when the rule doesn't match. |
| |
| (WebCore::Style::RuleSet::MediaQueryCollector::pushAndEvaluate): |
| |
| Collect the MediaQuerySet in non-matching case too. |
| |
| (WebCore::Style::RuleSet::MediaQueryCollector::pop): |
| |
| Record the DynamicMediaQueryRules when resolving all rules statically. |
| |
| 2020-06-05 Youenn Fablet <youenn@apple.com> |
| |
| Ad support for media-source stats |
| https://bugs.webkit.org/show_bug.cgi?id=212702 |
| |
| Reviewed by Eric Carlson. |
| |
| Expose 'media-source' stats which come in audio and video flavours. |
| Covered by updated test. |
| |
| * Modules/mediastream/RTCStatsReport.h: |
| (WebCore::RTCStatsReport::AudioSourceStats::AudioSourceStats): |
| (WebCore::RTCStatsReport::VideoSourceStats::VideoSourceStats): |
| * Modules/mediastream/RTCStatsReport.idl: |
| * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp: |
| (WebCore::fillRTCRTPStreamStats): |
| (WebCore::fillRTCMediaSourceStats): |
| (WebCore::fillRTCAudioSourceStats): |
| (WebCore::fillRTCVideoSourceStats): |
| (WebCore::initializeRTCStatsReportBackingMap): |
| |
| 2020-06-04 Sihui Liu <sihui_liu@apple.com> |
| |
| Text manipulation: first and last unit in a paragraph should not contain only excluded tokens |
| https://bugs.webkit.org/show_bug.cgi?id=212759 |
| |
| Reviewed by Wenson Hsieh. |
| |
| In r262398, we literally made text of one Node as the minimum unit for text manipulation. This patches introduce |
| a struct ManipulationUnit for that. Now a paragraph can be represented as multiple ManipulationUnits. When all |
| tokens in a ManipulationUnit are excluded, it means the ManipulationUnit is excluded and should not be |
| manipulated. To record ManipulationUnits in a paragraph based on our current implementation, we need to keep the |
| excluded ManipulationUnits surrounded by non-excluded ManipulationUnits, but we can safely remove the leading |
| and trailing excluded ManipulationUnits. In this case, we can limit the range of paragraph further and thus less |
| text replacement work. |
| |
| Covered by existing test. |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::parse): |
| (WebCore::TextManipulationController::addItemIfPossible): |
| (WebCore::TextManipulationController::observeParagraphs): |
| * editing/TextManipulationController.h: |
| |
| 2020-06-04 Peng Liu <peng.liu6@apple.com> |
| |
| A YouTube video gets stuck after rapidly tapping on touchbar’s PIP button |
| https://bugs.webkit.org/show_bug.cgi?id=212729 |
| |
| Reviewed by Darin Adler. |
| |
| Call HTMLVideoElement::setFullscreenMode() instead of HTMLMediaElement::enterFullscreen() |
| and HTMLMediaElement::exitFullscreen() to toggle picture-in-picture mode. |
| HTMLVideoElement::setFullscreenMode() is robust under stress test after r262456. |
| |
| Manually tested. |
| |
| * platform/cocoa/PlaybackSessionModelMediaElement.mm: |
| (WebCore::PlaybackSessionModelMediaElement::togglePictureInPicture): |
| |
| 2020-06-04 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r262583. |
| https://bugs.webkit.org/show_bug.cgi?id=212799 |
| |
| Internal source code has the same bug, needs to be landed |
| after fixing internal source |
| |
| Reverted changeset: |
| |
| "DOM constructor should only accept Ref<> / ExceptionOr<Ref<>> |
| for creation to ensure toJSNewlyCreated is always returning |
| object" |
| https://bugs.webkit.org/show_bug.cgi?id=212767 |
| https://trac.webkit.org/changeset/262583 |
| |
| 2020-06-04 Zalan Bujtas <zalan@apple.com> |
| |
| HTMLAppletElement::updateWidget should check for renderer after the overlapping test. |
| https://bugs.webkit.org/show_bug.cgi?id=212789 |
| <rdar://problem/61854614> |
| |
| Reviewed by Simon Fraser. |
| |
| createJavaAppletWidget needs to check if the plugin(replacement) is obscured. |
| Since the overlapping test requires up-to-date geometry, it initiates a top level style recalc/layout. |
| We need to check if the apple element still has a renderer after the style recalc. |
| |
| * html/HTMLAppletElement.cpp: |
| (WebCore::HTMLAppletElement::updateWidget): |
| |
| 2020-06-04 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in DeleteSelectionCommand::doApply() when ending position is disconnected. |
| https://bugs.webkit.org/show_bug.cgi?id=212723 |
| <rdar://problem/63866653> |
| |
| Reviewed by Geoffrey Garen. |
| |
| In this test case, while merging paragraphs after deleting a text element, we need call removeNodeAndPruneAncestors() |
| to remove a BR node. However, the ancestor of BR is also removed. Later we try to insert a node at the parent of the |
| removed ancestor in function DeleteSelectionCommand::doApply(). |
| |
| For now we just check the parentless inserting position and bail out. The proper fix should be re-designing |
| removeNodeAndPruneAncestors() or select a different inserting position after removeNodeAndPruneAncestors() is called. |
| |
| Test: editing/deleting/delete-txt-in-dl-crash.html |
| |
| * editing/DeleteSelectionCommand.cpp: |
| (WebCore::DeleteSelectionCommand::doApply): |
| |
| 2020-06-04 Ross Kirsling <ross.kirsling@sony.com> |
| |
| [PlayStation] Unreviewed revert of build fix. Missing include was not the cause. |
| |
| * platform/graphics/ColorUtilities.cpp: |
| |
| 2020-06-04 Sihui Liu <sihui_liu@apple.com> |
| |
| REGRESSION:(r262398) Text manipulation crashes when content is added |
| https://bugs.webkit.org/show_bug.cgi?id=212785 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| r262398 accidentally removed the bound check on array index and was not caught by existing tests. |
| |
| Test: TextManipulation.CompleteTextManipulationFailWhenContentIsAdded |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::replace): |
| |
| 2020-06-04 Ross Kirsling <ross.kirsling@sony.com> |
| |
| [PlayStation] Unreviewed build fix following r262352. |
| |
| * platform/graphics/ColorUtilities.cpp: |
| |
| 2020-06-04 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| DOM constructor should only accept Ref<> / ExceptionOr<Ref<>> for creation to ensure toJSNewlyCreated is always returning object |
| https://bugs.webkit.org/show_bug.cgi?id=212767 |
| |
| Reviewed by Darin Adler. |
| |
| When using toJSNewlyCreated in DOM constructor, we should ensure that this only returns JSObject* (if exception is not happening) to |
| avoid `isObject()` check after that. However AudioContext and ImageData is not following this and can return nullptr from `create` factory |
| function. We should not allow this. |
| |
| In this patch, |
| |
| 1. AudioContext should throw an error instead of returning null. AudioContext had a limit derived from OS, but this limit is reasonable only |
| in Windows. We should insert `OS(WINDOWS)` around this check, and throw an error instead of returning null. |
| |
| 2. ImageData::create can return nullptr potentially, and it can be converted to null. This is not acceptable for DOM constructor. We should throw |
| an error if we failed to create ImageData. |
| |
| 3. We inserted static_asserts in CodeGeneratorJS.pm to ensure that XXX::create only returns Ref<> or ExceptionOr<Ref<>>. This ensures that toJSNewlyCreated |
| will return JSObject*. |
| |
| * Modules/webaudio/AudioContext.cpp: |
| (WebCore::AudioContext::create): |
| * Modules/webaudio/AudioContext.h: |
| * Modules/webaudio/AudioContext.idl: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateConstructorDefinition): |
| * dom/ExceptionOr.h: |
| * html/ImageData.cpp: |
| (WebCore::ImageData::create): |
| * html/ImageData.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::videoSampleAvailable): |
| |
| 2020-06-04 Kate Cheney <katherine_cheney@apple.com> |
| |
| REGRESSION (r262212): [ iOS Debug wk2 ] ASSERTION FAILED: !isSynchronous() || !m_synchronousLoadData->delayedReply in WebKit::NetworkResourceLoader |
| https://bugs.webkit.org/show_bug.cgi?id=212678 |
| <rdar://problem/63797758> |
| |
| Reviewed by Chris Dumez. |
| |
| No new tests, this will fix http/tests/xmlhttprequest/access-control-preflight-credential-sync.html. |
| |
| Refactor the bundle identifier setters and getters in |
| RuntimeApplicationChecksCocoa.mm so that a separate function sets |
| an override bundle identifier, and clearing the override identifier |
| does not clear the UI process bundle identifier as well. |
| |
| * platform/RuntimeApplicationChecks.h: |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::bundleIdentifierOverride): |
| (WebCore::bundleIdentifier): |
| (WebCore::applicationBundleIdentifier): |
| (WebCore::setApplicationBundleIdentifier): |
| (WebCore::setApplicationBundleIdentifierOverride): |
| (WebCore::clearApplicationBundleIdentifierTestingOverride): |
| (WebCore::applicationBundleIdentifierOverride): Deleted. |
| |
| 2020-06-04 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| MessageEvent should tell its memory cost to GC |
| https://bugs.webkit.org/show_bug.cgi?id=203990 |
| |
| Reviewed by Mark Lam. |
| |
| This patch fixes two issues to make MessageEvent's memoryCost working. |
| |
| 1. MessageEvent does not have memoryCost function. So even if ArrayBuffer etc. is held as a SerializedScriptValue, |
| it does not communicate memory pressure to GC. This patch adds ReportExtraMemoryCost to MessageEvent.idl and memoryCost |
| function to MessageEvent. And we implement SerializedScriptValue::memoryCost function to obtain rough memory cost |
| for SerializedScriptValue. |
| |
| 2. IDL code generator puts `reportExtraMemoryAllocated` function call in `toJSNewlyCreated`. However, `toJSNewlyCreated` |
| is not always used when creating JS wrapper. For example, JSMessageEvent can be created from toJSNewlyCreated for MessageEvent. |
| But it can be also be created from toJSNewlyCreated for Event through EventFactory. If the latter path is taken, we won't properly |
| report memory cost even if IDL has ReportExtraMemoryCost. In JSC, we put `reportExtraMemoryAllocated` at the end of JSXXX::finishCreation. |
| IDL code should follow this convention. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::SerializedScriptValue::SerializedScriptValue): |
| (WebCore::SerializedScriptValue::computeMemoryCost const): |
| * bindings/js/SerializedScriptValue.h: |
| (WebCore::SerializedScriptValue::memoryCost const): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| * bindings/scripts/test/JS/JSInterfaceName.cpp: |
| (WebCore::JSInterfaceName::finishCreation): |
| (WebCore::toJSNewlyCreated): |
| * dom/MessageEvent.cpp: |
| (WebCore::MessageEvent::memoryCost const): |
| * dom/MessageEvent.h: |
| * dom/MessageEvent.idl: |
| * html/OffscreenCanvas.h: |
| (WebCore::DetachedOffscreenCanvas::memoryCost const): |
| |
| 2020-06-04 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] Add a way to override the contact AutoFill button image |
| https://bugs.webkit.org/show_bug.cgi?id=212775 |
| <rdar://problem/60381452> |
| |
| Reviewed by Tim Horton. |
| |
| Rename `SYSTEM_ATTACHMENT_PLACEHOLDER_ICON` to `ALTERNATE_ICONS`, and use it to additionally guard an alternate |
| appearance for the contact AutoFill button icon. |
| |
| * css/html.css: |
| (input::-webkit-contacts-auto-fill-button): |
| * rendering/RenderThemeMac.h: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::extraDefaultStyleSheet): |
| |
| 2020-06-04 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Rename BlobLineEndings to EndingType to match the latest spec |
| https://bugs.webkit.org/show_bug.cgi?id=212644 |
| |
| Reviewed by Sam Weinig. |
| |
| By the latest File API spec, the role of `BlobLineEndings` is named as `EndingType`. |
| https://w3c.github.io/FileAPI/#enumdef-endingtype |
| |
| * CMakeLists.txt: |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Headers.cmake: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * fileapi/BlobBuilder.cpp: |
| (WebCore::BlobBuilder::BlobBuilder): |
| (WebCore::BlobBuilder::append): |
| * fileapi/BlobBuilder.h: |
| * fileapi/BlobPropertyBag.h: |
| * fileapi/BlobPropertyBag.idl: |
| * fileapi/EndingType.h: Renamed from Source/WebCore/fileapi/BlobLineEndings.h. |
| * fileapi/EndingType.idl: Renamed from Source/WebCore/fileapi/BlobLineEndings.idl. |
| |
| 2020-06-04 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Validate index parameter in PlatformPasteboard |
| https://bugs.webkit.org/show_bug.cgi?id=212713 |
| <rdar://problem/60068765> |
| |
| Reviewed by Alex Christensen. |
| |
| Follow-up to r262529 to also make sure that the index is not negative after |
| casting to NSInteger. |
| |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::readBuffer const): |
| (WebCore::PlatformPasteboard::readString const): |
| (WebCore::PlatformPasteboard::readURL const): |
| |
| 2020-06-04 Xabier Rodriguez Calvar <calvaris@igalia.com> |
| |
| [EME][GStreamer] cdmProxyAttached does not need to force a bump ref in the signature |
| https://bugs.webkit.org/show_bug.cgi?id=212754 |
| |
| Reviewed by Philippe Normand. |
| |
| cdmProxyAttached is currently receiving a RefPtr<CDMProxy> in the |
| signature, what causes a ref bump when the function is called. A |
| const RefPtr<CDMProxy>& is more suitable cause the reference is |
| already bumped when the CDMProxy assigned in the decryptor |
| attribute. |
| |
| No new tests, just a rework. |
| |
| * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp: |
| (cdmProxyAttached): |
| * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h: |
| |
| 2020-06-04 Tim Horton <timothy_horton@apple.com> |
| |
| Work around broken system version macro |
| https://bugs.webkit.org/show_bug.cgi?id=212726 |
| |
| Reviewed by Dan Bernstein. |
| |
| * Configurations/DebugRelease.xcconfig: |
| |
| 2020-06-04 Andy Estes <aestes@apple.com> |
| |
| [watchOS] Re-enable content filtering in the simulator build |
| https://bugs.webkit.org/show_bug.cgi?id=212711 |
| <rdar://problem/63938350> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| |
| 2020-06-04 Zalan Bujtas <zalan@apple.com> |
| |
| Reset fragment line info when the relatively positioned inline box becomes static with block child. |
| https://bugs.webkit.org/show_bug.cgi?id=212724 |
| <rdar://problem/62847534> |
| |
| Reviewed by Simon Fraser. |
| |
| adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded was missing the case when the |
| block container was inside an inline box. It happens when the inline box is relatively positioned while the |
| child block box is absolutely positioned. |
| RenderFragmentedFlow keeps track of the associated root lineboxes in m_lineToFragmentMap. |
| In adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded, when the block is no longer part of the fragment |
| we remove these cached lineboxes from the m_lineToFragmentMap. |
| This patch fixes the case when the cached lineboxes are generated by a child block box. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::adjustFragmentedFlowStateOnContainingBlockChangeIfNeeded): |
| |
| 2020-06-04 Youenn Fablet <youenn@apple.com> |
| |
| Read MediaPlayerPrivateMediaStreamAVFObjC::m_canEnqueueDisplayLayer after the lock |
| https://bugs.webkit.org/show_bug.cgi?id=212693 |
| |
| Reviewed by Eric Carlson. |
| |
| In case destroyLayers is called and shortly after ensureLayers is also called, the m_canEnqueueDisplayLayer check in enqueueVideoSample |
| might be bypassed. Make sure to lock before checking m_canEnqueueDisplayLayer in enqueueVideoSample. |
| For good measure, set m_canEnqueueDisplayLayer to false after locking in destroyLayers. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers): |
| |
| 2020-06-03 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Validate index parameter in PlatformPasteboard |
| https://bugs.webkit.org/show_bug.cgi?id=212713 |
| <rdar://problem/60068765> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Validate index parameter in PlatformPasteboard, before calling [NSIndexSet indexSetWithIndex:]. |
| Per documentation, index needs to be in the range [0 .. NSNotFound-1]. |
| |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::readBuffer const): |
| (WebCore::PlatformPasteboard::readString const): |
| (WebCore::PlatformPasteboard::readURL const): |
| |
| 2020-06-03 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Add new values for -apple-pay-button-type |
| https://bugs.webkit.org/show_bug.cgi?id=212684 |
| <rdar://problem/63908535> |
| |
| Reviewed by Anders Carlsson. |
| |
| Where available, added new values for -apple-pay-button-type and introduced ApplePaySession v10. |
| |
| New test: http/tests/ssl/applepay/ApplePayButton.html |
| |
| * Modules/applepay/PaymentCoordinatorClient.cpp: |
| (WebCore::PaymentCoordinatorClient::supportsVersion): |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::applePayButtonDescription const): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const): |
| * css/CSSValueKeywords.in: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): |
| * en.lproj/Localizable.strings: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::AXApplePayReloadLabel): |
| (WebCore::AXApplePayAddMoneyLabel): |
| (WebCore::AXApplePayTopUpLabel): |
| (WebCore::AXApplePayOrderLabel): |
| (WebCore::AXApplePayRentLabel): |
| (WebCore::AXApplePaySupportLabel): |
| (WebCore::AXApplePayContributeLabel): |
| (WebCore::AXApplePayTipLabel): |
| * platform/LocalizedStrings.h: |
| * rendering/RenderThemeCocoa.mm: |
| (WebCore::toPKPaymentButtonType): |
| * rendering/style/RenderStyleConstants.cpp: |
| (WebCore::operator<<): |
| * rendering/style/RenderStyleConstants.h: |
| * rendering/style/StyleRareNonInheritedData.h: |
| |
| 2020-06-03 Daniel Bates <dabates@apple.com> |
| |
| Inserted text placeholder should vertically align to top and behave like block-level element when it has 0 width |
| https://bugs.webkit.org/show_bug.cgi?id=212716 |
| <rdar://problem/62672479> |
| |
| Reviewed by Darin Adler. |
| |
| Refine the appearance of a text placeholder based on feedback: |
| 1. If the width of the placeholder is 0 then put it on its own line. This is accomplished by making it |
| CSS "display: block". |
| 2. Vertically align the placeholder with the top of the line. |
| |
| Both of these refinements are to make the rendering more like TextKit's rendering. |
| |
| Tests: editing/text-placeholder/insert-into-content-editable-non-zero-width-and-height.html |
| editing/text-placeholder/insert-into-content-editable-zero-width.html |
| |
| * html/shadow/TextPlaceholderElement.cpp: |
| |
| 2020-06-03 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Release Assert @ WebCore::RenderTreeBuilder::RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=212714 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Widget removal in the middle of building a Render Tree causes side effects, leading to Release Assert. Moved the scope for suspension of widgets |
| update to RenderTreeBuilder instead of having it in RenderTreeUpdater. |
| |
| Also made sure that the WidgetHierarchyUpdatesSuspensionScope::moveWidgets() should handle all widgets scheduled to move, including new widgets |
| scheduled during moveWidgets(). |
| |
| Test: fast/rendering/widget-removal-in-render-tree-builder-crash.html |
| |
| * rendering/RenderWidget.cpp: |
| (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::tearDownRenderers): |
| |
| 2020-06-03 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Text manipulation] Extract the value attribute in inputs of type "text" and "search" |
| https://bugs.webkit.org/show_bug.cgi?id=212706 |
| <rdar://problem/63876969> |
| |
| Reviewed by Tim Horton. |
| |
| Allow text manipulation to extract text for the value of text fields that were not last modified by user input. |
| Aside from button types, it generally doesn't make sense to perform text manipulation over arbitrary input |
| element values, especially for text field types such as passwords, URLs, emails, and numbers. However, some |
| webpages set the `value` of inputs to implement `placeholder`-like behavior in text fields, and we need to be |
| compatible with this. |
| |
| Tests: TextManipulation.StartTextManipulationExtractsValuesFromTextInputs |
| TextManipulation.CompleteTextManipulationInButtonsAndTextFields |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::shouldExtractValueForTextManipulation): |
| |
| Unfortunately, we need to check the type attribute here against "text", since inputs of type "date" and "time" |
| fall back to text fields on macOS, and we still want to avoid extracting values for these. |
| |
| (WebCore::isAttributeForTextManipulation): |
| |
| Pull the `value` attribute of this out into a separate method, above. |
| |
| (WebCore::TextManipulationController::observeParagraphs): |
| (WebCore::TextManipulationController::replace): |
| |
| Treat the text field value separately from other attributes by calling `HTMLInputElement::value()` upon |
| extraction, and `HTMLInputElement::setValue()` upon replacement. |
| |
| 2020-06-03 Rob Buis <rbuis@igalia.com> |
| |
| Disallow responses when a response contains invalid header values |
| https://bugs.webkit.org/show_bug.cgi?id=184493 |
| |
| Reviewed by Darin Adler. |
| |
| From the Fetch specification [1]: |
| "A value is a byte sequence that matches the following conditions: |
| "- Contains no 0x00 (NUL) or HTTP newline bytes." |
| |
| [1] https://fetch.spec.whatwg.org/#concept-header-value |
| |
| Tests: imported/w3c/web-platform-tests/fetch/h1-parsing/resources-with-0x00-in-header.window.html |
| imported/web-platform-tests/fetch/api/basic/header-value-combining.any.html |
| imported/web-platform-tests/fetch/api/basic/header-value-combining.any.worker.html |
| imported/web-platform-tests/fetch/api/basic/header-value-null-byte.any.html |
| imported/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker.html |
| imported/web-platform-tests/xhr/headers-normalize-response.htm |
| |
| * Modules/fetch/FetchHeaders.cpp: |
| (WebCore::canWriteHeader): |
| (WebCore::appendToHeaderMap): |
| (WebCore::FetchHeaders::filterAndFill): |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::loadRequest): |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::didReceiveResponse): |
| * platform/network/HTTPParsers.cpp: |
| (WebCore::isValidHTTPHeaderValue): |
| * platform/network/ResourceResponseBase.cpp: |
| (WebCore::ResourceResponseBase::containsInvalidHTTPHeaders const): |
| * platform/network/ResourceResponseBase.h: |
| |
| 2020-06-03 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| dataTransfer.types is empty when handling the "dragstart" event |
| https://bugs.webkit.org/show_bug.cgi?id=212685 |
| <rdar://problem/61368402> |
| |
| Reviewed by Andy Estes. |
| |
| Implements several currently stubbed methods on StaticPasteboard, so that the DataTransfer provided to the page |
| on the "dragstart" event contains the DOM-exposed data types that will be written to the system pasteboard. This |
| includes "text/html", "text/plain", and "text/uri-list". |
| |
| Tests: DragAndDropTests.DataTransferTypesOnDragStartForTextSelection |
| DragAndDropTests.DataTransferTypesOnDragStartForImage |
| DragAndDropTests.DataTransferTypesOnDragStartForLink |
| |
| ...as well as several existing tests in DragAndDropTestsIOS.mm that attempt to set pasteboard data during the |
| dragstart event: |
| |
| DragAndDropTests.DataTransferSanitizeHTML |
| DragAndDropTests.DataTransferSetDataCannotWritePlatformTypes |
| DragAndDropTests.DataTransferSetDataInvalidURL |
| DragAndDropTests.DataTransferSetDataUnescapedURL |
| DragAndDropTests.DataTransferSetDataValidURL |
| |
| * dom/DataTransfer.cpp: |
| (WebCore::DataTransfer::commitToPasteboard): |
| |
| Only commit data to the native pasteboard if the page actually tried to write or modify the data. This allows us |
| to preserve existing behavior by allowing DragController to write dragged data to the pasteboard normally in the |
| case where the page didn't specify any custom data. In the case where the page does specify custom data, we will |
| write this custom data *in addition* to any default data that was written to the static pasteboard. While this |
| is a departure from our current behavior (which is to treat the pasteboard as a blank slate that contains only |
| whatever custom data was provided by the page), it matches behavior in both Chrome and Firefox, and is likely |
| more compatible with webpages that don't have UA-specific logic targeting WebKit. |
| |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::Editor::writeSelectionToPasteboard): |
| |
| Avoid calling into the injected bundle (as well as writing a few particular non-web-exposed types, such as web |
| archive data) in the case where we're writing to a static pasteboard (there's no point in doing this for the |
| static pasteboard, and in the worst case, it could confuse some internal clients). |
| |
| * editing/ios/EditorIOS.mm: |
| (WebCore::Editor::writeImageToPasteboard): Ditto. |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::writeImageToPasteboard): |
| |
| Ditto. But additionally, introduce a markup string to PasteboardImage, so that we will expose the "text/html" |
| type when starting a drag on an image element. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::startDrag): |
| |
| Only attempt to call into `Pasteboard::writeTrustworthyWebURLsPboardType` in the case where the pasteboard |
| supports this type (i.e. on macOS). This fixes an existing assertion that was hit by my new API test, which |
| attempts to override the contents of the pasteboard with custom data while starting a drag on a link. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::handleDrag): |
| |
| Since the StaticPasteboard contains data before the page has written anything, don't use `Pasteboard::hasData()` |
| to determine whether there's custom data; instead, use the new `hasNonDefaultData()` method on |
| `StaticPasteboard` (see below). |
| |
| * platform/Pasteboard.cpp: |
| (WebCore::Pasteboard::canWriteTrustworthyWebURLsPboardType): |
| |
| On non-macOS ports, return false. |
| |
| * platform/Pasteboard.h: |
| * platform/StaticPasteboard.cpp: |
| (WebCore::StaticPasteboard::hasNonDefaultData const): |
| |
| Keep track of whether the page attempted to stage any custom data during "dragstart" by maintaining the set of |
| types written by the page, via calls to `writeString()` and similar. I'm using a set of types here instead of a |
| simple `bool` flag to ensure correctness in the case where the page adds a type, and then later removes that |
| same custom type, such that there is no longer non-default data. |
| |
| (WebCore::StaticPasteboard::writeString): |
| (WebCore::StaticPasteboard::writeData): |
| (WebCore::StaticPasteboard::writeStringInCustomData): |
| (WebCore::StaticPasteboard::clear): |
| |
| See above. |
| |
| (WebCore::StaticPasteboard::writeMarkup): |
| (WebCore::StaticPasteboard::writePlainText): |
| (WebCore::StaticPasteboard::write): |
| |
| Implement these methods by writing to the `PasteboardCustomData`. These methods are invoked by our own code |
| rather than the bindings, and should only be used to stage default data types when starting a drag. |
| |
| * platform/StaticPasteboard.h: |
| * platform/mac/PasteboardMac.mm: |
| (WebCore::Pasteboard::write): |
| (WebCore::Pasteboard::canWriteTrustworthyWebURLsPboardType): |
| |
| 2020-06-03 Jer Noble <jer.noble@apple.com> |
| |
| Crash with uncaught exception: *** -[AVSampleBufferAudioRenderer enqueueSampleBuffer:] Sample buffer has media type 'vide' instead of 'soun' |
| https://bugs.webkit.org/show_bug.cgi?id=212646 |
| <rdar://problem/63040834> |
| |
| Reviewed by Eric Carlson. |
| |
| Protect against the possibility of AVStreamDataParser generating non-video or -audio samples in an otherwise |
| video- or audio-track. Check the format description attached to the sample before appending, and ASSERT in |
| debug builds and ERROR_LOG in release builds, as this is an exceptional condition. |
| |
| * platform/graphics/FourCC.h: |
| (WTF::LogArgument<WebCore::FourCC>::toString): |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): |
| |
| 2020-06-03 Kate Cheney <katherine_cheney@apple.com> |
| |
| Any active sqlite transactions for the ITP database should be aborted when the network process suspends. |
| https://bugs.webkit.org/show_bug.cgi?id=212608 |
| <rdar://problem/60540768> |
| |
| Reviewed by Chris Dumez. |
| |
| Add WEBCORE_EXPORT macro to use interrupt() function in |
| ResourceLoadStatisticsDatabaseStore. |
| |
| * platform/sql/SQLiteDatabase.h: |
| |
| 2020-06-03 Andres Gonzalez <andresg_22@apple.com> |
| |
| AX: SVG text node with content is described as "empty group" even if it's not empty |
| https://bugs.webkit.org/show_bug.cgi?id=210315 |
| |
| Reviewed by Darin Adler. |
| |
| Test: accessibility/svg-text.html |
| |
| SVGText elements are conveyed as AXGroups and cannot have a description |
| or help property, but instead the content of the element is exposed as |
| static text. |
| |
| * accessibility/AccessibilitySVGElement.cpp: |
| (WebCore::AccessibilitySVGElement::accessibilityDescription const): |
| (WebCore::AccessibilitySVGElement::helpText const): |
| * accessibility/AccessibilitySVGElement.h: |
| |
| 2020-06-03 Sihui Liu <sihui_liu@apple.com> |
| |
| Text manipulation sometimes fails to replace text in attributes |
| https://bugs.webkit.org/show_bug.cgi?id=212701 |
| |
| Reviewed by Wenson Hsieh. |
| |
| Concatenate replacement tokens of same identifier for attribute like we do for title and option element in |
| r260393. |
| |
| Covered by test: TextManipulation.CompleteTextManipulationShouldReplaceTextContentWithMultipleTokens |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::replace): |
| |
| 2020-06-02 Dean Jackson <dino@apple.com> |
| |
| [ macOS ] REGRESSION(r262366): webgl/1.0.3/conformance/canvas/buffer-offscreen-test.html & webgl/2.0.0/conformance/canvas/buffer-offscreen-test.html are constant failures |
| https://bugs.webkit.org/show_bug.cgi?id=212594 |
| <rdar://problem/63828783> |
| |
| Reviewed by Eric Carlson. |
| |
| The change in r262366 split the OpenGL work to prepare a canvas for rendering from the actual painting |
| (or compositing in this case). Canvas elements were being "prepared" at the end of the HTML run loop |
| if they'd done anything that would change pixels. The problem is that canvas elements that are not in |
| the document body are never composited, and thus should never be prepared, otherwise they will clear |
| their drawing buffer. In other words, a canvas in this state must keep the same buffer through |
| each rendering frame. |
| |
| The solution is to check if the canvas is in the tree scope at the time we consider preparing |
| it for display. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::prepareCanvasesForDisplayIfNeeded): |
| |
| 2020-06-03 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Add setting for per-page storage access scope |
| https://bugs.webkit.org/show_bug.cgi?id=212682 |
| <rdar://problem/63904824> |
| |
| Reviewed by Brent Fulgham. |
| |
| This is a follow-up patch to https://bugs.webkit.org/show_bug.cgi?id=212114, |
| adding an off-by-default setting and a test case for per-page storage access. |
| |
| Test: http/tests/storageAccess/request-and-grant-access-with-per-page-scope-access-from-another-frame.html |
| |
| * dom/DocumentStorageAccess.cpp: |
| (WebCore::DocumentStorageAccess::requestStorageAccess): |
| * page/Settings.yaml: |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::setStorageAccessAPIPerPageScopeEnabled): |
| * testing/InternalSettings.h: |
| * testing/InternalSettings.idl: |
| |
| 2020-06-03 Rob Buis <rbuis@igalia.com> |
| |
| Make generated C++ code use modern C++ |
| https://bugs.webkit.org/show_bug.cgi?id=190714 |
| |
| Reviewed by Jonathan Bedard. |
| |
| Replace typedef usage by alias-declaration. |
| |
| No new tests. No change in behavior. |
| |
| * css/makeprop.pl: |
| * dom/make_names.pl: |
| (printHeaderHead): |
| (printInit): |
| (printTypeHelpersHeaderFile): |
| (printFactoryCppFile): |
| (printFactoryHeaderFile): |
| (printWrapperFactoryCppFile): |
| (printWrapperFactoryHeaderFile): |
| |
| 2020-06-03 Javier Fernandez <jfernandez@igalia.com> |
| |
| [css-grid] Dynamically setting "position: absolute" in a grid item doesn't trigger a relayout of that element |
| https://bugs.webkit.org/show_bug.cgi?id=191465 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| From Blink r484620 by Sergio Villar <svillar@igalia.com> |
| |
| Containing block overrides not cleared for position:absolute |
| |
| Whenever a position:absolute block gets a new containing block the |
| previously set containing block overrides are not cleared. This causes the |
| block not to be properly layout for its new containing block (for example |
| when using relative sizes). |
| |
| In particular this affects grid items which always get a containing block |
| override size (which represent the grid areas) in case their |
| containing block switches from the grid container to a grid ancestor. |
| |
| No new tests, as this change is covered by current web platform tests. |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::insertPositionedObject): Clear the containing block's override width and height. |
| |
| 2020-06-03 Youenn Fablet <youenn@apple.com> |
| |
| Add more logging related to service worker fetch event handling |
| https://bugs.webkit.org/show_bug.cgi?id=212632 |
| |
| Reviewed by Chris Dumez. |
| |
| Add logging related to creating/canceling/deleting fetch event handler related client. |
| No change of behavior. |
| |
| * workers/service/context/ServiceWorkerThreadProxy.cpp: |
| (WebCore::ServiceWorkerThreadProxy::startFetch): |
| (WebCore::ServiceWorkerThreadProxy::cancelFetch): |
| (WebCore::ServiceWorkerThreadProxy::removeFetch): |
| |
| 2020-06-02 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| ASSERTION FAILED: isCell() under WebCore::JSDOMConstructor seen with webaudio/the-audio-api/the-audiocontext-interface/audiocontextoptions.html |
| https://bugs.webkit.org/show_bug.cgi?id=212650 |
| |
| Reviewed by Mark Lam. |
| |
| Some DOM constructor can return jsNull. For example, AudioContext constructor can return jsNull when it exceeds # of hardware audio contexts. |
| However CodeGeneratorJS assumes that DOM constructor always returns an object, or throws an exception. |
| This patch adds object check after DOM constructor call to handle the jsNull case while it does not change the existing semantics. |
| |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateConstructorDefinition): |
| |
| 2020-06-02 Simon Fraser <simon.fraser@apple.com> |
| |
| EventRegion::translate() needs to offset the wheel event regions |
| https://bugs.webkit.org/show_bug.cgi?id=212683 |
| |
| Reviewed by Zalan Bujtas. |
| |
| EventRegion::translate() failed to offset the wheel event regions, which resulted |
| in wrong reasons for GraphicsLayers with a non-zero offsetFromRenderer. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-layer-offset.html |
| |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::translate): |
| |
| 2020-06-02 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Add a helper method to populate a DataTransfer before dispatching a "dragstart" event |
| https://bugs.webkit.org/show_bug.cgi?id=212614 |
| Work towards <rdar://problem/61368402> |
| |
| Reviewed by Tim Horton. |
| |
| Add a helper method in DragController to pre-populate the StaticPasteboard-backed DataTransfer before |
| dispatching the "dragstart" event. There should be no change in behavior yet, since StaticPasteboard doesn't |
| implement methods for writing data to the pasteboard, which this new method uses. |
| |
| * page/DragController.cpp: |
| (WebCore::DragController::prepareForDragStart const): |
| (WebCore::DragController::hitTestResultForDragStart const): |
| (WebCore::DragController::startDrag): |
| * page/DragController.h: |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::dispatchDragStartEventOnSourceElement): |
| |
| 2020-06-02 Andres Gonzalez <andresg_22@apple.com> |
| |
| AXIsolatedTree::updateNode should not call nodeForID. |
| https://bugs.webkit.org/show_bug.cgi?id=212662 |
| |
| Reviewed by Chris Fleizach. |
| |
| In isolated tree mode AXIsolatedTree::nodeForID should be called only |
| on the secondary AX thread. So removing the need to call nodeForID in |
| updateNode by using AXCoreObject::childrenIDs() instead of retrieving |
| the isolated node to access its children IDs. |
| |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::updateNode): |
| |
| 2020-06-02 Keith Rollin <krollin@apple.com> |
| |
| Revert FEATURES_DEFINES related changes |
| https://bugs.webkit.org/show_bug.cgi?id=212664 |
| <rdar://problem/63893033> |
| |
| Reviewed by Andy Estes. |
| |
| Bug 262310, Bug 262311, Bug 262318, and Bug 262331 involve changes to |
| FEATURE_DEFINES and how the values there relate to those found in the |
| Platform*.h files. Those changes break XCBuild (by removing the |
| .xcfilelist related to UnifiedSources and the process for generating |
| them), and so are being reverted. |
| |
| No new tests -- build changes. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * Configurations/GenerateUnifiedSources.xcconfig: Added. |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Modules/applepay/ApplePayError.idl: |
| * Modules/applepay/ApplePayPaymentAuthorizationResult.idl: |
| * Modules/applepay/ApplePayPaymentContact.idl: |
| * Modules/applepay/ApplePayPaymentMethodUpdate.idl: |
| * Modules/applepay/ApplePayRequestBase.idl: |
| * Modules/applepay/ApplePaySession.idl: |
| * Modules/applepay/ApplePayShippingContactUpdate.idl: |
| * Modules/applepay/ApplePayShippingMethodUpdate.idl: |
| * Modules/applepay/PaymentCoordinatorClient.cpp: |
| (WebCore::PaymentCoordinatorClient::supportsVersion): |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: |
| (WebCore::ApplePayPaymentHandler::computePaymentMethodErrors const): |
| * Scripts/generate-unified-sources.sh: |
| * UnifiedSources-output.xcfilelist: Added. |
| * WebCore.xcodeproj/project.pbxproj: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::applePayButtonDescription const): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const): |
| * css/CSSValueKeywords.in: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): |
| * rendering/RenderThemeCocoa.mm: |
| (WebCore::toPKPaymentButtonType): |
| * rendering/style/RenderStyleConstants.cpp: |
| (WebCore::operator<<): |
| * rendering/style/RenderStyleConstants.h: |
| |
| 2020-06-02 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r262424. |
| |
| Caused webkitpy test failure |
| |
| Reverted changeset: |
| |
| "Make generated C++ code use modern C++" |
| https://bugs.webkit.org/show_bug.cgi?id=190714 |
| https://trac.webkit.org/changeset/262424 |
| |
| 2020-06-02 Peng Liu <peng.liu6@apple.com> |
| |
| Stressing webkitSetPresentationMode leads to wrong inline video dimensions |
| https://bugs.webkit.org/show_bug.cgi?id=202425 |
| |
| Reviewed by Eric Carlson. |
| |
| Make the HTMLVideoElement::setFullscreenMode() robust under stress tests |
| by ignoring a request when the video element is not ready yet. |
| |
| Manually tested. |
| |
| * dom/Element.h: |
| (WebCore::Element::didStopBeingFullscreenElement): |
| Add a callback to indicate that the element has exited fullscreen. |
| * dom/FullscreenManager.cpp: |
| (WebCore::FullscreenManager::didExitFullscreen): |
| Call Element::didStopBeingFullscreenElement() when the element has exited fullscreen. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::enterFullscreen): |
| * html/HTMLMediaElement.h: |
| |
| * html/HTMLVideoElement.cpp: |
| (WebCore::HTMLVideoElement::webkitDisplayingFullscreen): |
| This function will return true when a video element is in the process to exit |
| fullscreen/picture-in-picture until it has completed the process. Therefore, a page |
| can safely request the video element to enter fullscreen/picture-in-picture when |
| this function returns false. |
| |
| (WebCore::HTMLVideoElement::setFullscreenMode): |
| (WebCore::HTMLVideoElement::didBecomeFullscreenElement): |
| (WebCore::HTMLVideoElement::didStopBeingFullscreenElement): |
| (WebCore::HTMLVideoElement::didEnterFullscreen): Deleted. |
| (WebCore::HTMLVideoElement::didExitFullscreen): Deleted. |
| * html/HTMLVideoElement.h: |
| Add a flag m_isChangingPresentationMode. webkitSetPresentationMode() will only |
| change the presentation mode when the flag is false. |
| |
| 2020-06-01 Simon Fraser <simon.fraser@apple.com> |
| |
| Add ENABLE(WHEEL_EVENT_REGIONS), enabled on macOS which is the only platform that needs wheel event regions for scrolling thread hit-testing |
| https://bugs.webkit.org/show_bug.cgi?id=212620 |
| |
| Reviewed by Tim Horton. |
| |
| Surround code related to wheel event regions with ENABLE(WHEEL_EVENT_REGIONS). |
| |
| Eventually we'll use this same code for touch event regions, and when we do, we |
| can rejigger the #ifdefs. |
| |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::operator== const): |
| (WebCore::EventRegion::unite): |
| (WebCore::EventRegion::containsEditableElementsInRect const): |
| (WebCore::EventRegion::dump const): |
| * rendering/EventRegion.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::paintDebugOverlays): |
| |
| 2020-06-02 Andres Gonzalez <andresg_22@apple.com> |
| |
| Avoid calling axBackingObject multiple times in [WebAccessibilityObjectWrapper roleDescription]. |
| https://bugs.webkit.org/show_bug.cgi?id=212643 |
| |
| Reviewed by Chris Fleizach. |
| |
| No new functionality. |
| |
| Avoid unnecessary overhead of calling axBackingObject multiple times in |
| roleDescription. axBackingObject is not just a getter but involves |
| checking whether isolated tree mode is enabled. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper subrole]): |
| (-[WebAccessibilityObjectWrapper roleDescription]): |
| |
| 2020-06-02 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Pass nullptr for the 2nd argument of FileReaderLoader |
| https://bugs.webkit.org/show_bug.cgi?id=212642 |
| |
| Reviewed by Darin Adler. |
| |
| Instead of passing `0`, `nullptr` is better |
| because `FileReaderLoader` takes a pointer. |
| |
| * fileapi/FileReaderSync.cpp: |
| (WebCore::FileReaderSync::readAsArrayBuffer): |
| (WebCore::FileReaderSync::readAsBinaryString): |
| (WebCore::FileReaderSync::readAsText): |
| (WebCore::FileReaderSync::readAsDataURL): |
| |
| 2020-06-02 Tim Horton <timothy_horton@apple.com> |
| |
| UIColor and NSColor WebCore::Color factories should return invalid colors for nil input colors |
| https://bugs.webkit.org/show_bug.cgi?id=212631 |
| |
| Reviewed by Anders Carlsson. |
| |
| * platform/graphics/mac/ColorMac.mm: |
| (WebCore::colorFromNSColor): |
| (WebCore::semanticColorFromNSColor): |
| * platform/ios/ColorIOS.mm: |
| (WebCore::colorFromUIColor): |
| This doesn't affect any code currently in WebKit, but it is very, very surprising |
| that these functions happily accept a null color, assert in debug, but in release |
| do crazy things like try to paint the null color into a small bitmap to figure out |
| what it really is. |
| |
| Also, this matches the behavior of the Color constructors that take CGColorRef. |
| |
| 2020-06-02 Rob Buis <rbuis@igalia.com> |
| |
| Make generated C++ code use modern C++ |
| https://bugs.webkit.org/show_bug.cgi?id=190714 |
| |
| Reviewed by Sam Weinig. |
| |
| Replace typedef usage by alias-declaration. |
| |
| No new tests. No change in behavior. |
| |
| * css/makeprop.pl: |
| * dom/make_names.pl: |
| (printHeaderHead): |
| (printInit): |
| (printTypeHelpersHeaderFile): |
| (printFactoryCppFile): |
| (printFactoryHeaderFile): |
| (printWrapperFactoryCppFile): |
| (printWrapperFactoryHeaderFile): |
| |
| 2020-06-02 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Remove unused BlobURL::getIdentifier |
| https://bugs.webkit.org/show_bug.cgi?id=212635 |
| |
| Reviewed by Youenn Fablet. |
| |
| * fileapi/BlobURL.cpp: |
| * fileapi/BlobURL.h: |
| |
| 2020-06-02 Mark Lam <mark.lam@apple.com> |
| |
| Fix broken Windows build. |
| https://bugs.webkit.org/show_bug.cgi?id=212633 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::needsPreparationForDisplay): |
| (WebCore::HTMLCanvasElement::prepareForDisplay): |
| |
| 2020-06-02 Youenn Fablet <youenn@apple.com> |
| |
| Add some logging to ServiceWorkerThread to track install/activate event handling |
| https://bugs.webkit.org/show_bug.cgi?id=212523 |
| |
| Reviewed by Chris Dumez. |
| |
| Add some logging for firing install/activate events and when these events are handled. |
| No change of behavior. |
| |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::queueTaskToFireInstallEvent): |
| (WebCore::ServiceWorkerThread::queueTaskToFireActivateEvent): |
| |
| 2020-06-02 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make popup menus work |
| https://bugs.webkit.org/show_bug.cgi?id=211178 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gtk_tree_view_column_cell_get_size): |
| |
| 2020-06-01 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-flexbox] ChildIntrinsicLogicalWidth should use fit-content, not max-content |
| https://bugs.webkit.org/show_bug.cgi?id=210465 |
| |
| Reviewed by Javier Fernandez. |
| |
| When computing the hypothetical cross size of each item in the flexbox algorithm |
| the current code was using the max-size. However the specs state clearly that we |
| should use fit-content instead, i.e., the shrink-to-fit size. |
| See https://drafts.csswg.org/css-flexbox/#algo-cross-item. |
| |
| Based on Blink's crrev.com/1327746 by <cbiesinger@chromium.org> |
| |
| * rendering/RenderFlexibleBox.cpp: |
| (WebCore::RenderFlexibleBox::childIntrinsicLogicalWidth const): Use the shrink-to-fit |
| size instead just the max-size. |
| |
| 2020-06-02 Youenn Fablet <youenn@apple.com> |
| |
| MediaPlayerPrivateMediaStreamAVFObjC should enqueue samples in a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=212073 |
| |
| Reviewed by Eric Carlson. |
| |
| Do not hop to the main thread when rendering video samples anymore. |
| Instead, we enqueue to the display layer in the background thread but still hop to the main thread for two things: |
| - Update of various states of the player |
| - keep a ref to the video sample if canvas rendering is needed. |
| |
| Most display layer operations stay in the main thread (creation, flushing...). |
| Deletion of the display layer and access from a background are covered by a lock. |
| The m_canEnqueueDisplayLayer boolean ensures we do not enqueue too early when the display layer is not yet properly initialized. |
| |
| LocalSampleBufferDisplayLayer needs to handle the fact that enqueueing might be done in a background thread. |
| Instead of introducing a lock, we introduce a work queue and we hop to this queue whenever we need to enqueue/mutate the pending samples. |
| |
| Covered by existing tests and manual testing. |
| |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: |
| (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]): |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSample): |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer): |
| (WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::videoTransformationMatrix): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::processNewVideoSampleAvailable): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushRenderers): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateRenderingMode): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setBufferingPolicy): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix): Deleted. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueCorrectedVideoSample): Deleted. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer): Deleted. |
| |
| 2020-06-02 Youenn Fablet <youenn@apple.com> |
| |
| [ Mac wk2 ] http/wpt/service-workers/service-worker-spinning-fetch.https.html is flaky failing. |
| https://bugs.webkit.org/show_bug.cgi?id=207515 |
| <rdar://problem/59329307> |
| |
| Reviewed by Chris Dumez. |
| |
| When a service worker is terminated, we remove it from the map in SWContextManager. |
| Shortly after a new service worker may be added to the map. |
| In that case, previously, we were potentially trying to decrement the message count of the old service worker thread, which is confusing the new service worker thread. |
| Instead, use WeakPtr to decrement if the service worker thread is still valid. |
| Covered by existing tests. |
| |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::queueTaskToPostMessage): |
| (WebCore::ServiceWorkerThread::queueTaskToFireInstallEvent): |
| (WebCore::ServiceWorkerThread::queueTaskToFireActivateEvent): |
| (WebCore::ServiceWorkerThread::start): |
| * workers/service/context/ServiceWorkerThread.h: |
| |
| 2020-06-01 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [WebGPU] Update texture creation validation according to the discussion at https://github.com/gpuweb/gpuweb/pull/799/files |
| https://bugs.webkit.org/show_bug.cgi?id=212390 |
| |
| Reviewed by Dean Jackson. |
| |
| Two new rules: Multisampled textures can't have the STORAGE flag, and sampleCount must be either 1 or 4. |
| |
| Test: webgpu/texture-creation.html |
| |
| * platform/graphics/gpu/GPUDevice.cpp: |
| (WebCore::GPUDevice::tryCreateTexture const): |
| |
| 2020-06-01 Noam Rosenthal <noam@webkit.org> |
| |
| Make unicode-bidi:isolate the default for an element with a dir attribute (instead of unicode-bidi:embed) |
| https://bugs.webkit.org/show_bug.cgi?id=134630 |
| |
| Reviewed by Simon Fraser. |
| |
| Unskipped 11 dir-isolation w3c tests. |
| |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::collectStyleForPresentationAttribute): |
| Use isolate instead of embed for unicode-bidi when dir attribute is present. |
| |
| 2020-06-01 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: Graphics: should use the `id` (name) of the animation if it exists |
| https://bugs.webkit.org/show_bug.cgi?id=212618 |
| |
| Reviewed by Timothy Hatcher. |
| |
| Test: inspector/animation/lifecycle-css-animation.html: |
| inspector/animation/lifecycle-css-transition.html: |
| inspector/animation/lifecycle-web-animation.html: |
| inspector/animation/nameChanged.html |
| |
| * animation/WebAnimation.h: |
| (WebCore::WebAnimation::setId): Deleted. |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::setId): Added. |
| |
| * inspector/InspectorInstrumentation.h: |
| (WebCore::InspectorInstrumentation::didChangeWebAnimationName): Added. |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::didChangeWebAnimationNameImpl): Added. |
| |
| * inspector/agents/InspectorAnimationAgent.h: |
| * inspector/agents/InspectorAnimationAgent.cpp: |
| (WebCore::InspectorAnimationAgent::didChangeWebAnimationName): Added. |
| (WebCore::InspectorAnimationAgent::bindAnimation): |
| |
| 2020-06-01 Andres Gonzalez <andresg_22@apple.com> |
| |
| [WebAccessibilityObjectWrapper subrole] should check for the nullity of the underlying AXCoreObject before dereferencing. |
| https://bugs.webkit.org/show_bug.cgi?id=212607 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| - Check for nullity of the backingObject before dereferencing. |
| - self.axBackingObject is now called only once, instead of many times unnecessarily. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper subrole]): |
| |
| 2020-06-01 Sihui Liu <sihui_liu@apple.com> |
| |
| TextManipulationController should put one Node in only one paragraph |
| https://bugs.webkit.org/show_bug.cgi?id=212548 |
| |
| Reviewed by Wenson Hsieh. |
| |
| TextManipulationController mainly uses line break as delimiter to split paragraphs. In our current |
| implementation, if text of a Node has line break, the part before the line break is in one paragraph and the |
| part after the line break is in another paragraph, which means the Node is in the ranges of two paragraphs. |
| In this case, when TextManipulationController manipulates the first paragraph, it replaces all the Nodes in the |
| range of first paragraph with new Nodes. Then when it manipulates the second paragraph, if will find Node in the |
| range of second paragraph does not exist and fail (because the Node is removed when handling the first |
| paragraph.). Also, TextManipulationController currently does not preserve line breaks in text, which can be an |
| issue if these line breaks are visible. |
| |
| This patch makes the ParagraphContentIterator iterate over Nodes instead of text, so a Node can only be in the |
| range of one paragraph. To do this, it makes line break and spaces around it as a special excluded token. |
| Here are the rules for splitting paragraphs by line break now: |
| 1. If the special token is the first token in a Node, text in Nodes before the Node will make a paragraph. |
| 2. If the special token is the last token in a Node, text in Nodes before the Node and in the Node will make a |
| paragraph. |
| 3. If the special token in the middle of tokens in a Node, then we don't make a new paragraph until next special |
| token meets condition 1 or 2. |
| |
| This patch also fixes the issue that Nodes out of the paragraph range can be removed due to the preorder Node |
| traversal, by finding and adding those Nodes back. |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::ParagraphContentIterator::m_pastEndNode): |
| (WebCore::ParagraphContentIterator::advance): |
| (WebCore::ParagraphContentIterator::currentContent): |
| (WebCore::ParagraphContentIterator::atEnd const): |
| (WebCore::ParagraphContentIterator::advanceNode): |
| (WebCore::ParagraphContentIterator::advanceIteratorNodeAndUpdateText): |
| (WebCore::isEnclosingItemBoundaryElement): |
| (WebCore::TextManipulationController::parse): |
| (WebCore::TextManipulationController::observeParagraphs): |
| (WebCore::TextManipulationController::addItem): |
| (WebCore::TextManipulationController::getPath): |
| (WebCore::TextManipulationController::updateInsertions): |
| (WebCore::TextManipulationController::replace): |
| (WebCore::ParagraphContentIterator::startPosition): Deleted. |
| (WebCore::ParagraphContentIterator::endPosition): Deleted. |
| (WebCore::ParagraphContentIterator::moveCurrentNodeForward): Deleted. |
| (WebCore::containsOnlyHTMLSpaces): Deleted. |
| * editing/TextManipulationController.h: |
| |
| 2020-06-01 David Kilzer <ddkilzer@apple.com> |
| |
| Don't use casts to convert between WebCore::DragDestinationAction and {Web,WK}DragDestinationAction types |
| <https://webkit.org/b/212507> |
| |
| Reviewed by Darin Adler. |
| |
| * page/DragActions.h: |
| (WebCore::anyDragDestinationAction): Add. |
| (WebCore::DragDestinationActionAny): Delete. |
| - Rename DragDestinationActionAny() to |
| anyDragDestinationAction() to match WebKit style. |
| * platform/DragData.h: |
| - Update to use anyDragDestinationAction(). |
| |
| 2020-06-01 Simon Fraser <simon.fraser@apple.com> |
| |
| Add ENABLE(TOUCH_ACTION_REGIONS) to wrap code that's only relevant for platforms that consult touch-action for event handling |
| https://bugs.webkit.org/show_bug.cgi?id=212572 |
| |
| Reviewed by Andy Estes. |
| |
| This will allow for optimizations in event region painting without ambiguity. |
| |
| * dom/Document.h: |
| * page/Frame.cpp: |
| (WebCore::Frame::invalidateContentEventRegionsIfNeeded): |
| * page/scrolling/ScrollingTreeNode.h: |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::operator== const): |
| (WebCore::EventRegion::unite): |
| (WebCore::EventRegion::translate): |
| (WebCore::EventRegion::dump const): |
| * rendering/EventRegion.h: |
| (WebCore::EventRegion::encode const): |
| (WebCore::EventRegion::decode): |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::paintObject): |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::styleWillChange): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::maintainsEventRegion const): |
| (WebCore::RenderLayerBacking::paintDebugOverlays): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::resolveElement): |
| |
| 2020-06-01 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Implement ParentNode.prototype.replaceChildren |
| https://bugs.webkit.org/show_bug.cgi?id=198578 |
| |
| Reviewed by Darin Adler. |
| |
| Ideally, we can use `ContainerNode::replaceAllChildren` to implement |
| this simply but the current of it does not have a path to support |
| `DocumentFragment`. |
| |
| Hence, we call related methods from `ParentNode.prototype.replaceChildren` directly. |
| |
| * dom/ContainerNode.cpp: |
| (WebCore::ContainerNode::replaceChildren): |
| * dom/ContainerNode.h: |
| * dom/ParentNode.idl: |
| |
| 2020-05-25 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-flexbox] Tables as flex items should obey the flex container sizing |
| https://bugs.webkit.org/show_bug.cgi?id=212355 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| For most of the boxes, "width:auto" means use all the available space from your container in the inline |
| direction. This means that a flex container does not need to do anything in particular to stretch them |
| in the inline axis. However that is not true for tables because their width mostly depend on the sum of |
| the sizes of their columns (whichever algorithm is used). That's why the layout code of tables should |
| check whether or not it has an override for the content logical width which is the way flexbox uses to |
| stretch flex items (and use that override width). |
| |
| * rendering/RenderTable.cpp: |
| (WebCore::RenderTable::updateLogicalWidth): Stretch till overrideContentLogicalWidth() if needed. |
| |
| 2020-06-01 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Replace Color constructors taking numeric values with type specific factory functions |
| https://bugs.webkit.org/show_bug.cgi?id=212576 |
| |
| Reviewed by Tim Horton. |
| |
| Replaces all remaining implicit and explicit uses of the Color constructors taking numeric |
| values with explicit calls to makeSimpleColor/makeSimpleColorFromFloats/makeExtendedColor, |
| giving us a consistent way to create colors. Also addes use constexpr SimpleColors where possible. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| * css/CSSValuePool.cpp: |
| (WebCore::StaticCSSValuePool::StaticCSSValuePool): |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters): |
| * html/HTMLInputElement.cpp: |
| (WebCore::HTMLInputElement::createInnerTextStyle): |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::shadowColor const): |
| (WebCore::CanvasRenderingContext2DBase::setShadow): |
| * html/canvas/CanvasStyle.cpp: |
| (WebCore::CanvasStyle::CanvasStyle): |
| (WebCore::CanvasStyle::isEquivalentRGBA const): |
| * inspector/InspectorOverlay.cpp: |
| (WebCore::drawOutlinedQuadWithClip): |
| (WebCore::drawShapeHighlight): |
| (WebCore::InspectorOverlay::paint): |
| (WebCore::InspectorOverlay::drawPaintRects): |
| (WebCore::InspectorOverlay::drawBounds): |
| (WebCore::InspectorOverlay::drawRulers): |
| (WebCore::InspectorOverlay::drawElementTitle): |
| * inspector/agents/InspectorDOMAgent.cpp: |
| (WebCore::parseColor): |
| * layout/integration/LayoutIntegrationLineLayout.cpp: |
| (WebCore::LayoutIntegration::LineLayout::debugTextShadow): |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| (WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS const): |
| * page/DebugPageOverlays.cpp: |
| (WebCore::touchEventRegionColors): |
| (WebCore::NonFastScrollableRegionOverlay::drawRect): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::paintContents): |
| * page/PrintContext.cpp: |
| (WebCore::PrintContext::spoolAllPagesWithBoundaries): |
| * page/linux/ResourceUsageOverlayLinux.cpp: |
| (WebCore::ResourceUsageOverlay::platformInitialize): |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::light const): |
| (WebCore::Color::dark const): |
| (WebCore::Color::blendWithWhite const): |
| (WebCore::Color::colorWithAlphaMultipliedBy const): |
| (WebCore::Color::colorWithAlphaMultipliedByUsingAlternativeRounding const): |
| (WebCore::Color::colorWithAlpha const): |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): |
| (WebCore::blendWithoutPremultiply): |
| (WebCore::extendedColorsEqual): Deleted. |
| (WebCore::Color::tagAsValid): Deleted. |
| * platform/graphics/Color.h: |
| (WebCore::Color::Color): |
| (WebCore::Color::tagAsSemantic): |
| (WebCore::Color::tagAsValid): |
| (WebCore::extendedColorsEqual): |
| (WebCore::Color::decode): |
| (WebCore::Color::setIsSemantic): Deleted. |
| * platform/graphics/ExtendedColor.cpp: |
| (WebCore::makeExtendedColor): |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::ExtendedColor::ExtendedColor): |
| (): Deleted. |
| * platform/graphics/GraphicsLayer.cpp: |
| (WebCore::GraphicsLayer::getDebugBorderInfo const): |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::recursiveCommitChanges): |
| (WebCore::contentsLayerDebugBorderColor): |
| (WebCore::cloneLayerDebugBorderColor): |
| (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): |
| * platform/graphics/ca/PlatformCALayer.cpp: |
| (WebCore::PlatformCALayer::drawRepaintIndicator): |
| * platform/graphics/ca/TileCoverageMap.cpp: |
| (WebCore::TileCoverageMap::TileCoverageMap): |
| (WebCore::TileCoverageMap::update): |
| * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: |
| (PlatformCALayerWinInternal::drawRepaintCounters): |
| * platform/graphics/cairo/GradientCairo.cpp: |
| (WebCore::interpolateColorStop): |
| * platform/graphics/cg/ColorCG.cpp: |
| (WebCore::Color::Color): |
| * platform/graphics/cg/NativeImageCG.cpp: |
| (WebCore::nativeImageSinglePixelSolidColor): |
| * platform/graphics/cocoa/GraphicsContextCocoa.mm: |
| (WebCore::colorForMarkerLineStyle): |
| * platform/graphics/filters/FilterOperation.cpp: |
| (WebCore::DropShadowFilterOperation::blend): |
| * platform/graphics/mac/ColorMac.mm: |
| (WebCore::colorFromNSColor): |
| * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: |
| (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper): |
| * platform/ios/DragImageIOS.mm: |
| (WebCore::createDragImageForLink): |
| * platform/ios/LegacyTileCache.mm: |
| (WebCore::LegacyTileCache::colorForGridTileBorder const): |
| * platform/win/DragImageWin.cpp: |
| (WebCore::createDragImageForLink): |
| * rendering/PaintInfo.h: |
| (WebCore::PaintInfo::forcedTextColor const): |
| * rendering/RenderEmbeddedObject.cpp: |
| (WebCore::RenderEmbeddedObject::paintReplaced): |
| (WebCore::replacementTextRoundedRectPressedColor): Deleted. |
| (WebCore::replacementTextRoundedRectColor): Deleted. |
| (WebCore::replacementTextColor): Deleted. |
| (WebCore::unavailablePluginBorderColor): Deleted. |
| * rendering/RenderFrameSet.cpp: |
| (WebCore::RenderFrameSet::paintColumnBorder): |
| (WebCore::RenderFrameSet::paintRowBorder): |
| (WebCore::borderStartEdgeColor): Deleted. |
| (WebCore::borderEndEdgeColor): Deleted. |
| (WebCore::borderFillColor): Deleted. |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::beginTransparencyLayers): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::paintDebugOverlays): |
| * rendering/RenderTheme.cpp: |
| (WebCore::RenderTheme::platformActiveSelectionBackgroundColor const): |
| (WebCore::RenderTheme::platformInactiveSelectionBackgroundColor const): |
| (WebCore::RenderTheme::platformTextSearchHighlightColor const): |
| (WebCore::RenderTheme::paintSystemPreviewBadge): |
| (WebCore::RenderTheme::platformTapHighlightColor const): |
| * rendering/RenderTheme.h: |
| (WebCore::RenderTheme::platformFocusRingColor const): |
| * rendering/RenderThemeIOS.h: |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::paintCheckboxDecorations): |
| (WebCore::RenderThemeIOS::paintRadioDecorations): |
| (WebCore::RenderThemeIOS::paintMenuListButtonDecorations): |
| (WebCore::RenderThemeIOS::paintSliderTrack): |
| (WebCore::RenderThemeIOS::paintProgressBar): |
| (WebCore::paintAttachmentProgress): |
| (WebCore::paintAttachmentBorder): |
| (WebCore::RenderThemeIOS::paintSystemPreviewBadge): |
| (WebCore::RenderThemeIOS::shadowColor const): Deleted. |
| (WebCore::attachmentBorderColor): Deleted. |
| (WebCore::attachmentProgressColor): Deleted. |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::paintMenuListButtonDecorations): |
| (WebCore::titleTextColorForAttachment): |
| (WebCore::AttachmentLayout::layOutSubtitle): |
| (WebCore::paintAttachmentIconBackground): |
| (WebCore::paintAttachmentTitleBackground): |
| (WebCore::paintAttachmentProgress): |
| (WebCore::paintAttachmentPlaceholderBorder): |
| (WebCore::attachmentIconBackgroundColor): Deleted. |
| (WebCore::attachmentIconBorderColor): Deleted. |
| (WebCore::attachmentTitleInactiveBackgroundColor): Deleted. |
| (WebCore::attachmentTitleInactiveTextColor): Deleted. |
| (WebCore::attachmentSubtitleTextColor): Deleted. |
| (WebCore::attachmentProgressBarBackgroundColor): Deleted. |
| (WebCore::attachmentProgressBarFillColor): Deleted. |
| (WebCore::attachmentProgressBarBorderColor): Deleted. |
| (WebCore::attachmentPlaceholderBorderColor): Deleted. |
| * rendering/RenderThemeWin.cpp: |
| (WebCore::RenderThemeWin::platformActiveSelectionBackgroundColor const): |
| (WebCore::RenderThemeWin::platformInactiveSelectionBackgroundColor const): |
| (WebCore::RenderThemeWin::platformActiveSelectionForegroundColor const): |
| (WebCore::RenderThemeWin::systemColor const): |
| * rendering/SimpleLineLayoutFunctions.cpp: |
| (WebCore::SimpleLineLayout::paintFlow): |
| * rendering/mathml/RenderMathMLBlock.cpp: |
| (WebCore::RenderMathMLBlock::paint): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::colorResolvingCurrentColor const): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::initialStrokeColor): |
| * rendering/style/SVGRenderStyle.h: |
| (WebCore::SVGRenderStyle::initialStopColor): |
| (WebCore::SVGRenderStyle::initialFloodColor): |
| (WebCore::SVGRenderStyle::initialLightingColor): |
| * svg/SVGStopElement.cpp: |
| (WebCore::SVGStopElement::stopColorIncludingOpacity const): |
| * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: |
| (WebCore::SVGAnimationColorFunction::animate): |
| * testing/MockPageOverlayClient.cpp: |
| (WebCore::MockPageOverlayClient::drawRect): |
| * testing/cocoa/WebViewVisualIdentificationOverlay.mm: |
| (-[WebViewVisualIdentificationOverlay initWithWebView:kind:deprecated:]): |
| |
| 2020-06-01 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] When GraphicsLayerCA::m_uncommittedChanges is initialized with a non-zero value, nothing is painted. |
| https://bugs.webkit.org/show_bug.cgi?id=168666 |
| |
| Reviewed by Maciej Stachowiak. |
| |
| When m_uncommittedChanges is initialized with a non-zero value, client().notifyFlushRequired() will not be |
| called in the first call to noteLayerPropertyChanged(), see https://bugs.webkit.org/show_bug.cgi?id=64808. |
| |
| Covered by existing tests. |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::initialize): |
| * platform/graphics/ca/GraphicsLayerCA.h: |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add printing support |
| https://bugs.webkit.org/show_bug.cgi?id=212320 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add gtk_dialog_run() to GTK4. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gtk_dialog_run): |
| |
| 2020-06-01 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make inspector work |
| https://bugs.webkit.org/show_bug.cgi?id=212321 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add gtk_native_dialog_run() for GTK4. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gtk_native_dialog_run): |
| |
| 2020-06-01 Rob Buis <rbuis@igalia.com> |
| |
| Rename ResourceResponseBase::isHTTP to isInHTTPFamily |
| https://bugs.webkit.org/show_bug.cgi?id=208782 |
| |
| Reviewed by Sam Weinig. |
| |
| As the comment says, the method name is misleading and the method |
| is inconsistent with the API of ResourceRequestBase, so rename it |
| to make it clear the method can be used for both http and https |
| protocols. |
| |
| No tests since no change in behavior. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::continueAfterContentPolicy): |
| * loader/NetscapePlugInStreamLoader.cpp: |
| (WebCore::NetscapePlugInStreamLoader::didReceiveResponse): |
| * platform/network/ResourceResponseBase.cpp: |
| (WebCore::ResourceResponseBase::isInHTTPFamily const): |
| (WebCore::ResourceResponseBase::isHTTP const): Deleted. |
| * platform/network/ResourceResponseBase.h: |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::responseMIMEType const): |
| * xml/parser/XMLDocumentParserLibxml2.cpp: |
| (WebCore::externalEntityMimeTypeAllowed): |
| |
| 2020-05-31 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Tidy up Source/WebCore/page/DragController.h |
| https://bugs.webkit.org/show_bug.cgi?id=212584 |
| |
| Reviewed by Anders Carlsson. |
| |
| Unindent the `DragController` class by 1 indentation level, to adhere with |
| <https://webkit.org/code-style-guidelines/#indentation-namespace>. Also, remove |
| some stray trailing whitespace. |
| |
| No change in behavior. |
| |
| * page/DragController.h: |
| (WebCore::DragController::mouseIsOverFileInput const): |
| (WebCore::DragController::numberOfItemsToBeAccepted const): |
| (WebCore::DragController::setDidInitiateDrag): |
| (WebCore::DragController::didInitiateDrag const): |
| (WebCore::DragController::sourceDragOperation const): |
| (WebCore::DragController::draggingImageURL const): |
| (WebCore::DragController::setDragOffset): |
| (WebCore::DragController::dragOffset const): |
| (WebCore::DragController::dragSourceAction const): |
| (WebCore::DragController::dragHandlingMethod const): |
| (WebCore::DragController::documentUnderMouse const): |
| (WebCore::DragController::dragDestinationActionMask const): |
| (WebCore::DragController::droppedImagePlaceholders const): |
| (WebCore::DragController::droppedImagePlaceholderRange const): |
| (WebCore::DragController::canLoadDataFromDraggingPasteboard const): |
| (WebCore::DragController::client const): |
| |
| 2020-05-31 Dean Jackson <dino@apple.com> |
| |
| AutoTrader crashed while browsing search results |
| https://bugs.webkit.org/show_bug.cgi?id=212461 |
| rdar://60733185 |
| |
| Reviewed by Sam Weinig. |
| |
| On iOS, when using WebKit1 (UIWebView), CoreAnimation would |
| call WebGLLayer's display method from a thread that is not |
| the Web Thread. That method was performing some GL work using |
| ANGLE, causing a crash. |
| |
| Since all the WebGLLayer's display method really needs to do |
| is swap buffers for compositing, the fix is to separate all |
| the GL operations into a method that can be called after |
| painting but before compositing. This should also have the added |
| benefit that by the time CoreAnimation comes to call display |
| on all the dirty layers, we will have already executed our |
| expensive GPU work. The total amount of work done on the GPU |
| is the same, but hopefully it is now all done in WebKit's |
| paint cycle, rather than when the Window Server is trying |
| to get CA to composite things. |
| |
| Covered by a new API test: WebGLPrepareDisplayOnWebThread |
| |
| * html/HTMLCanvasElement.h: |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::HTMLCanvasElement): |
| (WebCore::HTMLCanvasElement::~HTMLCanvasElement): |
| (WebCore::HTMLCanvasElement::didMoveToNewDocument): |
| (WebCore::HTMLCanvasElement::removedFromAncestor): |
| Add or remove the document as a CanvasObserver. |
| (WebCore::HTMLCanvasElement::needsPreparationForDisplay): |
| Signals whether this element is the type that needs preparation. |
| (WebCore::HTMLCanvasElement::prepareForDisplay): |
| Tell the WebGLRenderingContext it must prepare. |
| |
| * html/canvas/WebGLRenderingContextBase.h: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::prepareForDisplay): |
| The WebGLRenderingContext must forward the call |
| to prepare down to the GraphicsContextGLOpenGL. |
| |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.h: |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: |
| * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: |
| (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): |
| And the GraphicsContextGLOpenGL forwards the call |
| into the WebGLLayer. |
| |
| * platform/graphics/cocoa/WebGLLayer.h: |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer prepareForDisplay]): |
| (-[WebGLLayer display]): |
| Split the parts of the `display` method that deal |
| with flushing the GL commands, preparing the framebuffer texture, |
| and swapping the IOSurfaces into a new `prepareForDisplay`. This |
| method is invoked at the end of the rendering/layout tasks, leaving |
| the `display` method to only tell CoreAnimation about a new buffer |
| to composite. |
| |
| * dom/Document.cpp: |
| * dom/Document.h: |
| (WebCore::Document::prepareCanvasesForDisplayIfNeeded): |
| (WebCore::Document::canvasChanged): |
| (WebCore::Document::canvasDestroyed): |
| Keep a set of HTMLCanvasElements that need to |
| be prepared so we can tell them when they need to prepare. |
| Do this by becoming a CanvasObserver, thus getting |
| notified when a canvas has done something that |
| would cause painting. |
| |
| * page/Page.cpp: |
| (WebCore::Page::doAfterUpdateRendering): |
| Add a new task that asks the Document to notify |
| all relevant canvas objects that they should prepare |
| for display. |
| |
| 2020-05-31 Jer Noble <jer.noble@apple.com> |
| |
| [Cocoa] EME should return more helpful error code during key exchange |
| https://bugs.webkit.org/show_bug.cgi?id=212535 |
| <rdar://problem/60439979> |
| |
| Reviewed by Eric Carlson. |
| |
| Clients have requested that the EME API provide more helpful information when the FairPlay CDM is unable |
| to provide the requested level of key security. Currently, we reject the update() promise with a generic |
| "failed" error code. Instead, resolve the promise, but mark the key as "output-restricted" in the key |
| status map, indicating that the key cannot be used with required level of security. |
| |
| Drive-by fix: We currently ASSERT() that the callback from removeSessionData() isn't called if the session |
| is not a PUR session. When calling removeSessionData() on a non-PUR session, call the callback with a generic |
| "failed" error. |
| |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: |
| (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::removeSessionData): |
| (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didFailToProvideRequest): |
| (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::keyStatuses const): |
| |
| 2020-05-31 Jer Noble <jer.noble@apple.com> |
| |
| [Cocoa] Transition between encrypted and clear codecs throws error from SourceBuffer.appendBuffer() |
| https://bugs.webkit.org/show_bug.cgi?id=212550 |
| <rdar://problem/62207260> |
| |
| Reviewed by Eric Carlson. |
| |
| CoreMedia returns a different codec 4CC code for "encrypted AVC" than it does for "clear AVC", though |
| the underlying codec used for both is the same. While CoreMedia does use different codec implementations |
| for each, it is capable of freely switching between the two, and the codec string used by web developers |
| for encrypted vs. clear content is identical. So we will treat these two codecs as "the same" as it pertains |
| to the MSE requirement that codecs contained in new initialization segments are "the same" as previous |
| ones. Adopt kCMFormatDescriptionExtension_ProtectedContentOriginalFormat, which can query the "original" |
| codec used for encrypted codec playback. |
| |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| |
| 2020-05-31 Zalan Bujtas <zalan@apple.com> |
| |
| [iBooks] Empty pages appear in book |
| https://bugs.webkit.org/show_bug.cgi?id=212573 |
| <rdar://problem/62912623> |
| |
| Reviewed by Antti Koivisto. |
| |
| Do not add a page break for orphan content unless the line does not fit anymore. |
| |
| Test: fast/multicol/orphans-ignored.html |
| |
| * rendering/SimpleLineLayoutPagination.cpp: |
| (WebCore::SimpleLineLayout::setPageBreakForLine): |
| (WebCore::SimpleLineLayout::adjustLinePositionsForPagination): |
| |
| 2020-05-31 Rob Buis <rbuis@igalia.com> |
| |
| Implement named item condition for images |
| https://bugs.webkit.org/show_bug.cgi?id=212473 |
| |
| Reviewed by Maciej Stachowiak. |
| |
| Implement named item condition for images, not only should we |
| check there are both an id and a name attribute, but also that |
| the name attribute is non-empty [1]. |
| |
| Behavior matches Chrome and Firefox. |
| |
| [1] https://html.spec.whatwg.org/multipage/dom.html#dom-document-nameditem-filter |
| |
| Test: imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/nameditem-06.html |
| |
| * html/HTMLNameCollection.cpp: |
| (WebCore::DocumentNameCollection::elementMatchesIfIdAttributeMatch): |
| |
| 2020-05-31 Rob Buis <rbuis@igalia.com> |
| |
| <area> needs to be connected in order to navigate |
| https://bugs.webkit.org/show_bug.cgi?id=177357 |
| |
| Reviewed by Maciej Stachowiak. |
| |
| Implement second step of cannot navigate algorithm: |
| https://html.spec.whatwg.org/#cannot-navigate |
| |
| Test: web-platform-tests/html/semantics/links/following-hyperlinks/activation-behavior.window.html |
| |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::handleClick): |
| |
| 2020-05-30 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Additional color cleanups |
| https://bugs.webkit.org/show_bug.cgi?id=212567 |
| |
| Reviewed by Simon Fraser. |
| |
| A few unrelated quality-of-life cleanups to Color and related classes: |
| - Rename Color::asSimpleColor() to Color::asSimple() for parity with Color::asExtended(). |
| - Move SimpleColor implementations of invertedColorWithAlpha() and asSRGBFloatComponents() |
| to SimpleColor for parity with ExtenedColor. |
| - Rename ExtendedColor::channels() to ExtendedColor::components() to consistency. |
| - Adds operator[] to ColorComponents to allow direct access to components rather than |
| requiring and additional .components[] |
| - Using std::minmax() where possible. |
| - Renaming colorFloatToSimpleColorByte to scaleRoundAndClampColorChannel to have a consistent |
| naming and location of conversion to 8-bit color channels. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::serialized const): |
| (WebCore::Color::cssText const): |
| (WebCore::Color::nameForRenderTreeAsText const): |
| (WebCore::Color::light const): |
| (WebCore::Color::dark const): |
| (WebCore::Color::colorWithAlpha const): |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): |
| (WebCore::Color::invertedColorWithAlpha const): |
| (WebCore::Color::colorSpaceAndComponents const): |
| (WebCore::Color::toSRGBASimpleColorLossy const): |
| (WebCore::Color::toSRGBAComponentsLossy const): |
| * platform/graphics/Color.h: |
| (WebCore::Color::isOpaque const): |
| (WebCore::Color::isVisible const): |
| (WebCore::Color::alpha const): |
| (WebCore::Color::alphaAsFloat const): |
| (WebCore::Color::asSimple const): |
| (WebCore::Color::isBlackColor): |
| (WebCore::Color::isWhiteColor): |
| (WebCore::Color::encode const): |
| (WebCore::Color::asSimpleColor const): Deleted. |
| * platform/graphics/ColorComponents.h: |
| (WebCore::ColorComponents::operator[]): |
| (WebCore::ColorComponents::operator[] const): |
| (WebCore::=): |
| (WebCore::perComponentMax): |
| (WebCore::perComponentMin): |
| * platform/graphics/ColorMatrix.h: |
| (WebCore::Rows>::transformedColorComponents const): |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::areEssentiallyEqual): |
| (WebCore::rgbToLinearComponents): |
| (WebCore::linearToRGBComponents): |
| (WebCore::lightness): |
| (WebCore::luminance): |
| (WebCore::sRGBToHSL): |
| (WebCore::hslToSRGB): |
| * platform/graphics/ColorUtilities.h: |
| (WebCore::scaleRoundAndClampColorChannel): |
| (WebCore::scaleRoundAndClampColorChannelUsingAlternativeRounding): |
| (WebCore::colorFloatToSimpleColorByte): Deleted. |
| * platform/graphics/ExtendedColor.cpp: |
| (WebCore::ExtendedColor::hash const): |
| (WebCore::ExtendedColor::cssText const): |
| (WebCore::ExtendedColor::colorWithAlpha const): |
| (WebCore::ExtendedColor::invertedColorWithAlpha const): |
| (WebCore::ExtendedColor::toSRGBAComponentsLossy const): |
| (WebCore::ExtendedColor::isWhite const): |
| (WebCore::ExtendedColor::isBlack const): |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::ExtendedColor::alpha const): |
| (WebCore::ExtendedColor::components const): |
| (WebCore::ExtendedColor::ExtendedColor): |
| (WebCore::operator==): |
| (WebCore::ExtendedColor::channels const): Deleted. |
| * platform/graphics/SimpleColor.cpp: |
| (WebCore::makeSimpleColorFromFloats): |
| (WebCore::makeSimpleColorFromHSLA): |
| * platform/graphics/SimpleColor.h: |
| (WebCore::SimpleColor::SimpleColor): |
| (WebCore::SimpleColor::valueAsARGB const): |
| (WebCore::SimpleColor::colorWithAlpha const): |
| (WebCore::SimpleColor::invertedColorWithAlpha const): |
| (WebCore::SimpleColor::asSRGBFloatComponents const): |
| (WebCore::makeSimpleColor): |
| * platform/graphics/cg/ColorCG.cpp: |
| (WebCore::cachedCGColor): |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::drawLighting): |
| * platform/graphics/filters/FETurbulence.cpp: |
| (WebCore::toIntBasedColorComponents): |
| * platform/graphics/filters/FilterOperation.cpp: |
| (WebCore::BasicComponentTransferFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): |
| * platform/graphics/filters/FilterOperations.cpp: |
| (WebCore::FilterOperations::transformColor const): |
| (WebCore::FilterOperations::inverseTransformColor const): |
| |
| 2020-05-30 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r262335. |
| https://bugs.webkit.org/show_bug.cgi?id=212571 |
| |
| Triggered assertions in WebKit1 |
| |
| Reverted changeset: |
| |
| "Disallow responses when a response contains invalid header |
| values" |
| https://bugs.webkit.org/show_bug.cgi?id=184493 |
| https://trac.webkit.org/changeset/262335 |
| |
| 2020-05-30 Simon Fraser <simon.fraser@apple.com> |
| |
| For scroll container and scrolled contents layers, use the renderer style to set up the event regions |
| https://bugs.webkit.org/show_bug.cgi?id=212570 |
| |
| Reviewed by Antti Koivisto. |
| |
| RenderLayerBacking::updateEventRegion() sets up event regions on the scroll container and scrolled contents |
| layer using the default style, in order to fill up the m_region part of EventRegion, but we might as well |
| pass the renderer style so that it fills up the touch-action and wheel event regions as well. |
| |
| Also re-use the existing event region trace points for region building. |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateEventRegion): |
| |
| 2020-05-30 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Support percentage border-radius values in -apple-pay-button |
| https://bugs.webkit.org/show_bug.cgi?id=212559 |
| <rdar://problem/63781881> |
| |
| Reviewed by Antti Koivisto. |
| |
| Added test cases to fast/css/appearance-apple-pay-button-border-radius.html. |
| |
| * rendering/RenderThemeCocoa.mm: |
| (WebCore::RenderThemeCocoa::paintApplePayButton): Used floatValueForLength() to ensure |
| percentage lengths are resolved before passing a corner radius to PassKit. |
| |
| 2020-05-29 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| [JSC] JSBigInt allocation should be graceful for OOM |
| https://bugs.webkit.org/show_bug.cgi?id=212512 |
| |
| Reviewed by Mark Lam. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneDeserializer::readBigInt): |
| |
| 2020-05-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Event region painting should use the same paint flags as normal painting |
| https://bugs.webkit.org/show_bug.cgi?id=212547 |
| |
| Reviewed by Sam Weinig. |
| |
| There are cases (see r260118) where we need to send down the correct paint flags when |
| painting the scrolled contents layer to avoid unwanted clipping. We need to send down |
| the one paint flag relevant for event region paints, CompositedOverflowScrollContent, |
| for the same reasons. |
| |
| I could not make a testcase that shows a behavior change, but I did copy the testcase |
| from r260118 and adapt it for event-region generation to detect future behavior changes. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-inside-overflow-scroll-clipped-out.html |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::paintLayerContents): |
| (WebCore::RenderLayer::collectEventRegionForFragments): |
| * rendering/RenderLayer.h: |
| |
| 2020-05-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Elements with wheel event handlers inside overflow:scroll are missing from the event region |
| https://bugs.webkit.org/show_bug.cgi?id=212545 |
| |
| Reviewed by Zalan Bujtas. |
| |
| RenderBlock::paintObject() needs to traverse into descendants if there are are |
| wheel event handlers on the document, just as it does for elements with touch-action. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-inside-overflow-scroll.html |
| |
| * dom/Document.h: |
| (WebCore::Document::hasTouchEventHandlers const): |
| (WebCore::Document::hasWheelEventHandlers const): |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::paintObject): |
| |
| 2020-05-29 Rob Buis <rbuis@igalia.com> |
| |
| Disallow responses when a response contains invalid header values |
| https://bugs.webkit.org/show_bug.cgi?id=184493 |
| |
| Reviewed by Youenn Fablet. |
| |
| From the Fetch specification [1]: |
| "A value is a byte sequence that matches the following conditions: |
| "- Contains no 0x00 (NUL) or HTTP newline bytes." |
| |
| [1] https://fetch.spec.whatwg.org/#concept-header-value |
| |
| Tests: imported/w3c/web-platform-tests/fetch/h1-parsing/resources-with-0x00-in-header.window.html |
| imported/web-platform-tests/fetch/api/basic/header-value-combining.any.html |
| imported/web-platform-tests/fetch/api/basic/header-value-combining.any.worker.html |
| imported/web-platform-tests/fetch/api/basic/header-value-null-byte.any.html |
| imported/web-platform-tests/fetch/api/basic/header-value-null-byte.any.worker.html |
| imported/web-platform-tests/xhr/headers-normalize-response.htm |
| |
| * Modules/fetch/FetchHeaders.cpp: |
| (WebCore::canWriteHeader): |
| (WebCore::appendToHeaderMap): |
| (WebCore::FetchHeaders::filterAndFill): |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::loadRequest): |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::didReceiveResponse): |
| * platform/network/ResourceResponseBase.cpp: |
| (WebCore::ResourceResponseBase::containsInvalidHTTPHeaders const): |
| * platform/network/ResourceResponseBase.h: |
| |
| 2020-05-29 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Remove conditionals for ENABLE_APPLE_PAY_SESSION_V(3|4) |
| https://bugs.webkit.org/show_bug.cgi?id=212541 |
| |
| Reviewed by Darin Adler. |
| |
| APPLE_PAY_SESSION_V(3|4) is now enabled whenever APPLE_PAY itself is enabled. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * Modules/applepay/ApplePayError.idl: |
| * Modules/applepay/ApplePayPaymentAuthorizationResult.idl: |
| * Modules/applepay/ApplePayPaymentContact.idl: |
| * Modules/applepay/ApplePayPaymentMethodUpdate.idl: |
| * Modules/applepay/ApplePayRequestBase.idl: |
| * Modules/applepay/ApplePaySession.idl: |
| * Modules/applepay/ApplePayShippingContactUpdate.idl: |
| * Modules/applepay/ApplePayShippingMethodUpdate.idl: |
| * Modules/applepay/PaymentCoordinatorClient.cpp: |
| (WebCore::PaymentCoordinatorClient::supportsVersion): |
| * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp: |
| (WebCore::ApplePayPaymentHandler::computePaymentMethodErrors const): |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::applePayButtonDescription const): |
| * css/CSSPrimitiveValueMappings.h: |
| (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): |
| (WebCore::CSSPrimitiveValue::operator ApplePayButtonType const): |
| * css/CSSValueKeywords.in: |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): |
| * rendering/RenderThemeCocoa.mm: |
| (WebCore::toPKPaymentButtonType): |
| * rendering/style/RenderStyleConstants.cpp: |
| (WebCore::operator<<): |
| * rendering/style/RenderStyleConstants.h: |
| |
| 2020-05-29 Jer Noble <jer.noble@apple.com> |
| |
| [EME] navigator.requestMediaKeySystemAccess() should reject PUR sessionTypes in private browsing mode. |
| https://bugs.webkit.org/show_bug.cgi?id=212540 |
| <rdar://problem/61125757> |
| |
| Reviewed by Eric Carlson. |
| |
| A MediaKeySystemAccess with a PUR session type will never be able to create media keys when created in |
| private browsing mode. Allow clients to fail over to non-PUR session by rejecting the promise returned by |
| requestMediaKeySystemAccess() when in private browsing mode. |
| |
| Test: platform/mac/media/encrypted-media/fps-ephemeral-requestMediaKeySystemAccess.html |
| |
| * Modules/encryptedmedia/CDM.cpp: |
| (WebCore::CDM::getSupportedConfiguration): |
| |
| 2020-05-29 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] Unable to paste images when composing mail at yahoo.com |
| https://bugs.webkit.org/show_bug.cgi?id=212544 |
| <rdar://problem/63511613> |
| |
| Reviewed by Megan Gardner and Andy Estes. |
| |
| When pasting images in the mobile version of the mail compose editor on mail.yahoo.com, mail.yahoo.com's script |
| handles the paste by allowing images to be inserted into the DOM (i.e. by not preventing the "paste" event), and |
| then stripping away the `src` attribute of the pasted image afterwards. This leaves behind a blank space in the |
| email. |
| |
| Work around this by avoiding images when converting the contents of the pasteboard into web content on iOS. |
| Instead, we fall back to inserting (sanitized) text, or nothing at all if there is no other representation |
| suitable for converting into web content. |
| |
| Unfortunately, the mobile version of the website is loaded on iPad as well, even when the desktop website has |
| been requested (through sending the macOS user agent and "MacIntel" navigator platform). |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::WebContentReader::readImage): |
| * page/Quirks.cpp: |
| (WebCore::Quirks::shouldAvoidPastingImagesAsWebContent const): |
| * page/Quirks.h: |
| |
| 2020-05-29 Darin Adler <darin@apple.com> |
| |
| Remove things from FeatureDefines.xcconfig that are covered by PlatformEnableCocoa.h |
| https://bugs.webkit.org/show_bug.cgi?id=212418 |
| |
| Rubber-stamped by Simon Fraser. |
| |
| * Configurations/FeatureDefines.xcconfig: Add back ENABLE_CSS_CONIC_GRADIENTS, removed |
| by accident. |
| |
| 2020-05-29 Jacob Uphoff <jacob_uphoff@apple.com> |
| |
| Unreviewed, reverting r262289. |
| |
| This commit caused a test to crash internally |
| |
| Reverted changeset: |
| |
| "MediaPlayerPrivateMediaStreamAVFObjC should enqueue samples |
| in a background thread" |
| https://bugs.webkit.org/show_bug.cgi?id=212073 |
| https://trac.webkit.org/changeset/262289 |
| |
| 2020-05-27 Darin Adler <darin@apple.com> |
| |
| Remove things from FeatureDefines.xcconfig that are covered by PlatformEnableCocoa.h |
| https://bugs.webkit.org/show_bug.cgi?id=212418 |
| |
| Reviewed by Andy Estes. |
| |
| * Configurations/FeatureDefines.xcconfig: Removed 83 of the 119 things defined in |
| this file. There are 36 more that are slightly more complex that we can remove |
| carefully later. |
| |
| 2020-05-29 Darin Adler <darin@apple.com> |
| |
| Make generate-unified-sources.sh not depend on features being listed in FEATURE_DEFINES environment variable |
| https://bugs.webkit.org/show_bug.cgi?id=212420 |
| |
| Currently any #if in the Sources.txt and SourcesCocoa.txt files can check only features |
| defined in the FeatureDefines.xcconfig file, which sets up the FEATURE_DEFINES environment |
| variable. Instead, we'd like to pass in all the things defined in the Platform.h headers |
| as well. We accomplish that using the FEATURE_AND_PLATFORM_DEFINES variable from the |
| DerivedSources.make file. This was the last place using FEATURE_DEFINES directly, so it |
| frees us up to reduce FeatureDefines.xcconfig and move feature definitions to |
| PlatformEnableCocoa.h instead, which will be less repetitive. |
| |
| Reviewed by Andy Estes. |
| |
| * Configurations/GenerateUnifiedSources.xcconfig: Deleted. |
| * DerivedSources-input.xcfilelist: Updated. |
| * DerivedSources-output.xcfilelist: Updated. |
| * DerivedSources.make: Added a rule to invoke generate-unified-sources.sh, passing |
| FEATURE_AND_PLATFORM_DEFINES. |
| * Scripts/generate-unified-sources.sh: Removed hard-coded use of FEATURE_DEFINES. |
| * UnifiedSources-output.xcfilelist: Deleted. |
| * WebCore.xcodeproj/project.pbxproj: Removed Generate Unified Sources build step, |
| since it's now part of Generate Derived Sources. |
| |
| 2020-05-29 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Pass all defines from Platform.h to various scripts, not just the ones from .xcconfig |
| https://bugs.webkit.org/show_bug.cgi?id=212451 |
| |
| Reviewed by Sam Weinig. |
| |
| * DerivedSources.make: Run the preprocessor on Platform.h and parse the output into |
| FEATURE_AND_PLATFORM_DEFINES. Use that and FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES |
| whenever we need a list of defines. Also took out some Windows-specific stuff since |
| this is now only used on Mac platforms. Use ":=" when calling $(shell) to make sure |
| the same shell command is not invoked over and over again. |
| |
| 2020-05-29 Keith Rollin <krollin@apple.com> |
| |
| Revert switch to XCBuild |
| https://bugs.webkit.org/show_bug.cgi?id=212530 |
| <rdar://problem/63764632> |
| |
| Unreviewed build fix. |
| |
| Bug 209890 enabled the use of XCBuild by default. Since then, some |
| build issues have shown up. While addressing them, temporarily turn |
| off the use of XCBuild by default. |
| |
| No new tests -- build fix. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2020-05-29 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| REGRESSION(r261940): PLT5 is 2% regressed |
| https://bugs.webkit.org/show_bug.cgi?id=212504 |
| <rdar://problem/63685637> |
| |
| Reviewed by Wenson Hsieh. |
| |
| We were causing spurious style recalcs on every main frame load. |
| |
| No new tests because there is no behavior change. |
| |
| * page/Settings.yaml: |
| |
| 2020-05-29 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: ColorMatrix should support smaller matrices and be constexpr |
| https://bugs.webkit.org/show_bug.cgi?id=212477 |
| |
| Reviewed by Simon Fraser. |
| |
| - Adds the ability to specify a ColorMatrix with any number of rows or columns, |
| useful as most of the uses ColorMatrix did not need the full 5x4. Transformation |
| act as-if the the ColorMatrix is the identify matrix for any rows or columns |
| not present. For example, when transforming a ColorComponents, which is 4x1, a |
| 3x3 ColorMatrix of the form: |
| |
| [ a, b, c ] |
| [ d, e, f ] |
| [ g, h, i ] |
| |
| will behave as-if it looks like: |
| |
| [ a, b, c, 0 ] |
| [ d, e, f, 0 ] |
| [ g, h, i, 0 ] |
| [ 0, 0, 0, 1 ] |
| |
| In practice, this means that the last component of the input vector is left |
| unmodified. |
| |
| - Adds ability to use ColorMatrix in constexpr statements, which will be useful |
| for compile time concatenation of colorspace conversion matrices in a future |
| change but is also useful for improved space efficiency of constant matrices |
| already used. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| Remove ColorMatrix.cpp |
| |
| * platform/graphics/ColorComponents.h: |
| (WebCore::ColorComponents::ColorComponents): |
| (WebCore::ColorComponents::operator+=): |
| (WebCore::ColorComponents::operator+ const): |
| (WebCore::ColorComponents::operator/ const): |
| (WebCore::ColorComponents::operator* const): |
| (WebCore::ColorComponents::abs const): |
| (WebCore::ColorComponents::get const): |
| (WebCore::perComponentMax): |
| (WebCore::perComponentMin): |
| (WebCore::operator==): |
| (WebCore::operator!=): |
| Make everything constexpr and move implementations out of the declarations for clarity. |
| |
| * platform/graphics/ColorMatrix.cpp: Removed. |
| * platform/graphics/ColorMatrix.h: |
| (WebCore::ColorMatrix::ColorMatrix): |
| (WebCore::ColorMatrix::at const): |
| (WebCore::grayscaleColorMatrix): |
| (WebCore::sepiaColorMatrix): |
| (WebCore::saturationColorMatrix): |
| (WebCore::hueRotateColorMatrix): |
| (WebCore::ColorMatrix::transformColorComponents): |
| (WebCore::ColorMatrix::transformedColorComponents): |
| Re-write as a class templatized on the number of rows and columns. Moves factory functions |
| out of the class to avoid awkwardness of having to specify a dummy size when calling them |
| (e.g. we wouldn't want you to have to write ColorMatrix<3, 3>::grayscaleMatrix(), instead |
| just grayscaleColorMatrix() is much nicer). |
| |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::xyzToLinearSRGB): |
| (WebCore::linearSRGBToXYZ): |
| (WebCore::XYZToLinearP3): |
| (WebCore::linearP3ToXYZ): |
| * platform/graphics/filters/FilterOperation.cpp: |
| (WebCore::BasicColorMatrixFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): |
| Adopt new ColorMatrix interface. |
| |
| * platform/graphics/filters/FilterOperation.h: |
| Remove unnecessary T in forward declaration. |
| |
| * platform/graphics/ColorUtilities.h: |
| (WebCore::fastMultiplyBy255): |
| (WebCore::fastDivideBy255): |
| Add some missing constexprs. |
| |
| 2020-05-29 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r262245. |
| https://bugs.webkit.org/show_bug.cgi?id=212531 |
| |
| "Caused WebCore's 'Check .xcfilelists' build phase to be ~100x |
| slower" |
| |
| Reverted changeset: |
| |
| "[Cocoa] Pass all defines from Platform.h to various scripts, |
| not just the ones from .xcconfig" |
| https://bugs.webkit.org/show_bug.cgi?id=212451 |
| https://trac.webkit.org/changeset/262245 |
| |
| 2020-05-29 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed build fix after r262299 |
| |
| We replaced ScriptExecutionContext* by Document& in WebXRSpace hierarchy, so the |
| failing ASSERT() was: |
| 1. Invalid, there is no "context" parameter but "document" |
| 2. Not needed anymore, as we're passing a reference |
| |
| * Modules/webxr/WebXRSpace.cpp: |
| (WebCore::WebXRSpace::WebXRSpace): Removed invalid ASSERT(). |
| |
| 2020-05-27 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Implement XRSession::requestReferenceSpace() |
| https://bugs.webkit.org/show_bug.cgi?id=212407 |
| |
| Reviewed by Youenn Fablet. |
| |
| This patch implements the requestReferenceSpace() method of the XRSession which is used to |
| create reference spaces. A reference space establishes a space where pose data will be defined |
| and thus is mandatory to retrieve that pose information. |
| |
| There are still some bits that have to implementated in follow up patches using platform code. |
| |
| * Modules/webxr/WebXRBoundedReferenceSpace.cpp: |
| (WebCore::WebXRBoundedReferenceSpace::create): Added. |
| (WebCore::WebXRBoundedReferenceSpace::WebXRBoundedReferenceSpace): Ditto. |
| * Modules/webxr/WebXRBoundedReferenceSpace.h: |
| * Modules/webxr/WebXRReferenceSpace.cpp: |
| (WebCore::WebXRReferenceSpace::create): Added. |
| (WebCore::WebXRReferenceSpace::WebXRReferenceSpace): Ditto. |
| (WebCore::WebXRReferenceSpace::getOffsetReferenceSpace): Use the create() method. |
| * Modules/webxr/WebXRReferenceSpace.h: |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::referenceSpaceIsSupported const): New method to check whether a reference. |
| space is supported by session and device. |
| (WebCore::WebXRSession::requestReferenceSpace): New method that creates reference spaces for pose data. |
| * Modules/webxr/WebXRSession.h: |
| * Modules/webxr/WebXRSpace.cpp: |
| (WebCore::WebXRSpace::WebXRSpace): Store a reference to the session creating the space. |
| * Modules/webxr/WebXRSpace.h: |
| |
| 2020-05-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Update debug overlays at rendering update time |
| https://bugs.webkit.org/show_bug.cgi?id=212510 |
| |
| Reviewed by Antoine Quint. |
| |
| Don't eagerly update the regions in debug overlays when things change; this triggers |
| assertions for touch event overlays. |
| |
| Instead, just mark them dirty and update the regions at "update the rendering" time. |
| |
| * page/DebugPageOverlays.cpp: |
| (WebCore::RegionOverlay::setRegionChanged): |
| (WebCore::RegionOverlay::didMoveToPage): |
| (WebCore::RegionOverlay::recomputeRegion): |
| (WebCore::DebugPageOverlays::regionChanged): |
| (WebCore::DebugPageOverlays::updateRegionIfNecessary): |
| * page/DebugPageOverlays.h: |
| (WebCore::DebugPageOverlays::doAfterUpdateRendering): |
| * page/Page.cpp: |
| (WebCore::Page::doAfterUpdateRendering): |
| |
| 2020-05-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Prepare for async scrolling in passive wheel event handler regions |
| https://bugs.webkit.org/show_bug.cgi?id=212455 |
| |
| Reviewed by Tim Horton. |
| |
| Clarify the processing for wheel events by adding OptionSet<WheelEventProcessingSteps>, |
| which will, in future, allow us to describe the processing for an event in the passive |
| event handler region which does scrolling on the scrolling thread, and is then sent |
| to the main thread for DOM event dispatch. |
| |
| Removed ScrollingEventResult, which conflated "handled" with "send to another thread". |
| The thread sending behavior is now encoded in the WheelEventProcessingSteps, and we can just |
| use a bool for handled. |
| |
| Scrolling tree and node handleWheelEvent() functions return a WheelEventHandlingResult, which |
| is a tuple of OptionSet<WheelEventProcessingSteps> and 'handled', allowing for a node with |
| background-attachment:fixed to add the "send to main thread" processing step. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::wheelEvent): |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::handleWheelEvent): |
| * page/scrolling/ScrollingCoordinatorTypes.h: |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::determineWheelEventProcessing): |
| (WebCore::ScrollingTree::handleWheelEvent): |
| (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): Deleted. |
| * page/scrolling/ScrollingTree.h: |
| (WebCore::WheelEventHandlingResult::needsMainThreadProcessing const): |
| (WebCore::WheelEventHandlingResult::handled): |
| (WebCore::WheelEventHandlingResult::unhandled): |
| (WebCore::WheelEventHandlingResult::result): |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::handleWheelEvent): |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::handleWheelEvent): |
| (WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread): |
| * page/scrolling/ThreadedScrollingTree.h: |
| * page/scrolling/mac/ScrollingCoordinatorMac.h: |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::handleWheelEvent): |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): |
| * platform/PlatformWheelEvent.cpp: |
| (WebCore::operator<<): |
| * platform/PlatformWheelEvent.h: |
| |
| 2020-05-29 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] ActiveDOMObjects must call suspendIfNeeded() upon creation |
| https://bugs.webkit.org/show_bug.cgi?id=212517 |
| |
| Reviewed by Žan Doberšek. |
| |
| We weren't calling suspendIfNeeded() upon ActiveDOMObjects creation (XRSession and XRSystem) |
| and that was triggering ASSERTION FAILED: m_suspendIfNeededWasCalled. |
| |
| No new tests required as this was already detected by existing tests. |
| |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::WebXRSession): Call suspendIfNeeded(). |
| * Modules/webxr/WebXRSystem.cpp: |
| (WebCore::WebXRSystem::WebXRSystem): Call suspendIfNeeded(). |
| |
| 2020-05-29 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] WebXRSystem::unregisterSimulatedXRDeviceForTesting() ASSERTs in m_immersiveDevices.contains(device) |
| https://bugs.webkit.org/show_bug.cgi?id=212516 |
| |
| Reviewed by Žan Doberšek. |
| |
| The ASSERT that was failing was wrong. It was assuming that every simulated device should be part of the list |
| of immersive devices. That's wrong, as devices only supporting inline sessions are not in that list. |
| |
| Apart from that, fake devices were not removed from the list of available devices in WebXRTest after |
| disconnecting them all. That could potentially cause flakiness in the tests. |
| |
| No new test required as the current tests were properly detecting the issue. |
| |
| * Modules/webxr/WebXRSystem.cpp: |
| (WebCore::WebXRSystem::registerSimulatedXRDeviceForTesting): Use XRSessionMode directly. |
| (WebCore::WebXRSystem::unregisterSimulatedXRDeviceForTesting): Fixed the ASSERT. A simulated device |
| might not be in the list of immersive devices if only supports inline sessions. |
| * testing/WebXRTest.cpp: |
| (WebCore::WebXRTest::disconnectAllDevices): Clear the list of devices after disconnecting. |
| |
| 2020-05-29 Youenn Fablet <youenn@apple.com> |
| |
| MediaPlayerPrivateMediaStreamAVFObjC should enqueue samples in a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=212073 |
| |
| Reviewed by Eric Carlson. |
| |
| Do not hop to the main thread when rendering video samples anymore. |
| Instead, we enqueue to the display layer in the background thread but still hop to the main thread for two things: |
| - Update of various states of the player |
| - keep a ref to the video sample if canvas rendering is needed. |
| |
| Most display layer operations stay in the main thread (creation, flushing...). |
| Deletion of the display layer and access from a background are covered by a lock. |
| The m_canEnqueueDisplayLayer boolean ensures we do not enqueue too early when the display layer is not yet properly initialized. |
| |
| LocalSampleBufferDisplayLayer needs to handle the fact that enqueueing might be done in a background thread. |
| Instead of introducing a lock, we introduce a work queue and we hop to this queue whenever we need to enqueue/mutate the pending samples. |
| |
| Covered by existing tests and manual testing. |
| |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: |
| (-[WebAVSampleBufferStatusChangeListener observeValueForKeyPath:ofObject:change:context:]): |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSample): |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSampleBuffer): |
| (WebCore::LocalSampleBufferDisplayLayer::requestNotificationWhenReadyForVideoData): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::videoTransformationMatrix): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::processNewVideoSampleAvailable): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::flushRenderers): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::destroyLayers): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateRenderingMode): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setBufferingPolicy): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::rootLayerBoundsDidChange): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoTransformationMatrix): Deleted. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueCorrectedVideoSample): Deleted. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayLayer): Deleted. |
| |
| 2020-05-29 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Implement script dialogs |
| https://bugs.webkit.org/show_bug.cgi?id=212318 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add more definitions to avoid ifdefs. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gtk_entry_set_text): |
| (gtk_entry_get_text): |
| (gtk_label_set_line_wrap): |
| (gtk_window_set_default): |
| (gtk_widget_add_css_class): |
| |
| 2020-05-28 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Buttons render with a corner radius of PKApplePayButtonDefaultCornerRadius even when explicitly specifying "border-radius: 0px" |
| https://bugs.webkit.org/show_bug.cgi?id=212476 |
| <rdar://problem/63401433> |
| |
| Reviewed by Antti Koivisto. |
| |
| r256648 added support for customizing the corner radius of Apple Pay buttons using the |
| border-radius CSS property. PassKit buttons have a default corner radius of 4, but |
| border-radius has an initial value of 0, so to maintain web compatibility with existing |
| buttons we only want to customize the corner radius when a border-radius value has been |
| explicitly specified (otherwise, previously rounded buttons would all become squared off due |
| to border-radius's initial value). |
| |
| r256648 checked for a non-initial border-radius by calling RenderStyle::hasBorderRadius, but |
| this check does not distinguish between an initial value and an explicit declaration of |
| "border-radius: 0px". As a result, authors are unable to create Apple Pay buttons with |
| square corners. |
| |
| This patch adds a flag to RenderStyle::NonInheritedFlags that tracks whether any |
| border-radius longhand has been explicitly set (or has explicitly inherited an explicitly set |
| value), and uses that flag to adjust the computed border radius for Apple Pay buttons. |
| |
| The addition of RenderStyle::NonInheritedFlags::hasExplicitlySetBorderRadius did not change |
| the size of RenderStyle. |
| |
| Tests: fast/css/appearance-apple-pay-button-border-radius.html |
| fast/css/getComputedStyle/computed-style-apple-pay-button.html |
| |
| * css/CSSProperties.json: |
| * rendering/RenderThemeCocoa.mm: |
| (WebCore::RenderThemeCocoa::adjustApplePayButtonStyle const): |
| (WebCore::RenderThemeCocoa::paintApplePayButton): |
| (WebCore::largestCornerRadius): Deleted. |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::RenderStyle): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::hasExplicitlySetBorderRadius const): |
| (WebCore::RenderStyle::setHasExplicitlySetBorderRadius): |
| (WebCore::RenderStyle::NonInheritedFlags::operator== const): |
| (WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom): |
| * style/StyleBuilderCustom.h: |
| (WebCore::Style::BuilderCustom::applyInheritBorderBottomLeftRadius): |
| (WebCore::Style::BuilderCustom::applyValueBorderBottomLeftRadius): |
| (WebCore::Style::BuilderCustom::applyInheritBorderBottomRightRadius): |
| (WebCore::Style::BuilderCustom::applyValueBorderBottomRightRadius): |
| (WebCore::Style::BuilderCustom::applyInheritBorderTopLeftRadius): |
| (WebCore::Style::BuilderCustom::applyValueBorderTopLeftRadius): |
| (WebCore::Style::BuilderCustom::applyInheritBorderTopRightRadius): |
| (WebCore::Style::BuilderCustom::applyValueBorderTopRightRadius): |
| |
| 2020-05-28 Andy Estes <aestes@apple.com> |
| |
| Shrink StyleRareNonInheritedData by 8 bytes (on 64-bit platforms) |
| https://bugs.webkit.org/show_bug.cgi?id=212484 |
| |
| Reviewed by Tim Horton. |
| |
| There were 4 bytes of padding after shapeImageThreshold, enough to fit order and shrink the |
| overall size of StyleRareNonInheritedData by 8 bytes on 64-bit platforms. |
| |
| Before: |
| Total byte size: 480 |
| Total pad bytes: 50 |
| Padding percentage: 10.42 % |
| |
| After: |
| Total byte size: 472 |
| Total pad bytes: 42 |
| Padding percentage: 8.90 % |
| |
| * rendering/style/StyleRareNonInheritedData.cpp: |
| (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): |
| (WebCore::StyleRareNonInheritedData::operator== const): |
| * rendering/style/StyleRareNonInheritedData.h: |
| |
| 2020-05-28 Megan Gardner <megan_gardner@apple.com> |
| |
| Responding to post commit review comments for https://bugs.webkit.org/show_bug.cgi?id=212060 |
| |
| * editing/InsertIntoTextNodeCommand.cpp: |
| (WebCore::InsertIntoTextNodeCommand::doApply): |
| |
| 2020-05-28 Simon Fraser <simon.fraser@apple.com> |
| |
| Simplify EventDispatcher wheel event dispatch |
| https://bugs.webkit.org/show_bug.cgi?id=212490 |
| |
| Reviewed by Tim Horton. |
| |
| The various cross-thread bounces and completion lambdas in EventDispatcher::wheelEvent() |
| and ScrollingTree code made the logic very hard to follow. |
| |
| Moving the ScrollingThread::dispatch() into EventHandler code simplifies things a little, |
| and allows for removal of the hokey "try to handle" ScrollingTree function, as well |
| as the clunky completion function. |
| |
| Now, EventHandler call shouldHandleWheelEventSynchronously(), then does the |
| ScrollingThread::dispatch() which allows the lambda to easily call back into |
| EventHandler for the main thread dispatch. |
| |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::tryToHandleWheelEvent): Deleted. |
| * page/scrolling/ThreadedScrollingTree.h: |
| |
| 2020-05-28 Oriol Brufau <obrufau@igalia.com> |
| |
| [css-grid] Fix referencing grid line names with auto repeat() |
| https://bugs.webkit.org/show_bug.cgi?id=209572 |
| |
| Reviewed by Darin Adler. |
| |
| This patch fixes multiple problems when referencing named grid lines with the presence of |
| the auto repeat() syntax: |
| |
| - If the 1st track was defined with auto repeat(), then the code used to assume that the |
| referenced line appeared after the repeated tracks. But it may actually precede them. |
| |
| - If the referenced line appeared both inside and outside the auto repeat(), then it |
| could resolve to the outside raw index, without expanding the auto repeat(). |
| |
| - The logic for placing a placement property set to both an integer and an identifier |
| was wrong with auto repeat(). |
| This patch fixes it by using the same proper logic that was already implemented in |
| OrderedNamedLinesCollectorInGridLayout::collectLineNamesForIndex |
| |
| - The indices of both implicit grid lines defined with grid-template-areas and explicit |
| ones defined with grid-template-rows/columns used to be stored together in |
| NamedGridColumnLines and NamedGridRowLines. This was problematic because the former |
| indices already refer to the final explicit grid so they don't have to be increased when |
| expanding an auto repeat(), but the latter ones should. |
| Therefore, this patch stores the indices in separate fields and uses the correct logic |
| for each one. This also fixes 'grid-template-areas: inherit'. |
| |
| This patch is a port of these Chromium patches: |
| - https://crrev.com/744426 |
| - https://crrev.com/745925 |
| - https://crrev.com/747631 |
| - https://crrev.com/747669 |
| - https://crrev.com/771984 |
| |
| Tests: imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-002.html |
| imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-004.html |
| imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-005.html |
| imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-008.html |
| imported/w3c/web-platform-tests/css/css-grid/placement/grid-placement-using-named-grid-lines-009.html |
| |
| * rendering/style/GridPositionsResolver.cpp: |
| (WebCore::NamedLineCollection::NamedLineCollection): |
| (WebCore::NamedLineCollection::hasExplicitNamedLines const): |
| (WebCore::NamedLineCollection::hasNamedLines const): |
| (WebCore::NamedLineCollection::contains const): |
| (WebCore::NamedLineCollection::firstExplicitPosition const): |
| (WebCore::NamedLineCollection::firstPosition const): |
| * rendering/style/GridPositionsResolver.h: |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::implicitNamedGridColumnLines const): |
| (WebCore::RenderStyle::implicitNamedGridRowLines const): |
| (WebCore::RenderStyle::setImplicitNamedGridColumnLines): |
| (WebCore::RenderStyle::setImplicitNamedGridRowLines): |
| * rendering/style/StyleGridData.cpp: |
| (WebCore::StyleGridData::StyleGridData): |
| * rendering/style/StyleGridData.h: |
| (WebCore::StyleGridData::operator== const): |
| * style/StyleBuilderCustom.h: |
| (WebCore::Style::BuilderCustom::applyInitialGridTemplateAreas): |
| (WebCore::Style::BuilderCustom::applyInheritGridTemplateAreas): |
| (WebCore::Style::BuilderCustom::applyValueGridTemplateAreas): |
| |
| 2020-05-28 Andres Gonzalez <andresg_22@apple.com> |
| |
| [ macOS Debug ] accessibility/roles-exposed.html is a flaky timeout |
| https://bugs.webkit.org/show_bug.cgi?id=212478 |
| <rdar://problem/63411656> |
| |
| Reviewed by Chris Fleizach. |
| |
| Logging the backingObject in every call to accessibilityAttributeValue |
| seems to be causing this long test to take too long and timeout in slow |
| systems. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| |
| 2020-05-27 Keith Miller <keith_miller@apple.com> |
| |
| for-of should check the iterable is a JSArray for FastArray in DFG iterator_open |
| https://bugs.webkit.org/show_bug.cgi?id=212383 |
| |
| Reviewed by Saam Barati. |
| |
| Update various InheritsTraits specializations to contain a typeRange member. |
| Also, change the inherits function to use inheritsJSTypeImpl like the JSC |
| variants. |
| |
| * bindings/js/JSDocumentCustom.h: |
| (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSDocument>::inherits): |
| * bindings/js/JSElementCustom.h: |
| (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSElement>::inherits): |
| * bindings/js/JSEventCustom.h: |
| (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSEvent>::inherits): |
| * bindings/js/JSNodeCustom.h: |
| (JSC::JSCastingHelpers::InheritsTraits<WebCore::JSNode>::inherits): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| |
| 2020-05-27 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Pass all defines from Platform.h to various scripts, not just the ones from .xcconfig |
| https://bugs.webkit.org/show_bug.cgi?id=212451 |
| |
| Reviewed by Sam Weinig. |
| |
| * DerivedSources.make: Run the preprocessor on Platform.h and parse the output into |
| FEATURE_AND_PLATFORM_DEFINES. Use that and FEATURE_AND_PLATFORM_DEFINE_DEPENDENCIES |
| whenever we need a list of defines. Also took out some Windows-specific stuff since |
| this is now only used on Mac platforms. |
| |
| 2020-05-27 Simon Fraser <simon.fraser@apple.com> |
| |
| ScrollingTreeMac::eventListenerRegionTypesForPoint() needs to convert the point to local coordinates |
| https://bugs.webkit.org/show_bug.cgi?id=212440 |
| |
| Reviewed by Tim Horton. |
| |
| ScrollingTreeMac::eventListenerRegionTypesForPoint() needs to convert the point to local coordinates |
| before consulting the event region. |
| |
| Also made EventListenerRegionType loggabale. |
| |
| Will be tested by wheel event tests once we switch to using these kinds of regions. |
| |
| * page/scrolling/mac/ScrollingTreeMac.mm: |
| (collectDescendantLayersAtPoint): |
| (ScrollingTreeMac::scrollingNodeForPoint): |
| (ScrollingTreeMac::eventListenerRegionTypesForPoint const): |
| * rendering/style/RenderStyleConstants.cpp: |
| (WebCore::operator<<): |
| * rendering/style/RenderStyleConstants.h: |
| |
| 2020-05-28 Youenn Fablet <youenn@apple.com> |
| |
| RealtimeIncomingVideoSourceCocoa::OnFrame should use video frame timestamp |
| https://bugs.webkit.org/show_bug.cgi?id=212402 |
| |
| Reviewed by Eric Carlson. |
| |
| Use timestamp provided from the libwebrtc backend instread of marking the frames as display immediately. |
| Update LocalSampleBufferDisplayLayer to mark the frame as display immediately if their presentation time is in the past since we guarantee the frames are in order. |
| |
| Remove the offset correction in MediaPlayerPrivateMediaStreamAVFObjC. |
| This does not work well when the display layer is in GPU process and it is simpler to use the system clock which is what AVSampleBufferDisplayLayser is using if controlTimebase is not set. |
| |
| Manually tested. |
| |
| * platform/graphics/avfoundation/SampleBufferDisplayLayer.h: |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSample): |
| (WebCore::LocalSampleBufferDisplayLayer::removeOldSamplesFromPendingQueue): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerStatusDidChange): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::applicationDidBecomeActive): |
| * platform/mediastream/VideoTrackPrivateMediaStream.h: |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: |
| (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame): |
| |
| 2020-05-28 Antti Koivisto <antti@apple.com> |
| |
| Incorrect clipping of absolute and fixed elements inside stacking-context composited overflow:hidden |
| https://bugs.webkit.org/show_bug.cgi?id=212419 |
| <rdar://problem/55856170> |
| |
| Reviewed by Simon Fraser. |
| |
| We incorrectly clip descendants that are not in containing block chain. |
| There is already code to do the correct clipping, it just needs be enabled in this case. |
| |
| Tests: compositing/overflow/non-contained-descendant-clipping-absolute.html |
| compositing/overflow/non-contained-descendant-clipping-fixed.html |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::RenderLayer): |
| * rendering/RenderLayer.h: |
| |
| Add hasCompositedNonContainedDescendants bit. |
| |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::CompositingState::stateForPaintOrderChildren const): |
| (WebCore::RenderLayerCompositor::CompositingState::updateWithDescendantStateAndLayer): |
| |
| Check if the parent layer is for a containing block of this layer. |
| |
| (WebCore::RenderLayerCompositor::computeCompositingRequirements): |
| |
| Update the bit. |
| |
| (WebCore::RenderLayerCompositor::traverseUnchangedSubtree): |
| (WebCore::RenderLayerCompositor::clipsCompositingDescendants): |
| |
| Pick the clipping path where descendants are not clipped. |
| |
| 2020-05-27 Noam Rosenthal <noam@webkit.org> |
| |
| Implement AccessKeyLabel attribute. |
| https://bugs.webkit.org/show_bug.cgi?id=72715 |
| |
| Spec: https://html.spec.whatwg.org/multipage/interaction.html#dom-accesskeylabel |
| |
| As per spec, return the modifiers+accessKey when requesting the element accessKeyLabel. |
| |
| Equivalent to the existing Firefox implementation and (pending) Chrome implementation. |
| |
| Alt is the hardcoded modifier for any non-cocoa platform, so hardcode it also for the label. |
| Use modifier text for Mac/iOS as it can change (e.g. for voice-over). |
| |
| Reviewed by Darin Adler. |
| |
| Test: fast/forms/access-key-label.html |
| |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::accessKeyLabel const): |
| * html/HTMLElement.h: |
| * html/HTMLElement.idl: |
| |
| 2020-05-27 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Refactor FloatComponents and ColorComponents into a single templatized ColorComponents class |
| https://bugs.webkit.org/show_bug.cgi?id=212446 |
| |
| Reviewed by Simon Fraser. |
| |
| Merge FloatComponents and ColorComponents into ColorComponents<T> and move them to their own |
| header. This avoids duplicate code and paves the way for further generalization down the line. |
| |
| Also moves some utility functions to ColorUtilities.h from SimpleColor.h as they make more sense |
| in the former. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| Add ColorComponents.h |
| |
| * platform/graphics/ColorComponents.h: Copied from Source/WebCore/platform/graphics/ColorUtilities.h. |
| Moved ColorComponents to its own header and templatized it to allow it to serve the |
| needs of both the old ColorComponents and old FloatComponents classes. |
| |
| * platform/graphics/ColorUtilities.cpp: |
| * platform/graphics/ColorUtilities.h: |
| Removed ColorComponents/FloatComponents and update existing usages to their new names. |
| Also moved roundAndClampColorChannel, fastMultiplyBy255, fastDivideBy255 |
| and colorFloatToSimpleColorByte here from SimpleColor to make it clear where |
| general helper functions can go. |
| |
| * platform/graphics/Color.h: |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::colorSpaceAndComponents const): |
| (WebCore::Color::toSRGBAComponentsLossy const): |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::ExtendedColor::channels const): |
| Update for rename of FloatComponents to ColorComponents<float>. |
| |
| * platform/graphics/SimpleColor.cpp: |
| (WebCore::makeSimpleColorFromHSLA): |
| Use structured bindings and simplify code. |
| |
| * platform/graphics/SimpleColor.h: |
| (WebCore::roundAndClampColorChannel): Deleted. |
| (WebCore::fastMultiplyBy255): Deleted. |
| (WebCore::fastDivideBy255): Deleted. |
| (WebCore::colorFloatToSimpleColorByte): Deleted. |
| As noted above, moved roundAndClampColorChannel, fastMultiplyBy255, fastDivideBy255 |
| and colorFloatToSimpleColorByte to ColorUtilities.h |
| |
| * platform/graphics/filters/FEColorMatrix.cpp: |
| Update for rename of FloatComponents to ColorComponents<float>. |
| |
| * platform/graphics/filters/FEDisplacementMap.cpp: |
| (WebCore::byteOffsetOfPixel): |
| Moved byteOffsetOfPixel here from ColorUtilities. This file is the only user |
| and it wasn't general in a way that was clear for other users. |
| |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::drawLighting): |
| Update for rename of FloatComponents to ColorComponents<float>. |
| |
| * platform/graphics/filters/FEMorphology.cpp: |
| (WebCore::makeColorComponentsfromPixelValue): |
| Added. Used to be ColorComponents::fromRGBA(), but was only used here |
| and didn't seem generally useful. |
| |
| (WebCore::makePixelValueFromColorComponents): |
| Added. Used to be ColorComponents::toRGBA(), but was only used here |
| and didn't seem generally useful. |
| |
| (WebCore::minOrMax): |
| (WebCore::columnExtremum): |
| (WebCore::kernelExtremum): |
| (WebCore::FEMorphology::platformApplyGeneric): |
| Update for rename of FloatComponents to ColorComponents<float> and ColorComponents |
| to ColorComponents<uint8_t>. |
| |
| * platform/graphics/filters/FETurbulence.cpp: |
| (WebCore::FETurbulence::noise2D const): |
| (WebCore::toIntBasedColorComponents): |
| (WebCore::FETurbulence::calculateTurbulenceValueForPoint const): |
| (WebCore::FETurbulence::fillRegion const): |
| * platform/graphics/filters/FETurbulence.h: |
| Update for rename of FloatComponents to ColorComponents<float> and ColorComponents |
| to ColorComponents<uint8_t>. Also renames toColorComponents to toIntBasedColorComponents |
| as the former was no longer specific enough. Updated to use std::clamp. |
| |
| * platform/graphics/filters/FilterOperation.cpp: |
| (WebCore::BasicColorMatrixFilterOperation::transformColor const): |
| (WebCore::BasicComponentTransferFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): |
| * platform/graphics/filters/FilterOperation.h: |
| (WebCore::FilterOperation::transformColor const): |
| (WebCore::FilterOperation::inverseTransformColor const): |
| * platform/graphics/filters/FilterOperations.cpp: |
| (WebCore::FilterOperations::transformColor const): |
| (WebCore::FilterOperations::inverseTransformColor const): |
| Update for rename of FloatComponents to ColorComponents<float>. |
| |
| 2020-05-27 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r260023): ITP sparse plist decoding. |
| <https://bugs.webkit.org/show_bug.cgi?id=212424> |
| <rdar://problem/63683055> |
| |
| Reviewed by John Wilander. |
| |
| Reverted changeset: |
| |
| "KeyedDecoder functions in ResourceLoadStatistics.{cpp,h} should return bool and use WARN_UNUSED_RETURN" |
| https://bugs.webkit.org/show_bug.cgi?id=210414 |
| https://trac.webkit.org/changeset/260023 |
| |
| The revert did not compile due to changes in the KeyedDecoder |
| class that require checking the return value of its methods, so |
| additional changes were made below. |
| |
| * loader/ResourceLoadStatistics.cpp: |
| (WebCore::decodeHashCountedSet): |
| (WebCore::decodeHashSet): |
| - Use IGNORE_WARNINGS_BEGIN("unused-result")/IGNORE_WARNINGS_END |
| to suppress warning about ignoring the return value from |
| KeyeDecoder::decodeObjects() since decoding these objects is |
| optional. |
| (WebCore::decodeOptionSet): |
| - Check return value of KeyedDecoder::decodeUInt64() before |
| setting `optionSet` parameter. |
| |
| 2020-05-27 Andres Gonzalez <andresg_22@apple.com> |
| |
| Empty alt attribute does not ignore the image for accessibility clients in Safari. |
| https://bugs.webkit.org/show_bug.cgi?id=212432 |
| |
| Reviewed by Chris Fleizach. |
| |
| Test: accessibility/img-alt-attribute-unassigned-empty.html |
| |
| - AccessibilityRenderObject::computeAccessibilityIsIgnored was handling |
| the case of images too late, after checking for ariaRoleAttribute(). So |
| if an image had a role attribute, it was exposed regardless whether its |
| alt attribute was an empty string. This change moves the handling of |
| images above the check for ariaroleAttribute and hence honors the empty |
| alt attribute rule. |
| - Also images that have an aria-label attribute are now exposed. |
| - Added logging of AccessibilityObjectInclusion. |
| - Changed signature of log(RefPtr<AXCoreObject>) as pointed out by Darin Adler in a separate review. |
| |
| * accessibility/AXLogger.cpp: |
| (WebCore::AXLogger::log): |
| (WebCore::operator<<): |
| * accessibility/AXLogger.h: |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::determineAccessibilityRole): |
| (WebCore::AccessibilityNodeObject::isImage const): Moved to base class. |
| * accessibility/AccessibilityNodeObject.h: |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityObjectInterface.h: |
| (WebCore::AXCoreObject::isImage const): |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::objectInclusionFromAltText): |
| (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const): |
| (WebCore::AccessibilityRenderObject::determineAccessibilityRole): |
| (WebCore::AccessibilityRenderObject::updateRoleAfterChildrenCreation): |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-05-27 Chris Dumez <cdumez@apple.com> |
| |
| pageshow only fires the first time the back button is pressed |
| https://bugs.webkit.org/show_bug.cgi?id=156356 |
| <rdar://problem/29256489> |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| When FrameLoader::commitProvisionalLoad() would restore a page from the back/forward |
| cache, it would only call FrameLoader::checkCompleted() in the main frame and fail |
| to do so in subframes. Calling checkCompleted() is important, not only because it |
| sets m_isComplete to true but also because it calls checkCallImplicitClose(), which |
| resets m_didCallImplicitClose to true and m_wasUnloadEventEmitted to false. |
| |
| Because checkCompleted() was not called, FrameLoader::dispatchUnloadEvents() would then |
| fail to fire the pagehide event because the `m_didCallImplicitClose && !m_wasUnloadEventEmitted` |
| was not met. Also, even though checkCompleted() was called for the main frame, if there |
| are subframes, it would just return early because allChildrenAreComplete() returned false. |
| Later on, when trying to fire the pageshow event, it would fail to because we have logic |
| in DOMWindow::dispatchEvent() to avoid firing a pageshow event if we did not previously |
| send a pagehide event. |
| |
| To address the issue, I now call checkCompleted() in FrameLoader::open() for subframes, as |
| this gets called for every frame during restoration from the back/forward cache. For the main |
| frame, we keep calling checkCompleted(), after we've called sendRemainingDelegateMessages(). |
| |
| Test: fast/history/multiple-back-forward-navigations.html |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::open): |
| |
| 2020-05-27 Sam Weinig <weinig@apple.com> |
| |
| Extended Color: Move ColorMatrix to its own files |
| https://bugs.webkit.org/show_bug.cgi?id=212431 |
| |
| Reviewed by Dean Jackson. |
| |
| Move ColorMatrix to its own files from ColorUtilities.h/cpp |
| |
| * Headers.cmake: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/graphics/ColorMatrix.cpp: Copied from Source/WebCore/platform/graphics/ColorUtilities.cpp. |
| * platform/graphics/ColorMatrix.h: Copied from Source/WebCore/platform/graphics/ColorUtilities.h. |
| * platform/graphics/ColorUtilities.cpp: |
| * platform/graphics/ColorUtilities.h: |
| * platform/graphics/filters/FilterOperation.cpp: |
| |
| 2020-05-27 David Kilzer <ddkilzer@apple.com> |
| |
| Add OptionSetTraits<> and use with WebCore::DragDestinationAction |
| <https://webkit.org/b/212397> |
| |
| Reviewed by Alex Christensen. |
| |
| * page/DragActions.h: |
| (WTF::OptionSetTraits<WebCore::DragDestinationAction>): |
| - Add for use with OptionSet<>. |
| |
| 2020-05-27 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Clipboard API] Support reading "image/png" on ClipboardItem |
| https://bugs.webkit.org/show_bug.cgi?id=212339 |
| <rdar://problem/63588957> |
| |
| Reviewed by Tim Horton. |
| |
| Adds support for reading "image/png" data via ClipboardItem.getType(). See below for more details. |
| |
| Tests: ClipboardTests.ConvertTIFFToPNGWhenPasting |
| editing/async-clipboard/clipboard-read-write-images.html |
| |
| * Modules/async-clipboard/Clipboard.cpp: |
| (WebCore::Clipboard::getType): |
| (WebCore::Clipboard::updateSessionValidity): |
| |
| Factor out logic for invalidating the `Clipboard`'s active `Pasteboard` object into a helper method. This is |
| invoked after reading data from the clipboard, and verifies that the changeCount of the pasteboard is still the |
| same as it was upon initially reading the contents of the clipboard. If the clipboard contents changed, we |
| invalidate the session, and `Clipboard` is subsequently denied pasteboard access (until the next time the user |
| explicitly grants programmatic pasteboard access). |
| |
| Note that this step is here for correctness rather than security. While it is true that a compromised web |
| process could fake the changeCount at any given moment, other fairly recent changes around WebPasteboardProxy in |
| the UI process makes it impossible to take advantage of this fact to arbitrarily read content from the system |
| pasteboard. Instead of simply reading the empty string, this invalidation ensures that we actually reject the |
| promise returned by the async clipboard API. |
| |
| * Modules/async-clipboard/Clipboard.h: |
| * Modules/async-clipboard/ClipboardImageReader.cpp: Added. |
| |
| Add a PasteboardFileReader subclass that is responsible for sanitizing image data from the pasteboard into |
| data that may be exposed to the page via clipboard API. On both macOS and iOS, this ensures that potentially |
| sensitive EXIF data is stripped via conversion to the platform image type and back. On macOS, this additionally |
| allows us to handle transcoding TIFF data on the pasteboard to PNG (this is covered by the new API test). |
| |
| (WebCore::ClipboardImageReader::readBuffer): |
| |
| Add a stub implementation for non-Cocoa platforms for now, which don't implement this part of the API. |
| |
| (WebCore::ClipboardImageReader::shouldReadBuffer const): |
| |
| Add a new hook to skip over certain types when reading pasteboard data into Files. In particular, |
| `ClipboardImageReader` skips over any MIME type that does not match the MIME type specified (for now, this is |
| limited to "image/png", but may be extended to include more image types in the future after we implement more |
| transcoding logic). |
| |
| * Modules/async-clipboard/ClipboardImageReader.h: Added. |
| (WebCore::ClipboardImageReader::ClipboardImageReader): |
| (WebCore::ClipboardImageReader::takeResult): |
| * Modules/async-clipboard/ios/ClipboardImageReaderIOS.mm: Added. |
| (WebCore::ClipboardImageReader::readBuffer): |
| |
| Add iOS-specific `(PNG) => PNG` transcoding logic. |
| |
| * Modules/async-clipboard/mac/ClipboardImageReaderMac.mm: Added. |
| (WebCore::ClipboardImageReader::readBuffer): |
| |
| Add macOS-specific `(PNG, TIFF) => PNG` transcoding logic. |
| |
| * Sources.txt: |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/Pasteboard.h: |
| (WebCore::PasteboardFileReader::shouldReadBuffer const): |
| * platform/cocoa/PasteboardCocoa.mm: |
| (WebCore::Pasteboard::read): |
| |
| Add support for targeting a given pasteboard item index when reading files on Cocoa platforms. |
| |
| * platform/gtk/PasteboardGtk.cpp: |
| (WebCore::Pasteboard::read): |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::safeTypeForDOMToReadAndWriteForPlatformType): |
| (WebCore::webSafeTypes): |
| (WebCore::PlatformPasteboard::informationForItemAtIndex): |
| |
| Expose "image/png" as one of the readable pasteboard types on iOS when using the async clipboard API. For some |
| reason, this adjustment was made on macOS, but wasn't done on iOS, which led to a missing "image/png" type when |
| asking for `ClipboardItem.types`. |
| |
| (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const): |
| |
| Add support for writing "image/png "data to the system pasteboard (note that this data has been sanitized |
| already, as it has been processed through `ClipboardItemTypeLoader::sanitizeDataIfNeeded()`). We simply needed |
| to use `forEachPlatformStringOrBuffer` instead of just `forEachPlatformString` when writing the custom |
| pasteboard data. |
| |
| (WebCore::createItemProviderRegistrationList): |
| * platform/libwpe/PasteboardLibWPE.cpp: |
| (WebCore::Pasteboard::read): |
| * platform/win/PasteboardWin.cpp: |
| (WebCore::Pasteboard::read): |
| |
| 2020-05-27 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| REGRESSION (r254541): Valid mime types can only be added to the HashSet of the supported types for encoding |
| https://bugs.webkit.org/show_bug.cgi?id=212427 |
| |
| Reviewed by Darin Adler. |
| |
| Add back a check for the mime type validity which was removed in r254541. |
| |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::MIMETypeRegistry::createMIMETypeRegistryThreadGlobalData): |
| |
| 2020-05-27 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: replace `featureGuard` and `availability` with a combined `condition` that accepts any macro |
| https://bugs.webkit.org/show_bug.cgi?id=210014 |
| |
| Reviewed by Brian Burg. |
| |
| Previously, the generated InspectorBackendCommands.js would include code for things that the |
| backend doesn't actually support. By using actual macros and preprocessing that file, we can |
| ensure that the frontend doesn't incorrectly think that something is supported by the page |
| being inspected: |
| - the `Canvas` commands and events related to shader programs/pipelines should only exist |
| when the corresponding context type exists, namely `ENABLE(WEBGL)` and `ENABLE(WEBGPU)`. |
| - iOS doesn't support showing rulers, so create a variant of `DOM.setInspectModeEnabled` |
| that only exists for `PLATFORM(IOS_FAMILY)` that doesn't have the `showRulers` optional |
| parameter, as well as removing `Page.setShowRulers` entirely. |
| - setting the forced appearance should only be possible if dark mode is supported. |
| - web archives only exist if CF is used. |
| |
| * inspector/InspectorInstrumentation.h: |
| * inspector/InspectorInstrumentation.cpp: |
| * inspector/agents/InspectorCanvasAgent.h: |
| * inspector/agents/InspectorCanvasAgent.cpp: |
| (WebCore::InspectorCanvasAgent::InspectorCanvasAgent): |
| (WebCore::InspectorCanvasAgent::enable): |
| (WebCore::InspectorCanvasAgent::startRecording): |
| (WebCore::InspectorCanvasAgent::reset): |
| (WebCore::InspectorCanvasAgent::unbindCanvas): |
| * inspector/InspectorShaderProgram.h: |
| * inspector/InspectorShaderProgram.cpp: |
| (WebCore::InspectorShaderProgram::requestShaderSource): |
| (WebCore::InspectorShaderProgram::updateShader): |
| * inspector/agents/InspectorDOMAgent.h: |
| * inspector/agents/InspectorDOMAgent.cpp: |
| (WebCore::InspectorDOMAgent::setInspectModeEnabled): |
| * inspector/agents/InspectorPageAgent.h: |
| * inspector/agents/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::enable): |
| (WebCore::InspectorPageAgent::disable): |
| (WebCore::InspectorPageAgent::setForcedAppearance): |
| (WebCore::InspectorPageAgent::archive): |
| |
| * Configurations/FeatureDefines.xcconfig: |
| Add `ENABLE_WEB_ARCHIVE` since it's always enabled in wtf/PlatformEnableCocoa.h. |
| |
| * inspector/InspectorFrontendHost.idl: |
| Drive-by: replace the `#if` with the IDL `[Conditional=]`. |
| |
| 2020-05-27 Miguel Gomez <magomez@igalia.com> |
| |
| [WPE] REGRESSION(r253675) Crash when using threaded rendering |
| https://bugs.webkit.org/show_bug.cgi?id=212404 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Check whether the GraphicsContext has a PlatformGraphicsContext before trying to paint with |
| it. If there's no PlatformGraphicsContext, paint using the GraphicsContext methods instead. |
| |
| * platform/graphics/cairo/ImageBufferCairoBackend.cpp: |
| (WebCore::ImageBufferCairoBackend::draw): |
| (WebCore::ImageBufferCairoBackend::drawPattern): |
| |
| 2020-05-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix build warning with GTK4 |
| |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::widgetRootCoords): |
| |
| 2020-05-27 David Kilzer <ddkilzer@apple.com> |
| |
| Use OptionSet<DragDestinationAction> for mask values |
| <https://webkit.org/b/212115> |
| <rdar://problem/63423380> |
| |
| Reviewed by Alex Christensen. |
| |
| DragDestinationAction is used as both individual values and as a |
| bit mask. This changes bit mask uses to OptionSet<> and renames |
| variables to denote masks. |
| |
| * page/DragActions.h: |
| (WebCore::DragDestinationAction): |
| - Convert to enum class and remove *None and *Any values. |
| (WebCore::DragDestinationActionAny): |
| - Add helper function to return OptionSet<DragDestinationAction> |
| with all values set. |
| * page/DragController.cpp: |
| (WebCore::DragController::performDragOperation): |
| (WebCore::DragController::dragEnteredOrUpdated): |
| (WebCore::DragController::tryDocumentDrag): |
| (WebCore::DragController::concludeEditDrag): |
| * page/DragController.h: |
| (WebCore::DragController::dragDestinationAction const): Rename. |
| (WebCore::DragController::dragDestinationActionMask const): |
| - Rename dragDestinationAction() to dragDestinationActionMask(). |
| * platform/DragData.cpp: |
| (WebCore::DragData::DragData): |
| * platform/DragData.h: |
| (WebCore::DragData::DragData): |
| - Use DragDestinationActionAny() in place of removed |
| DragDestinationActionAny. |
| (WebCore::DragData::dragDestinationAction const): Rename. |
| (WebCore::DragData::dragDestinationActionMask const): |
| - Rename dragDestinationAction() to dragDestinationActionMask(). |
| (WebCore::DragData::operator =): |
| * platform/cocoa/DragDataCocoa.mm: |
| (WebCore::DragData::DragData): |
| |
| 2020-05-27 Youenn Fablet <youenn@apple.com> |
| |
| Video freezes when attaching a local MediaStream to multiple elements |
| https://bugs.webkit.org/show_bug.cgi?id=194802 |
| <rdar://problem/63613107> |
| |
| Reviewed by Eric Carlson. |
| |
| AVSampleBufferDisplayLayer sometimes does not update the rendering when the same local source is rendered several times. |
| To workaround this, we set kCMSampleAttachmentKey_DisplayImmediately to true, which fixes the issue as per my testing. |
| We clone the sample buffer before setting this property as it might not be thread safe to modify the attachments of a sample |
| that might also be encoded. |
| We implement this at LocalSampleBufferDisplayLayer level and enable this for local capture sources only. |
| |
| Manually tested. |
| |
| * platform/graphics/avfoundation/SampleBufferDisplayLayer.h: |
| (WebCore::SampleBufferDisplayLayer::setRenderPolicy): |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.h: |
| (WebCore::LocalSampleBufferDisplayLayer::setRenderPolicy): |
| * platform/graphics/avfoundation/objc/LocalSampleBufferDisplayLayer.mm: |
| (WebCore::LocalSampleBufferDisplayLayer::enqueueSample): |
| (WebCore::LocalSampleBufferDisplayLayer::removeOldSamplesFromPendingQueue): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): |
| * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: |
| (WebCore::setSampleBufferAsDisplayImmediately): |
| (WebCore::MediaSampleAVFObjC::setAsDisplayImmediately): |
| (WebCore::MediaSampleAVFObjC::cloneSampleBuffer): |
| |
| 2020-05-19 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Implement XRSession::requestAnimationFrame() |
| https://bugs.webkit.org/show_bug.cgi?id=212099 |
| |
| Reviewed by Youenn Fablet. |
| |
| The WebXR spec defines a requestAnimationFrame() mechanism to provide information about XR tracking devices |
| using callbacks. It's pretty similar to the requestAnimationFrame() exposed by Window but only used |
| to update WebXR content. We're adding a basic implementation of this mechanism as long as cancellation |
| support. It requires some platform code that will be added in follow up patches. That platform code will |
| provide information like devices' refresh rates, pose (position & orientation), display resolution, etc... |
| |
| This patch also replaces the type of the callback id from int to unsigned int as per the following change |
| in specs https://github.com/immersive-web/webxr/pull/1062. |
| |
| Apart from that we're adding a missing adoptRef() in the testing code that was causing assertions in some |
| of the tests that are being unskipped as part of this change. |
| |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::WebXRSession): |
| (WebCore::WebXRSession::animationTimerFired): Added. |
| (WebCore::WebXRSession::scheduleAnimation): Ditto. |
| (WebCore::WebXRSession::requestAnimationFrame): Ditto. |
| (WebCore::WebXRSession::cancelAnimationFrame): |
| * Modules/webxr/WebXRSession.h: |
| * Modules/webxr/XRFrameRequestCallback.h: |
| (WebCore::XRFrameRequestCallback::callbackId): |
| (WebCore::XRFrameRequestCallback::setCallbackId): |
| (WebCore::XRFrameRequestCallback::cancel): |
| (WebCore::XRFrameRequestCallback::isCancelled const): |
| * testing/WebFakeXRDevice.cpp: |
| (WebCore::WebFakeXRDevice::simulateInputSourceConnection): |
| * testing/WebFakeXRDevice.h: |
| * testing/WebFakeXRInputController.h: |
| |
| 2020-05-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make PointerLock work |
| https://bugs.webkit.org/show_bug.cgi?id=212314 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::widgetDevicePosition): Helper function to avoid #ifdefs due to GTK version differences. |
| * platform/gtk/GtkUtilities.h: |
| |
| 2020-05-27 Peng Liu <peng.liu6@apple.com> |
| |
| VideoFullscreenInterfaceAVKit is leaking when a video element enters and exits fullscreen/picture-in-picture |
| https://bugs.webkit.org/show_bug.cgi?id=212293 |
| |
| Reviewed by Youenn Fablet. |
| |
| WebAVPlayerViewControllerDelegate is created and retained by VideoFullscreenInterfaceAVKit, |
| but it has a RefPtr to VideoFullscreenInterfaceAVKit. This leads to a memory leak |
| when a video element enters and exit fullscreen or Picture-in-Picture. This patch |
| replaces the RefPtr with a WeakPtr to fix the leak. |
| |
| With this patch, we config playerController in VideoFullscreenInterfaceAVKit::setupFullscreen() |
| and VideoFullscreenInterfaceAVKit::cleanupFullscreen(), so that we can avoid relying on |
| VideoFullscreenManagerProxy::setHasVideo() and VideoFullscreenManagerProxy::setVideoDimensions(). |
| Those two functions are driven by IPC messages from the Web process, which may come before |
| VideoFullscreenInterfaceAVKit is constructed or after VideoFullscreenInterfaceAVKit |
| is destroyed. |
| |
| Manually tested. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.h: |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (-[WebAVPlayerViewControllerDelegate setFullscreenInterface:]): |
| (VideoFullscreenInterfaceAVKit::setupFullscreen): |
| (VideoFullscreenInterfaceAVKit::cleanupFullscreen): |
| |
| 2020-05-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WTR] EventSender: stop using GdkEvent API in preparation for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=212298 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add helpers to GtkUtilities to avoid #ifdefs due to GTK version differences. |
| |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::widgetRootCoords): |
| (WebCore::widgetKeyvalToKeycode): |
| * platform/gtk/GtkUtilities.h: |
| |
| 2020-05-26 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| SMILTimeContainer must protect its m_scheduledAnimations while it does updateAnimations() |
| https://bugs.webkit.org/show_bug.cgi?id=212192 |
| <rdar://problem/56717734> |
| |
| Reviewed by Youenn Fablet. |
| |
| updateAnimations() needs to protect m_scheduledAnimations while processing |
| the scheduled animations. m_scheduledAnimations may be changed from JavaScript |
| callbacks. This will invalidate the HashMap iterators while the one used |
| by the for-loop in updateAnimations() is still in use. |
| |
| To allow copying m_scheduledAnimations, the value of the entry has to be |
| of type AnimationVector instead of std::unique_ptr<AnimationVector>. |
| |
| Test: svg/animations/css-animation-reinsert-target.html |
| |
| * svg/animation/SMILTimeContainer.cpp: |
| (WebCore::SMILTimeContainer::schedule): |
| (WebCore::SMILTimeContainer::unschedule): |
| (WebCore::SMILTimeContainer::processScheduledAnimations): |
| (WebCore::SMILTimeContainer::updateAnimations): |
| * svg/animation/SMILTimeContainer.h: |
| |
| 2020-05-26 Alex Christensen <achristensen@webkit.org> |
| |
| MacApplication::isSafari should allow safari bundle id variants |
| https://bugs.webkit.org/show_bug.cgi?id=212401 |
| |
| Reviewed by Timothy Hatcher. |
| |
| There is a test environment with bundle ID com.apple.Safari.something. |
| This change is blocking rdar://problem/63574451 |
| |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::MacApplication::isSafari): |
| |
| 2020-05-26 Simon Fraser <simon.fraser@apple.com> |
| |
| Rendering artifacts when scrolling overlays |
| https://bugs.webkit.org/show_bug.cgi?id=204120 |
| <rdar://problem/57121358> |
| |
| Reviewed by Zalan Bujtas. |
| |
| RenderLayerBacking::setContentsNeedDisplayInRect() needs to adjust repaint rects in the |
| scrolled contents layer by the RenderLayer's scrollOffset, because that's what's used |
| during repaint rect computation. We haven't yet pushed the new scroll offset onto the |
| GraphicsLayer, so m_scrolledContentsLayer->scrollOffset() would be stale here. |
| |
| I tested RTL to make sure that scrollOffset(), and not scrollPosition() is the correct |
| function to tall. |
| |
| Test: compositing/repaint/compositing-toggle-in-overflow-scroll-repaint.html |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): |
| |
| 2020-05-26 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| An SVG animated property animator can stop animation while other animators are still running |
| https://bugs.webkit.org/show_bug.cgi?id=207417 |
| <rdar://problem/59278306> |
| |
| Reviewed by Simon Fraser. |
| |
| An SVG animated property can be animated by multiple animators. When one |
| animator stops the animation, the animVal should not be deleted since it |
| will be used by other animators. |
| |
| SVGAnimatedProperty will maintain a WeakHashSet<SVGAttributeAnimator> in |
| which the animator will be added when the animation starts and will be |
| removed when the the animation stops. When all the animators stops their |
| animations, the animated property may delete the animVal or keep it if it |
| can be referenced by JavaScript. |
| |
| Tests: svg/animations/animated-enum-mutiple-animators.svg |
| svg/animations/animated-length-mutiple-animators.svg |
| |
| * svg/properties/SVGAnimatedDecoratedProperty.h: |
| * svg/properties/SVGAnimatedPrimitiveProperty.h: |
| * svg/properties/SVGAnimatedProperty.h: |
| (WebCore::SVGAnimatedProperty::isAnimating const): |
| (WebCore::SVGAnimatedProperty::startAnimation): |
| (WebCore::SVGAnimatedProperty::stopAnimation): |
| (WebCore::SVGAnimatedProperty::instanceStartAnimation): |
| (WebCore::SVGAnimatedProperty::instanceStopAnimation): |
| * svg/properties/SVGAnimatedPropertyAnimator.h: |
| * svg/properties/SVGAnimatedPropertyList.h: |
| * svg/properties/SVGAnimatedValueProperty.h: |
| * svg/properties/SVGAttributeAnimator.h: |
| |
| 2020-05-26 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (async oveflow): scrubber missing from inline video inside overflow scroll |
| https://bugs.webkit.org/show_bug.cgi?id=212391 |
| <rdar://problem/63089859> |
| |
| Reviewed by Zalan Bujtas. |
| |
| backgroundClipRect() is in the coordinate space of the ClipRectContext's rootLayer, not the receiver, |
| so when converting to absolute coordinates we must use the ClipRectContext's rootLayer. |
| |
| Test: compositing/layer-creation/overlap-in-scroller.html |
| |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::addToOverlapMap const): |
| |
| 2020-05-26 Jer Noble <jer.noble@apple.com> |
| |
| Can't scrub video on https://www.judiciary.senate.gov |
| https://bugs.webkit.org/show_bug.cgi?id=212270 |
| <rdar://problem/57922919> |
| |
| Reviewed by Eric Carlson. |
| |
| Test: media/video-duration-seekable.html |
| |
| www.judiciary.senate.gov uses the Akamai Media Player, which doesn't query HTMLMediaElement.duration |
| directly. Rather, when it receives a "durationchange" event, it calculates the duration by using the |
| HTMLMediaElement.seekable ranges to determine the effective media duration. But no event is fired when |
| the seekable ranges change, and when they first query HTMLMediaElement.seekable, AVFoundation hasn't |
| yet updated seekable ranges, so we report an empty set of seekable ranges. |
| |
| The HTML specification suggests that UAs "should adopt a very liberal and optimistic view of what is |
| seekable." With that advice in mind, when we are asked by the page for our seekable ranges, and we do |
| not yet have the official ranges from AVPlayerItem, lets just respond with [0, duration). |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::platformMaxTimeSeekable const): |
| |
| 2020-05-25 Darin Adler <darin@apple.com> |
| |
| Eliminate Color constructors that take strings, moving color parsing entirely into the CSS parser |
| https://bugs.webkit.org/show_bug.cgi?id=212296 |
| |
| Reviewed by Sam Weinig. |
| |
| * css/parser/CSSParser.cpp: |
| (WebCore::CSSParser::parseColor): Moved more of the logic into |
| CSSParserFastPaths::parseSimpleColor. Also added a FIXME about what |
| seems to be a mistake about strict mode. |
| (WebCore::CSSParser::parseColorWorkerSafe): Ditto. |
| (WebCore::CSSParser::parseSystemColor): Removed unused context argument. |
| (WebCore::CSSParser::parseNamedColor): Added. |
| (WebCore::CSSParser::parseHexColor): Added. |
| (WebCore::CSSParser::parseSingleValue): Use auto. |
| (WebCore::CSSParser::parseValue): Ditto. |
| |
| * css/parser/CSSParser.h: Exported parseColor. Removed unused value pool |
| and strict arguments from parseColorWorkerSafe. Removed unused context |
| argument from parseSystemColor. Added parseNamedColor and parseHexColor. |
| |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::parseSimpleLengthValue): Take a StringView. |
| (WebCore::finishParsingHexColor): Added, logic moved from Color constructor. |
| (WebCore::parseHexColorInternal): Ditto. |
| (WebCore::parseNumericColor): Added, logic moved from fastParseColorInternal. |
| (WebCore::parseColor): Turned into a non-member function since it's private |
| to this file. Use auto a bit more, and removed unneeded value pool argument. |
| (WebCore::finishParsingNamedColor): Added, logic moved from Color constructor. |
| (WebCore::parseNamedColorInternal): Ditto. |
| (WebCore::parseSimpleColorInternal): Ditto. |
| (WebCore::CSSParserFastPaths::parseSimpleColor): Ditto. |
| (WebCore::CSSParserFastPaths::parseHexColor): Ditto. |
| (WebCore::CSSParserFastPaths::parseNamedColor): Ditto. |
| (WebCore::isUniversalKeyword): Take a StringView. |
| (WebCore::parseKeywordValue): Ditto. |
| (WebCore::parseSimpleTransform): Ditto. |
| (WebCore::parseCaretColor): Ditto. Also take a parser context rather than |
| a parser mode. |
| (WebCore::CSSParserFastPaths::maybeParseValue): Take a StringView. |
| |
| * css/parser/CSSParserFastPaths.h: Cut down includes. Use StringView. |
| Added parseSimpleColor, parseHexColor, and parseNamedColor. |
| |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::parseHexColor): Return an |
| Optional<SimpleColor> instead of a Color. |
| (WebCore::CSSPropertyParserHelpers::consumeColor): Refactor a bit for clarity. |
| |
| * html/HTMLElement.cpp: |
| (WebCore::parseLegacyColorValue): Renamed from parseColorStringWithCrazyLegacyRules |
| and refactored a bit. Made this match the HTML specification more closely. |
| (WebCore::HTMLElement::addHTMLColorToStyle): Simplify now that more of the logic |
| was moved into parseLegacyColorValue. |
| |
| * html/canvas/CanvasStyle.cpp: |
| (WebCore::parseColor): Removed unneeded arguments for parseColorWorkerSafe |
| and for parseSystemColor. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::findNamedColor): Deleted. |
| (WebCore::Color::Color): Deleted overloadds that take strings. |
| * platform/graphics/Color.h: Updated for the above. |
| |
| * platform/graphics/SimpleColor.cpp: |
| (WebCore::parseHexColorInternal): Deleted. |
| (WebCore::SimpleColor::parseHexColor): Deleted. |
| * platform/graphics/SimpleColor.h: Removed parseHexColor functions. |
| |
| 2020-05-26 Antoine Quint <graouts@apple.com> |
| |
| Hardware fill-forwards animation and transitions don't interact correctly |
| https://bugs.webkit.org/show_bug.cgi?id=187839 |
| <rdar://problem/42410412> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: webanimations/updating-property-targeted-by-css-transition-during-css-animation.html |
| |
| We didn't follow the CSS Transitions spec closely enough when it came to defining the correct before and after |
| change styles during a style change event. |
| |
| We now correctly set the before-change style as one of three possible values: |
| |
| 1. if there are running CSS-originated animations, we ensure those are updated to the current time and |
| resolve them to get the style, |
| 2. otherwise we use the RenderStyle recorded in Style::TreeResolver::createAnimatedElementUpdate() prior |
| to applying animations during the last style change event, |
| 3. otherwise we use the previous computed style, which should not have any animated values. |
| |
| As for the after-change style, we also need to ensure any running CSS Animations are update to the current time |
| and resolve them to get the style. Otherwise, we just use the current computed style prior to applying animations. |
| |
| Finally, we can exit from AnimationTimeline::updateCSSTransitionsForElementAndProperty() early if we find that |
| we have a JS-originated animation running for the given property on the given element since we know that that |
| animation will yield an overriding value for both the before and after change styles since JS-originated animations |
| have the hightest composite order. |
| |
| This means we no longer need to track the unanimated style on KeyframeEffect. |
| |
| * animation/AnimationTimeline.cpp: |
| (WebCore::AnimationTimeline::updateCSSAnimationsForElement): |
| (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty): |
| (WebCore::AnimationTimeline::updateCSSTransitionsForElement): |
| * animation/AnimationTimeline.h: |
| * animation/ElementAnimationRareData.h: |
| (WebCore::ElementAnimationRareData::lastStyleChangeEventStyle const): |
| (WebCore::ElementAnimationRareData::setLastStyleChangeEventStyle): |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::clearBlendingKeyframes): |
| (WebCore::KeyframeEffect::apply): |
| (WebCore::KeyframeEffect::applyPendingAcceleratedActions): |
| * animation/KeyframeEffect.h: |
| (WebCore::KeyframeEffect::unanimatedStyle const): Deleted. |
| * dom/Element.cpp: |
| (WebCore::Element::lastStyleChangeEventStyle const): |
| (WebCore::Element::setLastStyleChangeEventStyle): |
| * dom/Element.h: |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::createAnimatedElementUpdate): |
| |
| 2020-05-26 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Remove red()/green()/blue() accessors from ExtendedColor in preperation for supporting non-RGB based ColorSpaces |
| https://bugs.webkit.org/show_bug.cgi?id=212366 |
| |
| Reviewed by Simon Fraser. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::differenceSquared): |
| Switch to using toSRGBASimpleColorLossy() rather than poking at the ExtendedColor |
| components directly. The old code was already incorrect if the two colors had |
| differing color spaces so this at least now gives reasonable results. |
| |
| (WebCore::Color::colorWithAlpha const): |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): |
| Delegate to ExtendedColor completely for colorWithAlpha() to allow for more |
| control over how the components might be stored in the future. |
| |
| * platform/graphics/Color.h: |
| (WebCore::Color::isBlackColor): |
| (WebCore::Color::isWhiteColor): |
| Delegate to ExtendedColor for isBlack()/isWhite() to allow per-color space |
| interpretations of the predicate. |
| |
| (WebCore::Color::encode const): |
| (WebCore::Color::decode): |
| Use c1, c2, c3 rather than red/green/blue. This should be acceptable for the |
| forseeable future, as all expected colorspaces only have 3 channels, but at |
| some point, it may make sense to delegate coding to ExtendedColor completely. |
| |
| * platform/graphics/ExtendedColor.cpp: |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::ExtendedColor::channels const): |
| (WebCore::ExtendedColor::red const): Deleted. |
| (WebCore::ExtendedColor::green const): Deleted. |
| (WebCore::ExtendedColor::blue const): Deleted. |
| (WebCore::ExtendedColor::colorWithAlpha const): Added. |
| (WebCore::ExtendedColor::isWhite const): Added. |
| (WebCore::ExtendedColor::isBlack const): Added. |
| Use channels() with structured bindings rather than the red()/green()/blue() accessors |
| everywhere. |
| |
| 2020-05-26 Peng Liu <peng.liu6@apple.com> |
| |
| ASSERTION FAILED: m_clientCounts.contains(contextId) - WebKit::VideoFullscreenManagerProxy::removeClientForContext() |
| https://bugs.webkit.org/show_bug.cgi?id=212308 |
| |
| Reviewed by Jer Noble. |
| |
| Call m_videoFullscreenModel->didExitPictureInPicture() after the video player |
| completes the process to exit Picture-in-Picture. |
| |
| Covered by existing tests. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::cleanupFullscreen): |
| (VideoFullscreenInterfaceAVKit::didStopPictureInPicture): |
| |
| 2020-05-26 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Use padding to space out sections |
| https://bugs.webkit.org/show_bug.cgi?id=212377 |
| |
| Reviewed by Antti Koivisto. |
| |
| Use fake padding before/after to space out sections. |
| |
| Test: fast/layoutformattingcontext/table-simple-multiple-sections-with-border-spacing-and-collapse.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForSections): |
| |
| 2020-05-26 Keith Rollin <krollin@apple.com> |
| |
| Enable the use of XCBuild by default in Apple builds |
| https://bugs.webkit.org/show_bug.cgi?id=209890 |
| <rdar://problem/44182078> |
| |
| Reviewed by Darin Adler. |
| |
| Switch from the "legacy" Xcode build system to the "new" build system |
| (also known as "XCBuild"). Switching to the new system speeds up |
| builds by a small percentage, better validates projects for |
| build-related issues (such as dependency cycles), lets WebKit benefit |
| from future improvements in XCBuild such as those coming from the |
| underlying llbuild open source project, and prepares us for any other |
| tools built for this new ecosystem. |
| |
| Specific changes: |
| |
| - Remove Xcode project and workspace settings that selected the Build |
| system, allowing the default to take hold (which is currently the |
| New build system). |
| - Updated webkitdirs.pm with a terser check for Xcode version. |
| - Update build-webkit and Makefile.shared to be explicit when using |
| the old build system (no longer treat it as a default or fall-back |
| configuration). |
| - Update various xcconfig files similarly to treat the default as |
| using the new build system. |
| - Update various post-processing build steps to check for Xcode 11.4 |
| and to no longer treat the default as using the old build system. |
| |
| No new tests -- no changed functionality. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2020-05-26 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for multiple sections |
| https://bugs.webkit.org/show_bug.cgi?id=212354 |
| |
| Reviewed by Antti Koivisto. |
| |
| Let's keep the grid about rows and columns and about distributing available space. |
| Use the layout tree to find sections. |
| |
| Test: fast/layoutformattingcontext/table-simple-multiple-sections.html |
| |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForRows): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForSections): |
| * layout/tableformatting/TableGrid.cpp: |
| (WebCore::Layout::TableGrid::appendCell): |
| (WebCore::Layout::TableGrid::Section::Section): Deleted. |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::Section::box const): Deleted. |
| (WebCore::Layout::TableGrid::sections const): Deleted. |
| (WebCore::Layout::TableGrid::sections): Deleted. |
| |
| 2020-05-26 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Use screen font options as default |
| https://bugs.webkit.org/show_bug.cgi?id=212332 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| There's no gdk_screen_get_font_options() in GTK4, so we need to get the individual properties from the settings |
| and build a cairo_font_options_t. We can just do the same in GTK3 to avoid ifdefs. Add a helper |
| SystemFontOptions singleton class to monitor and parse the font settings. |
| |
| * platform/graphics/gtk/GdkCairoUtilities.cpp: |
| (WebCore::SystemFontOptions::singleton): |
| (WebCore::SystemFontOptions::SystemFontOptions): |
| (WebCore::SystemFontOptions::fontOptions const): |
| (WebCore::SystemFontOptions::updateFontOptions): |
| (WebCore::getDefaultCairoFontOptions): |
| |
| 2020-05-25 Simon Fraser <simon.fraser@apple.com> |
| |
| Use an Optional<> for LayerFragment::boundingBox |
| https://bugs.webkit.org/show_bug.cgi?id=212358 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Replace a bool + LayoutRect with Optional<LayoutRect>. |
| |
| * rendering/LayerFragment.h: |
| (WebCore::LayerFragment::setRects): |
| (WebCore::LayerFragment::moveBy): |
| (WebCore::LayerFragment::intersect): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::collectFragments): |
| (WebCore::RenderLayer::updatePaintingInfoForFragments): |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderLayer.h: |
| |
| 2020-05-25 Simon Fraser <simon.fraser@apple.com> |
| |
| Make isTableRow() an inline function |
| https://bugs.webkit.org/show_bug.cgi?id=212360 |
| |
| Reviewed by Darin Adler. |
| |
| isTableCell() is a virtual function that's called in some hot code paths, like RenderLayer::localBoundingBox(), |
| so make it inline by using a spare bit on RenderObject. |
| |
| * rendering/RenderObject.h: |
| (WebCore::RenderObject::isTableCaption const): |
| (WebCore::RenderObject::isTableRow const): |
| (WebCore::RenderObject::setIsTableRow): |
| (WebCore::RenderObject::RenderObjectBitfields::RenderObjectBitfields): |
| * rendering/RenderTableRow.cpp: |
| (WebCore::RenderTableRow::RenderTableRow): |
| * rendering/RenderTableRow.h: |
| |
| 2020-05-25 Alex Christensen <achristensen@webkit.org> |
| |
| Expose more network metrics to WebCoreNSURLSession |
| https://bugs.webkit.org/show_bug.cgi?id=212359 |
| <rdar://problem/62909440> |
| |
| Reviewed by Darin Adler. |
| |
| * platform/network/NetworkLoadMetrics.h: |
| (WebCore::NetworkLoadMetrics::isolatedCopy const): |
| (WebCore::NetworkLoadMetrics::operator== const): |
| (WebCore::NetworkLoadMetrics::encode const): |
| (WebCore::NetworkLoadMetrics::decode): |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (-[WebCoreNSURLSessionTaskTransactionMetrics networkProtocolName]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics isReusedConnection]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics cellular]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics expensive]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics constrained]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics multipath]): |
| |
| 2020-05-25 Oriol Brufau <obrufau@igalia.com> |
| |
| [css-grid] Prevent grid-template-rows from serializing adjacent <line-names> |
| https://bugs.webkit.org/show_bug.cgi?id=212345 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| The parser for the grid-template shorthand has this code: |
| |
| // Persists between loop iterations so we can use the same value for |
| // consecutive <line-names> values |
| RefPtr<CSSGridLineNamesValue> lineNames; |
| |
| However, this wasn't working because of a lineNames.releaseNonNull() at |
| the end of the loop. So each iteration started with a null lineNames, and |
| consecutive <line-names> values were not merged together. |
| |
| Tests: fast/css-grid-layout/grid-template-shorthand-get-set.html |
| imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand.html |
| imported/w3c/web-platform-tests/css/css-grid/parsing/grid-shorthand-valid.html |
| imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-shorthand.html |
| imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-shorthand-valid.html |
| |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::CSSPropertyParser::consumeGridTemplateRowsAndAreasAndColumns): |
| |
| 2020-05-25 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Assert !isExtended() in Color::asSimpleColor()...finally |
| https://bugs.webkit.org/show_bug.cgi?id=212357 |
| |
| Reviewed by Simon Fraser. |
| |
| Reap the reward of the cleanup, and add the ASSERT(!isExtended()) to Color::asSimpleColor() |
| as was the original goal of this effort. Only tree non-checked places remained and were |
| trivial to add isExtended() checks for. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::nameForRenderTreeAsText const): |
| Use ExtenedColor::cssText() for the RenderTree representation. It is stable |
| and as good as any, no need to re-invent the wheel here. |
| |
| (WebCore::Color::light const): |
| (WebCore::Color::dark const): |
| Add isExtended() checks before doing white/black checks, |
| |
| * platform/graphics/Color.h: |
| (WebCore::Color::asSimpleColor const): |
| Add ASSERT. |
| |
| 2020-05-24 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Use the name SimpleColor consistently |
| https://bugs.webkit.org/show_bug.cgi?id=212337 |
| |
| Reviewed by Anders Carlsson. |
| |
| - Removes RGBA32 type alias, updating all remaining users of it. |
| - Renames functions that take/return SimpleColor to use the name |
| SimpleColor rather than RGB (e.g. makeRGBA -> makeSimpleColor) |
| - Moves hex color parsing from Color to SimpleColor, as that is |
| the type it returns. Also took the opportunity to make it return |
| an Optional<SimpleColor> instead of using a bool/out parameter. |
| - Move Color::compositionFill to editing/CompositionHighlight.h |
| It makes no real sense to keep it in Color.h |
| - Replaces rgb() function in Color with asSimpleColor() for |
| symmetry with asExtended(). |
| - Replaced std::max(a, std::min(value, b)) with std::clamp(value, a, b) |
| for clarity. |
| |
| * css/parser/CSSParserFastPaths.cpp: |
| (WebCore::fastParseColorInternal): |
| (WebCore::CSSParserFastPaths::parseColor): |
| * css/parser/CSSPropertyParserHelpers.cpp: |
| (WebCore::CSSPropertyParserHelpers::parseRGBParameters): |
| (WebCore::CSSPropertyParserHelpers::parseHSLParameters): |
| (WebCore::CSSPropertyParserHelpers::parseHexColor): |
| * editing/CompositionHighlight.h: |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::DataDetection::detectContentInRange): |
| * html/ColorInputType.cpp: |
| (WebCore::parseSimpleColorValue): |
| * html/HTMLElement.cpp: |
| (WebCore::parseColorStringWithCrazyLegacyRules): |
| * platform/adwaita/ScrollbarThemeAdwaita.cpp: |
| * platform/adwaita/ThemeAdwaita.cpp: |
| (WebCore::ThemeAdwaita::activeSelectionForegroundColor const): |
| (WebCore::ThemeAdwaita::activeSelectionBackgroundColor const): |
| (WebCore::ThemeAdwaita::inactiveSelectionForegroundColor const): |
| * platform/graphics/Color.cpp: |
| (WebCore::differenceSquared): |
| (WebCore::Color::Color): |
| (WebCore::Color::operator=): |
| (WebCore::Color::serialized const): |
| (WebCore::Color::cssText const): |
| (WebCore::Color::nameForRenderTreeAsText const): |
| (WebCore::Color::light const): |
| (WebCore::Color::dark const): |
| (WebCore::Color::blend const): |
| (WebCore::Color::blendWithWhite const): |
| (WebCore::Color::colorWithAlpha const): |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): |
| (WebCore::Color::invertedColorWithAlpha const): |
| (WebCore::Color::colorSpaceAndComponents const): |
| (WebCore::Color::toSRGBASimpleColorLossy const): |
| (WebCore::blend): |
| (WebCore::Color::tagAsValid): |
| (WebCore::parseHexColorInternal): Deleted. |
| (WebCore::Color::parseHexColor): Deleted. |
| (WebCore::Color::asExtended const): Deleted. |
| * platform/graphics/Color.h: |
| (WebCore::Color::Color): |
| (WebCore::Color::isHashTableDeletedValue const): |
| (WebCore::Color::isValid const): |
| (WebCore::Color::isOpaque const): |
| (WebCore::Color::isVisible const): |
| (WebCore::Color::alpha const): |
| (WebCore::Color::alphaAsFloat const): |
| (WebCore::Color::isSemantic const): |
| (WebCore::Color::isExtended const): |
| (WebCore::Color::setIsSemantic): |
| (WebCore::operator==): |
| (WebCore::equalIgnoringSemanticColor): |
| (WebCore::Color::hash const): |
| (WebCore::Color::asExtended const): |
| (WebCore::Color::asSimpleColor const): |
| (WebCore::Color::setSimpleColor): |
| (WebCore::Color::isBlackColor): |
| (WebCore::Color::isWhiteColor): |
| (WebCore::Color::encode const): |
| (WebCore::Color::decode): |
| (WebCore::Color::setRGB): Deleted. |
| (WebCore::Color::rgb const): Deleted. |
| * platform/graphics/ColorUtilities.h: |
| (WebCore::clampedColorComponent): |
| * platform/graphics/ImageBackingStore.h: |
| (WebCore::ImageBackingStore::blendPixel): |
| (WebCore::ImageBackingStore::pixelValue const): |
| * platform/graphics/SimpleColor.cpp: |
| (WebCore::makePremultipliedSimpleColor): |
| (WebCore::makeUnpremultipliedSimpleColor): |
| (WebCore::makeSimpleColorFromFloats): |
| (WebCore::makeSimpleColorFromHSLA): |
| (WebCore::makeSimpleColorFromCMYKA): |
| (WebCore::parseHexColorInternal): |
| (WebCore::SimpleColor::parseHexColor): |
| (WebCore::makePremultipliedRGBA): Deleted. |
| (WebCore::makeUnPremultipliedRGBA): Deleted. |
| (WebCore::makeRGBA32FromFloats): Deleted. |
| (WebCore::makeRGBAFromHSLA): Deleted. |
| (WebCore::makeRGBAFromCMYKA): Deleted. |
| * platform/graphics/SimpleColor.h: |
| (WebCore::roundAndClampColorChannel): |
| (WebCore::colorFloatToSimpleColorByte): |
| (WebCore::makeSimpleColor): |
| (WebCore::colorFloatToRGBAByte): Deleted. |
| (WebCore::makeRGB): Deleted. |
| (WebCore::makeRGBA): Deleted. |
| * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: |
| (WebCore::makeSimpleColorFromARGBCFArray): |
| (WebCore::InbandTextTrackPrivateAVF::processCueAttributes): |
| (WebCore::makeRGBA32FromARGBCFArray): Deleted. |
| * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: |
| (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): |
| * platform/graphics/cairo/NativeImageCairo.cpp: |
| (WebCore::nativeImageSinglePixelSolidColor): |
| * platform/graphics/cg/ColorCG.cpp: |
| (WebCore::makeSimpleColorFromCGColor): |
| (WebCore::Color::Color): |
| (WebCore::cachedCGColor): |
| (WebCore::makeRGBAFromCGColor): Deleted. |
| * platform/graphics/gtk/ColorGtk.cpp: |
| (WebCore::Color::Color): |
| * platform/graphics/mac/ColorMac.mm: |
| (WebCore::makeSimpleColorFromNSColor): |
| (WebCore::colorFromNSColor): |
| (WebCore::semanticColorFromNSColor): |
| (WebCore::makeRGBAFromNSColor): Deleted. |
| * platform/graphics/win/ColorDirect2D.cpp: |
| (WebCore::Color::Color): |
| * platform/graphics/win/GraphicsContextCGWin.cpp: |
| (WebCore::GraphicsContext::drawDotsForDocumentMarker): |
| * platform/graphics/win/PlatformContextDirect2D.cpp: |
| (WebCore::PlatformContextDirect2D::brushWithColor): |
| * platform/ios/ColorIOS.mm: |
| (WebCore::colorFromUIColor): |
| * rendering/InlineTextBox.cpp: |
| (WebCore::InlineTextBox::paintCompositionBackground): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::paintResizer): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::patternForTouchAction): |
| (WebCore::patternForEventListenerRegionType): |
| * rendering/RenderThemeAdwaita.cpp: |
| * rendering/RenderThemeMac.mm: |
| (WebCore::menuBackgroundColor): |
| |
| 2020-05-25 Zalan Bujtas <zalan@apple.com> |
| |
| [Subpixel layout] Bad scrolling on mercurynews.com article |
| https://bugs.webkit.org/show_bug.cgi?id=201038 |
| <rdar://problem/28489812> |
| |
| Reviewed by Dean Jackson. |
| |
| The scrolling is caused by the mismatching subpixel handling between block and inline content. |
| Inline content (and in this particular case ascent/descent handling) is still integral based while block content supports fractional pixel values. |
| When the (inline)line height relies on the (block)inline-block height, we need to make sure that the computed line height encloses the inline-block. |
| This patch changes the rounding behavior of computed the line height from floor to round. |
| |
| Test: fast/inline/hidpi-inline-block-is-subpixel-while-line-is-not.html |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::baselinePosition const): |
| * rendering/RootInlineBox.cpp: |
| (WebCore::RootInlineBox::ascentAndDescentForBox const): |
| |
| 2020-05-25 Rob Buis <rbuis@igalia.com> |
| |
| Use child text content when determining whether to bail early in running a script |
| https://bugs.webkit.org/show_bug.cgi?id=182695 |
| |
| Reviewed by Youenn Fablet. |
| |
| Check that the text content is not empty instead of just checking |
| for the first child [1]. |
| |
| Behavior matches Chrome and Firefox. |
| |
| [1] https://html.spec.whatwg.org/#prepare-a-script step 5 and 6 |
| |
| Test: web-platform-tests/html/semantics/scripting-1/the-script-element/emptyish-script-elements.html |
| |
| * dom/ScriptElement.cpp: |
| (WebCore::ScriptElement::prepareScript): |
| |
| 2020-05-22 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-flex] Allow indefinite size flex items to be definite wrt resolving percentages inside them |
| https://bugs.webkit.org/show_bug.cgi?id=212264 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Implement https://github.com/w3c/csswg-drafts/commit/5b5db39d21f3658ae2f4d7992daaf822aca178d8 which modified |
| the way percentages were resolved in flexible items with indefinite sizes. From now on we can pretend that |
| they're really definite. |
| |
| This allows us to mark 3 tests which were testing percentages in flex items as correct. |
| |
| Based on Blink's crrev.com/1247184 by <cbiesinger@chromium.org> |
| |
| * rendering/RenderFlexibleBox.cpp: |
| (WebCore::RenderFlexibleBox::mainSizeForPercentageResolution): Do only check flex container main size |
| definiteness when computing the main size for percentage resolution, no need to check flex basis at all. |
| |
| 2020-05-25 Youenn Fablet <youenn@apple.com> |
| |
| AVVideoCaptureSource should notify of video samples in a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=212072 |
| |
| Reviewed by Eric Carlson. |
| |
| Do not hop to the main thread to send samples. |
| Instead, directly call the observer callback. |
| Manually tested. |
| |
| * platform/mediastream/mac/AVVideoCaptureSource.h: |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): |
| |
| 2020-05-25 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes, late May 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=212342 |
| |
| Unreviewed build fix. |
| |
| No new tests needed. |
| |
| * loader/ImageLoader.h: Add missing inclusion of Element.h and remove forward declaration. |
| * page/PageConfiguration.h: Add missing inclusion of ShouldRelaxThirdPartyCookieBlocking.h |
| |
| 2020-05-25 Youenn Fablet <youenn@apple.com> |
| |
| MediaPlayerPrivateMediaStreamAVFObjC::m_activeVideoTrack should be a VideoTrackPrivateMediaStream |
| https://bugs.webkit.org/show_bug.cgi?id=212129 |
| |
| Reviewed by Eric Carlson. |
| |
| Instead of looking in the map when wanting to get the VideoTrackPrivateMediaStream corresponding to the active video track, |
| store directly the VideoTrackPrivateMediaStream as the active video track and use streamTrack() to get the corresponding MediaStreamTrack. |
| Small refactoring to use more Ref<>. |
| Covered by existing tests. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferDisplayLayerStatusDidChange): |
| (WebCore::updateTracksOfType): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): |
| * platform/mediastream/AudioTrackPrivateMediaStream.h: |
| * platform/mediastream/VideoTrackPrivateMediaStream.h: |
| |
| 2020-05-24 Youenn Fablet <youenn@apple.com> |
| |
| Do not allocate a WebAudioBufferList in the AudioContext rendering thread |
| https://bugs.webkit.org/show_bug.cgi?id=212132 |
| |
| Reviewed by Eric Carlson. |
| |
| Instead of allocating the buffer in the rendering thread, we do that in the audio sample producer thread. |
| Also, we do it only once versus one for each rendering call previously. |
| Covered by existing tests. |
| |
| * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h: |
| * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: |
| (WebCore::WebAudioSourceProviderAVFObjC::provideInput): |
| (WebCore::WebAudioSourceProviderAVFObjC::prepare): |
| (WebCore::WebAudioSourceProviderAVFObjC::unprepare): |
| |
| 2020-05-24 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Add some missing includes due to unified sources |
| https://bugs.webkit.org/show_bug.cgi?id=212306 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp: Include EnterPictureInPictureEvent.h. |
| |
| * platform/PictureInPictureObserver.h: Include WeakPtr and forward declare the IntSize class. |
| |
| 2020-05-24 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Move SimpleColor into its own files |
| https://bugs.webkit.org/show_bug.cgi?id=212309 |
| |
| Reviewed by Simon Fraser. |
| |
| Move SimpleColor into its own files. It's about time. |
| |
| * Headers.cmake: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/graphics/Color.cpp: |
| (WebCore::premultipliedChannel): Deleted. |
| (WebCore::unpremultipliedChannel): Deleted. |
| (WebCore::makePremultipliedRGBA): Deleted. |
| (WebCore::makeUnPremultipliedRGBA): Deleted. |
| (WebCore::colorFloatToRGBAByte): Deleted. |
| (WebCore::makeRGBA32FromFloats): Deleted. |
| (WebCore::makeRGBAFromHSLA): Deleted. |
| (WebCore::makeRGBAFromCMYKA): Deleted. |
| (WebCore::SimpleColor::serializationForHTML const): Deleted. |
| (WebCore::decimalDigit): Deleted. |
| (WebCore::fractionDigitsForFractionalAlphaValue): Deleted. |
| (WebCore::SimpleColor::serializationForCSS const): Deleted. |
| (WebCore::RGBA32::serializationForRenderTreeAsText const): Deleted. |
| * platform/graphics/Color.h: |
| (WebCore::SimpleColor::SimpleColor): Deleted. |
| (WebCore::SimpleColor::value const): Deleted. |
| (WebCore::SimpleColor::redComponent const): Deleted. |
| (WebCore::SimpleColor::greenComponent const): Deleted. |
| (WebCore::SimpleColor::blueComponent const): Deleted. |
| (WebCore::SimpleColor::alphaComponent const): Deleted. |
| (WebCore::SimpleColor::alphaComponentAsFloat const): Deleted. |
| (WebCore::SimpleColor::isOpaque const): Deleted. |
| (WebCore::SimpleColor::isVisible const): Deleted. |
| (WebCore::SimpleColor::colorWithAlpha const): Deleted. |
| (WebCore::SimpleColor::get const): Deleted. |
| (WebCore::roundAndClampColorChannel): Deleted. |
| (WebCore::fastMultiplyBy255): Deleted. |
| (WebCore::fastDivideBy255): Deleted. |
| (WebCore::makeRGB): Deleted. |
| (WebCore::makeRGBA): Deleted. |
| * platform/graphics/SimpleColor.cpp: Copied from platform/graphics/Color.cpp. |
| (WebCore::SimpleColor::serializationForRenderTreeAsText const): |
| (): Deleted. |
| (WebCore::colorFloatToRGBAByte): Deleted. |
| (WebCore::parseHexColorInternal): Deleted. |
| (WebCore::Color::parseHexColor): Deleted. |
| (WebCore::differenceSquared): Deleted. |
| (WebCore::findNamedColor): Deleted. |
| (WebCore::Color::Color): Deleted. |
| (WebCore::Color::operator=): Deleted. |
| (WebCore::Color::serialized const): Deleted. |
| (WebCore::Color::cssText const): Deleted. |
| (WebCore::RGBA32::serializationForRenderTreeAsText const): Deleted. |
| (WebCore::Color::nameForRenderTreeAsText const): Deleted. |
| (WebCore::Color::light const): Deleted. |
| (WebCore::Color::dark const): Deleted. |
| (WebCore::Color::isDark const): Deleted. |
| (WebCore::Color::lightness const): Deleted. |
| (WebCore::blendComponent): Deleted. |
| (WebCore::Color::blend const): Deleted. |
| (WebCore::Color::blendWithWhite const): Deleted. |
| (WebCore::Color::colorWithAlphaMultipliedBy const): Deleted. |
| (WebCore::Color::colorWithAlphaMultipliedByUsingAlternativeRounding const): Deleted. |
| (WebCore::Color::colorWithAlpha const): Deleted. |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): Deleted. |
| (WebCore::Color::colorSpaceAndComponents const): Deleted. |
| (WebCore::Color::toSRGBASimpleColorLossy const): Deleted. |
| (WebCore::Color::toSRGBAComponentsLossy const): Deleted. |
| (WebCore::extendedColorsEqual): Deleted. |
| (WebCore::blend): Deleted. |
| (WebCore::blendWithoutPremultiply): Deleted. |
| (WebCore::Color::tagAsValid): Deleted. |
| (WebCore::Color::asExtended const): Deleted. |
| (WebCore::operator<<): Deleted. |
| * platform/graphics/SimpleColor.h: Copied from platform/graphics/Color.h. |
| (WebCore::SimpleColor::alphaComponentAsFloat const): |
| (WebCore::SimpleColor::colorWithAlpha const): |
| (WebCore::SimpleColor::get const): |
| (WebCore::colorFloatToRGBAByte): |
| (WebCore::Color::Color): Deleted. |
| (WebCore::Color::isHashTableDeletedValue const): Deleted. |
| (WebCore::Color::~Color): Deleted. |
| (WebCore::Color::isValid const): Deleted. |
| (WebCore::Color::isOpaque const): Deleted. |
| (WebCore::Color::isVisible const): Deleted. |
| (WebCore::Color::red const): Deleted. |
| (WebCore::Color::green const): Deleted. |
| (WebCore::Color::blue const): Deleted. |
| (WebCore::Color::alpha const): Deleted. |
| (WebCore::Color::alphaAsFloat const): Deleted. |
| (WebCore::Color::opaqueColor const): Deleted. |
| (WebCore::Color::isSemantic const): Deleted. |
| (WebCore::Color::isExtended const): Deleted. |
| (WebCore::Color::setRGB): Deleted. |
| (WebCore::Color::setIsSemantic): Deleted. |
| (WebCore::equalIgnoringSemanticColor): Deleted. |
| (WebCore::Color::hash const): Deleted. |
| (WebCore::Color::colorWithAlphaMultipliedByUsingAlternativeRounding const): Deleted. |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): Deleted. |
| (WebCore::Color::rgb const): Deleted. |
| (WebCore::Color::isBlackColor): Deleted. |
| (WebCore::Color::isWhiteColor): Deleted. |
| (WebCore::Color::encode const): Deleted. |
| (WebCore::Color::decode): Deleted. |
| |
| 2020-05-24 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Ignore section borders even when border collapse is off. |
| https://bugs.webkit.org/show_bug.cgi?id=212336 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-thead-border-ignore.html |
| |
| * layout/Verification.cpp: |
| (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForSections): |
| |
| 2020-05-24 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Stop allowing direct access to the underlying SimpleColor (it is almost always incorrect with respect to extended colors) |
| https://bugs.webkit.org/show_bug.cgi?id=212184 |
| |
| Reviewed by Dean Jackson. |
| |
| - Makes Color::rgb() private, removing a class of extended color bugs from users |
| of the Color class. To get the equivilent functionality, users of the class must |
| now use toSRGBASimpleColorLossy() which does actually does the conversion to sRGB |
| if necessary and makes it clear to the caller that precision is being lost. |
| - Removes Color::red()/green()/blue() entirely. They were just calling down to |
| Color::rgb(), and going forward, it won't make sense to think about rgb components |
| of Colors in general, since some extended color spaces don't deal in them (e.g. Lab) |
| Color::alpha() was kept (and fixed to work even with ExtendedColor) since all |
| ExtendedColors do need to have alpha. |
| |
| * accessibility/AccessibilityNodeObject.cpp: |
| (WebCore::AccessibilityNodeObject::colorValue const): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * accessibility/atk/WebKitAccessibleInterfaceText.cpp: |
| (getAttributeSetForAccessibilityObject): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::colorValue const): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * css/DeprecatedCSSOMRGBColor.h: |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * page/CaptionUserPreferencesMediaAF.cpp: |
| (WebCore::CaptionUserPreferencesMediaAF::captionsWindowCSS const): |
| (WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS const): |
| (WebCore::CaptionUserPreferencesMediaAF::captionsTextColor const): |
| User Color::colorWithAlpha() to avoid the need to muck with components directly. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::differenceSquared): |
| Use rgb() directly, which is ok, since this is explicitly checking isExtended(). |
| This code is still wrong (there is a FIXME) as it assumes the two colors are in |
| the same color space. |
| |
| (WebCore::Color::Color): |
| Add constructor which takes an ExtendedColor to allow functions like |
| Color::invertedColorWithAlpha to delegate their functionality to ExtendedColor. |
| |
| (WebCore::Color::light const): |
| Use new SimpleColor::colorWithAlpha() to avoid hardcoding constants here. |
| |
| (WebCore::Color::blend const): |
| (WebCore::Color::blendWithWhite const): |
| Use toSRGBASimpleColorLossy() to get access to color components. These |
| are still not ideal implementations, as they don't preserve extended colors |
| as well as they could, but now they don't return bogus values for extended |
| colors. Minor cleanup bringing constants and lambda inside the function they |
| are used in. |
| |
| (WebCore::Color::colorWithAlpha const): |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): |
| Minor cleanups to use a more consistent style and make use of the new |
| SimpleColor::colorWithAlpha. |
| |
| (WebCore::Color::invertedColorWithAlpha const): |
| Added. Used to avoid direct component usage in line box code. |
| |
| (WebCore::Color::semanticColor const): |
| Added. Hopefully temporary. Used by RenderThemeIOS.mm to convert |
| a Color from a map into a Color with the semantic bit set. This |
| should not be necessary as every color in the map should already |
| have it set, but to avoid uncessary possible behavior changes this |
| preserves that functionality until it can be researched further. |
| Fixing coders to preserve the semantic bit may be required to |
| elliminate the need. |
| |
| (WebCore::Color::colorSpaceAndComponents const): |
| Use rgb() rather than the individual components which have been removed. |
| |
| * platform/graphics/Color.h: |
| (WebCore::SimpleColor::alphaComponentAsFloat const): |
| Added. Needed by DeprecatedCSSOMRGBColor and useful to Color. |
| |
| (WebCore::SimpleColor::colorWithAlpha const): |
| Useful to simplify Color::colorWithAlpha implementations and |
| in Color::dark(). |
| |
| (WebCore::SimpleColor::get const): |
| Added tuple interface to SimpleColor to support structure bindings. |
| NOTE: Unlike the storage of SimpleColor (ARGB), this produces the |
| bindings in the more familiar [r,g,b,a] to match FloatComponents. |
| |
| (WebCore::Color::alpha const): |
| Made work with ExtendedColor as well. |
| |
| (WebCore::Color::red const): Deleted. |
| (WebCore::Color::green const): Deleted. |
| (WebCore::Color::blue const): Deleted. |
| Removed. |
| |
| (CGColorRef cachedCGColor): |
| (int differenceSquared): |
| Made friends so they could use Color::rgb(). |
| |
| (WebCore::Color::rgb const): |
| Made private. |
| |
| * platform/graphics/ExtendedColor.cpp: |
| (WebCore::ExtendedColor::invertedColorWithAlpha const): |
| * platform/graphics/ExtendedColor.h: |
| Added invertedColorWithAlpha to allow inversion to be encapsulated. |
| When future color spaces are added, we may need to choose per-colorspace |
| algorithms for this instead of the trivial one used today. |
| |
| * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: |
| (WebCore::PlatformCAAnimationCocoa::setFromValue): |
| (WebCore::PlatformCAAnimationCocoa::setToValue): |
| (WebCore::PlatformCAAnimationCocoa::setValues): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * platform/graphics/ca/win/PlatformCAAnimationWin.cpp: |
| (PlatformCAAnimationWin::setFromValue): |
| (PlatformCAAnimationWin::setToValue): |
| (PlatformCAAnimationWin::setValues): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::drawFocusRing): |
| Use Color::colorWithAlpha() to avoid needing access to components. |
| |
| * platform/graphics/cpu/arm/filters/FELightingNEON.h: |
| (WebCore::FELighting::platformApplyNeon): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * platform/graphics/texmap/TextureMapperGL.cpp: |
| (WebCore::TextureMapperGL::clearColor): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| * platform/graphics/win/Direct2DOperations.cpp: |
| (WebCore::Direct2D::drawGlyphs): |
| Use colorWithAlphaMultipliedBy() to avoid needing access to components. |
| |
| * platform/graphics/win/FontCGWin.cpp: |
| (WebCore::FontCascade::drawGlyphs): |
| Use colorWithAlphaMultipliedBy() to avoid needing access to components. |
| |
| * platform/graphics/win/FontCascadeDirect2D.cpp: |
| (WebCore::FontCascade::drawGlyphs): |
| Use colorWithAlphaMultipliedBy() to avoid needing access to components. |
| |
| * rendering/EllipsisBox.cpp: |
| (WebCore::EllipsisBox::paintSelection): |
| Use invertedColorWithAlpha() to avoid needing access to components. |
| |
| * rendering/InlineTextBox.cpp: |
| (WebCore::InlineTextBox::resolveStyleForMarkedText): |
| Use invertedColorWithAlpha() to avoid needing access to components. |
| |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::paintBoxShadow): |
| Use opaqueColor() to avoid needing access to components. |
| |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::systemColor const): |
| Use opaqueColor() to avoid needing access to components. |
| |
| * svg/properties/SVGAnimationAdditiveValueFunctionImpl.h: |
| (WebCore::SVGAnimationColorFunction::animate): |
| Use toSRGBASimpleColorLossy() to get access to color components. |
| |
| 2020-05-24 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Take sections into account when computing collapsed border. |
| https://bugs.webkit.org/show_bug.cgi?id=212311 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-collapsed-tbody-border.html |
| |
| * layout/Verification.cpp: |
| (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForSections): |
| * layout/tableformatting/TableGrid.cpp: |
| (WebCore::Layout::TableGrid::Section::Section): |
| (WebCore::Layout::TableGrid::appendCell): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::Section::box const): |
| (WebCore::Layout::TableGrid::sections const): |
| (WebCore::Layout::TableGrid::sections): |
| |
| 2020-05-24 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Take collapsed in-between row border into account when computing cell height |
| https://bugs.webkit.org/show_bug.cgi?id=212307 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-collapsed-row-border2.html |
| |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::computedCellBorder const): |
| |
| 2020-05-23 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Take row border into account when computing collapsed borders. |
| https://bugs.webkit.org/show_bug.cgi?id=212305 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-collapsed-row-border.html |
| |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox): |
| |
| 2020-05-23 Jack Lee <shihchieh_lee@apple.com> |
| |
| ASSERTION FAILED: (!s_current || &m_view != &s_current->m_view) in RenderTreeBuilder::RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=212163 |
| |
| Unreviewed. Improve readability. Replace comments with curly brackets for scoping. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::updateRenderTree): |
| |
| 2020-05-23 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Maximum constraint of a cell should never be smaller than the minimum width |
| https://bugs.webkit.org/show_bug.cgi?id=212304 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-fixed-width-with-wide-content.html |
| |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell): |
| |
| 2020-05-23 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Used height of a cell is the maximum of the computed and the content height. |
| https://bugs.webkit.org/show_bug.cgi?id=212302 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-tall-cell-content-with-fixed-height.html |
| |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const): |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::cellHeigh const): |
| |
| 2020-05-23 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Non-collapsing row border should not make the table wider/taller |
| https://bugs.webkit.org/show_bug.cgi?id=212263 |
| |
| Reviewed by Antti Koivisto. |
| |
| Non-collapsing row border eats into the content box but oddly it does not |
| constraint the cell boxes, so we can end up with smaller row content box than |
| the cell box it contains. |
| |
| Test: fast/layoutformattingcontext/table-simple-row-border.html |
| |
| * layout/LayoutUnits.h: |
| (WebCore::Layout::Edges::width const): |
| (WebCore::Layout::Edges::height const): |
| (WebCore::Layout::HorizontalEdges::width const): Deleted. |
| (WebCore::Layout::VerticalEdges::height const): Deleted. |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForRows): |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell): |
| |
| 2020-05-22 Jack Lee <shihchieh_lee@apple.com> |
| |
| ASSERTION FAILED: (!s_current || &m_view != &s_current->m_view) in RenderTreeBuilder::RenderTreeBuilder |
| https://bugs.webkit.org/show_bug.cgi?id=212163 |
| <rdar://problem/57028096> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Calling ~PostResolutionCallbackDisabler() before completing render tree updating and releasing RenderTreeBuilder |
| triggers this assertion. Therefore we added a utility function "updateRenderTree" in which PostResolutionCallback |
| is delayed until RenderTreeUpdater is released and m_inRenderTreeUpdate is cleared. |
| |
| Test: fast/rendering/nested-render-tree-update-crash.html |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * dom/Document.cpp: |
| (WebCore::Document::updateRenderTree): |
| (WebCore::Document::resolveStyle): |
| (WebCore::Document::updateTextRenderer): |
| * dom/Document.h: |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::RenderTreeUpdater): |
| (WebCore::RenderTreeUpdater::commit): |
| * rendering/updating/RenderTreeUpdater.h: |
| |
| 2020-05-22 Simon Fraser <simon.fraser@apple.com> |
| |
| Stuttery overflow scrolling in slow-scrolling regions (facebook messenger, feedly.com) |
| https://bugs.webkit.org/show_bug.cgi?id=212291 |
| <rdar://problem/61940624> |
| |
| Reviewed by Tim Horton. |
| |
| Now that we do scrolling tree commits on the main thread, ThreadedScrollingTree::scrollingTreeNodeDidScroll() |
| can be called on the main thread. In this case, don't do an RunLoop::main().dispatch() which introduces |
| asynchrony; just call into the ScrollingCoordinator synchronously. |
| |
| Do some minor refactoring to move noteScrollingThreadSyncCompleteForNode() into updateScrollPositionAfterAsyncScroll(). |
| |
| Hard to test because it involves scrolling thread/main thread interactions. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate): |
| (WebCore::AsyncScrollingCoordinator::synchronizeStateFromScrollingTree): |
| (WebCore::AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll): |
| (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScrollTimerFired): |
| (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll): |
| |
| 2020-05-22 Zalan Bujtas <zalan@apple.com> |
| |
| Nullptr deref in WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation when parent and beforeChild are siblings |
| https://bugs.webkit.org/show_bug.cgi?id=212116 |
| <rdar://problem/62993844> |
| |
| Reviewed by Simon Fraser. |
| |
| This patch fixes the case when a nested fragmented context has a spanner and we try to form a continuation while this nested fragmented context is being destroyed. |
| |
| 1. The continuation is triggered by a style change that turns a previously out-of-flow block container into an inflow box |
| (and the parent inline level container can't have the box as a direct child anymore). |
| 2. An unrelated style change nukes the nested fragmented context. We need to "re-assign" the spanner to the parent fragment. |
| |
| These 2 changes are split into 2 phases; first we take care of the tree mutation triggered by the continuation (updateRendererStyle), while |
| we do the fragmented context cleanup (updateAfterDescendants) in a separate step. |
| This 2 phase setup confuses the "where to put this spanner" logic. |
| |
| This patch addresses the issue by keeping the spanner inside the about-to-be-destroyed fragmented context while forming the continuation (phase #1) and let the second phase (updateAfterDescendants) |
| deal with the spanner moving. |
| |
| Test: fast/multicol/nested-multicol-with-spanner-and-continuation.html |
| |
| * rendering/updating/RenderTreeBuilderMultiColumn.cpp: |
| (WebCore::isValidColumnSpanner): |
| |
| 2020-05-22 Chris Dumez <cdumez@apple.com> |
| |
| Revoking an object URL immediately after triggering navigation causes navigation to fail |
| https://bugs.webkit.org/show_bug.cgi?id=212279 |
| <rdar://problem/63553090> |
| |
| Reviewed by Geoffrey Garen. |
| |
| When doing a policy check for a Blob URL, we clone the blob and create a new temporary Blob URL |
| that stays alive for the duration of the policy check. We made sure to update the ResourceRequest |
| URL with the new Blob URL, however, we were failing to update the DocumentLoader's request. |
| As a result, if the client responded with Policy USE, the DocumentLoader would still attempt to |
| navigate to the old Blob URL. |
| |
| Test: fast/loader/revoke-blob-url-after-navigation.html |
| |
| * loader/PolicyChecker.cpp: |
| (WebCore::FrameLoader::PolicyChecker::extendBlobURLLifetimeIfNecessary const): |
| (WebCore::FrameLoader::PolicyChecker::checkNavigationPolicy): |
| (WebCore::FrameLoader::PolicyChecker::checkNewWindowPolicy): |
| * loader/PolicyChecker.h: |
| |
| 2020-05-22 Simon Fraser <simon.fraser@apple.com> |
| |
| Make sure we clean up CFTimerRefs when destroying scrolling tree nodes |
| https://bugs.webkit.org/show_bug.cgi?id=212278 |
| <rdar://problem/63548212> |
| |
| Reviewed by Tim Horton. |
| |
| When destroying scrolling tree nodes, make sure we explicitly stop the RunLoop::Timers, |
| and do this for all nodes when clearing the m_nodeMap, not just for orphaned nodes as |
| was done in r262042. |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::commitTreeState): |
| (WebCore::ScrollingTree::updateTreeFromStateNodeRecursive): |
| (WebCore::ScrollingTree::removeAllNodes): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ScrollingTreeNode.h: |
| (WebCore::ScrollingTreeNode::willBeDestroyed): |
| (WebCore::ScrollingTreeNode::wasRemovedFromTree): Deleted. |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::willBeDestroyed): |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::wasRemovedFromTree): Deleted. |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeOverflowScrollingNodeMac::willBeDestroyed): |
| (WebCore::ScrollingTreeOverflowScrollingNodeMac::wasRemovedFromTree): Deleted. |
| |
| 2020-05-22 Andres Gonzalez <andresg_22@apple.com> |
| |
| Updates to the isolated tree must happen before posting notifications to clients. |
| https://bugs.webkit.org/show_bug.cgi?id=212266 |
| |
| Reviewed by Chris Fleizach. |
| |
| Multiple tests. |
| |
| In AXObjectCache::notificationPostTimerFired we were updating the |
| isolated tree after the notifications were posted to the platform |
| clients. This caused that in some cases when the client requested info |
| as the result of those notifications, the isolated tree was out-of-date. |
| In this patch updateIsolatedTree is called before notifying platform clients. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::notificationPostTimerFired): |
| (WebCore::AXObjectCache::postNotification): |
| (WebCore::AXObjectCache::postTextStateChangeNotification): |
| (WebCore::AXObjectCache::updateIsolatedTree): |
| |
| 2020-05-22 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Make alpha premultiplication code more consistent and clear regarding what works with extended colors |
| https://bugs.webkit.org/show_bug.cgi?id=212265 |
| |
| Reviewed by Simon Fraser. |
| |
| - Adds premultiplied(const FloatComponents&) to do premutiplication directly on FloatComponents |
| rather than doing it on the ints and losing precision. |
| - Makes non-FloatComponent alpha premultiplication all take place only for SimpleColors as that |
| is what callers need. The existing premulitplication for ExtendedColors in blend() was incorrect |
| as it never did a conversion to sRGB. |
| - Adds new toSRGBASimpleColorLossy() (to complement toSRGBAComponentsLossy()). Will make it easy |
| to find all the conversions in the future. |
| - Broke non-premultiplying blend() out of blend() (removing parameter) and made a new blendWithoutPremultiply() |
| function for it (no callers needed to make this decision dynamically). |
| |
| * css/CSSGradientValue.cpp: |
| (WebCore::CSSGradientValue::computeStops): |
| Use blendWithoutPremultiply() explicitly. |
| |
| * platform/graphics/Color.h: |
| * platform/graphics/Color.cpp: |
| (WebCore::makePremultipliedRGBA): Renamed from premultipliedARGBFromColor and now only operates on SimpleColors. |
| (WebCore::makeUnPremultipliedRGBA): Renamed from colorFromPremultipliedARGB and now only operates on SimpleColors. |
| (WebCore::colorFromPremultipliedARGB): Deleted. |
| (WebCore::premultipliedARGBFromColor): Deleted. |
| |
| (WebCore::Color::toSRGBASimpleColorLossy const): |
| Added. Useful for finding all non-colorspace preserving users of the color channels. |
| |
| (WebCore::blend): |
| (WebCore::blendWithoutPremultiply): |
| Split these out from each other. Made blend() use toSRGBASimpleColorLossy() and do all |
| operations on SimpleColors directly. The old code that preported to work with extended |
| colors was nonsense as it didn't actually take the colorspaces into account, just grabbed |
| the channels regardless of space. |
| |
| * platform/graphics/cairo/ImageBufferCairoImageSurfaceBackend.cpp: |
| (WebCore::ImageBufferCairoImageSurfaceBackend::platformTransformColorSpace): |
| Adopt update premulitiplication names and stay in SimpleColor for entire conversion. |
| |
| * platform/graphics/cairo/NativeImageCairo.cpp: |
| (WebCore::nativeImageSinglePixelSolidColor): |
| Adopt update premulitiplication names. |
| |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::premultiplied): |
| * platform/graphics/ColorUtilities.h: |
| * platform/graphics/texmap/TextureMapperGL.cpp: |
| (WebCore::TextureMapperGL::drawBorder): |
| (WebCore::prepareFilterProgram): |
| (WebCore::TextureMapperGL::drawSolidColor): |
| Add and adopt premultiplied(const FloatComponents&). |
| |
| 2020-05-22 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Add new ApplePayInstallmentConfiguration members |
| https://bugs.webkit.org/show_bug.cgi?id=212160 |
| <rdar://problem/60703650> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: http/tests/ssl/applepay/ApplePayInstallmentItems.https.html |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: Added IDLs, headers, and derived sources for |
| ApplePayInstallment{Item,ItemType,RetailChannel}. |
| |
| * Modules/applepay/ApplePayInstallmentConfiguration.idl: |
| * Modules/applepay/ApplePayInstallmentConfigurationWebCore.h: Added items, |
| applicationMetadata, and retailChannel members. Added missing conditionals to |
| merchantIdentifier and referrerIdentifier. |
| |
| * Modules/applepay/ApplePayInstallmentItem.h: |
| * Modules/applepay/ApplePayInstallmentItem.idl: |
| * Modules/applepay/ApplePayInstallmentItemType.h: |
| * Modules/applepay/ApplePayInstallmentItemType.idl: |
| * Modules/applepay/ApplePayInstallmentRetailChannel.h: |
| * Modules/applepay/ApplePayInstallmentRetailChannel.idl: Added. |
| |
| * Modules/applepay/ApplePayRequestBase.cpp: |
| (WebCore::convertAndValidate): Changed to call PaymentInstallmentConfiguration::create, |
| returning an exception if present. |
| |
| * Modules/applepay/PaymentInstallmentConfiguration.mm: |
| (WebCore::fromDecimalNumber): Allowed for a large maximum number of fractional digits to |
| support formatting high-precision currency and APRs (note that this formatter is only used |
| for test support). |
| |
| (WebCore::applePayItemType): |
| (WebCore::platformItemType): Added to convert between PKInstallmentItemType and |
| ApplePayInstallmentItemType. |
| |
| (WebCore::applePayRetailChannel): |
| (WebCore::platformRetailChannel): Added to convert between PKInstallmentRetailChannel and |
| ApplePayInstallmentRetailChannel. |
| |
| (WebCore::makeNSArrayElement): |
| (WebCore::makeVectorElement): Added to convert between NSArray<PKPaymentInstallmentItem *> |
| and Vector<ApplePayInstallmentItem>. |
| |
| (WebCore::createPlatformConfiguration): Added a parameter for passing in applicationMetadata |
| as an NSDictionary. Set properties on PKPaymentInstallmentConfiguration for new |
| ApplePayInstallmentConfiguration members. |
| (WebCore::PaymentInstallmentConfiguration::create): Added; converts the applicationMetadata |
| JSON string (if present) to an NSDictionary, returning a TypeError if the JSON string does |
| not deserialize to an NSDictionary (as PassKit requires). |
| (WebCore::PaymentInstallmentConfiguration::PaymentInstallmentConfiguration): Added a |
| parameter for passing in applicationMetadata as an NSDictionary. Made private. |
| (WebCore::PaymentInstallmentConfiguration::applePayInstallmentConfiguration const): Set |
| members on ApplePayInstallmentConfiguration for new PKPaymentInstallmentConfiguration |
| properties. |
| |
| * Modules/applepay/PaymentInstallmentConfigurationWebCore.h: |
| |
| 2020-05-22 Alex Christensen <achristensen@webkit.org> |
| |
| Add SPI to unblock third party cookies from WKWebViews with ResourceLoadStatistics turned on |
| https://bugs.webkit.org/show_bug.cgi?id=212058 |
| <rdar://problem/60595539> |
| |
| Reviewed by John Wilander. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * loader/CookieJar.cpp: |
| (WebCore::shouldRelaxThirdPartyCookieBlocking): |
| (WebCore::CookieJar::cookies const): |
| (WebCore::CookieJar::setCookies): |
| (WebCore::CookieJar::cookieRequestHeaderFieldValue const): |
| (WebCore::CookieJar::getRawCookies const): |
| * page/Page.cpp: |
| (WebCore::m_shouldRelaxThirdPartyCookieBlocking): |
| * page/Page.h: |
| (WebCore::Page::shouldRelaxThirdPartyCookieBlocking const): |
| * page/PageConfiguration.h: |
| * platform/network/CacheValidation.cpp: |
| (WebCore::cookieRequestHeaderFieldValue): |
| * platform/network/NetworkStorageSession.cpp: |
| (WebCore::NetworkStorageSession::shouldBlockCookies const): |
| (WebCore::NetworkStorageSession::maxAgeCacheCap): |
| * platform/network/NetworkStorageSession.h: |
| * platform/network/ShouldRelaxThirdPartyCookieBlocking.h: Added. |
| * platform/network/cf/NetworkStorageSessionCFNetWin.cpp: |
| (WebCore::NetworkStorageSession::setCookiesFromDOM const): |
| (WebCore::NetworkStorageSession::cookiesForDOM const): |
| (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): |
| (WebCore::NetworkStorageSession::getRawCookies const): |
| * platform/network/cocoa/NetworkStorageSessionCocoa.mm: |
| (WebCore::NetworkStorageSession::cookiesForURL const): |
| (WebCore::NetworkStorageSession::cookiesForSession const): |
| (WebCore::NetworkStorageSession::cookiesForDOM const): |
| (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): |
| (WebCore::NetworkStorageSession::setCookiesFromDOM const): |
| (WebCore::NetworkStorageSession::getRawCookies const): |
| * platform/network/curl/NetworkStorageSessionCurl.cpp: |
| (WebCore::NetworkStorageSession::setCookiesFromDOM const): |
| (WebCore::NetworkStorageSession::cookiesForDOM const): |
| (WebCore::NetworkStorageSession::getRawCookies const): |
| (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): |
| * platform/network/curl/ResourceHandleCurl.cpp: |
| (WebCore::ResourceHandle::createCurlRequest): |
| * platform/network/soup/NetworkStorageSessionSoup.cpp: |
| (WebCore::NetworkStorageSession::setCookiesFromDOM const): |
| (WebCore::NetworkStorageSession::getRawCookies const): |
| (WebCore::cookiesForSession): |
| (WebCore::NetworkStorageSession::cookiesForDOM const): |
| (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): |
| |
| 2020-05-22 Oriol Brufau <obrufau@igalia.com> |
| |
| Don't put out-of-flow boxes in anonymous flex/grid items |
| https://bugs.webkit.org/show_bug.cgi?id=205386 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| A single anonymous flex/grid item should just contain a contiguous |
| sequence of text runs. |
| |
| This patch is based on https://crrev.com/533825 from Chromium. |
| |
| Tests: imported/w3c/web-platform-tests/css/css-flexbox/anonymous-flex-item-004.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/anonymous-grid-item-001.html |
| |
| * rendering/updating/RenderTreeBuilderBlock.cpp: |
| (WebCore::RenderTreeBuilder::Block::attachIgnoringContinuation): |
| |
| 2020-05-22 Tim Horton <timothy_horton@apple.com> |
| |
| iOS: Pressing tab in the Mail subject field moves focus to the body, but pressing shift tab doesn't move it back |
| https://bugs.webkit.org/show_bug.cgi?id=212243 |
| <rdar://problem/59127764> |
| |
| Reviewed by Wenson Hsieh. |
| |
| New API Tests: WebKit.ShiftTabTakesFocusFromEditableWebView and WebKit.TabDoesNotTakeFocusFromEditableWebView |
| |
| * page/FocusController.cpp: |
| (WebCore::FocusController::relinquishFocusToChrome): |
| (WebCore::FocusController::advanceFocusInDocumentOrder): |
| * page/FocusController.h: |
| Factor out the code that decides whether the Chrome might accept focus, |
| and transfers focus out to the Chrome, for use in EventHandler. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::defaultTabEventHandler): |
| In the case where we are shift-tabbing out of an editable web view, |
| allow focus to pass to the Chrome. Previously, we would not allow this, |
| because tabKeyCyclesThroughElements is false in editable web views. |
| However, focus exiting the web view entirely needn't be covered by |
| "cycles through elements" behavior. |
| We can't do this for plain "tab", because that needs to be allowed to |
| insert a tab character instead. |
| |
| 2020-05-22 Tyler Wilcock <twilco.o@protonmail.com> |
| |
| Cannot style ::selection for a flex container |
| https://bugs.webkit.org/show_bug.cgi?id=209822 |
| |
| Reviewed by Antti Koivisto. |
| |
| When needing to query for pseudostyles, RenderText used to unconditionally check the parent's pseudostyles. The parent of |
| RenderText objects is often an anonymous box, depending on the presence of siblings, `display` type, etc. This is problematic |
| as pseudostyles are associated with an element of the DOM, meaning RenderText elements would often fail to find any pseudostyle |
| thanks to their anonymous parent. |
| |
| This patch changes RenderText to traverse its tree of ancestry upwards until it finds a non-anonymous ancestor and gets those pseudostyles, |
| rather than unconditionally trying to get pseudostyles from its direct parent. |
| |
| Blink does something similar when retrieving pseudostyles: |
| |
| https://github.com/chromium/chromium/blob/793cb59c18334f8b506863192bf630776da0f4d2/third_party/blink/renderer/core/paint/selection_painting_utils.cc#L54 |
| |
| Tests: editing/selection/selection-display-block-sibling.html |
| editing/selection/selection-display-flex.html |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::firstNonAnonymousAncestor const): |
| * rendering/RenderObject.h: |
| * rendering/RenderText.h: |
| (WebCore::RenderText::getCachedPseudoStyle const): getCachedPseudoStyle from first non-anonymous ancestor, rather than only checking the direct parent. |
| (WebCore::RenderText::selectionBackgroundColor const): Retrieve selectionBackgroundColor from first non-anonymous ancestor rather than only checking the direct parent. |
| (WebCore::RenderText::selectionForegroundColor const): Retrieve selectionForegroundColor from first non-anonymous ancestor rather than only checking the direct parent. |
| (WebCore::RenderText::selectionEmphasisMarkColor const): Retrieve selectionEmphasisMarkColor from first non-anonymous ancestor rather than only checking the direct parent. |
| (WebCore::RenderText::selectionPseudoStyle const): Retrieve selectionPseudoStyle from first non-anonymous ancestor rather than only checking the direct parent. |
| |
| 2020-05-21 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| DataTransfer.files contains multiple files when pasting a single image with multiple representations |
| https://bugs.webkit.org/show_bug.cgi?id=212245 |
| <rdar://problem/60240436> |
| |
| Reviewed by Tim Horton. |
| |
| When pasting or dropping a single image that is backed by multiple representations in NSPasteboard (or |
| UIPasteboard), we currently report more than one `File` to the page via `DataTransfer.files`. This is because |
| `Pasteboard::read(PasteboardFileReader&)`, which is responsible for converting the contents of the pasteboard |
| into a list of files, currently iterates over every pasteboard type and adds each of them as a file. This is |
| wrong when an item has multiple type representations. |
| |
| To differentiate the case where a single item has multiple representations from the case where it has multiple |
| pasteboard items, we use `allPasteboardItemInfo()` instead to grab a per-item list of types from the pasteboard |
| on Cocoa platforms, and only create at most 1 file per item using the highest fidelity type that contains data. |
| |
| Test: PasteImage.PasteImageWithMultipleRepresentations |
| |
| * platform/cocoa/PasteboardCocoa.mm: |
| (WebCore::Pasteboard::read): |
| |
| 2020-05-21 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix rare scrolling thread crash firing the m_delayedRenderingUpdateDetectionTimer timer |
| https://bugs.webkit.org/show_bug.cgi?id=212250 |
| |
| Reviewed by Tim Horton. |
| |
| It seems that we can fire the m_delayedRenderingUpdateDetectionTimer timer after the |
| ScrollingTree has been destroyed (possibly because it's destroyed on another thread |
| and CFRunLoopTimerRef isn't threadsafe), so explicitly clear the timer in invalidate() |
| while holding m_treeMutex. |
| |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::invalidate): |
| |
| 2020-05-21 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Move Color coder definitions to Color to allow for future encaspulation improvements |
| https://bugs.webkit.org/show_bug.cgi?id=212247 |
| |
| Reviewed by Simon Fraser. |
| |
| Move IPC encoder/decoder definitions from WebKit down into Color itself to move closer |
| to making Color::rgb() private. |
| |
| * platform/graphics/Color.h: |
| (WebCore::Color::encode const): |
| (WebCore::Color::decode): |
| |
| 2020-05-21 Simon Fraser <simon.fraser@apple.com> |
| |
| Scrolling thread scrolls on sync-scrolling scrollers don't get to the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=212225 |
| |
| Fix builds that use Nicosia after r262041. |
| |
| * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp: |
| (WebCore::ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged): |
| * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h: |
| |
| 2020-05-21 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix some thread safety issues with ScrollController timers |
| https://bugs.webkit.org/show_bug.cgi?id=212238 |
| |
| Reviewed by Wenson Hsieh. |
| |
| There were some problems with the timers fired by ScrollController, used for rubber-banding |
| and scroll snap. |
| |
| First, they could fire on the main thread when we intended them to fire on the scrolling thread. |
| This happened because in r260716 I made the scrolling tree commit on the main thread, so we'd |
| construct the ScrollingTreeScrollingNodeDelegateMac and its ScrollController there and its |
| timers would grab the main thread runloop. Fix by creating the timers on demand. |
| |
| Secondly, the timer callbacks called into scrolling tree code, but without taking |
| the scrolling tree lock, |
| and without any guarantee that the node would stay alive for the duration of the callback. |
| Fix by having the ScrollControllerClient create the timers, allowing the client to have |
| a callback wrapper that locks, and to ensure object lifetime (or make a weak ref). Now |
| that scrolling tree nodes could be extended by a pending timer, we need to explicitly |
| clear the timers when nodes are removed from the tree. |
| |
| Finally, rename some confusingly named ScrollControllerClient functions. |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::commitTreeState): |
| * page/scrolling/ScrollingTree.h: |
| (WebCore::ScrollingTree::treeMutex): |
| * page/scrolling/ScrollingTreeNode.h: |
| (WebCore::ScrollingTreeNode::wasBeRemovedFromTree): |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::wasBeRemovedFromTree): |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeOverflowScrollingNodeMac::wasBeRemovedFromTree): |
| * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.h: |
| * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::nodeWillBeDestroyed): |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::createTimer): |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::didStopRubberbandSnapAnimation): |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::willStartScrollSnapAnimation): |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::didStopScrollSnapAnimation): |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::stopSnapRubberbandTimer): Deleted. |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::startScrollSnapTimer): Deleted. |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::stopScrollSnapTimer): Deleted. |
| * platform/ScrollAnimator.cpp: |
| (WebCore::ScrollAnimator::createTimer): |
| * platform/ScrollAnimator.h: |
| * platform/cocoa/ScrollController.h: |
| (WebCore::ScrollControllerTimer::ScrollControllerTimer): |
| (WebCore::ScrollControllerClient::willStartRubberBandSnapAnimation): |
| (WebCore::ScrollControllerClient::didStopRubberbandSnapAnimation): |
| (WebCore::ScrollControllerClient::willStartScrollSnapAnimation): |
| (WebCore::ScrollControllerClient::didStopScrollSnapAnimation): |
| (WebCore::ScrollControllerClient::startSnapRubberbandTimer): Deleted. |
| (WebCore::ScrollControllerClient::stopSnapRubberbandTimer): Deleted. |
| (WebCore::ScrollControllerClient::startScrollSnapTimer): Deleted. |
| (WebCore::ScrollControllerClient::stopScrollSnapTimer): Deleted. |
| * platform/cocoa/ScrollController.mm: |
| (WebCore::ScrollController::ScrollController): |
| (WebCore::ScrollController::stopAllTimers): |
| (WebCore::ScrollController::handleWheelEvent): |
| (WebCore::ScrollController::snapRubberBandTimerFired): |
| (WebCore::ScrollController::isRubberBandInProgress const): |
| (WebCore::ScrollController::isScrollSnapInProgress const): |
| (WebCore::ScrollController::startSnapRubberbandTimer): |
| (WebCore::ScrollController::stopSnapRubberbandTimer): |
| (WebCore::ScrollController::snapRubberBand): |
| (WebCore::ScrollController::scheduleStatelessScrollSnap): |
| (WebCore::ScrollController::statelessSnapTransitionTimerFired): |
| (WebCore::ScrollController::startScrollSnapTimer): |
| (WebCore::ScrollController::stopScrollSnapTimer): |
| * platform/mac/ScrollAnimatorMac.h: |
| |
| 2020-05-21 Simon Fraser <simon.fraser@apple.com> |
| |
| Scrolling thread scrolls on sync-scrolling scrollers don't get to the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=212225 |
| |
| Reviewed by Tim Horton. |
| |
| Some scrolls on nodes with synchronousScrollingReasons failed to set the m_scrolledSinceLastCommit bit, |
| because ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged() bypassed a call to the superclass. |
| |
| Fix by passing ScrollingLayerPositionAction so that it can just call super. |
| |
| This will be tested by existing tests after some upcoming scroll snap changes. |
| |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged): |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged): |
| |
| 2020-05-21 Peng Liu <peng.liu6@apple.com> |
| |
| Fix issues of the Picture-in-Picture API under stress tests |
| https://bugs.webkit.org/show_bug.cgi?id=212191 |
| |
| Reviewed by Eric Carlson. |
| |
| The current implementation of the Picture-in-Picture API is not robust under stress tests. |
| Changing the video presentation mode of a video element between inline and picture-in-picture |
| continuously may corrupt the internal states of the video element. |
| |
| This patch refactors the approach to tracking the progress of video presentation mode changes |
| and make sure no new requestPictureInPicture() or exitPictureInPicture() will trigger |
| a presentation mode change unless the previous operations are completed. |
| |
| This patch also removes the code for testing purposes in the HTMLVideoElement class. |
| |
| Covered by existing tests. |
| |
| * html/HTMLMediaElement.h: |
| * html/HTMLVideoElement.cpp: |
| (WebCore::toPresentationMode): |
| (WebCore::HTMLVideoElement::setFullscreenMode): |
| (WebCore::HTMLVideoElement::fullscreenModeChanged): |
| (WebCore::HTMLVideoElement::didEnterFullscreen): |
| (WebCore::HTMLVideoElement::didExitFullscreen): |
| (WebCore::HTMLVideoElement::setPictureInPictureObserver): |
| (WebCore::HTMLVideoElement::setVideoFullscreenFrame): |
| (WebCore::HTMLVideoElement::didBecomeFullscreenElement): Deleted. |
| (WebCore::HTMLVideoElement::setPictureInPictureAPITestEnabled): Deleted. |
| * html/HTMLVideoElement.h: |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::setPictureInPictureAPITestEnabled): Deleted. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| Remove setPictureInPictureAPITestEnabled(). |
| |
| 2020-05-21 Sam Weinig <weinig@apple.com> |
| |
| Extended Color Cleanup: Remove trivial uses of Color::rgb() |
| https://bugs.webkit.org/show_bug.cgi?id=212231 |
| |
| Reviewed by Darin Adler |
| |
| Replaces a few unnecessary uses of Color::rgb(): |
| - Uses of an idiom where code round-tripped a Color via Color(myColor.rgb()). This is |
| not compatible with extended colors and seems to be unnecessary. |
| - Uses of colorWithOverrideAlpha(). This function requires a SimpleColor, so required |
| using color.rgb(). We can't transition to Color::colorWithAlpha due to a slightly |
| different rounding of the alpha, so a new function Color::colorWithAlphaUsingAlternativeRounding |
| was added to which implements the alternative rounding. A later change can reconcile |
| the two versions. |
| - Creation of D2D1::ColorF. D2D1::ColorF has a constructor that takes a four floats that |
| is used instead. |
| - Comparing two colors using rgb() for each to avoid comparing the semantic bit. equalIgnoringSemanticColor |
| exists for just this use. |
| |
| * editing/cocoa/HTMLConverter.mm: |
| (HTMLConverterCaches::colorPropertyValueForNode): |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::addHTMLColorToStyle): |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::setStrokeStyle): |
| (WebCore::CanvasRenderingContext2DBase::setFillStyle): |
| (WebCore::CanvasRenderingContext2DBase::setShadow): |
| * html/canvas/CanvasStyle.cpp: |
| (WebCore::CanvasStyle::createFromStringWithOverrideAlpha): |
| * html/track/InbandGenericTextTrack.cpp: |
| (WebCore::InbandGenericTextTrack::updateCueFromCueData): |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::colorWithAlphaMultipliedByUsingAlternativeRounding const): |
| (WebCore::Color::colorWithAlpha const): |
| (WebCore::Color::colorWithAlphaUsingAlternativeRounding const): |
| (WebCore::colorWithOverrideAlpha): Deleted. |
| * platform/graphics/Color.h: |
| (WebCore::colorWithOverrideAlpha): Deleted. |
| * platform/graphics/cairo/CairoOperations.cpp: |
| (WebCore::Cairo::prepareCairoContextSource): |
| * platform/graphics/filters/FEFlood.cpp: |
| (WebCore::FEFlood::platformApplySoftware): |
| * platform/graphics/win/ColorDirect2D.cpp: |
| (WebCore::Color::operator D2D1_COLOR_F const): |
| (WebCore::Color::operator D2D1_VECTOR_4F const): |
| * platform/graphics/win/GraphicsContextDirect2D.cpp: |
| (WebCore::GraphicsContext::colorWithGlobalAlpha const): |
| * platform/mac/ThemeMac.mm: |
| (WebCore::drawCellFocusRingWithFrameAtTime): |
| * rendering/RenderThemeIOS.mm: |
| (WebCore::RenderThemeIOS::paintFileUploadIconDecorations): |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::platformFocusRingColor const): |
| * rendering/RenderTreeAsText.cpp: |
| (WebCore::RenderTreeAsText::writeRenderObject): |
| * svg/SVGStopElement.cpp: |
| (WebCore::SVGStopElement::stopColorIncludingOpacity const): |
| |
| 2020-05-21 Oriol Brufau <obrufau@igalia.com> |
| |
| [css-grid] Don't create renderers for whitespace nodes |
| https://bugs.webkit.org/show_bug.cgi?id=212220 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Even with 'white-space: pre' we shouldn't create RenderTexts |
| for whitespace-only nodes in grid layout, according to |
| https://drafts.csswg.org/css-grid/#grid-items |
| |
| This patch is based on https://codereview.chromium.org/16888008 |
| |
| Tests: fast/text/simple-line-layout-with-zero-sized-font.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/whitespace-in-grid-item-001.html |
| |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::textRendererIsNeeded): |
| |
| 2020-05-21 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix rare crash in TileGrid::platformCALayerShowRepaintCounter() |
| https://bugs.webkit.org/show_bug.cgi?id=212182 |
| <rdar://problem/55618414> |
| |
| Reviewed by Darin Adler. |
| |
| Crash data suggest that owner() can be null in platformCALayerShowRepaintCounter(), |
| so null-check in these functions. |
| |
| * platform/graphics/ca/TileGrid.cpp: |
| (WebCore::TileGrid::platformCALayerDeviceScaleFactor const): |
| (WebCore::TileGrid::platformCALayerShowDebugBorders const): |
| (WebCore::TileGrid::platformCALayerShowRepaintCounter const): |
| (WebCore::TileGrid::isUsingDisplayListDrawing const): |
| |
| 2020-05-21 Youenn Fablet <youenn@apple.com> |
| |
| Incorrect location.origin in blob workers |
| https://bugs.webkit.org/show_bug.cgi?id=211876 |
| <rdar://problem/63284717> |
| |
| Reviewed by Sihui Liu. |
| |
| Instead of computing the origin from the location URL in worker, get it directly from the WorkerGlobalScope origin. |
| This ensures we unwrap properly blob URLs. |
| |
| Test: http/tests/security/contentSecurityPolicy/worker-blob-location.html |
| |
| * workers/WorkerGlobalScope.cpp: |
| (WebCore::WorkerGlobalScope::location const): |
| * workers/WorkerLocation.cpp: |
| (WebCore::WorkerLocation::origin const): |
| * workers/WorkerLocation.h: |
| (WebCore::WorkerLocation::create): |
| (WebCore::WorkerLocation::url const): |
| (WebCore::WorkerLocation::WorkerLocation): |
| |
| 2020-05-21 John Wilander <wilander@apple.com> |
| |
| Storage Access API: Allow configurable storage access scope |
| https://bugs.webkit.org/show_bug.cgi?id=212114 |
| <rdar://problem/63423063> |
| |
| Reviewed by Alex Christensen. |
| |
| The scope of storage access as per-frame or per-page was discussed in the |
| standards process here: https://github.com/privacycg/storage-access/issues/3 |
| |
| The decision was to have per-page storage access by default. Recent feedback |
| from Google and conversation with Mozilla suggest that we might want to |
| support the caller choosing the scope. |
| |
| This patch adds support for different scope configurations while keeping the |
| existing default as per-frame. A later patch will switch the default and add |
| test cases for per-page scope. |
| |
| A new struct is added WebCore::RequestStorageAccessResult which carries full |
| information about the storage access request result. |
| |
| A new enum is added WebCore::StorageAccessScope to encode per-frame and |
| per-page access. |
| |
| No new tests. No changed functionality. Tests already exist. |
| |
| * dom/DocumentStorageAccess.cpp: |
| (WebCore::DocumentStorageAccess::requestStorageAccess): |
| * dom/DocumentStorageAccess.h: |
| (WebCore::RequestStorageAccessResult::encode const): |
| (WebCore::RequestStorageAccessResult::decode): |
| * page/ChromeClient.h: |
| (WebCore::ChromeClient::requestStorageAccess): |
| |
| 2020-05-21 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> |
| |
| [PlayStation] Add minimal WKView API to enable TestWebKitAPI |
| https://bugs.webkit.org/show_bug.cgi?id=211868 |
| |
| Reviewed by Alex Christensen. |
| |
| Enable TestWebKitAPI |
| |
| * PlatformPlayStation.cmake: |
| Add WebKitRequirements library to WebCore_CopySharedLibs. |
| |
| 2020-05-21 Chris Dumez <cdumez@apple.com> |
| |
| ASSERTION FAILED: m_wrapper on fast/events/scoped/editing-commands.html |
| https://bugs.webkit.org/show_bug.cgi?id=209862 |
| <rdar://problem/61164607> |
| |
| Reviewed by Darin Adler. |
| |
| Make sure ScopedEventQueue keeps its event targets alive using a GCReachableRef<Node> |
| so that it keeps alive both the target and its JS wrapper. |
| |
| No new tests, covered by existing test. |
| |
| * dom/ScopedEventQueue.cpp: |
| (WebCore::ScopedEventQueue::enqueueEvent): |
| (WebCore::ScopedEventQueue::dispatchEvent const): |
| (WebCore::ScopedEventQueue::dispatchAllEvents): |
| * dom/ScopedEventQueue.h: |
| |
| 2020-05-21 Sihui Liu <sihui_liu@apple.com> |
| |
| SQLite database fails to close in SQLiteIDBBackingStore::databaseNameFromFile |
| https://bugs.webkit.org/show_bug.cgi?id=212090 |
| |
| Reviewed by Darin Adler. |
| |
| We should finish SQLite statement before closing database. |
| |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::databaseNameFromFile): |
| |
| 2020-05-21 Doug Kelly <dougk@apple.com> |
| |
| Dispatch pending events only for current page |
| https://bugs.webkit.org/show_bug.cgi?id=211975 |
| <rdar://problem/58942759> |
| |
| Reviewed by Chris Dumez. |
| |
| Document::implicitClose() should not dispatch events globally. The EventSender class operates as a singleton pattern |
| for each event queue, so to add some means to restrict which documents are handling events, we can send the current |
| page pointer and only dispatch the event if the event is for the same page. Other events are simply re-enqueued |
| to be triggered at a later time. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::implicitClose): |
| * dom/EventSender.h: |
| (WebCore::EventSender::timerFired): |
| (WebCore::EventSender<T>::dispatchPendingEvents): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::dispatchPendingLoadEvents): |
| * html/HTMLLinkElement.h: |
| * html/HTMLStyleElement.cpp: |
| (WebCore::HTMLStyleElement::dispatchPendingLoadEvents): |
| * html/HTMLStyleElement.h: |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::dispatchPendingBeforeLoadEvents): |
| (WebCore::ImageLoader::dispatchPendingLoadEvents): |
| (WebCore::ImageLoader::dispatchPendingErrorEvents): |
| * loader/ImageLoader.h: |
| (WebCore::ImageLoader::document): |
| * xml/parser/XMLDocumentParser.cpp: |
| (WebCore::XMLDocumentParser::append): |
| |
| 2020-05-21 Simon Fraser <simon.fraser@apple.com> |
| |
| [macOS] Scrolling synchronization part 2: Have the scrolling thread detect when the main thread is slow to respond to start a rendering update |
| https://bugs.webkit.org/show_bug.cgi?id=212175 |
| |
| Reviewed by Tim Horton. |
| |
| The scrolling thread now detects when a main thread rendering update is taking too long, going into |
| desynchronized mode when that happens. |
| |
| However, there's another state that needs to be handled, which is the main thread being busy and |
| taking too long to start the rendering update. The scrolling thread gets a "displayDidRefresh" ping |
| and expects that the main thread will get the same ping, and use it to start the rendering update, |
| but a busy main thread won't respond to this ping promptly. |
| |
| Detect this with a short-duration (1ms) timer that fires on the scrolling thread; if the timer fires |
| we go into desynchronized mode until the next update. The timer is canceled if the scrolling thread |
| receives the willStartRenderingUpdate(). |
| |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout): |
| (WebCore::ThreadedScrollingTree::scheduleDelayedRenderingUpdateDetectionTimer): |
| (WebCore::ThreadedScrollingTree::delayedRenderingUpdateDetectionTimerFired): |
| (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread): |
| * page/scrolling/ThreadedScrollingTree.h: |
| |
| 2020-05-21 Sergio Villar Senin <svillar@igalia.com> |
| |
| [css-grid] [css-flex] Width of table as grid/flex item is infinite when the sum of columns' width exceed 100% |
| https://bugs.webkit.org/show_bug.cgi?id=191365 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Automatic table layout algorithm generates infinite width tables |
| (tableMaxWidth to be more exact) when the sum of the columns percentages |
| exceed the 100% value and there is at least one non-percentage based |
| column with positive width as in those cases it's impossible to fulfill |
| the table constrains. That should not be done in the case of the table |
| being a flex or a grid item because they both define new formatting |
| contexts. |
| |
| Based on Blink's crrev.com/1095220 by <mstensho@chromium.org> |
| |
| * rendering/AutoTableLayout.cpp: |
| (WebCore::shouldScaleColumnsForParent): return false when the table is |
| either a grid or a flex item. |
| |
| 2020-05-21 Zalan Bujtas <zalan@apple.com> |
| |
| [ macOS debug ] REGRESSION: fast/layoutformattingcontext/table-basic-row-baseline-with-nested-table.html is a flaky crash |
| https://bugs.webkit.org/show_bug.cgi?id=212139 |
| <rdar://problem/63447683> |
| |
| Reviewed by Antti Koivisto. |
| |
| Uninitialized row baseline value caused unexpected cell height in nested tables. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForRows): |
| * layout/tableformatting/TableGrid.h: |
| |
| 2020-05-21 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Collapse in-between cell borders |
| https://bugs.webkit.org/show_bug.cgi?id=212183 |
| |
| Reviewed by Antti Koivisto. |
| |
| This patch expands border collapsing to in-between cell borders. |
| |
| Test: fast/layoutformattingcontext/table-simple-border-collapse3.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::computedCellBorder const): |
| (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell): |
| |
| 2020-05-21 Enrique Ocaña González <eocanha@igalia.com> |
| |
| [GStreamer][GTK][WPE] Expose and honor the media content types requiring hardware support setting |
| https://bugs.webkit.org/show_bug.cgi?id=211950 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Provide the needed information about media content types requiring hardware support |
| when asking the MediaPlayer about what types are supported. This was already being done |
| from HTMLMediaElement for player selection, but not in MediaSource nor in |
| MediaSource::addSourceBuffer() when the webpage used the MSE API to check type support. |
| In order to ask for the mediaContentTypesRequiringHardwareSupport setting we need a |
| reference to the current Document in all the places where we need to check type support. |
| |
| * Modules/mediasource/MediaSource.cpp: |
| (WebCore::MediaSource::addSourceBuffer): Provide hardware content types extra info. |
| (WebCore::MediaSource::isTypeSupported): Get hardware content types extra info from |
| ScriptExecutionContext and provide it to a new refactored private version of |
| isTypeSupported() which can also be reused from addSourceBuffer(). |
| * Modules/mediasource/MediaSource.h: Changed isTypeSupported() prototype to take |
| ScriptExecutionContext and added a new overloaded version of the method. |
| * Modules/mediasource/MediaSource.idl: isTypeSupported() now provides a reference to |
| ScriptExecutionContext. It's the only way to access the required document settings from a |
| static method. |
| * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp: |
| (WebCore::GStreamerRegistryScanner::isContentTypeSupported const): Factor ContentType |
| discrimination logic common to MediaPlayerPrivateGStreamer and |
| MediaPlayerPrivateGStreamerMSE. |
| * platform/graphics/gstreamer/GStreamerRegistryScanner.h: Added new method. |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::supportsType): Provide hardware content types extra |
| info when asking for type support. |
| * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: |
| (WebCore::MediaPlayerPrivateGStreamerMSE::supportsType): Ditto. |
| |
| 2020-05-20 Simon Fraser <simon.fraser@apple.com> |
| |
| [macOS] Scrolling synchronization part 1: Have the scrolling thread wait half a frame for the main thread to complete the rendering update |
| https://bugs.webkit.org/show_bug.cgi?id=212168 |
| |
| Reviewed by Tim Horton. |
| |
| Currently the scrolling thread is a free-running thread that moves layers around in response |
| to wheel events, and asynchronously posts data about scrolled layers back to the main thread. |
| That results in an almost guaranteed lack of synchronization between the displayed layer |
| positions, and the web-exposed values for scroll position (element.scrollTop, window.pageYOffset etc). |
| This is a frequent source of stuttering or jumpy web content when scrolling. |
| |
| The first step to fixing this is to synchronize the scrolling thread layer positions |
| and the main thread state for the case where the main thread is responsive enough to |
| render once per frame. This is achieved as follow: |
| - When the main thread is starting a rendering update, Page::updateRendering() informs |
| the scrolling tree via ScrollingCoordinatorMac::willStartRenderingUpdate(). This |
| atomically waits for the scrolling thread to take the m_treeMutex (via a BinarySemaphore) |
| and starts waiting on the m_stateCondition Condition. Now the main thread pulls the |
| state of the scrolling tree via synchronizeStateFromScrollingTree() and uses it for |
| the rendering update. |
| - If the rendering update finishes within half a frame (8ms), then m_stateCondition |
| is released, and the scrolling thread assumes that the main thread is going to |
| commit layers rapidly enough to preserve 60fps scrolling. |
| - If the rendering update takes too long, m_stateCondition times out, and the scrolling |
| thread applies layer positions, triggering a CA commit on that thread. |
| |
| We no longer apply layer positions directly when handling wheel events. |
| |
| synchronizeStateFromScrollingTree() has to only pull state from nodes that have moved on the scrolling thread, |
| so track that via ScrollingTreeScrollingNode::scrolledSinceLastCommit() and adjust the visitor function to |
| make it available during scrolling tree traversal. |
| |
| * page/Page.cpp: |
| (WebCore::Page::updateRendering): |
| (WebCore::Page::finalizeRenderingUpdate): |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::synchronizeStateFromScrollingTree): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::willStartRenderingUpdate): |
| (WebCore::ScrollingCoordinator::didCompleteRenderingUpdate): |
| (WebCore::ScrollingCoordinator::synchronizeStateFromScrollingTree): Deleted. |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::handleWheelEvent): |
| (WebCore::ScrollingTree::traverseScrollingTreeRecursive): |
| (WebCore::ScrollingTree::commitTreeState): |
| (WebCore::ScrollingTree::updateTreeFromStateNodeRecursive): |
| (WebCore::ScrollingTree::applyLayerPositionsInternal): |
| (WebCore::ScrollingTree::nominalFramesPerSecond): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ScrollingTreeNode.h: |
| (WebCore::ScrollingTreeNode::didCompleteCommitForNode): |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::didCompleteCommitForNode): |
| (WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged): |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::willStartRenderingUpdate): |
| (WebCore::ThreadedScrollingTree::maxAllowableRenderingUpdateDurationForSynchronization): |
| (WebCore::ThreadedScrollingTree::waitForRenderingUpdateCompletionOrTimeout): |
| (WebCore::ThreadedScrollingTree::didCompleteRenderingUpdate): |
| (WebCore::ThreadedScrollingTree::displayDidRefreshOnScrollingThread): |
| * page/scrolling/ThreadedScrollingTree.h: |
| (WebCore::ThreadedScrollingTree::treeMutex): |
| * page/scrolling/mac/ScrollingCoordinatorMac.h: |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::willStartRenderingUpdate): |
| (WebCore::ScrollingCoordinatorMac::didCompleteRenderingUpdate): |
| |
| 2020-05-20 Chris Fleizach <cfleizach@apple.com> |
| |
| REGRESSION (iOS 13.4.1): SpeechSynthesisUtterance.onend event won't fire on cancel(). |
| https://bugs.webkit.org/show_bug.cgi?id=211776 |
| <rdar://problem/63130249> |
| |
| Reviewed by Per Arne Vollan. |
| |
| With the move to having speech synthesis happen in the client, the cancel case hits a snag. |
| We cancel the speech job and clear out the current utterance. By the time the cancel callback comes back, |
| the current utterance is gone and nothing happens. |
| |
| The fix is to process the speechError event immediately and not wait on the speech synthesizer -- which seems sane, |
| since we're just cancelling a speech job. |
| |
| * Modules/speech/SpeechSynthesis.cpp: |
| (WebCore::SpeechSynthesis::cancel): |
| |
| 2020-05-20 Darin Adler <darin@apple.com> |
| |
| Dictation context should be an object identifier, not a type-punned pointer |
| https://bugs.webkit.org/show_bug.cgi?id=212174 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Headers.cmake: Added DictationContext.h. |
| * Sources.txt: Removed DictationAlternative.cpp. |
| * WebCore.xcodeproj/project.pbxproj: Added DictationContext.h, removed DictationAlternative.cpp. |
| |
| * dom/DocumentMarker.h: Use DictationContext instead of uint64_t. |
| * editing/AlternativeTextController.cpp: |
| (WebCore::AlternativeTextController::timerFired): Ditto. |
| * editing/AlternativeTextController.h: Ditto. |
| |
| * editing/DictationAlternative.h: Use DictationContext instead of uint64_t, but also |
| use CharacterRange rather than two "unsigned" values. Also convert into a simple |
| struct without constructors; don't really need those. |
| |
| * editing/DictationAlternative.cpp: Removed. |
| |
| * editing/DictationCommand.cpp: |
| (WebCore::DictationCommand::collectDictationAlternativesInRange): Updated for |
| changes to DictationAlternative. |
| |
| * editing/DictationContext.h: Added. |
| |
| * editing/Editor.h: Forward declare DictationAlternative rather than including |
| its header. |
| |
| * editing/cocoa/AlternativeTextContextController.h: Use a pair of maps to bind NSTextAlternatives |
| objects to object identifiers. Remove unnecessary explicit constructor and destructor. Also removed |
| unnecessary use of WTF_MAKE_FAST_ALLOCATED, since this is only used as a data member of another |
| class. Removed unused invalidContext constant. |
| * editing/cocoa/AlternativeTextContextController.mm: Removed the unneeded includes. |
| This file treats NSTextAlternatives as an opaque Objective-C type and so doesn't need |
| any details of that class. |
| (WebCore::AlternativeTextContextController::addAlternatives): Changed to return a |
| DictationContext and use two maps, using HashMap::ensure to avoid double hashing. |
| (WebCore::AlternativeTextContextController::alternativesForContext): Added a null check. |
| (WebCore::AlternativeTextContextController::removeAlternativesForContext): Ditto. Also |
| updated to remove from both maps. |
| (WebCore::AlternativeTextContextController::clear): Clear both maps. |
| |
| * editing/cocoa/AlternativeTextUIController.h: Since this header is used only from Objective-C, |
| removed use of OBJC_CLASS. Put showAlternatives inside a macOS-specific block. Use DictationContext |
| instead of uint64_t. |
| * editing/cocoa/AlternativeTextUIController.mm: |
| (WebCore::AlternativeTextUIController::addAlternatives): Use DictationContext instead of uint64_t. |
| (WebCore::AlternativeTextUIController::alternativesForContext): Ditto. |
| (WebCore::AlternativeTextUIController::showAlternatives): Ditto. |
| (WebCore::AlternativeTextUIController::handleAcceptedAlternative): Ditto. |
| (WebCore::AlternativeTextUIController::removeAlternatives): Ditto. |
| |
| * page/AlternativeTextClient.h: Use DictationContext instead of uint64_t. |
| |
| 2020-05-20 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Preferred width computation should take border collapsing into account |
| https://bugs.webkit.org/show_bug.cgi?id=212141 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-border-collapse2.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): |
| * layout/tableformatting/TableFormattingContext.h: |
| (WebCore::Layout::TableFormattingContext::Geometry::Geometry): |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell): |
| |
| 2020-05-20 Zalan Bujtas <zalan@apple.com> |
| |
| Repaint issues when the login field collapses on music.apple.com |
| https://bugs.webkit.org/show_bug.cgi?id=212101 |
| <rdar://problem/62874369> |
| |
| Reviewed by Simon Fraser. |
| |
| RenderWidgets (e.g iframe) are painted on integral pixel boundaries. When we issue the repaints on such renderers, we need to |
| make sure that the repaint rectangles are also snapped to integral pixel values. |
| Currently trunk only covers the case when the renderer itself is positioned on a subpixel position (e.g when the containing block's content box has a non-integral position value). |
| This patch ensures that we repaint the RenderWidgets properly when a non-direct ancestor puts the renderer on a subpixel position. |
| |
| Test: fast/repaint/iframe-on-subpixel-position.html |
| |
| * page/FrameView.h: |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::computeVisibleRectInContainer const): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::setContentsNeedDisplay): |
| (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect): |
| * rendering/RenderObject.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::enableSubframeRepaintTracking): add subframe repaint tracking |
| (WebCore::Internals::disableSubframeRepaintTracking): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-20 Oriol Brufau <obrufau@igalia.com> |
| |
| Computed min-width/height for auto depends on box |
| https://bugs.webkit.org/show_bug.cgi?id=209651 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Resolved value of min-width and min-height for auto min sizing of flex |
| and grid items may be 'auto'. We based this on the computed style of the |
| shadow including parent. Instead we should rely on whether the element |
| will actually be a rendered flex/grid item. |
| |
| The difference matters e.g. when the parent has 'display: contents' and |
| thus is not a flex nor grid container, but the element can still be a |
| flex or grid item, depending on the grand-parent. |
| |
| This patch is based on https://crrev.com/540901 from Chromium. |
| |
| Tests: imported/w3c/web-platform-tests/css/css-flexbox/getcomputedstyle/flexbox_computedstyle_min-auto-size.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-min-auto-size-001.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::isFlexOrGridItem): |
| (WebCore::ComputedStyleExtractor::valueForPropertyInStyle): |
| |
| 2020-05-20 Alex Christensen <achristensen@webkit.org> |
| |
| Remove implicit URL->String conversion operators |
| https://bugs.webkit.org/show_bug.cgi?id=211033 |
| |
| Reviewed by Darin Adler. |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::stringValueForMSAA const): |
| * html/DOMURL.cpp: |
| (WebCore::DOMURL::create): |
| * html/HTMLPlugInElement.cpp: |
| (WebCore::pluginReplacementForType): |
| * html/URLUtils.h: |
| (WebCore::URLUtils<T>::protocol const): |
| (WebCore::URLUtils<T>::setUsername): |
| (WebCore::URLUtils<T>::setPassword): |
| * page/Location.cpp: |
| (WebCore::Location::setProtocol): |
| (WebCore::Location::setHost): |
| (WebCore::Location::setHostname): |
| (WebCore::Location::setPort): |
| (WebCore::Location::setPathname): |
| (WebCore::Location::setSearch): |
| (WebCore::Location::setHash): |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::load): |
| |
| 2020-05-20 Sam Weinig <weinig@apple.com> |
| |
| Replace Color::getHSL() with sRGBToHSL to ensure it at least gives somewhat sensible results for ExtendedColors and reduce code duplication |
| https://bugs.webkit.org/show_bug.cgi?id=212143 |
| |
| Reviewed by Simon Fraser. |
| |
| - Updated API tests to test sRGBToHSL() rather than Color::getHSL() and extended the tests |
| to include lightness tests and round tripping tests. |
| - Update editing/pasteboard/paste-dark-mode-color-filtered.html with extended color test cases. |
| |
| Replaces Color::getHSL() with sRGBToHSL(color.toSRGBAComponentsLossy()) and adds |
| an optimized variant, lightness(...) that just extracts the lightness component for |
| callers that only needed that. |
| |
| It is now required to explicitly use color.toSRGBAComponentsLossy() to indicate that |
| for non-SRGB colors, this will be a lossy transformation and give us an easy way to |
| find all these sites in the future, if we want to make a better conversion for other |
| color spaces. |
| |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::fragmentNeedsColorTransformed): |
| Switch to using lightness(). This was previously broken for extended colors but now works (though |
| in a lossy way through sRGB). Update editing/pasteboard/paste-dark-mode-color-filtered.html with extended colors. |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::DataDetection::detectContentInRange): |
| Switch to using sRGBToHSL(color.toSRGBAComponentsLossy()). |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::recalculateScrollbarOverlayStyle): |
| Switch to using lightness(). |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::getHSL const): Deleted. |
| * platform/graphics/Color.h: |
| Remove Color::getHSL(). |
| |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::lightness): |
| Added optimized subset of sRGBToHSL which just computes the lightness component for callers |
| that only need that. |
| |
| (WebCore::sRGBToHSL): |
| Simplify/cleanup code a little using initialize-list based std::max/std::min and structured bindings. |
| |
| * platform/graphics/ColorUtilities.h: |
| Export functions to allow testing them directly. |
| |
| 2020-05-20 Megan Gardner <megan_gardner@apple.com> |
| |
| Hide password echo when screen is being captured. |
| https://bugs.webkit.org/show_bug.cgi?id=212060 |
| <rdar://problem/47653578> |
| |
| Reviewed by Wenson Hsieh. |
| |
| When the screen is being captured, turn off the password echo. |
| |
| * editing/InsertIntoTextNodeCommand.cpp: |
| (WebCore::InsertIntoTextNodeCommand::doApply): |
| * page/EditorClient.h: |
| (WebCore::EditorClient::isScreenCaptured const): |
| |
| 2020-05-20 ChangSeok Oh <changseok@webkit.org> |
| |
| [GTK] Implement connected and disconnected events of GAMEPAD API with libmanette |
| https://bugs.webkit.org/show_bug.cgi?id=133854 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| This patch brings initial GAMEPAD API support to the gtk port. We use libmanette, |
| a simple GObject game controller library to handle gamepad connection and input. |
| This change aims to implement two GAMEPAD API events: 'gamepadconnected' and 'gamepaddisconnected' |
| on top of libmanette. Rest of API will be implemented by following patches. |
| |
| No new tests since existing tests can cover this change. |
| |
| * PlatformGTK.cmake: Add header & library paths for libmanette. |
| * SourcesGTK.txt: |
| * platform/gamepad/manette/GUniquePtrManette.h: Added to define a smart pointer for ManetteMonitor. |
| * platform/gamepad/manette/ManetteGamepad.cpp: Added. A wrapper class for ManetteDevice. |
| A ManetteGamepad instance is created per a physically connected gamepad. Currently, |
| it is empty but input handling login will be placed in this class. |
| (WebCore::ManetteGamepad::ManetteGamepad): |
| * platform/gamepad/manette/ManetteGamepad.h: Added. |
| * platform/gamepad/manette/ManetteGamepadProvider.cpp: Added. A manager class |
| for ManetteGamepad instances. This class represents ManetteMonitor that |
| handles connection and disconnection of gamepads. Many parts of this class implementation |
| is brought from HIDGamepad.cpp |
| (WebCore::ManetteGamepadProvider::singleton): |
| (WebCore::onDeviceConnected): |
| (WebCore::onDeviceDisconnected): |
| (WebCore::ManetteGamepadProvider::ManetteGamepadProvider): |
| (WebCore::ManetteGamepadProvider::startMonitoringGamepads): |
| (WebCore::ManetteGamepadProvider::stopMonitoringGamepads): |
| (WebCore::ManetteGamepadProvider::deviceConnected): |
| (WebCore::ManetteGamepadProvider::deviceDisconnected): |
| (WebCore::ManetteGamepadProvider::indexForNewlyConnectedDevice): |
| (WebCore::ManetteGamepadProvider::connectionDelayTimerFired): |
| (WebCore::ManetteGamepadProvider::removeGamepadForDevice): |
| * platform/gamepad/manette/ManetteGamepadProvider.h: Added. |
| |
| 2020-05-20 Antoine Quint <graouts@apple.com> |
| |
| Potential crash in PointerCaptureController::cancelPointer() |
| https://bugs.webkit.org/show_bug.cgi?id=208347 |
| <rdar://problem/59866247> |
| |
| Reviewed by David Kilzer and Daniel Bates. |
| |
| * page/PointerCaptureController.cpp: |
| (WebCore::PointerCaptureController::cancelPointer): |
| |
| 2020-05-20 Oriol Brufau <obrufau@igalia.com> |
| |
| [css-grid] Fix auto repeat with multiple tracks and gutters |
| https://bugs.webkit.org/show_bug.cgi?id=182922 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| The code that computes the number of auto repeat tracks wrongly assumes |
| that the second argument of the repeat() notation is a single track |
| function. That was true in the beginning, however specs were later on |
| modified to allow a <track-list>. We support a <track-list> as a second |
| argument since long ago but the code that computes the number of |
| auto-repeat tracks was never updated. |
| |
| This patch modifies two places that relate to the gaps between the |
| auto-repeat tracks, which ensures the proper total length. |
| |
| This is a port of https://crrev.com/620278 from Chromium. |
| |
| Tests: fast/css-grid-layout/grid-auto-repeat-huge-grid.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html |
| |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::computeAutoRepeatTracksCount const): |
| |
| 2020-05-20 Simon Fraser <simon.fraser@apple.com> |
| |
| Plumb the display's nominal refresh rate down to ScrollingTree for use in scroll synchronization |
| https://bugs.webkit.org/show_bug.cgi?id=212159 |
| |
| Reviewed by Tim Horton. |
| |
| Plumb an Optional<unsigned> down windowScreenDidChange, which contains the nominal |
| display refresh rate (as frames per second) if available. On macOS, we get this |
| from CVDisplayLinkGetNominalOutputVideoRefreshPeriod(). |
| |
| To read it, WebProcessPool::nominalFramesPerSecondForDisplay() makes a DisplayLink |
| that doesn't get any observers, but that DisplayLink will very likely get used |
| as soon as we schedule a rendering update. |
| |
| * page/Chrome.cpp: |
| (WebCore::Chrome::windowScreenDidChange): |
| * page/Chrome.h: |
| * page/Page.cpp: |
| (WebCore::Page::scrollingCoordinator): |
| (WebCore::Page::windowScreenDidChange): |
| * page/Page.h: |
| (WebCore::Page::displayNominalFramesPerSecond const): |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::windowScreenDidChange): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::windowScreenDidChange): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::windowScreenDidChange): |
| * page/scrolling/ScrollingTree.h: |
| * platform/HostWindow.h: |
| |
| 2020-05-20 Chris Dumez <cdumez@apple.com> |
| |
| Disable support for BeforeLoadEvent |
| https://bugs.webkit.org/show_bug.cgi?id=212140 |
| <rdar://problem/62847577> |
| |
| Reviewed by Antti Koivisto. |
| |
| Disable support for BeforeLoadEvent. Other browsers do not support it and |
| Chrome dropped it shortly after the fork: |
| - https://bugs.chromium.org/p/chromium/issues/detail?id=333318 |
| |
| This is a synchronous event and therefore very dangerous. |
| |
| Test: fast/frames/didBecomeCurrentDocumentInFrame-crash.html |
| |
| * bindings/js/WebCoreBuiltinNames.h: |
| * dom/BeforeLoadEvent.idl: |
| * dom/Node.cpp: |
| (WebCore::Node::dispatchBeforeLoadEvent): |
| * page/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::setLegacyBeforeLoadEventEnabled): |
| (WebCore::RuntimeEnabledFeatures::legacyBeforeLoadEventEnabled const): |
| |
| 2020-05-20 Zalan Bujtas <zalan@apple.com> |
| |
| RenderObject::VisibleRectContext members should not be prefixed with m_ |
| https://bugs.webkit.org/show_bug.cgi?id=212154 |
| |
| Reviewed by Simon Fraser. |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::applyCachedClipAndScrollPosition const): |
| (WebCore::RenderBox::computeVisibleRectInContainer const): |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::computeVisibleRectInContainer const): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::computeVisibleRectInContainer const): |
| * rendering/RenderObject.h: |
| * rendering/RenderTableCell.cpp: |
| (WebCore::RenderTableCell::computeVisibleRectInContainer const): |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::computeVisibleRectInContainer const): |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::computeFloatVisibleRectInContainer const): |
| |
| 2020-05-20 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [iPadOS] -webkit-text-size-adjust:percentage doesn't work |
| https://bugs.webkit.org/show_bug.cgi?id=212122 |
| <rdar://problem/54560875> |
| |
| Reviewed by Wenson Hsieh. |
| |
| We've gotten many bug reports that -webkit-text-size-adjust:X% no longer works in |
| WebKit on iPads. We don't want to just start honoring the value, because our |
| testing indicates that, with desktop-class browsing on iPad, more sites work better |
| when we don't honor percentages. However, if Safari is using the mobile content mode, |
| or if a native app has local content, it should be possible to get the old behavior |
| of honoring percentages. |
| |
| This patch adds a new Setting, idempotentModeAutosizingOnlyHonorsPercentages, which |
| is hooked up to the desktop-class browsing feature. When |
| WebPageProxy::effectiveContentModeAfterAdjustingPolicies() determines that the |
| WebContentMode::Mobile mode should be used, it sets the new setting, which |
| causes idempotent text autosizing mode to have the same behavior that WKWebViews |
| on iPadOS used to have: -w-t-s-a:auto and -w-t-s-a:none have no effect, but |
| -w-t-s-a:X% is honored. This affects both Safari and WKWebView apps. |
| |
| If a native app wants the old behavior, they can set |
| WKWebpagePreferences.preferredContentMode = WKContentModeMobile to force the old |
| iPad behavior. It's expected that apps with legacy content would be doing this |
| anyway. |
| |
| Tests: fast/text-autosizing/ios/idempotentmode/idempotent-percentage.html |
| TestWebKitAPI.PreferredContentMode.IdempotentModeAutosizingOnlyHonorsPercentages |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::applyPoliciesToSettings): |
| * loader/DocumentLoader.h: |
| (WebCore::DocumentLoader::setIdempotentModeAutosizingOnlyHonorsPercentages): |
| (WebCore::DocumentLoader::idempotentModeAutosizingOnlyHonorsPercentages const): |
| * page/Settings.yaml: |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::adjustmentForTextAutosizing): |
| * style/StyleBuilderCustom.h: |
| (WebCore::Style::computeBaseSpecifiedFontSize): |
| * style/StyleBuilderState.cpp: |
| (WebCore::Style::BuilderState::updateFontForTextSizeAdjust): |
| |
| 2020-05-20 ChangSeok Oh <changseok@webkit.org> |
| |
| Move the TextStream logging definition in VisibleSelection.cpp to the outside of the TREE_DEBUGGING guard |
| https://bugs.webkit.org/show_bug.cgi?id=212127 |
| |
| Reviewed by Simon Fraser. |
| |
| A linking failure occurs after r261819 where ENABLE_TREE_DEBUGGING is disabled. |
| The TextStream logging defining is placed inside the guard while its declaration is not since r218976. |
| |
| Build fix, no functionality changed. |
| |
| * editing/VisibleSelection.cpp: |
| (WebCore::operator<<): |
| |
| 2020-05-20 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for accessibility-node-memory-management.html in isolated tree mode. |
| https://bugs.webkit.org/show_bug.cgi?id=212142 |
| |
| Reviewed by Chris Fleizach. |
| |
| LayoutTests/accessibility/accessibility-node-memory-management.html. |
| |
| - Fix in applyPendingChanges that was not removing removed nodes from |
| the nodes map. This was causing that some detached AXIsolatedObjects |
| were being returned. |
| - Also handle the case where pending changes can come from a detached |
| AXObject with invalid ID and no platform wrapper. |
| - updateChildren better handles the case when the notification target |
| is not in the isolated tree by walking up the object hierarchy until it |
| finds an associated object that does have a corresponding isolated object. |
| |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::treeForPageID): |
| (WebCore::AXIsolatedTree::updateChildren): |
| (WebCore::AXIsolatedTree::applyPendingChanges): |
| |
| 2020-05-20 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Animation engine should not wake up every tick for steps timing functions |
| https://bugs.webkit.org/show_bug.cgi?id=212103 |
| <rdar://problem/62737868> |
| |
| Unreviewed. Clean up some stray FIXMEs mistakenly commited in the previous commit. |
| |
| * animation/AnimationTimeline.cpp: |
| (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::createAnimatedElementUpdate): |
| |
| 2020-05-20 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Animation engine should not wake up every tick for steps timing functions |
| https://bugs.webkit.org/show_bug.cgi?id=212103 |
| <rdar://problem/62737868> |
| |
| Reviewed by Simon Fraser. |
| |
| Tests: webanimations/scheduling-of-animation-with-steps-timing-function-on-effect.html |
| webanimations/scheduling-of-animation-with-steps-timing-function-on-keyframe.html |
| webanimations/scheduling-of-css-animation-with-explicit-steps-timing-function-on-some-keyframes.html |
| webanimations/scheduling-of-css-animation-with-implicit-steps-timing-function.html |
| |
| When an animation uses a steps() timing function, it will appear to animate discretely between values such |
| that there is only n visual changes, where n is the number of steps provided. This gives us an opportunity |
| to be more efficient when scheduling animations using steps() timing functions. |
| |
| In WebAnimation::timeToNextTick() we now ask the associated effect for the amount of progress until the next |
| step. For an effect-wide steps() timing function, we can use the provided iteration progress. For animations |
| with a linear effect-wide timing function (the default), we have to map the provided iteration progress to |
| a keyframe interval, provided that interval uses a steps() timing function. |
| |
| The new {Animation|Keyframe}Effect::progressUntilNextStep() method returns WTF::nullopt for any other case. |
| |
| In order to test this, we add a new internals.timeToNextAnimationTick(animation) method which we use in the |
| two new tests. |
| |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::progressUntilNextStep const): |
| * animation/AnimationEffect.h: |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::setBlendingKeyframes): |
| (WebCore::KeyframeEffect::computeSomeKeyframesUseStepsTimingFunction): |
| (WebCore::KeyframeEffect::timingFunctionForKeyframeAtIndex const): Avoid any out-of-bounds use of the underlying data |
| structures by returning nullptr for cases where we don't have an explicit keyframe. We also make the function const |
| such that it may be called from progressUntilNextStep(), it always was const but wasn't marked as such. |
| (WebCore::KeyframeEffect::progressUntilNextStep const): |
| * animation/KeyframeEffect.h: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::timeToNextTick const): |
| * animation/WebAnimation.h: |
| * animation/WebAnimation.idl: |
| * testing/Internals.cpp: |
| (WebCore::Internals::timeToNextAnimationTick const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-20 Noam Rosenthal <noam@webkit.org> |
| |
| Fix table sizing when 'max-width' is used |
| https://bugs.webkit.org/show_bug.cgi?id=115156 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Based on previous patch by László Langó <lango@inf.u-szeged.hu> |
| |
| Test: fast/table/html-table-width-max-width-constrained.html |
| |
| A table should always be wide enough to contain its content (preferred logical width). |
| This constraint should be stronger than the table style's specified min-width/width. |
| |
| The behavior matches the spec, and behavior on Firefox/Chrome. |
| |
| * rendering/RenderTable.cpp: |
| (WebCore::RenderTable::updateLogicalWidth): |
| Max-width should only affect the table's max preferred width. |
| |
| (WebCore::RenderTable::computePreferredLogicalWidths): |
| Change the order of constraints so that content constraint is stronger than style width/max-width constraint. |
| |
| 2020-05-20 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| REGRESSION(r261554): [GTK] Version 2.29.1 crashes using drag-n-drop API |
| https://bugs.webkit.org/show_bug.cgi?id=212136 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * platform/gtk/PasteboardGtk.cpp: |
| (WebCore::Pasteboard::read): Use m_selectionData if present. |
| |
| 2020-05-20 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] <img> tag needs to support video formats |
| https://bugs.webkit.org/show_bug.cgi?id=180370 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| GStreamer implementation of the ImageDecoder. It currently doesn't support zero-copy |
| rendering though due to the the NativeImagePtr requirement. |
| |
| * platform/GStreamer.cmake: |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::MIMETypeRegistry::isSupportedImageVideoOrSVGMIMEType): |
| * platform/graphics/ImageDecoder.cpp: |
| (WebCore::ImageDecoder::create): |
| (WebCore::ImageDecoder::supportsMediaType): |
| * platform/graphics/gstreamer/ImageDecoderGStreamer.cpp: Added. |
| (WebCore::toSample): |
| (WebCore::ImageDecoderGStreamer::create): |
| (WebCore::ImageDecoderGStreamer::ImageDecoderGStreamer): |
| (WebCore::ImageDecoderGStreamer::supportsContainerType): |
| (WebCore::ImageDecoderGStreamer::canDecodeType): |
| (WebCore::ImageDecoderGStreamer::encodedDataStatus const): |
| (WebCore::ImageDecoderGStreamer::size const): |
| (WebCore::ImageDecoderGStreamer::repetitionCount const): |
| (WebCore::ImageDecoderGStreamer::uti const): |
| (WebCore::ImageDecoderGStreamer::frameOrientationAtIndex const): |
| (WebCore::ImageDecoderGStreamer::frameDurationAtIndex const): |
| (WebCore::ImageDecoderGStreamer::frameHasAlphaAtIndex const): |
| (WebCore::ImageDecoderGStreamer::frameBytesAtIndex const): |
| (WebCore::ImageDecoderGStreamer::createFrameImageAtIndex): |
| (WebCore::ImageDecoderGStreamer::setData): |
| (WebCore::ImageDecoderGStreamer::clearFrameBufferCache): |
| (WebCore::ImageDecoderGStreamer::sampleAtIndex const): |
| (WebCore::ImageDecoderGStreamer::InnerDecoder::decodebinPadAddedCallback): |
| (WebCore::ImageDecoderGStreamer::InnerDecoder::connectDecoderPad): |
| (WebCore::ImageDecoderGStreamer::handleSample): |
| (WebCore::ImageDecoderGStreamer::InnerDecoder::handleMessage): |
| (WebCore::ImageDecoderGStreamer::InnerDecoder::preparePipeline): |
| (WebCore::ImageDecoderGStreamer::InnerDecoder::run): |
| (WebCore::ImageDecoderGStreamer::InnerDecoder::encodedDataStatus const): |
| (WebCore::ImageDecoderGStreamer::pushEncodedData): |
| * platform/graphics/gstreamer/ImageDecoderGStreamer.h: Added. |
| * platform/graphics/gstreamer/ImageGStreamer.h: |
| (WebCore::ImageGStreamer::createImage): |
| (WebCore::ImageGStreamer::image): |
| (WebCore::ImageGStreamer::setCropRect): |
| (WebCore::ImageGStreamer::rect): |
| (WebCore::ImageGStreamer::hasAlpha const): |
| * platform/graphics/gstreamer/ImageGStreamerCairo.cpp: |
| (WebCore::ImageGStreamer::ImageGStreamer): |
| * platform/graphics/gstreamer/MediaSampleGStreamer.h: |
| |
| 2020-05-20 Andy Estes <aestes@apple.com> |
| |
| [Mac] UI processes spin when creating the "Share" context menu item |
| https://bugs.webkit.org/show_bug.cgi?id=212137 |
| <rdar://problem/54498394> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Ran update-webkit-localizable-strings. |
| |
| * en.lproj/Localizable.strings: |
| |
| 2020-05-20 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Internal table boxes should take collapsed border into account |
| https://bugs.webkit.org/show_bug.cgi?id=212135 |
| |
| Reviewed by Antti Koivisto. |
| |
| Use the collapsed border value to compute the borders for sections, rows and cells. |
| The collapsed border is propagated to the table box and the adjacent cell boxes. |
| |
| Test: fast/layoutformattingcontext/table-simple-border-collapse.html |
| |
| * layout/LayoutUnits.h: |
| (WebCore::Layout::operator/): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForRows): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForSections): |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::setCollapsedBorder): |
| (WebCore::Layout::TableGrid::collapsedBorder const): |
| |
| 2020-05-20 Youenn Fablet <youenn@apple.com> |
| |
| [Mac] Use preferedPixelBufferFormat for AVVideoCaptureSource |
| https://bugs.webkit.org/show_bug.cgi?id=212071 |
| |
| Reviewed by Eric Carlson. |
| |
| Manually tested. |
| |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| (WebCore::avVideoCapturePixelBufferFormat): |
| |
| 2020-05-20 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix GTK4 build with GTK 3.98.4 |
| |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::convertWidgetPointToScreenPoint): |
| * platform/gtk/GtkVersioning.h: |
| (gtk_widget_destroy): |
| * platform/gtk/PlatformScreenGtk.cpp: |
| (WebCore::screenDPI): |
| |
| 2020-05-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support for drag and drop operations |
| https://bugs.webkit.org/show_bug.cgi?id=211779 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Move the code to create a GdkTexture from an Image from CursorGtk to ImageGtk and add Image::gdkTexture(). |
| |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/Image.h: |
| (WebCore::Image::gdkTexture): |
| * platform/graphics/gtk/ImageGtk.cpp: |
| (WebCore::BitmapImage::gdkTexture): |
| * platform/gtk/CursorGtk.cpp: |
| (WebCore::createCustomCursor): |
| |
| 2020-05-20 Sam Weinig <weinig@apple.com> |
| |
| Remove unused Color::getHSV function |
| https://bugs.webkit.org/show_bug.cgi?id=212119 |
| |
| Reviewed by Simon Fraser. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::getHSV const): Deleted. |
| * platform/graphics/Color.h: |
| Remove Color::getHSV(). It was unused outside of the API test for it. |
| |
| 2020-05-20 Youenn Fablet <youenn@apple.com> |
| |
| Allow calling VideoSampleObserver::videoSampleAvailable from a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=212024 |
| |
| Reviewed by Eric Carlson. |
| |
| Allow RealtimeMediaSource::videoSampleAvailable to be called on a background thread, typically the capture thread. |
| Make WebRTC remote sources and mock capture sources do that. |
| |
| RealtimeMediaSource is then updating its intrinsic size from the generation thread while updating its size in the main thread. |
| The size() getter can be called from both threads. |
| |
| Existing consumers do the following: |
| - media player will hop to the main thread. |
| - media recorder will do processing from the background thread. |
| - WebRTC sender will do processing from the background thread, except when sending black frames where this will still be done on the main thread. |
| This is ok as we ensure either we send black frames on the main thread (and we do not observe the source) or we observe the source to send. |
| |
| Follow-ups will migrate the real capture sources as well as migrating media player processing out of the main thread. |
| Covered by existing tests. |
| |
| * platform/MediaSample.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable): |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::videoSampleAvailable): |
| (WebCore::RealtimeMediaSource::setIntrinsicSize): |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/mac/MockRealtimeVideoSourceMac.h: |
| * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: |
| (WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac): |
| (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h: |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: |
| (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame): |
| (WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample): Deleted. |
| |
| 2020-05-20 Oriol Brufau <obrufau@igalia.com> |
| |
| Fix computeMarginLogicalSizeForChild to check auto margins in the right axis |
| https://bugs.webkit.org/show_bug.cgi?id=212113 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| GridLayoutFunctions::computeMarginLogicalSizeForChild checks for 'auto' |
| margins before retrieving the margin size, since these should be treated |
| as 0. However, for orthogonal grid items, it used to check the wrong axis. |
| So if an item had 'margin-top: auto' and 'margin-left: 5px', when asking |
| for the horizontal margin we could get 0px instead of 5px due to the |
| auto margin in the vertical axis. |
| |
| Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-width-orthogonal-001.html |
| |
| * rendering/GridLayoutFunctions.cpp: |
| (WebCore::GridLayoutFunctions::computeMarginLogicalSizeForChild): |
| (WebCore::GridLayoutFunctions::marginLogicalSizeForChild): |
| |
| 2020-05-19 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [WinCairo] ASSERT(m_eglDisplay == EGL_NO_DISPLAY) fails in ~PlatformDisplay() |
| https://bugs.webkit.org/show_bug.cgi?id=212065 |
| |
| Reviewed by Don Olmstead. |
| |
| PlatformDisplay destoys m_eglDisplay by using std::atexit to |
| ensure they are destructed before EGL's atexit handler (Bug 157973). |
| However, calling eglTerminate in atexit handler causes a |
| crash on Windows (Bug 145832, Bug 170331). |
| |
| Then, r214688 added shutDownEglDisplays() and explicitly call it |
| in shutDownWebKit() to destory m_eglDisplay in Windows WebKit1. |
| However, Windows WebKit2 may call _exit() in IPC::Connection's |
| WorkQueue thread. It doesn't seem a good idea that explicitly |
| destructing m_eglDisplay by calling shutDownEglDisplays(). |
| |
| Remove shutDownEglDisplays() and the assertion for Windows. |
| |
| * platform/graphics/PlatformDisplay.cpp: |
| (WebCore::PlatformDisplay::~PlatformDisplay): Conditioned out the |
| assertion for PLATFORM(WIN). |
| (WebCore::PlatformDisplay::initializeEGLDisplay): Restored the |
| original atexit handler of r201595. |
| (WebCore::PlatformDisplay::shutDownEglDisplays): Deleted. |
| * platform/graphics/PlatformDisplay.h: |
| |
| 2020-05-19 Darin Adler <darin@apple.com> |
| |
| REGRESSION (r259930): Dictation marker at start of text is removed when added trailing whitespace is collapsed |
| https://bugs.webkit.org/show_bug.cgi?id=212093 |
| |
| Reviewed by Daniel Bates. |
| |
| * dom/DocumentMarkerController.cpp: |
| (WebCore::DocumentMarkerController::shiftMarkers): Use int to do the math before clamping to |
| unsigned. This protects against underflow. |
| |
| 2020-05-19 Sam Weinig <weinig@apple.com> |
| |
| Remove almost always incorrect Color::getRGBA |
| https://bugs.webkit.org/show_bug.cgi?id=212059 |
| |
| Reviewed by Darin Adler and Simon Fraser. |
| |
| Removes the awkward and almost always incorrect out parameter based Color::getRGBA. Most existing callsites |
| were updated to use Color::toSRGBAComponentsLossy() or other more ExtendedColor supporting functions (like |
| cachedCGColor()). |
| |
| Also adds tuple-like adaptors for FloatComponents to allow it to be used |
| with structured bindings. For example: |
| |
| auto [r, g, b, a] = myFloatComponents; |
| |
| * platform/graphics/Color.h: |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::light const): |
| (WebCore::Color::dark const): |
| (WebCore::Color::isDark const): |
| Adopt toSRGBAComponentsLossy() to make these not return totally incorrect values. |
| |
| (WebCore::Color::colorSpaceAndComponents const): |
| Added. Returns a std::pair<ColorSpace, FloatComponents> for functions that need |
| to operate on the components in a ColorSpace aware way. Used by toSRGBAComponentsLossy |
| and leakCGColor() for now, but will be useful going forward as well. |
| |
| (WebCore::Color::toSRGBAComponentsLossy const): |
| Re-implement using colorSpaceAndComponents() to simplify implementation. |
| |
| (WebCore::Color::getRGBA const): Deleted. |
| |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::FloatComponents::FloatComponents): Deleted. |
| (WebCore::sRGBColorToLinearComponents): Deleted. |
| * platform/graphics/ColorUtilities.h: |
| (WebCore::FloatComponents::get const): |
| Remove uses of the Color class to simplify inlining (Color.h already needs to know about |
| FloatComponents). |
| - FloatComponents constructor replaced by Color::toSRGBAComponentsLossy(). |
| - sRGBColorToLinearComponents replaced by calling rgbToLinearComponents(color.toSRGBAComponentsLossy()). |
| |
| Also adds std::tuple adaptors for FloatComponents to allow using with stuctured bindings. |
| |
| * page/cocoa/ResourceUsageOverlayCocoa.mm: |
| (WebCore::HistoricMemoryCategoryInfo::HistoricMemoryCategoryInfo): |
| Replace getRGBA with cachedCGColor. |
| |
| * platform/graphics/ca/win/PlatformCALayerWin.cpp: |
| (PlatformCALayerWin::setBackgroundColor): |
| Replace getRGBA with cachedCGColor. |
| |
| * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp: |
| (PlatformCALayerWinInternal::setBorderColor): |
| Replace getRGBA with cachedCGColor. |
| |
| * platform/graphics/cairo/CairoUtilities.cpp: |
| (WebCore::setSourceRGBAFromColor): |
| Replace getRGBA with toSRGBAComponentsLossy. |
| |
| * platform/graphics/cairo/GradientCairo.cpp: |
| (WebCore::addColorStopRGBA): |
| (WebCore::setCornerColorRGBA): |
| (WebCore::interpolateColorStop): |
| Replace getRGBA with toSRGBAComponentsLossy. |
| |
| * platform/graphics/cg/ColorCG.cpp: |
| (WebCore::leakCGColor): |
| (WebCore::cachedCGColor): |
| Simplify implementation (and remove use of getRGBA) by using colorSpaceAndComponents(). |
| |
| * platform/graphics/cg/GradientCG.cpp: |
| (WebCore::Gradient::platformGradient): |
| Replace getRGBA with colorSpaceAndComponent(). |
| |
| * platform/graphics/filters/FELighting.cpp: |
| (WebCore::FELighting::drawLighting): |
| Replace FloatComponents constructor taking a Color (which used getRGBA) with toSRGBAComponentsLossy. |
| |
| * platform/graphics/filters/FilterOperations.cpp: |
| (WebCore::FilterOperations::transformColor const): |
| (WebCore::FilterOperations::inverseTransformColor const): |
| Replace getRGBA with toSRGBAComponentsLossy. |
| |
| * platform/graphics/gtk/ColorGtk.cpp: |
| (WebCore::Color::operator GdkRGBA const): |
| Replace getRGBA with toSRGBAComponentsLossy. |
| |
| * platform/graphics/texmap/TextureMapperGL.cpp: |
| (WebCore::TextureMapperGL::drawBorder): |
| (WebCore::TextureMapperGL::drawNumber): |
| (WebCore::prepareFilterProgram): |
| (WebCore::TextureMapperGL::drawSolidColor): |
| Replace getRGBA with toSRGBAComponentsLossy. |
| |
| * platform/graphics/win/GradientDirect2D.cpp: |
| (WebCore::Gradient::generateGradient): |
| Replace getRGBA with toSRGBAComponentsLossy. |
| |
| * platform/graphics/win/GraphicsContextCGWin.cpp: |
| (WebCore::GraphicsContext::drawDotsForDocumentMarker): |
| (WebCore::setCGStrokeColor): Deleted. |
| (WebCore::spellingPatternColor): Deleted. |
| (WebCore::grammarPatternColor): Deleted. |
| Replace use of getRGBA with direct use of SimpleColor instead. |
| |
| * rendering/TextPaintStyle.cpp: |
| (WebCore::textColorIsLegibleAgainstBackgroundColor): |
| Replace implicit FloatComponents construction taking a Color (which used getRGBA) with explicit toSRGBAComponentsLossy. |
| |
| 2020-05-19 Eric Carlson <eric.carlson@apple.com> |
| |
| Update some media logging |
| https://bugs.webkit.org/show_bug.cgi?id=212109 |
| |
| Reviewed by Jer Noble. |
| |
| No new tests, no functional change. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::insertedIntoAncestor): |
| (WebCore::HTMLMediaElement::didFinishInsertingNode): |
| (WebCore::HTMLMediaElement::removedFromAncestor): |
| (WebCore::HTMLMediaElement::checkPlaybackTargetCompatablity): |
| (WebCore::HTMLMediaElement::canPlayType const): |
| (WebCore::HTMLMediaElement::waitForSourceChange): |
| (WebCore::HTMLMediaElement::noneSupported): |
| (WebCore::HTMLMediaElement::mediaLoadingFailed): |
| (WebCore::HTMLMediaElement::fastSeek): |
| (WebCore::HTMLMediaElement::seek): |
| (WebCore::HTMLMediaElement::seekInternal): |
| (WebCore::HTMLMediaElement::seekTask): |
| (WebCore::HTMLMediaElement::finishSeek): |
| (WebCore::HTMLMediaElement::currentMediaTime const): |
| (WebCore::HTMLMediaElement::setPreload): |
| (WebCore::HTMLMediaElement::playInternal): |
| (WebCore::HTMLMediaElement::pauseInternal): |
| (WebCore::HTMLMediaElement::setLoop): |
| (WebCore::HTMLMediaElement::setControls): |
| (WebCore::HTMLMediaElement::setVolume): |
| (WebCore::HTMLMediaElement::setMuted): |
| (WebCore::HTMLMediaElement::hardwareMutedStateDidChange): |
| (WebCore::HTMLMediaElement::configureTextTrackGroup): |
| (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerVolumeChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerMuteChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerDurationChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerRateChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerPlaybackStateChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerResourceNotSupported): |
| (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerRenderingModeChanged): |
| (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated): |
| (WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable): |
| (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): |
| (WebCore::HTMLMediaElement::updatePlayState): |
| (WebCore::HTMLMediaElement::stop): |
| (WebCore::HTMLMediaElement::suspend): |
| (WebCore::HTMLMediaElement::resume): |
| (WebCore::HTMLMediaElement::visibilityStateChanged): |
| (WebCore::HTMLMediaElement::addEventListener): |
| (WebCore::HTMLMediaElement::removeEventListener): |
| (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent): |
| (WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget): |
| (WebCore::HTMLMediaElement::remoteHasAvailabilityCallbacksChanged): |
| (WebCore::HTMLMediaElement::enterFullscreen): |
| (WebCore::HTMLMediaElement::exitFullscreen): |
| (WebCore::HTMLMediaElement::didBecomeFullscreenElement): |
| (WebCore::HTMLMediaElement::setClosedCaptionsVisible): |
| (WebCore::HTMLMediaElement::mediaCanStart): |
| (WebCore::HTMLMediaElement::setShouldDelayLoadEvent): |
| (WebCore::HTMLMediaElement::suspendPlayback): |
| (WebCore::HTMLMediaElement::resumeAutoplaying): |
| (WebCore::HTMLMediaElement::mayResumePlayback): |
| (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): |
| (WebCore::HTMLMediaElement::setBufferingPolicy): |
| (WebCore::HTMLMediaElement::purgeBufferedDataIfPossible): |
| * platform/audio/PlatformMediaSession.cpp: |
| (WebCore::PlatformMediaSession::setState): |
| (WebCore::PlatformMediaSession::beginInterruption): |
| (WebCore::PlatformMediaSession::endInterruption): |
| (WebCore::PlatformMediaSession::clientWillBeginAutoplaying): |
| (WebCore::PlatformMediaSession::clientWillBeginPlayback): |
| (WebCore::PlatformMediaSession::processClientWillPausePlayback): |
| (WebCore::PlatformMediaSession::clientWillPausePlayback): |
| (WebCore::PlatformMediaSession::clientWillBeDOMSuspended): |
| (WebCore::PlatformMediaSession::pauseSession): |
| (WebCore::PlatformMediaSession::stopSession): |
| (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand): |
| |
| 2020-05-19 Daniel Bates <dabates@apple.com> |
| |
| Blue dotted underline with alternatives only shown for last word, gets lost for previous insertions |
| https://bugs.webkit.org/show_bug.cgi?id=212097 |
| <rdar://problem/61913405> |
| |
| Reviewed by Darin Adler. |
| |
| Fix up two cases, <space> is a literal ' ' and | is the position of the caret: |
| 1. Space inserted after marker, here's what it looks like BEFORE insertion (i.e. endOfFirstWord == startOfSelection): |
| hello| |
| |
| This case is detected when the end of the next word (relative to caret) would be at the start of the |
| word that begins before or on the caret. |
| |
| 2. Space inserted before marker, here's what it looks like BEFORE insertion (i.e. startOfLastWord == endOfSelection): |
| |hello |
| |
| This case is detected when the end of the previous word (relative to caret) would be at the end of the |
| word that ends after or on the caret. |
| |
| Note ^^^ example uses a caret, but code is slightly more general and works when the current selection |
| is a range. Though I didn't explicitly test that because my bug is specific to having a caret selection. |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::insertTextWithoutSendingTextEvent): Do not remove markers if selection starts at the |
| beginning of a new word. This is detected by looking at the character before the selection start to see |
| if it is a space or newline. This will be false when there is no preceding character (e.g. start of document), |
| but that's OK because it doesn't matter what we pass to updateMarkersForWordsAffectedByEditing() - there's |
| no markers to remove anyway, let alone text for markers to exist in. I don't use isStartOfWord() here |
| because that would incorrectly return false if the current selection is at the end of a paragraph. I could have |
| fixed that up by checking isEndOfParagraph() as well, but isStartOfWord() + isEndOfParagraph() is less |
| efficient than just looking at the previous character directly. So, I did that instead. |
| (WebCore::Editor::updateMarkersForWordsAffectedByEditing): Save off the original end of the first word and |
| start of the last word positions before mutating them. Update early return checks to use these saved values |
| instead of comparing against the start and end of the current selection, which weren't correct. Saved positioned |
| are aligned by word, but start and end of current selection may NOT be. So, comparison was asymmetric: lhs was |
| word aligned position, but rhs may not be. |
| |
| * editing/Editor.h: While I am here, fix up a param name to match what it is called in the .cpp. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::hasDictationAlternativesMarker): Added |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| Add new functionality for testing purposes. |
| |
| |
| 2020-05-19 Oriol Brufau <obrufau@igalia.com> |
| |
| Fix marginLogicalSizeForChild to check auto margins in the right axis |
| https://bugs.webkit.org/show_bug.cgi?id=212055 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| GridLayoutFunctions::marginLogicalSizeForChild checks for 'auto' margins |
| before retrieving the margin size, since these should be treated as 0. |
| However, for orthogonal grid items, it used to check the wrong axis. |
| So if an item had 'margin-top: auto' and 'margin-left: 5px', when asking |
| for the horizontal margin we could get 0px instead of 5px due to the |
| auto margin in the vertical axis. |
| |
| Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-minimum-height-orthogonal-001.html |
| |
| * rendering/GridLayoutFunctions.cpp: |
| (WebCore::GridLayoutFunctions::marginLogicalSizeForChild): |
| |
| 2020-05-19 Jacob Uphoff <jacob_uphoff@apple.com> |
| |
| Unreviewed, reverting r261856. |
| |
| This caused internal assertion failures. |
| |
| Reverted changeset: |
| |
| "Allow calling VideoSampleObserver::videoSampleAvailable from |
| a background thread" |
| https://bugs.webkit.org/show_bug.cgi?id=212024 |
| https://trac.webkit.org/changeset/261856 |
| |
| 2020-05-19 David Kilzer <ddkilzer@apple.com> |
| |
| IDBRequestData and IDBClient::TransactionOperation should initialize IndexedDB::IndexRecordType field |
| <https://webkit.org/b/212096> |
| <rdar://problem/63406376> |
| |
| Reviewed by Geoffrey Garen. |
| |
| IDBRequestData tested by IPC::Decoder::decode() and |
| IPC::Encoder::operator<<() running on WebKit2 API and layout |
| tests. |
| |
| * Modules/indexeddb/IndexedDB.h: |
| (WTF::EnumTraits<WebCore::IndexedDB::IndexRecordType>): Add. |
| * Modules/indexeddb/client/TransactionOperation.h: |
| (WebCore::IDBClient::TransactionOperation::m_indexRecordType): |
| - Add default initializer. |
| * Modules/indexeddb/shared/IDBRequestData.h: |
| (WebCore::IDBRequestData::m_indexRecordType): |
| - Add default initializer. |
| (WebCore::IDBRequestData::encode const): |
| (WebCore::IDBRequestData::decode): |
| - Switch from encodeEnum() and decodeEnum() to modern |
| equivalents that check for valid enum values. |
| |
| 2020-05-19 Simon Fraser <simon.fraser@apple.com> |
| |
| Push a PlatformDisplayID to scrolling trees, and allow the scrolling thread to get displayDidRefresh notifications |
| https://bugs.webkit.org/show_bug.cgi?id=211034 |
| |
| Reviewed by Sam Weinig. |
| |
| As work towards scrolling thread synchronization with main thread (webkit.org/b210884), allow |
| ScrollingTree to get a displayDidRefresh() call on the scrolling thread. Each |
| tree is associated with a Page which is associated with a display, so the ScrollingTree |
| needs to have a PlatformDisplayID to know which notifications to respond to. |
| |
| Eventually, displayDidRefresh() will be used to trigger layer updates on the scrolling |
| thread if the main thread is periodically unresponsive. |
| |
| * page/Page.cpp: |
| (WebCore::Page::scrollingCoordinator): |
| (WebCore::Page::windowScreenDidChange): |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::windowScreenDidChange): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::windowScreenDidChange): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::windowScreenDidChange): |
| (WebCore::ScrollingTree::displayID): |
| * page/scrolling/ScrollingTree.h: |
| (WebCore::ScrollingTree::displayDidRefresh): |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::displayDidRefresh): |
| * page/scrolling/ThreadedScrollingTree.h: |
| |
| 2020-05-19 Simon Fraser <simon.fraser@apple.com> |
| |
| [iOS] Programmaic scroll of "scrolling=no" iframe fails |
| https://bugs.webkit.org/show_bug.cgi?id=212063 |
| <rdar://problem/57049514> |
| |
| Reviewed by Antti Koivisto. |
| |
| ScrollView::setScrollPosition() calls requestScrollPositionUpdate(), and if this returns |
| false it relies on the confusingly-named updateScrollbars() to actually do the scroll. |
| This code path is hit for "scrolling=no" frames, which are not scroll-coordinated. |
| |
| ScrollView::updateScrollbars() fails to set the scroll position on iOS, where managesScrollbars() |
| returns false, so fix that. |
| |
| Test: fast/scrolling/progammatic-scroll-scrolling-no-frame.html |
| |
| * platform/ScrollView.cpp: |
| (WebCore::ScrollView::updateScrollbars): |
| |
| 2020-05-19 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Add testing and logging for ApplePaySetup |
| https://bugs.webkit.org/show_bug.cgi?id=211972 |
| <rdar://problem/63291965> |
| |
| Reviewed by Alex Christensen. |
| |
| Test: http/tests/ssl/applepay/ApplePaySetup.https.html |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Modules/applepay/ApplePaySetup.cpp: |
| (WebCore::ApplePaySetup::getSetupFeatures): |
| (WebCore::ApplePaySetup::begin): |
| (WebCore::ApplePaySetup::ApplePaySetup): |
| (WebCore::ApplePaySetup::stop): |
| * Modules/applepay/ApplePaySetup.idl: |
| * Modules/applepay/ApplePaySetupConfiguration.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupConfiguration.idl: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeature.idl: |
| * Modules/applepay/ApplePaySetupFeature.mm: |
| (WebCore::ApplePaySetupFeature::state const): |
| * Modules/applepay/ApplePaySetupFeatureState.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeatureState.idl: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeatureType.idl: |
| * Modules/applepay/ApplePaySetupFeatureWebCore.h: |
| * Modules/applepay/ApplePaySetupWebCore.h: |
| (WebCore::ApplePaySetup::create): |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const): |
| (WebCore::PaymentCoordinator::getSetupFeatures): |
| (WebCore::PaymentCoordinator::beginApplePaySetup): |
| (WebCore::PaymentCoordinator::endApplePaySetup): |
| * Modules/applepay/PaymentCoordinator.h: |
| * Modules/applepay/PaymentCoordinatorClient.h: |
| (WebCore::PaymentCoordinatorClient::getSetupFeatures): |
| (WebCore::PaymentCoordinatorClient::beginApplePaySetup): |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * testing/MockApplePaySetupFeature.cpp: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureWebCore.h. |
| (WebCore::MockApplePaySetupFeature::create): |
| (WebCore::MockApplePaySetupFeature::MockApplePaySetupFeature): |
| * testing/MockApplePaySetupFeature.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureWebCore.h. |
| * testing/MockPaymentCoordinator.cpp: |
| (WebCore::MockPaymentCoordinator::addSetupFeature): |
| (WebCore::MockPaymentCoordinator::getSetupFeatures): |
| (WebCore::MockPaymentCoordinator::beginApplePaySetup): |
| * testing/MockPaymentCoordinator.h: |
| * testing/MockPaymentCoordinator.idl: |
| |
| 2020-05-19 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Implement requestSession() |
| https://bugs.webkit.org/show_bug.cgi?id=211888 |
| |
| Reviewed by Youenn Fablet. |
| |
| This patch adds a preliminar implementation of the requestSession() |
| API used to get a WebXRSession from the UA. It includes a fairly good |
| amount of checks to verify that the request can be satisfied given the |
| device's enabled features per session modes. The specs also describe how |
| to request persmission for some actions using the Permissions API which |
| WebKit does not currently implement. That should be done in a follow up |
| patch perhaps using a similar approach to other APIs as Geolocation for |
| example. |
| |
| In order to get some of the requestSession() tests passing the session |
| finalization (shutdown) had to be implemented too. |
| |
| Several tests where unskipped for WPE port as they're now passing. |
| |
| * Modules/webxr/WebXRRenderState.cpp: |
| (WebCore::WebXRRenderState::create): Pass XRSessionMode as argument |
| instead of a WebXRSession. |
| * Modules/webxr/WebXRRenderState.h: Ditto. |
| * Modules/webxr/WebXRSession.cpp: |
| (WebCore::WebXRSession::create): Added. |
| (WebCore::WebXRSession::WebXRSession): Added. |
| (WebCore::WebXRSession::renderState const): |
| (WebCore::WebXRSession::inputSources const): |
| (WebCore::WebXRSession::shutdown): Shutdown process called on session end. |
| (WebCore::WebXRSession::end): Implemented session ending. |
| * Modules/webxr/WebXRSession.h: Added create() and private constructor. Fixed some naming. |
| * Modules/webxr/WebXRSystem.cpp: |
| (WebCore::WebXRSystem::DummyInlineDevice::DummyInlineDevice): Contructor for the |
| dummy inline device. |
| (WebCore::WebXRSystem::ensureImmersiveXRDeviceIsSelected): Use a counter instead of a boolean |
| to track testing devices as there might be more than 1. |
| (WebCore::WebXRSystem::obtainCurrentDevice): Implemented from specs text. |
| (WebCore::WebXRSystem::immersiveSessionRequestIsAllowedForGlobalObject const): Ditto. |
| (WebCore::WebXRSystem::inlineSessionRequestIsAllowedForGlobalObject const): Ditto. |
| (WebCore::WebXRSystem::resolveRequestedFeatures const): Ditto. |
| (WebCore::WebXRSystem::isXRPermissionGranted const): Ditto. |
| (WebCore::WebXRSystem::requestSession): Ditto. |
| (WebCore::WebXRSystem::registerSimulatedXRDeviceForTesting): Use a counter instead of a bool. |
| Also use a reference in the method argument. |
| (WebCore::WebXRSystem::unregisterSimulatedXRDeviceForTesting): Ditto. |
| (WebCore::WebXRSystem::sessionEnded): Added, used by sessions to notify the XRSystem. |
| * Modules/webxr/WebXRSystem.h: |
| * Modules/webxr/WebXRSystem.idl: Call requestSession with Document. |
| * dom/TaskSource.h: Added a WebXR task source. |
| * platform/xr/PlatformXR.h: Specs state that devices have a list of enabled features per session |
| mode so store them in a hashmap instead of in a Vector. |
| (PlatformXR::Device::supports const): Use the new Hashmap of session modes. |
| (PlatformXR::Device::setEnabledFeatures): Ditto. |
| (PlatformXR::Device::enabledFeatures const): Ditto. |
| (PlatformXR::Device::setSupportedModes): Deleted. |
| * platform/xr/openxr/PlatformXR.cpp: |
| (PlatformXR::Instance::Impl::collectSupportedSessionModes): Return session modes if any. |
| (PlatformXR::Instance::enumerateImmersiveXRDevices): Fill in features per session mode. |
| * testing/WebXRTest.cpp: |
| (WebCore::WebXRTest::simulateDeviceConnection): Fill in features per session mode. |
| (WebCore::WebXRTest::disconnectAllDevices): Pass a reference to unregister. |
| |
| 2020-05-19 Antti Koivisto <antti@apple.com> |
| |
| Animation of font-size with rem values is incorrect |
| https://bugs.webkit.org/show_bug.cgi?id=194765 |
| <rdar://problem/48171742> |
| |
| Reviewed by Antoine Quint. |
| |
| Test: animations/keyframe-rem-unit.html |
| |
| 'rem' computation fails on first style resolution because the document element style is not available. |
| |
| * style/StyleResolver.cpp: |
| (WebCore::Style::Resolver::styleForKeyframe): |
| |
| Provide the override value, needed because the style can't be found from DOM tree yet. |
| |
| 2020-05-19 Andy Estes <aestes@apple.com> |
| |
| [Apple Pay] Add testing and logging for ApplePaySetup |
| https://bugs.webkit.org/show_bug.cgi?id=211972 |
| <rdar://problem/63291965> |
| |
| Reviewed by Alex Christensen. |
| |
| Added support for ApplePaySetup to MockPaymentCoordinator and wrote a test. |
| |
| Added release logging for ApplePaySetup and removed a noisy log message |
| from setApplePayIsActiveIfAllowed. |
| |
| Test: http/tests/ssl/applepay/ApplePaySetup.https.html |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Modules/applepay/ApplePaySetup.cpp: |
| (WebCore::ApplePaySetup::getSetupFeatures): |
| (WebCore::ApplePaySetup::begin): |
| (WebCore::ApplePaySetup::ApplePaySetup): |
| (WebCore::ApplePaySetup::stop): |
| * Modules/applepay/ApplePaySetup.idl: |
| * Modules/applepay/ApplePaySetupConfiguration.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupConfiguration.idl: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeature.idl: |
| * Modules/applepay/ApplePaySetupFeature.mm: |
| (WebCore::ApplePaySetupFeature::state const): |
| * Modules/applepay/ApplePaySetupFeatureState.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeatureState.idl: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureType.idl. |
| * Modules/applepay/ApplePaySetupFeatureType.idl: |
| * Modules/applepay/ApplePaySetupFeatureWebCore.h: |
| * Modules/applepay/ApplePaySetupWebCore.h: |
| (WebCore::ApplePaySetup::create): |
| * Modules/applepay/PaymentCoordinator.cpp: |
| (WebCore::PaymentCoordinator::setApplePayIsActiveIfAllowed const): |
| (WebCore::PaymentCoordinator::getSetupFeatures): |
| (WebCore::PaymentCoordinator::beginApplePaySetup): |
| (WebCore::PaymentCoordinator::endApplePaySetup): |
| * Modules/applepay/PaymentCoordinator.h: |
| * Modules/applepay/PaymentCoordinatorClient.h: |
| (WebCore::PaymentCoordinatorClient::getSetupFeatures): |
| (WebCore::PaymentCoordinatorClient::beginApplePaySetup): |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * testing/MockApplePaySetupFeature.cpp: Copied from Source/WebCore/Modules/applepay/ApplePaySetup.idl. |
| (WebCore::MockApplePaySetupFeature::create): |
| (WebCore::MockApplePaySetupFeature::MockApplePaySetupFeature): |
| * testing/MockApplePaySetupFeature.h: Copied from Source/WebCore/Modules/applepay/ApplePaySetupFeatureWebCore.h. |
| * testing/MockPaymentCoordinator.cpp: |
| (WebCore::MockPaymentCoordinator::addSetupFeature): |
| (WebCore::MockPaymentCoordinator::getSetupFeatures): |
| (WebCore::MockPaymentCoordinator::beginApplePaySetup): |
| * testing/MockPaymentCoordinator.h: |
| * testing/MockPaymentCoordinator.idl: |
| |
| 2020-05-19 Youenn Fablet <youenn@apple.com> |
| |
| Allow calling VideoSampleObserver::videoSampleAvailable from a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=212024 |
| |
| Reviewed by Eric Carlson. |
| |
| Allow RealtimeMediaSource::videoSampleAvailable to be called on a background thread, typically the capture thread. |
| Make WebRTC remote sources and mock capture sources do that. |
| |
| RealtimeMediaSource is then updating its intrinsic size from the generation thread while updating its size in the main thread. |
| The size() getter can be called from both threads. |
| |
| Existing consumers do the following: |
| - media player will hop to the main thread. |
| - media recorder will do processing from the background thread. |
| - WebRTC sender will do processing from the background thread, except when sending black frames where this will still be done on the main thread. |
| This is ok as we ensure either we send black frames on the main thread (and we do not observe the source) or we observe the source to send. |
| |
| Follow-ups will migrate the real capture sources as well as migrating media player processing out of the main thread. |
| Covered by existing tests. |
| |
| * platform/MediaSample.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable): |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::videoSampleAvailable): |
| (WebCore::RealtimeMediaSource::setIntrinsicSize): |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/mac/MockRealtimeVideoSourceMac.h: |
| * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: |
| (WebCore::MockRealtimeVideoSourceMac::MockRealtimeVideoSourceMac): |
| (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h: |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: |
| (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame): |
| (WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample): Deleted. |
| |
| 2020-05-19 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| REGRESSION(r257463): [GTK] Build failure with -DENABLE_GLES2=ON |
| https://bugs.webkit.org/show_bug.cgi?id=212043 |
| |
| Reviewed by Philippe Normand. |
| |
| Fix the typo "Platfom" -> "Platform" |
| |
| * platform/graphics/gstreamer/PlatformDisplayGStreamer.cpp: |
| (createGstGLDisplay): |
| |
| 2020-05-18 Simon Fraser <simon.fraser@apple.com> |
| |
| Move some of the more chatty Scrolling logging to a ScrollingTree channel |
| https://bugs.webkit.org/show_bug.cgi?id=212061 |
| |
| Reviewed by Tim Horton. |
| |
| Move logging about the scrolling tree to a new channel. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::scrollToFragmentInternal): |
| (WebCore::FrameView::scrollToAnchor): |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::createNode): |
| (WebCore::AsyncScrollingCoordinator::insertNode): |
| * page/scrolling/ScrollingStateTree.cpp: |
| (WebCore::ScrollingStateTree::createUnparentedNode): |
| (WebCore::ScrollingStateTree::insertNode): |
| (WebCore::ScrollingStateTree::unparentNode): |
| (WebCore::ScrollingStateTree::unparentChildrenAndDestroyNode): |
| (WebCore::ScrollingStateTree::detachAndDestroySubtree): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::commitTreeState): |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::scrollTo): |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll): |
| * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: |
| (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions): |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded): |
| * platform/Logging.h: |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::attachScrollingNode): |
| |
| 2020-05-18 David Kilzer <ddkilzer@apple.com> |
| |
| Replace TextIndicatorOptions with OptionSet<TextIndicatorOption> |
| <https://webkit.org/b/212051> |
| <rdar://problem/63368556> |
| |
| Reviewed by Simon Fraser. |
| |
| Use OptionSet<TextIndicatorOption> everywhere |
| TextIndicatorOptions was previously used, plus: |
| - Make TextIndicatorOption an enum class. Remove |
| "TextIndicatorOption" prefix so TextIndicatorOptionBar becomes |
| TextIndicatorOption::Bar. |
| - Remove TextIndicatorOptionDefault because OptionSet<> |
| initializes to zero. |
| - Replace static variables (including two globals in WebCore) |
| with constexpr variables. |
| |
| * page/TextIndicator.cpp: |
| (WebCore::TextIndicator::createWithRange): |
| (WebCore::TextIndicator::createWithSelectionInFrame): |
| (WebCore::snapshotOptionsForTextIndicatorOptions): |
| (WebCore::takeSnapshots): |
| (WebCore::hasAnyIllegibleColors): |
| (WebCore::initializeIndicator): |
| * page/TextIndicator.h: |
| * platform/ios/DragImageIOS.mm: |
| (WebCore::createDragImageForLink): |
| (WebCore::createDragImageForSelection): |
| (WebCore::createDragImageForRange): |
| * testing/Internals.h: |
| |
| 2020-05-18 Andy Estes <aestes@apple.com> |
| |
| http/tests/ssl/applepay/ApplePayInstallmentConfiguration.https.html fails in public SDK builds |
| https://bugs.webkit.org/show_bug.cgi?id=212000 |
| <rdar://problem/63323082> |
| |
| Reviewed by Youenn Fablet. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * bindings/js/WebCoreBuiltinNames.h: |
| |
| 2020-05-18 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [WebGPU] Validation for GPUDevice.createTexture() |
| https://bugs.webkit.org/show_bug.cgi?id=211882 |
| <rdar://problem/63215999> |
| |
| Reviewed by Dean Jackson. |
| |
| Add lots of validation for texture creation. The logic was gathered by |
| trial and error. |
| |
| Before this patch, we didn't have any validation. This is a first pass, as |
| the validation logic isn't spelled out in the spec. Next, I will make a pull |
| request to the spec to match this patch. |
| |
| This patch also updates three pieces of our IDL files to match the spec for |
| WebGPU: One to remove GPUTextureUsage.NONE which was replaced with just 0, |
| one to remove GPUTextureDescriptor.arrayLayerCount, which was deleted in |
| favor of using regular dimension fields, and one to add [EnforceRange] to |
| various values. |
| |
| This patch also updates GPUDevice to have a GPUErrorScopes object, which is |
| required for good error messages. |
| |
| Test: webgpu/texture-creation.html |
| |
| * Modules/webgpu/GPUExtent3D.idl: |
| * Modules/webgpu/GPUTextureDescriptor.idl: |
| * Modules/webgpu/WebGPUDevice.cpp: |
| (WebCore::WebGPUDevice::tryCreate): |
| (WebCore::WebGPUDevice::createTexture const): |
| * Modules/webgpu/WebGPUDevice.h: |
| * platform/graphics/gpu/GPUDevice.cpp: |
| (WebCore::maximumMipLevelCount): |
| (WebCore::GPUDevice::tryCreateTexture const): |
| * platform/graphics/gpu/GPUDevice.h: |
| (WebCore::GPUDevice::setErrorScopes): |
| * platform/graphics/gpu/GPUExtent3D.h: |
| * platform/graphics/gpu/GPUObjectBase.h: |
| (WebCore::GPUObjectBase::errorScopes const): |
| (WebCore::GPUObjectBase::errorScopes): Deleted. |
| * platform/graphics/gpu/GPUTexture.h: |
| * platform/graphics/gpu/GPUTextureDescriptor.h: |
| * platform/graphics/gpu/cocoa/GPUTextureMetal.mm: |
| (WebCore::mtlTextureTypeForGPUTextureDescriptor): |
| (WebCore::mtlTextureUsageForGPUTextureUsageFlags): |
| (WebCore::tryCreateMtlTextureDescriptor): |
| (WebCore::GPUTexture::tryCreate): |
| |
| 2020-05-18 Oriol Brufau <obrufau@igalia.com> |
| |
| [css-grid] Clear the override width for computing percent margins |
| https://bugs.webkit.org/show_bug.cgi?id=209461 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| When calculating the min-content contribution of a grid item of an auto |
| sized grid track we must consider the grid item's margin. When the grid |
| item's area is indefinite, a percent margin is resolved to zero. |
| However, when performing a relayout, the percent margin may be solved |
| against the previously computed grid area, since the grid item has |
| already an OverrideContainingBlockLogicalWidth value. |
| |
| In order to re-compute the percent margin properly, we need to clear |
| the previously override value. It's important to be careful of not |
| clearing the override value set during intrinsic size, since we need |
| it for the actual layout phase. Hence, we only reset the 'override' |
| value when we are executing a definite strategy. |
| |
| Tests: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-item-dynamic-min-contribution-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-003.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-004.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-005.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-006.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-007.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-008.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-009.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-010.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-011.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-012.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-013.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-margins-014.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-003.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-004.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-005.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-006.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-007.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-008.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-009.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-010.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-011.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-012.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-013.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-percentage-paddings-014.html |
| |
| * rendering/GridTrackSizingAlgorithm.cpp: |
| (WebCore::hasRelativeMarginOrPaddingForChild): |
| (WebCore::hasRelativeOrIntrinsicSizeForChild): |
| (WebCore::shouldClearOverrideContainingBlockContentSizeForChild): |
| (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): |
| (WebCore::GridTrackSizingAlgorithmStrategy::minLogicalSizeForChild const): |
| (WebCore::DefiniteSizeStrategy::minLogicalSizeForChild const): |
| (WebCore::DefiniteSizeStrategy::minContentForChild const): |
| * rendering/GridTrackSizingAlgorithm.h: |
| |
| 2020-05-18 David Kilzer <ddkilzer@apple.com> |
| |
| Follow-up: Use default initializers in TextIndicatorData |
| <https://webkit.org/b/212039> |
| <rdar://problem/63355619> |
| |
| * page/TextIndicator.h: |
| (WebCore::TextIndicatorData::contentImageScaleFactor): |
| - Simon Fraser says 1 is a better default than 0. |
| |
| 2020-05-18 Peng Liu <peng.liu6@apple.com> |
| |
| Add a quirk to allow an embedded Twitter video to play with one tapping |
| https://bugs.webkit.org/show_bug.cgi?id=211932 |
| |
| Reviewed by Maciej Stachowiak. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::playbackPermitted const): |
| Need to check the topDocument for the existence of user interactions. |
| (WebCore::MediaElementSession::updateMediaUsageIfChanged): Ditto. |
| |
| * page/Quirks.cpp: |
| (WebCore::Quirks::needsPerDocumentAutoplayBehavior const): |
| Add the missing needsQuirks() checking. |
| (WebCore::Quirks::shouldAutoplayForArbitraryUserGesture const): |
| Add a the quirk for twitter.com. |
| |
| * platform/audio/ios/MediaSessionManagerIOS.mm: |
| (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): |
| Clarify the log message. |
| |
| 2020-05-18 Simon Fraser <simon.fraser@apple.com> |
| |
| Content disappears on CSS parallax example |
| https://bugs.webkit.org/show_bug.cgi?id=212045 |
| <rdar://problem/63194217> |
| |
| Reviewed by Tim Horton. |
| |
| In r261632 I fixed parallax scrolling by migrating the perspective transform onto |
| the scroll container layer, and making the scrolled contents layer a "preserve3D" layer. |
| |
| However, scrolling is achieved by changing the boundsOrigin of the scrolled contents layer, |
| so the computation of the perspective matrix, which is a "child layer transform", has to |
| take this boundsOrigin into account, otherwise we compute bad coverage rects, and drop |
| backing store erroneously. |
| |
| Test: compositing/tiling/perspective-on-scroller-tile-coverage.html |
| |
| * platform/graphics/FloatPoint3D.h: |
| (WebCore::FloatPoint3D::FloatPoint3D): |
| (WebCore::FloatPoint3D::move): |
| (WebCore::operator +=): |
| (WebCore::operator -=): |
| (WebCore::operator+): |
| (WebCore::operator-): |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush const): |
| (WebCore::GraphicsLayerCA::layerTransform const): |
| (WebCore::GraphicsLayerCA::adjustCoverageRect const): |
| (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): |
| |
| 2020-05-18 David Kilzer <ddkilzer@apple.com> |
| |
| Use default initializers in TextIndicatorData |
| <https://webkit.org/b/212039> |
| <rdar://problem/63355619> |
| |
| Reviewed by Alex Christensen. |
| |
| Tested by IPC::Decoder::decode() and IPC::Encoder::operator<<() |
| running on WebKit2 API and layout tests. |
| |
| * page/TextIndicator.h: |
| (WebCore::TextIndicatorData): |
| - Add default initializers. |
| (WTF::EnumTraits<WebCore::TextIndicatorPresentationTransition>): |
| - Add EnumTraits so TextIndicatorPresentationTransition may be |
| used by IPC::Decoder::decode() and IPC::Encoder::operator<<(). |
| |
| 2020-05-18 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix operator== and hash() for ExtendedColor |
| https://bugs.webkit.org/show_bug.cgi?id=211993 |
| |
| Post-landing followup. ExtendedColor operator== has to do exact comparison to be |
| consistent with hash(). |
| |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::operator==): |
| |
| 2020-05-18 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Replace uses of +self with +class |
| https://bugs.webkit.org/show_bug.cgi?id=212041 |
| |
| Reviewed by Darin Adler. |
| |
| No change in behavior. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: |
| (WebCore::PlatformCALayer::isWebLayer): |
| |
| 2020-05-18 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Unreviewed restabilization of non-unified build. |
| |
| * accessibility/AXObjectCache.cpp: |
| * html/HTMLAttachmentElement.h: |
| * inspector/agents/InspectorCSSAgent.cpp: |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| * layout/tableformatting/TableFormattingState.cpp: |
| * rendering/RenderTextFragment.h: |
| * rendering/style/KeyframeList.h: |
| |
| 2020-05-18 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Null Ptr Deref @ WebCore::CSSValue::classType |
| https://bugs.webkit.org/show_bug.cgi?id=212036 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Calculated value for a primitive value type can be NULL for a CSS property. Added a null check before dereferencing it. |
| |
| Test: editing/execCommand/null_calc_primitive_value_for_css_property.html |
| |
| * css/CSSPrimitiveValue.cpp: |
| (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const): |
| |
| 2020-05-18 Simon Fraser <simon.fraser@apple.com> |
| |
| Implement conversion between P3 and sRGB color |
| https://bugs.webkit.org/show_bug.cgi?id=211998 |
| |
| Reviewed by Daniel Bates. |
| |
| Color::toSRGBAComponentsLossy() was a lie because it didn't actually convert extended |
| colors into sRGB. Fix that by converting P3 and linaerRGB colors into sRGB, using the color |
| math from CSS Color 4. |
| |
| Renamed the various "linear to sRGB" functions because they work for any RGB colors, |
| not just sRGB. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::toSRGBAComponentsLossy const): |
| * platform/graphics/Color.h: |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::linearToRGBColorComponent): |
| (WebCore::RGBToLinearColorComponent): |
| (WebCore::sRGBColorToLinearComponents): |
| (WebCore::RGBToLinearComponents): |
| (WebCore::linearToRGBComponents): |
| (WebCore::XYZToLinearSRGB): |
| (WebCore::linearSRGBToXYZ): |
| (WebCore::XYZToLinearP3): |
| (WebCore::linearP3ToXYZ): |
| (WebCore::P3ToSRGB): |
| (WebCore::sRGBToP3): |
| (WebCore::ColorMatrix::transformedColorComponents const): |
| (WebCore::linearToSRGBColorComponent): Deleted. |
| (WebCore::sRGBToLinearColorComponent): Deleted. |
| (WebCore::sRGBToLinearComponents): Deleted. |
| (WebCore::linearToSRGBComponents): Deleted. |
| * platform/graphics/ColorUtilities.h: |
| |
| 2020-05-18 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Allow clipboard API access when pasting from a menu item or key binding |
| https://bugs.webkit.org/show_bug.cgi?id=211990 |
| <rdar://problem/63308916> |
| |
| Reviewed by Megan Gardner. |
| |
| Allow the contents of the clipboard to be programmatically requested by the page while pasting from trusted UI |
| (i.e. the paste menu item, or when WebKit API is called by the app to trigger the paste). This allows the |
| 'reading' part of the async clipboard API (`read` and `readText`) to be used when the user pastes in an editable |
| element, without having to fall back to showing the DOM paste access menu. |
| |
| Note that this change should not have an effect on the pasteboard security model, since it only grants the page |
| programmatic access to the contents of the pasteboard in the case where access to the pasteboard has already |
| been granted by the user. Additionally, even in the event that the web process is compromised, even if the web |
| process can be tricked into believing it has been granted pasteboard access, the changes in r259151 will prevent |
| it from being able to request pasteboard data, unless the user (or the application, on behalf of the user) has |
| explicitly pasted via trusted API calls that are inaccessible from the web process. |
| |
| Test: editing/async-clipboard/clipboard-read-while-pasting.html |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::paste): |
| (WebCore::Editor::pasteAsPlainText): |
| (WebCore::Editor::pasteAsQuotation): |
| |
| If `FromMenuOrKeyBinding::Yes` is passed in, set the `m_pastingFromMenuOrKeyBinding` flag to true during the |
| scope of the paste command. |
| |
| * editing/Editor.h: |
| (WebCore::Editor::isPastingFromMenuOrKeyBinding const): |
| * editing/EditorCommand.cpp: |
| (WebCore::executePaste): |
| (WebCore::executePasteAndMatchStyle): |
| (WebCore::executePasteAsPlainText): |
| (WebCore::executePasteAsQuotation): |
| |
| Pass in `FromMenuOrKeyBinding::Yes` when triggering the paste from a menu item or key binding. |
| |
| * page/Frame.cpp: |
| (WebCore::Frame::requestDOMPasteAccess): |
| |
| When pasting from menu or key binding, grant the page DOM paste access without requiring the DOM paste access |
| UI to be shown and confirmed. |
| |
| 2020-05-18 Per Arne Vollan <pvollan@apple.com> |
| |
| [Win] Fix AppleWin build |
| https://bugs.webkit.org/show_bug.cgi?id=212030 |
| |
| Reviewed by Brent Fulgham. |
| |
| The build fails because the number of bitfields in GreaterThanOrSameSizeAsStyleRareInheritedData does not match the |
| actual number of bitfields in StyleRareInheritedData. |
| |
| * rendering/style/StyleRareInheritedData.cpp: |
| |
| 2020-05-18 Rob Buis <rbuis@igalia.com> |
| |
| Remove certain headers when a redirect causes a request method change |
| https://bugs.webkit.org/show_bug.cgi?id=205119 |
| |
| Reviewed by Youenn Fablet. |
| |
| Implement step 11 of HTTP-redirect fetch [1] to redirect to GET |
| method, remove body and strip certain headers for 301, 302 and 303 redirects. |
| |
| Tests: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.html |
| imported/w3c/web-platform-tests/fetch/api/redirect/redirect-method.any.worker.html |
| |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl): |
| * platform/network/HTTPHeaderNames.in: |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::shouldUseGet): |
| (WebCore::ResourceRequestBase::redirectAsGETIfNeeded): |
| (WebCore::ResourceRequestBase::redirectedRequest const): |
| * platform/network/ResourceRequestBase.h: |
| |
| 2020-05-18 Antti Koivisto <antti@apple.com> |
| |
| [Wheel event region] Invalidation for root style |
| https://bugs.webkit.org/show_bug.cgi?id=212029 |
| |
| Reviewed by Simon Fraser. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-root-invalidation.html |
| |
| Invalidate the region when event listeners change on Document or Window. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::invalidateEventListenerRegions): |
| * dom/Document.h: |
| (isType): |
| * dom/Element.cpp: |
| (WebCore::Element::invalidateEventListenerRegions): |
| * dom/Element.h: |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::addEventListener): |
| (WebCore::EventTarget::removeEventListener): |
| (WebCore::EventTarget::removeAllEventListeners): |
| (WebCore::EventTarget::invalidateEventListenerRegions): |
| * dom/EventTarget.h: |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::adjustEventListenerRegionTypesForRootStyle): |
| * style/StyleAdjuster.h: |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| |
| 2020-05-18 Simon Fraser <simon.fraser@apple.com> |
| |
| Find doesn't always scroll search results into view |
| https://bugs.webkit.org/show_bug.cgi?id=212007 |
| <rdar://problem/36333321> |
| |
| Reviewed by Wenson Hsieh. |
| |
| HighlightData::collectBounds() could produce overly large bounds, causing the selection |
| to fail to scroll into view. |
| |
| This happened when multiple block ancestors were added to 'renderers', with empty |
| rects. The process of mapping that empty rect to a quad via localToAbsoluteQuad() |
| could produce an empty quad at a fractional offset, then calling enclosingBoundingBox() |
| on the quad would create a 1x1 rectangle, which got unioned with selectionRect. |
| |
| Fix by skipping entries with empty rects. |
| |
| Add a Selection log channel and some logging that makes this trivial to see. |
| |
| Test: editing/selection/selection-bounds-fractional-containing-blocks.html |
| |
| * platform/Logging.h: |
| * rendering/HighlightData.cpp: |
| (WebCore::HighlightData::collectBounds const): |
| |
| 2020-05-18 Darin Adler <darin@apple.com> |
| |
| Add iterator checking to ListHashSet |
| https://bugs.webkit.org/show_bug.cgi?id=211669 |
| |
| Reviewed by Anders Carlsson. |
| |
| * page/ios/ContentChangeObserver.h: Added an include of Element.h, needed to call |
| makeWeakPtr in an inline function. This is due to a change in the way makeWeakPtr |
| now checks the type of the argument. It's possible we could refine it further to |
| relax this requirement, but it seems OK to include Element.h here. |
| |
| 2020-05-18 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for computing the collapsed table border |
| https://bugs.webkit.org/show_bug.cgi?id=212003 |
| |
| Reviewed by Antti Koivisto. |
| |
| UAs must compute an initial left and right border width for the table by examining |
| the first and last cells in the first row of the table. |
| The left border width of the table is half of the first cell's collapsed left border, |
| and the right border width of the table is half of the last cell's collapsed right border. |
| The top border width of the table is computed by examining all cells who collapse their top |
| borders with the top border of the table. The top border width of the table is equal to half of the |
| maximum collapsed top border. The bottom border width is computed by examining all cells whose bottom borders collapse |
| with the bottom of the table. The bottom border width is equal to half of the maximum collapsed bottom border. |
| |
| https://www.w3.org/TR/CSS22/tables.html#collapsing-borders |
| |
| This patch implements the table box part of the border collapsing. Inner table elements need to implement collapsing as well. |
| |
| * layout/LayoutState.cpp: |
| (WebCore::Layout::LayoutState::ensureTableFormattingState): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: |
| (WebCore::Layout::TableWrapperBlockFormattingContext::layoutTableBox): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeBorderAndPaddingForTableBox): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h: |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints): |
| (WebCore::Layout::TableFormattingContext::ensureTableGrid): |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableFormattingState.cpp: |
| (WebCore::Layout::TableFormattingState::TableFormattingState): |
| * layout/tableformatting/TableFormattingState.h: |
| |
| 2020-05-18 Antoine Quint <graouts@apple.com> |
| |
| Clean up media controls content for Apple platforms |
| https://bugs.webkit.org/show_bug.cgi?id=212011 |
| <rdar://problem/63298588> |
| |
| Reviewed by Dean Jackson. |
| |
| We strip Copyright and other comments from the CSS and JS media controls files. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2020-05-18 Alicia Boya García <aboya@igalia.com> |
| |
| [GStreamer][MediaSource] Remove orphaned tracks in updateTracks() |
| https://bugs.webkit.org/show_bug.cgi?id=211980 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| This patch ensures tracks missing from a subsequent updateTracks() |
| calls are removed from the player. |
| |
| This fixes regressions on the following tests caused on r261683. |
| |
| imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-removetrack.https.html |
| imported/w3c/web-platform-tests/mediacapture-streams/MediaStreamTrack-applyConstraints.https.html |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::hashSetFromHashMapKeys): |
| (WebCore::MediaPlayerPrivateGStreamer::updateTracks): |
| |
| 2020-05-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] "ASSERTION FAILED: !m_adoptionIsRequired" when double clicking on a word |
| https://bugs.webkit.org/show_bug.cgi?id=211957 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Make SelectionData non-refcounted. We can just move in most of the cases to avoid copies. |
| |
| * platform/Pasteboard.h: |
| * platform/gtk/PasteboardGtk.cpp: |
| (WebCore::Pasteboard::createForDragAndDrop): |
| (WebCore::Pasteboard::Pasteboard): |
| (WebCore::Pasteboard::selectionData const): |
| * platform/gtk/SelectionData.h: |
| |
| 2020-05-18 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Add WebKitContextMenuItemType for paste as plaintext |
| https://bugs.webkit.org/show_bug.cgi?id=177638 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add paste as plain text context menu item for rich editable content. |
| |
| * page/ContextMenuController.cpp: |
| (WebCore::ContextMenuController::contextMenuItemSelected): |
| (WebCore::ContextMenuController::populate): |
| (WebCore::ContextMenuController::checkOrEnableIfNeeded const): |
| * platform/ContextMenuItem.h: |
| * platform/LocalizedStrings.h: |
| * platform/gtk/LocalizedStringsGtk.cpp: |
| (WebCore::contextMenuItemTagPasteAsPlainText): |
| |
| 2020-05-17 Simon Fraser <simon.fraser@apple.com> |
| |
| Fix operator== and hash() for ExtendedColor |
| https://bugs.webkit.org/show_bug.cgi?id=211993 |
| |
| Reviewed by Sam Weinig. |
| |
| Color::operator== and hash() were wrong for extended color. Fix operator== |
| to compare extended colors. Extended and non-extended colors have to always |
| conpare as non-equal to preserve computed style behavior, currently. |
| |
| Fix hash() to hash the color components and colorspace for ExtendedColor. |
| |
| Add some API tests for these code paths. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::extendedColorsEqual): |
| * platform/graphics/Color.h: |
| (WebCore::operator==): |
| (WebCore::Color::hash const): |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::areEssentiallyEqual): |
| * platform/graphics/ColorUtilities.h: |
| (WebCore::operator==): |
| (WebCore::operator!=): |
| * platform/graphics/ExtendedColor.cpp: |
| (WebCore::ExtendedColor::hash const): |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::operator==): |
| (WebCore::operator!=): |
| |
| 2020-05-17 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][BFC] Introduce TableWrapperBlockFormattingContext |
| https://bugs.webkit.org/show_bug.cgi?id=211996 |
| |
| Reviewed by Antti Koivisto. |
| |
| Table wrapper box establishes a special BFC with only captions and the actual table box in it. |
| It mostly behaves like a normal BFC but the table box requires some special handing when it comes |
| to padding/border and width/height computation. |
| This patch moves the table box specific code from generic BFC to this new subclass. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * layout/FormattingContext.h: |
| * layout/LayoutContext.cpp: |
| (WebCore::Layout::LayoutContext::createFormattingContext): |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin): |
| * layout/blockformatting/BlockFormattingContext.h: |
| (): Deleted. |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.cpp: Added. |
| (WebCore::Layout::TableWrapperBlockFormattingContext::TableWrapperBlockFormattingContext): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::layoutTableBox): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeWidthAndMarginForTableBox): |
| (WebCore::Layout::TableWrapperBlockFormattingContext::computeHeightAndMarginForTableBox): |
| * layout/blockformatting/tablewrapper/TableWrapperBlockFormattingContext.h: Added. |
| |
| 2020-05-17 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Move to new Pasteboard API |
| https://bugs.webkit.org/show_bug.cgi?id=177633 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add support for custom data and remove the support for unknown data types that is currently unused. |
| |
| * editing/gtk/EditorGtk.cpp: |
| (WebCore::Editor::writeSelectionToPasteboard): Set the contentOrigin. |
| * editing/gtk/WebContentReaderGtk.cpp: |
| (WebCore::shouldReplaceSubresourceURL): Helper to decide whether to replace the subresource URL. |
| (WebCore::WebContentMarkupReader::readHTML): Create a fragment for HTML sanitizing it if needed. |
| * platform/Pasteboard.h: |
| * platform/PasteboardCustomData.h: |
| (WebCore::PasteboardCustomData::gtkType): Mime type name for GTK custom pasteboard data. |
| * platform/SharedBuffer.h: |
| * platform/glib/SharedBufferGlib.cpp: |
| (WebCore::SharedBuffer::createGBytes const): Create a GBytes wrapping the SharedBuffer data. |
| * platform/gtk/PasteboardGtk.cpp: |
| (WebCore::Pasteboard::writeString): |
| (WebCore::Pasteboard::write): |
| (WebCore::Pasteboard::read): |
| (WebCore::Pasteboard::hasData): |
| (WebCore::Pasteboard::typesSafeForBindings): |
| (WebCore::Pasteboard::typesForLegacyUnsafeBindings): |
| (WebCore::Pasteboard::readOrigin): |
| (WebCore::Pasteboard::readString): |
| (WebCore::Pasteboard::readStringInCustomData): |
| (WebCore::Pasteboard::fileContentState): |
| (WebCore::Pasteboard::writeCustomData): |
| * platform/gtk/SelectionData.cpp: |
| (WebCore::SelectionData::clearAllExceptFilenames): |
| * platform/gtk/SelectionData.h: |
| (WebCore::SelectionData::setCustomData): |
| (WebCore::SelectionData::customData const): |
| (WebCore::SelectionData::hasCustomData const): |
| (WebCore::SelectionData::clearCustomData): |
| |
| 2020-05-16 Simon Fraser <simon.fraser@apple.com> |
| |
| Some color-related cleanup |
| https://bugs.webkit.org/show_bug.cgi?id=211991 |
| |
| Reviewed by Sam Weinig. |
| |
| Change FloatComponents and ColorComponents to use std::array<>. |
| |
| Add Color::toSRGBAComponentsLossy() to make explicit potentially lossy conversions |
| between P3 and sRGB colors, and call it in places where we do that conversion. |
| |
| Add const in a few places. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/graphics/Color.cpp: |
| (WebCore::Color::Color): |
| (WebCore::Color::toSRGBAComponentsLossy const): |
| (WebCore::Color::asExtended const): |
| * platform/graphics/Color.h: |
| * platform/graphics/ColorUtilities.cpp: |
| (WebCore::ColorMatrix::ColorMatrix): |
| * platform/graphics/ColorUtilities.h: |
| (WebCore::FloatComponents::FloatComponents): |
| (): Deleted. |
| * platform/graphics/ExtendedColor.cpp: |
| (WebCore::ExtendedColor::create): |
| (WebCore::ExtendedColor::cssText const): |
| * platform/graphics/ExtendedColor.h: |
| (WebCore::ExtendedColor::red const): |
| (WebCore::ExtendedColor::green const): |
| (WebCore::ExtendedColor::blue const): |
| (WebCore::ExtendedColor::alpha const): |
| (WebCore::ExtendedColor::channels const): |
| (WebCore::ExtendedColor::ExtendedColor): |
| * platform/graphics/cg/ColorCG.cpp: |
| (WebCore::leakCGColor): |
| * platform/graphics/filters/FETurbulence.cpp: |
| (WebCore::FETurbulence::fillRegion const): |
| * platform/graphics/filters/FilterOperation.cpp: |
| (WebCore::InvertLightnessFilterOperation::transformColor const): |
| (WebCore::InvertLightnessFilterOperation::inverseTransformColor const): |
| * platform/graphics/gtk/ColorGtk.cpp: |
| (WebCore::Color::operator GdkRGBA const): |
| * platform/graphics/win/ColorDirect2D.cpp: |
| (WebCore::Color::operator D2D1_COLOR_F const): |
| (WebCore::Color::operator D2D1_VECTOR_4F const): |
| |
| 2020-05-16 Andy Estes <aestes@apple.com> |
| |
| Fix the build after r261785. |
| |
| * Modules/applepay/PaymentInstallmentConfiguration.mm: |
| (WebCore::fromDecimalNumber): |
| |
| 2020-05-16 David Kilzer <ddkilzer@apple.com> |
| |
| Let Xcode have its way with WebCore project |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| - Resort TableLayout.cpp. |
| |
| 2020-05-16 Zalan Bujtas <zalan@apple.com> |
| |
| Add missing is<RenderTableSection> check. |
| |
| Unreviewed. |
| |
| * layout/Verification.cpp: |
| (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded): |
| |
| 2020-05-16 Andy Estes <aestes@apple.com> |
| |
| REGRESSION (r260717): installmentConfiguration member is no longer available on ApplePayPaymentRequest |
| https://bugs.webkit.org/show_bug.cgi?id=211911 |
| <rdar://problem/63236367> |
| |
| Reviewed by Tim Horton. |
| |
| Prior to r260717, installmentConfiguration was a member of ApplePayRequestBase, making it |
| available on ApplePayRequest and ApplePayPaymentRequest. In r260717, it was mistakenly |
| moved to ApplePayRequest. |
| |
| This change moves it back to ApplePayRequestBase, adds infrastructure for regression testing |
| ApplePayInstallmentConfiguration, and adds a regression test. |
| |
| Test: http/tests/ssl/applepay/ApplePayInstallmentConfiguration.https.html |
| |
| * Modules/applepay/ApplePayInstallmentConfiguration.idl: |
| * Modules/applepay/ApplePayRequestBase.cpp: |
| (WebCore::convertAndValidate): |
| (WebCore::finishConverting): Deleted. |
| * Modules/applepay/ApplePayRequestBase.idl: |
| * Modules/applepay/PaymentInstallmentConfiguration.mm: |
| (WebCore::fromDecimalNumber): |
| (WebCore::applePaySetupFeatureType): |
| (WebCore::PaymentInstallmentConfiguration::applePayInstallmentConfiguration const): |
| * Modules/applepay/PaymentInstallmentConfigurationWebCore.h: |
| * Modules/applepay/paymentrequest/ApplePayRequest.idl: |
| * testing/MockPaymentCoordinator.cpp: |
| (WebCore::MockPaymentCoordinator::showPaymentUI): |
| * testing/MockPaymentCoordinator.h: |
| * testing/MockPaymentCoordinator.idl: |
| |
| 2020-05-16 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Ignore table padding when borders are collapsed |
| https://bugs.webkit.org/show_bug.cgi?id=211984 |
| |
| Reviewed by Antti Koivisto. |
| |
| Table padding has no room left when the table border is collapsed with the inner table elements. |
| |
| Test: fast/layoutformattingcontext/table-simple-border-collapse-with-padding.html |
| |
| * layout/Verification.cpp: |
| (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded): |
| * layout/layouttree/LayoutBox.cpp: |
| (WebCore::Layout::Box::isPaddingApplicable const): |
| |
| 2020-05-16 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Take vertical spacing into account when setting the height of a cell with rowspan |
| https://bugs.webkit.org/show_bug.cgi?id=211976 |
| |
| Reviewed by Antti Koivisto. |
| |
| When a cell spans over multiple rows, the height of the cell includes the vertical spacing between those spanned rows as well. |
| |
| Test: fast/layoutformattingcontext/table-simple-rowspan-with-spacing.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): |
| |
| 2020-05-15 Antti Koivisto <antti@apple.com> |
| |
| Nullptr crash in MediaQueryMatcher::evaluateAll |
| https://bugs.webkit.org/show_bug.cgi?id=211963 |
| <rdar://problem/62850977> |
| |
| Reviewed by Brent Fulgham. |
| |
| Test: fast/media/media-query-list-mutation.html |
| |
| * css/MediaQueryMatcher.cpp: |
| (WebCore::MediaQueryMatcher::evaluateAll): |
| |
| Copy the vector before iterating. |
| |
| 2020-05-15 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in WebCore::Node::treeScope() when processing nested list insertion commands. |
| https://bugs.webkit.org/show_bug.cgi?id=211964 |
| <rdar://problem/63224871> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Load event may fire in fixOrphanedListChild() and change the node tree. In doApplyForSingleParagraph check for |
| disconnected node returned by fixOrphanedListChild() and bail out. |
| |
| Test: editing/inserting/nested-list-insertion-crash.html |
| |
| * editing/InsertListCommand.cpp: |
| (WebCore::InsertListCommand::doApplyForSingleParagraph): |
| |
| 2020-05-15 Alex Christensen <achristensen@webkit.org> |
| |
| Use enum serialization instead of casting to/from uint32_t |
| https://bugs.webkit.org/show_bug.cgi?id=211885 |
| <rdar://problem/60106629> and <rdar://problem/60107663> |
| |
| Reviewed by Geoffrey Garen. |
| |
| This doesn't change anything except make stricter checks at IPC boundaries. |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::visiblePositionRangeForLine const): |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityModifySelection:increase:]): |
| * editing/EditingBehavior.h: |
| * editing/Editor.cpp: |
| (WebCore::Editor::shouldSmartDelete): |
| (WebCore::Editor::deleteWithDirection): |
| (WebCore::Editor::misspelledWordAtCaretOrRange const): |
| (WebCore::Editor::guessesForMisspelledOrUngrammatical): |
| (WebCore::Editor::markMisspellingsAfterTypingToWord): |
| (WebCore::Editor::markAndReplaceFor): |
| (WebCore::Editor::handleAcceptedCandidate): |
| * editing/EditorCommand.cpp: |
| (WebCore::executeDeleteBackward): |
| (WebCore::executeDeleteBackwardByDecomposingPreviousCharacter): |
| (WebCore::executeDeleteForward): |
| (WebCore::executeDeleteToBeginningOfLine): |
| (WebCore::executeDeleteToBeginningOfParagraph): |
| (WebCore::executeDeleteToEndOfLine): |
| (WebCore::executeDeleteToEndOfParagraph): |
| (WebCore::executeDeleteWordBackward): |
| (WebCore::executeDeleteWordForward): |
| (WebCore::executeForwardDelete): |
| (WebCore::executeMoveBackward): |
| (WebCore::executeMoveBackwardAndModifySelection): |
| (WebCore::executeMoveDown): |
| (WebCore::executeMoveDownAndModifySelection): |
| (WebCore::executeMoveForward): |
| (WebCore::executeMoveForwardAndModifySelection): |
| (WebCore::executeMoveLeft): |
| (WebCore::executeMoveLeftAndModifySelection): |
| (WebCore::executeMoveRight): |
| (WebCore::executeMoveRightAndModifySelection): |
| (WebCore::executeMoveToBeginningOfDocument): |
| (WebCore::executeMoveToBeginningOfDocumentAndModifySelection): |
| (WebCore::executeMoveToBeginningOfLine): |
| (WebCore::executeMoveToBeginningOfLineAndModifySelection): |
| (WebCore::executeMoveToBeginningOfParagraph): |
| (WebCore::executeMoveToBeginningOfParagraphAndModifySelection): |
| (WebCore::executeMoveToBeginningOfSentence): |
| (WebCore::executeMoveToBeginningOfSentenceAndModifySelection): |
| (WebCore::executeMoveToEndOfDocument): |
| (WebCore::executeMoveToEndOfDocumentAndModifySelection): |
| (WebCore::executeMoveToEndOfSentence): |
| (WebCore::executeMoveToEndOfSentenceAndModifySelection): |
| (WebCore::executeMoveToEndOfLine): |
| (WebCore::executeMoveToEndOfLineAndModifySelection): |
| (WebCore::executeMoveToEndOfParagraph): |
| (WebCore::executeMoveToEndOfParagraphAndModifySelection): |
| (WebCore::executeMoveParagraphBackwardAndModifySelection): |
| (WebCore::executeMoveParagraphForwardAndModifySelection): |
| (WebCore::executeMoveUp): |
| (WebCore::executeMoveUpAndModifySelection): |
| (WebCore::executeMoveWordBackward): |
| (WebCore::executeMoveWordBackwardAndModifySelection): |
| (WebCore::executeMoveWordForward): |
| (WebCore::executeMoveWordForwardAndModifySelection): |
| (WebCore::executeMoveWordLeft): |
| (WebCore::executeMoveWordLeftAndModifySelection): |
| (WebCore::executeMoveWordRight): |
| (WebCore::executeMoveWordRightAndModifySelection): |
| (WebCore::executeMoveToLeftEndOfLine): |
| (WebCore::executeMoveToLeftEndOfLineAndModifySelection): |
| (WebCore::executeMoveToRightEndOfLine): |
| (WebCore::executeMoveToRightEndOfLineAndModifySelection): |
| (WebCore::executeSelectLine): |
| (WebCore::executeSelectParagraph): |
| (WebCore::executeSelectSentence): |
| (WebCore::executeSelectWord): |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::FrameSelection): |
| (WebCore::FrameSelection::willBeModified): |
| (WebCore::FrameSelection::modifyExtendingRight): |
| (WebCore::FrameSelection::modifyExtendingForward): |
| (WebCore::FrameSelection::modifyMovingRight): |
| (WebCore::FrameSelection::modifyMovingForward): |
| (WebCore::FrameSelection::modifyExtendingLeft): |
| (WebCore::FrameSelection::modifyExtendingBackward): |
| (WebCore::FrameSelection::modifyMovingLeft): |
| (WebCore::FrameSelection::modifyMovingBackward): |
| (WebCore::isBoundary): |
| (WebCore::FrameSelection::textSelectionIntent): |
| (WebCore::textSelectionWithDirectionAndGranularity): |
| (WebCore::FrameSelection::modify): |
| (WebCore::FrameSelection::clear): |
| (WebCore::FrameSelection::willBeRemovedFromFrame): |
| (WebCore::FrameSelection::updateAppearance): |
| (WebCore::FrameSelection::wordSelectionContainingCaretSelection): |
| (WebCore::FrameSelection::rangeByAlteringCurrentSelection const): |
| * editing/FrameSelection.h: |
| * editing/TextGranularity.h: |
| (): Deleted. |
| * editing/TypingCommand.cpp: |
| (WebCore::editActionForTypingCommand): |
| (WebCore::TypingCommand::deleteKeyPressed): |
| (WebCore::TypingCommand::forwardDeleteKeyPressed): |
| (WebCore::TypingCommand::insertTextRunWithoutNewlines): |
| (WebCore::TypingCommand::insertLineBreak): |
| (WebCore::TypingCommand::insertParagraphSeparator): |
| (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): |
| (WebCore::TypingCommand::deleteSelection): |
| * editing/TypingCommand.h: |
| * editing/VisibleSelection.cpp: |
| (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity): |
| * editing/VisibleSelection.h: |
| * editing/VisibleUnits.cpp: |
| (WebCore::directionIsDownstream): |
| (WebCore::atBoundaryOfGranularity): |
| (WebCore::withinTextUnitOfGranularity): |
| (WebCore::nextWordBoundaryInDirection): |
| (WebCore::nextSentenceBoundaryInDirection): |
| (WebCore::nextParagraphBoundaryInDirection): |
| (WebCore::positionOfNextBoundaryOfGranularity): |
| (WebCore::enclosingTextUnitOfGranularity): |
| (WebCore::charactersAroundPosition): |
| (WebCore::wordRangeFromPosition): |
| (WebCore::closestWordBoundaryForPosition): |
| (WebCore::rangeExpandedByCharactersInDirectionAtWordBoundary): |
| (WebCore::wordBoundaryForPositionWithoutCrossingLine): |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::DataDetection::detectItemAroundHitTestResult): |
| * editing/cocoa/DictionaryLookup.mm: |
| * editing/mac/DictionaryLookupLegacy.mm: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::create): |
| * loader/FrameLoaderClient.h: |
| (WebCore::FrameLoaderClient::webGLPolicyForURL const): |
| (WebCore::FrameLoaderClient::resolveWebGLPolicyForURL const): |
| (): Deleted. |
| * loader/FrameLoaderTypes.h: |
| * page/ContextMenuController.cpp: |
| (WebCore::ContextMenuController::contextMenuItemSelected): |
| * page/DOMSelection.cpp: |
| (WebCore::DOMSelection::modify): |
| * page/DragController.cpp: |
| (WebCore::DragController::concludeEditDrag): |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart): |
| (WebCore::EventHandler::selectClosestWordFromHitTestResult): |
| (WebCore::EventHandler::selectClosestContextualWordFromMouseEvent): |
| (WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): |
| (WebCore::EventHandler::handleMousePressEventTripleClick): |
| (WebCore::EventHandler::handleMousePressEventSingleClick): |
| (WebCore::EventHandler::updateSelectionForMouseDrag): |
| (WebCore::setInitialKeyboardSelection): |
| (WebCore::handleKeyboardSelectionMovement): |
| * rendering/HitTestResult.cpp: |
| (WebCore::HitTestResult::isOverTextInsideFormControlElement const): |
| |
| 2020-05-15 Simon Fraser <simon.fraser@apple.com> |
| |
| Rename the mapLocalToContainer() container argument, since it's not just used for repaint |
| https://bugs.webkit.org/show_bug.cgi?id=211974 |
| |
| Reviewed by Zalan Bujtas. |
| |
| mapLocalToContainer() is a generic geometry mapping function, and not just used for repaint, |
| so rename the "repaintContainer" argument to "ancestorContainer". |
| |
| Also fix some weirdly named variables in RenderMultiColumnFlow. |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::mapLocalToContainer const): |
| * rendering/RenderBox.h: |
| * rendering/RenderFragmentedFlow.cpp: |
| (WebCore::RenderFragmentedFlow::mapLocalToContainer const): |
| * rendering/RenderFragmentedFlow.h: |
| * rendering/RenderInline.cpp: |
| (WebCore::RenderInline::mapLocalToContainer const): |
| (WebCore::RenderInline::pushMappingToContainer const): |
| * rendering/RenderMultiColumnFlow.cpp: |
| (WebCore::RenderMultiColumnFlow::addFragmentToThread): |
| (WebCore::RenderMultiColumnFlow::mapFromFlowToFragment const): |
| (WebCore::RenderMultiColumnFlow::physicalTranslationOffsetFromFlowToFragment const): |
| (WebCore::RenderMultiColumnFlow::physicalTranslationFromFlowToFragment const): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::mapLocalToContainer const): |
| (WebCore::RenderObject::localToContainerQuad const): |
| (WebCore::RenderObject::localToContainerPoint const): |
| * rendering/RenderObject.h: |
| * rendering/RenderView.cpp: |
| (WebCore::RenderView::mapLocalToContainer const): |
| * rendering/svg/RenderSVGForeignObject.cpp: |
| (WebCore::RenderSVGForeignObject::mapLocalToContainer const): |
| * rendering/svg/RenderSVGForeignObject.h: |
| * rendering/svg/RenderSVGInline.cpp: |
| (WebCore::RenderSVGInline::mapLocalToContainer const): |
| * rendering/svg/RenderSVGInline.h: |
| * rendering/svg/RenderSVGModelObject.cpp: |
| (WebCore::RenderSVGModelObject::mapLocalToContainer const): |
| * rendering/svg/RenderSVGModelObject.h: |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::mapLocalToContainer const): |
| * rendering/svg/RenderSVGRoot.h: |
| * rendering/svg/RenderSVGText.cpp: |
| (WebCore::RenderSVGText::mapLocalToContainer const): |
| * rendering/svg/RenderSVGText.h: |
| * rendering/svg/SVGRenderSupport.cpp: |
| (WebCore::SVGRenderSupport::mapLocalToContainer): |
| * rendering/svg/SVGRenderSupport.h: |
| |
| 2020-05-15 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r249091): Can't click on a video in the second column of a paginated web view |
| https://bugs.webkit.org/show_bug.cgi?id=211973 |
| <rdar://problem/61418775> |
| |
| Reviewed by Zalan Bujtas. |
| |
| In r249091 I made clip layer computation use offsetFromAncestor() by default, but this turns |
| out to give different behavior from mapping via renderers in columns. |
| |
| The bug was that accumulateOffsetTowardsAncestor() would map through the |
| RenderMultiColumnFlow columns if the ancestorLayer was the one that was using columns, |
| but mapping via renderers only maps through columns if converting to some ancestor of |
| the columnated renderer. |
| |
| I did not investigate why this only affects video. |
| |
| Test: fast/multicol/clipped-video-in-second-column.html |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::accumulateOffsetTowardsAncestor): |
| (WebCore::RenderLayer::calculateClipRects const): |
| |
| 2020-05-15 Kenneth Russell <kbr@chromium.org> |
| |
| OES_texture_float internal format conversion must depend on WEBGL_color_buffer_float |
| https://bugs.webkit.org/show_bug.cgi?id=211971 |
| |
| Reviewed by Dean Jackson. |
| |
| Only adjust the internal formats of textures created for the WebGL |
| 1.0 OES_texture_float extension if the WEBGL_color_buffer_float |
| extension has been enabled. |
| |
| Covered by the WebGL 1.0 OES_texture_float conformance tests when |
| run on iOS with another forthcoming fix to ANGLE which will enable |
| the OES_texture_float extension on that platform. |
| |
| * platform/graphics/angle/ExtensionsGLANGLE.cpp: |
| (WebCore::ExtensionsGLANGLE::ensureEnabled): |
| (WebCore::ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat): |
| * platform/graphics/angle/ExtensionsGLANGLE.h: |
| * platform/graphics/angle/GraphicsContextGLANGLE.cpp: |
| (WebCore::GraphicsContextGLOpenGL::texImage2DDirect): |
| |
| 2020-05-15 Oriol Brufau <obrufau@igalia.com> |
| |
| [css-grid] Treat percentages as auto for the minimum contribution |
| https://bugs.webkit.org/show_bug.cgi?id=195967 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| The minimum contribution of a grid item is the outer size resulting from |
| the minimum size if the computed preferred size behaves as auto, or the |
| min-content contribution otherwise. |
| |
| If the preferred size is a percentage, it should be resolved with |
| respect to the grid area, which depends on the minimum contribution |
| of the item. Thus the percentage is cyclic and behaves as auto. |
| |
| Before this change, WebKit only checked whether the preferred size is |
| auto, not whether it behaves as auto. In fact this was according to |
| an older version of the spec, but it was changed in |
| https://github.com/w3c/csswg-drafts/issues/2367 |
| |
| Test: imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-minimum-contribution-with-percentages.html |
| |
| Some cases in the test still fail due to bug 209461. |
| |
| * rendering/GridTrackSizingAlgorithm.cpp: |
| (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const): |
| |
| 2020-05-15 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Animation with a single keyframe is not accelerated |
| https://bugs.webkit.org/show_bug.cgi?id=188730 |
| <rdar://problem/43481113> |
| |
| Reviewed by Dean Jackson. |
| |
| Test: webanimations/accelerated-animation-single-keyframe.html |
| |
| Prior to attempting to run an accelerated effect, ensure that the KeyframeList passed to |
| RenderLayerModelObject::startAnimation() does not have implicit keyframes since eventually |
| GraphicsLayerCA::animationCanBeAccelerated() would be called and would reject a single-keyframe |
| animation. To do this, we use the same code used in Style::Resolver::keyframeStylesForAnimation() |
| which we refactor in the new KeyframeList::fillImplicitKeyframes() method. |
| |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::copyPropertiesFromSource): |
| (WebCore::KeyframeEffect::applyPendingAcceleratedActions): |
| * rendering/style/KeyframeList.cpp: |
| (WebCore::KeyframeList::hasImplicitKeyframes const): |
| (WebCore::KeyframeList::copyKeyframes): |
| (WebCore::zeroPercentKeyframe): |
| (WebCore::hundredPercentKeyframe): |
| (WebCore::KeyframeList::fillImplicitKeyframes): |
| * rendering/style/KeyframeList.h: |
| * style/StyleResolver.cpp: |
| (WebCore::Style::Resolver::keyframeStylesForAnimation): |
| |
| 2020-05-15 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| The initial value of "transform-box" should be "view-box" |
| https://bugs.webkit.org/show_bug.cgi?id=211927 |
| |
| Reviewed by Simon Fraser. |
| |
| Specs: https://drafts.csswg.org/css-transforms/#transform-box. |
| |
| Test: svg/transforms/svg-transform-box-initial.html |
| |
| * css/CSSProperties.json: |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::initialTransformBox): |
| |
| 2020-05-15 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for crash in accessibility/mac/replace-text-with-range-on-webarea-element.html in isolated tree mode. |
| https://bugs.webkit.org/show_bug.cgi?id=211954 |
| |
| Reviewed by Chris Fleizach. |
| |
| Fixes crash in isolated tree mode in accessibility/mac/replace-text-with-range-on-webarea-element.html. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::postTextStateChangeNotification): Check for null object before dereferencing. |
| (WebCore::AXObjectCache::rootWebArea): Reverted to returning an AXObject since it is not needed to return AXCoreObject. |
| * accessibility/AXObjectCache.h: |
| |
| 2020-05-15 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Move column and row balancing logic to a dedicated class |
| https://bugs.webkit.org/show_bug.cgi?id=211937 |
| |
| Reviewed by Antti Koivisto. |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForRows): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraSpace): |
| (WebCore::Layout::ColumnSpan::hasSpan): Deleted. |
| (WebCore::Layout::ColumnSpan::isSpanned): Deleted. |
| (WebCore::Layout::ColumnSpan::spanCount): Deleted. |
| (WebCore::Layout::ColumnSpan::startSpan): Deleted. |
| (WebCore::Layout::ColumnSpan::endSpan): Deleted. |
| (WebCore::Layout::ColumnSpan::index): Deleted. |
| (WebCore::Layout::ColumnSpan::size): Deleted. |
| (WebCore::Layout::ColumnSpan::spacing): Deleted. |
| (WebCore::Layout::RowSpan::hasSpan): Deleted. |
| (WebCore::Layout::RowSpan::isSpanned): Deleted. |
| (WebCore::Layout::RowSpan::spanCount): Deleted. |
| (WebCore::Layout::RowSpan::startSpan): Deleted. |
| (WebCore::Layout::RowSpan::endSpan): Deleted. |
| (WebCore::Layout::RowSpan::index): Deleted. |
| (WebCore::Layout::RowSpan::size): Deleted. |
| (WebCore::Layout::RowSpan::spacing): Deleted. |
| (WebCore::Layout::GridSpace::isEmpty const): Deleted. |
| (): Deleted. |
| (WebCore::Layout::max): Deleted. |
| (WebCore::Layout::operator-): Deleted. |
| (WebCore::Layout::operator+=): Deleted. |
| (WebCore::Layout::operator-=): Deleted. |
| (WebCore::Layout::operator/): Deleted. |
| (WebCore::Layout::distributeAvailableSpace): Deleted. |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): Deleted. |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): Deleted. |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableFormattingState.h: |
| (WebCore::Layout::TableFormattingState::tableGrid const): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::widthConstraints const): |
| (WebCore::Layout::TableGrid::Rows::list const): |
| (WebCore::Layout::TableGrid::widthConstraints): Deleted. |
| (WebCore::Layout::TableGrid::Rows::rowList const): Deleted. |
| |
| 2020-05-15 Alicia Boya García <aboya@igalia.com> |
| |
| [GStreamer][MediaStream] Fix missing video size |
| https://bugs.webkit.org/show_bug.cgi?id=211938 |
| |
| Reviewed by Philippe Normand. |
| |
| r261683 redefined m_currentVideoStreamId. Under the new design, tracks |
| have several states: |
| |
| - "wanted": a track has been selected from JavaScript, or chosen by |
| default. |
| |
| - "requested": a track that is expected to be chosen by the next |
| STREAMS_SELECTED message. |
| |
| - "current": a track that has been selected after the STREAMS_SELECTED |
| message has been handled. |
| |
| naturalSize() used to check m_currentVideoStreamId to look for the |
| video size, but this is called relatively early before the track |
| becomes "current" under the new design. |
| |
| Since the size tags can't be queried at any time, it makes sense to |
| use m_wantedVideoStreamId instead. |
| |
| This fixes the following tests which were previously regressed: |
| |
| fast/mediastream/get-user-media-constraints.html |
| fast/mediastream/getUserMedia-video-rescaling.html |
| fast/mediastream/mediastreamtrack-video-clone.html |
| imported/w3c/web-platform-tests/mediacapture-streams/MediaStream-MediaElement-firstframe.https.html |
| fast/mediastream/media-stream-renders-first-frame.html |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::naturalSize const): |
| |
| 2020-05-15 Antti Koivisto <antti@apple.com> |
| |
| [Wheel event region] Invalidation when changing listeners on elements |
| https://bugs.webkit.org/show_bug.cgi?id=211895 |
| |
| Reviewed by Simon Fraser. |
| |
| Doesn't handle root (window/document) invalidation yet. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-element-invalidation.html |
| |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::addEventListener): |
| (WebCore::EventTarget::removeEventListener): |
| (WebCore::EventTarget::removeAllEventListeners): |
| |
| Invalidate element style on wheel event changes. |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::styleWillChange): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::invalidateEventRegion): |
| |
| Build on non-iOS platforms. |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::maintainsEventRegion const): |
| |
| Factor into function so it can be shared with RenderLayer::invalidateEventRegion. |
| |
| (WebCore::RenderLayerBacking::updateEventRegion): |
| * rendering/RenderLayerBacking.h: |
| |
| 2020-05-15 Antoine Quint <graouts@apple.com> |
| |
| Cursor should not update on a 20ms timer |
| https://bugs.webkit.org/show_bug.cgi?id=211884 |
| <rdar://problem/63220368> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: fast/events/mouse-cursor-udpate-during-raf.html |
| |
| Update cursors after rAF callbacks have been serviced and layout has been updated. |
| |
| * page/Page.cpp: |
| (WebCore::Page::updateRendering): |
| (WebCore::Page::doAfterUpdateRendering): |
| |
| 2020-05-15 Andres Gonzalez <andresg_22@apple.com> |
| |
| Update the isolated tree only if isolated tree mode is enabled. |
| https://bugs.webkit.org/show_bug.cgi?id=211936 |
| |
| Reviewed by Chris Fleizach. |
| |
| Check for isIsolatedTreeEnabled before updating the isolated tree. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::updateIsolatedTree): |
| |
| 2020-05-15 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK3] Bring back usage of GtkMenu for context menus |
| https://bugs.webkit.org/show_bug.cgi?id=211557 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * platform/gtk/GtkVersioning.h: Remove GtkPopover functions used only for context menus. |
| |
| 2020-05-14 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Unreviewed. Fix build warning after r261113 |
| |
| Remove unused variable. |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const): |
| |
| 2020-05-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| Expose isColumnHeaderCell and isRowHeaderCell through AXCoreObject. |
| https://bugs.webkit.org/show_bug.cgi?id=211919 |
| |
| Reviewed by Chris Fleizach. |
| |
| Multiple tests including accessibility/crash-table-recursive-layout.html. |
| |
| - Expose isColumn/RowHeaderCell through AXCoreObject in order to make the |
| return value of AccessibilityTable::cellForColumnAndRow an AXCoreObject. |
| - Implemented these methods for AXIsolatedObject. |
| - isolatedCopy the accessibilityDescription property. |
| |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityObjectInterface.h: |
| * accessibility/AccessibilityTable.cpp: |
| (WebCore::AccessibilityTable::cellForColumnAndRow): Removed incorrect |
| assert since children are AXCoreObjects and not necessarily AccessibilityTableCells. |
| * accessibility/AccessibilityTable.h: |
| * accessibility/AccessibilityTableCell.cpp: |
| (WebCore::AccessibilityTableCell::isTableCellInSameRowGroup): |
| (WebCore::AccessibilityTableCell::isTableCellInSameColGroup): |
| (WebCore::AccessibilityTableCell::columnHeaders): |
| (WebCore::AccessibilityTableCell::rowHeaders): |
| * accessibility/AccessibilityTableCell.h: |
| * accessibility/AccessibilityTableColumn.cpp: |
| (WebCore::AccessibilityTableColumn::addChildren): |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityElementForRow:andColumn:]): |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-05-14 Timothy Hatcher <timothy@apple.com> |
| |
| Add baseURL version of _WKUserStyleSheet forWKWebView. |
| https://bugs.webkit.org/show_bug.cgi?id=211926 |
| rdar://problem/62074675 |
| |
| Reviewed by Devin Rousso. |
| |
| Consolidate the paths taken for adding a UserStyleSheet. The m_injectedStyleSheetToSource |
| was missing for page specific style sheets since it was another loop. |
| |
| * dom/ExtensionStyleSheets.cpp: |
| (WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache const): |
| (WebCore::ExtensionStyleSheets::injectPageSpecificUserStyleSheet): |
| (WebCore::ExtensionStyleSheets::removePageSpecificUserStyleSheet): |
| (WebCore::ExtensionStyleSheets::detachFromDocument): |
| * dom/ExtensionStyleSheets.h: |
| |
| 2020-05-14 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Relaxing signature length requirements for U2fRegister |
| https://bugs.webkit.org/show_bug.cgi?id=209645 |
| <rdar://problem/63204591> |
| |
| Reviewed by Brent Fulgham. |
| |
| It turns out the length range specified from the spec, i.e., [71, 73] is wrong. |
| https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#registration-response-message-success |
| |
| It should actually be [70, 72]. However, as a middleware to relay the messages, user agents |
| are not necessary to check the length. Therefore, the check is relaxed to make the code more robust. |
| |
| Covered by existing tests. |
| |
| * Modules/webauthn/fido/U2fResponseConverter.cpp: |
| (fido::WebCore::createFidoAttestationStatementFromU2fRegisterResponse): |
| |
| 2020-05-14 Timothy Hatcher <timothy@apple.com> |
| |
| Add sourceURL to _evaluateJavaScript: so the scripts appear in Web Inspector. |
| https://bugs.webkit.org/show_bug.cgi?id=211904 |
| rdar://problem/62074376 |
| |
| Reviewed by Devin Rousso. |
| |
| Added sourceURL to RunJavaScriptParameters. Use it instead of the frame's document URL. |
| |
| * bindings/js/RunJavaScriptParameters.h: |
| (WebCore::RunJavaScriptParameters::RunJavaScriptParameters): |
| (WebCore::RunJavaScriptParameters::encode const): |
| (WebCore::RunJavaScriptParameters::decode): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::executeScriptInWorldIgnoringException): |
| (WebCore::ScriptController::executeScriptInWorld): |
| (WebCore::ScriptController::callInWorld): |
| (WebCore::ScriptController::executeUserAgentScriptInWorld): |
| |
| 2020-05-14 Eric Carlson <eric.carlson@apple.com> |
| |
| [Cocoa] Don't clear NowPlaying state unless it was set |
| https://bugs.webkit.org/show_bug.cgi?id=211899 |
| <rdar://problem/62249870> |
| |
| Reviewed by Jer Noble. |
| |
| Test: media/now-playing-status-without-media.html |
| |
| * platform/audio/PlatformMediaSessionManager.h: |
| (WebCore::PlatformMediaSessionManager::haveEverRegisteredAsNowPlayingApplication const): Method |
| added for testing. |
| |
| * platform/audio/cocoa/MediaSessionManagerCocoa.h: |
| * platform/audio/cocoa/MediaSessionManagerCocoa.mm: |
| (WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Don't clear NowPlaying state unless |
| it was setup in the first place. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::nowPlayingState const): Add new property. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| AXCoreObject font comparison methods should take another AXCoreObject instead of a RenderObject. |
| https://bugs.webkit.org/show_bug.cgi?id=211909 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| - In order for font comparison methods to be implementted for both |
| AXObjects and AXIsolatedObjects, they should take another AXCoreObject |
| to compare against, instead of a RenderObject. |
| - The AXIsolatedObject implementation of these methods is forwarded to |
| the associated AXObject and dispatched to the main thread. |
| - Implemented AXIsolatedObject::accessibilityDescription, hasUnderline and isUnvisited. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::Accessibility::isAccessibilityObjectSearchMatchAtIndex): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityObjectInterface.h: |
| (WebCore::AXCoreObject::isNativeListBox const): |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::hasSameFont const): |
| (WebCore::AccessibilityRenderObject::hasSameFontColor const): |
| (WebCore::AccessibilityRenderObject::hasSameStyle const): |
| * accessibility/AccessibilityRenderObject.h: |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| (WebCore::AXIsolatedObject::hasSameFont const): |
| (WebCore::AXIsolatedObject::hasSameFontColor const): |
| (WebCore::AXIsolatedObject::hasSameStyle const): |
| (WebCore::AXIsolatedObject::isNativeListBox const): Deleted, implemented in base class. |
| (WebCore::AXIsolatedObject::isUnvisited const): Deleted, inlined in header. |
| (WebCore::AXIsolatedObject::hasUnderline const): Deleted, inlined in header. |
| (WebCore::AXIsolatedObject::accessibilityDescription const): Deleted, inlined in header. |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-05-14 Nikita Vasilyev <nvasilyev@apple.com> |
| |
| Web Inspector: front-end shouldn't change the order of User Style Sheet rules |
| https://bugs.webkit.org/show_bug.cgi?id=210893 |
| <rdar://problem/61937118> |
| |
| Reviewed by Devin Rousso. |
| |
| Previously, some style sheets were falsly detected as Inspector::Protocol::CSS::StyleSheetOrigin::User |
| causing incorrect order of style rules in Web Inspector. |
| |
| Test: inspector/css/getMatchedStylesForNode.html |
| |
| * inspector/agents/InspectorCSSAgent.cpp: |
| (WebCore::InspectorCSSAgent::detectOrigin): |
| |
| 2020-05-14 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] Update the placeholder icon image for attachment elements with progress="0" |
| https://bugs.webkit.org/show_bug.cgi?id=211898 |
| <rdar://problem/63203900> |
| |
| Reviewed by Timothy Hatcher. |
| |
| Refactor logic for creating an attachment placeholder image into a separate helper method, with a |
| WebKitAdditions implementation when HAVE(SYSTEM_ATTACHMENT_PLACEHOLDER_ICON) is defined. |
| |
| * rendering/RenderThemeMac.mm: |
| (WebCore::createAttachmentPlaceholderImage): |
| (WebCore::paintAttachmentIconPlaceholder): |
| |
| 2020-05-14 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r254856) Family Health iOS app is broken due to lack for WebSQL support |
| https://bugs.webkit.org/show_bug.cgi?id=211896 |
| <rdar://problem/63025045> |
| |
| Reviewed by Maciej Stachowiak. |
| |
| Add RuntimeApplicationChecks function to identify Family Health app on iOS. |
| |
| * platform/RuntimeApplicationChecks.h: |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::IOSApplication::isFamilyHealthApp): |
| |
| 2020-05-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| AXIsolatedTree::updateChildren needs to apply pending changes before updating the given node. |
| https://bugs.webkit.org/show_bug.cgi?id=211790 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by multiple tests. |
| |
| AXIsolatedTree::updateChildren may be fired for an isolated object that |
| is still in the pending changes list, and thus nodeForID would fail, |
| causing the isolated tree to not be updated. This patch calls |
| applyPendingChanges before updating the given node's children. |
| Additional logging was added including the logging of the AXObjectCache |
| object hierarchy. |
| |
| * accessibility/AXLogger.cpp: |
| (WebCore::AXLogger::log): |
| (WebCore::operator<<): |
| * accessibility/AXLogger.h: |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::remove): |
| (WebCore::AXObjectCache::postNotification): |
| (WebCore::AXObjectCache::performDeferredCacheUpdate): |
| (WebCore::AXObjectCache::updateIsolatedTree): |
| * accessibility/AXObjectCache.h: |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::updateNode): |
| (WebCore::AXIsolatedTree::updateSubtree): |
| (WebCore::AXIsolatedTree::updateChildren): |
| (WebCore::AXIsolatedTree::focusedNode): |
| (WebCore::AXIsolatedTree::removeNode): |
| (WebCore::AXIsolatedTree::removeSubtree): |
| (WebCore::AXIsolatedTree::applyPendingChanges): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| |
| 2020-05-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for crash in LayoutTest in isolated tree mode. |
| https://bugs.webkit.org/show_bug.cgi?id=211894 |
| |
| Reviewed by Chris Fleizach. |
| |
| Several LayoutTests. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]): Check backing object for nullity before dereferencing. |
| |
| 2020-05-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| AXIsolatedObject::isOnScreen needs to be dispatched to the main thread. |
| https://bugs.webkit.org/show_bug.cgi?id=211893 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::children): Split assert into two lines for readability. |
| (WebCore::AXIsolatedObject::isOnScreen const): Forward to associated AXObject and dispatch to the main thread. |
| |
| 2020-05-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| Implementation of AXIsolatedObject::hasPlainText. |
| https://bugs.webkit.org/show_bug.cgi?id=211892 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| Adding hasPlainText to the cached properties map. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| (WebCore::AXIsolatedObject::hasPlainText const): Deleted, inlined in header. |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-05-14 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed build fix. |
| |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::createContextWebGL): downcast m_context to |
| WebGLRenderingContextBase before calling isXRCompatible(). It's created |
| as a WebGLRenderingContextBase but stored in a CanvasRenderingContext. |
| |
| 2020-05-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| Replacing and inserting text need to be dispatched to the main thread. |
| https://bugs.webkit.org/show_bug.cgi?id=211863 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| In isolated tree mode WebAccessibilityObjectWrapper accessibilityReplaceRange |
| and InsertText may be called on the secondary thread. Thus the AXIsolatedObject |
| implementation of this functionality needs to forward these calls to the |
| associated AXObject on the main thread. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::replaceTextInRange): |
| (WebCore::AXIsolatedObject::insertText): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityReplaceRange:withText:]): |
| (-[WebAccessibilityObjectWrapper accessibilityInsertText:]): |
| |
| 2020-05-14 Antoine Quint <graouts@apple.com> |
| |
| Cursor should not update on a 20ms timer |
| https://bugs.webkit.org/show_bug.cgi?id=211884 |
| <rdar://problem/63220368> |
| |
| Reviewed by Antti Koivisto. |
| |
| Update the cursor during page rendering rather than using a 20ms timer. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::EventHandler): |
| (WebCore::EventHandler::clear): |
| (WebCore::EventHandler::updateCursorIfNeeded): |
| (WebCore::EventHandler::handleMouseMoveEvent): |
| (WebCore::EventHandler::scheduleCursorUpdate): |
| (WebCore::EventHandler::cursorUpdateTimerFired): Deleted. |
| * page/EventHandler.h: |
| * page/Page.cpp: |
| (WebCore::Page::updateRendering): |
| |
| 2020-05-14 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] webrtc/disable-encryption.html is a crashing flaky |
| https://bugs.webkit.org/show_bug.cgi?id=211166 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Make sure the audio and video mediastream source elements are correctly removed and disposed |
| from their parent bin when resetting the track sources. Before this change there was a |
| possibility of disposing the elements while they were still in PLAYING state. |
| |
| * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: |
| (WebCore::_WebKitMediaStreamSrc::SourceData::reset): |
| (WebCore::webkitMediaStreamSrcDispose): |
| (WebCore::webkitMediaStreamSrcRemoveTrackByType): |
| |
| 2020-05-14 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixed, mid May 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=211859 |
| |
| Unreviewed build. |
| |
| No new tests needed. |
| |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: Add missing IDBBindingUtilities.h and |
| IDBSerializationContext.h includes. |
| * accessibility/AccessibilityRenderObject.cpp: Add missing EventHandler.h include. |
| * css/parser/CSSParserToken.cpp: Add missing RuntimeEnabledFeatures.h include. |
| * editing/gtk/WebContentReaderGtk.cpp: Add missing Blob.h include. |
| * html/canvas/OESTextureHalfFloat.cpp: Add missing ExtensionsGL.h include. |
| * page/ShareDataReader.h: Add missing ExceptionOr.h include. |
| * rendering/ContentfulPaintChecker.cpp: Add missing RenderView.h include. |
| * rendering/style/StyleRareInheritedData.h: Add missing RenderStyleConstants.h and |
| wtf/OptionSet.h includes. |
| * rendering/style/StyleRareNonInheritedData.h: Add missing TouchAction.h and wtf/OptionSet.h |
| includes. |
| * style/StyleAdjuster.h: Add missing RenderStyleConstants.h include and forward declaration |
| for WebCore::EventTarget. |
| |
| 2020-05-14 Alicia Boya García <aboya@igalia.com> |
| |
| [GStreamer] Playbin3 track switch rework |
| https://bugs.webkit.org/show_bug.cgi?id=211623 |
| |
| Reviewed by Philippe Normand. |
| |
| This patch reworks how track selection and reporting of selected |
| tracks is done in the player. |
| |
| The following found limitations and assumptions in current GStreamer |
| have informed this patch: |
| |
| a) Although the API for playbin3 is designed to be able to accept any |
| number of tracks of any kind, this is not supported in practice. |
| |
| b) The first track of each type is always selected. Even in playbin3 |
| mode, looking for GST_STREAM_FLAG_SELECT is not a reliable method, as |
| in most cases the demuxer does not set it at all. [qtdemux never sets |
| it at all, and matroskademux only sets it in certain cases.] |
| |
| c) Sending GST_EVENT_SELECT_STREAMS is only safe at certain moments. |
| It's not safe before pre-roll, after EOS or during the handling of |
| another SELECT_STREAMS. |
| |
| d) Selecting text tracks with playbin APIs is not relevant. All text |
| tracks are already being picked by WebKitTextCombiner, unaffected by |
| playbin track selection. |
| |
| e) Tracks requested in a GST_EVENT_SELECT_STREAMS are eventually |
| selected. On the other hand, looking at |
| GST_MESSAGE_STREAMS_SELECTED's content is not reliable, as this has |
| been seen to miss tracks depending on thread luck. |
| |
| This patch takes the points above into account to rework how track |
| selection is handled in MediaPlayerPrivateGStreamer and fix the |
| following issues: |
| |
| 1) In playbin3 mode, no track was marked as selected initially, |
| because of reliance on GST_STREAM_FLAG_SELECT. |
| |
| 2) In playbin2 mode, sometimes tracks would not be initially marked as |
| selected. This occurred because of reliance on the "selected" property |
| in inputselector sinkpads, whose initialization is racy -- it can |
| occur after the track has been added and picked up by WebKit. |
| |
| 3) In playbin3 mode, the limitations explained before has been honored |
| to make track selection stable, delaying SELECT_STREAMS events until |
| they are safe to send. |
| |
| This patch doesn't introduce significative behavior changes, rather |
| aiming for improving the stabilitity of the player. Existing tests |
| should provide enough coverage. |
| |
| * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: |
| (WebCore::AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer): |
| (WebCore::AudioTrackPrivateGStreamer::setEnabled): |
| * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): |
| (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): |
| (WebCore::MediaPlayerPrivateGStreamer::updateEnabledVideoTrack): |
| (WebCore::MediaPlayerPrivateGStreamer::updateEnabledAudioTrack): |
| (WebCore::MediaPlayerPrivateGStreamer::playbin3SendSelectStreamsIfAppropriate): |
| (WebCore::MediaPlayerPrivateGStreamer::updateTracks): |
| (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): |
| (WebCore::MediaPlayerPrivateGStreamer::handleMessage): |
| (WebCore::MediaPlayerPrivateGStreamer::didEnd): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: |
| * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: |
| (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): |
| * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: |
| * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: |
| (WebCore::VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer): |
| (WebCore::VideoTrackPrivateGStreamer::setSelected): |
| * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: |
| |
| 2020-05-14 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Can't replay blob videos in web.whatsapp.com |
| https://bugs.webkit.org/show_bug.cgi?id=192540 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| This is a variant of bug 211627 but I could reproduce it only for videos. Unfortunately I |
| wasn't able to write a reliable test for this. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus): Prevent the fill timer from |
| running forever after buffering completed. |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (webKitWebSrcMakeRequest): Don't buffer blobs, this doesn't seem useful as they're already |
| in memory anyway. |
| |
| 2020-05-06 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Implement WebGLRenderingContextBase::makeXRCompatible() |
| https://bugs.webkit.org/show_bug.cgi?id=211506 |
| |
| Reviewed by Youenn Fablet. |
| |
| The WebXR spec defines a way to mark a WebGLRenderingContext as |
| compatible with WebXR. This can be made at creation time (by setting the |
| xrCompatible) attribute or by calling makeXRCompatible(). |
| |
| There are several web-platform-tests testing/using this feature, however we |
| cannot enable them right now as we need some other features to be implemented |
| first. |
| |
| * Modules/webxr/NavigatorWebXR.cpp: |
| (WebCore::NavigatorWebXR::xr): Do not pass ScriptExecutionContext and use |
| the Navigator's instead. |
| * Modules/webxr/NavigatorWebXR.h: Ditto. |
| * Modules/webxr/NavigatorWebXR.idl: Ditto. |
| * Modules/webxr/WebXRSystem.h: expose ensureImmersiveXRDeviceIsSelected() and |
| hasActiveImmersiveXRDevice() to be used from canvas and the rendering context. |
| * html/HTMLCanvasElement.cpp: |
| (WebCore::HTMLCanvasElement::createContextWebGL): call |
| ensureImmersiveXRDeviceIsSelected() if xrCompatible is set. |
| * html/canvas/WebGLContextAttributes.idl: Added xrCompatible. |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase): |
| Initialize m_isXRCompatible. |
| (WebCore::WebGLRenderingContextBase::makeXRCompatible): Implemented. |
| * html/canvas/WebGLRenderingContextBase.h: Defined makeXRCompatible(). |
| * html/canvas/WebGLRenderingContextBase.idl: Added makeXRCompatible(). |
| * platform/graphics/GraphicsContextGLAttributes.h: Added xrCompatible. |
| * testing/Internals.cpp: |
| (WebCore::Internals::xrTest): Simplified the usage of NavigatorWebXR. |
| |
| 2020-05-13 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for cases when the balancing is not based on the initial width |
| https://bugs.webkit.org/show_bug.cgi?id=211878 |
| |
| Reviewed by Antti Koivisto. |
| |
| This patch adds support for the cases when the table stretches all the way to the maximum content size, |
| and we still choose the minimum width as the initial width and the maximum width as the base for balancing the extra space. |
| |
| Consider the following 2 tables: |
| |
| <table> |
| <tr><td style="width: 20px"></td><td>some long long long content</td></tr> |
| <tr><td style="width: 20px"></td><td>22px width content</td></tr> |
| </table> |
| |
| <table> |
| <tr><td style="width: 20px"></td><td>some long long long content</td></tr> |
| <tr><td style="width: 20px"></td><td id=fixed_width style="width: 22px;">22px width content</td></tr> |
| </table> |
| |
| These tables have the same maximum widths and they both stretch to that size. |
| However the second table will end up with a wider first and narrower second column because of the |
| width property on the [fixed_width] cell. |
| While the first table applies the maximum width for each columns, the second table uses the minimum width as the |
| initial width and balances the extra space using the maximum width (as the distribution ratio). |
| This produces a very different layout where the first table has no line wrapping, while |
| the second table wraps the "some long long long content" text (even though the used max widths are the same for each cells). |
| |
| Test: fast/layoutformattingcontext/table-fixed-width-with-max-distribution.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::ColumnSpan::spacing): |
| (WebCore::Layout::RowSpan::spacing): |
| (WebCore::Layout::distributeAvailableSpace): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| |
| 2020-05-13 Zalan Bujtas <zalan@apple.com> |
| |
| Do not clear selection/repaint when the renderer gets moved during tree normalization. |
| https://bugs.webkit.org/show_bug.cgi?id=211865 |
| <rdar://problem/62849044> |
| |
| Reviewed by Antti Koivisto. |
| |
| While detachFromRenderElement should really be about "this renderer is being detached from its parent", some code in here assumes |
| the renderer is not only going to be detached but also going to be destroyed. Ideally such code should live in RenderObject::willBeDestroyed(), |
| but no tree walk is possible in there anymore. |
| |
| The reason for the crash is that when we split the inline for continuation, we construct new anonymous containers and move subtrees over |
| to these new renderers. However at this point these new parent containers are not yet attached to the tree |
| so any tree-walking cleanup code will fail (in detachFromRenderElement). |
| |
| Test: fast/repaint/do-no-repaint-on-internal-move.html |
| |
| * rendering/updating/RenderTreeBuilder.cpp: |
| (WebCore::RenderTreeBuilder::detachFromRenderElement): |
| * rendering/updating/RenderTreeBuilder.h: |
| * rendering/updating/RenderTreeBuilderInline.cpp: |
| (WebCore::RenderTreeBuilder::Inline::splitInlines): |
| |
| 2020-05-13 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: show EventTarget listeners as an internal property |
| https://bugs.webkit.org/show_bug.cgi?id=211766 |
| |
| Reviewed by Timothy Hatcher. |
| |
| Test: inspector/runtime/getProperties-internalProperties.html |
| |
| Add a `listeners` internal property for `EventTarget` objects with the value |
| ``` |
| listeners: { |
| <event>: [ |
| { |
| callback: <function> |
| capture: <boolean> |
| passive: <boolean> |
| once: <boolean> |
| } |
| ... |
| ] |
| ... |
| } |
| ``` |
| so long as at least one `JSEventListener` has been added prior to that point. |
| |
| * inspector/WebInjectedScriptHost.cpp: |
| (WebCore::objectForEventTargetListeners): Added. |
| (WebCore::WebInjectedScriptHost::getInternalProperties): |
| Drive-by: only add the `name` internal property if the `Worker` actually has a name. |
| |
| 2020-05-13 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: rename CSS.StyleSheetOrigin.Regular to CSS.StyleSheetOrigin.Author to match the spec |
| https://bugs.webkit.org/show_bug.cgi?id=211827 |
| |
| Reviewed by Timothy Hatcher. |
| |
| Tests: inspector/css/add-rule.html |
| inspector/css/getMatchedStylesForNode.html |
| |
| * inspector/agents/InspectorCSSAgent.cpp: |
| (WebCore::InspectorCSSAgent::asInspectorStyleSheet): |
| (WebCore::InspectorCSSAgent::detectOrigin): |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::InspectorStyleSheet::buildObjectForRule): |
| |
| 2020-05-13 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| JSDOMWindowBase m_windowCloseWatchpoints must be Ref<> |
| https://bugs.webkit.org/show_bug.cgi?id=211844 |
| |
| Reviewed by Mark Lam. |
| |
| JSDOMWindowBase::m_windowCloseWatchpoints is WatchpointSet, not Ref<WatchpointSet>. And it is passed to JSC IC layer via PropertySlot::setWatchpoint(...). |
| And ProxyableAccessCase can hold it as `RefPtr<WatchpointSet> m_additionalSet;`, this is wrong. |
| |
| This patch hides WatchpointSet constructor behind `protected` to disallow non Ref<> WatchpointSet construction. We made it `protected` since InferredValueWatchpointSet |
| inherits WatchpointSet and uses this constructor. |
| |
| Possibly, this does not matter: ProxyableAccessCase keeps Structure, which points to JSDOMWindowBase. So, it would not happen that ProxyableAccessCase has a wrong pointer |
| to WatchpointSet since JSDOMWindowBase is kept alive anyway. But avoid using RefCounted objects without RefCount allocation is better since this can cause bugs easily. |
| |
| * bindings/js/JSDOMWindowBase.cpp: |
| (WebCore::JSDOMWindowBase::JSDOMWindowBase): |
| (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow): |
| * bindings/js/JSDOMWindowBase.h: |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::JSDOMWindow::getOwnPropertySlot): |
| |
| 2020-05-13 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in InsertParagraphSeparatorCommand::doApply when the canonical position is uneditable |
| https://bugs.webkit.org/show_bug.cgi?id=211864 |
| <rdar://problem/62982161> |
| |
| Reviewed by Geoffrey Garen. |
| |
| The position returned by positionAvoidingSpecialElementBoundary() is uneditable so we need to |
| check for uneditable insertion position and bail out before calling insertNodeAt to avoid assertion. |
| |
| Test: editing/inserting/insert-img-uneditable-canonical-position-crash.html |
| |
| * editing/InsertParagraphSeparatorCommand.cpp: |
| (WebCore::InsertParagraphSeparatorCommand::doApply): |
| |
| 2020-05-13 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in DeleteSelectionCommand::doApply() when merge node is disconnected. |
| https://bugs.webkit.org/show_bug.cgi?id=211793 |
| <rdar://problem/62993645> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Check for disconnected merge destination and endingSelection() after mergeParagraph is |
| Called and bail out to avoid using corrupted positions for node insertion. |
| |
| Test: editing/inserting/insert-text-merge-node-removed-crash.html |
| |
| * editing/CompositeEditCommand.cpp: |
| (WebCore::CompositeEditCommand::moveParagraphs): |
| * editing/DeleteSelectionCommand.cpp: |
| (WebCore::DeleteSelectionCommand::mergeParagraphs): |
| |
| 2020-05-13 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Re-enable 'OutsideViewport' rAF throttling |
| https://bugs.webkit.org/show_bug.cgi?id=211482 |
| |
| Reviewed by Darin Adler. |
| |
| Test: fast/animation/request-animation-frame-throttling-outside-viewport.html |
| |
| Make preferredFrameInterval return AggressiveThrottlingAnimationInterval |
| if the OutsideViewport throttling reason exists. |
| |
| Add an internal setting for enabling 'OutsideViewport' rAF throttling. It |
| is on by default but it is off by default for DRT and WTR. An Internals |
| API is added to enable it for specific tests which want to test its |
| functionality. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState): |
| * page/Page.cpp: |
| (WebCore::Page::setOutsideViewportThrottlingEnabledForTesting): |
| * page/Page.h: |
| (WebCore::Page::canUpdateThrottlingReason const): |
| * platform/graphics/AnimationFrameRate.h: |
| (WebCore::preferredFrameInterval): |
| (WebCore::operator<<): |
| * testing/Internals.cpp: |
| (WebCore::Internals::resetToConsistentState): |
| (WebCore::Internals::setOutsideViewportThrottlingEnabled): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-13 Andres Gonzalez <andresg_22@apple.com> |
| |
| Remove unnecessary assert in {WebAccessibilityObjectWrapper attachmentView]. |
| https://bugs.webkit.org/show_bug.cgi?id=211857 |
| |
| Reviewed by Chris Fleizach. |
| |
| This assert is unnecessary since the backing object that is relevant is |
| the one on the main thread. This was causing crashes in LayoutTest in |
| isolated tree mode. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper attachmentView]): |
| |
| 2020-05-13 Jer Noble <jer.noble@apple.com> |
| |
| Replace isNullFunctionPointer with real weak-linking support |
| https://bugs.webkit.org/show_bug.cgi?id=211751 |
| |
| Reviewed by Sam Weinig. |
| |
| Use the new WTF_WEAK_LINK_FORCE_IMPORT macro. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp: |
| (WebCore::LibWebRTCProvider::webRTCAvailable): |
| |
| 2020-05-13 Andres Gonzalez <andresg_22@apple.com> |
| |
| Implementation of AXIsolatedObject::hasBoldFont and hasItalicFont. |
| https://bugs.webkit.org/show_bug.cgi?id=211858 |
| |
| Reviewed by Chris Fleizach. |
| |
| Added hasBoldFont and hasItalicFont to the cached properties map. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): Added properties to cache. |
| (WebCore::AXIsolatedObject::hasBoldFont const): Deleted. Inlined in header. |
| (WebCore::AXIsolatedObject::hasItalicFont const): Deleted. Inlined in header. |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-05-13 Tim Horton <timothy_horton@apple.com> |
| |
| Add SPI for reverting to touch events for iPad trackpad interactions |
| https://bugs.webkit.org/show_bug.cgi?id=211824 |
| <rdar://problem/61363084> |
| |
| Reviewed by Megan Gardner. |
| |
| * loader/DocumentLoader.h: |
| (WebCore::DocumentLoader::mouseEventPolicy const): |
| (WebCore::DocumentLoader::setMouseEventPolicy): |
| |
| 2020-05-13 Kenneth Russell <kbr@chromium.org> |
| |
| Bad flicker on three.js example |
| https://bugs.webkit.org/show_bug.cgi?id=183151 |
| |
| Reviewed by Dean Jackson. |
| |
| With preserveDrawingBuffer:true and antialias:false, allocate an |
| intermediate texture and FBO, and blit from it to the destination |
| texture in prepareTexture(). Use wipeAlphaChannelFromPixels on iOS |
| as well as macOS. |
| |
| In addition to fixing the test case from the bug, this also fixes |
| the webgl/2.0.0/conformance2/textures/webgl_canvas/ layout tests, |
| which will be re-enabled in a subsequent patch. It also passes the |
| more stringent webgl_canvas conformance tests in |
| https://github.com/KhronosGroup/WebGL/pull/3071 . |
| |
| * platform/graphics/angle/GraphicsContextGLANGLE.cpp: |
| (WebCore::GraphicsContextGLOpenGL::readPixelsAndConvertToBGRAIfNecessary): |
| (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): |
| (WebCore::GraphicsContextGLOpenGL::resolveMultisamplingIfNecessary): |
| (WebCore::GraphicsContextGLOpenGL::readPixels): |
| (WebCore::GraphicsContextGLOpenGL::validateDepthStencil): |
| (WebCore::GraphicsContextGLOpenGL::prepareTexture): |
| (WebCore::GraphicsContextGLOpenGL::reshape): |
| * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: |
| (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): |
| (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.h: |
| |
| 2020-05-13 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] "Copy" context menu action for attachment element does not work in Mail |
| https://bugs.webkit.org/show_bug.cgi?id=211817 |
| <rdar://problem/58043110> |
| |
| Reviewed by Tim Horton. |
| |
| Minor refactoring to help support writing attachment data to the pasteboard when using context menu actions to |
| copy an attachment element on iOS. See below for more details, as well as the WebKit ChangeLog entry. |
| |
| Test: WKAttachmentTestsIOS.CopyAttachmentUsingElementAction |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::platformContentTypeForBlobType const): |
| (WebCore::Editor::promisedAttachmentInfo): |
| |
| Move promisedAttachmentInfo out of DragController and into Editor, so that it is accessible outside of drag |
| and drop code. |
| |
| * editing/Editor.h: |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::Editor::platformContentTypeForBlobType const): |
| |
| Move this private helper function out of DragController as well, and into Editor. |
| |
| * page/DragClient.h: |
| * page/DragController.cpp: |
| (WebCore::DragController::startDrag): |
| |
| Refactor this to use Editor::promisedAttachmentInfo(). |
| |
| (WebCore::DragController::platformContentTypeForBlobType const): Deleted. |
| (WebCore::DragController::promisedAttachmentInfo): Deleted. |
| * page/DragController.h: |
| * page/mac/DragControllerMac.mm: |
| (WebCore::DragController::platformContentTypeForBlobType const): Deleted. |
| |
| 2020-05-13 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Calling reverse() on an accelerated animation has no effect |
| https://bugs.webkit.org/show_bug.cgi?id=204717 |
| <rdar://problem/62503582> |
| |
| Reviewed by Dean Jackson. |
| |
| Test: webanimations/accelerated-animation-playback-rate.html |
| |
| We completely ignored the playbackRate set on a WebAnimation object when considering whether we could run an accelerated animation. |
| To address this we do several things. |
| |
| First, we now add a playbackRate() on Animation objects such that we can make GraphicsLayerCA aware of the originating WebAnimation's |
| playback rate and use this data to opt out of running CA animations for animations with a playbackRate other than 1 in |
| GraphicsLayerCA::animationCanBeAccelerated(). We'll be looking to add support for variable playback rates for CA animations in |
| https://bugs.webkit.org/show_bug.cgi?id=211839. |
| |
| Then, we make sure to completely replace an accelerated animation whenever one of the properties affected timing would change. Up until |
| now we would onyl do this for a change in the effective currentTime, but this needs to also happen when the current time doesn't change |
| but the animation may have changed playback rate or any of its timing properties that could change the duration of the animation. So we |
| remove the "Seek" command and instead use an "UpdateTiming" command that will remove the existing animation and add a new one. |
| |
| This allows us to remove any notion of seeking in GraphicsLayer since now we'll just create a new animation when its timing attributes |
| changed. |
| |
| This revealed an issue where if we called animationFinished() and startAnimation() on a RenderLayerModelObject in succession, theanimation |
| removal would not occur on the GraphicsLayerCA because we disregarded any pending accelerated action for an animation we knew would be |
| replaced. We now ensure we honor the removal in GraphicsLayerCA::appendToUncommittedAnimations(). |
| |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::updateTiming): |
| * animation/AnimationEffect.h: |
| * animation/CSSAnimation.cpp: |
| (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation): |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::addPendingAcceleratedAction): |
| (WebCore::KeyframeEffect::animationDidChangeTimingProperties): |
| (WebCore::KeyframeEffect::applyPendingAcceleratedActions): |
| (WebCore::KeyframeEffect::backingAnimationForCompositedRenderer const): |
| (WebCore::KeyframeEffect::animationDidSeek): Deleted. |
| * animation/KeyframeEffect.h: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::effectTimingDidChange): |
| (WebCore::WebAnimation::setCurrentTime): |
| (WebCore::WebAnimation::setPlaybackRate): |
| (WebCore::WebAnimation::updatePlaybackRate): |
| (WebCore::WebAnimation::reverse): |
| * animation/WebAnimation.h: |
| * platform/animation/Animation.h: |
| (WebCore::Animation::playbackRate const): |
| (WebCore::Animation::setPlaybackRate): |
| * platform/graphics/GraphicsLayer.h: |
| (WebCore::GraphicsLayer::pauseAnimation): |
| (WebCore::GraphicsLayer::seekAnimation): Deleted. |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::animationCanBeAccelerated const): |
| (WebCore::GraphicsLayerCA::updateAnimations): |
| (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): |
| (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): |
| (WebCore::GraphicsLayerCA::seekAnimation): Deleted. |
| (WebCore::GraphicsLayerCA::seekCAAnimationOnLayer): Deleted. |
| * platform/graphics/ca/GraphicsLayerCA.h: |
| * rendering/RenderElement.h: |
| (WebCore::RenderElement::animationPaused): |
| (WebCore::RenderElement::animationSeeked): Deleted. |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::animationSeeked): Deleted. |
| * rendering/RenderLayerBacking.h: |
| * rendering/RenderLayerModelObject.cpp: |
| (WebCore::RenderLayerModelObject::animationSeeked): Deleted. |
| * rendering/RenderLayerModelObject.h: |
| |
| 2020-05-13 Antti Koivisto <antti@apple.com> |
| |
| [Wheel event region] Debug overlay |
| https://bugs.webkit.org/show_bug.cgi?id=211850 |
| |
| Reviewed by Simon Fraser. |
| |
| This is tied to the existing Wheel event handler overlay debug flag. |
| |
| * platform/graphics/Color.cpp: |
| (WebCore::makeRGB): Deleted. |
| (WebCore::makeRGBA): Deleted. |
| * platform/graphics/Color.h: |
| (WebCore::makeRGB): |
| (WebCore::makeRGBA): |
| |
| Make constexpr. |
| |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::eventListenerRegionForType const): |
| * rendering/EventRegion.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::patternForDescription): |
| |
| Factor into a function. |
| |
| (WebCore::patternForTouchAction): |
| (WebCore::patternForEventListenerRegionType): |
| (WebCore::RenderLayerBacking::paintDebugOverlays): |
| (WebCore::RenderLayerBacking::paintContents): |
| |
| 2020-05-13 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Fix refactoring issue with animation suspension following r261336 |
| https://bugs.webkit.org/show_bug.cgi?id=211842 |
| <rdar://problem/63118326> |
| |
| Reviewed by Dean Jackson. |
| |
| We moved up the suspension code up from DocumentTimeline to DocumentTimelinesController in r261336 |
| and forgot to move the code that set the initial suspension state from the DocumentTimeline constructor |
| to the DocumentTimelinesController constructor. This is problematic because the suspension state is |
| only recorded on DocumentTimelinesController itself. |
| |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::DocumentTimeline): |
| * animation/DocumentTimelinesController.cpp: |
| (WebCore::DocumentTimelinesController::DocumentTimelinesController): |
| (WebCore::DocumentTimelinesController::addTimeline): |
| |
| 2020-05-13 Simon Fraser <simon.fraser@apple.com> |
| |
| composited scrolling interferes with the propagation of perspective |
| https://bugs.webkit.org/show_bug.cgi?id=156435 |
| <rdar://problem/25642222> |
| |
| Reviewed by Antti Koivisto. |
| |
| When we made RenderLayerBacking-internal layers for composited scrolling (m_scrollContainerLayer, |
| m_scrolledContentsLayer) we'd lose the effects of the sublayer transform, which was applied |
| to the primary layer, causing perspective on the scroller to not propagate to transformed descendants. |
| |
| Fix by moving the sublayer transform to the scroll container layer (adjusting the perspective |
| matrix as appropriate), and making the scrolled contents layer a "preserve3D" layer so |
| that it doesn't flatten. |
| |
| This fixes both macOS and iOS. |
| |
| Test: compositing/transforms/perspective-with-scrolling.html |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint): |
| |
| 2020-05-13 Youenn Fablet <youenn@apple.com> |
| |
| Allow WebAudioBufferList to dynamically change its number of frames |
| https://bugs.webkit.org/show_bug.cgi?id=211720 |
| |
| Reviewed by Eric Carlson. |
| |
| We sometimes create WebAudioBufferList on the stack which triggers allocation of several vectors. |
| Instead of doing that for every audio sample chunk, we should allocate the WebAudioBufferList and resize it as necessary. |
| For that purpose, we introduce WebAudioBufferList::updateWithNumberOfFrames and use it in two places: |
| - When creating an audio track into WebAudio. |
| - When receiving audio chunks from another process. |
| Covered by existing tests. |
| |
| * Modules/webaudio/MediaStreamAudioSource.cpp: |
| (WebCore::MediaStreamAudioSource::~MediaStreamAudioSource): |
| * Modules/webaudio/MediaStreamAudioSource.h: |
| * Modules/webaudio/MediaStreamAudioSourceCocoa.cpp: |
| (WebCore::streamDescription): |
| (WebCore::MediaStreamAudioSource::consumeAudio): |
| * platform/audio/cocoa/WebAudioBufferList.cpp: |
| (WebCore::WebAudioBufferList::WebAudioBufferList): |
| (WebCore::WebAudioBufferList::updateWithNumberOfFrames): |
| (WebCore::WebAudioBufferList::channelCount const): |
| * platform/audio/cocoa/WebAudioBufferList.h: |
| * platform/mediastream/mac/MockAudioSharedUnit.mm: |
| (WebCore::MockAudioSharedUnit::reconfigure): |
| Drive-by fix, we do not need to give the size in bytes but the size in samples. |
| |
| 2020-05-13 Andres Gonzalez <andresg_22@apple.com> |
| |
| Check for accessibilityEnabled() before posting notifications asynchronously. |
| https://bugs.webkit.org/show_bug.cgi?id=211848 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by multiple tests. Fixes crashes in LayoutTests in isolated tree mode. |
| |
| During LayoutTests, accessibility may be disabled between the time the |
| notifications are queued and the timer fires. Thus it is necessary to |
| check for accessibilityEnabled() before posting the notifications |
| asynchronously. Not doing so was causing crashes in isolated mode. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::notificationPostTimerFired): |
| |
| 2020-05-13 Simon Fraser <simon.fraser@apple.com> |
| |
| The perspective matrix is affected by overflow:hidden on a box with borders |
| https://bugs.webkit.org/show_bug.cgi?id=211828 |
| |
| Reviewed by Zalan Bujtas. |
| |
| For a box with non-uniform borders, the layer created for overflow:hidden is not |
| centered in its parent layer. However, we push the childrenTransform onto this |
| clipping layer, so that transform needs to be adjusted to account for the geometry |
| of the clipping layer. |
| |
| Test: compositing/transforms/perspective-with-clipping.html |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::perspectiveTransform const): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::scrollContainerLayerBox): |
| (WebCore::clippingLayerBox): |
| (WebCore::overflowControlsHostLayerBox): |
| (WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint): |
| |
| 2020-05-13 Tomoki Imai <Tomoki.Imai@sony.com> |
| |
| Selected element on Web Inspector is not highlighted with CPU Rendering. |
| https://bugs.webkit.org/show_bug.cgi?id=195933 |
| |
| Reviewed by Devin Rousso. |
| |
| Expose InspectorOverlay::shouldShowOverlay via InspectorController. |
| It's used to determine whether WebPage needs a transparency layer to draw highlight. |
| |
| * inspector/InspectorController.cpp: |
| (WebCore::InspectorController::shouldShowOverlay const): |
| * inspector/InspectorController.h: |
| * inspector/InspectorOverlay.h: |
| |
| 2020-05-13 Zan Dobersek <zdobersek@igalia.com> |
| |
| REGRESSION(r261023): [GTK][WPE] Several WebGL tests are failing |
| https://bugs.webkit.org/show_bug.cgi?id=211338 |
| |
| Reviewed by Dean Jackson. |
| |
| For non-ANGLE-backed WebGL, we are still required to query the internal |
| format of the target texture for the texture sub-image commands. Falling |
| back to that behavior on !USE(ANGLE) removes regressions in a bunch of |
| WebGL tests. |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::texImageSourceHelper): |
| (WebCore::WebGLRenderingContextBase::texImageArrayBufferViewHelper): |
| |
| 2020-05-13 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| Unreviewed. Fix GTK debug build after r261554 |
| |
| Remove writeToClipboard that receives a const SelectionData& that is no longer used. Make |
| readBufferFromClipboard pure virtual and remove the GTK leftovers from PlatformPasteboard. |
| |
| * platform/PasteboardStrategy.h: |
| * platform/PlatformPasteboard.h: |
| |
| 2020-05-13 Antti Koivisto <antti@apple.com> |
| |
| [Wheel event region] Add support for getting wheel event region from ScrollingTree |
| https://bugs.webkit.org/show_bug.cgi?id=211785 |
| |
| Reviewed by Simon Fraser. |
| |
| Add ScrollingTree::eventListenerRegionTypesForPoint. It is not used yet. |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::eventListenerRegionTypesForPoint const): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/mac/ScrollingTreeMac.h: |
| * page/scrolling/mac/ScrollingTreeMac.mm: |
| (collectDescendantLayersAtPoint): |
| (ScrollingTreeMac::eventListenerRegionTypesForPoint const): |
| * platform/graphics/ca/PlatformCALayer.h: |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: |
| (WebCore::PlatformCALayerCocoa::eventRegionContainsPoint const): Deleted. |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::eventListenerRegionTypesForPoint const): |
| * rendering/EventRegion.h: |
| |
| 2020-05-12 Alex Christensen <achristensen@webkit.org> |
| |
| Give some NetworkLoadMetrics to WebCoreNSURLSession's delegate |
| https://bugs.webkit.org/show_bug.cgi?id=211759 |
| <rdar://problem/62909440> |
| |
| Reviewed by Jer Noble. |
| |
| This required packaging the fetchStart time with the rest of the time deltas, |
| passing a const NetworkLoadMetrics& down to the media loader, and packaging the data up |
| in an ObjC object that pretends to be NSURLSessionTaskMetrics, just like WebCoreNSURLSession |
| pretends to be an NSURLSession. |
| |
| I manually verified the NSDates are correct. This is not straightforward to automate tests for |
| because of the inherant dynamic nature of timing data, and because our other WebCoreNSURLSession |
| tests use WebKitLegacy, and that approach won't work here because we are only hooking up data from |
| NSURLSession, which is only used in modern WebKit. |
| |
| * Modules/beacon/NavigatorBeacon.cpp: |
| (WebCore::NavigatorBeacon::notifyFinished): |
| * Modules/beacon/NavigatorBeacon.h: |
| * bindings/js/CachedModuleScriptLoader.cpp: |
| (WebCore::CachedModuleScriptLoader::notifyFinished): |
| * bindings/js/CachedModuleScriptLoader.h: |
| * dom/LoadableClassicScript.cpp: |
| (WebCore::LoadableClassicScript::notifyFinished): |
| * dom/LoadableClassicScript.h: |
| * html/HTMLImageLoader.cpp: |
| (WebCore::HTMLImageLoader::notifyFinished): |
| * html/HTMLImageLoader.h: |
| * html/ImageDocument.cpp: |
| (WebCore::ImageDocument::finishedParsing): |
| * loader/ApplicationManifestLoader.cpp: |
| (WebCore::ApplicationManifestLoader::notifyFinished): |
| * loader/ApplicationManifestLoader.h: |
| * loader/CrossOriginPreflightChecker.cpp: |
| (WebCore::CrossOriginPreflightChecker::notifyFinished): |
| * loader/CrossOriginPreflightChecker.h: |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::notifyFinished): |
| * loader/DocumentLoader.h: |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::notifyFinished): |
| * loader/DocumentThreadableLoader.h: |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::notifyFinished): |
| * loader/ImageLoader.h: |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::notifyFinished): |
| * loader/LinkLoader.h: |
| * loader/LinkPreloadResourceClients.h: |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResource::notifyFinished): |
| * loader/MediaResourceLoader.h: |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::didReceiveResponse): |
| (WebCore::SubresourceLoader::didFinishLoading): |
| * loader/TextTrackLoader.cpp: |
| (WebCore::TextTrackLoader::notifyFinished): |
| * loader/TextTrackLoader.h: |
| * loader/appcache/ApplicationCacheResourceLoader.cpp: |
| (WebCore::ApplicationCacheResourceLoader::responseReceived): |
| (WebCore::ApplicationCacheResourceLoader::notifyFinished): |
| * loader/appcache/ApplicationCacheResourceLoader.h: |
| * loader/cache/CachedApplicationManifest.cpp: |
| (WebCore::CachedApplicationManifest::finishLoading): |
| * loader/cache/CachedApplicationManifest.h: |
| * loader/cache/CachedCSSStyleSheet.cpp: |
| (WebCore::CachedCSSStyleSheet::finishLoading): |
| (WebCore::CachedCSSStyleSheet::checkNotify): |
| * loader/cache/CachedCSSStyleSheet.h: |
| * loader/cache/CachedFont.cpp: |
| (WebCore::CachedFont::finishLoading): |
| (WebCore::CachedFont::checkNotify): |
| * loader/cache/CachedFont.h: |
| * loader/cache/CachedImage.cpp: |
| (WebCore::CachedImage::finishLoading): |
| * loader/cache/CachedImage.h: |
| * loader/cache/CachedRawResource.cpp: |
| (WebCore::CachedRawResource::updateBuffer): |
| (WebCore::CachedRawResource::finishLoading): |
| * loader/cache/CachedRawResource.h: |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::load): |
| (WebCore::CachedResource::checkNotify): |
| (WebCore::CachedResource::finishLoading): |
| (WebCore::CachedResource::error): |
| (WebCore::CachedResource::cancelLoad): |
| (WebCore::CachedResource::didAddClient): |
| * loader/cache/CachedResource.h: |
| * loader/cache/CachedResourceClient.h: |
| (WebCore::CachedResourceClient::notifyFinished): |
| * loader/cache/CachedSVGDocument.cpp: |
| (WebCore::CachedSVGDocument::finishLoading): |
| * loader/cache/CachedSVGDocument.h: |
| * loader/cache/CachedScript.cpp: |
| (WebCore::CachedScript::finishLoading): |
| * loader/cache/CachedScript.h: |
| * loader/cache/CachedTextTrack.cpp: |
| (WebCore::CachedTextTrack::finishLoading): |
| * loader/cache/CachedTextTrack.h: |
| * loader/cache/CachedXSLStyleSheet.cpp: |
| (WebCore::CachedXSLStyleSheet::finishLoading): |
| (WebCore::CachedXSLStyleSheet::checkNotify): |
| * loader/cache/CachedXSLStyleSheet.h: |
| * loader/cache/KeepaliveRequestTracker.cpp: |
| (WebCore::KeepaliveRequestTracker::notifyFinished): |
| * loader/cache/KeepaliveRequestTracker.h: |
| * loader/icon/IconLoader.cpp: |
| (WebCore::IconLoader::notifyFinished): |
| * loader/icon/IconLoader.h: |
| * platform/graphics/PlatformMediaResourceLoader.h: |
| (WebCore::PlatformMediaResourceClient::loadFinished): |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: |
| (WebCore::CachedResourceMediaLoader::notifyFinished): |
| * platform/network/NetworkLoadMetrics.h: |
| (WebCore::NetworkLoadMetrics::isolatedCopy const): |
| (WebCore::NetworkLoadMetrics::operator== const): |
| (WebCore::NetworkLoadMetrics::encode const): |
| (WebCore::NetworkLoadMetrics::decode): |
| (WTF::Persistence::Coder<Optional<WebCore::NetworkLoadPriority>>::encode): Deleted. |
| (WTF::Persistence::Coder<Optional<WebCore::NetworkLoadPriority>>::decode): Deleted. |
| * platform/network/cocoa/NetworkLoadMetrics.mm: |
| (WebCore::copyTimingData): |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (networkLoadMetricsDate): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics _initWithMetrics:]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics fetchStartDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupStartDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics domainLookupEndDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics connectStartDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics secureConnectionStartDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics connectEndDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics requestStartDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics responseStartDate]): |
| (-[WebCoreNSURLSessionTaskTransactionMetrics responseEndDate]): |
| (-[WebCoreNSURLSessionTaskMetrics _initWithMetrics:]): |
| (-[WebCoreNSURLSessionTaskMetrics transactionMetrics]): |
| (WebCore::WebCoreNSURLSessionDataTaskClient::loadFinished): |
| (-[WebCoreNSURLSessionDataTask _finish]): |
| (-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:metrics:]): |
| (-[WebCoreNSURLSessionDataTask resource:accessControlCheckFailedWithError:]): |
| (-[WebCoreNSURLSessionDataTask resource:loadFailedWithError:]): |
| (-[WebCoreNSURLSessionDataTask resourceFinished:metrics:]): |
| (-[WebCoreNSURLSessionDataTask _resource:loadFinishedWithError:]): Deleted. |
| (-[WebCoreNSURLSessionDataTask resourceFinished:]): Deleted. |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::notifyFinished): |
| * rendering/RenderElement.h: |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::notifyFinished): |
| * rendering/RenderImage.h: |
| * rendering/RenderLayerFilters.cpp: |
| (WebCore::RenderLayerFilters::notifyFinished): |
| * rendering/RenderLayerFilters.h: |
| * svg/SVGFEImageElement.cpp: |
| (WebCore::SVGFEImageElement::notifyFinished): |
| * svg/SVGFEImageElement.h: |
| * svg/SVGUseElement.cpp: |
| (WebCore::SVGUseElement::notifyFinished): |
| * svg/SVGUseElement.h: |
| |
| 2020-05-12 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| [CG] Change the UTI of the "WebP" image to be "org.webmproject.webp" |
| https://bugs.webkit.org/show_bug.cgi?id=211794 |
| <rdar://problem/63031187> |
| |
| Reviewed by Darin Adler. |
| |
| See https://developers.google.com/speed/webp/docs/riff_container. |
| |
| * platform/graphics/cg/UTIRegistry.cpp: |
| (WebCore::defaultSupportedImageTypes): |
| Fix review comments from bug 208038. |
| |
| 2020-05-12 Simon Fraser <simon.fraser@apple.com> |
| |
| Move perspective-setting code into its own function |
| https://bugs.webkit.org/show_bug.cgi?id=211812 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Move the code that updates anchor point and children transform (for perspective) |
| into its own function. |
| |
| No behavior change. |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateChildrenTransformAndAnchorPoint): |
| (WebCore::computeOffsetFromAncestorGraphicsLayer): |
| (WebCore::RenderLayerBacking::updateGeometry): |
| * rendering/RenderLayerBacking.h: |
| |
| 2020-05-12 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Don't assume extensions always exist |
| https://bugs.webkit.org/show_bug.cgi?id=211760 |
| <rdar://problem/61217642> |
| |
| Reviewed by Brent Fulgham. |
| |
| * Modules/webauthn/fido/U2fCommandConstructor.cpp: |
| (fido::processGoogleLegacyAppIdSupportExtension): |
| |
| 2020-05-12 Jer Noble <jer.noble@apple.com> |
| |
| [iOS] REGRESSION: (r261342) Play/pause button doesn't work upon first entering fullscreen mode |
| https://bugs.webkit.org/show_bug.cgi?id=211797 |
| <rdar://problem/63118008> |
| |
| Reviewed by Eric Carlson. |
| |
| In r261342 we added code to handle "canplay" and "waiting" events without ever actually |
| adding event listeners for them. So when we enter fullscreen before the "canplay" event, we |
| never re-evaluate whether we're playing or not. |
| |
| Drive-by fix: Also noticed that stalls will cause the play/pause toggle to switch from the |
| "pause icon" to the "play icon", which is incorrect; we're still "playing" event when we're |
| stalled. So when we are in the stalled state, set the "playbackRate" property to some very |
| small, but non-zero value. This will cause the playback slider to stop progressing, but |
| won't also cause the play/pause button to swap states. |
| |
| * platform/cocoa/PlaybackSessionModelMediaElement.mm: |
| (WebCore::PlaybackSessionModelMediaElement::updateForEventName): |
| (WebCore::PlaybackSessionModelMediaElement::observedEventNames): |
| |
| 2020-05-12 Chris Dumez <cdumez@apple.com> |
| |
| [WK2] Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API |
| https://bugs.webkit.org/show_bug.cgi?id=211808 |
| |
| Reviewed by Darin Adler. |
| |
| Neuter WKFrameIsFrameSet() / WKPageGetFrameSetLargestFrame() C API. This is only SPI and is only used for slightly |
| different printing behavior in Safari. Framesets are no longer supported in HTML5 and are now super rare. Support |
| for this C API adds quite a bit of code complexity and crashes such as <rdar://problem/60322282>, it just does not |
| seem worth it anymore. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::resume): |
| * html/HTMLFrameSetElement.cpp: |
| (WebCore::HTMLFrameSetElement::insertedIntoAncestor): |
| (WebCore::HTMLFrameSetElement::removedFromAncestor): |
| * loader/EmptyFrameLoaderClient.h: |
| * loader/FrameLoaderClient.h: |
| |
| 2020-05-12 Simon Fraser <simon.fraser@apple.com> |
| |
| Clean up some transformOrigin and perspectiveOrigin code |
| https://bugs.webkit.org/show_bug.cgi?id=211807 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Add LengthPoint and LengthSize-based "value for length" functions so we can do |
| point and size math as we do for LayoutPoint/FloatPoint etc. |
| |
| Use them in code that computes transform and perspective origins. |
| |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::computeTransformedExtentViaTransformList const): |
| * css/LengthFunctions.cpp: |
| (WebCore::sizeForLengthSize): |
| (WebCore::pointForLengthPoint): |
| (WebCore::floatPointForLengthPoint): |
| * css/LengthFunctions.h: |
| * page/animation/AnimationBase.cpp: |
| (WebCore::AnimationBase::computeTransformedExtentViaTransformList const): |
| * platform/Length.h: |
| * platform/LengthPoint.h: |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::perspectiveTransform const): |
| (WebCore::RenderLayer::perspectiveOrigin const): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::computeTransformOriginForPainting const): |
| * rendering/style/BasicShapes.cpp: |
| (WebCore::BasicShapeInset::path): |
| (WebCore::floatSizeForLengthSize): Deleted. |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::applyTransform const): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::transformOriginXY const): Explicitly "xy" because it excludes the z component. |
| (WebCore::RenderStyle::perspectiveOrigin const): |
| * rendering/style/StyleRareNonInheritedData.h: |
| (WebCore::StyleRareNonInheritedData::perspectiveOrigin const): |
| * rendering/style/StyleTransformData.h: |
| (WebCore::StyleTransformData::originXY const): |
| |
| 2020-05-12 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| -Wattribute warning in BreakLines.cpp |
| https://bugs.webkit.org/show_bug.cgi?id=211784 |
| |
| Reviewed by Darin Adler. |
| |
| Remove export attribute. These only work in header files. |
| |
| * rendering/BreakLines.cpp: |
| |
| 2020-05-12 Eric Carlson <eric.carlson@apple.com> |
| |
| Poster set after playback begins should be ignored |
| https://bugs.webkit.org/show_bug.cgi?id=211464 |
| <rdar://problem/62605114> |
| |
| Reviewed by Darin Adler. |
| |
| Test: media/video-poster-set-after-playback.html |
| |
| * html/HTMLVideoElement.cpp: |
| (WebCore::HTMLVideoElement::parseAttribute): Ignore `poster` changes after first video frame |
| is available. |
| (WebCore::HTMLVideoElement::updateDisplayState): Set mode to Video if the first video |
| frame is available. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::elementShouldDisplayPosterImage const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-12 Simon Fraser <simon.fraser@apple.com> |
| |
| Perpective origin should be relative to the reference box |
| https://bugs.webkit.org/show_bug.cgi?id=211769 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Use the reference box <https://drafts.csswg.org/css-transforms-1/#reference-box> when |
| computing perspective-origin <https://drafts.csswg.org/css-transforms-2/#perspective-origin-property>, |
| adding a referenceBox() helper on RenderBox. |
| |
| The code to compute the perspective transform is wrong; for now, fudge it by passing in the border box, |
| but this code needs to account for GraphicsLayer geometry and transform-origin in future (webkit.org/b/211787). |
| |
| Test: compositing/transforms/perspective-transform-box.html |
| |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::nodeAtPoint): |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::referenceBox const): |
| * rendering/RenderBox.h: |
| * rendering/RenderLayer.cpp: |
| (WebCore::computeReferenceRectFromBox): |
| (WebCore::computeReferenceBox): |
| (WebCore::RenderLayer::updateTransform): |
| (WebCore::RenderLayer::currentTransform const): |
| (WebCore::RenderLayer::perspectiveTransform const): |
| (WebCore::RenderLayer::computeClipPath const): |
| * rendering/RenderLayer.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateGeometry): |
| |
| 2020-05-12 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Unreviewed PlayStation / clang-cl build fix following r261533. |
| |
| Apparently r261572 only caught half of the cases. |
| |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| (WebCore::IDBServer::estimateSize): |
| * bindings/js/IDBBindingUtilities.cpp: |
| (WebCore::generateIndexKeyMapForValue): |
| |
| 2020-05-12 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| Text is clipped when rendered with fonts which have a negative line gap metric |
| https://bugs.webkit.org/show_bug.cgi?id=211683 |
| <rdar://problem/62192986> |
| |
| Reviewed by Zalan Bujtas. |
| |
| ... As seen on nytimes.com. |
| |
| Some fonts have negative line gap metrics. Chrome and Firefox both clamp it to 0, so the |
| line-height isn't decreased. However, we were honoring the negative line gap, thereby decreasing |
| line-height. |
| |
| There are some typographical reasons to want a negative line gap, which is why this clamping |
| behavior shouldn't be done in the platform text library. In the interest of matching other |
| browsers, we should perform this clamping ourselves in WebKit. |
| |
| Test: fast/text/negative-line-gap.html |
| |
| * platform/graphics/Font.cpp: |
| (WebCore::Font::platformGlyphInit): |
| |
| 2020-05-12 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Unreviewed PlayStation / clang-cl build fix following r261533. |
| |
| clang for Windows (< v10.0.0) cannot destructure a const class. |
| See also r254471, r249524, etc. |
| |
| * Modules/indexeddb/server/MemoryObjectStore.cpp: |
| (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord): |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord): |
| |
| 2020-05-12 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Unreviewed PlayStation build fix following r261494. |
| |
| * PlatformPlayStation.cmake: |
| |
| 2020-05-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Rework drag and drop handling in preparation for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=211723 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Remove PasteboardHelper that is no longer used and add conversion functions to GtkUtilities. |
| |
| * PlatformGTK.cmake: |
| * SourcesGTK.txt: |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::gdkDragActionToDragOperation): |
| (WebCore::dragOperationToGdkDragActions): |
| (WebCore::dragOperationToSingleGdkDragAction): |
| * platform/gtk/GtkUtilities.h: |
| * platform/gtk/PasteboardHelper.cpp: Removed. |
| * platform/gtk/PasteboardHelper.h: Removed. |
| |
| 2020-05-12 Jacob Uphoff <jacob_uphoff@apple.com> |
| |
| Unreviewed, reverting r261557. |
| |
| This commit caused testing to exit early due to too many |
| crashes on macOS Catalina Asan |
| |
| Reverted changeset: |
| |
| "Allow WebAudioBufferList to dynamically change its number of |
| frames" |
| https://bugs.webkit.org/show_bug.cgi?id=211720 |
| https://trac.webkit.org/changeset/261557 |
| |
| 2020-05-12 Simon Fraser <simon.fraser@apple.com> |
| |
| Speculative fix for crash in ScrollingTree::handleWheelEvent() |
| https://bugs.webkit.org/show_bug.cgi?id=211763 |
| <rdar://problem/62926117> |
| |
| Reviewed by Andy Estes. |
| |
| Crash data shows a null-deref crash in ScrollingTree::handleWheelEvent() which |
| is most likely because m_rootNode is null. Protect against this. |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::handleWheelEvent): |
| |
| 2020-05-12 Youenn Fablet <youenn@apple.com> |
| |
| Allow WebAudioBufferList to dynamically change its number of frames |
| https://bugs.webkit.org/show_bug.cgi?id=211720 |
| |
| Reviewed by Eric Carlson. |
| |
| We sometimes create WebAudioBufferList on the stack which triggers allocation of several vectors. |
| Instead of doing that for every audio sample chunk, we should allocate the WebAudioBufferList and resize it as necessary. |
| For that purpose, we introduce WebAudioBufferList::updateWithNumberOfFrames and use it in two places: |
| - When creating an audio track into WebAudio. |
| - When receiving audio chunks from another process. |
| Covered by existing tests. |
| |
| * Modules/webaudio/MediaStreamAudioSource.cpp: |
| (WebCore::MediaStreamAudioSource::~MediaStreamAudioSource): |
| * Modules/webaudio/MediaStreamAudioSource.h: |
| * Modules/webaudio/MediaStreamAudioSourceCocoa.cpp: |
| (WebCore::streamDescription): |
| (WebCore::MediaStreamAudioSource::consumeAudio): |
| * platform/audio/cocoa/WebAudioBufferList.cpp: |
| (WebCore::WebAudioBufferList::WebAudioBufferList): |
| (WebCore::WebAudioBufferList::updateWithNumberOfFrames): |
| (WebCore::WebAudioBufferList::channelCount const): |
| * platform/audio/cocoa/WebAudioBufferList.h: |
| |
| 2020-05-12 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Rework clipboard handling in preparation for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=211511 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Remove PlatformPasteboard implementation that has been replaced by Clipboard class in the WebKit |
| layer. When Pasteboard class is created for copy and paste operations, it no longer has a SelectionData member, |
| it just uses the new methods in the pasteboard strategy to communicate with the clipboard. WebContentReader has |
| now an implementation for GTK and it's used when reading from the clipboard, the same way it's done in other ports. |
| |
| * SourcesGTK.txt: |
| * editing/WebContentReader.h: |
| * editing/gtk/EditorGtk.cpp: |
| (WebCore::Editor::pasteWithPasteboard): Use webContentFromPasteboard(). |
| (WebCore::Editor::webContentFromPasteboard): Use WebContentReader. |
| * editing/gtk/WebContentReaderGtk.cpp: Added. |
| (WebCore::WebContentReader::readFilePath): |
| (WebCore::WebContentReader::readFilePaths): |
| (WebCore::WebContentReader::readHTML): |
| (WebCore::WebContentReader::readPlainText): |
| (WebCore::WebContentReader::readImage): |
| (WebCore::WebContentReader::readURL): |
| (WebCore::WebContentMarkupReader::readHTML): |
| * platform/Pasteboard.h: |
| (WebCore::PasteboardWebContentReader::readDataBuffer): |
| * platform/PasteboardStrategy.h: |
| * platform/gtk/PasteboardGtk.cpp: |
| (WebCore::Pasteboard::Pasteboard): |
| (WebCore::Pasteboard::selectionData const): |
| (WebCore::Pasteboard::writeString): |
| (WebCore::Pasteboard::writePlainText): |
| (WebCore::Pasteboard::write): |
| (WebCore::Pasteboard::clear): |
| (WebCore::Pasteboard::canSmartReplace): |
| (WebCore::Pasteboard::read): |
| (WebCore::Pasteboard::hasData): |
| (WebCore::Pasteboard::typesForLegacyUnsafeBindings): |
| (WebCore::Pasteboard::readString): |
| (WebCore::Pasteboard::fileContentState): |
| * platform/gtk/PasteboardHelper.cpp: |
| * platform/gtk/PasteboardHelper.h: |
| * platform/gtk/PlatformPasteboardGtk.cpp: Removed. |
| * platform/gtk/SelectionData.cpp: |
| (WebCore::SelectionData::setURL): Do not override the text and markup if it has already been set. |
| |
| 2020-05-12 Youenn Fablet <youenn@apple.com> |
| |
| Introduce a RealtimeMediaSource video sample observer |
| https://bugs.webkit.org/show_bug.cgi?id=211718 |
| |
| Reviewed by Eric Carlson. |
| |
| We introduce an observer dedicated to video samples similarly to AudioSampleObserver for audio. |
| This will allow to move video frame processing out of the main thread progressively. |
| For now, we remove video sample observing from the track private and observers should now register directly to the realtime media source. |
| We update the various users, including MediaRecorder and the media player. |
| In both cases, they will only observe the video track to be played/recorded, which is both more efficient and simpler. |
| |
| We introduced RealtimeMediaSource::Observer::hasStartedProducingData callback for MediaStreamTrackPrivate so |
| that the processing to do when the first samples are available can be done on the main thread. |
| |
| MediaStreamTrackPrivate no longer filters out samples if it is not enabled. |
| As such, each consumer is now responsible to observe/unobserve the source when its track gets enabled/disabled similarly as for audio, |
| or do nothing if track is not enabled. |
| |
| Similarly, RealtimeOutgoingVideoSourceCocoa will now only observe video samples when the track is enabled and not muted. |
| |
| Covered by existing tests. |
| |
| * Modules/mediarecorder/MediaRecorder.cpp: |
| (WebCore::MediaRecorder::sampleBufferUpdated): Deleted. |
| * Modules/mediarecorder/MediaRecorder.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample): |
| We can renove the track check since we only observe the active video track. |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::videoSampleAvailable): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack): |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::sampleBufferUpdated): Deleted. |
| * platform/mediarecorder/MediaRecorderPrivate.h: |
| (WebCore::MediaRecorderPrivate::setVideoSource): |
| (WebCore::MediaRecorderPrivate::~MediaRecorderPrivate): |
| * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp: |
| (WebCore::MediaRecorderPrivateAVFImpl::create): |
| (WebCore::MediaRecorderPrivateAVFImpl::~MediaRecorderPrivateAVFImpl): |
| (WebCore::MediaRecorderPrivateAVFImpl::videoSampleAvailable): |
| (WebCore::MediaRecorderPrivateAVFImpl::stopRecording): |
| (WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated): Deleted. |
| * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: |
| * platform/mediarecorder/MediaRecorderPrivateMock.cpp: |
| (WebCore::MediaRecorderPrivateMock::MediaRecorderPrivateMock): |
| (WebCore::MediaRecorderPrivateMock::~MediaRecorderPrivateMock): |
| (WebCore::MediaRecorderPrivateMock::stopRecording): |
| (WebCore::MediaRecorderPrivateMock::videoSampleAvailable): |
| (WebCore::MediaRecorderPrivateMock::sampleBufferUpdated): Deleted. |
| * platform/mediarecorder/MediaRecorderPrivateMock.h: |
| * platform/mediastream/MediaStreamTrackPrivate.cpp: |
| (WebCore::MediaStreamTrackPrivate::hasStartedProducingData): |
| (WebCore::MediaStreamTrackPrivate::updateReadyState): |
| (WebCore::MediaStreamTrackPrivate::videoSampleAvailable): Deleted. |
| (WebCore::MediaStreamTrackPrivate::hasStartedProducingAudioData): Deleted. |
| * platform/mediastream/MediaStreamTrackPrivate.h: |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::addVideoSampleObserver): |
| (WebCore::RealtimeMediaSource::removeVideoSampleObserver): |
| (WebCore::RealtimeMediaSource::updateHasStartedProducingData): |
| (WebCore::RealtimeMediaSource::videoSampleAvailable): |
| (WebCore::RealtimeMediaSource::audioSamplesAvailable): |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/RealtimeOutgoingVideoSource.cpp: |
| (WebCore::RealtimeOutgoingVideoSource::unobserveSource): |
| (WebCore::RealtimeOutgoingVideoSource::updateBlackFramesSending): |
| * platform/mediastream/RealtimeOutgoingVideoSource.h: |
| * platform/mediastream/RealtimeVideoSource.cpp: |
| (WebCore::RealtimeVideoSource::~RealtimeVideoSource): |
| (WebCore::RealtimeVideoSource::startProducingData): |
| (WebCore::RealtimeVideoSource::stopProducingData): |
| (WebCore::RealtimeVideoSource::videoSampleAvailable): |
| * platform/mediastream/RealtimeVideoSource.h: |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.h: |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: |
| (WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample): |
| * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp: |
| (WebCore::RealtimeOutgoingVideoSourceCocoa::videoSampleAvailable): |
| (WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated): Deleted. |
| * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h: |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| * testing/Internals.cpp: |
| (WebCore::Internals::~Internals): |
| (WebCore::Internals::stopObservingRealtimeMediaSource): |
| (WebCore::Internals::observeMediaStreamTrack): |
| * testing/Internals.h: |
| |
| 2020-05-12 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Audio messages in web.whatsapp.com only play once. |
| https://bugs.webkit.org/show_bug.cgi?id=211627 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| Test: media/video-src-blob-replay.html |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag): Make sure on-disk |
| buffering is disabled for blob URIs, because it messes up the pipeline for replays, and it's |
| useless for that use-case anyway. |
| |
| 2020-05-12 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Need to advertise support for WebP in the Accept header |
| https://bugs.webkit.org/show_bug.cgi?id=211735 |
| |
| Reviewed by Darin Adler. |
| |
| On Mac and iOS, the system has to support WebP: HAVE(WEBP). |
| On other platforms, WebKit has to be able to decode WebP images: USE(WEBP). |
| |
| * css/CSSCalculationValue.cpp: |
| (WebCore::createCSS): |
| Fix unrealted coding style issue. |
| |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::acceptHeaderValueForImageResource): |
| (WebCore::acceptHeaderValueFromType): |
| |
| 2020-05-11 Darin Adler <darin@apple.com> |
| |
| Fix problems caught by replacing WTF::Optional with std::optional |
| https://bugs.webkit.org/show_bug.cgi?id=211703 |
| |
| Reviewed by Chris Dumez. |
| |
| * editing/EditorCommand.cpp: |
| (WebCore::executeSelectToMark): Remove erroneous code that converts |
| a live range to a SimpleRange and then back again. |
| |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::willSendRequest): Pass a pointer to |
| a ResourceRequest. |
| (WebCore::InspectorNetworkAgent::didLoadResourceFromMemoryCache): Ditto. |
| (WebCore::InspectorNetworkAgent::buildInitiatorObject): Take a const* |
| to a ResourceRequest instead of an Optional<const ResourceRequest&> |
| because std::optional does not work with reference types. |
| * inspector/agents/InspectorNetworkAgent.h: Update for the change above. |
| |
| * layout/floats/FloatingContext.cpp: |
| (WebCore::Layout::Iterator::operator++): Fix code that was accidentally |
| comparing two optionals, after already checking them for null. Instead |
| we should compare their values. |
| |
| * platform/PlatformScreen.cpp: |
| (WebCore::screenData): Return a const* instead of an Optional<const&> |
| because std::optonal does not work with reference types. |
| * platform/PlatformScreen.h: Updated for the above. Also removed both |
| the unneeded include of Optional.h (could have included Forward.h) and |
| of HashMap.h and put the Mac-specific type IORegistryGPUID inside a |
| PLATFORM(MAC) #if statement. |
| |
| * platform/ScreenProperties.h: Moved the HashMap.h include here, since |
| this is the header that uses it. Changed the EncodedColorSpaceDataType |
| enum to an enum class and gave it much shorter names. |
| (WebCore::ScreenData::encode const): Updated for the enum class change. |
| Also fixed a mistake where the code would use operator<< instead of |
| encodeEnum for the color space type of Null. This would lead to some |
| kind of decoding error, rather than a null cgColorSpace. |
| (WebCore::ScreenData::decode): Ditto. |
| |
| * platform/ios/PlatformScreenIOS.mm: |
| (WebCore::screenIsMonochrome): Updated since screenData returns a pointer. |
| (WebCore::screenHasInvertedColors): Ditto. |
| (WebCore::screenSupportsExtendedColor): Ditto. |
| (WebCore::screenSize): Ditto. |
| (WebCore::availableScreenSize): Ditto. |
| |
| * platform/mac/PlatformScreenMac.mm: Moved declaration of |
| CGDisplayUsesForceToGray to CoreGraphicsSPI.h. Removed unused declaration |
| of CGDisplayUsesInvertedPolarity. |
| (WebCore::primaryOpenGLDisplayMask): Updated since screendData returns a pointer. |
| (WebCore::displayMaskForDisplay): Ditto. |
| (WebCore::gpuIDForDisplay): Ditto. |
| (WebCore::screenProperties): Ditto. Also renamed from getScreenProperties to |
| adhere to WebKit coding style. |
| (WebCore::screenIsMonochrome): Ditto. |
| (WebCore::screenHasInvertedColors): Ditto. |
| (WebCore::screenDepth): Ditto. |
| (WebCore::screenDepthPerComponent): Ditto. |
| (WebCore::screenRectForDisplay): Ditto. |
| (WebCore::screenRect): Ditto. |
| (WebCore::screenAvailableRect): Ditto. |
| (WebCore::screenColorSpace): Ditto. |
| (WebCore::screenSupportsExtendedColor): Ditto. |
| (WebCore::screenSupportsHighDynamicRange): Ditto. |
| |
| * workers/service/context/ServiceWorkerThread.cpp: |
| (WebCore::ServiceWorkerThread::queueTaskToFireInstallEvent): |
| Removed capture of unused jobDataIdentifier. |
| |
| 2020-05-11 James Darpinian <jdarpinian@chromium.org> |
| |
| WebGLLayer clobbers TEXTURE_2D binding on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=211758 |
| |
| Reviewed by Dean Jackson. |
| |
| WebGLLayer was accidentally clobbering the TEXTURE_2D binding on iOS because IOSurfaces |
| are bound to TEXTURE_2D instead of TEXTURE_RECTANGLE. This fixes a bunch of iOS-specific |
| WebGL conformance failures including: |
| texture-bindings-unaffected-on-resize.html |
| default-texture.html |
| tex-image-and-sub-image-2d-with-canvas-rgb565.html and friends |
| |
| * platform/graphics/GraphicsContextGL.h: |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer display]): |
| (-[WebGLLayer bindFramebufferToNextAvailableSurface]): |
| |
| 2020-05-11 Simon Fraser <simon.fraser@apple.com> |
| |
| [ macOS ] scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html is a flaky failure |
| https://bugs.webkit.org/show_bug.cgi?id=211747 |
| |
| Reviewed by Tim Horton. |
| |
| Add an option to monitorWheelEvents to reset latching. |
| |
| * page/Page.cpp: |
| (WebCore::Page::startMonitoringWheelEvents): |
| * page/Page.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::startMonitoringWheelEvents): |
| * page/scrolling/mac/ScrollingCoordinatorMac.h: |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::startMonitoringWheelEvents): |
| * testing/js/WebCoreTestSupport.cpp: |
| (WebCoreTestSupport::monitorWheelEvents): |
| * testing/js/WebCoreTestSupport.h: |
| |
| 2020-05-11 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fixes for crashes in isolated tree mode. |
| https://bugs.webkit.org/show_bug.cgi?id=211740 |
| |
| Reviewed by Chris Fleizach. |
| |
| Fixes for several LayoutTests in isolated tree mode. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: |
| (-[WebAccessibilityObjectWrapperBase attachIsolatedObject:]): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper characterOffsetForTextMarker:]): |
| (-[WebAccessibilityObjectWrapper textMarkerForVisiblePosition:]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| (-[WebAccessibilityObjectWrapper accessibilitySetValue:forAttribute:]): |
| (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]): |
| |
| 2020-05-11 Simon Fraser <simon.fraser@apple.com> |
| |
| Scrollbars flicker in RTL scrollable regions |
| https://bugs.webkit.org/show_bug.cgi?id=211757 |
| |
| Reviewed by Tim Horton. |
| |
| Scrollbars deal in scroll offsets (zero-based), not scroll positions (scroll-origin based) so |
| the scrolling thread needs to update scrollbar painters using offsets. |
| |
| Not testable because this is a transient state that gets fixed by the main thread. |
| |
| * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::updateScrollbarPainters): |
| |
| 2020-05-11 Ben Nham <nham@apple.com> |
| |
| Improve accuracy of IndexedDB estimated write size computation |
| https://bugs.webkit.org/show_bug.cgi?id=211360 |
| |
| Reviewed by Brady Eidson. |
| |
| We currently estimate the size of a put in IndexedDB for quota check purposes with something |
| like: |
| |
| estimatedWriteSize = (1 + numIndices) * (keySize + valueSize) |
| |
| However, this can lead to large overestimates of write sizes. This is because secondary |
| indices only store a mapping of secondary index key => primary key; they do not store the |
| entire value. In the example site attached to 202137 (another DB quota-related bug), the |
| the heuristic estimates that one of the put operations would use more than 800 MB when it |
| actually uses 220 MB. This inaccuracy leads to spurious disk quota permission modals being |
| presented in Safari. |
| |
| This patch improves the write size computation by generating the secondary index keys before |
| estimating the write size. The performance should be about the same since we save the |
| generated index keys for later usage when we actually add the record to the DB. |
| |
| * Headers.cmake: |
| * Modules/indexeddb/server/IDBBackingStore.h: |
| * Modules/indexeddb/server/MemoryIDBBackingStore.cpp: |
| (WebCore::IDBServer::MemoryIDBBackingStore::MemoryIDBBackingStore): |
| (WebCore::IDBServer::MemoryIDBBackingStore::addRecord): |
| (WebCore::IDBServer::MemoryIDBBackingStore::serializationContext): |
| * Modules/indexeddb/server/MemoryIDBBackingStore.h: |
| * Modules/indexeddb/server/MemoryObjectStore.cpp: |
| (WebCore::IDBServer::MemoryObjectStore::addRecord): |
| (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord): |
| * Modules/indexeddb/server/MemoryObjectStore.h: |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::serializationContext): |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.h: |
| * Modules/indexeddb/server/UniqueIDBDatabase.cpp: |
| (WebCore::IDBServer::estimateSize): |
| (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd): |
| * Modules/indexeddb/shared/IndexKey.h: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/IDBBindingUtilities.cpp: |
| (WebCore::generateIndexKeyMapForValue): |
| * bindings/js/IDBBindingUtilities.h: |
| |
| 2020-05-11 Kate Cheney <katherine_cheney@apple.com> |
| |
| Fail navigations to non app-bound domains after use of app-bound APIs |
| https://bugs.webkit.org/show_bug.cgi?id=211647 |
| <rdar://problem/62978159> |
| |
| Reviewed by Brent Fulgham. |
| |
| Simplified in-app browser privacy protections check into one, better |
| named function. |
| |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::executeScriptInWorld): |
| * loader/FrameLoaderClient.h: |
| * page/Frame.cpp: |
| (WebCore::Frame::injectUserScriptImmediately): |
| * page/Page.cpp: |
| (WebCore::Page::injectUserStyleSheet): |
| * page/WebKitNamespace.cpp: |
| (WebCore::WebKitNamespace::messageHandlers): |
| * style/StyleScopeRuleSets.cpp: |
| (WebCore::Style::ScopeRuleSets::initializeUserStyle): |
| Rearranged ordering so the message to WebPageProxy only gets sent to |
| indicate app-bound behavior if user style sheets actually exist. |
| |
| 2020-05-11 Peng Liu <peng.liu6@apple.com> |
| |
| Enable the mock video presentation mode in related layout tests and fix test failures |
| https://bugs.webkit.org/show_bug.cgi?id=211645 |
| |
| Reviewed by Eric Carlson. |
| |
| Revert the unnecessary change in r261493 to fix the build failures when |
| the Picture-in-Picture API is disabled. |
| |
| * html/HTMLVideoElement.cpp: |
| * html/HTMLVideoElement.h: |
| |
| 2020-05-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Remove some unnecessary indirection when getting Document’s Editor |
| https://bugs.webkit.org/show_bug.cgi?id=211744 |
| |
| Reviewed by Geoffrey Garen. |
| |
| After r261018, there's no longer a need to reach into Document's Frame to get the Editor instance, since |
| Document itself owns the Editor (and Frame's implementation of editor() just calls back into the document |
| anyways). No change in behavior. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (AXAttributeStringSetSpelling): |
| * dom/Document.cpp: |
| (WebCore::Document::setFocusedElement): |
| (WebCore::Document::registerAttachmentIdentifier): |
| (WebCore::Document::didInsertAttachmentElement): |
| (WebCore::Document::didRemoveAttachmentElement): |
| * testing/Internals.cpp: |
| (WebCore::Internals::markerCountForNode): |
| (WebCore::Internals::setMarkedTextMatchesAreHighlighted): |
| (WebCore::Internals::lastSpellCheckRequestSequence): |
| (WebCore::Internals::lastSpellCheckProcessedSequence): |
| (WebCore::Internals::hasSpellingMarker): |
| (WebCore::Internals::hasAutocorrectedMarker): |
| (WebCore::Internals::setContinuousSpellCheckingEnabled): |
| (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): |
| (WebCore::Internals::setAutomaticLinkDetectionEnabled): |
| (WebCore::Internals::setAutomaticDashSubstitutionEnabled): |
| (WebCore::Internals::setAutomaticTextReplacementEnabled): |
| (WebCore::Internals::setAutomaticSpellingCorrectionEnabled): |
| (WebCore::Internals::handleAcceptedCandidate): |
| (WebCore::Internals::isOverwriteModeEnabled): |
| (WebCore::Internals::toggleOverwriteModeEnabled): |
| (WebCore::Internals::rangeOfString): |
| (WebCore::Internals::countMatchesForText): |
| (WebCore::Internals::hasGrammarMarker): |
| |
| 2020-05-11 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: show JavaScript Worker name as an internal property |
| https://bugs.webkit.org/show_bug.cgi?id=211708 |
| |
| Reviewed by Timothy Hatcher. |
| |
| Test: inspector/worker/worker-create-and-terminate.html |
| |
| * inspector/WebInjectedScriptHost.cpp: |
| (WebCore::WebInjectedScriptHost::getInternalProperties): |
| |
| * workers/Worker.h: |
| (WebCore::Worker::name const): Added. |
| |
| 2020-05-11 Simon Fraser <simon.fraser@apple.com> |
| |
| Have ScrollingThread use a RunLoop rather than rolling its own |
| https://bugs.webkit.org/show_bug.cgi?id=211730 |
| |
| Reviewed by Darin Adler. |
| |
| ScrollingThread rolled its own runloop/function dispatch by dropping to CF for macOS. |
| Fix to use RunLoop which provides the same functionality. |
| |
| There was also a race creating the ScrollingThread for the first time, since both |
| the main thread, and EventDispatcher can call ScrollingThread::dispatch() early on, |
| so fix with a std::once block. |
| |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * page/scrolling/ScrollingThread.cpp: |
| (WebCore::ScrollingThread::singleton): |
| (WebCore::ScrollingThread::dispatch): |
| (WebCore::ScrollingThread::createThreadIfNeeded): |
| (WebCore::ScrollingThread::initializeRunLoop): |
| (WebCore::ScrollingThread::dispatchFunctionsFromScrollingThread): Deleted. |
| (WebCore::ScrollingThread::wakeUpRunLoop): Deleted. |
| (WebCore::ScrollingThread::threadRunLoopSourceCallback): Deleted. |
| * page/scrolling/ScrollingThread.h: |
| (WebCore::ScrollingThread::runLoop): |
| * page/scrolling/mac/ScrollingThreadMac.mm: Removed. |
| |
| 2020-05-11 Peng Liu <peng.liu6@apple.com> |
| |
| Enable the mock video presentation mode in related layout tests and fix test failures |
| https://bugs.webkit.org/show_bug.cgi?id=211645 |
| |
| Reviewed by Darin Adler. |
| |
| Clean up the internal states of video element regarding video presentation mode |
| to simplify the task to write reliable layout tests for video fullscreen and |
| Picture-in-Picture. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::enterFullscreen): |
| Update the states after we are sure the video element will enter fullscreen. |
| |
| (WebCore::HTMLMediaElement::exitFullscreen): |
| Remove the unnecessary "fullscreenModeChanged(VideoFullscreenModeNone)". |
| |
| * html/HTMLMediaElement.h: |
| (WebCore::HTMLMediaElement::waitingToEnterFullscreen): |
| |
| * html/HTMLVideoElement.cpp: |
| (WebCore::HTMLVideoElement::webkitDisplayingFullscreen): |
| The function webkitDisplayingFullscreen() will return true after the process |
| to enter fullscreen is completed. |
| |
| * html/HTMLVideoElement.h: |
| Expose didBecomeFullscreenElement() when VIDEO_PRESENTATION_MODE is enabled. |
| |
| 2020-05-11 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Document.getAnimations() should only consider document connection and not timeline association |
| https://bugs.webkit.org/show_bug.cgi?id=211697 |
| |
| Reviewed by Dean Jackson. |
| |
| The Document.getAnimations() function should return any animation running for an element that is a child of the |
| target Document. We now consider all current animations, regardless of which timeline they might be associated |
| with. This lets us pass the final two WPT Document.getAnimations() tests. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::matchingAnimations): |
| |
| 2020-05-11 Andres Gonzalez <andresg_22@apple.com> |
| |
| Add implementation for AXIsolatedObject::elementPath, hasHighlighting, isBlockquote, isKeyboardFocusable. |
| https://bugs.webkit.org/show_bug.cgi?id=211732 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by several tests. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::isBlockquote const): Moved to base class. |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityObjectInterface.h: |
| (WebCore::AXCoreObject::isBlockquote const): |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): Cache the above mentioned properties. |
| (WebCore::AXIsolatedObject::pathAttributeValue const): |
| (WebCore::AXIsolatedObject::isBlockquote const): Moved to base class. |
| (WebCore::AXIsolatedObject::isKeyboardFocusable const): Implemented inline in header. |
| (WebCore::AXIsolatedObject::hasHighlighting const): Implemented inline in header. |
| (WebCore::AXIsolatedObject::elementPath const): Implemented inline in header. |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| |
| 2020-05-11 Alex Christensen <achristensen@webkit.org> |
| |
| Fix assertion after r261414 |
| https://bugs.webkit.org/show_bug.cgi?id=211731 |
| |
| This fixes a debug assertion that fired 100% of the time when running the test introduced in r261414 |
| I also respond to Darin's and Youenn's post-commit feedback. |
| |
| * page/SecurityPolicy.cpp: |
| (WebCore::SecurityPolicy::generateReferrerHeader): |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::ResourceRequestBase::setHTTPReferrer): |
| |
| 2020-05-11 Andres Gonzalez <andresg_22@apple.com> |
| |
| Check the validity of the underlying Document before updating the isolated tree. |
| https://bugs.webkit.org/show_bug.cgi?id=211728 |
| |
| Reviewed by Chris Fleizach. |
| |
| Solves crashes in isolated tree mode for several LayoutTests. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::focusedUIElementForPage): Update the focused |
| document styles before returning the isolated tree focused object. |
| |
| (WebCore::AXObjectCache::notificationPostTimerFired): Ignored |
| notification if underlying Document doesn't have a living render tree. |
| |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::updateChildren): Don't update isolated object |
| if associated AXObject doesn't have a Document or the Document doesn't have a live render tree. |
| |
| 2020-05-11 Andres Gonzalez <andresg_22@apple.com> |
| |
| Add mechanism to turn on accessibility isolated tree mode from WebKitTestRunner. |
| https://bugs.webkit.org/show_bug.cgi?id=211725 |
| |
| Reviewed by Chris Fleizach. |
| |
| If the client is WebKitTestRunner, enable isolated tree mode. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::isIsolatedTreeEnabled): |
| |
| 2020-05-11 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed, reverting r261296. |
| |
| Rolling r260769 back in, since this was not causing a |
| regression. |
| |
| Reverted changeset: |
| |
| "Unreviewed, reverting r260769." |
| https://bugs.webkit.org/show_bug.cgi?id=211578 |
| https://trac.webkit.org/changeset/261296 |
| |
| 2020-05-11 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Introduce GridSpace |
| https://bugs.webkit.org/show_bug.cgi?id=211712 |
| |
| Reviewed by Antti Koivisto. |
| |
| Normally we use the initial width/height (minimum width/height) value to compute the |
| distribution ratio for the extra space (e.g minimum widths are [ 1 ] [ 2 ] extra space: 6; final widths [ 1 + 2 ] [ 2 + 4 ]). |
| However is some rare case, while we use the minimum widths as the initial widths, the distribution ratio |
| is computed using the maximum widths. |
| This patch introduces GridSpace to be able to differentiate initial and distribution widths/heights (no functional change yet). |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::GridSpace::isEmpty const): |
| (WebCore::Layout::max): |
| (WebCore::Layout::operator-): |
| (WebCore::Layout::operator+=): |
| (WebCore::Layout::operator-=): |
| (WebCore::Layout::operator/): |
| (WebCore::Layout::distributeAvailableSpace): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| |
| 2020-05-10 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Refactor animation comparison by composite order in a single utility function |
| https://bugs.webkit.org/show_bug.cgi?id=211695 |
| |
| Reviewed by Darin Adler. |
| |
| We used to split sorting of animations by composite order across several functions and files. Specifically, |
| DocumentTimeline::getAnimations() would first collect animations by class (CSS Transitions, then CSS |
| Animations, then JS-originated animations), and then sort each class, calling into the static function |
| compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder() in some cases and into the |
| WebAnimationUtilities compareAnimationsByCompositeOrder() function in other. |
| |
| Since we need to be able to sort animations by composite order in other situations, for instance when sorting |
| events when updating animations and sending events (which we will do in a future patch), we refactor all |
| of the comparison logic into compareAnimationsByCompositeOrder(), removing the need to provide an AnimationList, |
| which is specific to the case where we know we are comparing CSSAnimation objects targeting a shared element. |
| |
| This effectively empties DocumentTimeline::getAnimations() so we remove this function and filter relevant |
| animations in Document::matchingAnimations() and call compareAnimationsByCompositeOrder() before returning |
| the compiled animations. |
| |
| No new tests since there is no change of behavior. |
| |
| * animation/DocumentTimeline.cpp: |
| (WebCore::compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder): Deleted. |
| (WebCore::DocumentTimeline::getAnimations const): Deleted. |
| * animation/DocumentTimeline.h: |
| * animation/KeyframeEffectStack.cpp: |
| (WebCore::KeyframeEffectStack::ensureEffectsAreSorted): |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::commitStyles): |
| * animation/WebAnimationUtilities.cpp: |
| (WebCore::compareDeclarativeAnimationOwningElementPositionsInDocumentTreeOrder): |
| (WebCore::compareCSSTransitions): |
| (WebCore::compareCSSAnimations): |
| (WebCore::compareAnimationsByCompositeOrder): |
| * animation/WebAnimationUtilities.h: |
| * dom/Document.cpp: |
| (WebCore::Document::matchingAnimations): |
| |
| 2020-05-11 Charlie Turner <cturner@igalia.com> |
| |
| [WPE] Layout test media/encrypted-media/mock-MediaKeySystemAccess.html is crashing |
| https://bugs.webkit.org/show_bug.cgi?id=181225 |
| |
| Reviewed by Darin Adler. |
| |
| WebCore::CDM::createInstance assumes its private instance always |
| produces a valid pointer. This is not the case in the testing |
| mocks. Guard against it. |
| |
| Test: media/encrypted-media/mock-MediaKeySystemAccess.html |
| |
| * Modules/encryptedmedia/CDM.cpp: |
| (WebCore::CDM::createInstance): Guard against null pointers in |
| mock scenarios. |
| |
| 2020-05-10 Rob Buis <rbuis@igalia.com> |
| |
| Fix base64.any.html test |
| https://bugs.webkit.org/show_bug.cgi?id=211671 |
| |
| Reviewed by Darin Adler. |
| |
| Fix base64.any.html test by extending DataURLDecoder with a |
| forgiving-base64 decode mode [1], as used by the Fetch |
| data: URL processor algorithm [2]. |
| |
| Behavior matches Chrome and Firefox. |
| |
| [1] https://infra.spec.whatwg.org/#forgiving-base64-decode |
| [2] https://fetch.spec.whatwg.org/#data-url-processor |
| |
| Test: imported/w3c/web-platform-tests/fetch/data-urls/base64.any.html |
| |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::loadDataURL): |
| * platform/network/DataURLDecoder.cpp: |
| (WebCore::DataURLDecoder::decodeBase64): |
| (WebCore::DataURLDecoder::decode): |
| * platform/network/DataURLDecoder.h: |
| |
| 2020-05-10 Darin Adler <darin@apple.com> |
| |
| Add copy constructor and assignment operator to Ref<> |
| https://bugs.webkit.org/show_bug.cgi?id=211705 |
| |
| Reviewed by Sam Weinig. |
| |
| * dom/BoundaryPoint.h: As a test of the change to Ref, remove the explicit |
| copy and move constructors and assignment operators, relying on the defaults |
| instead, which are now exactly what we want. |
| |
| 2020-05-10 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| Update user agent quirk for bankofamerica.com |
| https://bugs.webkit.org/show_bug.cgi?id=211700 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| The Mac platform quirk isn't working anymore. The Chrome quirk works. |
| |
| * platform/UserAgentQuirks.cpp: |
| (WebCore::urlRequiresChromeBrowser): |
| (WebCore::urlRequiresMacintoshPlatform): |
| |
| 2020-05-10 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(CORE_VIDEO) |
| https://bugs.webkit.org/show_bug.cgi?id=211677 |
| |
| Reviewed by Dan Bernstein. |
| |
| * page/cocoa/MemoryReleaseCocoa.mm: |
| * platform/cocoa/CoreVideoSoftLink.cpp: Remove HAVE(CORE_VIDEO). |
| * platform/cocoa/CoreVideoSoftLink.h: Ditto. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: Ditto. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): Ditto. |
| * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm: |
| (WebCore::MediaSampleAVFObjC::getRGBAImageData const): Ditto. |
| * platform/graphics/cv/PixelBufferConformerCV.cpp: Ditto. |
| * platform/graphics/cv/PixelBufferConformerCV.h: Ditto. |
| * platform/graphics/cv/TextureCacheCV.h: Ditto. |
| * platform/graphics/cv/TextureCacheCV.mm: Ditto. |
| * platform/graphics/cv/VideoTextureCopierCV.cpp: Ditto. |
| * platform/graphics/cv/VideoTextureCopierCV.h: Ditto. |
| |
| 2020-05-09 Darin Adler <darin@apple.com> |
| |
| Tighten up logic in DocumentTimelinesController::updateAnimationsAndSendEvents |
| https://bugs.webkit.org/show_bug.cgi?id=211668 |
| |
| Reviewed by Antoine Quint. |
| |
| * animation/DocumentTimelinesController.cpp: |
| (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): |
| Use Ref instead of RefPtr. Use Ref even in timelinesToUpdate; no harm in doing |
| a little bit of extra ref'ing. Use copyToVector when iterating relevantAnimations |
| since it could be a problem if the current animation was removed from the |
| ListHashSet while we are iterating it and there is no obvious reason that can't |
| happen. Use makeRef instead of makeRefPtr. Take advantage of the behavior of |
| the Optional operator<, which already treats nullopt as less than any non-nullopt |
| value, and remove unnecessary checks that weere doing the same thing explicitly. |
| This fixes a mistake where we were returning true when both are nullopt, which |
| could harm the stability of the sort, in theory. Add a null check of the timeline |
| when iterating completedTransitions, since there is no obvious guarantee they |
| could not have been removed as a side effect earlier. |
| |
| 2020-05-10 Darin Adler <darin@apple.com> |
| |
| Use makeReversedRange and get rid of one-off ReverseView |
| https://bugs.webkit.org/show_bug.cgi?id=211675 |
| |
| Reviewed by Sam Weinig. |
| |
| * editing/markup.cpp: |
| (WebCore::ReverseView): Deleted. |
| (WebCore::StyledMarkupAccumulator::takeResults): Use makeReversedRange. |
| |
| 2020-05-10 Tim Horton <timothy_horton@apple.com> |
| |
| Clicking a tel:// link on iPad with a trackpad presents different UI than tapping on it |
| https://bugs.webkit.org/show_bug.cgi?id=211686 |
| <rdar://problem/57941589> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * dom/MouseRelatedEvent.h: |
| * editing/cocoa/DataDetection.h: |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::DataDetection::canPresentDataDetectorsUIForElement): |
| (WebCore::DataDetection::shouldCancelDefaultAction): Deleted. |
| Rename shouldCancelDefaultAction to canPresentDataDetectorsUIForElement. |
| This bit indicates whether a given element should invoke DD UI instead of |
| doing its default action, so either name is OK, but it feels better to |
| have it in the affirmative direction. |
| |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::handleClick): |
| Determine if tapping on an anchor should invoke DataDetectors UI instead |
| of performing the default action, and short-circuit if that is possible. |
| |
| * loader/EmptyClients.h: |
| * page/ChromeClient.h: |
| |
| 2020-05-09 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] Search field on mayoclinic.org/forms/us-resident-appointment clips the submit button |
| https://bugs.webkit.org/show_bug.cgi?id=211673 |
| <rdar://problem/62572501> |
| |
| Reviewed by Tim Horton. |
| |
| Allow search fields to be style-able, but only if the CSS `border` value is non-default. |
| |
| Note that there was a previous attempt to achieve something similar in r157443 by adding search fields to the |
| base class implementation of `RenderTheme::isControlStyled`; however, this patch wasn't actually accompanied by |
| support for rendering native search fields with a non-default background, which meant that customizing just the |
| background of a search field would cause the entire search field to opt out of the native search field |
| appearance (a pill with rounded corners on macOS). |
| |
| However, in the case where the border is customized on macOS, it is incorrect to use the default search field |
| appearance, since the search field cell just consists of a border; as such, there should be little compatibility |
| risk of a web page unexpectedly getting the fallback (non-native) appearance for a search field, due to having |
| custom border styles. |
| |
| This also makes the behavior of search fields match that of text fields, textareas, and list boxes (multi-option |
| selects) on macOS, in terms of what is needed in order to bail out of native appearance rendering. |
| |
| Rebaselined existing tests: fast/css/text-input-with-webkit-border-radius.html |
| fast/forms/search-styled.html |
| |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::isControlStyled const): Add SearchFieldPart. |
| |
| 2020-05-09 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION(r258493): CRASH running fast/mediastream/RTCPeerConnection tests |
| https://bugs.webkit.org/show_bug.cgi?id=211666 |
| <rdar://problem/63055644> |
| |
| Reviewed by Eric Carlson. |
| |
| MockMediaStreamTrack advertises that it's a webrtc::VideoTrackInterface, but doesn't inherit from |
| that interface, leading to a crash when its pointer is cast to webrtc::VideoTrackInterface and a |
| virtual method called on the resulting pointer. Since it's only used in one place, and since there's |
| an existing mock webrtc::VideoTrackInterface object in that same file, remove MockMediaStreamTrack |
| and replace the one place it's used with MockLibWebRTCVideoTrack. |
| |
| * testing/MockLibWebRTCPeerConnection.h: |
| (WebCore::MockMediaStreamTrack::state const): Deleted. |
| |
| 2020-05-09 David Kilzer <ddkilzer@apple.com> |
| |
| XML external entity resources should only be loaded from XML MIME types |
| <https://webkit.org/b/211488> |
| <rdar://problem/62869515> |
| |
| Reviewed by Darin Adler. |
| |
| Tests: dom/xhtml/level3/core/entitygetinputencoding03.xhtml |
| dom/xhtml/level3/core/entitygetinputencoding04.xhtml |
| dom/xhtml/level3/core/entitygetxmlencoding02.xhtml |
| dom/xhtml/level3/core/entitygetxmlencoding03.xhtml |
| dom/xhtml/level3/core/entitygetxmlencoding04.xhtml |
| dom/xhtml/level3/core/entitygetxmlversion03.xhtml |
| dom/xhtml/level3/core/entitygetxmlversion04.xhtml |
| dom/xhtml/level3/core/nodegetbaseuri16.xhtml |
| dom/xhtml/level3/core/nodegetbaseuri19.xhtml |
| dom/xhtml/level3/core/nodegetbaseuri20.xhtml |
| fast/parser/external-entities-in-xslt.xml |
| fast/xsl/dtd-in-source-document.xml |
| fast/xsl/xslt-second-level-import.xml |
| http/tests/security/contentTypeOptions/nosniff-xml-external-entity.xhtml |
| http/tests/security/xss-DENIED-xsl-external-entity-redirect.xml |
| |
| * html/HTMLBaseElement.cpp: |
| (WebCore::HTMLBaseElement::href const): |
| - Add comment about keeping code in sync with openFunc() in |
| XMLDocumentParserLibxml2.cpp. |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::responseMIMEType const): |
| - Add comment about keeping code in sync with |
| externalEntityMimeTypeAllowed() in |
| XMLDocumentParserLibxml2.cpp. |
| * xml/parser/XMLDocumentParserLibxml2.cpp: |
| (WebCore::externalEntityMimeTypeAllowed): |
| - Rename from externalEntityMimeTypeAllowedByNosniff(). |
| - Change to only allow XML MIME types regardless of nosniff |
| option. |
| - Add fallback path to determine MIME type for file:/// URLs to |
| make layout tests work properly. Logic taken from |
| XMLHttpRequest::responseMIMEType(). Not sure if there was a |
| good place to share it. |
| (WebCore::openFunc): |
| - Fix relative URLs by providing the document's URL as a base. |
| Also provide an encoding if needed. Logic taken from |
| HTMLBaseElement::href(). (Not sure if there was a good place |
| to share it.) This was required to fix loading of external |
| entity resources in the dom/xhtml/level3/core tests, which |
| hadn't been loading these resources for a while. Ultimately |
| this didn't matter--except for new error messages being |
| printed in test results--because the tests fail due to missing |
| DOM features for XHTML documents). |
| - Change the fix for Bug 21963 into an empty URL check since |
| setting FetchOptions.mode to Mode::SameOrigin prevents a |
| redirect from loading a resource outside the document's |
| origin. The previous check worked, but the relaxed check in |
| externalEntityMimeTypeAllowed() caused the XML MIME type |
| warning to be output on redirects to non-same-origin URLs. I |
| didn't see a way to check for a cross-origin loading error. |
| - Add a console message for a cross-origin load failing. |
| - Update for function rename. |
| - Remove double negative from console message for an invalid |
| MIME type. |
| (WebCore::externalEntityMimeTypeAllowedByNosniff): |
| - Rename to externalEntityMimeTypeAllowed(). |
| |
| 2020-05-09 David Kilzer <ddkilzer@apple.com> |
| |
| Adapt LocalCurrentGraphicsContext for iOS |
| <https://webkit.org/b/211660> |
| |
| Reviewed by Darin Adler. |
| |
| * PlatformMac.cmake: |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| - Update build files for: |
| - Rename of LocalCurrentGraphicsContext.mm to |
| LocalCurrentGraphicsContextMac.mm. |
| - Move of LocalCurrentGraphicsContext.h from platform/mac to |
| platform/cocoa. |
| - Addition of LocalCurrentGraphicsContextIOS.mm. |
| |
| * platform/cocoa/LocalCurrentGraphicsContext.h: Renamed from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.h. |
| - Make this work for iOS by using PLATFORM(COCOA) for the outer |
| guard and USE(APPKIT) for the Mac-specific bits. |
| - Use RetainPtr<> for NSGraphicsContext to clean up code in |
| LocalCurrentGraphicsContextMac.mm. |
| (WebCore::LocalCurrentGraphicsContext::cgContext): |
| - Inline from LocalCurrentGraphicsContextMac.mm. |
| |
| * platform/ios/LocalCurrentGraphicsContextIOS.mm: Copied from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm. |
| (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext): |
| (WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext): |
| - Implement based on LocalCurrentGraphicsContextMac.mm. Use |
| UIGraphics{GetCurrent,Pop,Push}Context() functions added to |
| UIKitSoftLink.h. |
| |
| * platform/mac/LocalCurrentGraphicsContextMac.mm: Renamed from Source/WebCore/platform/mac/LocalCurrentGraphicsContext.mm. |
| (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext): |
| - Use m_savedGraphicsContext instead of graphicsContext in the |
| body of the constructor. |
| - Remove set-to-nil/retain of m_savedNSGraphicsContext since |
| that is handled by RetainPtr<> now. |
| (WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext): |
| - Remove release of m_savedNSGraphicsContext since that is |
| handled by RetainPtr<> now. |
| (WebCore::LocalCurrentGraphicsContext::cgContext): Delete. |
| - Inline into header to share implementation with iOS. |
| |
| 2020-05-09 Darin Adler <darin@apple.com> |
| |
| Fix null-dereference in DocumentTimelinesController::updateAnimationsAndSendEvents |
| https://bugs.webkit.org/show_bug.cgi?id=211667 |
| |
| Reviewed by Antoine Quint. |
| |
| * animation/DocumentTimelinesController.cpp: |
| (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): Add null |
| check before removing animationsToRemove, which may already have been removed |
| since any arbitrary change could occur while animations are firing. |
| |
| 2020-05-09 Darin Adler <darin@apple.com> |
| |
| Add missing null-check of page in ResourceLoader::loadDataURL |
| https://bugs.webkit.org/show_bug.cgi?id=211589 |
| rdar://57213601 |
| |
| Reviewed by Anders Carlsson. |
| |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::loadDataURL): Add null check before using page. |
| |
| 2020-05-08 Darin Adler <darin@apple.com> |
| |
| Streamline MarkupAccumulator to improve efficiency a bit |
| https://bugs.webkit.org/show_bug.cgi?id=211656 |
| |
| Reviewed by Anders Carlsson. |
| |
| * editing/MarkupAccumulator.cpp: |
| (WebCore::MarkupAccumulator::appendCharactersReplacingEntities): Corrected early |
| exit so it returns any time the length is 0. For some reason the code before |
| wouldn't do the early return when offset is non-zero, which is unnecessary. |
| (WebCore::MarkupAccumulator::appendString): Deleted. |
| (WebCore::MarkupAccumulator::appendStringView): Deleted. |
| (WebCore::MarkupAccumulator::appendEndTag): Use variadic append to cut down |
| on memory allocations. |
| (WebCore::MarkupAccumulator::totalLength): Deleted. |
| (WebCore::MarkupAccumulator::concatenateMarkup): Deleted. |
| (WebCore::MarkupAccumulator::takeMarkup): Added. |
| (WebCore::MarkupAccumulator::appendQuotedURLAttributeValue): Use variadic |
| append to cut down on memory allocations. Also use char instead of UChar so |
| the string building code doesn't have to do an 8/16 bit check. |
| (WebCore::shouldAddNamespaceElement): Prepend a literal, don't bother to |
| make a String just to append to another String. Also made this a |
| non-member function. |
| (WebCore::shouldAddNamespaceAttribute): Made this a non-member function. |
| (WebCore::MarkupAccumulator::appendNamespace): Fix hash table usage |
| to use add instead of get followed by set to avoid double hashing. |
| Use variadic append to cut down on memory allocation. |
| (WebCore::MarkupAccumulator::appendText): Tweaked style to make this a |
| one-line function. |
| (WebCore::appendComment): Deleted. |
| (WebCore::appendXMLDeclaration): Made this a non-member function. |
| Use variadic append to cut down on memory allocation. |
| (WebCore::appendDocumentType): Made this a non-member function. |
| Use variadic append to cut down on memory allocation. |
| (WebCore::MarkupAccumulator::appendCDATASection): Deleted. |
| (WebCore::MarkupAccumulator::appendNonElementNode): Moved the bodies of |
| appendComment, appendProcessingInstruction, and appendCDATASection in |
| here since they can all be one-line variadic append calls. |
| |
| * editing/MarkupAccumulator.h: |
| (WebCore::MarkupAccumulator::length const): Changed the return type |
| of length to be unsigned since that's what StringBuilder returns. |
| Made isAllASCII call StringBuilder::isAllASCII. Replaced appendString |
| and appendStringView with variadic append. Removed many functions |
| that no longer need to be member functions. Made appendAttributeValue |
| a static member function. Made appendNamespace private. Made |
| m_serializationSyntax const. |
| |
| * editing/markup.cpp: |
| (WebCore::StyledMarkupAccumulator::wrapWithStyleNode): Use append |
| instead of appenString. |
| (WebCore::StyledMarkupAccumulator::isAllASCII const): Added. Before |
| the code would only check the StringBuilder, but we also need to |
| check m_reversedPrecedingMarkup. |
| (WebCore::StyledMarkupAccumulator::takeResults): Use CheckedUint32 |
| since StringBuilder's reserveCapacity function takes unsigned, not |
| size_t. The old code, using totalLength, would just pass a size_t |
| and let it get chopped off, which didn't do any harm, but it seems |
| strange to compute a 64-bit value just to chop off the lower 32 |
| bits. An alternative is to compute the 32-bit value and just let |
| it overflow. Use a modern for loop by defining a ReverseView |
| template rather than writing a confusing backwards loop. Use the |
| new takeMarkup instead of concatenateMarkup. |
| (WebCore::StyledMarkupAccumulator::appendText): Tweak coding |
| style a little bit. |
| (WebCore::StyledMarkupAccumulator::appendStartTag): Ditto. |
| (WebCore::StyledMarkupAccumulator::appendNodeToPreserveMSOList): |
| Use variadic append to cut down on memory allocations. |
| (WebCore::propertyMissingOrEqualToNone): Tweak coding style a bit. |
| (WebCore::serializePreservingVisualAppearanceInternal): Use |
| append instead of appendString. |
| (WebCore::shouldPreserveMSOLists): Take a StringView instead of a |
| String to eliminate unnecessary memory allocation in call to substring. |
| (WebCore::sanitizedMarkupForFragmentInDocument): Use makeString |
| instead of StringBuilder to cut down on memory allocation. |
| |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::resetDefaultButton): Fix spelling error |
| in the word "explicitly". |
| * mathml/MathMLOperatorDictionary.cpp: |
| (WebCore::MathMLOperatorDictionary::search): Ditto. |
| |
| * page/PageSerializer.cpp: |
| (WebCore::PageSerializer::SerializerMarkupAccumulator::SerializerMarkupAccumulator): |
| Use variadic append instead of appendString to cut down on |
| memory allocations. |
| |
| * rendering/svg/SVGInlineTextBox.cpp: |
| (WebCore::SVGInlineTextBox::paint): Fix spelling error in the word |
| "explicitly". |
| |
| 2020-05-09 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in LegacyWebArchive::createPropertyListRepresentation when copying selected range that contains surrogate characters |
| https://bugs.webkit.org/show_bug.cgi?id=211658 |
| <rdar://problem/62844424> |
| |
| Reviewed by Ryosuke Niwa. |
| |
| Added check for null LegacyWebArchive in LegacyWebArchive::createFromSelection. Return nullptr when creation fails. |
| |
| Test: webarchive/copy-surrogate-char-crash.html |
| |
| * loader/archive/cf/LegacyWebArchive.cpp: |
| (WebCore::LegacyWebArchive::createFromSelection): |
| |
| 2020-05-09 Tetsuharu Ohzeki <tetsuharu.ohzeki@gmail.com> |
| |
| Fix wpt shadow-dom/slots-fallback-in-document.html |
| https://bugs.webkit.org/show_bug.cgi?id=211640 |
| |
| Reviewed by Ryosuke Niwa. |
| |
| By specs, HTMLSlotElement.assignedNodes() should not count children of |
| a slot in a document tree for flattened assigned nodes. |
| |
| https://html.spec.whatwg.org/multipage/scripting.html#dom-slot-assignednodes |
| https://dom.spec.whatwg.org/#find-flattened-slotables |
| |
| As sideeffect, this patch also fix wpt |
| shadow-dom/slots-outside-shadow-dom-expected.html |
| |
| Test: web-platform-tests/shadow-dom/slots-fallback-in-document.html |
| web-platform-tests/shadow-dom/slots-outside-shadow-dom.html |
| |
| * html/HTMLSlotElement.cpp: |
| (WebCore::flattenAssignedNodes): |
| |
| 2020-05-08 Basuke Suzuki <basuke.suzuki@sony.com> |
| |
| Fix build error on PlatStation port after r261132 |
| https://bugs.webkit.org/show_bug.cgi?id=211659 |
| |
| Unreviewed build fix after r261132. |
| |
| * page/scrolling/ScrollingTreeGestureState.cpp: |
| |
| 2020-05-08 David Kilzer <ddkilzer@apple.com> |
| |
| Remove empty directories from from svn.webkit.org repository |
| <https://webkit.org/b/211644> |
| |
| Reviewed by Darin Adler. |
| |
| * Modules/webgpu/cocoa: Removed. |
| * page/scrolling/ios: Removed. |
| * platform/graphics/metal: Removed. |
| |
| 2020-05-08 Simon Fraser <simon.fraser@apple.com> |
| |
| Async overflow scroll: sometimes a <select> becomes non-scrollable |
| https://bugs.webkit.org/show_bug.cgi?id=211433 |
| <rdar://problem/62338474> |
| |
| Reviewed by Dean Jackson. |
| |
| Scrollable <select>s (RenderListBox) contribute to the non-fast scrollable region, so |
| wheel events inside them are propagated to the main thread. If the select is scrolled |
| to the end, the event will propagate to the enclosing scroller, then then FrameView::wheelEvent() |
| may send it back to the scrolling thread. If the scrolling thread is processing such an event |
| after the main thread, it should not perform any latching on the main thread. |
| |
| Test: scrollingcoordinator/mac/latching/scrolling-select-should-not-latch-mainframe.html |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously): |
| (WebCore::ScrollingTree::handleWheelEvent): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ScrollingTreeLatchingController.cpp: |
| (WebCore::ScrollingTreeLatchingController::receivedWheelEvent): |
| (WebCore::ScrollingTreeLatchingController::latchedNodeForEvent const): |
| (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent): |
| (WebCore::ScrollingTreeLatchingController::clearLatchedNode): |
| * page/scrolling/ScrollingTreeLatchingController.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::handleWheelEventAfterMainThread): |
| * page/scrolling/ThreadedScrollingTree.h: |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::handleWheelEvent): |
| * platform/PlatformWheelEvent.cpp: |
| (WebCore::operator<<): |
| |
| 2020-05-08 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(AVFOUNDATION_LOADER_DELEGATE) |
| https://bugs.webkit.org/show_bug.cgi?id=211646 |
| |
| Reviewed by Eric Carlson. |
| |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResourceLoader::requestResource): Remove check of |
| HAVE(AVFOUNDATION_LOADER_DELEGATE) in a place where it also checks PLATFORM(MAC). |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| Remove HAVE(AVFOUNDATION_LOADER_DELEGATE) in Cocoa-only code. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto. |
| (WebCore::globalLoaderDelegateQueue): Ditto. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): Ditto. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::~MediaPlayerPrivateAVFoundationObjC): Ditto. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::didStopLoadingRequest): Ditto. |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.h: Ditto. |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: Ditto. |
| |
| 2020-05-08 Tomoki Imai <Tomoki.Imai@sony.com> |
| |
| TextureMapper should skip clipping a content layer if it's not needed |
| https://bugs.webkit.org/show_bug.cgi?id=210787 |
| |
| Reviewed by Don Olmstead. |
| |
| This patch follows up r260174. |
| We don't need to clip a content layer if the clipping rect contains the content rect. |
| This patch doesn't change the behavior but saves stencil indices. |
| |
| * platform/graphics/texmap/TextureMapperLayer.cpp: |
| (WebCore::TextureMapperLayer::paintSelf): |
| |
| 2020-05-08 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [iOS] Text-style fonts aren't locale-specific |
| https://bugs.webkit.org/show_bug.cgi?id=211438 |
| <rdar://problem/51654163> |
| |
| Reviewed by Sam Weinig. |
| |
| Simply hook up the locale to the Core Text function. |
| |
| It turns out that this patch actually has no behavior change, |
| because this locale is only used for font fallback, but WebKit |
| does its own font fallback and we already pass the locale into |
| CTFontCopyDefaultCascadeListForLanguages(). However, for |
| symmetry with CTFontCreateUIFontWithLanguage() it's a good idea |
| to just supply it anyway. Just in case. |
| |
| Test: platform/ios/fast/text/lang-text-style.html |
| |
| * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: |
| (WebCore::SystemFontDatabaseCoreText::createTextStyleFont): |
| |
| 2020-05-08 Kenneth Russell <kbr@chromium.org> |
| |
| [WebGL2] Complete new texture upload entry points in WebGL2RenderingContext |
| https://bugs.webkit.org/show_bug.cgi?id=208875 |
| |
| Reviewed by Dean Jackson. |
| |
| Implement the remaining texture upload entry points - mainly for |
| 3D textures - in WebGL2RenderingContext. Add support for uploading |
| from the pixel unpack buffer. |
| |
| Refactor the WebGL 2.0 binding points into WebGL2RenderingContext, |
| where they had previously been in the base class. Refactor |
| validation code to override the base class where necessary. |
| Refactor getParameter into WebGLRenderingContextBase and override |
| it in WebGL2RenderingContext, eliminating duplicate code and |
| fixing bugs. |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::~WebGL2RenderingContext): |
| (WebCore::WebGL2RenderingContext::getInt64Parameter): |
| (WebCore::WebGL2RenderingContext::validateBufferTarget): |
| (WebCore::WebGL2RenderingContext::validateBufferTargetCompatibility): |
| (WebCore::WebGL2RenderingContext::validateBufferDataTarget): |
| (WebCore::WebGL2RenderingContext::validateAndCacheBufferBinding): |
| (WebCore::WebGL2RenderingContext::validateTexImageBinding): |
| (WebCore::WebGL2RenderingContext::validateTexture3DBinding): |
| (WebCore::WebGL2RenderingContext::copyBufferSubData): |
| (WebCore::WebGL2RenderingContext::bindFramebuffer): |
| (WebCore::WebGL2RenderingContext::deleteFramebuffer): |
| (WebCore::WebGL2RenderingContext::getTexParameter): |
| (WebCore::WebGL2RenderingContext::texStorage2D): |
| (WebCore::WebGL2RenderingContext::texStorage3D): |
| (WebCore::WebGL2RenderingContext::texImage2D): |
| (WebCore::WebGL2RenderingContext::texImage3D): |
| (WebCore::WebGL2RenderingContext::texSubImage2D): |
| (WebCore::WebGL2RenderingContext::texSubImage3D): |
| (WebCore::WebGL2RenderingContext::bindBufferBase): |
| (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): |
| (WebCore::WebGL2RenderingContext::validateFramebufferTarget): |
| (WebCore::WebGL2RenderingContext::getFramebufferBinding): |
| (WebCore::WebGL2RenderingContext::getReadFramebufferBinding): |
| (WebCore::WebGL2RenderingContext::restoreCurrentFramebuffer): |
| (WebCore::WebGL2RenderingContext::getParameter): |
| (WebCore::WebGL2RenderingContext::uncacheDeletedBuffer): |
| (WebCore::WebGL2RenderingContext::validateFramebufferFuncParameters): Deleted. |
| * html/canvas/WebGL2RenderingContext.h: |
| * html/canvas/WebGLBuffer.cpp: |
| (WebCore::WebGLBuffer::setTarget): |
| * html/canvas/WebGLBuffer.h: |
| * html/canvas/WebGLFramebuffer.cpp: |
| (WebCore::WebGLFramebuffer::setAttachmentForBoundFramebuffer): |
| (WebCore::WebGLFramebuffer::attach): |
| (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer): |
| (WebCore::WebGLFramebuffer::isBound const): |
| * html/canvas/WebGLFramebuffer.h: |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::validateFramebufferFuncParameters): Deleted. |
| (WebCore::WebGLRenderingContext::getParameter): Deleted. |
| * html/canvas/WebGLRenderingContext.h: |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::initializeNewContext): |
| (WebCore::WebGLRenderingContextBase::~WebGLRenderingContextBase): |
| (WebCore::WebGLRenderingContextBase::validateBufferTarget): |
| (WebCore::WebGLRenderingContextBase::validateBufferDataTarget): |
| (WebCore::WebGLRenderingContextBase::validateAndCacheBufferBinding): |
| (WebCore::WebGLRenderingContextBase::bindBuffer): |
| (WebCore::WebGLRenderingContextBase::bindFramebuffer): |
| (WebCore::WebGLRenderingContextBase::bindTexture): |
| (WebCore::WebGLRenderingContextBase::checkFramebufferStatus): |
| (WebCore::WebGLRenderingContextBase::uncacheDeletedBuffer): |
| (WebCore::WebGLRenderingContextBase::deleteFramebuffer): |
| (WebCore::WebGLRenderingContextBase::deleteRenderbuffer): |
| (WebCore::WebGLRenderingContextBase::deleteTexture): |
| (WebCore::WebGLRenderingContextBase::framebufferRenderbuffer): |
| (WebCore::WebGLRenderingContextBase::framebufferTexture2D): |
| (WebCore::WebGLRenderingContextBase::getParameter): |
| (WebCore::WebGLRenderingContextBase::readPixels): |
| (WebCore::WebGLRenderingContextBase::copyTexImage2D): |
| (WebCore::WebGLRenderingContextBase::texParameter): |
| (WebCore::WebGLRenderingContextBase::getBoundReadFramebufferColorFormat): |
| (WebCore::WebGLRenderingContextBase::getBoundReadFramebufferWidth): |
| (WebCore::WebGLRenderingContextBase::getBoundReadFramebufferHeight): |
| (WebCore::WebGLRenderingContextBase::validateFramebufferTarget): |
| (WebCore::WebGLRenderingContextBase::getFramebufferBinding): |
| (WebCore::WebGLRenderingContextBase::getReadFramebufferBinding): |
| (WebCore::WebGLRenderingContextBase::validateFramebufferFuncParameters): |
| (WebCore::WebGLRenderingContextBase::validateBufferDataParameters): |
| (WebCore::WebGLRenderingContextBase::setFramebuffer): |
| (WebCore::WebGLRenderingContextBase::restoreCurrentFramebuffer): |
| (WebCore::WebGLRenderingContextBase::getInt64Parameter): Deleted. |
| * html/canvas/WebGLRenderingContextBase.h: |
| |
| 2020-05-08 Nikos Mouchtaris <nmouchtaris@apple.com> |
| |
| Implement web-share v2 for files |
| https://bugs.webkit.org/show_bug.cgi?id=209265 |
| |
| Reviewed by Andy Estes. |
| |
| Modified existing tests for new behavior. |
| |
| Added support for handling of files in share/canShare, |
| and implemented asynchronous reading of data from blobs on |
| disk into memory. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * page/Navigator.cpp: |
| (WebCore::Navigator::canShare): |
| (WebCore::Navigator::share): |
| (WebCore::Navigator::finishedLoad): |
| * page/Navigator.h: |
| * page/ReadShareDataAsync.cpp: Added. |
| (WebCore::ReadShareDataAsync::readInternal): |
| (WebCore::ReadShareDataAsync::ReadShareDataAsync): |
| (WebCore::ReadShareDataAsync::~ReadShareDataAsync): |
| (WebCore::ReadShareDataAsync::start): |
| (WebCore::ReadShareDataAsync::didFinishLoading): |
| (WebCore::ReadShareDataAsync::didReceiveData): |
| (WebCore::ReadShareDataAsync::didStartLoading): |
| (WebCore::ReadShareDataAsync::didFail): |
| * page/ReadShareDataAsync.hpp: Added. |
| * page/ShareData.h: |
| |
| 2020-05-08 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r261341 and r261392. |
| |
| Caused multiple regression test failures |
| |
| Reverted changesets: |
| |
| "Poster set after playback begins should be ignored" |
| https://bugs.webkit.org/show_bug.cgi?id=211464 |
| https://trac.webkit.org/changeset/261341 |
| |
| "REGRESSION(r261341): imported/w3c/web-platform- |
| tests/html/semantics/embedded-content/the-video- |
| element/intrinsic_sizes.htm is failing" |
| https://bugs.webkit.org/show_bug.cgi?id=211612 |
| https://trac.webkit.org/changeset/261392 |
| |
| 2020-05-08 Alex Christensen <achristensen@webkit.org> |
| |
| Limit HTTP referer to 4kb |
| https://bugs.webkit.org/show_bug.cgi?id=211603 |
| <rdar://problem/56768823> |
| |
| Reviewed by Chris Dumez. |
| |
| Use the origin if it's longer, unless the origin is too long. |
| This matches the behavior of other browsers. |
| See https://bugzilla.mozilla.org/show_bug.cgi?id=1557346 |
| |
| Tested by API tests. |
| |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::ResourceRequestBase::setHTTPReferrer): |
| |
| 2020-05-08 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| SIGILL @ WebCore::Shape::createRasterShape -- DOS ASAN |
| https://bugs.webkit.org/show_bug.cgi?id=211539 |
| |
| Reviewed by Simon Fraser. |
| |
| Corrected the comment. |
| |
| No new test needed. |
| |
| * rendering/shapes/Shape.cpp: |
| (WebCore::Shape::createRasterShape): |
| |
| 2020-05-08 Rob Buis <rbuis@igalia.com> |
| |
| Fix urlsearchparams-delete.html |
| https://bugs.webkit.org/show_bug.cgi?id=211456 |
| |
| Reviewed by Daniel Bates. |
| |
| Step 2 of URLSearchParams.delete algorithm [1] indicates |
| we should run the update steps, even if no name-value |
| pairs were removed. |
| |
| Behavior matches Chrome and Firefox. |
| |
| [1] https://url.spec.whatwg.org/#dom-urlsearchparams-delete |
| |
| Test: web-platform-tests/url/urlsearchparams-delete.html |
| |
| * html/URLSearchParams.cpp: |
| (WebCore::URLSearchParams::remove): |
| |
| 2020-05-08 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iOS] caret appears in the middle of a search field when field is focused on agoda.com |
| https://bugs.webkit.org/show_bug.cgi?id=211591 |
| <rdar://problem/60605873> |
| |
| Reviewed by Antoine Quint. |
| |
| See WebKit/ChangeLog for more details. |
| |
| Test: editing/selection/ios/caret-rect-after-animating-focused-text-field.html |
| |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::finishNotificationSteps): |
| |
| Add plumbing to call out to the WebKit client layer after an animation finishes running. |
| |
| * dom/Node.h: |
| * editing/VisibleSelection.h: |
| |
| WEBCORE_EXPORT a couple of methods. |
| |
| * page/ChromeClient.h: |
| (WebCore::ChromeClient::animationDidFinishForElement): |
| |
| 2020-05-08 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Preserve character set information when writing to the pasteboard when copying rich text |
| https://bugs.webkit.org/show_bug.cgi?id=211524 |
| |
| Reviewed by Darin Adler. |
| |
| This patch is a followup to r261247, which introduced a workaround for Cocoa platforms to automatically add a |
| `meta charset` when writing HTML data to the platform pasteboard. When copying a rich text selection, we use a |
| different codepath when sanitizing DOM content - that is, `serializePreservingVisualAppearance`. |
| |
| The previous change also introduced an enum, `AddMetaCharsetIfNeeded`, to limit applying this workaround to only |
| when we're writing HTML to the clipboard. However, it should be harmless to include this when reading sanitized |
| HTML as well, so we can also simplify this code by removing the `AddMetaCharsetIfNeeded` enum (and all of its |
| uses). |
| |
| Test: CopyHTML.SanitizationPreservesCharacterSetInSelectedText |
| |
| * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: |
| (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded): |
| * dom/DataTransfer.cpp: |
| (WebCore::DataTransfer::setDataFromItemList): |
| * editing/MarkupAccumulator.h: |
| (WebCore::MarkupAccumulator::isAllASCII const): |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::sanitizeMarkupWithArchive): |
| (WebCore::WebContentReader::readHTML): |
| (WebCore::WebContentMarkupReader::readHTML): |
| * editing/markup.cpp: |
| (WebCore::sanitizeMarkup): |
| (WebCore::serializePreservingVisualAppearanceInternal): |
| |
| Move the `meta charset` workaround from sanitizedMarkupForFragmentInDocument to |
| serializePreservingVisualAppearanceInternal, such that HTML data written to the pasteboard when copying rich |
| text can be used to load a web view, without losing the fact that the copied content was UTF-8 encoded. |
| |
| (WebCore::sanitizedMarkupForFragmentInDocument): |
| * editing/markup.h: |
| |
| 2020-05-08 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for crashes in LayoutTests in isolated tree mode. |
| https://bugs.webkit.org/show_bug.cgi?id=211622 |
| |
| Reviewed by Chris Fleizach. |
| |
| Several LayoutTests. |
| |
| Return the root from the isolated tree when it is really ready. |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::rootObject): |
| |
| Some code cleanup. |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::clickPoint): |
| |
| 2020-05-08 Simon Fraser <simon.fraser@apple.com> |
| |
| Overflow scrollers in iframes don't get mouseMovedInContentArea() |
| https://bugs.webkit.org/show_bug.cgi?id=211347 |
| <rdar://problem/62784560> |
| |
| Reviewed by Tim Horton. |
| |
| We never dispatched mouseMovedInContentArea() on ScrollableAreas in subframes, so overlay scrollbar |
| interactions there were broken. This is because the code ran from EventHandler::mouseMoved(), which |
| only runs for the main frame. |
| |
| Instead, move the mouseMovedInContentArea() dispatch down into updateMouseEventTargetNode() which |
| is run for each subframe. notifyScrollableAreasOfMouseEvents() takes an event name so we only dispatch |
| for mouseMove events. There's some complexity here related to whether the old and new ScrollableArea |
| targets are nested; this code doesn't try to do the right thing with nesting, but does handle the mouse |
| moving between the scrollable main frame and an overflow region. |
| |
| enclosingScrollableArea() is fixed to return the FrameView. enclosingScrollableLayer() is flawed, as noted |
| in the RenderLayer.h comment. |
| |
| Tests: fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-hovered.html |
| fast/scrolling/mac/scrollbars/overflow-in-iframe-overlay-scrollbar-reveal.html |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::enclosingScrollableArea): |
| (WebCore::EventHandler::mouseMoved): |
| (WebCore::EventHandler::handleMouseMoveEvent): |
| (WebCore::EventHandler::pointerCaptureElementDidChange): |
| (WebCore::EventHandler::updateMouseEventTargetNode): |
| (WebCore::EventHandler::notifyScrollableAreasOfMouseEvents): |
| (WebCore::EventHandler::dispatchMouseEvent): |
| (WebCore::enclosingScrollableArea): Deleted. |
| (WebCore::EventHandler::notifyScrollableAreasOfMouseEnterExit): Deleted. |
| * page/EventHandler.h: |
| * page/ios/EventHandlerIOS.mm: |
| (WebCore::EventHandler::dispatchSyntheticMouseOut): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::debugDescription const): |
| * rendering/RenderLayer.h: |
| |
| 2020-05-08 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] The fixed logical width should be used as the max width for a cell |
| https://bugs.webkit.org/show_bug.cgi?id=211610 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-with-fixed-widht-and-inline-content.html |
| |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell): |
| |
| 2020-05-08 Youenn Fablet <youenn@apple.com> |
| |
| Handle remote audio capture IPC messages in a background thread |
| https://bugs.webkit.org/show_bug.cgi?id=211583 |
| |
| Reviewed by Eric Carlson. |
| |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: |
| (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples): |
| Add assertion to check that we are not running on the main thread. |
| |
| 2020-05-08 Youenn Fablet <youenn@apple.com> |
| |
| Video capture does not get unmuted in case of tab switch on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=211509 |
| |
| Reviewed by Eric Carlson. |
| |
| Remove setInterrupted and related code. |
| Instead, directly use setMuted(true/false) of the source of capture tracks. |
| To ensure we validate that the active source is tied to a track of the document, |
| we add RealtimeSource::isSameAs which handles the case of a RealtimeVideoSource wrapping an AVVideoCaptureSource. |
| There might be multiple video tracks with each one its RealtimeVideoSource using the same AVVideoCaptureSource. |
| We mute the AVVideoCaptureSource directly to make sure all linked tracks will get muted/unmuted at the same time. |
| Tests to be fixed. |
| |
| * Modules/mediastream/MediaStreamTrack.cpp: |
| (WebCore::MediaStreamTrack::MediaStreamTrack): |
| (WebCore::isSourceCapturingForDocument): |
| (WebCore::MediaStreamTrack::updateCaptureAccordingToMutedState): |
| * Modules/mediastream/MediaStreamTrack.h: |
| * dom/Document.cpp: |
| (WebCore::Document::visibilityStateChanged): |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/RealtimeMediaSourceCenter.cpp: |
| * platform/mediastream/RealtimeMediaSourceCenter.h: |
| * platform/mediastream/RealtimeMediaSourceFactory.h: |
| * platform/mediastream/RealtimeVideoSource.h: |
| * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm: |
| * platform/mediastream/mac/CoreAudioCaptureSource.h: |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| * platform/mock/MockRealtimeMediaSourceCenter.cpp: |
| |
| 2020-05-07 Simon Fraser <simon.fraser@apple.com> |
| |
| MayBegin wheel event in a <select> doesn't flash the scrollers |
| https://bugs.webkit.org/show_bug.cgi?id=211605 |
| |
| Reviewed by Antti Koivisto. |
| |
| We need to special-case scrollable <select> elements, because they are ScrollableAreas |
| which are never asynchronously scrolled, so the ScrollingTree never dispatches the handleWheelEventPhase() |
| which is necessary to flash overlay scrollbars. Scrollable <select> elements are always in the |
| non-fast scrollable region. |
| |
| Fix findEnclosingScrollableContainer() to return a ScrollableArea for the "maybegin" and "canceled" events |
| that have no delta. |
| |
| Remove some "inline" and make some things references. |
| |
| Tests: fast/scrolling/mac/scrollbars/select-overlay-scrollbar-hovered.html |
| fast/scrolling/mac/scrollbars/select-overlay-scrollbar-reveal.html |
| |
| * page/EventHandler.cpp: |
| (WebCore::handleWheelEventPhaseInScrollableArea): |
| (WebCore::didScrollInScrollableArea): |
| (WebCore::handleWheelEventInAppropriateEnclosingBox): |
| (WebCore::shouldGesturesTriggerActive): |
| (WebCore::EventHandler::eventLoopHandleMouseUp): |
| (WebCore::EventHandler::eventLoopHandleMouseDragged): |
| * page/mac/EventHandlerMac.mm: |
| (WebCore::findEnclosingScrollableContainer): |
| (WebCore::EventHandler::determineWheelEventTarget): |
| * testing/Internals.cpp: |
| (WebCore::Internals::scrollableAreaForNode): Fix to find the ScrollableArea for RenderListBoxes. |
| |
| 2020-05-07 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r261252. |
| |
| Reland r260684 now that a proper fix has landed in Reader |
| |
| Reverted changeset: |
| |
| "REGRESSION (r260684): Reader background is lost after |
| multitasking" |
| https://bugs.webkit.org/show_bug.cgi?id=211533 |
| https://trac.webkit.org/changeset/261252 |
| |
| 2020-05-07 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| SIGILL @ WebCore::Shape::createRasterShape -- DOS ASAN |
| https://bugs.webkit.org/show_bug.cgi?id=211539 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Removed the RELEASE_ASSERT because its possible for imageData to be null when imageRect size is huge value. |
| |
| Test: fast/shapes/shape-outside-floats/shape-outside-imagedata-overflow.html |
| |
| * rendering/shapes/Shape.cpp: |
| (WebCore::Shape::createRasterShape): |
| |
| 2020-05-07 Youenn Fablet <youenn@apple.com> |
| |
| Remove AudioMediaStreamTrackRenderer::muted |
| https://bugs.webkit.org/show_bug.cgi?id=211289 |
| |
| Reviewed by Eric Carlson. |
| |
| * platform/mediastream/AudioMediaStreamTrackRenderer.h: |
| muted is unnecessary since we are using start/stop instead. |
| |
| 2020-05-07 Eric Carlson <eric.carlson@apple.com> |
| |
| [macOS] Playhead in Touch Bar continues when loading stalls |
| https://bugs.webkit.org/show_bug.cgi?id=211585 |
| <rdar://problem/33893306> |
| |
| Reviewed by Darin Adler. |
| |
| * platform/cocoa/PlaybackSessionModelMediaElement.h: |
| * platform/cocoa/PlaybackSessionModelMediaElement.mm: |
| (WebCore::PlaybackSessionModelMediaElement::updateForEventName): Listen for `waitingEvent` |
| and `canplay` events. Don't claim to be playing when stalled. |
| (WebCore::PlaybackSessionModelMediaElement::isStalled const): New. |
| |
| 2020-05-07 Eric Carlson <eric.carlson@apple.com> |
| |
| Poster set after playback begins should be ignored |
| https://bugs.webkit.org/show_bug.cgi?id=211464 |
| |
| Reviewed by Jer Noble. |
| |
| Redo the poster frame logic to use the `show poster flag` logic from the spec. |
| |
| Test: media/video-poster-set-after-playback.html |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize m_showPoster. |
| (WebCore::HTMLMediaElement::prepareForLoad): m_displayMode was removed. |
| (WebCore::HTMLMediaElement::selectMediaResource): Call setShowPosterFlag. |
| (WebCore::HTMLMediaElement::loadResource): Remove calls to setDisplayMode and updateDisplayState, |
| they have been deleted. |
| (WebCore::HTMLMediaElement::waitForSourceChange): Call setShowPosterFlag. Update spec text. |
| (WebCore::HTMLMediaElement::noneSupported): Call setShowPosterFlag. |
| (WebCore::HTMLMediaElement::mediaLoadingFailed): Remove call to updateDisplayState. |
| (WebCore::HTMLMediaElement::setReadyState): Ditto. |
| (WebCore::HTMLMediaElement::seekWithTolerance): Call setShowPosterFlag. |
| (WebCore::HTMLMediaElement::seekTask): Check m_showPoster, not displayMode. |
| (WebCore::HTMLMediaElement::playInternal): Call setShowPosterFlag. |
| (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Don't check displayMode. |
| (WebCore::HTMLMediaElement::updatePlayState): No more setDisplayMode. |
| (WebCore::HTMLMediaElement::userCancelledLoad): Call setShowPosterFlag. |
| (WebCore::HTMLMediaElement::mediaPlayerFirstVideoFrameAvailable): Deleted. |
| * html/HTMLMediaElement.h: |
| (WebCore::HTMLMediaElement::showPosterFlag const): |
| (WebCore::HTMLMediaElement::setShowPosterFlag): |
| (WebCore::HTMLMediaElement::displayMode const): Deleted. |
| (WebCore::HTMLMediaElement::setDisplayMode): Deleted. |
| (WebCore::HTMLMediaElement::updateDisplayState): Deleted. |
| |
| * html/HTMLVideoElement.cpp: |
| (WebCore::HTMLVideoElement::didAttachRenderers): No more updateDisplayState. |
| (WebCore::HTMLVideoElement::parseAttribute): Ditto. Call updateFromElement when poster is removed. |
| (WebCore::HTMLVideoElement::shouldDisplayPosterImage const): New. |
| (WebCore::HTMLVideoElement::mediaPlayerFirstVideoFrameAvailable): New, update player and |
| renderer if the poster isn't supposed to be visible. |
| (WebCore::HTMLVideoElement::setDisplayMode): Deleted. |
| (WebCore::HTMLVideoElement::updateDisplayState): Deleted. |
| * html/HTMLVideoElement.h: |
| |
| * rendering/RenderVideo.cpp: |
| (WebCore::RenderVideo::failedToLoadPosterImage const): New. |
| * rendering/RenderVideo.h: |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::elementShouldDisplayPosterImage const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-07 Jack Lee <shihchieh_lee@apple.com> |
| |
| In Document::willBeRemovedFromFrame, clear FrameSelection before Editor so the selection is removed. |
| https://bugs.webkit.org/show_bug.cgi?id=211551 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Covered by existing tests. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::willBeRemovedFromFrame): |
| |
| 2020-05-07 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/update-and-send-events.html is a flaky failure |
| https://bugs.webkit.org/show_bug.cgi?id=211232 |
| <rdar://problem/62650227> |
| |
| Reviewed by Dean Jackson. |
| |
| The flakiness came from this porting of the test: |
| |
| animA.finished.then(() => { animB.cancel() }); |
| animB.finished.then(() => { animA.cancel() }); |
| |
| Sometimes, animA and animB would finish in different frames even though they were designed to finish at the |
| same time. If this happened, animA.finished would resolve and trigger animB.cancel, which then rejected |
| animB.finished. This happened because animB was attached to a DocumentTimeline created by script which isn't |
| the main DocumenTimeline accessed via document.timeline. Some curious code would handle syncing of the |
| various timelines such that they would use a shared timebase. This was in DocumentTimeline::currentTime(): |
| |
| auto& mainDocumentTimeline = m_document->timeline(); |
| if (&mainDocumentTimeline != this) { |
| if (auto mainDocumentTimelineCurrentTime = mainDocumentTimeline.currentTime()) |
| return *mainDocumentTimelineCurrentTime - m_originTime; |
| return WTF::nullopt; |
| } |
| |
| We now move the currentTime caching at the DocumentTimelinesController level which ensures all DocumentTimeline |
| objects attached to a given Document use the exact same currentTime(). This prompted some overdue refactoring |
| where also all the related animation suspension code is moved from DocumentTimeline up to DocumentTimelinesController. |
| |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::detachFromDocument): |
| (WebCore::DocumentTimeline::suspendAnimations): |
| (WebCore::DocumentTimeline::resumeAnimations): |
| (WebCore::DocumentTimeline::animationsAreSuspended const): |
| (WebCore::DocumentTimeline::currentTime): |
| (WebCore::DocumentTimeline::scheduleAnimationResolution): |
| (WebCore::DocumentTimeline::documentWillUpdateAnimationsAndSendEvents): |
| (WebCore::DocumentTimeline::animationsAreSuspended): Deleted. |
| (WebCore::DocumentTimeline::liveCurrentTime const): Deleted. |
| (WebCore::DocumentTimeline::cacheCurrentTime): Deleted. |
| (WebCore::DocumentTimeline::maybeClearCachedCurrentTime): Deleted. |
| * animation/DocumentTimeline.h: |
| * animation/DocumentTimelinesController.cpp: |
| (WebCore::DocumentTimelinesController::detachFromDocument): |
| (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): |
| (WebCore::DocumentTimelinesController::suspendAnimations): |
| (WebCore::DocumentTimelinesController::resumeAnimations): |
| (WebCore::DocumentTimelinesController::animationsAreSuspended const): |
| (WebCore::DocumentTimelinesController::liveCurrentTime const): |
| (WebCore::DocumentTimelinesController::currentTime): |
| (WebCore::DocumentTimelinesController::cacheCurrentTime): |
| (WebCore::DocumentTimelinesController::maybeClearCachedCurrentTime): |
| * animation/DocumentTimelinesController.h: |
| * dom/Document.cpp: |
| (WebCore::Document::didBecomeCurrentDocumentInFrame): |
| (WebCore::Document::resume): |
| * dom/Document.h: |
| * page/Frame.cpp: |
| (WebCore::Frame::clearTimers): |
| (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): |
| * page/Page.cpp: |
| (WebCore::Page::setIsVisibleInternal): |
| (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): |
| * testing/Internals.cpp: |
| (WebCore::Internals::animationsAreSuspended const): |
| (WebCore::Internals::suspendAnimations const): |
| (WebCore::Internals::resumeAnimations const): |
| |
| 2020-05-07 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r252161): Animation of box-shadow with border-radius set is flashy |
| https://bugs.webkit.org/show_bug.cgi?id=211530 |
| <rdar://problem/62570229> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Drawing inset box shadows with spread was broken, and in some cases generated invalid |
| rounded rects, causing inset shadows with border-radius to lose the radius. |
| |
| First, with split inlines, the spread was not getting removed from the excluded edges. |
| Fix in the includeLogicalLeftEdge/includeLogicalRightEdge clauses, adding shiftXEdgeBy()/shiftYEdgeBy() helpers |
| to LayoutRect to simplify logic. |
| |
| Second, when computing the rounded hole rect, we'd use the result of style.getRoundedInnerBorderFor() |
| but that doesn't take shadow spread into account, so we'd build a rounded rect with a rect that |
| accounted for spread, but radii computed without. That could result in unrenderable rounded rects. |
| Fix by calling style.getRoundedInnerBorderFor() a second time if we have spread; this will fix |
| up the radii for spread. |
| |
| |
| Tests: fast/box-shadow/inset-box-shadow-fractional-radius.html |
| fast/box-shadow/inset-shadow-split-inline.html |
| fast/box-shadow/inset-spread-box-shadow-split-inline.html |
| |
| * platform/graphics/LayoutRect.h: |
| (WebCore::LayoutRect::shiftXEdgeBy): |
| (WebCore::LayoutRect::shiftYEdgeBy): |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::paintBoxShadow): |
| |
| 2020-05-07 Don Olmstead <don.olmstead@sony.com> |
| |
| Remove unused USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) |
| https://bugs.webkit.org/show_bug.cgi?id=211582 |
| |
| Reviewed by Fujii Hironori. |
| |
| After r261264 all ports implemented USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR. |
| |
| * page/ChromeClient.h: |
| (WebCore::ChromeClient::createDisplayRefreshMonitor const): |
| * page/Page.cpp: |
| (WebCore::Page::windowScreenDidChange): |
| * page/RenderingUpdateScheduler.cpp: |
| (WebCore::RenderingUpdateScheduler::RenderingUpdateScheduler): |
| (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency): |
| (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate): |
| (WebCore::RenderingUpdateScheduler::windowScreenDidChange): |
| * page/RenderingUpdateScheduler.h: |
| * platform/graphics/DisplayRefreshMonitor.cpp: |
| * platform/graphics/DisplayRefreshMonitor.h: |
| * platform/graphics/DisplayRefreshMonitorClient.cpp: |
| * platform/graphics/DisplayRefreshMonitorClient.h: |
| * platform/graphics/DisplayRefreshMonitorManager.cpp: |
| * platform/graphics/DisplayRefreshMonitorManager.h: |
| * platform/graphics/GraphicsLayerUpdater.cpp: |
| (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater): |
| (WebCore::GraphicsLayerUpdater::scheduleUpdate): |
| (WebCore::GraphicsLayerUpdater::screenDidChange): |
| (WebCore::GraphicsLayerUpdater::displayRefreshFired): |
| (WebCore::GraphicsLayerUpdater::createDisplayRefreshMonitor const): |
| * platform/graphics/GraphicsLayerUpdater.h: |
| * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp: |
| * platform/graphics/gtk/DisplayRefreshMonitorGtk.h: |
| * platform/graphics/ios/DisplayRefreshMonitorIOS.h: |
| * platform/graphics/ios/DisplayRefreshMonitorIOS.mm: |
| * platform/graphics/mac/DisplayRefreshMonitorMac.cpp: |
| * platform/graphics/mac/DisplayRefreshMonitorMac.h: |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::createDisplayRefreshMonitor const): |
| * rendering/RenderLayerCompositor.h: |
| |
| 2020-05-07 Antoine Quint <graouts@apple.com> |
| |
| Add watchOS media controls assets |
| https://bugs.webkit.org/show_bug.cgi?id=211508 |
| |
| Unreviewed. Cleaning up some stray logging. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2020-05-07 Darin Adler <darin@apple.com> |
| |
| Add some missing null checks for DocumentLoader |
| https://bugs.webkit.org/show_bug.cgi?id=211544 |
| rdar://62843516 |
| |
| Reviewed by Anders Carlsson. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::transitionToCommitted): Use some more RefPtr, |
| and check for null before calling DocumentLoader::responseMIMEType. |
| Also removed a comment that made no sense, and an assertion that was |
| there for no reason, left over from some point in history where it |
| made sense. |
| |
| * loader/HistoryController.cpp: |
| (WebCore::FrameLoader::HistoryController::updateForRedirectWithLockedBackForwardList): |
| Add checks for null before calling urlForHistory and isClientRedirect. |
| |
| 2020-05-07 Darin Adler <darin@apple.com> |
| |
| Remove USE(INSERTION_UNDO_GROUPING) checks in macOS platform code |
| https://bugs.webkit.org/show_bug.cgi?id=211525 |
| |
| Reviewed by Anders Carlsson. |
| |
| * editing/mac/TextUndoInsertionMarkupMac.h: Remove |
| NSTextInputContext_Private.h usage. Moving to NSTextInputContextSPI.h |
| instead. Also remove #pragma once since this is an Objective-C-only |
| header, not for cross-platform use. |
| |
| * editing/mac/TextUndoInsertionMarkupMac.mm: Above, plus move |
| NSUndoManager_Private.h to NSUndoManagerSPI.h. |
| |
| 2020-05-07 Sergio Villar Senin <svillar@igalia.com> |
| |
| [Conditional=] not working for operations in WebGLRenderingContextBase.idl |
| https://bugs.webkit.org/show_bug.cgi?id=211528 |
| |
| Reviewed by Chris Dumez. |
| |
| When an IDL interface under a given Condition defined an operation with |
| another Condition the generated source file should guard the operation |
| with both the Condition from the interface and the one from the |
| operation. This was working fine for sole interfaces but not for those |
| who were inheriting from a base one, i.e., it was not working for |
| supplemental interfaces. |
| |
| Added a new minimalistic binding test showcasing the problem. |
| |
| * bindings/scripts/CodeGenerator.pm: |
| (ProcessSupplementalDependencies): Add Conditionals from both interface and operation. |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| (WebCore::jsTestGlobalObjectTestOperationConditionalConstructorGetter): Updated result. |
| (WebCore::jsTestGlobalObjectTestOperationConditionalConstructor): Ditto. |
| (WebCore::setJSTestGlobalObjectTestOperationConditionalConstructorSetter): Ditto. |
| (WebCore::setJSTestGlobalObjectTestOperationConditionalConstructor): Ditto. |
| * bindings/scripts/test/JS/JSTestOperationBase.cpp: Added. |
| * bindings/scripts/test/JS/JSTestOperationBase.h: Added. |
| * bindings/scripts/test/JS/JSTestOperationConditional.cpp: Added. |
| * bindings/scripts/test/JS/JSTestOperationConditional.h: Added. |
| * bindings/scripts/test/TestOperationBase.idl: Added. |
| * bindings/scripts/test/TestOperationConditional.idl: Added. |
| |
| 2020-05-07 Antti Koivisto <antti@apple.com> |
| |
| [Wheel event region] Include listeners on Window |
| https://bugs.webkit.org/show_bug.cgi?id=211577 |
| |
| Reviewed by Simon Fraser. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-window.html |
| |
| * dom/EventTarget.h: |
| * dom/Node.h: |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::computeEventListenerRegionTypes): |
| |
| Take EventTarget so this can be used with DOMWindow. |
| |
| * style/StyleAdjuster.h: |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| |
| 2020-05-07 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r261056): [ Mac WK1 ] inspector/console/console-api.html is flaky crashing |
| https://bugs.webkit.org/show_bug.cgi?id=211386 |
| |
| Reviewed by Darin Adler. |
| |
| Address additional review feedback. |
| |
| * platform/mac/ScrollbarThemeMac.mm: |
| (WebCore::ScrollbarThemeMac::unregisterScrollbar): |
| |
| 2020-05-07 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC[TFC] Adjust the table wrapper box style |
| https://bugs.webkit.org/show_bug.cgi?id=211574 |
| |
| Reviewed by Antti Koivisto. |
| |
| The computed values of properties 'position', 'float', 'margin-*', 'top', 'right', 'bottom', and 'left' |
| on the table element are used on the table wrapper box and not the table box; all other values of non-inheritable |
| properties are used on the table box and not the table wrapper box. |
| |
| https://www.w3.org/TR/CSS22/tables.html#model |
| |
| Test: fast/layoutformattingcontext/table-simple-with-border.html |
| |
| * layout/layouttree/LayoutBox.cpp: |
| (WebCore::Layout::Box::isBlockContainerBox const): |
| * layout/layouttree/LayoutTreeBuilder.cpp: |
| (WebCore::Layout::TreeBuilder::createLayoutBox): |
| (WebCore::Layout::TreeBuilder::buildTableStructure): |
| |
| 2020-05-07 Andres Gonzalez <andresg_22@apple.com> |
| |
| Make debug build run in accessibility isolated tree mode = 1. |
| https://bugs.webkit.org/show_bug.cgi?id=211567 |
| |
| Reviewed by Chris Fleizach. |
| |
| - Removed several unnecessary ASSERTs that prevent debug builds to run |
| in isolated tree mode = 1, i.e., isolated tree mode on main thread. |
| - AXIsolatedObject::children and updateBackingStore need to be executed |
| on both threads. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::detachRemoteParts): |
| (WebCore::AXIsolatedObject::children): Need to update the children |
| regardless of the thread in which it is invoked. Pending, must add a |
| lock to prevent thread collision. |
| |
| (WebCore::AXIsolatedObject::updateBackingStore): Need to update the |
| backing store regardless of the thread in whhich it is invoked. |
| |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::generateSubtree): |
| (WebCore::AXIsolatedTree::setRootNodeID): |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: Enable |
| isolated tree mode = 1. |
| (-[WebAccessibilityObjectWrapperBase detach]): |
| (-[WebAccessibilityObjectWrapperBase axBackingObject]): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: Use makeString |
| instead of String concatenation as pointed out by Darin Adler in bug 210914. |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): |
| (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]): |
| |
| 2020-05-07 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Set section [top, left] used position. |
| https://bugs.webkit.org/show_bug.cgi?id=211546 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-simple-with-padding.html |
| |
| * layout/Verification.cpp: |
| (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForSections): |
| * layout/tableformatting/TableFormattingContext.h: |
| |
| 2020-05-07 Antti Koivisto <antti@apple.com> |
| |
| [Wheel event region] Include listeners on Document |
| https://bugs.webkit.org/show_bug.cgi?id=211571 |
| |
| Reviewed by Simon Fraser. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-document.html |
| |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::computeEventListenerRegionTypes): |
| (WebCore::Style::computeEventListenerRegionTypes): Deleted. |
| |
| Make public and take Node instead of Element. |
| |
| * style/StyleAdjuster.h: |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| |
| Gather event region bits from Document too. |
| |
| 2020-05-07 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260769. |
| https://bugs.webkit.org/show_bug.cgi?id=211578 |
| |
| Introduced regressions related to sharing (Requested by |
| perarne on #webkit). |
| |
| Reverted changeset: |
| |
| "[Cocoa] After r258891, r255119 can be reverted" |
| https://bugs.webkit.org/show_bug.cgi?id=211083 |
| https://trac.webkit.org/changeset/260769 |
| |
| 2020-05-07 Darin Adler <darin@apple.com> |
| |
| Fix assertions seen when trying to draw an absurdly large shadow |
| https://bugs.webkit.org/show_bug.cgi?id=211541 |
| rdar://62843377 |
| |
| Reviewed by Geoffrey Garen. |
| |
| * platform/graphics/IntSize.h: |
| (WebCore::IntSize::unclampedArea const): Return uint64_t instead of |
| size_t. Two 32-bit positive integers multiplied fit in a 64-bit integer, |
| but there's no guarantee they fit in a "pointer sized" integer. |
| |
| * platform/graphics/ShadowBlur.cpp: |
| (WebCore::ShadowBlur::drawRectShadow): When comparing an IntSize area with |
| a FloatSize area, avoid checked overflow by using IntSize::unclampedArea, |
| which returns something we can compare with a float. Using IntSize::area |
| meant we'd intentionally crash the process if the area number doesn't fit |
| in a 32-bit int, which is not important or helpful. |
| (WebCore::ShadowBlur::drawRectShadowWithTiling): Make sure |
| ScratchBuffer::scheduleScratchBufferPurge is always called after |
| ScratchBuffer::getScratchBuffer, even it returns nullptr. An alternative |
| would have been to change the logic inside getScratchBuffer, but this |
| seems easier to get right, and no need to optimize the failure case. |
| (WebCore::ShadowBlur::drawInsetShadowWithTiling): Ditto. |
| |
| 2020-05-07 Youenn Fablet <youenn@apple.com> |
| |
| Fix potential threading issue in AudioMediaStreamTrackRendererCocoa::render |
| https://bugs.webkit.org/show_bug.cgi?id=211560 |
| |
| Reviewed by Eric Carlson. |
| |
| When the audio description is updated, the audio renderer is creating a new AudioSampleDataSource. |
| The refing of the source in the render method is not sufficient to protect agains the change. |
| For that purpose, we keep a separate reference to the source that is only used in the render method/render thread. |
| We add a boolean that tells the render method whether to update its source reference. |
| As long as the source reference is not updated, no new source will be created n the method processing the pushed samples. |
| |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: |
| (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::render): |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h: |
| |
| 2020-05-07 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for crash in AXIsolatedObject::identifierAttribute. |
| https://bugs.webkit.org/show_bug.cgi?id=211565 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| When adding the identifierAttribute property to the AXIsolatedObject's |
| properties map, must make an isolatedCopy of it in order to retrieve it |
| on the secondary thread. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| |
| 2020-05-07 Antti Koivisto <antti@apple.com> |
| |
| Add basic support for generating accurate wheel event listener region |
| https://bugs.webkit.org/show_bug.cgi?id=211512 |
| |
| Reviewed by Simon Fraser. |
| |
| Add fake properties for wheel event listeners to RenderStyle and use them to |
| generate regions in EventRegion. There is a separate region for non-passive |
| wheel event listeners (that will require synchronous handling). |
| |
| The generated regions are not used for anything in this patch. |
| Style is not yet invalided on event listener additions and removals. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-basic.html |
| |
| * dom/Node.h: |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::unite): |
| (WebCore::EventRegion::uniteEventListeners): |
| (WebCore::EventRegion::dump const): |
| * rendering/EventRegion.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateEventRegion): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::eventListenerRegionTypes const): |
| (WebCore::RenderStyle::setEventListenerRegionTypes): |
| * rendering/style/RenderStyleConstants.h: |
| * rendering/style/StyleRareInheritedData.cpp: |
| (WebCore::StyleRareInheritedData::StyleRareInheritedData): |
| (WebCore::StyleRareInheritedData::operator== const): |
| * rendering/style/StyleRareInheritedData.h: |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::computeEventListenerRegionTypes): |
| (WebCore::Style::Adjuster::adjust const): |
| |
| 2020-05-07 Youenn Fablet <youenn@apple.com> |
| |
| Sending WebRTC network packets should not go through the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=211291 |
| |
| Reviewed by Eric Carlson. |
| |
| Covered by existing tests. |
| |
| * Modules/mediastream/PeerConnectionBackend.cpp: |
| (WebCore::PeerConnectionBackend::filterSDP const): |
| Fix a case where the SDP would be badly formatted if we do not have yet a MDNS name for the corresponding IP address. |
| Small refactoring to use early returns. |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: |
| (WebCore::LibWebRTCProvider::getStaticFactoryAndThreads): |
| * platform/mediastream/libwebrtc/LibWebRTCProvider.h: |
| Add the ability for WebKit LibWebRTCProvider to do some processing on creation of the RTC threads. |
| |
| 2020-05-06 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Implement simulateUserActivation() |
| https://bugs.webkit.org/show_bug.cgi?id=211516 |
| |
| Reviewed by Youenn Fablet. |
| |
| simulateUserActivation() is the method used by the WebXR Test API to |
| mock a user activation and thus let WebXR API think that the user is |
| behind the request that is going to be made in the function passed as |
| argument. |
| |
| No new tests added as the imported WebXR web-platform-tests already make |
| use of this API. |
| |
| * testing/WebXRTest.cpp: |
| (WebCore::WebXRTest::simulateUserActivation): Implemented. |
| * testing/WebXRTest.h: Added Document parameter. |
| * testing/WebXRTest.idl: Call with Document. |
| * testing/XRSimulateUserActivationFunction.h: Removed function params. |
| * testing/XRSimulateUserActivationFunction.idl: Ditto. |
| |
| 2020-05-06 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> and Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| [Win] Implement DisplayRefreshMonitor by using RunLoop::Timer |
| https://bugs.webkit.org/show_bug.cgi?id=211431 |
| |
| Reviewed by Don Olmstead. |
| |
| * PlatformWin.cmake: |
| * platform/graphics/DisplayRefreshMonitor.cpp: |
| (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor): |
| * platform/graphics/win/DisplayRefreshMonitorWin.cpp: Added. |
| (WebCore::DisplayRefreshMonitorWin::create): |
| (WebCore::DisplayRefreshMonitorWin::DisplayRefreshMonitorWin): |
| (WebCore::DisplayRefreshMonitorWin::requestRefreshCallback): |
| (WebCore::DisplayRefreshMonitorWin::displayLinkFired): |
| * platform/graphics/win/DisplayRefreshMonitorWin.h: Added. |
| |
| 2020-05-06 Zalan Bujtas <zalan@apple.com> |
| |
| [ContentObservation] Shutterstock search bar is not activated on the first tap |
| https://bugs.webkit.org/show_bug.cgi?id=211529 |
| <rdar://problem/58843932> |
| |
| Reviewed by Simon Fraser. |
| |
| * page/Quirks.cpp: |
| (WebCore::Quirks::shouldIgnoreContentObservationForSyntheticClick const): |
| * page/Quirks.h: |
| |
| 2020-05-06 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in indentOutdentCommand::formatRange with asynchronous commands: indent and insert list. |
| https://bugs.webkit.org/show_bug.cgi?id=211466 |
| <rdar://problem/62845430> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Check for null outerBlock returned by splitTreeToNode and bail out. |
| |
| Test: fast/editing/indent-then-insertUL-crash.html |
| |
| * editing/IndentOutdentCommand.cpp: |
| (WebCore::IndentOutdentCommand::indentIntoBlockquote): |
| |
| 2020-05-06 Darin Adler <darin@apple.com> |
| |
| Make a helper for the pattern of ICU functions that may need to be called twice to populate a buffer |
| https://bugs.webkit.org/show_bug.cgi?id=211499 |
| |
| Reviewed by Ross Kirsling. |
| |
| * editing/TextIterator.cpp: |
| (WebCore::normalizeCharacters): Use callBufferProducingFunction. |
| |
| 2020-05-06 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r261056): [ Mac WK1 ] inspector/console/console-api.html is flaky crashing |
| https://bugs.webkit.org/show_bug.cgi?id=211386 |
| |
| Reviewed by Tim Horton. |
| |
| This bug was caused by the failure to clear the delegate on an NSScrollerImp when, for testing, |
| we flip between the native scrollbar theme, and the mock scrollbar theme. |
| |
| The crux of the fix is to have ScrollAnimatorMac's scrollerImpForScrollbar() call a |
| static function on ScrollbarThemeMac to get the painters, rather than going through |
| the possibly-null ScrollbarThemeMac instance. |
| |
| A belt-and-braces fix in ScrollbarThemeMac::unregisterScrollbar() always clears the delegate |
| on the NSScrollerImp when unregistering a scrollbar. |
| |
| Finally, modernize code in various places. |
| |
| * platform/mac/ScrollAnimatorMac.mm: |
| (WebCore::scrollerImpForScrollbar): |
| (WebCore::ScrollAnimatorMac::updateScrollerStyle): |
| * platform/mac/ScrollbarThemeMac.h: |
| * platform/mac/ScrollbarThemeMac.mm: |
| (WebCore::scrollbarMap): |
| (+[WebScrollbarPrefsObserver appearancePrefsChanged:]): |
| (WebCore::ScrollbarThemeMac::registerScrollbar): |
| (WebCore::ScrollbarThemeMac::unregisterScrollbar): |
| (WebCore::ScrollbarThemeMac::setNewPainterForScrollbar): |
| (WebCore::ScrollbarThemeMac::painterForScrollbar): |
| (WebCore::ScrollbarThemeMac::hasThumb): |
| (WebCore::ScrollbarThemeMac::minimumThumbLength): |
| (WebCore::ScrollbarThemeMac::updateEnabledState): |
| (WebCore::ScrollbarThemeMac::paint): |
| |
| 2020-05-06 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in InsertListCommand::doApply with user-select:none elements |
| https://bugs.webkit.org/show_bug.cgi?id=211534 |
| <rdar://problem/62898521> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Check for empty position in InsertListCommand::doApply when searching for the start of |
| last paragraph in the selected range. Skip listifying individual paragraphs in the range. |
| |
| Test: editing/inserting/insert-list-user-select-none-crash.html |
| |
| * editing/InsertListCommand.cpp: |
| (WebCore::InsertListCommand::doApply): |
| |
| 2020-05-06 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r261239. |
| |
| Caused fast/events/wheel-event-outside-body.html to assert on |
| macOS WK1 |
| |
| Reverted changeset: |
| |
| "Add basic support for generating accurate wheel event |
| listener region" |
| https://bugs.webkit.org/show_bug.cgi?id=211512 |
| https://trac.webkit.org/changeset/261239 |
| |
| 2020-05-06 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r260684): Reader background is lost after multitasking |
| https://bugs.webkit.org/show_bug.cgi?id=211533 |
| <rdar://problem/62941837> |
| |
| Unreviewed, revert r260684 due to regression. |
| |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::fireEventListeners): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::sendResizeEventIfNeeded): |
| * page/Page.h: |
| (WebCore::Page::shouldFireResizeEvents const): |
| (WebCore::Page::setShouldFireResizeEvents): |
| |
| 2020-05-06 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Implement accessibility of HTML 5.1 Drag & Drop |
| https://bugs.webkit.org/show_bug.cgi?id=211415 |
| <rdar://problem/22695531> |
| |
| Reviewed by Joanmarie Diggs. |
| Support HTML5 drag and drop. Support dropzone attribute. |
| Add new notifications for VoiceOver to consume. |
| |
| It appears that most of the dragging tests are skipped because of eventSender issues. |
| I think this test could do a little more if those issues were resolved. Specifically, not all |
| the notifications are seen that are expected. |
| |
| Test: accessibility/mac/draggable.html |
| |
| * accessibility/AXObjectCache.h: |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::supportsARIAAttributes const): |
| (WebCore::AccessibilityObject::isAXHidden const): |
| * accessibility/AccessibilityObject.h: |
| * accessibility/AccessibilityObjectInterface.h: |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::supportsDropping const): |
| (WebCore::AccessibilityRenderObject::supportsDragging const): |
| (WebCore::AccessibilityRenderObject::isGrabbed): |
| (WebCore::AccessibilityRenderObject::determineDropEffects): |
| (WebCore::AccessibilityRenderObject::supportsARIADropping const): Deleted. |
| (WebCore::AccessibilityRenderObject::supportsARIADragging const): Deleted. |
| (WebCore::AccessibilityRenderObject::isARIAGrabbed): Deleted. |
| (WebCore::AccessibilityRenderObject::determineARIADropEffects): Deleted. |
| * accessibility/AccessibilityRenderObject.h: |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| * accessibility/mac/AXObjectCacheMac.mm: |
| (WebCore::AXObjectCache::postPlatformNotification): |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| * html/HTMLAttributeNames.in: |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::dispatchDragEvent): |
| (WebCore::EventHandler::draggingElement const): |
| * page/EventHandler.h: |
| |
| 2020-05-06 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Cut and paste from Google Doc to Notes in several (non-Latin) languages doesn't work |
| https://bugs.webkit.org/show_bug.cgi?id=211498 |
| <rdar://problem/56675345> |
| |
| Reviewed by Darin Adler. |
| |
| When copying text in Google Docs, the page uses `DataTransfer.setData` to write text/html data to the system |
| pasteboard. This markup string includes a meta tag with `charset="utf-8"`, indicating that the HTML string that |
| was copied should be interpreted as UTF-8 data. |
| |
| However, before we write this data to the system pasteboard, we first sanitize it by loading it in a separate |
| page, and then build the final sanitized markup string to write by iterating over only visible content in the |
| main document of this page. Importantly, this last step skips over the meta element containing the charset. |
| |
| Later, when pasting in Notes or TextEdit, both apps use `-[NSAttributedString initWithData:...:]` to convert the |
| HTML data on the pasteboard into an NSAttributedString. This takes the NSPasteboard's HTML data (a blob of |
| `NSData`) and synchronously loads it in a new legacy WebKit view by calling `-[WebFrame |
| loadData:MIMEType:textEncodingName:baseURL:]`, passing in `nil` as the text encoding name. Since WebKit is only |
| given a blob of data and no particular encoding, we fall back to default Latin-1 encoding, which produces |
| gibberish for CJK text. |
| |
| To fix this, we automatically insert a `<meta charset="utf-8">` tag when writing HTML to the pasteboard, if the |
| sanitized markup contains non-ASCII characters. |
| |
| Test: CopyHTML.SanitizationPreservesCharacterSet |
| |
| * Modules/async-clipboard/ClipboardItemBindingsDataSource.cpp: |
| (WebCore::ClipboardItemBindingsDataSource::ClipboardItemTypeLoader::sanitizeDataIfNeeded): |
| |
| Pass in AddMetaCharsetIfNeeded::Yes. |
| |
| * dom/DataTransfer.cpp: |
| (WebCore::DataTransfer::setDataFromItemList): |
| |
| Pass in AddMetaCharsetIfNeeded::Yes here too. |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::sanitizeMarkupWithArchive): |
| (WebCore::WebContentReader::readHTML): |
| (WebCore::WebContentMarkupReader::readHTML): |
| * editing/markup.cpp: |
| (WebCore::sanitizeMarkup): |
| |
| Add a new enum so that we only add the extra meta tag when sanitizing content that is being written to the |
| system pasteboard through one of the clipboard DOM APIs. |
| |
| (WebCore::sanitizedMarkupForFragmentInDocument): |
| * editing/markup.h: |
| |
| 2020-05-06 Tim Horton <timothy_horton@apple.com> |
| |
| REGRESSION (r260753): Frequent crashes under TextIndicator's estimatedTextColorsForRange |
| https://bugs.webkit.org/show_bug.cgi?id=211523 |
| <rdar://problem/62860203> |
| |
| Reviewed by Darin Adler. |
| |
| * page/TextIndicator.cpp: |
| (WebCore::estimatedTextColorsForRange): |
| TextIterator's node() getter can return null. r260753 accidentally refactored away the null check. |
| |
| 2020-05-06 John Wilander <wilander@apple.com> |
| |
| Exempt app-bound domains from ITP's website data deletion and third-party cookie blocking between themselves |
| https://bugs.webkit.org/show_bug.cgi?id=210674 |
| <rdar://problem/61950767> |
| |
| Reviewed by Chris Dumez. |
| |
| This change adds functionality to NetworkStorageSession to allow it to exempt |
| app-bound domains from third-party cookie blocking. |
| |
| Tests: http/tests/resourceLoadStatistics/exemptDomains/app-bound-domains-exempt-from-cookie-blocking-between-each-other.html |
| http/tests/resourceLoadStatistics/exemptDomains/app-bound-domains-exempt-from-website-data-deletion-database.html |
| http/tests/resourceLoadStatistics/exemptDomains/app-bound-domains-exempt-from-website-data-deletion.html |
| |
| * platform/network/NetworkStorageSession.cpp: |
| (WebCore::NetworkStorageSession::shouldBlockCookies const): |
| (WebCore::NetworkStorageSession::shouldExemptDomainPairFromThirdPartyCookieBlocking const): |
| (WebCore::NetworkStorageSession::setAppBoundDomains): |
| (WebCore::NetworkStorageSession::resetAppBoundDomains): |
| * platform/network/NetworkStorageSession.h: |
| |
| 2020-05-06 Antti Koivisto <antti@apple.com> |
| |
| Add basic support for generating accurate wheel event listener region |
| https://bugs.webkit.org/show_bug.cgi?id=211512 |
| |
| Reviewed by Simon Fraser. |
| |
| Add fake properties for wheel event listeners to RenderStyle and use them to |
| generate regions in EventRegion. There is a separate region for non-passive |
| wheel event listeners (that will require synchronous handling). |
| |
| The generated regions are not used for anything in this patch. |
| Style is not yet invalided on event listener additions and removals. |
| |
| Test: fast/scrolling/mac/wheel-event-listener-region-basic.html |
| |
| * dom/Node.h: |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegion::unite): |
| (WebCore::EventRegion::uniteEventListeners): |
| (WebCore::EventRegion::dump const): |
| * rendering/EventRegion.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateEventRegion): |
| * rendering/style/RenderStyle.h: |
| (WebCore::RenderStyle::eventListenerRegionTypes const): |
| (WebCore::RenderStyle::setEventListenerRegionTypes): |
| * rendering/style/RenderStyleConstants.h: |
| * rendering/style/StyleRareInheritedData.cpp: |
| (WebCore::StyleRareInheritedData::StyleRareInheritedData): |
| (WebCore::StyleRareInheritedData::operator== const): |
| * rendering/style/StyleRareInheritedData.h: |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::computeEventListenerRegionTypes): |
| (WebCore::Style::Adjuster::adjust const): |
| |
| 2020-05-06 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded USE(GRAMMAR_CHECKING) |
| https://bugs.webkit.org/show_bug.cgi?id=211452 |
| |
| Reviewed by Anders Carlsson. |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::advanceToNextMisspelling): Remove USE(GRAMMAR_CHECKING). |
| (WebCore::Editor::isSelectionUngrammatical): Ditto. |
| (WebCore::Editor::markMisspellingsOrBadGrammar): Ditto. |
| (WebCore::Editor::markBadGrammar): Ditto. |
| * editing/TextCheckingHelper.cpp: |
| (WebCore::TextCheckingHelper::markAllBadGrammar): Ditto. |
| (WebCore::checkTextOfParagraph): Ditto. Also correct misspelling of the |
| word "misspelling". |
| * editing/TextCheckingHelper.h: Ditto. |
| |
| 2020-05-06 Devin Rousso <drousso@apple.com> |
| |
| ASSERT_WITH_MESSAGE(m_isOwnedByMainThread == isMainThread()) when web inspecting |
| https://bugs.webkit.org/show_bug.cgi?id=203638 |
| <rdar://problem/56761893> |
| |
| Reviewed by Brian Burg. |
| |
| Mark the `InspectorEnvironment::executionStopwatch` abstract function as `const` and have it |
| return a `Stopwatch&` instead of a `RefPtr<Stopwatch>&` as callers assume that it exists. |
| By not using a `RefPtr`, an additional `copyRef` can be avoided. |
| |
| * inspector/InspectorController.h: |
| * inspector/InspectorController.cpp: |
| (WebCore::InspectorController::executionStopwatch const): Added. |
| (WebCore::InspectorController::executionStopwatch): Deleted. |
| * inspector/WorkerInspectorController.h: |
| (WebCore::WorkerInspectorController::executionStopwatch const): Added. |
| (WebCore::WorkerInspectorController::executionStopwatch): Deleted. |
| |
| * inspector/agents/InspectorAnimationAgent.cpp: |
| (WebCore::InspectorAnimationAgent::startTracking): |
| (WebCore::InspectorAnimationAgent::stopTracking): |
| (WebCore::InspectorAnimationAgent::willApplyKeyframeEffect): |
| (WebCore::InspectorAnimationAgent::stopTrackingDeclarativeAnimation): |
| * inspector/agents/InspectorCPUProfilerAgent.cpp: |
| (WebCore::InspectorCPUProfilerAgent::startTracking): |
| (WebCore::InspectorCPUProfilerAgent::stopTracking): |
| (WebCore::InspectorCPUProfilerAgent::collectSample): |
| * inspector/agents/InspectorDOMAgent.cpp: |
| (WebCore::InspectorDOMAgent::mediaMetricsTimerFired): |
| * inspector/agents/InspectorMemoryAgent.cpp: |
| (WebCore::InspectorMemoryAgent::startTracking): |
| (WebCore::InspectorMemoryAgent::stopTracking): |
| (WebCore::InspectorMemoryAgent::didHandleMemoryPressure): |
| (WebCore::InspectorMemoryAgent::collectSample): |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::buildObjectForTiming): |
| (WebCore::InspectorNetworkAgent::timestamp): |
| (WebCore::InspectorNetworkAgent::didFinishLoading): |
| * inspector/agents/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::enable): |
| (WebCore::InspectorPageAgent::timestamp): |
| * inspector/agents/InspectorTimelineAgent.cpp: |
| (WebCore::InspectorTimelineAgent::timestamp): |
| |
| 2020-05-06 Darin Adler <darin@apple.com> |
| |
| Eliminate checks of USE(DICTATION_ALTERNATIVES) in Cocoa-specific code |
| https://bugs.webkit.org/show_bug.cgi?id=211460 |
| |
| Reviewed by Anders Carlsson. |
| |
| * editing/cocoa/AlternativeTextContextController.h: Remove USE(DICTATION_ALTERNATIVES). |
| Also remove unnecessary use of RetainPtr and add a FIXME. Also remove #pragma once |
| since this header is only imported from Objective-C++ sources. |
| * editing/cocoa/AlternativeTextContextController.mm: Ditto. |
| * editing/cocoa/AlternativeTextUIController.h: Ditto. |
| * editing/cocoa/AlternativeTextUIController.mm: Ditto. |
| * editing/mac/TextAlternativeWithRange.h: Ditto. |
| * editing/mac/TextAlternativeWithRange.mm: Ditto. |
| |
| 2020-05-06 Simon Fraser <simon.fraser@apple.com> |
| |
| Factor EventHandler code that sends mouseEnteredContentArea/mouseExitedContentArea into its own function |
| https://bugs.webkit.org/show_bug.cgi?id=211494 |
| |
| Reviewed by Antti Koivisto. |
| |
| mouseEnteredContentArea/mouseEnteredContentArea are used only to notify overlay scrollbars |
| of state changes. Factor the code that calls these functions into a separate EventHandler |
| function, and refactor it for clarity, now we know that both lastElementUnderMouse and elementUnderMouse |
| must belong to this EventHandler's Frame's Document. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::updateMouseEventTargetNode): |
| (WebCore::EventHandler::notifyScrollableAreasOfMouseEnterExit): |
| * page/EventHandler.h: |
| |
| 2020-05-06 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] BlockFormattingContext::computeHeightAndMargin should special case the table box |
| https://bugs.webkit.org/show_bug.cgi?id=211493 |
| |
| Reviewed by Antti Koivisto. |
| |
| By the time we get to BlockFormattingContext::computeHeightAndMargin(), the used valued for the table height is already been computed. |
| (Table box height is mostly content driven, and both the computed height and the min/max pair are taken into account |
| while we are laying out the table content). |
| |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin): |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin): |
| |
| 2020-05-06 Antoine Quint <graouts@apple.com> |
| |
| Add watchOS media controls assets |
| https://bugs.webkit.org/show_bug.cgi?id=211508 |
| <rdar://problem/62926565> |
| |
| Reviewed by Eric Carlson. |
| |
| * Modules/modern-media-controls/images/watchOS/ActivityIndicatorSpriteCompact@2x.png: Added. |
| * Modules/modern-media-controls/images/watchOS/InvalidCompact.pdf: Added. |
| * Modules/modern-media-controls/images/watchOS/PlayCompact.pdf: Added. |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2020-05-06 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][BFC] FormattingContext::ConstraintsForInFlowContent should include the computed value of height |
| https://bugs.webkit.org/show_bug.cgi?id=211487 |
| |
| Reviewed by Antti Koivisto. |
| |
| When the formatting context root has fixed height, the computed value should be passed in to the formatting context layout |
| as the available vertical space. |
| |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::constraintsForInFlowContent): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| |
| 2020-04-29 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Implement isSessionSupported() |
| https://bugs.webkit.org/show_bug.cgi?id=211187 |
| |
| Reviewed by Dean Jackson. |
| |
| The isSessionSupported() method queries if a given mode may be supported |
| by the UA and device capabilities. Apart from the needed machinery in |
| the webxr Module we're adding an OpenXR implementation of the |
| enumerateImmersiveXRDevices() method required by isSessionSupported(). |
| |
| The method is not completely implemented as it lacks a few action at its |
| very end, like firing events. They'll be implemented in follow up |
| patches as they require additional changes. |
| |
| Some OpenXR runtimes as Monado always enumerate at least one device even |
| if none is connected. This dummy device might interfere with tests |
| execution (as there will be more devices than expected) so we're adding |
| a testMode to WebXRSystem which does not query platform for existing |
| devices. |
| |
| Added expected results and unskipped some WPT that are now passing. |
| |
| * Modules/webxr/WebXRSystem.cpp: |
| (WebCore::WebXRSystem::ensureImmersiveXRDeviceIsSelected): Asks platform |
| code for the list of attached XR devices and properly set the active |
| immersive device if any. |
| (WebCore::WebXRSystem::isSessionSupported): Partially implemented. |
| (WebCore::WebXRSystem::registerSimulatedXRDeviceForTesting): Set the |
| passed in mock device as either the current active immersive or inline |
| device. |
| (WebCore::WebXRSystem::unregisterSimulatedXRDeviceForTesting): Removes |
| the passed in mock device from the list of immersive devices. |
| * Modules/webxr/WebXRSystem.h: |
| * html/FeaturePolicy.cpp: |
| (WebCore::policyTypeName): Handle XRSpatialTracking. |
| (WebCore::FeaturePolicy::parse): Parse "xr-spatial-tracking". |
| (WebCore::FeaturePolicy::allows const): Handle XRSpatialTracking. |
| * html/FeaturePolicy.h: Added XRSpatialTracking. |
| * platform/xr/PlatformXR.h: |
| (PlatformXR::Instance::immersiveXRDevices const): Keep a list of immersive devices. |
| * platform/xr/openxr/PlatformXR.cpp: |
| (PlatformXR::Instance::Impl::collectSupportedSessionModes): Gather supported session |
| modes for a given device from OpenXR. |
| (PlatformXR::Instance::enumerateImmersiveXRDevices): Collect devices from OpenXR. We |
| are currently asking for HMD devices. |
| |
| 2020-05-06 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Coordinate "update animations and send events" procedure across multiple timelines |
| https://bugs.webkit.org/show_bug.cgi?id=202109 |
| |
| Unreviewed. |
| |
| Remove an unused function. |
| |
| * animation/AnimationTimeline.h: |
| (WebCore::AnimationTimeline::allAnimations const): Deleted. |
| |
| 2020-05-05 Antoine Quint <graouts@apple.com> |
| |
| Fix animation ordering to make imported/w3c/web-platform-tests/css/css-animations/Element-getAnimations.tentative.html pass |
| https://bugs.webkit.org/show_bug.cgi?id=211468 |
| <rdar://problem/62732578> |
| |
| Reviewed by David Kilzer. |
| |
| The "Animation composite order" section of the CSS Animations Level 2 specification (https://drafts.csswg.org/css-animations-2/#animation-composite-order) |
| defines the relative composite order of animations. We bake this into compareAnimationsByCompositeOrder(), but this function would not yield consistent |
| results if it is called in a non-stable sort, because if both CSSAnimation objects passed to this function have the same backing Animation object, they |
| would not return the same value if passed in a different order. The Web Animations spec always ensures that procedures that sort using the composite |
| order are called as part of a stable sort. So we change all call sites to use std::stable_sort and add an assertion in case we have two CSSAnimation |
| objects with the same backing Animation objects to catch cases like this in the future. |
| |
| Finally, since we already know only relevant animations can find their way into the output of Document::getAnimations(), we also ensure we iterate over |
| m_animations (which holds only relevant animations) rather than m_allAnimations (which may not). |
| |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::getAnimations const): |
| * animation/KeyframeEffectStack.cpp: |
| (WebCore::KeyframeEffectStack::ensureEffectsAreSorted): |
| * animation/WebAnimationUtilities.cpp: |
| (WebCore::compareAnimationsByCompositeOrder): |
| |
| 2020-05-05 Simon Fraser <simon.fraser@apple.com> |
| |
| EventHandler::dispatchMouseEvent() cleanup |
| https://bugs.webkit.org/show_bug.cgi?id=211491 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Replace the last bool argument with FireMouseOverOut, and remove the "cancelable" argument that was unused. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::handleMousePressEvent): |
| (WebCore::EventHandler::handleMouseDoubleClickEvent): |
| (WebCore::EventHandler::handleMouseMoveEvent): |
| (WebCore::EventHandler::handleMouseReleaseEvent): |
| (WebCore::EventHandler::handleMouseForceEvent): |
| (WebCore::EventHandler::dispatchMouseEvent): |
| (WebCore::EventHandler::sendContextMenuEvent): |
| * page/EventHandler.h: |
| |
| 2020-05-05 Rob Buis <rbuis@igalia.com> |
| |
| Fix setting host on URL when no port is specified |
| https://bugs.webkit.org/show_bug.cgi?id=211453 |
| |
| Reviewed by Darin Adler. |
| |
| Behavior matches Firefox and Chrome. |
| |
| Test: web-platform-tests/url/url-setters.html |
| |
| * html/URLDecomposition.cpp: |
| (WebCore::URLDecomposition::setHost): |
| |
| 2020-05-05 Simon Fraser <simon.fraser@apple.com> |
| |
| Minor EventHandler and test cleanup |
| https://bugs.webkit.org/show_bug.cgi?id=211475 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Now that we assert that m_elementUnderMouse and m_lastElementUnderMouse are either null |
| or in this EventHandler's document, we can remove the document comparisons (but this code |
| is probably wrong as well). |
| |
| Fix enclosingScrollableArea(), which would return any RenderLayer, but should only |
| return scrollable ones, and should only return scrollable RenderListBoxes. |
| |
| * page/EventHandler.cpp: |
| (WebCore::enclosingScrollableArea): |
| (WebCore::EventHandler::updateMouseEventTargetNode): |
| |
| 2020-05-05 David Kilzer <ddkilzer@apple.com> |
| |
| Fix deprecated NSGraphicsContext methods using 'graphicsPort' |
| <https://webkit.org/b/211481> |
| |
| Reviewed by Darin Adler. |
| |
| - Replace uses of -graphicsPort with -CGContext. |
| - Replace uses of -graphicsContextWithGraphicsPort:flipped: with |
| -graphicsContextWithCGContext:flipped:. |
| - Remove ALLOW_DEPRECATED_DECLARATIONS_{BEGIN,END} if possible. |
| |
| * platform/cocoa/DragImageCocoa.mm: |
| (WebCore::createDragImageForLink): |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: |
| (WebCore::PlatformCALayer::drawLayerContents): |
| * platform/mac/ThemeMac.mm: |
| (WebCore::drawCellFocusRingWithFrameAtTime): |
| * platform/mac/WidgetMac.mm: |
| (WebCore::Widget::paint): |
| |
| 2020-05-05 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Crash in match_constness<WebCore::CSSValue, WebCore::CSSPrimitiveValue>::type& WTF::downcast<WebCore::CSSPrimitiveValue, WebCore::CSSValue> -- ASAN |
| https://bugs.webkit.org/show_bug.cgi?id=211479 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Added check to downcast CSSValue to CSSPrimitiveValue, only if valid CSSPrimitveValue is associated with the property. |
| |
| New test would be added to Internal repository. |
| |
| * css/StyleProperties.cpp: |
| (WebCore::StyleProperties::pageBreakPropertyValue const): |
| |
| 2020-05-05 Peng Liu <peng.liu6@apple.com> |
| |
| Update WebKitTestRunner to support running multiple video fullscreen and Picture-in-Picture tests simultaneously |
| https://bugs.webkit.org/show_bug.cgi?id=203723 |
| |
| Reviewed by Jer Noble. |
| |
| Test: media/video-presentation-mode.html |
| |
| Add a flag MockVideoPresentationModeEnabled to "internals" for video fullscreen |
| and picture-in-picture tests. |
| |
| * page/ChromeClient.h: |
| (WebCore::ChromeClient::setMockVideoPresentationModeEnabled): |
| * testing/Internals.cpp: |
| (WebCore::Internals::setMockVideoPresentationModeEnabled): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-05 Darin Adler <darin@apple.com> |
| |
| Remove HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT) |
| https://bugs.webkit.org/show_bug.cgi?id=211461 |
| |
| Reviewed by Eric Carlson. |
| |
| * PlatformMac.cmake: Removed InbandTextTrackPrivateLegacyAVFObjC.mm. |
| * SourcesCocoa.txt: Ditto. |
| * WebCore.xcodeproj/project.pbxproj: Ditto, also the header. |
| * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.h: Removed. |
| * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm: Removed. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| Removed HAVE(AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT). Also moved data member |
| initialization to the class definition, made more things private and final, |
| made outputObscuredDueToInsufficientExternalProtectionChanged unconditional, |
| changed friend class MediaPlayerFactoryAVFoundationObjC into member class |
| MediaPlayerPrivateAVFoundationObjC::Factory, removed unused removeSession function, |
| and tweaked conditionals. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| Removed import of InbandTextTrackPrivateLegacyAVFObjC.h. Moved data member |
| initialization to the class definition. Moved include of BinarySemaphore here. |
| |
| 2020-05-05 Simon Fraser <simon.fraser@apple.com> |
| |
| Assert that EventHandler only tracks event target nodes in its own document |
| https://bugs.webkit.org/show_bug.cgi?id=211462 |
| |
| Reviewed by Zalan Bujtas. |
| |
| EventHandler is per-Frame, so should not track Nodes from different documents. However, it did so |
| by mistake if an event handler moved a node between documents. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::updateMouseEventTargetNode): |
| * rendering/HitTestResult.cpp: |
| (WebCore::HitTestResult::targetNode const): |
| |
| 2020-05-05 Antti Koivisto <antti@apple.com> |
| |
| Factor RenderLayerBacking::updateEventRegion skip conditions into a lambda |
| https://bugs.webkit.org/show_bug.cgi?id=211450 |
| |
| Reviewed by Simon Fraser. |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateEventRegion): |
| |
| 2020-05-05 Chris Dumez <cdumez@apple.com> |
| |
| Drop code path using the legacy CFNetwork cookie change notification SPI |
| https://bugs.webkit.org/show_bug.cgi?id=211411 |
| <rdar://problem/62869148> |
| |
| Reviewed by John Wilander. |
| |
| * platform/network/cocoa/NetworkStorageSessionCocoa.mm: |
| (WebCore::NetworkStorageSession::registerCookieChangeListenersIfNecessary): |
| (WebCore::NetworkStorageSession::unregisterCookieChangeListenersIfNecessary): |
| (WebCore::NetworkStorageSession::supportsCookieChangeListenerAPI const): |
| |
| 2020-05-05 Timothy Horton <timothy_horton@apple.com> |
| |
| "Essential Skeleton" does not respond to mouse events, only touch events |
| https://bugs.webkit.org/show_bug.cgi?id=211439 |
| <rdar://problem/62694519> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * platform/RuntimeApplicationChecks.h: |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::IOSApplication::isEssentialSkeleton): |
| |
| 2020-05-05 Megan Gardner <megan_gardner@apple.com> |
| |
| Style is not applied when changed on the first line of a new mail message. |
| https://bugs.webkit.org/show_bug.cgi?id=211200 |
| <rdar://problem/62087514> |
| |
| Reviewed by Darin Adler. |
| |
| After r257487 when we resign first responder, we immediatly |
| update activity state. This means that if we resign first responder, and then |
| become first responder, we are clearing the selection if the caret is at the beginning |
| of the document, due to a check in setSelectionFromNone. This check was originally added |
| in 2006 because it happened to fix <rdar://problem/4483145>. Removing this check and |
| merging the iOS and Mac logic. |
| |
| Test: editing/execCommand/ios/first-line-text-attribute-change-presist-through-resigning-first-responder.html |
| |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::setSelectionFromNone): |
| |
| 2020-05-05 Rob Buis <rbuis@igalia.com> |
| |
| A URL cannot have a username/password/port if its host is null |
| https://bugs.webkit.org/show_bug.cgi?id=211358 |
| |
| Reviewed by Darin Adler. |
| |
| A URL cannot have a username/password/port if its host is null [1], so |
| adjust URL.cpp accordingly. |
| |
| Behavior matches Chrome and Firefox. |
| |
| [1] https://url.spec.whatwg.org/#cannot-have-a-username-password-port |
| |
| * html/URLDecomposition.cpp: |
| (WebCore::URLDecomposition::setUsername): |
| (WebCore::URLDecomposition::setPassword): |
| (WebCore::URLDecomposition::setPort): |
| |
| 2020-05-05 Youenn Fablet <youenn@apple.com> |
| |
| MediaPlayerPrivateMediaStreamAVFObjC should unobserve the tracks from its audio and video track sets |
| https://bugs.webkit.org/show_bug.cgi?id=211444 |
| <rdar://problem/62886221> |
| |
| Reviewed by Eric Carlson. |
| |
| Test: fast/mediastream/MediaStream-removeTrack-while-playing.html |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC): |
| We keep maps of audio and video tracks we are observing. |
| Use these two maps to properly unobserve all tracks at destruction time. |
| While this is not strictly needed since we are using weak pointers, this helps keeping the code healthy. |
| * platform/mediastream/MediaStreamTrackPrivate.cpp: |
| (WebCore::MediaStreamTrackPrivate::forEachObserver): |
| Add a debug ASSERT so that we ensure add/remove observers is done properly. |
| |
| 2020-05-05 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r261130. |
| |
| Caused crashes on some of our bots |
| |
| Reverted changeset: |
| |
| "Drop code path using the legacy CFNetwork cookie change |
| notification SPI" |
| https://bugs.webkit.org/show_bug.cgi?id=211411 |
| https://trac.webkit.org/changeset/261130 |
| |
| 2020-05-05 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded USE(COREMEDIA) and USE(VIDEOTOOLBOX) |
| https://bugs.webkit.org/show_bug.cgi?id=211437 |
| |
| Reviewed by Eric Carlson. |
| |
| * platform/cocoa/VideoToolboxSoftLink.cpp: Remove USE(VIDEOTOOLBOX). |
| * platform/cocoa/VideoToolboxSoftLink.h: Ditto. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer): Ditto. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Ditto. |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastImage): Ditto. |
| * platform/graphics/cocoa/WebCoreDecompressionSession.h: Ditto. Also remove |
| #pragma once since this header is only used with #import, not #include. |
| * platform/graphics/cocoa/WebCoreDecompressionSession.mm: Ditto. |
| * platform/graphics/cv/ImageRotationSessionVT.h: Ditto. |
| * platform/graphics/cv/ImageRotationSessionVT.mm: Ditto. |
| * platform/graphics/cv/ImageTransferSessionVT.h: Ditto. |
| * platform/graphics/cv/ImageTransferSessionVT.mm: Ditto. |
| * platform/graphics/cv/PixelBufferConformerCV.cpp: |
| (WebCore::PixelBufferConformerCV::PixelBufferConformerCV): Ditto. |
| (WebCore::PixelBufferConformerCV::convert): Ditto. |
| (WebCore::PixelBufferConformerCV::createImageFromPixelBuffer): Ditto. |
| * platform/graphics/cv/PixelBufferConformerCV.h: Ditto. |
| |
| 2020-05-05 Youenn Fablet <youenn@apple.com> |
| |
| Remove LegacySchemeRegistry::canServiceWorkersHandleURLScheme |
| https://bugs.webkit.org/show_bug.cgi?id=211170 |
| |
| Reviewed by Alex Christensen. |
| |
| Since we no longer use custom service worker schemes in API tests, |
| we no longer need custom schemes in web process, given they are not supported in network process anyway. |
| Remove related code. |
| |
| * Modules/cache/DOMWindowCaches.idl: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (NeedsRuntimeCheck): |
| (GenerateRuntimeEnableConditionalString): |
| * bindings/scripts/IDLAttributes.json: |
| * dom/ScriptExecutionContext.cpp: |
| (WebCore::ScriptExecutionContext::hasServiceWorkerScheme const): Deleted. |
| * dom/ScriptExecutionContext.h: |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::matchRegistration): |
| (WebCore::DocumentLoader::commitData): |
| * page/NavigatorServiceWorker.idl: |
| * platform/LegacySchemeRegistry.cpp: |
| (WebCore::serviceWorkerSchemes): Deleted. |
| (WebCore::LegacySchemeRegistry::registerURLSchemeServiceWorkersCanHandle): Deleted. |
| (WebCore::LegacySchemeRegistry::canServiceWorkersHandleURLScheme): Deleted. |
| (WebCore::LegacySchemeRegistry::isServiceWorkerContainerCustomScheme): Deleted. |
| * platform/LegacySchemeRegistry.h: |
| * workers/service/ServiceWorkerContainer.cpp: |
| (WebCore::ServiceWorkerContainer::addRegistration): |
| |
| 2020-05-05 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(DISALLOWABLE_USER_INSTALLED_FONTS) |
| https://bugs.webkit.org/show_bug.cgi?id=211428 |
| |
| Reviewed by Anders Carlsson. |
| |
| * platform/graphics/Font.h: Removed isUserInstalledFont, only used for |
| an assertion that I took the liberty of removing. |
| |
| * platform/graphics/FontCascadeFonts.cpp: |
| (WebCore::FontCascadeFonts::glyphDataForSystemFallback): Removed an |
| assertion since it was the only reason to introduce the concept of a |
| user-installed font to the cross-platform code. The assertion is a bit |
| of a self-check that doesn't seem critical. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontDatabase::singleton): Deleted. |
| (WebCore::FontDatabase::singletonAllowingUserInstalledFonts): Remove |
| HAVE(DISALLOWABLE_USER_INSTALLED_FONTS). |
| (WebCore::FontDatabase::singletonDisallowingUserInstalledFonts): Ditto. |
| (WebCore::isUserInstalledFont): Ditto. |
| (WebCore::addAttributesForInstalledFonts): Ditto. |
| (WebCore::isFontMatchingUserInstalledFontFallback): Ditto. |
| (WebCore::addAttributesForWebFonts): Ditto. |
| (WebCore::installedFontMandatoryAttributes): Ditto. |
| |
| * platform/graphics/mac/SimpleFontDataCoreText.cpp: |
| (WebCore::Font::isUserInstalledFont const): Deleted. |
| |
| 2020-05-05 Alicia Boya García <aboya@igalia.com> |
| |
| [GStreamer] Video loops when ran in rr record --chaos |
| https://bugs.webkit.org/show_bug.cgi?id=211182 |
| |
| Reviewed by Philippe Normand. |
| |
| While trying to investigate a different bug, I ran the browser with |
| `rr record --chaos`, which makes it run very slowly and shuffles |
| thread scheduling to try to make existing race conditions more likely |
| to show up, also inevitably making the software run very slow. |
| |
| Doing so I found something strange: the video kept looping even though |
| it didn't have the `loop` attribute set. |
| |
| After some debugging I found that MediaPlayer decides if the video has |
| ended in part by checking `currentMediaTime()` is greater or equal to |
| the video duration, which was not guaranteed to be the case in |
| MediaPlayerPrivateGStreamer. |
| |
| As a consequence of this patch, one new LayoutTest has passed. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::playbackPosition const): |
| |
| 2020-05-05 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] Rename computedContentHeight/Width to computedHeight/Width |
| https://bugs.webkit.org/show_bug.cgi?id=211432 |
| |
| Reviewed by Darin Adler. |
| |
| These functions used to return the computed content box height/width but with box-sizing |
| support the name is not correct anymore. |
| |
| * layout/FormattingContext.h: |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedHeight const): |
| (WebCore::Layout::FormattingContext::Geometry::computedWidth const): |
| (WebCore::Layout::FormattingContext::Geometry::computedMinHeight const): |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry const): |
| (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry): |
| (WebCore::Layout::FormattingContext::Geometry::complicatedCases const): |
| (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin): |
| (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin const): |
| (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin const): |
| (WebCore::Layout::FormattingContext::Geometry::computedContentHeight const): Deleted. |
| (WebCore::Layout::FormattingContext::Geometry::computedContentWidth const): Deleted. |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin): |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin const): |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin): |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::cellHeigh const): |
| (WebCore::Layout::TableFormattingContext::Geometry::computedColumnWidth const): |
| |
| 2020-05-05 Antoine Quint <graouts@apple.com> |
| |
| Unreviewed, reverting r260989. |
| |
| Mistakenly identified cause of MotionMark 1.1 performance regression |
| |
| Reverted changeset: |
| |
| "REGRESSION: MotionMark 1.1 regressed due to r260016" |
| https://bugs.webkit.org/show_bug.cgi?id=211280 |
| https://trac.webkit.org/changeset/260989 |
| |
| 2020-05-05 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| Object.prototype.toString is not spec-perfect |
| https://bugs.webkit.org/show_bug.cgi?id=199138 |
| |
| Reviewed by Darin Adler and Keith Miller. |
| |
| This patch defines @@toStringTag symbols for all WebIDL prototypes, including |
| interfaces that are not exposed, as required by the spec [1]. |
| |
| With updated JSObject::toStringName() and @@toStringTag symbols added in r260992, |
| className() and toStringName() methods of JSDOMConstructorBase can be safely removed. |
| |
| [1]: https://heycam.github.io/webidl/#dfn-class-string |
| |
| Tests: imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any.js |
| imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-iterator-prototype-object.any.js |
| |
| * bindings/js/JSDOMConstructorBase.cpp: |
| (WebCore::JSDOMConstructorBase::className): Deleted. |
| (WebCore::JSDOMConstructorBase::toStringName): Deleted. |
| * bindings/js/JSDOMConstructorBase.h: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| (GeneratePrototypeDeclaration): |
| * bindings/scripts/test/JS/JSTestGlobalObject.cpp: |
| (WebCore::JSTestGlobalObjectPrototype::finishCreation): |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| [Mac] Remove __MAC_OS_X_VERSION_MIN_REQUIRED checks for versions older than 10.14 |
| https://bugs.webkit.org/show_bug.cgi?id=211420 |
| |
| Reviewed by Alex Christensen. |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::detectItem): Remove __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400. |
| * editing/cocoa/HTMLConverter.mm: |
| (_WebMessageDocumentClass): Ditto. |
| * platform/graphics/cg/GraphicsContextCG.cpp: Ditto. |
| * platform/mac/WebCoreFullScreenPlaceholderView.mm: |
| (-[WebCoreFullScreenPlaceholderView initWithFrame:]): Ditto. |
| * platform/network/cocoa/CookieCocoa.mm: |
| (WebCore::nsSameSitePolicy): Ditto. |
| (WebCore::Cookie::operator NSHTTPCookie * _Nullable const): Ditto. |
| * platform/network/cocoa/NetworkStorageSessionCocoa.mm: |
| (WebCore::cookiesForURL): Ditto. |
| (WebCore::NetworkStorageSession::setHTTPCookiesForURL const): Ditto. |
| * platform/network/cocoa/ResourceRequestCocoa.mm: |
| (WebCore::ResourceRequest::doUpdateResourceRequest): Ditto. |
| (WebCore::siteForCookies): Ditto. |
| (WebCore::ResourceRequest::doUpdatePlatformRequest): Ditto. |
| * rendering/RenderThemeMac.mm: |
| (WebCore::RenderThemeMac::paintTextField): Ditto. |
| * testing/Internals.h: Ditto. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(NETWORK_EXTENSION) |
| https://bugs.webkit.org/show_bug.cgi?id=211424 |
| |
| Reviewed by Alex Christensen. |
| |
| * loader/ContentFilter.cpp: |
| (WebCore::ContentFilter::types): Remove check of HAVE(NETWORK_EXTENSION), |
| not needed because ENABLE(CONTENT_FILTER) is only done on Cocoa platforms, |
| and HAVE(NETWORK_EXTENSION) is true for all of those. |
| * platform/cocoa/NetworkExtensionContentFilter.mm: Ditto. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(SEC_TRUST_EVALUATE_WITH_ERROR) |
| https://bugs.webkit.org/show_bug.cgi?id=211429 |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/network/cocoa/ResourceResponseCocoa.mm: |
| (WebCore::ResourceResponse::platformCertificateInfo const): |
| Remove HAVE(SEC_TRUST_EVALUATE_WITH_ERROR). |
| |
| 2020-05-04 Simon Fraser <simon.fraser@apple.com> |
| |
| Code cleanup in EventHandler |
| https://bugs.webkit.org/show_bug.cgi?id=211413 |
| |
| Reviewed by Tim Horton. |
| |
| Use a better name for "hoveredNode" which is a HitTestResult. |
| |
| Convert Frame* to Frame&. |
| |
| Have a couple of helper functions return RefPtr<Frame>. |
| |
| * page/AutoscrollController.cpp: |
| (WebCore::AutoscrollController::stopAutoscrollTimer): |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::subframeForHitTestResult): |
| (WebCore::EventHandler::subframeForTargetNode): |
| (WebCore::EventHandler::handleMousePressEvent): |
| (WebCore::EventHandler::handleMouseDoubleClickEvent): |
| (WebCore::EventHandler::mouseMoved): |
| (WebCore::EventHandler::passMouseMovedEventToScrollbars): |
| (WebCore::EventHandler::handleMouseMoveEvent): |
| (WebCore::EventHandler::handleMouseReleaseEvent): |
| (WebCore::EventHandler::passMousePressEventToScrollbar): |
| (WebCore::EventHandler::passMousePressEventToSubframe): |
| (WebCore::EventHandler::passMouseReleaseEventToSubframe): |
| (WebCore::EventHandler::passWidgetMouseDownEventToWidget): |
| (WebCore::EventHandler::passMouseMoveEventToSubframe): |
| * page/EventHandler.h: |
| * page/ios/EventHandlerIOS.mm: |
| (WebCore::EventHandler::passSubframeEventToSubframe): |
| (WebCore::EventHandler::passMousePressEventToSubframe): |
| (WebCore::EventHandler::passMouseMoveEventToSubframe): |
| (WebCore::EventHandler::passMouseReleaseEventToSubframe): |
| (WebCore::EventHandler::tryToBeginDragAtPoint): |
| * page/mac/EventHandlerMac.mm: |
| (WebCore::EventHandler::passSubframeEventToSubframe): |
| (WebCore::EventHandler::passMousePressEventToSubframe): |
| (WebCore::EventHandler::passMouseMoveEventToSubframe): |
| (WebCore::EventHandler::passMouseReleaseEventToSubframe): |
| * page/win/EventHandlerWin.cpp: |
| (WebCore::EventHandler::passMouseMoveEventToSubframe): |
| |
| 2020-05-04 Ben Nham <nham@apple.com> |
| |
| IndexedDB WAL file keeps growing while app is in use |
| https://bugs.webkit.org/show_bug.cgi?id=202137 |
| |
| Reviewed by Brady Eidson. |
| |
| It's easy to get into a situation where the WAL file associated with a SQLite-backed |
| IndexedDB grows indefinitely while a site is in use for two reasons: |
| |
| 1. We don't promptly reset cached prepared statements in SQLiteIDBBackingStore. Many |
| statements are left hanging in the SQLITE_ROW state without being reset or fully stepped to |
| the SQLITE_DONE state. These hanging statements keep their associated transactions open and |
| prevent the WAL checkpointer from progressing past those active transactions. |
| |
| To fix this, I added SQLiteStatementAutoResetScope. This is a scope guard that |
| SQLiteIDBBackingStore uses to ensure that cached statements are reset in a timely manner. |
| |
| While going through the reset code I also noticed we aren't clearing bindings after |
| resetting statements. We should be doing this because sqlite3_reset does not clear bindings |
| (and their associated copies of blobs/strings); sqlite3_clear_bindings does that. |
| |
| 2. The default WAL hook for auto-checkpointing in upstream SQLite uses the |
| SQLITE_CHECKPOINT_PASSIVE mode, which doesn't truncate the WAL until the next write |
| transaction occurs. (It actually doesn't truncate at all when compiled with default |
| settings, but macOS's SQLite sets SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT, which causes the |
| truncation to occur on the next write.) |
| |
| We want the WAL to be truncated more promptly, because otherwise the quota check that |
| happens on each mutation won't be as accurate. To do this, I installed a WAL hook that |
| truncates the WAL with SQLITE_CHECKPOINT_TRUNCATE after the default threshold of 1000 WAL |
| pages. I didn't enable this for all SQLiteDatabases because this checkpoint call can block |
| on the busy handler. This isn't a problem for IDB since we don't use busy handlers in IDB. |
| |
| * Headers.cmake: |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo): |
| (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::uncheckedPutIndexRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::deleteUnusedBlobFileRecords): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatementForGetAllObjectStoreRecords): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::getCount): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue): |
| (WebCore::IDBServer::SQLiteIDBBackingStore::cachedStatement): |
| * Modules/indexeddb/server/SQLiteIDBBackingStore.h: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/sql/SQLiteDatabase.cpp: |
| (WebCore::walAutomaticTruncationHook): |
| (WebCore::SQLiteDatabase::enableAutomaticWALTruncation): |
| * platform/sql/SQLiteDatabase.h: |
| * platform/sql/SQLiteStatement.cpp: |
| (WebCore::SQLiteStatement::reset): |
| * platform/sql/SQLiteStatementAutoResetScope.cpp: Added. |
| (WebCore::SQLiteStatementAutoResetScope::SQLiteStatementAutoResetScope): |
| (WebCore::SQLiteStatementAutoResetScope::operator=): |
| (WebCore::SQLiteStatementAutoResetScope::~SQLiteStatementAutoResetScope): |
| * platform/sql/SQLiteStatementAutoResetScope.h: Added. |
| (WebCore::SQLiteStatementAutoResetScope::operator bool const): |
| (WebCore::SQLiteStatementAutoResetScope::operator! const): |
| (WebCore::SQLiteStatementAutoResetScope::get): |
| (WebCore::SQLiteStatementAutoResetScope::operator->): |
| |
| 2020-05-04 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Tapping to focus editable elements should start caret selection at word boundary |
| https://bugs.webkit.org/show_bug.cgi?id=211409 |
| <rdar://problem/62869098> |
| |
| Reviewed by Megan Gardner. |
| |
| Match platform behavior when focusing editable text content by beginning the caret selection at word |
| granularity (i.e. the start or end of a word), rather than character granularity. This will match behavior of |
| other editable widgets on iOS (such as UITextField and UITextView), as well as our current behavior when tapping |
| to change the selection when the text interaction is editable (i.e. when the caret is already visible when |
| tapping). |
| |
| Rebaselined existing layout tests. |
| |
| * editing/VisibleUnits.cpp: |
| (WebCore::wordBoundaryForPositionWithoutCrossingLine): |
| |
| Move logic previously in `WebPage::selectWithGesture` down into `VisibleUnits.h`, as a new standalone helper |
| function. Given a `VisiblePosition`, this new helper will return the given position if it is either already at |
| word boundary or line boundary; if it is within the boundary of a word, it will instead return the start or end |
| of the word. |
| |
| * editing/VisibleUnits.h: |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::handleMousePressEventSingleClick): |
| |
| When setting the selection due to a synthetic single click, automatically adjust the caret position to be at |
| word boundary instead of using the hit-tested position directly. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Make __IPHONE_OS_VERSION_MIN_REQUIRED checks against old versions explicit about watchOS and tvOS |
| https://bugs.webkit.org/show_bug.cgi?id=211402 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::attributesForAttributedStringConversion): Move from __IPHONE_OS_VERSION_MIN_REQUIRED |
| to !PLATFORM(WATCHOS) && !PLATFORM(APPLETV). Move NSExcludedElementsDocumentAttribute to |
| AttributedStringSPI.h. |
| |
| * page/SettingsDefaultValues.h: Rewrite conic gradient conditional to call out |
| tvOS as an exception rather than doing that indirectly through __IPHONE_OS_VERSION_MIN_REQUIRED. |
| * platform/graphics/cg/GradientCG.cpp: |
| (WebCore::Gradient::paint): Ditto. |
| |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: Rewrite |
| HAS_CORE_TEXT_WIDTH_ATTRIBUTE to use !PLATFORM(WATCHOS) && !PLATFORM(APPLETV). |
| (WebCore::variationCapabilitiesForFontDescriptor): Ditto. |
| (WebCore::FontCache::lastResortFallbackFont): Ditto. |
| |
| * platform/graphics/cocoa/FontDescriptionCocoa.cpp: |
| (WebCore::matchSystemFontUse): Use HAVE(SYSTEM_FONT_STYLE_TITLE_0) and |
| HAVE(SYSTEM_FONT_STYLE_TITLE_4) instead of __IPHONE_OS_VERSION_MIN_REQUIRED. |
| This consolidates the watchOS/tvOS issue into the PlatformHave.h file, and |
| does not change behavior at this time. |
| |
| * platform/graphics/cocoa/FontPlatformDataCocoa.mm: |
| (WebCore::cascadeToLastResortAttributesDictionary): Changed this to not use |
| a global since it's only called as part of initializing another global, and |
| to return a RetainPtr. |
| (WebCore::cascadeToLastResortAndVariationsFontDescriptor): Removed |
| WORKAROUND_CORETEXT_VARIATIONS_WITH_FALLBACK_LIST_BUG after researching to |
| be sure it's fixed on recent watchOS and tvOS. Also changed this to return |
| a raw pointer instead of RetainPtr since it returns a single global object. |
| Also removed the CTFontRef argument. |
| (WebCore::FontPlatformData::ctFont const): Updated for the changes above. |
| |
| * platform/graphics/cocoa/IOSurface.mm: |
| (WebCore::IOSurface::surfaceID const): Move from __IPHONE_OS_VERSION_MIN_REQUIRED |
| to !PLATFORM(WATCHOS) && !PLATFORM(APPLETV). |
| * platform/graphics/ios/FontCacheIOS.mm: |
| (WebCore::platformFontWithFamilySpecialCase): Ditto. |
| * platform/graphics/mac/FontCustomPlatformData.cpp: |
| (WebCore::createFontCustomPlatformData): Ditto. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove HAVE(IOSURFACE) checks in Cocoa-platform-specific code |
| https://bugs.webkit.org/show_bug.cgi?id=211389 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * page/cocoa/MemoryReleaseCocoa.mm: |
| (WebCore::platformReleaseMemory): Remove HAVE(IOSURFACE) since it's always true |
| on Cocoa platforms. |
| * platform/graphics/RemoteVideoSample.cpp: |
| (WebCore::RemoteVideoSample::surface const): Ditto. |
| * platform/graphics/RemoteVideoSample.h: Ditto. |
| * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: |
| (WebCore::GraphicsContextGLOpenGL::allocateIOSurfaceBackingStore): Ditto. |
| (WebCore::GraphicsContextGLOpenGL::updateFramebufferTextureBackingStoreFromLayer): Ditto. |
| * platform/graphics/cocoa/IOSurface.mm: Ditto. |
| * platform/graphics/cocoa/IOSurfacePoolCocoa.mm: Ditto. |
| * platform/graphics/cocoa/WebGLLayer.h: Ditto. |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer display]): Ditto. |
| * platform/graphics/cv/ImageTransferSessionVT.h: Ditto. |
| * platform/graphics/cv/ImageTransferSessionVT.mm: Ditto. |
| * platform/graphics/cv/VideoTextureCopierCV.cpp: |
| (WebCore::YCbCrToRGBMatrixForRangeAndTransferFunction): Ditto. |
| (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture): Ditto. |
| * platform/graphics/cv/VideoTextureCopierCV.h: Ditto. |
| * rendering/RenderThemeIOS.h: Ditto. |
| |
| 2020-05-04 Simon Fraser <simon.fraser@apple.com> |
| |
| Overflow scrollbars don't grow when hovered |
| https://bugs.webkit.org/show_bug.cgi?id=210692 |
| <rdar://problem/61977273> |
| |
| Reviewed by Tim Horton. |
| |
| Overlay scrollar interaction has a few behaviors that are mediated by ScrollAnimatorMac. These |
| are a trackpad two-finger tap, which sends a "MayBegin" wheel event (which can be followed by |
| a "Cancelled" on fingers up, if they didn't move), and hovering the scrollbar when visible, which |
| causes it to expand (unhovering causes it to fade out). |
| |
| To track these gestures on the scrolling thread, give ScrollingTree a ScrollingTreeGestureState. |
| |
| Flashing the scrollbars on "MayBegin" is driven by didBeginScrollGesture()/didEndScrollGesture(). |
| This relies on sending these for the correct scrollable area, and matching the begin/cancel, |
| so use the normal scrolling tree event handling code path for "MayBegin", and always send |
| "Cancelled" on the node that received "MayBegin. Do the same for "Began" and "Ended". |
| |
| Scrollbars expanding on hover is controlled by these functions on ScrollAnimatorMac: |
| void mouseEnteredContentArea(); |
| void mouseExitedContentArea(); |
| void mouseMovedInContentArea(); |
| void mouseEnteredScrollbar(Scrollbar*) const; |
| void mouseExitedScrollbar(Scrollbar*) const; |
| |
| This mostly (webkit.org/b/211347) works now that the mayBegin/Canceled state is updated correctly, |
| and is tested by a new test. |
| |
| Tests: fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-hovered.html |
| fast/scrolling/mac/scrollbars/overflow-overlay-scrollbar-reveal.html |
| |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::ScrollingTree): |
| (WebCore::ScrollingTree::handleWheelEvent): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ScrollingTreeGestureState.cpp: Added. |
| (WebCore::ScrollingTreeGestureState::ScrollingTreeGestureState): |
| (WebCore::ScrollingTreeGestureState::receivedWheelEvent): |
| (WebCore::ScrollingTreeGestureState::handleGestureCancel): |
| (WebCore::ScrollingTreeGestureState::nodeDidHandleEvent): |
| (WebCore::ScrollingTreeGestureState::clearAllNodes): |
| * page/scrolling/ScrollingTreeGestureState.h: Copied from Source/WebCore/page/scrolling/ScrollingTreeLatchingController.h. |
| * page/scrolling/ScrollingTreeLatchingController.cpp: |
| (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent): |
| * page/scrolling/ScrollingTreeLatchingController.h: |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::canHandleWheelEvent const): |
| (WebCore::ScrollingTreeScrollingNode::canScrollWithWheelEvent const): Deleted. |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): |
| * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::handleWheelEvent): |
| * platform/Logging.cpp: |
| (WebCore::initializeLogChannelsIfNecessary): |
| * platform/PlatformWheelEvent.h: |
| (WebCore::PlatformWheelEvent::isGestureStart const): |
| (WebCore::PlatformWheelEvent::isGestureCancel const): |
| * platform/cocoa/ScrollController.mm: |
| (WebCore::ScrollController::handleWheelEvent): |
| * platform/mac/ScrollAnimatorMac.mm: |
| (WebCore::scrollbarState): |
| |
| 2020-05-04 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r261102. |
| https://bugs.webkit.org/show_bug.cgi?id=211418 |
| |
| Revert some debug logging (Requested by smfr on #webkit). |
| |
| Reverted changeset: |
| |
| "REGRESSION: [ Mac WK1 ] inspector/console/console-api.html is |
| flaky crashing" |
| https://bugs.webkit.org/show_bug.cgi?id=211386 |
| https://trac.webkit.org/changeset/261102 |
| |
| 2020-05-04 Chris Dumez <cdumez@apple.com> |
| |
| Drop code path using the legacy CFNetwork cookie change notification SPI |
| https://bugs.webkit.org/show_bug.cgi?id=211411 |
| |
| Reviewed by John Wilander. |
| |
| * platform/network/cocoa/NetworkStorageSessionCocoa.mm: |
| (WebCore::NetworkStorageSession::registerCookieChangeListenersIfNecessary): |
| (WebCore::NetworkStorageSession::unregisterCookieChangeListenersIfNecessary): |
| |
| 2020-05-04 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in CompositeEditCommand::moveParagraphs when changing style on elements that are |
| user-select:none and dir:rtl. |
| https://bugs.webkit.org/show_bug.cgi?id=211206 |
| <rdar://problem/61830589> |
| |
| Reviewed by Geoffrey Garen. |
| |
| In function moveParagraphs check if the destination is an empty position and |
| bail out before moving the paragraphs. |
| |
| Test: fast/editing/justify-user-select-none-dir-rtl-crash.html |
| |
| * editing/CompositeEditCommand.cpp: |
| (WebCore::CompositeEditCommand::moveParagraphs): |
| |
| 2020-05-04 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Implement +[_WKWebAuthenticationPanel clearAllLocalAuthenticatorCredentials] |
| https://bugs.webkit.org/show_bug.cgi?id=211369 |
| <rdar://problem/60246635> |
| |
| Reviewed by Brent Fulgham. |
| |
| Covered by manual tests given auto tests could clear developers' actual credentials. |
| |
| * Modules/webauthn/WebAuthenticationConstants.h: |
| |
| 2020-05-04 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Throttling requestAnimationFrame should be controlled by RenderingUpdateScheduler |
| https://bugs.webkit.org/show_bug.cgi?id=204713 |
| |
| Reviewed by Simon Fraser. |
| |
| rAF and Page rendering were managed by two different timers. Throttling |
| rAF was implemented by changing its timer. After r242624, RenderingUpdate |
| steps have been managed by RenderingUpdateScheduler. This means rAF is |
| now serviced by the preferredFramesPerSecond which is 60 fps regardless |
| it's throttled or not. Moreover the rAF throttling timer was mistakenly |
| kept and it has been running under the old assumption which is: rAF is |
| serviced by a timer only. This means rAF will be serviced by its timer |
| and by the RenderingUpdate steps at the same time when it is supposed to |
| throttle. This will make it fire more than 60 fps in cases which it is |
| supposed to run less than 60 fps. |
| |
| The solution is to have two throttling types: |
| |
| 1) Page throttling (or full throttling): This slows down all the steps |
| of RenderingUpdate for the main document and all the sub-documents. |
| Page throttling reasons are: |
| -- VisuallyIdle: Aggressive throttling. |
| -- LowPowerMode: Half speed throttling. |
| 2) Document throttling (or partial throttling): This only slows down the |
| rAF of a certain document. Document throttling reasons are: |
| -- OutsideViewport: Aggressive throttling. |
| -- NonInteractedCrossOriginFrame: Half speed throttling. |
| |
| RenderingUpdate steps will still be managed by RenderingUpdateScheduler |
| which can be throttled. The assumption is none of these steps will need |
| to run faster than the Page preferredFramesPerSecond. If rAF wants to |
| run slower than the Page because of a Document throttling reason, no rAF |
| callbacks will be serviced before its preferredFrameInterval has elapsed. |
| |
| In this patch, "Half speed throttling" is only implemented for the Page |
| and the Document throttling. The "Aggressive throttling" will be done in |
| following patches. Page rendering was never throttled before. We need to |
| make sure this is not going to affect PLT. Some tests need to be changed |
| and new tests need to be written. All of the throttling tests checks the |
| state of the code but none of them checks the real user's experience. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::animationInterval const): |
| (WebCore::DocumentTimeline::updateThrottlingState): Deleted. |
| * animation/DocumentTimeline.h: |
| There is no need to have DocumentTimeline throttling. It is already |
| throttled when the page RenderingUpdate is throttled. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::requestAnimationFrame): |
| (WebCore::Document::updateLastHandledUserGestureTimestamp): |
| LowPowerMode throttling is now handled by the Page. So remove its handling |
| from the Document. |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::ScriptedAnimationController): |
| (WebCore::ScriptedAnimationController::page const): |
| (WebCore::ScriptedAnimationController::interval const): |
| (WebCore::ScriptedAnimationController::preferredScriptedAnimationInterval const): |
| (WebCore::ScriptedAnimationController::throttlingReasons const): |
| (WebCore::ScriptedAnimationController::isThrottledRelativeToPage const): |
| (WebCore::ScriptedAnimationController::shouldRescheduleRequestAnimationFrame const): |
| (WebCore::ScriptedAnimationController::registerCallback): |
| (WebCore::ScriptedAnimationController::cancelCallback): |
| (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): |
| (WebCore::ScriptedAnimationController::scheduleAnimation): |
| (WebCore::throttlingReasonToString): Deleted. |
| (WebCore::throttlingReasonsToString): Deleted. |
| (WebCore::ScriptedAnimationController::addThrottlingReason): Deleted. |
| (WebCore::ScriptedAnimationController::removeThrottlingReason): Deleted. |
| (WebCore::ScriptedAnimationController::isThrottled const): Deleted. |
| (WebCore::ScriptedAnimationController::animationTimerFired): Deleted. |
| * dom/ScriptedAnimationController.h: |
| (WebCore::ScriptedAnimationController::addThrottlingReason): |
| (WebCore::ScriptedAnimationController::removeThrottlingReason): |
| Get rid of the rAF throttling timer. Service the rAF callback only when |
| the period from the current time stamp till the last service time stamp |
| is greater than the preferred rAF interval. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::updateScriptedAnimationsAndTimersThrottlingState): |
| ThrottlingReason is now defined outside ScriptedAnimationController. |
| |
| * page/Page.cpp: |
| (WebCore::m_loadsFromNetwork): |
| (WebCore::Page::setLowPowerModeEnabledOverrideForTesting): |
| |
| (WebCore::Page::preferredRenderingUpdateInterval const): |
| Calculate the preferred RenderingUpdate interval from the throttling |
| reasons. |
| |
| (WebCore::Page::setIsVisuallyIdleInternal): |
| (WebCore::Page::handleLowModePowerChange): |
| Call adjustRenderingUpdateFrequency() when isLowPowerModeEnabled or |
| IsVisuallyIdle is toggled. |
| |
| (WebCore::Page::isLowPowerModeEnabled const): Deleted. |
| (WebCore::updateScriptedAnimationsThrottlingReason): Deleted. |
| * page/Page.h: |
| (WebCore::Page::isLowPowerModeEnabled const): |
| (WebCore::Page::throttlingReasons const): |
| (WebCore::Page::canUpdateThrottlingReason const): |
| |
| * page/RenderingUpdateScheduler.cpp: |
| (WebCore::RenderingUpdateScheduler::setPreferredFramesPerSecond): |
| (WebCore::RenderingUpdateScheduler::scheduleAnimation): |
| (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency): |
| Change the preferredFramesPerSecond of the DisplayRefreshMonitor if the |
| throttling is not aggressive e.g. 10_s. Otherwise use the timer. |
| |
| (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate): |
| Call adjustFramesPerSecond() when DisplayRefreshMonitor is created. |
| |
| (WebCore::RenderingUpdateScheduler::startTimer): |
| * page/RenderingUpdateScheduler.h: |
| * platform/graphics/AnimationFrameRate.h: Added. |
| (WebCore::preferredFrameInterval): |
| (WebCore::preferredFramesPerSecond): |
| (WebCore::operator<<): |
| Push names of ThrottlingReasons to a TextStream. |
| |
| * platform/graphics/DisplayRefreshMonitor.h: |
| (WebCore::DisplayRefreshMonitor::setPreferredFramesPerSecond): |
| * platform/graphics/DisplayRefreshMonitorManager.cpp: |
| (WebCore::DisplayRefreshMonitorManager::monitorForClient): |
| Rename createMonitorForClient() to monitorForClient() since it may return |
| a cached DisplayRefreshMonitor. |
| |
| (WebCore::DisplayRefreshMonitorManager::setPreferredFramesPerSecond): |
| (WebCore::DisplayRefreshMonitorManager::scheduleAnimation): |
| (WebCore::DisplayRefreshMonitorManager::windowScreenDidChange): |
| No need to call registerClient(). This function was just ensuring the |
| DisplayRefreshMonitor is created. scheduleAnimation() does the same thing. |
| |
| (WebCore::DisplayRefreshMonitorManager::createMonitorForClient): Deleted. |
| (WebCore::DisplayRefreshMonitorManager::registerClient): Deleted. |
| * platform/graphics/DisplayRefreshMonitorManager.h: |
| (WebCore::DisplayRefreshMonitorManager::DisplayRefreshMonitorManager): Deleted. |
| |
| * platform/graphics/GraphicsLayerUpdater.cpp: |
| (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater): |
| * platform/graphics/ios/DisplayRefreshMonitorIOS.mm: |
| (-[WebDisplayLinkHandler setPreferredFramesPerSecond:]): |
| Set the preferredFramesPerSecond of the CADisplayLink. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::requestAnimationFrameThrottlingReasons const): |
| (WebCore::Internals::isRequestAnimationFrameThrottled const): Deleted. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| Replace isRequestAnimationFrameThrottled() which returns a boolean by |
| requestAnimationFrameThrottlingReasons() which returns a string. The |
| string represents the throttling reasons. |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove unneeded USE(MEDIAREMOTE) |
| https://bugs.webkit.org/show_bug.cgi?id=211385 |
| |
| Reviewed by Eric Carlson. |
| |
| * platform/audio/cocoa/MediaSessionManagerCocoa.mm: |
| (WebCore::MediaSessionManagerCocoa::updateNowPlayingInfo): Remove USE(MEDIAREMOTE). |
| * platform/mac/MediaRemoteSoftLink.cpp: Ditto. |
| * platform/mac/MediaRemoteSoftLink.h: Ditto. |
| * platform/mac/RemoteCommandListenerMac.mm: |
| (WebCore::RemoteCommandListenerMac::updateSupportedCommands): Ditto. |
| (WebCore::RemoteCommandListenerMac::RemoteCommandListenerMac): Ditto. |
| (WebCore::RemoteCommandListenerMac::~RemoteCommandListenerMac): Ditto. |
| |
| 2020-05-04 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: Worker: should use the name of the worker if it exists |
| https://bugs.webkit.org/show_bug.cgi?id=211244 |
| |
| Reviewed by Brian Burg. |
| |
| Test: inspector/worker/runtime-basic.html |
| |
| Pass the `name` from the `WorkerOptions` given to the `Worker` when it's constructed to Web |
| Inspector so it can be used in the frontend UI. |
| |
| Drive-by: replace lots of pointers with references. |
| |
| * workers/WorkerMessagingProxy.cpp: |
| (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): |
| |
| * workers/WorkerInspectorProxy.h: |
| (WebCore::WorkerInspectorProxy::name const): Added. |
| * workers/WorkerInspectorProxy.cpp: |
| (WebCore::WorkerInspectorProxy::workerStarted): |
| (WebCore::WorkerInspectorProxy::workerTerminated): |
| (WebCore::WorkerInspectorProxy::connectToWorkerInspectorController): |
| (WebCore::WorkerInspectorProxy::sendMessageFromWorkerToFrontend): |
| |
| * inspector/InspectorInstrumentation.h: |
| (WebCore::InspectorInstrumentation::workerStarted): |
| (WebCore::InspectorInstrumentation::workerTerminated): |
| * inspector/InspectorInstrumentation.cpp: |
| (WebCore::InspectorInstrumentation::workerStartedImpl): |
| (WebCore::InspectorInstrumentation::workerTerminatedImpl): |
| |
| * inspector/agents/InspectorWorkerAgent.h: |
| * inspector/agents/InspectorWorkerAgent.cpp: |
| (WebCore::InspectorWorkerAgent::sendMessageFromWorkerToFrontend): |
| (WebCore::InspectorWorkerAgent::workerStarted): |
| (WebCore::InspectorWorkerAgent::workerTerminated): |
| (WebCore::InspectorWorkerAgent::connectToAllWorkerInspectorProxiesForPage): |
| (WebCore::InspectorWorkerAgent::connectToWorkerInspectorProxy): |
| (WebCore::InspectorWorkerAgent::disconnectFromWorkerInspectorProxy): |
| |
| 2020-05-04 Devin Rousso <drousso@apple.com> |
| |
| Web Inspector: provide a way for inspector to turn on/off ITP debug mode and AdClickAttribution debug mode |
| https://bugs.webkit.org/show_bug.cgi?id=209763 |
| |
| Reviewed by Brian Burg. |
| |
| Tests: inspector/page/overrideSetting-AdClickAttributionDebugModeEnabled.html |
| inspector/page/overrideSetting-ITPDebugModeEnabled.html |
| |
| * inspector/agents/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::disable): |
| (WebCore::InspectorPageAgent::overrideSetting): |
| |
| * inspector/InspectorClient.h: |
| (WebCore::InspectorClient::setDeveloperPreferenceOverride): Added. |
| (WebCore::InspectorClient::setMockCaptureDevicesEnabledOverride): Deleted. |
| |
| 2020-05-04 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION: [ Mac WK1 ] inspector/console/console-api.html is flaky crashing |
| https://bugs.webkit.org/show_bug.cgi?id=211386 |
| |
| Reviewed by David Kilzer. |
| |
| Add some temporary logging code to get data from Mojave bots related to this |
| NSScrollerImp crash. |
| |
| * platform/mac/ScrollAnimatorMac.mm: |
| (WebCore::dumpPaintersWithDelegates): |
| (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): |
| (WebCore::ScrollAnimatorMac::~ScrollAnimatorMac): |
| (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar): |
| (WebCore::ScrollAnimatorMac::willRemoveVerticalScrollbar): |
| (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar): |
| (WebCore::ScrollAnimatorMac::willRemoveHorizontalScrollbar): |
| |
| 2020-05-04 Doug Kelly <dougk@apple.com> |
| |
| Add additional null checks to MediaPlayerPrivateMediaSourceAVFObjC |
| https://bugs.webkit.org/show_bug.cgi?id=211134 |
| <rdar://problem/62056577> |
| |
| Reviewed by Daniel Bates. |
| |
| Add additional null checks for a set m_mediaSourcePrivate to MediaPlayerPrivateMediaSourceAVFObjC. Most uses in this |
| class are already guarded, but a few were not, which could lead to a null pointer crash if encountered. |
| |
| No new tests; no functional changes. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::playInternal): |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession): |
| |
| 2020-05-04 Darin Adler <darin@apple.com> |
| |
| Remove now-unneeded HAVE(MEDIA_PLAYER) |
| https://bugs.webkit.org/show_bug.cgi?id=211378 |
| |
| Reviewed by Alex Christensen. |
| |
| * platform/RemoteCommandListener.cpp: Remove uneeded check for HAVE(MEDIA_PLAYER) |
| in code that already checks for Cocoa platforms explicitly. |
| |
| * platform/audio/ios/MediaSessionManagerIOS.mm: |
| (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Removed |
| check of HAVE(MEDIA_PLAYER) in a Cocoa-only source file. |
| * platform/ios/RemoteCommandListenerIOS.h: Ditto. Also removed #pragma once and |
| some other unnecessary things because this is only included in the .mm file below. |
| * platform/ios/RemoteCommandListenerIOS.mm: Ditto. |
| |
| 2020-05-04 Guillem Vinals <gvinals@apple.com> |
| |
| WebGPU: Textures should be able to have OUTPUT_ATTACHMENT | SAMPLED usage flags |
| https://bugs.webkit.org/show_bug.cgi?id=211345 |
| <rdar://problem/62264423> |
| |
| Reviewed by Myles C. Maxfield. |
| |
| Added support for off-screen render targets. |
| |
| Test: webgpu/textures-textureviews.html |
| |
| * platform/graphics/gpu/cocoa/GPUTextureMetal.mm: |
| (WebCore::mtlTextureUsageForGPUTextureUsageFlags): |
| |
| 2020-05-04 Guillem Vinals <gvinals@apple.com> |
| |
| WebGPU: copyTextureToTexture() has an implementation bug (src copy view info is used also as dst) |
| https://bugs.webkit.org/show_bug.cgi?id=211303 |
| |
| Reviewed by Daniel Bates. |
| |
| The source copy information is also used as the destination copy information. |
| |
| Test: webgpu/blit-commands-texture-to-texture.html |
| |
| * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm: |
| (WebCore::GPUCommandBuffer::copyTextureToTexture): |
| |
| 2020-05-04 Antoine Quint <graouts@apple.com> |
| |
| Media controls tracks menu shows "Auto" selected instead of track selected via the JS API |
| https://bugs.webkit.org/show_bug.cgi?id=211230 |
| <rdar://problem/62648409> |
| |
| Reviewed by Eric Carlson. |
| |
| Test: media/modern-media-controls/tracks-support/tracks-support-text-track-selected-via-media-api.html |
| |
| We're fixing two issues with the captions menu on macOS here. |
| |
| First, if a text track was marked as "showing" with the JS API, we would not show it as selected in the UI |
| because MediaControlsHost would report that the captionDisplayMode was "automatic" and we'd take this as |
| sufficient data to say that the "Automatic (Recommended)" item should be shown as selected. We now only |
| do this if we also don't have any text tracks set as "showing". |
| |
| The second issue was when trying to select "Automatic (Recommended)" when a text track had been marked as |
| "showing" with the JS API. Calling `setSelectedTextTrack()` on MediaControlsHost in this case was not sufficient |
| because HTMLMediaElement::setSelectedTextTrack is a no-op if the automatic text track is provided but captionDisplayMode |
| is still set to "automatic". To address this, we first disable all text tracks before calling `setSelectedTextTrack()`. |
| |
| * Modules/modern-media-controls/media/tracks-support.js: |
| (TracksSupport.prototype.tracksPanelIsTrackInSectionSelected): |
| (TracksSupport.prototype.tracksPanelSelectionDidChange): |
| |
| 2020-05-04 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Override the table computed height when content needs more space |
| https://bugs.webkit.org/show_bug.cgi?id=211367 |
| |
| Reviewed by Antti Koivisto. |
| |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::contentHeightForFormattingContextRoot const): |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin): |
| |
| 2020-05-04 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Use distributeAvailableSpace for row sizing |
| https://bugs.webkit.org/show_bug.cgi?id=211366 |
| |
| Reviewed by Antti Koivisto. |
| |
| Switch over to the generic space distribution for table row sizing. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::RowSpan::hasSpan): |
| (WebCore::Layout::RowSpan::isSpanned): |
| (WebCore::Layout::RowSpan::spanCount): |
| (WebCore::Layout::RowSpan::startSpan): |
| (WebCore::Layout::RowSpan::endSpan): |
| (WebCore::Layout::RowSpan::index): |
| (WebCore::Layout::RowSpan::size): |
| (WebCore::Layout::RowSpan::spacing): |
| (WebCore::Layout::distributeAvailableSpace): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| |
| 2020-05-04 Youenn Fablet <youenn@apple.com> |
| |
| Camera video samples have a bad orientation if upside down |
| https://bugs.webkit.org/show_bug.cgi?id=211373 |
| |
| Reviewed by Eric Carlson. |
| |
| Manually tested on iPad and iPhones. |
| |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| (WebCore::AVVideoCaptureSource::computeSampleRotation): |
| -90 should be the same as 270 not -270. |
| |
| 2020-05-04 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| [gtk] isMainThread() assert when running minibrowser in debug builds. |
| https://bugs.webkit.org/show_bug.cgi?id=211355 |
| |
| Reviewed by Mark Lam. |
| |
| Using NeverDestroyed<const AtomString> is discouraged if it is in the non main thread. This can be quite easily wrong: |
| if the running thread is one of WorkerPool, then this is wrong since AtomStringTable will be destroyed every time underlying |
| Thread is shutdown. If this is invoked by AutomaticThread, this is also wrong due to the same reason etc. This is why |
| we introduced MainThreadNeverDestroyed and use it for const AtomString. This restriction found the bug that we are using |
| `NeverDestroyed<const AtomString>` in non main thread. We should not do that. |
| |
| This patch fixes the issue by introducing TextureMapperShaderProgram::Variable instead of using AtomString. Then this code |
| no longer has thread affinity. |
| |
| * platform/graphics/texmap/TextureMapperShaderProgram.cpp: |
| (WebCore::TextureMapperShaderProgram::getLocation): Deleted. |
| * platform/graphics/texmap/TextureMapperShaderProgram.h: |
| |
| 2020-05-04 Emilio Cobos Álvarez <emilio@crisal.io> |
| |
| Put lh / rlh units behind a flag until bug 211351 is sorted out. |
| https://bugs.webkit.org/show_bug.cgi?id=211356 |
| |
| Reviewed by Antti Koivisto. |
| |
| * css/parser/CSSParserToken.cpp: Use the new runtime flag to disable parsing the units. |
| (WebCore::cssPrimitiveValueUnitFromTrie): |
| * page/RuntimeEnabledFeatures.h: Define the new runtime flag. |
| (WebCore::RuntimeEnabledFeatures::setLineHeightUnitsEnabled): |
| (WebCore::RuntimeEnabledFeatures::lineHeightUnitsEnabled const): |
| |
| 2020-05-03 David Kilzer <ddkilzer@apple.com> |
| |
| Use LocalCurrentGraphicsContext in WebKit::convertPlatformImageToBitmap() |
| <https://webkit.org/b/211274> |
| |
| Reviewed by Darin Adler. |
| |
| * platform/mac/LocalCurrentGraphicsContext.h: |
| (WebCore::LocalCurrentGraphicsContext::LocalCurrentGraphicsContext): |
| (WebCore::LocalCurrentGraphicsContext::~LocalCurrentGraphicsContext): |
| - Export methods for use in WebKit. |
| |
| 2020-05-03 David Kilzer <ddkilzer@apple.com> |
| |
| Fix static analyzer false positive in -[WebUndefined undefined] |
| <https://webkit.org/b/211353> |
| |
| Reviewed by Darin Adler. |
| |
| * bridge/objc/WebScriptObject.mm: |
| (+[WebUndefined allocWithZone:]): |
| (-[WebUndefined initWithCoder:]): |
| (-[WebUndefined retain]): |
| (-[WebUndefined autorelease]): |
| - Update method signatures. |
| (+[WebUndefined undefined]): |
| - Fix clang static analyzer false positive by using idiomatic |
| -alloc, -init calls to create object. These methods call |
| -allocWithZone:, so this still uses the singleton pattern. |
| |
| 2020-05-03 Daniel Bates <dabates@apple.com> |
| |
| Sometimes cannot find <textarea> in list of editable elements |
| https://bugs.webkit.org/show_bug.cgi?id=211348 |
| <rdar://problem/62231067> |
| |
| Reviewed by Simon Fraser. |
| |
| When building the editable region add the bounds of the text control to the region instead |
| of the bounds of its inner text element even though it is the latter that is actually editable. |
| Using the bounds of the text control is more in line with a user's expectation for the editable |
| portion of a text control: the entire control. So, do that. |
| |
| Tests: editing/editable-region/hit-test-textarea-empty-space.html |
| editing/editable-region/search-field-basic.html |
| editing/editable-region/text-field-basic.html |
| editing/editable-region/textarea-basic.html |
| |
| * rendering/EventRegion.cpp: |
| (WebCore::EventRegionContext::unite): |
| (WebCore::EventRegion::unite): |
| Add a new bool as to whether to override the user-modify check and just assume that the region |
| is for something editable. This is needed because the form control (e.g. the <input> or <textarea> |
| aka the shadow host element) isn't actually editable itself. Its inner text element is editable. |
| RenderBlock::paintObject() will pass true for this override when event region painting such a |
| control and the control's inner text element is editable so that the controls bounds are added to |
| the editable region. |
| * rendering/EventRegion.h: Add a bool, defaulting to false to keep the current behavior. While |
| I am here remove some unneeded WEBCORE_EXPORT attributions. |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::paintObject): Pass a value for the override argument. It will be true |
| if this block is actually a text control and its inner text element is editable. Otherwise, it |
| will be false. There is also no longer a need to descend into the children of a text control |
| because I only care to record the bounds of the control itself as editable, not its inner text |
| element. |
| |
| 2020-05-03 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Turns horizontal space distribution into a generic space distribution |
| https://bugs.webkit.org/show_bug.cgi?id=211352 |
| |
| Reviewed by Antti Koivisto. |
| |
| Horizontal(column) and vertical(row) space distributions use essentially the same logic to distribute |
| the extra space among the columns/rows. |
| This patch turns the horizontal space distribution function into a generic space distribution code so |
| that we can use it for row sizing as well. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::ColumnSpan::hasSpan): |
| (WebCore::Layout::ColumnSpan::isSpanned): |
| (WebCore::Layout::ColumnSpan::spanCount): |
| (WebCore::Layout::ColumnSpan::startSpan): |
| (WebCore::Layout::ColumnSpan::endSpan): |
| (WebCore::Layout::ColumnSpan::index): |
| (WebCore::Layout::ColumnSpan::size): |
| (WebCore::Layout::ColumnSpan::spacing): |
| (WebCore::Layout::distributeAvailableSpace): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::slot const): |
| |
| 2020-05-03 Youenn Fablet <youenn@apple.com> |
| |
| AudioMediaStreamTrackRendererCocoa should create/start/stop its remote unit on the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=211287 |
| |
| Reviewed by Eric Carlson. |
| |
| Creating/starting/stopping audio units in different threads is error prone. |
| Now that we have an observer model where we have observers for when to play in the main thread and |
| based on that, we decide to receive audio samples in a background thread, we can simplify the logic of AudioMediaStreamTrackRendererCocoa. |
| We do this by creating/starting the unit in AudioMediaStreamTrackRendererCocoa::start. |
| At that point, AudioMediaStreamTrackRendererCocoa is not expected to receive any sample. |
| Just after starting, AudioTrackPrivateMediaStream will receive audio samples and forward them to AudioMediaStreamTrackRendererCocoa. |
| AudioMediaStreamTrackRendererCocoa will then create in a background thread the AudioSampleDataSource that is responsible to adapt the received audio samples to the unit. |
| |
| Manually tested. |
| |
| * platform/audio/mac/AudioSampleDataSource.h: |
| (WebCore::AudioSampleDataSource::inputDescription const): |
| * platform/audio/mac/CAAudioStreamDescription.h: |
| * platform/mediastream/AudioTrackPrivateMediaStream.cpp: |
| (WebCore::AudioTrackPrivateMediaStream::startRenderer): |
| Ensure to start the unit and then start gettting audio samples. |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.cpp: |
| (WebCore::AudioMediaStreamTrackRendererCocoa::start): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::stop): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::clear): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::pushSamples): |
| (WebCore::AudioMediaStreamTrackRendererCocoa::render): |
| * platform/mediastream/mac/AudioMediaStreamTrackRendererCocoa.h: |
| |
| 2020-05-03 Rob Buis <rbuis@igalia.com> |
| |
| atob() should not accept a vertical tab |
| https://bugs.webkit.org/show_bug.cgi?id=184529 |
| |
| Reviewed by Darin Adler. |
| |
| The forgiving-base64 decode algorithm [1] uses [2] to strip |
| out ASCII whitespace which does not include vertical tabs, so |
| change the atob() implementation to not strip out vertical |
| tabs and thus to fail decode on vertical tabs. |
| |
| [1] https://infra.spec.whatwg.org/#forgiving-base64-decode |
| [2] https://infra.spec.whatwg.org/#ascii-whitespace |
| |
| Behavior matches Firefox and Chrome. |
| |
| * page/Base64Utilities.cpp: |
| (WebCore::Base64Utilities::atob): |
| * platform/network/DataURLDecoder.cpp: |
| (WebCore::DataURLDecoder::decodeBase64): |
| |
| 2020-05-02 Simon Fraser <simon.fraser@apple.com> |
| |
| Add a log channel for OverlayScrollbars |
| https://bugs.webkit.org/show_bug.cgi?id=211329 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Overlay scrollbar behavior is opaque. This log channel will add clarity. |
| |
| * platform/Logging.h: |
| * platform/mac/ScrollAnimatorMac.mm: |
| (operator<<): |
| (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]): |
| (-[WebScrollbarPartAnimation startAnimation]): |
| (-[WebScrollbarPartAnimation setCurrentProgress:setCurrentProgress:]): |
| (WebCore::ScrollAnimatorMac::mouseEnteredContentArea): |
| (WebCore::ScrollAnimatorMac::mouseExitedContentArea): |
| (WebCore::ScrollAnimatorMac::mouseMovedInContentArea): |
| (WebCore::ScrollAnimatorMac::didBeginScrollGesture const): |
| (WebCore::ScrollAnimatorMac::didEndScrollGesture const): |
| (WebCore::ScrollAnimatorMac::mayBeginScrollGesture const): |
| (WebCore::ScrollAnimatorMac::handleWheelEventPhase): |
| |
| 2020-05-02 Simon Fraser <simon.fraser@apple.com> |
| |
| Make it possible to test overlay scrollbar interactions |
| https://bugs.webkit.org/show_bug.cgi?id=211342 |
| |
| Reviewed by Daniel Bates. |
| |
| Add internals.horizontalScrollbarState() and internals.verticalScrollbarState() and hook them |
| up via ScrollableArea to ScrollAnimatorMac. They dump state based on the NSScrollerImp state. |
| |
| Make internals.setUsesOverlayScrollbars(true) actually trigger real overlay scrollbars by notifying |
| the ScrollbarTheme about the scrollbar style change. |
| |
| Tests: fast/scrolling/mac/scrollbars/overlay-scrollbar-hovered.html |
| fast/scrolling/mac/scrollbars/overlay-scrollbar-reveal.html |
| fast/scrolling/mac/scrollbars/overlay-scrollbar-state.html |
| fast/scrolling/mac/scrollbars/scrollbar-state.html |
| |
| * platform/ScrollAnimator.h: |
| (WebCore::ScrollAnimator::ScrollAnimator::horizontalScrollbarStateForTesting const): |
| (WebCore::ScrollAnimator::ScrollAnimator::verticalScrollbarStateForTesting const): |
| * platform/ScrollableArea.cpp: |
| (WebCore::ScrollableArea::horizontalScrollbarStateForTesting const): |
| (WebCore::ScrollableArea::verticalScrollbarStateForTesting const): |
| * platform/ScrollableArea.h: |
| * platform/mac/NSScrollerImpDetails.h: |
| * platform/mac/ScrollAnimatorMac.h: |
| * platform/mac/ScrollAnimatorMac.mm: |
| (WebCore::scrollbarState): |
| (WebCore::ScrollAnimatorMac::horizontalScrollbarStateForTesting const): |
| (WebCore::ScrollAnimatorMac::verticalScrollbarStateForTesting const): |
| * testing/Internals.cpp: |
| (WebCore:: const): |
| (WebCore::Internals::scrollbarOverlayStyle const): |
| (WebCore::Internals::scrollbarUsingDarkAppearance const): |
| (WebCore::Internals::horizontalScrollbarState const): |
| (WebCore::Internals::verticalScrollbarState const): |
| (WebCore::Internals::setUsesOverlayScrollbars): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-05-02 Daniel Bates <dabates@apple.com> |
| |
| Page::editableElementsInRect() should return root editable elements |
| https://bugs.webkit.org/show_bug.cgi?id=211343 |
| <rdar://problem/60015801> |
| |
| Reviewed by Simon Fraser. |
| |
| Return the root editable element for each non-text form control editable element |
| inside the search rect as it may not have been hit itself. This can happen if the |
| search rect is small enough to intersect only child elements of the root editable |
| elements. |
| |
| * page/Page.cpp: |
| (WebCore::Page::editableElementsInRect const): |
| (WebCore::isEditableTextInputElement): Deleted. |
| |
| 2020-05-02 Simon Fraser <simon.fraser@apple.com> |
| |
| scrollableAreaForScrollingNodeID() gives the wrong answer for the FrameView |
| https://bugs.webkit.org/show_bug.cgi?id=211310 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Given the FrameView's scrollingNodeID, RenderLayerCompositor::scrollableAreaForScrollingNodeID() |
| would return the RenderView's layer when it should return the FrameView itself. |
| |
| Fixing this allows removal of a special-case in setActiveScrollSnapIndices(). |
| |
| No behavior change. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::scrollableAreaForScrollingNodeID const): |
| |
| 2020-05-02 Simon Fraser <simon.fraser@apple.com> |
| |
| handleWheelEventPhase() should include the relevant ScrollingNodeID |
| https://bugs.webkit.org/show_bug.cgi?id=211315 |
| |
| Reviewed by Tim Horton. |
| |
| handleWheelEventPhase() is used to send information about wheel event phases |
| to the main thread, which make their way to ScrollAnimatorMac::handleWheelEventPhase() |
| and are used to update the state of overlay scrollbars. In order to talk to the |
| correct set of scrollbars with overflow:scroll, we need to send along the ScrollingNodeID |
| and map that to the appropriate ScrollableArea. |
| |
| Will be tested by future overlay scrollbar tests. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::handleWheelEventPhase): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.cpp: |
| (WebCore::ScrollingCoordinator::handleWheelEventPhase): Deleted. |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::handleWheelEventPhase): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::handleWheelEventPhase): |
| * page/scrolling/ThreadedScrollingTree.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): |
| * platform/mac/ScrollAnimatorMac.mm: |
| |
| 2020-05-02 Devin Rousso <drousso@apple.com> |
| |
| [CSS Easing 1] implement `jump-*` step positions |
| https://bugs.webkit.org/show_bug.cgi?id=211271 |
| |
| Reviewed by Dean Jackson. |
| |
| Add support for `jump-start`, `jump-end`, `jump-none`, and `jump-both` step positions inside |
| the `steps()` CSS timing function <https://drafts.csswg.org/css-easing-1/#step-position>. |
| |
| Adjust existing serialization logic to match the spec <https://drafts.csswg.org/css-easing-1/#serialization>: |
| - omit `end` (and `jump-end`) |
| - the value `step-start` should result in `steps(1, start)` instead of `step-start` |
| - the value `step-end` should result in `steps(1)` instead of `step-end` |
| |
| Tests: animations/computed-style.html |
| fast/css/animation-steps-calculated-value.html |
| transitions/transitions-parsing.html |
| web-platform-tests/css/css-animations/parsing/animation-timing-function-computed.html |
| web-platform-tests/css/css-animations/parsing/animation-timing-function-valid.html |
| web-platform-tests/css/css-easing/step-timing-functions-output.html |
| web-platform-tests/css/css-easing/step-timing-functions-syntax.html |
| web-platform-tests/css/css-transitions/parsing/transition-timing-function-computed.html |
| web-platform-tests/css/css-transitions/parsing/transition-timing-function-valid.html |
| web-platform-tests/web-animations/timing-model/time-transformations/transformed-progress.html |
| |
| * css/CSSValueKeywords.in: |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeSteps): |
| (WebCore::consumeAnimationTimingFunction): |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::createTimingFunctionValue): |
| * css/CSSToStyleMap.cpp: |
| (WebCore::CSSToStyleMap::mapAnimationTimingFunction): |
| |
| * css/CSSTimingFunctionValue.h: |
| (WebCore::CSSStepsTimingFunctionValue::create): |
| (WebCore::CSSStepsTimingFunctionValue::stepPosition const): Added. |
| (WebCore::CSSStepsTimingFunctionValue::CSSStepsTimingFunctionValue): |
| (WebCore::CSSStepsTimingFunctionValue::stepAtStart const): Deleted. |
| * css/CSSTimingFunctionValue.cpp: |
| (WebCore::CSSStepsTimingFunctionValue::customCSSText const): |
| (WebCore::CSSStepsTimingFunctionValue::equals const): |
| |
| * platform/animation/TimingFunction.h: |
| (WebCore::StepsTimingFunction::create): |
| (WebCore::StepsTimingFunction::StepsTimingFunction): |
| (WebCore::StepsTimingFunction::stepPosition): Added. |
| (WebCore::StepsTimingFunction::setStepPosition): Added. |
| (WebCore::StepsTimingFunction::clone): |
| (WebCore::StepsTimingFunction::stepAtStart): Deleted. |
| (WebCore::StepsTimingFunction::setStepAtStart): Deleted. |
| * platform/animation/TimingFunction.cpp: |
| (WebCore::operator<<): |
| (WebCore::TimingFunction::transformTime): |
| (WebCore::TimingFunction::createFromCSSValue): |
| (WebCore::TimingFunction::cssText const): |
| |
| 2020-05-01 Tim Horton <timothy_horton@apple.com> |
| |
| Books sometimes ends up with blank pages, especially after adjusting font size |
| https://bugs.webkit.org/show_bug.cgi?id=211265 |
| <rdar://problem/59898144> |
| |
| Reviewed by Darin Adler. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::setViewExposedRect): |
| Rename "hasRectChanged" because it only tests if the optional-state of the |
| rect has changed, not the actual value. |
| |
| 2020-05-01 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation should observe the value attribute of some input elements |
| https://bugs.webkit.org/show_bug.cgi?id=211307 |
| <rdar://problem/61568528> |
| |
| Reviewed by Darin Adler. |
| |
| Teach TextManipulationController to detect the `value` attribute in input elements of type "button" and |
| "submit". To do this, we plumb the element through to `isAttributeForTextManipulation` and check `isTextButton()` |
| if "value" attribute is being considered. |
| |
| Test: TextManipulation.StartTextManipulationExtractsValuesFromButtonInputs |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::isAttributeForTextManipulation): |
| (WebCore::TextManipulationController::observeParagraphs): |
| |
| 2020-05-01 Chris Dumez <cdumez@apple.com> |
| |
| Regression(r259036) Unable to post comments on Jira |
| https://bugs.webkit.org/show_bug.cgi?id=211122 |
| <rdar://problem/62561879> |
| |
| Unreviewed, revert r259036 as the new behavior does not match other browsers |
| and broke some Jira instances. |
| |
| * loader/FormSubmission.cpp: |
| (WebCore::FormSubmission::populateFrameLoadRequest): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::addExtraFieldsToRequest): |
| (WebCore::FrameLoader::addHTTPOriginIfNeeded): |
| (WebCore::FrameLoader::loadResourceSynchronously): |
| (WebCore::FrameLoader::loadDifferentDocumentItem): |
| * loader/FrameLoader.h: |
| * loader/NavigationScheduler.cpp: |
| * loader/PingLoader.cpp: |
| (WebCore::PingLoader::sendPing): |
| * loader/SubresourceLoader.cpp: |
| (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl): |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders): |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::doesRequestNeedHTTPOriginHeader): Deleted. |
| * platform/network/ResourceRequestBase.h: |
| |
| 2020-05-01 Jack Lee <shihchieh_lee@apple.com> |
| |
| Unreviewed, amend change log entry for r260831. |
| |
| * ChangeLog: |
| |
| 2020-05-01 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, another build fix after r260962. |
| |
| * page/Page.h: |
| |
| 2020-05-01 Daniel Bates <dabates@apple.com> |
| |
| Avoid unnecessary copying in AnimationTimeline and other clean ups |
| https://bugs.webkit.org/show_bug.cgi?id=211309 |
| |
| Reviewed by Simon Fraser. |
| |
| Return animations by const lvalue ref to avoid copying the Vectors. |
| Default the constructor and destructor implementations. Remove an |
| unnessary argument name from animationsForElement() and re-arrange |
| decls to make class definition more idiomatic. |
| |
| * animation/AnimationTimeline.cpp: |
| (WebCore::AnimationTimeline::AnimationTimeline): Deleted. |
| (WebCore::AnimationTimeline::~AnimationTimeline): Deleted. |
| * animation/AnimationTimeline.h: |
| (WebCore::AnimationTimeline::relevantAnimations const): |
| (WebCore::AnimationTimeline::allAnimations const): |
| |
| 2020-05-01 Daniel Bates <dabates@apple.com> |
| |
| Change HitTestResult::NodeSet from set of RefPtrs to set of Refs |
| https://bugs.webkit.org/show_bug.cgi?id=211306 |
| |
| Reviewed by Simon Fraser. |
| |
| HitTestResult::listBasedTestResult() never returns a set with nullptrs in it. |
| So, change the set declaration from ListHashSet<RefPtr<Node>> to ListHashSet<Ref<Node>>. |
| This way people are not tempted to unnecessarily null check the nodes in the set. |
| |
| As I made this change to TreeScope::elementsFromPoint() I noticed that retargetToScope(), |
| which is called by it, returned a Node&. So, I changed it to return a Ref<Node>. That |
| required me to fix up caretRangeFromPoint(), which lead me to fix up nodeFromPoint() as well. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::caretRangeFromPoint): |
| * dom/EventPath.cpp: |
| (WebCore::RelatedNodeRetargeter::checkConsistency): |
| * dom/TreeScope.cpp: |
| (WebCore::TreeScope::retargetToScope const): |
| (WebCore::TreeScope::nodeFromPoint): |
| (WebCore::TreeScope::elementFromPoint): |
| (WebCore::TreeScope::elementsFromPoint): |
| * dom/TreeScope.h: |
| * page/Page.cpp: |
| (WebCore::Page::editableElementsInRect const): |
| * rendering/HitTestResult.cpp: |
| (WebCore::appendToNodeSet): |
| (WebCore::HitTestResult::HitTestResult): |
| (WebCore::HitTestResult::operator=): |
| (WebCore::HitTestResult::addNodeToListBasedTestResultCommon): |
| (WebCore::HitTestResult::append): |
| * rendering/HitTestResult.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::nodesFromRect const): |
| |
| 2020-05-01 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed build fix after r260962. |
| |
| * page/Page.cpp: |
| (WebCore::Page::setCORSDisablingPatterns): |
| * page/Page.h: |
| (WebCore::Page::setCORSDisablingPatterns): Deleted. |
| |
| 2020-05-01 Kenneth Russell <kbr@chromium.org> |
| |
| [WebGL2] Refactor texImage2D and texSubImage2D taking ImageBitmap, ImageData, Image, ArrayBufferView |
| https://bugs.webkit.org/show_bug.cgi?id=210766 |
| |
| Reviewed by Dean Jackson. |
| |
| Refactor the texture upload paths taking DOM sources and |
| ArrayBuffers so that texImage/texSubImage and 2D/3D textures are |
| handled with the same entry point. Hook up WebGL 2.0 pixel unpack |
| parameters for selecting sub-rectangles during texture uploads. |
| Refactor context initialization to support WebGL 2.0-specific code |
| paths. |
| |
| Remove duplicate code validating the type of the ArrayBufferView |
| passed to readPixels that was added in the patch for Bug 209515, |
| and validation code subsumed by ANGLE. |
| |
| With this patch, dozens more texture-related WebGL 2.0 conformance |
| tests are passing completely, including all of those under the |
| directories: |
| |
| webgl/2.0.0/conformance2/textures/ |
| canvas_sub_rectangle/ |
| image_data/ |
| |
| The svg_image/ tests in this directory demonstrate browser |
| inconsistencies in SVG handling, and are temporarily skipped. |
| These will be investigated in Bug 211220. |
| |
| Other conformance tests progress or change results, which is |
| expected until WebGL2RenderingContext is fully implemented. |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::create): |
| (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): |
| (WebCore::WebGL2RenderingContext::initializeNewContext): |
| (WebCore::WebGL2RenderingContext::resetUnpackParameters): |
| (WebCore::WebGL2RenderingContext::restoreUnpackParameters): |
| (WebCore::WebGL2RenderingContext::initializeShaderExtensions): |
| (WebCore::WebGL2RenderingContext::getTextureSourceSubRectangle): |
| (WebCore::WebGL2RenderingContext::pixelStorei): |
| (WebCore::WebGL2RenderingContext::texStorage2D): |
| (WebCore::WebGL2RenderingContext::texImage2D): |
| (WebCore::WebGL2RenderingContext::texImage3D): |
| (WebCore::WebGL2RenderingContext::texSubImage2D): |
| (WebCore::WebGL2RenderingContext::texSubImage3D): |
| (WebCore::WebGL2RenderingContext::initializeTransformFeedbackBufferCache): Deleted. |
| (WebCore::WebGL2RenderingContext::initializeSamplerCache): Deleted. |
| (WebCore::WebGL2RenderingContext::sliceTypedArrayBufferView): Deleted. |
| * html/canvas/WebGL2RenderingContext.h: |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::create): |
| (WebCore::WebGLRenderingContext::WebGLRenderingContext): |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::ScopedUnpackParametersResetRestore::ScopedUnpackParametersResetRestore): |
| (WebCore::ScopedUnpackParametersResetRestore::~ScopedUnpackParametersResetRestore): |
| (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase): |
| (WebCore::WebGLRenderingContextBase::initializeNewContext): |
| (WebCore::WebGLRenderingContextBase::resetUnpackParameters): |
| (WebCore::WebGLRenderingContextBase::restoreUnpackParameters): |
| (WebCore::WebGLRenderingContextBase::compressedTexImage2D): |
| (WebCore::WebGLRenderingContextBase::compressedTexSubImage2D): |
| (WebCore::WebGLRenderingContextBase::validateSettableTexInternalFormat): |
| (WebCore::WebGLRenderingContextBase::copyTexSubImage2D): |
| (WebCore::WebGLRenderingContextBase::generateMipmap): |
| (WebCore::WebGLRenderingContextBase::getTexParameter): |
| (WebCore::WebGLRenderingContextBase::readPixels): |
| (WebCore::WebGLRenderingContextBase::sentinelEmptyRect): |
| (WebCore::WebGLRenderingContextBase::safeGetImageSize): |
| (WebCore::WebGLRenderingContextBase::getImageDataSize): |
| (WebCore::WebGLRenderingContextBase::getTexImageSourceSize): |
| (WebCore::WebGLRenderingContextBase::texImageSourceHelper): |
| (WebCore::WebGLRenderingContextBase::texImageArrayBufferViewHelper): |
| (WebCore::WebGLRenderingContextBase::texImageImpl): |
| (WebCore::WebGLRenderingContextBase::texImage2DBase): |
| (WebCore::WebGLRenderingContextBase::texSubImage2DBase): |
| (WebCore::WebGLRenderingContextBase::getTexImageFunctionName): |
| (WebCore::WebGLRenderingContextBase::validateTexFunc): |
| (WebCore::WebGLRenderingContextBase::texImage2D): |
| (WebCore::WebGLRenderingContextBase::texSubImage2D): |
| (WebCore::WebGLRenderingContextBase::validateArrayBufferType): |
| (WebCore::WebGLRenderingContextBase::validateTexFuncData): |
| (WebCore::WebGLRenderingContextBase::validateTexFuncParameters): |
| (WebCore::WebGLRenderingContextBase::addExtensionSupportedFormatsAndTypes): |
| (WebCore::WebGLRenderingContextBase::addExtensionSupportedFormatsAndTypesWebGL2): |
| (WebCore::WebGLRenderingContextBase::validateTexImageSourceFormatAndType): |
| (WebCore::WebGLRenderingContextBase::copyTexImage2D): |
| (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer): |
| (WebCore::WebGLRenderingContextBase::texParameter): |
| (WebCore::WebGLRenderingContextBase::getUnpackPixelStoreParams const): |
| (WebCore::WebGLRenderingContextBase::validateTextureBinding): |
| (WebCore::WebGLRenderingContextBase::validateTexImageBinding): |
| (WebCore::WebGLRenderingContextBase::validateTexture2DBinding): |
| (WebCore::WebGLRenderingContextBase::validateSize): |
| (WebCore::WebGLRenderingContextBase::validateImageBitmap): |
| (WebCore::WebGLRenderingContextBase::maybeRestoreContext): |
| (WebCore::WebGLRenderingContextBase::texImageSource2D): Deleted. |
| (WebCore::WebGLRenderingContextBase::texImage2DImpl): Deleted. |
| (WebCore::WebGLRenderingContextBase::texSubImage2DImpl): Deleted. |
| * html/canvas/WebGLRenderingContextBase.h: |
| (WebCore::WebGLRenderingContextBase::getTextureSourceSize): |
| (WebCore::WebGLRenderingContextBase::validateTexImageSubRectangle): |
| * platform/graphics/IntRect.cpp: |
| (WebCore::IntRect::isValid const): |
| * platform/graphics/IntRect.h: |
| |
| 2020-05-01 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in CompositeEditCommand::cloneParagraphUnderNewElement when indent |
| and align a paragraph. |
| https://bugs.webkit.org/show_bug.cgi?id=211273 |
| <rdar://problem/61885958> |
| |
| Reviewed by Geoffrey Garen. |
| |
| A load event can fire when we clone and append a paragraph. Check if the elements |
| are removed in the event and bail out. |
| |
| Test: fast/editing/indent-then-justifyFull-crash.html |
| |
| * editing/CompositeEditCommand.cpp: |
| (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): |
| |
| 2020-05-01 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in EditCommand::EditCommand via CompositeEditCommand::removeNode |
| https://bugs.webkit.org/show_bug.cgi?id=207600 |
| <rdar://problem/56969450> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Second part of the fix. Remove m_frame in FrameSelection so it will not be |
| inadvertently used and cause this crash. |
| |
| No new tests, covered by existing test. |
| |
| * editing/AlternativeTextController.cpp: |
| (WebCore::AlternativeTextController::rootViewRectForRange const): |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::FrameSelection): |
| (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): |
| (WebCore::FrameSelection::modify): |
| (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): |
| (WebCore::FrameSelection::setFocusedElementIfNeeded): |
| (WebCore::FrameSelection::shouldDeleteSelection const): |
| (WebCore::FrameSelection::shouldDeleteSelection): |
| (WebCore::FrameSelection::revealSelection): |
| (WebCore::FrameSelection:: shouldChangeSelection): |
| (WebCore::FrameSelection::shouldChangeSelection const): |
| * editing/FrameSelection.h: |
| * editing/atk/FrameSelectionAtk.cpp: |
| (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): |
| * editing/mac/FrameSelectionMac.mm: |
| (WebCore::FrameSelection::notifyAccessibilityForSelectionChange): |
| |
| 2020-05-01 Darin Adler <darin@apple.com> |
| |
| REGRESSION (r260739): Crash when pasting into Mail |
| https://bugs.webkit.org/show_bug.cgi?id=211311 |
| |
| Reviewed by Wenson Hsieh. |
| |
| Speculative fix. Would be much better to create a test case demonstrating it's correct. |
| |
| * editing/cocoa/HTMLConverter.mm: |
| (WebCore::editingAttributedString): Use container node when TextIterator::node |
| returns null. |
| |
| 2020-05-01 Don Olmstead <don.olmstead@sony.com> |
| |
| [GTK] Add additional exports to support hidden visibility |
| https://bugs.webkit.org/show_bug.cgi?id=211246 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/ContentType.h: |
| * platform/graphics/cairo/RefPtrCairo.h: |
| * platform/gtk/GtkUtilities.h: |
| * platform/network/soup/CertificateInfo.h: |
| * platform/network/soup/SoupNetworkSession.h: |
| |
| 2020-05-01 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Introduce MainThreadNeverDestroyed / MainThreadLazyNeverDestroyed |
| https://bugs.webkit.org/show_bug.cgi?id=211264 |
| |
| Reviewed by Mark Lam. |
| |
| No behavior change. Adding assertions additionally. |
| |
| * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: |
| (WebCore::stringForPlaybackTargetAvailability): |
| * Modules/encryptedmedia/InitDataRegistry.cpp: |
| (WebCore::InitDataRegistry::cencName): |
| (WebCore::InitDataRegistry::keyidsName): |
| (WebCore::InitDataRegistry::webmName): |
| * Modules/mediacontrols/MediaControlsHost.cpp: |
| (WebCore::MediaControlsHost::automaticKeyword): |
| (WebCore::MediaControlsHost::forcedOnlyKeyword): |
| (WebCore::alwaysOnKeyword): |
| (WebCore::manualKeyword): |
| * Modules/mediastream/MediaStreamTrack.cpp: |
| (WebCore::MediaStreamTrack::kind const): |
| (WebCore::MediaStreamTrack::contentHint const): |
| * Modules/mediastream/RTCDataChannel.cpp: |
| (WebCore::blobKeyword): |
| (WebCore::arraybufferKeyword): |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::liveRegionRelevant const): |
| * dom/ConstantPropertyMap.cpp: |
| (WebCore::ConstantPropertyMap::nameForProperty const): |
| * dom/Document.cpp: |
| (WebCore::Document::validateCustomElementName): |
| * dom/InlineStyleSheetOwner.cpp: |
| (WebCore::isValidCSSContentType): |
| * dom/MutationRecord.cpp: |
| * dom/make_names.pl: |
| (printNamesHeaderFile): |
| (printNamesCppFile): |
| * html/Autocapitalize.cpp: |
| (WebCore::stringForAutocapitalizeType): |
| * html/Autofill.cpp: |
| (WebCore::isContactToken): |
| (WebCore::AutofillData::createFromHTMLFormControlElement): |
| * html/BaseCheckableInputType.cpp: |
| (WebCore::BaseCheckableInputType::fallbackValue const): |
| * html/BaseChooserOnlyDateAndTimeInputType.cpp: |
| (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree): |
| * html/ColorInputType.cpp: |
| (WebCore::ColorInputType::createShadowSubtree): |
| * html/FileInputType.cpp: |
| (WebCore::UploadButtonElement::UploadButtonElement): |
| * html/FormController.cpp: |
| (WebCore::FormKeyGenerator::formKey): |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::parseAttribute): |
| (WebCore::HTMLAnchorElement::isSystemPreviewLink const): |
| * html/HTMLButtonElement.cpp: |
| (WebCore::HTMLButtonElement::formControlType const): |
| * html/HTMLDetailsElement.cpp: |
| (WebCore::summarySlotName): |
| * html/HTMLElement.cpp: |
| (WebCore::toValidDirValue): |
| (WebCore::trueName): |
| (WebCore::falseName): |
| (WebCore::plaintextOnlyName): |
| (WebCore::HTMLElement::setAutocorrect): |
| * html/HTMLFieldSetElement.cpp: |
| (WebCore::HTMLFieldSetElement::formControlType const): |
| * html/HTMLFormElement.cpp: |
| (WebCore::HTMLFormElement::autocomplete const): |
| * html/HTMLImageElement.cpp: |
| (WebCore::HTMLImageElement::loadingForBindings const): |
| * html/HTMLKeygenElement.cpp: |
| (WebCore::HTMLKeygenElement::formControlType const): |
| * html/HTMLOptGroupElement.cpp: |
| (WebCore::HTMLOptGroupElement::formControlType const): |
| * html/HTMLOutputElement.cpp: |
| (WebCore::HTMLOutputElement::formControlType const): |
| * html/HTMLPlugInImageElement.cpp: |
| (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay const): |
| * html/HTMLSelectElement.cpp: |
| (WebCore::HTMLSelectElement::formControlType const): |
| * html/HTMLTableCellElement.cpp: |
| (WebCore::HTMLTableCellElement::scope const): |
| * html/HTMLTextAreaElement.cpp: |
| (WebCore::HTMLTextAreaElement::formControlType const): |
| * html/HTMLTextFormControlElement.cpp: |
| (WebCore::directionString): |
| (WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability): |
| * html/InputMode.cpp: |
| (WebCore::InputModeNames::none): |
| (WebCore::InputModeNames::text): |
| (WebCore::InputModeNames::tel): |
| (WebCore::InputModeNames::url): |
| (WebCore::InputModeNames::email): |
| (WebCore::InputModeNames::numeric): |
| (WebCore::InputModeNames::decimal): |
| (WebCore::InputModeNames::search): |
| * html/InputTypeNames.cpp: |
| (WebCore::InputTypeNames::button): |
| (WebCore::InputTypeNames::checkbox): |
| (WebCore::InputTypeNames::color): |
| (WebCore::InputTypeNames::date): |
| (WebCore::InputTypeNames::datetime): |
| (WebCore::InputTypeNames::datetimelocal): |
| (WebCore::InputTypeNames::email): |
| (WebCore::InputTypeNames::file): |
| (WebCore::InputTypeNames::hidden): |
| (WebCore::InputTypeNames::image): |
| (WebCore::InputTypeNames::month): |
| (WebCore::InputTypeNames::number): |
| (WebCore::InputTypeNames::password): |
| (WebCore::InputTypeNames::radio): |
| (WebCore::InputTypeNames::range): |
| (WebCore::InputTypeNames::reset): |
| (WebCore::InputTypeNames::search): |
| (WebCore::InputTypeNames::submit): |
| (WebCore::InputTypeNames::telephone): |
| (WebCore::InputTypeNames::text): |
| (WebCore::InputTypeNames::time): |
| (WebCore::InputTypeNames::url): |
| (WebCore::InputTypeNames::week): |
| * html/MediaController.cpp: |
| (WebCore::playbackStateWaiting): |
| (WebCore::playbackStatePlaying): |
| (WebCore::playbackStateEnded): |
| * html/RangeInputType.cpp: |
| (WebCore::RangeInputType::createShadowSubtree): |
| * html/SearchInputType.cpp: |
| (WebCore::updateResultButtonPseudoType): |
| * html/TextFieldInputType.cpp: |
| (WebCore::TextFieldInputType::createShadowSubtree): |
| (WebCore::TextFieldInputType::createDataListDropdownIndicator): |
| (WebCore::TextFieldInputType::createContainer): |
| (WebCore::TextFieldInputType::createAutoFillButton): |
| * html/ValidationMessage.cpp: |
| (WebCore::ValidationMessage::buildBubbleTree): |
| * html/shadow/DetailsMarkerControl.cpp: |
| (WebCore::DetailsMarkerControl::DetailsMarkerControl): |
| * html/shadow/MediaControlTextTrackContainerElement.cpp: |
| (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): |
| * html/shadow/ProgressShadowElement.cpp: |
| (WebCore::ProgressInnerElement::create): |
| (WebCore::ProgressBarElement::create): |
| (WebCore::ProgressValueElement::create): |
| * html/shadow/SliderThumbElement.cpp: |
| (WebCore::SliderThumbElement::resolveCustomStyle): |
| (WebCore::SliderContainerElement::resolveCustomStyle): |
| * html/shadow/SpinButtonElement.cpp: |
| (WebCore::SpinButtonElement::SpinButtonElement): |
| * html/shadow/TextControlInnerElements.cpp: |
| (WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement): |
| (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement): |
| * html/shadow/YouTubeEmbedShadowElement.cpp: |
| (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement): |
| * html/shadow/mac/ImageControlsButtonElementMac.cpp: |
| (WebCore::ImageControlsButtonElementMac::tryCreate): |
| * html/shadow/mac/ImageControlsRootElementMac.cpp: |
| (WebCore::ImageControlsRootElement::tryCreate): |
| * html/track/AudioTrack.cpp: |
| (WebCore::AudioTrack::alternativeKeyword): |
| (WebCore::AudioTrack::descriptionKeyword): |
| (WebCore::AudioTrack::mainKeyword): |
| (WebCore::AudioTrack::mainDescKeyword): |
| (WebCore::AudioTrack::translationKeyword): |
| (WebCore::AudioTrack::commentaryKeyword): |
| * html/track/TextTrack.cpp: |
| (WebCore::TextTrack::subtitlesKeyword): |
| (WebCore::captionsKeyword): |
| (WebCore::descriptionsKeyword): |
| (WebCore::chaptersKeyword): |
| (WebCore::metadataKeyword): |
| (WebCore::forcedKeyword): |
| * html/track/TextTrackCue.cpp: |
| (WebCore::TextTrackCue::cueShadowPseudoId): |
| (WebCore::TextTrackCue::cueBoxShadowPseudoId): |
| (WebCore::TextTrackCue::cueBackdropShadowPseudoId): |
| (WebCore::TextTrackCue::rebuildDisplayTree): |
| * html/track/VTTRegion.cpp: |
| (WebCore::upKeyword): |
| (WebCore::VTTRegion::textTrackCueContainerScrollingClass): |
| (WebCore::VTTRegion::textTrackCueContainerShadowPseudoId): |
| (WebCore::VTTRegion::textTrackRegionShadowPseudoId): |
| * html/track/VideoTrack.cpp: |
| (WebCore::VideoTrack::alternativeKeyword): |
| (WebCore::VideoTrack::captionsKeyword): |
| (WebCore::VideoTrack::mainKeyword): |
| (WebCore::VideoTrack::signKeyword): |
| (WebCore::VideoTrack::subtitlesKeyword): |
| (WebCore::VideoTrack::commentaryKeyword): |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::initiatorName const): |
| * page/EventHandler.cpp: |
| (WebCore::focusDirectionForKey): |
| * page/Quirks.cpp: |
| (WebCore::Quirks::shouldBypassBackForwardCache const): |
| * page/animation/CompositeAnimation.cpp: |
| (WebCore::CompositeAnimation::updateKeyframeAnimations): |
| * platform/cocoa/PlaybackSessionModelMediaElement.mm: |
| (WebCore::PlaybackSessionModelMediaElement::eventNameAll): |
| * platform/cocoa/VideoFullscreenModelVideoElement.mm: |
| (WebCore::VideoFullscreenModelVideoElement::eventNameAll): |
| * platform/graphics/FontCache.cpp: |
| (WebCore::FontCache::alternateFamilyName): |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::applicationOctetStream): |
| (WebCore::textPlain): |
| * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp: |
| (WebCore::CDMPrivateFairPlayStreaming::sinfName): |
| (WebCore::CDMPrivateFairPlayStreaming::skdName): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::metadataType): |
| * platform/graphics/cocoa/FontCacheCoreText.cpp: |
| (WebCore::FontCache::similarFont): |
| (WebCore::FontCache::platformAlternateFamilyName): |
| * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: |
| (WebCore::SystemFontDatabaseCoreText::systemFontParameters): |
| * platform/graphics/filters/SourceAlpha.cpp: |
| (WebCore::SourceAlpha::effectName): |
| * platform/graphics/filters/SourceGraphic.cpp: |
| (WebCore::SourceGraphic::effectName): |
| * platform/graphics/ios/FontCacheIOS.mm: |
| (WebCore::FontCache::getCustomFallbackFont): |
| * platform/graphics/texmap/TextureMapperShaderProgram.h: |
| * platform/graphics/win/FontCacheWin.cpp: |
| (WebCore::FontCache::lastResortFallbackFont): |
| (WebCore::FontCache::platformAlternateFamilyName): |
| * platform/network/cocoa/ResourceResponseCocoa.mm: |
| (WebCore::extractHTTPStatusText): |
| * rendering/ComplexLineLayout.cpp: |
| (WebCore::ComplexLineLayout::checkLinesForTextOverflow): |
| * rendering/RenderDeprecatedFlexibleBox.cpp: |
| (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp): |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::hyphenString const): |
| (WebCore::RenderStyle::textEmphasisMarkString const): |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const): |
| * svg/SVGAnimateMotionElement.cpp: |
| (WebCore::SVGAnimateMotionElement::rotateMode const): |
| * svg/SVGAnimationElement.cpp: |
| (WebCore::SVGAnimationElement::setCalcMode): |
| (WebCore::SVGAnimationElement::setAttributeType): |
| (WebCore::SVGAnimationElement::isAdditive const): |
| (WebCore::SVGAnimationElement::isAccumulated const): |
| (WebCore::inheritsFromProperty): |
| * svg/SVGStyleElement.cpp: |
| (WebCore::SVGStyleElement::type const): |
| (WebCore::SVGStyleElement::media const): |
| * svg/animation/SVGSMILElement.cpp: |
| (WebCore::SVGSMILElement::parseClockValue): |
| (WebCore::SVGSMILElement::restart const): |
| (WebCore::SVGSMILElement::fill const): |
| (WebCore::SVGSMILElement::repeatCount const): |
| * svg/properties/SVGAnimationAdditiveValueFunctionImpl.cpp: |
| (WebCore::SVGAnimationColorFunction::colorFromString): |
| * svg/properties/SVGPropertyAnimator.h: |
| (WebCore::SVGPropertyAnimator::adjustForInheritance const): |
| |
| 2020-05-01 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r260243): [ Mac WK1 ] fast/media/mq-inverted-colors-live-update-for-listener.html is a flaky failure |
| https://bugs.webkit.org/show_bug.cgi?id=211154 |
| <rdar://problem/62555128> |
| |
| Reviewed by Darin Adler. |
| |
| Make MediaQueryList an ActiveDOMObject and make sure its JS wrapper stays alive as long as |
| it may fire change events and there is at least 1 change event listener. |
| |
| No new tests, already covered by existing tests. |
| |
| * css/MediaQueryList.cpp: |
| (WebCore::MediaQueryList::MediaQueryList): |
| (WebCore::MediaQueryList::create): |
| (WebCore::MediaQueryList::~MediaQueryList): |
| (WebCore::MediaQueryList::detachFromMatcher): |
| (WebCore::MediaQueryList::evaluate): |
| (WebCore::MediaQueryList::setMatches): |
| (WebCore::MediaQueryList::matches): |
| (WebCore::MediaQueryList::eventListenersDidChange): |
| (WebCore::MediaQueryList::activeDOMObjectName const): |
| (WebCore::MediaQueryList::virtualHasPendingActivity const): |
| * css/MediaQueryList.h: |
| * css/MediaQueryList.idl: |
| * css/MediaQueryMatcher.cpp: |
| (WebCore::MediaQueryMatcher::documentDestroyed): |
| |
| 2020-05-01 Don Olmstead <don.olmstead@sony.com> |
| |
| Use export macros on all platforms |
| https://bugs.webkit.org/show_bug.cgi?id=211293 |
| |
| Reviewed by Michael Catanzaro. |
| |
| * platform/PlatformExportMacros.h: |
| |
| 2020-05-01 Eric Carlson <eric.carlson@apple.com> |
| |
| [MSE] Audio session category is sometimes not set correctly after changing video source |
| https://bugs.webkit.org/show_bug.cgi?id=211252 |
| <rdar://problem/61894737> |
| |
| Reviewed by Jer Noble. |
| |
| Test: media/media-source/media-source-change-source.html |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::mediaPlayerActiveSourceBuffersChanged): Call checkForAudioAndVideo. |
| (WebCore::HTMLMediaElement::audioTrackEnabledChanged): Ditto. |
| (WebCore::HTMLMediaElement::videoTrackSelectedChanged): Ditto. |
| (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto. |
| (WebCore::HTMLMediaElement::updatePlayState): Ditto. |
| (WebCore::HTMLMediaElement::checkForAudioAndVideo): New, update m_hasEverHadAudio and m_hasEverHadVideo |
| and call m_mediaSession->canProduceAudioChanged. |
| (WebCore::HTMLMediaElement::mediaType const): Put `hasVideo()` in a local variable since it |
| is used more than once. |
| * html/HTMLMediaElement.h: |
| |
| * platform/audio/cocoa/MediaSessionManagerCocoa.mm: |
| (WebCore::MediaSessionManagerCocoa::updateSessionState): Iterate over the list of media |
| sessions once, not five times. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer): Call m_player->characteristicChanged() |
| rather than m_player->renderingModeChanged(). |
| |
| 2020-05-01 Peng Liu <peng.liu6@apple.com> |
| |
| A PiP window doesn’t actually dismiss after the browser navigates to a different page within the same domain |
| https://bugs.webkit.org/show_bug.cgi?id=211257 |
| |
| Reviewed by Jer Noble. |
| |
| When we suspend a video element (this will happen when the browser is navigating to another page |
| within the same domain), we need to request the corresponding video to exit fullscreen/PiP. |
| The operation should be done immediately because the video element won't response to events |
| after it is suspended. |
| |
| In r259095, we hold the start of exiting video fullscreen/PiP in HTMLMediaElement::exitFullscreen() |
| until the "webkitendfullscreen" event is dispatched/handled. This behavior does not work if |
| the video element is going to be suspended because the exiting fullscreen operation will be held |
| until the video element is resumed. Therefore, we need to handle that case separately by exiting |
| video fullscreen/PiP immediately. |
| |
| API test: PictureInPicture.ExitPiPOnSuspendVideoElement |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::exitFullscreen): |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (VideoFullscreenInterfaceAVKit::exitFullscreen): |
| |
| 2020-05-01 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Introduce struct RowHeight in TableFormattingContext::computeAndDistributeExtraVerticalSpace |
| https://bugs.webkit.org/show_bug.cgi?id=211275 |
| |
| Reviewed by Antti Koivisto. |
| |
| This is in preparation for available space distribution across row spans. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| |
| 2020-05-01 Antti Koivisto <antti@apple.com> |
| |
| Specific dom node order of Shadow DOM (re)projection causes crash |
| https://bugs.webkit.org/show_bug.cgi?id=211159 |
| <rdar://problem/62626920> |
| |
| Reviewed by Zalan Bujtas. |
| |
| ComposedTreeIterator may traverse to nodes outside its root element if it is constructed |
| with a starting node that has no next sibling inside a slot. |
| |
| This leads to miscomputing RenderTreePosition::nextSibling() and eventual nullptr crash in |
| RenderTreeBuilder when adding a renderer (due to beforeChild renderer being outside the parent renderer). |
| |
| Test case by Elliott Marquez. |
| |
| Test: fast/shadow-dom/composed-tree-iterator-escape.html |
| |
| * dom/ComposedTreeIterator.cpp: |
| (WebCore::ComposedTreeIterator::Context::Context): |
| |
| When findind the end iterator for a tree context we need to look for a sibling in ancestors if |
| the current node has no siblings. |
| |
| 2020-05-01 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| [WebIDL] Interface prototype objects should define @@toStringTag |
| https://bugs.webkit.org/show_bug.cgi?id=211020 |
| |
| Reviewed by Darin Adler. |
| |
| WebIDL spec was recently updated [1] to define @@toStringTag on interface prototype objects. |
| This change aligns WebIDL with ECMA-262 built-ins and Blink's behavior. Gecko have also |
| expressed implementation commitment. |
| |
| This patch implements the spec change, making `X.prototype.toString()` return "[object X]" |
| instead of "[object XPrototype]", where X is WebIDL interface. This behavior is proven to |
| be web compatible (shipping in Chrome since Q2 2016) and matches class strings of iterator |
| prototype objects [2] introduced in r253855. |
| |
| [1]: https://github.com/heycam/webidl/pull/357 |
| [2]: https://heycam.github.io/webidl/#es-iterator-prototype-object |
| |
| Tests: fast/dom/prototype-chain.html |
| fast/dom/wrapper-classes.html |
| fast/workers/DedicatedWorkerGlobalScope-prototype-chain.html |
| imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-interface.any.js |
| imported/w3c/web-platform-tests/WebIDL/ecmascript-binding/class-string-named-properties-object.window.js |
| |
| * bindings/js/JSDOMIterator.h: |
| (WebCore::IteratorTraits>::finishCreation): |
| * bindings/js/JSDOMWindowProperties.cpp: |
| (WebCore::JSDOMWindowProperties::finishCreation): |
| * bindings/js/JSDOMWindowProperties.h: |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateImplementation): |
| (GeneratePrototypeDeclaration): |
| (GenerateConstructorHelperMethods): |
| * bindings/scripts/test/*: Updated. |
| |
| 2020-05-01 Saam Barati <sbarati@apple.com> |
| |
| We can't cast toLength result to unsigned |
| https://bugs.webkit.org/show_bug.cgi?id=211205 |
| <rdar://problem/62625562> |
| |
| Reviewed by Yusuke Suzuki. |
| |
| * bridge/NP_jsobject.cpp: |
| |
| 2020-05-01 Antoine Quint <graouts@apple.com> |
| |
| REGRESSION: MotionMark 1.1 regressed due to r260016 |
| https://bugs.webkit.org/show_bug.cgi?id=211280 |
| <rdar://problem/61898830> |
| |
| Unreviewed. |
| |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::drawImage): |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::drawImage): |
| |
| 2020-05-01 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Move video frame holder to its own file |
| https://bugs.webkit.org/show_bug.cgi?id=211239 |
| |
| Reviewed by Alex Christensen. |
| |
| This class implementation is big enough for a new compilation unit, IMHO. |
| |
| * platform/GStreamer.cmake: |
| * platform/graphics/gstreamer/GStreamerVideoFrameHolder.cpp: Added. |
| (WebCore::GstVideoFrameHolder::GstVideoFrameHolder): |
| (WebCore::GstVideoFrameHolder::~GstVideoFrameHolder): |
| (WebCore::GstVideoFrameHolder::handoffVideoDmaBuf): |
| (WebCore::GstVideoFrameHolder::waitForCPUSync): |
| (WebCore::GstVideoFrameHolder::updateTexture): |
| (WebCore::GstVideoFrameHolder::platformLayerBuffer): |
| * platform/graphics/gstreamer/GStreamerVideoFrameHolder.h: Added. |
| (WebCore::GstVideoFrameHolder::size const): |
| (WebCore::GstVideoFrameHolder::hasAlphaChannel const): |
| (WebCore::GstVideoFrameHolder::flags const): |
| (WebCore::GstVideoFrameHolder::textureID const): |
| (WebCore::GstVideoFrameHolder::hasMappedTextures const): |
| (WebCore::GstVideoFrameHolder::videoFrame const): |
| (WebCore::GstVideoFrameHolder::hasDMABuf const): |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::GstVideoFrameHolder::GstVideoFrameHolder): Deleted. |
| (WebCore::GstVideoFrameHolder::~GstVideoFrameHolder): Deleted. |
| (WebCore::GstVideoFrameHolder::handoffVideoDmaBuf): Deleted. |
| (WebCore::GstVideoFrameHolder::waitForCPUSync): Deleted. |
| (WebCore::GstVideoFrameHolder::size const): Deleted. |
| (WebCore::GstVideoFrameHolder::hasAlphaChannel const): Deleted. |
| (WebCore::GstVideoFrameHolder::flags const): Deleted. |
| (WebCore::GstVideoFrameHolder::textureID const): Deleted. |
| (WebCore::GstVideoFrameHolder::hasMappedTextures const): Deleted. |
| (WebCore::GstVideoFrameHolder::videoFrame const): Deleted. |
| (WebCore::GstVideoFrameHolder::updateTexture): Deleted. |
| (WebCore::GstVideoFrameHolder::platformLayerBuffer): Deleted. |
| (WebCore::GstVideoFrameHolder::hasDMABuf const): Deleted. |
| |
| 2020-05-01 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Disable arrow on context menu popover |
| https://bugs.webkit.org/show_bug.cgi?id=211241 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gdk_display_get_monitor_at_window): Add no-op stub for GTK3. |
| |
| 2020-04-30 Rob Buis <rbuis@igalia.com> |
| |
| Inline reportBlockedPortFailed and reportAuthenticationChallengeBlocked |
| https://bugs.webkit.org/show_bug.cgi?id=211250 |
| |
| Reviewed by Alex Christensen. |
| |
| These two static methods have only one caller each, so we can just |
| inline them at the call site since there is nothing tying them to FrameLoader. |
| |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::willSendRequest): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::reportBlockedPortFailed): Deleted. |
| (WebCore::FrameLoader::reportAuthenticationChallengeBlocked): Deleted. |
| * loader/FrameLoader.h: |
| * loader/ResourceLoader.cpp: |
| (WebCore::ResourceLoader::didBlockAuthenticationChallenge): |
| |
| 2020-04-30 Ross Kirsling <ross.kirsling@sony.com> |
| |
| TriState should be an enum class and use "Indeterminate" instead of "Mixed" |
| https://bugs.webkit.org/show_bug.cgi?id=211268 |
| |
| Reviewed by Mark Lam. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::queryCommandIndeterm): |
| (WebCore::Document::queryCommandState): |
| * editing/EditingStyle.cpp: |
| (WebCore::EditingStyle::triStateOfStyle const): |
| (WebCore::EditingStyle::hasStyle): |
| * editing/Editor.cpp: |
| (WebCore::Editor::selectionUnorderedListState const): |
| (WebCore::Editor::selectionOrderedListState const): |
| * editing/EditorCommand.cpp: |
| (WebCore::isStylePresent): |
| (WebCore::stateStyle): |
| (WebCore::stateTextWritingDirection): |
| (WebCore::stateNone): |
| (WebCore::stateStyleWithCSS): |
| (WebCore::Editor::Command::state const): |
| (WebCore::Editor::Command::value const): |
| * page/ContextMenuController.cpp: |
| (WebCore::ContextMenuController::checkOrEnableIfNeeded const): |
| |
| 2020-04-30 Simon Fraser <simon.fraser@apple.com> |
| |
| Clean up some EventHandler coordinate-related naming and fix ScrollableArea::lastKnownMousePosition() conversions |
| https://bugs.webkit.org/show_bug.cgi?id=211259 |
| |
| Reviewed by Zalan Bujtas. |
| |
| On EventHandler, rename m_lastKnownMousePosition, m_mouseDownPos and m_mouseDown for clarity. |
| |
| Rename ScrollableArea::lastKnownMousePosition() to be lastKnownMousePositionInView(). |
| Previously, lastKnownMousePosition() would fetch it from EventHandler, which simply stashed |
| event.position() (which is in a coordinate system that differs between WK1 and Wk2) which |
| was not relative to the EventHandler's frame. This cause mouseLocationInScrollerForScrollerImp: |
| to give wrong answers. |
| |
| Instead, lastKnownMousePositionInView() now specifically returns coordinates relative to the Frame. |
| This behavior change will be tested in future overlay scrollbar tests. |
| |
| Document::showPlaybackTargetPicker() was using FrameView::lastKnownMousePosition(), so to avoid |
| changing its (probably broken) behavior, have it call frame()->eventHandler().lastKnownMousePosition(). |
| |
| * dom/Document.cpp: |
| (WebCore::Document::showPlaybackTargetPicker): |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::clear): |
| (WebCore::EventHandler::handleMousePressEvent): |
| (WebCore::EventHandler::handleMouseDraggedEvent): |
| (WebCore::EventHandler::updateDragSourceActionsAllowed const): |
| (WebCore::EventHandler::dispatchDragStartEventOnSourceElement): |
| (WebCore::EventHandler::handleDrag): |
| (WebCore::EventHandler::mouseMovementExceedsThreshold const): |
| * page/EventHandler.h: |
| * page/FrameView.cpp: |
| (WebCore::FrameView::lastKnownMousePositionInView const): |
| (WebCore::FrameView::lastKnownMousePosition const): Deleted. |
| * page/FrameView.h: |
| * platform/PlatformMouseEvent.h: |
| * platform/ScrollableArea.h: |
| (WebCore::ScrollableArea::lastKnownMousePositionInView const): |
| (WebCore::ScrollableArea::lastKnownMousePosition const): Deleted. |
| * platform/mac/ScrollAnimatorMac.mm: |
| (-[WebScrollerImpPairDelegate mouseLocationInContentAreaForScrollerImpPair:]): |
| (-[WebScrollerImpPairDelegate scrollerImpPair:convertContentPoint:toScrollerImp:]): |
| (-[WebScrollerImpDelegate mouseLocationInScrollerForScrollerImp:]): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::lastKnownMousePositionInView const): |
| (WebCore::RenderLayer::lastKnownMousePosition const): Deleted. |
| * rendering/RenderLayer.h: |
| * rendering/RenderListBox.cpp: |
| (WebCore::RenderListBox::lastKnownMousePositionInView const): |
| (WebCore::RenderListBox::lastKnownMousePosition const): Deleted. |
| * rendering/RenderListBox.h: |
| |
| 2020-04-30 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Some HTML element critical paths include AtomString materialization |
| https://bugs.webkit.org/show_bug.cgi?id=211223 |
| |
| Reviewed by Saam Barati. |
| |
| While measuring Speedometer2, I've noticed that every time we create some type of input element, we call AtomString multiple times while it is not necessary. |
| It turned out that this is because some places are using `AtomString("...", AtomString::ConstructFromLiteral)` instead of |
| `static NeverDestroyed<const AtomString> ...("...", AtomString::ConstructFromLiteral)`. Since HTML is in the main thread, we can just use `static NeverDestroyed<>`. |
| This patch fixes `AtomString()` calls by changing them to `NeverDestroyed<const AtomString>` if it is under WebCore/html directory. |
| And in this patch, we omit FTPDirectoryDocument, MediaDocument, and PluginDocument's fixes for now since their AtomString content has a bit different nature (some |
| pseudo CSS value ("-webkit-xxx") v.s. some particular CSS property value ("100%"). |
| |
| * html/ColorInputType.cpp: |
| (WebCore::ColorInputType::createShadowSubtree): |
| * html/FileInputType.cpp: |
| (WebCore::UploadButtonElement::UploadButtonElement): |
| * html/HTMLElement.cpp: |
| (WebCore::trueName): |
| (WebCore::falseName): |
| (WebCore::plaintextOnlyName): |
| (WebCore::HTMLElement::setContentEditable): |
| (WebCore::HTMLElement::setDraggable): |
| (WebCore::HTMLElement::setSpellcheck): |
| (WebCore::HTMLElement::setAutocorrect): |
| * html/HTMLTextFormControlElement.cpp: |
| (WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability): |
| * html/RangeInputType.cpp: |
| (WebCore::RangeInputType::createShadowSubtree): |
| * html/SearchInputType.cpp: |
| (WebCore::updateResultButtonPseudoType): |
| * html/TextFieldInputType.cpp: |
| (WebCore::TextFieldInputType::createShadowSubtree): |
| (WebCore::TextFieldInputType::createDataListDropdownIndicator): |
| (WebCore::TextFieldInputType::createContainer): |
| (WebCore::TextFieldInputType::createAutoFillButton): |
| * html/ValidationMessage.cpp: |
| (WebCore::ValidationMessage::buildBubbleTree): |
| * html/shadow/DetailsMarkerControl.cpp: |
| (WebCore::DetailsMarkerControl::DetailsMarkerControl): |
| * html/shadow/MediaControlTextTrackContainerElement.cpp: |
| (WebCore::MediaControlTextTrackContainerElement::MediaControlTextTrackContainerElement): |
| * html/shadow/ProgressShadowElement.cpp: |
| (WebCore::ProgressInnerElement::create): |
| (WebCore::ProgressBarElement::create): |
| (WebCore::ProgressValueElement::create): |
| * html/shadow/ProgressShadowElement.h: |
| (WebCore::ProgressInnerElement::create): Deleted. |
| (WebCore::ProgressBarElement::create): Deleted. |
| (WebCore::ProgressValueElement::create): Deleted. |
| * html/shadow/SpinButtonElement.cpp: |
| (WebCore::SpinButtonElement::SpinButtonElement): |
| * html/shadow/TextControlInnerElements.cpp: |
| (WebCore::TextControlPlaceholderElement::TextControlPlaceholderElement): |
| (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement): |
| * html/shadow/YouTubeEmbedShadowElement.cpp: |
| (WebCore::YouTubeEmbedShadowElement::YouTubeEmbedShadowElement): |
| * html/shadow/mac/ImageControlsButtonElementMac.cpp: |
| (WebCore::ImageControlsButtonElementMac::tryCreate): |
| * html/shadow/mac/ImageControlsRootElementMac.cpp: |
| (WebCore::ImageControlsRootElement::tryCreate): |
| * html/track/TextTrackCue.cpp: |
| (WebCore::TextTrackCue::rebuildDisplayTree): |
| |
| 2020-04-30 Jiewen Tan <jiewen_tan@apple.com> |
| |
| [WebAuthn] Optimize LocalAuthenticator |
| https://bugs.webkit.org/show_bug.cgi?id=183534 |
| <rdar://problem/43357408> |
| |
| Reviewed by Brent Fulgham. |
| |
| Covered by new API tests. |
| |
| * en.lproj/Localizable.strings: |
| * platform/LocalizedStrings.cpp: |
| (WebCore::getAssertionTouchIDPromptTitle): |
| (WebCore::genericTouchIDPromptTitle): |
| * platform/LocalizedStrings.h: |
| Improving the LocalAuthentication dialog titles for iOS. |
| |
| 2020-04-30 Kate Cheney <katherine_cheney@apple.com> |
| |
| clearApplicationBundleIdentifierTestingOverride() should set the bundle identifier to a null string, not an empty string |
| https://bugs.webkit.org/show_bug.cgi?id=211255 |
| <rdar://problem/62651110> |
| |
| Reviewed by John Wilander. |
| |
| No new tests, behavior confirmed by existing tests. |
| |
| Clearing the bundle identifier during tests should reset the override |
| value to be a null string so that the following calls to applicationBundleIdentifier() |
| use the [NSBundle mainBundle] bundleIdentifier] call. |
| |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::clearApplicationBundleIdentifierTestingOverride): |
| |
| 2020-04-30 Devin Rousso <drousso@apple.com> |
| |
| WebKit.WebContent process crashes when web developer tools are opened in Safari |
| https://bugs.webkit.org/show_bug.cgi?id=210794 |
| <rdar://problem/62214651> |
| |
| Reviewed by Brian Burg. |
| |
| Test: inspector/worker/dom-debugger-event-after-terminate-crash.html |
| |
| * inspector/agents/InspectorDOMDebuggerAgent.cpp: |
| (WebCore::InspectorDOMDebuggerAgent::willHandleEvent): |
| Don't `ASSERT(injectedScript.hasNoValue())` as it's possible for the event to be fired after |
| `Worker.prototype.terminate`, in which case `InjectedScriptManager::injectedScriptFor` will |
| now return an `InjectedScript` that would fail that `ASSERT`. |
| |
| 2020-04-30 Alex Christensen <achristensen@webkit.org> |
| |
| Add SPI to change a WKWebView's CORS disabling pattern after initialization |
| https://bugs.webkit.org/show_bug.cgi?id=211211 |
| <rdar://problem/61837474> |
| |
| Reviewed by Chris Dumez. |
| |
| * page/Page.h: |
| (WebCore::Page::setCORSDisablingPatterns): |
| |
| 2020-04-30 Chris Dumez <cdumez@apple.com> |
| |
| WebCore::systemHasBattery() is unnecessarily expensive on iOS |
| https://bugs.webkit.org/show_bug.cgi?id=211240 |
| <rdar://problem/62619971> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Update WebCore::systemHasBattery() to return true unconditionally on |
| PLATFORM(IOS) and PLATFORM(WATCHOS) since iOS devices always have a |
| battery. Also return false unconditionally for PLATFORM(APPLETV). |
| |
| * platform/cocoa/SystemBattery.mm: |
| (WebCore::systemHasBattery): |
| |
| 2020-04-30 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for crash in AXLogger. |
| https://bugs.webkit.org/show_bug.cgi?id=211236 |
| |
| Reviewed by Chris Fleizach. |
| |
| Covered by existing tests. |
| |
| Notifications may have a null AXCoreObject target, so must check for |
| nullity before streaming the object. |
| |
| * accessibility/AXLogger.cpp: |
| (WebCore::AXLogger::log): |
| |
| 2020-04-30 Charlie Turner <cturner@igalia.com> |
| |
| [clang 11] fix build errors due to -WWc++11-narrowing |
| https://bugs.webkit.org/show_bug.cgi?id=211193 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Fixes the following errors, |
| |
| Source/WebCore/html/MediaElementSession.cpp:1059:9: error: type 'WebCore::RenderMedia *' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] |
| m_element.renderer(), |
| ^~~~~~~~~~~~~~~~~~~~ |
| |
| Source/WebCore/style/StyleResolver.cpp:106:55: error: type 'const char [4]' cannot be narrowed to 'bool' in initializer list [-Wc++11-narrowing] |
| m_mediaQueryEvaluator = MediaQueryEvaluator { "all" }; |
| ^~~~~ |
| Source/WebCore/style/StyleResolver.cpp:106:55: note: insert an explicit cast to silence this issue |
| m_mediaQueryEvaluator = MediaQueryEvaluator { "all" }; |
| ^~~~~ |
| static_cast<bool>( ) |
| |
| * html/HTMLMediaElement.h: |
| (WebCore::HTMLMediaElement::hasRenderer const): |
| MediaElementSession was implicitly casting a pointer to a bool, |
| which is not allowed with modern Clang checks. Add a helper method |
| to encapsulate the now required static_cast<bool>. |
| * html/MediaElementSession.cpp: Use the new helper method to see |
| if the HTMLMediaElement has an associated renderer. |
| (WebCore::MediaElementSession::updateMediaUsageIfChanged): |
| * style/StyleResolver.cpp: This was calling MediaQueryEvaluator { |
| "all" }; and seemingly expecting to cast a const char[] to a bool, |
| or maybe String? It's confusing because of the MediaQueryEvaluator |
| API. If it was implicitly converting to bool then that could be |
| unintentional. Such casts are not allowed either now. The |
| MediaQueryEvaluator's default constructor says it returns true for |
| "all", which appears to be the original intent of this call, so I |
| replaced it with that. |
| (WebCore::Style::Resolver::Resolver): |
| |
| 2020-04-30 Simon Fraser <simon.fraser@apple.com> |
| |
| border-radius fails to clip iframe contents |
| https://bugs.webkit.org/show_bug.cgi?id=211199 |
| <rdar://problem/61945671> |
| |
| Reviewed by Zalan Bujtas. |
| |
| iframes need to use the same composited clipping strategy that we use for other |
| replaced elements with composited contents, like video and WebGL. To achieve this, |
| change GraphicsLayer to allow child GraphicsLayers to be parented in the contents |
| clipping layer, just like content layers are. (We don't want to do this unconditionally, |
| because it will change behavior for video with controls.) |
| |
| Add GraphicsLayer::contentsRectClipsDescendants(), and used it to run code that |
| creates the contents clipping (and optional shape) layers even when no contents |
| layer is present. Fix up the sublayer list building to parent layers from |
| children in the contents clipping layer. |
| |
| Tests: compositing/iframes/border-radius-composited-frame.html |
| compositing/iframes/border-uneven-radius-composited-frame.html |
| |
| * platform/graphics/GraphicsLayer.cpp: |
| (WebCore::GraphicsLayer::GraphicsLayer): |
| * platform/graphics/GraphicsLayer.h: |
| (WebCore::GraphicsLayer::contentsRectClipsDescendants const): |
| (WebCore::GraphicsLayer::setContentsRectClipsDescendants): |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::setContentsRectClipsDescendants): |
| (WebCore::GraphicsLayerCA::updateSublayerList): |
| (WebCore::GraphicsLayerCA::updateContentsRects): |
| (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): |
| * platform/graphics/ca/GraphicsLayerCA.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateConfiguration): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::isCompositedSubframeRenderer): |
| * rendering/RenderLayerCompositor.h: |
| |
| 2020-04-30 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Adjust the available vertical space with the row span for cell layout |
| https://bugs.webkit.org/show_bug.cgi?id=211218 |
| |
| Reviewed by Antti Koivisto. |
| |
| The vertical available space for a cell should include all row heights it spans. |
| (can't include test, current table layout logic is incompatible with LFC -and FF/Chrome.) |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): |
| |
| 2020-04-30 Philippe Normand <pnormand@igalia.com> |
| |
| [SOUP] http/tests/media/video-accept-encoding.html fails |
| https://bugs.webkit.org/show_bug.cgi?id=211228 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| The resource requests received by the network process always had |
| the accept-encoding setting enabled due to lack of IPC |
| (de)serialization for this boolean. |
| |
| The patch also enables soup release logging, set WEBKIT_DEBUG=Network=debug. |
| |
| * platform/network/soup/ResourceRequest.h: |
| (WebCore::ResourceRequest::encodeWithPlatformData const): |
| (WebCore::ResourceRequest::decodeWithPlatformData): |
| * platform/network/soup/SoupNetworkSession.cpp: |
| (WebCore::soupLogPrinter): |
| (WebCore::SoupNetworkSession::setupLogger): |
| |
| 2020-04-30 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4][X11] Add support for rendering web view contents |
| https://bugs.webkit.org/show_bug.cgi?id=211189 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add PlatformDisplayX11::visual() to get the X visual used for rendering. |
| |
| * platform/graphics/x11/PlatformDisplayX11.cpp: |
| (WebCore::PlatformDisplayX11::visual const): |
| * platform/graphics/x11/PlatformDisplayX11.h: |
| |
| 2020-04-30 Andres Gonzalez <andresg_22@apple.com> |
| |
| Add logging of AXIsolatedTree and AXNotifications. |
| https://bugs.webkit.org/show_bug.cgi?id=211214 |
| |
| Reviewed by Chris Fleizach. |
| |
| - Added operator<< implementations for AXIsolatedTree and AX notifications. |
| - Added corresponding AXLogger::log overloads for the above types. |
| - To set the root node and the focused node we are now always using |
| setRootNodeID and setFocusedNodeID respectively. Therefore, before |
| returning the root or the focused nodes, it is necessary to applyPendingChanges. |
| |
| * accessibility/AXLogger.cpp: |
| (WebCore::AXLogger::add): Used for recursive logging of the hierarchy. |
| (WebCore::AXLogger::log): |
| (WebCore::operator<<): |
| * accessibility/AXLogger.h: |
| * accessibility/AXObjectCache.cpp: |
| Added logging of the isolated tree when it's generated and before and after updates. |
| (WebCore::AXObjectCache::isolatedTreeFocusedObject): |
| (WebCore::AXObjectCache::generateIsolatedTree): |
| (WebCore::AXObjectCache::updateIsolatedTree): |
| * accessibility/AXObjectCache.h: |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::focusedUIElement const): |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::createTreeForPageID): |
| (WebCore::AXIsolatedTree::removeTreeForPageID): |
| (WebCore::AXIsolatedTree::nodeForID const): |
| (WebCore::AXIsolatedTree::generateSubtree): |
| (WebCore::AXIsolatedTree::focusedNode): |
| (WebCore::AXIsolatedTree::rootNode): |
| (WebCore::AXIsolatedTree::setRootNodeID): |
| (WebCore::AXIsolatedTree::setFocusedNodeID): |
| (WebCore::AXIsolatedTree::applyPendingChanges): |
| (WebCore::AXIsolatedTree::focusedUIElement): Renamed focusedNode for naming consistency. |
| (WebCore::AXIsolatedTree::setRootNode): Deleted. Using setRootNodeID instead, |
| (WebCore::AXIsolatedTree::setFocusedNode): Deleted. Use setFocusedNodeID instead. |
| * accessibility/isolatedtree/AXIsolatedTree.h: |
| (WebCore::AXIsolatedTree::treeID const): |
| (WebCore::AXIsolatedTree::treeIdentifier const): renamed treeID for naming consistency. |
| |
| 2020-04-30 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, GStreamer build warning fix after r260755. |
| |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (webKitWebSrcMakeRequest): There is no need to capture src in the |
| closure, its protector is used instead. |
| |
| 2020-04-30 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] fast/mediastream/get-user-media-device-id.html failing |
| https://bugs.webkit.org/show_bug.cgi?id=190576 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| The test was failing due to deviceId invalid constraint, which led |
| me to rewrite the GStreamer Mock sources, removing various hacks |
| and appsrc usage, which is not needed because we rely on |
| audioSamplesAvailable and videoSamplesAvailable notifications. |
| |
| This patch also fixes the audio mock, which was generating silence |
| until now. |
| |
| * platform/GStreamer.cmake: |
| * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: |
| (WebCore::WebKitMediaStreamTrackObserver::WebKitMediaStreamTrackObserver): |
| * platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.cpp: Removed. |
| * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.cpp: Removed. |
| * platform/mediastream/gstreamer/MockGStreamerVideoCaptureSource.h: Removed. |
| * platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp: Added. |
| (WebCore::MockRealtimeAudioSource::create): |
| (WebCore::MockRealtimeAudioSourceGStreamer::createForMockAudioCapturer): |
| (WebCore::MockRealtimeAudioSourceGStreamer::MockRealtimeAudioSourceGStreamer): |
| (WebCore::MockRealtimeAudioSourceGStreamer::render): |
| (WebCore::MockRealtimeAudioSourceGStreamer::addHum): |
| (WebCore::MockRealtimeAudioSourceGStreamer::reconfigure): |
| * platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.h: Copied from Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h. |
| * platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.cpp: Added. |
| (WebCore::MockRealtimeVideoSource::create): |
| (WebCore::MockRealtimeVideoSourceGStreamer::createForMockDisplayCapturer): |
| (WebCore::MockRealtimeVideoSourceGStreamer::MockRealtimeVideoSourceGStreamer): |
| (WebCore::MockRealtimeVideoSourceGStreamer::updateSampleBuffer): |
| * platform/mediastream/gstreamer/MockRealtimeVideoSourceGStreamer.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MockGStreamerAudioCaptureSource.h. |
| * platform/mock/MockRealtimeVideoSource.h: |
| |
| 2020-04-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Use initializers in PlatformMouseEvent and WebEvent |
| https://bugs.webkit.org/show_bug.cgi?id=211217 |
| |
| Reviewed by Tim Horton. |
| |
| Use initializers im PlatformMouseEvent. |
| |
| * platform/PlatformMouseEvent.h: |
| (WebCore::PlatformMouseEvent::PlatformMouseEvent): |
| |
| 2020-04-29 Jer Noble <jer.noble@apple.com> |
| |
| Remove the debug ASSERT in ImageDecoderAVFObjC::storeSampleBuffer() |
| https://bugs.webkit.org/show_bug.cgi?id=211191 |
| <rdar://problem/62542285> |
| |
| Reviewed by Said Abou-Hallawa. |
| |
| r259594 added an iterator check and a RELEASE_LOG_ERROR for that check, making this ASSERT superfluous. |
| |
| * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm: |
| (WebCore::ImageDecoderAVFObjC::storeSampleBuffer): |
| |
| 2020-04-29 Simon Fraser <simon.fraser@apple.com> |
| |
| Simplify contents clipping layer geometry |
| https://bugs.webkit.org/show_bug.cgi?id=211162 |
| |
| Reviewed by Zalan Bujtas. |
| |
| GraphicsLayerCA uses a contents clipping layer, with an optional shape layer, to support |
| clipping replaced elements with composited contents, like video and WebGL canvas. |
| |
| A future patch will use this code path for composited subframes. To achieve this, |
| we need to host the layers of child GraphicsLayers under m_contentsClippingLayer, but |
| without the GraphicsLayer client having to do geometry math. We can do this by setting |
| the bounds origin of m_contentsClippingLayer to adjust for its position relative |
| to the GraphicsLayer origin. |
| |
| This patch does that, adjusting the position of the contents layer accordingly. |
| The shape mask layer also needs adjusting; its position has to be at the layer's |
| bounds origin, and the shape itself needs to have a zero origin. |
| |
| Tested by existing tests. |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::updateSublayerList): |
| (WebCore::GraphicsLayerCA::updateClippingStrategy): |
| (WebCore::GraphicsLayerCA::updateContentsRects): |
| |
| 2020-04-29 Kenneth Russell <kbr@chromium.org> |
| |
| REGRESSION (r256784?): Shadertoy demo no longer works in Safari |
| https://bugs.webkit.org/show_bug.cgi?id=210994 |
| |
| Reviewed by Dean Jackson. |
| |
| Certain Shadertoy examples stopped working with the ANGLE backend |
| for WebGL because rendering to floating-point render targets was |
| no longer being enabled implicitly along with the |
| OES_texture_float extension. |
| |
| Add support for the WebGL 1.0 extensions |
| EXT_color_buffer_half_float and WEBGL_color_buffer_float, and the |
| WebGL 2.0 extension EXT_color_buffer_float. Enable these |
| implicitly for WebGL 1.0 in the OES_texture_float and |
| OES_texture_half_float extensions, restoring the previous |
| functionality. |
| |
| Translate 32-bit floating point texture formats appropriately for |
| the ANGLE backend. Fix some failures in previously-skipped |
| conformance tests. The new code passes the more stringent |
| top-of-tree WebGL 1.0.4 and 2.0.1 conformance tests related to |
| floating-point texture renderability, which are not yet in the |
| WebKit repository. |
| |
| * CMakeLists.txt: |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSDOMConvertWebGL.cpp: |
| (WebCore::convertToJSValue): |
| * html/canvas/EXTColorBufferFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureHalfFloat.cpp. |
| (WebCore::EXTColorBufferFloat::EXTColorBufferFloat): |
| (WebCore::EXTColorBufferFloat::getName const): |
| (WebCore::EXTColorBufferFloat::supported): |
| * html/canvas/EXTColorBufferFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h. |
| * html/canvas/EXTColorBufferFloat.idl: Added. |
| * html/canvas/EXTColorBufferHalfFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureFloat.cpp. |
| (WebCore::EXTColorBufferHalfFloat::EXTColorBufferHalfFloat): |
| (WebCore::EXTColorBufferHalfFloat::getName const): |
| (WebCore::EXTColorBufferHalfFloat::supported): |
| * html/canvas/EXTColorBufferHalfFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h. |
| * html/canvas/EXTColorBufferHalfFloat.idl: Added. |
| * html/canvas/OESTextureFloat.cpp: |
| (WebCore::OESTextureFloat::OESTextureFloat): |
| (WebCore::OESTextureFloat::supported): |
| * html/canvas/OESTextureFloat.h: |
| * html/canvas/OESTextureHalfFloat.cpp: |
| (WebCore::OESTextureHalfFloat::OESTextureHalfFloat): |
| (WebCore::OESTextureHalfFloat::supported): |
| * html/canvas/OESTextureHalfFloat.h: |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::getExtension): |
| (WebCore::WebGL2RenderingContext::getSupportedExtensions): |
| (WebCore::WebGL2RenderingContext::getParameter): |
| * html/canvas/WebGLColorBufferFloat.cpp: Copied from Source/WebCore/html/canvas/OESTextureFloat.cpp. |
| (WebCore::WebGLColorBufferFloat::WebGLColorBufferFloat): |
| (WebCore::WebGLColorBufferFloat::getName const): |
| (WebCore::WebGLColorBufferFloat::supported): |
| * html/canvas/WebGLColorBufferFloat.h: Copied from Source/WebCore/html/canvas/OESTextureFloat.h. |
| * html/canvas/WebGLColorBufferFloat.idl: Added. |
| * html/canvas/WebGLExtension.h: |
| * html/canvas/WebGLRenderingContext.cpp: |
| (WebCore::WebGLRenderingContext::getExtension): |
| (WebCore::WebGLRenderingContext::getSupportedExtensions): |
| (WebCore::WebGLRenderingContext::getParameter): |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::extensionIsEnabled): |
| (WebCore::WebGLRenderingContextBase::copyTexImage2D): |
| * html/canvas/WebGLRenderingContextBase.h: |
| * platform/graphics/angle/ExtensionsGLANGLE.cpp: |
| (WebCore::ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat): |
| (WebCore::ExtensionsGLANGLE::texImage2DRobustANGLE): |
| * platform/graphics/angle/ExtensionsGLANGLE.h: |
| * platform/graphics/angle/GraphicsContextGLANGLE.cpp: |
| (WebCore::GraphicsContextGLOpenGL::texImage2DDirect): |
| |
| 2020-04-29 Zalan Bujtas <zalan@apple.com> |
| |
| Header is blank on https://nader.org |
| https://bugs.webkit.org/show_bug.cgi?id=205747 |
| <rdar://problem/58305910> |
| |
| Reviewed by Simon Fraser. |
| |
| Do not use stale containing block width value while computing preferred width. |
| |
| Test: fast/text/text-indent-inside-float.html |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const): |
| |
| 2020-04-29 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Take row span into account when checking for missing cells |
| https://bugs.webkit.org/show_bug.cgi?id=211184 |
| |
| Reviewed by Antti Koivisto. |
| |
| The tree builder looks for missing cells in the table grid and fills in the gaps with empty cells. |
| This patch takes row spanning into account and make sure we don't end up adding an extra, redundant cell. |
| |
| * layout/layouttree/LayoutTreeBuilder.cpp: |
| (WebCore::Layout::TreeBuilder::buildTableStructure): |
| |
| 2020-04-29 Youenn Fablet <youenn@apple.com> |
| |
| Update SWServer.cpp originURL after https://trac.webkit.org/changeset/260707 |
| https://bugs.webkit.org/show_bug.cgi?id=211169 |
| |
| Reviewed by Alex Christensen. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::originURL): |
| No need to dereference port since URL::setPort takes an Optional. |
| |
| 2020-04-29 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] FormattingContext::constraintsForInFlow/OutOfFlowContent should take const ContainerBox& |
| https://bugs.webkit.org/show_bug.cgi?id=211161 |
| |
| Reviewed by Antti Koivisto. |
| |
| Leaf boxes should not need to compute constraints (as by definition they don't have in/out-of-flow descendants). |
| |
| * layout/FormattingContext.cpp: |
| (WebCore::Layout::FormattingContext::layoutOutOfFlowContent): |
| * layout/FormattingContext.h: |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::constraintsForOutOfFlowContent): |
| (WebCore::Layout::FormattingContext::Geometry::constraintsForInFlowContent): |
| * layout/FormattingContextQuirks.cpp: |
| (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight): |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForBoxAndAncestors): |
| * layout/blockformatting/BlockFormattingContextQuirks.cpp: |
| (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight): |
| * layout/blockformatting/PrecomputedBlockMarginCollapse.cpp: |
| (WebCore::Layout::BlockFormattingContext::MarginCollapse::precomputedPositiveNegativeValues const): |
| * layout/inlineformatting/InlineFormattingContext.cpp: |
| (WebCore::Layout::InlineFormattingContext::layoutInFlowContent): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| |
| 2020-04-29 Joonghun Park <jh718.park@samsung.com> |
| |
| Unreviewed. Remove no longer used variable and the build warning below. |
| warning: unused variable ‘view’ [-Wunused-variable] |
| |
| No new tests, no new behaviour changes. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::handleMousePressEvent): |
| |
| 2020-04-29 Alicia Boya García <aboya@igalia.com> |
| |
| PlatformMediaResourceLoader should be destroyed on the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=211155 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| PlatformMediaResourceLoader is only safe to use from the main thread. |
| A tricky detail is this includes its destruction. The same is true for |
| PlatformMediaResource. |
| |
| Both classes are ThreadSafeRefCounted<> classes and therefore |
| WTF::DestructionThread::Main can be used to ensure destruction is run |
| in the correct thread with no need for additional client code. |
| |
| * platform/graphics/PlatformMediaResourceLoader.h: |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (WebKitWebSrcPrivate::StreamingMembers::~StreamingMembers): |
| |
| 2020-04-29 Rob Buis <rbuis@igalia.com> |
| |
| Make PolicyChecker an inner class of FrameLoader |
| https://bugs.webkit.org/show_bug.cgi?id=211138 |
| |
| Reviewed by Alex Christensen. |
| |
| PolicyChecker HistoryController an inner class of FrameLoader, this allows us to move some methods |
| only used by PolicyChecker out of the FrameLoader public API. Because it is not possible to forward declare |
| an enum class in an inner class, move ShouldContinue out of the PolicyChecker class and rename it |
| to ShouldContinuePolicyCheck. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadURL): |
| (WebCore::FrameLoader::load): |
| (WebCore::FrameLoader::loadPostRequest): |
| (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy): |
| * loader/FrameLoader.h: |
| * loader/FrameLoaderTypes.h: |
| * loader/MediaResourceLoader.cpp: |
| (WebCore::MediaResource::responseReceived): |
| * loader/PolicyChecker.cpp: |
| * loader/PolicyChecker.h: |
| * platform/graphics/PlatformMediaResourceLoader.h: |
| (WebCore::PlatformMediaResourceClient::responseReceived): |
| * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm: |
| (WebCore::PlatformResourceMediaLoader::responseReceived): |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (CachedResourceStreamingClient::responseReceived): |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (WebCore::WebCoreNSURLSessionDataTaskClient::responseReceived): |
| (-[WebCoreNSURLSessionDataTask resource:receivedResponse:completionHandler:]): |
| |
| 2020-04-29 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK] Misplaced right click menu on web page due to deprecated gtk_menu_popup() |
| https://bugs.webkit.org/show_bug.cgi?id=170553 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/gtk/GtkVersioning.h: Add replacements for GtkPopover functions which are no longet available in GTK4. |
| (gtk_popover_menu_new): Added. |
| (gtk_popover_bind_model): Added. |
| (gtk_popover_set_relative_to): Added. |
| |
| 2020-04-29 Philippe Normand <pnormand@igalia.com> |
| |
| [GStreamer] Switch to audiointerleave |
| https://bugs.webkit.org/show_bug.cgi?id=211124 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| The audiointerleave element is a drop-in replacement of |
| interleave. It should behave a bit better in live. |
| |
| No new tests, existing webaudio tests cover this change. |
| |
| * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp: |
| (webKitWebAudioSrcConstructed): |
| (webKitWebAudioSrcChangeState): |
| |
| 2020-04-23 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR][WPE] Implement XRTest::simulateDeviceConnection() |
| https://bugs.webkit.org/show_bug.cgi?id=210912 |
| |
| Reviewed by Dean Jackson. |
| |
| This API gives tests the ability to spin up a simulated XR device which |
| is an XR device which from the point of view of the WebXR API behaves |
| like a normal XR device. These simulated XR devices can be controlled by |
| the associated FakeXRDevice object. |
| |
| No new tests as this is machinery required to execute tests when |
| implementing the WebXR API. |
| |
| * Modules/webxr/WebXRSystem.cpp: |
| (WebCore::WebXRSystem::WebXRSystem): Initialize the default inline device. |
| (WebCore::WebXRSystem::registerSimulatedXRDeviceForTesting): Add a newly |
| created simulated XR device to the list of available devices. Update |
| also the active immersive device and current inline device. |
| (WebCore::WebXRSystem::unregisterSimulatedXRDeviceForTesting): Remove |
| all simulated devices from the list of immersive XR devices. |
| * Modules/webxr/WebXRSystem.h: New DummyInlineDevice which represents |
| the default inline device which must not provide pose information. |
| * Modules/webxr/WebXRView.cpp: |
| (WebCore::WebXRView::WebXRView): Removed some methods that should be |
| really part of a fake XRView instance. |
| (WebCore::WebXRView::setProjectionMatrix): Add implementation. |
| (WebCore::WebXRView::eye const): Deleted. |
| (WebCore::WebXRView::projectionMatrix const): Deleted. |
| (WebCore::WebXRView::transform const): Deleted. |
| * Modules/webxr/WebXRView.h: |
| (WebCore::WebXRView::eye const): Implemented. |
| (WebCore::WebXRView::projectionMatrix const): Ditto. |
| (WebCore::WebXRView::transform const): Ditto. |
| (WebCore::WebXRView::setEye): Ditto. |
| (WebCore::WebXRView::setTransform): Ditto. |
| * Modules/webxr/XRReferenceSpaceType.h: Moved the definitions to PlatformXR. |
| * platform/xr/PlatformXR.cpp: |
| (PlatformXR::Instance::nextDeviceId): New method which returns uniquely |
| defined ids for XR devices. |
| (PlatformXR::Device::Device): |
| * platform/xr/PlatformXR.h: |
| (PlatformXR::Device::id const): New method. |
| (PlatformXR::Device::supports const): Ditto. |
| (PlatformXR::Device::setSupportedModes): Ditto. |
| (PlatformXR::Device::setEnabledFeatures): Ditto. |
| (PlatformXR::Device::operator== const): Ditto. |
| * testing/FakeXRViewInit.h: fieldOfView is optional. |
| * testing/WebFakeXRDevice.cpp: |
| (WebCore::FakeXRView::setFieldOfView): Implemented. |
| (WebCore::WebFakeXRDevice::setViews): Ditto. |
| (WebCore::WebFakeXRDevice::setViewerOrigin): Ditto. |
| (WebCore::WebFakeXRDevice::clearViewerOrigin): Ditto. |
| (WebCore::WebFakeXRDevice::setFloorOrigin): Ditoo. |
| (WebCore::WebFakeXRDevice::clearFloorOrigin): Ditto. |
| (WebCore::WebFakeXRDevice::parseRigidTransform): Added. |
| (WebCore::WebFakeXRDevice::parseView): Ditto. |
| * testing/WebFakeXRDevice.h: Defined FakeXRView class which wraps a |
| XRView adding some associated data as the field of view and viewport. |
| Also defined the SimulatedXRDevice which is an PlatformXR::Device with |
| some additional data useful for testing purpouses. |
| * testing/WebXRTest.cpp: |
| (WebCore::WebXRTest::simulateDeviceConnection): Create a new |
| FakeXRDevice with an associated simulated XR device with the data |
| provided by a FakeXRDeviceInit. |
| (WebCore::WebXRTest::disconnectAllDevices): Remove all simulated devices |
| from the list of immersive devices. |
| * testing/WebXRTest.h: Call simulateDeviceConnection with ScriptExecutionContext. |
| * testing/WebXRTest.idl: Ditto. |
| |
| 2020-04-29 Saam Barati <sbarati@apple.com> |
| |
| U_STRING_NOT_TERMINATED_WARNING ICU must be handled when using the output buffer as a C string |
| https://bugs.webkit.org/show_bug.cgi?id=211142 |
| <rdar://problem/62530860> |
| |
| Reviewed by Darin Adler. |
| |
| * editing/TextIterator.cpp: |
| (WebCore::normalizeCharacters): |
| * platform/text/LocaleICU.cpp: |
| (WebCore::LocaleICU::decimalSymbol): |
| (WebCore::LocaleICU::decimalTextAttribute): |
| (WebCore::getDateFormatPattern): |
| (WebCore::LocaleICU::createLabelVector): |
| (WebCore::getFormatForSkeleton): |
| * platform/text/LocaleToScriptMappingICU.cpp: |
| (WebCore::localeToScriptCodeForFontSelection): |
| * platform/text/TextCodecICU.cpp: |
| (WebCore::TextCodecICU::decode): |
| (WebCore::TextCodecICU::encode): |
| |
| 2020-04-29 Noam Rosenthal <noam@webkit.org> |
| |
| Add StringView::isAllSpecialCharacters() |
| https://bugs.webkit.org/show_bug.cgi?id=211150 |
| |
| Reviewed by Darin Adler. |
| |
| Uses new StringView::isAllSpecialCharacters() instead of creating a StringImpl. |
| |
| No new tests. |
| |
| * rendering/TextPainter.cpp: |
| (WebCore::TextPainter::paintTextOrEmphasisMarks): |
| |
| 2020-04-28 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Rendering update steps should use Seconds for the timestamps |
| https://bugs.webkit.org/show_bug.cgi?id=210990 |
| |
| Unreviewed. |
| |
| serviceRequestAnimationFrameCallbacks() should return rounded milliseconds. |
| This rounding was removed in r260736. So put it back. |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): |
| |
| 2020-04-28 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Add support for key events |
| https://bugs.webkit.org/show_bug.cgi?id=211128 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gdk_event_get_keyval): |
| (gdk_event_get_keycode): |
| |
| 2020-04-28 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [Text manipulation] Add a userInfo dictionary to _WKTextManipulationToken |
| https://bugs.webkit.org/show_bug.cgi?id=211151 |
| <rdar://problem/62329534> |
| |
| Reviewed by Darin Adler. |
| |
| Add an extensible mechanism for the text manipulation controller to send additional |
| metadata for each text manipulation token through to the WebKit client, for debugging |
| purposes. |
| |
| Test: TextManipulation.StartTextManipulationExtractsUserInfo |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::tokenInfo): |
| (WebCore::TextManipulationController::observeParagraphs): |
| * editing/TextManipulationController.h: |
| |
| Add TextManipulationTokenInfo, and add an optional TextManipulationTokenInfo member to |
| TextManipulationToken. For now, just send over the document URL, element tag name, and |
| the value of the role attribute. |
| |
| (WebCore::TextManipulationController::ManipulationTokenInfo::encode const): |
| (WebCore::TextManipulationController::ManipulationTokenInfo::decode): |
| (WebCore::TextManipulationController::ManipulationToken::encode const): |
| (WebCore::TextManipulationController::ManipulationToken::decode): |
| |
| 2020-04-28 Simon Fraser <simon.fraser@apple.com> |
| |
| Update the xcfilelists. |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| |
| 2020-04-28 Simon Fraser <simon.fraser@apple.com> |
| |
| REGRESSION (r260808): Backdrops on music.apple.com are offset |
| https://bugs.webkit.org/show_bug.cgi?id=211153 |
| <rdar://problem/62543158> |
| |
| Reviewed by Zalan Bujtas. |
| |
| The border-radius code path failed to offset the rounded rect by contentOffsetInCompositingLayer(). |
| |
| Test: compositing/filters/backdrop-filter-rect-border-radius.html |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry): |
| |
| 2020-04-28 Daniel Bates <dabates@apple.com> |
| |
| Modernize EndPointsAdjustmentMode enumeration and fix misspelled enumerator |
| https://bugs.webkit.org/show_bug.cgi?id=211141 |
| |
| Reviewed by Eric Carlson. |
| |
| Fix the misspelled enumerator DoNotAdjsutEndpoints. While I am here, make |
| EndPointsAdjustmentMode an enum class sized as a bool and simplify the naming |
| of its enumerators now that they have to be qualified. I also re-ordered them |
| so that DoNotAdjust is the first enumerator (it will have value 0). This doesn't |
| really matter, but I like it because it makes it so that this enumeration behaves |
| more like an equivalent boolean should casts be involved. |
| |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::setSelectionByMouseIfDifferent): |
| * editing/FrameSelection.h: |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::updateSelectionForMouseDrag): |
| |
| 2020-04-28 Daniel Bates <dabates@apple.com> |
| |
| [WebKitLegacy] Implement -hidePlaceholder and -showPlaceholderIfNecessary in terms of setCanShowPlaceholder() |
| https://bugs.webkit.org/show_bug.cgi?id=211139 |
| |
| Reviewed by Simon Fraser. |
| |
| Remove hidePlaceholder() and showPlaceholderIfNecessary() as they are no longer needed. |
| Callers should use setCanShowPlaceholder() instead. |
| |
| * html/HTMLTextFormControlElement.cpp: |
| (WebCore::HTMLTextFormControlElement::hidePlaceholder): Deleted. |
| (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary): Deleted. |
| * html/HTMLTextFormControlElement.h: |
| |
| 2020-04-28 ChangSeok Oh <changseok@webkit.org> |
| |
| [GTK] Fix build failures for ANGLE_WEBGL after r259589 |
| https://bugs.webkit.org/show_bug.cgi?id=211116 |
| |
| Reviewed by Alex Christensen. |
| |
| The compiler is unhappy with coverting GCGLint64 (long long int) to GLInt64 (long int). |
| Passing GCGLuint62 as GLuint64 is a similar issue. |
| |
| No new tests since no new functionalities. |
| |
| * platform/graphics/angle/ExtensionsGLANGLE.cpp: |
| (WebCore::ExtensionsGLANGLE::getInteger64vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getInteger64i_vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getBufferParameteri64vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getQueryObjecti64vRobustANGLE): |
| (WebCore::ExtensionsGLANGLE::getQueryObjectui64vRobustANGLE): |
| * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: |
| (Nicosia::GC3DLayer::swapBuffersIfNeeded): Unaccelerated -> RenderingMode::Unaccelerated |
| |
| 2020-04-28 Noam Rosenthal <noam@webkit.org> |
| |
| Implement FCP (first contentful paint) |
| https://bugs.webkit.org/show_bug.cgi?id=208499 |
| |
| Reviewed by Simon Fraser. |
| |
| Added the necessary interface, extensions to the performance interface and observer, new runtime flag. |
| Detecting contentfulness after layout and before actual paint, by running a "dummy" paint, similar to |
| invalidateControlTints() / invalidateImagesWithAsyncDecodes(). Save the result to the GraphicsContext and then to the document. |
| This would run for every paint until we detect a contentful one. |
| |
| Note that it paints the entire frame contents, as FCP is not viewport-dependent. |
| Also, paint timing is currently disabled for LFC (layout formatting context), and will be dealt with later. |
| |
| Tests: http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-num-chars.html |
| http/tests/performance/paint-timing/performance-paint-timing-fcp-after-visually-non-empty-for-style.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-background-size.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-set.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-bg-image-two-steps.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-canvas-context.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-gradient.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate-descendant.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-3d-rotate.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale-transition.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-scale.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-invisible-text.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity-descendant.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-opacity.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds-translate.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-out-of-bounds.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-display.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-image.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-opacity.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-text.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-pseudo-element-visibility.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-svg.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-text-input.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-typographic-pseudo.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-frame.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-video-poster.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-whitespace.html |
| imported/w3c/web-platform-tests/paint-timing/fcp-only/fcp-with-rtl.html |
| performance-api/paint-timing/paint-timing-apis.html |
| performance-api/paint-timing/paint-timing-frames.html |
| performance-api/paint-timing/paint-timing-with-worker.html |
| performance-api/paint-timing/performance-observer-first-contentful-paint.html |
| |
| * CMakeLists.txt: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/JSPerformanceEntryCustom.cpp: |
| (WebCore::toJSNewlyCreated): |
| * bindings/js/WebCoreBuiltinNames.h: |
| Add PerformancePaintTiming interface. https://w3c.github.io/paint-timing/#sec-PerformancePaintTiming |
| |
| * dom/Document.cpp: |
| * dom/Document.h: |
| (WebCore::Document::supportsPaintTiming const): |
| We only report paint timing for document that can access the top level security origin, to avoid leakage of information to sandboxed iframes. |
| |
| (WebCore::Document::enqueuePaintTimingEntryIfNeeded): |
| Enqueue a paint timing entry, according to https://w3c.github.io/paint-timing/#sec-reporting-paint-timing |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::paintContents): |
| Disable FCP fake-paint in LFC mode. |
| |
| * page/Page.cpp: |
| (WebCore::Page::doAfterUpdateRendering): |
| * page/Performance.cpp: |
| (WebCore::Performance::getEntries const): |
| (WebCore::Performance::getEntriesByType const): |
| (WebCore::Performance::getEntriesByName const): |
| (WebCore::Performance::reportFirstContentfulPaint): |
| * page/Performance.h: |
| Support first-contentful-paint reporting. |
| |
| * page/PerformanceEntry.cpp: |
| (WebCore::PerformanceEntry::parseEntryTypeString): |
| * page/PerformanceEntry.h: |
| (WebCore::PerformanceEntry::isPaint const): |
| * page/PerformanceObserver.cpp: |
| (WebCore::PerformanceObserver::supportedEntryTypes): |
| * page/PerformanceObserver.h: |
| * page/PerformanceObserver.idl: |
| * page/PerformancePaintTiming.h: Added. |
| (isType): |
| * page/PerformancePaintTiming.idl: Added. |
| Add paint performance entry type. |
| |
| * page/RuntimeEnabledFeatures.h: |
| (WebCore::RuntimeEnabledFeatures::setPaintTimingEnabled): |
| (WebCore::RuntimeEnabledFeatures::paintTimingEnabled const): |
| New runtime flag for paint timing. |
| |
| * platform/graphics/GraphicsContext.h: |
| (WebCore::GraphicsContext::detectingContentfulPaint const): |
| (WebCore::GraphicsContext::setContentfulPaintDetected): |
| (WebCore::GraphicsContext::contenfulPaintDetected const): |
| Add a flag in GraphicsContext where different render operations can report if they're contentful. |
| |
| * rendering/ContentfulPaintChecker.cpp: Added. |
| (WebCore::ContentfulPaintChecker::qualifiesForContentfulPaint): |
| * rendering/ContentfulPaintChecker.h: Added. |
| Run a "dummy" paint of the FrameView, to detect contentful elements. |
| |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::paintFillLayerExtended): |
| * rendering/RenderHTMLCanvas.cpp: |
| (WebCore::RenderHTMLCanvas::paintReplaced): |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::paintReplaced): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::paintLayerContents): |
| * rendering/RenderVideo.cpp: |
| (WebCore::RenderVideo::paintReplaced): |
| * rendering/TextPainter.cpp: |
| (WebCore::TextPainter::paintTextOrEmphasisMarks): |
| * rendering/svg/RenderSVGRoot.cpp: |
| (WebCore::RenderSVGRoot::paintReplaced): |
| Report contentfulness when we reach anything that qualifies as contentful, |
| based on https://w3c.github.io/paint-timing/#contentful. |
| |
| 2020-04-28 Simon Fraser <simon.fraser@apple.com> |
| |
| MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin log with no error |
| https://bugs.webkit.org/show_bug.cgi?id=211145 |
| |
| Reviewed by Jer Noble. |
| |
| Don't log when MRMediaRemoteSetNowPlayingApplicationPlaybackStateForOrigin() returns 0. |
| |
| * platform/audio/cocoa/MediaSessionManagerCocoa.mm: |
| (WebCore::MediaSessionManagerCocoa::setNowPlayingInfo): |
| |
| 2020-04-28 Ross Kirsling <ross.kirsling@sony.com> |
| |
| [JSC] Align upon the name isCallable instead of isFunction |
| https://bugs.webkit.org/show_bug.cgi?id=211140 |
| |
| Reviewed by Darin Adler. |
| |
| * Modules/plugins/QuickTimePluginReplacement.mm: |
| (WebCore::QuickTimePluginReplacement::ensureReplacementScriptInjected): |
| * bindings/js/JSCustomElementRegistryCustom.cpp: |
| (WebCore::getCustomElementCallback): |
| * bindings/js/JSDOMConvertCallbacks.h: |
| (WebCore::Converter<IDLCallbackFunction<T>>::convert): |
| * bindings/js/JSDOMConvertScheduledAction.h: |
| (WebCore::Converter<IDLScheduledAction>::convert): |
| * bindings/js/JSDOMPromise.cpp: |
| (WebCore::DOMPromise::whenPromiseIsSettled): |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::JSDOMWindow::queueMicrotask): |
| * bindings/js/JSWorkerGlobalScopeCustom.cpp: |
| (WebCore::JSWorkerGlobalScope::queueMicrotask): |
| * bindings/js/ReadableStream.cpp: |
| (WebCore::ReadableStream::pipeTo): |
| (WebCore::ReadableStream::tee): |
| * bindings/js/ReadableStreamDefaultController.cpp: |
| (WebCore::ReadableStreamDefaultController::invoke): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::callInWorld): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateOverloadDispatcher): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript): |
| * testing/Internals.cpp: |
| (WebCore::Internals::parserMetaData): |
| (WebCore::Internals::cloneArrayBuffer): |
| * worklets/PaintWorkletGlobalScope.cpp: |
| (WebCore::PaintWorkletGlobalScope::registerPaint): |
| |
| 2020-04-28 Simon Fraser <simon.fraser@apple.com> |
| |
| Rewrite GraphicsLayerCA::updateSublayerList() |
| https://bugs.webkit.org/show_bug.cgi?id=211137 |
| |
| Reviewed by Zalan Bujtas. |
| |
| This function was hard to understand, with aliasing of a layer list to handle |
| the various configurations. Future patches will add a bit more complexity here. |
| |
| Rewrite using lambdas, which makes it easier to follow. |
| |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::updateSublayerList): |
| |
| 2020-04-28 Christopher Reid <chris.reid@sony.com> |
| |
| [Win] Bundle Inspector Resources in Release builds |
| https://bugs.webkit.org/show_bug.cgi?id=210942 |
| |
| Reviewed by Fujii Hironori. |
| |
| * CMakeLists.txt: |
| |
| 2020-04-28 Rob Buis <rbuis@igalia.com> |
| |
| Remove downloadAttribute from DocumentLoader |
| https://bugs.webkit.org/show_bug.cgi?id=210493 |
| |
| Reviewed by Darin Adler. |
| |
| Remove downloadAttribute from DocumentLoader since this |
| can be obtained from the NavigationAction. |
| |
| * loader/DocumentLoader.h: |
| (WebCore::DocumentLoader::downloadAttribute const): |
| (WebCore::DocumentLoader::setDownloadAttribute): Deleted. |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadURL): |
| (WebCore::FrameLoader::loadWithNavigationAction): |
| (WebCore::FrameLoader::loadPostRequest): |
| * loader/FrameLoader.h: |
| |
| 2020-04-28 Jack Lee <shihchieh_lee@apple.com> |
| |
| Nullptr crash in EditCommand::EditCommand via CompositeEditCommand::removeNode |
| https://bugs.webkit.org/show_bug.cgi?id=207600 |
| <rdar://problem/56969450> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Move FrameSelection and Editor objects from Frame to Document so when a document is detached |
| in nested command executions, the next EditCommand would not fail in constructor. |
| |
| Test: editing/inserting/insert-list-then-edit-command-crash.html |
| |
| * dom/Document.cpp: |
| (WebCore::m_selection): |
| (WebCore::Document::willBeRemovedFromFrame): |
| (WebCore::m_undoManager): Deleted. |
| (WebCore::Document::prepareForDestruction): Deleted. |
| * dom/Document.h: |
| (WebCore::Document::editor): |
| (WebCore::Document::editor const): |
| (WebCore::Document::selection): |
| (WebCore::Document::selection const): |
| * editing/AlternativeTextController.cpp: |
| (WebCore::AlternativeTextController::AlternativeTextController): |
| (WebCore::AlternativeTextController::stopPendingCorrection): |
| (WebCore::AlternativeTextController::isSpellingMarkerAllowed const): |
| (WebCore::AlternativeTextController::applyAutocorrectionBeforeTypingIfAppropriate): |
| (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): |
| (WebCore::AlternativeTextController::timerFired): |
| (WebCore::AlternativeTextController::handleAlternativeTextUIResult): |
| (WebCore::AlternativeTextController::rootViewRectForRange const): |
| (WebCore::AlternativeTextController::respondToChangedSelection): |
| (WebCore::AlternativeTextController::respondToAppliedEditing): |
| (WebCore::AlternativeTextController::respondToUnappliedEditing): |
| (WebCore::AlternativeTextController::editorClient): |
| (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand): |
| (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult): |
| (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord): |
| (WebCore::AlternativeTextController::alternativeTextClient): |
| (WebCore::AlternativeTextController::applyAlternativeTextToRange): |
| (WebCore::AlternativeTextController::insertDictatedText): |
| (WebCore::AlternativeTextController::applyDictationAlternative): |
| * editing/AlternativeTextController.h: |
| (WebCore::AlternativeTextController::UNLESS_ENABLED): |
| * editing/CompositeEditCommand.cpp: |
| (WebCore::EditCommandComposition::unapply): |
| (WebCore::EditCommandComposition::reapply): |
| (WebCore::CompositeEditCommand::willApplyCommand): |
| (WebCore::CompositeEditCommand::didApplyCommand): |
| (WebCore::CompositeEditCommand::targetRanges const): |
| (WebCore::CompositeEditCommand::moveParagraphs): |
| * editing/DeleteSelectionCommand.cpp: |
| (WebCore::DeleteSelectionCommand::saveTypingStyleState): |
| (WebCore::DeleteSelectionCommand::mergeParagraphs): |
| (WebCore::DeleteSelectionCommand::calculateTypingStyleAfterDelete): |
| (WebCore::DeleteSelectionCommand::doApply): |
| * editing/EditCommand.cpp: |
| (WebCore::EditCommand::EditCommand): |
| (WebCore::EditCommand::isEditingTextAreaOrTextInput const): |
| (WebCore::EditCommand::postTextStateChangeNotification): |
| (WebCore::EditCommand::frame): Deleted. |
| (WebCore::EditCommand::frame const): Deleted. |
| * editing/EditCommand.h: |
| * editing/Editing.cpp: |
| (WebCore::createDefaultParagraphElement): |
| * editing/EditingStyle.cpp: |
| (WebCore::StyleChange::StyleChange): |
| * editing/Editor.cpp: |
| (WebCore::ClearTextCommand::CreateAndApply): |
| (WebCore::TemporarySelectionChange::TemporarySelectionChange): |
| (WebCore::TemporarySelectionChange::~TemporarySelectionChange): |
| (WebCore::TemporarySelectionChange::setSelection): |
| (WebCore::Editor::selectionForCommand): |
| (WebCore::Editor::behavior const): |
| (WebCore::Editor::client const): |
| (WebCore::Editor::canEdit const): |
| (WebCore::Editor::canEditRichly const): |
| (WebCore::Editor::canDHTMLCut): |
| (WebCore::Editor::canDHTMLCopy): |
| (WebCore::Editor::canCopy const): |
| (WebCore::Editor::canPaste const): |
| (WebCore::Editor::canDelete const): |
| (WebCore::Editor::shouldSmartDelete): |
| (WebCore::Editor::deleteWithDirection): |
| (WebCore::Editor::deleteSelectionWithSmartDelete): |
| (WebCore::Editor::clearText): |
| (WebCore::Editor::replaceSelectionWithFragment): |
| (WebCore::Editor::selectedRange): |
| (WebCore::Editor::tryDHTMLCopy): |
| (WebCore::Editor::tryDHTMLCut): |
| (WebCore::Editor::shouldInsertText const): |
| (WebCore::Editor::hasBidiSelection const): |
| (WebCore::Editor::selectionUnorderedListState const): |
| (WebCore::Editor::selectionOrderedListState const): |
| (WebCore::Editor::increaseSelectionListLevel): |
| (WebCore::Editor::increaseSelectionListLevelOrdered): |
| (WebCore::Editor::increaseSelectionListLevelUnordered): |
| (WebCore::Editor::decreaseSelectionListLevel): |
| (WebCore::Editor::findEventTargetFromSelection const): |
| (WebCore::Editor::applyStyle): |
| (WebCore::Editor::applyParagraphStyle): |
| (WebCore::Editor::applyStyleToSelection): |
| (WebCore::Editor::applyParagraphStyleToSelection): |
| (WebCore::Editor::selectionStartHasStyle const): |
| (WebCore::Editor::selectionHasStyle const): |
| (WebCore::Editor::selectionStartCSSPropertyValue): |
| (WebCore::Editor::appliedEditing): |
| (WebCore::Editor::Editor): |
| (WebCore::Editor::clear): |
| (WebCore::Editor::insertText): |
| (WebCore::Editor::insertTextForConfirmedComposition): |
| (WebCore::Editor::insertTextWithoutSendingTextEvent): |
| (WebCore::Editor::insertLineBreak): |
| (WebCore::Editor::insertParagraphSeparator): |
| (WebCore::Editor::performCutOrCopy): |
| (WebCore::Editor::paste): |
| (WebCore::Editor::pasteAsQuotation): |
| (WebCore::Editor::renderLayerDidScroll): |
| (WebCore::Editor::setBaseWritingDirection): |
| (WebCore::Editor::baseWritingDirectionForSelectionStart const): |
| (WebCore::Editor::selectComposition): |
| (WebCore::SetCompositionScope::SetCompositionScope): |
| (WebCore::SetCompositionScope::~SetCompositionScope): |
| (WebCore::Editor::setComposition): |
| (WebCore::Editor::ignoreSpelling): |
| (WebCore::Editor::learnSpelling): |
| (WebCore::Editor::advanceToNextMisspelling): |
| (WebCore::Editor::misspelledWordAtCaretOrRange const): |
| (WebCore::Editor::isSelectionUngrammatical): |
| (WebCore::Editor::guessesForMisspelledWord const): |
| (WebCore::Editor::guessesForMisspelledOrUngrammatical): |
| (WebCore::Editor::markMisspellingsAfterTypingToWord): |
| (WebCore::Editor::isSpellCheckingEnabledInFocusedNode const): |
| (WebCore::Editor::markAllMisspellingsAndBadGrammarInRanges): |
| (WebCore::Editor::markAndReplaceFor): |
| (WebCore::Editor::updateMarkersForWordsAffectedByEditing): |
| (WebCore::Editor::rangeForPoint): |
| (WebCore::Editor::revealSelectionAfterEditingOperation): |
| (WebCore::Editor::setIgnoreSelectionChanges): |
| (WebCore::Editor::getCompositionSelection const): |
| (WebCore::Editor::transpose): |
| (WebCore::Editor::changeSelectionAfterCommand): |
| (WebCore::Editor::selectedText const): |
| (WebCore::Editor::selectedTextForDataTransfer const): |
| (WebCore::Editor::insertTextPlaceholder): |
| (WebCore::Editor::removeTextPlaceholder): |
| (WebCore::Editor::shouldChangeSelection const): |
| (WebCore::Editor::computeAndSetTypingStyle): |
| (WebCore::Editor::findString): |
| (WebCore::Editor::countMatchesForText): |
| (WebCore::Editor::respondToChangedSelection): |
| (WebCore::Editor::shouldDetectTelephoneNumbers const): |
| (WebCore::Editor::scanSelectionForTelephoneNumbers): |
| (WebCore::Editor::editorUIUpdateTimerFired): |
| (WebCore::Editor::selectionStartHasMarkerFor const): |
| (WebCore::Editor::stringForCandidateRequest const): |
| (WebCore::Editor::contextRangeForCandidateRequest const): |
| (WebCore::Editor::fontAttributesAtSelectionStart const): |
| (WebCore::Editor::notifyClientOfAttachmentUpdates): |
| (WebCore::Editor::handleAcceptedCandidate): |
| (WebCore::Editor::unifiedTextCheckerEnabled const): |
| (WebCore::Editor::toggleOverwriteModeEnabled): |
| (WebCore::Editor::fontForSelection const): |
| (WebCore::Editor::canCopyExcludingStandaloneImages const): |
| (WebCore::Editor::document const): Deleted. |
| * editing/Editor.h: |
| (WebCore::TemporarySelectionChange::TemporarySelectionChange): |
| (WebCore::IgnoreSelectionChangeForScope::IgnoreSelectionChangeForScope): |
| (WebCore::Editor::document const): |
| * editing/EditorCommand.cpp: |
| (WebCore::executeSwapWithMark): |
| (WebCore::Editor::command): |
| (WebCore::Editor::Command::Command): |
| (WebCore::Editor::Command::execute const): |
| * editing/FrameSelection.cpp: |
| (WebCore::shouldAlwaysUseDirectionalSelection): |
| (WebCore::FrameSelection::FrameSelection): |
| (WebCore::FrameSelection::rootEditableElementOrDocumentElement const): |
| (WebCore::FrameSelection::setSelectionByMouseIfDifferent): |
| (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance): |
| (WebCore::FrameSelection::setSelection): |
| (WebCore::updateSelectionByUpdatingLayoutOrStyle): |
| (WebCore::FrameSelection::setNeedsSelectionUpdate): |
| (WebCore::FrameSelection::updateAndRevealSelection): |
| (WebCore::FrameSelection::updateDataDetectorsForSelection): |
| (WebCore::FrameSelection::positionForPlatform const): |
| (WebCore::FrameSelection::nextWordPositionForPlatform): |
| (WebCore::FrameSelection::modifyMovingRight): |
| (WebCore::FrameSelection::modifyMovingLeft): |
| (WebCore::FrameSelection::modify): |
| (WebCore::FrameSelection::willBeRemovedFromFrame): |
| (WebCore::FrameSelection::absoluteCaretBounds): |
| (WebCore::FrameSelection::recomputeCaretRect): |
| (WebCore::FrameSelection::contains const): |
| (WebCore::FrameSelection::selectAll): |
| (WebCore::FrameSelection::focusedOrActiveStateChanged): |
| (WebCore::FrameSelection::isFocusedAndActive const): |
| (WebCore::shouldStopBlinkingDueToTypingCommand): |
| (WebCore::FrameSelection::updateAppearance): |
| (WebCore::FrameSelection::setCaretVisibility): |
| (WebCore::FrameSelection::setFocusedElementIfNeeded): |
| (WebCore::FrameSelection::shouldDeleteSelection const): |
| (WebCore::FrameSelection::selectionBounds const): |
| (WebCore::FrameSelection::getClippedVisibleTextRectangles const): |
| (WebCore::FrameSelection::currentForm const): |
| (WebCore::FrameSelection::revealSelection): |
| (WebCore::FrameSelection::setSelectionFromNone): |
| (WebCore::FrameSelection::shouldChangeSelection const): |
| (WebCore::FrameSelection::setShouldShowBlockCursor): |
| (WebCore::FrameSelection::appearanceUpdateTimerFired): |
| (WebCore::FrameSelection::updateAppearanceAfterLayoutOrStyleChange): |
| (WebCore::FrameSelection::selectRangeOnElement): |
| (WebCore::FrameSelection::setCaretBlinks): |
| (WebCore::FrameSelection::prepareForDestruction): Deleted. |
| * editing/FrameSelection.h: |
| * editing/InsertIntoTextNodeCommand.cpp: |
| (WebCore::InsertIntoTextNodeCommand::doApply): |
| * editing/InsertLineBreakCommand.cpp: |
| (WebCore::InsertLineBreakCommand::doApply): |
| * editing/InsertTextCommand.cpp: |
| (WebCore::InsertTextCommand::doApply): |
| * editing/ReplaceRangeWithTextCommand.cpp: |
| (WebCore::ReplaceRangeWithTextCommand::doApply): |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::ReplaceSelectionCommand::doApply): |
| * editing/SetSelectionCommand.cpp: |
| (WebCore::SetSelectionCommand::doApply): |
| (WebCore::SetSelectionCommand::doUnapply): |
| * editing/SpellChecker.cpp: |
| (WebCore::SpellChecker::SpellChecker): |
| (WebCore::SpellChecker::client const): |
| (WebCore::SpellChecker::isAsynchronousEnabled const): |
| (WebCore::SpellChecker::invokeRequest): |
| (WebCore::SpellChecker::didCheck): |
| (WebCore::SpellChecker::didCheckSucceed): |
| * editing/SpellChecker.h: |
| * editing/SpellingCorrectionCommand.cpp: |
| (WebCore::SpellingCorrectionCommand::doApply): |
| * editing/TypingCommand.cpp: |
| (WebCore::TypingCommand::deleteSelection): |
| (WebCore::TypingCommand::deleteKeyPressed): |
| (WebCore::TypingCommand::forwardDeleteKeyPressed): |
| (WebCore::TypingCommand::updateSelectionIfDifferentFromCurrentSelection): |
| (WebCore::TypingCommand::insertText): |
| (WebCore::TypingCommand::insertLineBreak): |
| (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): |
| (WebCore::TypingCommand::insertParagraphSeparator): |
| (WebCore::TypingCommand::lastTypingCommandIfStillOpenForTyping): |
| (WebCore::TypingCommand::closeTyping): |
| (WebCore::TypingCommand::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): |
| (WebCore::TypingCommand::markMisspellingsAfterTyping): |
| (WebCore::TypingCommand::willAddTypingToOpenCommand): |
| (WebCore::TypingCommand::typingAddedToOpenCommand): |
| (WebCore::TypingCommand::insertTextAndNotifyAccessibility): |
| (WebCore::TypingCommand::insertTextRunWithoutNewlines): |
| (WebCore::TypingCommand::insertLineBreakAndNotifyAccessibility): |
| (WebCore::TypingCommand::insertParagraphSeparatorAndNotifyAccessibility): |
| (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContentAndNotifyAccessibility): |
| * editing/TypingCommand.h: |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::Editor::selectionInHTMLFormat): |
| (WebCore::selectionAsAttributedString): |
| (WebCore::Editor::writeSelectionToPasteboard): |
| (WebCore::Editor::writeSelection): |
| (WebCore::Editor::selectionInWebArchiveFormat): |
| (WebCore::Editor::replaceSelectionWithAttributedString): |
| (WebCore::Editor::webContentFromPasteboard): |
| (WebCore::Editor::takeFindStringFromSelection): |
| * editing/gtk/EditorGtk.cpp: |
| (WebCore::Editor::pasteWithPasteboard): |
| (WebCore::Editor::writeSelectionToPasteboard): |
| (WebCore::Editor::webContentFromPasteboard): |
| * editing/ios/EditorIOS.mm: |
| (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection): |
| (WebCore::Editor::removeUnchangeableStyles): |
| (WebCore::Editor::pasteWithPasteboard): |
| (WebCore::Editor::insertDictationPhrases): |
| (WebCore::Editor::setDictationPhrasesAsChildOfElement): |
| (WebCore::Editor::setTextAsChildOfElement): |
| (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): |
| * editing/libwpe/EditorLibWPE.cpp: |
| (WebCore::Editor::writeSelectionToPasteboard): |
| (WebCore::Editor::pasteWithPasteboard): |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::readSelectionFromPasteboard): |
| (WebCore::Editor::replaceNodeFromPasteboard): |
| (WebCore::Editor::selectionWillChange): |
| * editing/win/EditorWin.cpp: |
| (WebCore::Editor::pasteWithPasteboard): |
| (WebCore::Editor::webContentFromPasteboard): |
| * history/CachedFrame.cpp: |
| (WebCore::CachedFrame::destroy): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::willTransitionToCommitted): |
| (WebCore::FrameLoader::closeURL): |
| (WebCore::FrameLoader::didOpenURL): |
| (WebCore::FrameLoader::clear): |
| * page/Frame.cpp: |
| (WebCore::Frame::Frame): |
| (WebCore::Frame::setView): |
| (WebCore::Frame::setDocument): |
| (WebCore::Frame::requestDOMPasteAccess): |
| (WebCore::Frame::setPageAndTextZoomFactors): |
| * page/Frame.h: |
| * page/TextIndicator.cpp: |
| (WebCore::TextIndicator::createWithRange): |
| |
| 2020-04-28 Antti Koivisto <antti@apple.com> |
| |
| msn.com: Header flickers when scrolling articles |
| https://bugs.webkit.org/show_bug.cgi?id=211126 |
| <rdar://problem/56439177> |
| |
| Reviewed by Simon Fraser. |
| |
| Test: compositing/fixed-with-clip-stability.html |
| |
| In case of fixed positioned elements the decision to create backing depends on clip rect. |
| However RenderLayer::localClipRect() tests for backing in call to clippingRootForPainting(). This creates |
| instability since clipping depends on backing decision, and backing decision depends on clipping. |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::localClipRect const): |
| |
| Specifically the result of clipExceedsBounds test here is affected by computed offsetFromRoot: |
| "clipRect.contains(cssClipRect)" test fails for zero sized clips with different offsets. |
| |
| Compute clipExceedsBounds by looking at the clip sizes only and ignoring the position (which should match). |
| |
| 2020-04-28 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] Introduce FormattingContext::ConstraintsForOutOfFlowContent |
| https://bugs.webkit.org/show_bug.cgi?id=211125 |
| |
| Reviewed by Antti Koivisto. |
| |
| Horizontal and vertical out-of-flow constraints are always computed and used in pairs. |
| |
| * layout/FormattingContext.cpp: |
| (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry): |
| (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry): |
| (WebCore::Layout::FormattingContext::layoutOutOfFlowContent): |
| * layout/FormattingContext.h: |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::constraintsForOutOfFlowContent): |
| (WebCore::Layout::FormattingContext::Geometry::horizontalConstraintsForOutOfFlow): Deleted. |
| (WebCore::Layout::FormattingContext::Geometry::verticalConstraintsForOutOfFlow): Deleted. |
| * layout/LayoutContext.cpp: |
| (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree): |
| * layout/LayoutUnits.h: |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::layoutInFlowContent): |
| * layout/inlineformatting/InlineFormattingContext.cpp: |
| (WebCore::Layout::InlineFormattingContext::layoutInFlowContent): |
| |
| 2020-04-28 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC] Introduce FormattingContext::ConstraintsForInFlowContent |
| https://bugs.webkit.org/show_bug.cgi?id=211113 |
| |
| Reviewed by Antti Koivisto. |
| |
| This makes the layoutInFlowContent() related code look simpler. |
| |
| * layout/FormattingContext.cpp: |
| (WebCore::Layout::FormattingContext::layoutOutOfFlowContent): |
| * layout/FormattingContext.h: |
| * layout/LayoutContext.cpp: |
| (WebCore::Layout::LayoutContext::layoutFormattingContextSubtree): |
| * layout/blockformatting/BlockFormattingContext.cpp: |
| (WebCore::Layout::BlockFormattingContext::layoutInFlowContent): |
| * layout/blockformatting/BlockFormattingContext.h: |
| * layout/inlineformatting/InlineFormattingContext.cpp: |
| (WebCore::Layout::InlineFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::InlineFormattingContext::lineLayout): |
| * layout/inlineformatting/InlineFormattingContext.h: |
| * layout/integration/LayoutIntegrationLineLayout.cpp: |
| (WebCore::LayoutIntegration::LineLayout::layout): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| * layout/tableformatting/TableFormattingContext.h: |
| |
| 2020-04-28 Philippe Normand <pnormand@igalia.com> |
| |
| media/track/track-load-error-readyState.html passes only when accompanied by some other tests |
| https://bugs.webkit.org/show_bug.cgi?id=210976 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::resetToConsistentState): Reset caption |
| display mode, which might have been overriden by a previous test. |
| |
| 2020-04-28 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes late April 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=211099 |
| |
| Unreviewed build fix. |
| |
| No new tests needed. |
| |
| * Modules/cache/DOMCacheStorage.cpp: Sprinkle DOMCacheEngine:: namespace prefixes as needed. |
| (WebCore::DOMCacheStorage::findCacheOrCreate): |
| (WebCore::DOMCacheStorage::retrieveCaches): |
| (WebCore::DOMCacheStorage::doOpen): |
| (WebCore::DOMCacheStorage::doRemove): |
| * bindings/js/JSExecStateInstrumentation.h: Ditto for JSC:: namespace prefixes. |
| (WebCore::JSExecState::instrumentFunction): |
| * dom/ScriptedAnimationController.h: Add missing ReducedResolutionSeconds.h header. |
| * editing/TextCheckingHelper.h: Add missing forward declaration for Position. |
| * html/URLSearchParams.h: Add missing ExceptionOr.h header. |
| |
| 2020-04-28 Charlie Turner <cturner@igalia.com> |
| |
| [EME][CDMProxy] Default initialize m_numDecryptorsWaitingForKey member |
| https://bugs.webkit.org/show_bug.cgi?id=210970 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| This was causing non-deterministic reads of the |
| m_numDecryptorsWaitingForKey member. Sometimes a waiting for key |
| event would fail to fire and cause test failures. I thought |
| std::atomic<int> would default initialize to zero, but after |
| spec-diving I realise now I was wrong about that. |
| |
| Test: encrypted-media/clearkey-mp4-waiting-for-a-key.https.html |
| |
| * platform/encryptedmedia/CDMProxy.h: |
| |
| 2020-04-28 Youenn Fablet <youenn@apple.com> |
| |
| RTCPeerConnection should not remove its created remote MediaStream objects until getting close |
| https://bugs.webkit.org/show_bug.cgi?id=211070 |
| |
| Reviewed by Alex Christensen. |
| |
| Remove no longer needed code. |
| This aligns with the spec and Firefox implementation. |
| Test: webrtc/direction-change.html |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::transceiverBackendFromSender): |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: |
| |
| 2020-04-28 Youenn Fablet <youenn@apple.com> |
| |
| Ensure remote track event gets unmuted after the track event is fired |
| https://bugs.webkit.org/show_bug.cgi?id=211071 |
| |
| Reviewed by Alex Christensen. |
| |
| This code was made obsolete by the setMuted(false) call done just after firing the track event. |
| Given the setMuted(false) in addPendingTrackEvent was done asynchronously and was triggering firing the muted event asynchronously, |
| this change should not be observable from JS. |
| |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::addPendingTrackEvent): |
| |
| 2020-04-28 Rob Buis <rbuis@igalia.com> |
| |
| Make HistoryController an inner class of FrameLoader |
| https://bugs.webkit.org/show_bug.cgi?id=211090 |
| |
| Reviewed by Darin Adler. |
| |
| Make HistoryController an inner class of FrameLoader, this allows |
| us to move some methods only used by HistoryController out of the |
| FrameLoader public API. |
| |
| * loader/FrameLoader.h: |
| * loader/HistoryController.cpp: |
| * loader/HistoryController.h: |
| |
| 2020-04-27 Simon Fraser <simon.fraser@apple.com> |
| |
| Do correct clipping of composited replaced elements with border-radius |
| https://bugs.webkit.org/show_bug.cgi?id=211114 |
| |
| Reviewed by Zalan Bujtas. |
| |
| For replaced elements with composited content (video, WebGL), RenderLayerBacking |
| incorrectly used the rounded inner border rect to clip the contents. This doesn't match |
| painted replaced elements, which clip to the inside of the padding box. |
| |
| Fix by implementing RenderReplaced::roundedContentBoxRect() and calling it from compositing |
| code. Also add a helper to get the rounded border box rect, and call it in various places. |
| |
| Test: compositing/clipping/border-radius-on-webgl.html |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::roundedBorderBoxRect const): |
| * rendering/RenderBox.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateBackdropFiltersGeometry): |
| (WebCore::RenderLayerBacking::updateConfiguration): |
| (WebCore::RenderLayerBacking::updateGeometry): |
| (WebCore::RenderLayerBacking::updateContentsRects): |
| (WebCore::RenderLayerBacking::resetContentsRect): |
| (WebCore::RenderLayerBacking::updateChildClippingStrategy): |
| (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): |
| (WebCore::RenderLayerBacking::updateImageContents): |
| (WebCore::backgroundRectForBox): |
| * rendering/RenderLayerBacking.h: |
| * rendering/RenderReplaced.cpp: |
| (WebCore::RenderReplaced::roundedContentBoxRect const): |
| * rendering/RenderReplaced.h: |
| |
| 2020-04-27 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Timestamps should be the same for all rendering update steps |
| https://bugs.webkit.org/show_bug.cgi?id=207153 |
| |
| Reviewed by Simon Fraser. |
| |
| The HTML 5 event loop sepcs states that timestamps should be the same for |
| all rendering update steps. |
| |
| Specs link (step 9): |
| https://html.spec.whatwg.org/multipage/webappapis.html#event-loop-processing-model |
| |
| This patch also fixes some issues in IntersectionObserver. |
| |
| Test: intersection-observer/intersection-observer-callback-timestamp.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::updateIntersectionObservations): |
| (WebCore::Document::notifyIntersectionObserversTimerFired): Deleted. |
| * dom/Document.h: |
| -- Handle the case when two floats are areEssentiallyEqual(). |
| -- Execute the IntersectionObserver immediately and do not wait until the |
| next CFRunLoop event since this does not implement the specs. |
| |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::freezeNowTimestamp): |
| (WebCore::DOMWindow::unfreezeNowTimestamp): |
| (WebCore::DOMWindow::frozenNowTimestamp const): |
| * page/DOMWindow.h: |
| Provide a frozen now() timestamp in seconds to be used internally only. |
| |
| * page/IntersectionObserver.cpp: |
| (WebCore::IntersectionObserver::nowTimestamp const): |
| Use the frozenNowTimestamp(). |
| |
| * page/Page.cpp: |
| (WebCore::Page::updateRendering): |
| Freeze the timestamps while serving the rendering update steps. |
| |
| 2020-04-27 Dean Jackson <dino@apple.com> |
| |
| getShaderPrecisionFormat returns the wrong values |
| https://bugs.webkit.org/show_bug.cgi?id=211013 |
| <rdar://problem/62378056> |
| |
| Reviewed by Darin Adler. |
| |
| Gregg pointed out that our code hardcodes values for |
| getShaderPrecisionFormat. The fix is simply to call into |
| the underlying GL function. |
| |
| Covered by the existing test: webgl/1.0.3/conformance/misc/shader-precision-format.html |
| |
| However, that just tests minimum values. Devices have different |
| actual results. |
| |
| * platform/graphics/angle/GraphicsContextGLANGLE.cpp: |
| (WebCore::GraphicsContextGLOpenGL::getShaderPrecisionFormat): |
| |
| 2020-04-27 Simon Fraser <simon.fraser@apple.com> |
| |
| Rename scrollableAreaForScrollLayerID to scrollableAreaForScrollingNodeID |
| https://bugs.webkit.org/show_bug.cgi?id=211091 |
| |
| Reviewed by Myles C. Maxfield. |
| |
| The argument to scrollableAreaForScrollLayerID() is a ScrollingNodeID, not a layerID. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::scrollableAreaForScrollingNodeID const): |
| (WebCore::FrameView::scrollableAreaForScrollLayerID const): Deleted. |
| * page/FrameView.h: |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): |
| (WebCore::AsyncScrollingCoordinator::setActiveScrollSnapIndices): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::scrollableAreaForScrollingNodeID const): |
| (WebCore::RenderLayerCompositor::scrollableAreaForScrollLayerID const): Deleted. |
| * rendering/RenderLayerCompositor.h: |
| |
| 2020-04-27 Ryan Haddad <ryanhaddad@apple.com> |
| |
| [Cocoa] stop using out arguments for document attributes when converting to attributed strings |
| https://bugs.webkit.org/show_bug.cgi?id=211048 |
| |
| Unreviewed partial revert of r260739 to remove unexpected logging that broke Catalina-Release-WK2-Perf tests. |
| |
| * platform/network/cocoa/NetworkStorageSessionCocoa.mm: |
| (WebCore::policyProperties): |
| * platform/network/cocoa/ResourceRequestCocoa.mm: |
| (WebCore::siteForCookies): |
| |
| 2020-04-27 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation should not aggregate text from different navigation anchor elements |
| https://bugs.webkit.org/show_bug.cgi?id=211081 |
| <rdar://problem/59553658> |
| |
| Reviewed by Megan Gardner. |
| |
| Tweak the item boundary heuristic in `TextManipulationController::observeParagraphs` to separate text in |
| links and list items under navigation elements (either nav elements, or elements with the "navigation" |
| accessibility role) into separate paragraphs. |
| |
| Also, extend the item boundary rule for button elements to apply to elements with the "button" |
| accessibility role as well. |
| |
| Test: TextManipulation.StartTextManipulationTreatsInlineBlockLinksAndButtonsAsParagraphs |
| TextManipulation.StartTextManipulationTreatsLinksInNavigationElementsAsParagraphs |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::observeParagraphs): |
| |
| 2020-04-27 Antoine Quint <graouts@apple.com> |
| |
| Clean up some useless includes of CSSAnimationController.h |
| https://bugs.webkit.org/show_bug.cgi?id=211066 |
| |
| Reviewed by Antti Koivisto. |
| |
| These files don't actually use any of the CSSAnimationController APIs. |
| |
| * page/ios/FrameIOS.mm: |
| * rendering/RenderObject.cpp: |
| |
| 2020-04-27 Antoine Quint <graouts@apple.com> |
| |
| Rename CSSAnimationController accessors from animation() to legacyAnimation() |
| https://bugs.webkit.org/show_bug.cgi?id=211082 |
| |
| Reviewed by Simon Fraser. |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::computeRenderStyleForProperty): |
| * dom/Document.cpp: |
| (WebCore::Document::resolveStyle): |
| (WebCore::Document::didBecomeCurrentDocumentInFrame): |
| (WebCore::Document::prepareForDestruction): |
| (WebCore::Document::implicitClose): |
| (WebCore::Document::resume): |
| * dom/Element.cpp: |
| (WebCore::Element::removedFromAncestor): |
| * dom/PseudoElement.cpp: |
| (WebCore::PseudoElement::clearHostElement): |
| * history/CachedFrame.cpp: |
| (WebCore::CachedFrame::destroy): |
| * page/Frame.cpp: |
| (WebCore::Frame::clearTimers): |
| (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): |
| * page/Frame.h: |
| * page/FrameView.cpp: |
| (WebCore::FrameView::didDestroyRenderTree): |
| (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive): |
| * page/FrameViewLayoutContext.cpp: |
| (WebCore::FrameViewLayoutContext::layout): |
| * page/Page.cpp: |
| (WebCore::Page::handleLowModePowerChange): |
| (WebCore::Page::setIsVisibleInternal): |
| (WebCore::Page::hiddenPageCSSAnimationSuspensionStateChanged): |
| * page/animation/CSSAnimationController.cpp: |
| (WebCore::CSSAnimationControllerPrivate::updateThrottlingState): |
| (WebCore::CSSAnimationControllerPrivate::suspendAnimations): |
| (WebCore::CSSAnimationControllerPrivate::resumeAnimations): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::currentTransform const): |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateGeometry): |
| (WebCore::RenderLayerBacking::notifyAnimationStarted): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::flushPendingLayerChanges): |
| (WebCore::RenderLayerCompositor::updateCompositingLayers): |
| (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const): |
| (WebCore::RenderLayerCompositor::isRunningTransformAnimation const): |
| * rendering/RenderObject.h: |
| (WebCore::RenderObject::legacyAnimation const): |
| (WebCore::RenderObject::animation const): Deleted. |
| * rendering/updating/RenderTreeUpdater.cpp: |
| (WebCore::RenderTreeUpdater::tearDownRenderers): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::createAnimatedElementUpdate): |
| * testing/Internals.cpp: |
| (WebCore::Internals::numberOfActiveAnimations const): |
| (WebCore::Internals::animationsAreSuspended const): |
| (WebCore::Internals::animationsInterval const): |
| (WebCore::Internals::suspendAnimations const): |
| (WebCore::Internals::resumeAnimations const): |
| (WebCore::Internals::pauseAnimationAtTimeOnElement): |
| (WebCore::Internals::pauseAnimationAtTimeOnPseudoElement): |
| (WebCore::Internals::pauseTransitionAtTimeOnElement): |
| (WebCore::Internals::pauseTransitionAtTimeOnPseudoElement): |
| |
| 2020-04-27 Per Arne Vollan <pvollan@apple.com> |
| |
| [Cocoa] After r258891, r255119 can be reverted |
| https://bugs.webkit.org/show_bug.cgi?id=211083 |
| <rdar://problem/60714318> |
| |
| Unreviewed revert of r255119. |
| |
| Copying a MIME type map from the UI process to the WebContent process on startup is not needed anymore, |
| since r258891 will map the Launch Services database in the WebContent process. |
| |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::commonMimeTypesMap): |
| (WebCore::typesForCommonExtension): |
| (WebCore::overriddenMimeTypesMap): Deleted. |
| * platform/MIMETypeRegistry.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::mediaMIMETypeForExtension): Deleted. |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-04-27 Darin Adler <darin@apple.com> |
| |
| Improve performance of commonInclusiveAncestor for deeply nested nodes |
| https://bugs.webkit.org/show_bug.cgi?id=211078 |
| |
| Reviewed by Antti Koivisto. |
| |
| * dom/Node.cpp: |
| (WebCore::depth): Added. |
| (WebCore::commonInclusiveAncestor): Replaced implementation that walks the |
| parent chain of the second node repeatedly with one that walks the parent |
| chain of each node twice. |
| |
| 2020-04-27 Daniel Bates <dabates@apple.com> |
| |
| Caret may be placed in the wrong spot for text input context that is a form control |
| https://bugs.webkit.org/show_bug.cgi?id=210939 |
| <rdar://problem/61943089> |
| |
| Reviewed by Darin Adler. |
| |
| Add a helper function that returns the closest editable position inside an element |
| for a given point (if any). |
| |
| * editing/Editing.cpp: |
| (WebCore::closestEditablePositionInElementForAbsolutePoint): Added. |
| * editing/Editing.h: |
| |
| 2020-04-27 Alicia Boya García <aboya@igalia.com> |
| |
| [GStreamer] Rework WebKitWebSrc threading |
| https://bugs.webkit.org/show_bug.cgi?id=210284 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| WebKitWebSrc as it is in master has a number of race conditions |
| leading to occasional starvation (due to cancelling the wrong request) |
| or data corruption (due to pushing data from a cancelled request). |
| |
| The threading situation wasn't easy to follow, as it wasn't clear |
| access to what members should be protected by what mutex, in what |
| circumstances. Also, some parts of the design were also introducing |
| addicional complexity, such as the first request being sent from the |
| main thread whereas the rest were being sent from the streaming thread |
| or basesrc async start. |
| |
| In response, this patch reworks all the locking in WebKitWebSrc to use |
| WTF::DataMutex. This ensures all accesses to its (now explicit) |
| protected members are locked. The two mutexes and condition variables |
| have been simplified into one, as there was no obvious need or benefit |
| for two of each in this case. |
| |
| Requests have been numbered, which allows to safely and atomically |
| ignore results from cancelled requests, avoiding data corruption |
| races, and makes following them in debug logs much easier. |
| |
| The conditions for making and cancelling requests have been simplified |
| to a simpler and safer model: There is at most only one active request |
| at anytime, flushes cancel the request, and the first create() call |
| always makes the new request (both at startup and after a flush). |
| Debug asserts and notes about the flow of operations during basesrc |
| seeks have been provided. |
| |
| As this effort needed a review of the entire WebKitWebSrc, cleanups, |
| corrections and documentation comments have been provided where |
| appropriate. |
| |
| This patch introduces no visible behavior changes, just stability |
| improvements. |
| |
| * platform/graphics/gstreamer/GRefPtrGStreamer.h: |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: |
| (WebKitWebSrcPrivate::~WebKitWebSrcPrivate): |
| (webkit_web_src_class_init): |
| (webkitWebSrcReset): |
| (webKitWebSrcConstructed): |
| (webKitWebSrcSetProperty): |
| (webKitWebSrcGetProperty): |
| (webKitWebSrcSetContext): |
| (webKitWebSrcSendEvent): |
| (restartLoaderIfNeeded): |
| (stopLoaderIfNeeded): |
| (webKitWebSrcCreate): |
| (webKitWebSrcStart): |
| (webKitWebSrcMakeRequest): |
| (webKitWebSrcStop): |
| (webKitWebSrcGetSize): |
| (webKitWebSrcIsSeekable): |
| (webKitWebSrcDoSeek): |
| (webKitWebSrcQuery): |
| (webKitWebSrcUnLock): |
| (webKitWebSrcUnLockStop): |
| (webKitWebSrcSetUri): |
| (webKitWebSrcSetMediaPlayer): |
| (webKitSrcPassedCORSAccessCheck): |
| (CachedResourceStreamingClient::CachedResourceStreamingClient): |
| (CachedResourceStreamingClient::checkUpdateBlocksize): |
| (CachedResourceStreamingClient::responseReceived): |
| (CachedResourceStreamingClient::dataReceived): |
| (CachedResourceStreamingClient::accessControlCheckFailed): |
| (CachedResourceStreamingClient::loadFailed): |
| (CachedResourceStreamingClient::loadFinished): |
| (webKitSrcWouldTaintOrigin): |
| * platform/graphics/gstreamer/WebKitWebSourceGStreamer.h: |
| |
| 2020-04-26 Darin Adler <darin@apple.com> |
| |
| Replace more uses of live ranges with SimpleRange |
| https://bugs.webkit.org/show_bug.cgi?id=211058 |
| |
| Reviewed by Antti Koivisto. |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::textUnderElement const): Use SimpleRange. |
| |
| * dom/BoundaryPoint.h: Moved makeBoundaryPointAfterNodeContents here so it |
| can be used more places. |
| |
| * dom/Node.cpp: |
| (WebCore::commonInclusiveAncestor): Moved the commonAncestorContainer function |
| here from Range, decided to use the "inclusive ancestor" naming from the |
| DOM specification, and used RefPtr for the result since it's part of our modern |
| safer design to always use smart pointers for return values. |
| * dom/Node.h: Added commonInclusiveAncestor. |
| |
| * dom/Position.cpp: |
| (WebCore::commonShadowIncludingAncestor): Call commonInclusiveAncestor. |
| |
| * dom/Range.cpp: |
| (WebCore::Range::commonAncestorContainer): Deleted. |
| (WebCore::Range::isPointInRange): Call commonInclusiveAncestor. |
| (WebCore::Range::comparePoint const): Ditto. |
| (WebCore::Range::compareBoundaryPoints): Ditto. |
| (WebCore::Range::collectSelectionRectsWithoutUnionInteriorLines const): Ditto. |
| * dom/Range.h: |
| (WebCore::Range::commonAncestorContainer const): Call commonInclusiveAncestor. |
| |
| * dom/SimpleRange.cpp: |
| (WebCore::makeBoundaryPointAfterNodeContents): Moved to BoundaryPoint.h. |
| |
| * editing/AlternativeTextController.cpp: |
| (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): Use |
| SimpleRange instead of live range. |
| (WebCore::AlternativeTextController::respondToUnappliedEditing): Ditto. |
| (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand): Ditto. |
| (WebCore::AlternativeTextController::processMarkersOnTextToBeReplacedByResult): Ditto. |
| |
| * editing/ChangeListTypeCommand.cpp: |
| (WebCore::listConversionTypeForSelection): use commonInclusiveAncestor. |
| |
| * editing/Editing.cpp: |
| (WebCore::isNodeVisiblyContainedWithin): Take a SimpleRange argument. |
| * editing/Editing.h: Updated for the above. |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::addRangeToKillRing): Take a SimpleRange argument. |
| (WebCore::Editor::shouldDetectTelephoneNumbers const): Made this const and |
| tweaked coding style a bit. |
| (WebCore::scanForTelephoneNumbers): Moved this, made it a non-member function, |
| renamed from scanRangeForTelephoneNumbers, use SimpleRange. |
| (WebCore::extendSelection): Added. Factored out some logic from the function below. |
| (WebCore::Editor::scanSelectionForTelephoneNumbers): Use SimpleRange. Removed |
| some unnecessary code that subtracts 1 and then adds 1 again. |
| * editing/Editor.h: Updated for the above. |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::replace): Use commonInclusiveAncestor. |
| |
| * editing/VisibleSelection.cpp: |
| (WebCore::makeSearchRange): Return a SimpleRange. |
| (WebCore::VisibleSelection::appendTrailingWhitespace): Use SimpleRange. |
| |
| * editing/WebContentReader.h: Use SimpleRange instead of a live range. |
| |
| * editing/cocoa/DataDetection.h: Use a struct, DetectedItem, for the return value |
| from the detection functions. Also changed DataDetectorTypes to an enum class so |
| it can be forward-declared instead of having to include this header. |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::detectItem): Renamed from detectItemAtPositionWithRange. Return the |
| DetectedItem struct, with a SimpleRange rather than an out argument live range. |
| (WebCore::DataDetection::detectItemAroundHitTestResult): Ditto. |
| (WebCore::contains): Added a helper function for testing bits in the |
| DataDetectorType enum. Later we can make this better using OptionSet. |
| (WebCore::constructURLStringForResult): Refactored a bit, updated for the new |
| DataDetectorTypes enum class, and to use CFEqual instead of CFStringCompare. |
| (WebCore::DataDetection::detectContentInRange): Ditto. |
| |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::Editor::webContentFromPasteboard): Use SimpleRange. |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::WebContentReader::readPlainText): Updated since context is SimpleRange. |
| * editing/gtk/EditorGtk.cpp: |
| (WebCore::createFragmentFromPasteboardData): Use SimpleRange. |
| (WebCore::Editor::webContentFromPasteboard): Use SimpleRange. |
| * editing/win/EditorWin.cpp: |
| (WebCore::Editor::webContentFromPasteboard): Use SimpleRange. |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::replaceNodeFromPasteboard): Use SimpleRange. |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Use SimpleRange. |
| * page/EventHandler.cpp: |
| (WebCore::targetNodeForClickEvent): Use commonInclusiveAncestor. Also updated |
| to return a RefPtr. |
| (WebCore::EventHandler::handleMouseReleaseEvent): Updated for the above. |
| |
| * page/Settings.yaml: Changed the default for DataDetectorTypes to be the empty |
| string rather than a named constant. |
| * page/SettingsBase.h: Forward-declare DataDetectorTypes instead of including |
| the DataDetection.h header. |
| |
| * page/TextIndicator.cpp: |
| (WebCore::TextIndicator::createWithRange): Take a SimpleRange. |
| (WebCore::TextIndicator::createWithSelectionInFrame): Ditto. |
| (WebCore::hasNonInlineOrReplacedElements): Ditto. |
| (WebCore::selectionRects): Ditto. Also renamed from getSelectionRectsForRange. |
| (WebCore::styleContainsComplexBackground): Tweaked implementation. |
| (WebCore::estimatedTextColorsForRange): Take a SimpleRange. |
| (WebCore::absoluteBoundingRectForRange): Ditto. |
| (WebCore::estimatedBackgroundColorForRange): Ditto. |
| (WebCore::containsOnlyWhiteSpaceText): Ditto. |
| (WebCore::initializeIndicator): Ditto. |
| * page/TextIndicator.h: Updated for the above. |
| |
| * page/mac/ServicesOverlayController.h: Use SimpleRange instead of a live |
| range for highlights. |
| * page/mac/ServicesOverlayController.mm: |
| (WebCore::ServicesOverlayController::Highlight::createForSelection): Take SimpleRange. |
| (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber): Ditto. |
| (WebCore::ServicesOverlayController::Highlight::Highlight): Ditto. |
| (WebCore::ServicesOverlayController::buildPhoneNumberHighlights): Ditto. |
| (WebCore::ServicesOverlayController::buildSelectionHighlight): Ditto. |
| (WebCore::ServicesOverlayController::telephoneNumberRangesForFocusedFrame): Ditto. |
| (WebCore::ServicesOverlayController::highlightsAreEquivalent): Ditto. |
| (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight): Ditto. |
| (WebCore::ServicesOverlayController::handleClick): Ditto. |
| |
| * platform/ios/DragImageIOS.mm: |
| (WebCore::createDragImageForLink): Use SimpleRange. |
| (WebCore::createDragImageForSelection): Tweaked a bit. |
| |
| 2020-04-27 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Make it possible to build with GTK4 without errors |
| https://bugs.webkit.org/show_bug.cgi?id=210967 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| * platform/PlatformPasteboard.h: |
| * platform/graphics/DisplayRefreshMonitor.cpp: |
| (WebCore::DisplayRefreshMonitor::createDefaultDisplayRefreshMonitor): |
| * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp: |
| * platform/graphics/gtk/DisplayRefreshMonitorGtk.h: |
| * platform/graphics/gtk/GdkCairoUtilities.cpp: |
| (WebCore::getDefaultCairoFontOptions): |
| * platform/gtk/CursorGtk.cpp: |
| (WebCore::createCustomCursor): |
| * platform/gtk/DragImageGtk.cpp: |
| (WebCore::dissolveDragImageToFraction): |
| * platform/gtk/GRefPtrGtk.cpp: |
| * platform/gtk/GRefPtrGtk.h: |
| * platform/gtk/GUniquePtrGtk.h: |
| * platform/gtk/GtkVersioning.h: |
| (gdk_event_copy): |
| (gtk_widget_size_allocate): |
| (gtk_widget_queue_resize_no_redraw): |
| (gdk_event_get_state): |
| (gdk_event_get_coords): |
| (gdk_event_get_root_coords): |
| (gdk_event_is_scroll_stop_event): |
| (gdk_event_get_scroll_direction): |
| (gdk_event_get_scroll_deltas): |
| (gdk_event_get_button): |
| * platform/gtk/PasteboardHelper.cpp: |
| * platform/gtk/PasteboardHelper.h: |
| * platform/gtk/PlatformKeyboardEventGtk.cpp: |
| (WebCore::PlatformKeyboardEvent::modifiersContainCapsLock): |
| * platform/gtk/PlatformPasteboardGtk.cpp: |
| (WebCore::PlatformPasteboard::PlatformPasteboard): |
| (WebCore::PlatformPasteboard::writeToClipboard): |
| (WebCore::PlatformPasteboard::readFromClipboard): |
| * platform/gtk/PlatformScreenGtk.cpp: |
| (WebCore::getCurrentScreenMonitor): |
| |
| 2020-04-27 Rob Buis <rbuis@igalia.com> |
| |
| Make loadURLIntoChildFrame private and non-exported |
| https://bugs.webkit.org/show_bug.cgi?id=211051 |
| |
| Reviewed by Darin Adler. |
| |
| Make loadURLIntoChildFrame private and non-exported to reduce the amount of public API functions |
| that start loads. In order to do this loadURLIntoChildFrame is being called from SubframeLoader |
| and SubframeLoader is made an inner class of FrameLoader. Because this simplifies createFrame (and |
| makes createFrame behave strictly like its name) url and referrer do not have to be passed. |
| |
| * html/HTMLObjectElement.cpp: |
| (WebCore::HTMLObjectElement::parametersForPlugin): |
| * loader/EmptyClients.cpp: |
| (WebCore::EmptyFrameLoaderClient::createFrame): |
| * loader/EmptyFrameLoaderClient.h: |
| * loader/FrameLoader.h: |
| * loader/FrameLoaderClient.h: |
| * loader/SubframeLoader.cpp: |
| (WebCore::FrameLoader::SubframeLoader::SubframeLoader): |
| (WebCore::FrameLoader::SubframeLoader::clear): |
| (WebCore::FrameLoader::SubframeLoader::requestFrame): |
| (WebCore::FrameLoader::SubframeLoader::resourceWillUsePlugin): |
| (WebCore::FrameLoader::SubframeLoader::pluginIsLoadable): |
| (WebCore::FrameLoader::SubframeLoader::requestPlugin): |
| (WebCore::FrameLoader::SubframeLoader::requestObject): |
| (WebCore::FrameLoader::SubframeLoader::createJavaAppletWidget): |
| (WebCore::FrameLoader::SubframeLoader::loadOrRedirectSubframe): |
| (WebCore::FrameLoader::SubframeLoader::loadSubframe): |
| (WebCore::FrameLoader::SubframeLoader::shouldUsePlugin): |
| (WebCore::FrameLoader::SubframeLoader::loadPlugin): |
| (WebCore::FrameLoader::SubframeLoader::completeURL const): |
| (WebCore::FrameLoader::SubframeLoader::shouldConvertInvalidURLsToBlank const): |
| (WebCore::SubframeLoader::SubframeLoader): Deleted. |
| (WebCore::SubframeLoader::clear): Deleted. |
| (WebCore::SubframeLoader::requestFrame): Deleted. |
| (WebCore::SubframeLoader::resourceWillUsePlugin): Deleted. |
| (WebCore::SubframeLoader::pluginIsLoadable): Deleted. |
| (WebCore::SubframeLoader::requestPlugin): Deleted. |
| (WebCore::SubframeLoader::requestObject): Deleted. |
| (WebCore::SubframeLoader::createJavaAppletWidget): Deleted. |
| (WebCore::SubframeLoader::loadOrRedirectSubframe): Deleted. |
| (WebCore::SubframeLoader::loadSubframe): Deleted. |
| (WebCore::SubframeLoader::shouldUsePlugin): Deleted. |
| (WebCore::SubframeLoader::loadPlugin): Deleted. |
| (WebCore::SubframeLoader::completeURL const): Deleted. |
| (WebCore::SubframeLoader::shouldConvertInvalidURLsToBlank const): Deleted. |
| * loader/SubframeLoader.h: |
| (WebCore::SubframeLoader::containsPlugins const): Deleted. |
| |
| 2020-04-27 Alberto Garcia <berto@igalia.com> |
| |
| [GTK] [2.28.0] The Yelp build crashes if DISPLAY is not set |
| https://bugs.webkit.org/show_bug.cgi?id=209431 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Don't create a PlatformDisplayLibWPE as a fallback when using |
| Wayland or X11. |
| |
| * platform/graphics/PlatformDisplay.cpp: |
| (WebCore::PlatformDisplay::createPlatformDisplay): |
| |
| 2020-04-27 Claudio Saavedra <csaavedra@igalia.com> |
| |
| Unreviewed compile-warning fix. |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::create): |
| |
| 2020-04-27 Diego Pino Garcia <dpino@igalia.com> |
| |
| Unreviewed, GTK LTS build fix after r260744 |
| https://bugs.webkit.org/show_bug.cgi?id=211069 |
| |
| * bindings/js/JSDOMBuiltinConstructor.h: |
| (WebCore::JSDOMBuiltinConstructor<JSClass>::getConstructData): |
| |
| 2020-04-27 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK4] GdkRGBA has float members instead of double |
| |
| Unreviewed warning fix. |
| |
| * platform/graphics/gtk/ColorGtk.cpp: |
| (WebCore::Color::operator GdkRGBA const): |
| |
| 2020-04-27 Ross Kirsling <ross.kirsling@sony.com> |
| |
| [JSC] CallData/ConstructData should include CallType/ConstructType |
| https://bugs.webkit.org/show_bug.cgi?id=211059 |
| |
| Reviewed by Darin Adler. |
| |
| * Modules/plugins/QuickTimePluginReplacement.mm: |
| (WebCore::QuickTimePluginReplacement::installReplacement): |
| * bindings/js/JSCallbackData.cpp: |
| (WebCore::JSCallbackData::invokeCallback): |
| * bindings/js/JSCustomElementInterface.cpp: |
| (WebCore::constructCustomElementSynchronously): |
| (WebCore::JSCustomElementInterface::upgradeElement): |
| (WebCore::JSCustomElementInterface::invokeCallback): |
| * bindings/js/JSCustomXPathNSResolver.cpp: |
| (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): |
| * bindings/js/JSDOMBuiltinConstructor.h: |
| (WebCore::JSDOMBuiltinConstructor<JSClass>::getConstructData): |
| * bindings/js/JSDOMBuiltinConstructorBase.cpp: |
| (WebCore::JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments): |
| * bindings/js/JSDOMConstructor.h: |
| (WebCore::JSDOMConstructor<JSClass>::getConstructData): |
| * bindings/js/JSDOMConstructorBase.cpp: |
| (WebCore::JSDOMConstructorBase::getCallData): |
| * bindings/js/JSDOMConstructorBase.h: |
| * bindings/js/JSDOMConstructorNotConstructable.h: |
| * bindings/js/JSDOMIterator.h: |
| (WebCore::iteratorForEach): |
| * bindings/js/JSDOMMapLike.cpp: |
| (WebCore::clearBackingMap): |
| (WebCore::setToBackingMap): |
| (WebCore::forwardFunctionCallToBackingMap): |
| (WebCore::forwardForEachCallToBackingMap): |
| * bindings/js/JSDOMNamedConstructor.h: |
| (WebCore::JSDOMNamedConstructor<JSClass>::getConstructData): |
| * bindings/js/JSDOMPromise.cpp: |
| (WebCore::DOMPromise::whenPromiseIsSettled): |
| * bindings/js/JSDOMPromiseDeferred.cpp: |
| (WebCore::createRejectedPromiseWithTypeError): |
| * bindings/js/JSDOMSetLike.cpp: |
| (WebCore::clearBackingSet): |
| (WebCore::addToBackingSet): |
| (WebCore::forwardFunctionCallToBackingSet): |
| (WebCore::forwardForEachCallToBackingSet): |
| * bindings/js/JSErrorHandler.cpp: |
| (WebCore::JSErrorHandler::handleEvent): |
| * bindings/js/JSEventListener.cpp: |
| (WebCore::JSEventListener::handleEvent): |
| * bindings/js/JSExecState.cpp: |
| (WebCore::functionCallHandlerFromAnyThread): |
| * bindings/js/JSExecState.h: |
| (WebCore::JSExecState::call): |
| (WebCore::JSExecState::profiledCall): |
| * bindings/js/JSExecStateInstrumentation.h: |
| (WebCore::JSExecState::instrumentFunction): |
| (WebCore::JSExecState::instrumentFunctionInternal): Deleted. |
| (WebCore::JSExecState::instrumentFunctionCall): Deleted. |
| (WebCore::JSExecState::instrumentFunctionConstruct): Deleted. |
| * bindings/js/JSNavigatorCustom.cpp: |
| (WebCore::JSNavigator::getUserMedia): |
| * bindings/js/JSPluginElementFunctions.cpp: |
| (WebCore::callPlugin): |
| (WebCore::pluginElementCustomGetCallData): |
| * bindings/js/JSPluginElementFunctions.h: |
| * bindings/js/ReadableStream.cpp: |
| (WebCore::ReadableStream::create): |
| (WebCore::ReadableStreamInternal::callFunction): |
| (WebCore::ReadableStream::lock): |
| * bindings/js/ReadableStreamDefaultController.cpp: |
| (WebCore::readableStreamCallFunction): |
| * bindings/js/ScheduledAction.cpp: |
| (WebCore::ScheduledAction::executeFunctionInContext): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::callInWorld): |
| (WebCore::ScriptController::executeAsynchronousUserAgentScriptInWorld): |
| * bindings/scripts/CodeGeneratorJS.pm: |
| (GenerateHeader): |
| (GeneratePluginCall): |
| (GenerateLegacyCallerDefinitions): |
| * bindings/scripts/test/JS/JSTestObj.cpp: |
| (WebCore::JSTestObj::getCallData): |
| * bindings/scripts/test/JS/JSTestObj.h: |
| * bindings/scripts/test/JS/JSTestPluginInterface.cpp: |
| (WebCore::JSTestPluginInterface::getCallData): |
| * bindings/scripts/test/JS/JSTestPluginInterface.h: |
| * bridge/NP_jsobject.cpp: |
| * bridge/objc/WebScriptObject.mm: |
| (-[WebScriptObject callWebScriptMethod:withArguments:]): |
| * bridge/objc/objc_runtime.h: |
| * bridge/objc/objc_runtime.mm: |
| (JSC::Bindings::ObjcFallbackObjectImp::getCallData): |
| * bridge/runtime_object.cpp: |
| (JSC::Bindings::RuntimeObject::getCallData): |
| (JSC::Bindings::RuntimeObject::getConstructData): |
| * bridge/runtime_object.h: |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::updateCaptionContainer): |
| (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): |
| (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange): |
| (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus): |
| * html/HTMLPlugInImageElement.cpp: |
| (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): |
| * testing/Internals.cpp: |
| (WebCore::Internals::cloneArrayBuffer): |
| |
| 2020-04-27 Diego Pino Garcia <dpino@igalia.com> |
| |
| Unreviewed, reverting r260672. |
| |
| [GTK] WebInspector tests are timing out after r260672 |
| |
| Reverted changeset: |
| |
| "[Win] Bundle Inspector Resources in Release builds" |
| https://bugs.webkit.org/show_bug.cgi?id=210942 |
| https://trac.webkit.org/changeset/260672 |
| |
| 2020-04-27 Kenneth Russell <kbr@chromium.org> |
| |
| Build failure in WebGL2RenderingContext after r260588 |
| https://bugs.webkit.org/show_bug.cgi?id=211057 |
| |
| Reviewed by Darin Adler. |
| |
| Fix non-ANGLE build failure in WebGL2RenderingContext after |
| r260588. |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::texStorage2D): |
| |
| 2020-04-26 Darin Adler <darin@apple.com> |
| |
| [Cocoa] stop using out arguments for document attributes when converting to attributed strings |
| https://bugs.webkit.org/show_bug.cgi?id=211048 |
| |
| Reviewed by Sam Weinig. |
| |
| * DerivedSources-input.xcfilelist: Building modified this file automatically. Uploading |
| the new version. |
| |
| * WebCore.xcodeproj/project.pbxproj: Added AttributedString.h. |
| * editing/cocoa/AttributedString.h: Added. Moved this from WebKit, but removed a lot of |
| inessentials. |
| * editing/cocoa/DictionaryLookup.mm: Removed unneeded include. |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::selectionAsAttributedString): Updated for change to the return value of the |
| attributedString function, and use init instead of initWithString:@"". |
| |
| * editing/cocoa/HTMLConverter.h: Changed to an Objective-C-only header, omitting things |
| like #pramga once. Return the AttributedString struct from the functions instead of |
| using an out argument for document attributes. |
| * editing/cocoa/HTMLConverter.mm: |
| (HTMLConverter::convert): Return an AttributedString and drop the out argument. |
| (WebCore::attributedString): Ditto. |
| (WebCore::editingAttributedString): Ditto. Also refactor a little bit. |
| |
| * editing/ios/EditorIOS.mm: Removed unneeded include. |
| * editing/mac/DictionaryLookupLegacy.mm: Removed unneeded include. |
| |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::dataSelectionForPasteboard): Updated since attributedString |
| now returns a structure. |
| |
| * platform/network/cocoa/NetworkStorageSessionCocoa.mm: |
| (WebCore::policyProperties): Use init instead of initWithString:@"". |
| * platform/network/cocoa/ResourceRequestCocoa.mm: |
| (WebCore::siteForCookies): Use init instead of initWithString:@"". |
| |
| 2020-04-26 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com> |
| |
| [PlayStation] Enable TestWTF and TestWebCore |
| https://bugs.webkit.org/show_bug.cgi?id=208849 |
| |
| Reviewed by Don Olmstead. |
| |
| * PlatformPlayStation.cmake: |
| Add WebCore_CopySharedLibs to install dependencies. |
| |
| 2020-04-26 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Rendering update steps should use Seconds for the timestamps |
| https://bugs.webkit.org/show_bug.cgi?id=210990 |
| |
| Reviewed by Daniel Bates. |
| |
| Make DOMWindow::nowTimestamp() return ReducedResolutionSeconds and change |
| the callers accordingly. ReducedResolutionSeconds is a new type but it's |
| just an alias of the type Seconds. It indicates that the returned value |
| is a web-safe seconds. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::suspendAnimations): |
| (WebCore::DocumentTimeline::liveCurrentTime const): |
| (WebCore::DocumentTimeline::cacheCurrentTime): |
| (WebCore::DocumentTimeline::documentWillUpdateAnimationsAndSendEvents): |
| * animation/DocumentTimeline.h: |
| * animation/DocumentTimelinesController.cpp: |
| (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): |
| * animation/DocumentTimelinesController.h: |
| * dom/Document.cpp: |
| (WebCore::Document::serviceRequestAnimationFrameCallbacks): |
| (WebCore::Document::updateIntersectionObservations): |
| * dom/Document.h: |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): |
| (WebCore::ScriptedAnimationController::scheduleAnimation): |
| * dom/ScriptedAnimationController.h: |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::getVideoPlaybackQuality): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::nowTimestamp const): |
| * page/DOMWindow.h: |
| * page/IntersectionObserver.cpp: |
| (WebCore::IntersectionObserver::nowTimestamp const): |
| (WebCore::IntersectionObserver::createTimestamp const): Deleted. |
| * page/IntersectionObserver.h: |
| * page/Page.cpp: |
| (WebCore::Page::updateRendering): |
| * page/Performance.cpp: |
| (WebCore::Performance::now const): |
| (WebCore::Performance::nowInReducedResolutionSeconds const): |
| * page/Performance.h: |
| * page/ReducedResolutionSeconds.h: Added. |
| |
| 2020-04-26 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| InternalFunction::createSubclassStructure should use newTarget's globalObject |
| https://bugs.webkit.org/show_bug.cgi?id=202599 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| Accounts for InternalFunction::createSubclassStructure() signature change and |
| utilizes getFunctionRealm() helper to handle cross-realm JSBoundFunction and |
| ProxyObject instances as NewTarget value. |
| |
| Tests: web-platform-tests/WebIDL/ecmascript-binding/constructors.html |
| web-platform-tests/custom-elements/htmlconstructor/newtarget.html |
| |
| * bindings/js/JSDOMWrapperCache.h: |
| (WebCore::setSubclassStructureIfNeeded): |
| * bindings/js/JSHTMLElementCustom.cpp: |
| (WebCore::constructJSHTMLElement): |
| |
| 2020-04-26 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Use `static Lock` instead of `static NeverDestroyed<Lock>` |
| https://bugs.webkit.org/show_bug.cgi?id=211036 |
| |
| Reviewed by Darin Adler. |
| |
| * platform/GenericTaskQueue.cpp: |
| (WebCore::TaskDispatcher<Timer>::sharedLock): |
| |
| 2020-04-26 Peng Liu <peng.liu6@apple.com> |
| |
| Remove unused class PlaybackSessionInterface |
| https://bugs.webkit.org/show_bug.cgi?id=211031 |
| |
| Reviewed by Daniel Bates. |
| |
| No new tests, no functional changes. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/cocoa/PlaybackSessionInterface.h: Removed. |
| * platform/cocoa/PlaybackSessionModelMediaElement.h: |
| * platform/ios/PlaybackSessionInterfaceAVKit.h: |
| * platform/mac/PlaybackSessionInterfaceMac.h: |
| |
| 2020-04-26 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Compute and distribute extra vertical space for rows |
| https://bugs.webkit.org/show_bug.cgi?id=211046 |
| |
| Reviewed by Antti Koivisto. |
| |
| When the table computed height is bigger than the sum of the row heigts, we need to distribute the extra vertical |
| space among the non-fixed height rows. The distribution is based on the preferred height of those non-fixed rows. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| |
| 2020-04-11 Darin Adler <darin@apple.com> |
| |
| Stop using live ranges in functions that return range of the selection |
| https://bugs.webkit.org/show_bug.cgi?id=210396 |
| |
| Reviewed by Sam Weinig. |
| |
| - Added makeRangeSelectingNode, to create a range that selects a node |
| and all its descendants. |
| - Improved intersectingNodes so it can now easily be used in a while loop |
| style as well as the range-for loop style. Also made it more robust |
| against tree changes while iterating; it will now always stop at the |
| end of the document. |
| - Changed functions that work with selection to get a SimpleRange, and |
| then either do all the work without a live range, or call createLiveRange |
| right where it's needed, making it clearer when we can delete that |
| call later as we cut down live ranges even more. |
| |
| * accessibility/AccessibilityObject.cpp: |
| (WebCore::AccessibilityObject::selectionRange const): Return a SimpleRange |
| instead of a live range. |
| (WebCore::AccessibilityObject::findTextRanges const): Use createLiveRange |
| on the result of selectionRange since this still mostly uses live ranges. |
| * accessibility/AccessibilityObject.h: Updated for the above. |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::documentBasedSelectedTextRange const): |
| Updated to create a live range only in the one place we need to call a |
| Range class member function. |
| |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper textMarkerRangeForSelection]): |
| Use createLiveRange here. |
| |
| * dom/SimpleRange.cpp: |
| (WebCore::makeRangeSelectingNode): Added. For use when we need to make |
| a range that selects a node, not just the node's contents. |
| (WebCore::firstIntersectingNode): Renamed from IntersectingNodeRange::first |
| since this is now used in the iterator class, not the range class. Also |
| letting it be a non-member function so we can tweak it without touching |
| the haeder file. |
| (WebCore::nodePastLastIntersectingNode): Ditto. |
| (WebCore::IntersectingNodeIterator::IntersectingNodeIterator): Changed |
| this constructor to take a SimpleRange. To add the advanceSkippingChildren |
| feature, had to build the termination condition into the iterator rather |
| than basing it on the value of the sentinel. |
| (WebCore::IntersectingNodeIterator::advance): Added. Contains the logic |
| from the ++ operator, so it can be called in a more straightforward way |
| when this is being used with a while loop rather than a range-for loop. |
| (WebCore::IntersectingNodeIterator::advanceSkippingChildren): Added. |
| * dom/SimpleRange.h: Updated for the changes to IntersectingNodeIterator |
| and IntersectingNodeRange. |
| |
| * editing/AlternativeTextController.cpp: |
| (WebCore::AlternativeTextController::timerFired): Use createLiveRange. |
| |
| * editing/CompositeEditCommand.cpp: |
| (WebCore::CompositeEditCommand::targetRanges const): Use WTFMove in |
| a place where the old code was copying instead. |
| |
| * editing/DeleteSelectionCommand.cpp: |
| (WebCore::DeleteSelectionCommand::makeStylingElementsDirectChildrenOfEditableRootToPreventStyleLoss): |
| Use intersectingNodes to make the function's logic easier to understand. |
| |
| * editing/Editing.cpp: |
| (WebCore::visibleImageElementsInRangeWithNonLoadedImages): Changed |
| the argument type to SimpleRange. |
| * editing/Editing.h: Updated for the change above. |
| |
| * editing/EditingStyle.cpp: |
| (WebCore::EditingStyle::styleAtSelectionStart): Use createLiveRange. |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::selectedRange): Use createLiveRange. |
| (WebCore::Editor::applyStyleToSelection): Ditto. |
| (WebCore::Editor::applyParagraphStyleToSelection): Ditto. |
| (WebCore::Editor::insertTextWithoutSendingTextEvent): Ditto. |
| (WebCore::Editor::insertLineBreak): Ditto. |
| (WebCore::Editor::insertParagraphSeparator): Ditto. |
| (WebCore::Editor::ignoreSpelling): Remove use of live range. |
| (WebCore::Editor::learnSpelling): Ditto. |
| (WebCore::Editor::misspelledWordAtCaretOrRange const): Ditto. |
| (WebCore::Editor::isSelectionUngrammatical): Ditto. |
| (WebCore::Editor::guessesForMisspelledOrUngrammatical): Ditto. |
| (WebCore::Editor::markMisspellingsAfterTypingToWord): Use createLiveRange. |
| (WebCore::Editor::markMisspellingsOrBadGrammar): Ditto. |
| (WebCore::Editor::markMisspellingsAndBadGrammar): Ditto. |
| (WebCore::Editor::rangeForPoint): Ditto. |
| (WebCore::Editor::insertTextPlaceholder): Ditto. |
| (WebCore::Editor::shouldChangeSelection const): Ditto. |
| (WebCore::Editor::findString): Ditto. |
| (WebCore::Editor::rangeOfString): Ditto. |
| (WebCore::Editor::scanSelectionForTelephoneNumbers): Ditto. |
| (WebCore::Editor::editorUIUpdateTimerFired): Remove use of live range. |
| (WebCore::candidateRangeForSelection): Deleted. |
| (WebCore::Editor::stringForCandidateRequest const): Use createLiveRange |
| and merged in the logic from candidateRangeForSelection. |
| (WebCore::Editor::fontForSelection const): Remove use of live range. |
| |
| * editing/EditorCommand.cpp: |
| (WebCore::expandSelectionToGranularity): Use createLiveRange. |
| (WebCore::executeDeleteToMark): Ditto. |
| (WebCore::executeSelectToMark): Ditto. |
| (WebCore::valueFormatBlock): Ditto. |
| |
| * editing/FrameSelection.cpp: |
| (WebCore::FrameSelection::respondToNodeModification): Use createLiveRange. |
| (WebCore::FrameSelection::shouldDeleteSelection const): Ditto. |
| (WebCore::FrameSelection::getClippedVisibleTextRectangles const): Do the work |
| without a live range. |
| (WebCore::FrameSelection::expandSelectionToElementContainingCaretSelection): Ditto. |
| (WebCore::FrameSelection::elementRangeContainingCaretSelection const): Changed |
| to return a SimpleRange rather than a live range. Also removed redundant checks |
| and renamed locals to streamline the function. |
| (WebCore::FrameSelection::wordRangeContainingCaretSelection): Return a |
| SimpleRange instead of a live range. |
| (WebCore::FrameSelection::rangeByMovingCurrentSelection const): Ditto. |
| (WebCore::FrameSelection::rangeByExtendingCurrentSelection const): Ditto. |
| (WebCore::FrameSelection::rangeByAlteringCurrentSelection const): Ditto. |
| * editing/FrameSelection.h: Removed the toNormalizedRange function, since the |
| VisibleSelection class has a comment claiming most callers should not call it. |
| Updated forthe other changes above. |
| |
| * editing/InsertListCommand.cpp: |
| (WebCore::InsertListCommand::doApply): Use createLiveRange. |
| * editing/ReplaceSelectionCommand.cpp: |
| (WebCore::ReplacementFragment::ReplacementFragment): Ditto. |
| |
| * editing/TextCheckingHelper.cpp: |
| (WebCore::TextCheckingHelper::TextCheckingHelper): Remove use of live range, |
| changing the type of m_range to SimpleRange. |
| (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar): Reduce use |
| of live range. |
| (WebCore::TextCheckingHelper::findFirstGrammarDetail const): Use createLiveRange. |
| (WebCore::TextCheckingHelper::findFirstBadGrammar const): Ditto. |
| (WebCore::TextCheckingHelper::isUngrammatical const): Remove use of live range. |
| (WebCore::TextCheckingHelper::guessesForMisspelledOrUngrammaticalRange const): |
| Use createLiveRange. |
| (WebCore::TextCheckingHelper::unifiedTextCheckerEnabled const): Updated for |
| different interface to get the document for a SimpleRange. |
| * editing/TextCheckingHelper.h: Change constructor to take a SimpleRange. |
| |
| * editing/TypingCommand.cpp: |
| (WebCore::TypingCommand::deleteKeyPressed): Use createLiveRange. |
| (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto. |
| |
| * editing/VisibleSelection.cpp: |
| (WebCore::VisibleSelection::firstRange const): Return a SimpleRange. |
| (WebCore::VisibleSelection::toNormalizedRange const): Ditto. |
| * editing/VisibleSelection.h: Updated for the above. |
| |
| * editing/cocoa/DictionaryLookup.mm: Removed an uneeded check of the |
| selection range against null. Code already guards against null endpoints. |
| |
| * editing/cocoa/EditorCocoa.mm: |
| (WebCore::selectionAsAttributedString): Added. Uses the attributedString |
| function with it's new argument and return value types. There's no longer |
| a special function for the selection in the HTMLConverter header, so we |
| put it here instead. |
| (WebCore::Editor::writeSelectionToPasteboard): Updated to use the function |
| above and to deal with RetainPtr. |
| (WebCore::Editor::writeSelection): Ditto. |
| |
| * editing/cocoa/HTMLConverter.h: Removed attributedStringFromSelection and |
| attributedStringBetweenStartAndEnd. Renamed attributedStringFromRange to |
| just attributedString and renamed editingAttributedStringFromRange to |
| just editingAttributedString. Also renamed IncludeImagesInAttributedString |
| to just IncludeImages. |
| * editing/cocoa/HTMLConverter.mm: |
| (HTMLConverter::HTMLConverter): Use a SimpleRange rther than two Position |
| arguments to the constructor. |
| (HTMLConverter::convert): Use RetainPtr for the return value and the |
| optional out argument. |
| (WebCore::attributedStringFromSelection): Deleted. |
| (WebCore::attributedStringBetweenStartAndEnd): Deleted. |
| (WebCore::attributedString): Renamed the version that takes a range and |
| made it take a SimpleRange, not a live range. |
| (WebCore::editingAttributedString): Ditto. |
| |
| * editing/mac/EditorMac.mm: |
| (WebCore::Editor::dataSelectionForPasteboard): Updated for changes to |
| attributedString. |
| |
| * html/HTMLTextAreaElement.cpp: |
| (WebCore::HTMLTextAreaElement::handleBeforeTextInsertedEvent const): |
| Changed to not use live ranges any more. |
| |
| * page/ContextMenuController.cpp: |
| (WebCore::ContextMenuController::contextMenuItemSelected): |
| Use createLiveRange. |
| |
| * page/DOMSelection.cpp: |
| (WebCore::DOMSelection::getRangeAt): Use createLiveRange. |
| (WebCore::DOMSelection::addRange): Use Ditto. |
| (WebCore::DOMSelection::deleteFromDocument): Ditto. |
| |
| * page/DragController.cpp: |
| (WebCore::setSelectionToDragCaret): Removed in/out argument that was |
| used to update a range that was never looked at afterward. |
| (WebCore::DragController::concludeEditDrag): Use createLiveRange. |
| (WebCore::DragController::draggableElement const): Ditto. |
| (WebCore::DragController::startDrag): Ditto. |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::dispatchMouseEvent): Use createLiveRange. |
| (WebCore::EventHandler::sendContextMenuEventForKey): Ditto. |
| (WebCore::EventHandler::didStartDrag): Remove use of live range. |
| |
| * page/Page.cpp: |
| (WebCore::Page::findStringMatchingRanges): Use createLiveRange. |
| * page/TextIndicator.cpp: |
| (WebCore::TextIndicator::createWithRange): Ditto. |
| (WebCore::TextIndicator::createWithSelectionInFrame): Ditto. |
| |
| * page/mac/ServicesOverlayController.mm: |
| (WebCore::ServicesOverlayController::buildSelectionHighlight): |
| Use createLiveRange. |
| (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight): |
| Use createLiveRange. |
| |
| * rendering/HitTestResult.cpp: |
| (WebCore::HitTestResult::selectedText const): Remove use of |
| live range. |
| |
| 2020-04-26 Darin Adler <darin@apple.com> |
| |
| Remove unnecessary inlining and templates for URL decomposition DOM functions |
| https://bugs.webkit.org/show_bug.cgi?id=211025 |
| |
| Reviewed by Alex Christensen. |
| |
| * Headers.cmake: Renamed URLUtils.h to URLDecomposition.h. |
| * Modules/cache/DOMCacheStorage.cpp: Updated include and using namespace. |
| * Sources.txt: Added URLDecomposition.cpp. |
| * WebCore.xcodeproj/project.pbxproj: Added URLDecomposition.cpp and |
| renamed URLUtils.h to URLDecomposition.h. |
| |
| * html/DOMURL.h: Removed the WEBCORE_EXPORT on this class. Added final. |
| Derive from URLDecomposition instead of URLUtils. Changed return type of |
| href to const&. Moved toJSON here from URLUtils. Added overrides of the |
| fullURL and setFullURL functions for URLDecomposition. |
| |
| * html/DOMURL.idl: Removed ImplementationLacksVTable. |
| |
| * html/HTMLAnchorElement.cpp: |
| (WebCore::HTMLAnchorElement::HTMLAnchorElement): Moved initialization of |
| boolean data members to the class definition. |
| |
| * html/HTMLAnchorElement.h: Derive from URLDecomposition instead of |
| URLUtils. Added overrides of the fullURL and setFullURL functions for |
| URLDecomposition. Initialize data members here in the class definition. |
| |
| * html/HTMLMediaElement.cpp: Removed unnecessary include of DOMURL.h. |
| |
| * html/URLDecomposition.cpp: Added. Contains most of the code from |
| the URLUtils class template, which no longer needs to be in a header. |
| |
| * html/URLDecomposition.h: Renamed URLUtils.h to this. It's now an |
| abstract base class rather than a class template using the curiously |
| recurring template pattern. |
| |
| * html/URLSearchParams.h: Forward-declare DOMURL rather than including |
| the DOMURL.h header. |
| |
| * html/URLUtils.h: Removed. Renamed to URLDecompostion.h. |
| |
| * page/DOMWindow.cpp: Removed unneeded include of DOMURL.h. |
| * testing/Internals.cpp: Added include of DOMURL.h. |
| |
| 2020-04-26 Cathie Chen <cathiechen@igalia.com> |
| |
| fast/scrolling/scroll-behavior-invalidate-if-disabled.html is a flaky failure |
| https://bugs.webkit.org/show_bug.cgi?id=210917 |
| |
| Reviewed by Darin Adler. |
| |
| The flaky failure is caused by reusing the CSSPropertyInfo value cached propertyInfoCache |
| after experimental flags changed. Add propertyInfoFromJavaScriptCSSPropertyName |
| to perform disabled checking after parsing. If the property is disabled, it will return |
| an invalid CSSPropertyInfo instead. |
| |
| * css/CSSStyleDeclaration.cpp: |
| (WebCore::CSSStyleDeclaration::getCSSPropertyIDFromJavaScriptPropertyName): |
| (WebCore::CSSStyleDeclaration::namedItem): |
| (WebCore::CSSStyleDeclaration::setNamedItem): |
| |
| 2020-04-25 Ross Kirsling <ross.kirsling@sony.com> |
| |
| [JSC] isCallable is redundant with isFunction |
| https://bugs.webkit.org/show_bug.cgi?id=211037 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| * bindings/js/JSDOMConvertScheduledAction.h: |
| (WebCore::Converter<IDLScheduledAction>::convert): |
| * worklets/PaintWorkletGlobalScope.cpp: |
| (WebCore::PaintWorkletGlobalScope::registerPaint): |
| Don't use getCallData if you don't need CallData. |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Build fix. |
| https://bugs.webkit.org/show_bug.cgi?id=210521 |
| |
| * Modules/applepay/ApplePaySetupFeature.mm: |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Move ApplePay code from WebKitAdditions to WebCore and WebKit |
| https://bugs.webkit.org/show_bug.cgi?id=210521 |
| |
| I accidentally committed an older version of the patch. |
| This is the diff between the two to fix the internal build. |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Move ApplePay code from WebKitAdditions to WebCore and WebKit |
| https://bugs.webkit.org/show_bug.cgi?id=210521 |
| |
| Reviewed by Andy Estes. |
| |
| Only 4 minor modifications were necessary, as follows: |
| |
| 1. PaymentSetupFeatures's RetainPtr<NSArray<PKPaymentSetupFeature *>> was changed to RetainPtr<NSArray> to work with C++. |
| 2. WebPaymentCoordinatorProxyAdditions messages were moved to WebPaymentCoordinatorProxy, removing the need for |
| the extra message receiver, the Optional<WebPaymentCoordinatorProxyAdditions>, and the finishConstruction. |
| 3. WebMediaSessionManager.cpp's macros that collided with other macros were renamed. This was necessary because of different source unification. |
| 4. PaymentSetupFeatures.h was renamed to ApplePayPaymentSetupFeatures.h to be able to build with PaymentSetupFeatures.h in the SDK. |
| |
| The rest is just copy and paste. |
| |
| There isn't a good way to land this without breaking the build without removing the files from WebKitAdditions at the same time, |
| so I'll do the two at the same time late at night to not cause disruption. |
| |
| * DerivedSources.make: |
| * Modules/applepay/ApplePayInstallmentConfiguration.h: Added. |
| * Modules/applepay/ApplePayInstallmentConfiguration.idl: Added. |
| * Modules/applepay/ApplePayPayment.h: |
| * Modules/applepay/ApplePayPayment.idl: |
| * Modules/applepay/ApplePayPaymentMethod.h: |
| * Modules/applepay/ApplePayPaymentMethod.idl: |
| * Modules/applepay/ApplePayPaymentMethodUpdate.h: |
| * Modules/applepay/ApplePayPaymentMethodUpdate.idl: |
| * Modules/applepay/ApplePayRequestBase.cpp: |
| (WebCore::finishConverting): |
| (WebCore::requiresSupportedNetworks): |
| * Modules/applepay/ApplePayRequestBase.h: |
| * Modules/applepay/ApplePaySession.cpp: |
| (WebCore::finishConverting): |
| * Modules/applepay/ApplePaySessionPaymentRequest.h: |
| (WebCore::ApplePaySessionPaymentRequest::installmentConfiguration const): |
| (WebCore::ApplePaySessionPaymentRequest::setInstallmentConfiguration): |
| * Modules/applepay/ApplePaySetup.cpp: Added. |
| (WebCore::shouldDiscloseFeatures): |
| (WebCore::ApplePaySetup::getSetupFeatures): |
| (WebCore::ApplePaySetup::begin): |
| (WebCore::ApplePaySetup::ApplePaySetup): |
| (WebCore::ApplePaySetup::stop): |
| (WebCore::ApplePaySetup::suspend): |
| * Modules/applepay/ApplePaySetup.h: Added. |
| (WebCore::ApplePaySetup::create): |
| * Modules/applepay/ApplePaySetup.idl: Added. |
| * Modules/applepay/ApplePaySetupFeature.h: Added. |
| (WebCore::ApplePaySetupFeature::create): |
| (WebCore::ApplePaySetupFeature::platformFeature const): |
| * Modules/applepay/ApplePaySetupFeature.idl: Added. |
| * Modules/applepay/ApplePaySetupFeature.mm: Added. |
| (WebCore::ApplePaySetupFeature::type const): |
| (WebCore::ApplePaySetupFeature::state const): |
| (WebCore::ApplePaySetupFeature::supportsInstallments const): |
| (WebCore::ApplePaySetupFeature::ApplePaySetupFeature): |
| * Modules/applepay/ApplePaySetupFeatureType.h: Added. |
| * Modules/applepay/ApplePaySetupFeatureType.idl: Added. |
| * Modules/applepay/PaymentCoordinatorClient.h: |
| (WebCore::PaymentCoordinatorClient::getSetupFeatures): |
| (WebCore::PaymentCoordinatorClient::beginApplePaySetup): |
| (WebCore::PaymentCoordinatorClient::endApplePaySetup): |
| * Modules/applepay/PaymentInstallmentConfiguration.h: Added. |
| * Modules/applepay/PaymentInstallmentConfiguration.mm: Added. |
| (WebCore::toDecimalNumber): |
| (WebCore::platformFeatureType): |
| (WebCore::createPlatformConfiguration): |
| (WebCore::PaymentInstallmentConfiguration::PaymentInstallmentConfiguration): |
| (WebCore::PaymentInstallmentConfiguration::platformConfiguration const): |
| * Modules/applepay/PaymentMethodUpdate.h: |
| * Modules/applepay/cocoa/PaymentCocoa.mm: |
| (WebCore::finishConverting): |
| * Modules/applepay/cocoa/PaymentMethodCocoa.mm: |
| (WebCore::finishConverting): |
| * Modules/applepay/cocoa/PaymentMethodUpdateCocoa.mm: |
| (WebCore::PaymentMethodUpdate::setInstallmentGroupIdentifier): |
| * Modules/applepay/cocoa/PaymentSessionErrorCocoa.mm: |
| (WebCore::additionalError): |
| * Modules/applepay/paymentrequest/ApplePayRequest.idl: |
| * Modules/mediasession/WebMediaSessionManager.cpp: |
| (WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerEnabled): |
| (WebCore::WebMediaSessionManager::setMockMediaPlaybackTargetPickerState): |
| (WebCore::WebMediaSessionManager::mockMediaPlaybackTargetPickerDismissPopup): |
| (WebCore::WebMediaSessionManager::addPlaybackTargetPickerClient): |
| (WebCore::WebMediaSessionManager::removePlaybackTargetPickerClient): |
| (WebCore::WebMediaSessionManager::removeAllPlaybackTargetPickerClients): |
| (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): |
| (WebCore::WebMediaSessionManager::clientStateDidChange): |
| (WebCore::WebMediaSessionManager::setPlaybackTarget): |
| (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): |
| (WebCore::WebMediaSessionManager::playbackTargetPickerWasDismissed): |
| (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): |
| (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): |
| (WebCore::WebMediaSessionManager::configureWatchdogTimer): |
| (WebCore::WebMediaSessionManager::watchdogTimerFired): |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/cocoa/WebCoreAdditions.mm: |
| |
| 2020-04-25 Simon Fraser <simon.fraser@apple.com> |
| |
| Commit the scrolling tree from the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=211026 |
| <rdar://problem/62374855> |
| |
| Reviewed by Darin Adler. |
| |
| ScrollingCoordinatorMac::commitTreeStateIfNeeded() passed the new state tree to |
| the scrolling thread which then did the commit (which updates the scrolling tree |
| from the state tree). However, applyLayerPositions() immediately waited for that |
| commit to complete, blocking the main thread anyway. |
| |
| We might as well just commit the scrolling tree on the main thread. ScrollingTree::commitTreeState() |
| locks m_treeMutex, so this is still safe. Lock contention with the scrolling or event dispatcher |
| threads should be rare; those threads are both mostly responsive. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::scrollingTreeAsText const): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::commitTreeState): |
| * page/scrolling/ScrollingTree.h: |
| (WebCore::ScrollingTree::waitForScrollingTreeCommit): Deleted. |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::commitTreeState): Deleted. |
| (WebCore::ThreadedScrollingTree::incrementPendingCommitCount): Deleted. |
| (WebCore::ThreadedScrollingTree::decrementPendingCommitCount): Deleted. |
| (WebCore::ThreadedScrollingTree::waitForPendingCommits): Deleted. |
| (WebCore::ThreadedScrollingTree::waitForScrollingTreeCommit): Deleted. |
| (WebCore::ThreadedScrollingTree::applyLayerPositions): Deleted. |
| * page/scrolling/ThreadedScrollingTree.h: |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| (WebCore::ScrollingCoordinatorMac::commitTreeStateIfNeeded): |
| * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp: |
| (WebCore::ScrollingCoordinatorNicosia::commitTreeState): |
| |
| 2020-04-25 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Use static initialized Lock instead of LazyNeverDestroyed<Lock> |
| https://bugs.webkit.org/show_bug.cgi?id=211010 |
| |
| Reviewed by Mark Lam. |
| |
| WTF::Lock can be static-initialized, so no need to use LazyNeverDestroyed<Lock>. |
| |
| * Modules/webgpu/WebGPUDevice.cpp: |
| (WebCore::WebGPUDevice::instancesMutex): |
| * Modules/webgpu/WebGPUPipeline.cpp: |
| (WebCore::WebGPUPipeline::instancesMutex): |
| * html/canvas/CanvasRenderingContext.cpp: |
| (WebCore::CanvasRenderingContext::instancesMutex): |
| * html/canvas/WebGLProgram.cpp: |
| (WebCore::WebGLProgram::instancesMutex): |
| |
| 2020-04-25 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Deal with another round of Xcode upgrade checks |
| https://bugs.webkit.org/show_bug.cgi?id=211027 |
| |
| Reviewed by Alexey Proskuryakov. |
| |
| * WebCore.xcodeproj/project.pbxproj: Bump the upgrade check version. |
| |
| 2020-04-25 Alex Christensen <achristensen@webkit.org> |
| |
| Prepare to remove automatic URL->String conversion operators |
| https://bugs.webkit.org/show_bug.cgi?id=211007 |
| |
| Reviewed by Darin Adler. |
| |
| * Modules/cache/DOMCache.cpp: |
| (WebCore::DOMCache::requestFromInfo): |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::FetchRequest::urlString const): |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::fetch): |
| * Modules/websockets/WebSocket.cpp: |
| (WebCore::WebSocket::create): |
| * accessibility/AccessibilityImageMapLink.cpp: |
| (WebCore::AccessibilityImageMapLink::stringValueForMSAA const): |
| * bindings/IDLTypes.h: |
| (WebCore::IDLString::isNullValue): |
| * bindings/js/CachedScriptSourceProvider.h: |
| (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider): |
| * bindings/js/JSDOMConvertStrings.h: |
| (WebCore::JSConverter<IDLDOMString>::convert): |
| (WebCore::Converter<IDLUSVString>::convert): |
| (WebCore::JSConverter<IDLUSVString>::convert): |
| * bindings/js/ScriptController.cpp: |
| (WebCore::ScriptController::evaluateInWorld): |
| (WebCore::ScriptController::evaluateModule): |
| (WebCore::ScriptController::callInWorld): |
| (WebCore::ScriptController::executeIfJavaScriptURL): |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::dumpIfTerminal): |
| (WebCore::CloneSerializer::write): |
| * css/CSSCursorImageValue.cpp: |
| (WebCore::CSSCursorImageValue::updateCursorElement): |
| * css/CSSImageValue.cpp: |
| (WebCore::CSSImageValue::customCSSText const): |
| (WebCore::CSSImageValue::createDeprecatedCSSOMWrapper const): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::consumeFontFaceSrcURI): |
| * dom/Document.cpp: |
| (WebCore::Document::processHttpEquiv): |
| * dom/ExtensionStyleSheets.cpp: |
| (WebCore::createExtensionsStyleSheet): |
| * dom/InlineStyleSheetOwner.cpp: |
| (WebCore::InlineStyleSheetOwner::createSheet): |
| * dom/ScriptElement.cpp: |
| (WebCore::ScriptElement::requestModuleScript): |
| (WebCore::ScriptElement::executeClassicScript): |
| * dom/StyledElement.cpp: |
| (WebCore::StyledElement::styleAttributeChanged): |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::sanitizeMarkupWithArchive): |
| (WebCore::WebContentReader::readWebArchive): |
| * html/HTMLFormControlElement.cpp: |
| (WebCore::HTMLFormControlElement::formAction const): |
| * html/HTMLFrameElementBase.cpp: |
| (WebCore::HTMLFrameElementBase::canLoadURL const): |
| * html/HTMLLinkElement.cpp: |
| (WebCore::HTMLLinkElement::shouldLoadLink): |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::selectNextSourceChild): |
| * html/HTMLPlugInImageElement.cpp: |
| (WebCore::HTMLPlugInImageElement::canLoadURL const): |
| * html/parser/XSSAuditor.cpp: |
| (WebCore::XSSAuditor::filterToken): |
| * inspector/InspectorAuditResourcesObject.cpp: |
| (WebCore::InspectorAuditResourcesObject::getResources): |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::buildArrayForGroupings): |
| * inspector/NetworkResourcesData.cpp: |
| (WebCore::NetworkResourcesData::responseReceived): |
| * inspector/agents/InspectorNetworkAgent.cpp: |
| (WebCore::InspectorNetworkAgent::buildObjectForCachedResource): |
| (WebCore::InspectorNetworkAgent::willSendRequest): |
| * inspector/agents/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::getCookies): |
| (WebCore::InspectorPageAgent::searchInResources): |
| (WebCore::InspectorPageAgent::buildObjectForFrameTree): |
| * inspector/agents/InspectorWorkerAgent.cpp: |
| (WebCore::InspectorWorkerAgent::connectToWorkerInspectorProxy): |
| * inspector/agents/WebConsoleAgent.cpp: |
| (WebCore::WebConsoleAgent::didFailLoading): |
| * inspector/agents/worker/ServiceWorkerAgent.cpp: |
| (WebCore::ServiceWorkerAgent::getInitializationInfo): |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::subresources const): |
| * loader/DocumentLoader.h: |
| (WebCore::DocumentLoader::clientRedirectDestinationForHistory const): |
| (WebCore::DocumentLoader::serverRedirectDestinationForHistory const): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::submitForm): |
| (WebCore::FrameLoader::receivedFirstData): |
| (WebCore::FrameLoader::loadInSameDocument): |
| (WebCore::FrameLoader::loadedResourceFromMemoryCache): |
| (WebCore::createWindow): |
| * loader/HistoryController.cpp: |
| (WebCore::HistoryController::currentItemShouldBeReplaced const): |
| * loader/ImageLoader.cpp: |
| (WebCore::ImageLoader::updateFromElement): |
| (WebCore::ImageLoader::dispatchPendingBeforeLoadEvent): |
| * loader/LinkLoader.cpp: |
| (WebCore::LinkLoader::preloadIfNeeded): |
| (WebCore::LinkLoader::prefetchIfNeeded): |
| * loader/MixedContentChecker.cpp: |
| (WebCore::MixedContentChecker::checkFormForMixedContent const): |
| * loader/NavigationScheduler.cpp: |
| (WebCore::NavigationScheduler::shouldScheduleNavigation const): |
| (WebCore::NavigationScheduler::scheduleLocationChange): |
| * loader/PingLoader.cpp: |
| (WebCore::PingLoader::loadImage): |
| (WebCore::PingLoader::sendPing): |
| * loader/ResourceLoadNotifier.cpp: |
| (WebCore::ResourceLoadNotifier::dispatchWillSendRequest): |
| * loader/SubframeLoader.cpp: |
| (WebCore::SubframeLoader::requestObject): |
| * loader/TextTrackLoader.cpp: |
| (WebCore::TextTrackLoader::load): |
| * loader/appcache/ApplicationCache.cpp: |
| (WebCore::ApplicationCache::addResource): |
| (WebCore::ApplicationCache::resourceForRequest): |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::selectCache): |
| (WebCore::ApplicationCacheGroup::finishedLoadingMainResource): |
| (WebCore::ApplicationCacheGroup::didFinishLoadingEntry): |
| (WebCore::ApplicationCacheGroup::didFailLoadingEntry): |
| (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): |
| * loader/appcache/ApplicationCacheHost.cpp: |
| (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache): |
| (WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource): |
| * loader/appcache/ApplicationCacheStorage.cpp: |
| (WebCore::ApplicationCacheStorage::loadCacheGroup): |
| (WebCore::ApplicationCacheStorage::findOrCreateCacheGroup): |
| (WebCore::ApplicationCacheStorage::findInMemoryCacheGroup const): |
| (WebCore::ApplicationCacheStorage::cacheGroupForURL): |
| (WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL): |
| (WebCore::ApplicationCacheStorage::cacheGroupDestroyed): |
| (WebCore::ApplicationCacheStorage::cacheGroupMadeObsolete): |
| (WebCore::ApplicationCacheStorage::store): |
| (WebCore::ApplicationCacheStorage::deleteCacheForOrigin): |
| * loader/archive/ArchiveResourceCollection.cpp: |
| (WebCore::ArchiveResourceCollection::addAllResources): |
| (WebCore::ArchiveResourceCollection::addResource): |
| (WebCore::ArchiveResourceCollection::archiveResourceForURL): |
| * loader/cache/CachedCSSStyleSheet.cpp: |
| (WebCore::CachedCSSStyleSheet::didAddClient): |
| (WebCore::CachedCSSStyleSheet::checkNotify): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::cachedResource const): |
| (WebCore::CachedResourceLoader::requestResource): |
| (WebCore::CachedResourceLoader::determineRevalidationPolicy const): |
| (WebCore::CachedResourceLoader::notifyFinished): |
| * loader/cache/CachedXSLStyleSheet.cpp: |
| (WebCore::CachedXSLStyleSheet::didAddClient): |
| (WebCore::CachedXSLStyleSheet::checkNotify): |
| * page/ContextMenuController.cpp: |
| (WebCore::ContextMenuController::checkOrEnableIfNeeded const): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::setLocation): |
| (WebCore::DOMWindow::createWindow): |
| (WebCore::DOMWindow::open): |
| * page/Location.cpp: |
| (WebCore::Location::reload): |
| * page/PageSerializer.cpp: |
| (WebCore::PageSerializer::retrieveResourcesForProperties): |
| * page/SecurityOrigin.cpp: |
| (WebCore::SecurityOrigin::shouldIgnoreHost): |
| * page/SecurityPolicy.cpp: |
| (WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner): |
| (WebCore::SecurityPolicy::isBaseURLSchemeAllowed): |
| * page/csp/ContentSecurityPolicy.cpp: |
| (WebCore::ContentSecurityPolicy::reportViolation const): |
| * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: |
| (WebCore::MediaPlayerPrivateAVFoundation::assetURL const): |
| * platform/network/BlobRegistryImpl.cpp: |
| (WebCore::BlobRegistryImpl::writeBlobToFilePath): |
| * platform/network/mac/ResourceErrorMac.mm: |
| (WebCore::ResourceError::platformLazyInit): |
| * storage/StorageEventDispatcher.cpp: |
| (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents): |
| (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents): |
| * svg/SVGImageLoader.cpp: |
| (WebCore::SVGImageLoader::sourceURI const): |
| * workers/WorkerScriptLoader.cpp: |
| (WebCore::WorkerScriptLoader::loadSynchronously): |
| * workers/service/ServiceWorkerRegistration.cpp: |
| (WebCore::ServiceWorkerRegistration::scope const): |
| * workers/service/ServiceWorkerRegistrationKey.cpp: |
| (WebCore::ServiceWorkerRegistrationKey::hash const): |
| (WebCore::ServiceWorkerRegistrationKey::isMatching const): |
| * workers/service/context/ServiceWorkerDebuggable.cpp: |
| (WebCore::ServiceWorkerDebuggable::ServiceWorkerDebuggable): |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::startScriptFetch): |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::send): |
| |
| 2020-04-25 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add vertical-align: baseline support |
| https://bugs.webkit.org/show_bug.cgi?id=211024 |
| |
| Reviewed by Antti Koivisto. |
| |
| Adjust the padding with the baseline offset when the cell is baseline aligned (as opposed to the initial value of 'middle'). |
| |
| Test: fast/layoutformattingcontext/table-basic-row-vertical-align-baseline.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::Cell::setBaselineOffset): |
| (WebCore::Layout::TableGrid::Cell::baselineOffset const): |
| |
| 2020-04-25 Darin Adler <darin@apple.com> |
| |
| Move URL to use StringView when returning substrings of the URL |
| https://bugs.webkit.org/show_bug.cgi?id=210431 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Modules/cache/DOMCacheEngine.cpp: |
| (WebCore::DOMCacheEngine::matchURLs): Removed unneeded calls to hasQuery. |
| |
| * Modules/fetch/FetchRequest.cpp: |
| (WebCore::FetchRequest::initializeWith): Use hasCredentials. |
| * Modules/fetch/FetchResponse.cpp: |
| (WebCore::FetchResponse::redirect): Use hasCredentials. |
| * Modules/paymentrequest/PaymentRequest.cpp: |
| (WebCore::isValidURLBasedPaymentMethodIdentifier): Use hasCredentials. |
| |
| * Modules/plugins/YouTubePluginReplacement.cpp: |
| (WebCore::createYouTubeURL): Take StringView. |
| (WebCore::queryKeysAndValues): Take StringView. |
| (WebCore::processAndCreateYouTubeURL): Use auto since URL pieces are |
| now returned as StringView. |
| (WebCore::YouTubePluginReplacement::youTubeURLFromAbsoluteURL): |
| Use StringView and makeString rather than StringBuilder. |
| |
| * Modules/websockets/WebSocketHandshake.cpp: |
| (WebCore::resourceName): Use queryWithLeadingQuestionMark. |
| |
| * accessibility/AccessibilityRenderObject.cpp: |
| (WebCore::AccessibilityRenderObject::internalLinkElement const): |
| Use StringView. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::setURL): Use setHostAndPort. |
| |
| * dom/Element.cpp: |
| (WebCore::Element::findAnchorElementForLink): Update since |
| fragmentIdentifier returns StringView. |
| |
| * dom/TreeScope.cpp: Added a comment. |
| |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| (WebCore::replaceRichContentWithAttachments): Update since |
| lastPathComponent returns a StringView. Also got rid of some strange |
| use of AtomString that was not necessary and used WTFMove more. |
| |
| * editing/ios/EditorIOS.mm: |
| (WebCore::Editor::writeImageToPasteboard): Update since |
| lastPathComponent returns a StringView. |
| |
| * html/HTMLAttachmentElement.cpp: |
| (WebCore::HTMLAttachmentElement::attachmentTitleForDisplay const): |
| Use makeString instead of StringBuilder, and StringView instead of |
| String for name and extension values. |
| |
| * html/HTMLPlugInElement.cpp: |
| (WebCore::pluginReplacementForType): Update since lastPathComponent |
| returns a StringView. |
| |
| * html/MediaFragmentURIParser.cpp: |
| (WebCore::MediaFragmentURIParser::parseFragments): Update since |
| fragmentIdentifier returns a StringView. |
| |
| * html/URLUtils.h: Changed many functions to take a StringView, changed |
| various other functions to call toString, since the underlying URL |
| function now returns a StringView. Updated names since "pass" is now |
| "password". |
| (WebCore::countASCIIDigits): Added. Replaces unusual function |
| named parsePortFromStringPosition because we can use StringView now |
| and so don't need such an unusual function. |
| |
| * loader/AdClickAttribution.cpp: |
| (WebCore::AdClickAttribution::parseConversionRequest): Use hasCredentials. |
| Also removed unnecessary use of ASCIILiteral that hurts performance |
| a tiny bit. |
| (WebCore::AdClickAttribution::urlForTesting const): Use makeString |
| instead of StringBuilder. |
| |
| * loader/CrossOriginAccessControl.cpp: |
| (WebCore::validateCrossOriginRedirectionURL): Use hasCredentials. |
| * loader/DocumentThreadableLoader.cpp: |
| (WebCore::DocumentThreadableLoader::loadRequest): Use hasCredentials. |
| |
| * loader/FormSubmission.cpp: |
| (WebCore::appendMailtoPostFormDataToURL): Update since query returns |
| StringView. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadInSameDocument): Use equalRespectingNullity on |
| fragment identifiers to preserve behavior, since at this time |
| StringView == StringView does not respect nullity, but String == String does. |
| |
| * loader/appcache/ApplicationCacheHost.cpp: |
| (WebCore::ApplicationCacheHost::createFileURL): Use fileURLWithFileSystemPath. |
| |
| * loader/appcache/ManifestParser.cpp: |
| (WebCore::manifestPath): Return a StringView. |
| (WebCore::parseManifest): Use StringView. |
| |
| * loader/cache/CachedFont.cpp: |
| (WebCore::CachedFont::calculateItemInCollection const): Update since |
| fragmentIdentifer returns a StringView. |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::splitFragmentIdentifierFromRequestURL): Ditto. |
| * page/FrameView.cpp: |
| (WebCore::FrameView::scrollToFragment): Ditto. |
| (WebCore::FrameView::scrollToFragmentInternal): Updated log message. |
| |
| * page/History.cpp: |
| (WebCore::History::stateObjectAdded): Updated for URL::password name change |
| and to use the new stringWithoutQueryOrFragmentIdentifier rather than the |
| old equalIgnoringQueryAndFragment. |
| |
| * page/Location.cpp: |
| (WebCore::Location::href const): Use removeCredentials. |
| (WebCore::Location::port const): Streamlined. |
| (WebCore::Location::pathname const): Use an ASCIILiteral. |
| (WebCore::Location::search const): Use queryWithLeadingQuestionMark. |
| (WebCore::Location::hash const): Use fragmentIdentifierWithLeadingNumberSign. |
| (WebCore::Location::setPort): Use parseUInt16. |
| |
| * page/UserContentURLPattern.cpp: Coding style tweaks. |
| |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary): |
| Use contains instead of reverseFind to check for a period in the filename. |
| |
| * platform/graphics/MediaPlayer.cpp: |
| (WebCore::MediaPlayer::load): Updated since lastPathComponent is a StringView. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::convertToInternalProtocol): Updated to use makeString since |
| setProtocol takes a StringView. |
| |
| * platform/network/ResourceHandleInternal.h: Renamed m_pass to m_password |
| and call password instead of pass. |
| |
| * platform/network/ResourceRequestBase.cpp: |
| (WebCore::ResourceRequestBase::removeCredentials): Use removeCredentials. |
| |
| * platform/network/cf/ResourceHandleCFNet.cpp: |
| (WebCore::ResourceHandle::createCFURLConnection): Updated for m_password |
| name change. |
| (WebCore::ResourceHandle::willSendRequest): Updated for m_password and |
| password name changes. |
| (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): Ditto. |
| |
| * platform/network/curl/CurlProxySettings.cpp: |
| (WebCore::CurlProxySettings::setUserPass): Updated for setPassword name change. |
| (WebCore::createProxyUrl): Use hasCredentials, updated for password name change. |
| * platform/network/curl/CurlProxySettings.h: |
| (WebCore::CurlProxySettings::password const): Updated for password name change. |
| |
| * platform/network/curl/ResourceHandleCurl.cpp: |
| (WebCore::ResourceHandle::didReceiveAuthenticationChallenge): Updated for |
| m_password name change. |
| (WebCore::ResourceHandle::getCredential): Ditto. |
| (WebCore::ResourceHandle::willSendRequest): Updated for m_password and |
| password name changes. |
| |
| * platform/network/mac/ResourceHandleMac.mm: |
| (WebCore::ResourceHandle::createNSURLConnection): Updated for m_password |
| and setPassword name changes. |
| (WebCore::ResourceHandle::willSendRequest): Ditto. |
| (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): Ditto. |
| |
| * platform/network/soup/ResourceRequestSoup.cpp: |
| (WebCore::ResourceRequest::createSoupURI const): Updated for password name change. |
| * platform/network/soup/URLSoup.cpp: |
| (WebCore::soupURIToURL): Updated for setPassword name change. |
| |
| * platform/win/PasteboardWin.cpp: |
| (WebCore::writeURL): Updated since lastPathComponent returns a StringView. |
| (WebCore::filesystemPathFromUrlOrTitle): Ditto. |
| (WebCore::Pasteboard::write): Ditto. |
| |
| * style/StyleBuilderState.cpp: |
| (WebCore::Style::BuilderState::createFilterOperations): Updated since |
| fragmentIdentifier returns a StringView. |
| |
| * workers/WorkerLocation.cpp: |
| (WebCore::WorkerLocation::port const): Streamlined. |
| (WebCore::WorkerLocation::pathname const): Use an ASCIILiteral. |
| (WebCore::WorkerLocation::search const): Use queryWithLeadingQuestionMark. |
| (WebCore::WorkerLocation::hash const): Use fragmentIdentifierWithLeadingNumberSign. |
| |
| * workers/service/ServiceWorkerRegistrationKey.cpp: |
| (WebCore::ServiceWorkerRegistrationKey::ServiceWorkerRegistrationKey): |
| Updated for hasFragmentIdentifier name change. |
| |
| * workers/service/context/ServiceWorkerThreadProxy.cpp: |
| (WebCore::topOriginURL): Simplified code to set port. |
| * workers/service/server/SWServer.cpp: |
| (WebCore::originURL): Ditto. |
| |
| * xml/XMLHttpRequest.cpp: |
| (WebCore::XMLHttpRequest::open): Updated for setPassword name change. |
| |
| 2020-04-25 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Improve tracking of Element* pointers in AXObjectCache with WeakHashSet |
| https://bugs.webkit.org/show_bug.cgi?id=210879 |
| |
| Reviewed by Daniel Bates. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::remove): |
| (WebCore::AXObjectCache::handleFocusedUIElementChanged): |
| (WebCore::filterListForRemoval): |
| (WebCore::AXObjectCache::performDeferredCacheUpdate): |
| * accessibility/AXObjectCache.h: |
| |
| 2020-04-25 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] KeyframeEffect should ensure its target remains alive |
| https://bugs.webkit.org/show_bug.cgi?id=211019 |
| |
| Reviewed by Daniel Bates. |
| |
| Test: webanimations/keyframe-effect-target-kept-alive.html |
| |
| Make KeyframeEffect::m_target a RefPtr so that assigning an element to effect.target guarantees that element |
| is kept alive even if there are no other references to that element. |
| |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::KeyframeEffect): |
| (WebCore::KeyframeEffect::setTarget): |
| * animation/KeyframeEffect.h: |
| |
| 2020-04-25 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Cleanup TableFormattingContext::layoutInFlowContent |
| https://bugs.webkit.org/show_bug.cgi?id=211023 |
| |
| Reviewed by Sam Weinig. |
| |
| Move some code to dedicated functions. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForCells): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForRows): |
| (WebCore::Layout::TableFormattingContext::setUsedGeometryForSections): |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| (WebCore::Layout::TableFormattingContext::initializeDisplayBoxToBlank const): Deleted. |
| (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows): Deleted. |
| (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections): Deleted. |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::cellHeigh const): |
| (WebCore::Layout::TableFormattingContext::Geometry::computedColumnWidth const): |
| (WebCore::Layout::TableFormattingContext::Geometry::tableCellHeightAndMargin const): Deleted. |
| |
| 2020-04-25 Joonghun Park <jh718.park@samsung.com> |
| |
| Unreviewed. Remove the build warning below since r260247. |
| warning: unused parameter ‘foo’ [-Wunused-parameter] |
| |
| No new tests, no new behaviors. |
| |
| * testing/Internals.cpp: |
| (WebCore::Internals::hasSandboxIOKitOpenAccessToClass): |
| |
| 2020-04-24 Chris Dumez <cdumez@apple.com> |
| |
| [iOS] Unable to sign up on twitter.com |
| https://bugs.webkit.org/show_bug.cgi?id=211003 |
| <rdar://problem/58804852> |
| |
| Reviewed by Darin Adler. |
| |
| This is similar to the bug we had on nytimes.com and that was fixed in |
| r258767. However, instead of a 'resize' event, it is a 'change' event |
| on a MediaQueryList that is getting twitter.com in a bad state. |
| |
| The issue is that when we home out of Safari, SpringBoard takes does |
| a snapshot sequence at various sizes / orientations and this causes |
| many JS events to get fired (e.g. 'resize', 'orientationchange', |
| 'change', ...), which can get some sites in a bad state. To address |
| the issue, we now prevent firing of ALL JS events during the |
| SpringBoard snapshot, instead of merely preventing the 'resize' ones. |
| |
| * dom/EventTarget.cpp: |
| (WebCore::EventTarget::fireEventListeners): |
| * page/FrameView.cpp: |
| (WebCore::FrameView::sendResizeEventIfNeeded): |
| * page/Page.h: |
| (WebCore::Page::shouldFireEvents const): |
| (WebCore::Page::setShouldFireEvents): |
| (WebCore::Page::shouldFireResizeEvents const): Deleted. |
| (WebCore::Page::setShouldFireResizeEvents): Deleted. |
| |
| 2020-04-24 Saam Barati <sbarati@apple.com> |
| |
| Return BigInt32 whenever we can |
| https://bugs.webkit.org/show_bug.cgi?id=210922 |
| |
| Reviewed by Yusuke Suzuki. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneDeserializer::readBigInt): |
| |
| 2020-04-24 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| [WTF] allThreads registration is racy with allThreads unregistration |
| https://bugs.webkit.org/show_bug.cgi?id=210995 |
| <rdar://problem/61609690> |
| |
| Reviewed by Keith Miller. |
| |
| * page/cocoa/ResourceUsageThreadCocoa.mm: |
| (WebCore::ResourceUsageThread::platformCollectCPUData): |
| |
| 2020-04-24 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Make some more adjustments to TextManipulationController's paragraph boundary heuristic |
| https://bugs.webkit.org/show_bug.cgi?id=210993 |
| <rdar://problem/61571299> |
| |
| Reviewed by Tim Horton. |
| |
| Adjust the heuristic added in r260583 to account for a few more common scenarios where we currently consider |
| text as a part of the same paragraph. This can lead to many issues during text manipulation where text is moved |
| between these elements, when it should not be. |
| |
| The new scenarios include block and inline-block links, as well as button elements. |
| |
| Test: TextManipulation.StartTextManipulationTreatsInlineBlockLinksAndButtonsAsParagraphs |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::observeParagraphs): |
| |
| Additionally rename "paragraph boundary element" to "item boundary element", to avoid colliding with the |
| existing notion of paragraph boundaries in editing code. |
| |
| 2020-04-24 Christopher Reid <chris.reid@sony.com> |
| |
| [Win] Bundle Inspector Resources in Release builds |
| https://bugs.webkit.org/show_bug.cgi?id=210942 |
| |
| Reviewed by Fujii Hironori. |
| |
| * CMakeLists.txt: |
| |
| 2020-04-24 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Ensure calling Web Animations APIs override future CSS Animations style properties |
| https://bugs.webkit.org/show_bug.cgi?id=210988 |
| |
| Reviewed by Dean Jackson. |
| |
| The CSS Animations Level 2 spec specifies how the Web Animations APIs and the CSS Animations style |
| properties should interact in https://drafts.csswg.org/css-animations-2/#animations. This patch |
| implements the specified behavior and this is reflected by progress on the relevant WPT tests. |
| |
| The gist of this change is that once a Web Animations API is called on an animation created using |
| CSS Animations, any changes made to related CSS Animations style properties on the target element |
| will be ignored so that the overrides applied via the Web Animations API remain in effect. |
| |
| For instance, calling pause() or play() in a way that changes the playback state of the CSS Animation |
| will mean that future changes to the CSS animation-play-state property are ignored. |
| |
| To do this we make more IDL properties and methods use dedicated methods to distinguish between the |
| bindings entry-point and internal usage of the same methods to integrate the behavior only when the |
| API itself is being used. |
| |
| * animation/AnimationEffect.cpp: |
| (WebCore::AnimationEffect::getBindingsTiming const): Ensure we flush styles when animation.effect.getTiming() |
| is called. |
| (WebCore::AnimationEffect::getBindingsComputedTiming const): Ensure we flush styles when |
| animation.effect.getComputedTiming() is called. |
| (WebCore::AnimationEffect::bindingsUpdateTiming): Notify the associated CSSAnimation object, if any, when |
| animation.effect.updateTiming() is called such that the CSSAnimation may apply the relevant overrides. |
| * animation/AnimationEffect.h: |
| * animation/AnimationEffect.idl: |
| * animation/CSSAnimation.cpp: |
| (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation): Only apply new values of CSS Animations style |
| properties if there are no overrides for them resulting from calling related Web Animations APIs. |
| (WebCore::CSSAnimation::bindingsPlay): Mark animation-play-state as overridden if play() is called. |
| (WebCore::CSSAnimation::bindingsPause): Mark animation-play-state as overridden if pause() is called. |
| (WebCore::CSSAnimation::setBindingsEffect): Mark all animation style properties, except for animation-name |
| and animation-play-state as overridden if animation.effect is set. |
| (WebCore::CSSAnimation::setBindingsStartTime): Mark animation-play-state as overridden if animation.startTime |
| is set. |
| (WebCore::CSSAnimation::bindingsReverse): Mark animation-play-state as overridden if reverse() is called. |
| (WebCore::CSSAnimation::effectTimingWasUpdatedUsingBindings): Mark each CSS property associated with a key |
| found on the timing object passed to animation.effect.updateTiming() as overridden. |
| (WebCore::CSSAnimation::effectKeyframesWereSetUsingBindings): Mark animation-timing-function as overridden |
| if animation.effect.setKeyframes() is called. |
| * animation/CSSAnimation.h: |
| * animation/DeclarativeAnimation.cpp: |
| (WebCore::DeclarativeAnimation::bindingsStartTime const): |
| (WebCore::DeclarativeAnimation::setBindingsStartTime): |
| (WebCore::DeclarativeAnimation::startTime const): Deleted. |
| (WebCore::DeclarativeAnimation::setStartTime): Deleted. |
| * animation/DeclarativeAnimation.h: |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::getBindingsKeyframes): Ensure we flush styles when animation.effect.getKeyframes() |
| is called. |
| (WebCore::KeyframeEffect::getKeyframes): Only use the CSS-originated animation path if we don't have JS-originated |
| keyframes. |
| (WebCore::KeyframeEffect::setBindingsKeyframes): Notify the associated CSSAnimation object, if any, when |
| animation.effect.setKeyframes() is called such that the CSSAnimation may apply the relevant overrides. |
| (WebCore::KeyframeEffect::processKeyframes): Correctly return early if part of the processing yields an exception. |
| * animation/KeyframeEffect.h: |
| * animation/KeyframeEffect.idl: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::setBindingsEffect): |
| (WebCore::WebAnimation::setBindingsStartTime): |
| (WebCore::WebAnimation::bindingsReverse): |
| * animation/WebAnimation.h: |
| (WebCore::WebAnimation::bindingsEffect const): |
| (WebCore::WebAnimation::bindingsStartTime const): |
| * animation/WebAnimation.idl: |
| |
| 2020-04-24 Chris Dumez <cdumez@apple.com> |
| |
| ASSERTION FAILED: m_wrapper under HTMLMediaElement::setIsPlayingToWirelessTarget |
| https://bugs.webkit.org/show_bug.cgi?id=210983 |
| <rdar://problem/61611994> |
| |
| Reviewed by Eric Carlson. |
| |
| The issue was that we were trying to fire a JS event as a result of ActiveDOMObject::stop() |
| getting called, which is not allowed. To address the issue, we avoid firing the event if |
| the context is already stopped. |
| |
| No new tests, already covered by: |
| media/modern-media-controls/placard-support/placard-support-airplay-fullscreen.html |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::setIsPlayingToWirelessTarget): |
| |
| 2020-04-24 Tim Horton <timothy_horton@apple.com> |
| |
| iPad: "Pocket City" interaction does not work with trackpad |
| https://bugs.webkit.org/show_bug.cgi?id=210985 |
| <rdar://problem/62273077> |
| |
| Reviewed by Wenson Hsieh. |
| |
| * platform/RuntimeApplicationChecks.h: |
| * platform/cocoa/RuntimeApplicationChecksCocoa.mm: |
| (WebCore::IOSApplication::isPocketCity): |
| |
| 2020-04-24 Tomoki Imai <Tomoki.Imai@sony.com> |
| |
| [OpenSSL] Implement WebCrypto APIs for HMAC |
| https://bugs.webkit.org/show_bug.cgi?id=210902 |
| |
| Reviewed by Don Olmstead. |
| |
| Support WebCrypto HMAC sign/verify with OpenSSL. |
| The design and some functions are inherited from the other ports. |
| |
| * crypto/openssl/CryptoAlgorithmHMACOpenSSL.cpp: |
| (WebCore::HMACAlgorithm): Added. Helper function to map CryptoAlgorithmIdentifier to OpenSSL EVP_MD type. |
| (WebCore::calculateSignature): Added. Helper function to calculate the signature for sign/verify. |
| (WebCore::CryptoAlgorithmHMAC::platformSign): Implemented, mostly same as the other ports. |
| (WebCore::CryptoAlgorithmHMAC::platformVerify): Implemented, mostly same as the other ports. |
| * crypto/openssl/CryptoAlgorithmRegistryOpenSSL.cpp: |
| (WebCore::CryptoAlgorithmRegistry::platformRegisterAlgorithms): Added CryptoAlgorithmHMAC support. |
| * crypto/openssl/OpenSSLCryptoUniquePtr.h: Added specialized unique_ptrs for EVP_MD_CTX and EVP_PKEY. |
| (WebCore::OpenSSLCryptoPtrDeleter<EVP_MD_CTX>::operator() const): |
| (WebCore::OpenSSLCryptoPtrDeleter<EVP_PKEY>::operator() const): |
| |
| 2020-04-24 Brian Burg <bburg@apple.com> |
| |
| Web Automation: timeout underneath Automation.evaluateJavaScriptFunction in Selenium test frame_switching_tests.py::testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnderUs[Safari] |
| https://bugs.webkit.org/show_bug.cgi?id=210162 |
| <rdar://problem/60561009> |
| |
| Reviewed by Devin Rousso. |
| |
| * page/DOMWindow.h: Expose DOMWindow::{register, unregister}Observer. |
| |
| 2020-04-24 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Take first in-flow table-row baseline into account when computing cell baseline |
| https://bugs.webkit.org/show_bug.cgi?id=210972 |
| |
| Reviewed by Antti Koivisto. |
| |
| Check if the cell has a nested table and use its first row as the baseline for the cell (unless there's an IFC before). |
| |
| Test: fast/layoutformattingcontext/table-basic-row-baseline-with-nested-table.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::usedBaselineForCell): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::Row::setBaselineOffset): |
| (WebCore::Layout::TableGrid::Row::baselineOffset const): |
| |
| 2020-04-24 Antti Koivisto <antti@apple.com> |
| |
| Nullptr crash in objc_msgSend under WebCore::genericFamily |
| https://bugs.webkit.org/show_bug.cgi?id=210911 |
| <rdar://problem/61510208> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Speculative fix. |
| |
| * platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp: |
| (WebCore::genericFamily): |
| |
| Test that CTFontDescriptorCopyAttribute is really returning CFStringRef. |
| Also explicitly return String from lambda to clarify lifetimes. |
| |
| 2020-04-24 Simon Fraser <simon.fraser@apple.com> |
| |
| Move some post-renderingUpdate code into WebCore |
| https://bugs.webkit.org/show_bug.cgi?id=210952 |
| |
| Reviewed by Antti Koivisto. |
| |
| Factor some code called by the various DrawingArea subclasses into Page::finalizeRenderingUpdate(), |
| with some flags to control behavior that differs between drawing areas. |
| |
| ScrollingCoordinator::commitTreeStateIfNeeded() is a no-op for RemoteScrollingCoordinator so |
| it's fine to always call it. |
| |
| * page/Page.cpp: |
| (WebCore::Page::passiveTouchEventListenerRectsForTesting): |
| (WebCore::Page::finalizeRenderingUpdate): |
| * page/Page.h: |
| |
| 2020-04-24 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Add missing HTMLNames:: namespace prefix to usage of liTag object |
| |
| Unreviewed build fix. |
| |
| No new tests needed. |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::observeParagraphs): |
| |
| 2020-04-23 Rob Buis <rbuis@igalia.com> |
| |
| Make CachedResourceLoader more conforming to Fetch specification |
| https://bugs.webkit.org/show_bug.cgi?id=210925 |
| |
| Reviewed by Alex Christensen. |
| |
| Make CachedResourceLoader more conforming to Fetch specification |
| by fixing links, re-ordering steps to match main fetch [1] and do |
| early exit code paths earlier. |
| |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::requestImage): adjust to parameter change. |
| (WebCore::CachedResourceLoader::canRequest): replace CachedResourceRequest param with ResourceLoaderOptions. |
| (WebCore::CachedResourceLoader::prepareFetch): fix comment. |
| (WebCore::CachedResourceLoader::requestResource): re-order. |
| * loader/cache/CachedResourceLoader.h: |
| |
| 2020-04-23 Simon Fraser <simon.fraser@apple.com> |
| |
| Move the storage of DisplayID from Chrome to Page |
| https://bugs.webkit.org/show_bug.cgi?id=210943 |
| |
| Reviewed by Tim Horton. |
| |
| The less Chrome knows about Frames and Documents the better. At some point Page is going |
| to talk to ScrollingCoordinator in this callback too. |
| |
| * page/Chrome.cpp: |
| (WebCore::Chrome::displayID const): |
| (WebCore::Chrome::windowScreenDidChange): |
| * page/Chrome.h: |
| * page/Page.cpp: |
| (WebCore::Page::windowScreenDidChange): |
| * page/Page.h: |
| (WebCore::Page::displayID const): |
| |
| 2020-04-23 Simon Fraser <simon.fraser@apple.com> |
| |
| EventHandler::selectCursor() has broken resize over coordinate conversion code |
| https://bugs.webkit.org/show_bug.cgi?id=210778 |
| |
| Reviewed by Zalan Bujtas. |
| |
| EventHandler::selectCursor() appeared to make a local hit-test point from window |
| to content coordinates, which made no sense, but this happened to work because |
| RenderLayer::hitTestLayer() set the HitTestResult localPoint to a global point |
| if you hit the resizer. |
| |
| Clean up this mess by having all resizer-related geometry queries be in local coordinates. |
| |
| As a bonus, actually set the cursor to a resize cursor when over the resizer. |
| |
| Test: fast/events/cursors/mouse-cursor-over-resizer.html |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::selectCursor): |
| (WebCore::EventHandler::handleMousePressEvent): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::resize): |
| (WebCore::RenderLayer::offsetFromResizeCorner const): |
| (WebCore::RenderLayer::isPointInResizeControl const): |
| (WebCore::RenderLayer::hitTestLayer): |
| (WebCore::RenderLayer::hitTestResizerInFragments const): |
| * rendering/RenderLayer.h: |
| |
| 2020-04-23 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation does not account for text in fully clipped containers |
| https://bugs.webkit.org/show_bug.cgi?id=210940 |
| <rdar://problem/61137648> |
| |
| Reviewed by Tim Horton. |
| |
| Allow text manipulation to find both text in `visibility: hidden;` containers, as well as text in fully clipped |
| overflow containers. In both cases, renderers exist for these nodes, but TextIterator ignores them by default. |
| If these containers become visible in the future, we don't want to skip out on performing text manipulation on |
| them. |
| |
| An alternative would be to detect when any element that has not undergone text manipulation has become visible |
| (i.e. no longer clipped by an ancestor), but this is likely more complicated (and possibly less performant) than |
| just eagerly extracting text from hidden containers, once they gain renderers. |
| |
| TextManipulation.StartTextManipulationIncludesFullyClippedText |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::ParagraphContentIterator::ParagraphContentIterator): |
| (WebCore::TextManipulationController::didCreateRendererForElement): |
| (WebCore::TextManipulationController::scheduleObservationUpdate): |
| (WebCore::TextManipulationController::scheduleObservartionUpdate): Deleted. |
| |
| While I'm here, also rename scheduleObservartionUpdate to scheduleObservationUpdate. |
| |
| * editing/TextManipulationController.h: |
| |
| 2020-04-23 Alex Christensen <achristensen@webkit.org> |
| |
| Allow credentials for same-origin css mask images |
| https://bugs.webkit.org/show_bug.cgi?id=210895 |
| <rdar://problem/60093888> |
| |
| Reviewed by Brent Fulgham. |
| |
| Test: http/tests/security/css-mask-image-credentials.html |
| |
| r230006 went a step too far in restricting what is allowed with css mask images. |
| Basic authentication credentials should be allowed with such requests as they are in Chrome and Firefox. |
| This can be seen by doing run-webkit-httpd then opening http://127.0.0.1:8000/security/css-mask-image-credentials.html |
| In Chrome and Firefox you'll see it forward to a page that has a blue square. |
| In Safari before this change you'll see a yellow square and a basic authentication prompt. |
| In Safari after this change you'll see the same blue square you see in Chrome and Firefox. |
| |
| * style/StylePendingResources.cpp: |
| (WebCore::Style::loadPendingImage): |
| |
| 2020-04-23 Alex Christensen <achristensen@webkit.org> |
| |
| Jesus Calling app needs more WebSQL |
| https://bugs.webkit.org/show_bug.cgi?id=210889 |
| <rdar://problem/61795507> |
| |
| Reviewed by Chris Dumez. |
| |
| Manually verified this fixes the issue in the radar. |
| |
| * bindings/js/JSDOMWindowCustom.cpp: |
| (WebCore::jsDOMWindowInstanceFunctionOpenDatabaseBody): |
| |
| 2020-04-23 Rob Buis <rbuis@igalia.com> |
| |
| Move applyUserAgentIfNeeded calls to a more central place |
| https://bugs.webkit.org/show_bug.cgi?id=209587 |
| |
| Reviewed by Darin Adler. |
| |
| Make main resource loads stop calling applyUserAgentIfNeeded |
| and instead do it in the CachedResourceLoader. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::addExtraFieldsToRequest): |
| (WebCore::FrameLoader::loadResourceSynchronously): |
| * loader/appcache/ApplicationCacheGroup.cpp: |
| (WebCore::ApplicationCacheGroup::createRequest): |
| * loader/cache/CachedResourceLoader.cpp: |
| (WebCore::CachedResourceLoader::updateHTTPRequestHeaders): |
| (WebCore::CachedResourceLoader::requestResource): |
| * loader/cache/CachedResourceLoader.h: |
| * loader/cache/CachedResourceRequest.cpp: |
| (WebCore::CachedResourceRequest::updateReferrerAndOriginHeaders): |
| (WebCore::CachedResourceRequest::updateUserAgentHeader): |
| (WebCore::CachedResourceRequest::updateReferrerOriginAndUserAgentHeaders): Deleted. |
| * loader/cache/CachedResourceRequest.h: |
| |
| 2020-04-23 Kenneth Russell <kbr@chromium.org> |
| |
| [WebGL2] Update texture packing code for software uploads from DOM |
| https://bugs.webkit.org/show_bug.cgi?id=209515 |
| |
| Reviewed by Dean Jackson. |
| |
| Update the bottommost DOM-to-texture packing code in |
| GraphicsContextGLOpenGL and FormatConverter to full WebGL 2.0 |
| capability. Reorganize some code to make side-by-side comparisons |
| easier with other WebGL 2.0 implementations. |
| |
| Added NEEDS_PORT comments to areas in the calling code which need |
| particular attention in subsequent patches. Roughly two more |
| patches will be needed on top of this one in order to fully pass |
| the associated conformance tests. |
| |
| Fix a bug in the non-ANGLE ENABLE(WEBGL2) code path which |
| accidentally disabled WebGL entirely in this configuration. |
| |
| Covered by the WebGL 2.0 conformance tests. |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::create): |
| (WebCore::WebGLRenderingContextBase::copyTexSubImage2D): |
| (WebCore::WebGLRenderingContextBase::readPixels): |
| (WebCore::WebGLRenderingContextBase::texImageSource2D): |
| (WebCore::WebGLRenderingContextBase::texImage2DImpl): |
| (WebCore::WebGLRenderingContextBase::texImage2D): |
| (WebCore::WebGLRenderingContextBase::texSubImage2DImpl): |
| (WebCore::WebGLRenderingContextBase::texSubImage2D): |
| (WebCore::WebGLRenderingContextBase::validateTexFuncData): |
| (WebCore::WebGLRenderingContextBase::getPackPixelStoreParams const): |
| (WebCore::WebGLRenderingContextBase::getUnpackPixelStoreParams const): |
| * html/canvas/WebGLRenderingContextBase.h: |
| * platform/graphics/FormatConverter.cpp: |
| (WebCore::convertFloatToHalfFloat): |
| (WebCore::float>): |
| (WebCore::uint8_t>): |
| (WebCore::uint16_t>): |
| (WebCore::int8_t>): |
| (WebCore::int16_t>): |
| (WebCore::uint32_t>): |
| (WebCore::int32_t>): |
| (WebCore::FormatConverter::convert): |
| * platform/graphics/FormatConverter.h: |
| (WebCore::FormatConverter::FormatConverter): |
| * platform/graphics/GraphicsContextGL.h: |
| (WebCore::GraphicsContextGL::hasAlpha): |
| (WebCore::GraphicsContextGL::hasColor): |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp: |
| (WebCore::GraphicsContextGLOpenGL::texImage2DResourceSafe): |
| (WebCore::GraphicsContextGLOpenGL::computeFormatAndTypeParameters): |
| (WebCore::GraphicsContextGLOpenGL::computeImageSizeInBytes): |
| (WebCore::GraphicsContextGLOpenGL::PixelStoreParams::PixelStoreParams): |
| (WebCore::GraphicsContextGLOpenGL::packImageData): |
| (WebCore::GraphicsContextGLOpenGL::extractImageData): |
| (WebCore::GraphicsContextGLOpenGL::extractTextureData): |
| (WebCore::TexelBytesForFormat): |
| (WebCore::GraphicsContextGLOpenGL::packPixels): |
| * platform/graphics/opengl/GraphicsContextGLOpenGL.h: |
| |
| 2020-04-23 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Add a heuristic for text manipulation to treat some list items as paragraph boundaries |
| https://bugs.webkit.org/show_bug.cgi?id=210915 |
| <rdar://problem/61907080> |
| |
| Reviewed by Megan Gardner. |
| |
| Adds a mechanism to allow text manipulation to emit an item containing the current list of text manipulation |
| tokens early, in the case where the paragraph content iterator crosses the boundary of an element that encloses |
| a paragraph. Currently, the only enclosing paragraph element will be list items that have `display: block;`, |
| which we can take as a hint that the text in these list items should be vended as separate items, rather than as |
| tokens in a single item. |
| |
| This may be extended in the future to other situations by adjusting logic in `isEnclosingParagraphElement`. |
| |
| Test: TextManipulation.StartTextManipulationBreaksParagraphInBetweenListItems |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::TextManipulationController::observeParagraphs): |
| |
| 2020-04-23 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for basic baseline align inside a table row |
| https://bugs.webkit.org/show_bug.cgi?id=210918 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-basic-row-baseline-align.html |
| |
| The minimum height of a row is defined as the height of an hypothetical linebox containing |
| the cells originating in the row. In this hypothetical linebox, we use baseline alignment to |
| align the cells vertically. |
| Use these vertically aligned cells to compute the final row height. |
| |
| * layout/displaytree/DisplayBox.h: |
| (WebCore::Display::Box::verticalMarginBorderAndPadding const): |
| (WebCore::Display::Box::setVerticalPadding): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| * layout/tableformatting/TableFormattingContext.h: |
| |
| 2020-04-23 Sihui Liu <sihui_liu@apple.com> |
| |
| TextManipulationController should set range of paragraph using token's positions |
| https://bugs.webkit.org/show_bug.cgi?id=210866 |
| <rdar://problem/60646283> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Set the range of paragraph using positions of first token and last token in the paragraph because: |
| 1. Accurate range makes token matching in TextManipulationController::replace() easier, as TextIterator could |
| visit different positions with different ranges or different conditions. For example, in our previous |
| implementation, start of a paragraph can be set as the first visible position of document, while position of |
| first token is after that. Then in replace(), TextManipulationController may extract a word before the position |
| of first token and return error. See added test TextManipulation.CompleteTextManipulationCorrectParagraphRange. |
| 2. TextManipulationController can handle fewer content and this is less error-prone. For example, svg elements |
| before/after the paragraph text will not be identified as tokens [] in a paragraph now. See updated API tests |
| for example. |
| |
| New test: TextManipulation.CompleteTextManipulationCorrectParagraphRange |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::ParagraphContentIterator::moveCurrentNodeForward): m_currentNodeForFindingInvisibleContent should not |
| be advanced if it is already at the end. |
| (WebCore::containsOnlyHTMLSpaces): |
| (WebCore::TextManipulationController::observeParagraphs):Set the paragraph start as the position of the first |
| token and end as the position of last token. If the paragraph is split with <br>, the end will be extended to |
| position of <br> so that we can add this node back later; otherwise, <br> can be removed after original |
| text of paragraph is removed in TextManipulationController::replace(). Also, stop identifying spaces as tokens |
| because non-text Node can emit spaces. |
| (WebCore::TextManipulationController::replace): Only identify tokens from content with meaningful text. |
| |
| 2020-04-23 Chris Dumez <cdumez@apple.com> |
| |
| [ Mac wk2 ] imported/w3c/web-platform-tests/notifications/event-onclose.html is flaky failing. |
| https://bugs.webkit.org/show_bug.cgi?id=209483 |
| <rdar://problem/60830377> |
| |
| Reviewed by Geoff Garen. |
| |
| Align garbage collection of Notification JS wrapper with the specification: |
| - https://notifications.spec.whatwg.org/#garbage-collection [1] |
| |
| In particular, the following changes were made: |
| 1. Instead of using the legacy setPendingActivity() / unsetPendingActivity(), override |
| ActiveDOMObject::virtualHasPendingActivity() to implement the behavior documented |
| in the specification. |
| 2. Keep the wrapper alive as long as the notification is showing and as long as there |
| are relevant event listeners, as per [1]. Previously, we failed to check for event |
| listeners, which was suboptimal. |
| 3. Update the constructor to queue a task on the event loop in order to show the |
| notification asynchronously, instead of relying on a SuspendableTimer for this |
| purpose. Previously, the JS wrapper could get collected between construction and |
| the notification getting shown, which was leading to the test flakiness. |
| |
| No new tests, unskipped existing test. |
| |
| * Modules/notifications/Notification.cpp: |
| (WebCore::Notification::Notification): |
| (WebCore::Notification::show): |
| (WebCore::Notification::finalize): |
| (WebCore::Notification::dispatchShowEvent): |
| (WebCore::Notification::dispatchClickEvent): |
| (WebCore::Notification::dispatchCloseEvent): |
| (WebCore::Notification::dispatchErrorEvent): |
| (WebCore::Notification::eventListenersDidChange): |
| (WebCore::Notification::virtualHasPendingActivity const): |
| * Modules/notifications/Notification.h: |
| |
| 2020-04-23 Andres Gonzalez <andresg_22@apple.com> |
| |
| Correction for patch 397001. |
| https://bugs.webkit.org/show_bug.cgi?id=210914 |
| |
| Reviewed by Chris Fleizach. |
| |
| - No need to check for isEmpty when retrieving the primary screen size, |
| as pointed out by Darin Adler in bug 210760, patch 397001. |
| - Added some helpful AXLOGing. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper primaryScreenHeight]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]): |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): |
| (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]): |
| |
| 2020-04-23 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] Add WebKit::WebCoreTestSupport target |
| https://bugs.webkit.org/show_bug.cgi?id=210867 |
| |
| Unreviewed build fix. |
| |
| Make the dependencies explicit. |
| |
| * CMakeLists.txt: |
| |
| 2020-04-22 Simon Fraser <simon.fraser@apple.com> |
| |
| In the scrolling tree, separate wheel event handling from layer updating |
| https://bugs.webkit.org/show_bug.cgi?id=210899 |
| |
| Reviewed by Antti Koivisto. |
| |
| Working towards webkit.org/b/210884, it needs to be possible to have the scrolling |
| tree handle a wheelEvent and update its internal state about scroll positions, but not |
| immediately map those scroll positions onto CALayers. |
| |
| To achieve this, have ScrollingTreeScrollingNode::currentScrollPositionChanged() |
| not call applyLayerPositions(), or notifyRelatedNodesAfterScrollPositionChange() which |
| just applies layer positions on related nodes. |
| |
| Instead, at the end of wheel event handling, do a full scrolling tree traversal and update |
| all the layer positions there. |
| |
| Delegated scrolling (iOS) still needs notifyRelatedNodesAfterScrollPositionChange() so it |
| can't be removed. |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::handleWheelEvent): |
| (WebCore::ScrollingTree::applyLayerPositions): |
| (WebCore::ScrollingTree::applyLayerPositionsInternal): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged): |
| |
| 2020-04-23 Charlie Turner <cturner@igalia.com> |
| |
| [EME][CDMProxy] Sort key status array lexicographically by key IDs |
| https://bugs.webkit.org/show_bug.cgi?id=210659 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| This is required by section 6.1 of |
| https://www.w3.org/TR/encrypted-media/. |
| |
| Test: encrypted-media/clearkey-keystatuses.https.html |
| |
| * platform/encryptedmedia/CDMProxy.cpp: |
| (WebCore::KeyStore::add): We could use a set here and keep it |
| sorted by design, but this is more complexity than needed. The |
| store has for practical purposes an upper limit of 2 |
| items. Sorting such a vector lowers to either a noop or a swap. So |
| the simple approach here wins over using some kind of self-sorting |
| set structure. I also considered only sorting on-demand, since it |
| only has to appear sorted from the perspective of JS, we could |
| sort the array in convertToJSKeyStatusVector. However, that is |
| semantically a const method, so sorting here felt too surprising. |
| * platform/encryptedmedia/CDMProxy.h: |
| (WebCore::Key::operator<): Add a lexicographic comparator to |
| Key. |
| |
| 2020-04-23 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] excessive wakeups/polling due to gdk_frame_clock_begin_updating |
| https://bugs.webkit.org/show_bug.cgi?id=210561 |
| |
| Reviewed by Žan Doberšek. |
| |
| The problem is that we are destroying the display refresh monitor from the frame clock update callback, and GTK |
| schedules another update from the callback itself in some cases, which ends up happening forever. We were |
| assuming that destroying the window of immediately destroy the frame clock as well, but the paint source idle |
| keeps a reference of the frame clock. At the end of the source idle callback the source is scheduled again, |
| taking a new reference. We need to call gdk_frame_clock_end_updating() to ensure the idle is not scheduled |
| again. |
| |
| * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp: |
| (WebCore::DisplayRefreshMonitorGtk::~DisplayRefreshMonitorGtk): Disconnect the update signal and call |
| gdk_frame_clock_end_updating(). |
| (WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback): Toplevel window should always have a frame clock, |
| so remove the early return and add an assert instead. |
| |
| 2020-04-23 Youenn Fablet <youenn@apple.com> |
| |
| getDisplayMedia is not respecting aspect ratio with max constraints |
| https://bugs.webkit.org/show_bug.cgi?id=210858 |
| |
| Reviewed by Eric Carlson. |
| |
| Add computation of exact frame size to respect aspect ratio in DisplayCaptureSourceCocoa::updateFrameSize. |
| Refactor code to have one source class DisplayCaptureSourceCocoa and specific capturer for screen and window. |
| This simplifies code and allows reusing DisplayCaptureSourceCocoa with a mock capturer. |
| Update mock code to use DisplayCaptureSourceCocoa. |
| |
| Tests: fast/mediastream/getDisplayMedia-max-constraints.html |
| fast/mediastream/getDisplayMedia-max-constraints1.html |
| fast/mediastream/getDisplayMedia-max-constraints2.html |
| fast/mediastream/getDisplayMedia-max-constraints3.html |
| |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/mediastream/mac/DisplayCaptureManagerCocoa.cpp: |
| (WebCore::DisplayCaptureManagerCocoa::updateDisplayCaptureDevices): |
| (WebCore::DisplayCaptureManagerCocoa::updateWindowCaptureDevices): |
| (WebCore::DisplayCaptureManagerCocoa::screenCaptureDeviceWithPersistentID): |
| (WebCore::DisplayCaptureManagerCocoa::windowCaptureDeviceWithPersistentID): |
| * platform/mediastream/mac/DisplayCaptureSourceCocoa.cpp: |
| (WebCore::DisplayCaptureSourceCocoa::create): |
| (WebCore::DisplayCaptureSourceCocoa::DisplayCaptureSourceCocoa): |
| (WebCore::DisplayCaptureSourceCocoa::~DisplayCaptureSourceCocoa): |
| (WebCore::DisplayCaptureSourceCocoa::capabilities): |
| (WebCore::DisplayCaptureSourceCocoa::settings): |
| (WebCore::DisplayCaptureSourceCocoa::startProducingData): |
| (WebCore::DisplayCaptureSourceCocoa::stopProducingData): |
| (WebCore::DisplayCaptureSourceCocoa::updateFrameSize): |
| (WebCore::DisplayCaptureSourceCocoa::emitFrame): |
| (WebCore::DisplayCaptureSourceCocoa::Capturer::setLogger): |
| (WebCore::DisplayCaptureSourceCocoa::Capturer::logChannel const): |
| * platform/mediastream/mac/DisplayCaptureSourceCocoa.h: |
| * platform/mediastream/mac/MockRealtimeVideoSourceMac.h: |
| * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: |
| (WebCore::MockRealtimeVideoSourceMac::createForMockDisplayCapturer): |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp: |
| * platform/mediastream/mac/ScreenDisplayCapturerMac.h: Added. |
| * platform/mediastream/mac/ScreenDisplayCapturerMac.mm: Added. |
| (WebCore::ScreenDisplayCapturerMac::create): |
| (WebCore::ScreenDisplayCapturerMac::ScreenDisplayCapturerMac): |
| (WebCore::ScreenDisplayCapturerMac::~ScreenDisplayCapturerMac): |
| (WebCore::ScreenDisplayCapturerMac::createDisplayStream): |
| (WebCore::ScreenDisplayCapturerMac::start): |
| (WebCore::ScreenDisplayCapturerMac::stop): |
| (WebCore::ScreenDisplayCapturerMac::generateFrame): |
| (WebCore::ScreenDisplayCapturerMac::startDisplayStream): |
| (WebCore::ScreenDisplayCapturerMac::commitConfiguration): |
| (WebCore::ScreenDisplayCapturerMac::displayWasReconfigured): |
| (WebCore::ScreenDisplayCapturerMac::displayReconfigurationCallBack): |
| (WebCore::ScreenDisplayCapturerMac::newFrame): |
| (WebCore::ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID): |
| (WebCore::ScreenDisplayCapturerMac::screenCaptureDevices): |
| * platform/mediastream/mac/WindowDisplayCapturerMac.h: Added. |
| * platform/mediastream/mac/WindowDisplayCapturerMac.mm: ddedAdded. |
| (WebCore::WindowDisplayCapturerMac::create): |
| (WebCore::WindowDisplayCapturerMac::WindowDisplayCapturerMac): |
| (WebCore::WindowDisplayCapturerMac::windowImage): |
| (WebCore::WindowDisplayCapturerMac::generateFrame): |
| (WebCore::WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID): |
| (WebCore::WindowDisplayCapturerMac::windowCaptureDevices): |
| * platform/mock/MockRealtimeMediaSourceCenter.cpp: |
| (WebCore::MockDisplayCapturer::MockDisplayCapturer): |
| (WebCore::MockDisplayCapturer::start): |
| (WebCore::MockDisplayCapturer::generateFrame): |
| * platform/mock/MockRealtimeVideoSource.h: |
| (isType): |
| |
| 2020-04-22 Simon Fraser <simon.fraser@apple.com> |
| |
| Make it possible to eagerly apply scrolling tree state from the main thread |
| https://bugs.webkit.org/show_bug.cgi?id=210883 |
| |
| Reviewed by Tim Horton. |
| |
| Work towards fixing webkit.org/b/210884: at the beginning of Page::updateRendering(), |
| we are going to need to pull the current state of the scrolling tree back to the |
| main thread, so that JS-exposed scroll offsets match scrolling tree state. |
| |
| To this end, expose a scrolling tree traversal function from ScrollingTree, which |
| takes the lock and then calls a visitor function for each node. For scrolling nodes, |
| the visitor gets the scroll position and optional layout viewport origin. These |
| match the data passed back currently via AsyncScrollingCoordinator::scheduleUpdateScrollPositionAfterAsyncScroll(). |
| |
| The new code is not called yet. |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::synchronizeStateFromScrollingTree): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::synchronizeStateFromScrollingTree): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::traverseScrollingTree): |
| (WebCore::ScrollingTree::traverseScrollingTreeRecursive): |
| * page/scrolling/ScrollingTree.h: |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::currentScrollPositionChanged): applyLayerPositions() calls these two |
| functions, so just call it instead. |
| |
| 2020-04-22 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260535. |
| https://bugs.webkit.org/show_bug.cgi?id=210897 |
| |
| Causes crashes in WK1 (Requested by smfr on #webkit). |
| |
| Reverted changeset: |
| |
| "[ Mac wk2 ] imported/w3c/web-platform-tests/notifications |
| /event-onclose.html is flaky failing." |
| https://bugs.webkit.org/show_bug.cgi?id=209483 |
| https://trac.webkit.org/changeset/260535 |
| |
| 2020-04-22 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Build with UChar as char16_t even in builds that use Apple's internal SDK |
| https://bugs.webkit.org/show_bug.cgi?id=210845 |
| |
| Reviewed by Anders Carlsson. |
| |
| * Configurations/WebCore.xcconfig: Move ICU-configuring macros to Platform.h. |
| |
| * Modules/websockets/WebSocket.cpp: |
| (WebCore::WebSocket::connect): Get rid of an obsolete cast to unsigned to work |
| around uint16_t not being treated as a number by makeString. |
| |
| * rendering/svg/SVGTextLayoutEngineBaseline.cpp: |
| (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle const): |
| Remove deprecated U_EA_COUNT. |
| |
| 2020-04-22 Andres Gonzalez <andresg_22@apple.com> |
| |
| Add logging to core accessibility. |
| https://bugs.webkit.org/show_bug.cgi?id=210564 |
| <rdar://problem/61863477> |
| |
| Reviewed by Simon Fraser and Chris Fleizach. |
| |
| - Use LOG and LOG_WITH_STREAM macros instead of WTF::Logger directly. |
| - Added logging of AXCoreObjects. |
| |
| * accessibility/AXLogger.cpp: |
| (WebCore::AXLogger::AXLogger): |
| (WebCore::AXLogger::~AXLogger): |
| (WebCore::AXLogger::log): |
| (WebCore::operator<<): |
| * accessibility/AXLogger.h: |
| * accessibility/AccessibilityObjectInterface.h: |
| |
| 2020-04-22 Daniel Bates <dabates@apple.com> |
| |
| Support toggling debug overlay for touch action region and editable element region independent from non-fast scrollable region |
| https://bugs.webkit.org/show_bug.cgi?id=210774 |
| |
| Reviewed by Dean Jackson. |
| |
| Break out the touch action region and editable element region debug overlays into their own |
| flags that can be passed to Settings::setVisibleDebugOverlayRegions() to toggle these overlays, |
| respectively. Currently both of these overlays piggyback on whether the engine will paint the |
| non-fast scrollable region. |
| |
| * page/SettingsBase.h: Add two more enumerators. |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::invalidateEventRegion const): Update the code to be more precise now that |
| we can target the update paint overlay hack to when we are painting touch-action or editable |
| element regions. |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::paintDebugOverlays): Condition the painting of touch action region |
| on one enumerator and the painting of editable element region on another. |
| (WebCore::RenderLayerBacking::paintContents): Update the code to be more precise. |
| |
| 2020-04-22 Chris Dumez <cdumez@apple.com> |
| |
| [ Mac wk2 ] imported/w3c/web-platform-tests/notifications/event-onclose.html is flaky failing. |
| https://bugs.webkit.org/show_bug.cgi?id=209483 |
| <rdar://problem/60830377> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Align garbage collection of Notification JS wrapper with the specification: |
| - https://notifications.spec.whatwg.org/#garbage-collection [1] |
| |
| In particular, the following changes were made: |
| 1. Instead of using the legacy setPendingActivity() / unsetPendingActivity(), override |
| ActiveDOMObject::virtualHasPendingActivity() to implement the behavior documented |
| in the specification. |
| 2. Keep the wrapper alive as long as the notification is showing and as long as there |
| are relevant event listeners, as per [1]. Previously, we failed to check for event |
| listeners, which was suboptimal. |
| 3. Update the constructor to queue a task on the event loop in order to show the |
| notification asynchronously, instead of relying on a SuspendableTimer for this |
| purpose. Previously, the JS wrapper could get collected between construction and |
| the notification getting shown, which was leading to the test flakiness. |
| |
| No new tests, unskipped existing test. |
| |
| * Modules/notifications/Notification.cpp: |
| (WebCore::Notification::Notification): |
| (WebCore::Notification::show): |
| (WebCore::Notification::finalize): |
| (WebCore::Notification::dispatchShowEvent): |
| (WebCore::Notification::dispatchClickEvent): |
| (WebCore::Notification::dispatchCloseEvent): |
| (WebCore::Notification::dispatchErrorEvent): |
| (WebCore::Notification::eventListenersDidChange): |
| (WebCore::Notification::virtualHasPendingActivity const): |
| * Modules/notifications/Notification.h: |
| |
| 2020-04-22 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] Add WebKit::WebCoreTestSupport target |
| https://bugs.webkit.org/show_bug.cgi?id=210867 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add the WebKit::WebCoreTestSupport target. Modify WebCoreTestSupport to only |
| have a dependency on WebCore if WebCore is built as a shared library. |
| |
| * CMakeLists.txt: |
| |
| 2020-04-22 Eric Carlson <eric.carlson@apple.com> |
| |
| fast/events/event-handler-detached-document-dispatchEvent.html is crashing |
| https://bugs.webkit.org/show_bug.cgi?id=210859 |
| <rdar://problem/62072269> |
| |
| Reviewed by Jer Noble. |
| |
| A media session may not have a Page when it is created, so register with the MediaUsageManager |
| in inActiveDocumentChanged if necessary. |
| |
| No new tests, fixes an existing test. |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::MediaElementSession): |
| (WebCore::MediaElementSession::~MediaElementSession): |
| (WebCore::MediaElementSession::addedMediaUsageManagerSessionIfNecessary): |
| (WebCore::MediaElementSession::inActiveDocumentChanged): |
| (WebCore::MediaElementSession::updateMediaUsageIfChanged): |
| * html/MediaElementSession.h: |
| |
| 2020-04-22 Antti Koivisto <antti@apple.com> |
| |
| REGRESSION (r249160): Deleting newline after pasting text ending in a newline results in a discontinuity |
| https://bugs.webkit.org/show_bug.cgi?id=210677 |
| <rdar://problem/61954169> |
| |
| Reviewed by Zalan Bujtas. |
| |
| Test: fast/text/delete-line-break-in-pre.html |
| |
| * rendering/RenderTextLineBoxes.cpp: |
| (WebCore::RenderTextLineBoxes::dirtyRange): |
| |
| r249160 changed InlineTextBox end offset to be consistently first-past-end. |
| The code here that updates lineBreakPos needs to take this into account too. |
| |
| 2020-04-22 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Coordinate "update animations and send events" procedure across multiple timelines |
| https://bugs.webkit.org/show_bug.cgi?id=202109 |
| <rdar://problem/59470821> |
| |
| Reviewed by Dean Jackson. |
| |
| So far, although we did manage multiple animation timelines per document, we mostly operated |
| under the assumption that there really was a single timeline. In this patch we make the |
| "update animations and send events" procedure, which is central to the lifecycle of animations, |
| work with multiple timelines such that a single microtask checkpoint is performed even with multiple |
| timelines, whereas we would perform one per timeline before. To do this, we move much of the logic |
| DocumentTimeline::updateAnimationsAndSendEvents() to DocumentTimelinesController where each step is |
| run across each timeline, rather than running all steps for each timeline one after the other, |
| respecting the single microtask checkpoint in the middle of the process. |
| |
| To minimize code churn at this stage, we still keep a fair bit of logic in DocumentTimeline and, |
| while we remove updateAnimationsAndSendEvents(), internalUpdateAnimationsAndSendEvents() and |
| updateCurrentTime(), we expose three methods that allow to run the pre-flight sequence in |
| documentWillUpdateAnimationsAndSendEvents(), collect pending events in |
| prepareForPendingAnimationEventsDispatch() and run the post-flight sequence |
| in documentDidUpdateAnimationsAndSendEvents(). |
| |
| None of the logic changes, this is just moving code around. In the future, more patches will move |
| code from DocumentTimeline up to DocumentTimelinesController such that events are enqueued there, |
| and animation scheduling as well. But this already lets us pass a new test that used to flakily |
| reject promises in the WPT test web-animations/timing-model/timelines/update-and-send-events.html. |
| |
| * animation/AnimationTimeline.h: |
| (WebCore::AnimationTimeline::relevantAnimations const): |
| (WebCore::AnimationTimeline::allAnimations const): |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::documentWillUpdateAnimationsAndSendEvents): |
| (WebCore::DocumentTimeline::documentDidUpdateAnimationsAndSendEvents): |
| (WebCore::DocumentTimeline::prepareForPendingAnimationEventsDispatch): |
| (WebCore::DocumentTimeline::updateCurrentTime): Deleted. |
| (WebCore::DocumentTimeline::updateAnimationsAndSendEvents): Deleted. |
| (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents): Deleted. |
| * animation/DocumentTimeline.h: |
| * animation/DocumentTimelinesController.cpp: |
| (WebCore::DocumentTimelinesController::DocumentTimelinesController): |
| (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): |
| * animation/DocumentTimelinesController.h: |
| * animation/WebAnimationTypes.h: |
| * dom/Document.cpp: |
| (WebCore::Document::ensureTimelinesController): |
| |
| 2020-04-22 Eric Carlson <eric.carlson@apple.com> |
| |
| [iOS] Add a quirk to keep gizmodo videos visible when playing in fullscreen. |
| https://bugs.webkit.org/show_bug.cgi?id=210857 |
| <rdar://problem/58875327> |
| |
| Reviewed by Jer Noble. |
| |
| * page/Quirks.cpp: |
| (WebCore::Quirks::needsFullscreenDisplayNoneQuirk const): |
| * page/Quirks.h: |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): Drive-by fix: always |
| set the layer name to make debugging in release builds easier. |
| |
| * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: |
| (WebCore::VideoLayerManagerObjC::setVideoLayer): Ditto. |
| |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::adjustForSiteSpecificQuirks const): Change `display:none` into |
| `display:block` on div with class "instream-native-video--mobile" when child video |
| element with id "vjs_video_3_html5_api" is in fullscreen. |
| |
| 2020-04-22 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, commit updated xcfilelist files. |
| |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| |
| 2020-04-22 Chris Dumez <cdumez@apple.com> |
| |
| Unreviewed, reverting r259116. |
| |
| Broke login flow on some apple-internal sites |
| (rdar://problem/61905262) |
| |
| Reverted changeset: |
| |
| "Move applyUserAgentIfNeeded calls to a more central place" |
| https://bugs.webkit.org/show_bug.cgi?id=209587 |
| https://trac.webkit.org/changeset/259116 |
| |
| 2020-04-22 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Introduce TableFormattingContext::computeAndDistributeExtraVerticalSpace |
| https://bugs.webkit.org/show_bug.cgi?id=210830 |
| |
| Reviewed by Antti Koivisto. |
| |
| Add a dedicated function to compute preferred heights for the table rows. |
| This is in preparation for the 2 pass layout required to finalize row height. |
| |
| * layout/FormattingContext.cpp: |
| (WebCore::Layout::FormattingContext::computeBorderAndPadding): |
| * layout/FormattingContext.h: |
| * layout/FormattingContextGeometry.cpp: |
| (WebCore::Layout::FormattingContext::Geometry::computedPadding const): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraVerticalSpace): |
| (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows): |
| (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections): |
| (WebCore::Layout::TableFormattingContext::positionTableCells): Deleted. |
| * layout/tableformatting/TableFormattingContext.h: |
| |
| 2020-04-22 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK4] Several fixes to GdkEvent APIs for GTK4 |
| https://bugs.webkit.org/show_bug.cgi?id=210856 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No tests needed. |
| |
| Several fixes to GdkEvent API changes for GTK4. This is far from |
| complete but it allows the GTK4 build to move forward. When |
| possible, add GTK3-API replacements to GtkVersioning.h to avoid |
| #ifdef blocks, where the API changes are too complex, just #ifdef. |
| |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::wallTimeForEvent): |
| * platform/gtk/GtkVersioning.h: |
| (gdk_event_get_state): |
| (gdk_event_get_coords): |
| (gdk_event_get_root_coords): |
| (gdk_event_is_scroll_stop_event): |
| (gdk_event_get_scroll_direction): |
| (gdk_event_get_scroll_deltas): |
| (gdk_event_get_button): |
| (gdk_keymap_get_for_display): Deleted as it was wrong and |
| it's not needed. |
| * platform/gtk/PlatformKeyboardEventGtk.cpp: |
| (WebCore::PlatformKeyboardEvent::currentCapsLockState): |
| (WebCore::PlatformKeyboardEvent::getCurrentModifierState): |
| (WebCore::PlatformKeyboardEvent::modifiersContainCapsLock): |
| * platform/gtk/PlatformWheelEventGtk.cpp: |
| (WebCore::PlatformWheelEvent::PlatformWheelEvent): |
| |
| 2020-04-22 Youenn Fablet <youenn@apple.com> |
| |
| Simplify SWServerWorker::whenActivated logic |
| https://bugs.webkit.org/show_bug.cgi?id=210795 |
| |
| Reviewed by Alex Christensen. |
| |
| Improve logging and ensure whenActivated can be called whatever the worker state is. |
| No change of behavior. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::didFinishInstall): |
| (WebCore::SWServer::fireInstallEvent): |
| (WebCore::SWServer::fireActivateEvent): |
| * workers/service/server/SWServerWorker.cpp: |
| (WebCore::SWServerWorker::whenActivated): |
| |
| 2020-04-22 Enrique Ocaña González <eocanha@igalia.com> |
| |
| [GStreamer][MSE] Youtube 'live stream'/H264 URLs fail to play, VP8/9 URLs play OK |
| https://bugs.webkit.org/show_bug.cgi?id=209119 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| The fix consists of removing the initial avoiding of seeking and just |
| issuing the proper segment instead of seeking (seeks in GStreamer can't |
| be done before prerolling anyway). Appsrc doesn't make easy to emit our |
| own custom segment, so what I did was to use a segment fixer probe to |
| modify the original [0, infinity] segment issued by appsrc and use |
| a [startTime, stopTime] with proper values depending on the seek target |
| and rate. |
| |
| Covered by existing tests. |
| |
| * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp: |
| (WebCore::checkShouldDelaySeek): Don't hold seeks on startup, when changing from READY to PAUSED. |
| (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): Refactored seek delay condition. Also, don't do a regular |
| gst_element_seek() for initial seeks, just proceed with a special case in that situation. |
| * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp: |
| (initialSeekSegmentFixerProbe): Probe that fixes the segment. |
| (webKitMediaSrcPrepareInitialSeek): Behave much like a regular seek, but also compute the right GstSegment, install |
| the segment fixer probe and setReadyForMoreSamples() on the SourceBufferPrivates. |
| * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.h: |
| |
| 2020-04-21 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Test IDLs and stubs |
| https://bugs.webkit.org/show_bug.cgi?id=209859 |
| |
| Reviewed by Dean Jackson and Youenn Fablet. |
| |
| WebXR testing is hard as it might involve interaction with actual |
| devices. That's why the WebXR testing |
| API (https://immersive-web.github.io/webxr-test-api/) was |
| proposed. In fact, all the current WebXR tests from |
| web-platform-tests are using that testing API. This new testing |
| API supplements navigator.xr and is accessed through |
| navigator.xr.test. |
| |
| In order not to expose the API to the web we're adding the XRTest |
| interface to Internals instead. The mapping from internals.xrTest to |
| navigator.xr.test happens in the WPT code. |
| |
| We're adding the required IDLs and very basic (mostly empty) |
| implementations for testing methods. We're adding testing |
| infrastructure, adding tests make no sense for this change. |
| |
| * CMakeLists.txt: Added new files. |
| * DerivedSources.make: Ditto. |
| * Modules/webxr/NavigatorWebXR.h: Export API to be used in testing code. |
| * Modules/webxr/WebXRSystem.h: Export ::from and ::xr methods. |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| * bindings/js/WebCoreBuiltinNames.h: Added some new macros. |
| * testing/FakeXRBoundsPoint.h: Added. |
| * testing/FakeXRBoundsPoint.idl: Added. |
| * testing/FakeXRButtonStateInit.h: Added. |
| * testing/FakeXRButtonStateInit.idl: Added. |
| * testing/FakeXRInputSourceInit.h: Added. |
| * testing/FakeXRInputSourceInit.idl: Added. |
| * testing/FakeXRRigidTransformInit.h: Added. |
| * testing/FakeXRRigidTransformInit.idl: Added. |
| * testing/FakeXRViewInit.h: Added. |
| * testing/FakeXRViewInit.idl: Added. |
| * testing/Internals.cpp: |
| (WebCore::Internals::xrTest): Added WebXRTest to Internals. |
| * testing/Internals.h: Added xrTest() accessor. |
| * testing/Internals.idl: Added xrTest attribute. |
| * testing/WebFakeXRDevice.cpp: Added. |
| (WebCore::WebFakeXRDevice::setViews): |
| (WebCore::WebFakeXRDevice::disconnect): |
| (WebCore::WebFakeXRDevice::setViewerOrigin): |
| (WebCore::WebFakeXRDevice::clearViewerOrigin): |
| (WebCore::WebFakeXRDevice::simulateVisibilityChange): |
| (WebCore::WebFakeXRDevice::setBoundsGeometry): |
| (WebCore::WebFakeXRDevice::setFloorOrigin): |
| (WebCore::WebFakeXRDevice::clearFloorOrigin): |
| (WebCore::WebFakeXRDevice::simulateResetPose): |
| (WebCore::WebFakeXRDevice::simulateInputSourceConnection): |
| * testing/WebFakeXRDevice.h: Added. |
| * testing/WebFakeXRDevice.idl: Added. |
| * testing/WebFakeXRInputController.cpp: Added. |
| (WebCore::WebFakeXRInputController::setHandedness): |
| (WebCore::WebFakeXRInputController::setTargetRayMode): |
| (WebCore::WebFakeXRInputController::setProfiles): |
| (WebCore::WebFakeXRInputController::setGripOrigin): |
| (WebCore::WebFakeXRInputController::clearGripOrigin): |
| (WebCore::WebFakeXRInputController::setPointerOrigin): |
| (WebCore::WebFakeXRInputController::disconnect): |
| (WebCore::WebFakeXRInputController::reconnect): |
| (WebCore::WebFakeXRInputController::startSelection): |
| (WebCore::WebFakeXRInputController::endSelection): |
| (WebCore::WebFakeXRInputController::simulateSelect): |
| (WebCore::WebFakeXRInputController::setSupportedButtons): |
| (WebCore::WebFakeXRInputController::updateButtonState): |
| * testing/WebFakeXRInputController.h: Added. |
| * testing/WebFakeXRInputController.idl: Added. |
| * testing/WebXRTest.cpp: Added. |
| (WebCore::WebXRTest::simulateDeviceConnection const): |
| (WebCore::WebXRTest::simulateUserActivation): |
| (WebCore::WebXRTest::disconnectAllDevices): |
| * testing/WebXRTest.h: Added. |
| (WebCore::WebXRTest::create): |
| * testing/WebXRTest.idl: Added. |
| * testing/XRSimulateUserActivationFunction.h: Added. |
| * testing/XRSimulateUserActivationFunction.idl: Ditto. |
| |
| 2020-04-21 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Add a supporting object for Document to manage timelines |
| https://bugs.webkit.org/show_bug.cgi?id=210817 |
| |
| Reviewed by Dean Jackson. |
| |
| Add a new DocumentTimelinesController object owned by Document to manage DocumentTimelines created for it. This simple piece of refactoring is the first |
| step towards a coordinated "update animations and send events" procedure where all timelines are updated at once with a single microtask checkpoint instead |
| of each timeline running one. |
| |
| No change in behavior, so no new tests. |
| |
| * Headers.cmake: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::DocumentTimeline): |
| (WebCore::DocumentTimeline::~DocumentTimeline): |
| (WebCore::DocumentTimeline::controller const): |
| (WebCore::DocumentTimeline::detachFromDocument): |
| * animation/DocumentTimeline.h: |
| * animation/DocumentTimelinesController.cpp: Added. |
| (WebCore::DocumentTimelinesController::DocumentTimelinesController): |
| (WebCore::DocumentTimelinesController::~DocumentTimelinesController): |
| (WebCore::DocumentTimelinesController::addTimeline): |
| (WebCore::DocumentTimelinesController::removeTimeline): |
| (WebCore::DocumentTimelinesController::detachFromDocument): |
| (WebCore::DocumentTimelinesController::updateAnimationsAndSendEvents): |
| * animation/DocumentTimelinesController.h: Added. |
| * dom/Document.cpp: |
| (WebCore::Document::commonTeardown): |
| (WebCore::Document::ensureTimelinesController): |
| (WebCore::Document::updateAnimationsAndSendEvents): Deleted. |
| (WebCore::Document::addTimeline): Deleted. |
| (WebCore::Document::removeTimeline): Deleted. |
| * dom/Document.h: |
| (WebCore::Document::timelinesController const): |
| * page/Page.cpp: |
| (WebCore::Page::updateRendering): |
| |
| 2020-04-21 Cathie Chen <cathiechen@igalia.com> |
| |
| REGRESSION (r254790): No longer get smooth scrolling on music.apple.com |
| https://bugs.webkit.org/show_bug.cgi?id=210634 |
| |
| Reviewed by Darin Adler. |
| |
| The page uses the access of "scrollBehavior" in CSSStyleDeclaration as the support of scroll-behavior. |
| If supported, it will use scroll-behavior. Otherwise, it will perform a JS smooth scroll. |
| Currently, "scrollBehavior" is still available when CSSOMViewSmoothScrolling is off, only the value |
| "smooth" is invalidated. |
| In order to fix this, CSSStyleDeclaration will take account of CSSOMViewSmoothScrolling in Settings. |
| This patch also tries to provide an interface which let flags in Settings can enable/disable a property. |
| However, it is not complete, for there are some scenarios that Settings isn't accessible. By adding |
| "settings-flag" to CSSProperties.json, it would be effective to control the property access in CSSStyleDeclaration. |
| |
| Tests: fast/scrolling/scroll-behavior-invalidate-if-disabled.html |
| fast/scrolling/scroll-behavior-validate-if-enabled.html |
| |
| * css/CSSProperties.json: |
| * css/CSSStyleDeclaration.cpp: |
| (WebCore::CSSStyleDeclaration::getCSSPropertyIDFromJavaScriptPropertyName): |
| (WebCore::CSSStyleDeclaration::namedItem): |
| (WebCore::CSSStyleDeclaration::setNamedItem): |
| (WebCore::CSSStyleDeclaration::supportedPropertyNames const): |
| * css/makeprop.pl: |
| (addProperty): |
| * css/parser/CSSPropertyParser.cpp: |
| (WebCore::cssPropertyID): |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::InspectorStyle::collectProperties const): |
| * inspector/agents/InspectorCSSAgent.cpp: |
| (WebCore::InspectorCSSAgent::getSupportedCSSProperties): |
| |
| 2020-04-21 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Canonicalize JSBigInt generated by structured-cloning by calling rightTrim |
| https://bugs.webkit.org/show_bug.cgi?id=210816 |
| |
| Reviewed by Keith Miller and Darin Adler. |
| |
| Let's assume that the serialized data is slightly different. JSBigInt's internal representation has various invariants. For example, if JSBigInt is zero, it should have zero length, |
| and its sign should be false. But there are various ways of representing zero JSBigInt in serialization format. For example, we can set sign = true, length = 0. Current code strongly |
| assumes that dumped data meets this JSBigInt's internal invariant. This is not good: for example, if we add a new invariant into JSBigInt, already serialized data would not meet this |
| invariant. |
| In this patch, we call `JSBigInt::rightTrim(VM&)` when finishing JSBigInt deserialization. This means that we canonicalize JSBigInt when finishing creation, and this makes this serialization |
| format free from JSBigInt's internal invariants. This makes JSBigInt serialization/deserialization robust. And we also add lengthInUint64 == 0 path not to call rightTrim when it is zero. |
| This makes deserialization robust for zero-length & signed corrupted JSBigInt zero. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::dumpBigInt32Data): |
| (WebCore::CloneDeserializer::readBigInt): |
| |
| 2020-04-21 Peng Liu <peng.liu6@apple.com> |
| |
| platform/mac/media/audio-session-category-audio-autoplay.html is timing out |
| https://bugs.webkit.org/show_bug.cgi?id=210826 |
| |
| Reviewed by Jer Noble. |
| |
| For WebKitLegacy, AudioSession::setCategory() needs to set the category when |
| m_routingArbitrationClient is nullptr. This patch also fixes an error regarding |
| setupArbitrationOngoing. |
| |
| * platform/audio/mac/AudioSessionMac.mm: |
| (WebCore::AudioSession::setCategory): |
| |
| 2020-04-21 Peng Liu <peng.liu6@apple.com> |
| |
| Fix MACCATALYST build failures |
| https://bugs.webkit.org/show_bug.cgi?id=210815 |
| |
| Reviewed by Tim Horton. |
| |
| No new tests, no functional change. |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * platform/ios/WebVideoFullscreenControllerAVKit.mm: |
| |
| 2020-04-19 Darin Adler <darin@apple.com> |
| |
| [Cocoa] Use createNSArray in many more places that build NSArray objects from C++ collections |
| https://bugs.webkit.org/show_bug.cgi?id=210702 |
| |
| Reviewed by Alex Christensen. |
| |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityFlowToElements]): Use createNSArray. |
| (-[WebAccessibilityObjectWrapper textRectsFromMarkers:withText:]): Ditto. |
| (-[WebAccessibilityObjectWrapper rectsForSelectionRects:]): Deleted. Merged into |
| the method above. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.h: Take const references |
| instead of references when passing Path and FloatRect. |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.mm: |
| (convertMathPairsToNSArray): Use createNSArray. Also use arrays on the stack |
| to create NSDictionary rather than using NSMutableDictionary. |
| (addChildToArray): Deleted. |
| (convertToNSArray): Uses createNSArray. Rolled addChildToArray in. |
| (-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]): Take const |
| reference instead of reference. |
| (-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]): Ditto. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]): |
| Use createNSArray. |
| * editing/cocoa/FontAttributesCocoa.mm: |
| (WebCore::FontAttributes::createDictionary const): Ditto. |
| * page/ios/FrameIOS.mm: |
| (WebCore::Frame::interpretationsForCurrentRoot const): Ditto. |
| * platform/cocoa/SearchPopupMenuCocoa.mm: |
| (WebCore::saveRecentSearches): Ditto. |
| * platform/cocoa/SharedBufferCocoa.mm: |
| (WebCore::SharedBuffer::createNSDataArray const): Ditto. |
| * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm: |
| (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::updateLicense): Ditto. |
| * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: |
| (WebCore::CDMSessionAVContentKeySession::update): Ditto. |
| * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: |
| (WebCore::CDMSessionAVStreamSession::update): Ditto. |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Ditto. |
| * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: |
| (WebCore::PlatformCAAnimationCocoa::setValues): Ditto. |
| (WebCore::PlatformCAAnimationCocoa::setKeyTimes): Ditto. |
| (WebCore::PlatformCAAnimationCocoa::setTimingFunctions): Ditto. |
| |
| * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: |
| (WebCore::PlatformCAFilters::setFiltersOnLayer): Moved almost the whole |
| function into a call to createNSArray. Removed the default case from |
| the switch so we get a warning if we miss any filter operation types. |
| |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: |
| (WebCore::PlatformCALayerCocoa::setSublayers): Use createNSArray. |
| * platform/ios/PlatformPasteboardIOS.mm: |
| (WebCore::PlatformPasteboard::write): Ditto. |
| * platform/ios/PlaybackSessionInterfaceAVKit.mm: |
| (WebCore::mediaSelectionOptions): Ditto. |
| * platform/mac/PlatformPasteboardMac.mm: |
| (WebCore::PlatformPasteboard::write): Ditto. |
| * platform/mac/WebPlaybackControlsManager.mm: |
| (mediaSelectionOptions): Ditto. |
| * platform/network/cocoa/NetworkStorageSessionCocoa.mm: |
| (WebCore::NetworkStorageSession::setCookies): Ditto. |
| * platform/network/cocoa/ResourceRequestCocoa.mm: |
| (WebCore::ResourceRequest::doUpdatePlatformRequest): Ditto. |
| |
| * platform/network/cocoa/WebCoreNSURLSession.h: |
| Use the Objective-C type WebCoreNSURLSessionDataTask in the _dataTasks |
| set rather than using CFTypeRef. |
| |
| * platform/network/cocoa/WebCoreNSURLSession.mm: |
| (-[WebCoreNSURLSession dealloc]): Remove now-unneeded typecast. |
| (-[WebCoreNSURLSession taskCompleted:]): Ditto. |
| (-[WebCoreNSURLSession finishTasksAndInvalidate]): Use a more idiomatic |
| form of capturing strongSelf in a lambda. |
| (-[WebCoreNSURLSession invalidateAndCancel]): Updated the type on a |
| local variable and removed now-unneeded typecast. |
| (-[WebCoreNSURLSession getTasksWithCompletionHandler:]): Use RetainPtr |
| to cut down on autorelease. Use createNSArray, taking advantage of the |
| fact that it works on HashSet. Removed now-unneeded typecast. |
| (-[WebCoreNSURLSession getAllTasksWithCompletionHandler:]): Ditto. |
| (-[WebCoreNSURLSession dataTaskWithRequest:]): Remove now-unneeded typecast. |
| (-[WebCoreNSURLSession dataTaskWithURL:]): Ditto. |
| |
| 2020-04-21 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| The visibilitychange event should bubble |
| https://bugs.webkit.org/show_bug.cgi?id=210829 |
| |
| Reviewed by Darin Adler. |
| |
| This change makes `visibilitychange` event bubble as per spec [1], aligning WebKit |
| with Blink and Gecko. Also fixes broken spec link to `visibilityState` attribute. |
| |
| [1] https://w3c.github.io/page-visibility/#dfn-now-visible-algorithm (step 2) |
| |
| Test: fast/events/page-visibility-transition-test.html |
| |
| * dom/Document.cpp: |
| (WebCore::Document::visibilityStateChanged): |
| (WebCore::Document::visibilityState const): |
| |
| 2020-04-21 Simon Fraser <simon.fraser@apple.com> |
| |
| Composited layers are misplaced inside RTL overflow scroller with visible scrollbar |
| https://bugs.webkit.org/show_bug.cgi?id=210820 |
| |
| Reviewed by Zalan Bujtas. |
| |
| RenderLayerBacking::computeParentGraphicsLayerRect() used renderBox.paddingBoxRectIncludingScrollbar() |
| to position layers inside composited overflow scroll, but this is wrong if the RTL left-side |
| scrollbar takes space. |
| |
| Fix by making some static functions that we can call from the various places that ask |
| about box geometry, and using them. |
| |
| Test: compositing/scrolling/async-overflow-scrolling/position-inside-rtl-overflow.html |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::overflowClipRect const): |
| (WebCore::RenderBox::clipRect const): |
| (WebCore::RenderBox::overflowClipRect): Deleted. |
| (WebCore::RenderBox::clipRect): Deleted. |
| * rendering/RenderBox.h: |
| (WebCore::RenderBox::overflowClipRectForChildLayers const): |
| (WebCore::RenderBox::overflowClipRectForChildLayers): Deleted. |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::scrollContainerLayerBox): |
| (WebCore::clippingLayerBox): |
| (WebCore::overflowControlsHostLayerBox): |
| (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const): |
| (WebCore::RenderLayerBacking::updateGeometry): |
| (WebCore::clipBox): Deleted. |
| * rendering/RenderTable.cpp: |
| (WebCore::RenderTable::overflowClipRect const): |
| (WebCore::RenderTable::overflowClipRect): Deleted. |
| * rendering/RenderTable.h: |
| |
| 2020-04-21 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow scroll] Overflow that's hidden on one axis is scrollable on that axis |
| https://bugs.webkit.org/show_bug.cgi?id=210771 |
| <rdar://problem/62080331> |
| |
| Reviewed by Tim Horton. |
| |
| eventCanScrollContents() should check the presence of enabled scrollbars, like |
| ScrollAnimator::handleWheelEvent() does. |
| |
| Test: fast/scrolling/mac/async-scroll-overflow-hidden-on-one-axis.html |
| |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::eventCanScrollContents const): |
| |
| 2020-04-21 Daniel Bates <dabates@apple.com> |
| |
| [iOS] -_didFinishTextInteractionInTextInputContext should only zoom to reveal focused element if it changed |
| https://bugs.webkit.org/show_bug.cgi?id=210697 |
| <rdar://problem/60997530> |
| |
| Reviewed by Wenson Hsieh. |
| |
| For now, add a comment about the return value of setFocusedElement: it returns |
| whether focus was blocked. If focused wasn't blocked then it will return true |
| even if the element wasn't actually focused. For example, it will return true |
| for non-focusable elements: <input disabled>. |
| |
| I was tempted to fix setFocusedElement() to return true when it actually focused |
| the element or if the element was already focused, but I decided to defer this |
| until I audit the callers and run some tests. |
| |
| * dom/Document.h: |
| |
| 2020-04-21 Andres Gonzalez <andresg_22@apple.com> |
| |
| Fix for remoteParentObject and platformWidget not being stored properly in the AXIsolatedObject attributes variant. |
| https://bugs.webkit.org/show_bug.cgi?id=210809 |
| |
| Reviewed by Chris Fleizach. |
| |
| Adding these properties to the AXIsolatedObject attributes variant as |
| WeakPtr<void*> fails. So they are now cached as member variables. |
| |
| * accessibility/isolatedtree/AXIsolatedObject.cpp: |
| (WebCore::AXIsolatedObject::initializeAttributeData): |
| (WebCore::AXIsolatedObject::platformWidget const): |
| * accessibility/isolatedtree/AXIsolatedObject.h: |
| (WebCore::AXIsolatedObject::propertyValue const): Deleted. |
| * accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm: |
| (WebCore::AXIsolatedObject::initializePlatformProperties): |
| (WebCore::AXIsolatedObject::remoteParentObject const): |
| |
| 2020-04-20 Simon Fraser <simon.fraser@apple.com> |
| |
| Horizontal overflow overlay scrollbar is misplaced in RTL |
| https://bugs.webkit.org/show_bug.cgi?id=210673 |
| <rdar://problem/61950751> |
| |
| Reviewed by Antti Koivisto. |
| |
| Code for positioning RenderLayer overflow controls (scrollbars and scroll corner) |
| was scattered across lots of different functions, making it hard to follow, |
| and prone to bugs. |
| |
| Fix by making one source of truth, overflowControlsRects(), which computes |
| rects for the two scrollbars, the "scroll corner" (the square in the corner which |
| shows, only for non-overlay scrollbars, when both scrollbars or the resize control |
| is visible), and the resize control which shows when style specifies the "resize" property. |
| |
| Call this function in all the places that need to know about overflow control |
| geometry. RenderLayer::hitTestResizerInFragments() is a little tricky because it wants |
| the resize control relative to the fragment rect; achieve this by computing the position |
| of the resizer rect relative to the border box, then shifting it into position relative |
| to the fragment bounds (which include border). |
| |
| Test: compositing/overflow/rtl-scrollbar-layer-positioning.html |
| |
| * page/EventHandler.cpp: |
| (WebCore::EventHandler::selectCursor): |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::scrollCornerRect const): |
| (WebCore::RenderLayer::overflowControlsRects const): |
| (WebCore::RenderLayer::scrollbarOffset const): |
| (WebCore::RenderLayer::invalidateScrollbarRect): |
| (WebCore::RenderLayer::positionOverflowControls): |
| (WebCore::RenderLayer::overflowControlsIntersectRect const): |
| (WebCore::RenderLayer::paintResizer): |
| (WebCore::RenderLayer::isPointInResizeControl const): |
| (WebCore::RenderLayer::hitTestOverflowControls): |
| (WebCore::RenderLayer::hitTestResizerInFragments const): |
| (WebCore::cornerStart): Deleted. |
| (WebCore::cornerRect): Deleted. |
| (WebCore::resizerCornerRect): Deleted. |
| (WebCore::RenderLayer::scrollCornerAndResizerRect const): Deleted. |
| (WebCore::RenderLayer::rectForHorizontalScrollbar const): Deleted. |
| (WebCore::RenderLayer::rectForVerticalScrollbar const): Deleted. |
| (WebCore::RenderLayer::verticalScrollbarStart const): Deleted. |
| (WebCore::RenderLayer::horizontalScrollbarStart const): Deleted. |
| * rendering/RenderLayer.h: |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::requiresScrollCornerLayer const): |
| (WebCore::RenderLayerBacking::positionOverflowControlsLayers): |
| (WebCore::RenderLayerBacking::paintContents): |
| |
| 2020-04-21 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed, reverting r260432. |
| |
| Broke WPE build |
| |
| Reverted changeset: |
| |
| "[WebXR] Test IDLs and stubs" |
| https://bugs.webkit.org/show_bug.cgi?id=209859 |
| https://trac.webkit.org/changeset/260432 |
| |
| 2020-04-21 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r256808): “A problem repeatedly occurred” when attempting to load https://bungalow.com/listings/bay-area |
| https://bugs.webkit.org/show_bug.cgi?id=210801 |
| <rdar://problem/61658940> |
| |
| Reviewed by Antti Koivisto. |
| |
| Even though the page uses the 'async' attribute on the mapbox-gl.js script, deferring the execution of this |
| script gets the page into a bad state, causing it to use a lot of CPU & memory until the process crashes. |
| Since we don't have any other evidence of breakage from r256808 yet and since r256808 was a massive PLT |
| progression, I am opting to add a quirk to disable the async script optimization on bungalow.com for now. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::shouldDeferAsynchronousScriptsUntilParsingFinishes const): |
| * page/Quirks.cpp: |
| (WebCore::Quirks::shouldBypassAsyncScriptDeferring const): |
| * page/Quirks.h: |
| * platform/RegistrableDomain.h: |
| (WebCore::RegistrableDomain::operator== const): |
| |
| 2020-04-16 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Test IDLs and stubs |
| https://bugs.webkit.org/show_bug.cgi?id=209859 |
| |
| Reviewed by Dean Jackson and Youenn Fablet. |
| |
| WebXR testing is hard as it might involve interaction with actual |
| devices. That's why the WebXR testing |
| API (https://immersive-web.github.io/webxr-test-api/) was |
| proposed. In fact, all the current WebXR tests from |
| web-platform-tests are using that testing API. This new testing |
| API supplements navigator.xr and is accessed through |
| navigator.xr.test. |
| |
| In order not to expose the API to the web we're adding the XRTest |
| interface to Internals instead. The mapping from internals.xrTest to |
| navigator.xr.test happens in the WPT code. |
| |
| We're adding the required IDLs and very basic (mostly empty) |
| implementations for testing methods. We're adding testing |
| infrastructure, adding tests make no sense for this change. |
| |
| * CMakeLists.txt: Added new files. |
| * DerivedSources.make: Ditto. |
| * Modules/webxr/NavigatorWebXR.h: Export API to be used in testing code. |
| * Modules/webxr/WebXRSystem.h: Export ::from and ::xr methods. |
| * Sources.txt: Added new files. |
| * WebCore.xcodeproj/project.pbxproj: Ditto. |
| * bindings/js/WebCoreBuiltinNames.h: Added some new macros. |
| * testing/FakeXRBoundsPoint.h: Added. |
| * testing/FakeXRBoundsPoint.idl: Added. |
| * testing/FakeXRButtonStateInit.h: Added. |
| * testing/FakeXRButtonStateInit.idl: Added. |
| * testing/FakeXRInputSourceInit.h: Added. |
| * testing/FakeXRInputSourceInit.idl: Added. |
| * testing/FakeXRRigidTransformInit.h: Added. |
| * testing/FakeXRRigidTransformInit.idl: Added. |
| * testing/FakeXRViewInit.h: Added. |
| * testing/FakeXRViewInit.idl: Added. |
| * testing/Internals.cpp: |
| (WebCore::Internals::xrTest): Added WebXRTest to Internals. |
| * testing/Internals.h: Added xrTest() accessor. |
| * testing/Internals.idl: Added xrTest attribute. |
| * testing/WebFakeXRDevice.cpp: Added. |
| (WebCore::WebFakeXRDevice::setViews): |
| (WebCore::WebFakeXRDevice::disconnect): |
| (WebCore::WebFakeXRDevice::setViewerOrigin): |
| (WebCore::WebFakeXRDevice::clearViewerOrigin): |
| (WebCore::WebFakeXRDevice::simulateVisibilityChange): |
| (WebCore::WebFakeXRDevice::setBoundsGeometry): |
| (WebCore::WebFakeXRDevice::setFloorOrigin): |
| (WebCore::WebFakeXRDevice::clearFloorOrigin): |
| (WebCore::WebFakeXRDevice::simulateResetPose): |
| (WebCore::WebFakeXRDevice::simulateInputSourceConnection): |
| * testing/WebFakeXRDevice.h: Added. |
| * testing/WebFakeXRDevice.idl: Added. |
| * testing/WebFakeXRInputController.cpp: Added. |
| (WebCore::WebFakeXRInputController::setHandedness): |
| (WebCore::WebFakeXRInputController::setTargetRayMode): |
| (WebCore::WebFakeXRInputController::setProfiles): |
| (WebCore::WebFakeXRInputController::setGripOrigin): |
| (WebCore::WebFakeXRInputController::clearGripOrigin): |
| (WebCore::WebFakeXRInputController::setPointerOrigin): |
| (WebCore::WebFakeXRInputController::disconnect): |
| (WebCore::WebFakeXRInputController::reconnect): |
| (WebCore::WebFakeXRInputController::startSelection): |
| (WebCore::WebFakeXRInputController::endSelection): |
| (WebCore::WebFakeXRInputController::simulateSelect): |
| (WebCore::WebFakeXRInputController::setSupportedButtons): |
| (WebCore::WebFakeXRInputController::updateButtonState): |
| * testing/WebFakeXRInputController.h: Added. |
| * testing/WebFakeXRInputController.idl: Added. |
| * testing/WebXRTest.cpp: Added. |
| (WebCore::WebXRTest::simulateDeviceConnection const): |
| (WebCore::WebXRTest::simulateUserActivation): |
| (WebCore::WebXRTest::disconnectAllDevices): |
| * testing/WebXRTest.h: Added. |
| (WebCore::WebXRTest::create): |
| * testing/WebXRTest.idl: Added. |
| * testing/XRSimulateUserActivationFunction.h: Added. |
| * testing/XRSimulateUserActivationFunction.idl: Ditto. |
| |
| 2020-04-21 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK4] Adapt to GtkIconTheme API changes |
| https://bugs.webkit.org/show_bug.cgi?id=210745 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| No new tests needed. |
| |
| GtkIconTheme changes in GTK and since we're no longer following |
| the theme we can drop the missing image from the icon theme, so remove |
| now unnecessary code. |
| |
| * platform/graphics/gtk/ImageGtk.cpp: |
| (WebCore::Image::loadPlatformResource): Directly load image from compiled |
| GResource. |
| (WebCore::loadResourceSharedBuffer): Deleted. |
| (WebCore::loadMissingImageIconFromTheme): Deleted. |
| |
| 2020-04-21 Rob Buis <rbuis@igalia.com> |
| |
| Exit early in FrameLoader::loadURL when redirecting to another frame |
| https://bugs.webkit.org/show_bug.cgi?id=210751 |
| |
| Reviewed by Geoffrey Garen. |
| |
| Exit early in FrameLoader::loadURL when redirecting to another frame, previously we were preparing |
| request needlessly, doing it twice in case of frame redirecting. Also move some variables to |
| where they are actually used. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadURL): |
| * loader/FrameLoader.h: |
| |
| 2020-04-21 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Remove PlatformMouseEventGtk |
| https://bugs.webkit.org/show_bug.cgi?id=210743 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| It's unused, we no longer create PlatformMouseEvent from a GdkEvent since WebKit2. |
| |
| * SourcesGTK.txt: |
| * platform/PlatformMouseEvent.h: |
| * platform/gtk/PlatformMouseEventGtk.cpp: Removed. |
| |
| 2020-04-21 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK4] Fix platform GDK includes |
| https://bugs.webkit.org/show_bug.cgi?id=210746 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| * platform/graphics/PlatformDisplay.cpp: Wayland, X11, etc. |
| platform includes changed path, so update accordingly. |
| |
| 2020-04-21 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes late February 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=210767 |
| |
| Unreviewed build fix. |
| |
| No new tests needed. |
| |
| * css/MediaQueryListEvent.cpp: Add missing wtf/IsoMallocInlines.h header. |
| * css/MediaQueryMatcher.cpp: Add missing MediaQueryListEvent.h header. |
| * platform/graphics/FloatQuad.cpp: Add missing wtf/text/TextStream.h header. |
| |
| 2020-04-20 Ross Kirsling <ross.kirsling@sony.com> |
| |
| Classes marked final should not use protected access specifier |
| https://bugs.webkit.org/show_bug.cgi?id=210775 |
| |
| Reviewed by Daniel Bates. |
| |
| * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h: |
| * Modules/applepay/ApplePayValidateMerchantEvent.h: |
| * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h: |
| * Modules/webaudio/BiquadDSPKernel.h: |
| * Modules/webaudio/WaveShaperDSPKernel.h: |
| * Modules/websockets/WebSocketChannel.h: |
| * Modules/websockets/WorkerThreadableWebSocketChannel.h: |
| * Modules/webxr/WebXRSession.h: |
| * Modules/webxr/WebXRSystem.h: |
| * accessibility/AccessibilityARIAGridCell.h: |
| * accessibility/AccessibleSetValueEvent.h: |
| * animation/CSSAnimation.h: |
| * bindings/js/ReadableStream.h: |
| * bridge/objc/objc_runtime.h: |
| * bridge/runtime_array.h: |
| * css/CSSImageSetValue.h: |
| * html/HTMLKeygenElement.cpp: |
| * html/canvas/WebGLBuffer.h: |
| * html/canvas/WebGLFramebuffer.h: |
| * html/canvas/WebGLProgram.h: |
| * html/canvas/WebGLQuery.h: |
| * html/canvas/WebGLRenderbuffer.h: |
| * html/canvas/WebGLSampler.h: |
| * html/canvas/WebGLSync.h: |
| * html/canvas/WebGLTransformFeedback.h: |
| * html/canvas/WebGLUniformLocation.h: |
| * html/shadow/TextControlInnerElements.h: |
| * inspector/InspectorStyleSheet.h: |
| * inspector/WebInjectedScriptManager.h: |
| * loader/cache/CachedCSSStyleSheet.h: |
| * page/Frame.h: |
| * page/FrameView.h: |
| * page/PageConsoleClient.h: |
| * page/animation/KeyframeAnimation.h: |
| * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h: |
| * platform/audio/AudioBus.h: |
| * platform/cocoa/PlaybackSessionModelMediaElement.h: |
| * platform/graphics/BitmapImage.h: |
| * platform/graphics/CrossfadeGeneratedImage.h: |
| * platform/graphics/NamedImageGeneratedImage.h: |
| * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: |
| * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: |
| * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: |
| * platform/graphics/ca/win/PlatformCAAnimationWin.h: |
| * platform/graphics/cg/ImageDecoderCG.h: |
| * platform/graphics/iso/ISOOriginalFormatBox.h: |
| * platform/graphics/iso/ISOProtectionSchemeInfoBox.h: |
| * platform/graphics/iso/ISOSchemeInformationBox.h: |
| * platform/graphics/iso/ISOSchemeTypeBox.h: |
| * platform/graphics/iso/ISOTrackEncryptionBox.h: |
| * platform/graphics/iso/ISOVTTCue.cpp: |
| * platform/graphics/iso/ISOVTTCue.h: |
| * platform/graphics/win/ImageDecoderDirect2D.h: |
| * platform/mediastream/mac/AVCaptureDeviceManager.h: |
| * platform/mock/mediasource/MockBox.h: |
| * platform/mock/mediasource/MockSourceBufferPrivate.cpp: |
| * rendering/RenderFullScreen.h: |
| * rendering/RenderGrid.h: |
| * rendering/RenderMultiColumnSet.h: |
| * rendering/RenderRuby.h: |
| * rendering/RenderScrollbarPart.h: |
| * rendering/RenderScrollbarTheme.h: |
| * rendering/RenderTableCell.h: |
| * rendering/RenderTableSection.h: |
| * rendering/RenderThemeIOS.h: |
| * rendering/RenderView.h: |
| * rendering/svg/RenderSVGResourceClipper.h: |
| * svg/SVGTextPathElement.h: |
| * workers/WorkerConsoleClient.h: |
| * worklets/Worklet.h: |
| |
| 2020-04-20 Peng Liu <peng.liu6@apple.com> |
| |
| Fix build failures when video fullscreen and picture-in-picture is disabled |
| https://bugs.webkit.org/show_bug.cgi?id=210777 |
| |
| Reviewed by Eric Carlson. |
| |
| Wrap video fullscreen and picture-in-picture related code with "#if ENABLE(VIDEO_PRESENTATION_MODE)". |
| |
| * Configurations/FeatureDefines.xcconfig: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity): |
| * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.h: |
| * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: |
| (WebCore::VideoLayerManagerObjC::setVideoLayer): |
| (WebCore::VideoLayerManagerObjC::requiresTextTrackRepresentation const): |
| (WebCore::VideoLayerManagerObjC::syncTextTrackBounds): |
| (WebCore::VideoLayerManagerObjC::setTextTrackRepresentation): |
| |
| 2020-04-20 Nikos Mouchtaris <nmouchtaris@apple.com> |
| |
| WK2 Quicklook for attachments |
| https://bugs.webkit.org/show_bug.cgi?id=208891 |
| |
| Reviewed by Darin Adler. |
| |
| Added to HTMLAttachmentElement to have member image representing |
| QuickLook thumbnail. Added code to render this image on both iOS and Mac. |
| |
| No new tests. Test will be added after additions to test infrastructure. |
| |
| * html/HTMLAttachmentElement.cpp: |
| (WebCore::HTMLAttachmentElement::updateThumbnailRepresentation): |
| Allow setting of thumbnail member. |
| * html/HTMLAttachmentElement.h: |
| * rendering/RenderThemeIOS.mm: |
| Added rendering of image member of attachment element. |
| (WebCore::RenderAttachmentInfo::RenderAttachmentInfo): |
| (WebCore::paintAttachmentIcon): |
| (WebCore::RenderThemeIOS::paintAttachment): |
| * rendering/RenderThemeMac.mm: |
| (WebCore::paintAttachmentIcon): |
| |
| 2020-04-20 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| Add more structure-cloning tests for BigInt |
| https://bugs.webkit.org/show_bug.cgi?id=210765 |
| |
| Reviewed by Mark Lam. |
| |
| This patch adds safe-guard for future JSC primitive extension for structure-cloning. |
| We throw DataCloneError if we see unknown primitive value, which can happen if JSC |
| extends primitive value. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::dumpImmediate): |
| (WebCore::CloneSerializer::dumpIfTerminal): |
| |
| 2020-04-20 Simon Fraser <simon.fraser@apple.com> |
| |
| Scrolling with background-attachment: fixed needs to trigger repaints |
| https://bugs.webkit.org/show_bug.cgi?id=193893 |
| <rdar://problem/47587017> |
| |
| Reviewed by Dean Jackson. |
| |
| When scrolling an overflow scroll which has "background-atttachment:fixed" in the content, |
| the node will have non-empty synchronous scrolling reasons. In this case we need to |
| send the scroll to the main thread, and trigger a repaint on scroll. |
| |
| If handling the wheel event on the scrolling thread determines that the scroll must be sent |
| to the main thread, EventDispatcher::wheelEvent() does so in the callback function. |
| |
| To trigger the repaint, RenderLayer::scrollTo() asks the composited layers backing whether |
| the node has synchronous scrolling reasons; this is implemented by asking the scrolling |
| coordinator. |
| |
| Test: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-repaint.html |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::hasSynchronousScrollingReasons const): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::hasSynchronousScrollingReasons const): |
| * page/scrolling/ScrollingStateScrollingNode.h: |
| (WebCore::ScrollingStateScrollingNode::hasSynchronousScrollingReasons const): |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::handleWheelEvent): |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::currentScrollPositionChanged): |
| * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeOverflowScrollingNodeMac::handleWheelEvent): Return SendToMainThread if this node |
| needs to do synchronous scrolling. |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::scrollTo): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::needsRepaintOnCompositedScroll const): |
| (WebCore::RenderLayerBacking::setRequiresOwnBackingStore): |
| (WebCore::RenderLayerBacking::setContentsNeedDisplay): |
| * rendering/RenderLayerBacking.h: |
| |
| 2020-04-20 Fujii Hironori <Hironori.Fujii@sony.com> |
| |
| MSVC: LayoutUnits.h(248): warning C4245: 'argument': conversion from 'const int' to 'size_t', signed/unsigned mismatch |
| https://bugs.webkit.org/show_bug.cgi?id=210592 |
| |
| Reviewed by Zalan Bujtas. |
| |
| * layout/LayoutUnits.h: |
| (WTF::HashTraits<WebCore::Layout::SlotPosition>::emptyValue): |
| (WTF::HashTraits<WebCore::Layout::SlotPosition>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::Layout::SlotPosition>::isDeletedValue): |
| Use std::numeric_limits<size_t>::max() for empty and deleted |
| values instead of WebCore::intMinForLayoutUnit. |
| |
| 2020-04-20 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Text manipulation sometimes fails to replace text in title elements |
| https://bugs.webkit.org/show_bug.cgi?id=210750 |
| <rdar://problem/61066103> |
| |
| Reviewed by Tim Horton and Darin Adler. |
| |
| Internal clients using WebKit text manipulation APIs currently fail to replace text in title and option elements |
| in the case where text manipulation has been completed with more than one token. These are elements for which we |
| want to replace the entire text as a single token, even if the text manipulation client ends up breaking the |
| token into multiple chunks. |
| |
| To handle this case, pull the `title || option` check out into a helper function, and consult it when completing |
| text manipulation in the case where the manipulation data lacks either start or end positions. If |
| `canPerformTextManipulationByReplacingEntireTextContent` is true and there are multiple replacement tokens, |
| allow ourselves to process the replacement by combining the replacement tokens into a space-separated string. |
| |
| Test: TextManipulation.CompleteTextManipulationShouldReplaceTextContentWithMultipleTokens |
| |
| * editing/TextManipulationController.cpp: |
| (WebCore::canPerformTextManipulationByReplacingEntireTextContent): |
| (WebCore::TextManipulationController::observeParagraphs): |
| (WebCore::TextManipulationController::replace): |
| |
| 2020-04-20 Andres Gonzalez <andresg_22@apple.com> |
| |
| The rect for the primary screen should be retrieved on the main thread. |
| https://bugs.webkit.org/show_bug.cgi?id=210760 |
| |
| Reviewed by Chris Fleizach. |
| |
| - Call to screenRectForPrimaryScreen is dispatched to main thread. |
| - This value is cached since it is very unlikely to change in normal |
| usage and this would avoid hitting the main thread repeatedly. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper primaryScreenHeight]): |
| |
| 2020-04-15 Sergio Villar Senin <svillar@igalia.com> |
| |
| [WebXR] Update WebXRSession and WebXRSystem interfaces |
| https://bugs.webkit.org/show_bug.cgi?id=210553 |
| |
| Reviewed by Žan Doberšek. |
| |
| Update WebXRSession and WebXRSystem to the latest changes in the specs. |
| |
| * Modules/webxr/WebXRSession.idl: Added 3 new events. |
| * Modules/webxr/WebXRSystem.idl: Interface name is XR not XRSystem. |
| * bindings/js/WebCoreBuiltinNames.h: Renamed macro. |
| * dom/EventNames.h: Added 3 new events. |
| |
| 2020-04-20 Chris Dumez <cdumez@apple.com> |
| |
| Sending beacons when Fetch KeepAlive feature is disabled crashes the WebProcess |
| https://bugs.webkit.org/show_bug.cgi?id=210753 |
| <rdar://problem/61896221> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Test: http/wpt/beacon/beacon-legacy-code-path.html |
| |
| * testing/InternalSettings.cpp: |
| (WebCore::InternalSettings::Backup::Backup): |
| (WebCore::InternalSettings::Backup::restoreTo): |
| (WebCore::InternalSettings::setFetchAPIKeepAliveEnabled): |
| * testing/InternalSettings.h: |
| * testing/InternalSettings.idl: |
| Add internal settings to disable Fetch Keep Alive for layout testing. |
| |
| 2020-04-20 Youenn Fablet <youenn@apple.com> |
| |
| MediaPlayerPrivateMediaStreamAVFObjC should start play a newly added audio track if it is playing |
| https://bugs.webkit.org/show_bug.cgi?id=210740 |
| |
| Reviewed by Eric Carlson. |
| |
| Before the patch, MediaPlayerPrivateMediaStreamAVFObjC was not calling play on the audio renderer when the audio renderer |
| was added after the MediaPlayerPrivateMediaStreamAVFObjC was asked to play. |
| This patch makes it so that, on configuration of an audio track, it will be asked to play if its MediaPlayerPrivateMediaStreamAVFObjC is playing. |
| Add internals API to be able to write a test. |
| |
| Test: fast/mediastream/play-newly-added-audio-track.html |
| |
| * html/track/AudioTrack.h: |
| * html/track/AudioTrack.idl: |
| * platform/graphics/AudioTrackPrivate.h: |
| (WebCore::AudioTrackPrivate::isBackedByMediaStreamTrack const): |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: |
| (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks): |
| * platform/mediastream/AudioTrackPrivateMediaStream.cpp: |
| (WebCore::AudioTrackPrivateMediaStream::play): |
| * platform/mediastream/AudioTrackPrivateMediaStream.h: |
| (isType): |
| * testing/Internals.cpp: |
| (WebCore::Internals::isMockRealtimeMediaSourceCenterEnabled): |
| (WebCore::Internals::shouldAudioTrackPlay): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-04-20 Youenn Fablet <youenn@apple.com> |
| |
| Use a WeakHashSet to store MediaStreamPrivate observers |
| https://bugs.webkit.org/show_bug.cgi?id=210494 |
| |
| Reviewed by Eric Carlson. |
| |
| Remove observers from the MediaStream and migrate existing client (MediaRecorder) to MediaStreamPrivate::Observer. |
| Make use of WeakHashSet in MediaStreamPrivate to improve robustness of the code. |
| Any time the MediaStreamPrivate tracks are modified, observers will be notified. |
| MediaStream needs now to decide when to send an event when its MediaStreamPrivate notifies of new/deleted tracks, |
| Modernize a bit the code to use more references. |
| Covered by existing tests. |
| |
| * Modules/mediarecorder/MediaRecorder.cpp: |
| (WebCore::MediaRecorder::MediaRecorder): |
| (WebCore::MediaRecorder::~MediaRecorder): |
| (WebCore::MediaRecorder::handleTrackChange): |
| * Modules/mediarecorder/MediaRecorder.h: |
| * Modules/mediastream/MediaStream.cpp: |
| (WebCore::createTrackPrivateVector): |
| (WebCore::MediaStream::MediaStream): |
| (WebCore::MediaStream::~MediaStream): |
| (WebCore::MediaStream::addTrack): |
| (WebCore::MediaStream::removeTrack): |
| (WebCore::MediaStream::getTrackById): |
| (WebCore::MediaStream::didAddTrack): |
| (WebCore::MediaStream::didRemoveTrack): |
| (WebCore::MediaStream::addTrackFromPlatform): |
| (WebCore::MediaStream::internalAddTrack): |
| (WebCore::MediaStream::internalTakeTrack): |
| * Modules/mediastream/MediaStream.h: |
| * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: |
| (WebCore::LibWebRTCMediaEndpoint::removeRemoteTrack): |
| * platform/mediastream/MediaStreamPrivate.cpp: |
| (WebCore::MediaStreamPrivate::MediaStreamPrivate): |
| (WebCore::MediaStreamPrivate::addObserver): |
| (WebCore::MediaStreamPrivate::removeObserver): |
| (WebCore::MediaStreamPrivate::forEachObserver): |
| (WebCore::MediaStreamPrivate::computeActiveState): |
| (WebCore::MediaStreamPrivate::updateActiveState): |
| (WebCore::MediaStreamPrivate::addTrack): |
| (WebCore::MediaStreamPrivate::removeTrack): |
| (WebCore::MediaStreamPrivate::trackEnded): |
| * platform/mediastream/MediaStreamPrivate.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::removeMediaStreamTrack): |
| |
| 2020-04-19 Simon Fraser <simon.fraser@apple.com> |
| |
| Content disappears on CSS parallax example |
| https://bugs.webkit.org/show_bug.cgi?id=210732 |
| <rdar://problem/61997636> |
| |
| Reviewed by Darin Adler. |
| |
| If scrolling affects the computation of coverage rect of a TiledBacking, we plumb |
| that expanded coverage back into TransformState which is maintained during GraphicsLayer flushing, |
| and it's used to compute coverage rect for descendants. |
| |
| It's passed into TransformState::setLastPlanarSecondaryQuad(), which has to map it back into |
| the coordinate system of the last flattening ancestor. However, TransformState::mapQuad() |
| had a missing return and the quad mapping was wrong. The new code is now the same as |
| TransformState::mappedPoint() (you can see where the copy/paste error came from). |
| |
| Test: compositing/tiling/coverage-adjustment-secondary-quad-mapping.html |
| |
| * platform/graphics/transforms/TransformState.cpp: |
| (WebCore::TransformState::mapQuad const): |
| (WebCore::TransformState::flattenWithTransform): |
| |
| 2020-04-20 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for border-collapse: collapse. |
| https://bugs.webkit.org/show_bug.cgi?id=210747 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-flex-width-border-collapse.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::ensureTableGrid): |
| |
| 2020-04-20 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| Oversized caret and selection rects in text fields on ganji.com and netflix.com/login |
| https://bugs.webkit.org/show_bug.cgi?id=210622 |
| <rdar://problem/45945636> |
| |
| Reviewed by Darin Adler. |
| |
| Currently, selection and caret rects in text fields on some web pages can be excessively tall. This patch makes |
| a small adjustment to allow the top of the caret or selection rect to snap to the top of the inline box instead |
| of being at the end of the previous line, in the case where there is no previous inline box. |
| |
| In the case where we compute the caret rect for an empty renderer (i.e. no children), we make an additional |
| tweak so that the caret rect's height is based on the computed font height instead of line height, and then we |
| ensure that the caret is (logically) vertically centered. |
| |
| See below for more details. |
| |
| Test: editing/selection/selection-and-caret-do-not-extend-to-line-height.html |
| |
| * rendering/RenderBlockFlow.cpp: |
| (WebCore::RenderBlockFlow::positionForPointWithInlineChildren): |
| |
| Specify ForHitTesting::Yes when asking for selectionTop(). |
| |
| * rendering/RenderBoxModelObject.cpp: |
| (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement): |
| |
| Use FontMetric's height when computing the height of the caret rect, and then center it vertically in the |
| renderer. |
| |
| * rendering/RenderReplaced.cpp: |
| (WebCore::RenderReplaced::positionForPoint): |
| |
| Specify ForHitTesting::Yes when asking for selectionTop(). See below for more information. |
| |
| * rendering/RenderTextLineBoxes.cpp: |
| (WebCore::RenderTextLineBoxes::positionForPoint const): |
| * rendering/RootInlineBox.cpp: |
| (WebCore::RootInlineBox::selectionTop const): |
| |
| When computing selectionTop(), we currently fall back to using the top of the containing RenderBlockFlow |
| (`blockFlow().borderAndPaddingBefore()`) in the case where there is no previous root box. However, this can lead |
| to selection and caret rects being taller than expected; instead, we can use the max of the `selectionTop` |
| (that is, the top of the line box, adjusted for annotations) and the top of the RenderBlockFlow. This has the |
| effect of allowing the caret and selection to visually snap to the top of a run of text, provided there is not |
| already a line of text that precedes it. Taking the maximum of the two values ensures that we don't |
| unintentionally make the selection or caret rects even larger, if the line top is above the top of the block. |
| |
| Note that we also avoid shrinking the selection and caret rects when hit-testing renderers for positions and |
| ranges. This allows users to still click and drag to select text in the extra line-height area above a piece of |
| text, even if the selection is only painted over the text (and not in the region containing the line-height). |
| This behavior was established in the fix for webkit.org/b/14911, and is covered by the layout test |
| `editing/selection/inline-closest-leaf-child.html`. |
| |
| * rendering/RootInlineBox.h: |
| |
| 2020-04-20 Darin Adler <darin@apple.com> |
| |
| Use #import instead of #include in Objective-C and don't use #pragma once |
| https://bugs.webkit.org/show_bug.cgi?id=210724 |
| |
| Reviewed by David Kilzer. |
| |
| * page/cocoa/SettingsBaseCocoa.mm: |
| (WebCore::sansSerifTraditionalHanFontFamily): Deleted. |
| (WebCore::sansSerifSimplifiedHanFontFamily): Deleted. |
| (WebCore::SettingsBase::initializeDefaultFontFamilies): Just use font name |
| strings directly since there are no conditionals any more. |
| |
| * Modules/applepay/PaymentRequestValidator.mm: |
| * Modules/applepay/cocoa/PaymentContactCocoa.mm: |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.h: |
| * accessibility/mac/AXObjectCacheMac.mm: |
| * accessibility/mac/WebAccessibilityObjectWrapperBase.h: |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.h: |
| * bridge/objc/WebScriptObjectPrivate.h: |
| * bridge/objc/objc_class.mm: |
| * bridge/testbindings.mm: |
| * crypto/mac/SerializedCryptoKeyWrapMac.mm: |
| * editing/cocoa/WebArchiveResourceFromNSAttributedString.h: |
| * editing/cocoa/WebArchiveResourceWebResourceHandler.h: |
| * editing/cocoa/WebContentReaderCocoa.mm: |
| * history/mac/HistoryItemMac.mm: |
| * loader/cocoa/DiskCacheMonitorCocoa.mm: |
| * loader/cocoa/SubresourceLoaderCocoa.mm: |
| * loader/mac/ResourceLoaderMac.mm: |
| * page/cocoa/MemoryReleaseCocoa.mm: |
| * page/cocoa/ResourceUsageOverlayCocoa.mm: |
| * page/cocoa/ResourceUsageThreadCocoa.mm: |
| * page/ios/WebEventRegion.h: |
| * page/mac/ChromeMac.mm: |
| * page/mac/EventHandlerMac.mm: |
| * page/mac/WheelEventDeltaFilterMac.mm: |
| * page/scrolling/cocoa/ScrollingStateNode.mm: |
| * page/scrolling/mac/ScrollingCoordinatorMac.mm: |
| * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm: |
| * page/scrolling/mac/ScrollingStateScrollingNodeMac.mm: |
| * page/scrolling/mac/ScrollingThreadMac.mm: |
| * page/scrolling/mac/ScrollingTreeMac.mm: |
| * platform/audio/cocoa/MediaSessionManagerCocoa.mm: |
| * platform/audio/mac/AudioSampleDataSource.mm: |
| * platform/cocoa/DataDetectorsCoreSoftLink.mm: |
| * platform/cocoa/PasteboardCocoa.mm: |
| * platform/cocoa/ScrollSnapAnimatorState.mm: |
| * platform/cocoa/SystemVersion.mm: |
| * platform/gamepad/cocoa/GameControllerGamepad.mm: |
| * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm: |
| * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: |
| * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm: |
| * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: |
| * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: |
| * platform/graphics/ca/cocoa/WebTiledBackingLayer.h: |
| * platform/graphics/ca/cocoa/WebVideoContainerLayer.h: |
| * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: |
| * platform/graphics/cocoa/IOSurfacePoolCocoa.mm: |
| * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm: |
| * platform/graphics/cocoa/WebGLLayer.h: |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| * platform/graphics/cocoa/WebGPULayer.h: |
| * platform/graphics/cocoa/WebGPULayer.mm: |
| * platform/graphics/cv/ImageRotationSessionVT.mm: |
| * platform/graphics/cv/ImageTransferSessionVT.mm: |
| * platform/graphics/cv/TextureCacheCV.mm: |
| * platform/graphics/gpu/cocoa/GPUBufferMetal.mm: |
| * platform/graphics/gpu/cocoa/GPUComputePassEncoderMetal.mm: |
| * platform/graphics/mac/ComplexTextControllerCoreText.mm: |
| * platform/graphics/mac/FloatPointMac.mm: |
| * platform/graphics/mac/FloatSizeMac.mm: |
| * platform/graphics/mac/IntPointMac.mm: |
| * platform/graphics/mac/IntSizeMac.mm: |
| * platform/graphics/mac/WebLayer.h: |
| * platform/graphics/mac/WebLayer.mm: |
| * platform/ios/LegacyTileCache.mm: |
| * platform/ios/LegacyTileGrid.mm: |
| * platform/ios/LegacyTileGridTile.mm: |
| * platform/ios/LegacyTileLayer.h: |
| * platform/ios/LegacyTileLayer.mm: |
| * platform/ios/LegacyTileLayerPool.mm: |
| * platform/ios/LocalCurrentTraitCollection.mm: |
| * platform/ios/LocalizedDeviceModel.mm: |
| * platform/ios/ScrollbarThemeIOS.mm: |
| * platform/ios/WebCoreMotionManager.h: |
| * platform/ios/WebItemProviderPasteboard.mm: |
| * platform/ios/WebVideoFullscreenControllerAVKit.h: |
| * platform/mac/LocalCurrentGraphicsContext.mm: |
| * platform/mac/LocalDefaultSystemAppearance.mm: |
| * platform/mac/LoggingMac.mm: |
| * platform/mac/PlatformEventFactoryMac.mm: |
| * platform/mac/RemoteCommandListenerMac.mm: |
| * platform/mac/ScrollAnimatorMac.mm: |
| * platform/mac/SerializedPlatformDataCueMac.mm: |
| * platform/mac/WebCoreFullScreenPlaceholderView.mm: |
| * platform/mac/WebCoreFullScreenWarningView.h: |
| * platform/mac/WebCoreFullScreenWarningView.mm: |
| * platform/mac/WebCoreFullScreenWindow.h: |
| * platform/mac/WebCoreObjCExtras.mm: |
| * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm: |
| * platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm: |
| * platform/mediastream/ios/AVAudioSessionCaptureDevice.mm: |
| * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm: |
| * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm: |
| * platform/mediastream/mac/RealtimeMediaSourceCenterMac.mm: |
| * platform/mediastream/mac/RealtimeVideoUtilities.mm: |
| * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm: |
| * platform/network/cocoa/CertificateInfoCocoa.mm: |
| * platform/network/cocoa/WebCoreNSURLSession.h: |
| * platform/network/mac/BlobDataFileReferenceMac.mm: |
| * platform/network/mac/CredentialStorageMac.mm: |
| * platform/network/mac/SynchronousLoaderClient.mm: |
| * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: |
| * platform/text/cocoa/LocaleCocoa.mm: |
| * testing/ServiceWorkerInternals.mm: |
| * testing/cocoa/WebViewVisualIdentificationOverlay.h: |
| More #import, less #pragma once. |
| |
| 2020-04-20 Youenn Fablet <youenn@apple.com> |
| |
| Safari doesn't apply frameRate limit when request stream from Camera |
| https://bugs.webkit.org/show_bug.cgi?id=210186 |
| <rdar://problem/61452794> |
| |
| Reviewed by Eric Carlson. |
| |
| Add support to RealtimeVideoSource to decimate the video samples based on the observed frame rate of its capture source. |
| This allows supporting two tracks using the same capture device, one track being low frame rate and the other one high frame rate. |
| |
| Clean-up refactoring to make RealtimeVideoSource directly inherit from RealtimeVideoCaptureSource. |
| Migrate size and format of frame adaptation from RealtimeVideoCaptureSource to RealtimeVideoSource. |
| Fix mock capture source to update its frame rate when asked by applyConstraints. |
| |
| Tests: fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html |
| fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html |
| fast/mediastream/mediastreamtrack-video-frameRate-decreasing.html |
| fast/mediastream/mediastreamtrack-video-frameRate-increasing.html |
| |
| * platform/mediastream/RealtimeVideoCaptureSource.cpp: |
| (WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers): |
| (WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate): |
| * platform/mediastream/RealtimeVideoCaptureSource.h: |
| (WebCore::RealtimeVideoCaptureSource::observedFrameRate const): |
| * platform/mediastream/RealtimeVideoSource.cpp: |
| (WebCore::RealtimeVideoSource::RealtimeVideoSource): |
| (WebCore::m_source): |
| (WebCore::RealtimeVideoSource::adaptVideoSample): |
| (WebCore::RealtimeVideoSource::videoSampleAvailable): |
| * platform/mediastream/RealtimeVideoSource.h: |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| (WebCore::MockRealtimeVideoSource::setFrameRateWithPreset): |
| * testing/Internals.cpp: |
| (WebCore::Internals::observeMediaStreamTrack): |
| |
| 2020-04-20 Antoine Quint <graouts@apple.com> |
| |
| WebAnimations API doesn't properly apply keyframe easings to transforms |
| https://bugs.webkit.org/show_bug.cgi?id=210526 |
| <rdar://problem/61800424> |
| |
| Reviewed by Antti Koivisto. |
| |
| GraphicsLayerCA has code that determines whether an animation can be accelerated looking at the timing function of its keyframes and excluding |
| animations that use a steps timing function as one of its values. However, we we would fail to set the timing function on the KeyframeValue for |
| each keyframe in the KeyframeList we create for a JS-originated animation. We now do this correctly. |
| |
| Test: webanimations/transform-animation-with-steps-timing-function-not-accelerated.html |
| |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::updateBlendingKeyframes): |
| |
| 2020-04-20 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| StructuredClone algorithm should be aware of BigInt |
| https://bugs.webkit.org/show_bug.cgi?id=210728 |
| |
| Reviewed by Mark Lam. |
| |
| This patch adds structured-cloning for BigInt and BigIntObject. |
| The logic is adding BigIntTag & BigIntObjectTag. And then we put content of BigInt with length. |
| And deserialization reads them to reconstruct BigInt or BigIntObject. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::dumpImmediate): |
| (WebCore::CloneSerializer::dumpBigIntData): |
| (WebCore::CloneSerializer::dumpBigInt32Data): |
| (WebCore::CloneSerializer::dumpHeapBigIntData): |
| (WebCore::CloneSerializer::dumpIfTerminal): |
| (WebCore::CloneDeserializer::readBigInt): |
| (WebCore::CloneDeserializer::readTerminal): |
| |
| 2020-04-20 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Enable resource load statistics |
| https://bugs.webkit.org/show_bug.cgi?id=210184 |
| |
| Reviewed by Žan Doberšek. |
| |
| * platform/network/soup/NetworkStorageSessionSoup.cpp: |
| (WebCore::NetworkStorageSession::setCookiesFromDOM const): Return early if cookies are blocked and update the |
| persistent cookies expiration if needed. |
| (WebCore::NetworkStorageSession::deleteCookiesForHostnames): Implement this when receiving |
| IncludeHttpOnlyCookies parameter. |
| (WebCore::NetworkStorageSession::hasCookies const): Implement this. |
| (WebCore::NetworkStorageSession::getRawCookies const): Honor shouldAskITP parameter. |
| (WebCore::cookiesForSession): Ditto. |
| (WebCore::NetworkStorageSession::cookiesForDOM const): Ditto. |
| (WebCore::NetworkStorageSession::cookieRequestHeaderFieldValue const): Ditto. |
| |
| 2020-04-19 Simon Fraser <simon.fraser@apple.com> |
| |
| Use Optional<FloatQuad> in TransformState |
| https://bugs.webkit.org/show_bug.cgi?id=144226 |
| |
| Reviewed by Sam Weinig. |
| |
| Use Optional<> instead of pointers in TransformState, make it loggable, make FloatQuad loggable. |
| |
| * platform/graphics/FloatQuad.cpp: |
| (WebCore::operator<<): |
| * platform/graphics/FloatQuad.h: |
| * platform/graphics/ca/GraphicsLayerCA.cpp: |
| (WebCore::GraphicsLayerCA::flushCompositingState): |
| (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect const): |
| (WebCore::GraphicsLayerCA::recursiveCommitChanges): |
| * platform/graphics/transforms/TransformState.cpp: |
| (WebCore::TransformState::operator=): |
| (WebCore::TransformState::mappedSecondaryQuad const): |
| (WebCore::TransformState::setLastPlanarSecondaryQuad): |
| (WebCore::TransformState::flattenWithTransform): |
| (WebCore::operator<<): |
| * platform/graphics/transforms/TransformState.h: |
| (WebCore::TransformState::setSecondaryQuad): |
| (WebCore::TransformState::lastPlanarSecondaryQuad const): |
| (WebCore::TransformState::isMappingSecondaryQuad const): |
| (WebCore::TransformState::accumulatedTransform const): |
| |
| 2020-04-19 Rob Buis <rbuis@igalia.com> |
| |
| Remove unneeded code from FrameLoader::loadURL |
| https://bugs.webkit.org/show_bug.cgi?id=210696 |
| |
| Reviewed by Darin Adler. |
| |
| Remove unneeded code from FrameLoader::loadURL, since the only way the load type can be Reload |
| is if loadFrameRequest set it, and the only way loadFrameRequest can set it is if cachePolicy |
| is ReloadIgnoringCacheData, so no need to set it again in FrameLoader::loadURL. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadURL): |
| |
| 2020-04-19 Brady Eidson <beidson@apple.com> |
| |
| Add WKScriptMessageHandler API that asynchronously responds with a promise. |
| rdar://problem/57243492 and https://bugs.webkit.org/show_bug.cgi?id=206398 |
| |
| Reviewed by Andy Estes. |
| |
| Covered by new API tests. |
| |
| Updated for moving an #include into implementation files: |
| * bindings/js/JSDOMPromiseDeferred.cpp: |
| * bindings/js/JSDOMPromiseDeferred.h: |
| * html/HTMLMediaElement.cpp: |
| * page/DOMWindow.cpp: |
| * workers/service/ServiceWorkerGlobalScope.cpp: |
| |
| * page/UserMessageHandler.cpp: |
| (WebCore::UserMessageHandler::postMessage): Return a promise to be fulfilled by the API client. |
| * page/UserMessageHandler.h: |
| * page/UserMessageHandler.idl: |
| * page/UserMessageHandlerDescriptor.h: |
| |
| 2020-04-19 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add column spanning support for flexible table width |
| https://bugs.webkit.org/show_bug.cgi?id=210713 |
| |
| Reviewed by Antti Koivisto. |
| |
| Test: fast/layoutformattingcontext/table-flex-width-colspans.html |
| |
| This patch slightly changes the extra space distribution logic by using either the minimum or |
| the maximum width as the base initial width for the columns. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::computeColumnWidths): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): Deleted. |
| * layout/tableformatting/TableFormattingContext.h: |
| |
| 2020-04-19 Emilio Cobos Álvarez <emilio@crisal.io> |
| |
| Don't use the inherited custom properties to store environment variables. |
| https://bugs.webkit.org/show_bug.cgi?id=210707 |
| |
| Reviewed by Antti Koivisto. |
| |
| It leaks this implementation detail when enumerating the computed style. |
| |
| Tests: imported/w3c/web-platform-tests/css/css-cascade/all-prop-initial-xml.xhtml |
| imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html |
| |
| * css/CSSVariableReferenceValue.cpp: |
| (WebCore::resolveVariableReference): |
| (WebCore::resolveTokenRange): |
| * style/StyleResolveForDocument.cpp: |
| (WebCore::Style::resolveForDocument): |
| |
| 2020-04-19 Antti Koivisto <antti@apple.com> |
| |
| [CSS selectors] :is() / :where() should not allow pseudo-elements at parse-time |
| https://bugs.webkit.org/show_bug.cgi?id=210701 |
| |
| Reviewed by Anders Carlsson. |
| |
| https://drafts.csswg.org/selectors/#matches: |
| |
| "Pseudo-elements cannot be represented by the matches-any pseudo-class; they are not valid within :is()." |
| |
| Test: fast/selectors/pseudo-element-in-is-where.html |
| |
| * css/parser/CSSSelectorParser.cpp: |
| (WebCore::CSSSelectorParser::consumePseudo): |
| |
| 2020-04-19 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Take border spacing into account when distributing column spanners width. |
| https://bugs.webkit.org/show_bug.cgi?id=210712 |
| |
| Reviewed by Antti Koivisto. |
| |
| While distributing the column spanner extra space among individual columns, |
| the spacing between these columns (set by border-spacing) should be taken into |
| account and subtract it from the width to distribute. |
| |
| <table style="border-spacing: 50px"><tr><td colspan=2>long long text</td></tr><tr><td>lo</td><td>xt</td><tr></table> |
| [long long text] |
| [lo] [xt] |
| The individual columns don't require any extra space from the spanner. |
| |
| * layout/FormattingContext.h: |
| (WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator+=): |
| (WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator-=): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints): |
| (WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::horizontalSpacing const): |
| (WebCore::Layout::TableGrid::totalHorizontalSpacing const): Deleted. |
| |
| 2020-04-19 Emilio Cobos Álvarez <emilio@crisal.io> |
| |
| Fix the logic to decide whether a property is enumerated in a computed style declaration. |
| https://bugs.webkit.org/show_bug.cgi?id=210695 |
| |
| Reviewed by Antti Koivisto. |
| |
| Fix the logic to decide whether a property is enumerated in a computed |
| style declaration. |
| |
| Logical properties don't need stylebuilder code, but still should be |
| generated. Using the specification->category for this seems a bit |
| hacky, but unclear if it's worse than adding a new flag. |
| |
| Tests: fast/css/getComputedStyle/computed-style-enumeration.html |
| imported/w3c/web-platform-tests/css/cssom/getComputedStyle-logical-enumeration.html |
| |
| * css/makeprop.pl: |
| (skippedFromComputedStyle): |
| (isLogical): |
| (sortWithPrefixedPropertiesLast): |
| |
| 2020-04-18 Antti Koivisto <antti@apple.com> |
| |
| [CSS selectors] Support :where() pseudo class |
| https://bugs.webkit.org/show_bug.cgi?id=210690 |
| |
| Reviewed by Sam Weinig. |
| |
| "The Specificity-adjustment pseudo-class, :where(), is a functional pseudo-class with the same |
| syntax and functionality as :is(). Unlike :is(), neither the :where pseudo-class, nor any of |
| its arguments contribute to the specificity of the selector—its specificity is always zero. |
| |
| This is useful for introducing filters in a selector while keeping the associated style |
| declarations easy to override." |
| |
| https://drafts.csswg.org/selectors-4/#zero-matches |
| |
| In terms of implementation this is just another alias for :is() with different (always 0) specificity. |
| |
| Test: fast/selectors/where-specificity.html |
| |
| * css/CSSSelector.cpp: |
| (WebCore::simpleSelectorSpecificityInternal): |
| |
| Here is where it differs from PseudoClassIs. |
| |
| (WebCore::CSSSelector::selectorText const): |
| * css/CSSSelector.h: |
| * css/SelectorChecker.cpp: |
| (WebCore::SelectorChecker::checkOne const): |
| * css/SelectorPseudoClassAndCompatibilityElementMap.in: |
| * css/parser/CSSSelectorParser.cpp: |
| (WebCore::isOnlyPseudoClassFunction): |
| (WebCore::CSSSelectorParser::consumePseudo): |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::addPseudoClassType): |
| |
| 2020-04-18 Rob Buis <rbuis@igalia.com> |
| |
| Reduce parameter list of the FrameLoadRequest constructor |
| https://bugs.webkit.org/show_bug.cgi?id=210668 |
| |
| Reviewed by Darin Adler. |
| |
| Reduce parameter list of the FrameLoadRequest constructor by |
| instead using various setters. By choosing the most common |
| defaults the actual number of setters to call are minimized. |
| |
| * inspector/InspectorFrontendClientLocal.cpp: |
| (WebCore::InspectorFrontendClientLocal::openInNewTab): |
| * inspector/agents/InspectorPageAgent.cpp: |
| (WebCore::InspectorPageAgent::navigate): |
| * loader/DocumentLoader.cpp: |
| (WebCore::DocumentLoader::handleProvisionalLoadFailureFromContentFilter): |
| * loader/FrameLoadRequest.cpp: |
| (WebCore::FrameLoadRequest::FrameLoadRequest): |
| * loader/FrameLoadRequest.h: |
| (WebCore::FrameLoadRequest::FrameLoadRequest): |
| (WebCore::FrameLoadRequest::disableShouldReplaceDocumentIfJavaScriptURL): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::changeLocation): |
| (WebCore::FrameLoader::loadURLIntoChildFrame): |
| * loader/NavigationScheduler.cpp: |
| (WebCore::NavigationScheduler::scheduleLocationChange): |
| * page/ContextMenuController.cpp: |
| (WebCore::openNewWindow): |
| (WebCore::ContextMenuController::contextMenuItemSelected): |
| * page/DOMWindow.cpp: |
| (WebCore::DOMWindow::createWindow): |
| * page/DragController.cpp: |
| (WebCore::DragController::performDragOperation): |
| |
| 2020-04-18 David Kilzer <ddkilzer@apple.com> |
| |
| Attempt #3 to fix tvOS build |
| |
| Unreviewed. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer): |
| (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback): |
| - Use !PLATFORM(APPLETV) to comment out functions declared within |
| ENABLE(VIDEO_PRESENTATION_MODE) from r260307 and r260308. |
| |
| 2020-04-18 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| [WTF] Move DataRef.h from WebCore to WTF to utilize it in JSC |
| https://bugs.webkit.org/show_bug.cgi?id=210689 |
| |
| Reviewed by Anders Carlsson. |
| |
| No behavior change, just moving header from WebCore to WTF. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * rendering/style/NinePieceImage.h: |
| * rendering/style/RenderStyle.h: |
| * rendering/style/SVGRenderStyle.h: |
| * rendering/style/StyleRareInheritedData.cpp: |
| * rendering/style/StyleRareInheritedData.h: |
| * rendering/style/StyleRareNonInheritedData.h: |
| |
| 2020-04-18 David Kilzer <ddkilzer@apple.com> |
| |
| Attempt #2 to fix tvOS build |
| |
| Unreviewed. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: |
| - Add #if ENABLE(VIDEO_PRESENTATION_MODE)/#endif to protect |
| methods defined in MediaPlayerPrivate.h. |
| - The previous commit was (r260307) also to fix tvOS, not watchOS. |
| |
| 2020-04-18 David Kilzer <ddkilzer@apple.com> |
| |
| Attempt to fix watchOS build |
| |
| Unreviewed. |
| |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: |
| - Add #if ENABLE(VIDEO_PRESENTATION_MODE)/#endif to protect |
| methods defined in MediaPlayerPrivate.h. |
| |
| 2020-04-17 Simon Fraser <simon.fraser@apple.com> |
| |
| Group overflow controls layers into a single container layer |
| https://bugs.webkit.org/show_bug.cgi?id=210675 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Overflow control layers are going to change z-order in a future change. To make this |
| easier, group the overflow controls layer into their own container layer. |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateDebugIndicators): |
| (WebCore::RenderLayerBacking::updateGeometry): Size the overflow controls layer using paddingBoxRectIncludingScrollbar(). |
| (WebCore::RenderLayerBacking::updateInternalHierarchy): New parenting. |
| (WebCore::RenderLayerBacking::updateOverflowControlsLayers): Some refactoring with a nice lambda. |
| (WebCore::RenderLayerBacking::positionOverflowControlsLayers): Lovely lambda here. Nice. |
| * rendering/RenderLayerBacking.h: |
| |
| 2020-04-17 Kate Cheney <katherine_cheney@apple.com> |
| |
| Enable service workers for app-bound domains |
| https://bugs.webkit.org/show_bug.cgi?id=210451 |
| <rdar://problem/61479474> |
| |
| Reviewed by Brent Fulgham. |
| |
| SWServer now retrieves the app-bound domains from the UI Process and |
| only continues with the load if the proper entitlement is present |
| or the load is coming from an app-bound domain. |
| |
| * workers/service/server/SWServer.cpp: |
| (WebCore::SWServer::addRegistrationFromStore): |
| (WebCore::SWServer::SWServer): |
| (WebCore::SWServer::validateRegistrationDomain): |
| (WebCore::SWServer::scheduleJob): |
| * workers/service/server/SWServer.h: |
| |
| 2020-04-17 Dean Jackson <dino@apple.com> |
| |
| [WebGL] Confirm there are no errors when setting up framebuffers |
| https://bugs.webkit.org/show_bug.cgi?id=210632 |
| <rdar://problem/61916680> |
| |
| Reviewed by Simon Fraser. |
| |
| We're seeing crashes on macOS inside GraphicsContextGL::reshape(). |
| Specifically when we submit work at the end of the function via |
| glFlush. |
| |
| At the moment the cause is a mystery, because we should bail out |
| before then if the multisample renderbuffer was not complete. In |
| the hope that it helps somewhat, add a call to glGetError to double |
| check that there isn't anything horribly wrong before we talk to |
| the GPU. |
| |
| * html/canvas/WebGL2RenderingContext.cpp: |
| (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): If the underlying |
| GCGL context was marked as "LOST" during initialization, skip the rest of our |
| initialization. |
| * html/canvas/WebGLRenderingContext.cpp: Ditto. |
| (WebCore::WebGLRenderingContext::WebGLRenderingContext): |
| * html/canvas/WebGLRenderingContextBase.cpp: Ditto. |
| (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase): |
| |
| * platform/graphics/angle/GraphicsContextGLANGLE.cpp: Check for a GL error during |
| setup and, if there is one, skip directly into a LOST state. |
| (WebCore::GraphicsContextGLOpenGL::reshape): |
| * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: |
| (WebCore::GraphicsContextGLOpenGL::reshape): |
| |
| 2020-04-17 Peng Liu <peng.liu6@apple.com> |
| |
| Cleanup the macros for video fullscreen and picture-in-picture |
| https://bugs.webkit.org/show_bug.cgi?id=210638 |
| |
| Reviewed by Eric Carlson. |
| |
| A follow-up patch to fix build failures of r260259. |
| |
| * platform/ios/VideoFullscreenInterfaceAVKit.h: |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| * platform/ios/WebVideoFullscreenControllerAVKit.mm: |
| |
| 2020-04-17 David Kilzer <ddkilzer@apple.com> |
| |
| REGRESSION (r234105): [iOS] WKColorButton leaks a UIColor |
| <https://webkit.org/b/210658> |
| <rdar://problem/61938137> |
| |
| Reviewed by Darin Adler. |
| |
| * html/ColorInputType.cpp: |
| (WebCore::ColorInputType::isKeyboardFocusable const): |
| * page/Chrome.cpp: |
| (WebCore::Chrome::createColorChooser): |
| - Drive-by fix of unreachable code on PLATFORM(IOS_FAMILY). |
| |
| 2020-04-17 Don Olmstead <don.olmstead@sony.com> |
| |
| [CMake] Add WebKit::WebCore target |
| https://bugs.webkit.org/show_bug.cgi?id=210445 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Add a WebKit::WebCore target. Remove the WebCoreHeaderInterface target since |
| the WebKit::WebCore target is functionaly the same. |
| |
| * CMakeLists.txt: |
| |
| 2020-04-17 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r260245. |
| |
| The tests added with this change are frequently failing on |
| macOS bots. |
| |
| Reverted changeset: |
| |
| "Safari doesn't apply frameRate limit when request stream from |
| Camera" |
| https://bugs.webkit.org/show_bug.cgi?id=210186 |
| https://trac.webkit.org/changeset/260245 |
| |
| 2020-04-17 Per Arne Vollan <pvollan@apple.com> |
| |
| Unreviewed build fix. |
| |
| * platform/cocoa/AGXCompilerService.cpp: |
| |
| 2020-04-17 Antoine Quint <graouts@apple.com> |
| |
| Stop including style rules related to media controls in the UA style sheet when Modern Media Controls are enabled |
| https://bugs.webkit.org/show_bug.cgi?id=210606 |
| |
| Reviewed by Antti Koivisto and Daniel Bates. |
| |
| There is no need to insert style rules related to media controls in the UA stylesheet when Modern Media Controls are enabled. |
| There is one rule from mediaControlsApple.css for the default sizing of <audio> that makes sense broadly for content on the Web |
| so we move that to html.css. We also set the background-color property for media documents in html.css. |
| |
| * Modules/mediacontrols/mediaControlsApple.css: |
| (audio): Deleted. |
| (body:-webkit-full-page-media): Deleted. |
| * Modules/mediacontrols/mediaControlsiOS.css: |
| (body:-webkit-full-page-media): Deleted. |
| * Modules/modern-media-controls/controls/media-document.css: |
| (:host(.media-document)): |
| * css/html.css: |
| (body:-webkit-full-page-media): |
| (audio): |
| * css/mediaControls.css: |
| (body:-webkit-full-page-media): Deleted. |
| * style/UserAgentStyle.cpp: |
| (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement): |
| |
| 2020-04-17 Peng Liu <peng.liu6@apple.com> |
| |
| Cleanup the macros for video fullscreen and picture-in-picture |
| https://bugs.webkit.org/show_bug.cgi?id=210638 |
| |
| Reviewed by Eric Carlson. |
| |
| Replace some "#if PLATFORM(IOS_FAMILY) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))" |
| and all "#if (PLATFORM(IOS_FAMILY) && HAVE(AVKIT)) || (PLATFORM(MAC) && ENABLE(VIDEO_PRESENTATION_MODE))" |
| with "#if ENABLE(VIDEO_PRESENTATION_MODE)". |
| |
| No new tests, no functional change. |
| |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::mediaEngineWasUpdated): |
| (WebCore::HTMLMediaElement::setVideoFullscreenStandby): |
| * html/HTMLMediaElement.h: |
| * html/HTMLVideoElement.cpp: |
| * html/HTMLVideoElement.h: |
| * platform/PictureInPictureSupport.h: |
| * platform/cocoa/VideoFullscreenChangeObserver.h: |
| * platform/cocoa/VideoFullscreenModel.h: |
| * platform/cocoa/VideoFullscreenModelVideoElement.h: |
| * platform/cocoa/VideoFullscreenModelVideoElement.mm: |
| * platform/graphics/MediaPlayer.cpp: |
| * platform/graphics/MediaPlayer.h: |
| * platform/graphics/MediaPlayerPrivate.h: |
| * platform/ios/VideoFullscreenInterfaceAVKit.mm: |
| (WebCore::supportsPictureInPicture): |
| |
| 2020-04-17 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Resolve the minimum width for overlapping spanner columns |
| https://bugs.webkit.org/show_bug.cgi?id=210654 |
| |
| Reviewed by Antti Koivisto. |
| |
| The extra horizontal space distribution is based on the columns' minimum widths. |
| In case of column spanners, first we need to distribute the spanner's minimum |
| width across the columns using the non-spanning minimum widths as the distribution ratio. |
| When there's no non-spanning minimum width for a column (all rows have column spanners for tbis particular column) |
| the minimum width gets distributed equally across the spanned columns. This distribution starts with the shortest columns spans |
| so that we can use these resolved column widths to compute the wider ones. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| |
| 2020-04-17 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK] Update for GdkKeymap API changes |
| https://bugs.webkit.org/show_bug.cgi?id=210642 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| No new tests needed. |
| |
| gdk_keymap_get_default() is deprecated in GTK+ 3.22, so use |
| gdk_keymap_get_for_display() instead. Since in GTK4 this method is |
| removed to gdk_display_get_keymap(), add a helper to |
| GtkVersioning.h to avoid cluttering with ifdefs all over the |
| place. |
| |
| * platform/gtk/GtkVersioning.h: |
| (gdk_keymap_get_for_display): |
| * platform/gtk/PlatformKeyboardEventGtk.cpp: |
| (WebCore::PlatformKeyboardEvent::currentCapsLockState): |
| (WebCore::PlatformKeyboardEvent::modifiersContainCapsLock): |
| |
| 2020-04-17 Oriol Brufau <obrufau@igalia.com> |
| |
| Revert "[css-grid] Exclude implicit grid tracks from the resolved value" |
| https://bugs.webkit.org/show_bug.cgi?id=210617 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Revert r254561 since it appears to be breaking site authoring tools |
| which were relying on the previous behaviour. |
| |
| Tests: fast/css-grid-layout/grid-auto-columns-rows-get-set.html |
| fast/css-grid-layout/grid-columns-rows-get-set.html |
| fast/css-grid-layout/grid-template-shorthand-get-set.html |
| fast/css-grid-layout/mark-as-infinitely-growable.html |
| fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html |
| fast/css-grid-layout/negative-growth-share-as-infinity-crash.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-flexible-lengths-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-grid-template-columns-rows-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-named-grid-lines-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-support-repeat-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-inline-template-columns-rows-resolved-values-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-flexible-lengths-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-grid-template-columns-rows-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-named-grid-lines-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-support-repeat-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-template-columns-rows-resolved-values-001.html |
| imported/w3c/web-platform-tests/css/css-grid/grid-layout-properties.html |
| imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-columns-computed-withcontent.html |
| imported/w3c/web-platform-tests/css/css-grid/parsing/grid-template-rows-computed-withcontent.html |
| |
| * css/CSSComputedStyleDeclaration.cpp: |
| (WebCore::valueForGridTrackList): |
| * rendering/RenderGrid.cpp: |
| (WebCore::RenderGrid::trackSizesForComputedStyle const): |
| |
| 2020-04-17 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Deny iokit open access to graphics related classes |
| https://bugs.webkit.org/show_bug.cgi?id=210616 |
| |
| Reviewed by Darin Adler. |
| |
| Deny iokit open access to graphics related classes in the WebContent process on iOS, but issue |
| extensions for these for some devices which still need access to them. |
| |
| API test: WebKit.IOKitOpenSandboxAccessForDeviceWithAGXCompilerService |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/cocoa/AGXCompilerService.cpp: Added. |
| (WebCore::setDeviceHasAGXCompilerServiceForTesting): |
| (WebCore::deviceHasAGXCompilerService): |
| * platform/cocoa/AGXCompilerService.h: Added. |
| * testing/Internals.cpp: |
| (WebCore::Internals::hasSandboxIOKitOpenAccessToClass): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| * testing/Internals.mm: |
| (WebCore::Internals::hasSandboxIOKitOpenAccessToClass): |
| |
| 2020-04-17 Youenn Fablet <youenn@apple.com> |
| |
| Safari doesn't apply frameRate limit when request stream from Camera |
| https://bugs.webkit.org/show_bug.cgi?id=210186 |
| <rdar://problem/61452794> |
| |
| Reviewed by Eric Carlson. |
| |
| Add support to RealtimeVideoSource to decimate the video samples based on the observed frame rate of its capture source. |
| This allows supporting two tracks using the same capture device, one track being low frame rate and the other one high frame rate. |
| |
| Clean-up refactoring to make RealtimeVideoSource directly inherit from RealtimeVideoCaptureSource. |
| Migrate size and format of frame adaptation from RealtimeVideoCaptureSource to RealtimeVideoSource. |
| Fix mock capture source to update its frame rate when asked by applyConstraints. |
| |
| Tests: fast/mediastream/mediastreamtrack-video-frameRate-clone-decreasing.html |
| fast/mediastream/mediastreamtrack-video-frameRate-clone-increasing.html |
| fast/mediastream/mediastreamtrack-video-frameRate-decreasing.html |
| fast/mediastream/mediastreamtrack-video-frameRate-increasing.html |
| |
| * platform/mediastream/RealtimeVideoCaptureSource.cpp: |
| (WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers): |
| (WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate): |
| * platform/mediastream/RealtimeVideoCaptureSource.h: |
| (WebCore::RealtimeVideoCaptureSource::observedFrameRate const): |
| * platform/mediastream/RealtimeVideoSource.cpp: |
| (WebCore::RealtimeVideoSource::RealtimeVideoSource): |
| (WebCore::m_source): |
| (WebCore::RealtimeVideoSource::adaptVideoSample): |
| (WebCore::RealtimeVideoSource::videoSampleAvailable): |
| * platform/mediastream/RealtimeVideoSource.h: |
| * platform/mock/MockRealtimeVideoSource.cpp: |
| (WebCore::MockRealtimeVideoSource::setFrameRateWithPreset): |
| * testing/Internals.cpp: |
| (WebCore::Internals::observeMediaStreamTrack): |
| |
| 2020-04-17 Alexey Shvayka <shvaikalesh@gmail.com> |
| |
| MediaQueryList should extend EventTarget |
| https://bugs.webkit.org/show_bug.cgi?id=203288 |
| |
| Reviewed by Darin Adler. |
| |
| Initially, CSSOM View Module specification [1] had a custom callback mechanism with addListener() and removeListener(), |
| and the callback was invoked with the associated MediaQueryList as argument. |
| |
| Now the normal event mechanism [2] is used instead. For backwards compatibility, addListener() and removeListener() |
| methods are basically aliases for addEventListener() and removeEventListener(), respectively, and the "change" event |
| masquerades as a MediaQueryList. |
| |
| This patch implements new event mechanism, aligning WebKit with Blink and SpiderMonkey, and also fixes |
| a few minor spec incompatibilities: mandatory listener argument, "handleEvent" support, and listeners call order. |
| |
| [1]: https://www.w3.org/TR/2011/WD-cssom-view-20110804/#mediaquerylist |
| [2]: https://www.w3.org/TR/cssom-view-1/#mediaquerylist |
| |
| Tests: fast/media/media-query-list-07.html |
| web-platform-tests/css/cssom-view/MediaQueryList-addListener-handleEvent.html |
| web-platform-tests/css/cssom-view/MediaQueryList-addListener-removeListener.html |
| web-platform-tests/css/cssom-view/MediaQueryList-extends-EventTarget.html |
| web-platform-tests/css/cssom-view/MediaQueryList-extends-EventTarget-interop.html |
| web-platform-tests/css/cssom-view/MediaQueryListEvent.html |
| web-platform-tests/css/cssom-view/idlharness.html |
| web-platform-tests/css/cssom-view/matchMedia.html |
| |
| * CMakeLists.txt: |
| * DerivedSources-input.xcfilelist: |
| * DerivedSources-output.xcfilelist: |
| * DerivedSources.make: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * bindings/js/WebCoreBuiltinNames.h: |
| * bindings/scripts/test/JS/*: Updated. |
| * css/MediaQueryList.cpp: |
| (WebCore::MediaQueryList::MediaQueryList): |
| (WebCore::MediaQueryList::create): |
| (WebCore::MediaQueryList::~MediaQueryList): |
| (WebCore::MediaQueryList::addListener): |
| (WebCore::MediaQueryList::removeListener): |
| * css/MediaQueryList.h: |
| * css/MediaQueryList.idl: |
| * css/MediaQueryListEvent.cpp: Added. |
| (WebCore::MediaQueryListEvent::MediaQueryListEvent): |
| * css/MediaQueryListEvent.h: Added. |
| * css/MediaQueryListEvent.idl: Added. |
| * css/MediaQueryListListener.h: Removed. |
| * css/MediaQueryListListener.idl: Removed. |
| * css/MediaQueryMatcher.cpp: |
| (WebCore::MediaQueryMatcher::documentDestroyed): |
| (WebCore::MediaQueryMatcher::addMediaQueryList): |
| (WebCore::MediaQueryMatcher::removeMediaQueryList): |
| (WebCore::MediaQueryMatcher::matchMedia): |
| (WebCore::MediaQueryMatcher::evaluateAll): |
| (WebCore::MediaQueryMatcher::addListener): Deleted. |
| (WebCore::MediaQueryMatcher::removeListener): Deleted. |
| * css/MediaQueryMatcher.h: |
| * dom/EventNames.in: |
| * dom/EventTarget.h: |
| (WebCore::EventTarget::removeEventListener): |
| * dom/EventTargetFactory.in: |
| |
| 2020-04-17 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Unreviewed build fix after r260123 |
| |
| No new tests needed. |
| |
| * platform/gtk/CursorGtk.cpp: |
| (WebCore::createCustomCursor): Pass missing pixel buffer data pointer to gdk_memory_texture_new(). |
| |
| 2020-04-17 Youenn Fablet <youenn@apple.com> |
| |
| Make use of WeakHashSet for MediaStreamTrackPrivate and RealtimeMediaSource observers |
| https://bugs.webkit.org/show_bug.cgi?id=210492 |
| |
| Reviewed by Geoffrey Garen. |
| |
| We are making use of WeakHashSet to improve the robustness of the code. |
| For that purpose we use the new WeakHashSet::forEach method. |
| No change of behavior. |
| |
| * Modules/mediarecorder/MediaRecorder.h: |
| * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: |
| * platform/mediastream/MediaStreamPrivate.cpp: |
| (WebCore::MediaStreamPrivate::forEachObserver const): |
| * platform/mediastream/MediaStreamTrackPrivate.cpp: |
| (WebCore::MediaStreamTrackPrivate::forEachObserver): |
| (WebCore::MediaStreamTrackPrivate::addObserver): |
| (WebCore::MediaStreamTrackPrivate::removeObserver): |
| (WebCore::MediaStreamTrackPrivate::forEachObserver const): Deleted. |
| * platform/mediastream/MediaStreamTrackPrivate.h: |
| (WebCore::MediaStreamTrackPrivate::hasObserver const): Deleted. |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::addAudioSampleObserver): |
| (WebCore::RealtimeMediaSource::removeAudioSampleObserver): |
| (WebCore::RealtimeMediaSource::addObserver): |
| (WebCore::RealtimeMediaSource::removeObserver): |
| (WebCore::RealtimeMediaSource::forEachObserver): |
| (WebCore::RealtimeMediaSource::notifyMutedObservers): |
| (WebCore::RealtimeMediaSource::requestToEnd): |
| (WebCore::RealtimeMediaSource::forEachObserver const): Deleted. |
| (WebCore::RealtimeMediaSource::notifyMutedObservers const): Deleted. |
| * platform/mediastream/RealtimeMediaSource.h: |
| * platform/mediastream/RealtimeOutgoingVideoSource.h: |
| |
| 2020-04-17 Rob Buis <rbuis@igalia.com> |
| |
| Move allowPlugins to FrameLoader |
| https://bugs.webkit.org/show_bug.cgi?id=205876 |
| |
| Reviewed by Darin Adler. |
| |
| Move allowPlugins to FrameLoader to reduce |
| pointer dereferences and lessen dependency |
| on SubframeLoader. Also rename to |
| arePluginsEnabled since the method is asking |
| the Setting with the same name. |
| |
| * dom/DOMImplementation.cpp: |
| (WebCore::DOMImplementation::createDocument): |
| * html/HTMLElement.cpp: |
| (WebCore::HTMLElement::rendererIsEverNeeded): |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::arePluginsEnabled): |
| * loader/FrameLoader.h: |
| * loader/SubframeLoader.cpp: |
| (WebCore::SubframeLoader::createJavaAppletWidget): |
| (WebCore::SubframeLoader::allowPlugins): Deleted. |
| * loader/SubframeLoader.h: |
| * plugins/DOMMimeType.cpp: |
| (WebCore::DOMMimeType::enabledPlugin const): |
| |
| 2020-04-17 Tomoki Imai <Tomoki.Imai@sony.com> |
| |
| Fix an integer overflow in WebCrypto AES-CTR Mac implementation, which may detect a false loop |
| https://bugs.webkit.org/show_bug.cgi?id=210540 |
| |
| (1 << counterLength) causes an integer overflow, and the undefined behavior. |
| The longest valid counterLength on 64 bit machine is 63, |
| and the literal 1 is considered as 32-bit signed integer. |
| Left shifting 1 beyond or to sign-bit is undefined behavior in C++ spec. |
| - https://en.cppreference.com/w/cpp/language/integer_literal |
| - https://en.cppreference.com/w/cpp/language/operator_arithmetic#Bitwise_shift_operators |
| |
| This issue is originally found in https://bugs.webkit.org/show_bug.cgi?id=208186#c2 |
| |
| Reviewed by Jiewen Tan. |
| |
| Test: crypto/subtle/aes-ctr-import-key-encrypt.html |
| |
| * crypto/mac/CryptoAlgorithmAES_CTRMac.cpp: |
| (WebCore::transformAES_CTR): |
| |
| 2020-04-16 Simon Fraser <simon.fraser@apple.com> |
| |
| Scrolling-tree hit-testing is off by top content inset |
| https://bugs.webkit.org/show_bug.cgi?id=210629 |
| <rdar://problem/61848883> |
| |
| Reviewed by Tim Horton. |
| |
| r259936 added a point conversion from the superlayer of the root content layer, |
| to fix RTL, but this also pulled in top content inset, which we don't want. |
| |
| Instead, do the RTL fix by factoring in scroll origin. |
| |
| Test: fast/scrolling/mac/async-scroll-overflow-top-inset.html |
| |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/mac/ScrollingTreeMac.mm: |
| (ScrollingTreeMac::scrollingNodeForPoint): |
| |
| 2020-04-16 Sergio Villar Senin <svillar@igalia.com> |
| |
| Unreviewed build fix for non unified builds. |
| |
| * html/OffscreenCanvas.cpp: Added missing include. |
| * html/canvas/CanvasRenderingContext2DBase.cpp: Ditto. |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: Ditto. |
| * workers/WorkerAnimationController.cpp: |
| (WebCore::WorkerAnimationController::requestAnimationFrame): Added namespace. |
| * workers/WorkerAnimationController.h: Added missing include. |
| |
| 2020-04-16 Simon Fraser <simon.fraser@apple.com> |
| |
| A slow-starting swipe always latches on the root node |
| https://bugs.webkit.org/show_bug.cgi?id=210618 |
| |
| Reviewed by Tim Horton. |
| |
| If the first event in a wheel event gesture had zero delta, scrolling thread logic would |
| always latch on the root node and the rest of the gesture would scroll the document. |
| |
| Fix by not latching for events with zero delta. |
| |
| Test: scrollingcoordinator/mac/latching/zero-delta-began-should-not-latch.html |
| |
| * page/scrolling/ScrollingTreeLatchingController.cpp: |
| (WebCore::ScrollingTreeLatchingController::nodeDidHandleEvent): |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::canScrollWithWheelEvent const): |
| (WebCore::ScrollingTreeScrollingNode::eventCanScrollContents const): |
| (WebCore::ScrollingTreeScrollingNode::scrollLimitReached const): Deleted. |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * platform/PlatformWheelEvent.h: |
| (WebCore::PlatformWheelEvent::shouldConsiderLatching const): FIXME comment. Ideally this would |
| check delta() that that's too scarey at the moment. |
| |
| 2020-04-16 Jer Noble <jer.noble@apple.com> |
| |
| Unreviewed build-fix after r260182; guard call to fullscreenManager() for ports which do not |
| ENABLE(FULLSCREEN_API). |
| |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::updateMediaUsageIfChanged): |
| |
| 2020-04-16 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK] Deprecation-guards fixes |
| https://bugs.webkit.org/show_bug.cgi?id=210600 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| No new tests needed. |
| |
| * platform/gtk/RenderThemeGadget.cpp: |
| (WebCore::RenderThemeGadget::backgroundColor const): Add missing |
| deprecation guards for deprecated GtkStyleContext API. |
| * platform/gtk/ThemeGtk.cpp: |
| (WebCore::ThemeGtk::ensurePlatformColors const): Switch to WK |
| deprecation guards from glib ones. |
| |
| 2020-04-16 Jack Lee <shihchieh_lee@apple.com> |
| |
| ASSERTION FAILED: candidate.isCandidate() in WebCore::canonicalizeCandidate |
| https://bugs.webkit.org/show_bug.cgi?id=130844 |
| <rdar://59535009> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Call Position::isCandidate() in PositionIterator::isCandidate so behavior of |
| candidate search become identical in both classes. |
| |
| Test: editing/inserting/insert-in-br.html |
| |
| * dom/PositionIterator.cpp: |
| (WebCore::PositionIterator::isCandidate const): |
| |
| 2020-04-16 Rob Buis <rbuis@igalia.com> |
| |
| Remove outdated comment from FrameLoader |
| https://bugs.webkit.org/show_bug.cgi?id=210607 |
| |
| Reviewed by Darin Adler. |
| |
| Remove comment from FrameLoader that is not valid/important anymore because |
| addExtraFieldsToRequest does not set the Origin header since r259036. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadDifferentDocumentItem): |
| |
| 2020-04-16 Chris Fleizach <cfleizach@apple.com> |
| |
| AX: Need method for setting selected range from NSRange |
| https://bugs.webkit.org/show_bug.cgi?id=210593 |
| |
| Reviewed by Darin Adler. |
| |
| Allow setSelection to work outside of text controls. |
| |
| Test: accessibility/ios-simulator/non-textcontrol-set-selection.html |
| |
| * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm: |
| (-[WebAccessibilityObjectWrapper _accessibilitySetSelectedTextRange:]): |
| |
| 2020-04-16 Jer Noble <jer.noble@apple.com> |
| |
| [macOS] Update ScreenTime as playback state changes |
| https://bugs.webkit.org/show_bug.cgi?id=210518 |
| <rdar://problem/61181092> |
| |
| Reviewed by Eric Carlson. |
| |
| Follow up to r260182; Pass a WeakPtr into our task queue in sessionWillEndPlayback rather than a bare pointer. |
| |
| * platform/audio/cocoa/MediaSessionManagerCocoa.mm: |
| (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback): |
| |
| 2020-04-16 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| Captured ThreadedScrollingTree should check its m_scrollingCoordinator before calling its methods |
| https://bugs.webkit.org/show_bug.cgi?id=210570 |
| |
| Reviewed by Simon Fraser. |
| |
| m_scrollingCoordinator may be nullified before asynchronously calling its |
| method scheduleUpdateScrollPositionAfterAsyncScroll(). Check if it is |
| not null before calling this method. |
| |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll): |
| |
| 2020-04-16 Zalan Bujtas <zalan@apple.com> |
| |
| Crash in IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded when min-size can not be resolved |
| https://bugs.webkit.org/show_bug.cgi?id=210584 |
| <rdar://problem/56685237> |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Use the initial value of 0 when the min-height can't be resolved. |
| |
| Test: fast/css-grid-layout/crash-when-min-height-cant-be-resolved.html |
| |
| * rendering/GridTrackSizingAlgorithm.cpp: |
| (WebCore::IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded const): |
| |
| 2020-04-16 Adrian Perez de Castro <aperez@igalia.com> |
| |
| Non-unified build fixes mid April 2020 edition |
| https://bugs.webkit.org/show_bug.cgi?id=210599 |
| |
| Unreviewed build fix. |
| |
| No new tests needed. |
| |
| * bindings/js/JSNavigatorCustom.cpp: Add missing JavaScriptCore/JSCJSValue.h header. |
| (WebCore::JSNavigator::getUserMedia): Prefix with the JSC:: namespace where needed. |
| * dom/ShadowRoot.cpp: Add missing WebAnimation.h header. |
| * dom/SimpleRange.cpp: Add missing NodeTraversal.h header. |
| * editing/RemoveNodePreservingChildrenCommand.cpp: Add missing Editing.h header. |
| * page/MemoryRelease.cpp: Add missing JavaScriptCore/VM.h header. |
| * page/PageConfiguration.cpp: Add missing UserContentURLPattern.h header. |
| * page/scrolling/ScrollingTree.h: Add missing EventTrackingRegions.h header. |
| * page/scrolling/ScrollingTreeLatchingController.cpp: Add missing Logging.h header. |
| * page/scrolling/ScrollingTreeLatchingController.h: Add missing ScrollTypes.h header, |
| and forward declaration for WebCore::PlatformWheelEvent. |
| * workers/service/server/SWServerJobQueue.cpp: Add missing Logging.h header. |
| |
| 2020-04-16 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow scrolling] Slow-repaint overflow scroll have force their enclosing scrollers to be slow too |
| https://bugs.webkit.org/show_bug.cgi?id=210591 |
| |
| Reviewed by Antti Koivisto. |
| |
| If an overflow:scroll has background-attachment:fixed in the contents, then both it and all its containing-block |
| scrolling ancestors have to be slow-scrolling too, because scrolling any of them affects the local geometry |
| of the fixed backgrounds which paint on scroll. |
| |
| Implement this by having the scrolling tree do a post-commit pass over the nodes with sync scrolling reasons |
| (which we collect during the commit phase). For each slow-scrolling node, walk its ancestor chain (via |
| proxy nodes when necessary) and mark the scrolling node ancestors with the "DescendantScrollersHaveSynchronousScrolling" |
| reason. |
| |
| For testing, expose internals.scrollingTreeAsText(), which needs a bit of synchronization via |
| waitForScrollingTreeCommit() since the commit happens on the scrolling thread. |
| |
| Tests: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-non-cb-overflow.html |
| scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow.html |
| scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-nested-overflow2.html |
| |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText const): |
| (WebCore::AsyncScrollingCoordinator::scrollingTreeAsText const): |
| * page/scrolling/AsyncScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinator.cpp: |
| (WebCore::ScrollingCoordinator::scrollingStateTreeAsText const): |
| (WebCore::ScrollingCoordinator::scrollingTreeAsText const): |
| (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText): |
| * page/scrolling/ScrollingCoordinator.h: |
| * page/scrolling/ScrollingCoordinatorTypes.h: |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::commitTreeState): |
| (WebCore::ScrollingTree::updateTreeFromStateNodeRecursive): |
| (WebCore::ScrollingTree::propagateSynchronousScrollingReasons): |
| (WebCore::ScrollingTree::updateTreeFromStateNode): Deleted. |
| * page/scrolling/ScrollingTree.h: |
| (WebCore::ScrollingTree::waitForScrollingTreeCommit): |
| * page/scrolling/ScrollingTreeScrollingNode.cpp: |
| (WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren): |
| * page/scrolling/ScrollingTreeScrollingNode.h: |
| * page/scrolling/ThreadedScrollingTree.cpp: |
| (WebCore::ThreadedScrollingTree::waitForScrollingTreeCommit): |
| * page/scrolling/ThreadedScrollingTree.h: |
| * testing/Internals.cpp: |
| (WebCore::Internals::scrollingTreeAsText const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-04-16 Claudio Saavedra <csaavedra@igalia.com> |
| |
| Clean a couple of unused-parameters warnings |
| https://bugs.webkit.org/show_bug.cgi?id=210596 |
| |
| Unreviewed. |
| |
| No new tests needed. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::wouldTaintOrigin const): Remove |
| a spurious UNUSED_PARAM() for an actually used parameter. |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::updateSecurityDiscCharacters): |
| |
| 2020-04-16 Eric Carlson <eric.carlson@apple.com> |
| |
| [macOS] Update ScreenTime as playback state changes |
| https://bugs.webkit.org/show_bug.cgi?id=210518 |
| <rdar://problem/61181092> |
| |
| Reviewed by Jer Noble. |
| |
| Test: media/media-usage-state.html |
| |
| Pass media element state to the UI process whenever it changes. |
| |
| * Headers.cmake: |
| * WebCore.xcodeproj/project.pbxproj: |
| * html/HTMLMediaElement.cpp: |
| (WebCore::HTMLMediaElement::HTMLMediaElement): |
| (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const): |
| * html/HTMLMediaElement.h: |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::MediaElementSession): |
| (WebCore::MediaElementSession::~MediaElementSession): |
| (WebCore::MediaElementSession::updateMediaUsageIfChanged): |
| * html/MediaElementSession.h: |
| * page/ChromeClient.h: |
| (WebCore::ChromeClient::addMediaUsageManagerSession): |
| (WebCore::ChromeClient::updateMediaUsageManagerSessionState): |
| (WebCore::ChromeClient::removeMediaUsageManagerSession): |
| * platform/audio/PlatformMediaSession.cpp: |
| (WebCore::PlatformMediaSession::PlatformMediaSession): |
| * platform/audio/PlatformMediaSession.h: |
| (WebCore::PlatformMediaSession::updateMediaUsageIfChanged): |
| (WebCore::PlatformMediaSession::mediaSessionIdentifier const): |
| * platform/audio/PlatformMediaSessionManager.cpp: |
| (WebCore::PlatformMediaSessionManager::updateNowPlayingInfoIfNecessary): |
| * platform/audio/PlatformMediaSessionManager.h: |
| (WebCore::PlatformMediaSessionManager::scheduleUpdateSessionStatus): |
| (WebCore::PlatformMediaSessionManager::sessionDidEndRemoteScrubbing): |
| (WebCore::PlatformMediaSessionManager::scheduleUpdateNowPlayingInfo): Deleted. |
| * platform/audio/cocoa/MediaSessionManagerCocoa.h: |
| * platform/audio/cocoa/MediaSessionManagerCocoa.mm: |
| (WebCore::MediaSessionManagerCocoa::scheduleUpdateSessionStatus): |
| (WebCore::MediaSessionManagerCocoa::sessionWillBeginPlayback): |
| (WebCore::MediaSessionManagerCocoa::sessionDidEndRemoteScrubbing): |
| (WebCore::MediaSessionManagerCocoa::removeSession): |
| (WebCore::MediaSessionManagerCocoa::sessionWillEndPlayback): |
| (WebCore::MediaSessionManagerCocoa::clientCharacteristicsChanged): |
| (WebCore::MediaSessionManagerCocoa::sessionCanProduceAudioChanged): |
| (WebCore::MediaSessionManagerCocoa::scheduleUpdateNowPlayingInfo): Deleted. |
| * platform/audio/ios/MediaSessionManagerIOS.mm: |
| (WebCore::MediaSessionManageriOS::resetRestrictions): |
| (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): |
| * platform/graphics/MediaUsageInfo.h: Added. |
| (WebCore::MediaUsageInfo::operator== const): |
| (WebCore::MediaUsageInfo::operator!= const): |
| (WebCore::MediaUsageInfo::encode const): |
| (WebCore::MediaUsageInfo::decode): |
| * testing/Internals.cpp: |
| (WebCore::Internals::setMediaElementRestrictions): |
| (WebCore::Internals::mediaUsageState const): |
| * testing/Internals.h: |
| * testing/Internals.idl: |
| |
| 2020-04-16 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| [JSC] Implement JSMapIterator/JSSetIterator with JSInternalFieldObjectImpl |
| https://bugs.webkit.org/show_bug.cgi?id=210023 |
| |
| Reviewed by Keith Miller. |
| |
| * bindings/js/SerializedScriptValue.cpp: |
| (WebCore::CloneSerializer::serialize): |
| |
| 2020-04-16 Philippe Normand <pnormand@igalia.com> |
| |
| Unreviewed, fix GStreamer build warnings. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached): |
| * platform/graphics/gstreamer/mse/AppendPipeline.cpp: |
| (WebCore::AppendPipeline::handleErrorConditionFromStreamingThread): |
| |
| 2020-04-16 Carlos Alberto Lopez Perez <clopez@igalia.com> |
| |
| [GTK] MiniBrowser opens new windows too small causing failures on some WPT tests |
| https://bugs.webkit.org/show_bug.cgi?id=210206 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Some WPT tests (when executed with the WPT runner via WebDriver) |
| open new browser windows via JavaScript invoking Window.open() |
| and then run the test on this new window. |
| The size of the new window is not specified, and we were failing |
| to provide a default window size, so it was using the minimum of |
| 100x100 which its just too small for some test that later call |
| document.elementFromPoint() on some coordinates |
| that are outside of that size. |
| |
| To fix that provide the size of the default GTK window to WebCore |
| if the application sets one via gtk_window_set_default_size(). |
| And if not, then use the size of the previous window. |
| |
| Also change the way we position the new window to work better when |
| the system uses more than one monitor. Previously to get the default |
| coordinates of the new window we were using gdk_display_get_monitor() |
| with just the first monitor available. |
| This causes issues in the calculation of the available space when |
| using several monitors. Instead get the monitor in use by looking |
| at the current GDK root window. |
| |
| Tests: TestWebKitAPI/WebKit2Gtk/TestUIClient:/webkit/WebKitWebView/open-window-default-size |
| and TestWebKitAPI/WebKit2Gtk/TestUIClient:/webkit/WebKitWebView/open-window-no-default-size |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::createWindow): |
| * platform/gtk/PlatformScreenGtk.cpp: |
| (WebCore::getCurrentScreenMonitor): |
| (WebCore::screenRect): |
| (WebCore::screenAvailableRect): |
| |
| 2020-04-16 Tomoki Imai <Tomoki.Imai@sony.com> |
| |
| TextureMapper renders video element with "object-fit: cover" incorrectly |
| https://bugs.webkit.org/show_bug.cgi?id=210544 |
| |
| Reviewed by Žan Doberšek. |
| |
| Propagate GraphicsLayer::contentsClippingRect information to TextureMapperLayer |
| to properly clip the outside of DOM element when the element has "object-fit: cover". |
| |
| Unfortunately, the test is disabled on WebKitGTK due to bug 177536, bug 163528. |
| Test: compositing/video/video-object-fit.html |
| |
| * platform/graphics/nicosia/NicosiaPlatformLayer.h: |
| (Nicosia::CompositionLayer::flushState): |
| * platform/graphics/texmap/TextureMapperLayer.cpp: |
| (WebCore::TextureMapperLayer::paintSelf): Clip using propagated contentsClippingRect when rendering m_contentsLayer. |
| (WebCore::TextureMapperLayer::setContentsClippingRect): |
| * platform/graphics/texmap/TextureMapperLayer.h: |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: |
| (WebCore::CoordinatedGraphicsLayer::setContentsClippingRect): |
| (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): |
| * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h: |
| |
| 2020-04-15 Myles C. Maxfield <mmaxfield@apple.com> |
| |
| [Cocoa] Password obscuring dots drawn with the system font are too small |
| https://bugs.webkit.org/show_bug.cgi?id=209692 |
| <rdar://problem/60788385> |
| |
| Reviewed by Darin Adler. |
| |
| The system font's U+2022 BULLET glyph got smaller. Instead, we should match |
| the native platform's behavior of using U+F79A. However, U+F79A is a PUA |
| character, meaning different fonts will draw it in arbitrary different ways. |
| Therefore, we should only use this character if we're drawing it with the |
| system font. Otherwise, we can take the old codepath and use U+2022 BULLET. |
| |
| Tests: fast/text/text-security-disc-bullet-pua.html |
| platform/mac/fast/text/text-security-disc-bullet-pua-mac.html |
| platform/ios/fast/text/text-security-disc-bullet-pua-ios-new.html |
| platform/ios/fast/text/text-security-disc-bullet-pua-ios-old.html |
| |
| * rendering/InlineTextBox.cpp: |
| (WebCore::InlineTextBox::text const): |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::constructTextRun): |
| * rendering/SimpleLineLayout.cpp: |
| (WebCore::SimpleLineLayout::canUseForStyle): |
| * rendering/SimpleLineLayoutCoverage.cpp: |
| (WebCore::SimpleLineLayout::printReason): |
| * rendering/SimpleLineLayoutCoverage.h: |
| * rendering/style/RenderStyle.cpp: |
| (WebCore::RenderStyle::computeTextSecurityDiscShouldUsePUACodePoint const): |
| * rendering/style/RenderStyle.h: |
| |
| 2020-04-15 Jer Noble <jer.noble@apple.com> |
| |
| REGRESSION (r260102): ASSERTION FAILED: m_arbitrators.contains(proxy) in WebKit::SharedArbitrator::endRoutingArbitrationForArbitrator |
| https://bugs.webkit.org/show_bug.cgi?id=210589 |
| <rdar://problem/61844208> |
| |
| Reviewed by Eric Carlson. |
| |
| Track whether the session successfully entered routing arbitration and only call |
| leaveRoutingAbritration() if entering was sucessful. |
| |
| * platform/audio/mac/AudioSessionMac.mm: |
| (WebCore::AudioSession::setCategory): |
| |
| 2020-04-15 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow scroll] background-attachment:fixed needs to disable async overflow scrolling |
| https://bugs.webkit.org/show_bug.cgi?id=210581 |
| |
| Reviewed by Zalan Bujtas. |
| |
| Start setting synchronousScrollingReasons on overflow scrolling nodes if the scrolling would move content |
| that has background-attachment:fixed (we can't use async scrolling there, because such content needs painting |
| on each scroll). |
| |
| When style changes, we call FrameView::{add|remove}SlowRepaintObject(). That sets the "needsScrollingTreeUpdate" |
| compositing bit on the enclosing RenderLayer (note, any RenderLayer, not necessarily a scrolling one). |
| Setting that bit will ensure that RenderLayerCompositor does an "update backing and hierarchy" traversal, |
| and during this traversal, if we see a layer with the bit set, scrollingTreeState.needSynchronousScrollingReasonsUpdate |
| becomes true. At the end of the traversal this is used as a signal to call updateSynchronousScrollingNodes(). |
| |
| updateSynchronousScrollingNodes() needs to clear synchronousScrollingReasons on nodes that no longer need |
| to slow-scroll, and set it on those that do. To achieve this we use the set of slow-repaint renders from |
| FrameView, and the set of layers with scrolling nodes from RenderLayerCompositor, starting with the set of |
| all nodes, and pruning those known to be slow. synchronousScrollingReasons are cleared on the remainder. |
| |
| Tests: scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow-dynamic.html |
| scrollingcoordinator/mac/fixed-backgrounds/fixed-background-in-overflow.html |
| scrollingcoordinator/mac/fixed-backgrounds/fixed-background-on-overflow.html |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::addSlowRepaintObject): |
| (WebCore::FrameView::removeSlowRepaintObject): |
| * page/FrameView.h: |
| * page/scrolling/AsyncScrollingCoordinator.cpp: |
| (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::updateCompositingLayers): |
| (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): |
| (WebCore::RenderLayerCompositor::updateSynchronousScrollingNodes): |
| * rendering/RenderLayerCompositor.h: |
| |
| 2020-04-15 Andres Gonzalez <andresg_22@apple.com> |
| |
| Add logging to core accessibility. |
| https://bugs.webkit.org/show_bug.cgi?id=210564 |
| |
| Reviewed by Chris Fleizach. |
| |
| Added AXLogger class and AXTRACE macro. Used them in AXIsolatedTree. |
| |
| * Headers.cmake: |
| * Sources.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * accessibility/AXLogger.cpp: Added. |
| (WebCore::AXLogger::AXLogger): |
| (WebCore::AXLogger::~AXLogger): |
| * accessibility/AXLogger.h: Added. |
| * accessibility/isolatedtree/AXIsolatedTree.cpp: |
| (WebCore::AXIsolatedTree::AXIsolatedTree): |
| (WebCore::AXIsolatedTree::~AXIsolatedTree): |
| (WebCore::AXIsolatedTree::create): |
| (WebCore::AXIsolatedTree::nodeInTreeForID): |
| (WebCore::AXIsolatedTree::treeForID): |
| (WebCore::AXIsolatedTree::createTreeForPageID): |
| (WebCore::AXIsolatedTree::removeTreeForPageID): |
| (WebCore::AXIsolatedTree::treeForPageID): |
| (WebCore::AXIsolatedTree::nodeForID const): |
| (WebCore::AXIsolatedTree::objectsForIDs const): |
| (WebCore::AXIsolatedTree::generateSubtree): |
| (WebCore::AXIsolatedTree::createSubtree): |
| (WebCore::AXIsolatedTree::updateNode): |
| (WebCore::AXIsolatedTree::updateSubtree): |
| (WebCore::AXIsolatedTree::updateChildren): |
| (WebCore::AXIsolatedTree::focusedUIElement): |
| (WebCore::AXIsolatedTree::rootNode): |
| (WebCore::AXIsolatedTree::setRootNode): |
| (WebCore::AXIsolatedTree::setFocusedNode): |
| (WebCore::AXIsolatedTree::setFocusedNodeID): |
| (WebCore::AXIsolatedTree::removeNode): |
| (WebCore::AXIsolatedTree::removeSubtree): |
| (WebCore::AXIsolatedTree::appendNodeChanges): |
| (WebCore::AXIsolatedTree::applyPendingChanges): |
| * platform/Logging.h: |
| |
| 2020-04-15 Simon Fraser <simon.fraser@apple.com> |
| |
| Lay the groundwork for SynchronousScrollingReason on overflow nodes |
| https://bugs.webkit.org/show_bug.cgi?id=210565 |
| |
| Reviewed by Tim Horton. |
| |
| Make setSynchronousScrollingReasons() public on ScrollingCoordinator because we're going |
| to be calling it for overflow scrolling nodes. |
| |
| Call ScrollingCoordinator::slowRepaintObjectsDidChange() not just when we go between |
| none some some slow-repaint objects, but whenever the set changes. slowRepaintObjectsDidChange() |
| is lightweight. |
| |
| Minor cleanup in FrameView to avoid testing Page* nullness every time. |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::prepareForDetach): |
| (WebCore::FrameView::isScrollSnapInProgress const): |
| (WebCore::FrameView::usesAsyncScrolling const): |
| (WebCore::FrameView::addSlowRepaintObject): |
| (WebCore::FrameView::removeSlowRepaintObject): |
| (WebCore::FrameView::addViewportConstrainedObject): |
| (WebCore::FrameView::removeViewportConstrainedObject): |
| (WebCore::FrameView::scrollingCoordinator const): |
| (WebCore::FrameView::shouldUpdateCompositingLayersAfterScrolling const): |
| (WebCore::FrameView::isRubberBandInProgress const): |
| (WebCore::FrameView::requestScrollPositionUpdate): |
| (WebCore::FrameView::layoutOrVisualViewportChanged): |
| (WebCore::FrameView::performPostLayoutTasks): |
| (WebCore::FrameView::scrollableAreaSetChanged): |
| (WebCore::FrameView::wheelEvent): |
| (WebCore::FrameView::setScrollPinningBehavior): |
| * page/FrameView.h: |
| * page/scrolling/ScrollingCoordinator.cpp: |
| (WebCore::ScrollingCoordinator::slowRepaintObjectsDidChange): |
| (WebCore::ScrollingCoordinator::synchronousScrollingReasonsForFrameView const): |
| (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons): |
| (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously const): |
| (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText const): |
| (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange): Deleted. |
| (WebCore::ScrollingCoordinator::synchronousScrollingReasons const): Deleted. |
| * page/scrolling/ScrollingCoordinator.h: |
| (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons): |
| * rendering/RenderLayerCompositor.cpp: |
| (WebCore::RenderLayerCompositor::updateBacking): |
| |
| 2020-04-15 Jack Lee <shihchieh_lee@apple.com> |
| |
| ASSERTION FAILED: !selectionToDelete.isNone() in TypingCommand::forwardDeleteKeyPressed |
| when deleting a UserSelect::None element. |
| https://bugs.webkit.org/show_bug.cgi?id=210530 |
| <rdar://problem/58591480> |
| |
| Reviewed by Geoffrey Garen. |
| |
| Quit forwardDeleteKeyPressed() if FrameSelection::modify() returns empty selection. |
| |
| Test: editing/deleting/forward-delete-UserSelect-None-element.html |
| |
| * editing/TypingCommand.cpp: |
| (WebCore::TypingCommand::forwardDeleteKeyPressed): |
| |
| 2020-04-15 Peng Liu <peng.liu6@apple.com> |
| |
| Video elements don't return to the correct position when exiting fullscreen |
| https://bugs.webkit.org/show_bug.cgi?id=210529 |
| |
| Reviewed by Jer Noble. |
| |
| Add WEBCORE_EXPORT to the function setNeedsDOMWindowResizeEvent(). |
| |
| * dom/Document.h: |
| |
| 2020-04-15 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iPadOS] Some pages indefinitely zoom in and out due to idempotent text autosizing |
| https://bugs.webkit.org/show_bug.cgi?id=210551 |
| <rdar://problem/56820674> |
| |
| Reviewed by Tim Horton. |
| |
| Rename m_initialScale and initialScale() on Page to m_initialScaleIgnoringContentSize and |
| initialScaleIgnoringContentSize(), respectively. See WebKit/ChangeLog for more details. |
| |
| Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-reaches-stable-state.html |
| |
| * page/Page.cpp: |
| (WebCore::Page::setInitialScaleIgnoringContentSize): |
| (WebCore::Page::setInitialScale): Deleted. |
| * page/Page.h: |
| (WebCore::Page::initialScaleIgnoringContentSize const): |
| (WebCore::Page::initialScale const): Deleted. |
| * style/StyleAdjuster.cpp: |
| (WebCore::Style::Adjuster::adjustmentForTextAutosizing): |
| |
| 2020-04-15 Chris Dumez <cdumez@apple.com> |
| |
| REGRESSION (r258977): Crash under Document::visibilityStateChanged |
| https://bugs.webkit.org/show_bug.cgi?id=210555 |
| |
| Reviewed by Youenn Fablet. |
| |
| Re-introduce null check of page in Document::visibilityStateChanged() which got inadvertently |
| dropped in r258977. |
| |
| * dom/Document.cpp: |
| (WebCore::Document::visibilityStateChanged): |
| |
| 2020-04-15 Zalan Bujtas <zalan@apple.com> |
| |
| REGRESSION( r260114): [ Mac and iOS ] imported/w3c/web-platform-tests/web-animations/timing-model/timelines/document-timelines.html is failing. |
| https://bugs.webkit.org/show_bug.cgi?id=210549 |
| <rdar://problem/61828495> |
| |
| Unreviewed. |
| |
| Partial revert of r260114. See webkit.org/b/210559 for details. |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): |
| |
| 2020-04-15 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Add support for `pseudoElement` on `KeyframeEffect` and `KeyframeEffectOptions` |
| https://bugs.webkit.org/show_bug.cgi?id=207290 |
| <rdar://problem/59199003> |
| |
| Reviewed by Antti Koivisto. |
| |
| We add the required IDL bindings such that JS-originated Web Animations can target pseudo-elements, either via the KeyframeEffect.pseudoElement |
| property, or via the KeyframeEffectOptions.pseudoElement property, which is set on the object passed to the KeyframeEffect constrcutor and |
| Element.animate(). |
| |
| This means that a PseudoElement can be targeted by an animation even if it's not been created through style resolution by virtue of a ::before |
| or ::after selector and a "content" style rule. This means that when either the "target" or "pseudoElement" property of KeyframeEffect is set, |
| we ensure a PseudoElement is created and set on the host element if required. And additionally, we ensure that during style resolution, animations |
| are applied to such pseudo-elements with a new PseudoElement::isTargetedByKeyframeEffectRequiringPseudoElement() method that indicates that a |
| JS-originated KeyframeEffect targets this pseudo-element. |
| |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::create): Handle the new KeyframeEffectOptions.pseudoElement property in the KeyframeEffect constructor. |
| (WebCore::KeyframeEffect::targetsPseudoElement const): Indicates whether this effect targets a pseudo-element and not a regular |
| element or a null target. |
| (WebCore::KeyframeEffect::targetElementOrPseudoElement const): Use the new targetsPseudoElement() method to determine whether a |
| pseudo-element is targeted. We also remove an assertion that only made sense when m_pseudoId could only be set via a CSS-originated |
| animation and another one when the only possible m_pseudoId values were PseudoId::Before and PseudoId::After. |
| (WebCore::KeyframeEffect::setTarget): Call the new didChangeTargetElementOrPseudoElement() method if the provided value differs |
| from the stored value for m_target. |
| (WebCore::KeyframeEffect::pseudoElement const): Return the matching normalized string with a `::` prefix for m_pseudoId if the target |
| is a pseudo-element. Note that PseudoElement::pseudoElementNameForEvents() will only return a string for "::before" and "::after" since |
| we only know how to animate these pseudo-elements. |
| (WebCore::KeyframeEffect::setPseudoElement): Determine a matching PseudoId, if any, for the provided string, and call the new |
| didChangeTargetElementOrPseudoElement() method if the provided value differs from the stored value for m_pseudoId. |
| (WebCore::KeyframeEffect::didChangeTargetElementOrPseudoElement): New method called when either m_target or m_pseudoId is changed |
| such that we can ensure the required PseudoElement is created if the animation targets a pseudo-element. Then we run the same logic |
| that we used to in KeyframeEffect::setTarget(). |
| (WebCore::KeyframeEffect::requiresPseudoElement const): Indicates whether a PseudoElement must remain created for this KeyframeEffect, |
| which is only necessary for JS-originated effects targeting a pseudo-element. |
| * animation/KeyframeEffect.h: |
| * animation/KeyframeEffect.idl: |
| * animation/KeyframeEffectOptions.h: |
| * animation/KeyframeEffectOptions.idl: |
| * animation/KeyframeEffectStack.cpp: |
| (WebCore::KeyframeEffectStack::requiresPseudoElement const): Indicates whether one or more JS-originated keyframe effects in the stack target |
| the PseudoElement owning this stack. |
| * animation/KeyframeEffectStack.h: |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::commitStyles): Use KeyframeEffect::targetsPseudoElement() to determine whether the animation's effect's target is a |
| pseudo-element, in which case we need to throw a NoModificationAllowedError exception. |
| * dom/PseudoElement.cpp: |
| (WebCore::PseudoElement::rendererIsNeeded): Return true also when one or more JS-originated keyframe effects in the stack target this pseudo-element. |
| (WebCore::PseudoElement::isTargetedByKeyframeEffectRequiringPseudoElement): Return true when one or more JS-originated keyframe effects in the stack |
| target this pseudo-element. |
| * dom/PseudoElement.h: |
| * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp: |
| (WebCore::createContentRenderers): Remove the assertion that the "content" property was set since it's valid for this function to now be called |
| due to JS-originated keyframe effects targeting the given pseudo-element. Instead we add an assertion that there are such keyframe effects in |
| case no "content" property was set. |
| (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement): Only remove pseudo-elements if there are no JS-originated keyframe effects |
| targeting the specified pseudo-element. |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::resolvePseudoStyle): Allow animated style resolution for pseudo-elements targeted by JS-originated keyframe effects. |
| |
| 2020-04-15 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK4] Fix use of gtk init functions |
| https://bugs.webkit.org/show_bug.cgi?id=210550 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Add gtk_init and gtk_init_check receiving parameters to GtkVersioning. |
| |
| * PlatformGTK.cmake: |
| * platform/graphics/PlatformDisplay.cpp: |
| * platform/gtk/GtkVersioning.h: |
| (gtk_init): |
| (gtk_init_check): |
| |
| 2020-04-15 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| import.meta.url: baseURL for a module script should be response URL, not request URL |
| https://bugs.webkit.org/show_bug.cgi?id=205294 |
| |
| Reviewed by Youenn Fablet. |
| |
| The module should expose response URL as `import.meta.url` instead of request URL. |
| If redirection happens, this URL should be redirected one. |
| |
| * bindings/js/ScriptModuleLoader.cpp: |
| (WebCore::ScriptModuleLoader::resolve): |
| (WebCore::ScriptModuleLoader::responseURLFromRequestURL): |
| (WebCore::ScriptModuleLoader::createImportMetaProperties): |
| (WebCore::ScriptModuleLoader::notifyFinished): |
| * bindings/js/ScriptModuleLoader.h: |
| |
| 2020-04-15 Jer Noble <jer.noble@apple.com> |
| |
| isNullFunctionPointer() can fail for symbols not explicitly marked as weakly linked. |
| https://bugs.webkit.org/show_bug.cgi?id=210532 |
| |
| Reviewed by Tim Horton. |
| |
| Symbols whose declarations are explicitly marked as weakly imported are guaranteed to be |
| NULL when the library containing those symbols is not available at runtime, or when the |
| symbol itself isn't present in the version of the library which is available at runtime. For |
| symbols which are not explicitly marked as weakly imported (because, e.g., the framework |
| itself is weakly imported), this technique can fail. Rather than test the nullity of a |
| random static C++ class method with isNullFunctionPointer(), explicitly mark as weak_import |
| a utility method added by the WebKit project, which conveniently is already used from within |
| LibWebRTCProviderCocoa, and test the nullity of that method instead. |
| |
| * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.cpp: |
| (WebCore::LibWebRTCProvider::webRTCAvailable): |
| |
| 2020-04-15 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK] Make PlatformScreen::screenDPI() GTK4-ready |
| https://bugs.webkit.org/show_bug.cgi?id=210543 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| No new tests needed. |
| |
| This method is using deprecated and removed APIs |
| from GDK. Guard the removed API usage so that it's only |
| used in GTK3 and update to use the replacement APIs otherwise. |
| |
| Also, make it to also use the gtk-xft-dpi GtkSettings property. |
| This method is mostly used in response to a change in this |
| property, so ignoring its value doesn't seem a good idea. |
| |
| The following priority is used: |
| |
| 1. (GTK3 only) query gdk_screen_get_resolution(). |
| 2. Use the GtkSettings::gtk-xft-dpi property. |
| 3. Calculate the actual DPI from the monitor 0's properties. |
| 4. If none of these succeed, use the default DPI, 96. |
| |
| * platform/gtk/PlatformScreenGtk.cpp: |
| (WebCore::screenDPI): |
| |
| 2020-04-15 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Remove IconGtk |
| https://bugs.webkit.org/show_bug.cgi?id=210546 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| It's currently unused in GTK port since we never show an icon for file uploads. |
| |
| * SourcesGTK.txt: |
| * platform/graphics/Icon.cpp: |
| * platform/graphics/Icon.h: |
| * platform/graphics/gtk/IconGtk.cpp: Removed. |
| |
| 2020-04-15 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Provide an alternative to gtk_widget_{get,is}_toplevel() |
| https://bugs.webkit.org/show_bug.cgi?id=210463 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| Adapt utility functions to GTK4, and provide replacement implementations for the |
| gtk_widget_get_tolevel() and gtk_widget_is_toplevel() functions for GTK4 builds. |
| |
| No new tests needed. |
| |
| * platform/gtk/GtkUtilities.cpp: |
| (WebCore::gtkWindowGetOrigin): Added. |
| (WebCore::convertWidgetPointToScreenPoint): Move code used to find the window position |
| into a separate function, and use it to avoid the USE(GTK4) conditional here. |
| (WebCore::widgetIsOnscreenToplevelWindow): Adapt to make it work with GTK4. |
| * platform/gtk/GtkVersioning.h: Added. |
| (gtk_widget_is_toplevel): Alternative implementation for GTK4. |
| (gtk_widget_get_toplevel): Ditto. |
| (gtk_window_get_position): Ditto. |
| |
| 2020-04-15 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Adapt to cursor API changes |
| https://bugs.webkit.org/show_bug.cgi?id=210453 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * platform/gtk/CursorGtk.cpp: |
| (WebCore::fallbackCursor): Utility function which returns the "default" cursor for GTK4. |
| (WebCore::createNamedCursor): Adapt to the changes in the gdk_cursor_new_from_name(). |
| (WebCore::createCustomCursor): Create a GdkTexture directly when the given Cairo surface is |
| in one of the pixel formats supported by gdk_memory_texture_new(), otherwise convert first; |
| then create a GdkCursor from the GdkTexture. |
| |
| 2020-04-14 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow scroll] Backgrounds missing on gmail sometimes |
| https://bugs.webkit.org/show_bug.cgi?id=210506 |
| <rdar://problem/60523869> |
| |
| Reviewed by Zalan Bujtas. |
| |
| When painting the scrolled contents layers of accelerated overflow:scroll, RenderBlock::paint() |
| needs to not short-circuit when the dirty rect is outside a clipping rect, because accelerated |
| overflow involves overdraw for tiles outside the visible area. |
| |
| There were two code paths that made this mostly work: overflowRectForPaintRejection() tested for |
| usesCompositedScrolling(), and the #if PLATFORM(IOS_FAMILY) made it work on iOS. |
| |
| For content involving flexbox, overflowRectForPaintRejection() gave the wrong answer because |
| flex layout would sometimes clear m_overflow, even on an overflow:scroll element. |
| |
| So remove overflowRectForPaintRejection(), and instead revert to the simple visualOverflowRect(), |
| but first check a bit that's passed down from compositing code that indicates that |
| we're painting the contents of composited scroll |
| |
| Test: compositing/scrolling/async-overflow-scrolling/mac/overflow-in-flex-empty-tiles.html |
| |
| * rendering/PaintPhase.h: |
| * rendering/RenderBlock.cpp: |
| (WebCore::RenderBlock::paint): |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::overflowRectForPaintRejection const): Deleted. |
| * rendering/RenderBox.h: |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::paintLayerContents): |
| (WebCore::RenderLayer::paintForegroundForFragments): |
| |
| 2020-04-14 Zalan Bujtas <zalan@apple.com> |
| |
| Content expanding is broken on icourse163.org |
| https://bugs.webkit.org/show_bug.cgi?id=210510 |
| <rdar://problem/45951820> |
| |
| Reviewed by Simon Fraser. |
| |
| www.icourse163.org's animation code expects a decimal point in the rAF timestamp (millisecond resolution). |
| |
| * dom/ScriptedAnimationController.cpp: |
| (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks): |
| * page/Quirks.cpp: |
| (WebCore::Quirks::needsMillisecondResolutionForHighResTimeStamp const): |
| * page/Quirks.h: |
| |
| 2020-04-14 Peng Liu <peng.liu6@apple.com> |
| |
| Adopt interface AVAudioRoutingArbiter for Mac |
| https://bugs.webkit.org/show_bug.cgi?id=210167 |
| |
| Reviewed by Eric Carlson. |
| |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/audio/ios/AudioSessionIOS.mm: |
| (WebCore::AudioSession::setCategory): |
| (WebCore::categoryName): Deleted. |
| * platform/audio/mac/AudioSessionMac.mm: Renamed from Source/WebCore/platform/audio/mac/AudioSessionMac.cpp. |
| (WebCore::AudioSession::setCategory): |
| (WebCore::AudioSession::categoryOverride const): |
| (WebCore::AudioSession::setCategoryOverride): |
| |
| Fix unified build failures. |
| * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h: |
| |
| 2020-04-14 Youenn Fablet <youenn@apple.com> |
| |
| ReadableStreamDefaultController::enqueue should check for worker terminated exception |
| https://bugs.webkit.org/show_bug.cgi?id=210485 |
| |
| Reviewed by Mark Lam. |
| |
| Make sure to not assert in case of enqueue exception if we are in a terminating worker. |
| This is covered by WPT fetch/api/basic/stream-response.any.worker.html and fetch/api/basic/stream-safe-creation.any.worker.html. |
| |
| * bindings/js/ReadableStreamDefaultController.h: |
| (WebCore::ReadableStreamDefaultController::enqueue): |
| |
| 2020-04-14 Youenn Fablet <youenn@apple.com> |
| |
| Protect MediaStreamTrackPrivate and RealtimeMediaSource when iterating its observers |
| https://bugs.webkit.org/show_bug.cgi?id=210488 |
| |
| Reviewed by Eric Carlson. |
| |
| Making sure explicitly that the track private and source remain alive while looping from its observers. |
| |
| * platform/mediastream/MediaStreamTrackPrivate.cpp: |
| (WebCore::MediaStreamTrackPrivate::forEachObserver const): |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::forEachObserver const): |
| |
| 2020-04-14 James Craig <jcraig@apple.com> |
| |
| AX: Smart Invert doesn't handle the picture elements on foxnews.com |
| <https://webkit.org/b/210472> |
| |
| Reviewed by Chris Fleizach. |
| |
| Tests: accessibilty/smart-invert.html |
| accessibilty/smart-invert-reference.html |
| |
| Filled out more variants in the test cases, and removed the unnecessary :not() selector. |
| |
| * css/html.css: |
| (@media (inverted-colors) img, picture, video): |
| (@media (inverted-colors) img:not(picture>img), picture, video): Deleted. |
| |
| 2020-04-14 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [iPadOS] Wikipedia articles lay out incorrectly in 1/3 multitasking window |
| https://bugs.webkit.org/show_bug.cgi?id=210501 |
| <rdar://problem/54856323> |
| |
| Reviewed by Tim Horton. |
| |
| In a 1/3 multitasking window, Safari currently uses the `-[WKWebView _allowsViewportShrinkToFit]` SPI to force |
| pages to shrink down by fitting the content width to the view width. This legacy method of shrinking to fit |
| involves laying the page out at the normal view width (320px in 1/3 multitasking), and then scaling the page |
| down such that any amount of horizontal overflow fits within the view. |
| |
| In iOS 13, a new style of shrinking to fit was introduced in support of two new features: page zoom controls |
| (accessible via the page formatting menu), and on-by-default page scaling when loading desktop sites on certain |
| models of iPad where the page width is less than cutoffs of 1112px (in landscape) and 1024px (in portrait). This |
| new method of shrinking to fit involves laying out at a larger width (computed from a combination of the minimum |
| effective device width and layout size scale factor), and scaling to fit the effective layout size scale factor |
| instead of the entire contents of the page. This means that while we may still get horizontal scrolling after |
| shrinking to fit, the overall layout of the page is preserved. |
| |
| Currently, in 1/3 multitasking, Safari still relies on the former to scale pages down to fit, which means that |
| Wikipedia articles (among other websites) do not lay out sensibly. Moreover, even if Safari adopted the second |
| mechanism for shrinking to fit, layout issues would still exist (albeit to a lesser degree), since we'd still |
| attempt to shrink the content width down to fit due to the fact that the desktop version of Wikipedia doesn't |
| have a meta viewport. While we wouldn't get a broken layout, we'd still have a blank column running down the |
| right side of the page, which is less than ideal. |
| |
| It's clear that in this case, attempting to shrink page content down to fit the view is suboptimal (at best, it |
| leads to a large portion of the page being blank; at worst, it completely breaks page layout). To address this |
| bug for now, add a parallel minimumEffectiveDeviceWidth value that takes effect when ignoring scaling |
| constraints (i.e. when we're in a multitasking window), and scale the page down to fit this value instead of |
| fitting the full content width when computing initial scale in `ViewportConfiguration::initialScaleFromSize`. |
| Maintaining this value separately from m_minimumEffectiveDeviceWidth makes it much easier to ensure that the |
| effects of this change are only ever active when the quirk is applied, and also when the view is embedded in a |
| multitasking window. |
| |
| * page/Quirks.cpp: |
| (WebCore::Quirks::shouldLayOutAtMinimumWindowWidthWhenIgnoringScalingConstraints const): |
| |
| Introduce a quirk to fix layout issues in multitasking mode on the desktop version of Wikipedia. |
| |
| * page/Quirks.h: |
| * page/ViewportConfiguration.cpp: |
| (WebCore::ViewportConfiguration::initialScaleFromSize const): |
| (WebCore::ViewportConfiguration::setMinimumEffectiveDeviceWidth): |
| (WebCore::ViewportConfiguration::setMinimumEffectiveDeviceWidthWhenIgnoringScalingConstraints): |
| * page/ViewportConfiguration.h: |
| |
| Add a minimum effective device width value that only takes effect when ignoring scaling constraints, and update |
| `shouldIgnoreMinimumEffectiveDeviceWidth()` and `minimumEffectiveDeviceWidth()` to not always return `true` and |
| `0` (respectively) when ignoring scaling constraints, if m_minimumEffectiveDeviceWidthWhenIgnoringScalingConstraints |
| is set. |
| |
| (WebCore::ViewportConfiguration::minimumEffectiveDeviceWidth const): |
| (WebCore::ViewportConfiguration::shouldIgnoreMinimumEffectiveDeviceWidth const): |
| (WebCore::ViewportConfiguration::shouldShrinkToFitMinimumEffectiveDeviceWidthWhenIgnoringScalingConstraints const): |
| |
| 2020-04-14 Antoine Quint <graouts@apple.com> |
| |
| Factor PseudoElement creation calls into a single Element::ensurePseudoElement(pseudoId) method |
| https://bugs.webkit.org/show_bug.cgi?id=210495 |
| |
| Reviewed by Antti Koivisto. |
| |
| To support webkit.org/b/207290 we need a way to ensure a PseudoElement is available for ::before and ::after |
| pseudo-elements on a given Element. We now use a Element::ensurePseudoElement(pseudoId) method to do this and |
| replace existing places where we would do something similar. |
| |
| * dom/Element.cpp: |
| (WebCore::Element::ensurePseudoElement): |
| * dom/Element.h: |
| * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp: |
| (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement): |
| * style/StyleTreeResolver.cpp: |
| (WebCore::Style::TreeResolver::resolvePseudoStyle): |
| |
| 2020-04-14 Simon Fraser <simon.fraser@apple.com> |
| |
| Scroll snap in subframes is often broken |
| https://bugs.webkit.org/show_bug.cgi?id=210503 |
| |
| Reviewed by Darin Adler. |
| |
| RenderBox::findEnclosingScrollableContainer() incorrectly consulted the scrollability |
| of the main frame, causing snapping in subframes to be broken any time the main frame |
| was not scrollable. |
| |
| Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-async-iframe.html |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::findEnclosingScrollableContainer const): |
| |
| 2020-04-14 Andres Gonzalez <andresg_22@apple.com> |
| |
| Make WTR::AccessibilityUIElements calls to accessibilitySetValue run on AX secondary thread. web content |
| https://bugs.webkit.org/show_bug.cgi?id=210500 |
| |
| Reviewed by Chris Fleizach. |
| |
| Removed _accessibilitySetTestValue since it is no longer used, use |
| _accessibilitySetValue instead. |
| |
| * accessibility/mac/WebAccessibilityObjectWrapperMac.mm: |
| (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]): Deleted. |
| |
| 2020-04-14 David Kilzer <ddkilzer@apple.com> |
| |
| Add WARN_UNUSED_RETURN to decode methods in Source/WebCore |
| <https://webkit.org/b/210416> |
| <rdar://problem/61693462> |
| |
| Reviewed by Alex Christensen. |
| |
| * Modules/geolocation/GeolocationPositionData.h: |
| * Modules/indexeddb/IDBGetAllResult.h: |
| * Modules/indexeddb/IDBGetResult.h: |
| * Modules/indexeddb/IDBKeyData.h: |
| * Modules/indexeddb/IDBKeyRangeData.h: |
| * Modules/indexeddb/server/IDBSerialization.cpp: |
| (WebCore::decodeKey): |
| * Modules/indexeddb/shared/IDBCursorInfo.h: |
| * Modules/indexeddb/shared/IDBCursorRecord.h: |
| * Modules/indexeddb/shared/IDBDatabaseInfo.h: |
| * Modules/indexeddb/shared/IDBError.h: |
| * Modules/indexeddb/shared/IDBGetAllRecordsData.h: |
| * Modules/indexeddb/shared/IDBGetRecordData.h: |
| * Modules/indexeddb/shared/IDBIndexInfo.h: |
| * Modules/indexeddb/shared/IDBIterateCursorData.h: |
| * Modules/indexeddb/shared/IDBObjectStoreInfo.h: |
| * Modules/indexeddb/shared/IDBRequestData.h: |
| * Modules/indexeddb/shared/IDBResourceIdentifier.h: |
| * Modules/indexeddb/shared/IDBTransactionInfo.h: |
| * Modules/mediasource/SourceBuffer.cpp: |
| (WebCore::decodeTimeComparator): |
| * dom/EventInit.h: |
| * dom/ExceptionData.h: |
| * dom/SecurityPolicyViolationEvent.h: |
| * editing/FontAttributeChanges.h: |
| * editing/FontShadow.h: |
| * loader/CanvasActivityRecord.h: |
| * loader/FetchOptions.h: |
| (WebCore::FetchOptions::decodePersistent): |
| * platform/ContentFilterUnblockHandler.h: |
| * platform/DragItem.h: |
| * platform/KeyedCoding.h: |
| * platform/LinkIcon.h: |
| * platform/ThreadSafeDataBuffer.h: |
| * platform/audio/mac/CAAudioStreamDescription.h: |
| * platform/cf/KeyedDecoderCF.h: |
| * platform/generic/KeyedDecoderGeneric.h: |
| * platform/glib/KeyedDecoderGlib.h: |
| * platform/graphics/Region.h: |
| * platform/graphics/RemoteVideoSample.h: |
| (WebCore::RemoteVideoSample::decode): |
| * platform/mediastream/MediaConstraints.h: |
| (WebCore::MediaConstraint::decode): |
| (WebCore::NumericConstraint::decode): |
| (WebCore::StringConstraint::decode): |
| * platform/mediastream/RealtimeMediaSourceCapabilities.h: |
| * platform/mediastream/RealtimeMediaSourceSettings.h: |
| * platform/mediastream/RealtimeMediaSourceSupportedConstraints.h: |
| * platform/network/HTTPHeaderMap.h: |
| * platform/network/NetworkLoadMetrics.h: |
| * platform/network/ResourceRequestBase.h: |
| * platform/network/ResourceResponseBase.h: |
| (WebCore::ResourceResponseBase::decode): |
| * platform/network/SameSiteInfo.h: |
| * platform/network/SocketStreamError.h: |
| * platform/network/curl/ResourceRequest.h: |
| * platform/network/soup/ResourceRequest.h: |
| * platform/network/soup/ResourceResponse.h: |
| * rendering/EventRegion.h: |
| * workers/service/ServiceWorkerFetchResult.h: |
| - Add WARN_UNUSED_RETURN to all decode functions. |
| |
| 2020-04-14 Antoine Quint <graouts@apple.com> |
| |
| [Web Animations] Store an Element / PseudoId pair to define the KeyframeEffect target |
| https://bugs.webkit.org/show_bug.cgi?id=210491 |
| |
| Reviewed by Antti Koivisto. |
| |
| In preparation for webkit.org/b/207290 where we will expose the `pseudoElement` JS API on KeyframeEffect we now |
| use an Element / PseudoId (m_target / m_pseudoId) pair to specify an effect's target. In the cases where it matters, |
| such as accessing the various animation collections exposed through Element and the KeyframeEffectStack, we now use |
| the new KeyframeEffect::targetElementOrPseudoElement() method to access the Element or PseudoElement targeted with |
| the Element / PseudoId pair. |
| |
| * animation/AnimationTimeline.cpp: |
| (WebCore::AnimationTimeline::removeAnimation): |
| * animation/DeclarativeAnimation.cpp: |
| (WebCore::DeclarativeAnimation::initialize): |
| * animation/DocumentTimeline.cpp: |
| (WebCore::DocumentTimeline::transitionDidComplete): |
| (WebCore::DocumentTimeline::animationAcceleratedRunningStateDidChange): |
| * animation/KeyframeEffect.cpp: |
| (WebCore::KeyframeEffect::create): |
| (WebCore::KeyframeEffect::KeyframeEffect): |
| (WebCore::KeyframeEffect::copyPropertiesFromSource): |
| (WebCore::KeyframeEffect::getKeyframes): |
| (WebCore::KeyframeEffect::forceLayoutIfNeeded): |
| (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes): |
| (WebCore::KeyframeEffect::computeCSSTransitionBlendingKeyframes): |
| (WebCore::KeyframeEffect::animationTimelineDidChange): |
| (WebCore::KeyframeEffect::updateEffectStackMembership): |
| (WebCore::KeyframeEffect::targetElementOrPseudoElement const): |
| (WebCore::KeyframeEffect::setTarget): |
| (WebCore::KeyframeEffect::apply): |
| (WebCore::KeyframeEffect::invalidate): |
| (WebCore::KeyframeEffect::getAnimatedStyle): |
| (WebCore::KeyframeEffect::applyPendingAcceleratedActions): |
| (WebCore::KeyframeEffect::document const): |
| (WebCore::KeyframeEffect::renderer const): |
| * animation/KeyframeEffect.h: |
| * animation/KeyframeEffectStack.cpp: |
| (WebCore::KeyframeEffectStack::addEffect): |
| * animation/WebAnimation.cpp: |
| (WebCore::WebAnimation::setEffectInternal): |
| (WebCore::WebAnimation::setTimeline): |
| (WebCore::WebAnimation::persist): |
| * dom/Document.cpp: |
| (WebCore::Document::matchingAnimations): |
| * inspector/agents/InspectorAnimationAgent.cpp: |
| (WebCore::buildObjectForKeyframes): |
| (WebCore::InspectorAnimationAgent::requestEffectTarget): |
| |
| 2020-04-14 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow scroll] Custom scrollbars on gmail don't show |
| https://bugs.webkit.org/show_bug.cgi?id=210438 |
| <rdar://problem/61722541> |
| |
| Reviewed by Tim Horton. |
| |
| Custom scrollbars painted into the backing store of the scrolling element, but that |
| might have become an empty "simple container layer" causing the scroll bars to not |
| be painted anywhere. |
| |
| Fix by making compositing layers for custom scrollbars. This is better than giving |
| backing store to the scroller's element, because that might be huge. |
| |
| Test: scrollbars/async-overflow-custom-scrollbar.html |
| |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::requiresLayerForScrollbar const): |
| (WebCore::RenderLayerBacking::requiresHorizontalScrollbarLayer const): |
| (WebCore::RenderLayerBacking::requiresVerticalScrollbarLayer const): |
| (WebCore::RenderLayerBacking::requiresScrollCornerLayer const): |
| * rendering/RenderLayerBacking.h: |
| |
| 2020-04-14 Claudio Saavedra <csaavedra@igalia.com> |
| |
| [GTK] Adapt to GdkVisual deprecation and removal |
| https://bugs.webkit.org/show_bug.cgi?id=210489 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| No new tests needed. |
| |
| Update the GdkVisual used to get the screen depth per component in |
| GTK3 and use default values for GTK4, as visuals as an abstraction |
| are gone from GTK4. The use in WK is very limited so there's no |
| much gain from peeking into backend-specific values. |
| |
| * platform/gtk/PlatformScreenGtk.cpp: |
| (WebCore::screenDepth): Guard GdkVisual call and leave |
| default value for GTK4. |
| (WebCore::screenDepthPerComponent): Update API and ditto. |
| |
| 2020-04-14 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK][WPE] Scrollbar handle has no minimum size |
| https://bugs.webkit.org/show_bug.cgi?id=209962 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Set a minimum thumb length. |
| |
| * platform/adwaita/ScrollbarThemeAdwaita.cpp: |
| (WebCore::ScrollbarThemeAdwaita::minimumThumbLength): |
| |
| 2020-04-14 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] New scrollbar click behavior |
| https://bugs.webkit.org/show_bug.cgi?id=210002 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| Use the same bahavior for mouse events when not rendering native scrollbars. |
| |
| * platform/gtk/ScrollbarThemeGtk.cpp: |
| (WebCore::ScrollbarThemeGtk::handleMousePressEvent): |
| |
| 2020-04-14 Antti Koivisto <antti@apple.com> |
| |
| [CSS Selectors] Selectors Level 4 specificity calculation for pseudo classes |
| https://bugs.webkit.org/show_bug.cgi?id=210419 |
| |
| Reviewed by Simon Fraser. |
| |
| CSS selector specification drafts at some point had a concept of "dynamic specificity" where |
| the specificity of a selector depended on the element it matched. It was only ever used with |
| :matches and :nth-child pseudo classes and has subsequently been removed. Selector specificity |
| can now always be computed statically. |
| |
| There is a ton of code to support this obsolete feature. Remove it. |
| |
| https://drafts.csswg.org/selectors-4/#specificity-rules |
| |
| "The specificity of an :is(), :not(), or :has() pseudo-class is replaced by the specificity |
| of the most specific complex selector in its selector list argument. |
| |
| Analogously, the specificity of an :nth-child() or :nth-last-child() selector is the specificity |
| of the pseudo class itself (counting as one pseudo-class selector) plus the specificity of the |
| most specific complex selector in its selector list argument (if any)." |
| |
| * css/html.css: |
| |
| Reorganize a :matches rule into a selector list to keep the exact specificites. |
| It matters here to select between listbox and menulist correctly based on the 'size' and 'multiple' attributes. |
| |
| * css/CSSSelector.cpp: |
| (WebCore::selectorSpecificity): |
| (WebCore::maxSpecificity): |
| (WebCore::simpleSelectorSpecificityInternal): |
| (WebCore::CSSSelector::simpleSelectorSpecificity const): |
| |
| Also handle nth here. |
| |
| (WebCore::CSSSelector::specificity const): |
| (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity): Deleted. |
| (WebCore::functionalPseudoClassStaticSpecificity): Deleted. |
| (WebCore::staticSpecificityInternal): Deleted. |
| (WebCore::CSSSelector::staticSpecificity const): Deleted. |
| |
| Rename to just computeSpecificity(), there is no other kind than static. |
| |
| * css/CSSSelector.h: |
| * css/SelectorChecker.cpp: |
| (WebCore::SelectorChecker::match const): |
| (WebCore::SelectorChecker::matchHostPseudoClass const): |
| (WebCore::SelectorChecker::matchRecursively const): |
| (WebCore::SelectorChecker::checkOne const): |
| (WebCore::SelectorChecker::matchSelectorList const): |
| |
| SelectorChecker doesn't need to deal with specificity anymore. |
| |
| * css/SelectorChecker.h: |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::addNthChildType): |
| (WebCore::SelectorCompiler::addPseudoClassType): |
| (WebCore::SelectorCompiler::constructFragmentsInternal): |
| (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker): |
| (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching): |
| |
| Neither does SelectorCompiler. |
| |
| * cssjit/SelectorCompiler.h: |
| * dom/SelectorQuery.cpp: |
| (WebCore::SelectorDataList::selectorMatches const): |
| (WebCore::SelectorDataList::selectorClosest const): |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::buildObjectForSelectorHelper): |
| (WebCore::selectorsFromSource): |
| (WebCore::InspectorStyleSheet::buildObjectForSelector): |
| (WebCore::InspectorStyleSheet::buildObjectForSelectorList): |
| (WebCore::InspectorStyleSheet::buildObjectForRule): |
| (WebCore::InspectorStyleSheet::buildArrayForRuleList): |
| (WebCore::hasDynamicSpecificity): Deleted. |
| * inspector/InspectorStyleSheet.h: |
| * inspector/agents/InspectorCSSAgent.cpp: |
| (WebCore::InspectorCSSAgent::setRuleSelector): |
| (WebCore::InspectorCSSAgent::addRule): |
| (WebCore::InspectorCSSAgent::buildObjectForRule): |
| (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): |
| * inspector/agents/InspectorDOMAgent.cpp: |
| (WebCore::InspectorDOMAgent::highlightSelector): |
| * style/ElementRuleCollector.cpp: |
| (WebCore::Style::ElementRuleCollector::ruleMatches): |
| |
| Switch to get the specificity from the selector instead of computing it during selector checking. |
| |
| * style/ElementRuleCollector.h: |
| |
| 2020-04-14 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GLIB] Fix race condition in FileMonitor implementation |
| https://bugs.webkit.org/show_bug.cgi?id=210483 |
| |
| Reviewed by Adrian Perez de Castro. |
| |
| This is causing flaky timeouts when running resource load statistics layout tests. The problem is that we assume |
| FileMonitor has the last reference of the platform monitor and it's deleted on g_object_unref(), but GLib keeps |
| another reference that is released later on a different thread if the monitor is still active. We just need to |
| ensure we cancel the monitor before calling g_object_unref(). |
| |
| * platform/FileMonitor.h: |
| * platform/glib/FileMonitorGLib.cpp: |
| (WebCore::FileMonitor::~FileMonitor): |
| (WebCore::FileMonitor::didChange): |
| (WebCore::FileMonitor::cancel): |
| |
| 2020-04-14 Charlie Turner <cturner@igalia.com> |
| |
| [EME][CDMProxy] Fix waitingForKey logic |
| https://bugs.webkit.org/show_bug.cgi?id=210437 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| startedWaitingForKey() was incorrectly flagged. It needs to signal on |
| the 0->1 transition, here it was only signalling on N->N+1 where N>0. |
| |
| Also break ASSERTs into separate statements, it makes it easier in a |
| crash dump to see which conjuct fired. |
| |
| Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https.html |
| |
| * platform/encryptedmedia/CDMProxy.cpp: |
| (WebCore::CDMInstanceProxy::startedWaitingForKey): |
| (WebCore::CDMInstanceProxy::stoppedWaitingForKey): |
| |
| 2020-04-14 Carlos Garcia Campos <cgarcia@igalia.com> |
| |
| [GTK] Bring back support for rendering scrollbars using the system appearance |
| https://bugs.webkit.org/show_bug.cgi?id=209805 |
| |
| Reviewed by Michael Catanzaro. |
| |
| Bring back ScrollbarThemeGtk, RenderThemeGadget and RenderThemeWidget (renamed as RenderThemeScrollbar), |
| including only the code needed to render the scrollbars. ScrollbarThemeGtk inherits from ScrollbarThemeAdwaita |
| that is used when system appearance is disabled. |
| |
| * PlatformGTK.cmake: |
| * SourcesGTK.txt: |
| * platform/adwaita/ScrollbarThemeAdwaita.cpp: |
| * platform/adwaita/ScrollbarThemeAdwaita.h: |
| * platform/gtk/RenderThemeGadget.cpp: Added. |
| (WebCore::RenderThemeGadget::create): |
| (WebCore::createStyleContext): |
| (WebCore::appendElementToPath): |
| (WebCore::RenderThemeGadget::RenderThemeGadget): |
| (WebCore::RenderThemeGadget::marginBox const): |
| (WebCore::RenderThemeGadget::borderBox const): |
| (WebCore::RenderThemeGadget::paddingBox const): |
| (WebCore::RenderThemeGadget::contentsBox const): |
| (WebCore::RenderThemeGadget::color const): |
| (WebCore::RenderThemeGadget::backgroundColor const): |
| (WebCore::RenderThemeGadget::opacity const): |
| (WebCore::RenderThemeGadget::state const): |
| (WebCore::RenderThemeGadget::setState): |
| (WebCore::RenderThemeGadget::minimumSize const): |
| (WebCore::RenderThemeGadget::preferredSize const): |
| (WebCore::RenderThemeGadget::render): |
| (WebCore::RenderThemeBoxGadget::RenderThemeBoxGadget): |
| (WebCore::RenderThemeBoxGadget::preferredSize const): |
| (WebCore::RenderThemeScrollbarGadget::RenderThemeScrollbarGadget): |
| (WebCore::RenderThemeScrollbarGadget::renderStepper): |
| * platform/gtk/RenderThemeGadget.h: Added. |
| (WebCore::RenderThemeGadget::context const): |
| * platform/gtk/RenderThemeScrollbar.cpp: Added. |
| (WebCore::widgetMap): |
| (WebCore::RenderThemeScrollbar::getOrCreate): |
| (WebCore::RenderThemeScrollbar::clearCache): |
| (WebCore::RenderThemeScrollbar::RenderThemeScrollbar): |
| (WebCore::RenderThemeScrollbar::stepper): |
| * platform/gtk/RenderThemeScrollbar.h: Added. |
| (WebCore::RenderThemeScrollbar::scrollbar const): |
| (WebCore::RenderThemeScrollbar::contents const): |
| (WebCore::RenderThemeScrollbar::slider const): |
| (WebCore::RenderThemeScrollbar::trough const): |
| * platform/gtk/ScrollbarThemeGtk.cpp: Added. |
| (WebCore::ScrollbarTheme::nativeTheme): |
| (WebCore::themeChangedCallback): |
| (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): |
| (WebCore::ScrollbarThemeGtk::setUseSystemAppearance): |
| (WebCore::ScrollbarThemeGtk::themeChanged): |
| (WebCore::ScrollbarThemeGtk::updateThemeProperties): |
| (WebCore::ScrollbarThemeGtk::hasButtons): |
| (WebCore::scrollbarPartStateFlags): |
| (WebCore::widgetTypeForScrollbar): |
| (WebCore::contentsRectangle): |
| (WebCore::ScrollbarThemeGtk::trackRect): |
| (WebCore::ScrollbarThemeGtk::backButtonRect): |
| (WebCore::ScrollbarThemeGtk::forwardButtonRect): |
| (WebCore::ScrollbarThemeGtk::paint): |
| (WebCore::ScrollbarThemeGtk::handleMousePressEvent): |
| (WebCore::ScrollbarThemeGtk::scrollbarThickness): |
| (WebCore::ScrollbarThemeGtk::minimumThumbLength): |
| * platform/gtk/ScrollbarThemeGtk.h: Added. |
| |
| 2020-04-14 Youenn Fablet <youenn@apple.com> |
| |
| Add a timer to AVVideoCaptureSource to verify reception of frames |
| https://bugs.webkit.org/show_bug.cgi?id=210335 |
| |
| Reviewed by Eric Carlson. |
| |
| Count the number of frames being captured. |
| Add a timer repeating every 3 seconds. |
| Timer starts/stops based on whether the session is running/is interrupted. |
| If the number of frames did not increase, fail the source. |
| Manually tested. |
| |
| * platform/mediastream/RealtimeMediaSource.cpp: |
| (WebCore::RealtimeMediaSource::captureFailed): |
| Explicitly call stop() instead of just setting m_isProducingData. |
| This ensures we release all resources and that we may not restart capturing after captureFailed(). |
| * platform/mediastream/mac/AVVideoCaptureSource.h: |
| * platform/mediastream/mac/AVVideoCaptureSource.mm: |
| (WebCore::AVVideoCaptureSource::AVVideoCaptureSource): |
| (WebCore::AVVideoCaptureSource::verifyIsCapturing): |
| (WebCore::AVVideoCaptureSource::updateVerifyCapturingTimer): |
| (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection): |
| (WebCore::AVVideoCaptureSource::captureSessionIsRunningDidChange): |
| |
| 2020-04-14 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260024. |
| https://bugs.webkit.org/show_bug.cgi?id=210480 |
| |
| Regressed performance due to loss of specificity caching |
| (Requested by anttik on #webkit). |
| |
| Reverted changeset: |
| |
| "[CSS Selectors] Selectors Level 4 specificity calculation for |
| pseudo classes" |
| https://bugs.webkit.org/show_bug.cgi?id=210419 |
| https://trac.webkit.org/changeset/260024 |
| |
| 2020-04-13 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260052. |
| https://bugs.webkit.org/show_bug.cgi?id=210479 |
| |
| Breaks iOS tests, needs more work (Requested by smfr on |
| #webkit). |
| |
| Reverted changeset: |
| |
| "Add ENABLE_CUSTOM_SCROLLBARS and define it for macOS and for |
| non-Cocoa platforms" |
| https://bugs.webkit.org/show_bug.cgi?id=210460 |
| https://trac.webkit.org/changeset/260052 |
| |
| 2020-04-13 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Use ThemeAdwaita instead of ThemeGtk |
| https://bugs.webkit.org/show_bug.cgi?id=210334 |
| |
| Reviewed by Carlos Garcia Campos. |
| |
| No new tests needed. |
| |
| * platform/adwaita/ThemeAdwaita.cpp: Build the Theme::singleton() factory also with USE(GTK4). |
| * platform/gtk/ThemeGtk.cpp: Conditionally build if !USE(GTK4). |
| (WebCore::ThemeGtk::ensurePlatformColors const): Add deprecation ignore guards. |
| * platform/gtk/ThemeGtk.h: Conditionally build if !USE(GTK4). |
| |
| 2020-04-13 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow] Get scroll-snap working with async overflow scrolling on macOS |
| https://bugs.webkit.org/show_bug.cgi?id=210471 |
| <rdar://problem/61643199> |
| |
| Reviewed by Wenson Hsieh. |
| |
| Obey the FIXME and move scroll-snap related code to the delegate so that it works for |
| both frame and overflow nodes. |
| |
| Tests: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-async-overflow-stateless.html |
| tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-async-overflow.html |
| |
| * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: |
| (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren): |
| (WebCore::convertToLayoutUnits): Deleted. |
| * page/scrolling/mac/ScrollingTreeScrollingNodeDelegateMac.mm: |
| (WebCore::convertToLayoutUnits): |
| (WebCore::ScrollingTreeScrollingNodeDelegateMac::updateFromStateNode): |
| |
| 2020-04-13 Zalan Bujtas <zalan@apple.com> |
| |
| Do not cache definite height against perpendicular flex items. |
| https://bugs.webkit.org/show_bug.cgi?id=207603 |
| <rdar://problem/59135373> |
| |
| Reviewed by Simon Fraser. |
| |
| RenderFlexibleBox::m_hasDefiniteHeight should not be set when the child we check against is a perpendicular item |
| because a perpendicular box's height is resolved against the containing block's width. |
| |
| Test: fast/flexbox/unresolved-height-percentage-crash.html |
| |
| * rendering/RenderFlexibleBox.cpp: |
| (WebCore::RenderFlexibleBox::computeInnerFlexBaseSizeForChild): |
| |
| 2020-04-13 David Kilzer <ddkilzer@apple.com> |
| |
| Replace use of Checked<size_t, RecordOverflow> with CheckedSize |
| <https://webkit.org/b/210461> |
| |
| Reviewed by Mark Lam. |
| |
| * platform/audio/ios/AudioFileReaderIOS.cpp: |
| (WebCore::createAudioBufferList): |
| * platform/graphics/ImageBufferBackend.cpp: |
| (WebCore::ImageBufferBackend::calculateBackendSize): |
| * platform/graphics/win/Direct2DUtilities.cpp: |
| (WebCore::Direct2D::createDirect2DImageSurfaceWithData): |
| * platform/graphics/win/ImageBufferDirect2DBackend.cpp: |
| (WebCore::ImageBufferDirect2DBackend::copyNativeImage const): |
| |
| 2020-04-13 Simon Fraser <simon.fraser@apple.com> |
| |
| Add ENABLE_CUSTOM_SCROLLBARS and define it for macOS and for non-Cocoa platforms |
| https://bugs.webkit.org/show_bug.cgi?id=210460 |
| |
| Reviewed by Tim Horton. |
| |
| Wrap all custom scrollbar and custom scroll corner code in ENABLE(CUSTOM_SCROLLBARS). |
| |
| * page/FrameView.cpp: |
| (WebCore::FrameView::createScrollbar): |
| (WebCore::FrameView::updateScrollCorner): |
| * page/FrameView.h: |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::createScrollbar): |
| (WebCore::RenderLayer::calculateClipRects const): |
| * rendering/RenderLayer.h: |
| * rendering/RenderLayerCompositor.cpp: |
| * rendering/RenderListBox.cpp: |
| (WebCore::RenderListBox::createScrollbar): |
| * rendering/RenderMenuList.cpp: |
| (RenderMenuList::createScrollbar): |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::containingBlock const): |
| * rendering/RenderObject.h: |
| * rendering/RenderScrollbar.cpp: |
| * rendering/RenderScrollbar.h: |
| * rendering/RenderScrollbarPart.cpp: |
| * rendering/RenderScrollbarPart.h: |
| * rendering/RenderScrollbarTheme.cpp: |
| * rendering/RenderScrollbarTheme.h: |
| * rendering/RenderSearchField.cpp: |
| (WebCore::RenderSearchField::createScrollbar): |
| * rendering/RenderTextControlSingleLine.cpp: |
| * style/StyleResolver.cpp: |
| |
| 2020-04-13 Kenneth Russell <kbr@chromium.org> |
| |
| Clean up more resources during WebGLLayer teardown |
| https://bugs.webkit.org/show_bug.cgi?id=210222 |
| |
| Reviewed by Dean Jackson. |
| |
| Release OpenGL resources just before destruction of the underlying |
| OpenGL context. |
| |
| * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: |
| (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): |
| * platform/graphics/cocoa/WebGLLayer.h: |
| * platform/graphics/cocoa/WebGLLayer.mm: |
| (-[WebGLLayer releaseGLResources]): |
| (-[WebGLLayer dealloc]): Deleted. |
| |
| 2020-04-13 Noam Rosenthal <noam@webkit.org> |
| |
| Background images should figure into visually non empty heuristic |
| https://bugs.webkit.org/show_bug.cgi?id=208501 |
| |
| Reviewed by Simon Fraser. |
| |
| This makes the visually non-empty heuristic treat background images the same |
| as it treats regular images. This is in line with first contentful paint spec in paint timing: |
| https://w3c.github.io/paint-timing/. |
| |
| Note that the pixel count is computed based on the image size rather than the box size, as the box size might not be known at this time. |
| This is equivalent to the pixel reporting done for RenderImage. |
| |
| Border-images and masks are excluded, as per the spec. |
| |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderBox::imageChanged): |
| Call incrementVisuallyNonEmptyPixelCountIfNeeded for background images |
| |
| * rendering/RenderElement.cpp: |
| (WebCore::RenderElement::RenderElement): |
| * rendering/RenderBox.cpp: |
| (WebCore::RenderElement::incrementVisuallyNonEmptyPixelCountIfNeeded): |
| * rendering/RenderBox.h: |
| * rendering/RenderImage.cpp: |
| (WebCore::RenderImage::incrementVisuallyNonEmptyPixelCountIfNeeded): Deleted. |
| * rendering/RenderImage.h: |
| Moved incrementVisuallyNonEmptyPixelCountIfNeeded from RenderImage to RenderElement |
| |
| 2020-04-13 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| module's default cross-origin value should be "anonymous" |
| https://bugs.webkit.org/show_bug.cgi?id=210326 |
| |
| Reviewed by Sam Weinig. |
| |
| Tests: http/tests/security/cookie-module-import-propagate.html |
| http/tests/security/cookie-module-import.html |
| http/tests/security/cookie-module-propagate.html |
| http/tests/security/cookie-module.html |
| |
| The original spec was using "omit" crossorigin for modules when crossorigin is not set / empty. |
| However, the spec is changed to sending requests with "same-origin" credentials ("anonymous" crossorigin mode) |
| by default. We should follow it. |
| |
| * dom/ScriptElement.cpp: |
| (WebCore::ScriptElement::requestModuleScript): |
| * dom/ScriptElementCachedScriptFetcher.cpp: |
| (WebCore::ScriptElementCachedScriptFetcher::requestModuleScript const): |
| * dom/ScriptElementCachedScriptFetcher.h: |
| * html/parser/HTMLResourcePreloader.cpp: |
| (WebCore::PreloadRequest::resourceRequest): |
| * loader/cache/CachedScript.cpp: |
| (WebCore::CachedScript::script): While this is not directly related to this patch, added new tests found that we are returning |
| null StringView if the resource is zero byte. This totally works, but JSC::Parser has assertion that this is non-null |
| StringView. For zero byte CachedScript resource, we should return non-null empty StringView instead. |
| |
| 2020-04-13 Dean Jackson <dino@apple.com> |
| |
| Add Apple's Reality files to AR System Preview |
| https://bugs.webkit.org/show_bug.cgi?id=210449 |
| <rdar://problem/61732793> |
| |
| Reviewed by Sam Weinig. |
| |
| Add support for Apples .reality AR files - both the vendor MIME |
| Type and our UTI. These have been supported by WebKitAdditions for |
| a while. Move them into Open Source. |
| |
| * platform/MIMETypeRegistry.cpp: |
| (WebCore::MIMETypeRegistry::systemPreviewMIMETypes): |
| * platform/network/mac/UTIUtilities.mm: |
| (WebCore::UTIFromUnknownMIMEType): |
| |
| 2020-04-13 Per Arne Vollan <pvollan@apple.com> |
| |
| [iOS] Remove unused UTType swizzler code |
| https://bugs.webkit.org/show_bug.cgi?id=210435 |
| |
| Unreviewed rollout of r258120. |
| |
| * WebCore.xcodeproj/project.pbxproj: |
| * platform/cocoa/UTTypeRecordSwizzler.h: Removed. |
| * platform/cocoa/UTTypeRecordSwizzler.mm: Removed. |
| |
| 2020-04-13 Commit Queue <commit-queue@webkit.org> |
| |
| Unreviewed, reverting r260003. |
| https://bugs.webkit.org/show_bug.cgi?id=210441 |
| |
| Avoid using basic-authentication for tests (Requested by |
| yusukesuzuki on #webkit). |
| |
| Reverted changeset: |
| |
| "module's default cross-origin value should be "anonymous"" |
| https://bugs.webkit.org/show_bug.cgi?id=210326 |
| https://trac.webkit.org/changeset/260003 |
| |
| 2020-04-13 Antti Koivisto <antti@apple.com> |
| |
| [CSS Selectors] Selectors Level 4 specificity calculation for pseudo classes |
| https://bugs.webkit.org/show_bug.cgi?id=210419 |
| |
| Reviewed by Simon Fraser. |
| |
| CSS selector specification drafts at some point had a concept of "dynamic specificity" where |
| the specificity of a selector depended on the element it matched. It was only ever used with |
| :matches and :nth-child pseudo classes and has subsequently been removed. Selector specificity |
| can now always be computed statically. |
| |
| There is a ton of code to support this obsolete feature. Remove it. |
| |
| https://drafts.csswg.org/selectors-4/#specificity-rules |
| |
| "The specificity of an :is(), :not(), or :has() pseudo-class is replaced by the specificity |
| of the most specific complex selector in its selector list argument. |
| |
| Analogously, the specificity of an :nth-child() or :nth-last-child() selector is the specificity |
| of the pseudo class itself (counting as one pseudo-class selector) plus the specificity of the |
| most specific complex selector in its selector list argument (if any)." |
| |
| * css/html.css: |
| |
| Reorganize a :matches rule into a selector list to keep the exact specificites. |
| It matters here to select between listbox and menulist correctly based on the 'size' and 'multiple' attributes. |
| |
| * css/CSSSelector.cpp: |
| (WebCore::selectorSpecificity): |
| (WebCore::maxSpecificity): |
| (WebCore::simpleSelectorSpecificityInternal): |
| (WebCore::CSSSelector::simpleSelectorSpecificity const): |
| |
| Also handle nth here. |
| |
| (WebCore::CSSSelector::specificity const): |
| (WebCore::simpleSelectorFunctionalPseudoClassStaticSpecificity): Deleted. |
| (WebCore::functionalPseudoClassStaticSpecificity): Deleted. |
| (WebCore::staticSpecificityInternal): Deleted. |
| (WebCore::CSSSelector::staticSpecificity const): Deleted. |
| |
| Rename to just computeSpecificity(), there is no other kind than static. |
| |
| * css/CSSSelector.h: |
| * css/SelectorChecker.cpp: |
| (WebCore::SelectorChecker::match const): |
| (WebCore::SelectorChecker::matchHostPseudoClass const): |
| (WebCore::SelectorChecker::matchRecursively const): |
| (WebCore::SelectorChecker::checkOne const): |
| (WebCore::SelectorChecker::matchSelectorList const): |
| |
| SelectorChecker doesn't need to deal with specificity anymore. |
| |
| * css/SelectorChecker.h: |
| * cssjit/SelectorCompiler.cpp: |
| (WebCore::SelectorCompiler::addNthChildType): |
| (WebCore::SelectorCompiler::addPseudoClassType): |
| (WebCore::SelectorCompiler::constructFragmentsInternal): |
| (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker): |
| (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching): |
| |
| Neither does SelectorCompiler. |
| |
| * cssjit/SelectorCompiler.h: |
| * dom/SelectorQuery.cpp: |
| (WebCore::SelectorDataList::selectorMatches const): |
| (WebCore::SelectorDataList::selectorClosest const): |
| * inspector/InspectorStyleSheet.cpp: |
| (WebCore::buildObjectForSelectorHelper): |
| (WebCore::selectorsFromSource): |
| (WebCore::InspectorStyleSheet::buildObjectForSelector): |
| (WebCore::InspectorStyleSheet::buildObjectForSelectorList): |
| (WebCore::InspectorStyleSheet::buildObjectForRule): |
| (WebCore::InspectorStyleSheet::buildArrayForRuleList): |
| (WebCore::hasDynamicSpecificity): Deleted. |
| * inspector/InspectorStyleSheet.h: |
| * inspector/agents/InspectorCSSAgent.cpp: |
| (WebCore::InspectorCSSAgent::setRuleSelector): |
| (WebCore::InspectorCSSAgent::addRule): |
| (WebCore::InspectorCSSAgent::buildObjectForRule): |
| (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList): |
| * inspector/agents/InspectorDOMAgent.cpp: |
| (WebCore::InspectorDOMAgent::highlightSelector): |
| * style/ElementRuleCollector.cpp: |
| (WebCore::Style::ElementRuleCollector::ruleMatches): |
| (WebCore::Style::ElementRuleCollector::collectMatchingRulesForList): |
| |
| Switch to get the specificity from the selector instead of computing it during selector checking. |
| |
| * style/ElementRuleCollector.h: |
| * style/RuleData.cpp: |
| (WebCore::Style::computeMatchesBasedOnRuleHash): |
| (WebCore::Style::RuleData::RuleData): |
| (WebCore::Style::computeMatchBasedOnRuleHash): Deleted. |
| * style/RuleData.h: |
| (WebCore::Style::RuleData::matchesBasedOnRuleHash const): |
| (WebCore::Style::RuleData::matchBasedOnRuleHash const): Deleted. |
| |
| This can be a bit instead of an enum since there is no need to communicate specificity. |
| |
| 2020-04-13 David Kilzer <ddkilzer@apple.com> |
| |
| KeyedDecoder functions in ResourceLoadStatistics.{cpp,h} should return bool and use WARN_UNUSED_RETURN |
| <https://webkit.org/b/210414> |
| <rdar://problem/61693118> |
| |
| Reviewed by Alex Christensen. |
| |
| * loader/ResourceLoadStatistics.cpp: |
| (WebCore::decodeHashCountedSet): |
| (WebCore::decodeHashSet): |
| (WebCore::decodeOptionSet): |
| (WebCore::decodeFontHashSet): |
| (WebCore::decodeCanvasActivityRecord): |
| (WebCore::ResourceLoadStatistics::decode): |
| * loader/ResourceLoadStatistics.h: |
| - Change decode functions to return `bool`. |
| - Add WARN_UNUSED_RETURN to all decode functions. |
| - Check the return value of all decode functions. |
| |
| 2020-04-13 Said Abou-Hallawa <sabouhallawa@apple.com> |
| |
| When drawing an image srcRect and imageRect have to be in the orientation of destRect |
| https://bugs.webkit.org/show_bug.cgi?id=210364 |
| |
| Reviewed by Darin Adler. |
| |
| * html/canvas/CanvasRenderingContext2DBase.cpp: |
| (WebCore::CanvasRenderingContext2DBase::drawImage): |
| Use the renderer to get the orientation of the image if it is available. |
| Otherwise fall back to computedStyle(). |
| |
| * platform/graphics/BitmapImage.cpp: |
| (WebCore::BitmapImage::draw): |
| For async image decoding, we will use the none oriented size as the |
| sizeForDrawing. imageRect must be in the same orientation as destRect. |
| |
| * platform/graphics/GraphicsContext.cpp: |
| (WebCore::GraphicsContext::drawImage): |
| srcRect must be in the same orientation as destRect. |
| |
| 2020-04-13 Joonghun Park <jh718.park@samsung.com> |
| |
| Unreviewed. Remove redundant move in return statement. |
| |
| Return statement already returns rvalue, |
| so we don't need move here. |
| |
| This patch removes the build warning below since r259922. |
| warning: redundant move in return statement [-Wredundant-move] |
| |
| No new tests, no new behaviours. |
| |
| * page/csp/ContentSecurityPolicyResponseHeaders.h: |
| (WebCore::ContentSecurityPolicyResponseHeaders::decode): |
| * platform/network/cf/CertificateInfoCFNet.cpp: |
| (WTF::Persistence::decodeSecTrustRef): |
| |
| 2020-04-13 Youenn Fablet <youenn@apple.com> |
| |
| Fix mute/unmute of CoreAudioCapture sources after revision 257914 |
| https://bugs.webkit.org/show_bug.cgi?id=210381 |
| |
| Reviewed by Eric Carlson. |
| |
| Revert part of revision 257914 since we still need the active source registration/unregistration when capturing in web process. |
| Make sure mock factory delegates all active source handling to CoreAudioCaptureSourceFactory, |
| now that the mock factory is using CoreAudioCaptureSources with a mock share dunit. |
| |
| Tests: platform/ios/mediastream/audio-muted-in-background-tab-gpu-process.html |
| platform/ios/mediastream/getUserMedia-single-capture-gpu-process.html |
| |
| * platform/mediastream/RealtimeMediaSourceFactory.h: |
| * platform/mediastream/mac/CoreAudioCaptureSource.cpp: |
| (WebCore::CoreAudioCaptureSource::~CoreAudioCaptureSource): |
| (WebCore::CoreAudioCaptureSource::startProducingData): |
| * platform/mock/MockRealtimeMediaSourceCenter.cpp: |
| |
| 2020-04-13 Michael Catanzaro <mcatanzaro@gnome.org> |
| |
| Fix various build warnings |
| https://bugs.webkit.org/show_bug.cgi?id=210429 |
| |
| Reviewed by Mark Lam. |
| |
| Fix -Wunused-parameter warning. |
| |
| * html/canvas/WebGLRenderingContextBase.cpp: |
| (WebCore::WebGLRenderingContextBase::texImage2DBase): |
| |
| 2020-04-13 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Pre-fill columnIntrinsicWidths vector |
| https://bugs.webkit.org/show_bug.cgi?id=210415 |
| |
| Reviewed by Antti Koivisto. |
| |
| Vector<ColumnMinimumWidth> has a fixed number of entries (number of columns in the table). |
| (This patch also flips the shouldFlex flag to isFixedWidth. It reads better in the context of minimum _widths_). |
| |
| Test: fast/layoutformattingcontext/table-with-column-spanner-first-row.html |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| |
| 2020-04-13 Adrian Perez de Castro <aperez@igalia.com> |
| |
| [GTK4] Fix usage of GDK event functions in PlatformWheelEventGtk |
| https://bugs.webkit.org/show_bug.cgi?id=210160 |
| |
| Reviewed by Michael Catanzaro. |
| |
| No new tests needed. |
| |
| * platform/gtk/PlatformWheelEventGtk.cpp: |
| (WebCore::PlatformWheelEvent::PlatformWheelEvent): Conditionally |
| use the new GDK event functions when building with GTK4. |
| |
| 2020-04-13 Yusuke Suzuki <ysuzuki@apple.com> |
| |
| module's default cross-origin value should be "anonymous" |
| https://bugs.webkit.org/show_bug.cgi?id=210326 |
| |
| Reviewed by Sam Weinig. |
| |
| The original spec was using "omit" crossorigin for modules when crossorigin is not set / empty. |
| However, the spec is changed to sending requests with "same-origin" credentials ("anonymous" crossorigin mode) |
| by default. We should follow it. |
| |
| * dom/ScriptElement.cpp: |
| (WebCore::ScriptElement::requestModuleScript): |
| * dom/ScriptElementCachedScriptFetcher.cpp: |
| (WebCore::ScriptElementCachedScriptFetcher::requestModuleScript const): |
| * dom/ScriptElementCachedScriptFetcher.h: |
| * html/parser/HTMLResourcePreloader.cpp: |
| (WebCore::PreloadRequest::resourceRequest): |
| * loader/cache/CachedScript.cpp: |
| (WebCore::CachedScript::script): While this is not directly related to this patch, added new tests found that we are returning |
| null StringView if the resource is zero byte. This totally works, but JSC::Parser has assertion that this is non-null |
| StringView. For zero byte CachedScript resource, we should return non-null empty StringView instead. |
| |
| 2020-04-13 Charlie Turner <cturner@igalia.com> |
| |
| [EME][GStreamer] remove m_cdmInstance ASSERT in cdmInstanceDetached |
| https://bugs.webkit.org/show_bug.cgi?id=210331 |
| |
| Reviewed by Xabier Rodriguez-Calvar. |
| |
| In tests that reset the src very quickly, the MediaKeys can be |
| installed and then the src is reset before an attachment message |
| is sent. Hence, detachment can result in no CDM currently |
| existing. |
| |
| Covered by imported/w3c/web-platform-tests/encrypted-media. |
| |
| * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: |
| (WebCore::MediaPlayerPrivateGStreamer::cdmInstanceDetached): Only |
| assert if the CDM instance has been set before detachment. |
| (WebCore::MediaPlayerPrivateGStreamer::attemptToDecryptWithInstance): |
| Do not need the .get(), the operator== overload in RefPtr does |
| this for us, and it makes the code more consistent. |
| |
| 2020-04-13 Rob Buis <rbuis@igalia.com> |
| |
| Remove return parameter from FrameLoader::closeURL |
| https://bugs.webkit.org/show_bug.cgi?id=210404 |
| |
| Reviewed by Manuel Rego Casasnovas. |
| |
| Remove return parameter from FrameLoader::closeURL since it always |
| returns true and is never tested. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::closeURL): |
| * loader/FrameLoader.h: |
| |
| 2020-04-13 Rob Buis <rbuis@igalia.com> |
| |
| Remove addExtraFieldsToSubresourceRequest |
| https://bugs.webkit.org/show_bug.cgi?id=210407 |
| |
| Reviewed by Darin Adler. |
| |
| Remove addExtraFieldsToSubresourceRequest since it can be replaced by |
| calling addExtraFieldsToRequest. The loadType parameter is not taken |
| into account by defaultRequestCachingPolicy so FrameLoadType::Standard |
| rather than m_loadType is passed. |
| |
| This patch also replaces the isMainResource boolean parameter with an enum. |
| |
| * loader/FrameLoader.cpp: |
| (WebCore::FrameLoader::loadURL): |
| (WebCore::FrameLoader::load): |
| (WebCore::FrameLoader::addExtraFieldsToRequest): |
| (WebCore::FrameLoader::loadPostRequest): |
| (WebCore::FrameLoader::loadResourceSynchronously): |
| (WebCore::FrameLoader::loadDifferentDocumentItem): |
| (WebCore::FrameLoader::addExtraFieldsToSubresourceRequest): Deleted. |
| * loader/FrameLoader.h: |
| * loader/PingLoader.cpp: |
| (WebCore::PingLoader::loadImage): |
| (WebCore::PingLoader::sendPing): |
| (WebCore::PingLoader::sendViolationReport): |
| * loader/cache/CachedResource.cpp: |
| (WebCore::CachedResource::load): |
| |
| 2020-04-12 Darin Adler <darin@apple.com> |
| |
| Fix a few mispellings of descendant and propagation |
| https://bugs.webkit.org/show_bug.cgi?id=210409 |
| |
| Reviewed by Mark Lam. |
| |
| * dom/Element.cpp: |
| (WebCore::Element::dispatchWheelEvent): "propagation" |
| * dom/TreeScopeOrderedMap.cpp: |
| (WebCore::TreeScopeOrderedMap::getAllElementsById const): |
| "descendants". Also refactored this function a bit. |
| * html/MediaElementSession.cpp: |
| (WebCore::MediaElementSession::canShowControlsManager const): |
| "descendants" |
| * rendering/RenderFrameSet.cpp: |
| (WebCore::resetFrameRendererAndDescendants): "descendants" |
| (WebCore::RenderFrameSet::positionFrames): "descendants" |
| (WebCore::RenderFrameSet::positionFramesWithFlattening): "descendants" |
| |
| 2020-04-12 Darin Adler <darin@apple.com> |
| |
| Refactor and tighten up the CSSVariableReferenceValue class |
| https://bugs.webkit.org/show_bug.cgi?id=210406 |
| |
| Reviewed by Anders Carlsson. |
| |
| * css/CSSCustomPropertyValue.h: Remove uneeded forward declaration of |
| CSSVariableReferenceValue, since it's not used here. Added inclde of |
| CSSVariableData.h since the use of Variant in this class does require |
| that header, which we were getting indirectly before from |
| CSSVariableReferenceValue.h in some translation units. |
| |
| * css/CSSVariableReferenceValue.cpp: |
| (WebCore::CSSVariableReferenceValue::CSSVariableReferenceValue): Moved here |
| from the header. |
| (WebCore::CSSVariableReferenceValue::create): Ditto. |
| (WebCore::CSSVariableReferenceValue::equals const): Ditto. |
| (WebCore::CSSVariableReferenceValue::customCSSText const): Use non-null to |
| indicate this is not serialized. |
| * css/CSSVariableReferenceValue.h: Reduced includes, inlining, marked |
| constructor explicit, removed unneeded m_serialized boolean. |
| |
| * rendering/style/StyleCustomPropertyData.h: Remove unneeded include |
| of CSSVariableReferenceValue.h, not used here. |
| |
| 2020-04-12 Darin Adler <darin@apple.com> |
| |
| Fix some strange uses of start/endOfDocument |
| https://bugs.webkit.org/show_bug.cgi?id=210408 |
| |
| Reviewed by Wenson Hsieh. |
| |
| * editing/VisibleSelection.cpp: |
| (WebCore::VisibleSelection::setStartAndEndFromBaseAndExtentRespectingGranularity): |
| Call startOfDocument and endOfDocument without unnecessarily turning a Position |
| into a VisiblePostion, since those functions just require any node from the document. |
| |
| 2020-04-12 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for column spanners |
| https://bugs.webkit.org/show_bug.cgi?id=210403 |
| |
| Reviewed by Antti Koivisto. |
| |
| Table width constraint computation with spanner support is as follows: |
| |
| 1. Collect each cells' width constraints. |
| 2. Collect fixed column widths set by <colgroup>'s and <col>s. |
| 3. Find the min/max width for each columns using the cell constraints and the <col> fixed widths but ignore column spans. |
| 4. Distribute column spanning cells min/max widths. |
| 5. Add them all up and return the computed min/max widths. |
| |
| * layout/FormattingContext.h: |
| (WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator-=): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell): |
| * layout/tableformatting/TableGrid.cpp: |
| (WebCore::Layout::TableGrid::Columns::hasFixedColumnsOnly const): |
| * layout/tableformatting/TableGrid.h: |
| |
| 2020-04-12 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Column, Row and Cell boxes are always ContainerBoxes |
| https://bugs.webkit.org/show_bug.cgi?id=210402 |
| |
| Reviewed by Antti Koivisto. |
| |
| These boxes are always ContainerBox types. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| (WebCore::Layout::TableFormattingContext::ensureTableGrid): |
| (WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): |
| * layout/tableformatting/TableGrid.cpp: |
| (WebCore::Layout::TableGrid::Column::Column): |
| (WebCore::Layout::TableGrid::Columns::addColumn): |
| (WebCore::Layout::TableGrid::Rows::addRow): |
| (WebCore::Layout::TableGrid::Row::Row): |
| (WebCore::Layout::TableGrid::Cell::Cell): |
| (WebCore::Layout::TableGrid::appendCell): |
| (WebCore::Layout::TableGrid::insertCell): |
| (WebCore::Layout::TableGrid::removeCell): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::Column::box const): |
| (WebCore::Layout::TableGrid::Row::box const): |
| (WebCore::Layout::TableGrid::Cell::box const): |
| |
| 2020-04-12 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add support for fixed width columns |
| https://bugs.webkit.org/show_bug.cgi?id=210401 |
| |
| Reviewed by Antti Koivisto. |
| |
| This is in preparation for adding support for spanner cells. |
| Fixed width columns (<col> and <td>) don't participate in the spanner width distribution. |
| |
| * layout/FormattingContext.h: |
| (WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::operator-=): |
| * layout/Verification.cpp: |
| (WebCore::Layout::areEssentiallyEqual): |
| (WebCore::Layout::LayoutContext::verifyAndOutputMismatchingLayoutTree): |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints): |
| (WebCore::Layout::TableFormattingContext::computedPreferredWidthForColumns): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns): Deleted. |
| (WebCore::Layout::TableFormattingContext::useAsContentLogicalWidth): Deleted. |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableFormattingContextGeometry.cpp: |
| (WebCore::Layout::TableFormattingContext::Geometry::intrinsicWidthConstraintsForCell): |
| * layout/tableformatting/TableGrid.cpp: |
| (WebCore::Layout::TableGrid::Column::isFixedWidth const): |
| (WebCore::Layout::TableGrid::Cell::isFixedWidth const): |
| (WebCore::Layout::TableGrid::Slot::Slot): |
| (WebCore::Layout::TableGrid::appendCell): |
| (WebCore::Layout::TableGrid::Column::setWidthConstraints): Deleted. |
| (WebCore::Layout::TableGrid::Column::widthConstraints const): Deleted. |
| (WebCore::Layout::TableGrid::Column::hasFixedWidth const): Deleted. |
| (WebCore::Layout::TableGrid::widthConstraints): Deleted. |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::setWidthConstraints): |
| (WebCore::Layout::TableGrid::widthConstraints): |
| (WebCore::Layout::TableGrid::Column::setHasFixedWidthCell): |
| (WebCore::Layout::TableGrid::Column::hasFixedWidthCell const): |
| (WebCore::Layout::TableGrid::Slot::cell const): |
| (WebCore::Layout::TableGrid::Slot::cell): |
| (WebCore::Layout::TableGrid::Slot::widthConstraints const): |
| (WebCore::Layout::TableGrid::Slot::setWidthConstraints): |
| (WebCore::Layout::TableGrid::Slot::hasColumnSpan const): |
| (WebCore::Layout::TableGrid::Slot::hasRowSpan const): |
| (WebCore::Layout::TableGrid::Slot::isColumnSpanned const): |
| (WebCore::Layout::TableGrid::Slot::isRowSpanned const): |
| (WebCore::Layout::TableGrid::hasComputedWidthConstraints const): Deleted. |
| |
| 2020-04-12 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Introduce dedicated SlotPosition/CellSpan structs |
| https://bugs.webkit.org/show_bug.cgi?id=210399 |
| |
| Reviewed by Antti Koivisto. |
| |
| SlotPosition.column/row and CellSpan.column/row read better. |
| |
| * layout/LayoutUnits.h: |
| (WebCore::Layout::SlotPosition::SlotPosition): |
| (WebCore::Layout::operator==): |
| (WTF::SlotPositionHash::hash): |
| (WTF::SlotPositionHash::equal): |
| (WTF::HashTraits<WebCore::Layout::SlotPosition>::emptyValue): |
| (WTF::HashTraits<WebCore::Layout::SlotPosition>::constructDeletedValue): |
| (WTF::HashTraits<WebCore::Layout::SlotPosition>::isDeletedValue): |
| * layout/layouttree/LayoutBox.cpp: |
| (WebCore::Layout::Box::setRowSpan): |
| (WebCore::Layout::Box::setColumnSpan): |
| (WebCore::Layout::Box::rowSpan const): |
| (WebCore::Layout::Box::columnSpan const): |
| * layout/layouttree/LayoutBox.h: |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns): |
| * layout/tableformatting/TableGrid.cpp: |
| (WebCore::Layout::TableGrid::Cell::Cell): |
| (WebCore::Layout::TableGrid::appendCell): |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::Cell::startColumn const): |
| (WebCore::Layout::TableGrid::Cell::endColumn const): |
| (WebCore::Layout::TableGrid::Cell::startRow const): |
| (WebCore::Layout::TableGrid::Cell::endRow const): |
| (WebCore::Layout::TableGrid::Cell::columnSpan const): |
| (WebCore::Layout::TableGrid::Cell::rowSpan const): |
| (WebCore::Layout::TableGrid::Cell::span const): |
| (WebCore::Layout::TableGrid::Cell::size const): Deleted. |
| |
| 2020-04-12 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Add table support to BlockFormattingContext::Geometry::inFlowWidthAndMargin |
| https://bugs.webkit.org/show_bug.cgi?id=210400 |
| |
| Reviewed by Antti Koivisto. |
| |
| Use a slightly modified shrink-to-fit logic to compute the table width. |
| |
| * layout/blockformatting/BlockFormattingContextGeometry.cpp: |
| (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin): |
| |
| 2020-04-12 Zalan Bujtas <zalan@apple.com> |
| |
| [LFC][TFC] Cleanup class/struct/variable names in TableGrid/TableFormattingContext |
| https://bugs.webkit.org/show_bug.cgi?id=210397 |
| |
| Reviewed by Antti Koivisto. |
| |
| This is in preparation for the column spanner work. |
| |
| * layout/tableformatting/TableFormattingContext.cpp: |
| (WebCore::Layout::TableFormattingContext::layoutInFlowContent): |
| (WebCore::Layout::TableFormattingContext::layoutCell): |
| (WebCore::Layout::TableFormattingContext::positionTableCells): |
| (WebCore::Layout::TableFormattingContext::setComputedGeometryForRows): |
| (WebCore::Layout::TableFormattingContext::setComputedGeometryForSections): |
| (WebCore::Layout::TableFormattingContext::ensureTableGrid): |
| (WebCore::Layout::TableFormattingContext::computePreferredWidthForColumns): |
| (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace): |
| (WebCore::Layout::TableFormattingContext::useAsContentLogicalWidth): |
| (WebCore::Layout::TableFormattingContext::layoutTableCellBox): Deleted. |
| * layout/tableformatting/TableFormattingContext.h: |
| * layout/tableformatting/TableGrid.cpp: |
| (WebCore::Layout::TableGrid::Column::Column): |
| (WebCore::Layout::TableGrid::Column::hasFixedWidth const): |
| (WebCore::Layout::TableGrid::Columns::addColumn): |
| (WebCore::Layout::TableGrid::Columns::addAnonymousColumn): |
| (WebCore::Layout::TableGrid::Rows::addRow): |
| (WebCore::Layout::TableGrid::Row::Row): |
| (WebCore::Layout::TableGrid::Cell::Cell): |
| (WebCore::Layout::TableGrid::Slot::Slot): |
| (WebCore::Layout::TableGrid::slot): |
| (WebCore::Layout::TableGrid::appendCell): |
| (WebCore::Layout::TableGrid::insertCell): |
| (WebCore::Layout::TableGrid::removeCell): |
| (WebCore::Layout::TableGrid::widthConstraints): |
| (WebCore::Layout::TableGrid::ColumnsContext::addColumn): Deleted. |
| (WebCore::Layout::TableGrid::CellInfo::CellInfo): Deleted. |
| (WebCore::Layout::TableGrid::SlotInfo::SlotInfo): Deleted. |
| * layout/tableformatting/TableGrid.h: |
| (WebCore::Layout::TableGrid::totalHorizontalSpacing const): |
| (WebCore::Layout::TableGrid::hasComputedWidthConstraints const): |
| (WebCore::Layout::TableGrid::Column::box const): |
| (WebCore::Layout::TableGrid::Columns::list): |
| (WebCore::Layout::TableGrid::Columns::list const): |
| (WebCore::Layout::TableGrid::Columns::size const): |
| (WebCore::Layout::TableGrid::Columns::logicalWidth const): |
| (WebCore::Layout::TableGrid::Row::logicalBottom const): |
| (WebCore::Layout::TableGrid::Row::box const): |
| (WebCore::Layout::TableGrid::Rows::list): |
| (WebCore::Layout::TableGrid::Rows::rowList const): |
| (WebCore::Layout::TableGrid::Rows::size const): |
| (WebCore::Layout::TableGrid::Cell::startColumn const): |
| (WebCore::Layout::TableGrid::Cell::endColumn const): |
| (WebCore::Layout::TableGrid::Cell::startRow const): |
| (WebCore::Layout::TableGrid::Cell::endRow const): |
| (WebCore::Layout::TableGrid::Cell::columnSpan const): |
| (WebCore::Layout::TableGrid::Cell::rowSpan const): |
| (WebCore::Layout::TableGrid::Cell::position const): |
| (WebCore::Layout::TableGrid::Cell::size const): |
| (WebCore::Layout::TableGrid::Cell::box const): |
| (WebCore::Layout::TableGrid::columns const): |
| (WebCore::Layout::TableGrid::columns): |
| (WebCore::Layout::TableGrid::rows const): |
| (WebCore::Layout::TableGrid::rows): |
| (WebCore::Layout::TableGrid::cells): |
| (WebCore::Layout::TableGrid::CellInfo::startColumn const): Deleted. |
| (WebCore::Layout::TableGrid::CellInfo::endColumn const): Deleted. |
| (WebCore::Layout::TableGrid::CellInfo::startRow const): Deleted. |
| (WebCore::Layout::TableGrid::CellInfo::endRow const): Deleted. |
| (WebCore::Layout::TableGrid::CellInfo::columnSpan const): Deleted. |
| (WebCore::Layout::TableGrid::CellInfo::rowSpan const): Deleted. |
| (WebCore::Layout::TableGrid::Column::columnBox const): Deleted. |
| (WebCore::Layout::TableGrid::ColumnsContext::columns): Deleted. |
| (WebCore::Layout::TableGrid::ColumnsContext::columns const): Deleted. |
| (WebCore::Layout::TableGrid::ColumnsContext::logicalWidth const): Deleted. |
| (WebCore::Layout::TableGrid::columnsContext const): Deleted. |
| (WebCore::Layout::TableGrid::columnsContext): Deleted. |
| |
| 2020-04-11 Jack Lee <shihchieh_lee@apple.com> |
| |
| Infinite loop in InsertListCommand::doApply() |
| https://bugs.webkit.org/show_bug.cgi?id=210354 |
| <rdar://problem/61427778> |
| |
| Reviewed by Darin Adler. |
| |
| Function startOfNextParagraph may return an empty position. Added null check to exit the while loop |
| and stop looking for next paragraph. |
| |
| Test: editing/inserting/insert-list-end-of-table.html |
| |
| * editing/InsertListCommand.cpp: |
| (WebCore::InsertListCommand::doApply): |
| |
| 2020-04-11 Wenson Hsieh <wenson_hsieh@apple.com> |
| |
| [macOS] [WK1] Touch Bar flashes when typing in Vietnamese in Mail |
| https://bugs.webkit.org/show_bug.cgi?id=210394 |
| <rdar://problem/60099560> |
| |
| Reviewed by Tim Horton. |
| |
| See WebKitLegacy/mac/ChangeLog for more details. |
| |
| Currently, many users of TemporarySelectionChange use it to temporarily avoid propagating selection changes to |
| the client layer during temporary selection changes. This involves creating a TemporarySelectionChange without |
| a new selection, but with the `IgnoreSelectionChanges` option specified, which makes us call `Editor:: |
| setIgnoreSelectionChanges` to suppress selection change notifications. |
| |
| Do a bit of cleanup in this area by introducing IgnoreSelectionChangeForScope, which wraps a |
| TemporarySelectionChange and makes it easier for a handful of call sites that currently use |
| TemporarySelectionChange to hide selection changes from the client layer to get their desired behavior. |
| |
| Test: CandidateTests.DoNotHideCandidatesDuringTextReplacement |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::respondToChangedSelection): |
| * editing/Editor.h: |
| (WebCore::TemporarySelectionChange::TemporarySelectionChange): |
| (WebCore::IgnoreSelectionChangeForScope::IgnoreSelectionChangeForScope): |
| * page/DragController.cpp: |
| (WebCore::DragController::performDragOperation): |
| (WebCore::DragController::insertDroppedImagePlaceholdersAtCaret): |
| |
| Replace these: |
| |
| `TemporarySelectionChange ignoreSelectionChanges { frame, WTF::nullopt, TemporarySelectionOption::IgnoreSelectionChanges };` |
| |
| ...with these instead: |
| |
| `IgnoreSelectionChangeForScope ignoreSelectionChanges { *frame };` |
| |
| 2020-04-11 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow] Can't scroll overflow:scroll in sideways-scrollable RTL document |
| https://bugs.webkit.org/show_bug.cgi?id=210389 |
| |
| Reviewed by Tim Horton. |
| |
| ScrollingTree::handleWheelEvent() converts the event coordinates from view to "content" |
| coordinates, but we then jump into hit-testing on CALayers. In a sideways-scrollable |
| RTL document, the root content layer has a negative X offset which corresponds to |
| scrollOrigin; we need to map the point into the coordinate space of this layer |
| before entering layer-based hit-testing. |
| |
| Tests: fast/scrolling/mac/async-scroll-overflow-rtl-zoomed.html |
| fast/scrolling/mac/async-scroll-overflow-rtl.html |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::handleWheelEvent): |
| * page/scrolling/mac/ScrollingTreeMac.mm: |
| (ScrollingTreeMac::scrollingNodeForPoint): |
| |
| 2020-04-10 Darin Adler <darin@apple.com> |
| |
| Move more from live range to SimpleRange: callers of absoluteTextRects |
| https://bugs.webkit.org/show_bug.cgi?id=210369 |
| |
| Reviewed by Anders Carlsson. |
| |
| * dom/Node.cpp: |
| (WebCore::Node::textRects const): Deleted. |
| * dom/Node.h: Updated for the above. |
| |
| * dom/Range.cpp: |
| (WebCore::Range::absoluteBoundingBox const): Updated since absoluteTextRects |
| no longer has a RangeInFixedPosition* argument. |
| (WebCore::Range::absoluteTextRects const): Removed the unused RangeInFixedPosition* |
| argument. |
| * dom/Range.h: Got rid of unused RangeInFixedPosition type and also removed |
| RangeInFixedPosition* argument from the absoluteTextRects function. Later will |
| remove absoluteTextRects entirely. |
| |
| * editing/Editor.cpp: |
| (WebCore::Editor::firstRectForRange const): Use RenderObject::absoluteTextQuads |
| and unitedBoundingBoxes rather than using RenderObject::absoluteBoundingBoxRectForRange. |
| |
| * editing/cocoa/DataDetection.mm: |
| (WebCore::DataDetection::detectContentInRange): Use SimpleRange rather than |
| live ranges. |
| |
| * html/HTMLTextFormControlElement.cpp: |
| (WebCore::setContainerAndOffsetForRange): Moved from int to unsigned. |
| (WebCore::HTMLTextFormControlElement::selection const): Return Optional<SimpleRange> |
| rather than a live range. |
| * html/HTMLTextFormControlElement.h: Updated for the change above. |
| |
| * page/TextIndicator.cpp: |
| (WebCore::initializeIndicator): Updated since absoluteTextRects no longer takes |
| a RangeInFixedPosition* argument. |
| |
| * rendering/HighlightData.h: Removed stray obsolete declaration. |
| |
| * rendering/RenderObject.cpp: |
| (WebCore::RenderObject::absoluteBoundingBoxRectForRange): Deleted. Callers can |
| use absoluteTextQuads directly. We need to cut down on the number of separate |
| functions that are not really separate concepts, and this was used in only one place. |
| (WebCore::RenderObject::absoluteTextRects): Added. Replaces Range::absoluteTextRects |
| for all callers outside the live range class and will eventually replace it entirely. |
| * rendering/RenderObject.h: Updated for the above. |
| |
| 2020-04-11 Devin Rousso <drousso@apple.com> |
| |
| REGRESSION (Safari 13.1?): Web Inspector: Debugger hang at breakpoint when using Keyboard Maestro |
| https://bugs.webkit.org/show_bug.cgi?id=210177 |
| <rdar://problem/61485723> |
| |
| Reviewed by Joseph Pecoraro. |
| |
| Partial revert of r251036 <https://webkit.org/b/202716> to go back to using AppKit APIs |
| instead of `CFRunLoopRunInMode`. Only seems to affect WebKitLegacy. |
| |
| * inspector/PageScriptDebugServer.h: |
| * inspector/PageScriptDebugServer.cpp: |
| (WebCore::PageScriptDebugServer::runEventLoopWhilePausedInternal): |
| (WebCore::PageScriptDebugServer::platformShouldContinueRunningEventLoopWhilePaused): |
| * inspector/mac/PageScriptDebugServerMac.mm: Added. |
| (WebCore::PageScriptDebugServer::platformShouldContinueRunningEventLoopWhilePaused): |
| |
| * SourcesCocoa.txt: |
| * WebCore.xcodeproj/project.pbxproj: |
| |
| 2020-04-08 Darin Adler <darin@apple.com> |
| |
| Use Node::length to replace Node::maxCharacterOffset and lastOffsetInNode; switch more offsets from int to unsigned |
| https://bugs.webkit.org/show_bug.cgi?id=210246 |
| |
| Reviewed by Antti Koivisto. |
| |
| - The recently-added Node::length, which matches the DOM specification terminology |
| for node offsets as used in ranges, is the same as the existing maxCharacterOffset |
| and lastOffsetInNode functions. Deleted all uses of those and replaced them |
| with calls to Node::length. One of the benefits of this is that Node::length is |
| implemented more efficiently and is not a virtual function. Another is consistently |
| matching the DOM specification terminology. |
| - Many offsets, including the ones in live ranges, are currently implemented as signed |
| in WebKit, but are specified as unsigned in the DOM and HTML specifications. This |
| has very little observable effect from JavaScript that can affect website compatibility, |
| but it's still helpful to be consistent both with the specification and internally. |
| Accordingly, changed some of these to unsigned; more to come later. |
| |
| * accessibility/AXObjectCache.cpp: |
| (WebCore::AXObjectCache::previousBoundary): Use length instead of |
| maxCharacterOffset. |
| |
| * dom/CharacterData.cpp: |
| (WebCore::CharacterData::maxCharacterOffset const): Deleted. |
| * dom/CharacterData.h: Deleted maxCharacterOffset override. |
| |
| * dom/DocumentMarkerController.cpp: |
| (WebCore::DocumentMarkerController::shiftMarkers): Use length instead of |
| maxCharacterOffset. |
| |
| * dom/Node.cpp: |
| (WebCore::Node::maxCharacterOffset const): Deleted. |
| * dom/Node.h: Deleted maxCharacterOffset. |
| |
| * dom/Position.cpp: |
| (WebCore::Position::computeOffsetInContainerNode const): Use length instead |
| of lastOffsetInNode. |
| |
| * dom/Position.h: |
| (WebCore::lastOffsetInNode): Deleted. |
| (WebCore::lastPositionInNode): Use length instead of lastOffsetInNode. |
| (WebCore::minOffsetForNode): Use length instead of maxCharacterOffset. |
| (WebCore::offsetIsBeforeLastNodeOffset): Ditto. |
| |
| * dom/RangeBoundaryPoint.h: |
| (WebCore::RangeBoundaryPoint::setToEndOfNode): Use length instead of |
| maxCharacterOffset. |
| |
| * editing/ApplyBlockElementCommand.cpp: |
| (WebCore::isNewLineAtPosition): Use length instead of maxCharacterOffset. |
| (WebCore::ApplyBlockElementCommand::rangeForParagraphSplittingTextNodesIfNeeded): |
| Ditto. |
| |
| * editing/ApplyStyleCommand.cpp: |
| (WebCore::ApplyStyleCommand::removeInlineStyle): Use length instead of |
| maxCharacterOffset. |
| |
| * editing/Editing.cpp: |
| (WebCore::lastOffsetForEditing): Use length instead of mmaxCharacterOffset |
| and countChildNodes. Also improved the comment here. |
| |
| * editing/EditingStyle.cpp: |
| (WebCore::EditingStyle::styleAtSelectionStart): Use length instead of |
| maxCharacterOffset. |
| |
| * editing/InsertListCommand.cpp: |
| (WebCore::InsertListCommand::doApplyForSingleParagraph): Use length instead |
| of lastOffsetInNode. |
| |
| * editing/TextIterator.cpp: |
| (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): |
| USe length instead of lastOffsetInNode. |
| |
| * editing/VisibleUnits.cpp: |
| (WebCore::previousBoundary): Use length instead of maxCharacterOffset. |
| |
| 2020-04-10 Alex Christensen <achristensen@webkit.org> |
| |
| PersistentCoders should use modern decoding syntax |
| https://bugs.webkit.org/show_bug.cgi?id=207497 |
| |
| Reviewed by Darin Adler. |
| |
| * inspector/InspectorFrontendHost.cpp: |
| (WebCore::InspectorFrontendHost::showCertificate): |
| * loader/FetchOptions.h: |
| (WebCore::FetchOptions::decodePersistent): |
| * page/csp/ContentSecurityPolicyResponseHeaders.h: |
| (WebCore::ContentSecurityPolicyResponseHeaders::encode const): |
| (WebCore::ContentSecurityPolicyResponseHeaders::decode): |
| * platform/PasteboardCustomData.cpp: |
| (WebCore::PasteboardCustomData::fromSharedBuffer): |
| * platform/network/ResourceLoadPriority.h: |
| * platform/network/ResourceRequestBase.h: |
| (WebCore::ResourceRequestBase::encodeBase const): |
| (WebCore::ResourceRequestBase::decodeBase): |
| * platform/network/cf/CertificateInfo.h: |
| (WTF::Persistence::decodeCFData): |
| (WTF::Persistence::decodeSecTrustRef): |
| (WTF::Persistence::decodeCertificateChain): |
| (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode): |
| (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode): |
| * workers/service/server/RegistrationDatabase.cpp: |
| (WebCore::RegistrationDatabase::doPushChanges): |
| (WebCore::RegistrationDatabase::importRecords): |
| |
| 2020-04-10 Simon Fraser <simon.fraser@apple.com> |
| |
| [macOS] Fix scrollbar display for async-scrolling overflow |
| https://bugs.webkit.org/show_bug.cgi?id=194101 |
| |
| Reviewed by Tim Horton. |
| |
| We need to call positionOverflowControlsLayers() from RenderLayerBacking::updateGeometry(), |
| otherwise, on first load, scrollbar layers have no size because we try to position them |
| before we've created them. |
| |
| Test: fast/scrolling/mac/overflow-scrollbars-should-be-visible.html |
| |
| * rendering/RenderLayer.cpp: |
| (WebCore::RenderLayer::positionOverflowControls): |
| * rendering/RenderLayerBacking.cpp: |
| (WebCore::RenderLayerBacking::updateGeometry): |
| |
| 2020-04-10 Simon Fraser <simon.fraser@apple.com> |
| |
| [Async overflow] Can't scroll vertically while over a horizontal scroller in this content |
| https://bugs.webkit.org/show_bug.cgi?id=210356 |
| <rdar://problem/60523731> |
| |
| Reviewed by Tim Horton. |
| |
| https://dozermapper.github.io/gitbook/documentation/customconverter.html has style |
| that triggers mismatched containing block and z-order layer trees, triggering the creation |
| of an "overflow scroll proxy node" in the scrolling tree. |
| |
| If we encounter such a node in our ancestor tree walk while deciding which node to send |
| a wheel event too, we need to jump to the node that the proxy node is representing. |
| |
| Test: fast/scrolling/mac/nested-overflow-proxy-node.html |
| |
| * page/scrolling/ScrollingTree.cpp: |
| (WebCore::ScrollingTree::handleWheelEvent): |
| |
| 2020-04-10 Ryan Haddad <ryanhaddad@apple.com> |
| |
| Unreviewed, reverting r259764. |
| |
| Causes layout test crashes under GuardMalloc |
| |
| Reverted changeset: |
| |
| "Release WebGLLayer earlier in ~GraphicsContextGLOpenGL" |
| https://bugs.webkit.org/show_bug.cgi?id=210213 |
| https://trac.webkit.org/changeset/259764 |
| |
| 2020-04-10 Peng Liu <peng.liu6@apple.com> |
| |
| REGRESSION: (r259850)[ Mac wk1 Debug ] media/track/track-user-stylesheet.html is flaky failing. |
| https://bugs.webkit.org/show_bug.cgi?id=210350 |
| |
| Reviewed by Daniel Bates. |
| |
| Revert the change in r259850. |
| |
| * page/CaptionUserPreferences.cpp: |
| (WebCore::CaptionUserPreferences::setCaptionsStyleSheetOverride): |
| |
| 2020-04-10 Pinki Gyanchandani <pgyanchandani@apple.com> |
| |
| Null ptr Deref in RadioButtonGroups::updateCheckedState |
| https://bugs.webkit.org/show_bug.cgi?id=210353 |
| |
| Reviewed by Chris Dumez. |
| |
| This crash happened when the default checked setter was called for an input element and RadioButtonGroup was NULL. |
| Added condition to dereference the group only if it is non-null. |
| |
| Test: fast/forms/input-element-default-checked-setter-crash.html |
| |
| * dom/RadioButtonGroups.cpp: |
| (WebCore::RadioButtonGroups::updateCheckedState): |
| |
| 2020-04-10 Jack Lee <shihchieh_lee@apple.com> |
| |
| ASSERTION FAILED: selection.isRange() in InsertListCommand::doApply |
| https://bugs.webkit.org/show_bug.cgi?id=210170 |
| <rdar://problem/61410397> |
| |
| Reviewed by Wenson Hsieh. |
| |
| If selectionForParagraphIteration returns a non-range selection, there is no need for finding |
| multiple paragraphs. And since non-range selection is handled, the assertion can be removed. |
| |
| Test: editing/inserting/insert-list-in-table-assert.html |
| |
| * editing/InsertListCommand.cpp: |
| (WebCore::InsertListCommand::doApply): |
| |
| 2020-04-10 Antti Koivisto <antti@apple.com> |
| |
| [CSS Shadow Parts] Bad style sharing between sibling elements with different part attributes |
| https://bugs.webkit.org/show_bug.cgi?id=210249 |
| <rdar://problem/61547528> |
| |
| Reviewed by Daniel Bates. |
| |
| Style sharing optimization was unconditionally allowed for elements that were styled with part pseudo element. |
| This could lead to miscomputed style. |
| |
| Test case by Justin Fagnani. |
| |
| Test: fast/css/shadow-parts/shadow-part-style-sharing.html |
| |
| * style/StyleSharingResolver.cpp: |
| (WebCore::Style::SharingResolver::canShareStyleWithElement): |
| |
| Only allow style sharing if parts match. |
| |
| == Rolled over to ChangeLog-2020-04-10 == |