9c0e831b04cef461f62a78792690c5369b320d97
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-10-03  Chris Dumez  <cdumez@apple.com>
2
3         XMLHttpRequest sometimes prevents pages from entering the back/forward cache
4         https://bugs.webkit.org/show_bug.cgi?id=202434
5         <rdar://problem/55890340>
6
7         Reviewed by Geoffrey Garen.
8
9         XMLHttpRequest::canSuspendForDocumentSuspension() was returning false if the document has not fired
10         the window's load event, with a comment explaining that cancelling the XHR in the upon suspension
11         may cause the load event to get fired and thus run script when forbidden. However, we should only
12         return false if the XMLHttpRequest is actually loading (m_loader is not null). XHRs that are not
13         loading should never prevent page caching.
14
15         I saw failures to enter the back/forward cache on yandex.ru and taobao.com because of this.
16
17         Test: http/tests/navigation/page-cache-failed-xhr.html
18
19         * xml/XMLHttpRequest.cpp:
20         (WebCore::XMLHttpRequest::canSuspendForDocumentSuspension const):
21
22 2019-10-03  John Wilander  <wilander@apple.com>
23
24         Resource Load Statistics: Downgrade document.referrer for all third-party iframes
25         https://bugs.webkit.org/show_bug.cgi?id=202506
26         <rdar://problem/55786397>
27
28         Reviewed by Brent Fulgham.
29
30         This change downgrades document.referrer for all third-party iframes if ITP/Resource Load Statistics
31         is enabled. The behavior matches the downgrade of all HTTP referrers for third-party resources
32         which landed in https://trac.webkit.org/changeset/250413/webkit.
33
34         Tests: http/tests/resourceLoadStatistics/downgrade-document-referrer-nested-third-party-iframe.html
35                http/tests/resourceLoadStatistics/downgrade-document-referrer-third-party-iframe.html
36                http/tests/resourceLoadStatistics/leave-empty-document-referrer-alone-third-party-iframe.html
37
38         * dom/Document.cpp:
39         (WebCore::Document::referrer):
40         (WebCore::Document::referrer const): Deleted.
41             Can no longer be const since it lazily downgrades and saves the referrer on read.
42         * dom/Document.h:
43
44 2019-10-03  Devin Rousso  <drousso@apple.com>
45
46         Web Inspector: remove `InspectorInstrumentationCookie`
47         https://bugs.webkit.org/show_bug.cgi?id=202487
48
49         Reviewed by Matt Baker.
50
51         All it does is create a shallow-copy of the `InstrumentingAgents` (it copies a pointer to
52         the `InstrumentingAgents` object, so any of the pointers to the `InspectorAgent` that are
53         contained therein are shared between each instance) and save the tracking
54         `InspectorTimelineAgent`'s id (monotonically increasing integer).
55
56         All uses of `InspectorInstrumentationCookie` are local values, so there's no way that the
57         `InspectorTimelineAgent` (or the id) could change in between an
58         `InspectorInstrumentation::will*` and an `InspectorInstrumentation::did*`, as both the
59         tracking state and id are controlled by the frontend and cannot "interrupt".
60
61         Removing `InspectorInstrumentationCookie` _can_ cause issues is in situations where the
62         `ScriptExecutionContext` (or `Page`) changes between the `InspectorInstrumentation::will*`
63         and the `InspectorInstrumentation::did*`, but this can be avoided so long as a pointer to
64         the "context" used for `InspectorInstrumentation::will*` is saved.
65
66         Covered by existing tests: inspector/timeline/*
67
68         * inspector/InspectorInstrumentationCookie.h: Removed.
69         * inspector/InspectorInstrumentationCookie.cpp: Removed.
70
71         * inspector/agents/InspectorTimelineAgent.h:
72         * inspector/agents/InspectorTimelineAgent.cpp:
73         (WebCore::InspectorTimelineAgent::internalStop):
74         (WebCore::InspectorTimelineAgent::didDispatchEvent):
75         (WebCore::InspectorTimelineAgent::didPaint):
76         (WebCore::InspectorTimelineAgent::clearRecordStack): Deleted.
77
78         * bindings/js/JSCallbackData.cpp:
79         (WebCore::JSCallbackData::invokeCallback):
80         * bindings/js/JSCustomElementInterface.cpp:
81         (WebCore::constructCustomElementSynchronously):
82         (WebCore::JSCustomElementInterface::upgradeElement):
83         (WebCore::JSCustomElementInterface::invokeCallback):
84         * bindings/js/JSErrorHandler.cpp:
85         (WebCore::JSErrorHandler::handleEvent):
86         * bindings/js/JSEventListener.cpp:
87         (WebCore::JSEventListener::handleEvent):
88         * bindings/js/JSExecState.h:
89         * bindings/js/JSExecStateInstrumentation.h:
90         (WebCore::JSExecState::instrumentFunctionInternal):
91         (WebCore::JSExecState::instrumentFunctionCall):
92         (WebCore::JSExecState::instrumentFunctionConstruct):
93         * bindings/js/ScheduledAction.cpp:
94         (WebCore::ScheduledAction::executeFunctionInContext):
95         * bindings/js/ScriptController.cpp:
96         (WebCore::ScriptController::evaluateInWorld):
97         (WebCore::ScriptController::evaluateModule):
98         * dom/Document.cpp:
99         (WebCore::Document::resolveStyle):
100         * dom/EventTarget.cpp:
101         (WebCore::EventTarget::innerInvokeEventListeners):
102         * dom/MutationObserver.cpp:
103         (WebCore::MutationObserver::deliver):
104         * dom/ScriptedAnimationController.cpp:
105         (WebCore::ScriptedAnimationController::serviceRequestAnimationFrameCallbacks):
106         * page/DOMTimer.cpp:
107         (WebCore::DOMTimer::fired):
108         * page/DOMWindow.cpp:
109         (WebCore::DOMWindow::dispatchEvent):
110         * page/FrameViewLayoutContext.cpp:
111         (WebCore::FrameViewLayoutContext::layout):
112         * page/IntersectionObserver.cpp:
113         (WebCore::IntersectionObserver::notify):
114         * page/PerformanceObserver.cpp:
115         (WebCore::PerformanceObserver::deliver):
116
117         * inspector/InspectorInstrumentation.h:
118         (WebCore::InspectorInstrumentation::willCallFunction):
119         (WebCore::InspectorInstrumentation::didCallFunction):
120         (WebCore::InspectorInstrumentation::willDispatchEvent):
121         (WebCore::InspectorInstrumentation::didDispatchEvent):
122         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
123         (WebCore::InspectorInstrumentation::didDispatchEventOnWindow):
124         (WebCore::InspectorInstrumentation::willEvaluateScript):
125         (WebCore::InspectorInstrumentation::didEvaluateScript):
126         (WebCore::InspectorInstrumentation::willFireTimer):
127         (WebCore::InspectorInstrumentation::didFireTimer):
128         (WebCore::InspectorInstrumentation::willLayout):
129         (WebCore::InspectorInstrumentation::didLayout):
130         (WebCore::InspectorInstrumentation::willRecalculateStyle):
131         (WebCore::InspectorInstrumentation::didRecalculateStyle):
132         (WebCore::InspectorInstrumentation::willFireAnimationFrame):
133         (WebCore::InspectorInstrumentation::didFireAnimationFrame):
134         (WebCore::InspectorInstrumentation::willFireObserverCallback):
135         (WebCore::InspectorInstrumentation::didFireObserverCallback):
136         * inspector/InspectorInstrumentation.cpp:
137         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
138         (WebCore::InspectorInstrumentation::didCallFunctionImpl):
139         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
140         (WebCore::InspectorInstrumentation::didDispatchEventImpl):
141         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
142         (WebCore::InspectorInstrumentation::didDispatchEventOnWindowImpl):
143         (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
144         (WebCore::InspectorInstrumentation::didEvaluateScriptImpl):
145         (WebCore::InspectorInstrumentation::willFireTimerImpl):
146         (WebCore::InspectorInstrumentation::didFireTimerImpl):
147         (WebCore::InspectorInstrumentation::willLayoutImpl):
148         (WebCore::InspectorInstrumentation::didLayoutImpl):
149         (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
150         (WebCore::InspectorInstrumentation::didRecalculateStyleImpl):
151         (WebCore::InspectorInstrumentation::willFireAnimationFrameImpl):
152         (WebCore::InspectorInstrumentation::didFireAnimationFrameImpl):
153         (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
154         (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
155         (WebCore::InspectorInstrumentation::retrieveTimelineAgent): Deleted.
156
157         * Sources.txt:
158         * WebCore.xcodeproj/project.pbxproj:
159
160 2019-10-03  Sihui Liu  <sihui_liu@apple.com>
161
162         IndexedDB: add size estimate for key path when estimate task size
163         https://bugs.webkit.org/show_bug.cgi?id=202480
164
165         Reviewed by Geoffrey Garen.
166
167         No observable behavior change.
168
169         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
170         (WebCore::IDBServer::estimateSize):
171
172 2019-10-03  youenn fablet  <youenn@apple.com>
173
174         Regression: iOS 13.1 MediaStreamTrack.enabled = false kills audio track
175         https://bugs.webkit.org/show_bug.cgi?id=202405
176         <rdar://problem/55922616>
177
178         Reviewed by Eric Carlson.
179
180         When the web page is setting enabled to false, media session might change from PlayRecord to None.
181         This might trigger CoreAudio to no longer output audio samples, thus triggering our audio capture failure timer.
182         This would end the track after 2 seconds.
183         Given audio tracks can be reenabled by a web page, we should not change the Media Session setup based on that.
184         This patch updates MediaStream::mediaType to return independently of the enabled state.
185
186         Add internals API to write a cross platform test.
187
188         Test: fast/mediastream/audio-track-enabled.html
189         Manually tested as well.
190
191         * Modules/mediastream/MediaStream.cpp:
192         (WebCore::MediaStream::mediaType const):
193         * platform/mediastream/MediaStreamPrivate.cpp:
194         (WebCore::MediaStreamPrivate::hasCaptureAudioSource const):
195         * testing/Internals.cpp:
196         (WebCore::Internals::supportsAudioSession const):
197         (WebCore::Internals::audioSessionCategory const):
198         * testing/Internals.h:
199         * testing/Internals.idl:
200
201 2019-10-03  youenn fablet  <youenn@apple.com>
202
203         http/tests/security/navigate-when-restoring-cached-page.html should not use RTCPeerConnection to not enter in page cache
204         https://bugs.webkit.org/show_bug.cgi?id=202521
205
206         Reviewed by Chris Dumez.
207
208         Introduce a dummy ActiveDOMObject which can never be suspended for document suspension.
209         Allow a page to create this dummy ActiveDOMObject through internals.
210         Covered by updated test.
211
212         * dom/ActiveDOMObject.h:
213         * testing/Internals.cpp:
214         (WebCore::Internals::preventDocumentForEnteringPageCache):
215         * testing/Internals.h:
216         * testing/Internals.idl:
217
218 2019-10-03  Tim Horton  <timothy_horton@apple.com>
219
220         WebKit doesn't build with trunk clang
221         https://bugs.webkit.org/show_bug.cgi?id=202511
222
223         Reviewed by Anders Carlsson.
224
225         * Modules/fetch/FetchLoader.h:
226         * Modules/geolocation/Geolocation.h:
227         * Modules/indexeddb/IDBTransaction.h:
228         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
229         * Modules/indexeddb/shared/InProcessIDBServer.h:
230         * Modules/notifications/Notification.cpp:
231         * Modules/notifications/Notification.h:
232         * platform/graphics/ca/TileController.h:
233         * workers/service/context/ServiceWorkerThreadProxy.h:
234         Fix the build by exporting destructors and custom delete operators.
235         I don't know why this changed, but trunk clang insists.
236         There are also some new warnings; this only fixes the hard errors.
237
238 2019-10-03  Tim Horton  <timothy_horton@apple.com>
239
240         Yet another build fix
241
242         * css/typedom/TypedOMCSSImageValue.h:
243         Forward declare Document.
244
245 2019-10-03  Jiewen Tan  <jiewen_tan@apple.com>
246
247         Support googleLegacyAppidSupport extension
248         https://bugs.webkit.org/show_bug.cgi?id=202427
249         <rdar://problem/55887473>
250
251         Reviewed by Brent Fulgham.
252
253         This patch adds support for googleLegacyAppidSupport extension, when set:
254         1) user agent should only use the U2F transport protocol,
255         2) should only communicate with roaming authenticators, and
256         3) should use a hard-coded appID of https://www.gstatic.com/securitykey/origins.json.
257         To be noticed as the name implies, this extension is exclusively for RP ID = google.com.
258
259         Implementation wise, all operations are captured in methods with name processGoogleLegacyAppIdSupportExtension.
260         1) AuthenticatorCoordinator takes care of setting the value.
261         2) U2fCommandConstructor takes care of hard coding the AppID.
262         3) AuthenticatorManager takes care of removing AuthenticatorTransport::Internal from TransportSet, so startDiscovery
263         will not poke platform authenticators.
264         4) CtapAuthenticator takes care of downgrading to U2fAuthenticator.
265         5) U2fAuthenticator takes care of setting the AppID in the response.
266
267         Partially covered by new test cases in existing tests, and remaining will be covered by manual tests.
268
269         * Modules/webauthn/AuthenticationExtensionsClientInputs.h:
270         (WebCore::AuthenticationExtensionsClientInputs::encode const):
271         (WebCore::AuthenticationExtensionsClientInputs::decode):
272         * Modules/webauthn/AuthenticationExtensionsClientInputs.idl:
273         * Modules/webauthn/AuthenticatorCoordinator.cpp:
274         (WebCore::AuthenticatorCoordinatorInternal::processGoogleLegacyAppIdSupportExtension):
275         (WebCore::AuthenticatorCoordinator::create const):
276         * Modules/webauthn/PublicKeyCredentialCreationOptions.h:
277         (WebCore::PublicKeyCredentialCreationOptions::encode const):
278         (WebCore::PublicKeyCredentialCreationOptions::decode):
279         * Modules/webauthn/fido/U2fCommandConstructor.cpp:
280         (fido::convertToU2fRegisterCommand):
281         (fido::processGoogleLegacyAppIdSupportExtension):
282         * Modules/webauthn/fido/U2fCommandConstructor.h:
283
284 2019-10-03  Yury Semikhatsky  <yurys@chromium.org>
285
286         Web Inspector: tests under LayoutTests/inspector/debugger are flaky
287         https://bugs.webkit.org/show_bug.cgi?id=137131
288         <rdar://problem/18461335>
289
290         Reviewed by Devin Rousso.
291
292         Fix debugger tests on GTK. All tests that pause on breakpoint didn't work because
293         in layout tests InspectorFrontendClientLocal was using Timer to dispatch commands
294         sent from the local front-end page to the inspected one. When paused inside a script
295         triggered by the front-end nested timer event would be scheduled but never fired
296         because in glib implementation of RunLoop::TimerBase uses event source which doesn't
297         allow recursion (g_source_set_can_recurse is not called on the source), so dispatching
298         Debugger.resume command didn't work when paused inside another inspector command (e.g.
299         eval). RunLoop itself uses event source which does allow recursion. So instead of using
300         a timer for asynchronous command dispatching with delay=0 we now schedule a task in
301         RunLoop's queue.
302
303         * inspector/InspectorFrontendClientLocal.cpp:
304         (WebCore::InspectorBackendDispatchTask::dispatch):
305         (WebCore::InspectorBackendDispatchTask::reset):
306         (WebCore::InspectorBackendDispatchTask::InspectorBackendDispatchTask):
307         (WebCore::InspectorBackendDispatchTask::scheduleOneShot): ensures that there is one inspector
308         dispatch task in the queue.
309         (WebCore::InspectorBackendDispatchTask::dispatchOneMessage): this is mostly the same behavior
310         as was with timerFired, we should be able to dispatch all accumulated messages from the queue
311         in one batch but for now I'd like to keep it one per iteration.
312
313 2019-10-03  Joonghun Park  <pjh0718@gmail.com>
314
315         CSS ellipse() doesn't accept single <shape-radius>
316         https://bugs.webkit.org/show_bug.cgi?id=181745
317
318         CSS ellipse() should only accept 0 or 2 radii.
319         The corresponding csswg discussion is
320         https://github.com/w3c/csswg-drafts/issues/2175.
321
322         Reviewed by Antti Koivisto.
323
324         Tests: imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-computed.html
325                imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-invalid.html
326                imported/w3c/web-platform-tests/css/css-masking/parsing/clip-path-valid.html
327                imported/w3c/web-platform-tests/css/css-masking/parsing/shape-outside-computed.html
328                imported/w3c/web-platform-tests/css/css-masking/parsing/shape-outside-invalid.html
329                imported/w3c/web-platform-tests/css/css-masking/parsing/shape-outside-valid.html
330
331         * css/CSSBasicShapes.cpp:
332         (WebCore::CSSBasicShapeEllipse::cssText const):
333         * css/parser/CSSPropertyParser.cpp:
334         (WebCore::consumeBasicShapeEllipse):
335
336 2019-10-03  Zan Dobersek  <zdobersek@igalia.com>
337
338         [Nicosia] Enable runtime checks and triggers for async non-main-frame scrolling
339         https://bugs.webkit.org/show_bug.cgi?id=202509
340
341         Reviewed by Carlos Garcia Campos.
342
343         Add build guards that would enable runtime checks of the asynchronous
344         frame scrolling setting in the ScrollingCoordinator and
345         RenderLayerCompositor classes for the Nicosia-using ports.
346
347         The check in ScrollingCoordinator avoids bailing on coordinating
348         scrolling for non-main frames when the setting is enabled. The check in
349         RenderLayerCompositor avoids imposing a requirement for a composition
350         layer for any non-main frame when the setting is disabled.
351
352         * page/scrolling/ScrollingCoordinator.cpp:
353         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView const):
354         * rendering/RenderLayerCompositor.cpp:
355         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
356
357 2019-10-02  Antti Koivisto  <antti@apple.com>
358
359         [CSS Shadow Parts] Support multiple arguments for ::part()
360         https://bugs.webkit.org/show_bug.cgi?id=202482
361
362         Reviewed by Ryosuke Niwa.
363
364         Support ::part(foo bar).
365
366         * css/CSSSelector.cpp:
367         (WebCore::CSSSelector::selectorText const):
368         (WebCore::CSSSelector::setArgumentList):
369         (WebCore::CSSSelector::setLangArgumentList): Deleted.
370
371         Give this a more generic name and use it for ::part() too.
372
373         * css/CSSSelector.h:
374         (WebCore::CSSSelector::argumentList const):
375         (WebCore::CSSSelector::langArgumentList const): Deleted.
376         * css/SelectorChecker.cpp:
377         (WebCore::SelectorChecker::checkOne const):
378
379         Match only if all parts are found from the element 'part' attribute.
380
381         * css/parser/CSSParserSelector.cpp:
382         (WebCore::CSSParserSelector::setArgumentList):
383         (WebCore::CSSParserSelector::setLangArgumentList): Deleted.
384         * css/parser/CSSParserSelector.h:
385         * css/parser/CSSSelectorParser.cpp:
386         (WebCore::CSSSelectorParser::consumePseudo):
387
388         Parse the list.
389
390         * cssjit/SelectorCompiler.cpp:
391         (WebCore::SelectorCompiler::addPseudoClassType):
392
393 2019-10-02  Andy Estes  <aestes@apple.com>
394
395         [iOS] When hit testing for a context menu interaction, do not consider whether the element is contenteditable
396         https://bugs.webkit.org/show_bug.cgi?id=202498
397         <rdar://problem/54723131>
398
399         Reviewed by Tim Horton.
400
401         When the user selects a context menu action, WebKit performs a hit test in order to find the
402         acted-on element on the page. This is separate from the hit test performed to generate the
403         context menu's targeted preview. Since an arbitrary amount of time can elapse between
404         preview generation and action selection, this second hit-tests might return a different
405         element.
406
407         One case where we know a different element can be returned is in apps that dynamically
408         enable and disable editing. If editing is disabled when the first hit test occurs but is
409         enabled when the second one occurs, different elements will be returned due to
410         Frame::qualifyingNodeAtViewportLocation preferring to return the root editable element when
411         the approximate node is contenteditable.
412
413         While the appropriate long-term fix is to only hit-test once and use that element for both
414         preview generation and action selection, this patch implements a short-term fix to address
415         the specific problem in rdar://problem/54723131 by disabling the contenteditable behavior
416         described above for context menu interaction hit testing.
417
418         The long-term fix is tracked by <https://webkit.org/b/202499>.
419
420         * page/Frame.h:
421         * page/ios/FrameIOS.mm:
422         (WebCore::Frame::qualifyingNodeAtViewportLocation):
423         (WebCore::Frame::approximateNodeAtViewportLocationLegacy):
424         (WebCore::ancestorRespondingToClickEventsNodeQualifier):
425         (WebCore::Frame::nodeRespondingToClickEvents):
426         (WebCore::Frame::nodeRespondingToDoubleClickEvent):
427         (WebCore::Frame::nodeRespondingToInteraction):
428         (WebCore::Frame::nodeRespondingToScrollWheelEvents):
429
430 2019-10-02  Antti Koivisto  <antti@apple.com>
431
432         [CSS Shadow Parts] Basic ::part() pseudo element support
433         https://bugs.webkit.org/show_bug.cgi?id=202456
434
435         Reviewed by Ryosuke Niwa.
436
437         Implement basic parsing and selector matching for ::part() pseudo element.
438
439         * css/CSSSelector.cpp:
440         (WebCore::CSSSelector::pseudoId):
441         (WebCore::CSSSelector::parsePseudoElementType):
442         (WebCore::CSSSelector::selectorText const):
443         * css/CSSSelector.h:
444         * css/ElementRuleCollector.cpp:
445         (WebCore::ElementRuleCollector::matchAuthorRules):
446         (WebCore::ElementRuleCollector::matchPartPseudoElementRules):
447         * css/ElementRuleCollector.h:
448         * css/RuleSet.cpp:
449         (WebCore::RuleSet::addRule):
450         * css/RuleSet.h:
451         (WebCore::RuleSet::partPseudoElementRules const):
452         * css/SelectorChecker.cpp:
453         (WebCore::SelectorChecker::checkOne const):
454         * css/SelectorPseudoElementTypeMap.in:
455         * css/parser/CSSParserSelector.cpp:
456         (WebCore::CSSParserSelector::parsePseudoElementSelector):
457
458         Also added ::slotted to SelectorPseudoElementTypeMap.in to resolve a FIXME here.
459
460         * css/parser/CSSParserSelector.h:
461         (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching const):
462         * css/parser/CSSSelectorParser.cpp:
463         (WebCore::isOnlyPseudoElementFunction):
464         (WebCore::CSSSelectorParser::consumePseudo):
465
466         Parse single values only, multipart ::part(foo bar) case is not yet handled.
467
468         * dom/Element.cpp:
469         (WebCore::Element::partNames const):
470
471 2019-10-02  Antoine Quint  <graouts@apple.com>
472
473         Adopt copyToVector() in AnimationTimeline::animationsForElement()
474         https://bugs.webkit.org/show_bug.cgi?id=202488
475
476         Reviewed by Wenson Hsieh.
477
478         * animation/AnimationTimeline.cpp:
479         (WebCore::AnimationTimeline::animationsForElement const):
480
481 2019-10-02  Thibault Saunier  <tsaunier@igalia.com>
482
483         [GStreamer] Let playbin handle redirects for us when appropriate
484         https://bugs.webkit.org/show_bug.cgi?id=195326
485
486         A simplified mechanism has been added in GStreamer to handle corner cases.
487
488         Reviewed by Xabier Rodriguez-Calvar.
489
490         Not easily testable at our level
491
492         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
493         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
494
495 2019-10-02  Tim Horton  <timothy_horton@apple.com>
496
497         Another build fix
498
499         * css/typedom/TypedOMCSSImageValue.cpp:
500         (WebCore::TypedOMCSSImageValue::TypedOMCSSImageValue):
501         * css/typedom/TypedOMCSSImageValue.h:
502         I feel like I am actively being thwarted.
503
504 2019-10-02  Tim Horton  <timothy_horton@apple.com>
505
506         Another build fix
507
508         * css/typedom/TypedOMCSSImageValue.h:
509
510 2019-10-02  Tim Horton  <timothy_horton@apple.com>
511
512         Try to fix the Windows build
513
514         * css/typedom/TypedOMCSSImageValue.cpp:
515         (WebCore::TypedOMCSSImageValue::document const):
516         * css/typedom/TypedOMCSSImageValue.h:
517         Out-of-line this instead of including Document.h in TypedOMCSSImageValue,
518         which was an earlier build fix from r250610.
519
520         * platform/graphics/cg/GradientCG.cpp:
521         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
522         * platform/graphics/win/GraphicsContextCGWin.cpp:
523         Try to fix the build.
524
525 2019-10-02  Keith Rollin  <krollin@apple.com>
526
527         Unreviewed build fix after r250595.
528
529         macCatalyst appears to have triggered the the problem where the build
530         can sometimes fail if the unified sources mechanism doesn't group
531         together the right set of files.
532
533         * css/typedom/TypedOMCSSImageValue.h:
534
535 2019-10-02  Antoine Quint  <graouts@apple.com>
536
537         [Web Animations] Implement replaced animations
538         https://bugs.webkit.org/show_bug.cgi?id=202190
539         <rdar://55697719>
540
541         Reviewed by Dean Jackson.
542
543         Implementing section "5.5 Replacing Animations" (https://drafts.csswg.org/web-animations/#replacing-animations) of the Web Animations
544         specification which allows for Web Animations to be destroyed when they are superseded by another animation and the developer doesn't
545         explicitly opt into persisting them using the persist() method.
546
547         An animation is marked as replaceable (to sum up) when it's finished and another animation for the same property takes precedence.
548         As part of DocumentTimeline::internalUpdateAnimationsAndSendEvents(), we'll go through all replaceable animations, dispatch a "remove"
549         DOM event, and remove them from our list of animations.
550
551         We also make a couple of fixes in this patch that were uncovered while working on the WPT tests for replaced animations:
552         
553         - we would incorrectly parse single values for a property that allows lists (change in KeyframeEffect's processKeyframeLikeObject())
554         - we didn't account for the position in the global animation list when sorted animations by composite order (AnimationTimeline::animationsForElement())
555
556         Finally, to get more readable results, we implement a stub of commitStyles(). Its full implementation is tracked by http://wkb.ug/202193.
557
558         * animation/AnimationTimeline.cpp:
559         (WebCore::AnimationTimeline::animationTimingDidChange): Mark the position of the animation in the global animation list, to which it may only be added once.
560         (WebCore::AnimationTimeline::animationsForElement const): Account for the animation's position in the global animation when sorting.
561         * animation/DeclarativeAnimation.cpp:
562         (WebCore::DeclarativeAnimation::bindingsReplaceState const): Flush pending styles when querying the ready state for a declarative animation.
563         * animation/DeclarativeAnimation.h:
564         * animation/DocumentTimeline.cpp:
565         (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents): Run the "remove replaced animations" procedure as the second step in the "update animations
566         and send events" procedure.
567         (WebCore::DocumentTimeline::animationCanBeRemoved): Determine whether a given animation may be removed based on its finished state, replace state and whether
568         it is fully superseded by another animation targeting the same property on the same target element.
569         (WebCore::DocumentTimeline::removeReplacedAnimations): Remove any removable animation and dispatch a "remove" DOM event for each removed animation. 
570         * animation/DocumentTimeline.h:
571         * animation/KeyframeEffect.cpp:
572         (WebCore::processKeyframeLikeObject): Fix an issue found in a replaced animations WPT test that showed that we didn't record the value of an animation that allows lists.
573         * animation/WebAnimation.cpp:
574         (WebCore::WebAnimation::isReplaceable const):
575         (WebCore::WebAnimation::persist): Mark the replace state as "persisted" and ensure the animation is set on the animation list for its target element in case it had already
576         been removed based on its persisted state.
577         (WebCore::WebAnimation::commitStyles): Stub for a new function.
578         * animation/WebAnimation.h:
579         (WebCore::WebAnimation::replaceState const):
580         (WebCore::WebAnimation::setReplaceState):
581         (WebCore::WebAnimation::bindingsReplaceState const):
582         (WebCore::WebAnimation::globalPosition const):
583         (WebCore::WebAnimation::setGlobalPosition):
584         * animation/WebAnimation.idl:
585         * dom/EventNames.h: Add the new "remove" event so that the "onremove" DOM property is available on Animation objects. 
586
587 2019-10-02  Zan Dobersek  <zdobersek@igalia.com>
588
589         Unreviewed build fix in Nicosia's ScrollingTreePositionedNode class.
590
591         * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:
592         (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
593         Fix the name of the variable included in the log call.
594
595 2019-10-02  youenn fablet  <youenn@apple.com>
596
597         Use strongly typed identifiers for webrtc sockets
598         https://bugs.webkit.org/show_bug.cgi?id=202400
599
600         Reviewed by Chris Dumez.
601
602         No observable change of behavior.
603
604         * Headers.cmake:
605         * WebCore.xcodeproj/project.pbxproj:
606         * platform/mediastream/libwebrtc/LibWebRTCSocketIdentifier.h: Copied from Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocket.h.
607
608 2019-10-02  Carlos Garcia Campos  <cgarcia@igalia.com>
609
610         [GTK][WPE] Stop using legacy custom protocol implementation
611         https://bugs.webkit.org/show_bug.cgi?id=202407
612
613         Reviewed by Žan Doberšek.
614
615         Remove the code to setup custom protocols in soup session.
616
617         * platform/network/soup/SoupNetworkSession.cpp:
618         (WebCore::SoupNetworkSession::SoupNetworkSession):
619         * platform/network/soup/SoupNetworkSession.h:
620
621 2019-10-02  Zan Dobersek  <zdobersek@igalia.com>
622
623         [Nicosia] Enable async scrolling at build-time for Nicosia-using ports
624         https://bugs.webkit.org/show_bug.cgi?id=202397
625
626         Reviewed by Carlos Garcia Campos.
627
628         * PlatformPlayStation.cmake: Add missing build targets.
629         * SourcesGTK.txt: Ditto.
630
631 2019-10-01  Tim Horton  <timothy_horton@apple.com>
632
633         Clean up some includes to make the build a bit faster
634         https://bugs.webkit.org/show_bug.cgi?id=202444
635
636         Reviewed by Geoff Garen.
637
638         No new tests, just reorganizing.
639
640         Apply some profile-guided optimizations to our headers.
641
642         * bindings/js/CallTracerTypes.h:
643         * css/typedom/TypedOMCSSImageValue.h:
644         * html/canvas/WebGLObject.h:
645         * html/canvas/WebGLVertexArrayObjectBase.h:
646         * inspector/InspectorInstrumentation.cpp:
647         (WebCore::InspectorInstrumentation::instrumentingAgentsForWebGPUDevice):
648         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope):
649         (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
650         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
651         * inspector/InspectorInstrumentation.h:
652         (WebCore::InspectorInstrumentation::didCreateWebGPUDevice):
653         (WebCore::InspectorInstrumentation::willDestroyWebGPUDevice):
654         (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline):
655         * platform/graphics/BitmapImage.cpp:
656         * platform/graphics/Font.h:
657         * platform/graphics/cg/GraphicsContextCG.cpp:
658         (WebCore::getUserToBaseCTM):
659         * platform/graphics/cg/GraphicsContextCG.h:
660         (WebCore::getUserToBaseCTM): Deleted.
661         * platform/graphics/cg/ImageBufferCG.cpp:
662         * platform/graphics/cocoa/IOSurface.h:
663         * platform/graphics/mac/PDFDocumentImageMac.mm:
664         InspectorInstrumentation.h is one of the most expensive headers in the entire project.
665         While not included in many places (70), it is fairly straightforward to reduce
666         its per-inclusion cost by rougly 80%.
667
668 2019-10-01  Alex Christensen  <achristensen@webkit.org>
669
670         Progress towards a functioning CMake build on Mac
671         https://bugs.webkit.org/show_bug.cgi?id=202443
672
673         Rubber-stamped by Tim Horton.
674
675         * testing/Internals.mm:
676
677 2019-10-01  John Wilander  <wilander@apple.com>
678
679         Storage Access API: document.hasStorageAccess() should return true when the cookie policy allows access
680         https://bugs.webkit.org/show_bug.cgi?id=202435
681         <rdar://problem/55718526>
682
683         Reviewed by Brent Fulgham.
684
685         WebKit's Storage Access API implementation has so far only looked at whether ITP is
686         blocking cookie access or not. However, the default cookie policy is still in
687         effect underneath ITP. document.hasStorageAccess() should return true if the
688         third-party:
689         a) is not classified by ITP, and
690         b) has cookies which implies it can use cookies as third-party according to the
691         default cookie policy.
692
693         Tests: http/tests/storageAccess/has-storage-access-false-by-default-ephemeral.html
694                http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies-ephemeral.html
695                http/tests/storageAccess/has-storage-access-true-if-third-party-has-cookies.html
696
697         * platform/network/NetworkStorageSession.h:
698         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
699         (WebCore::NetworkStorageSession::hasCookies const):
700         * platform/network/curl/NetworkStorageSessionCurl.cpp:
701         (WebCore::NetworkStorageSession::hasCookies const):
702             Not yet implemented. Always says false.
703         * platform/network/soup/NetworkStorageSessionSoup.cpp:
704         (WebCore::NetworkStorageSession::hasCookies const):
705             Not yet implemented. Always says false.
706
707 2019-10-01  Tim Horton  <timothy_horton@apple.com>
708
709         Clean up some includes to make the build a bit faster
710         https://bugs.webkit.org/show_bug.cgi?id=202437
711
712         Reviewed by Jer Noble.
713
714         * Modules/webaudio/PannerNode.h:
715         * Modules/webaudio/RealtimeAnalyser.h:
716         * platform/audio/HRTFPanner.h:
717         FFTFrame includes Accelerate.h, which is quite expensive.
718
719 2019-10-01  Antti Koivisto  <antti@apple.com>
720
721         [CSS Shadow Parts] Parse 'part' attribute
722         https://bugs.webkit.org/show_bug.cgi?id=202409
723
724         Reviewed by Ryosuke Niwa.
725
726         Add parsing for Element 'part' attribute and the IDL interface.
727         Also add a feature flag for CSS Shadow Parts.
728
729         * dom/Element.cpp:
730         (WebCore::Element::attributeChanged):
731         (WebCore::isNonEmptyTokenList):
732         (WebCore::Element::classAttributeChanged):
733         (WebCore::Element::partAttributeChanged):
734         (WebCore::Element::partNames const):
735         (WebCore::Element::part):
736         (WebCore::classStringHasClassName): Deleted.
737         * dom/Element.h:
738         * dom/Element.idl:
739         * dom/ElementRareData.cpp:
740         * dom/ElementRareData.h:
741         (WebCore::ElementRareData::partList const):
742         (WebCore::ElementRareData::setPartList):
743         (WebCore::ElementRareData::partNames const):
744         (WebCore::ElementRareData::setPartNames):
745         * html/HTMLAttributeNames.in:
746         * page/RuntimeEnabledFeatures.h:
747         (WebCore::RuntimeEnabledFeatures::setCSSShadowPartsEnabled):
748         (WebCore::RuntimeEnabledFeatures::cssShadowPartsEnabled const):
749
750 2019-10-01  Yusuke Suzuki  <ysuzuki@apple.com>
751
752         [JSC] Place VM* in TLS
753         https://bugs.webkit.org/show_bug.cgi?id=202391
754
755         Reviewed by Mark Lam.
756
757         Use JSLockHolder instead. It automatically puts VM* in TLS.
758
759         * bindings/js/IDBBindingUtilities.cpp:
760         (WebCore::toJS):
761         (WebCore::deserializeIDBValueToJSValue):
762
763 2019-10-01  youenn fablet  <youenn@apple.com>
764
765         Queue events and promise resolution in RTCPeerConnection when suspended for page cache
766         https://bugs.webkit.org/show_bug.cgi?id=202396
767
768         Reviewed by Chris Dumez.
769
770         This patch prepares RTCPeerConnection to be suspendable to enter page cache.
771         For that purpose, we queue events and promise resolution/rejection tasks if the RTCPeerConnection m_shouldDelayTasks is set to true.
772         This queueing is enabled when RTCPeerConnection is asked to suspend itself.
773         The queued tasks are then executed at resume time.
774         Renamed fireEvent to dispatchEventWhenFeasible.
775         No change of behavior for now.
776
777         * Modules/mediastream/PeerConnectionBackend.cpp:
778         (WebCore::PeerConnectionBackend::createOfferSucceeded):
779         (WebCore::PeerConnectionBackend::createOfferFailed):
780         (WebCore::PeerConnectionBackend::createAnswerSucceeded):
781         (WebCore::PeerConnectionBackend::createAnswerFailed):
782         (WebCore::PeerConnectionBackend::setLocalDescriptionSucceeded):
783         (WebCore::PeerConnectionBackend::setLocalDescriptionFailed):
784         (WebCore::PeerConnectionBackend::setRemoteDescriptionSucceeded):
785         (WebCore::PeerConnectionBackend::setRemoteDescriptionFailed):
786         (WebCore::PeerConnectionBackend::addIceCandidateSucceeded):
787         (WebCore::PeerConnectionBackend::addIceCandidateFailed):
788         * Modules/mediastream/RTCPeerConnection.cpp:
789         (WebCore::RTCPeerConnection::doClose):
790         (WebCore::RTCPeerConnection::suspend):
791         (WebCore::RTCPeerConnection::resume):
792         (WebCore::RTCPeerConnection::updateIceGatheringState):
793         (WebCore::RTCPeerConnection::updateIceConnectionState):
794         (WebCore::RTCPeerConnection::updateConnectionState):
795         (WebCore::RTCPeerConnection::scheduleNegotiationNeededEvent):
796         (WebCore::RTCPeerConnection::doTask):
797         (WebCore::RTCPeerConnection::fireEvent):
798         * Modules/mediastream/RTCPeerConnection.h:
799
800 2019-10-01  Brent Fulgham  <bfulgham@apple.com>
801
802         [FTW] Correct additional canvas test failures
803         https://bugs.webkit.org/show_bug.cgi?id=202388
804
805         Reviewed by Fujii Hironori.
806
807         This patch corrects a handful of errors in Direct2D's drawing code.
808
809         * platform/graphics/win/Direct2DOperations.cpp:
810         (WebCore::Direct2D::clearRect): Use the transformed dimensions of
811         rects to determine whether they intersect with the render target.
812         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
813         (WebCore::ImageBufferData::copyRectFromData const):
814         (WebCore::ImageBufferData::loadDataToBitmapIfNeeded): It is not
815         necessary (or correct) to 'endDraw' when loading image data to the
816         Bitmap target.
817         * platform/graphics/win/PathDirect2D.cpp:
818         (WebCore::Path::strokeBoundingRect const): Provide an implementation.
819
820 2019-10-01  Alex Christensen  <achristensen@webkit.org>
821
822         Progress towards successful CMake build on Mac
823         https://bugs.webkit.org/show_bug.cgi?id=202426
824
825         Rubber-stamped by Tim Horton.
826
827         * PlatformMac.cmake:
828
829 2019-10-01  Tim Horton  <timothy_horton@apple.com>
830
831         Clean up some includes to make the build a bit faster
832         https://bugs.webkit.org/show_bug.cgi?id=202417
833
834         Reviewed by Jer Noble.
835
836         No new tests, just reorganizing.
837
838         Apply some profile-guided optimizations to our headers.
839
840         * Modules/mediasource/SourceBuffer.cpp:
841         * WebCorePrefix.h:
842         Add HashMap, which ends up included in all source files.
843
844         * html/HTMLImageElement.cpp:
845         (WebCore::HTMLImageElement::HTMLImageElement):
846         (WebCore::HTMLImageElement::selectImageSource):
847         (WebCore::HTMLImageElement::didAttachRenderers):
848         (WebCore::HTMLImageElement::insertedIntoAncestor):
849         (WebCore::HTMLImageElement::width):
850         (WebCore::HTMLImageElement::height):
851         (WebCore::HTMLImageElement::naturalWidth const):
852         (WebCore::HTMLImageElement::naturalHeight const):
853         (WebCore::HTMLImageElement::complete const):
854         (WebCore::HTMLImageElement::decode):
855         (WebCore::HTMLImageElement::didMoveToNewDocument):
856         (WebCore::HTMLImageElement::cachedImage const):
857         (WebCore::HTMLImageElement::setLoadManually):
858         (WebCore::HTMLImageElement::hasPendingActivity const):
859         (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const):
860         * html/HTMLImageElement.h:
861         (WebCore::HTMLImageElement::cachedImage const): Deleted.
862         (WebCore::HTMLImageElement::setLoadManually): Deleted.
863         (WebCore::HTMLImageElement::hasPendingActivity const): Deleted.
864         (WebCore::HTMLImageElement::pendingDecodePromisesCountForTesting const): Deleted.
865         HTMLImageLoader brings in JSDOMPromiseDeferred, which is known to be horribly expensive.
866         Out-of-line m_imageLoader.
867
868         * platform/graphics/GraphicsLayer.h:
869         Swap Animation for TimingFunction, which is much smaller.
870
871         * platform/graphics/MediaPlayer.h:
872         InbandTextTrackPrivate brings in SerializedPlatformRepresentation.h,
873         which is very expensive. MediaPlayer.h is included in many places.
874         Break the link.
875
876         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
877
878 2019-10-01  youenn fablet  <youenn@apple.com>
879
880         RTCDataChannel should not prevent entering page cache except if in open state
881         https://bugs.webkit.org/show_bug.cgi?id=202395
882
883         Reviewed by Chris Dumez.
884
885         Only prevent entering page cache in open state.
886         Enqueue message through the document event queue to handle suspension properly.
887
888         We cannot yet write page cache tests as a data channel requires a peer connection which
889         currently forbids entering page cache.
890
891         * Modules/mediastream/RTCDataChannel.cpp:
892         (WebCore::RTCDataChannel::RTCDataChannel):
893         (WebCore::RTCDataChannel::didReceiveStringData):
894         (WebCore::RTCDataChannel::didReceiveRawData):
895         (WebCore::RTCDataChannel::didDetectError):
896         (WebCore::RTCDataChannel::bufferedAmountIsDecreasing):
897         (WebCore::RTCDataChannel::scheduleDispatchEvent):
898         (WebCore::RTCDataChannel::scheduledEventTimerFired): Deleted.
899         * Modules/mediastream/RTCDataChannel.h:
900
901 2019-10-01  Rob Buis  <rbuis@igalia.com>
902
903         [Mac] Layout Test imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html fails
904         https://bugs.webkit.org/show_bug.cgi?id=202350
905
906         Reviewed by Alex Christensen.
907
908         In some cases didReceiveResponse will deliver redirects (normally willSendRequestInternal will be used for redirects).
909         When this is done in manual redirect mode make sure the response type is opaque redirect.
910
911         Test: imported/w3c/web-platform-tests/fetch/api/redirect/redirect-location.any.html
912
913         * loader/SubresourceLoader.cpp:
914         (WebCore::SubresourceLoader::didReceiveResponse):
915
916 2019-10-01  Keith Rollin  <krollin@apple.com>
917
918         Remove some support for < iOS 13
919         https://bugs.webkit.org/show_bug.cgi?id=202386
920         <rdar://problem/55863017>
921
922         Reviewed by Eric Carlson.
923
924         Remove some support for iOS versions less than 13.0.
925
926         Update conditionals that reference __IPHONE_OS_VERSION_MIN_REQUIRED
927         and __IPHONE_OS_VERSION_MAX_ALLOWED, assuming that they both have
928         values >= 130000. This means that expressions like
929         "__IPHONE_OS_VERSION_MIN_REQUIRED < 101300" are always False and
930         "__IPHONE_OS_VERSION_MIN_REQUIRED >= 101300" are always True.
931
932         This removal is part of a series of patches effecting the removal of
933         dead code for old versions of iOS. This particular pass involves
934         changes in which Jer Noble was involved. These changes are isolated
935         from other similar changes in order to facilitate the reviewing
936         process.
937
938         No new tests -- no new or changed functionality.
939
940         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
941         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesLastModifiedTime const):
942         (WebCore::MediaPlayerPrivateAVFoundationObjC::liveUpdateInterval const):
943
944 2019-10-01  Chris Dumez  <cdumez@apple.com>
945
946         Unreviewed attempt to fix Windows build after r250527.
947
948         * dom/GenericEventQueue.cpp:
949         (WebCore::TaskQueueConstructor::construct):
950         (WebCore::TaskQueueConstructor<Timer>::construct):
951         (WebCore::GenericEventQueueBase<T>::enqueueEvent):
952         (WebCore::GenericEventQueueBase<T>::close):
953         (WebCore::GenericEventQueueBase<T>::cancelAllEvents):
954         (WebCore::GenericEventQueueBase<T>::setPaused):
955         (WebCore::GenericEventQueueBase<T>::suspend):
956         (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
957         * dom/GenericEventQueue.h:
958         * platform/GenericTaskQueue.h:
959
960 2019-10-01  Alex Christensen  <achristensen@webkit.org>
961
962         Fix internal build after r250549
963         https://bugs.webkit.org/show_bug.cgi?id=202390
964
965         There is an internal #define confirm on some systems, so rename DOMWindow::confirm to DOMWindow::confirmForBindings.
966
967         * page/DOMWindow.cpp:
968         (WebCore::DOMWindow::confirmForBindings):
969         (WebCore::DOMWindow::confirm): Deleted.
970         * page/DOMWindow.h:
971         * page/DOMWindow.idl:
972
973 2019-10-01  Chris Dumez  <cdumez@apple.com>
974
975         Unreviewed attempt to fix Windows build after r250527.
976
977         * platform/GenericTaskQueue.h:
978
979 2019-10-01  Zan Dobersek  <zdobersek@igalia.com>
980
981         [CoordGraphics] Implement sync methods for position, bounds origin
982         https://bugs.webkit.org/show_bug.cgi?id=202398
983
984         Reviewed by Carlos Garcia Campos.
985
986         Add the CoordinatedGraphicsLayer::syncPosition() and
987         CoordinatedGraphicsLayer::syncBoundsOrigin() method overrides, both
988         performing a synchronization of the given GraphicsLayer attribute.
989
990         These methods are used by the scrolling code to reflect changes in these
991         attributes without causing a layer flush (which is not necessary since
992         the changes have already been applied in an equivalent way).
993
994         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
995         (WebCore::CoordinatedGraphicsLayer::didChangeGeometry):
996         (WebCore::CoordinatedGraphicsLayer::syncPosition):
997         (WebCore::CoordinatedGraphicsLayer::syncBoundsOrigin):
998         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
999
1000 2019-10-01  Joonghun Park  <jh718.park@samsung.com>
1001
1002         Make table's clientWidth/Height include its border sizes.
1003         https://bugs.webkit.org/show_bug.cgi?id=200974
1004
1005         WebKit doesn't have table wrapper box currently
1006         while Gecko has it,
1007         so this CL tries to mimic the behavior that
1008         clientWidth/Height refers to table wrapper box
1009         which doesn't have borders applied to itself
1010         and table grid box has the borders.
1011
1012         This CL adds table's border sizes
1013         to clientWidth/Height
1014         at |LayoutBox::PixelSnappedClientWidth/Height|.
1015
1016         As a result of this CL, table's clientWidth/Height
1017         and offsetWidth/Height are equal now, respectively.
1018
1019         The corresponding csswg discussion is
1020         https://github.com/w3c/csswg-drafts/issues/4245.
1021
1022         Reviewed by Antti Koivisto.
1023
1024         Tests: fast/table/border-collapsing/bug236727.html
1025                imported/w3c/web-platform-tests/css/cssom-view/table-border-collapse-client-width-height.html
1026                imported/w3c/web-platform-tests/css/cssom-view/table-border-separate-client-width-height.html
1027                imported/w3c/web-platform-tests/css/cssom-view/table-with-border-client-width-height.html
1028
1029         * dom/Element.cpp:
1030         (WebCore::Element::clientWidth):
1031         (WebCore::Element::clientHeight):
1032
1033 2019-10-01  youenn fablet  <youenn@apple.com>
1034
1035         Remove races condition when validating capture sandbox extension revocation
1036         https://bugs.webkit.org/show_bug.cgi?id=202133
1037         <rdar://problem/55660905>
1038
1039         Reviewed by Eric Carlson.
1040
1041         Covered by existing tests.
1042
1043         * Modules/mediastream/MediaStreamTrack.cpp:
1044         (WebCore::MediaStreamTrack::endCapture):
1045         Synchronously update document media state when capture is ended.
1046         This allows to validate the fact that no document is capturing while we revoke sandbox extensions.
1047
1048 2019-10-01  youenn fablet  <youenn@apple.com>
1049
1050         MediaDevices should be SecureContext
1051         https://bugs.webkit.org/show_bug.cgi?id=202267
1052
1053         Reviewed by Eric Carlson.
1054
1055         Manually tested since 127.0.0.1/localhost are secure contexts.
1056
1057         * Modules/mediastream/MediaDevices.idl:
1058         * bindings/js/WebCoreBuiltinNames.h:
1059
1060 2019-09-30  Alex Christensen  <achristensen@webkit.org>
1061
1062         Resurrect Mac CMake build
1063         https://bugs.webkit.org/show_bug.cgi?id=202384
1064
1065         Rubber-stamped by Tim Horton.
1066
1067         * PlatformMac.cmake:
1068
1069 2019-09-30  Chris Dumez  <cdumez@apple.com>
1070
1071         Make GenericEventQueue an ActiveDOMObject
1072         https://bugs.webkit.org/show_bug.cgi?id=202373
1073
1074         Reviewed by Eric Carlson.
1075
1076         Make GenericEventQueue an ActiveDOMObject so that it is guaranteed to never fire any events while
1077         suspended without requiring the client to explicitly suspend/resume the event queue.
1078
1079         * Modules/encryptedmedia/MediaKeySession.cpp:
1080         (WebCore::MediaKeySession::MediaKeySession):
1081         (WebCore::MediaKeySession::enqueueMessage):
1082         (WebCore::MediaKeySession::updateKeyStatuses):
1083         * Modules/encryptedmedia/MediaKeySession.h:
1084         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.cpp:
1085         (WebCore::WebKitMediaKeySession::WebKitMediaKeySession):
1086         (WebCore::WebKitMediaKeySession::~WebKitMediaKeySession):
1087         (WebCore::WebKitMediaKeySession::addKeyTimerFired):
1088         (WebCore::WebKitMediaKeySession::sendMessage):
1089         (WebCore::WebKitMediaKeySession::sendError):
1090         (WebCore::WebKitMediaKeySession::hasPendingActivity const):
1091         (WebCore::WebKitMediaKeySession::stop):
1092         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
1093         * Modules/mediasource/MediaSource.cpp:
1094         (WebCore::MediaSource::MediaSource):
1095         (WebCore::MediaSource::hasPendingActivity const):
1096         (WebCore::MediaSource::stop):
1097         (WebCore::MediaSource::canSuspendForDocumentSuspension const):
1098         (WebCore::MediaSource::scheduleEvent):
1099         * Modules/mediasource/MediaSource.h:
1100         * Modules/mediasource/SourceBuffer.cpp:
1101         (WebCore::SourceBuffer::SourceBuffer):
1102         (WebCore::SourceBuffer::hasPendingActivity const):
1103         (WebCore::SourceBuffer::stop):
1104         (WebCore::SourceBuffer::scheduleEvent):
1105         * Modules/mediasource/SourceBuffer.h:
1106         * Modules/mediasource/SourceBufferList.cpp:
1107         (WebCore::SourceBufferList::SourceBufferList):
1108         (WebCore::SourceBufferList::scheduleEvent):
1109         (WebCore::SourceBufferList::canSuspendForDocumentSuspension const):
1110         * Modules/mediasource/SourceBufferList.h:
1111         * Modules/webaudio/AudioContext.cpp:
1112         (WebCore::AudioContext::AudioContext):
1113         (WebCore::AudioContext::stop):
1114         * Modules/webaudio/AudioContext.h:
1115         * animation/DeclarativeAnimation.cpp:
1116         (WebCore::DeclarativeAnimation::DeclarativeAnimation):
1117         (WebCore::DeclarativeAnimation::tick):
1118         (WebCore::DeclarativeAnimation::needsTick const):
1119         (WebCore::DeclarativeAnimation::remove):
1120         (WebCore::DeclarativeAnimation::enqueueDOMEvent):
1121         (WebCore::DeclarativeAnimation::stop):
1122         (WebCore::DeclarativeAnimation::suspend):
1123         (WebCore::DeclarativeAnimation::resume):
1124         * animation/DeclarativeAnimation.h:
1125         * dom/GenericEventQueue.cpp:
1126         (WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
1127         (WebCore::GenericEventQueueBase<T>::setPaused):
1128         (WebCore::GenericEventQueueBase<T>::canSuspendForDocumentSuspension const):
1129         (WebCore::GenericEventQueueBase<T>::suspend):
1130         (WebCore::GenericEventQueueBase<T>::resume):
1131         (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
1132         (WebCore::GenericEventQueueBase<T>::stop):
1133         (WebCore::GenericEventQueueBase<T>::activeDOMObjectName const):
1134         (WebCore::GenericEventQueue::create):
1135         (WebCore::MainThreadGenericEventQueue::create):
1136         * dom/GenericEventQueue.h:
1137         * dom/MessagePort.cpp:
1138         (WebCore::MessagePort::MessagePort):
1139         (WebCore::MessagePort::close):
1140         (WebCore::MessagePort::dispatchMessages):
1141         * dom/MessagePort.h:
1142         * html/HTMLMediaElement.cpp:
1143         (WebCore::HTMLMediaElement::HTMLMediaElement):
1144         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1145         (WebCore::HTMLMediaElement::scheduleEvent):
1146         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1147         (WebCore::HTMLMediaElement::cancelPendingEventsAndCallbacks):
1148         (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded):
1149         (WebCore::HTMLMediaElement::mediaPlayerInitializationDataEncountered):
1150         (WebCore::HTMLMediaElement::closeTaskQueues):
1151         (WebCore::HTMLMediaElement::suspend):
1152         (WebCore::HTMLMediaElement::resume):
1153         (WebCore::HTMLMediaElement::hasPendingActivity const):
1154         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
1155         * html/HTMLMediaElement.h:
1156         * html/track/TrackListBase.cpp:
1157         (WebCore::TrackListBase::TrackListBase):
1158         (WebCore::TrackListBase::scheduleTrackEvent):
1159         (WebCore::TrackListBase::scheduleChangeEvent):
1160         (WebCore::TrackListBase::isChangeEventScheduled const):
1161         (WebCore::TrackListBase::canSuspendForDocumentSuspension const):
1162         * html/track/TrackListBase.h:
1163         * workers/Worker.cpp:
1164         (WebCore::Worker::Worker):
1165         (WebCore::Worker::terminate):
1166         (WebCore::Worker::stop):
1167         (WebCore::Worker::hasPendingActivity const):
1168         (WebCore::Worker::enqueueEvent):
1169         (WebCore::Worker::dispatchEvent):
1170         * workers/Worker.h:
1171         * workers/service/ServiceWorkerContainer.cpp:
1172         (WebCore::ServiceWorkerContainer::ServiceWorkerContainer):
1173         (WebCore::ServiceWorkerContainer::startMessages):
1174         (WebCore::ServiceWorkerContainer::postMessage):
1175         (WebCore::ServiceWorkerContainer::stop):
1176         * workers/service/ServiceWorkerContainer.h:
1177
1178 2019-09-30  Chris Dumez  <cdumez@apple.com>
1179
1180         IDBTransaction / IDBObjectStore should not prevent a page from entering the back / forward cache
1181         https://bugs.webkit.org/show_bug.cgi?id=202291
1182         <rdar://problem/55760106>
1183
1184         Reviewed by Geoffrey Garen.
1185
1186         IDBObjectStore does not fire any events and should therefore not cause any problem while in PageCache.
1187         IDBTransaction can only fire abort/complete/error events, all of which are being enqueued to the
1188         DocumentEventQueue. The DocumentEventQueue subclasses SuspendableTimer which will correctly suspend
1189         while the document is in page cache. IDBTransaction will therefore not cause events to fire (and JS
1190         to run) while in page cache.
1191
1192         Test: storage/indexeddb/IDBTransaction-page-cache.html
1193
1194         * Modules/indexeddb/IDBObjectStore.cpp:
1195         (WebCore::IDBObjectStore::canSuspendForDocumentSuspension const):
1196         * Modules/indexeddb/IDBTransaction.cpp:
1197         (WebCore::IDBTransaction::canSuspendForDocumentSuspension const):
1198
1199 2019-09-30  Chris Dumez  <cdumez@apple.com>
1200
1201         Refine restrictions for X-Temp-Tablet HTTP header experiment
1202         https://bugs.webkit.org/show_bug.cgi?id=202367
1203         <rdar://problem/55849139>
1204
1205         Reviewed by Geoffrey Garen.
1206
1207         Refine restrictions for X-Temp-Tablet HTTP header experiment:
1208         1. Only send the header if the embedding application is MobileSafari.
1209         2. Only send the header if the first party is google.com
1210         3. Only send the header if the current date is before 2/1/2020
1211         4. Send the header even if using an ephemeral session
1212
1213         * loader/cache/CachedResourceLoader.cpp:
1214         (WebCore::isXTempTabletHeaderExperimentOver):
1215         (WebCore::CachedResourceLoader::CachedResourceLoader):
1216         (WebCore::isGoogleSearch):
1217         (WebCore::CachedResourceLoader::shouldSendXTempTabletHeader const):
1218         (WebCore::CachedResourceLoader::requestResource):
1219         * loader/cache/CachedResourceLoader.h:
1220
1221 2019-09-30  Chris Dumez  <cdumez@apple.com>
1222
1223         Pages with Web Workers cannot enter the back / forward cache
1224         https://bugs.webkit.org/show_bug.cgi?id=202296
1225         <rdar://problem/55764073>
1226
1227         Reviewed by Jer Noble.
1228
1229         Allow pages that use Web Workers to enter the back / forward cache.
1230         This involves adding an EventQueue for all event firing on Woker
1231         objects and suspending this EventQueue while in the page cache.
1232
1233         This was preventing some of the pages on weather.com to enter the
1234         back / forward cache.
1235
1236         Test: fast/workers/worker-page-cache.html
1237
1238         * Modules/encryptedmedia/MediaKeySession.h:
1239         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
1240         * Modules/mediasource/MediaSource.h:
1241         * Modules/mediasource/SourceBuffer.h:
1242         * Modules/mediasource/SourceBufferList.h:
1243         * Modules/webaudio/AudioContext.cpp:
1244         (WebCore::AudioContext::AudioContext):
1245         * Modules/webaudio/AudioContext.h:
1246         * animation/DeclarativeAnimation.h:
1247
1248         * dom/GenericEventQueue.cpp:
1249         (WebCore::TaskQueueConstructor::construct):
1250         (WebCore::TaskQueueConstructor<Timer>::construct):
1251         (WebCore::GenericEventQueueBase<T>::GenericEventQueueBase):
1252         (WebCore::GenericEventQueueBase<T>::enqueueEvent):
1253         (WebCore::GenericEventQueueBase<T>::dispatchOneEvent):
1254         (WebCore::GenericEventQueueBase<T>::close):
1255         (WebCore::GenericEventQueueBase<T>::cancelAllEvents):
1256         (WebCore::GenericEventQueueBase<T>::hasPendingEvents const):
1257         (WebCore::GenericEventQueueBase<T>::hasPendingEventsOfType const):
1258         (WebCore::GenericEventQueueBase<T>::suspend):
1259         (WebCore::GenericEventQueueBase<T>::resume):
1260         * dom/GenericEventQueue.h:
1261         (WebCore::GenericEventQueueBase::isSuspended const):
1262         (WebCore::MainThreadGenericEventQueue::MainThreadGenericEventQueue):
1263         (WebCore::GenericEventQueue::GenericEventQueue):
1264         Rename GenericEventQueue to MainThreadGenericEventQueue since its implementation relies
1265         on a global shared Timer to fire events. Introduce a new GenericEventQueue which can
1266         actually be used from any thread. This is useful for MessagePort, which is used both
1267         on the main thread and on worker threads.
1268
1269         * dom/MessagePort.cpp:
1270         (WebCore::MessagePort::MessagePort):
1271         (WebCore::MessagePort::close):
1272         (WebCore::MessagePort::suspend):
1273         (WebCore::MessagePort::resume):
1274         (WebCore::MessagePort::dispatchMessages):
1275         * dom/MessagePort.h:
1276         Use an GenericEventQueue in MessagePort for consistency with Worker.
1277         MessagePort is an ActiveDOMobject which returns true in canSuspend(),
1278         we therefore need to make sure it suspends event firing while
1279         suspended.
1280
1281         * html/HTMLMediaElement.h:
1282         * html/track/TrackListBase.h:
1283         * workers/Worker.cpp:
1284         (WebCore::Worker::Worker):
1285         (WebCore::Worker::terminate):
1286         (WebCore::Worker::canSuspendForDocumentSuspension const):
1287         (WebCore::Worker::suspend):
1288         (WebCore::Worker::resume):
1289         (WebCore::Worker::stop):
1290         (WebCore::Worker::hasPendingActivity const):
1291         (WebCore::Worker::notifyFinished):
1292         (WebCore::Worker::enqueueEvent):
1293         (WebCore::Worker::dispatchEvent):
1294         * workers/Worker.h:
1295         * workers/WorkerMessagingProxy.cpp:
1296         (WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
1297         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
1298
1299 2019-09-27  Keith Rollin  <krollin@apple.com>
1300
1301         Coalesce or remove PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
1302         https://bugs.webkit.org/show_bug.cgi?id=202119
1303         <rdar://problem/55638792>
1304
1305         Unreviewed, address post landing review comments for r248533 from
1306         Darin Adler.
1307
1308         No new tests -- no new or changed functionality.
1309
1310         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
1311         (WebCore::convert):
1312         (WebCore::subLocality): Deleted.
1313         (WebCore::setSubLocality): Deleted.
1314         (WebCore::subAdministrativeArea): Deleted.
1315         (WebCore::setSubAdministrativeArea): Deleted.
1316
1317 2019-09-30  Antti Koivisto  <antti@apple.com>
1318
1319         RenderLineBreak should use LineLayoutTraversal
1320         https://bugs.webkit.org/show_bug.cgi?id=202316
1321
1322         Reviewed by Zalan Bujtas.
1323
1324         Replace more path specific code with LineLayoutTraversal.
1325
1326         * Headers.cmake:
1327         * rendering/RenderLineBreak.cpp:
1328         (WebCore::RenderLineBreak::linesBoundingBox const):
1329         (WebCore::RenderLineBreak::absoluteRects const):
1330         (WebCore::RenderLineBreak::absoluteQuads const):
1331         (WebCore::simpleLineLayout): Deleted.
1332         * rendering/RenderTreeAsText.cpp:
1333         (WebCore::RenderTreeAsText::writeRenderObject):
1334         (WebCore::writeTextBox):
1335         * rendering/SimpleLineLayoutFunctions.cpp:
1336         (WebCore::SimpleLineLayout::computeBoundingBox): Deleted.
1337         (WebCore::SimpleLineLayout::collectAbsoluteRects): Deleted.
1338         (WebCore::SimpleLineLayout::rendererForPosition): Deleted.
1339         * rendering/SimpleLineLayoutFunctions.h:
1340         * rendering/line/LineLayoutTraversal.cpp:
1341         (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
1342         (WebCore::LineLayoutTraversal::ElementBoxIterator::atEnd const):
1343         (WebCore::LineLayoutTraversal::elementBoxFor):
1344         (WebCore::LineLayoutTraversal::TextBox::rect const): Deleted.
1345         (WebCore::LineLayoutTraversal::TextBox::logicalRect const): Deleted.
1346         (WebCore::LineLayoutTraversal::TextBox::hasHyphen const): Deleted.
1347         (WebCore::LineLayoutTraversal::TextBox::isLeftToRightDirection const): Deleted.
1348         (WebCore::LineLayoutTraversal::TextBox::dirOverride const): Deleted.
1349         (WebCore::LineLayoutTraversal::TextBox::text const): Deleted.
1350         (WebCore::LineLayoutTraversal::TextBox::isLineBreak const): Deleted.
1351         (WebCore::LineLayoutTraversal::TextBox::localStartOffset const): Deleted.
1352         (WebCore::LineLayoutTraversal::TextBox::localEndOffset const): Deleted.
1353         (WebCore::LineLayoutTraversal::TextBox::length const): Deleted.
1354         (WebCore::LineLayoutTraversal::TextBox::isLastOnLine const): Deleted.
1355         (WebCore::LineLayoutTraversal::TextBox::isLast const): Deleted.
1356         (WebCore::LineLayoutTraversal::TextBox::iterator const): Deleted.
1357
1358         Move to header as templates.
1359
1360         * rendering/line/LineLayoutTraversal.h:
1361         (WebCore::LineLayoutTraversal::ElementBoxIterator::ElementBoxIterator):
1362         (WebCore::LineLayoutTraversal::ElementBoxIterator::operator bool const):
1363         (WebCore::LineLayoutTraversal::ElementBoxIterator::operator* const):
1364         (WebCore::LineLayoutTraversal::ElementBoxIterator::operator-> const):
1365
1366         Add a new iterator type for element boxes.
1367         It doesn't currently really iterate, is just allows testing for end.
1368
1369         (WebCore::LineLayoutTraversal::Box<Iterator>::rect const):
1370         (WebCore::LineLayoutTraversal::Box<Iterator>::logicalRect const):
1371         (WebCore::LineLayoutTraversal::Box<Iterator>::isLeftToRightDirection const):
1372         (WebCore::LineLayoutTraversal::Box<Iterator>::dirOverride const):
1373         (WebCore::LineLayoutTraversal::Box<Iterator>::isLineBreak const):
1374         (WebCore::LineLayoutTraversal::Box<Iterator>::iterator const):
1375
1376         Split properties that all inline boxes have out from TextBox.
1377         Make it a template class.
1378
1379         (WebCore::LineLayoutTraversal::TextBox<Iterator>::hasHyphen const):
1380         (WebCore::LineLayoutTraversal::TextBox<Iterator>::text const):
1381         (WebCore::LineLayoutTraversal::TextBox<Iterator>::localStartOffset const):
1382         (WebCore::LineLayoutTraversal::TextBox<Iterator>::localEndOffset const):
1383         (WebCore::LineLayoutTraversal::TextBox<Iterator>::length const):
1384         (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLastOnLine const):
1385         (WebCore::LineLayoutTraversal::TextBox<Iterator>::isLast const):
1386
1387         Make a template class.
1388
1389         (WebCore::LineLayoutTraversal::hasTextBoxes): Deleted.
1390
1391 2019-09-30  Rob Buis  <rbuis@igalia.com>
1392
1393         No-Cors check should take into account same-origin
1394         https://bugs.webkit.org/show_bug.cgi?id=202353
1395
1396         Reviewed by Youenn Fablet.
1397
1398         No-Cors check should take into account same-origin, in that case the
1399         check should bail out, since same-origin is already handled in
1400         the first step of [1].
1401
1402         Test: imported/web-platform-tests/fetch/api/redirect/redirect-mode.any.html
1403
1404         [1] https://fetch.spec.whatwg.org/#main-fetch Step 5
1405
1406         * loader/cache/CachedResourceLoader.cpp:
1407         (WebCore::CachedResourceLoader::canRequest):
1408
1409 2019-09-30  Zan Dobersek  <zdobersek@igalia.com>
1410
1411         [Nicosia] Complete ScrollingTreeNicosia::createScrollingTreeNode()
1412         https://bugs.webkit.org/show_bug.cgi?id=202358
1413
1414         Reviewed by Carlos Garcia Campos.
1415
1416         * page/scrolling/nicosia/ScrollingTreeNicosia.cpp:
1417         (WebCore::ScrollingTreeNicosia::createScrollingTreeNode):
1418         Return appropriate objects for the remaining node types.
1419
1420 2019-09-30  Zan Dobersek  <zdobersek@igalia.com>
1421
1422         [Nicosia] Add missing conversion casts for LayerRepresentation objects
1423         https://bugs.webkit.org/show_bug.cgi?id=202357
1424
1425         Reviewed by Carlos Garcia Campos.
1426
1427         After r250491, we have to request explicit conversion of
1428         LayerRepresentation objects to Nicosia::PlatformLayer pointers.
1429
1430         * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:
1431         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
1432         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
1433         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
1434         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
1435         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
1436         * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp:
1437         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
1438         * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp:
1439         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
1440         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):
1441         * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp:
1442         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
1443         * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:
1444         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
1445
1446 2019-09-29  Zan Dobersek  <zdobersek@igalia.com>
1447
1448         ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
1449         https://bugs.webkit.org/show_bug.cgi?id=202256
1450         <rdar://problem/55772092>
1451
1452         Reviewed by Simon Fraser.
1453
1454         Make the scroll container and scrolled contents layer holders
1455         platform-independent by using the LayerRepresentation as the underlying
1456         type for the two member variables in ScrollingTreeScrollingNode.
1457
1458         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1459         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
1460         * page/scrolling/ScrollingTreeScrollingNode.h:
1461         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1462         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
1463         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
1464         (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
1465
1466 2019-09-28  Brent Fulgham  <bfulgham@apple.com>
1467
1468         [FTW] Correct compositing, shadow, and radial gradient implementations
1469         https://bugs.webkit.org/show_bug.cgi?id=202177
1470
1471         Reviewed by Fujii Hironori.
1472
1473         This patch corrects a number of implementation errors in basic Canvas
1474         drawing operations.
1475
1476         Tested by canvas/philip/tests 
1477
1478         * platform/graphics/win/Direct2DOperations.cpp:
1479         (WebCore::Direct2D::State::setCompositeOperation): Initialize blend and
1480         composite modes to correct defaults.
1481         (WebCore::Direct2D::drawWithShadowHelper): Correct value used for blur
1482         standard deviation to more closely match other browser output.
1483         * platform/graphics/win/Direct2DUtilities.cpp:
1484         (WebCore::Direct2D::createBitmapCopyFromContext): Added helper function.
1485         * platform/graphics/win/Direct2DUtilities.h:
1486         * platform/graphics/win/GradientDirect2D.cpp:
1487         (WebCore::Gradient::generateGradient): Properly handle the case of a non-zero
1488         initial gradient radius. Properly compute the final radius.
1489         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
1490         (WebCore::ImageBufferData::readDataFromBitmapIfNeeded const): Update to use ID2D1DeviceContext
1491         from platformContext, rather than searching for it each time.
1492         (WebCore::ImageBufferData::compatibleBitmap): Ditto.
1493         * platform/graphics/win/PlatformContextDirect2D.cpp:
1494         (WebCore::PlatformContextDirect2D::PlatformContextDirect2D): Grab the ID2D1DeviceContext for
1495         the RenderTarget at construction time.
1496         (WebCore::PlatformContextDirect2D::setRenderTarget): Ditto.
1497         (WebCore::PlatformContextDirect2D::endDraw): Perform compositing operations when needed.
1498         (WebCore::PlatformContextDirect2D::compositeIfNeeded): Added.
1499         (WebCore::PlatformContextDirect2D::setBlendAndCompositeMode): Update to properly set the
1500         blend and compositing mode (depending on global value set for the canvas.)
1501         * platform/graphics/win/PlatformContextDirect2D.h:
1502         (WebCore::PlatformContextDirect2D::deviceContext):
1503         (WebCore::PlatformContextDirect2D::setRenderTarget): Deleted.
1504         (WebCore::PlatformContextDirect2D::setBlendMode): Deleted.
1505         (WebCore::PlatformContextDirect2D::setCompositeMode): Deleted.
1506
1507 2019-09-29  Zan Dobersek  <zdobersek@igalia.com>
1508
1509         Tighten up LayerRepresentation operators
1510         https://bugs.webkit.org/show_bug.cgi?id=202344
1511
1512         Reviewed by Simon Fraser.
1513
1514         Make the operators on the LayerRepresentation class explicit.
1515         Additionally, the bool operator is added to the class, allowing objects
1516         of this class to be safely used in boolean contexts like null checks.
1517         Before, use in such contexts fell back to using the
1518         GraphicsLayer::PlatformLayerID operator which caused asserts when the
1519         internal representation was of different type.
1520
1521         While the explicit operators prevent misuse, they do require additional
1522         conversion casts to retrieve the internal LayerRepresentation value.
1523
1524         * page/scrolling/ScrollingStateNode.h:
1525         (WebCore::LayerRepresentation::operator GraphicsLayer* const):
1526         (WebCore::LayerRepresentation::operator PlatformLayer* const):
1527         (WebCore::LayerRepresentation::operator GraphicsLayer::PlatformLayerID const):
1528         (WebCore::LayerRepresentation::operator bool const):
1529         (WebCore::LayerRepresentation::toRepresentation const):
1530         Add a missing ASSERT_NOT_REACHED() invocation.
1531         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1532         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
1533         * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
1534         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
1535         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
1536         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
1537         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
1538         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
1539         * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
1540         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
1541         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1542         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
1543
1544 2019-09-29  Zalan Bujtas  <zalan@apple.com>
1545
1546         [LFC][IFC] Remove InlineLayout abstraction layer
1547         https://bugs.webkit.org/show_bug.cgi?id=202352
1548         <rdar://problem/55811532>
1549
1550         Reviewed by Antti Koivisto.
1551
1552         Move InlineLayout functions to InlineFormattingContext. Now inline layout has
1553         1. InlineFormattingContext -high level layout and preferred width computation, collecting inline content, constructing display boxes
1554         2. LineLayout -responsible for placing inline content on the current line (partial inline content handling, line breaking etc)
1555         3. Line -represents an actual line, turns inline content into runs.
1556
1557         * Sources.txt:
1558         * WebCore.xcodeproj/project.pbxproj:
1559         * layout/inlineformatting/InlineFormattingContext.cpp:
1560         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
1561         (WebCore::Layout::InlineFormattingContext::lineLayout):
1562         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
1563         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
1564         (WebCore::Layout::InlineFormattingContext::initialConstraintsForLine):
1565         (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
1566         * layout/inlineformatting/InlineFormattingContext.h:
1567         (WebCore::Layout::InlineFormattingContext::InlineLayout::layoutState const): Deleted.
1568         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingContext const): Deleted.
1569         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingRoot const): Deleted.
1570         (WebCore::Layout::InlineFormattingContext::InlineLayout::formattingState): Deleted.
1571         (WebCore::Layout::InlineFormattingContext::InlineLayout::widthConstraint const): Deleted.
1572         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: Removed.
1573         * layout/inlineformatting/InlineFormattingState.h:
1574         (WebCore::Layout::InlineFormattingState::inlineItems const):
1575         * layout/inlineformatting/InlineLineLayout.cpp: Added.
1576         (WebCore::Layout::inlineItemWidth):
1577         (WebCore::Layout::LineLayout::LineInput::LineInput):
1578         (WebCore::Layout::LineLayout::UncommittedContent::add):
1579         (WebCore::Layout::LineLayout::UncommittedContent::reset):
1580         (WebCore::Layout::LineLayout::LineLayout):
1581         (WebCore::Layout::LineLayout::commitPendingContent):
1582         (WebCore::Layout::LineLayout::close):
1583         (WebCore::Layout::LineLayout::placeInlineItem):
1584         (WebCore::Layout::LineLayout::layout):
1585         * layout/inlineformatting/InlineLineLayout.h: Added.
1586         (WebCore::Layout::LineLayout::formattingContext const):
1587         (WebCore::Layout::LineLayout::UncommittedContent::runs):
1588         (WebCore::Layout::LineLayout::UncommittedContent::isEmpty const):
1589         (WebCore::Layout::LineLayout::UncommittedContent::size const):
1590         (WebCore::Layout::LineLayout::UncommittedContent::width const):
1591
1592 2019-09-29  Zan Dobersek  <zdobersek@igalia.com>
1593
1594         [Nicosia] Add overflow, overflow proxy node implementations
1595         https://bugs.webkit.org/show_bug.cgi?id=202306
1596
1597         Reviewed by Carlos Garcia Campos.
1598
1599         Add the ScrollingTreeOverflowScrollProxyNode and
1600         ScrollingTreeOverflowScrollingNodeNicosia classes, implementing the
1601         missing overlfow node types. Both implementations are based on the
1602         corresponsing classes for Cocoa/Mac platforms and should ideally
1603         share most of the platform-agnostic logic.
1604
1605         * SourcesWPE.txt:
1606         * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
1607         (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
1608         (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
1609         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
1610         (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
1611         (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
1612         * page/scrolling/nicosia/ScrollingTreeOverflowScrollProxyNode.h: Added.
1613         * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.cpp: Added.
1614         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::create):
1615         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::ScrollingTreeOverflowScrollingNodeNicosia):
1616         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::commitStateAfterChildren):
1617         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::adjustedScrollPosition const):
1618         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::repositionScrollingLayers):
1619         (WebCore::ScrollingTreeOverflowScrollingNodeNicosia::handleWheelEvent):
1620         * page/scrolling/nicosia/ScrollingTreeOverflowScrollingNodeNicosia.h: Added.
1621
1622 2019-09-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
1623
1624         Crash when removing the target element while animating its attributes
1625         https://bugs.webkit.org/show_bug.cgi?id=202247
1626
1627         Reviewed by Darin Adler.
1628
1629         If SMIL is animating a CSS attribute, there is a chance the animation is
1630         ended while it is being started or progressed. For that reason, the member
1631         SVGAnimateElementBase::m_animator has to be made RefPtr and it has to be
1632         be protected in resetAnimatedType() and calculateAnimatedValue().
1633
1634         While SMILTimeContainer::updateAnimations() is calling progress() for the
1635         scheduled animation elements, SMILTimeContainer::unschedule() might get
1636         called if processing an animation causes events to be dispatched. For that
1637         reason we need to copy the scheduled animations Vector before processing
1638         them so we avoid changing the Vector while looping through its items.
1639
1640         Remove the guard SMILTimeContainer::m_preventScheduledAnimationsChanges
1641         which was added in r129670 for debugging purposes. In some situations, 
1642         the scheduled animations map could be modified out from under some of the
1643         functions of SMILTimeContainer.
1644
1645         Test: svg/animations/animate-and-remove-target-element.html
1646
1647         * svg/SVGAnimateElementBase.cpp:
1648         (WebCore::SVGAnimateElementBase::resetAnimatedType):
1649         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
1650         * svg/SVGAnimateElementBase.h:
1651         * svg/SVGElement.cpp:
1652         (WebCore::SVGElement::createAnimator):
1653         * svg/SVGElement.h:
1654         * svg/animation/SMILTimeContainer.cpp:
1655         (WebCore::SMILTimeContainer::schedule):
1656         (WebCore::SMILTimeContainer::unschedule):
1657         (WebCore::SMILTimeContainer::setElapsed):
1658         (WebCore::SMILTimeContainer::sortByPriority):
1659         (WebCore::SMILTimeContainer::processAnimations):
1660         (WebCore::SMILTimeContainer::processScheduledAnimations):
1661         (WebCore::SMILTimeContainer::updateAnimations):
1662         (WebCore::SMILTimeContainer::~SMILTimeContainer): Deleted.
1663         * svg/animation/SMILTimeContainer.h:
1664         * svg/animation/SVGSMILElement.cpp:
1665         (WebCore::SVGSMILElement::calculateNextProgressTime const):
1666         * svg/properties/SVGAnimatedPropertyAccessorImpl.h:
1667         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
1668         * svg/properties/SVGAnimatedPropertyPairAccessorImpl.h:
1669         * svg/properties/SVGAnimatedPropertyPairAnimator.h:
1670         * svg/properties/SVGAnimatedPropertyPairAnimatorImpl.h:
1671         * svg/properties/SVGAttributeAnimator.h:
1672         * svg/properties/SVGMemberAccessor.h:
1673         (WebCore::SVGMemberAccessor::createAnimator const):
1674         * svg/properties/SVGPrimitivePropertyAnimator.h:
1675         (WebCore::SVGPrimitivePropertyAnimator::create):
1676         * svg/properties/SVGPropertyAnimatorFactory.h:
1677         (WebCore::SVGPropertyAnimatorFactory::createAnimator):
1678         * svg/properties/SVGPropertyOwnerRegistry.h:
1679         * svg/properties/SVGPropertyRegistry.h:
1680         * svg/properties/SVGValuePropertyAnimatorImpl.h:
1681         * svg/properties/SVGValuePropertyListAnimatorImpl.h:
1682
1683 2019-09-28  Zalan Bujtas  <zalan@apple.com>
1684
1685         [LFC][IFC] Move horizontal alignment to Line
1686         https://bugs.webkit.org/show_bug.cgi?id=202351
1687         <rdar://problem/55810139>
1688
1689         Reviewed by Antti Koivisto.
1690
1691         Line should be able to finalize the run placement including horizontal alignment.
1692
1693         * layout/Verification.cpp:
1694         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
1695         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1696         (WebCore::Layout::LineInput::LineInput):
1697         (WebCore::Layout::LineLayout::LineLayout):
1698         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
1699         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
1700         * layout/inlineformatting/InlineLine.cpp:
1701         (WebCore::Layout::Line::Line):
1702         (WebCore::Layout::Line::isVisuallyEmpty const):
1703         (WebCore::Layout::Line::close):
1704         (WebCore::Layout::Line::verticalAlignContent):
1705         (WebCore::Layout::Line::horizontalAlignContent):
1706         (WebCore::Layout::Line::appendInlineContainerStart):
1707         (WebCore::Layout::Line::appendTextContent):
1708         (WebCore::Layout::Line::appendNonReplacedInlineBox):
1709         (WebCore::Layout::Line::appendHardLineBreak):
1710         (WebCore::Layout::Line::inlineItemContentHeight const):
1711         * layout/inlineformatting/InlineLine.h:
1712
1713 2019-09-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1714
1715         [IDL] Support record<DOMString, *Callback> in bindings
1716         https://bugs.webkit.org/show_bug.cgi?id=202326
1717
1718         Reviewed by Sam Weinig.
1719
1720         Currently, IDLRecord's converter assumes that the value type (template argument V) can be converted by passing
1721         in only an ExecState and the JSValue, since it calls `auto typedValue = Converter<V>::convert(state, subValue)`.
1722         However, IDLCallbackFunctions additionally require the JSDOMGlobalObject (see JSDOMConverterCallbacks.h). This
1723         results in a compilation error in generated code, when attempting to convert the record.
1724
1725         To fix this, teach Converter<IDLRecord<K, V>> to accept three arguments (the ExecState, value, and global
1726         object) in the case where V requires the global object. Additionally, let the bindings generator know that
1727         JSValue to native object conversion requires the global object, by returning whether or not the value type of
1728         the IDL record requires the global object, in the case where the given type is a record.
1729
1730         * bindings/js/JSDOMConvertRecord.h:
1731         * bindings/scripts/CodeGeneratorJS.pm:
1732         (JSValueToNativeDOMConvertNeedsGlobalObject):
1733         * bindings/scripts/test/JS/JSTestObj.cpp:
1734
1735         Test this scenario by augmenting TestObj.idl with record<DOMString, VoidCallback>.
1736
1737         (WebCore::jsTestObjStringVoidCallbackRecordAttrGetter):
1738         (WebCore::jsTestObjStringVoidCallbackRecordAttr):
1739         (WebCore::setJSTestObjStringVoidCallbackRecordAttrSetter):
1740         (WebCore::setJSTestObjStringVoidCallbackRecordAttr):
1741         * bindings/scripts/test/TestObj.idl:
1742
1743 2019-09-28  Zalan Bujtas  <zalan@apple.com>
1744
1745         [LFC][IFC] Line::InitialConstraints's heightAndBaseline should be optional
1746         https://bugs.webkit.org/show_bug.cgi?id=202348
1747
1748         Reviewed by Antti Koivisto.
1749
1750         Vertical properties are undefined while computing the preferred width.
1751
1752         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1753         (WebCore::Layout::LineInput::LineInput):
1754         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
1755         * layout/inlineformatting/InlineLine.cpp:
1756         (WebCore::Layout::Line::Line):
1757         * layout/inlineformatting/InlineLine.h:
1758
1759 2019-09-28  Chris Dumez  <cdumez@apple.com>
1760
1761         [Experiment][iOS] Add temporary HTTP header to distinguish iPads for requests to Google
1762         https://bugs.webkit.org/show_bug.cgi?id=202335
1763         <rdar://problem/55790994>
1764
1765         Reviewed by Maciej Stachowiak.
1766
1767         * loader/cache/CachedResourceLoader.cpp:
1768         (WebCore::CachedResourceLoader::requestResource):
1769         * platform/network/HTTPHeaderNames.in:
1770
1771 2019-09-28  Zalan Bujtas  <zalan@apple.com>
1772
1773         [LFC][IFC] Line::Box should have a const public interface
1774         https://bugs.webkit.org/show_bug.cgi?id=202336
1775         <rdar://problem/55798628>
1776
1777         Reviewed by Antti Koivisto.
1778
1779         Clean up Line::Box interface.
1780
1781         * layout/inlineformatting/InlineLine.cpp:
1782         (WebCore::Layout::Line::close):
1783         * layout/inlineformatting/InlineLine.h:
1784         (WebCore::Layout::Line::Run::displayRun const):
1785         (WebCore::Layout::Line::Run::isVisuallyEmpty const):
1786         (WebCore::Layout::Line::Run::expand):
1787         (WebCore::Layout::Line::Run::displayRun): Deleted.
1788
1789 2019-09-27  Chris Dumez  <cdumez@apple.com>
1790
1791         Pages using WebGLRenderingContext fail to enter the back/forward cache
1792         https://bugs.webkit.org/show_bug.cgi?id=202318
1793         <rdar://problem/55783612>
1794
1795         Reviewed by Tim Horton.
1796
1797         Allow pages with a WebGLRenderingContext to enter the back/forward cache by updating the
1798         implementation to use SuspendableTimers to fire JS events. This guarantees that no events
1799         will be fired (and thus no JS will run) while in the page cache.
1800
1801         This was preventing some of the pages on weather.com and facebook.com from entering the
1802         back/forward cache.
1803
1804         Test: fast/canvas/webgl/canvas-webgl-page-cache.html
1805
1806         * dom/DocumentEventQueue.cpp:
1807         * html/canvas/WebGLRenderingContextBase.cpp:
1808         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
1809         (WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension const):
1810         (WebCore::WebGLRenderingContextBase::suspend):
1811         (WebCore::WebGLRenderingContextBase::resume):
1812         (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
1813         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
1814         (WebCore::WebGLRenderingContextBase::dispatchContextChangedNotification):
1815         (WebCore::WebGLRenderingContextBase::dispatchContextChangedEvent):
1816         * html/canvas/WebGLRenderingContextBase.h:
1817         * page/DOMTimer.cpp:
1818         (WebCore::DOMTimer::DOMTimer):
1819         * page/DOMTimer.h:
1820         * page/SuspendableTimer.cpp:
1821         (WebCore::SuspendableTimerBase::SuspendableTimerBase):
1822         (WebCore::SuspendableTimerBase::hasPendingActivity const):
1823         (WebCore::SuspendableTimerBase::stop):
1824         (WebCore::SuspendableTimerBase::suspend):
1825         (WebCore::SuspendableTimerBase::resume):
1826         (WebCore::SuspendableTimerBase::canSuspendForDocumentSuspension const):
1827         (WebCore::SuspendableTimerBase::didStop):
1828         (WebCore::SuspendableTimerBase::cancel):
1829         (WebCore::SuspendableTimerBase::startRepeating):
1830         (WebCore::SuspendableTimerBase::startOneShot):
1831         (WebCore::SuspendableTimerBase::repeatInterval const):
1832         (WebCore::SuspendableTimerBase::augmentFireInterval):
1833         (WebCore::SuspendableTimerBase::augmentRepeatInterval):
1834         (WebCore::SuspendableTimer::activeDOMObjectName const):
1835         * page/SuspendableTimer.h:
1836
1837 2019-09-27  Adrian Perez de Castro  <aperez@igalia.com>
1838
1839         [GTK][WPE] Fixes for non-unified builds after r249714
1840         https://bugs.webkit.org/show_bug.cgi?id=202304
1841
1842         Reviewed by Youenn Fablet.
1843
1844         No new tests needed.
1845
1846         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp: Add missing inclusion of Frame.h
1847         to make the compiler stop complaining about Frame being used without being defined.
1848         * inspector/InspectorShaderProgram.h: Add missing inclusion of wtf/Variant.h, where
1849         WTF::Monostate is defined; and prefixed the usage with its namespace.
1850
1851 2019-09-27  Andres Gonzalez  <andresg_22@apple.com>
1852
1853         Support accessibility for <figure> element on iOS.
1854         https://bugs.webkit.org/show_bug.cgi?id=202272
1855         <rdar://problem/54789907>
1856
1857         Reviewed by Chris Fleizach.
1858
1859         Test: accessibility/ios-simulator/figure-element.html
1860
1861         Added a role description for the <figure> element.
1862         * accessibility/AccessibilityObject.cpp:
1863         (WebCore::AccessibilityObject::roleDescription const):
1864
1865 2019-09-27  Zalan Bujtas  <zalan@apple.com>
1866
1867         [iPadOS] Can’t use RalphLauren.com on iPad because hover menus don’t stay up
1868         https://bugs.webkit.org/show_bug.cgi?id=202331
1869         <rdar://problem/55629493>
1870
1871         Reviewed by Tim Horton.
1872
1873         Unfortunately the top level menu items now are ARIA labelled as 'buttons' and that triggers the fast path on content observation.
1874         This patch introduces a quirk on ralphLauren.com to ignore the ARIA labels when checking whether the target node should always click through.
1875
1876         * page/Quirks.cpp:
1877         (WebCore::Quirks::shouldIgnoreAriaForFastPathContentObservationCheck const):
1878         * page/Quirks.h:
1879
1880 2019-09-27  Per Arne Vollan  <pvollan@apple.com>
1881
1882         [Win] Crash under FontCache::lastResortFallbackFont
1883         https://bugs.webkit.org/show_bug.cgi?id=202325
1884         <rdar://problem/47856730>
1885
1886         Reviewed by Brent Fulgham.
1887
1888         As demonstrated by crash reports, there seems to be cases where we are not able to create a last resort fallback font  
1889         on Windows. If all attempts to create a fallback font fail, create a font from the default UI font.
1890  
1891         No new tests. I have not been able to reproduce this issue. 
1892
1893         * platform/graphics/win/FontCacheWin.cpp:
1894         (WebCore::FontCache::lastResortFallbackFont):
1895
1896 2019-09-27  Jiewen Tan  <jiewen_tan@apple.com>
1897
1898         Unreviewed, rolling out r250397.
1899
1900         caused failure on iOS 13
1901
1902         Reverted changeset:
1903
1904         "REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-
1905         credential-create-success-u2f.https.html is failing"
1906         https://bugs.webkit.org/show_bug.cgi?id=201620
1907         https://trac.webkit.org/changeset/250397
1908
1909 2019-09-27  Jer Noble  <jer.noble@apple.com>
1910
1911         [iOS] Vimeo fails to AirPlay in desktop mode
1912         https://bugs.webkit.org/show_bug.cgi?id=202322
1913
1914         Reviewed by Eric Carlson.
1915
1916         Add a Quirk which opts Vimeo out of the preload=auto restriction, and allows their
1917         second video element containing a HLS stream to correctly start AirPlaying when the
1918         system route changes.
1919
1920         * html/HTMLMediaElement.cpp:
1921         (WebCore::HTMLMediaElement::finishInitialization):
1922         * page/Quirks.cpp:
1923         (WebCore::Quirks::needsPreloadAutoQuirk const):
1924         * page/Quirks.h:
1925
1926 2019-09-27  Zalan Bujtas  <zalan@apple.com>
1927
1928         [LFC][IFC] Line::close should merge the text runs.
1929         https://bugs.webkit.org/show_bug.cgi?id=202319
1930         <rdar://problem/55785949>
1931
1932         Reviewed by Antti Koivisto.
1933
1934         Now Line::close returns the final Display::Run list.
1935
1936         * layout/displaytree/DisplayRect.h:
1937         (WebCore::Display::Rect::expandHorizontally):
1938         (WebCore::Display::Rect::expandVertically):
1939         (WebCore::Display::Rect::expand):
1940         * layout/displaytree/DisplayRun.h:
1941         (WebCore::Display::Run::expandVertically):
1942         (WebCore::Display::Run::expandHorizontally):
1943         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1944         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
1945         * layout/inlineformatting/InlineLine.cpp:
1946         (WebCore::Layout::Line::close):
1947         * layout/inlineformatting/InlineLine.h:
1948         (WebCore::Layout::Line::Run::displayRun):
1949
1950 2019-09-27  Chris Dumez  <cdumez@apple.com>
1951
1952         Allow pages served over HTTPS with `Cache-Control: no-store` header to enter the back/forward cache
1953         https://bugs.webkit.org/show_bug.cgi?id=202314
1954         <rdar://problem/55783482>
1955
1956         Reviewed by Alex Christensen.
1957
1958         Allow pages served over HTTPS with `Cache-Control: no-store` header to enter the back/forward cache.
1959         This was preventing all pages on Facebook.com to enter the back/forward cache.
1960
1961         No new tests, updated existing test.
1962
1963         * history/PageCache.cpp:
1964         (WebCore::canCacheFrame):
1965
1966 2019-09-27  Devin Rousso  <drousso@apple.com>
1967
1968         Flaky Test: inspector/canvas/updateShader.html
1969         https://bugs.webkit.org/show_bug.cgi?id=202186
1970         <rdar://problem/55716053>
1971
1972         Reviewed by Joseph Pecoraro.
1973
1974         If the `WebGLProgram` outlives it's `WebGLRenderingContext`, the `ScriptExecutionContext*`
1975         that was provided in the constructor won't be invalidated leading to the bad access crash.
1976
1977         Rather than pass the `ScriptExecutionContext*` directly, have `WebGLProgram` inherit from
1978         `ContextDestructionObserver` so that it can propertly invalidate (and notify Web Inspector)
1979         when the related context is about to be destroyed.
1980
1981         Test: inspector/canvas/updateShader.html
1982
1983         * html/canvas/WebGLProgram.h:
1984         (WebCore::WebGLProgram::scriptExecutionContext const): Deleted.
1985         * html/canvas/WebGLProgram.cpp:
1986         (WebCore::WebGLProgram::WebGLProgram):
1987         (WebCore::WebGLProgram::contextDestroyed): Added.
1988
1989 2019-09-27  Zalan Bujtas  <zalan@apple.com>
1990
1991         [LFC][IFC] Replace Line::Run's logicalRect/textContext with Display::Run
1992         https://bugs.webkit.org/show_bug.cgi?id=202313
1993         <rdar://problem/55782430>
1994
1995         Reviewed by Antti Koivisto.
1996
1997         Display::Run is a container for logical rect and text context. Let's replace Line::Run's logical rect/text context with Display::Run.
1998
1999         * layout/Verification.cpp:
2000         (WebCore::Layout::outputMismatchingSimpleLineInformationIfNeeded):
2001         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
2002         * layout/displaytree/DisplayRun.h:
2003         (WebCore::Display::Run::logicalRect const):
2004         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2005         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
2006         (WebCore::Layout::InlineFormattingContext::InlineLayout::alignRuns const):
2007         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2008         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2009         * layout/inlineformatting/InlineFormattingState.h:
2010         (WebCore::Layout::InlineFormattingState::addInlineRun):
2011         * layout/inlineformatting/InlineLine.cpp:
2012         (WebCore::Layout::Line::Run::Run):
2013         (WebCore::Layout::Line::isVisuallyEmpty const):
2014         (WebCore::Layout::Line::appendNonBreakableSpace):
2015         (WebCore::Layout::Line::appendTextContent):
2016         (WebCore::Layout::Line::appendNonReplacedInlineBox):
2017         (WebCore::Layout::Line::appendHardLineBreak):
2018         * layout/inlineformatting/InlineLine.h:
2019         (WebCore::Layout::Line::Run::displayRun const):
2020         (WebCore::Layout::Line::Run::logicalRect const):
2021         (WebCore::Layout::Line::Run::adjustLogicalTop):
2022         (WebCore::Layout::Line::Run::moveVertically):
2023         (WebCore::Layout::Line::Run::moveHorizontally):
2024         (WebCore::Layout::Line::Run::textContext const): Deleted.
2025         * layout/layouttree/LayoutTreeBuilder.cpp:
2026         (WebCore::Layout::outputInlineRuns):
2027
2028 2019-09-27  Truitt Savell  <tsavell@apple.com>
2029
2030         Unreviewed, rolling out r250415.
2031
2032         Broke iOS debug testing with 50 crashes and 850 API failure
2033
2034         Reverted changeset:
2035
2036         "ScrollingTreeScrollingNode: use LayerRepresentation for
2037         scroll container, scrolled contents layers"
2038         https://bugs.webkit.org/show_bug.cgi?id=202256
2039         https://trac.webkit.org/changeset/250415
2040
2041 2019-09-27  Alex Christensen  <achristensen@webkit.org>
2042
2043         Move service worker process termination delay disabling from process pool to website data store
2044         https://bugs.webkit.org/show_bug.cgi?id=202308
2045
2046         Reviewed by Chris Dumez.
2047
2048         * workers/service/server/SWServer.cpp:
2049         (WebCore::SWServer::SWServer):
2050         (WebCore::SWServer::unregisterServiceWorkerClient):
2051         * workers/service/server/SWServer.h:
2052         (WebCore::SWServer::disableServiceWorkerProcessTerminationDelay): Deleted.
2053
2054 2019-09-27  Chris Dumez  <cdumez@apple.com>
2055
2056         IDBRequest should not prevent a page from entering the back/forward cache
2057         https://bugs.webkit.org/show_bug.cgi?id=202270
2058         <rdar://problem/55744717>
2059
2060         Reviewed by Youenn Fablet.
2061
2062         Update IDBRequest::canSuspendForDocumentSuspension() to return true instead of
2063         false. IDBRequest can only fire 2 events (error / success) and for both its
2064         merely enqueues the Event to the DocumentEventQueue. The DocumentEventQueue
2065         uses a SuspendableTimer (which will be suspended while the document is in the
2066         page cache) so there is no risk of firing the events (and thus running script)
2067         while in the page cache.
2068
2069         Test: storage/indexeddb/IDBRequest-page-cache.html
2070
2071         * Modules/indexeddb/IDBRequest.cpp:
2072         (WebCore::IDBRequest::canSuspendForDocumentSuspension const):
2073
2074 2019-09-27  Zalan Bujtas  <zalan@apple.com>
2075
2076         [LFC][IFC] Remove redundant Line::TextContext member variables
2077         https://bugs.webkit.org/show_bug.cgi?id=202300
2078         <rdar://problem/55769916>
2079
2080         Reviewed by Antti Koivisto.
2081
2082         This is in preparation for using Display::Run in Line::Run instead of Display::Rect + TextContext.
2083
2084         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2085         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
2086         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2087         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2088         * layout/inlineformatting/InlineLine.cpp:
2089         (WebCore::Layout::Line::Run::isWhitespace const):
2090         (WebCore::Layout::Line::Run::canBeExtended const):
2091         (WebCore::Layout::Line::isVisuallyEmpty const):
2092         (WebCore::Layout::Line::removeTrailingTrimmableContent):
2093         (WebCore::Layout::Line::trailingTrimmableWidth const):
2094         (WebCore::Layout::Line::appendTextContent):
2095         * layout/inlineformatting/InlineLine.h:
2096         (WebCore::Layout::Line::Run::isVisuallyEmpty const):
2097         (WebCore::Layout::Line::Run::setVisuallyIsEmpty):
2098         (WebCore::Layout::Line::Run::setTextIsCollapsed): Deleted.
2099
2100 2019-09-27  Zan Dobersek  <zdobersek@igalia.com>
2101
2102         [Nicosia] Implement frame scrolling functionality
2103         https://bugs.webkit.org/show_bug.cgi?id=202201
2104
2105         Reviewed by Carlos Garcia Campos.
2106
2107         Implement logic in the ScrollingTreeFrameScrollingNodeNicosia class,
2108         largely following the Mac port's implementation but skipping areas we
2109         don't support or can keep simple, like CSS scroll snap, frame pinning
2110         and more complex wheel event handling through the platform-specific
2111         delegate behavior.
2112
2113         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.cpp:
2114         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateBeforeChildren):
2115         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::commitStateAfterChildren):
2116         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::handleWheelEvent):
2117         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::adjustedScrollPosition const):
2118         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::currentScrollPositionChanged):
2119         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionScrollingLayers):
2120         (WebCore::ScrollingTreeFrameScrollingNodeNicosia::repositionRelatedLayers):
2121         * page/scrolling/nicosia/ScrollingTreeFrameScrollingNodeNicosia.h:
2122
2123 2019-09-27  Zan Dobersek  <zdobersek@igalia.com>
2124
2125         [Nicosia] ScrollingCoordinatorNicosia should handle wheel events coming from the main thread
2126         https://bugs.webkit.org/show_bug.cgi?id=202275
2127
2128         Reviewed by Carlos Garcia Campos.
2129
2130         * page/scrolling/nicosia/ScrollingCoordinatorNicosia.cpp:
2131         (WebCore::ScrollingCoordinatorNicosia::handleWheelEvent):
2132         Handle wheel events that get rerouted through the main thread,
2133         dispatching them back to the scrolling thread so that they end up
2134         performing the desired scroll if possible.
2135
2136 2019-09-27  Zan Dobersek  <zdobersek@igalia.com>
2137
2138         [CoordinatedGraphics] support bounds origin
2139         https://bugs.webkit.org/show_bug.cgi?id=198998
2140
2141         Reviewed by Carlos Garcia Campos.
2142
2143         Add bounds-origin support to the CoordinatedGraphics stack. Currently we
2144         take the short-cut implementation of just combining the bounds origin
2145         and the position value and incorporating them into the layer transform
2146         we calculate in TextureMapperLayer.
2147
2148         Additional boilerplate code is added, as required, to relay the
2149         WebCore::GraphicsLayer change of bounds origin to the rendering system.
2150
2151         * platform/graphics/nicosia/NicosiaPlatformLayer.h:
2152         (Nicosia::CompositionLayer::flushState):
2153         * platform/graphics/texmap/TextureMapperLayer.cpp:
2154         (WebCore::TextureMapperLayer::computeTransformsRecursive):
2155         (WebCore::TextureMapperLayer::setBoundsOrigin):
2156         * platform/graphics/texmap/TextureMapperLayer.h:
2157         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2158         (WebCore::CoordinatedGraphicsLayer::setBoundsOrigin):
2159         (WebCore::CoordinatedGraphicsLayer::computePositionRelativeToBase):
2160         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
2161
2162 2019-09-26  Zan Dobersek  <zdobersek@igalia.com>
2163
2164         ScrollingTreeScrollingNode: use LayerRepresentation for scroll container, scrolled contents layers
2165         https://bugs.webkit.org/show_bug.cgi?id=202256
2166
2167         Reviewed by Simon Fraser.
2168
2169         Make the scroll container and scrolled contents layer holders
2170         platform-independent by using the LayerRepresentation as the underlying
2171         type for the two member variables in ScrollingTreeScrollingNode.
2172
2173         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2174         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
2175         * page/scrolling/ScrollingTreeScrollingNode.h:
2176         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2177         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
2178         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
2179         (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
2180
2181 2019-09-26  Chris Dumez  <cdumez@apple.com>
2182
2183         Pages frequently fails to enter the back/forward cache due to pending loads
2184         https://bugs.webkit.org/show_bug.cgi?id=202289
2185         <rdar://problem/55758506>
2186
2187         Reviewed by Geoffrey Garen.
2188
2189         Allow pages to enter the back / forward cache, even if they have pending loads.
2190         Note that these pending loads get cancelled. Also note that we won't enter page
2191         cache unless the 'load' event has been fired in the main frame, since a
2192         HistoryItem would not get created otherwise. This was causing frequent transient
2193         failures to enter the back / forward cache while browsing (e.g. on weather.com).
2194
2195         Test: http/tests/navigation/page-cache-pending-load.html
2196
2197         * history/PageCache.cpp:
2198         (WebCore::canCacheFrame):
2199         * loader/CrossOriginPreflightChecker.cpp:
2200         * loader/CrossOriginPreflightChecker.h:
2201         * loader/DocumentLoader.cpp:
2202         (WebCore::DocumentLoader::setMainDocumentError):
2203         (WebCore::DocumentLoader::stopLoading):
2204         * loader/DocumentLoader.h:
2205         * loader/DocumentThreadableLoader.cpp:
2206         * loader/DocumentThreadableLoader.h:
2207         * loader/cache/CachedResource.cpp:
2208         * loader/cache/CachedResource.h:
2209         * loader/cache/CachedResourceClient.h:
2210         (WebCore::CachedResourceClient::deprecatedDidReceiveCachedResource):
2211         * page/DiagnosticLoggingKeys.cpp:
2212         (WebCore::DiagnosticLoggingKeys::mainFrameHasNotFinishedLoadingKey):
2213         * page/DiagnosticLoggingKeys.h:
2214
2215 2019-09-26  Zalan Bujtas  <zalan@apple.com>
2216
2217         [LFC][IFC] Line::Run should have a reference to the associated InlineItem
2218         https://bugs.webkit.org/show_bug.cgi?id=202288
2219         <rdar://problem/55758112>
2220
2221         Reviewed by Antti Koivisto.
2222
2223         It makes it clearer where the type and the layout box come from.
2224
2225         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2226         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2227         * layout/inlineformatting/InlineLine.cpp:
2228         (WebCore::Layout::Line::Run::Run):
2229         * layout/inlineformatting/InlineLine.h:
2230         (WebCore::Layout::Line::Run::layoutBox const):
2231         (WebCore::Layout::Line::Run::textContext const):
2232         (WebCore::Layout::Line::Run::isText const):
2233         (WebCore::Layout::Line::Run::isBox const):
2234         (WebCore::Layout::Line::Run::isLineBreak const):
2235         (WebCore::Layout::Line::Run::isContainerStart const):
2236         (WebCore::Layout::Line::Run::isContainerEnd const):
2237         (WebCore::Layout::Line::Run::type const): Deleted.
2238
2239 2019-09-26  Zalan Bujtas  <zalan@apple.com>
2240
2241         [LFC][IFC] Remove redundant Line::Content
2242         https://bugs.webkit.org/show_bug.cgi?id=202284
2243         <rdar://problem/55757187>
2244
2245         Reviewed by Antti Koivisto.
2246
2247         Line::Content is really just a list or runs at this point.
2248
2249         * layout/inlineformatting/InlineFormattingContext.h:
2250         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2251         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
2252         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2253         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2254         * layout/inlineformatting/InlineLine.cpp:
2255         (WebCore::Layout::Line::Run::Run):
2256         (WebCore::Layout::Line::Line):
2257         (WebCore::Layout::Line::isVisuallyEmpty const):
2258         (WebCore::Layout::Line::close):
2259         (WebCore::Layout::Line::appendNonBreakableSpace):
2260         (WebCore::Layout::Line::appendTextContent):
2261         (WebCore::Layout::Line::appendNonReplacedInlineBox):
2262         (WebCore::Layout::Line::appendHardLineBreak):
2263         (WebCore::Layout::Line::Content::Run::Run): Deleted.
2264         * layout/inlineformatting/InlineLine.h:
2265         (WebCore::Layout::Line::Run::layoutBox const):
2266         (WebCore::Layout::Line::Run::logicalRect const):
2267         (WebCore::Layout::Line::Run::textContext const):
2268         (WebCore::Layout::Line::Run::type const):
2269         (WebCore::Layout::Line::Run::isText const):
2270         (WebCore::Layout::Line::Run::isBox const):
2271         (WebCore::Layout::Line::Run::isLineBreak const):
2272         (WebCore::Layout::Line::Run::isContainerStart const):
2273         (WebCore::Layout::Line::Run::isContainerEnd const):
2274         (WebCore::Layout::Line::Run::adjustLogicalTop):
2275         (WebCore::Layout::Line::Run::moveVertically):
2276         (WebCore::Layout::Line::Run::moveHorizontally):
2277         (WebCore::Layout::Line::Run::setTextIsCollapsed):
2278         (WebCore::Layout::Line::Content::Run::layoutBox const): Deleted.
2279         (WebCore::Layout::Line::Content::Run::logicalRect const): Deleted.
2280         (WebCore::Layout::Line::Content::Run::textContext const): Deleted.
2281         (WebCore::Layout::Line::Content::Run::type const): Deleted.
2282         (WebCore::Layout::Line::Content::Run::isText const): Deleted.
2283         (WebCore::Layout::Line::Content::Run::isBox const): Deleted.
2284         (WebCore::Layout::Line::Content::Run::isLineBreak const): Deleted.
2285         (WebCore::Layout::Line::Content::Run::isContainerStart const): Deleted.
2286         (WebCore::Layout::Line::Content::Run::isContainerEnd const): Deleted.
2287         (WebCore::Layout::Line::Content::Run::adjustLogicalTop): Deleted.
2288         (WebCore::Layout::Line::Content::Run::moveVertically): Deleted.
2289         (WebCore::Layout::Line::Content::Run::moveHorizontally): Deleted.
2290         (WebCore::Layout::Line::Content::Run::setTextIsCollapsed): Deleted.
2291         (WebCore::Layout::Line::Content::runs const): Deleted.
2292         (WebCore::Layout::Line::Content::runs): Deleted.
2293
2294 2019-09-26  Zalan Bujtas  <zalan@apple.com>
2295
2296         [LFC][IFC] Move Line::Content::m_lineBox to Line.
2297         https://bugs.webkit.org/show_bug.cgi?id=202280
2298         <rdar://problem/55755798>
2299
2300         Reviewed by Antti Koivisto.
2301
2302         This is in preparation for Line producing Display::Runs instead of Line::Runs.
2303
2304         * layout/inlineformatting/InlineFormattingContext.h:
2305         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2306         (WebCore::Layout::LineLayout::close):
2307         (WebCore::Layout::LineLayout::placeInlineItem):
2308         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
2309         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
2310         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
2311         * layout/inlineformatting/InlineLine.cpp:
2312         (WebCore::Layout::Line::Line):
2313         (WebCore::Layout::Line::close):
2314         (WebCore::Layout::Line::removeTrailingTrimmableContent):
2315         (WebCore::Layout::Line::moveLogicalLeft):
2316         (WebCore::Layout::Line::appendNonBreakableSpace):
2317         (WebCore::Layout::Line::appendTextContent):
2318         (WebCore::Layout::Line::appendNonReplacedInlineBox):
2319         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2320         * layout/inlineformatting/InlineLine.h:
2321         (WebCore::Layout::Line::Content::runs const):
2322         (WebCore::Layout::Line::availableWidth const):
2323         (WebCore::Layout::Line::lineBox const):
2324         (WebCore::Layout::Line::logicalTop const):
2325         (WebCore::Layout::Line::logicalBottom const):
2326         (WebCore::Layout::Line::logicalLeft const):
2327         (WebCore::Layout::Line::logicalHeight const):
2328         (WebCore::Layout::Line::contentLogicalWidth const):
2329         (WebCore::Layout::Line::contentLogicalRight const):
2330         (WebCore::Layout::Line::baselineOffset const):
2331         (WebCore::Layout::Line::Content::lineBox const): Deleted.
2332         (WebCore::Layout::Line::Content::lineBox): Deleted.
2333         (WebCore::Layout::Line::Content::setLineBox): Deleted.
2334
2335 2019-09-26  Jiewen Tan  <jiewen_tan@apple.com>
2336
2337         REGRESSION: [ Catalina WK2 ] http/wpt/webauthn/public-key-credential-create-success-u2f.https.html is failing
2338         https://bugs.webkit.org/show_bug.cgi?id=201620
2339
2340         Unreviewed, roll back part of r249737 to confirm the cause.
2341
2342         * Modules/webauthn/fido/U2fResponseConverter.cpp:
2343         (fido::WebCore::createAttestedCredentialDataFromU2fRegisterResponse):
2344
2345 2019-09-26  Truitt Savell  <tsavell@apple.com>
2346
2347         Unreviewed, rolling out r250385.
2348
2349         Broke imported/w3c/web-platform-tests/svg/animations/syncbase-
2350         remove-add-while-running.html on all platforms. Which was
2351         caught by EWS
2352
2353         Reverted changeset:
2354
2355         "Non-callable "handleEvent" property is silently ignored"
2356         https://bugs.webkit.org/show_bug.cgi?id=200066
2357         https://trac.webkit.org/changeset/250385
2358
2359 2019-09-26  Kate Cheney  <katherine_cheney@apple.com>
2360
2361         Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
2362         https://bugs.webkit.org/show_bug.cgi?id=195420
2363         <rdar://problem/54213551> 
2364
2365         Reviewed by Brent Fulgham.
2366
2367         Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html
2368                http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html
2369                http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html
2370                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html
2371                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html
2372                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html
2373                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html
2374                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html
2375                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html
2376                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
2377                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
2378                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
2379                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
2380                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
2381                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
2382                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html
2383                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
2384                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
2385                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
2386                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html
2387                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
2388                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
2389                http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
2390                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
2391                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
2392                http/tests/resourceLoadStatistics/cookie-deletion-database.html
2393                http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html
2394                http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html
2395                http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html
2396                http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html
2397                http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html
2398                http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html
2399                http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html
2400                http/tests/resourceLoadStatistics/enable-debug-mode-database.html
2401                http/tests/resourceLoadStatistics/grandfathering-database.html
2402                http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
2403                http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
2404                http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html
2405                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2406                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2407                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2408                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2409                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2410                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2411                http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html
2412                http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
2413                http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
2414                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
2415                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
2416                http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
2417                http/tests/resourceLoadStatistics/prune-statistics-database.html
2418                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2419                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2420                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2421                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2422                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
2423                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
2424                http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html
2425                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
2426                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html
2427                http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html
2428                http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
2429                http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html
2430                http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html
2431
2432         * platform/sql/SQLiteDatabase.h:
2433         Added WEBCORE_EXPORT prefix to 2 functions needed in the ITP Database 
2434         to clear out the database.
2435
2436 2019-09-26  Antti Koivisto  <antti@apple.com>
2437
2438         Use LineLayoutTraversal for RenderText functions
2439         https://bugs.webkit.org/show_bug.cgi?id=202266
2440
2441         Reviewed by Zalan Bujtas.
2442
2443         Replace a bunch of functions that have separate simple and complex line layout versions with
2444         shared functions that use LineLayoutTraversal.
2445
2446         * rendering/RenderText.cpp:
2447         (WebCore::RenderText::absoluteRects const):
2448         (WebCore::RenderText::firstRunLocation const):
2449         (WebCore::RenderText::linesBoundingBox const):
2450
2451         This is substantially simpler than RenderTextLineBoxes::boundingBox because it uses physical rects for all computations
2452         instead of using logical rects and flipping to physical at the end.
2453
2454         (WebCore::RenderText::caretMinOffset const):
2455         (WebCore::RenderText::caretMaxOffset const):
2456         (WebCore::RenderText::countRenderedCharacterOffsetsUntil const):
2457         (WebCore::containsOffset):
2458         (WebCore::RenderText::containsRenderedCharacterOffset const):
2459         (WebCore::RenderText::containsCaretOffset const):
2460         (WebCore::RenderText::hasRenderedText const):
2461         * rendering/RenderTextLineBoxes.cpp:
2462         (WebCore::RenderTextLineBoxes::boundingBox const): Deleted.
2463         (WebCore::RenderTextLineBoxes::firstRunLocation const): Deleted.
2464         (WebCore::RenderTextLineBoxes::hasRenderedText const): Deleted.
2465         (WebCore::RenderTextLineBoxes::caretMinOffset const): Deleted.
2466         (WebCore::RenderTextLineBoxes::caretMaxOffset const): Deleted.
2467         (WebCore::RenderTextLineBoxes::containsOffset const): Deleted.
2468         (WebCore::RenderTextLineBoxes::countCharacterOffsetsUntil const): Deleted.
2469         (WebCore::RenderTextLineBoxes::absoluteRects const): Deleted.
2470         * rendering/RenderTreeAsText.cpp:
2471         (WebCore::write):
2472         * rendering/SimpleLineLayout.cpp:
2473         (WebCore::SimpleLineLayout::LineState::appendFragmentAndCreateRunIfNeeded):
2474         * rendering/SimpleLineLayout.h:
2475         (WebCore::SimpleLineLayout::Run::Run):
2476         * rendering/SimpleLineLayoutFunctions.cpp:
2477         (WebCore::SimpleLineLayout::computeFirstRunLocation): Deleted.
2478         * rendering/SimpleLineLayoutFunctions.h:
2479         (WebCore::SimpleLineLayout::findCaretMinimumOffset): Deleted.
2480         (WebCore::SimpleLineLayout::findCaretMaximumOffset): Deleted.
2481         (WebCore::SimpleLineLayout::containsOffset): Deleted.
2482         (WebCore::SimpleLineLayout::isTextRendered): Deleted.
2483         * rendering/SimpleLineLayoutResolver.h:
2484         (WebCore::SimpleLineLayout::RunResolver::Run::isLineBreak const):
2485         * rendering/line/LineLayoutTraversal.cpp:
2486         (WebCore::LineLayoutTraversal::TextBox::isLineBreak const):
2487         (WebCore::LineLayoutTraversal::firstTextBoxFor):
2488         (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
2489         (WebCore::LineLayoutTraversal::textBoxesFor):
2490         (WebCore::LineLayoutTraversal::firstTextBoxInVisualOrderFor): Deleted.
2491         (WebCore::LineLayoutTraversal::textBoxRangeFor): Deleted.
2492         * rendering/line/LineLayoutTraversal.h:
2493         (WebCore::LineLayoutTraversal::hasTextBoxes):
2494
2495 2019-09-26  Truitt Savell  <tsavell@apple.com>
2496
2497         Unreviewed, rolling out r250381.
2498
2499         broke multiple webgpu/ tests on Mojave WK2
2500
2501         Reverted changeset:
2502
2503         "Flaky Test: inspector/canvas/updateShader.html"
2504         https://bugs.webkit.org/show_bug.cgi?id=202186
2505         https://trac.webkit.org/changeset/250381
2506
2507 2019-09-26  Alexey Shvayka  <shvaikalesh@gmail.com>
2508
2509         Non-callable "handleEvent" property is silently ignored
2510         https://bugs.webkit.org/show_bug.cgi?id=200066
2511
2512         Reviewed by Darin Adler.
2513
2514         Tests: imported/w3c/web-platform-tests/IndexedDB/fire-error-event-exception.html
2515                imported/w3c/web-platform-tests/IndexedDB/fire-success-event-exception.html
2516                imported/w3c/web-platform-tests/IndexedDB/fire-upgradeneeded-event-exception.html
2517                imported/w3c/web-platform-tests/dom/events/EventListener-handleEvent.html
2518
2519         * bindings/js/JSEventListener.cpp:
2520         (WebCore::JSEventListener::handleEvent): Report TypeError if "handleEvent" is not callable.
2521
2522 2019-09-26  Zalan Bujtas  <zalan@apple.com>
2523
2524         [LFC][IFC] Decouple Display::Run and Display::Box initializations.
2525         https://bugs.webkit.org/show_bug.cgi?id=202255
2526         <rdar://problem/55731445>
2527
2528         Reviewed by Antti Koivisto.
2529
2530         This is in preparation for moving Display::Run initialization to Line class.
2531
2532         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2533         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
2534
2535 2019-09-26  Devin Rousso  <drousso@apple.com>
2536
2537         Flaky Test: inspector/canvas/updateShader.html
2538         https://bugs.webkit.org/show_bug.cgi?id=202186
2539         <rdar://problem/55716053>
2540
2541         Reviewed by Joseph Pecoraro.
2542
2543         If the `WebGPUPipeline`/`WebGLProgram` outlives it's `WebGPUDevice`/`WebGLRenderingContext`,
2544         the `ScriptExecutionContext*` that was provided in the constructor won't be invalidated
2545         leading to the bad access crash.
2546
2547         Rather than pass the `ScriptExecutionContext*` directly, have `WebGPUPipeline`/`WebGLProgram`
2548         extend from `ContextDestructionObserver` so that it can propertly invalidate (and notify Web
2549         Inspector) when the related context is about to be destroyed.
2550
2551         Test: inspector/canvas/updateShader.html
2552
2553         * Modules/webgpu/WebGPUPipeline.h:
2554         (WebCore::WebGPUPipeline::scriptExecutionContext const): Deleted.
2555         * Modules/webgpu/WebGPUPipeline.cpp:
2556         (WebCore::WebGPUPipeline::WebGPUPipeline):
2557         (WebCore::WebGPUPipeline::contextDestroyed): Added.
2558
2559         * html/canvas/WebGLProgram.h:
2560         (WebCore::WebGLProgram::scriptExecutionContext const): Deleted.
2561         * html/canvas/WebGLProgram.cpp:
2562         (WebCore::WebGLProgram::WebGLProgram):
2563         (WebCore::WebGLProgram::contextDestroyed): Added.
2564
2565 2019-09-25  Chris Dumez  <cdumez@apple.com>
2566
2567         Add very basic PageCache support for RTCPeerConnection
2568         https://bugs.webkit.org/show_bug.cgi?id=202244
2569
2570         Reviewed by Geoffrey Garen.
2571
2572         RTCPeerConnection::canSuspendForDocumentSuspension() returns true if
2573         RTCPeerConnection::hasPendingActivity() return false. Previously, hasPendingActivity()
2574         would return true unless the JS has called close() on the RTCPeerConnection
2575         object.
2576
2577         On weather.com, an ad would construct an RTCPeerConnection just to do some feature
2578         checking and then let the variable go out of scope (without calling close()). Because
2579         of the previous implementation of RTCPeerConnection::hasPendingActivity(), this wrapper
2580         and its implementation object would stay alive forever AND prevent the page from
2581         entering PageCache on navigation.
2582
2583         To improve this, the implementation of hadPendingActivity() has been updated so that
2584         it keeps returning false if close() has been called, but will also return false if
2585         there are no pending Promises to be resolved and no event listeners.
2586
2587         Test: fast/mediastream/RTCPeerConnection-page-cache.html
2588
2589         * Modules/mediastream/RTCPeerConnection.cpp:
2590         WebCore::RTCPeerConnection::RTCPeerConnection:
2591         Stop taking a pending activity in the constructor, this would be NOT keep the wrapper
2592         alive since RTCPeerConnection::hasPendingActivity() was not checking
2593         ActiveDOMObject::hasPendingActivity().
2594
2595         (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension const):
2596         (WebCore::RTCPeerConnection::hasPendingActivity const):
2597         
2598         * Modules/mediastream/RTCPeerConnection.h:
2599
2600         * bindings/js/JSDOMPromiseDeferred.h:
2601         (WebCore::DOMPromiseDeferredBase::whenSettled):
2602
2603 2019-09-25  Chris Dumez  <cdumez@apple.com>
2604
2605         Improve Service worker support for Page Caching
2606         https://bugs.webkit.org/show_bug.cgi?id=202221
2607
2608         Reviewed by Geoffrey Garen.
2609
2610         Allow pages using service workers to enter the back / forward cache.
2611         Update ServiceWorkerRegistration / ServiceWorker ActiveDOMObjects
2612         to properly suspend while in PageCache. Also, let documents controlled
2613         by a service worker to enter PageCache (we already unregistered it as
2614         a client of the service worker while suspended).
2615
2616         Test: http/tests/workers/service/page-caching.html
2617
2618         * dom/Document.cpp:
2619         (WebCore::Document::suspend):
2620         (WebCore::Document::resume):
2621         * history/PageCache.cpp:
2622         (WebCore::canCacheFrame):
2623         * workers/service/ServiceWorker.cpp:
2624         (WebCore::ServiceWorker::updateState):
2625         (WebCore::ServiceWorker::canSuspendForDocumentSuspension const):
2626         (WebCore::ServiceWorker::suspend):
2627         (WebCore::ServiceWorker::resume):
2628         * workers/service/ServiceWorker.h:
2629         * workers/service/ServiceWorkerRegistration.cpp:
2630         (WebCore::ServiceWorkerRegistration::fireUpdateFoundEvent):
2631         (WebCore::ServiceWorkerRegistration::canSuspendForDocumentSuspension const):
2632         (WebCore::ServiceWorkerRegistration::suspend):
2633         (WebCore::ServiceWorkerRegistration::resume):
2634         * workers/service/ServiceWorkerRegistration.h:
2635
2636 2019-09-25  Chris Dumez  <cdumez@apple.com>
2637
2638         [Cocoa] Regression(r212041) Safari adds a .dms extension automatically when downloading binaries with no extension
2639         https://bugs.webkit.org/show_bug.cgi?id=202147
2640         <rdar://problem/54886021>
2641
2642         Reviewed by Alexey Proskuryakov.
2643
2644         When getting a suggested filename without extension (either from Content-Disposition header or from the download
2645         attribute), we determine a suitable file extension based on the Content-Type header and append it. This is useful
2646         since a lot of operating systems (such as macOS) rely on the file extension to determine file type.
2647
2648         The issue is that if the Content-Type is not provided or when it is provided but is "application/octet-stream",
2649         we would append a .dms extension, which was unexpected. This patch makes it so that we no longer try to append
2650         an extension when the resolved content type is "application/octet-stream".
2651
2652         Tests: http/tests/download/anchor-download-attribute-content-disposition-no-extension-octet-stream.html
2653                http/tests/download/anchor-download-attribute-content-disposition-no-extension-text-plain.html
2654                http/tests/security/anchor-download-octet-stream-no-extension.html
2655
2656         * platform/MIMETypeRegistry.cpp:
2657         (WebCore::MIMETypeRegistry::appendFileExtensionIfNecessary):
2658
2659 2019-09-25  Megan Gardner  <megan_gardner@apple.com>
2660
2661         Update selections after scrolling for iframes and hide selections while iframes and overflow scrolls are scrolling.
2662         https://bugs.webkit.org/show_bug.cgi?id=202125
2663
2664         Reviewed by Tim Horton.
2665
2666         Test: editing/selection/ios/update-selection-after-iframe-scroll.html
2667
2668         When we end scrolling, make sure that iframes get a final update to ensure that the 
2669         selection is in the correct position. Pipe that to WebKit/UIProcess via
2670         frame specific plath.
2671
2672         * loader/EmptyClients.cpp:
2673         * page/EditorClient.h:
2674         * page/scrolling/AsyncScrollingCoordinator.cpp:
2675         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
2676
2677 2019-09-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2678
2679         Page temporarily jumps to an excessively small viewport scale while loading usatoday.com
2680         https://bugs.webkit.org/show_bug.cgi?id=202224
2681         <rdar://problem/52906640>
2682
2683         Reviewed by Tim Horton.
2684
2685         On some pages (e.g. usatoday.com), the content width of the page temporarily becomes very large during page
2686         load. This causes a couple of viewport scaling behaviors (notably, the existing shrink-to-fit heuristic in
2687         ViewportConfiguration::initialScaleFromSize, as well as the new iPad-specific content-aware shrink-to-fit
2688         heuristic in WebPage::immediatelyShrinkToFitContent) to cause the page to shrink down excessively in an attempt
2689         to fit all the content to the viewport. This causes a very ugly flash as the page appears zoomed out initially
2690         during page load, before zooming back in.
2691
2692         To fix this, we add some sanity checks to these viewport scaling heuristics. In ViewportConfiguration's
2693         initialScaleFromSize method, in the codepath where an initial scale is not specified, we always scale to fit the
2694         contents of the page; instead, detect the case where the content width is enormous (with a threshold arbitrarily
2695         chosen to be 1920) and fall back to the scaling to fit the viewport's width, if such a width has been explicitly
2696         set. This ensures that we avoid excessive shrinking in the case where content is extremely wide, but also that
2697         we do scale the viewport down to fit all the content in the case where the content isn't extremely wide (e.g. on
2698         daringfireball.com).
2699
2700         See WebKit ChangeLog for more detail.
2701
2702         Test: fast/viewport/ios/shrink-to-fit-large-content-width.html
2703
2704         * page/ViewportConfiguration.cpp:
2705         (WebCore::ViewportConfiguration::initialScaleFromSize const):
2706
2707 2019-09-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2708
2709         [iPadOS] [DataActivation] Focus moves away after focusing input fields on www.att.com
2710         https://bugs.webkit.org/show_bug.cgi?id=202167
2711         <rdar://problem/55185021>
2712
2713         Reviewed by Tim Horton.
2714
2715         Adds a new site-specific quirk. See WebKit ChangeLog for more details.
2716
2717         * page/Quirks.cpp:
2718         (WebCore::Quirks::shouldUseLegacySelectPopoverDismissalBehaviorInDataActivation const):
2719         * page/Quirks.h:
2720         * platform/RuntimeApplicationChecks.h:
2721         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
2722         (WebCore::IOSApplication::isDataActivation):
2723
2724 2019-09-25  Jonathan Bedard  <jbedard@apple.com>
2725
2726         Unreviewed, rolling out r250324.
2727
2728         Broke many mac wk2 layout tests
2729
2730         Reverted changeset:
2731
2732         "Enable LayoutTests using ResourceLoadStatistics SQLite
2733         backend (195420)"
2734         https://bugs.webkit.org/show_bug.cgi?id=195420
2735         https://trac.webkit.org/changeset/250324
2736
2737 2019-09-25  Antti Koivisto  <antti@apple.com>
2738
2739         Rename LineLayoutInterface to LineLayoutTraversal
2740         https://bugs.webkit.org/show_bug.cgi?id=202202
2741
2742         Reviewed by Zalan Bujtas.
2743
2744         Use a bit more informative namespace name.
2745
2746         * Headers.cmake:
2747         * Sources.txt:
2748         * WebCore.xcodeproj/project.pbxproj:
2749         * dom/Position.cpp:
2750         (WebCore::Position::upstream const):
2751         (WebCore::Position::downstream const):
2752         * editing/TextIterator.cpp:
2753         (WebCore::TextIterator::handleTextNode):
2754         (WebCore::TextIterator::handleTextBox):
2755         (WebCore::TextIterator::handleTextNodeFirstLetter):
2756         * editing/TextIterator.h:
2757         * rendering/RenderTreeAsText.cpp:
2758         (WebCore::RenderTreeAsText::writeRenderObject):
2759         (WebCore::writeTextBox):
2760         (WebCore::write):
2761         * rendering/line/LineLayoutTraversal.cpp: Renamed from Source/WebCore/rendering/line/LineLayoutInterfaceTextBoxes.cpp.
2762         (WebCore::LineLayoutTraversal::TextBox::rect const):
2763         (WebCore::LineLayoutTraversal::TextBox::logicalRect const):
2764         (WebCore::LineLayoutTraversal::TextBox::hasHyphen const):
2765         (WebCore::LineLayoutTraversal::TextBox::isLeftToRightDirection const):
2766         (WebCore::LineLayoutTraversal::TextBox::dirOverride const):
2767         (WebCore::LineLayoutTraversal::TextBox::text const):
2768         (WebCore::LineLayoutTraversal::TextBox::localStartOffset const):
2769         (WebCore::LineLayoutTraversal::TextBox::localEndOffset const):
2770         (WebCore::LineLayoutTraversal::TextBox::length const):
2771         (WebCore::LineLayoutTraversal::TextBox::isLastOnLine const):
2772         (WebCore::LineLayoutTraversal::TextBox::isLast const):
2773         (WebCore::LineLayoutTraversal::TextBox::iterator const):
2774         (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
2775         (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInVisualOrder):
2776         (WebCore::LineLayoutTraversal::TextBoxIterator::ComplexPath::nextInlineTextBoxInTextOrder const):
2777         (WebCore::LineLayoutTraversal::TextBoxIterator::traverseNextInTextOrder):
2778         (WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
2779         (WebCore::LineLayoutTraversal::TextBoxIterator::atEnd const):
2780         (WebCore::LineLayoutTraversal::firstTextBoxInVisualOrderFor):
2781         (WebCore::LineLayoutTraversal::firstTextBoxInTextOrderFor):
2782         (WebCore::LineLayoutTraversal::textBoxRangeFor):
2783         * rendering/line/LineLayoutTraversal.h: Renamed from Source/WebCore/rendering/line/LineLayoutInterfaceTextBoxes.h.
2784         (WebCore::LineLayoutTraversal::TextBoxIterator::TextBoxIterator):
2785         (WebCore::LineLayoutTraversal::TextBoxIterator::operator++):
2786         (WebCore::LineLayoutTraversal::TextBoxIterator::operator bool const):
2787         (WebCore::LineLayoutTraversal::TextBoxIterator::operator!= const):
2788         (WebCore::LineLayoutTraversal::TextBoxIterator::operator== const):
2789         (WebCore::LineLayoutTraversal::TextBoxIterator::operator* const):
2790         (WebCore::LineLayoutTraversal::TextBoxIterator::operator-> const):
2791         (WebCore::LineLayoutTraversal::TextBoxRange::TextBoxRange):
2792         (WebCore::LineLayoutTraversal::TextBoxRange::begin const):
2793         (WebCore::LineLayoutTraversal::TextBoxRange::end const):
2794         (WebCore::LineLayoutTraversal::hasTextBoxes):
2795
2796 2019-09-25  Zalan Bujtas  <zalan@apple.com>
2797
2798         [LFC][IFC] Use existing Line::Content::LineBox to track the current line geometry
2799         https://bugs.webkit.org/show_bug.cgi?id=202182
2800
2801         Reviewed by Antti Koivisto.
2802
2803         This patch removes the redundant Line::m_logicalTopLeft, m_contentLogicalWidth, m_lineLogicalHeight, m_baseline, m_baselineTop members
2804         and switches over to Line::m_content's LineBox. 
2805
2806         * layout/displaytree/DisplayRect.h:
2807         (WebCore::Display::Rect::Rect):
2808         * layout/inlineformatting/InlineLine.cpp:
2809         (WebCore::Layout::Line::Line):
2810         (WebCore::Layout::Line::close):
2811         (WebCore::Layout::Line::removeTrailingTrimmableContent):
2812         (WebCore::Layout::Line::moveLogicalLeft):
2813         (WebCore::Layout::Line::appendNonBreakableSpace):
2814         (WebCore::Layout::Line::appendTextContent):
2815         (WebCore::Layout::Line::appendNonReplacedInlineBox):
2816         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2817         (WebCore::Layout::m_skipVerticalAligment): Deleted.
2818         * layout/inlineformatting/InlineLine.h:
2819         (WebCore::Layout::Line::Content::lineBox):
2820         (WebCore::Layout::Line::contentLogicalRight const):
2821         (WebCore::Layout::Line::logicalTop const):
2822         (WebCore::Layout::Line::logicalBottom const):
2823         (WebCore::Layout::Line::logicalLeft const):
2824         (WebCore::Layout::Line::logicalHeight const):
2825         (WebCore::Layout::Line::contentLogicalWidth const):
2826         (WebCore::Layout::Line::baselineOffset const):
2827         * layout/inlineformatting/InlineLineBox.h:
2828         (WebCore::Layout::LineBox::setLogicalTopLeft):
2829         (WebCore::Layout::LineBox::setLogicalHeight):
2830         (WebCore::Layout::LineBox::setLogicalWidth):
2831         (WebCore::Layout::LineBox::moveHorizontally):
2832         (WebCore::Layout::LineBox::expandHorizontally):
2833         (WebCore::Layout::LineBox::shrinkHorizontally):
2834         (WebCore::Layout::LineBox::expandVertically):
2835         (WebCore::Layout::LineBox::shrinkVertically):
2836         (WebCore::Layout::LineBox::LineBox):
2837         (WebCore::Layout::LineBox::setLogicalHeightIfGreater):
2838         (WebCore::Layout::LineBox::setBaseline):
2839         (WebCore::Layout::LineBox::baseline const):
2840         (WebCore::Layout::LineBox::baseline):
2841         (WebCore::Layout::LineBox::setBaselineOffset):
2842         (WebCore::Layout::LineBox::Baseline::setAscentIfGreater):
2843         (WebCore::Layout::LineBox::Baseline::setDescentIfGreater):
2844
2845 2019-09-25  Antti Koivisto  <antti@apple.com>
2846
2847         Rename InlineBox::nextLeafChild to nextLeafOnLine
2848         https://bugs.webkit.org/show_bug.cgi?id=202197
2849
2850         Reviewed by Zalan Bujtas.
2851
2852         The name is confusing as it never returns a child of the inline box it is called on.
2853         Rename it and other similar functions that traverse within a line.
2854
2855         * dom/Position.cpp:
2856         (WebCore::Position::getInlineBoxAndOffset const):
2857         * editing/RenderedPosition.cpp:
2858         (WebCore::RenderedPosition::RenderedPosition):
2859         (WebCore::RenderedPosition::previousLeafOnLine const):
2860         (WebCore::RenderedPosition::nextLeafOnLine const):
2861         (WebCore::RenderedPosition::isEquivalent const):
2862         (WebCore::RenderedPosition::bidiLevelOnLeft const):
2863         (WebCore::RenderedPosition::bidiLevelOnRight const):
2864         (WebCore::RenderedPosition::leftBoundaryOfBidiRun):
2865         (WebCore::RenderedPosition::rightBoundaryOfBidiRun):
2866         (WebCore::RenderedPosition::atLeftBoundaryOfBidiRun const):
2867         (WebCore::RenderedPosition::atRightBoundaryOfBidiRun const):
2868         (WebCore::RenderedPosition::positionAtLeftBoundaryOfBiDiRun const):
2869         (WebCore::RenderedPosition::positionAtRightBoundaryOfBiDiRun const):
2870         (WebCore::RenderedPosition::prevLeafChild const): Deleted.
2871         (WebCore::RenderedPosition::nextLeafChild const): Deleted.
2872         * editing/RenderedPosition.h:
2873         (WebCore::RenderedPosition::RenderedPosition):
2874         * editing/VisiblePosition.cpp:
2875         (WebCore::VisiblePosition::leftVisuallyDistinctCandidate const):
2876         (WebCore::VisiblePosition::rightVisuallyDistinctCandidate const):
2877         * editing/VisibleUnits.cpp:
2878         (WebCore::startPositionForLine):
2879         (WebCore::endPositionForLine):
2880         (WebCore::previousLinePosition):
2881         (WebCore::nextLinePosition):
2882         * layout/Verification.cpp:
2883         (WebCore::Layout::collectFlowBoxSubtree):
2884         * rendering/ComplexLineLayout.cpp:
2885         (WebCore::ComplexLineLayout::updateRubyForJustifiedText):
2886         (WebCore::expansionBehaviorForInlineTextBox):
2887         (WebCore::ComplexLineLayout::computeInlineDirectionPositionsForSegment):
2888         (WebCore::ComplexLineLayout::layoutRunsAndFloats):
2889         * rendering/InlineBox.cpp:
2890         (WebCore::InlineBox::previousOnLineExists const):
2891         (WebCore::InlineBox::nextLeafOnLine const):
2892         (WebCore::InlineBox::previousLeafOnLine const):
2893         (WebCore::InlineBox::nextLeafOnLineIgnoringLineBreak const):
2894         (WebCore::InlineBox::previousLeafOnLineIgnoringLineBreak const):
2895         (WebCore::InlineBox::nextLeafChild const): Deleted.
2896         (WebCore::InlineBox::prevLeafChild const): Deleted.
2897         (WebCore::InlineBox::nextLeafChildIgnoringLineBreak const): Deleted.
2898         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak const): Deleted.
2899         * rendering/InlineBox.h:
2900         (WebCore::InlineBox::nextOnLine const):
2901         (WebCore::InlineBox::previousOnLine const):
2902         (WebCore::InlineBox::setNextOnLine):
2903         (WebCore::InlineBox::setPreviousOnLine):
2904         (WebCore::InlineBox::InlineBox):
2905         (WebCore::InlineBox::prevOnLine const): Deleted.
2906         (WebCore::InlineBox::setPrevOnLine): Deleted.
2907         * rendering/InlineFlowBox.cpp:
2908         (WebCore::InlineFlowBox::addToLine):
2909         (WebCore::InlineFlowBox::removeChild):
2910         (WebCore::InlineFlowBox::nodeAtPoint):
2911         (WebCore::InlineFlowBox::firstLeafDescendant const):
2912         (WebCore::InlineFlowBox::lastLeafDescendant const):
2913         (WebCore::InlineFlowBox::placeEllipsisBox):
2914         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
2915         (WebCore::InlineFlowBox::checkConsistency const):
2916         (WebCore::InlineFlowBox::firstLeafChild const): Deleted.
2917         (WebCore::InlineFlowBox::lastLeafChild const): Deleted.
2918         * rendering/InlineFlowBox.h:
2919         * rendering/InlineTextBox.cpp:
2920         (WebCore::InlineTextBox::expansionBehavior const):
2921         * rendering/RenderBlockFlow.cpp:
2922         (WebCore::RenderBlockFlow::containsNonZeroBidiLevel const):
2923         (WebCore::RenderBlockFlow::positionForPointWithInlineChildren):
2924         * rendering/RenderCounter.cpp:
2925         (WebCore::RenderCounter::rendererRemovedFromTree):
2926         * rendering/RenderTextLineBoxes.cpp:
2927         (WebCore::lineDirectionPointFitsInBox):
2928         (WebCore::createVisiblePositionAfterAdjustingOffsetForBiDi):
2929         (WebCore::RenderTextLineBoxes::positionForPoint const):
2930         * rendering/RootInlineBox.cpp:
2931         (WebCore::RootInlineBox::isHyphenated const):
2932         (WebCore::RootInlineBox::lineSelectionGap):
2933         (WebCore::RootInlineBox::selectionState):
2934         (WebCore::RootInlineBox::firstSelectedBox):
2935         (WebCore::RootInlineBox::lastSelectedBox):
2936         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
2937         * rendering/svg/SVGRootInlineBox.cpp:
2938         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
2939         (WebCore::SVGRootInlineBox::nodeAtPoint):
2940
2941 2019-09-25  Zan Dobersek  <zdobersek@igalia.com>
2942
2943         [Nicosia] Add implementations for fixed, positioned, sticky ScrollingTreeNodes
2944         https://bugs.webkit.org/show_bug.cgi?id=202100
2945
2946         Reviewed by Carlos Garcia Campos.
2947
2948         Fill in the Nicosia implementations for the ScrollingTreeFixedNode,
2949         ScrollingTreePositionedNode and ScrollingTreeStickyNode classes.
2950
2951         The implementations in majority repeat what the Cocoa implementations
2952         do, with the main difference being the Nicosia-specific layer state
2953         application. Sharing more of this logic should be investigated in the
2954         future.
2955
2956         * PlatformPlayStation.cmake: Add ScrollingTreePositionedNode to build.
2957         * SourcesGTK.txt: Ditto.
2958         * SourcesWPE.txt: Ditto.
2959         * page/scrolling/nicosia/ScrollingTreeFixedNode.cpp:
2960         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
2961         (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
2962         (WebCore::ScrollingTreeFixedNode::dumpProperties const):
2963         * page/scrolling/nicosia/ScrollingTreeFixedNode.h:
2964         * page/scrolling/nicosia/ScrollingTreePositionedNode.cpp: Added.
2965         (WebCore::ScrollingTreePositionedNode::create):
2966         (WebCore::ScrollingTreePositionedNode::ScrollingTreePositionedNode):
2967         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
2968         (WebCore::ScrollingTreePositionedNode::applyLayerPositions):
2969         (WebCore::ScrollingTreePositionedNode::dumpProperties const):
2970         * page/scrolling/nicosia/ScrollingTreePositionedNode.h: Added.
2971         (WebCore::ScrollingTreePositionedNode::relatedOverflowScrollingNodes const):
2972         * page/scrolling/nicosia/ScrollingTreeStickyNode.cpp:
2973         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
2974         (WebCore::ScrollingTreeStickyNode::applyLayerPositions):
2975         (WebCore::ScrollingTreeStickyNode::dumpProperties const):
2976         (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
2977         * page/scrolling/nicosia/ScrollingTreeStickyNode.h:
2978
2979 2019-09-24  Antoine Quint  <graouts@apple.com>
2980
2981         [Web Animations] Removing an element should only cancel its declarative animations
2982         https://bugs.webkit.org/show_bug.cgi?id=202165
2983
2984         Reviewed by Dean Jackson.
2985
2986         When an element is removed, an Animation created using the JS API should not be canceled.
2987         Only declarative animations should be.
2988
2989         * animation/AnimationTimeline.cpp:
2990         (WebCore::AnimationTimeline::elementWasRemoved):
2991
2992 2019-09-24  Alex Christensen  <achristensen@webkit.org>
2993
2994         Remove SchemeRegistry's list of URL schemes allowing local storage in private browsing, which is unused
2995         https://bugs.webkit.org/show_bug.cgi?id=202181
2996
2997         Reviewed by Geoffrey Garen.
2998
2999         The last use of the WebView SPI to set it is being removed in rdar://problem/55685383
3000         but it already does not do anything.  Let's remove it.
3001
3002         * platform/SchemeRegistry.cpp:
3003         (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing): Deleted.
3004         (WebCore::SchemeRegistry::registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing): Deleted.
3005         (WebCore::SchemeRegistry::allowsLocalStorageAccessInPrivateBrowsing): Deleted.
3006         * platform/SchemeRegistry.h:
3007
3008 2019-09-24  Wenson Hsieh  <wenson_hsieh@apple.com>
3009
3010         Remove a content change observation quirk on united.com
3011         https://bugs.webkit.org/show_bug.cgi?id=202175
3012
3013         Reviewed by Tim Horton.
3014
3015         Remove a site-specific quirk that is no longer necessary.
3016
3017         * page/Quirks.cpp:
3018         (WebCore::Quirks::shouldIgnoreContentChange const): Deleted.
3019         * page/Quirks.h:
3020         * page/ios/ContentChangeObserver.cpp:
3021         (WebCore::ContentChangeObserver::shouldObserveVisibilityChangeForElement):
3022
3023 2019-09-24  Kate Cheney  <katherine_cheney@apple.com>
3024
3025         Enable LayoutTests using ResourceLoadStatistics SQLite backend (195420)
3026         https://bugs.webkit.org/show_bug.cgi?id=195420
3027         <rdar://problem/54213551> 
3028
3029         Reviewed by Brent Fulgham.
3030
3031         Tests: http/tests/resourceLoadStatistics/add-blocking-to-redirect-database.html
3032                http/tests/resourceLoadStatistics/blocking-in-web-worker-script-import-database.html
3033                http/tests/resourceLoadStatistics/cap-cache-max-age-for-prevalent-resource-database.html
3034                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-database.html
3035                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-decoration-same-site-database.html
3036                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-fragment-from-prevalent-resource-database.html
3037                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-and-fragment-from-prevalent-resource-database.html
3038                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-with-link-query-from-prevalent-resource-database.html
3039                http/tests/resourceLoadStatistics/capped-lifetime-for-cookie-set-in-js-without-link-decoration-from-prevalent-resource-database.html
3040                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-mixed-statistics-database.html
3041                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
3042                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-under-top-frame-origins-database.html
3043                http/tests/resourceLoadStatistics/classify-as-non-prevalent-based-on-subresource-unique-redirects-to-database.html
3044                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-mixed-statistics-database.html
3045                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-sub-frame-under-top-frame-origins-database.html
3046                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-collusion-database.html
3047                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-redirect-to-prevalent-database.html
3048                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-under-top-frame-origins-database.html
3049                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-subresource-unique-redirects-to-database.html
3050                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-collusion-database.html
3051                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-redirect-to-prevalent-database.html
3052                http/tests/resourceLoadStatistics/classify-as-prevalent-based-on-top-frame-unique-redirects-to-database.html
3053                http/tests/resourceLoadStatistics/classify-as-very-prevalent-based-on-mixed-statistics-database.html
3054                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-database.html
3055                http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour-database.html
3056                http/tests/resourceLoadStatistics/cookie-deletion-database.html
3057                http/tests/resourceLoadStatistics/cookies-with-and-without-user-interaction-database.html
3058                http/tests/resourceLoadStatistics/delete-script-accessible-cookies-database.html
3059                http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect-database.html
3060                http/tests/resourceLoadStatistics/do-not-capture-statistics-for-simple-top-navigations-database.html
3061                http/tests/resourceLoadStatistics/do-not-remove-blocking-in-redirect-database.html
3062                http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction-database.html
3063                http/tests/resourceLoadStatistics/downgraded-referrer-for-navigation-with-link-query-from-prevalent-resource-database.html
3064                http/tests/resourceLoadStatistics/enable-debug-mode-database.html
3065                http/tests/resourceLoadStatistics/grandfathering-database.html
3066                http/tests/resourceLoadStatistics/non-prevalent-resource-with-user-interaction-database.html
3067                http/tests/resourceLoadStatistics/non-prevalent-resource-without-user-interaction-database.html
3068                http/tests/resourceLoadStatistics/non-prevalent-resources-can-access-cookies-in-a-third-party-context-database.html
3069                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
3070                http/tests/resourceLoadStatistics/non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
3071                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
3072                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
3073                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
3074                http/tests/resourceLoadStatistics/non-sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
3075                http/tests/resourceLoadStatistics/ping-to-prevalent-resource-database.html
3076                http/tests/resourceLoadStatistics/prevalent-resource-handled-keydown-database.html
3077                http/tests/resourceLoadStatistics/prevalent-resource-unhandled-keydown-database.html
3078                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-database.html
3079                http/tests/resourceLoadStatistics/prevalent-resource-with-user-interaction-timeout-database.html
3080                http/tests/resourceLoadStatistics/prevalent-resource-without-user-interaction-database.html
3081                http/tests/resourceLoadStatistics/prune-statistics-database.html
3082                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
3083                http/tests/resourceLoadStatistics/sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
3084                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
3085                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-non-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
3086                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-ip-to-localhost-to-ip-database.html
3087                http/tests/resourceLoadStatistics/sandboxed-nesting-iframe-with-sandboxed-iframe-redirect-localhost-to-ip-to-localhost-database.html
3088                http/tests/resourceLoadStatistics/set-custom-prevalent-resource-in-debug-mode-database.html
3089                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-redirects-database.html
3090                http/tests/resourceLoadStatistics/strip-referrer-to-origin-for-prevalent-subresource-requests-database.html
3091                http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction-database.html
3092                http/tests/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame-database.html
3093                http/tests/resourceLoadStatistics/user-interaction-only-reported-once-within-short-period-of-time-database.html
3094                http/tests/resourceLoadStatistics/user-interaction-reported-after-website-data-removal-database.html
3095
3096         * platform/sql/SQLiteDatabase.h:
3097         Added WEBCORE_EXPORT prefix to 2 functions needed in the ITP Database 
3098         to clear out the database.
3099
3100 2019-09-24  Chris Dumez  <cdumez@apple.com>
3101
3102         Stop sampling PageCache-related AggD data
3103         https://bugs.webkit.org/show_bug.cgi?id=202161
3104
3105         Reviewed by Geoffrey Garen.
3106
3107         Stop sampling PageCache-related AggD data to make it more actionable.
3108
3109         * history/PageCache.cpp:
3110         (WebCore::logPageCacheFailureDiagnosticMessage):
3111         (WebCore::canCacheFrame):
3112         (WebCore::canCachePage):
3113
3114 2019-09-24  Sihui Liu  <sihui_liu@apple.com>
3115
3116         Stop refing UniqueIDBDatabaseTransaction in callbacks
3117         https://bugs.webkit.org/show_bug.cgi?id=202074
3118
3119         Reviewed by Youenn Fablet.
3120
3121         After quota check is introduced to IDB, callbacks that take the ref of UniqueIDBDatabaseTransaction will be 
3122         passed to StorageQuotaManager. This can make UniqueIDBDatabaseTransaction live longer than UniqueIDBDatabase.
3123
3124         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3125         (WebCore::IDBServer::UniqueIDBDatabase::requestSpace):
3126         (WebCore::IDBServer::UniqueIDBDatabase::waitForRequestSpaceCompletion):
3127         (WebCore::IDBServer::UniqueIDBDatabase::createObjectStore):
3128         (WebCore::IDBServer::UniqueIDBDatabase::deleteObjectStore):
3129         (WebCore::IDBServer::UniqueIDBDatabase::renameObjectStore):
3130         (WebCore::IDBServer::UniqueIDBDatabase::clearObjectStore):
3131         (WebCore::IDBServer::UniqueIDBDatabase::createIndex):
3132         (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
3133         (WebCore::IDBServer::UniqueIDBDatabase::renameIndex):
3134         (WebCore::IDBServer::UniqueIDBDatabase::putOrAdd):
3135         (WebCore::IDBServer::UniqueIDBDatabase::getRecord):
3136         (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
3137         (WebCore::IDBServer::UniqueIDBDatabase::getCount):
3138         (WebCore::IDBServer::UniqueIDBDatabase::deleteRecord):
3139         (WebCore::IDBServer::UniqueIDBDatabase::openCursor):
3140         (WebCore::IDBServer::UniqueIDBDatabase::iterateCursor):
3141         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
3142         (WebCore::IDBServer::UniqueIDBDatabase::abortTransaction):
3143         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3144         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3145         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abort):
3146         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::commit):
3147         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createObjectStore):
3148         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteObjectStore):
3149         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameObjectStore):
3150         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::clearObjectStore):
3151         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::createIndex):
3152         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteIndex):
3153         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::renameIndex):
3154         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::putOrAdd):
3155         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getRecord):
3156         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
3157         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getCount):
3158         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::deleteRecord):
3159         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::openCursor):
3160         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
3161
3162 2019-09-24  Keith Rollin  <krollin@apple.com>
3163
3164         Coalesce or remove PLATFORM(MAC) || PLATFORM(IOS_FAMILY)
3165         https://bugs.webkit.org/show_bug.cgi?id=202119
3166         <rdar://problem/55638792>
3167
3168         Reviewed by Alex Christensen.
3169
3170         After refactoring and other code evolution, some platform checks have
3171         ended up looking like PLATFORM(MAC) || PLATFORM(IOS_FAMILY) (or
3172         vice-versa). These can be converted into the equivalent
3173         PLATFORM(COCOA). Where the instance occurs in a Cocoa-only file, the
3174         check can be removed altogether (along with any "#else" branches).
3175
3176         No new tests -- no new or changed functionality.
3177
3178         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
3179         (WebCore::subLocality):
3180         (WebCore::setSubLocality):
3181         (WebCore::subAdministrativeArea):
3182         (WebCore::setSubAdministrativeArea):
3183         * css/parser/CSSPropertyParser.cpp:
3184         (WebCore::isAppleLegacyCssValueKeyword):
3185         * html/HTMLMediaElement.cpp:
3186         (WebCore::HTMLMediaElement::mediaSessionTitle const):
3187         * inspector/InspectorFrontendHost.cpp:
3188         (WebCore::InspectorFrontendHost::platform):
3189         * page/FrameView.cpp:
3190         (WebCore::FrameView::updateBackgroundRecursively):
3191         * platform/Timer.cpp:
3192         * platform/cocoa/NetworkExtensionContentFilter.mm:
3193         (WebCore::NetworkExtensionContentFilter::initialize):
3194         * platform/graphics/cg/GraphicsContextCG.cpp:
3195         (WebCore::displayP3ColorSpaceRef):
3196         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3197         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
3198         * rendering/RenderLayerCompositor.cpp:
3199         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame const):
3200
3201 2019-09-24  Antoine Quint  <graouts@apple.com>
3202
3203         [Web Animations] Unflake web-animations/timing-model/animations/updating-the-finished-state.html WPT test
3204         https://bugs.webkit.org/show_bug.cgi?id=181121
3205
3206         Reviewed by Dean Jackson.
3207
3208         When running the "update animations and send events" steps (https://drafts.csswg.org/web-animations/#update-animations-and-send-events)
3209         we assemble a list of animations to remove after updating their relevance based on the new timeline current time. However, we wouldn't
3210         account for the fact that we would *then* dispatch events which could update the timing properties of animations that had been marked
3211         for removal at this point.
3212
3213         In this specific WPT test, there were two individual tests that would rewind animations within a "finish" event handler and we would
3214         not consider the fact that they had been rewound. We now check a second time before removing an animation that it should indeed be
3215         removed.
3216
3217         * animation/DocumentTimeline.cpp:
3218         (WebCore::DocumentTimeline::internalUpdateAnimationsAndSendEvents):
3219
3220 2019-09-24  Kate Cheney  <katherine_cheney@apple.com>
3221
3222         Mixed content blocking is bypassed for WebSockets in Workers (159726)
3223         https://bugs.webkit.org/show_bug.cgi?id=159726
3224         <rdar://problem/27326438>
3225
3226         Reviewed by Brady Eidson.
3227
3228         Tests: http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https-with-embedded-http.html
3229                http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-http-with-embedded-https.html
3230                http/tests/websocket/tests/hybi/non-document-mixed-content-blocked-https-with-embedded-http-with-embedded-https.https.html
3231                http/tests/websocket/tests/hybi/non-document-mixed-content-blocked.https.html
3232         
3233         * Modules/websockets/WebSocket.cpp:
3234         (WebCore::WebSocket::connect):
3235         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3236         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
3237         * loader/MixedContentChecker.cpp:
3238         (WebCore::MixedContentChecker::checkForMixedContentInFrameTree):
3239         * loader/MixedContentChecker.h:
3240         Patch to block insecure WebSocket URL connection attempts by Workers
3241         on secure pages. If the URL is ws, and any embedding iframe has protocol
3242         https, and the context is a Worker, the connection should be blocked.
3243
3244         I was unable to write a test case to hit the case where a document
3245         does not have a frame and tries to communicate via a worker to
3246         connect to a WebSocket because after removing the subframe from its
3247         parent, the subframe is unable to perform a postMessage to a worker
3248         even in the same script execution to tell the worker to connect
3249         to a WebSocket.
3250
3251 2019-09-24  Zalan Bujtas  <zalan@apple.com>
3252
3253         [LFC][IFC] Line::Content should use LineBox
3254         https://bugs.webkit.org/show_bug.cgi?id=202128
3255         <rdar://problem/55649079>
3256
3257         Reviewed by Antti Koivisto.
3258
3259         Replace Line::Content's m_logicalRect, m_baseline and m_baselineOffset with LineBox.
3260
3261         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3262         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
3263         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
3264         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
3265         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
3266         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
3267         (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints const):
3268         * layout/inlineformatting/InlineLine.cpp:
3269         (WebCore::Layout::Line::close):
3270         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
3271         * layout/inlineformatting/InlineLine.h:
3272         (WebCore::Layout::Line::Content::lineBox const):
3273         (WebCore::Layout::Line::Content::setLineBox):
3274         (WebCore::Layout::Line::baselineOffset const):
3275         (WebCore::Layout::Line::Content::isEmpty const): Deleted.
3276         (WebCore::Layout::Line::Content::logicalTop const): Deleted.
3277         (WebCore::Layout::Line::Content::logicalLeft const): Deleted.
3278         (WebCore::Layout::Line::Content::logicalRight const): Deleted.
3279         (WebCore::Layout::Line::Content::logicalBottom const): Deleted.
3280         (WebCore::Layout::Line::Content::logicalWidth const): Deleted.
3281         (WebCore::Layout::Line::Content::logicalHeight const): Deleted.
3282         (WebCore::Layout::Line::Content::baseline const): Deleted.
3283         (WebCore::Layout::Line::Content::baselineOffset const): Deleted.
3284         (WebCore::Layout::Line::Content::setLogicalRect): Deleted.
3285         (WebCore::Layout::Line::Content::setBaseline): Deleted.
3286         (WebCore::Layout::Line::Content::setBaselineOffset): Deleted.
3287         * layout/inlineformatting/InlineLineBox.h:
3288         (WebCore::Layout::LineBox::Baseline::height const):
3289         (WebCore::Layout::LineBox::LineBox):
3290         (WebCore::Layout::LineBox::baselineOffset const):
3291         (WebCore::Layout::LineBox::Baseline::Baseline):
3292         (WebCore::Layout::LineBox::Baseline::setAscent):
3293         (WebCore::Layout::LineBox::Baseline::setDescent):
3294         (WebCore::Layout::LineBox::Baseline::reset):
3295         (WebCore::Layout::LineBox::Baseline::ascent const):
3296         (WebCore::Layout::LineBox::Baseline::descent const):
3297
3298 2019-09-24  Zalan Bujtas  <zalan@apple.com>
3299
3300         [LFC][IFC] Move line constraints computation to a dedicated function
3301         https://bugs.webkit.org/show_bug.cgi?id=202121
3302         <rdar://problem/55640742>
3303
3304         Reviewed by Antti Koivisto.
3305
3306         * layout/inlineformatting/InlineFormattingContext.h:
3307         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3308         (WebCore::Layout::LineLayout::LineLayout):
3309         (WebCore::Layout::LineLayout::close):
3310         (WebCore::Layout::LineLayout::placeInlineItem):
3311         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
3312         (WebCore::Layout::InlineFormattingContext::InlineLayout::initialConstraintsForLine):
3313         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
3314         * layout/inlineformatting/InlineLine.h:
3315
3316 2019-09-24  Youenn Fablet  <youenn@apple.com>
3317
3318         AudioTrackPrivateMediaStreamCocoa does not need to manipulate the audio unit in play/pause methods
3319         https://bugs.webkit.org/show_bug.cgi?id=202097
3320         <rdar://problem/51548144>
3321
3322         Reviewed by Eric Carlson.
3323
3324         Instead of manipulating the audio unit in play/pause methods, it is more convenient to do so in audioSamplesAvailable.
3325         play/pause methods only update boolean values that audioSamplesAvailable will read.
3326         In particular, m_autoPlay and m_isPlaying are no longer modified in the audio thread.
3327
3328         Behavior was racy so difficult to reproduce.
3329
3330         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
3331         (WebCore::AudioTrackPrivateMediaStreamCocoa::playInternal):
3332         (WebCore::AudioTrackPrivateMediaStreamCocoa::pause):
3333         (WebCore::AudioTrackPrivateMediaStreamCocoa::audioSamplesAvailable):
3334         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
3335
3336 2019-09-23  Youenn Fablet  <youenn@apple.com>
3337
3338         Support sync-xhr feature policy
3339         https://bugs.webkit.org/show_bug.cgi?id=202098
3340
3341         Reviewed by Alex Christensen.
3342
3343         Add support for sync-xhr feature policy parsing.
3344         Use this feature policy to control use of sync XHR in documents
3345         as per https://xhr.spec.whatwg.org/#the-send()-method step 12.
3346
3347         Covered by updated test.
3348
3349         * html/FeaturePolicy.cpp:
3350         (WebCore::FeaturePolicy::parse):
3351         (WebCore::FeaturePolicy::allows const):
3352         * html/FeaturePolicy.h:
3353         * xml/XMLHttpRequest.cpp:
3354         (WebCore::isSyncXHRAllowedByFeaturePolicy):
3355         (WebCore::XMLHttpRequest::createRequest):
3356
3357 2019-09-23  Chris Dumez  <cdumez@apple.com>
3358
3359         Drop unnecessary SessionID.h header includes
3360         https://bugs.webkit.org/show_bug.cgi?id=202129
3361
3362         Reviewed by Alex Christensen.
3363
3364         * Modules/fetch/FetchBodyConsumer.h:
3365         * Modules/indexeddb/IDBDatabaseIdentifier.h:
3366         * bindings/js/SerializedScriptValue.h:
3367         * dom/DataTransfer.h:
3368         * editing/WebCorePasteboardFileReader.h:
3369         * fileapi/FileReaderLoader.h:
3370         * fileapi/ThreadableBlobRegistry.h:
3371         * html/FileListCreator.h:
3372         * loader/CookieJar.h:
3373         * loader/EmptyFrameLoaderClient.h:
3374         * loader/FrameLoaderClient.h:
3375         * loader/LoaderStrategy.h:
3376         * page/CacheStorageProvider.h:
3377         * page/Frame.h:
3378         * page/PageGroup.h:
3379         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
3380         * platform/network/CacheValidation.h:
3381         * platform/network/FormData.h:
3382         * platform/network/NetworkStorageSession.cpp:
3383         * platform/network/StorageSessionProvider.h:
3384         * workers/WorkerGlobalScopeProxy.h:
3385         * workers/service/ServiceWorkerContainer.h:
3386         * workers/service/ServiceWorkerProvider.h:
3387         * workers/service/server/RegistrationDatabase.h:
3388         * workers/service/server/SWServer.h:
3389         * workers/service/server/SWServerToContextConnection.h:
3390         * worklets/WorkletGlobalScope.h:
3391
3392 2019-09-23  Alex Christensen  <achristensen@webkit.org>
3393
3394         Fix WPT test html/browsers/offline/application-cache-api/api_swapcache_error.https.html
3395         https://bugs.webkit.org/show_bug.cgi?id=202056
3396         <rdar://problem/55523986>
3397
3398         Reviewed by Youenn Fablet.
3399
3400         The test makes sure we throw an exception when we are in an invalid state, which we should definitely do.
3401
3402         * loader/appcache/ApplicationCache.cpp:
3403         (WebCore::ApplicationCache::setGroup):
3404         (WebCore::ApplicationCache::setManifestResource):
3405         * loader/appcache/ApplicationCache.h:
3406         (WebCore::ApplicationCache::manifestResource const):
3407         (WebCore::ApplicationCache::group const):
3408         * loader/appcache/ApplicationCacheGroup.h:
3409         * loader/appcache/ApplicationCacheHost.cpp:
3410         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup const):
3411         (WebCore::ApplicationCacheHost::failedLoadingMainResource):
3412         (WebCore::ApplicationCacheHost::setCandidateApplicationCacheGroup):
3413         (WebCore::ApplicationCacheHost::swapCache):
3414         * loader/appcache/ApplicationCacheHost.h:
3415         (WebCore::ApplicationCacheHost::candidateApplicationCacheGroup const): Deleted.
3416         * loader/appcache/ApplicationCacheResource.h:
3417
3418 2019-09-23  Chris Dumez  <cdumez@apple.com>
3419
3420         PlugInClient::didStartFromOrigin() does not need a sessionID
3421         https://bugs.webkit.org/show_bug.cgi?id=202127
3422
3423         Reviewed by Geoffrey Garen.
3424
3425         * html/HTMLPlugInImageElement.cpp:
3426         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
3427         * page/PlugInClient.h:
3428
3429 2019-09-23  Devin Rousso  <drousso@apple.com>
3430
3431         Web Inspector: Canvas: show WebGPU shader pipelines
3432         https://bugs.webkit.org/show_bug.cgi?id=201675
3433         <rdar://problem/55543450>
3434
3435         Reviewed by Joseph Pecoraro.
3436
3437         Tests: inspector/canvas/requestShaderSource-webgpu.html
3438                inspector/canvas/shaderProgram-add-remove-webgpu.html
3439                inspector/canvas/updateShader-webgpu.html
3440
3441         Create common base classes for `WebGPUPipeline` and `GPUPipeline` so that Web Inspector can
3442         instrument both render and compute shader pipelines.
3443
3444         Refactor `InspectorShaderProgram` to support both `WebGLProgram` and `WebGPUPipeline` so
3445         that the same object can be used for all types of shader "program"s.
3446
3447         Keep a copy of each shader module's source, and allow the shader module to be updated.
3448
3449         * Modules/webgpu/WebGPUDevice.h:
3450         * Modules/webgpu/WebGPUDevice.cpp:
3451         (WebCore::WebGPUDevice::WebGPUDevice):
3452         (WebCore::WebGPUDevice::~WebGPUDevice):
3453         (WebCore::WebGPUDevice::createShaderModule const):
3454         (WebCore::WebGPUDevice::createRenderPipeline): Added.
3455         (WebCore::WebGPUDevice::createComputePipeline): Added.
3456         (WebCore::WebGPUDevice::createRenderPipeline const): Deleted.
3457         (WebCore::WebGPUDevice::createComputePipeline const): Deleted.
3458
3459         * Modules/webgpu/WebGPUPipeline.h: Added.
3460         (WebCore::WebGPUPipeline::isRenderPipeline const):
3461         (WebCore::WebGPUPipeline::isComputePipeline const):
3462         (WebCore::WebGPUPipeline::scriptExecutionContext const):
3463         * Modules/webgpu/WebGPUPipeline.cpp: Added.
3464         (WebCore::WebGPUPipeline::instancesMutex):
3465         (WebCore::WebGPUPipeline::WebGPUPipeline):
3466         (WebCore::WebGPUPipeline::~WebGPUPipeline):
3467         * platform/graphics/gpu/GPUPipeline.cpp: Added.
3468         * platform/graphics/gpu/GPUPipeline.h: Added.
3469         (WebCore::GPUPipeline::isRenderPipeline const):
3470         (WebCore::GPUPipeline::isComputePipeline const):
3471
3472         * Modules/webgpu/WebGPUComputePipeline.idl:
3473         * Modules/webgpu/WebGPUComputePipeline.h:
3474         (WebCore::WebGPUComputePipeline::computePipeline const): Deleted.
3475         * Modules/webgpu/WebGPUComputePipeline.cpp:
3476         (WebCore::WebGPUComputePipeline::create):
3477         (WebCore::WebGPUComputePipeline::WebGPUComputePipeline):
3478         (WebCore::WebGPUComputePipeline::recompile): Added.
3479         * platform/graphics/gpu/GPUComputePipeline.h:
3480         (WebCore::GPUComputePipeline::isComputePipeline): Added.
3481         * platform/graphics/gpu/cocoa/GPUComputePipelineMetal.mm:
3482         (WebCore::GPUComputePipeline::tryCreate):
3483         (WebCore::GPUComputePipeline::GPUComputePipeline):
3484         (WebCore::GPUComputePipeline::recompile): Added.
3485
3486         * Modules/webgpu/WebGPURenderPipeline.idl:
3487         * Modules/webgpu/WebGPURenderPipeline.h:
3488         (WebCore::WebGPURenderPipeline::renderPipeline const): Deleted.
3489         * Modules/webgpu/WebGPURenderPipeline.cpp:
3490         (WebCore::WebGPURenderPipeline::create):
3491         (WebCore::WebGPURenderPipeline::WebGPURenderPipeline):
3492         (WebCore::WebGPURenderPipeline::recompile): Added.
3493         * platform/graphics/gpu/GPURenderPipeline.h:
3494         (WebCore::GPURenderPipeline::isRenderPipeline): Added.
3495         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
3496         (WebCore::tryCreateMtlRenderPipelineState):
3497         (WebCore::GPURenderPipeline::tryCreate):
3498         (WebCore::GPURenderPipeline::GPURenderPipeline):
3499         (WebCore::GPURenderPipeline::recompile): Added.
3500
3501         * Modules/webgpu/WebGPUShaderModule.h:
3502         (WebCore::WebGPUShaderModule::source const): Added.
3503         * Modules/webgpu/WebGPUShaderModule.cpp:
3504         (WebCore::WebGPUShaderModule::update): Added.
3505         * Modules/webgpu/WebGPUProgrammableStageDescriptor.h:
3506         * platform/graphics/gpu/GPUProgrammableStageDescriptor.h:
3507         (WebCore::GPUProgrammableStageDescriptor::GPUProgrammableStageDescriptor):
3508
3509         * inspector/InspectorShaderProgram.h:
3510         * inspector/InspectorShaderProgram.cpp:
3511         (WebCore::InspectorShaderProgram::create):
3512         (WebCore::InspectorShaderProgram::InspectorShaderProgram):
3513         (WebCore::InspectorShaderProgram::program const): Added.
3514         (WebCore::InspectorShaderProgram::pipeline const): Added.
3515         (WebCore::shaderForType): Added.
3516         (WebCore::InspectorShaderProgram::requestShaderSource): Added.
3517         (WebCore::InspectorShaderProgram::updateShader): Added.
3518         (WebCore::InspectorShaderProgram::context const): Deleted.
3519         (WebCore::InspectorShaderProgram::shaderForType): Deleted.
3520
3521         * inspector/agents/InspectorCanvasAgent.h:
3522         * inspector/agents/InspectorCanvasAgent.cpp:
3523         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3524         (WebCore::InspectorCanvasAgent::discardAgent):
3525         (WebCore::InspectorCanvasAgent::enable):
3526         (WebCore::InspectorCanvasAgent::disable):
3527         (WebCore::InspectorCanvasAgent::requestShaderSource):
3528         (WebCore::InspectorCanvasAgent::updateShader):
3529         (WebCore::InspectorCanvasAgent::setShaderProgramDisabled):
3530         (WebCore::InspectorCanvasAgent::setShaderProgramHighlighted):
3531         (WebCore::InspectorCanvasAgent::frameNavigated):
3532         (WebCore::InspectorCanvasAgent::didCreateWebGLProgram): Added.
3533         (WebCore::InspectorCanvasAgent::willDestroyWebGLProgram): Added.
3534         (WebCore::InspectorCanvasAgent::isWebGLProgramDisabled): Added.
3535         (WebCore::InspectorCanvasAgent::isWebGLProgramHighlighted): Added.
3536         (WebCore::InspectorCanvasAgent::didCreateWebGPUPipeline): Added.
3537         (WebCore::InspectorCanvasAgent::willDestroyWebGPUPipeline): Added.
3538         (WebCore::InspectorCanvasAgent::programDestroyedTimerFired): Added.
3539         (WebCore::InspectorCanvasAgent::reset): Added.
3540         (WebCore::InspectorCanvasAgent::unbindProgram):
3541         (WebCore::InspectorCanvasAgent::findInspectorProgram):
3542         (WebCore::InspectorCanvasAgent::didCreateProgram): Deleted.
3543         (WebCore::InspectorCanvasAgent::willDeleteProgram): Deleted.
3544         (WebCore::InspectorCanvasAgent::isShaderProgramDisabled): Deleted.
3545         (WebCore::InspectorCanvasAgent::isShaderProgramHighlighted): Deleted.
3546         (WebCore::InspectorCanvasAgent::clearCanvasData): Deleted.
3547         * inspector/InspectorInstrumentation.h:
3548         (WebCore::InspectorInstrumentation::didCreateWebGLProgram): Added.
3549         (WebCore::InspectorInstrumentation::willDestroyWebGLProgram): Added.
3550         (WebCore::InspectorInstrumentation::isWebGLProgramDisabled): Added.
3551         (WebCore::InspectorInstrumentation::isWebGLProgramHighlighted): Added.
3552         (WebCore::InspectorInstrumentation::didCreateWebGPUPipeline): Added.
3553         (WebCore::InspectorInstrumentation::willDestroyWebGPUPipeline): Added.
3554         (WebCore::InspectorInstrumentation::didCreateProgram): Deleted.
3555         (WebCore::InspectorInstrumentation::willDeleteProgram): Deleted.
3556         (WebCore::InspectorInstrumentation::isShaderProgramDisabled): Deleted.
3557         (WebCore::InspectorInstrumentation::isShaderProgramHighlighted): Deleted.
3558         * inspector/InspectorInstrumentation.cpp:
3559         (WebCore::InspectorInstrumentation::didCreateWebGLProgramImpl): Added.
3560         (WebCore::InspectorInstrumentation::willDestroyWebGLProgramImpl): Added.
3561         (WebCore::InspectorInstrumentation::isWebGLProgramDisabledImpl): Added.
3562         (WebCore::InspectorInstrumentation::isWebGLProgramHighlightedImpl): Added.
3563         (WebCore::InspectorInstrumentation::didCreateWebGPUPipelineImpl): Added.
3564         (WebCore::InspectorInstrumentation::willDestroyWebGPUPipelineImpl): Added.
3565         (WebCore::InspectorInstrumentation::didCreateProgramImpl): Deleted.
3566         (WebCore::InspectorInstrumentation::willDeleteProgramImpl): Deleted.
3567         (WebCore::InspectorInstrumentation::isShaderProgramDisabledImpl): Deleted.
3568         (WebCore::InspectorInstrumentation::isShaderProgramHighlightedImpl): Deleted.
3569
3570         * html/canvas/WebGLProgram.h:
3571         * html/canvas/WebGLProgram.cpp:
3572         (WebCore::WebGLProgram::WebGLProgram):
3573         (WebCore::WebGLProgram::~WebGLProgram):
3574         * html/canvas/WebGLRenderingContextBase.cpp:
3575         (WebCore::InspectorScopedShaderProgramHighlight::showHightlight):
3576         (WebCore::WebGLRenderingContextBase::createProgram):
3577         (WebCore::WebGLRenderingContextBase::deleteProgram):
3578         (WebCore::WebGLRenderingContextBase::drawArrays):
3579         (WebCore::WebGLRenderingContextBase::drawElements):
3580         Rename WebGL program instrumentation points to be less ambiguous.
3581
3582         * Sources.txt:
3583         * WebCore.xcodeproj/project.pbxproj:
3584
3585 2019-09-23  Wenson Hsieh  <wenson_hsieh@apple.com>
3586
3587         [iOS] Drop animation when dragging images from Photos to WebKit2 Mail compose is incorrect
3588         https://bugs.webkit.org/show_bug.cgi?id=201674
3589         <rdar://problem/51250952>
3590
3591         Reviewed by Tim Horton.
3592
3593         Adds new helper methods on DragController to support the new image placeholder drop codepath. See WebKit
3594         ChangeLog for more details.
3595
3596         Tests:  WKAttachmentTestsIOS.TargetedPreviewsWhenDroppingImages
3597                 WKAttachmentTestsIOS.TargetedPreviewIsClippedWhenDroppingTallImage
3598
3599         * editing/WebContentReader.h:
3600
3601         Fix the Windows build after including WebContentReader.h in DragController.cpp.
3602
3603         * html/HTMLImageElement.h:
3604         (WebCore::HTMLImageElement::isDroppedImagePlaceholder const):
3605         (WebCore::HTMLImageElement::setIsDroppedImagePlaceholder):
3606
3607         Add a flag to HTMLImageElement, indicating whether it is a dropped image placeholder. If so, we have special
3608         logic to remove some temporary inline style properties from the image after it has finished loading (see
3609         finalizeDroppedImagePlaceholder).
3610
3611         Note that this doesn't increase the size of HTMLImageElement.
3612
3613         * page/DragController.cpp:
3614         (WebCore::DragController::dragEnded):
3615
3616         Clean up any stale placeholders after the drag ends.
3617
3618         (WebCore::DragController::performDragOperation):
3619         (WebCore::DragController::removeAllDroppedImagePlaceholders):
3620
3621         Add a private helper to clean up any dropped image placeholders after failing to update dropped image
3622         placeholders for any reason.
3623
3624         (WebCore::DragController::tryToUpdateDroppedImagePlaceholders):
3625
3626         Invoked when performing the drag operation, after image data has been loaded; this function attempts to update
3627         the list of image placeholder elements tracked by DragController that were previously inserted using
3628         insertDroppedImagePlaceholdersAtCaret, and updates the source attribute of each element (as well as any backed
3629         attachment element, if attachment elements are enabled). It achieves this by reading the dropped data as web
3630         content, and matching up the images in the resulting fragment against the placeholder images. If each image in
3631         the fragment can correspond to exactly one placeholder, we update the source of each placeholder image,
3632         migrate attachment elements over to the placeholder images if needed, and finally discard the fragment.
3633
3634         A return value of false indicates that this process failed, in which case we clean up the placeholders and fall
3635         back to handling the drop normally.
3636
3637         (WebCore::DragController::insertDroppedImagePlaceholdersAtCaret):
3638
3639         Invoked when handling the drop, before any image data has been loaded; this function takes a list of sizes
3640         representing the preferred presentation sizes of each item provider that will be loaded as an image, and uses
3641         ReplaceSelectionCommand to insert a list of (initially blank) placeholder images at the drop caret, sized
3642         accordingly to each item provider's preferredPresentationSize.
3643
3644         To make this compatible with Mail compose (and all other known internal clients that use the _editable SPI), we
3645         additionally enforce a max-width of 100% on each image and preserve the aspect ratio of the image by adjusting
3646         the height if needed.
3647
3648         (WebCore::DragController::finalizeDroppedImagePlaceholder):
3649         * page/DragController.h:
3650
3651         Have DragController keep track of the list of dropped image placeholders (in DOM order), as well as the dropped
3652         image placeholder range. This information is used once item provider data arrives and the drag operation is
3653         being performed, to update the source of each dropped image placeholder.
3654
3655         (WebCore::DragController::droppedImagePlaceholders const):
3656         (WebCore::DragController::droppedImagePlaceholderRange const):
3657         * platform/network/mac/UTIUtilities.h:
3658
3659         Mark an existing helper function as WEBCORE_EXPORT.
3660
3661 2019-09-23  Daniel Bates  <dabates@apple.com>
3662
3663         Improve CSP inheritance semantics
3664         https://bugs.webkit.org/show_bug.cgi?id=201884
3665         <rdar://problem/50172407>
3666
3667         Reviewed by Brent Fulgham.
3668
3669         Update the CSP inheritance semantics to more closely match the logic in section Initialize a Document's CSP list
3670         of the CSP3 spec., <https://w3c.github.io/webappsec-csp/#initialize-document-csp>.
3671
3672         Towards this, move more of the inheritance logic out of Document::initContentSecurityPolicy() and into
3673         DocumentWriter::begin() where details about the document being replaced live. This lets us remove the
3674         need to track the previous content security policy to pass it to Document::initContentSecurityPolicy().
3675         Moreover, DocumentWriter::begin() knows the owner document that will be replaced with the result of
3676         executing a JavaScript URL. This is needed in order to fix up inheritance of CSP for such documents.
3677
3678         Tests: http/tests/security/contentSecurityPolicy/iframe-allowed-when-loaded-via-javascript-url.html
3679                http/tests/security/contentSecurityPolicy/iframe-blocked-when-loaded-via-javascript-url.html
3680                http/tests/security/contentSecurityPolicy/iframe-blocked-when-loaded-via-javascript-url2.html
3681
3682         * dom/Document.cpp:
3683         (WebCore::Document::initSecurityContext): If we are inheriting the security origin from the owner
3684         document then inherit its CSP policy. We copy over both the CSP state from the owner as well as
3685         update 'self' to match the owner's origin so that CSP source expressions that include 'self' work
3686         correctly even from about:blank documents.
3687         (WebCore::Document::initContentSecurityPolicy): Move most of the logic from here into DocumentWriter::begin()
3688         to take advantage of the fact that DocumentWriter::begin() knows about the outgoing document (if there
3689         is one) as well as whether the outgoing document is being replaced with a new document that is the result
3690         of evaluating a JavaScript URL. We need do know both these things in order to inherit the correct CSP
3691         policy. This function only exists to copy some upgrade-insecure-requests state and to fix up plugin documents
3692         as we currently do.
3693         (WebCore::Document::shouldInheritContentSecurityPolicy const): Deleted.
3694         * dom/Document.h:
3695         * dom/SecurityContext.cpp:
3696         (WebCore::SecurityContext::setContentSecurityPolicy): Modified to take its param by rvalue-reference
3697         to make it less error prone to use.
3698         * dom/SecurityContext.h: Expose setContentSecurityPolicy() so that we can invoke it from DocumentWriter::begin().
3699         * loader/DocumentWriter.cpp:
3700         (WebCore::DocumentWriter::begin): For documents being replaced with the result of a JavaScript URL (i.e. ownerDocument
3701         is non-null) inherit the CSP from the owner document. Similarly, if we have an existing document in the frame
3702         and the protocol of the new document's URL is data: or blob: then inherit the CSP from the existing page. The latter
3703         is what we currently do just moved from Document::initContentSecurityPolicy() and re-written in terms of the
3704         existingDocument instead of previousContentSecurityPolicy. Also call setInsecureNavigationRequestsToUpgrade()
3705         both when we have a non-null ownerDocument as well as when we have a non-null existingDocument. The former fixes
3706         the block-all-mixed-content feature for documents loaded via JavaScript URLs and the latter is what we do now.
3707         * loader/FrameLoader.cpp:
3708         (WebCore::FrameLoader::didBeginDocument): Remove parameter previousContentSecurityPolicy as the logic that
3709         made use of it moved to DocumentWriter::begin().
3710         * loader/FrameLoader.h:
3711         * page/csp/ContentSecurityPolicy.h:
3712
3713 2019-09-23  Keith Rollin  <krollin@apple.com>
3714
3715         Unreviewed build fix after r250173: tvOS build broken due to unused function.
3716
3717         * platform/network/cocoa/CookieCocoa.mm:
3718         (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
3719
3720 2019-09-23  Brent Fulgham  <bfulgham@apple.com>
3721
3722         Unreviewed WinCairo/FTW Build fix after r250192.
3723
3724         * platform/network/curl/CurlDownload.cpp:
3725         (WebCore::CurlDownload::createCurlRequest):
3726
3727 2019-09-23  Zalan Bujtas  <zalan@apple.com>
3728
3729         [LFC][IFC] Merge inline box compute functions
3730         https://bugs.webkit.org/show_bug.cgi?id=202092
3731         <rdar://problem/55607748>
3732
3733         Reviewed by Antti Koivisto.
3734
3735         Make InlineFormattingContext::layoutInFlowContent() logic simpler.
3736
3737         * layout/inlineformatting/InlineFormattingContext.cpp:
3738         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
3739         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
3740         (WebCore::Layout::InlineFormattingContext::computeHorizontalAndVerticalGeometry):
3741         (WebCore::Layout::InlineFormattingContext::initializeMarginBorderAndPaddingForGenericInlineBox): Deleted.
3742         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer): Deleted.
3743         * layout/inlineformatting/InlineFormattingContext.h:
3744
3745 2019-09-23  David Kilzer  <ddkilzer@apple.com>
3746
3747         REGRESSION (r249855): Remove debug logging from WebCore::RenderImage::paintIntoRect()
3748         <https://webkit.org/b/202103>
3749
3750         Reviewed by Zalan Bujtas.
3751
3752         * rendering/RenderImage.cpp:
3753         (WebCore::RenderImage::paintIntoRect): Remove debug logging
3754         statements.
3755
3756 2019-09-23  Zalan Bujtas  <zalan@apple.com>
3757
3758         [LFC][IFC] Pass in the Used*Values to inline layout functions.
3759         https://bugs.webkit.org/show_bug.cgi?id=202091
3760         <rdar://problem/55601987>
3761
3762         Reviewed by Antti Koivisto.
3763
3764         Only the top level layout functions should generate constraint values.
3765
3766         * layout/inlineformatting/InlineFormattingContext.cpp:
3767         (WebCore::Layout::InlineFormattingContext::layoutInFlowContent):
3768         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
3769         (WebCore::Layout::InlineFormattingContext::computeMarginBorderAndPaddingForInlineContainer):
3770         (WebCore::Layout::InlineFormattingContext::computeIntrinsicWidthForFormattingRoot):
3771         (WebCore::Layout::InlineFormattingContext::computeHorizontalMargin):
3772         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin):
3773         (WebCore::Layout::InlineFormattingContext::computeHeightAndMargin):
3774         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot):
3775         (WebCore::Layout::InlineFormattingContext::computeWidthAndHeightForReplacedInlineBox):
3776         * layout/inlineformatting/InlineFormattingContext.h:
3777         (WebCore::Layout::InlineFormattingContext::InlineLayout::widthConstraint const):
3778         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3779         (WebCore::Layout::InlineFormattingContext::InlineLayout::InlineLayout):
3780         (WebCore::Layout::InlineFormattingContext::InlineLayout::layout):
3781         (WebCore::Layout::InlineFormattingContext::InlineLayout::computedIntrinsicWidth const):
3782         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns):
3783
3784 2019-09-23  Antti Koivisto  <antti@apple.com>
3785
3786         Refcount simple line layout
3787         https://bugs.webkit.org/show_bug.cgi?id=202104
3788
3789         Reviewed by Zalan Bujtas.
3790
3791         Make SimpleLineLayout::Layout refcounted for safety and ease of use.
3792
3793         * dom/Position.cpp:
3794         (WebCore::Position::upstream const):
3795         (WebCore::Position::downstream const):
3796         * editing/TextIterator.cpp:
3797         (WebCore::TextIterator::handleTextNode):
3798         (WebCore::TextIterator::handleTextBox):
3799         (WebCore::TextIterator::handleTextNodeFirstLetter):
3800         * editing/TextIterator.h:
3801         * rendering/RenderBlockFlow.h:
3802         * rendering/RenderTreeAsText.cpp:
3803         (WebCore::RenderTreeAsText::writeRenderObject):
3804         (WebCore::write):
3805         * rendering/SimpleLineLayout.cpp:
3806         (WebCore::SimpleLineLayout::create):
3807         (WebCore::SimpleLineLayout::Layout::create):
3808         * rendering/SimpleLineLayout.h:
3809         * rendering/SimpleLineLayoutFunctions.cpp:
3810         (WebCore::SimpleLineLayout::outputLineLayoutForFlow):
3811         * rendering/SimpleLineLayoutResolver.cpp:
3812         (WebCore::SimpleLineLayout::RunResolver::Run::rect const):
3813         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
3814
3815         Iterator now refs the layout. Since the resolver is owned by the layout, it is guaranteed to stay alive too.
3816
3817         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
3818         * rendering/SimpleLineLayoutResolver.h:
3819         (WebCore::SimpleLineLayout::RunResolver::Iterator::layout const):
3820         (WebCore::SimpleLineLayout::RunResolver::Run::computeBaselinePosition const):
3821         (WebCore::SimpleLineLayout::RunResolver::Iterator::simpleRun const):
3822         (WebCore::SimpleLineLayout::RunResolver::Iterator::inQuirksMode const): Deleted.
3823         (WebCore::SimpleLineLayout::runResolver): Deleted.
3824
3825         Always use the cached resolver owned by SimpleLineLayout::Layout.
3826
3827         * rendering/line/LineLayoutInterfaceTextBoxes.cpp:
3828         (WebCore::LineLayoutInterface::firstTextBoxInVisualOrderFor):
3829         (WebCore::LineLayoutInterface::firstTextBoxInTextOrderFor):
3830         (WebCore::LineLayoutInterface::textBoxRangeFor):
3831         (WebCore::LineLayoutInterface::Provider::firstTextBoxInVisualOrderFor): Deleted.
3832         (WebCore::LineLayoutInterface::Provider::firstTextBoxInTextOrderFor): Deleted.
3833         (WebCore::LineLayoutInterface::Provider::textBoxRangeFor): Deleted.
3834
3835         There is no need for a separate Provider class anymore as the iterator keeps SimpleLineLayout::Layout
3836         and Resolver instances alive itself.
3837
3838         * rendering/line/LineLayoutInterfaceTextBoxes.h:
3839         (WebCore::LineLayoutInterface::hasTextBoxes):
3840         (WebCore::LineLayoutInterface::Provider::firstTextBoxFor): Deleted.
3841
3842 2019-09-23  Youenn Fablet  <youenn@apple.com>
3843
3844         Simplify UserMediaPermissionRequestManager management of UserMediaRequest
3845         https://bugs.webkit.org/show_bug.cgi?id=201688
3846
3847         Reviewed by Eric Carlson.
3848
3849         Covered by existing tests and modified test.
3850
3851         * Modules/mediastream/UserMediaRequest.cpp:
3852         (WebCore::UserMediaRequest::UserMediaRequest):
3853         * Modules/mediastream/UserMediaRequest.h:
3854         (WebCore::UserMediaRequest::identifier const):
3855         Add an identifier generated for each request.
3856
3857 2019-09-23  Charlie Turner  <cturner@igalia.com>
3858
3859         [GStreamer] isAVC1CodecSupported is crashing several media source tests due to avc1.4d4001 codec type
3860         https://bugs.webkit.org/show_bug.cgi?id=201870
3861
3862         Reviewed by Xabier Rodriguez-Calvar.
3863
3864         The GStreamer codec-utils package expects all level_idc's to be
3865         multiples of 10 from the spec idc, i.e., 1.1 -> 11, 3.1 -> 31, 1
3866         -> 10, etc.
3867
3868         In the WPT tests, there is some confusion of this *10 multiplier,
3869         and the level_idc is given in several places as simply "1". This
3870         causes the get_level codec helper to return NULL, which the
3871         registry scanner was not handling properly, and crashing on.
3872
3873         Fix this by special casing "web level idc's" that violate the *10
3874         rule in isAVC1CodecSupported.
3875
3876         There is prior art along these lines in Gecko:
3877         https://searchfox.org/mozilla-central/source/dom/media/VideoUtils.cpp#453
3878         I assume Chrome/IE/etc must do something similar. The fix does not
3879         belong in GStreamer since these are actually invalid inputs to the
3880         get_level function.
3881
3882         Tested by imported/w3c/web-platform-tests/media-source
3883
3884         * platform/graphics/gstreamer/GStreamerRegistryScanner.cpp:
3885         (WebCore::GStreamerRegistryScanner::isAVC1CodecSupported const):
3886         Special case levels 1..5, even though these *should* be
3887         represented as 10 through 50 respectively, they are not in
3888         web-land. The two-byte local storage trick was contributed to me
3889         by Adrian Perez de Castro.
3890
3891 2019-09-23  Rob Buis  <rbuis@igalia.com>
3892
3893         Sync operator dictionary
3894         https://bugs.webkit.org/show_bug.cgi?id=201974
3895
3896         Reviewed by Frédéric Wang.
3897
3898         Sync with operator dictionary list from
3899         https://mathml-refresh.github.io/mathml-core/#operator-dictionary
3900
3901         Test: imported/w3c/web-platform-tests/mathml/presentation-markup/operators/operator-dictionary-001.html
3902
3903         * mathml/MathMLOperatorDictionary.cpp:
3904
3905 2019-09-22  David Kilzer  <ddkilzer@apple.com>
3906
3907         clang-tidy: Fix unnecessary copy/ref churn of for loop variables in WebCore
3908         <https://webkit.org/b/202090>
3909
3910         Reviewed by Daniel Bates.
3911
3912         Fix unwanted copying/ref churn of loop variables by making them
3913         const references.
3914
3915         * Modules/encryptedmedia/InitDataRegistry.cpp:
3916         (WebCore::InitDataRegistry::extractKeyIDsCenc):
3917         * accessibility/AccessibilityObject.cpp:
3918         (WebCore::AccessibilityObject::getMisspellingRange const):
3919         (WebCore::AccessibilityObject::performTextOperation):
3920         * html/HTMLSlotElement.cpp:
3921         (WebCore::flattenAssignedNodes):
3922         * html/track/WebVTTParser.cpp:
3923         (WebCore::WebVTTParser::checkAndStoreStyleSheet):
3924         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3925         (WebCore::Layout::InlineFormattingContext::InlineLayout::createDisplayRuns const):
3926         * platform/ios/PlatformPasteboardIOS.mm:
3927         (WebCore::PlatformPasteboard::updateSupportedTypeIdentifiers):
3928         * platform/ios/WebItemProviderPasteboard.mm:
3929         (-[WebItemProviderPasteboard allDroppedFileURLs]):
3930         * svg/SVGStringList.h:
3931         * testing/MockLibWebRTCPeerConnection.cpp:
3932         (WebCore::MockLibWebRTCPeerConnection::GetTransceivers const):
3933         Also call transceivers.reserve() to optimize allocations.
3934
3935 2019-09-21  Chris Dumez  <cdumez@apple.com>