1 2019-08-12 Thibault Saunier <tsaunier@igalia.com>
3 [GStreamer][WebRTC] Handle broken data in the libwebrtc GStreamer decoders
4 https://bugs.webkit.org/show_bug.cgi?id=200584
6 Reviewed by Philippe Normand.
8 Listening to parsers warnings and error messages (synchronously so that we react
9 right away) and requesting keyframes from the peer.
11 Also simplify the decoder code by trying to make decoding happen
12 in one single pass, also hiding away GStreamer threading and allowing
13 us to react as soon as the decoder/parser fails.
15 * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
16 (WebCore::GStreamerVideoDecoder::GStreamerVideoDecoder):
17 (WebCore::GStreamerVideoDecoder::pullSample):
18 (WebCore::H264Decoder::H264Decoder):
19 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
21 2019-08-12 Antti Koivisto <antti@apple.com>
23 Only construct ComplexLineLayout when needed
24 https://bugs.webkit.org/show_bug.cgi?id=200625
26 Reviewed by Zalan Bujtas.
28 * rendering/ComplexLineLayout.cpp:
29 (WebCore::ComplexLineLayout::createInlineBoxForRenderer):
30 (WebCore::ComplexLineLayout::createLineBoxes):
31 (WebCore::ComplexLineLayout::constructLine):
32 (WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):
34 Make static so this can be invoked without constructing complex line layout (from startAlignedOffsetForLine).
36 (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
37 (WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
38 (WebCore::ComplexLineLayout::checkLinesForTextOverflow):
39 (WebCore::ComplexLineLayout::startAlignedOffsetForLine): Deleted.
41 This is also used in block layout to set static positions of positioned objects.
42 Move to RenderBlockFlow where its only caller is.
44 * rendering/ComplexLineLayout.h:
45 * rendering/RenderBlockFlow.cpp:
46 (WebCore::RenderBlockFlow::RenderBlockFlow):
47 (WebCore::RenderBlockFlow::willBeDestroyed):
48 (WebCore::RenderBlockFlow::layoutInlineChildren):
49 (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
50 (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
51 (WebCore::RenderBlockFlow::deleteLines):
52 (WebCore::RenderBlockFlow::hitTestInlineChildren):
53 (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
54 (WebCore::RenderBlockFlow::paintInlineChildren):
55 (WebCore::RenderBlockFlow::hasLines const):
56 (WebCore::RenderBlockFlow::layoutSimpleLines):
57 (WebCore::RenderBlockFlow::deleteLineBoxesBeforeSimpleLineLayout):
58 (WebCore::RenderBlockFlow::ensureLineBoxes):
59 * rendering/RenderBlockFlow.h:
60 (WebCore::RenderBlockFlow::firstRootBox const):
61 (WebCore::RenderBlockFlow::lastRootBox const):
62 (WebCore::RenderBlockFlow::complexLineLayout):
63 (WebCore::RenderBlockFlow::lineBoxes): Deleted.
64 (WebCore::RenderBlockFlow::lineBoxes const): Deleted.
65 * rendering/RootInlineBox.cpp:
66 (WebCore::RootInlineBox::removeLineBoxFromRenderObject):
67 (WebCore::RootInlineBox::extractLineBoxFromRenderObject):
68 (WebCore::RootInlineBox::attachLineBoxToRenderObject):
69 * rendering/SimpleLineLayoutFunctions.cpp:
70 (WebCore::SimpleLineLayout::generateLineBoxTree):
72 2019-08-12 Youenn Fablet <youenn@apple.com>
74 Remove IDBValue::m_sessionID
75 https://bugs.webkit.org/show_bug.cgi?id=199320
77 Reviewed by Alex Christensen.
79 Remove sessionID from IDBValue.
80 This does not seem to be really used in any way.
81 No change of behavior.
83 * Modules/indexeddb/IDBValue.cpp:
84 (WebCore::IDBValue::IDBValue):
85 * Modules/indexeddb/IDBValue.h:
86 (WebCore::IDBValue::blobURLs const):
87 (WebCore::IDBValue::encode const):
88 (WebCore::IDBValue::decode):
89 (WebCore::IDBValue::sessionID const): Deleted.
90 * Modules/indexeddb/shared/IDBRequestData.cpp:
91 (WebCore::IDBRequestData::isolatedCopy):
92 * Modules/indexeddb/shared/IDBRequestData.h:
93 (WebCore::IDBRequestData::databaseIdentifier const):
94 (WebCore::IDBRequestData::decode):
95 * bindings/js/IDBBindingUtilities.cpp:
96 (WebCore::deserializeIDBValueToJSValue):
97 * bindings/js/SerializedScriptValue.cpp:
98 (WebCore::CloneSerializer::serialize):
99 (WebCore::CloneSerializer::CloneSerializer):
100 (WebCore::CloneSerializer::dumpIfTerminal):
101 (WebCore::CloneDeserializer::deserialize):
102 (WebCore::CloneDeserializer::CloneDeserializer):
103 (WebCore::SerializedScriptValue::SerializedScriptValue):
104 (WebCore::SerializedScriptValue::create):
105 (WebCore::SerializedScriptValue::deserialize):
106 (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
107 * bindings/js/SerializedScriptValue.h:
108 (WebCore::SerializedScriptValue::sessionID const): Deleted.
110 2019-08-12 Youenn Fablet <youenn@apple.com>
112 Remove IDB-specific quota
113 https://bugs.webkit.org/show_bug.cgi?id=196545
115 Reviewed by Alex Christensen.
117 No change of behavior as IDB specific quota is no longer used.
118 Instead a global quota is used. This quota currently handles IDB and Cache API.
120 * Modules/indexeddb/server/IDBBackingStore.h:
121 * Modules/indexeddb/server/IDBServer.cpp:
122 (WebCore::IDBServer::IDBServer::createBackingStore):
123 (WebCore::IDBServer::IDBServer::setPerOriginQuota): Deleted.
124 * Modules/indexeddb/server/IDBServer.h:
125 (WebCore::IDBServer::IDBServer::perOriginQuota const): Deleted.
126 * Modules/indexeddb/server/MemoryIDBBackingStore.h:
127 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
128 (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
129 (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
130 (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
131 (WebCore::IDBServer::SQLiteIDBBackingStore::renameObjectStore):
132 (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
133 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
134 (WebCore::IDBServer::SQLiteIDBBackingStore::renameIndex):
135 (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
136 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
137 (WebCore::IDBServer::SQLiteIDBBackingStore::quotaForOrigin const): Deleted.
138 (WebCore::IDBServer::SQLiteIDBBackingStore::maximumSize const): Deleted.
139 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
140 * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
141 (WebCore::IDBServer::UniqueIDBDatabase::setQuota): Deleted.
142 * Modules/indexeddb/server/UniqueIDBDatabase.h:
144 2019-08-11 Alicia Boya GarcĂa <aboya@igalia.com>
146 [MSE][GStreamer] Don't use vorbisparse
147 https://bugs.webkit.org/show_bug.cgi?id=200622
149 Reviewed by Philippe Normand.
151 This patch has been splitted from the original WebKitMediaSrc rework
152 patch (https://bugs.webkit.org/show_bug.cgi?id=199719).
154 Unlike other parsers, vorbisparse has latency (in the sense that when
155 it gets a chain call with a series of complete frames, it may not emit
156 the parsed frames until another chain in the future), which makes it
157 inappropriate for AppendPipeline, as there is no good way I know to
160 But actually vorbisparse is not known to be necessary and it was only
161 introduced for consistency with other formats. Parsers are used in
162 AppendPipeline to reconstruct information that is lost due to poor
163 muxes. There have been no reported cases of this being a problem with
164 Vorbis in WebM, so I'm just removing the parser.
166 Fixes imported/w3c/web-platform-tests/media-source/mediasource-config-change-webm-a-bitrate.html
168 * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
169 (WebCore::createOptionalParserForFormat):
171 2019-08-11 Antti Koivisto <antti@apple.com>
173 Factor complex line layout path out from RenderBlockFlow
174 https://bugs.webkit.org/show_bug.cgi?id=200612
176 Reviewed by Zalan Bujtas.
178 This patch factors the line layout code that is currently part of the RenderBlockFlow and lives in RenderBlockLineLayout.cpp
179 into a new ComplexLineLayout class. ComplexLineLayout is a member of RenderBlockFlow.
181 In the future we can stop constructing ComplexLineLayout at all when using other line layout paths.
184 * WebCore.xcodeproj/project.pbxproj:
185 * rendering/ComplexLineLayout.cpp: Copied from Source/WebCore/rendering/RenderBlockLineLayout.cpp.
186 (WebCore::ComplexLineLayout::ComplexLineLayout):
187 (WebCore::ComplexLineLayout::appendRunsForObject):
188 (WebCore::ComplexLineLayout::createRootInlineBox):
189 (WebCore::ComplexLineLayout::createAndAppendRootInlineBox):
190 (WebCore::ComplexLineLayout::createInlineBoxForRenderer):
191 (WebCore::ComplexLineLayout::createLineBoxes):
192 (WebCore::ComplexLineLayout::constructLine):
193 (WebCore::ComplexLineLayout::textAlignmentForLine const):
194 (WebCore::ComplexLineLayout::setMarginsForRubyRun):
195 (WebCore::ComplexLineLayout::updateRubyForJustifiedText):
196 (WebCore::ComplexLineLayout::computeExpansionForJustifiedText):
197 (WebCore::ComplexLineLayout::updateLogicalWidthForAlignment):
198 (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForLine):
199 (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
200 (WebCore::ComplexLineLayout::removeInlineBox const):
201 (WebCore::ComplexLineLayout::computeBlockDirectionPositionsForLine):
202 (WebCore::ComplexLineLayout::handleTrailingSpaces):
203 (WebCore::ComplexLineLayout::appendFloatingObjectToLastLine):
204 (WebCore::ComplexLineLayout::createLineBoxesFromBidiRuns):
205 (WebCore::ComplexLineLayout::layoutRunsAndFloats):
206 (WebCore::ComplexLineLayout::restartLayoutRunsAndFloatsInRange):
207 (WebCore::ComplexLineLayout::layoutRunsAndFloatsInRange):
208 (WebCore::ComplexLineLayout::reattachCleanLineFloats):
209 (WebCore::ComplexLineLayout::linkToEndLineIfNeeded):
210 (WebCore::ComplexLineLayout::layoutLineBoxes):
211 (WebCore::ComplexLineLayout::checkFloatInCleanLine):
212 (WebCore::ComplexLineLayout::determineStartPosition):
213 (WebCore::ComplexLineLayout::determineEndPosition):
214 (WebCore::ComplexLineLayout::checkPaginationAndFloatsAtEndLine):
215 (WebCore::ComplexLineLayout::lineWidthForPaginatedLineChanged const):
216 (WebCore::ComplexLineLayout::matchedEndLine):
217 (WebCore::ComplexLineLayout::addOverflowFromInlineChildren):
218 (WebCore::ComplexLineLayout::deleteEllipsisLineBoxes):
219 (WebCore::ComplexLineLayout::checkLinesForTextOverflow):
220 (WebCore::ComplexLineLayout::positionNewFloatOnLine):
221 (WebCore::ComplexLineLayout::startAlignedOffsetForLine):
222 (WebCore::ComplexLineLayout::updateFragmentForLine const):
223 (WebCore::ComplexLineLayout::style const):
224 (WebCore::ComplexLineLayout::layoutContext const):
225 (WebCore::RenderBlockFlow::appendRunsForObject): Deleted.
226 (WebCore::RenderBlockFlow::createRootInlineBox): Deleted.
227 (WebCore::RenderBlockFlow::createAndAppendRootInlineBox): Deleted.
228 (WebCore::createInlineBoxForRenderer): Deleted.
229 (WebCore::RenderBlockFlow::createLineBoxes): Deleted.
230 (WebCore::RenderBlockFlow::constructLine): Deleted.
231 (WebCore::RenderBlockFlow::textAlignmentForLine const): Deleted.
232 (WebCore::RenderBlockFlow::setMarginsForRubyRun): Deleted.
233 (WebCore::RenderBlockFlow::updateRubyForJustifiedText): Deleted.
234 (WebCore::RenderBlockFlow::computeExpansionForJustifiedText): Deleted.
235 (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment): Deleted.
236 (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine): Deleted.
237 (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment): Deleted.
238 (WebCore::RenderBlockFlow::removeInlineBox const): Deleted.
239 (WebCore::RenderBlockFlow::computeBlockDirectionPositionsForLine): Deleted.
240 (WebCore::RenderBlockFlow::handleTrailingSpaces): Deleted.
241 (WebCore::RenderBlockFlow::appendFloatingObjectToLastLine): Deleted.
242 (WebCore::RenderBlockFlow::createLineBoxesFromBidiRuns): Deleted.
243 (WebCore::RenderBlockFlow::layoutRunsAndFloats): Deleted.
244 (WebCore::RenderBlockFlow::restartLayoutRunsAndFloatsInRange): Deleted.
245 (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange): Deleted.
246 (WebCore::RenderBlockFlow::reattachCleanLineFloats): Deleted.
247 (WebCore::RenderBlockFlow::linkToEndLineIfNeeded): Deleted.
248 (WebCore::RenderBlockFlow::layoutLineBoxes): Deleted.
249 (WebCore::RenderBlockFlow::checkFloatInCleanLine): Deleted.
250 (WebCore::RenderBlockFlow::determineStartPosition): Deleted.
251 (WebCore::RenderBlockFlow::determineEndPosition): Deleted.
252 (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine): Deleted.
253 (WebCore::RenderBlockFlow::lineWidthForPaginatedLineChanged const): Deleted.
254 (WebCore::RenderBlockFlow::matchedEndLine): Deleted.
255 (WebCore::RenderBlock::generatesLineBoxesForInlineChild): Deleted.
256 (WebCore::RenderBlockFlow::addOverflowFromInlineChildren): Deleted.
257 (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes): Deleted.
258 (WebCore::RenderBlockFlow::checkLinesForTextOverflow): Deleted.
259 (WebCore::RenderBlockFlow::positionNewFloatOnLine): Deleted.
260 (WebCore::RenderBlockFlow::startAlignedOffsetForLine): Deleted.
261 (WebCore::RenderBlockFlow::updateFragmentForLine const): Deleted.
262 * rendering/ComplexLineLayout.h: Added.
263 (WebCore::ComplexLineLayout::lineBoxes):
264 (WebCore::ComplexLineLayout::lineBoxes const):
265 (WebCore::ComplexLineLayout::firstRootBox const):
266 (WebCore::ComplexLineLayout::lastRootBox const):
267 * rendering/InlineIterator.h:
268 (WebCore::IsolateTracker::addFakeRunIfNecessary):
269 (WebCore::InlineBidiResolver::appendRunInternal):
270 * rendering/RenderBlock.h:
271 * rendering/RenderBlockFlow.cpp:
272 (WebCore::RenderBlockFlow::RenderBlockFlow):
273 (WebCore::RenderBlockFlow::willBeDestroyed):
274 (WebCore::RenderBlockFlow::layoutInlineChildren):
275 (WebCore::RenderBlockFlow::updateStaticInlinePositionForChild):
276 (WebCore::RenderBlockFlow::deleteLines):
277 (WebCore::RenderBlockFlow::hitTestInlineChildren):
278 (WebCore::RenderBlockFlow::addOverflowFromInlineChildren):
279 (WebCore::RenderBlockFlow::paintInlineChildren):
280 (WebCore::RenderBlockFlow::layoutSimpleLines):
281 (WebCore::RenderBlockFlow::ensureLineBoxes):
282 * rendering/RenderBlockFlow.h:
283 (WebCore::RenderBlockFlow::lineBoxes):
284 (WebCore::RenderBlockFlow::lineBoxes const):
285 (WebCore::RenderBlockFlow::firstRootBox const):
286 (WebCore::RenderBlockFlow::lastRootBox const):
287 (WebCore::RenderBlockFlow::floatingObjects):
288 (WebCore::RenderBlockFlow::complexLineLayout):
289 (WebCore::RenderBlockFlow::overrideTextAlignmentForLine const):
290 (WebCore::RenderBlockFlow::adjustInlineDirectionLineBounds const):
291 * rendering/RenderBlockLineLayout.cpp: Removed.
292 * rendering/RenderRubyBase.cpp:
293 (WebCore::RenderRubyBase::overrideTextAlignmentForLine const):
294 (WebCore::RenderRubyBase::textAlignmentForLine const): Deleted.
295 * rendering/RenderRubyBase.h:
296 * rendering/RenderRubyText.cpp:
297 (WebCore::RenderRubyText::overrideTextAlignmentForLine const):
298 (WebCore::RenderRubyText::textAlignmentForLine const): Deleted.
299 * rendering/RenderRubyText.h:
300 * rendering/SimpleLineLayoutFunctions.cpp:
301 (WebCore::SimpleLineLayout::generateLineBoxTree):
302 * rendering/line/LineBreaker.cpp:
303 (WebCore::LineBreaker::skipLeadingWhitespace):
304 * rendering/line/LineBreaker.h:
305 (WebCore::LineBreaker::positionNewFloatOnLine):
306 * rendering/line/LineInlineHeaders.h:
307 (WebCore::setStaticPositions):
308 * rendering/svg/RenderSVGText.cpp:
309 (WebCore::RenderSVGText::createRootInlineBox): Deleted.
310 * rendering/svg/RenderSVGText.h:
311 * rendering/updating/RenderTreeBuilderList.cpp:
312 (WebCore::generatesLineBoxesForInlineChild):
313 (WebCore::getParentOfFirstLineBox):
315 2019-08-10 Simon Fraser <simon.fraser@apple.com>
317 REGRESSION (r245974): Missing content on habitburger.com, amazon.com
318 https://bugs.webkit.org/show_bug.cgi?id=200618
319 rdar://problem/53920224
321 Reviewed by Zalan Bujtas.
323 In r245974 TileController::adjustTileCoverageRect() started to intersect the coverage
324 rect with the bounds of the layer, which is wrong because this coverage rect is passed down
325 to descendant layers, and they may project outside the bounds of this tiled layer.
327 This caused missing dropdowns on amazon.com, and a missing menu on habitburger.com on iPhone.
329 The fix is to just not do the intersection with the bounds. TileGrid::getTileIndexRangeForRect()
330 already ensures that we never make tiles outside the bounds of a TileController.
332 Test: compositing/backing/layer-outside-tiled-parent.html
334 * platform/graphics/ca/TileController.cpp:
335 (WebCore::TileController::adjustTileCoverageRect):
336 * platform/graphics/ca/TileGrid.cpp:
337 (WebCore::TileGrid::ensureTilesForRect):
339 2019-08-10 Andres Gonzalez <andresg_22@apple.com>
341 Accessibility client cannot navigate to internal links targets on iOS.
342 https://bugs.webkit.org/show_bug.cgi?id=200559
343 <rdar://problem/45242534>
345 Reviewed by Zalan Bujtas.
347 The cause of the problem on iOS is that AccessibilityObject::firstAccessibleObjectFromNode
348 used in AccessibilityRenderObject::linkedUIElements may return an object
349 that is ignored by accessibility clients on iOS, and thus the client
350 would not track the target of an internal link. This change ensures that
351 accessibilityLinkedElement will return a valid accessibility element to
352 the client, if it is exists.
353 * accessibility/AccessibilityObject.cpp:
354 (WebCore::AccessibilityObject::firstAccessibleObjectFromNode):
355 (WebCore::firstAccessibleObjectFromNode):
356 * accessibility/AccessibilityObject.h:
357 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
358 (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
360 2019-08-10 Youenn Fablet <youenn@apple.com>
362 Blob should store its session ID
363 https://bugs.webkit.org/show_bug.cgi?id=200572
365 Reviewed by Darin Adler.
367 Blob at creation time now initializes its session ID.
368 This will allow in the future to call blob registry routines with it.
369 Update all call sites to provide the session ID.
371 No observable change.
373 * Modules/entriesapi/DOMFileSystem.cpp:
374 (WebCore::DOMFileSystem::getFile):
375 * Modules/fetch/FetchBody.cpp:
376 (WebCore::FetchBody::fromFormData):
377 * Modules/fetch/FetchBody.h:
378 * Modules/fetch/FetchBodyConsumer.cpp:
379 (WebCore::blobFromData):
380 (WebCore::resolveWithTypeAndData):
381 (WebCore::FetchBodyConsumer::resolve):
382 (WebCore::FetchBodyConsumer::takeAsBlob):
383 * Modules/fetch/FetchBodyConsumer.h:
384 * Modules/fetch/FetchBodyOwner.cpp:
385 (WebCore::FetchBodyOwner::blob):
386 * Modules/mediarecorder/MediaRecorder.cpp:
387 (WebCore::MediaRecorder::createRecordingDataBlob):
388 * Modules/mediastream/RTCDataChannel.cpp:
389 (WebCore::RTCDataChannel::didReceiveRawData):
390 * Modules/websockets/WebSocket.cpp:
391 (WebCore::WebSocket::didReceiveBinaryData):
392 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
393 (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
394 * bindings/js/JSDOMPromiseDeferred.h:
395 (WebCore::DeferredPromise::sessionID const):
396 * bindings/js/SerializedScriptValue.cpp:
397 (WebCore::CloneDeserializer::readFile):
398 (WebCore::CloneDeserializer::readTerminal):
399 * dom/DataTransfer.cpp:
400 (WebCore::DataTransfer::DataTransfer):
401 (WebCore::DataTransfer::createForCopyAndPaste):
402 (WebCore::DataTransfer::filesFromPasteboardAndItemList const):
403 (WebCore::DataTransfer::createForInputEvent):
404 (WebCore::DataTransfer::createForDrag):
405 (WebCore::DataTransfer::createForDragStartEvent):
406 (WebCore::DataTransfer::createForDrop):
407 (WebCore::DataTransfer::createForUpdatingDropTarget):
408 * dom/DataTransfer.h:
410 (WebCore::Document::originIdentifierForPasteboard const):
412 * editing/ReplaceRangeWithTextCommand.cpp:
413 (WebCore::ReplaceRangeWithTextCommand::inputEventDataTransfer const):
414 * editing/ReplaceSelectionCommand.cpp:
415 (WebCore::ReplaceSelectionCommand::inputEventDataTransfer const):
416 * editing/SpellingCorrectionCommand.cpp:
417 (WebCore::SpellingCorrectionCommand::inputEventDataTransfer const):
418 * editing/TypingCommand.cpp:
419 (WebCore::TypingCommand::inputEventDataTransfer const):
420 * editing/WebCorePasteboardFileReader.cpp:
421 (WebCore::WebCorePasteboardFileReader::readFilename):
422 (WebCore::WebCorePasteboardFileReader::readBuffer):
423 * editing/WebCorePasteboardFileReader.h:
424 * editing/cocoa/WebContentReaderCocoa.mm:
425 (WebCore::createFragmentForImageAttachment):
426 (WebCore::replaceRichContentWithAttachments):
427 (WebCore::createFragmentAndAddResources):
428 (WebCore::sanitizeMarkupWithArchive):
429 (WebCore::WebContentReader::readImage):
430 (WebCore::attachmentForFilePath):
431 (WebCore::attachmentForData):
432 * editing/markup.cpp:
433 (WebCore::restoreAttachmentElementsInFragment):
435 (WebCore::Blob::Blob):
437 (WebCore::Blob::create):
438 (WebCore::Blob::deserialize):
439 (WebCore::Blob::slice const):
442 (WebCore::File::createWithRelativePath):
443 (WebCore::File::File):
446 * html/FileInputType.cpp:
447 (WebCore::FileInputType::appendFormData const):
448 (WebCore::FileInputType::filesChosen):
449 * html/FileListCreator.cpp:
450 (WebCore::appendDirectoryFiles):
451 (WebCore::FileListCreator::FileListCreator):
452 (WebCore::FileListCreator::createFileList):
453 * html/FileListCreator.h:
454 (WebCore::FileListCreator::create):
455 * html/HTMLAttachmentElement.cpp:
456 (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
457 * html/HTMLCanvasElement.cpp:
458 (WebCore::HTMLCanvasElement::toBlob):
459 * page/EventHandler.cpp:
460 (WebCore::EventHandler::handleDrag):
461 * testing/Internals.cpp:
462 (WebCore::Internals::createFile):
463 * testing/ServiceWorkerInternals.cpp:
464 (WebCore::ServiceWorkerInternals::createOpaqueWithBlobBodyResponse):
465 * workers/service/context/ServiceWorkerFetch.cpp:
466 (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
467 * xml/XMLHttpRequest.cpp:
468 (WebCore::XMLHttpRequest::createResponseBlob):
470 2019-08-10 Alex Christensen <achristensen@webkit.org>
472 Disable ContentChangeObserver TouchEvent adjustment on youtube.com on iOS in mobile browsing mode
473 https://bugs.webkit.org/show_bug.cgi?id=200609
474 <rdar://problem/54015403>
476 Reviewed by Maciej Stachowiak.
478 When watching a youtube video on iOS with "Autoplay" switched to off,
479 upon finishing the video all clicks anywhere on the page are effectively ignored.
480 Disabling ContentChangeObserver's TouchEvent adjustment fixes this bug. I verified this manually.
481 This switch was introduced in r242621, and it disables part of a new feature, so there is low risk of fallout.
483 * loader/DocumentLoader.h:
484 (WebCore::DocumentLoader::setAllowContentChangeObserverQuirk):
485 (WebCore::DocumentLoader::allowContentChangeObserverQuirk const):
487 (WebCore::Quirks::shouldDisableContentChangeObserverTouchEventAdjustment const):
489 * page/ios/ContentChangeObserver.cpp:
490 (WebCore::ContentChangeObserver::touchEventDidStart):
492 2019-08-10 Said Abou-Hallawa <sabouhallawa@apple.com>
494 [iOS] Add a quirk for gmail.com messages on iPhone iOS13
495 https://bugs.webkit.org/show_bug.cgi?id=200605
497 Reviewed by Maciej Stachowiak.
499 Add a quirk which sets the user agent for gmail.com messages on iPhone
500 OS 13 to be iPhone OS 12. This is a workaround for a gmail.com bug till
504 (WebCore::Quirks::shouldAvoidUsingIOS13ForGmail const):
506 * platform/UserAgent.h:
507 * platform/ios/UserAgentIOS.mm:
508 (WebCore::osNameForUserAgent):
509 (WebCore::standardUserAgentWithApplicationName):
510 * platform/mac/UserAgentMac.mm:
511 (WebCore::standardUserAgentWithApplicationName):
513 2019-08-10 Thibault Saunier <tsaunier@igalia.com>
515 [GStreamer][WebRTC] Remove unused GstAdapter
516 https://bugs.webkit.org/show_bug.cgi?id=200585
518 Reviewed by Philippe Normand.
522 * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
523 (WebCore::GStreamerVideoEncoder::GStreamerVideoEncoder):
525 2019-08-10 Antti Koivisto <antti@apple.com>
527 Can’t sort videos on a YouTube channel page on iPad
528 https://bugs.webkit.org/show_bug.cgi?id=200573
529 <rdar://problem/53415195>
531 Reviewed by Darin Adler.
533 Add a quirk to make touch events non-cancelable (preventDefault() does nothing).
536 (WebCore::Quirks::shouldMakeTouchEventNonCancelableForTarget const):
539 2019-08-10 Devin Rousso <drousso@apple.com>
541 Web Inspector: REGRESSION(r248454): WK1 inspector frontend client doesn't queue messages to the frontend before it's loaded
542 https://bugs.webkit.org/show_bug.cgi?id=200587
544 Reviewed by Joseph Pecoraro.
546 WK1 inspector sends messages to the frontend using `WebCore::InspectorClient::doDispatchMessageOnFrontendPage`,
547 which does not do any sort of queueing to wait until the frontend is loaded (`InspectorFrontendHost.loaded()`).
549 Now that we are sending messages immediately, we should always queue.
551 Covered by existing tests (which were failing after r248454, and now won't fail).
553 * inspector/InspectorFrontendClientLocal.h:
554 * inspector/InspectorFrontendClientLocal.cpp:
555 (WebCore::InspectorFrontendClientLocal::setDockingUnavailable):
556 (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
557 (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
558 (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
559 (WebCore::InspectorFrontendClientLocal::startProfilingJavaScript):
560 (WebCore::InspectorFrontendClientLocal::stopProfilingJavaScript):
561 (WebCore::InspectorFrontendClientLocal::showConsole):
562 (WebCore::InspectorFrontendClientLocal::showResources):
563 (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
564 (WebCore::InspectorFrontendClientLocal::dispatch): Added.
565 (WebCore::InspectorFrontendClientLocal::dispatchMessage): Added.
566 (WebCore::InspectorFrontendClientLocal::dispatchMessageAsync): Added.
567 (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
568 Provide additional ways for subclasses to call other `InspectorFrontendAPI` methods using
571 * testing/Internals.cpp:
572 (WebCore::InspectorStubFrontend::sendMessageToFrontend):
573 (WebCore::InspectorStubFrontend::frontendLoaded): Deleted.
574 Leverage the base `InspectorFrontendClientLocal`'s functions for queueing messages.
576 * inspector/InspectorClient.h:
577 * inspector/InspectorClient.cpp: Removed.
578 (WebCore::InspectorClient::doDispatchMessageOnFrontendPage): Deleted.
580 * inspector/agents/InspectorTimelineAgent.cpp:
584 * WebCore.xcodeproj/project.pbxproj:
586 2019-08-09 Yusuke Suzuki <ysuzuki@apple.com>
588 Universal XSS in JSObject::putInlineSlow and JSValue::putToPrimitive
589 https://bugs.webkit.org/show_bug.cgi?id=199864
591 Reviewed by Saam Barati.
593 Test: http/tests/security/cross-frame-access-object-put-optimization.html
595 * bindings/js/JSDOMWindowCustom.cpp:
596 (WebCore::JSDOMWindow::doPutPropertySecurityCheck):
597 * bindings/js/JSLocationCustom.cpp:
598 (WebCore::JSLocation::doPutPropertySecurityCheck):
599 * bindings/scripts/CodeGeneratorJS.pm:
601 * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
603 2019-08-09 Saam Barati <sbarati@apple.com>
605 When I did the devirtualization of the AST in r248488, I needed to
606 update the various type checks under the Type class hierarchy
607 operate on Type itself, since we now downcast straight from Type
608 instead of UnnamedType, ResolvableType, and NamedType.
610 * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
611 * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
612 * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
613 * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
614 * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
615 * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
616 * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
617 * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
618 * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
619 * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
620 * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
621 * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
622 * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
623 * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
624 * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
625 * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
627 2019-08-09 Chris Dumez <cdumez@apple.com>
629 Possible non-thread safe usage of RefCounted in ~VideoFullscreenControllerContext()
630 https://bugs.webkit.org/show_bug.cgi?id=200599
632 Reviewed by Geoffrey Garen.
634 WebVideoFullscreenControllerAVKit's m_playbackModel & m_fullscreenModel data members are
635 WebThread objects so we need to make sure we grab the WebThread lock before dereferencing
636 them in the WebVideoFullscreenControllerAVKit destructor, when destroyed on the UIThread.
638 * platform/ios/WebVideoFullscreenControllerAVKit.mm:
639 (VideoFullscreenControllerContext::~VideoFullscreenControllerContext):
641 2019-08-09 Ali Juma <ajuma@chromium.org>
643 Don't allow cross-origin iframes to autofocus
644 https://bugs.webkit.org/show_bug.cgi?id=200515
645 <rdar://problem/54092988>
647 Reviewed by Ryosuke Niwa.
649 According to Step 6 in the WhatWG Spec (https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofocusing-a-form-control:-the-autofocus-attribute),
650 the 'autofocus' attribute shouldn't work for cross-origin iframes.
652 This change is based on the Blink change (patch by <mustaq@chromium.org>):
653 <https://chromium-review.googlesource.com/c/chromium/src/+/1593026>
655 Also disallow cross-origin iframes from focusing programmatically without ever having
656 had any user interaction.
658 * dom/Element.cpp: Check if an invalid frame is trying to grab the focus.
659 (WebCore::Element::focus):
660 * html/HTMLFormControlElement.cpp: Check if the focus is moving to an invalid frame.
661 (WebCore::shouldAutofocus):
662 * page/DOMWindow.cpp: Check if an invalid frame is trying to grab the focus.
663 (WebCore::DOMWindow::focus):
665 2019-08-09 Saam Barati <sbarati@apple.com>
667 [WHLSL] Devirtualize the AST
668 https://bugs.webkit.org/show_bug.cgi?id=200522
670 Reviewed by Robin Morisset.
672 This patch devirtualizes the AST for Type, Expression, and Statement.
673 We now have an enum which represents all the concrete types in the
674 three hierarchies. Doing dynamic dispatch is implemented as a switch
677 The interesting part of this patch is how to handle destruction. We do
678 this by defining a custom deleter for all nodes in the AST. This ensures
679 that when they're used inside UniqueRef, unique_ptr, Ref, and RefPtr,
680 we do dynamic dispatch when we delete the object. This allows each base
681 class to define a "destroy" method which does dynamic dispatch on type
682 and calls the appropriate delete. We also mark all non-concrete nodes
683 in all type hierarchies with a protected destructor, which ensures it's
684 never called except from within the concrete child classes. We allow
685 all concrete classes to have public destructors, as it's valid for
686 their destructors to be called explicitly since there is no need for
687 dynamic dispatch in such scenarios. All concrete classes are also marked
690 This is a 3ms speedup on compute_boids, which is about a 10% improvement
691 in the WHLSL compiler.
693 * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
694 * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
695 * Modules/webgpu/WHLSL/AST/WHLSLAssignmentExpression.h:
696 (WebCore::WHLSL::AST::AssignmentExpression::AssignmentExpression): Deleted.
697 (WebCore::WHLSL::AST::AssignmentExpression::left): Deleted.
698 (WebCore::WHLSL::AST::AssignmentExpression::right): Deleted.
699 (WebCore::WHLSL::AST::AssignmentExpression::takeRight): Deleted.
700 * Modules/webgpu/WHLSL/AST/WHLSLBlock.h:
701 (WebCore::WHLSL::AST::Block::Block): Deleted.
702 (WebCore::WHLSL::AST::Block::statements): Deleted.
703 * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
704 (WebCore::WHLSL::AST::BooleanLiteral::BooleanLiteral): Deleted.
705 (WebCore::WHLSL::AST::BooleanLiteral::value const): Deleted.
706 (WebCore::WHLSL::AST::BooleanLiteral::clone const): Deleted.
707 * Modules/webgpu/WHLSL/AST/WHLSLBreak.h:
708 (WebCore::WHLSL::AST::Break::Break): Deleted.
709 * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
710 (WebCore::WHLSL::AST::CallExpression::CallExpression): Deleted.
711 (WebCore::WHLSL::AST::CallExpression::arguments): Deleted.
712 (WebCore::WHLSL::AST::CallExpression::name): Deleted.
713 (WebCore::WHLSL::AST::CallExpression::setCastData): Deleted.
714 (WebCore::WHLSL::AST::CallExpression::isCast): Deleted.
715 (WebCore::WHLSL::AST::CallExpression::castReturnType): Deleted.
716 (WebCore::WHLSL::AST::CallExpression::function): Deleted.
717 (WebCore::WHLSL::AST::CallExpression::setFunction): Deleted.
718 * Modules/webgpu/WHLSL/AST/WHLSLCommaExpression.h:
719 (WebCore::WHLSL::AST::CommaExpression::CommaExpression): Deleted.
720 (WebCore::WHLSL::AST::CommaExpression::list): Deleted.
721 * Modules/webgpu/WHLSL/AST/WHLSLConstantExpression.h:
722 (WebCore::WHLSL::AST::ConstantExpression::ConstantExpression): Deleted.
723 (WebCore::WHLSL::AST::ConstantExpression::integerLiteral): Deleted.
724 (WebCore::WHLSL::AST::ConstantExpression::visit): Deleted.
725 (WebCore::WHLSL::AST::ConstantExpression::visit const): Deleted.
726 (WebCore::WHLSL::AST::ConstantExpression::clone const): Deleted.
727 (WebCore::WHLSL::AST::ConstantExpression::matches const): Deleted.
728 * Modules/webgpu/WHLSL/AST/WHLSLContinue.h:
729 (WebCore::WHLSL::AST::Continue::Continue): Deleted.
730 * Modules/webgpu/WHLSL/AST/WHLSLDefaultDelete.h: Added.
731 * Modules/webgpu/WHLSL/AST/WHLSLDereferenceExpression.h:
732 (WebCore::WHLSL::AST::DereferenceExpression::DereferenceExpression): Deleted.
733 (WebCore::WHLSL::AST::DereferenceExpression::pointer): Deleted.
734 * Modules/webgpu/WHLSL/AST/WHLSLDoWhileLoop.h:
735 (WebCore::WHLSL::AST::DoWhileLoop::DoWhileLoop): Deleted.
736 (WebCore::WHLSL::AST::DoWhileLoop::body): Deleted.
737 (WebCore::WHLSL::AST::DoWhileLoop::conditional): Deleted.
738 * Modules/webgpu/WHLSL/AST/WHLSLDotExpression.h:
739 (WebCore::WHLSL::AST::DotExpression::DotExpression): Deleted.
740 (WebCore::WHLSL::AST::DotExpression::fieldName): Deleted.
741 * Modules/webgpu/WHLSL/AST/WHLSLEffectfulExpressionStatement.h:
742 (WebCore::WHLSL::AST::EffectfulExpressionStatement::EffectfulExpressionStatement): Deleted.
743 (WebCore::WHLSL::AST::EffectfulExpressionStatement::effectfulExpression): Deleted.
744 * Modules/webgpu/WHLSL/AST/WHLSLEnumerationDefinition.h:
745 (WebCore::WHLSL::AST::EnumerationDefinition::EnumerationDefinition): Deleted.
746 (WebCore::WHLSL::AST::EnumerationDefinition::type): Deleted.
747 (WebCore::WHLSL::AST::EnumerationDefinition::add): Deleted.
748 (WebCore::WHLSL::AST::EnumerationDefinition::memberByName): Deleted.
749 (WebCore::WHLSL::AST::EnumerationDefinition::enumerationMembers): Deleted.
750 * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
751 (WebCore::WHLSL::AST::EnumerationMemberLiteral::EnumerationMemberLiteral): Deleted.
752 (WebCore::WHLSL::AST::EnumerationMemberLiteral::wrap): Deleted.
753 (WebCore::WHLSL::AST::EnumerationMemberLiteral::left const): Deleted.
754 (WebCore::WHLSL::AST::EnumerationMemberLiteral::right const): Deleted.
755 (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const): Deleted.
756 (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition): Deleted.
757 (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationDefinition const): Deleted.
758 (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember): Deleted.
759 (WebCore::WHLSL::AST::EnumerationMemberLiteral::enumerationMember const): Deleted.
760 (WebCore::WHLSL::AST::EnumerationMemberLiteral::setEnumerationMember): Deleted.
761 * Modules/webgpu/WHLSL/AST/WHLSLExpression.cpp: Added.
762 (WebCore::WHLSL::AST::Expression::destroy):
763 (WebCore::WHLSL::AST::PropertyAccessExpression::getterFunctionName const):
764 (WebCore::WHLSL::AST::PropertyAccessExpression::setterFunctionName const):
765 (WebCore::WHLSL::AST::PropertyAccessExpression::anderFunctionName const):
766 * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
767 (WebCore::WHLSL::AST::Expression::Expression):
768 (WebCore::WHLSL::AST::Expression::kind const):
769 (WebCore::WHLSL::AST::Expression::isAssignmentExpression const):
770 (WebCore::WHLSL::AST::Expression::isBooleanLiteral const):
771 (WebCore::WHLSL::AST::Expression::isCallExpression const):
772 (WebCore::WHLSL::AST::Expression::isCommaExpression const):
773 (WebCore::WHLSL::AST::Expression::isDereferenceExpression const):
774 (WebCore::WHLSL::AST::Expression::isDotExpression const):
775 (WebCore::WHLSL::AST::Expression::isGlobalVariableReference const):
776 (WebCore::WHLSL::AST::Expression::isFloatLiteral const):
777 (WebCore::WHLSL::AST::Expression::isIndexExpression const):
778 (WebCore::WHLSL::AST::Expression::isIntegerLiteral const):
779 (WebCore::WHLSL::AST::Expression::isLogicalExpression const):
780 (WebCore::WHLSL::AST::Expression::isLogicalNotExpression const):
781 (WebCore::WHLSL::AST::Expression::isMakeArrayReferenceExpression const):
782 (WebCore::WHLSL::AST::Expression::isMakePointerExpression const):
783 (WebCore::WHLSL::AST::Expression::isNullLiteral const):
784 (WebCore::WHLSL::AST::Expression::isPropertyAccessExpression const):
785 (WebCore::WHLSL::AST::Expression::isReadModifyWriteExpression const):
786 (WebCore::WHLSL::AST::Expression::isTernaryExpression const):
787 (WebCore::WHLSL::AST::Expression::isUnsignedIntegerLiteral const):
788 (WebCore::WHLSL::AST::Expression::isVariableReference const):
789 (WebCore::WHLSL::AST::Expression::isEnumerationMemberLiteral const):
790 (WebCore::WHLSL::AST::Expression::codeLocation const):
791 (WebCore::WHLSL::AST::Expression::updateCodeLocation):
792 * Modules/webgpu/WHLSL/AST/WHLSLFallthrough.h:
793 (WebCore::WHLSL::AST::Fallthrough::Fallthrough): Deleted.
794 * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
795 (WebCore::WHLSL::AST::FloatLiteral::FloatLiteral): Deleted.
796 (WebCore::WHLSL::AST::FloatLiteral::type): Deleted.
797 (WebCore::WHLSL::AST::FloatLiteral::value const): Deleted.
798 (WebCore::WHLSL::AST::FloatLiteral::clone const): Deleted.
799 * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
800 (WebCore::WHLSL::AST::FloatLiteralType::FloatLiteralType):
801 * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
802 (WebCore::WHLSL::AST::FloatLiteralType::value const): Deleted.
803 (WebCore::WHLSL::AST::FloatLiteralType::preferredType): Deleted.
804 * Modules/webgpu/WHLSL/AST/WHLSLForLoop.h:
805 (WebCore::WHLSL::AST::ForLoop::ForLoop): Deleted.
806 (WebCore::WHLSL::AST::ForLoop::~ForLoop): Deleted.
807 (WebCore::WHLSL::AST::ForLoop::initialization): Deleted.
808 (WebCore::WHLSL::AST::ForLoop::condition): Deleted.
809 (WebCore::WHLSL::AST::ForLoop::increment): Deleted.
810 (WebCore::WHLSL::AST::ForLoop::body): Deleted.
811 * Modules/webgpu/WHLSL/AST/WHLSLGlobalVariableReference.h:
812 (WebCore::WHLSL::AST::GlobalVariableReference::GlobalVariableReference): Deleted.
813 (WebCore::WHLSL::AST::GlobalVariableReference::structField): Deleted.
814 (WebCore::WHLSL::AST::GlobalVariableReference::base): Deleted.
815 * Modules/webgpu/WHLSL/AST/WHLSLIfStatement.h:
816 (WebCore::WHLSL::AST::IfStatement::IfStatement): Deleted.
817 (WebCore::WHLSL::AST::IfStatement::conditional): Deleted.
818 (WebCore::WHLSL::AST::IfStatement::body): Deleted.
819 (WebCore::WHLSL::AST::IfStatement::elseBody): Deleted.
820 * Modules/webgpu/WHLSL/AST/WHLSLIndexExpression.h:
821 (WebCore::WHLSL::AST::IndexExpression::IndexExpression): Deleted.
822 (WebCore::WHLSL::AST::IndexExpression::indexExpression): Deleted.
823 (WebCore::WHLSL::AST::IndexExpression::takeIndex): Deleted.
824 * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
825 (WebCore::WHLSL::AST::IntegerLiteral::IntegerLiteral): Deleted.
826 (WebCore::WHLSL::AST::IntegerLiteral::type): Deleted.
827 (WebCore::WHLSL::AST::IntegerLiteral::value const): Deleted.
828 (WebCore::WHLSL::AST::IntegerLiteral::clone const): Deleted.
829 * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
830 (WebCore::WHLSL::AST::IntegerLiteralType::IntegerLiteralType):
831 * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
832 (WebCore::WHLSL::AST::IntegerLiteralType::value const): Deleted.
833 (WebCore::WHLSL::AST::IntegerLiteralType::preferredType): Deleted.
834 * Modules/webgpu/WHLSL/AST/WHLSLLogicalExpression.h:
835 (WebCore::WHLSL::AST::LogicalExpression::LogicalExpression): Deleted.
836 (WebCore::WHLSL::AST::LogicalExpression::type const): Deleted.
837 (WebCore::WHLSL::AST::LogicalExpression::left): Deleted.
838 (WebCore::WHLSL::AST::LogicalExpression::right): Deleted.
839 * Modules/webgpu/WHLSL/AST/WHLSLLogicalNotExpression.h:
840 (WebCore::WHLSL::AST::LogicalNotExpression::LogicalNotExpression): Deleted.
841 (WebCore::WHLSL::AST::LogicalNotExpression::operand): Deleted.
842 * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
843 (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression): Deleted.
844 (WebCore::WHLSL::AST::MakeArrayReferenceExpression::leftValue): Deleted.
845 (WebCore::WHLSL::AST::MakeArrayReferenceExpression::mightEscape const): Deleted.
846 * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
847 (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression): Deleted.
848 (WebCore::WHLSL::AST::MakePointerExpression::leftValue): Deleted.
849 (WebCore::WHLSL::AST::MakePointerExpression::mightEscape const): Deleted.
850 * Modules/webgpu/WHLSL/AST/WHLSLNamedType.h:
851 (WebCore::WHLSL::AST::NamedType::NamedType):
852 (WebCore::WHLSL::AST::NamedType::unifyNodeImpl):
854 (WebCore::WHLSL::AST::NamedType::isTypeDefinition const): Deleted.
855 (WebCore::WHLSL::AST::NamedType::isStructureDefinition const): Deleted.
856 (WebCore::WHLSL::AST::NamedType::isEnumerationDefinition const): Deleted.
857 (WebCore::WHLSL::AST::NamedType::isNativeTypeDeclaration const): Deleted.
858 (WebCore::WHLSL::AST::NamedType::unifyNode const): Deleted.
859 (WebCore::WHLSL::AST::NamedType::unifyNode): Deleted.
860 * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h:
861 (WebCore::WHLSL::AST::NativeTypeDeclaration::NativeTypeDeclaration): Deleted.
862 (WebCore::WHLSL::AST::NativeTypeDeclaration::typeArguments): Deleted.
863 (WebCore::WHLSL::AST::NativeTypeDeclaration::isInt const): Deleted.
864 (WebCore::WHLSL::AST::NativeTypeDeclaration::isNumber const): Deleted.
865 (WebCore::WHLSL::AST::NativeTypeDeclaration::isFloating const): Deleted.
866 (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const): Deleted.
867 (WebCore::WHLSL::AST::NativeTypeDeclaration::isVector const): Deleted.
868 (WebCore::WHLSL::AST::NativeTypeDeclaration::isMatrix const): Deleted.
869 (WebCore::WHLSL::AST::NativeTypeDeclaration::isOpaqueType const): Deleted.
870 (WebCore::WHLSL::AST::NativeTypeDeclaration::isTexture const): Deleted.
871 (WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const): Deleted.
872 (WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const): Deleted.
873 (WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const): Deleted.
874 (WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const): Deleted.
875 (WebCore::WHLSL::AST::NativeTypeDeclaration::isSigned const): Deleted.
876 (WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<bool const): Deleted.
877 (WebCore::WHLSL::AST::NativeTypeDeclaration::std::function<int64_t const): Deleted.
878 (WebCore::WHLSL::AST::NativeTypeDeclaration::iterateAllValues): Deleted.
879 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsInt): Deleted.
880 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsNumber): Deleted.
881 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsFloating): Deleted.
882 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsAtomic): Deleted.
883 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsVector): Deleted.
884 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsMatrix): Deleted.
885 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsOpaqueType): Deleted.
886 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTexture): Deleted.
887 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray): Deleted.
888 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture): Deleted.
889 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture): Deleted.
890 (WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension): Deleted.
891 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsSigned): Deleted.
892 (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentInteger): Deleted.
893 (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentUnsignedInteger): Deleted.
894 (WebCore::WHLSL::AST::NativeTypeDeclaration::setCanRepresentFloat): Deleted.
895 (WebCore::WHLSL::AST::NativeTypeDeclaration::setSuccessor): Deleted.
896 (WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromInteger): Deleted.
897 (WebCore::WHLSL::AST::NativeTypeDeclaration::setFormatValueFromUnsignedInteger): Deleted.
898 (WebCore::WHLSL::AST::NativeTypeDeclaration::setIterateAllValues): Deleted.
899 * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
900 (WebCore::WHLSL::AST::NullLiteral::NullLiteral): Deleted.
901 (WebCore::WHLSL::AST::NullLiteral::type): Deleted.
902 (WebCore::WHLSL::AST::NullLiteral::clone const): Deleted.
903 * Modules/webgpu/WHLSL/AST/WHLSLNullLiteralType.h:
904 * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
905 * Modules/webgpu/WHLSL/AST/WHLSLPropertyAccessExpression.h:
906 (WebCore::WHLSL::AST::PropertyAccessExpression::PropertyAccessExpression):
907 * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
908 (WebCore::WHLSL::AST::ReadModifyWriteExpression::create): Deleted.
909 (WebCore::WHLSL::AST::ReadModifyWriteExpression::setNewValueExpression): Deleted.
910 (WebCore::WHLSL::AST::ReadModifyWriteExpression::setResultExpression): Deleted.
911 (WebCore::WHLSL::AST::ReadModifyWriteExpression::oldVariableReference): Deleted.
912 (WebCore::WHLSL::AST::ReadModifyWriteExpression::newVariableReference): Deleted.
913 (WebCore::WHLSL::AST::ReadModifyWriteExpression::leftValue): Deleted.
914 (WebCore::WHLSL::AST::ReadModifyWriteExpression::oldValue): Deleted.
915 (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValue): Deleted.
916 (WebCore::WHLSL::AST::ReadModifyWriteExpression::newValueExpression): Deleted.
917 (WebCore::WHLSL::AST::ReadModifyWriteExpression::resultExpression): Deleted.
918 (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeLeftValue): Deleted.
919 (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeOldValue): Deleted.
920 (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValue): Deleted.
921 (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeNewValueExpression): Deleted.
922 (WebCore::WHLSL::AST::ReadModifyWriteExpression::takeResultExpression): Deleted.
923 (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression): Deleted.
924 * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
925 (WebCore::WHLSL::AST::ReferenceType::ReferenceType):
926 * Modules/webgpu/WHLSL/AST/WHLSLResolvableType.h:
927 (WebCore::WHLSL::AST::ResolvableType::ResolvableType):
929 (WebCore::WHLSL::AST::ResolvableType::isFloatLiteralType const): Deleted.
930 (WebCore::WHLSL::AST::ResolvableType::isIntegerLiteralType const): Deleted.
931 (WebCore::WHLSL::AST::ResolvableType::isNullLiteralType const): Deleted.
932 (WebCore::WHLSL::AST::ResolvableType::isUnsignedIntegerLiteralType const): Deleted.
933 * Modules/webgpu/WHLSL/AST/WHLSLReturn.h:
934 (WebCore::WHLSL::AST::Return::Return): Deleted.
935 (WebCore::WHLSL::AST::Return::value): Deleted.
936 * Modules/webgpu/WHLSL/AST/WHLSLStatement.cpp: Added.
937 (WebCore::WHLSL::AST::Statement::destroy):
938 * Modules/webgpu/WHLSL/AST/WHLSLStatement.h:
939 (WebCore::WHLSL::AST::Statement::Statement):
940 (WebCore::WHLSL::AST::Statement::kind const):
941 (WebCore::WHLSL::AST::Statement::isBlock const):
942 (WebCore::WHLSL::AST::Statement::isBreak const):
943 (WebCore::WHLSL::AST::Statement::isContinue const):
944 (WebCore::WHLSL::AST::Statement::isDoWhileLoop const):
945 (WebCore::WHLSL::AST::Statement::isEffectfulExpressionStatement const):
946 (WebCore::WHLSL::AST::Statement::isFallthrough const):
947 (WebCore::WHLSL::AST::Statement::isForLoop const):
948 (WebCore::WHLSL::AST::Statement::isIfStatement const):
949 (WebCore::WHLSL::AST::Statement::isReturn const):
950 (WebCore::WHLSL::AST::Statement::isStatementList const):
951 (WebCore::WHLSL::AST::Statement::isSwitchCase const):
952 (WebCore::WHLSL::AST::Statement::isSwitchStatement const):
953 (WebCore::WHLSL::AST::Statement::isVariableDeclarationsStatement const):
954 (WebCore::WHLSL::AST::Statement::isWhileLoop const):
955 (WebCore::WHLSL::AST::Statement::codeLocation const):
956 (WebCore::WHLSL::AST::Statement::updateCodeLocation):
957 * Modules/webgpu/WHLSL/AST/WHLSLStatementList.h:
958 (WebCore::WHLSL::AST::StatementList::StatementList): Deleted.
959 (WebCore::WHLSL::AST::StatementList::statements): Deleted.
960 * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
961 (WebCore::WHLSL::AST::StructureDefinition::StructureDefinition): Deleted.
962 (WebCore::WHLSL::AST::StructureDefinition::structureElements): Deleted.
963 (WebCore::WHLSL::AST::StructureDefinition::find): Deleted.
964 * Modules/webgpu/WHLSL/AST/WHLSLStructureElement.h:
965 (WebCore::WHLSL::AST::StructureElement::StructureElement): Deleted.
966 (WebCore::WHLSL::AST::StructureElement::codeLocation const): Deleted.
967 (WebCore::WHLSL::AST::StructureElement::type): Deleted.
968 (WebCore::WHLSL::AST::StructureElement::name): Deleted.
969 (WebCore::WHLSL::AST::StructureElement::semantic): Deleted.
970 * Modules/webgpu/WHLSL/AST/WHLSLSwitchCase.h:
971 (WebCore::WHLSL::AST::SwitchCase::SwitchCase): Deleted.
972 (WebCore::WHLSL::AST::SwitchCase::value): Deleted.
973 (WebCore::WHLSL::AST::SwitchCase::block): Deleted.
974 * Modules/webgpu/WHLSL/AST/WHLSLSwitchStatement.h:
975 (WebCore::WHLSL::AST::SwitchStatement::SwitchStatement): Deleted.
976 (WebCore::WHLSL::AST::SwitchStatement::value): Deleted.
977 (WebCore::WHLSL::AST::SwitchStatement::switchCases): Deleted.
978 * Modules/webgpu/WHLSL/AST/WHLSLTernaryExpression.h:
979 (WebCore::WHLSL::AST::TernaryExpression::TernaryExpression): Deleted.
980 (WebCore::WHLSL::AST::TernaryExpression::predicate): Deleted.
981 (WebCore::WHLSL::AST::TernaryExpression::bodyExpression): Deleted.
982 (WebCore::WHLSL::AST::TernaryExpression::elseExpression): Deleted.
983 * Modules/webgpu/WHLSL/AST/WHLSLType.cpp: Added.
984 (WebCore::WHLSL::AST::Type::destroy):
985 (WebCore::WHLSL::AST::Type::unifyNode):
986 (WebCore::WHLSL::AST::ResolvableType::canResolve const):
987 (WebCore::WHLSL::AST::ResolvableType::conversionCost const):
988 (WebCore::WHLSL::AST::UnnamedType::toString const):
989 * Modules/webgpu/WHLSL/AST/WHLSLType.h:
990 (WebCore::WHLSL::AST::Type::Type):
991 (WebCore::WHLSL::AST::Type::kind const):
992 (WebCore::WHLSL::AST::Type::isUnnamedType const):
993 (WebCore::WHLSL::AST::Type::isNamedType const):
994 (WebCore::WHLSL::AST::Type::isResolvableType const):
995 (WebCore::WHLSL::AST::Type::isTypeReference const):
996 (WebCore::WHLSL::AST::Type::isPointerType const):
997 (WebCore::WHLSL::AST::Type::isArrayReferenceType const):
998 (WebCore::WHLSL::AST::Type::isArrayType const):
999 (WebCore::WHLSL::AST::Type::isReferenceType const):
1000 (WebCore::WHLSL::AST::Type::isTypeDefinition const):
1001 (WebCore::WHLSL::AST::Type::isStructureDefinition const):
1002 (WebCore::WHLSL::AST::Type::isEnumerationDefinition const):
1003 (WebCore::WHLSL::AST::Type::isNativeTypeDeclaration const):
1004 (WebCore::WHLSL::AST::Type::isFloatLiteralType const):
1005 (WebCore::WHLSL::AST::Type::isIntegerLiteralType const):
1006 (WebCore::WHLSL::AST::Type::isNullLiteralType const):
1007 (WebCore::WHLSL::AST::Type::isUnsignedIntegerLiteralType const):
1008 (WebCore::WHLSL::AST::Type::unifyNode const):
1009 * Modules/webgpu/WHLSL/AST/WHLSLTypeDefinition.h:
1010 (WebCore::WHLSL::AST::TypeDefinition::TypeDefinition): Deleted.
1011 (WebCore::WHLSL::AST::TypeDefinition::type): Deleted.
1012 * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
1013 * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp:
1014 (WebCore::WHLSL::AST::UnnamedType::hash const):
1015 (WebCore::WHLSL::AST::UnnamedType::operator== const):
1016 * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
1017 (WebCore::WHLSL::AST::UnnamedType::UnnamedType):
1018 (WebCore::WHLSL::AST::UnnamedType::unifyNodeImpl):
1020 (WebCore::WHLSL::AST::UnnamedType::kind const): Deleted.
1021 (WebCore::WHLSL::AST::UnnamedType::isTypeReference const): Deleted.
1022 (WebCore::WHLSL::AST::UnnamedType::isPointerType const): Deleted.
1023 (WebCore::WHLSL::AST::UnnamedType::isArrayReferenceType const): Deleted.
1024 (WebCore::WHLSL::AST::UnnamedType::isArrayType const): Deleted.
1025 (WebCore::WHLSL::AST::UnnamedType::isReferenceType const): Deleted.
1026 (WebCore::WHLSL::AST::UnnamedType::unifyNode const): Deleted.
1027 (WebCore::WHLSL::AST::UnnamedType::unifyNode): Deleted.
1028 * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
1029 (WebCore::WHLSL::AST::UnsignedIntegerLiteral::UnsignedIntegerLiteral): Deleted.
1030 (WebCore::WHLSL::AST::UnsignedIntegerLiteral::type): Deleted.
1031 (WebCore::WHLSL::AST::UnsignedIntegerLiteral::value const): Deleted.
1032 (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const): Deleted.
1033 * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
1034 (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::UnsignedIntegerLiteralType):
1035 * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
1036 (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::value const): Deleted.
1037 (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::preferredType): Deleted.
1038 * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclarationsStatement.h:
1039 (WebCore::WHLSL::AST::VariableDeclarationsStatement::VariableDeclarationsStatement): Deleted.
1040 (WebCore::WHLSL::AST::VariableDeclarationsStatement::variableDeclarations): Deleted.
1041 * Modules/webgpu/WHLSL/AST/WHLSLVariableReference.h:
1042 (WebCore::WHLSL::AST::VariableReference::VariableReference): Deleted.
1043 (WebCore::WHLSL::AST::VariableReference::wrap): Deleted.
1044 (WebCore::WHLSL::AST::VariableReference::name): Deleted.
1045 (WebCore::WHLSL::AST::VariableReference::variable): Deleted.
1046 (WebCore::WHLSL::AST::VariableReference::setVariable): Deleted.
1047 * Modules/webgpu/WHLSL/AST/WHLSLWhileLoop.h:
1048 (WebCore::WHLSL::AST::WhileLoop::WhileLoop): Deleted.
1049 (WebCore::WHLSL::AST::WhileLoop::conditional): Deleted.
1050 (WebCore::WHLSL::AST::WhileLoop::body): Deleted.
1051 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
1052 (WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
1053 (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
1054 (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
1055 (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
1056 (WebCore::WHLSL::Metal::parent):
1057 (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
1058 * Modules/webgpu/WHLSL/WHLSLParser.cpp:
1059 (WebCore::WHLSL::Parser::parseSuffixOperator):
1060 (WebCore::WHLSL::Parser::completeAssignment):
1061 (WebCore::WHLSL::Parser::parsePossiblePrefix):
1062 * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
1063 * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
1064 (WebCore::WHLSL::Visitor::visit):
1066 * WebCore.xcodeproj/project.pbxproj:
1067 * workers/WorkerScriptLoader.h:
1069 2019-08-09 Youenn Fablet <youenn@apple.com>
1071 Pass a ScriptExecutionContext as input to register/unregister URLRegistry routines
1072 https://bugs.webkit.org/show_bug.cgi?id=200571
1074 Reviewed by Darin Adler.
1076 Passing a ScriptExecutionContext to register/unregister routines will allow
1077 to have session ID based handling for blobs, in particular to use session partitioned blob registries.
1078 No change of behavior.
1080 * Modules/mediasource/MediaSourceRegistry.cpp:
1081 (WebCore::MediaSourceRegistry::registerURL):
1082 (WebCore::MediaSourceRegistry::unregisterURL):
1083 * Modules/mediasource/MediaSourceRegistry.h:
1085 (WebCore::BlobURLRegistry::registerURL):
1086 (WebCore::BlobURLRegistry::unregisterURL):
1088 (WebCore::DOMURL::createPublicURL):
1089 * html/PublicURLManager.cpp:
1090 (WebCore::PublicURLManager::registerURL):
1091 (WebCore::PublicURLManager::revoke):
1092 (WebCore::PublicURLManager::stop):
1093 * html/PublicURLManager.h:
1094 * html/URLRegistry.h:
1096 2019-08-09 Alex Christensen <achristensen@webkit.org>
1098 Disable CSSOM View Scrolling API for IMDb iOS app
1099 https://bugs.webkit.org/show_bug.cgi?id=200586
1100 <rdar://problem/53645833>
1102 Reviewed by Simon Fraser.
1104 They are calling scrollHeight on the HTML element and it is running new code introduced in r235806
1105 Disable this new feature until they update their app to use the iOS13 SDK.
1107 * platform/RuntimeApplicationChecks.h:
1108 * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1109 (WebCore::IOSApplication::isIMDb):
1111 2019-08-09 Youenn Fablet <youenn@apple.com>
1113 Remove MediaStreamRegistry
1114 https://bugs.webkit.org/show_bug.cgi?id=200570
1116 Reviewed by Eric Carlson.
1118 MediaStream cannot be registered as an URL by JavaScript.
1119 Remove MediaStreamRegistry and the 'src' loading specific handling in HTMLMediaElement.
1120 Implement ending of capture track by directly handling MediaStreamTrack which is more accurate.
1121 No change of behavior.
1123 * Modules/mediastream/MediaStream.cpp:
1124 (WebCore::MediaStream::MediaStream):
1125 (WebCore::MediaStream::~MediaStream):
1126 (WebCore::MediaStream::stop):
1127 * Modules/mediastream/MediaStream.h:
1128 * Modules/mediastream/MediaStreamRegistry.cpp: Removed.
1129 * Modules/mediastream/MediaStreamRegistry.h: Removed.
1130 * Modules/mediastream/MediaStreamTrack.cpp:
1131 (WebCore::MediaStreamTrack::MediaStreamTrack):
1132 (WebCore::MediaStreamTrack::~MediaStreamTrack):
1133 (WebCore::MediaStreamTrack::endCapture):
1134 * Modules/mediastream/MediaStreamTrack.h:
1136 * WebCore.xcodeproj/project.pbxproj:
1138 (WebCore::Document::stopMediaCapture):
1139 * html/HTMLMediaElement.cpp:
1140 (WebCore::HTMLMediaElement::loadResource):
1142 2019-08-09 VĂctor Manuel Jáquez Leal <vjaquez@igalia.com>
1144 [GL][GStreamer] activate wrapped shared context
1145 https://bugs.webkit.org/show_bug.cgi?id=196966
1147 Reviewed by Žan Doberšek.
1149 This patch consists in four parts:
1151 1\ When the media player is instantiated, and it is intended to
1152 render textures, it will create a wrapped object of the
1153 application's GL context, and in order to populate the wrapped
1154 object with the GL vtable, the context has to be current. Thus,
1155 this patch makes current the shared WebKit application context,
1156 and populate the wrapped GstGLContext by activating it and filling
1157 in it. Afterwards, the wrapped context is deactivated.
1159 2\ This patch makes GL texture use the RGBA color space, thus the
1160 color transformation is done in GStreamer, and no further color
1161 transformation is required in WebKit.
1163 3\ Since it is not necessary to modify behavior if the decoder is
1164 imxvpudecoder, its identification and label were removed.
1166 4\ As only RGBA is used, the old color conversions when rendering
1167 using Cairo (fallback) were changed to convert the RGBA, as in
1168 GStreamer's format, to ARGB32, as in Cairo format -which depends
1171 No new tests because there is no behavior change.
1173 * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
1174 (WebCore::ImageGStreamer::ImageGStreamer): Only convert GStreamer
1175 RGBA to Cairo RGB32.
1176 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1177 (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Removes
1178 the IMX VPU identification.
1179 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1180 (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
1181 Intializes the wrapped GL Context.
1182 (WebCore::MediaPlayerPrivateGStreamerBase::updateTextureMapperFlags):
1183 Removes frame's color conversion.
1184 (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
1185 Instead of parsing a string, the GstCaps are created manually, and
1186 it is set to appsink, rather than a filtered linking.
1187 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1188 Removes ImxVPU enumeration value.
1189 * platform/graphics/gstreamer/VideoTextureCopierGStreamer.cpp:
1190 Adds NoConvert option to texture copier, setting an identity
1192 (WebCore::VideoTextureCopierGStreamer::updateColorConversionMatrix):
1193 * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: Adds
1194 NoConvert enumeration value.
1196 2019-08-09 Ryosuke Niwa <rniwa@webkit.org>
1198 REGRESSION (iOS 13): united.com web forms do not respond to taps
1199 https://bugs.webkit.org/show_bug.cgi?id=200531
1201 Reviewed by Antti Koivisto and Wenson Hsieh.
1203 The bug is caused by the content change observer detecting “Site Feedback” link at the bottom of
1204 the page (https://www.united.com/ual/en/US/account/enroll/default) constantly getting re-generated
1205 in every frame via requestAnimationFrame when the page is opened with iPhone UA string.
1206 Note that the content re-generation can be reproduced even in Chrome if iPhone UA string is used.
1208 Ignore this constant content change in ContentChangeObserver as a site specific quirk.
1210 In the future, we should make ContentChangeObserver observe the final location of each element
1211 being observed so that we can ignore content that like this which is placed outside the viewport,
1212 and/or far away from where the user tapped.
1215 (WebCore::Quirks::shouldIgnoreContentChange const): Added.
1217 * page/ios/ContentChangeObserver.cpp:
1218 (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
1220 2019-08-08 Devin Rousso <drousso@apple.com>
1222 Web Inspector: Page: don't allow the domain to be disabled
1223 https://bugs.webkit.org/show_bug.cgi?id=200109
1225 Reviewed by Brian Burg.
1227 The `PageAgent` is relied on by many of the other agents, so much so that it doesn't make
1228 sense to support the ability to "disable" (as well as "enable") the agent.
1230 When the first frontend connects, we should treat the `PageAgent` as active and available.
1232 * inspector/agents/InspectorPageAgent.h:
1233 * inspector/agents/InspectorPageAgent.cpp:
1234 (WebCore::InspectorPageAgent::didCreateFrontendAndBackend):
1235 (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
1236 (WebCore::InspectorPageAgent::timestamp):
1237 (WebCore::InspectorPageAgent::enable): Deleted.
1238 (WebCore::InspectorPageAgent::disable): Deleted.
1240 * inspector/agents/InspectorApplicationCacheAgent.cpp:
1241 (WebCore::InspectorApplicationCacheAgent::updateApplicationCacheStatus):
1242 (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
1243 (WebCore::InspectorApplicationCacheAgent::assertFrameWithDocumentLoader):
1244 * inspector/agents/InspectorCSSAgent.cpp:
1245 (WebCore::InspectorCSSAgent::createStyleSheet):
1246 * inspector/agents/InspectorDOMAgent.cpp:
1247 (WebCore::InspectorDOMAgent::highlightSelector):
1248 (WebCore::InspectorDOMAgent::highlightFrame):
1249 (WebCore::InspectorDOMAgent::buildObjectForNode):
1250 * inspector/agents/InspectorTimelineAgent.cpp:
1251 (WebCore::InspectorTimelineAgent::setFrameIdentifier):
1252 * inspector/agents/page/PageNetworkAgent.cpp:
1253 (WebCore::PageNetworkAgent::loaderIdentifier):
1254 (WebCore::PageNetworkAgent::frameIdentifier):
1255 (WebCore::PageNetworkAgent::scriptExecutionContext):
1256 * inspector/agents/page/PageRuntimeAgent.cpp:
1257 (WebCore::PageRuntimeAgent::didCreateMainWorldContext):
1258 (WebCore::PageRuntimeAgent::reportExecutionContextCreation):
1260 * testing/Internals.cpp:
1261 (WebCore::InspectorStubFrontend::InspectorStubFrontend):
1262 (WebCore::InspectorStubFrontend::frontendLoaded): Added.
1263 (WebCore::InspectorStubFrontend::closeWindow):
1264 (WebCore::InspectorStubFrontend::sendMessageToFrontend):
1265 (WebCore::InspectorStubFrontend::frontendPage): Deleted.
1266 Ensure that the backend always gets notified via `InspectorFrontendHost.loaded` so that
1267 messages being sent to the frontend are batched.
1269 2019-08-08 Chris Lord <clord@igalia.com>
1271 Short-cut WebGLRenderingContext::getParameter() for ALPHA_BITS when alpha channel is disabled
1272 https://bugs.webkit.org/show_bug.cgi?id=200499
1274 Reviewed by Darin Adler.
1276 This patch adds a shortcut when a framebuffer isn't bound on WebGL
1277 canvases when retrieving ALPHA_BITS.
1279 No new tests, covered by existing tests.
1281 * html/canvas/WebGLRenderingContext.cpp:
1282 (WebCore::WebGLRenderingContext::getParameter):
1283 Return 0 for ALPHA_BITS if canvas has no alpha component.
1284 * html/canvas/WebGL2RenderingContext.cpp:
1285 (WebCore::WebGLRenderingContext::getParameter):
1286 Return 0 for ALPHA_BITS if canvas has no alpha component.
1288 2019-08-08 Chris Dumez <cdumez@apple.com>
1290 ScrollingStateNode is not ThreadSafeRefCounted but is ref'd / deref'd from several threads
1291 https://bugs.webkit.org/show_bug.cgi?id=200545
1293 Reviewed by Antti Koivisto.
1295 The ScrollingStateTree and its ScrollingStateNodes are being passed to the scrolling thread.
1296 ScrollingStateNode is not ThreadSafeRefCounted, which is potentially unsafe. Make it
1297 ThreadSafeRefCounted for safety in this patch given that using RefCounted here is either
1300 * page/scrolling/ScrollingStateNode.h:
1302 2019-08-08 Brent Fulgham <bfulgham@apple.com>
1304 [FTW] Get WebKit, WebKit2, and MiniBrowser building and executing
1305 https://bugs.webkit.org/show_bug.cgi?id=200539
1306 <rdar://problem/54082550>
1308 Reviewed by Dean Jackson.
1310 * platform/graphics/win/BackingStoreBackendDirect2D.h:
1311 (WebCore::BackingStoreBackendDirect2D::renderTarget const):
1312 (WebCore::BackingStoreBackendDirect2D::surface const):
1314 * platform/graphics/win/BackingStoreBackendDirect2DImpl.cpp:
1315 (WebCore::BackingStoreBackendDirect2DImpl::~BackingStoreBackendDirect2DImpl):
1316 (WebCore::BackingStoreBackendDirect2DImpl::scroll):
1317 (WebCore::createDirect2DImageSurfaceWithFastMalloc): Deleted.
1318 * platform/graphics/win/BackingStoreBackendDirect2DImpl.h:
1319 * platform/graphics/win/DIBPixelData.cpp:
1320 (WebCore::DIBPixelData::DIBPixelData):
1321 * platform/graphics/win/DIBPixelData.h:
1322 * platform/graphics/win/Direct2DOperations.cpp:
1323 (WebCore::Direct2D::fillRectWithRoundedHole):
1324 (WebCore::Direct2D::fillRectWithGradient):
1325 (WebCore::Direct2D::drawGlyphs):
1326 (WebCore::Direct2D::PlatformContextStateSaver::PlatformContextStateSaver): Deleted.
1327 (WebCore::Direct2D::PlatformContextStateSaver::~PlatformContextStateSaver): Deleted.
1328 (WebCore::Direct2D::PlatformContextStateSaver::save): Deleted.
1329 (WebCore::Direct2D::PlatformContextStateSaver::restore): Deleted.
1330 (WebCore::Direct2D::PlatformContextStateSaver::didSave const): Deleted.
1331 * platform/graphics/win/Direct2DOperations.h:
1332 * platform/graphics/win/Direct2DUtilities.cpp:
1333 (WebCore::Direct2D::bitmapSize):
1334 (WebCore::Direct2D::bitmapResolution):
1335 (WebCore::Direct2D::createWicBitmap):
1336 (WebCore::Direct2D::createBitmap):
1337 (WebCore::Direct2D::createGDIRenderTarget):
1338 (WebCore::Direct2D::copyRectFromOneSurfaceToAnother):
1339 * platform/graphics/win/Direct2DUtilities.h:
1340 * platform/graphics/win/GraphicsContextDirect2D.cpp:
1341 (WebCore::GraphicsContext::GraphicsContext):
1342 (WebCore::GraphicsContext::platformContext const):
1343 (WebCore::GraphicsContextPlatformPrivate::setAlpha):
1344 (WebCore::GraphicsContext::savePlatformState):
1345 (WebCore::GraphicsContext::restorePlatformState):
1346 (WebCore::GraphicsContext::releaseWindowsContext):
1347 (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate):
1348 (WebCore::GraphicsContextPlatformPrivate::beginDraw):
1349 (WebCore::GraphicsContextPlatformPrivate::endDraw):
1350 (WebCore::GraphicsContext::beginDraw):
1351 (WebCore::GraphicsContext::endDraw):
1352 (WebCore::GraphicsContext::setCTM):
1353 (WebCore::GraphicsContext::isAcceleratedContext const):
1354 * platform/graphics/win/GraphicsContextImplDirect2D.cpp:
1355 (WebCore::GraphicsContextImplDirect2D::fillRect):
1356 (WebCore::GraphicsContextImplDirect2D::fillRectWithRoundedHole):
1357 (WebCore::GraphicsContextImplDirect2D::drawGlyphs):
1358 * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
1359 (WebCore::GraphicsContextPlatformPrivate::platformContext):
1360 * platform/graphics/win/PathDirect2D.cpp:
1361 (WebCore::Path::transform):
1362 * platform/graphics/win/PlatformContextDirect2D.cpp:
1363 (WebCore::PlatformContextDirect2D::beginDraw):
1364 (WebCore::PlatformContextDirect2D::endDraw):
1365 * platform/graphics/win/PlatformContextDirect2D.h:
1366 (WebCore::PlatformContextStateSaver::PlatformContextStateSaver):
1367 (WebCore::PlatformContextStateSaver::~PlatformContextStateSaver):
1368 (WebCore::PlatformContextStateSaver::save):
1369 (WebCore::PlatformContextStateSaver::restore):
1370 (WebCore::PlatformContextStateSaver::didSave const):
1372 2019-08-08 Chris Dumez <cdumez@apple.com>
1374 Unreviewed, address post-landing review comments for r248431.
1376 * Modules/indexeddb/IDBRequest.h:
1378 2019-08-08 Said Abou-Hallawa <sabouhallawa@apple.com>
1380 [iOS] Position image information should respect the image orientation
1381 https://bugs.webkit.org/show_bug.cgi?id=200487
1383 Reviewed by Simon Fraser.
1385 Re-factor CachedImage::imageSizeForRenderer() into another overriding
1386 function which does not scale the imageSize. Therefore the new function
1387 returns FloatSize while the original function returns LayoutSize.
1389 * loader/cache/CachedImage.cpp:
1390 (WebCore::CachedImage::imageSizeForRenderer const):
1391 * loader/cache/CachedImage.h:
1392 * rendering/RenderElement.h:
1394 2019-08-08 Devin Rousso <drousso@apple.com>
1396 Web Inspector: rename `queryObjects` to `queryInstances` for clarity
1397 https://bugs.webkit.org/show_bug.cgi?id=200520
1399 Reviewed by Brian Burg.
1401 Test: inspector/console/queryInstances.html
1403 * inspector/CommandLineAPIModuleSource.js:
1404 (CommandLineAPIImpl.prototype.queryInstances): Added.
1405 (CommandLineAPIImpl.prototype.queryObjects):
1407 2019-08-08 Chris Dumez <cdumez@apple.com>
1409 Fix thread safety bug in AudioSourceProviderAVFObjC::prepare()
1410 https://bugs.webkit.org/show_bug.cgi?id=200542
1412 Reviewed by Jer Noble.
1414 Fix thread safety bug in AudioSourceProviderAVFObjC::prepare(). It calls callOnMainThread()
1415 from a background thread and captures makeRef(*this) in the lambda, even though |this| is a
1416 AudioSourceProviderAVFObjC, which subclasses RefCounted, not ThreadSafeRefCounted.
1418 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.h:
1420 2019-08-08 Chris Dumez <cdumez@apple.com>
1422 Make IDBRequest ThreadSafeRefCounted
1423 https://bugs.webkit.org/show_bug.cgi?id=200540
1425 Reviewed by Alex Christensen.
1427 Make IDBRequest ThreadSafeRefCounted, as it looks like it is being ref'd / deref'd
1428 from several threads, in IDBConnectionProxy::notifyOpenDBRequestBlocked() for
1431 * Modules/indexeddb/IDBRequest.h:
1433 2019-08-08 Brady Eidson <beidson@apple.com>
1435 Do not allow navigations of frames about to get replaced by the result of evaluating javascript: URLs
1436 <rdar://problem/53788893> and https://bugs.webkit.org/show_bug.cgi?id=198786
1438 Reviewed by Geoff Garen.
1442 Add a "willReplaceWithResultOfExecutingJavascriptURL" flag which is respected inside FrameLoader::isNavigationAllowed
1444 * bindings/js/ScriptController.cpp:
1445 (WebCore::ScriptController::executeIfJavaScriptURL):
1446 * bindings/js/ScriptController.h:
1447 (WebCore::ScriptController::willReplaceWithResultOfExecutingJavascriptURL const):
1449 * loader/FrameLoader.cpp:
1450 (WebCore::FrameLoader::isNavigationAllowed const):
1452 2019-08-08 Rob Buis <rbuis@igalia.com>
1454 Add runtime flag for lazy image loading
1455 https://bugs.webkit.org/show_bug.cgi?id=199794
1457 Reviewed by Darin Adler.
1459 Add loading attribute and expose it on HTMLImageElement.
1461 * html/HTMLAttributeNames.in:
1462 * html/HTMLImageElement.idl:
1463 * page/RuntimeEnabledFeatures.h:
1464 (WebCore::RuntimeEnabledFeatures::setLazyImageLoadingEnabled):
1465 (WebCore::RuntimeEnabledFeatures::lazyImageLoadingEnabled const):
1467 2019-08-08 Miguel Gomez <magomez@igalia.com>
1469 [GTK][WPE] Remove the reference to WebCore::Animation from TextureMapperAnimation
1470 https://bugs.webkit.org/show_bug.cgi?id=200533
1472 Reviewed by Žan Doberšek.
1474 Pass the relevant parameters to TextureMapperAnimation instead of creating a new WebCore::Animation
1477 * platform/graphics/texmap/TextureMapperAnimation.cpp:
1478 (WebCore::timingFunctionForAnimationValue):
1479 (WebCore::TextureMapperAnimation::TextureMapperAnimation):
1480 (WebCore::TextureMapperAnimation::apply):
1481 (WebCore::TextureMapperAnimation::isActive const):
1482 * platform/graphics/texmap/TextureMapperAnimation.h:
1483 (WebCore::TextureMapperAnimation::keyframes const):
1484 (WebCore::TextureMapperAnimation::timingFunction const):
1485 (WebCore::TextureMapperAnimation::animation const): Deleted.
1487 2019-08-08 Charlie Turner <cturner@igalia.com>
1489 [GTK] WebKitWebProcess crashes when viewing an HTML with a <video> element referencing unknown file
1490 https://bugs.webkit.org/show_bug.cgi?id=200530
1492 Reviewed by Xabier Rodriguez-Calvar.
1494 Not amenable to unit testing.
1496 * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1497 (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
1499 2019-08-07 Saam Barati <sbarati@apple.com>
1501 [WHLSL] Prune unreachable stdlib functions after the Checker runs
1502 https://bugs.webkit.org/show_bug.cgi?id=200518
1504 Reviewed by Robin Morisset.
1506 We now prune unreachable stdlib functions after the checker runs. We must
1507 do this after the checker runs because that's when we resolve all remaining
1508 function calls. While we can't prune unreachable user code, because we must
1509 still report errors in it, we can prune unreachable standard library code
1510 because we know a priori that it has no errors. This is a 10ms end-to-end
1511 speedup in compute_boids.
1513 * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
1514 (WebCore::WHLSL::prepareShared):
1515 * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.cpp: Added.
1516 (WebCore::WHLSL::pruneUnreachableStandardLibraryFunctions):
1517 * Modules/webgpu/WHLSL/WHLSLPruneUnreachableStandardLibraryFunctions.h: Added.
1519 * WebCore.xcodeproj/project.pbxproj:
1521 2019-08-07 Kate Cheney <katherine_cheney@apple.com>
1523 Adopt non-deprecated CGColorSpace API
1524 https://bugs.webkit.org/show_bug.cgi?id=184358
1526 Reviewed by Darin Adler.
1528 * platform/ScreenProperties.h:
1529 (WebCore::ScreenData::decode):
1531 We changed the deprecated CGColorSpaceCreateWithICCProfile function to
1532 CGColorSpaceCreateWithICCData.
1534 2019-08-07 Sam Weinig <weinig@apple.com>
1536 [WHLSL] Metal code generation takes a long time uniquing UnnamedTypes
1537 https://bugs.webkit.org/show_bug.cgi?id=200512
1539 Reviewed by Saam Barati.
1541 Instead of using a trie for unnamed type uniquing, use the same technique used
1542 in SynthesizeConstructors and use a HashMap of UnnamedTypeKeys. To make this
1543 profitable, we also need to devirtualize the hash and equality functions on
1544 UnnamedType, instead using an enum + switch. While this change only devirtualizes
1545 the UnnamedType subtree, we should probably do it for the entire AST in a future
1548 * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
1549 * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
1550 * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
1551 * Modules/webgpu/WHLSL/AST/WHLSLReferenceType.h:
1552 * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
1553 * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.cpp: Added.
1554 (WebCore::WHLSL::AST::UnnamedType::hash const):
1555 (WebCore::WHLSL::AST::UnnamedType::operator== const):
1556 * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
1557 Devirtualize hash, operator== and type predicates.
1559 * Modules/webgpu/WHLSL/AST/WHLSLUnnamedTypeHash.h: Added.
1560 (WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey):
1561 * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
1562 (WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey): Deleted.
1563 Moved UnnamedTypeKey into it's own header from WHLSLSynthesizeConstructors.cpp
1565 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
1566 (WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode):
1567 (WebCore::WHLSL::Metal::BaseTypeNameNode::kind):
1568 (WebCore::WHLSL::Metal::BaseTypeNameNode::isReferenceTypeNameNode const):
1569 (WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
1570 (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
1571 (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
1572 Devirtualize BaseTypeNameNode as well. In a future change, we should consider removing
1573 this class entirely and instead mapping directly to a parent/mangled name pair.
1575 (WebCore::WHLSL::Metal::TypeNamer::visit):
1576 (WebCore::WHLSL::Metal::TypeNamer::find):
1577 (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
1578 (WebCore::WHLSL::Metal::parent):
1579 (WebCore::WHLSL::Metal::TypeNamer::insert):
1580 (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
1581 (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
1582 (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
1583 (WebCore::WHLSL::Metal::findInVector): Deleted.
1584 (WebCore::WHLSL::Metal::find): Deleted.
1585 (WebCore::WHLSL::Metal::TypeNamer::emitAllUnnamedTypeDefinitions): Deleted.
1586 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
1587 Switch from a Vector based trie to a HashMap for UnnamedType uniquing. Also
1588 use UnnamedType::Kind where possible with switch statements to clarify code.
1590 * WebCore.xcodeproj/project.pbxproj:
1593 2019-08-07 Devin Rousso <drousso@apple.com>
1595 Web Inspector: Uncaught Exception: TimelineAgent already enabled
1596 https://bugs.webkit.org/show_bug.cgi?id=200513
1598 Reviewed by Joseph Pecoraro.
1600 Call `disable` when the last frontend disconnects, so that if Web Inspector is reopened the
1601 `TimelineAgent` is back to being in a disabled state.
1603 * inspector/agents/InspectorTimelineAgent.cpp:
1604 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
1606 2019-08-07 Jer Noble <jer.noble@apple.com>
1608 Muted <video> elements can block display from sleeping.
1609 https://bugs.webkit.org/show_bug.cgi?id=200511
1611 Reviewed by Eric Carlson.
1613 Test: media/video-muted-holds-sleep-assertion.html
1615 Modify the shouldDisableSleep() method to take muting into account.
1617 * html/HTMLMediaElement.cpp:
1618 (WebCore::HTMLMediaElement::shouldDisableSleep const):
1620 2019-08-07 Robin Morisset <rmorisset@apple.com>
1622 [WHLSL] Simplify and eliminate redundant work in WHLSLFunctionWriter.cpp
1623 https://bugs.webkit.org/show_bug.cgi?id=200460
1625 Reviewed by Myles Maxfield.
1627 2 trivial simplifications:
1628 - Replace FunctionDeclarationWriter by a standalone function, there was no reason to make it a subclass of Visitor
1629 - Avoid an exponential blow-up in the computation of reachable functions.
1631 I have way too much noise on my system (swings back and forth between 7 and 12ms for this phase) to measure a performance win,
1632 but since this patch simplifies things without adding complexity I think it is worth it.
1634 No new test as there is no functional change intended.
1636 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
1637 (WebCore::WHLSL::Metal::declareFunction):
1638 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
1639 (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter):
1640 (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter):
1641 (WebCore::WHLSL::Metal::sharedMetalFunctions):
1642 (WebCore::WHLSL::Metal::metalFunctions):
1644 2019-08-07 Saam Barati <sbarati@apple.com>
1646 [WHLSL] checkRecursion, checkTextureReferences, and EscapedVariableCollector should skip stdlib functions
1647 https://bugs.webkit.org/show_bug.cgi?id=200510
1649 Reviewed by Myles C. Maxfield.
1651 We can skip walking the stdlib part of the AST in various semantic checking phases:
1652 - checkRecursion: the stdlib does not have recursion
1653 - checkTextureReferences: the stdlib does not have references to textures
1654 - EscapedVariableCollector: this is used inside preserveVariableLifetimes, and
1655 the stdlib never escapes any variables.
1657 This patch speeds up checkRecursion, checkTextureReferences, and preserveVariableLifetimes
1658 by about 1ms each, leading to a 3ms compile time speedup in compute_boids.
1660 * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp:
1661 (WebCore::WHLSL::TextureReferencesChecker::visit):
1662 * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
1663 (WebCore::WHLSL::preserveVariableLifetimes):
1664 (WebCore::WHLSL::EscapedVariableCollector::escapeVariableUse): Deleted.
1665 (WebCore::WHLSL::EscapedVariableCollector::takeEscapedVariables): Deleted.
1666 * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp:
1668 2019-08-08 Simon Fraser <simon.fraser@apple.com>
1670 Add to InteractionInformationAtPosition information about whether the element is in a subscrollable region
1671 https://bugs.webkit.org/show_bug.cgi?id=200374
1672 rdar://problem/54095519
1674 Reviewed by Tim Horton.
1676 Add to InteractionInformationAtPosition a ScrollingNodeID which represents the enclosing scrolling
1677 node that affects the targeted element's position. We use this to find a UIScrollView in the UI process.
1679 The entrypoint to finding the enclosing scrolling node is ScrollingCoordinator::scrollableContainerNodeID(),
1680 which calls RenderLayerCompositor::asyncScrollableContainerNodeID() to look for a scrolling ancestor in
1681 the current frame, and then looks for an enclosing scrollable frame, or a scrolling ancestor in
1682 the enclosing frame.
1684 There's a bit of subtlety in RenderLayerCompositor::asyncScrollableContainerNodeID() because if you're asking
1685 for the node that scrolls the renderer, if the renderer itself has a layer and is scrollable, you want
1686 its enclosing scroller.
1688 * page/scrolling/AsyncScrollingCoordinator.cpp:
1689 (WebCore::AsyncScrollingCoordinator::scrollableContainerNodeID const):
1690 * page/scrolling/AsyncScrollingCoordinator.h:
1691 * page/scrolling/ScrollingCoordinator.cpp:
1692 (WebCore::scrollableContainerNodeID const):
1693 * page/scrolling/ScrollingCoordinator.h:
1694 * rendering/RenderLayer.h:
1695 * rendering/RenderLayerCompositor.cpp:
1696 (WebCore::RenderLayerCompositor::asyncScrollableContainerNodeID):
1697 * rendering/RenderLayerCompositor.h:
1699 2019-08-07 Saam Barati <sbarati@apple.com>
1701 [WHLSL] cache results of argumentTypeForAndOverload inside Checker
1702 https://bugs.webkit.org/show_bug.cgi?id=200462
1704 Reviewed by Robin Morisset.
1706 When I profiled the time we spent in the checker, it turned out that
1707 argumentTypeForAndOverload is one of the most expensive functions. If
1708 we just cache the results of that function, we can avoid 99% of the
1709 duplicate allocations that function does in compute_boids. This patch
1710 is a ~4ms speedup in the checker on compute_boids.
1712 * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
1713 * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
1714 (WebCore::WHLSL::AndOverloadTypeKey::AndOverloadTypeKey):
1715 (WebCore::WHLSL::AndOverloadTypeKey::isEmptyValue const):
1716 (WebCore::WHLSL::AndOverloadTypeKey::isHashTableDeletedValue const):
1717 (WebCore::WHLSL::AndOverloadTypeKey::hash const):
1718 (WebCore::WHLSL::AndOverloadTypeKey::operator== const):
1719 (WebCore::WHLSL::AndOverloadTypeKey::Hash::hash):
1720 (WebCore::WHLSL::AndOverloadTypeKey::Hash::equal):
1721 (WebCore::WHLSL::AndOverloadTypeKey::Traits::isEmptyValue):
1722 (WebCore::WHLSL::Checker::argumentTypeForAndOverload):
1723 (WebCore::WHLSL::Checker::finishVisiting):
1724 (WebCore::WHLSL::argumentTypeForAndOverload): Deleted.
1726 2019-08-07 Youenn Fablet <youenn@apple.com>
1728 Remove IDBDatabaseIdentifier::m_sessionID
1729 https://bugs.webkit.org/show_bug.cgi?id=200489
1731 Reviewed by Darin Adler.
1733 IDBDatabaseIdentifier can be created without a valid session ID.
1734 Its session ID is only used in NetworkProcess where it can be retrieved from the IDBServer.
1735 In WebProcess, session ID is also known from the IDB connection.
1736 Update SQLiteIDBBackingStore to store a session ID which is given from its IDBServer.
1737 No observable change of behavior.
1739 * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
1740 (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
1741 (WebCore::IDBDatabaseIdentifier::isolatedCopy const):
1742 * Modules/indexeddb/IDBDatabaseIdentifier.h:
1743 (WebCore::IDBDatabaseIdentifier::hash const):
1744 (WebCore::IDBDatabaseIdentifier::databaseName const):
1745 (WebCore::IDBDatabaseIdentifier::encode const):
1746 (WebCore::IDBDatabaseIdentifier::decode):
1747 (WebCore::IDBDatabaseIdentifier::sessionID const): Deleted.
1748 * Modules/indexeddb/IDBFactory.cpp:
1749 (WebCore::IDBFactory::openInternal):
1750 (WebCore::IDBFactory::deleteDatabase):
1751 * Modules/indexeddb/server/IDBServer.cpp:
1752 (WebCore::IDBServer::IDBServer::createBackingStore):
1753 * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1754 (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
1755 (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
1756 (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
1757 (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
1758 (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
1759 * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1760 (WebCore::IDBServer::SQLiteIDBBackingStore::sessionID const):
1761 * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1762 (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
1764 2019-08-07 Chris Dumez <cdumez@apple.com>
1766 Fix thread safety issue under JSHistory::visitAdditionalChildren()
1767 https://bugs.webkit.org/show_bug.cgi?id=200504
1769 Reviewed by Darin Adler.
1771 JSHistory::visitAdditionalChildren() is called from a GC thread and was calling
1772 History::cachedState() whose implementation goes deep into WebCore
1773 (FrameLoader / HistoryController). Among other things, it null checks m_window
1774 which is a WeakPtr and then later dereferences it to get the Frame object, which
1775 is not safe from the non-main thread.
1777 To address the issue, introduce a simpler cachedStateForGC() getter which is
1778 thread safe, and use it in JSHistory::visitAdditionalChildren().
1780 * bindings/js/JSHistoryCustom.cpp:
1781 (WebCore::JSHistory::visitAdditionalChildren):
1784 2019-08-07 Priyanka Agarwal <pagarwal999@apple.com>
1786 Allow clients to toggle a text input field between being viewable and having characters hidden while maintaining
1787 a yellow auto-filled appearance
1788 https://bugs.webkit.org/show_bug.cgi?id=200037
1789 rdar://problem/51900961
1791 Reviewed by Daniel Bates.
1793 Tests: fast/forms/auto-fill-button/hide-auto-fill-strong-password-viewable-treatment-when-form-is-reset.html
1794 fast/forms/auto-fill-button/input-strong-password-viewable.html
1796 * css/CSSSelector.cpp:
1797 (WebCore::CSSSelector::selectorText const):
1798 Adding CSSSelector case for new pseudo class of AutofillStrongPasswordViewable.
1800 * css/CSSSelector.h: Added PseudoClassAutofillStrongPasswordViewable
1802 * css/SelectorChecker.cpp:
1803 (WebCore::SelectorChecker::checkOne const): Added handling for SelectorChecker.cpp
1805 * css/SelectorCheckerTestFunctions.h:
1806 (WebCore::isAutofilledStrongPasswordViewable):
1807 Checking if the element is an input element and considered to be
1808 AutoFilled and Viewable. Returns a boolean accordingly.
1810 * css/SelectorPseudoClassAndCompatibilityElementMap.in:
1811 Add -webkit-autofill-strong-password-viewable css class.
1814 (input:-webkit-autofill, input:-webkit-autofill-strong-password, input:-webkit-autofill-strong-password-viewable):
1815 (input:-webkit-autofill-strong-password-viewable):
1816 (input:-webkit-autofill, input:-webkit-autofill-strong-password): Deleted. Updated to include viewable pseudo class.
1818 * cssjit/SelectorCompiler.cpp:
1819 (WebCore::SelectorCompiler::addPseudoClassType):
1820 Add case handling for PseudoClassAutofillStrongPasswordViewable.
1822 * html/HTMLInputElement.cpp:
1823 (WebCore::HTMLInputElement::HTMLInputElement):
1824 Add boolean m_isAutoFilledAndViewable for representing if the
1825 input element is both AutoFilled and should be viewable.
1826 Don't update the viewable treatment in setValueFromRenderer() because even if the user makes edits to the input field
1827 the visual treatment should still be applied.
1829 (WebCore::HTMLInputElement::resignStrongPasswordAppearance):
1830 Updates boolean representing if input element is autofilled and viewable to false.
1832 (WebCore::HTMLInputElement::reset):
1833 Updates boolean representing if input element is autofilled and viewable to false.
1835 (WebCore::HTMLInputElement::setAutoFilledAndViewable):
1836 Setter function for the boolean of m_isAutoFilledAndViewable.
1838 * html/HTMLInputElement.h:
1839 (WebCore::HTMLInputElement::isAutoFilledAndViewable const):
1840 Creating boolean value for m_isAutoFilledAndViewable.
1842 * testing/Internals.cpp:
1843 (WebCore::Internals::setAutoFilledAndViewable): Adding for testing purposes.
1844 * testing/Internals.h: Adding for testing purposes.
1845 * testing/Internals.idl:
1847 2019-08-07 Wenson Hsieh <wenson_hsieh@apple.com>
1849 Declarations and implementations of findCaret(Min|Max)imumOffset have inconsistent signatures
1850 https://bugs.webkit.org/show_bug.cgi?id=200503
1852 Reviewed by Darin Adler.
1854 No change in behavior.
1856 * rendering/SimpleLineLayoutFunctions.h:
1858 Update these function declarations to take "const RenderText&", which matches the signatures of their inline
1859 implementations below.
1861 2019-08-07 Wenson Hsieh <wenson_hsieh@apple.com>
1863 Extra space inserted at start of line when inserting a newline in Mail compose
1864 https://bugs.webkit.org/show_bug.cgi?id=200490
1865 <rdar://problem/53501354>
1867 Reviewed by Antti Koivisto.
1869 This started happening after r244494, which deferred editor state computation until the next layer tree flush
1870 when changing selection. After inserting a paragraph, the act of computing an editor state ensured that the text
1871 node containing the caret drops out of simple line layout, while grabbing the characters near the selection
1872 (i.e., calling charactersAroundPosition). This meant that when we subsequently ask positionAfterSplit whether it
1873 isRenderedCharacter() at the end of the command, we are guaranteed to have line boxes, so we get a meaningful
1874 answer and avoid inserting an extra non-breaking space.
1876 However, after r244494, we defer the editor state computation until the end of the edit command; this means that
1877 we may not have line boxes for positionAfterSplit's text node renderer, due to remaining in simple line layout.
1878 In turn, this means that we end up hitting the assertion in containsRenderedCharacterOffset in debug builds; on
1879 release builds, we simply return false from containsRenderedCharacterOffset, which causes us to insert an extra
1882 To fix this, we educate RenderText::containsRenderedCharacterOffset about simple line layout.
1884 Test: editing/inserting/insert-paragraph-in-designmode-document.html
1886 * rendering/RenderText.cpp:
1887 (WebCore::RenderText::containsRenderedCharacterOffset const):
1888 (WebCore::RenderText::containsCaretOffset const):
1890 Changed to use SimpleLineLayout::containsOffset.
1892 * rendering/SimpleLineLayoutFunctions.h:
1893 (WebCore::SimpleLineLayout::containsOffset):
1895 I first contrasted the behavior of RenderTextLineBoxes::containsOffset in the cases where the OffsetType is
1896 CaretOffset or CharacterOffset, and found that the only interesting differences were:
1898 1. The caret offset type case has special handling for line breaks.
1899 2. Both offset types have handling for reversed text.
1900 3. The end offset of a line box contains a caret offset, but not a character offset.
1902 For the purposes of OffsetType CharacterOffset, (1) is irrelevant; furthermore, (2) is already not handled by
1903 logic in containsCaretOffset(). Thus, the only major difference in the CharacterOffset case should be (3), which
1904 we handle by only allowing the case where the given offset is equal to the very end of a text run for caret
1905 offsets, and not character offsets.
1907 (WebCore::SimpleLineLayout::containsCaretOffset): Deleted.
1909 Renamed to just containsOffset.
1911 2019-08-07 Youenn Fablet <youenn@apple.com>
1913 ASSERT that a sessionID is valid when encoding it
1914 https://bugs.webkit.org/show_bug.cgi?id=199302
1916 Reviewed by Darin Adler.
1918 For IDBValue, instead of encoding an invalid session ID, encode a boolean that tells there is no sessionID.
1919 For IDBRequestData, keep track of whether there is an IDBDatabaseIdentifier
1920 and encode/decode accordingly to not encode an invalid sessionID.
1921 No observable change of behavior.
1923 * Modules/indexeddb/IDBValue.h:
1924 (WebCore::IDBValue::sessionID const):
1925 (WebCore::IDBValue::encode const):
1926 (WebCore::IDBValue::decode):
1927 * Modules/indexeddb/shared/IDBRequestData.cpp:
1928 (WebCore::IDBRequestData::isolatedCopy):
1929 * Modules/indexeddb/shared/IDBRequestData.h:
1930 (WebCore::IDBRequestData::databaseIdentifier const):
1931 (WebCore::IDBRequestData::decode):
1933 2019-08-07 Zalan Bujtas <zalan@apple.com>
1935 [LFC] Rename FormattingContext::layoutOutOfFlowDescendants to layoutOutOfFlowContent
1936 https://bugs.webkit.org/show_bug.cgi?id=200502
1937 <rdar://problem/54032534>
1939 Reviewed by Antti Koivisto.
1941 The layoutOutOfFlowDescendants name is not entirely accurate. In a formatting context we only
1942 lay out the out-of-flow boxes that actually belong to the current formatting context.
1944 <div style="float: left">
1945 <div id=outer style="position: absolute">
1946 <div id=inner style="position: absolute"></div>
1950 The float's formatting context only lays out the outer absolutely positioned box. The inner box
1951 (which is also an out-of-flow descendant of the float box) is taken care of by the outer box.
1953 * layout/FormattingContext.cpp:
1954 (WebCore::Layout::FormattingContext::layoutOutOfFlowContent const):
1955 (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
1956 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const): Deleted.
1957 * layout/FormattingContext.h:
1958 * layout/LayoutState.cpp:
1959 (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
1960 * layout/blockformatting/BlockFormattingContext.cpp:
1961 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
1962 * layout/inlineformatting/InlineFormattingContext.cpp:
1963 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
1965 2019-08-07 Zalan Bujtas <zalan@apple.com>
1967 [LFC] Introduce Layout::Phase class
1968 https://bugs.webkit.org/show_bug.cgi?id=200473
1969 <rdar://problem/53996061>
1971 Reviewed by Antti Koivisto.
1973 It helps to check whether we could run certain actions like layout while constructing the tree.
1976 * WebCore.xcodeproj/project.pbxproj:
1977 * layout/LayoutState.h:
1978 * layout/floats/FloatingContext.cpp:
1979 * layout/inlineformatting/InlineLine.cpp:
1980 * layout/layouttree/LayoutBox.cpp:
1981 (WebCore::Layout::Box::establishesFormattingContext const):
1982 (WebCore::Layout::Box::containingBlock const):
1983 (WebCore::Layout::Box::formattingContextRoot const):
1984 * layout/layouttree/LayoutTreeBuilder.cpp:
1985 (WebCore::Layout::TreeBuilder::createLayoutTree):
1987 2019-08-07 Chris Lord <clord@igalia.com>
1989 context-attributes-alpha-depth-stencil-antialias fails on WPE WebKit
1990 https://bugs.webkit.org/show_bug.cgi?id=200434
1992 Reviewed by Žan Doberšek.
1994 This patch fixes 16-bit surfaces being used for FBOs with no
1995 alpha component when using the GLES implementation of GraphicsContext3D.
1997 * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1998 (WebCore::GraphicsContext3D::reshapeFBOs):
1999 Use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_SHORT_5_6_5 for surfaces with no alpha.
2001 2019-08-06 Saam Barati <sbarati@apple.com>
2003 [WHLSL] Make resolveFunction in Checker faster
2004 https://bugs.webkit.org/show_bug.cgi?id=200287
2006 Reviewed by Robin Morisset.
2008 This patch makes compute_boids faster by making function overload
2009 resolution faster inside the Checker. It's a ~6ms speedup in the
2010 checker. The main idea is to limit the number of overloads we need
2011 to look for by using a hash table that describes a function's type
2012 instead of just using a hash table keyed by a function's name.
2014 The interesting implementation detail here is we must construct entries
2015 in the hash table such that they still allow constants to be resolved to
2016 various types. This means that the key in the hash table must normalize
2017 the vector of types it uses to express a function's identity. The normalization
2024 The first two rules are because int constants can be matched against
2025 the float and uint types. The latter two rules are because the null
2026 literal can be matched against any pointer or any array reference
2027 (we pick float* arbitrarily). Even though it seems like these
2028 normalization rules would drastically broaden the efficacy of the hash
2029 table, we still see a 100x reduction in the number of overloads we must
2030 resolve inside compute_boids. We go from having to resolve 400,000
2031 overloads to just resolving 4,000.
2033 * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
2034 (WebCore::WHLSL::FunctionKey::FunctionKey):
2035 (WebCore::WHLSL::FunctionKey::isEmptyValue const):
2036 (WebCore::WHLSL::FunctionKey::isHashTableDeletedValue const):
2037 (WebCore::WHLSL::FunctionKey::hash const):
2038 (WebCore::WHLSL::FunctionKey::operator== const):
2039 (WebCore::WHLSL::FunctionKey::Hash::hash):
2040 (WebCore::WHLSL::FunctionKey::Hash::equal):
2041 (WebCore::WHLSL::FunctionKey::Traits::isEmptyValue):
2042 (WebCore::WHLSL::Checker::Checker):
2043 (WebCore::WHLSL::Checker::wrappedFloatType):
2044 (WebCore::WHLSL::Checker::genericPointerType):
2045 (WebCore::WHLSL::Checker::normalizedTypeForFunctionKey):
2046 (WebCore::WHLSL::Checker::resolveFunction):
2047 (WebCore::WHLSL::Checker::finishVisiting):
2048 (WebCore::WHLSL::Checker::visit):
2049 (WebCore::WHLSL::resolveFunction): Deleted.
2051 2019-08-06 LoĂŻc Yhuel <loic.yhuel@softathome.com>
2053 Fix 32-bit Linux build after r248282
2054 https://bugs.webkit.org/show_bug.cgi?id=200491
2056 Reviewed by Youenn Fablet.
2058 minInterToneGapMs must be a size_t like interToneGap for std::max call.
2059 The other constants are updated for consistency, even if the compiler
2060 was able to cast them automatically.
2062 * Modules/mediastream/RTCDTMFSender.cpp:
2064 2019-08-06 Commit Queue <commit-queue@webkit.org>
2066 Unreviewed, rolling out r248289.
2067 https://bugs.webkit.org/show_bug.cgi?id=200488
2069 Broke internal builds (Requested by drousso on #webkit).
2073 "Web Inspector: Styles: show @supports CSS groupings"
2074 https://bugs.webkit.org/show_bug.cgi?id=200419
2075 https://trac.webkit.org/changeset/248289
2077 2019-08-06 Chris Dumez <cdumez@apple.com>
2079 Fix inefficiency in HTTPHeaderMap::set(CFStringRef, const String&)
2080 https://bugs.webkit.org/show_bug.cgi?id=200475
2082 Reviewed by Darin Adler.
2084 In the case where CFStringGetCStringPtr() succeeds in returning us a pointer
2085 to the CFStringRef underlying characters but it is not a common header, we
2086 would fall back to calling HTTPHeaderMap::set(const String&, const String&)
2087 which would unecessarily call findHTTPHeaderName() again to try and determine
2088 if it is a common header. Avoid this by introducing a new setUncommonHeader()
2089 private method and calling this one instead. Also got rid of some code
2090 duplication at the same time.
2092 * platform/network/HTTPHeaderMap.cpp:
2093 (WebCore::HTTPHeaderMap::set):
2094 (WebCore::HTTPHeaderMap::setUncommonHeader):
2095 * platform/network/HTTPHeaderMap.h:
2096 * platform/network/HTTPParsers.cpp:
2097 (WebCore::parseHTTPHeader):
2098 * testing/MockCDMFactory.cpp:
2099 (WebCore::MockCDMInstance::setServerCertificate):
2101 2019-08-06 Saam Barati <sbarati@apple.com>
2103 [WHLSL] Remove the auto initialize variables pass
2104 https://bugs.webkit.org/show_bug.cgi?id=200472
2106 Reviewed by Robin Morisset.
2108 From a separation of concerns perspective, it's a bit nicer to make variables
2109 without initializers call their default constructors as a transformation over the AST.
2110 This removes the need for the lowering to need to worry about such things. However,
2111 changing metal lowering to deal with this is trivial. It means we need to change one
2112 line of code in Metal code generation, and we get to remove a ~50 LOC AST pass.
2113 Also, in this case, it saves us from the compile time hit of having to run the
2114 auto initialize variables phase, which takes ~1.2ms on compute_boids.
2116 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
2117 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
2118 * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: Removed.
2119 * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h: Removed.
2120 * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
2121 (WebCore::WHLSL::prepareShared):
2123 * WebCore.xcodeproj/project.pbxproj:
2125 2019-08-06 Sam Weinig <weinig@apple.com>
2127 WHLSL Metal code generation unnecessarily does string copies by passing partial results as Strings
2128 https://bugs.webkit.org/show_bug.cgi?id=200471
2130 Reviewed by Saam Barati.
2132 Avoid string copies by passing a single StringBuilder all the way through Metal code
2133 generation and only converting to a String when passing the constructed shader to Metal
2136 Where possible, use StringView in lieu of String for temporary strings being passed to
2137 the StringBuilder to avoid the allocation overhead of StringImpl.
2139 * Modules/webgpu/WHLSL/AST/WHLSLAddressSpace.h:
2140 (WebCore::WHLSL::AST::toString):
2141 Switch to StringView.
2143 * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
2144 (WebCore::WHLSL::AST::BuiltInSemantic::toString const):
2145 Switch to StringView.
2147 * Modules/webgpu/WHLSL/AST/WHLSLEntryPointType.h:
2148 (WebCore::WHLSL::AST::toString):
2149 Switch to StringView.
2151 * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
2152 Remove unnecessary "private:".
2154 * Modules/webgpu/WHLSL/AST/WHLSLResourceSemantic.h:
2155 (WebCore::WHLSL::AST::ResourceSemantic::toString):
2156 Switch to StringView.
2158 * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
2159 (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceHelperTypes):
2160 (WebCore::WHLSL::Metal::EntryPointScaffolding::emitResourceSignature):
2161 (WebCore::WHLSL::Metal::EntryPointScaffolding::emitBuiltInsSignature):
2162 (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledInputPath):
2163 (WebCore::WHLSL::Metal::EntryPointScaffolding::emitMangledOutputPath):
2164 (WebCore::WHLSL::Metal::EntryPointScaffolding::emitUnpackResourcesAndNamedBuiltIns):
2165 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitHelperTypes):
2166 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitSignature):
2167 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitUnpack):
2168 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::emitPack):
2169 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitHelperTypes):
2170 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitSignature):
2171 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitUnpack):
2172 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::emitPack):
2173 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitHelperTypes):
2174 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitSignature):
2175 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitUnpack):
2176 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::emitPack):
2177 (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes): Deleted.
2178 (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceSignature): Deleted.
2179 (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature): Deleted.
2180 (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath): Deleted.
2181 (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledOutputPath): Deleted.
2182 (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns): Deleted.
2183 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::helperTypes): Deleted.
2184 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature): Deleted.
2185 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::unpack): Deleted.
2186 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack): Deleted.
2187 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::helperTypes): Deleted.
2188 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature): Deleted.
2189 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::unpack): Deleted.
2190 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack): Deleted.
2191 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::helperTypes): Deleted.
2192 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature): Deleted.
2193 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::unpack): Deleted.
2194 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::pack): Deleted.
2195 * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
2196 Rather than have scaffolding return strings, pass in StringBuilders everywhere.
2198 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
2199 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
2200 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
2201 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitConstantExpressionString):
2202 (WebCore::WHLSL::Metal::generateMetalFunctionsMapping):
2203 (WebCore::WHLSL::Metal::emitSharedMetalFunctions):
2204 (WebCore::WHLSL::Metal::emitMetalFunctions):
2205 (WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter): Deleted.
2206 (WebCore::WHLSL::Metal::FunctionDeclarationWriter::toString): Deleted.
2207 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::toString): Deleted.
2208 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString): Deleted.
2209 (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter): Deleted.
2210 (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter): Deleted.
2211 (WebCore::WHLSL::Metal::sharedMetalFunctions): Deleted.
2212 (WebCore::WHLSL::Metal::metalFunctions): Deleted.
2213 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h:
2214 Rather than returning Strings from function generation functions, pass in StringBuilders everywhere.
2216 * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
2217 (WebCore::WHLSL::Metal::metalCodeProlog):
2218 (WebCore::WHLSL::Metal::dumpMetalCodeIfNeeded):
2219 (WebCore::WHLSL::Metal::generateMetalCode):
2220 (WebCore::WHLSL::Metal::generateMetalCodeShared): Deleted.
2221 * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h:
2222 Switch RenderMetalCode and ComputeMetalCode to contain StringBuilders to allow
2223 delaying conversion to String to the latest point possible.
2225 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
2226 (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDeclarations):
2227 (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
2228 (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
2229 (WebCore::WHLSL::Metal::TypeNamer::emitAllUnnamedTypeDefinitions):
2230 (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypeDefinitions):
2231 (WebCore::WHLSL::Metal::TypeNamer::emitMetalTypes):
2232 (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter): Deleted.
2233 (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::toString): Deleted.
2234 (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::visit): Deleted.
2235 (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations): Deleted.
2236 (WebCore::WHLSL::Metal::TypeNamer::metalTypeDefinitions): Deleted.
2237 (WebCore::WHLSL::Metal::TypeNamer::metalTypes): Deleted.
2238 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
2239 Rather than returning Strings from function generation functions, pass in StringBuilders everywhere.
2241 * Modules/webgpu/WHLSL/WHLSLParser.cpp:
2242 (WebCore::WHLSL::Parser::parseResourceSemantic):
2243 Remove use of _str, which allocates a String, and just use a StringView directly.
2245 * Modules/webgpu/WHLSL/WHLSLPrepare.h:
2246 Switch RenderPrepareResult and ComputePrepareResult to contain StringBuilders to allow
2247 delaying conversion to String to the latest point possible.
2249 * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
2250 (WebCore::trySetFunctions):
2251 * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2252 (WebCore::trySetFunctions):
2253 Convert StringBuilders to String at the last moment necessary. Adds a FIXME to improve
2254 in the future by adding direct conversion from StringBuilder to NSString to avoid another
2257 2019-08-06 Saam Barati <sbarati@apple.com>
2259 [WHLSL] Reduce the number of variables that make it into the global struct by skipping stdlib functions and internal uses of MakePointerExpression/MakeArrayReference
2260 https://bugs.webkit.org/show_bug.cgi?id=200463
2262 Reviewed by Myles C. Maxfield.
2264 This patch makes it so that we put fewer variables in the global struct.
2265 This decreases end-to-end running time in compute_boids by 30% (with p = 0.0001).
2267 We achieve this in two ways:
2268 1. We track if each function is user code or "standard library" code. We also
2269 count native functions as the standard library. We know a priori that the
2270 standard library never escapes any variables. So the preserve variable
2271 lifetimes phase skips analyzing all standard library functions and also
2272 skips passing the global struct to any standard library functions.
2274 2. We internally emit MakePointerExpression/MakeArrayReferenceExpression nodes in
2275 the compiler in various phases. We sometimes emit these nodes in such a way
2276 that we know that this address-of expression does not cause the variable to
2277 escape. We now mark each address-of expressions as either:
2278 - Conservatively escaping. We conservatively do this for all user code.
2279 - Not escaping. This means that this address-of operation definitely does
2280 not escape the variable. If a variable never has an escaping use, we will
2281 omit putting this variable in the struct.
2283 * Modules/webgpu/WHLSL/AST/WHLSLAddressEscapeMode.h: Added.
2284 * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
2285 (WebCore::WHLSL::AST::FunctionDeclaration::FunctionDeclaration):
2286 (WebCore::WHLSL::AST::FunctionDeclaration::parsingMode const):
2287 * Modules/webgpu/WHLSL/AST/WHLSLMakeArrayReferenceExpression.h:
2288 (WebCore::WHLSL::AST::MakeArrayReferenceExpression::MakeArrayReferenceExpression):
2289 (WebCore::WHLSL::AST::MakeArrayReferenceExpression::mightEscape const):
2290 * Modules/webgpu/WHLSL/AST/WHLSLMakePointerExpression.h:
2291 (WebCore::WHLSL::AST::MakePointerExpression::MakePointerExpression):
2292 (WebCore::WHLSL::AST::MakePointerExpression::mightEscape const):
2293 * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
2294 (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
2295 (WebCore::WHLSL::resolveWithOperatorLength):
2296 (WebCore::WHLSL::resolveWithReferenceComparator):
2297 * Modules/webgpu/WHLSL/WHLSLParser.cpp:
2298 (WebCore::WHLSL::Parser::parse):
2299 (WebCore::WHLSL::Parser::parseComputeFunctionDeclaration):
2300 (WebCore::WHLSL::Parser::parseVertexOrFragmentFunctionDeclaration):
2301 (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
2302 (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
2303 (WebCore::WHLSL::Parser::parsePossiblePrefix):
2304 * Modules/webgpu/WHLSL/WHLSLParser.h:
2305 * Modules/webgpu/WHLSL/WHLSLParsingMode.h: Added.
2306 * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
2307 (WebCore::WHLSL::prepareShared):
2308 * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
2309 * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
2310 (WebCore::WHLSL::wrapAnderCallArgument):
2311 (WebCore::WHLSL::modify):
2312 (WebCore::WHLSL::PropertyResolver::visit):
2313 * Modules/webgpu/WHLSL/WHLSLStandardLibraryUtilities.cpp:
2314 (WebCore::WHLSL::includeStandardLibrary):
2315 * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
2316 (WebCore::WHLSL::synthesizeArrayOperatorLength):
2317 * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
2318 (WebCore::WHLSL::synthesizeConstructors):
2319 * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
2320 (WebCore::WHLSL::synthesizeEnumerationFunctions):
2321 * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
2322 (WebCore::WHLSL::synthesizeStructureAccessors):
2323 * WebCore.xcodeproj/project.pbxproj:
2325 2019-08-06 Jer Noble <jer.noble@apple.com>
2327 Adopt -expectMinimumUpcomingSampleBufferPresentationTime:
2328 https://bugs.webkit.org/show_bug.cgi?id=200457
2329 <rdar://problem/53961130>
2331 Reviewed by Eric Carlson.
2333 Test: media/media-source/media-source-minimumupcomingpresentationtime.html
2335 Adopt a new API vended by AVSampleBufferDisplayLayer, piped from SourceBuffer down
2336 through SourceBufferPrivate to SourceBufferPrivateAVFObjC. This value should be
2337 reset and updated when new samples are appended.
2339 * Modules/mediasource/SourceBuffer.cpp:
2340 (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample):
2341 (WebCore::SourceBuffer::provideMediaData):
2342 (WebCore::SourceBuffer::updateMinimumUpcomingPresentationTime):
2343 (WebCore::SourceBuffer::resetMinimumUpcomingPresentationTime):
2344 (WebCore::SourceBuffer::minimumUpcomingPresentationTimeForTrackID):
2345 (WebCore::SourceBuffer::setMaximumQueueDepthForTrackID):
2346 * Modules/mediasource/SourceBuffer.h:
2347 * platform/graphics/SourceBufferPrivate.h:
2348 (WebCore::SourceBufferPrivate::canSetMinimumUpcomingPresentationTime const):
2349 (WebCore::SourceBufferPrivate::setMinimumUpcomingPresentationTime):
2350 (WebCore::SourceBufferPrivate::clearMinimumUpcomingPresentationTime):
2351 (WebCore::SourceBufferPrivate::enqueuedSamplesForTrackID):
2352 (WebCore::SourceBufferPrivate::minimumUpcomingPresentationTimeForTrackID):
2353 (WebCore::SourceBufferPrivate::setMaximumQueueDepthForTrackID):
2354 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2355 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2356 (WebCore::SourceBufferPrivateAVFObjC::canSetMinimumUpcomingPresentationTime const):
2357 (WebCore::SourceBufferPrivateAVFObjC::setMinimumUpcomingPresentationTime):
2358 (WebCore::SourceBufferPrivateAVFObjC::clearMinimumUpcomingPresentationTime):
2359 * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2360 (WebCore::MockSourceBufferPrivate::minimumUpcomingPresentationTimeForTrackID):
2361 (WebCore::MockSourceBufferPrivate::setMaximumQueueDepthForTrackID):
2362 (WebCore::MockSourceBufferPrivate::canSetMinimumUpcomingPresentationTime const):
2363 (WebCore::MockSourceBufferPrivate::setMinimumUpcomingPresentationTime):
2364 (WebCore::MockSourceBufferPrivate::clearMinimumUpcomingPresentationTime):
2365 * platform/mock/mediasource/MockSourceBufferPrivate.h:
2366 * testing/Internals.cpp:
2367 (WebCore::Internals::minimumUpcomingPresentationTimeForTrackID):
2368 (WebCore::Internals::setMaximumQueueDepthForTrackID):
2369 * testing/Internals.h:
2370 * testing/Internals.idl:
2372 2019-08-06 Antti Koivisto <antti@apple.com>
2374 Add release assert against InvalidationRuleSet mutation during invalidation
2375 https://bugs.webkit.org/show_bug.cgi?id=200467
2377 Reviewed by Chris Dumez.
2379 Try to get a more informative stack for rdar://problem/53413013
2381 * css/DocumentRuleSets.cpp:
2382 (WebCore::DocumentRuleSets::~DocumentRuleSets):
2383 (WebCore::DocumentRuleSets::collectFeatures const):
2384 * css/DocumentRuleSets.h:
2385 * style/AttributeChangeInvalidation.cpp:
2386 (WebCore::Style::AttributeChangeInvalidation::invalidateStyleWithRuleSets):
2387 * style/ClassChangeInvalidation.cpp:
2388 (WebCore::Style::ClassChangeInvalidation::invalidateStyleWithRuleSets):
2390 2019-08-06 Antti Koivisto <antti@apple.com>
2392 REGRESSION: Cannot tap on any buttons on m.naver.com home screen on iPad
2393 https://bugs.webkit.org/show_bug.cgi?id=200466
2395 Reviewed by Zalan Bujtas.
2397 The page calls preventDefault() for a mouse event generated by a site specific quirk.
2400 (WebCore::Quirks::shouldDispatchSimulatedMouseEvents const):
2402 Disable the quirk for the "m." subdomain. This is a mobile site that don't need or expect them.
2404 2019-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
2406 [iPadOS] Unable to increase zoom level on Google using the Aa menu
2407 https://bugs.webkit.org/show_bug.cgi?id=200453
2408 <rdar://problem/52278579>
2410 Reviewed by Tim Horton.
2412 Makes a couple of minor adjustments to how layout size scale factor is handled in ViewportConfiguration, to
2413 address some scenarios in which adjusting WKWebView's _viewScale does not have any apparent effect on the page.
2414 See changes below for more detail.
2416 Tests: fast/viewport/ios/non-responsive-viewport-after-changing-view-scale.html
2417 fast/viewport/ios/responsive-viewport-with-minimum-width-after-changing-view-scale.html
2419 * page/ViewportConfiguration.cpp:
2420 (WebCore::ViewportConfiguration::initialScaleFromSize const):
2422 When the page is either zoomed in or zoomed out using _viewScale, let the specified initial scale take
2423 precedence over the scale computed by fitting the content width to the view width, or the scale computed by
2424 fitting the content height to the view height.
2426 This avoids a scenario in which nothing happens when increasing view scale in a responsively designed web page
2427 that has a fixed minimum width. Before this change, when computing the initial scale at a view scale that would
2428 not allow the entire content width of the page to fit within the viewport, the new initial scale would remain
2429 unchanged if the initial scale in the meta viewport is not also set to 1, because a new initial scale would be
2430 computed in ViewportConfiguration::initialScaleFromSize to accomodate for the entire content width.
2432 Our new behavior allows us to zoom into the page, even if doing so would cause horizontal scrolling.
2434 (WebCore::ViewportConfiguration::updateConfiguration):
2436 When the page is either zoomed in or zoomed out using _viewScale and the default viewport configuration has a
2437 fixed width (e.g. on iPhone), then adjust the width of the default viewport configuration to account for the
2438 _viewScale. For example, the default width of a viewport-less web page is 980px on iPhone; at a view scale of 2,
2439 this would become 490px instead, and at 0.5 view scale, it would become 1960px.
2441 This ensures that on iPhone, for web pages without a meta viewport, changing the view scale still changes the
2442 layout and initial scale of the web page.
2444 * page/ViewportConfiguration.h:
2445 (WebCore::ViewportConfiguration::layoutSizeIsExplicitlyScaled const):
2447 2019-08-05 Zalan Bujtas <zalan@apple.com>
2449 [LFC] Remove out-of-flow descendants from Container
2450 https://bugs.webkit.org/show_bug.cgi?id=200430
2451 <rdar://problem/53923980>
2453 Reviewed by Antti Koivisto.
2455 The out-of-flow descendant list is the last "formatting context type" bit in the layout tree.
2456 Let's cached them in the FormattingStates instead for now.
2458 * layout/FormattingContext.cpp:
2459 (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
2460 * layout/FormattingContext.h:
2461 * layout/FormattingState.h:
2462 (WebCore::Layout::FormattingState::addOutOfFlowBox):
2463 (WebCore::Layout::FormattingState::outOfFlowBoxes const):
2464 * layout/LayoutState.cpp:
2465 (WebCore::Layout::LayoutState::layoutFormattingContextSubtree):
2466 (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
2467 (WebCore::Layout::LayoutState::run):
2468 * layout/LayoutState.h:
2469 * layout/blockformatting/BlockFormattingContext.cpp:
2470 (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
2471 * layout/inlineformatting/InlineFormattingContext.cpp:
2472 (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
2473 * layout/layouttree/LayoutBox.h:
2474 * layout/layouttree/LayoutContainer.cpp:
2475 (WebCore::Layout::Container::addOutOfFlowDescendant): Deleted.
2476 * layout/layouttree/LayoutContainer.h:
2477 * layout/layouttree/LayoutTreeBuilder.cpp:
2478 (WebCore::Layout::TreeBuilder::createLayoutTree):
2479 * page/FrameViewLayoutContext.cpp:
2480 (WebCore::layoutUsingFormattingContext):
2482 2019-08-05 Devin Rousso <drousso@apple.com>
2484 Web Inspector: Styles: show @supports CSS groupings
2485 https://bugs.webkit.org/show_bug.cgi?id=200419
2487 Reviewed by Joseph Pecoraro.
2489 Test: inspector/css/getMatchedStylesForNode.html
2491 * inspector/InspectorStyleSheet.cpp:
2492 (WebCore::buildArrayForGroupings): Added.
2493 (WebCore::InspectorStyleSheet::buildObjectForRule):
2494 (WebCore::buildMediaObject): Deleted.
2495 (WebCore::fillMediaListChain): Deleted.
2498 * css/MediaList.cpp:
2499 (WebCore::MediaQuerySet::MediaQuerySet):
2500 Remove the `lastLine` as it was never set by anyone and wasn't used by Web Inspector.
2502 2019-08-05 Youenn Fablet <youenn@apple.com>
2504 Make Logger::log thread safe so that it can be used from background threads
2505 https://bugs.webkit.org/show_bug.cgi?id=200448
2507 Reviewed by Eric Carlson.
2509 No change of behavior.
2512 (WebCore::crossThreadCopy):
2513 (WebCore::Document::didLogMessage):
2514 Make sure to hop to the main thread if needed.
2515 * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
2516 (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
2517 Remove hopping to the main thread.
2518 * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
2519 (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):
2520 Remove hopping to the main thread.
2522 2019-08-05 Devin Rousso <drousso@apple.com>
2524 Can't use $0, $1 etc when inspecting Google Docs pages because the content uses these for function names
2525 https://bugs.webkit.org/show_bug.cgi?id=195834
2527 Reviewed by Joseph Pecoraro.
2529 Allow the user to alias saved results by providing a different prefix (e.g. "$") from within
2530 Web Inspector. When changing the alias, all existing saved results will update to be
2531 reference-able from the new alias.
2533 Test: inspector/runtime/setSavedResultAlias.html
2535 * inspector/CommandLineAPIModuleSource.js:
2538 2019-08-05 Devin Rousso <drousso@apple.com>
2540 Web Inspector: Timelines: disable related agents when the tab is closed
2541 https://bugs.webkit.org/show_bug.cgi?id=200118
2543 Reviewed by Joseph Pecoraro.
2545 Rework how `enable`/`disable` is used for timeline-related agents so that events are not sent
2546 and data isn't kept alive when the Timelines tab isn't enabled.
2548 * inspector/agents/InspectorTimelineAgent.h:
2549 * inspector/agents/InspectorTimelineAgent.cpp:
2550 (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend):
2551 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
2552 (WebCore::InspectorTimelineAgent::enable):
2553 (WebCore::InspectorTimelineAgent::disable):
2554 (WebCore::InspectorTimelineAgent::start):
2555 (WebCore::InspectorTimelineAgent::stop):
2556 (WebCore::InspectorTimelineAgent::internalStart):
2557 (WebCore::InspectorTimelineAgent::internalStop):
2558 (WebCore::InspectorTimelineAgent::startFromConsole):
2559 (WebCore::InspectorTimelineAgent::stopFromConsole):
2560 (WebCore::InspectorTimelineAgent::mainFrameStartedLoading):
2561 (WebCore::InspectorTimelineAgent::startProgrammaticCapture):
2562 (WebCore::InspectorTimelineAgent::stopProgrammaticCapture):
2563 Rename `m_enabled*` to `m_tracking*` to match other timeline-related agents.
2565 * inspector/agents/InspectorMemoryAgent.h:
2566 * inspector/agents/InspectorMemoryAgent.cpp:
2567 (WebCore::InspectorMemoryAgent::didCreateFrontendAndBackend):
2568 (WebCore::InspectorMemoryAgent::willDestroyFrontendAndBackend):
2569 (WebCore::InspectorMemoryAgent::enable):
2570 (WebCore::InspectorMemoryAgent::disable):
2571 (WebCore::InspectorMemoryAgent::didHandleMemoryPressure):
2573 * inspector/InstrumentingAgents.h:
2574 (WebCore::InstrumentingAgents::trackingInspectorTimelineAgent): Added.
2575 (WebCore::InstrumentingAgents::setTrackingInspectorTimelineAgent): Added.
2576 (WebCore::InstrumentingAgents::persistentInspectorTimelineAgent): Added.
2577 (WebCore::InstrumentingAgents::setPersistentInspectorTimelineAgent): Added.
2578 * inspector/InstrumentingAgents.cpp:
2579 (WebCore::InstrumentingAgents::reset):
2580 * inspector/InspectorInstrumentation.h:
2581 * inspector/InspectorInstrumentation.cpp:
2582 (WebCore::InspectorInstrumentation::didInstallTimerImpl):
2583 (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
2584 (WebCore::InspectorInstrumentation::willCallFunctionImpl):
2585 (WebCore::InspectorInstrumentation::willDispatchEventImpl):
2586 (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
2587 (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
2588 (WebCore::InspectorInstrumentation::willFireTimerImpl):
2589 (WebCore::InspectorInstrumentation::didInvalidateLayoutImpl):
2590 (WebCore::InspectorInstrumentation::willLayoutImpl):
2591 (WebCore::InspectorInstrumentation::willCompositeImpl):
2592 (WebCore::InspectorInstrumentation::didCompositeImpl):
2593 (WebCore::InspectorInstrumentation::willPaintImpl):
2594 (WebCore::InspectorInstrumentation::didPaintImpl):
2595 (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
2596 (WebCore::InspectorInstrumentation::didScheduleStyleRecalculationImpl):
2597 (WebCore::InspectorInstrumentation::didCommitLoadImpl):
2598 (WebCore::InspectorInstrumentation::frameStartedLoadingImpl):
2599 (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
2600 (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
2601 (WebCore::InspectorInstrumentation::consoleTimeStampImpl):
2602 (WebCore::InspectorInstrumentation::startProfilingImpl):
2603 (WebCore::InspectorInstrumentation::stopProfilingImpl):
2604 (WebCore::InspectorInstrumentation::timelineAgentTracking): Added.
2605 (WebCore::InspectorInstrumentation::didRequestAnimationFrameImpl):
2606 (WebCore::InspectorInstrumentation::didCancelAnimationFrameImpl):
2607 (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
2608 (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
2609 (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
2610 (WebCore::InspectorInstrumentation::timelineAgentEnabled): Deleted.
2611 * bindings/js/JSExecStateInstrumentation.h:
2612 (WebCore::JSExecState::instrumentFunctionInternal):
2613 Rename for clarity/correctness:
2614 - `inspectorTimelineAgent` => `trackingInspectorTimelineAgent`
2615 - `persistentInspectorTimelineAgent` => `inspectorTimelineAgent`
2617 2019-08-05 Fujii Hironori <Hironori.Fujii@sony.com>
2619 [Win] Specifying huge font-size causes crashing
2620 https://bugs.webkit.org/show_bug.cgi?id=200340
2622 Reviewed by Don Olmstead.
2624 Covered by existing tests.
2626 * platform/graphics/win/FontPlatformDataWin.cpp:
2627 (WebCore::FontPlatformData::FontPlatformData): Use GetTextFace to
2628 get font face names instead of GetOutlineTextMetrics which returns
2629 null for huge size fonts.
2631 2019-08-05 Youenn Fablet <youenn@apple.com>
2633 Response constructor doesn't throw on disturbed ReadableStream
2634 https://bugs.webkit.org/show_bug.cgi?id=200130
2635 <rdar://problem/53550351>
2637 Reviewed by Alex Christensen.
2639 Make FetchBody::extract return an exception in error cases.
2640 Update call sites accordingly.
2641 Add the error case as per https://fetch.spec.whatwg.org/#concept-bodyinit-extract, ReadableStream handling.
2643 Covered by updated and rebased tests.
2645 * Modules/beacon/NavigatorBeacon.cpp:
2646 (WebCore::NavigatorBeacon::sendBeacon):
2647 * Modules/fetch/FetchBody.cpp:
2648 (WebCore::FetchBody::extract):
2649 * Modules/fetch/FetchBody.h:
2650 * Modules/fetch/FetchBodyOwner.cpp:
2651 (WebCore::FetchBodyOwner::extractBody):
2652 * Modules/fetch/FetchBodyOwner.h:
2653 * Modules/fetch/FetchRequest.cpp:
2654 (WebCore::FetchRequest::initializeWith):
2655 (WebCore::FetchRequest::setBody):
2656 * Modules/fetch/FetchResponse.cpp:
2657 (WebCore::FetchResponse::create):
2658 * Modules/streams/ReadableStreamInternals.js:
2659 (readableStreamPipeTo): fix a case where the promise would be unhandled and would show up in
2660 unhandledrejectionhandler.
2662 2019-08-05 Youenn Fablet <youenn@apple.com>
2664 Support RTCRtpSender.dtmf
2665 https://bugs.webkit.org/show_bug.cgi?id=200431
2667 Reviewed by Eric Carlson.
2669 Add a new backend interface to RTCDTMFSender and implementation of it using libwebrtc.
2670 Update RTCDTMFSender to use that new backend and make RTCRtpSender return a RTCDTMFSender
2671 conditionally on a newly added runtime flag.
2672 Update RTCDTMFSender implementation based on https://w3c.github.io/webrtc-pc/#peer-to-peer-dtmf.
2674 Covered by rebased tests.
2676 * Modules/mediastream/PeerConnectionBackend.cpp:
2677 (WebCore::PeerConnectionBackend::context const):
2678 (WebCore::PeerConnectionBackend::transceiverFromSender):
2679 * Modules/mediastream/PeerConnectionBackend.h:
2680 * Modules/mediastream/RTCDTMFSender.cpp:
2681 (WebCore::RTCDTMFSender::RTCDTMFSender):
2682 (WebCore::RTCDTMFSender::canInsertDTMF const):
2683 (WebCore::RTCDTMFSender::toneBuffer const):
2684 (WebCore::isToneCharacterInvalid):
2685 (WebCore::RTCDTMFSender::insertDTMF):
2686 (WebCore::RTCDTMFSender::playNextTone):
2687 (WebCore::RTCDTMFSender::onTonePlayed):
2688 (WebCore::RTCDTMFSender::toneTimerFired):
2689 (WebCore::RTCDTMFSender::stop):
2690 (WebCore::RTCDTMFSender::activeDOMObjectName const):
2691 (WebCore::RTCDTMFSender::canSuspendForDocumentSuspension const):
2692 * Modules/mediastream/RTCDTMFSender.h:
2693 * Modules/mediastream/RTCDTMFSender.idl:
2694 * Modules/mediastream/RTCDTMFToneChangeEvent.cpp:
2695 * Modules/mediastream/RTCDTMFToneChangeEvent.h:
2696 * Modules/mediastream/RTCDTMFToneChangeEvent.idl:
2697 * Modules/mediastream/RTCRtpSender.cpp:
2698 (WebCore::RTCRtpSender::dtmf):
2699 (WebCore::RTCRtpSender::currentTransceiverDirection const):
2700 * Modules/mediastream/RTCRtpSender.h:
2701 * Modules/mediastream/RTCRtpSender.idl:
2702 * Modules/mediastream/RTCRtpSenderBackend.h:
2703 * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
2704 (WebCore::LibWebRTCRtpSenderBackend::createDTMFBackend):
2705 * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
2707 * WebCore.xcodeproj/project.pbxproj:
2708 * dom/EventNames.in:
2709 * dom/EventTargetFactory.in:
2710 * page/RuntimeEnabledFeatures.h:
2711 (WebCore::RuntimeEnabledFeatures::webRTCDTMFEnabled const):
2712 (WebCore::RuntimeEnabledFeatures::setWebRTCDTMFEnabled):
2713 * platform/mediastream/RTCDTMFSenderBackend.h: Added.
2714 * platform/mediastream/RTCDTMFSenderHandler.h: Removed.
2715 * platform/mediastream/RTCDTMFSenderHandlerClient.h: Removed.
2716 * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp: Added.
2717 (WebCore::toWTFString):
2718 (WebCore::LibWebRTCDTMFSenderBackend::LibWebRTCDTMFSenderBackend):
2719 (WebCore::LibWebRTCDTMFSenderBackend::~LibWebRTCDTMFSenderBackend):
2720 (WebCore::LibWebRTCDTMFSenderBackend::canInsertDTMF):
2721 (WebCore::LibWebRTCDTMFSenderBackend::playTone):
2722 (WebCore::LibWebRTCDTMFSenderBackend::tones const):
2723 (WebCore::LibWebRTCDTMFSenderBackend::duration const):
2724 (WebCore::LibWebRTCDTMFSenderBackend::interToneGap const):
2725 (WebCore::LibWebRTCDTMFSenderBackend::OnToneChange):
2726 (WebCore::LibWebRTCDTMFSenderBackend::onTonePlayed):
2727 * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h: Added.
2729 2019-08-05 Saam Barati <sbarati@apple.com>
2731 [WHLSL] Inline all native function calls
2732 https://bugs.webkit.org/show_bug.cgi?id=200350
2734 Reviewed by Robin Morisset.
2736 Native functions calls tend to be really small. If we inline in the generated
2737 Metal code, we end up with faster Metal compile times. On compute_boids, this
2738 provides a ~10ms improvement.
2740 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
2741 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
2742 (WebCore::WHLSL::Metal::sharedMetalFunctions):
2743 * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
2744 (WebCore::WHLSL::Metal::inlineNativeFunction):
2745 (WebCore::WHLSL::Metal::writeNativeFunction): Deleted.
2746 * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
2748 2019-08-05 Youenn Fablet <youenn@apple.com>
2750 RealtimeOutgoingAudioSource::pullAudioData is no longer needed
2751 https://bugs.webkit.org/show_bug.cgi?id=200450
2753 Reviewed by Geoffrey Garen.
2755 No change of behavior, removing base class method declaration.
2757 * platform/mediastream/RealtimeOutgoingAudioSource.h:
2758 (WebCore::RealtimeOutgoingAudioSource::pullAudioData): Deleted.
2759 * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h:
2760 * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.h:
2762 2019-08-05 Saam Barati <sbarati@apple.com>
2764 [WHLSL] Add compile time flag to dump metal compile times
2765 https://bugs.webkit.org/show_bug.cgi?id=200447
2767 Reviewed by Myles C. Maxfield.
2769 * Modules/webgpu/WHLSL/WHLSLPrepare.h:
2770 * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
2771 (WebCore::trySetFunctions):
2772 * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2773 (WebCore::trySetFunctions):
2775 2019-08-05 Chris Dumez <cdumez@apple.com>
2777 navigator.geolocation wrapper should not become GC-collectable once its frame is detached
2778 https://bugs.webkit.org/show_bug.cgi?id=200436
2780 Reviewed by Darin Adler.
2782 navigator.geolocation wrapper should not become GC-collectable once its frame is detached, given
2783 that it can outlive the frame. Instead, tie the navigator.geolocation wrapper's lifetime to its
2786 Test: fast/dom/navigator-property-gc-after-frame-detach.html
2788 * Modules/geolocation/Geolocation.cpp:
2789 (WebCore::Geolocation::create):
2790 (WebCore::Geolocation::Geolocation):
2791 (WebCore::Geolocation::navigator):
2792 (WebCore::Geolocation::frame const):
2793 * Modules/geolocation/Geolocation.h:
2794 * Modules/geolocation/Geolocation.idl:
2795 * Modules/geolocation/NavigatorGeolocation.cpp:
2796 (WebCore::NavigatorGeolocation::NavigatorGeolocation):
2797 (WebCore::NavigatorGeolocation::from):
2798 (WebCore::NavigatorGeolocation::geolocation):
2799 (WebCore::NavigatorGeolocation::geolocation const):
2800 * Modules/geolocation/NavigatorGeolocation.h:
2801 * bindings/js/JSNavigatorCustom.cpp:
2802 (WebCore::JSNavigator::visitAdditionalChildren):
2803 * bindings/js/JSWorkerNavigatorCustom.cpp:
2804 (WebCore::JSWorkerNavigator::visitAdditionalChildren):
2805 * bindings/scripts/CodeGeneratorJS.pm:
2806 (GenerateImplementation):
2807 * bindings/scripts/IDLAttributes.json:
2808 * page/Navigator.cpp:
2809 (WebCore::Navigator::plugins):
2810 (WebCore::Navigator::mimeTypes):
2811 * page/NavigatorBase.h:
2812 * plugins/DOMMimeTypeArray.cpp:
2813 (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
2814 * plugins/DOMMimeTypeArray.h:
2815 * plugins/DOMMimeTypeArray.idl:
2816 * plugins/DOMPluginArray.cpp:
2817 (WebCore::DOMPluginArray::DOMPluginArray):
2818 * plugins/DOMPluginArray.h:
2819 * plugins/DOMPluginArray.idl:
2820 * workers/service/ServiceWorkerContainer.h:
2821 * workers/service/ServiceWorkerContainer.idl:
2823 2019-08-05 Andy Estes <aestes@apple.com>
2825 [WebIDL] Support partial dictionaries and conditional dictionary members
2826 https://bugs.webkit.org/show_bug.cgi?id=200441
2828 Reviewed by Alex Christensen.
2830 Added new bindings tests.
2832 * bindings/scripts/CodeGeneratorJS.pm:
2833 (GenerateDictionaryImplementationContent):
2834 * bindings/scripts/IDLParser.pm:
2835 (parsePartialDefinition):
2836 (parsePartialInterface): Deleted.
2837 (parsePartialDictionary): Deleted.
2838 * bindings/scripts/generate-bindings.pl:
2840 * bindings/scripts/preprocess-idls.pl:
2841 (getPartialNamesFromIDL):
2842 (getPartialInterfaceNameFromIDL): Deleted.
2843 * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2844 (WebCore::convertDictionary<TestEventConstructor::Init>):
2845 * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2846 (WebCore::convertDictionary<DictionaryImplName>):
2847 (WebCore::convertDictionaryToJS):
2848 * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
2849 * bindings/scripts/test/TestStandaloneDictionary.idl:
2850 * bindings/scripts/test/TestSupplemental.idl:
2852 2019-08-05 Devin Rousso <drousso@apple.com>
2854 Web Inspector: rename "Stylesheet" to "Style Sheet" to match spec text
2855 https://bugs.webkit.org/show_bug.cgi?id=200422
2857 Reviewed by Joseph Pecoraro.
2859 No observable change in functionality.
2861 * inspector/agents/InspectorPageAgent.h:
2862 * inspector/agents/InspectorPageAgent.cpp:
2863 (WebCore::InspectorPageAgent::resourceTypeJSON):
2864 (WebCore::InspectorPageAgent::inspectorResourceType):
2866 2019-08-05 Takashi Komori <Takashi.Komori@sony.com>
2868 [Curl] implement CertificateInfo::summaryInfo
2869 https://bugs.webkit.org/show_bug.cgi?id=191498
2871 Reviewed by Alex Christensen.
2873 Implement CertificaeInfo::SummaryInfo.
2874 This patch makes WebInspector show summary of certificates.
2876 Tests: http/tests/inspector/network/resource-security-certificate.html
2877 http/tests/inspector/network/getSerializedCertificate.html
2879 * platform/Curl.cmake:
2880 * platform/network/curl/CertificateInfo.h:
2881 (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
2882 (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
2883 (WebCore::CertificateInfo::summaryInfo const): Deleted.
2884 * platform/network/curl/CertificateInfoCurl.cpp:
2885 (WebCore::CertificateInfo::summaryInfo const):
2886 * platform/network/curl/CurlSSLVerifier.cpp:
2887 (WebCore::CurlSSLVerifier::collectInfo):
2888 (WebCore::CurlSSLVerifier::verifyCallback):
2889 (WebCore::StackOfX509::StackOfX509): Deleted.
2890 (WebCore::StackOfX509::~StackOfX509): Deleted.
2891 (WebCore::StackOfX509::count): Deleted.
2892 (WebCore::StackOfX509::item): Deleted.
2894 (WebCore::BIOHolder::BIOHolder): Deleted.
2895 (WebCore::BIOHolder::~BIOHolder): Deleted.
2896 (WebCore::BIOHolder::write): Deleted.
2897 (WebCore::BIOHolder::asCertificate): Deleted.
2898 (WebCore::pemDataFromCtx): Deleted.
2899 * platform/network/curl/CurlSSLVerifier.h:
2900 * platform/network/curl/OpenSSLHelper.cpp: Added.
2901 (OpenSSL::deleter<X509>::operator()):
2902 (OpenSSL::StackOfGeneralName::StackOfGeneralName):
2903 (OpenSSL::StackOfGeneralName::~StackOfGeneralName):
2904 (OpenSSL::StackOfGeneralName::operator bool):
2905 (OpenSSL::StackOfGeneralName::count):
2906 (OpenSSL::StackOfGeneralName::item):
2907 (OpenSSL::StackOfX509::StackOfX509):
2908 (OpenSSL::StackOfX509::~StackOfX509):
2909 (OpenSSL::StackOfX509::count):
2910 (OpenSSL::StackOfX509::item):
2911 (OpenSSL::BIO::BIO):
2912 (OpenSSL::BIO::~BIO):
2913 (OpenSSL::BIO::getDataAsVector const):
2914 (OpenSSL::BIO::getDataAsString const):
2915 (OpenSSL::BIO::readX509):
2916 (OpenSSL::BIO::get):
2917 (OpenSSL::pemDataFromCtx):
2918 (OpenSSL::createCertificateInfo):
2919 (OpenSSL::toString):
2920 (OpenSSL::getCommonName):
2921 (OpenSSL::getSubjectName):
2922 (OpenSSL::convertASN1TimeToSeconds):
2923 (OpenSSL::getSubjectAltName):
2924 (OpenSSL::createSummaryInfo):
2925 * platform/network/curl/OpenSSLHelper.h: Copied from Source/WebCore/platform/network/curl/CertificateInfoCurl.cpp.
2927 2019-08-04 Youenn Fablet <youenn@apple.com>
2929 WebRTC: got incorrect `this` in negotiationneeded event
2930 https://bugs.webkit.org/show_bug.cgi?id=200427
2932 Reviewed by Darin Adler.
2934 Make sure a dom object created through a JS built-in constructor is added to the wrapper cache.
2936 Test: webrtc/onnegotiationneeded.html
2938 * bindings/js/JSDOMBuiltinConstructor.h:
2939 (WebCore::createJSObjectFromWrapper):
2940 (WebCore::createJSObject):
2942 2019-08-04 Sam Weinig <weinig@apple.com>
2944 Mangled WHLSL names don't need to allocate Strings
2945 https://bugs.webkit.org/show_bug.cgi?id=200429
2947 Reviewed by Saam Barati.
2949 To avoid allocating strings for each mangled name used to transform WHLSL to Metal, which we'd
2950 like to avoid since it is both unnecessarily expensive in time and space, we can instead just
2951 store the unique integer identifier that was being used to construct the String.
2953 Since the existing mangled names were all of the form "prefix" + unsigned integer value (where
2954 prefix could be "type", "enumerationMember", "structureElement", "variable" or "function") we
2955 strongly type the integer by storing it in a struct (MangledVariableName, MangledTypeName, etc.)
2956 When the full name is actually needed, StringTypeAdapter's specialized for the structs are
2957 used to write directly into the preallocated buffers of StringBuilders or makeString().
2959 * Modules/webgpu/WHLSL/Metal/WHLSLMangledNames.h: Added.
2960 (WebCore::WHLSL::Metal::MangledVariableName):
2961 (WebCore::WHLSL::Metal::MangledTypeName):
2962 (WebCore::WHLSL::Metal::MangledStructureElementName):
2963 (WebCore::WHLSL::Metal::MangledEnumerationMemberName):
2964 (WebCore::WHLSL::Metal::MangledFunctionName):
2965 Adds structs for each type of mangled name and StringTypeAdapter specializations for
2966 each to allow their use in StringBuilder.flexibleAppend() or makeString().
2968 Additionally, a Variant, MangledOrNativeTypeName, of MangledTypeName and String is
2969 declared to allow for the few cases where a native type (e.g. float4) is needed. The
2970 StringTypeAdapter for MangledOrNativeTypeName could be generalized for any Variant
2971 in the future, but I left it non-general for now, as it is non-obvious if one would
2972 want to store Variant<Types...>, and have each member function construct a temporary
2973 StringTypeAdapter, or store a Variant<StringTypeAdapter<Types>...> and perform conversion
2974 in the construction.
2976 * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
2977 (WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding):
2978 (WebCore::WHLSL::Metal::internalTypeForSemantic):
2979 (WebCore::WHLSL::Metal::EntryPointScaffolding::builtInsSignature):
2980 (WebCore::WHLSL::Metal::EntryPointScaffolding::mangledInputPath):
2981 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::VertexEntryPointScaffolding):
2982 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::signature):
2983 (WebCore::WHLSL::Metal::VertexEntryPointScaffolding::pack):
2984 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::FragmentEntryPointScaffolding):
2985 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::signature):
2986 (WebCore::WHLSL::Metal::FragmentEntryPointScaffolding::pack):
2987 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::ComputeEntryPointScaffolding):
2988 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::signature):
2989 (WebCore::WHLSL::Metal::ComputeEntryPointScaffolding::pack):
2990 * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h:
2991 (WebCore::WHLSL::Metal::EntryPointScaffolding::parameterVariables):
2992 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
2993 (WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter):
2994 (WebCore::WHLSL::Metal::FunctionDeclarationWriter::visit):
2995 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
2996 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::generateNextVariableName):
2997 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
2998 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue):
2999 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
3000 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValue):
3001 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability):
3002 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
3003 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
3004 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
3005 (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::RenderFunctionDefinitionWriter):
3006 (WebCore::WHLSL::Metal::RenderFunctionDefinitionWriter::createEntryPointScaffolding):
3007 (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::ComputeFunctionDefinitionWriter):
3008 (WebCore::WHLSL::Metal::ComputeFunctionDefinitionWriter::createEntryPointScaffolding):
3009 (WebCore::WHLSL::Metal::sharedMetalFunctions):
3010 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h:
3011 * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h:
3012 * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
3013 (WebCore::WHLSL::Metal::writeNativeFunction):
3014 * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h:
3015 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
3016 (WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode):
3017 (WebCore::WHLSL::Metal::BaseTypeNameNode::mangledName const):
3018 (WebCore::WHLSL::Metal::ArrayTypeNameNode::ArrayTypeNameNode):
3019 (WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::ArrayReferenceTypeNameNode):
3020 (WebCore::WHLSL::Metal::PointerTypeNameNode::PointerTypeNameNode):
3021 (WebCore::WHLSL::Metal::ReferenceTypeNameNode::ReferenceTypeNameNode):
3022 (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter):
3023 (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations):
3024 (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
3025 (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
3026 (WebCore::WHLSL::Metal::TypeNamer::mangledNameForEnumerationMember):
3027 (WebCore::WHLSL::Metal::TypeNamer::mangledNameForStructureElement):
3028 * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
3029 (WebCore::WHLSL::Metal::TypeNamer::generateNextTypeName):
3030 (WebCore::WHLSL::Metal::TypeNamer::generateNextStructureElementName):
3031 (WebCore::WHLSL::Metal::TypeNamer::generateNextEnumerationMemberName):
3032 * Modules/webgpu/WHLSL/WHLSLPrepare.h:
3033 Replace uses of String with the appropriate mangled name type.
3035 * WebCore.xcodeproj/project.pbxproj:
3036 Add WHLSLMangledNames.h
3038 * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
3039 (WebCore::trySetFunctions):
3040 * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
3041 (WebCore::trySetFunctions):
3042 Convert the mangled names to Strings for passing to Metal API. NOTE: We could avoid having the
3043 toString() member function on MangledFunctionName if we allowed makeString() to take a single
3046 2019-08-04 Chris Dumez <cdumez@apple.com>
3048 Ping loads should not prevent page caching
3049 https://bugs.webkit.org/show_bug.cgi?id=200418
3050 <rdar://problem/53901632>
3052 Reviewed by Darin Adler.
3054 We normally prevent page caching if there were any pending subresource loads when navigating,
3055 to avoid caching partial / broken content. However, this should not apply to Ping / Beacon
3056 loads since those do not impact page rendering and can outlive the page.
3058 Tests: http/tests/navigation/page-cache-pending-ping-load-cross-origin.html
3059 http/tests/navigation/page-cache-pending-ping-load-same-origin.html
3061 * history/PageCache.cpp:
3062 (WebCore::PageCache::addIfCacheable):
3063 After we've fired the 'pagehide' event in each frame, stop all the loads again. This is needed
3064 since pages are allowed to start ping / beacon loads in their 'pagehide' handlers. If we do not
3065 stop those loads, then the next call to canCachePage() would fail because the DocumentLoader is
3066 still loading. Note that we're not actually preventing these ping loads from hitting the server
3067 since we never cancel page loads and those can outlive their page.
3069 * loader/DocumentLoader.cpp:
3070 (WebCore::shouldPendingCachedResourceLoadPreventPageCache):
3071 (WebCore::areAllLoadersPageCacheAcceptable):
3072 Make sure that Ping / Beacon / Prefetches / Icon loads do not prevent page caching.
3074 (WebCore::DocumentLoader::addSubresourceLoader):
3075 Tweak assertion that was incorrect since we actually allow ping / beacon loads when the
3076 document is about to enter PageCache (while firing pagehide event).
3078 2019-08-04 Zalan Bujtas <zalan@apple.com>
3080 [LFC][TFC] Create formatting context/state.
3081 https://bugs.webkit.org/show_bug.cgi?id=200428
3082 <rdar://problem/53913625>
3084 Reviewed by Antti Koivisto.
3086 * layout/LayoutState.cpp:
3087 (WebCore::Layout::LayoutState::createFormattingStateForFormattingRootIfNeeded):
3088 (WebCore::Layout::LayoutState::createFormattingContext):
3090 2019-08-04 Zalan Bujtas <zalan@apple.com>
3092 [LFC] Cleanup preferred width computation
3093 https://bugs.webkit.org/show_bug.cgi?id=200426
3094 <rdar://problem/53912607>
3096 Reviewed by Antti Koivisto.
3098 The intrinsic width for a formatting root box has 2 sets of values now. One set(min/max) is stored in the established formatting context's state
3099 while the other is in the formatting context's state where the box lives.
3101 <div style="position: absolute"><div style="float: left; border: 1px solid green">foobar</div></div>
3103 The float box participates in the formatting context established by the absolutely position box, but it also establishes an inline formatting context.
3104 The min/max width pair in the established context is the width of the "foobar" (same value for min/max). This set is stored in the inline formatting state.
3105 However the float box has horizontal border so the "final" min/max width pair is expanded by this border value and stored in the formatting state where
3106 the box lives (which is different from the one it establishes).
3108 This and the "remove the formatting context type classes from the tree" changes open up interesting optimization opportunities.
3109 Here is a very simple case:
3110 <div style="display: inline-block; width: auto;">
3111 <div style="float: left">some text</div>
3112 <div style="float: left">some super long .... text</div>
3115 In order to lay out this content properly, we
3116 1. Compute the min/max width of the first float (expensive text measuring)
3117 2. Compute the min/max width of the second float (some more expensive text measuring)
3118 3. Compute the min/max width of the inline-block (that is pretty much the 2 float's min/max)
3119 4. Lay out the 2 floats, the empty div and the inline-block using these min/max width pairs.
3121 Now if the inline-block box's display value is changed to "block" and the positioning is to absolute (style="display: box; position: absolute;")
3122 we currently(on trunk) tear down the render tree, build a new one and run all the steps again from #1 to #4.
3124 In LFC, we start with the following layout tree
3125 <container> -> block formatting context
3126 <container> -> inline formatting context
3127 <anonymous inline box>
3128 <container> -> inline formatting context
3129 <anonymous inline box>
3130 <container> -> inline formatting context
3131 and when the style change happens, we don't need to tear down the tree at all. Not only that, but since every formatting contexts stay the same
3132 we can just reuse their states and actually skip all the steps (even the positioning since the absolutely positioned container has static top/bottom/left/right).
3134 Surprisingly the final layout produces the exact same "display boxes" as the original layout.
3136 * layout/FormattingContext.h:
3137 (WebCore::Layout::FormattingContext::IntrinsicWidthConstraints::expand):
3138 * layout/FormattingContextGeometry.cpp:
3139 (WebCore::Layout::FormattingContext::Geometry::shrinkToFitWidth):
3140 * layout/FormattingState.h:
3141 (WebCore::Layout::FormattingState::setIntrinsicWidthConstraints):
3142 (WebCore::Layout::FormattingState::intrinsicWidthConstraints const):
3143 (WebCore::Layout::FormattingState::setIntrinsicWidthConstraintsForBox):
3144 (WebCore::Layout::FormattingState::clearIntrinsicWidthConstraints):
3145 (WebCore::Layout::FormattingState::intrinsicWidthConstraintsForBox const):
3146 * layout/blockformatting/BlockFormattingContext.cpp:
3147 (WebCore::Layout::BlockFormattingContext::computedIntrinsicWidthConstraints const):
3148 (WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const): Deleted.
3149 * layout/blockformatting/BlockFormattingContext.h:
3150 * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3151 (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraints):
3152 (WebCore::Layout::BlockFormattingContext::Geometry::intrinsicWidthConstraintsNeedChildrenWidth): Deleted.
3153 * layout/displaytree/DisplayBox.h:
3154 (WebCore::Display::Box::horizontalMarginBorderAndPadding const):
3155 * layout/inlineformatting/InlineFormattingContext.cpp:
3156 (WebCore::Layout::nextInPreOrder):
3157 (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints const):
3158 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot const):
3159 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const): Deleted.
3160 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFloatBox const): Deleted.
3161 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForInlineBlock const): Deleted.
3162 * layout/inlineformatting/InlineFormattingContext.h:
3163 * layout/tableformatting/TableFormattingContext.cpp:
3164 (WebCore::Layout::TableFormattingContext::computedIntrinsicWidthConstraints const):
3165 * layout/tableformatting/TableFormattingContext.h:
3167 2019-08-03 Devin Rousso <drousso@apple.com>
3169 Web Inspector: DOM: add a special breakpoint for "All Events"
3170 https://bugs.webkit.org/show_bug.cgi?id=200285
3172 Reviewed by Joseph Pecoraro.
3174 Similar to the existing "All Requests" breakpoint, there should be a way to set a breakpoint
3175 that would pause for any DOM event, regardless of the event's name. This is useful for
3176 situations where the event name isn't known, or where one simply want's to pause on the next
3177 entry to the event loop.
3179 Along these lines, make the "requestAnimationFrame", "setTimeout", and "setInterval"
3180 event breakpoints into special breakpoints that can be added/removed via the create
3181 breakpoint context menu. This simplifies the process for setting these breakpoints, and also
3182 makes them more discoverable (most people wouldn't consider them to be "events").
3184 Tests: inspector/dom/breakpoint-for-event-listener.html
3185 inspector/dom-debugger/event-animation-frame-breakpoints.html
3186 inspector/dom-debugger/event-breakpoint-with-navigation.html
3187 inspector/dom-debugger/event-interval-breakpoints.html
3188 inspector/dom-debugger/event-listener-breakpoints.html
3189 inspector/dom-debugger/event-timeout-breakpoints.html
3191 * inspector/agents/InspectorDOMDebuggerAgent.h:
3192 * inspector/agents/InspectorDOMDebuggerAgent.cpp:
3193 (WebCore::InspectorDOMDebuggerAgent::disable):
3194 (WebCore::InspectorDOMDebuggerAgent::frameDocumentUpdated):
3195 (WebCore::InspectorDOMDebuggerAgent::setEventBreakpoint):
3196 (WebCore::InspectorDOMDebuggerAgent::removeEventBreakpoint):
3197 (WebCore::InspectorDOMDebuggerAgent::willHandleEvent):
3198 (WebCore::InspectorDOMDebuggerAgent::willFireTimer):
3199 (WebCore::InspectorDOMDebuggerAgent::willFireAnimationFrame):
3200 (WebCore::InspectorDOMDebuggerAgent::discardBindings): Deleted.
3201 Make `eventName` optional for `addEventBreakpoint`/`removeEventBreakpoint`. When omitted,
3202 the corresponding breakpoint that is added/removed is treated as a global breakpoint that
3203 applies to all events of that type (e.g. a global `listener` breakpoint would pause for any
3204 event that is fired).
3206 2019-08-03 Zalan Bujtas <zalan@apple.com>
3208 [LFC] Remove formatting context type leaf classes
3209 https://bugs.webkit.org/show_bug.cgi?id=200224
3210 <rdar://problem/53661907>
3212 Reviewed by Antti Koivisto.
3214 Let's keep the layout tree formatting context type independent.
3217 * WebCore.xcodeproj/project.pbxproj:
3218 * layout/inlineformatting/InlineFormattingContext.cpp:
3219 (WebCore::Layout::InlineFormattingContext::layout const):
3220 (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthConstraints const):
3221 (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox const):
3222 (WebCore::Layout::InlineFormattingContext::collectInlineContent const):
3223 * layout/inlineformatting/InlineFormattingContext.h:
3224 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3225 (WebCore::Layout::inlineItemWidth):
3226 (WebCore::Layout::LineLayout::placeInlineItem):
3227 * layout/inlineformatting/InlineItem.h:
3228 * layout/inlineformatting/InlineTextItem.cpp:
3229 (WebCore::Layout::InlineTextItem::createAndAppendTextItems):
3230 (WebCore::Layout::InlineTextItem::InlineTextItem):
3231 (WebCore::Layout::InlineTextItem::split const):
3232 * layout/inlineformatting/InlineTextItem.h:
3233 (WebCore::Layout::InlineTextItem::inlineBox const): Deleted.
3234 * layout/inlineformatting/text/TextUtil.cpp:
3235 (WebCore::Layout::TextUtil::width):
3236 (WebCore::Layout::TextUtil::split):
3237 * layout/inlineformatting/text/TextUtil.h:
3238 * layout/layouttree/LayoutBox.cpp:
3239 (WebCore::Layout::Box::Box):
3240 (WebCore::Layout::Box::~Box):
3241 (WebCore::Layout::Box::formattingContextRoot const):
3242 (WebCore::Layout::Box::setTextContent):
3243 (WebCore::Layout::Box::hasTextContent const):
3244 (WebCore::Layout::Box::textContent const):
3245 (WebCore::Layout::Box::replaced const):
3246 (WebCore::Layout::Box::replaced):
3247 (WebCore::Layout::Box::rareDataMap):
3248 (WebCore::Layout::Box::rareData const):
3249 (WebCore::Layout::Box::ensureRareData):
3250 (WebCore::Layout::Box::removeRareData):
3251 * layout/layouttree/LayoutBox.h:
3252 (WebCore::Layout::Box::isLineBreakBox const):
3253 (WebCore::Layout::Box::hasRareData const):
3254 (WebCore::Layout::Box::setHasRareData):
3255 (WebCore::Layout::Box::isInlineBox const): Deleted.
3256 (WebCore::Layout::Box::replaced const): Deleted.
3257 (WebCore::Layout::Box::replaced): Deleted.
3258 * layout/layouttree/LayoutContainer.h:
3259 (WebCore::Layout::Container::firstChild const): Deleted.
3260 (WebCore::Layout::Container::lastChild const): Deleted.
3261 (WebCore::Layout::Container::hasChild const): Deleted.
3262 (WebCore::Layout::Container::hasInFlowChild const): Deleted.
3263 (WebCore::Layout::Container::hasInFlowOrFloatingChild const): Deleted.
3264 (WebCore::Layout::Container::outOfFlowDescendants const): Deleted.
3265 * layout/layouttree/LayoutInlineBox.cpp: Removed.
3266 * layout/layouttree/LayoutInlineBox.h: Removed.
3267 * layout/layouttree/LayoutLineBreakBox.cpp: Removed.
3268 * layout/layouttree/LayoutLineBreakBox.h: Removed.
3269 * layout/layouttree/LayoutTreeBuilder.cpp:
3270 (WebCore::Layout::TreeBuilder::createLayoutBox):
3271 (WebCore::Layout::outputLayoutBox):
3273 2019-08-03 Zalan Bujtas <zalan@apple.com>
3275 [LFC] Remove formatting context type container classes.
3276 https://bugs.webkit.org/show_bug.cgi?id=200202
3278 Reviewed by Antti Koivisto.
3280 These are formatting context specific classes. Let's try to have a layout tree without such types.
3283 * WebCore.xcodeproj/project.pbxproj:
3284 * layout/blockformatting/BlockFormattingContext.cpp:
3285 (WebCore::Layout::BlockFormattingContext::computeIntrinsicWidthConstraints const):
3286 * layout/inlineformatting/InlineFormattingContext.cpp:
3287 (WebCore::Layout::InlineFormattingContext::layout const):
3288 (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer const):
3289 * layout/inlineformatting/InlineFormattingContext.h:
3290 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3291 (WebCore::Layout::InlineFormattingContext::InlineLayout::layout const):
3292 * layout/inlineformatting/InlineLine.cpp:
3293 (WebCore::Layout::Line::appendTextContent):
3294 * layout/layouttree/LayoutBlockContainer.cpp: Removed.
3295 * layout/layouttree/LayoutBlockContainer.h: Removed.
3296 * layout/layouttree/LayoutBox.cpp:
3297 (WebCore::Layout::Box::establishesInlineFormattingContext const):
3298 (WebCore::Layout::Box::establishesInlineFormattingContextOnly const):
3299 (WebCore::Layout::Box::formattingContextRoot const):
3300 * layout/layouttree/LayoutBox.h:
3301 (WebCore::Layout::Box::isBlockContainer const):
3302 (WebCore::Layout::Box::isInlineContainer const):
3303 (WebCore::Layout::Box::isInlineBox const):
3304 (WebCore::Layout::Box::establishesInlineFormattingContext const): Deleted.
3305 (WebCore::Layout::Box::establishesInlineFormattingContextOnly const): Deleted.
3306 * layout/layouttree/LayoutInlineContainer.cpp: Removed.
3307 * layout/layouttree/LayoutInlineContainer.h: Removed.
3308 * layout/layouttree/LayoutIterator.h:
3309 (WebCore::Layout::LayoutBoxTraversal::firstChild):
3310 * layout/layouttree/LayoutTreeBuilder.cpp:
3311 (WebCore::Layout::TreeBuilder::createLayoutTree):
3312 (WebCore::Layout::TreeBuilder::createLayoutBox):
3313 (WebCore::Layout::TreeBuilder::createTableStructure):
3314 (WebCore::Layout::outputLayoutBox):
3315 * layout/layouttree/LayoutTreeBuilder.h:
3316 * page/FrameViewLayoutContext.cpp:
3317 (WebCore::layoutUsingFormattingContext):
3319 2019-08-02 Robin Morisset <rmorisset@apple.com>
3321 [WHLSL] Avoid visiting the full AST in computeDimensions
3322 https://bugs.webkit.org/show_bug.cgi?id=200410
3324 Reviewed by Myles C. Maxfield.
3326 Avoid visiting the full AST in computeDimensions
3327 This cuts the time spent in computeDimensions on compute_boids.html from about 2ms to about 0.002ms.
3329 No new tests as there is no functional change intended.
3331 * Modules/webgpu/WHLSL/WHLSLComputeDimensions.cpp:
3332 (WebCore::WHLSL::computeDimensions):
3333 * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
3335 2019-08-02 Ryosuke Niwa <rniwa@webkit.org>
3337 Ref Frame in DOMWindow::screen* functions
3338 https://bugs.webkit.org/show_bug.cgi?id=200409
3340 Reviewed by Simon Fraser.
3342 Ref Frame in the following functions.
3344 * page/DOMWindow.cpp:
3345 (WebCore::DOMWindow::innerHeight const):
3346 (WebCore::DOMWindow::innerWidth const):
3347 (WebCore::DOMWindow::screenX const):
3348 (WebCore::DOMWindow::screenY const):
3349 (WebCore::DOMWindow::scrollX const):
3350 (WebCore::DOMWindow::scrollY const):
3352 2019-08-02 Mark Lam <mark.lam@apple.com>
3354 [ARM64E] Harden the diversity of the DOMJIT::Signature::unsafeFunction pointer.
3355 https://bugs.webkit.org/show_bug.cgi?id=200292
3356 <rdar://problem/53706881>
3358 Reviewed by Geoffrey Garen.
3360 * bindings/scripts/CodeGeneratorJS.pm:
3361 (GenerateImplementation):
3362 - Update to work with the new DOMJIT::Signature constructor.
3364 * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3365 - Re-base test results.
3367 2019-08-02 Keith Rollin <krollin@apple.com>
3369 Consistently use Obj-C boolean literals
3370 https://bugs.webkit.org/show_bug.cgi?id=200405
3371 <rdar://problem/53880043>
3373 Reviewed by Simon Fraser, Joseph Pecoraro.
3375 There are places where we use equivalent but different expressions for
3376 Obj-C boolean objects. For example, we use both [NSNumber
3377 numberWithBool:YES] and @YES. There are places where both are used in
3378 the same function, such as -[WebPreferences initialize]. The boolean
3379 literal is in greater use and is more succinct, so standardize on
3380 that. Also, change @(YES/NO) to @YES/NO.
3382 No new tests -- no new or changed functionality.
3384 * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3385 (WebCore::SourceBufferPrivateAVFObjC::enqueueSample):
3386 * platform/graphics/cv/ImageTransferSessionVT.mm:
3387 (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
3388 (WebCore::ImageTransferSessionVT::setSize):
3389 (WebCore::ImageTransferSessionVT::ioSurfacePixelBufferCreationOptions):
3390 * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
3391 (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
3392 * platform/mediastream/mac/ScreenDisplayCaptureSourceMac.mm:
3393 (WebCore::ScreenDisplayCaptureSourceMac::createDisplayStream):
3394 * platform/network/mac/ResourceHandleMac.mm:
3395 (WebCore::ResourceHandle::applySniffingPoliciesIfNeeded):
3397 2019-08-02 Andres Gonzalez <andresg_22@apple.com>
3399 Add accessibility object method to determine whether an element is inside a table cell. Needed for iOS accessibility client.
3400 https://bugs.webkit.org/show_bug.cgi?id=200394
3401 <rdar://problem/52914964>
3403 Reviewed by Chris Fleizach.
3405 Explicitly returning BOOL to avoid error in some compiler configurations.
3406 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3407 (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
3409 2019-08-02 Devin Rousso <drousso@apple.com>
3411 Web Inspector: fix inverted check in InspectorDOMStorageAgent::enable
3412 Followup to r248179.
3414 Rubber-stamped by Joseph Pecoraro.
3416 * inspector/agents/InspectorDOMStorageAgent.cpp:
3417 (WebCore::InspectorDOMStorageAgent::enable):
3419 2019-08-02 Fujii Hironori <Hironori.Fujii@sony.com>
3421 [Curl] Crash while destructing a URL in ~SocketStreamHandle due to data race
3422 https://bugs.webkit.org/show_bug.cgi?id=200378
3424 Reviewed by Ross Kirsling.
3426 URL::isolatedCopy() is called in the worker thread. URL is using a
3427 thread-unsafe ref-counter. It should be called in the main thread.
3429 Covered by existing tests.
3431 * platform/network/curl/SocketStreamHandleImpl.h:
3432 * platform/network/curl/SocketStreamHandleImplCurl.cpp:
3433 (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl): Call URL::isolatedCopy() in the main thread.
3434 (WebCore::SocketStreamHandleImpl::threadEntryPoint): Added a URL argument.
3436 2019-08-02 Sihui Liu <sihui_liu@apple.com>
3438 API tests using permanent credentials should clear credentials left by previous tests
3439 https://bugs.webkit.org/show_bug.cgi?id=199729
3441 Reviewed by Alex Christensen.
3443 Update existing API tests.
3445 * platform/network/CredentialStorage.cpp:
3446 (WebCore::CredentialStorage::clearSessionCredentials):
3447 (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted.
3448 * platform/network/CredentialStorage.h:
3449 * platform/network/mac/CredentialStorageMac.mm:
3450 (WebCore::CredentialStorage::clearPermanentCredentialsForProtectionSpace): Deleted.
3452 2019-08-02 Devin Rousso <drousso@apple.com>
3454 Web Inspector: Storage: disable related agents when the tab is closed
3455 https://bugs.webkit.org/show_bug.cgi?id=200117
3457 Reviewed by Joseph Pecoraro.
3459 Rework how `enable`/`disable` is used for storage-related agents so that events are not sent
3460 and data isn't kept alive when the Storage tab isn't enabled.
3462 Covered by existing tests.
3464 * inspector/agents/InspectorApplicationCacheAgent.h:
3465 * inspector/agents/InspectorApplicationCacheAgent.cpp:
3466 (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
3467 (WebCore::InspectorApplicationCacheAgent::enable):
3468 (WebCore::InspectorApplicationCacheAgent::disable): Added.
3470 * inspector/agents/InspectorDOMStorageAgent.cpp:
3471 (WebCore::InspectorDOMStorageAgent::enable):
3472 (WebCore::InspectorDOMStorageAgent::disable):
3474 * inspector/agents/InspectorDatabaseAgent.cpp:
3475 (WebCore::InspectorDatabaseAgent::enable):
3476 (WebCore::InspectorDatabaseAgent::disable):
3478 2019-08-02 Devin Rousso <drousso@apple.com>
3480 Web Inspector: Timelines: Develop > Start Timeline Recording doesn't work when focused on a detached inspector window
3481 https://bugs.webkit.org/show_bug.cgi?id=200125
3482 <rdar://problem/53543008>
3484 Reviewed by Brian Burg.
3486 Always show the Timelines tab in Web Inspector whenever timeline recording starts/stops.
3487 Notify the UIProcess whenever the timeline recording state changes.
3489 * inspector/InspectorClient.h:
3490 (WebCore::InspectorClient::timelineRecordingChanged): Added.
3492 * inspector/agents/InspectorTimelineAgent.h:
3493 * inspector/agents/InspectorTimelineAgent.cpp:
3494 (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
3495 (WebCore::InspectorTimelineAgent::internalStart):
3496 (WebCore::InspectorTimelineAgent::internalStop):
3498 2019-08-02 Yury Semikhatsky <yurys@chromium.org>
3500 Web Inspector: Crash when interacting with Template Content in Console
3501 https://bugs.webkit.org/show_bug.cgi?id=196280
3503 Reviewed by Joseph Pecoraro.
3505 Test: inspector/dom/inspect-template-node.html
3507 * bindings/js/JSDOMBindingSecurity.cpp:
3508 (WebCore::canAccessDocument): if target element is from a
3509 <template> use its host document to check the access. Elements
3510 from the host document always have access to its template elements content.
3511 * inspector/agents/InspectorDOMAgent.cpp:
3512 (WebCore::InspectorDOMAgent::resolveNode): templates are created in
3513 special template document which doesn't have a frame, in such case get
3514 the frame from the host document.
3516 2019-08-02 Ryosuke Niwa <rniwa@webkit.org>
3518 Harden NodeRareData::m_connectedFrameCount
3519 https://bugs.webkit.org/show_bug.cgi?id=200300
3521 Reviewed by Geoffrey Garen.
3523 Use unsinged integer type in NodeRareData::m_connectedFrameCount since it's padded anyway.
3526 (WebCore::Node::decrementConnectedSubframeCount): Check that hasRareNode() is true in release builds.
3527 * dom/NodeRareData.h:
3529 2019-08-02 Ryosuke Niwa <rniwa@webkit.org>
3531 Document::resume should delay resetting of form control elements.
3532 https://bugs.webkit.org/show_bug.cgi?id=200376
3534 Reviewed by Geoffrey Garen.
3536 Delay the execution of form control element resets until the next task
3537 to avoid synchronously mutating DOM during page cache restoration.
3539 Test: fast/frames/restoring-page-cache-should-not-run-scripts.html
3541 * html/HTMLFormElement.cpp:
3542 (WebCore::HTMLFormElement::resumeFromDocumentSuspension):
3543 * html/HTMLInputElement.cpp:
3544 (WebCore::HTMLInputElement::resumeFromDocumentSuspension):
3546 2019-08-02 Youenn Fablet <youenn@apple.com>
3548 [iOS] Directly use RealtimeMediaSourceCenter to compute the media capture state
3549 https://bugs.webkit.org/show_bug.cgi?id=200368
3550 <rdar://problem/53191450>
3553 Build fix by guarding with MEDIA_STREAM in addition to IOS.
3556 (WebCore::Document::updateIsPlayingMedia):
3557 (WebCore::Document::pageMutedStateDidChange):
3559 2019-08-02 Andres Gonzalez <andresg_22@apple.com>
3561 Add accessibility object method to determine whether an element is inside a table cell. Needed for iOS accessibility client.
3562 https://bugs.webkit.org/show_bug.cgi?id=200394
3563 <rdar://problem/52914964>
3565 Reviewed by Chris Fleizach.
3567 Test: accessibility/ios-simulator/element-in-table-cell.html
3569 Added _accessibilityIsInTableCell needed for iOS accessibility client.
3570 * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3571 (-[WebAccessibilityObjectWrapper _accessibilityIsInTableCell]):
3573 2019-08-02 Eric Carlson <eric.carlson@apple.com>
3575 [macOS, iOS] webaudio/silent-audio-interrupted-in-background.html sometimes crashes
3576 https://bugs.webkit.org/show_bug.cgi?id=200396
3577 <rdar://problem/53819720>
3579 Reviewed by Youenn Fablet.
3581 No new test, this fixes an existing test.
3583 * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3584 (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC): Drop the
3585 lock before clearing m_tapStorage.
3587 2019-08-02 Youenn Fablet <youenn@apple.com>
3589 [iOS] Directly use RealtimeMediaSourceCenter to compute the media capture state
3590 https://bugs.webkit.org/show_bug.cgi?id=200368
3591 <rdar://problem/53191450>
3593 Reviewed by Eric Carlson.
3595 Instead of registering a MediaStreamTrack as a media producer to compute capture state,
3596 go directly to the sources from the RealtimeMediaSourceCenter.
3597 Do the same when requested to mute capture tracks.
3599 No observable change of behavior.
3600 Covered by manual test on iOS and existing tests.
3602 * Modules/mediastream/MediaStreamTrack.cpp:
3603 (WebCore::MediaStreamTrack::MediaStreamTrack):
3604 (WebCore::MediaStreamTrack::~MediaStreamTrack):
3605 (WebCore::MediaStreamTrack::mediaState const):
3606 (WebCore::sourceCaptureState):
3607 (WebCore::MediaStreamTrack::captureState):
3608 (WebCore::MediaStreamTrack::muteCapture):
3609 * Modules/mediastream/MediaStreamTrack.h:
3611 (WebCore::Document::updateIsPlayingMedia):
3612 (WebCore::Document::pageMutedStateDidChange):
3614 2019-08-02 Chris Dumez <cdumez@apple.com>
3616 DOMWindow properties may get GC'd before their Window object
3617 https://bugs.webkit.org/show_bug.cgi?id=200359
3619 Reviewed by Ryosuke Niwa.
3621 DOMWindow properties may get GC'd before their Window object once their frame is detached. This
3622 is unexpected behavior given that these properties persist on the Window after the frame is
3623 detached. This patch thus updates their bindings so that they live as long as their window, not
3626 Note that this also fixes a thread-safety issue since DOMWindowProperty::frame() would get called
3627 from GC threads, although its implementation looks like:
3629 return m_window ? m_window->frame() : nullptr;
3632 Because m_window is a WeakPtr<DOMWindow> and because windows get destroyed on the main thread,
3633 we could in theory crash when dereferencing m_window->frame() from the GC thread.
3635 Test: fast/dom/dom-window-property-gc-after-frame-detach.html
3637 * bindings/js/JSDOMWindowCustom.cpp:
3638 (WebCore::JSDOMWindow::visitAdditionalChildren):
3639 * bindings/scripts/CodeGeneratorJS.pm:
3640 (GenerateImplementation):
3641 * bindings/scripts/IDLAttributes.json:
3642 * css/StyleMedia.idl:
3643 * loader/appcache/DOMApplicationCache.idl:
3645 * page/DOMSelection.idl:
3647 * page/Location.idl:
3648 * page/Navigator.idl:
3650 * page/VisualViewport.idl:
3651 * plugins/DOMMimeTypeArray.idl:
3652 * plugins/DOMPluginArray.idl:
3653 * storage/Storage.idl:
3655 2019-08-02 Konstantin Tokarev <annulen@yandex.ru>
3657 Remove constructors and operators of FontPlatformData defined only for Freetype
3658 https://bugs.webkit.org/show_bug.cgi?id=200379
3660 Reviewed by Carlos Garcia Campos.
3662 These methods only make maintenance harder, as all data fields are
3663 trivially copyable. Constructors generated by compiler should be used
3666 * platform/graphics/FontPlatformData.h:
3667 * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
3669 2019-08-02 Konstantin Tokarev <annulen@yandex.ru>
3671 Remove unused constructor declaration from FontPlatformData
3672 https://bugs.webkit.org/show_bug.cgi?id=200371
3674 Reviewed by Carlos Garcia Campos.
3676 It is not implemented by any port.
3678 * platform/graphics/FontPlatformData.h:
3680 2019-08-01 Chris Dumez <cdumez@apple.com>
3682 Pages using MessagePorts should be PageCacheable
3683 https://bugs.webkit.org/show_bug.cgi?id=200366
3684 <rdar://problem/53837882>
3686 Reviewed by Geoffrey Garen.
3688 Allow a page to enter PageCache, even if it has MessagePorts (potentially with
3689 pending messages). If there are pending messages on the MessagePorts when
3690 entering PageCache, those will get dispatched upon restoring from PageCache.
3692 Test: fast/history/page-cache-MessagePort-pending-message.html
3694 * dom/MessagePort.cpp:
3695 (WebCore::MessagePort::messageAvailable):
3696 (WebCore::MessagePort::dispatchMessages):
3697 Do not dispatch messages while in PageCache.
3699 (WebCore::MessagePort::canSuspendForDocumentSuspension const):
3700 Allow pages with MessagePort objects to enter PageCache.
3702 * dom/ScriptExecutionContext.cpp:
3703 (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
3704 Make sure pending messages on MessagePorts get dispatched asynchronously after restoring
3707 * loader/DocumentLoader.cpp:
3708 (WebCore::areAllLoadersPageCacheAcceptable):
3709 Make sure only CachedResources that are still loading upon load cancelation prevent
3712 2019-08-01 Konstantin Tokarev <annulen@yandex.ru>
3714 Fix compilation of PageConsoleClient with !ENABLE(VIDEO)
3715 https://bugs.webkit.org/show_bug.cgi?id=200380
3717 Reviewed by Joseph Pecoraro.
3719 * page/PageConsoleClient.cpp:
3720 (WebCore::PageConsoleClient::screenshot):
3722 2019-08-01 Mark Lam <mark.lam@apple.com>
3724 Add crash diagnostics for debugging unexpected zapped cells.
3725 https://bugs.webkit.org/show_bug.cgi?id=200149
3726 <rdar://problem/53570112>
3728 Reviewed by Yusuke Suzuki.
3730 No new tests because this is a feature for debugging crashes. It has been tested
3731 manually by modifying the code to force a crash at the point of interest.
3733 Added some comments to document the hashes of known subspaces.
3735 * bindings/js/WebCoreJSClientData.cpp:
3736 (WebCore::JSVMClientData::JSVMClientData):
3738 2019-08-01 Saam Barati <sbarati@apple.com>
3740 [WHLSL] Do simple nullptr check elimination using basic data flow analysis when generating metal code
3741 https://bugs.webkit.org/show_bug.cgi?id=200352
3743 Reviewed by Myles C. Maxfield.
3745 When doing metal code generation, we frequently know whether something
3746 is null or not. This patch does a basic propagation of this information
3747 to avoid emitting excessive null checks in the generated Metal code.
3748 This is a 6% speedup (with a p value of 0.0001) in Metal compile times
3751 An example of a null check we now eliminate is:
3754 thread int* ptr = &x; // We know that the lvalue for "x" is non-null, so we produce a non-null rvalue here.
3755 *ptr = 42; // We know that the "ptr" rvalue is non-null, so we omit the null check.
3758 * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
3759 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValueWithNullability):
3760 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendRightValue):
3761 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::appendLeftValue):
3762 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastValueAndNullability):
3763 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::takeLastLeftValue):
3764 (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
3766 2019-08-01 Alex Christensen <achristensen@webkit.org>
3768 Move FormData zip file generation to NetworkProcess and enable it for all WebKit clients for uploading directories
3769 https://bugs.webkit.org/show_bug.cgi?id=200102
3770 <rdar://problem/53275114>
3772 Reviewed by Darin Adler.
3774 To enable directory uploading in WebKit2, we extended WebKit1's model of asking the application to generate a file for uploading.
3775 This means the WebProcess needed access to everything necessary to zip a whole directory, and clients that have not implemented
3776 the strange WKBundlePageUIClient callbacks won't be able to upload directories. Safari's implementation had already been copied
3777 to BlobDataFileReference::generateReplacementFile, so I reused that code to do the zipping. Instead of a complicated model of
3778 keeping track of a filename, possibly a generated filename, and whether we think we own the file or not and having nobody clean up,
3779 we now do the generation, use, and cleaning up in the network process starting with a new function generateFilesForUpload.
3780 This removes unimplemented SPI in WebUIDelegatePrivate in WebKitLegacy and stops calling the WKBundlePageUIClient related to upload
3781 file generation and replaces them with automatic behavior equivalent to Safari's implementation of the WKBundlePageUIClient calls.
3782 Since we no longer need to do these file operations in the WebProcess, I am also reverting r245322 and r246077 which tightens the sandbox.
3784 Covered by an API test.
3786 * Modules/fetch/FetchBody.cpp:
3787 (WebCore::FetchBody::extract):
3788 (WebCore::FetchBody::bodyAsFormData const):
3789 * loader/FormSubmission.cpp:
3790 (WebCore::FormSubmission::create):
3791 * loader/FrameLoader.cpp:
3792 (WebCore::FrameLoader::submitForm):
3793 (WebCore::FrameLoader::loadDifferentDocumentItem):
3794 * loader/ResourceLoader.cpp:
3795 (WebCore::ResourceLoader::didReceiveResponse):
3796 (WebCore::ResourceLoader::cleanupForError):
3798 (WebCore::ChromeClient::shouldReplaceWithGeneratedFileForUpload): Deleted.
3799 (WebCore::ChromeClient::generateReplacementFile): Deleted.
3800 * page/ChromeClient.h:
3801 * platform/network/FormData.cpp:
3802 (WebCore::FormData::FormData):
3803 (WebCore::FormData::~FormData):
3804 (WebCore::FormData::createMultiPart):
3805 (WebCore::FormDataElement::lengthInBytes const):
3806 (WebCore::FormData::appendFile):
3807 (WebCore::FormData::appendFileRange):
3808 (WebCore::FormData::appendMultiPartFileValue):
3809 (WebCore::FormData::appendMultiPartKeyValuePairItems):
3810 (WebCore::FormData::resolveBlobReferences):
3811 (WebCore::generateFileForUpload):
3812 (WebCore::FormData::generateFilesForUpload):
3813 (WebCore::FormData::generateFiles): Deleted.
3814 (WebCore::FormData::hasGeneratedFiles const): Deleted.
3815 (WebCore::FormData::hasOwnedGeneratedFiles const): Deleted.
3816 (WebCore::FormData::removeGeneratedFilesIfNeeded): Deleted.
3817 * platform/network/FormData.h:
3818 (WebCore::FormDataElement::FormDataElement):
3819 (WebCore::FormDataElement::EncodedFileData::isolatedCopy const):
3820 (WebCore::FormDataElement::EncodedFileData::operator== const):
3821 (WebCore::FormDataElement::EncodedFileData::encode const):
3822 (WebCore::FormDataElement::EncodedFileData::decode):
3823 * platform/network/cf/FormDataStreamCFNet.cpp:
3824 (WebCore::advanceCurrentStream):
3825 (WebCore::formCreate):
3826 (WebCore::formFinalize):
3827 (WebCore::createHTTPBodyCFReadStream):
3828 * platform/network/mac/BlobDataFileReferenceMac.mm:
3829 (WebCore::generateFileForUpload):
3830 (WebCore::BlobDataFileReference::generateReplacementFile):
3831 * xml/XMLHttpRequest.cpp:
3832 (WebCore::XMLHttpRequest::send):
3834 2019-08-01 Wenson Hsieh <wenson_hsieh@apple.com>
3836 [Text autosizing] [iPadOS] Add targeted hacks to address some remaining text autosizing issues
3837 https://bugs.webkit.org/show_bug.cgi?id=200271
3838 <rdar://problem/51734741>
3840 Reviewed by Zalan Bujtas.
3842 Makes some targeted adjustments to the text autosizing heuristic, to ensure compatibility with several high-
3843 profile websites. See changes below for more detail.
3845 Tests: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidate-special-cases.html
3846 fast/text-autosizing/ios/idempotentmode/line-height-boosting.html
3848 * css/StyleResolver.cpp:
3849 (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
3851 Avoid clipped sidebar links on sohu.com by not performing line-height boosting in the case where the element
3852 probably has a small, fixed number of lines. See below for more detail. Additionally, don't attempt to adjust
3853 the line height using the boosted font size, in the case where the element is not a candidate for idempotent
3856 * rendering/style/RenderStyle.cpp:
3857 (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):
3859 Make various targeted hacks to fix a few websites:
3861 - Add a special case for top navigation bar links on yandex.ru, where line height greatly exceeds the
3862 specified font size.
3864 - Avoid boosting some related video links on v.youku.com by considering the line-clamp CSS property when
3865 determining the maximum number of lines of text an element is expected to contain.
3867 - Avoid boosting some front page links on asahi.com, which have non-repeating background images.
3869 - Add several other adjustments to more aggressively boost pieces of text on Google search results, such as
3870 taking the `word-break` CSS property into account.
3872 The bottom few pixels of sidebar links on naver.com are also no longer clipped after these changes.
3874 * rendering/style/TextSizeAdjustment.cpp:
3875 (WebCore::AutosizeStatus::probablyContainsASmallFixedNumberOfLines):
3877 Pulls out a piece of the heuristic added to fix sephora.com in r247467 out into a separate helper method. To
3878 recap, this heuristic identifies elements with both a fixed height and fixed line height, for which the fixed
3879 height is close to an integer multiple of the line height.
3881 Also makes several small tweaks in the process: (1) change the max difference between fixed line height and
3882 font size from 6 to 5 to ensure that some multiline caption text on Google search results is boosted, and (2)
3883 replace usages of `lineHeight()` with `specifiedLineHeight()`, which current prevents this function from being
3886 (WebCore::AutosizeStatus::updateStatus):
3887 * rendering/style/TextSizeAdjustment.h:
3889 2019-07-31 Mark Lam <mark.lam@apple.com>
3891 Rename DOMJIT safe/unsafeFunction to functionWithTypeChecks and functionWithoutTypeChecks.
3892 https://bugs.webkit.org/show_bug.cgi?id=200323
3894 Reviewed by Yusuke Suzuki.
3896 No new tests. This is just a refactoring exercise.
3898 * bindings/scripts/CodeGeneratorJS.pm:
3899 (GetArgumentTypeForFunctionWithoutTypeCheck):
3900 (GenerateImplementation):
3901 (GenerateOperationDefinition):
3902 (ToNativeForFunctionWithoutTypeCheck):
3903 (GetUnsafeArgumentType): Deleted.
3904 (UnsafeToNative): Deleted.
3905 * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3906 (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
3907 (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
3908 (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
3909 (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
3910 (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
3911 (WebCore::unsafeJsTestDOMJITPrototypeFunctionGetAttribute): Deleted.
3912 (WebCore::unsafeJsTestDOMJITPrototypeFunctionItem): Deleted.
3913 (WebCore::unsafeJsTestDOMJITPrototypeFunctionHasAttribute): Deleted.
3914 (WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementById): Deleted.
3915 (WebCore::unsafeJsTestDOMJITPrototypeFunctionGetElementsByName): Deleted.
3917 2019-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
3919 [SOUP] WebSockets: add support for extensions when using web sockets libsoup API
3920 https://bugs.webkit.org/show_bug.cgi?id=199943
3922 Reviewed by Alex Christensen.