Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-01-04  Jer Noble  <jer.noble@apple.com>
2
3         Web Content process main thread blocked beneath ImageDecoderAVFObjC::readSamples for many seconds on imgur.com
4         https://bugs.webkit.org/show_bug.cgi?id=191806
5         <rdar://problem/46151477>
6
7         Reviewed by Dean Jackson.
8
9         Test: http/tests/images/mp4-partial-load.html
10
11         Rather than use an AVAssetReaderTrackOutput, which will load both sample metadata and sample data
12         synchronously when a sample is requested, use AVAssetReaderSampleReferenceOutput, which only loads
13         sample metadata, including the byte offset and byte length of the sample data. By waiting until the
14         AVAsset signals that it's own metadata is loaded, we can safely parse all the sample metadata without
15         blocking on network loads. Once enough data is loaded, we can replace the byte reference and offset
16         attachements in the sample with actual data, and mark the sample as "complete".
17
18         Because the existing ImageSource assumes that image data parsing will occur synchronously, and that
19         synchronous parsing could cause a hang if the metadata is not loaded, add a new callback method which
20         allows the ImageSource to be notified when the encodedDataStatus changes. The ImageSource notifies the
21         CacheImage, which notifies the RenderImage, and thus the asynchronous parsing will kick off the
22         renderer's animation loop.
23
24         * loader/cache/CachedImage.cpp:
25         (WebCore::CachedImage::CachedImageObserver::encodedDataStatusChanged):
26         (WebCore::CachedImage::encodedDataStatusChanged):
27         * loader/cache/CachedImage.h:
28         * platform/graphics/ImageDecoder.h:
29         (WebCore::ImageDecoder::setEncodedDataStatusChangeCallback):
30         * platform/graphics/ImageObserver.h:
31         (WebCore::ImageObserver::encodedDataStatusChanged):
32         * platform/graphics/ImageSource.cpp:
33         (WebCore::ImageSource::ensureDecoderAvailable):
34         (WebCore::ImageSource::encodedDataStatusChanged):
35         (WebCore::ImageSource::frameDecodingStatusAtIndex):
36         * platform/graphics/ImageSource.h:
37         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
38         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
39         (-[WebCoreSharedBufferResourceLoaderDelegate data]):
40         (WebCore::ImageDecoderAVFObjCSample::byteRange const):
41         (WebCore::ImageDecoderAVFObjC::readSamples):
42         (WebCore::ImageDecoderAVFObjC::setEncodedDataStatusChangeCallback):
43         (WebCore::ImageDecoderAVFObjC::encodedDataStatus const):
44         (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
45         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
46         (WebCore::ImageDecoderAVFObjC::sampleIsComplete const):
47
48 2019-01-04  Youenn Fablet  <youenn@apple.com>
49
50         CSP violation reports should bypass CSP checks
51         https://bugs.webkit.org/show_bug.cgi?id=192857
52         <rdar://problem/46887236>
53
54         Reviewed by Chris Dumez.
55
56         For ping loads, pass the option to do CSP checks from PingLoader to LoaderStrategy.
57         This new option is unused by WebKit Legacy.
58         It is used by WebKit loader strategy to only send any CSP response header to network process
59         in case CSP checks should be done.
60
61         This option is used to disable CSP checks for Ping Loads that report CSP violations.
62
63         Test: http/wpt/fetch/csp-reports-bypass-csp-checks.html
64
65         * loader/LoaderStrategy.h:
66         * loader/PingLoader.cpp:
67         (WebCore::PingLoader::loadImage):
68         (WebCore::PingLoader::sendPing):
69         (WebCore::PingLoader::sendViolationReport):
70         (WebCore::PingLoader::startPingLoad):
71         * loader/PingLoader.h:
72         * loader/cache/CachedResource.cpp:
73         (WebCore::CachedResource::load):
74
75 2019-01-04  Wenson Hsieh  <wenson_hsieh@apple.com>
76
77         [Cocoa] Merge WebEditCommandProxy::nameForEditAction and undoNameForEditAction into a single function
78         https://bugs.webkit.org/show_bug.cgi?id=193129
79
80         Reviewed by Tim Horton.
81
82         Adds a new helper function that returns the undo/redo name for a given EditAction. No change in behavior.
83
84         * Sources.txt:
85         * WebCore.xcodeproj/project.pbxproj:
86         * editing/EditAction.cpp: Copied from Source/WebKit/UIProcess/WebEditCommandProxy.cpp.
87         (WebCore::nameForUndoRedo):
88         * editing/EditAction.h:
89         * editing/Editor.cpp:
90
91 2019-01-03  Matt Rajca  <mrajca@apple.com>
92
93         Make DidPlayMediaPreventedFromPlaying autoplay event more generic.
94         https://bugs.webkit.org/show_bug.cgi?id=193128
95         rdar://34554231
96
97         Reviewed by Jer Noble.
98
99         Today, the "DidPlayMediaPreventedFromPlaying" autoplay event is only sent for
100         media prevented from autoplaying. It could be generalized to a "DidPlayMediaWithUserGesture"
101         event along with a flag that indicates whether or not autoplay was actually prevented.
102         Moreover, we can include a flag that indicates whether the media element in question
103         is main content. Clients will then know in more cases when media was played with a user
104         gesture, whether or not it has audio, as well as its main content status. While the main
105         content heuristics may not be perfect, they covered the top 20 video-centric websites that
106         this was tested with and are meant to be used by clients for data evaluation purposes.
107
108         As part of this, the PlaybackWithoutUserGesture enum was renamed to AutoplayEventPlaybackState
109         since it now also applies to cases where there is a user gesture. The
110         `m_playbackWithoutUserGestureStartedTime` member variable was also removed in favor of
111         `playbackStartedTime` which also covers all the cases we care about.
112
113         Tests: existing API tests were updated to reflect the new names. New API tests
114         were added for the new case in which the "DidPlayMediaWithUserGesture" event is sent.
115
116         * html/HTMLMediaElement.cpp:
117         (WebCore::convertEnumerationToString): Update to new enum cases.
118         (WebCore::HTMLMediaElement::setReadyState): Ditto.
119         (WebCore::HTMLMediaElement::play): Ditto.
120         (WebCore::HTMLMediaElement::playInternal): Also cover the case where
121          playback was not prevented but there was a user gesture.
122         (WebCore::HTMLMediaElement::pauseInternal): Use new name.
123         (WebCore::HTMLMediaElement::setVolume): Use new name.
124         (WebCore::HTMLMediaElement::playbackProgressTimerFired): Dispatch the
125          DidPlayMediaWithUserGesture event when playback was started with a user
126          gesture as well.
127         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Use new name.
128         (WebCore::HTMLMediaElement::mediaPlayerTimeChanged): Ditto.
129         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
130         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer): Ditto.
131         (WebCore::HTMLMediaElement::handleAutoplayEvent): Pass along new media state.
132         (WebCore::HTMLMediaElement::userDidInterfereWithAutoplay): Use new name.
133         (WebCore::HTMLMediaElement::setAutoplayEventPlaybackState): Stop setting
134          m_playbackWithoutUserGestureStartedTime in favor of using playbackStartedTime.
135         (WebCore::HTMLMediaElement::updateShouldPlay): Use new name.
136         (WebCore::HTMLMediaElement::setPlaybackWithoutUserGesture): Renamed.
137         * html/HTMLMediaElement.h:
138         (WTF::LogArgument<WebCore::HTMLMediaElement::AutoplayEventPlaybackState>::toString): Renamed from...
139         (WTF::LogArgument<WebCore::HTMLMediaElement::PlaybackWithoutUserGesture>::toString):
140         * html/MediaElementSession.cpp:
141         (WebCore::MediaElementSession::isMainContentForPurposesOfAutoplayEvents const): Don't
142          do the hit testing check for the purposes of autoplay events. It seems to fail on the
143          basic Vimeo player due to overlapping divs.
144         (WebCore::isElementMainContentForPurposesOfAutoplay):
145         (WebCore::MediaElementSession::updateIsMainContent const): Keep the existing behavior
146          here of hit testing.
147         (WebCore::isMainContentForPurposesOfAutoplay): Renamed.
148         * html/MediaElementSession.h:
149         * page/AutoplayEvent.h:
150
151 2019-01-04  Youenn Fablet  <youenn@apple.com>
152
153         Crash in WebCore::ServiceWorkerGlobalScope
154         https://bugs.webkit.org/show_bug.cgi?id=192513
155         <rdar://problem/46563880>
156
157         Reviewed by Alex Christensen.
158
159         Store the identifier in its own variable to make sure we do not use workerThread after being moved.
160
161         * workers/service/ServiceWorkerGlobalScope.cpp:
162         (WebCore::ServiceWorkerGlobalScope::skipWaiting):
163
164 2019-01-04  Chris Fleizach  <cfleizach@apple.com>
165
166         AX: String check: "Rule" does not reflect the meaning of the <hr> html tag
167         https://bugs.webkit.org/show_bug.cgi?id=193041
168         <rdar://problem/46954090>
169
170         Reviewed by Zalan Bujtas.
171
172         * en.lproj/Localizable.strings:
173         * platform/cocoa/LocalizedStringsCocoa.mm:
174         (WebCore::AXHorizontalRuleDescriptionText):
175
176 2019-01-04  Zalan Bujtas  <zalan@apple.com>
177
178         [LFC] ComputedHorizontalMargin should have optional members
179         https://bugs.webkit.org/show_bug.cgi?id=193131
180
181         Reviewed by Antti Koivisto.
182
183         Split HorizontalMargin into UsedHorizontalMargin and ComputedHorizontalMargin. ComputedHorizontalMargin's members are optional.
184         (see computed vs used values)
185
186         * layout/FormattingContext.h:
187         * layout/FormattingContextGeometry.cpp:
188         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
189         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
190         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
191         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
192         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
193         (WebCore::Layout::FormattingContext::Geometry::computedHorizontalMargin):
194         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue): Deleted.
195         * layout/LayoutUnits.h:
196         * layout/MarginTypes.h:
197         * layout/Verification.cpp:
198         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
199         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
200         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
201         * layout/displaytree/DisplayBox.h:
202         (WebCore::Display::Box::setHorizontalMargin):
203         (WebCore::Display::Box::setHorizontalComputedMargin):
204         (WebCore::Display::Box::computedMarginStart const):
205         (WebCore::Display::Box::computedMarginEnd const):
206         * layout/floats/FloatAvoider.h:
207         (WebCore::Layout::FloatAvoider::marginStart const):
208         (WebCore::Layout::FloatAvoider::marginEnd const):
209         * layout/inlineformatting/InlineFormattingContext.cpp:
210         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
211         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
212         (WebCore::Layout::InlineFormattingContext::Geometry::inlineBlockWidthAndMargin):
213
214 2019-01-04  Zalan Bujtas  <zalan@apple.com>
215
216         [LFC][BFC] Use computedValue and usedValue consistently
217         https://bugs.webkit.org/show_bug.cgi?id=193059
218
219         Reviewed by Antti Koivisto.
220
221         https://www.w3.org/TR/CSS22/cascade.html#value-stages
222
223         6.1.2 Computed values
224         Specified values are resolved to computed values during the cascade; for example URIs are made absolute and 'em' and 'ex' units
225         are computed to pixel or absolute lengths. Computing a value never requires the user agent to render the document...
226
227         6.1.3 Used values
228         Computed values are processed as far as possible without formatting the document. Some values, however, can only be determined when the document
229         is being laid out. For example, if the width of an element is set to be a certain percentage of its containing block, the width cannot be determined
230         until the width of the containing block has been determined. The used value is the result of taking the computed value and resolving any remaining
231         dependencies into an absolute value.
232
233         * layout/FormattingContext.cpp:
234         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
235         * layout/FormattingContextGeometry.cpp:
236         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
237         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
238         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
239         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
240         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
241         * layout/LayoutState.cpp:
242         (WebCore::Layout::LayoutState::LayoutState):
243         * layout/LayoutUnits.h:
244         * layout/Verification.cpp:
245         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
246         * layout/blockformatting/BlockFormattingContext.cpp:
247         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
248         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
249         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
250         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
251         * layout/displaytree/DisplayBox.cpp:
252         (WebCore::Display::Box::Box):
253         * layout/displaytree/DisplayBox.h:
254         (WebCore::Display::Box::setHasValidHorizontalComputedMargin):
255         (WebCore::Display::Box::setHorizontalComputedMargin):
256         (WebCore::Display::Box::computedMarginStart const):
257         (WebCore::Display::Box::computedMarginEnd const):
258         (WebCore::Display::Box::setHasValidHorizontalNonComputedMargin): Deleted.
259         (WebCore::Display::Box::setHorizontalNonComputedMargin): Deleted.
260         (WebCore::Display::Box::nonComputedMarginStart const): Deleted.
261         (WebCore::Display::Box::nonComputedMarginEnd const): Deleted.
262         * layout/floats/FloatAvoider.h:
263         (WebCore::Layout::FloatAvoider::marginStart const):
264         (WebCore::Layout::FloatAvoider::marginEnd const):
265         * layout/inlineformatting/InlineFormattingContext.cpp:
266         (WebCore::Layout::InlineFormattingContext::computeWidthAndMargin const):
267
268 2019-01-03  Zalan Bujtas  <zalan@apple.com>
269
270         REGRESSION: -webkit-appearance test case crashes
271         https://bugs.webkit.org/show_bug.cgi?id=189302
272         <rdar://problem/44143049>
273
274         Reviewed by Wenson Hsieh.
275
276         The painting and the layout positions of the cancel button need to match in order to be able to interact with it.
277         This patch removes the previous position inlining attempts.
278
279         Test: fast/forms/webkit-appearance-searchfield-cancel-button-crash.html
280
281         * rendering/RenderThemeMac.mm:
282         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
283
284 2019-01-03  David Kilzer  <ddkilzer@apple.com>
285
286         Leak of WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback (48 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
287         <https://webkit.org/b/193122>
288         <rdar://problem/47022987>
289
290         Reviewed by Youenn Fablet.
291
292         * Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
293         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::AddRef const):
294         (WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallback::Release const):
295         - Remove `final` keyword so that
296           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
297           can be called.
298         (WebCore::LibWebRTCCertificateGenerator::generateCertificate):
299         - To fix the leak call
300           `new rtc::RefCountedObject<RTCCertificateGeneratorCallback>()`
301           to create the object.
302
303 2019-01-03  Simon Fraser  <simon.fraser@apple.com>
304
305         REGRESSION (r238090): After showing the Find banner or tab bar, hit tests are vertically offset (or painting is not offset)
306         https://bugs.webkit.org/show_bug.cgi?id=193124
307         rdar://problem/46755409
308
309         Reviewed by Tim Horton.
310
311         Top content inset feeds into scrolling tree geometry, so when it changes we need to trigger
312         an update of the root scrolling node, which happens via RenderLayerBacking::updateGeometry().
313         So set a dirty bit on the root layer in frameViewDidChangeSize(), which is called from the code
314         path that runs when top content inset changes.
315
316         Find banner behavior is not easily testable. platform/mac/fast/events/content-inset-hit-testing.html did not detect the regression.
317
318         * rendering/RenderLayerCompositor.cpp:
319         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
320
321 2019-01-03  Chris Dumez  <cdumez@apple.com>
322
323         Potential infinite recursion in isFrameFamiliarWith(Frame&, Frame&)
324         https://bugs.webkit.org/show_bug.cgi?id=192997
325         <rdar://problem/46217271>
326
327         Reviewed by Antti Koivisto.
328
329         isFrameFamiliarWith(Frame&, Frame&) was called recursively using the passed frames' openers.
330         The issue is that a Frame can be its opener. There could also be a cycle in the opener chain.
331
332         To address the issue, simplify isFrameFamiliarWith() so that it is no longer recursive. We now
333         only check if the frames belong to the same pages or if their openers do. We no longer check
334         openers' opener and up.
335
336         Note that this function is used to check if a frame is allowed to target another. In practice,
337         it is unlikely to be useful to navigate an opener's opener and an openee's openee.
338
339         Tests: fast/dom/Window/window-open-opener-cycle.html
340                fast/dom/Window/window-open-self-as-opener.html
341
342         * page/FrameTree.cpp:
343         (WebCore::isFrameFamiliarWith):
344
345 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
346
347         REGRESSION (r239306): Don't disable font smoothing in transparent layers on macOS Mojave and later
348         https://bugs.webkit.org/show_bug.cgi?id=193095
349         <rdar://problem/47014944>
350
351         Reviewed by Zalan Bujtas.
352         
353         In r239306 we stopped making CALayers for font-smoothed text when not necessary on macOS Mojave
354         and later. However, we still turned off smoothing for non-opaque layers (setShouldSmoothFonts(false)),
355         which continues to affect the appearance of text.
356         
357         Fix by only calling setShouldSmoothFonts(false) when the OS supports font smoothing.
358
359         Test: compositing/contents-format/subpixel-antialiased-text.html
360
361         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
362         (WebCore::PlatformCALayer::drawLayerContents):
363
364 2019-01-02  David Kilzer  <ddkilzer@apple.com>
365
366         Leak of CMSampleBuffer (752 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
367         <https://webkit.org/b/193016>
368         <rdar://problem/46925703>
369
370         Reviewed by Simon Fraser.
371
372         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
373         (WebCore::copySampleBufferWithCurrentTimeStamp):
374         - Change to return RetainPtr<CMSampleBufferRef>.
375         - Check return value of CMSampleBufferCreateCopyWithNewTiming().
376         (WebCore::MediaRecorderPrivateWriter::appendVideoSampleBuffer):
377         - Check return value of copySampleBufferWithCurrentTimeStamp().
378         - Fix leak by using RetainPtr<CMSampleBufferRef> returned from
379           copySampleBufferWithCurrentTimeStamp() instead of leaking
380           `bufferWithCurrentTime` by using retainPtr().
381         (WebCore::createAudioFormatDescription):
382         - Extract method from appendAudioSampleBuffer() to return
383           RetainPtr<CMFormatDescriptionRef> after calling
384           CMAudioFormatDescriptionCreate().
385         - Check return value of CMAudioFormatDescriptionCreate().
386         (WebCore::createAudioSampleBufferWithPacketDescriptions):
387         - Extract method from appendAudioSampleBuffer() to return
388           RetainPtr<CMSampleBufferRef> after calling
389           CMAudioSampleBufferCreateWithPacketDescriptions().
390         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
391         - Check return values of createAudioFormatDescription() and
392           createAudioSampleBufferWithPacketDescriptions().
393         - Fix leaks by extracting code into helper methods that return
394           RetainPtr<> objects instead of leaking CMFormatDescriptionRef
395           directly or leaking `sampleBuffer` by using retainPtr().
396
397 2019-01-02  Wenson Hsieh  <wenson_hsieh@apple.com>
398
399         Add support for using the current text selection as the find string on iOS
400         https://bugs.webkit.org/show_bug.cgi?id=193034
401         <rdar://problem/45138739>
402
403         Reviewed by Tim Horton.
404
405         Add support for "TakeFindStringFromSelection" on iOS. Unlike macOS, iOS does not have a notion of a "find
406         pasteboard" like macOS; instead, we handle this editing command by sending the selection string to the UI
407         process, where it is exposed via WebKit SPI so that clients that present find-in-page UI (i.e. MobileSafari) are
408         able to trigger find-in-page with this string.
409
410         Test: WebKit.UseSelectionAsFindString
411
412         * editing/Editor.cpp:
413         (WebCore::Editor::canCopyExcludingStandaloneImages const):
414
415         Make this helper function cross-platform.
416
417         * editing/Editor.h:
418         * editing/EditorCommand.cpp:
419         (WebCore::createCommandMap):
420         * editing/cocoa/EditorCocoa.mm:
421         (WebCore::Editor::takeFindStringFromSelection):
422
423         Move this from EditorMac to EditorCocoa, and implement it on iOS by calling into the editor client to update the
424         find string (see WebKit/ChangeLog for more details).
425
426         * editing/mac/EditorMac.mm:
427         (WebCore::Editor::canCopyExcludingStandaloneImages): Deleted.
428         (WebCore::Editor::takeFindStringFromSelection): Deleted.
429         * loader/EmptyClients.cpp:
430         * page/EditorClient.h:
431
432         Add a new editor client method to send the string for find-in-page to the UI process.
433
434 2019-01-02  Devin Rousso  <webkit@devinrousso.com>
435
436         Web Inspector: Implement `queryObjects` Command Line API
437         https://bugs.webkit.org/show_bug.cgi?id=176766
438         <rdar://problem/34890689>
439
440         Reviewed by Joseph Pecoraro.
441
442         Test: inspector/console/queryObjects.html
443
444         * inspector/CommandLineAPIModuleSource.js:
445         (CommandLineAPI):
446         (CommandLineAPIImpl.prototype.queryObjects): Added.
447
448 2019-01-02  Charles Vazac  <cvazac@gmail.com>
449
450         Fix resourcetimingbufferfull bubbles attribute
451         https://bugs.webkit.org/show_bug.cgi?id=193087
452
453         Reviewed by Chris Dumez.
454
455         This change is covered by web-platform-tests [1].
456
457         [1] https://github.com/web-platform-tests/wpt/blob/master/resource-timing/buffer-full-when-populate-entries.html#L20
458
459         * page/Performance.cpp:
460         (WebCore::Performance::resourceTimingBufferFullTimerFired):
461
462 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
463
464         Rename LayerScrollCoordinationRole to ScrollCoordinationRole and make an enum class
465         https://bugs.webkit.org/show_bug.cgi?id=193010
466
467         Reviewed by Zalan Bujtas.
468
469         Move the enum LayerScrollCoordinationRole from RenderLayer.h to RenderLayerCompositor.h,
470         and make it an enum class.
471
472         * page/FrameView.cpp:
473         (WebCore::FrameView::scrollLayerID const):
474         * rendering/RenderLayer.h:
475         * rendering/RenderLayerBacking.cpp:
476         (WebCore::RenderLayerBacking::~RenderLayerBacking):
477         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
478         (WebCore::operator<<):
479         * rendering/RenderLayerBacking.h:
480         * rendering/RenderLayerCompositor.cpp:
481         (WebCore::RenderLayerCompositor::updateScrollCoordinatedStatus):
482         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
483         (WebCore::scrollCoordinationRoleForNodeType):
484         (WebCore::RenderLayerCompositor::attachScrollingNode):
485         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
486         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
487         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
488         * rendering/RenderLayerCompositor.h:
489
490 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
491
492         Don't spin up a CalcParser if the current token is not a function token
493         https://bugs.webkit.org/show_bug.cgi?id=193067
494
495         Reviewed by Zalan Bujtas.
496
497         Various functions in CSSPropertyParserHelpers fall back to trying to parse
498         a calc expression if the normal parsing fails. Don't do this unless the
499         current token is a function token, which should be slightly more efficient.
500
501         * css/parser/CSSPropertyParserHelpers.cpp:
502         (WebCore::CSSPropertyParserHelpers::consumeInteger):
503         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
504         (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
505         (WebCore::CSSPropertyParserHelpers::consumeNumber):
506         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
507         (WebCore::CSSPropertyParserHelpers::consumeLength):
508         (WebCore::CSSPropertyParserHelpers::consumePercent):
509         (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
510         (WebCore::CSSPropertyParserHelpers::consumeAngle):
511         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
512         (WebCore::CSSPropertyParserHelpers::consumeTime):
513
514 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
515
516         Support css-color-4 rgb functions
517         https://bugs.webkit.org/show_bug.cgi?id=192321
518
519         Reviewed by Zalan Bujtas.
520         
521         Support the new rgb()/rgba() syntax described in https://drafts.csswg.org/css-color/#rgb-functions.
522         The differences are:
523         1. There is a new comma-free syntax, where the optional alpha is separated by a slash:
524             rgb(128 34 56)
525             rgb(128 34 56 / 50%)
526         2. Floating point values are allowed, and rounded:
527             rgb(128.5 34.2 56.5) becomes rgb(129 34 57)
528         3. rgba() is a pure alias for rgb(), so these are equivalent:
529             rgb(128 34 56 / 50%)
530             rgba(128 34 56 / 50%)
531             
532         hsl()/hsla() parsing was already updated to this new syntax in r230861.
533
534         Tested by tests in imported/w3c/web-platform-tests/css/css-color/
535
536         * css/parser/CSSPropertyParserHelpers.cpp:
537         (WebCore::CSSPropertyParserHelpers::clampRGBComponent):
538         (WebCore::CSSPropertyParserHelpers::parseRGBParameters):
539         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
540
541 2019-01-02  Simon Fraser  <simon.fraser@apple.com>
542
543         Handle calc() expressions in gradient color stops
544         https://bugs.webkit.org/show_bug.cgi?id=193066
545         rdar://problem/46961985
546
547         Reviewed by Sam Weinig.
548         
549         Fix two issues that prevented calc() expressions from working in conic-gradient color stops,
550         for the angle or percent value. First, consumeAngleOrPercent() needs to look for CalculationCategory::Percent
551         calc values as well as angle ones.
552
553         Second, CSSPrimitiveValue::isAngle() needs to use primitiveType() (which takes calc into account),
554         just as isPx() etc do.
555
556         Test: fast/gradients/conic-calc-stop-position.html
557
558         * css/CSSPrimitiveValue.h:
559         (WebCore::CSSPrimitiveValue::isAngle const):
560         * css/parser/CSSPropertyParserHelpers.cpp:
561         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
562         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops):
563
564 2018-12-31  Keith Miller  <keith_miller@apple.com>
565
566         SourceProviders should use an actual URL instead of a string
567         https://bugs.webkit.org/show_bug.cgi?id=192734
568
569         Reviewed by Yusuke Suzuki.
570
571         Remove ScriptSourceCode's URL member and make the url() method
572         reference the URL on the SourceProvider. Also, avoid some
573         ref count churn.
574
575         Additionally, this patch fixes an existing bug in
576         WorkletGlobalScope() that would use a ScriptSourceCode after
577         WTFMoving it.
578
579         * bindings/js/CachedScriptSourceProvider.h:
580         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
581         * bindings/js/ScheduledAction.cpp:
582         (WebCore::ScheduledAction::execute):
583         * bindings/js/ScriptController.cpp:
584         (WebCore::ScriptController::executeScriptInWorld):
585         (WebCore::ScriptController::executeScript):
586         * bindings/js/ScriptSourceCode.h:
587         (WebCore::ScriptSourceCode::ScriptSourceCode):
588         (WebCore::ScriptSourceCode::m_code):
589         (WebCore::ScriptSourceCode::url const):
590         (WebCore::ScriptSourceCode::m_url): Deleted.
591         * dom/ScriptElement.cpp:
592         (WebCore::ScriptElement::prepareScript):
593         (WebCore::ScriptElement::requestModuleScript):
594         (WebCore::ScriptElement::executePendingScript):
595         * html/HTMLMediaElement.cpp:
596         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
597         * page/Frame.cpp:
598         (WebCore::Frame::injectUserScriptImmediately):
599         * workers/WorkerGlobalScope.cpp:
600         (WebCore::WorkerGlobalScope::importScripts):
601         * workers/WorkerThread.cpp:
602         (WebCore::WorkerThread::workerThread):
603         * worklets/WorkletGlobalScope.cpp:
604         (WebCore::WorkletGlobalScope::WorkletGlobalScope):
605         * xml/parser/XMLDocumentParserLibxml2.cpp:
606         (WebCore::XMLDocumentParser::endElementNs):
607
608 2019-01-01  Jeff Miller  <jeffm@apple.com>
609
610         Update user-visible copyright strings to include 2019
611         https://bugs.webkit.org/show_bug.cgi?id=192811
612
613         Reviewed by Mark Lam.
614
615         * Info.plist:
616
617 2018-12-30  David Kilzer  <ddkilzer@apple.com>
618
619         clang-tidy: Save 8 padding bytes on WebCore::BorderEdge
620         <https://webkit.org/b/193058>
621         <rdar://problem/46979275>
622
623         Reviewed by Yusuke Suzuki.
624
625         * rendering/BorderEdge.cpp:
626         (WebCore::BorderEdge::BorderEdge): Reorder initialization to
627         match new instance variable order.
628         * rendering/BorderEdge.h: Reorder instance variables to save
629         8 padding bytes.
630
631 2018-12-28  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
632
633         [JSC] Remove one indirection in JSObject::toStringName
634         https://bugs.webkit.org/show_bug.cgi?id=193037
635
636         Reviewed by Keith Miller.
637
638         Use old JSObject::toStringName function here.
639
640         * bindings/js/JSDOMConstructorBase.cpp:
641         (WebCore::JSDOMConstructorBase::className):
642         (WebCore::JSDOMConstructorBase::toStringName):
643         * bindings/js/JSDOMConstructorBase.h:
644         (WebCore::JSDOMConstructorBase::className): Deleted.
645
646 2018-12-27  Alex Christensen  <achristensen@webkit.org>
647
648         Resurrect Mac CMake build
649         https://bugs.webkit.org/show_bug.cgi?id=192658
650
651         Reviewed by Yusuke Suzuki.
652
653         This makes it so JSC and most of WebCore builds.
654         WebCore's use of ARC seems inconsistent, so I'll fix that later.
655
656         * PlatformMac.cmake:
657         * config.h:
658
659 2018-12-26  Jim Mason  <jmason@ibinx.com>
660
661         [FreeType] Restore conditional compilation logic for recent HarfBuzz refactoring
662         https://bugs.webkit.org/show_bug.cgi?id=193036
663
664         Reviewed by Michael Catanzaro.
665
666         * platform/graphics/FontPlatformData.h:
667         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
668
669 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
670
671         Remove "using namespace std;"
672         https://bugs.webkit.org/show_bug.cgi?id=192973
673         <rdar://problem/46937309>
674
675         Unreviewed Windows port Debug builds fix.
676
677         No new tests since no behavior changes.
678
679         * accessibility/win/AXObjectCacheWin.cpp:
680         (WebCore::AXObjectCache::postPlatformNotification): Add "std::" prefix to numeric_limits in ASSERT macro.
681
682 2018-12-24  Fujii Hironori  <Hironori.Fujii@sony.com>
683
684         Remove "using namespace std;"
685         https://bugs.webkit.org/show_bug.cgi?id=192973
686
687         Reviewed by Alex Christensen.
688
689         Removed "using namespace std" statement, and use std:: prefix.
690
691         No new tests since no behavior changes.
692
693         * accessibility/win/AXObjectCacheWin.cpp:
694         * platform/graphics/GraphicsContext3DPrivate.cpp:
695         * platform/graphics/cairo/ImageBufferCairo.cpp:
696         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
697         * platform/graphics/win/FontWin.cpp:
698         (WebCore::FontCascade::floatWidthForComplexText const):
699         * platform/graphics/win/GraphicsContextCGWin.cpp:
700         * platform/graphics/win/GraphicsContextCairoWin.cpp:
701         * platform/graphics/win/GraphicsContextDirect2D.cpp:
702         * platform/graphics/win/GraphicsContextWin.cpp:
703         * platform/graphics/win/SimpleFontDataCGWin.cpp:
704         * platform/graphics/win/UniscribeController.cpp:
705         (WebCore::UniscribeController::UniscribeController):
706         (WebCore::UniscribeController::shapeAndPlaceItem):
707         * platform/image-decoders/ScalableImageDecoder.cpp:
708         * platform/text/LocaleICU.cpp:
709         * platform/text/win/LocaleWin.cpp:
710         * platform/win/ScrollbarThemeWin.cpp:
711         * rendering/RenderRubyRun.cpp:
712         (WebCore::RenderRubyRun::layoutBlock):
713         * rendering/RenderThemeWin.cpp:
714         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
715         (WebCore::RenderThemeWin::paintSearchFieldCancelButton):
716         (WebCore::RenderThemeWin::adjustSearchFieldCancelButtonStyle const):
717         (WebCore::RenderThemeWin::adjustSearchFieldResultsDecorationPartStyle const):
718         (WebCore::RenderThemeWin::paintSearchFieldResultsDecorationPart):
719         (WebCore::RenderThemeWin::adjustSearchFieldResultsButtonStyle const):
720         (WebCore::RenderThemeWin::paintSearchFieldResultsButton):
721
722 2018-12-24  Simon Fraser  <simon.fraser@apple.com>
723
724         Change ScrollingNodeType to an enum class
725         https://bugs.webkit.org/show_bug.cgi?id=193009
726
727         Reviewed by Zalan Bujtas.
728
729         Change the ScrollingNodeType enum to an enum class.
730         
731         No behavior change.
732
733         * page/scrolling/AsyncScrollingCoordinator.cpp:
734         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
735         * page/scrolling/ScrollingCoordinator.cpp:
736         (WebCore::operator<<):
737         * page/scrolling/ScrollingCoordinator.h:
738         * page/scrolling/ScrollingStateFixedNode.cpp:
739         (WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
740         * page/scrolling/ScrollingStateNode.h:
741         (WebCore::ScrollingStateNode::isFixedNode const):
742         (WebCore::ScrollingStateNode::isStickyNode const):
743         (WebCore::ScrollingStateNode::isFrameScrollingNode const):
744         (WebCore::ScrollingStateNode::isOverflowScrollingNode const):
745         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
746         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
747         * page/scrolling/ScrollingStateStickyNode.cpp:
748         (WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
749         * page/scrolling/ScrollingStateTree.cpp:
750         (WebCore::ScrollingStateTree::createNode):
751         (WebCore::ScrollingStateTree::attachNode):
752         * page/scrolling/ScrollingTreeNode.h:
753         (WebCore::ScrollingTreeNode::isFixedNode const):
754         (WebCore::ScrollingTreeNode::isStickyNode const):
755         (WebCore::ScrollingTreeNode::isFrameScrollingNode const):
756         (WebCore::ScrollingTreeNode::isOverflowScrollingNode const):
757         * page/scrolling/ScrollingTreeOverflowScrollingNode.cpp:
758         (WebCore::ScrollingTreeOverflowScrollingNode::ScrollingTreeOverflowScrollingNode):
759         * page/scrolling/ios/ScrollingTreeIOS.cpp:
760         (WebCore::ScrollingTreeIOS::createScrollingTreeNode):
761         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
762         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
763         * page/scrolling/mac/ScrollingTreeMac.cpp:
764         (ScrollingTreeMac::createScrollingTreeNode):
765         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
766         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
767         * platform/graphics/GraphicsLayerClient.h:
768         * rendering/RenderLayerCompositor.cpp:
769         (WebCore::RenderLayerCompositor::reattachSubframeScrollLayers):
770         (WebCore::scrollCoordinationRoleForNodeType):
771         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
772         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
773
774 2018-12-22  Carlos Garcia Campos  <cgarcia@igalia.com>
775
776         [HarfBuzz] Width not correctly reported as 0 for zero font size
777         https://bugs.webkit.org/show_bug.cgi?id=192986
778
779         Reviewed by Michael Catanzaro.
780
781         Fixes test fast/text/font-size-zero.html
782
783         * platform/graphics/harfbuzz/ComplexTextControllerHarfBuzz.cpp:
784         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun): Use empty advances for glyphs when the font
785         size is zero.
786
787 2018-12-20  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
788
789         Use Ref<> as much as possible
790         https://bugs.webkit.org/show_bug.cgi?id=192808
791
792         Reviewed by Alex Christensen.
793
794         * Modules/encryptedmedia/NavigatorEME.cpp:
795         (WebCore::NavigatorEME::requestMediaKeySystemAccess):
796         * Modules/fetch/FetchBody.cpp:
797         (WebCore::FetchBody::bodyAsFormData const):
798         * Modules/geolocation/Geolocation.cpp:
799         (WebCore::Geolocation::getCurrentPosition):
800         (WebCore::Geolocation::watchPosition):
801         * Modules/indexeddb/IDBDatabase.cpp:
802         (WebCore::IDBDatabase::objectStoreNames const):
803         * Modules/indexeddb/IDBDatabase.h:
804         * Modules/indexeddb/IDBObjectStore.cpp:
805         (WebCore::IDBObjectStore::indexNames const):
806         * Modules/indexeddb/IDBObjectStore.h:
807         * Modules/indexeddb/IDBTransaction.cpp:
808         (WebCore::IDBTransaction::scheduleOperation):
809         * Modules/indexeddb/IDBTransaction.h:
810         * Modules/indexeddb/client/TransactionOperation.h:
811         (WebCore::IDBClient::createTransactionOperation):
812         * Modules/mediastream/MediaDevices.cpp:
813         (WebCore::MediaDevices::getUserMedia const):
814         (WebCore::MediaDevices::getDisplayMedia const):
815         * Modules/mediastream/UserMediaRequest.cpp:
816         (WebCore::UserMediaRequest::create):
817         * Modules/mediastream/UserMediaRequest.h:
818         * Modules/webaudio/AudioParam.cpp:
819         (WebCore::AudioParam::calculateFinalValues):
820         * Modules/webaudio/ScriptProcessorNode.cpp:
821         (WebCore::ScriptProcessorNode::initialize):
822         * Modules/webdatabase/SQLStatement.cpp:
823         (WebCore::SQLStatement::execute):
824         * Modules/webgpu/WebGPU.cpp:
825         (WebCore::WebGPU::requestAdapter const):
826         * Modules/webgpu/WebGPUAdapter.cpp:
827         (WebCore::WebGPUAdapter::create):
828         * Modules/webgpu/WebGPUAdapter.h:
829         * Modules/webgpu/WebGPUBuffer.cpp:
830         (WebCore::WebGPUBuffer::create):
831         * Modules/webgpu/WebGPUBuffer.h:
832         * Modules/webgpu/WebGPUCommandBuffer.cpp:
833         (WebCore::WebGPUCommandBuffer::create):
834         (WebCore::WebGPUCommandBuffer::beginRenderPass):
835         * Modules/webgpu/WebGPUCommandBuffer.h:
836         * Modules/webgpu/WebGPUDevice.cpp:
837         (WebCore::WebGPUDevice::create):
838         (WebCore::WebGPUDevice::createBuffer const):
839         (WebCore::WebGPUDevice::createShaderModule const):
840         (WebCore::WebGPUDevice::createRenderPipeline const):
841         (WebCore::WebGPUDevice::createCommandBuffer const):
842         * Modules/webgpu/WebGPURenderPassEncoder.cpp:
843         (WebCore::WebGPURenderPassEncoder::create):
844         * Modules/webgpu/WebGPURenderPassEncoder.h:
845         * Modules/webgpu/WebGPURenderPipeline.cpp:
846         (WebCore::WebGPURenderPipeline::create):
847         * Modules/webgpu/WebGPURenderPipeline.h:
848         * Modules/webgpu/WebGPUShaderModule.cpp:
849         (WebCore::WebGPUShaderModule::create):
850         * Modules/webgpu/WebGPUShaderModule.h:
851         * Modules/webgpu/WebGPUTexture.cpp:
852         (WebCore::WebGPUTexture::createDefaultTextureView):
853         * Modules/webgpu/WebGPUTextureView.cpp:
854         (WebCore::WebGPUTextureView::create):
855         * Modules/webgpu/WebGPUTextureView.h:
856         * accessibility/AXObjectCache.cpp:
857         (WebCore::AXObjectCache::rangeMatchesTextNearRange):
858         * accessibility/atk/AXObjectCacheAtk.cpp:
859         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
860         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
861         (webkitAccessibleHyperlinkGetStartIndex):
862         (webkitAccessibleHyperlinkGetEndIndex):
863         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
864         (getSelectionOffsetsForObject):
865         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
866         (-[WebAccessibilityObjectWrapper _convertToNSRange:]):
867         * bindings/js/JSDOMGlobalObjectTask.cpp:
868         * bindings/js/JSDOMWindowBase.cpp:
869         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
870         * bindings/js/JSWorkerGlobalScopeBase.cpp:
871         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
872         * bindings/js/ScriptControllerMac.mm:
873         (WebCore::ScriptController::createScriptInstanceForWidget):
874         * bindings/js/SerializedScriptValue.cpp:
875         (WebCore::CloneDeserializer::readTerminal):
876         (WebCore::SerializedScriptValue::create):
877         * bridge/objc/objc_instance.h:
878         * bridge/objc/objc_instance.mm:
879         (ObjcInstance::create):
880         * css/CSSComputedStyleDeclaration.cpp:
881         (WebCore::ComputedStyleExtractor::currentColorOrValidColor const):
882         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
883         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
884         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
885         * css/CSSComputedStyleDeclaration.h:
886         * css/CSSFontFaceSource.cpp:
887         (WebCore::CSSFontFaceSource::load):
888         * css/CSSStyleSheet.cpp:
889         (WebCore::CSSStyleSheet::rules):
890         * css/FontFace.cpp:
891         (WebCore::FontFace::unicodeRange const):
892         (WebCore::FontFace::featureSettings const):
893         * css/InspectorCSSOMWrappers.cpp:
894         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
895         * css/SVGCSSComputedStyleDeclaration.cpp:
896         (WebCore::strokeDashArrayToCSSValueList):
897         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
898         * css/StyleResolver.cpp:
899         (WebCore::StyleResolver::createFilterOperations):
900         * css/StyleRule.cpp:
901         (WebCore::StyleRuleBase::createCSSOMWrapper const):
902         * css/StyleRule.h:
903         * dom/ChildListMutationScope.cpp:
904         (WebCore::ChildListMutationAccumulator::getOrCreate):
905         * dom/ChildListMutationScope.h:
906         * dom/DocumentMarkerController.cpp:
907         (WebCore::updateRenderedRectsForMarker):
908         * dom/InlineStyleSheetOwner.cpp:
909         (WebCore::InlineStyleSheetOwner::createSheet):
910         * dom/PointerEvent.h:
911         * dom/UserGestureIndicator.h:
912         (WebCore::UserGestureToken::create):
913         * editing/AlternativeTextController.cpp:
914         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
915         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
916         (WebCore::AlternativeTextController::respondToUnappliedEditing):
917         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand):
918         (WebCore::AlternativeTextController::respondToMarkerAtEndOfWord):
919         * editing/ApplyStyleCommand.cpp:
920         (WebCore::ApplyStyleCommand::applyBlockStyle):
921         (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode):
922         * editing/CompositeEditCommand.cpp:
923         (WebCore::CompositeEditCommand::targetRanges const):
924         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
925         (WebCore::CompositeEditCommand::moveParagraphs):
926         * editing/DeleteSelectionCommand.cpp:
927         (WebCore::DeleteSelectionCommand::mergeParagraphs):
928         * editing/Editing.cpp:
929         (WebCore::visiblePositionForIndexUsingCharacterIterator):
930         * editing/EditingStyle.cpp:
931         (WebCore::EditingStyle::removeStyleConflictingWithStyleOfNode):
932         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement const):
933         (WebCore::EditingStyle::prepareToApplyAt):
934         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
935         (WebCore::EditingStyle::mergeStyleFromRulesForSerialization):
936         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
937         (WebCore::extractPropertiesNotIn):
938         * editing/Editor.cpp:
939         (WebCore::Editor::setBaseWritingDirection):
940         (WebCore::Editor::setComposition):
941         * editing/EditorCommand.cpp:
942         (WebCore::executeApplyParagraphStyle):
943         (WebCore::executeMakeTextWritingDirectionLeftToRight):
944         (WebCore::executeMakeTextWritingDirectionNatural):
945         (WebCore::executeMakeTextWritingDirectionRightToLeft):
946         * editing/FormatBlockCommand.cpp:
947         (WebCore::FormatBlockCommand::formatRange):
948         * editing/RemoveFormatCommand.cpp:
949         (WebCore::RemoveFormatCommand::doApply):
950         * editing/ReplaceRangeWithTextCommand.cpp:
951         (WebCore::ReplaceRangeWithTextCommand::targetRanges const):
952         * editing/ReplaceSelectionCommand.cpp:
953         (WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline):
954         (WebCore::handleStyleSpansBeforeInsertion):
955         (WebCore::ReplaceSelectionCommand::handleStyleSpans):
956         * editing/SpellingCorrectionCommand.cpp:
957         (WebCore::SpellingCorrectionCommand::targetRanges const):
958         * editing/TextCheckingHelper.cpp:
959         (WebCore::TextCheckingHelper::findFirstMisspellingOrBadGrammar):
960         * editing/TypingCommand.cpp:
961         (WebCore::TypingCommand::insertText):
962         (WebCore::TypingCommand::willAddTypingToOpenCommand):
963         * editing/VisibleUnits.cpp:
964         (WebCore::distanceBetweenPositions):
965         * editing/cocoa/EditorCocoa.mm:
966         (WebCore::Editor::selectionInWebArchiveFormat):
967         * editing/ios/DictationCommandIOS.cpp:
968         (WebCore::DictationCommandIOS::doApply):
969         * editing/ios/EditorIOS.mm:
970         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
971         (WebCore::Editor::removeUnchangeableStyles):
972         (WebCore::Editor::writeImageToPasteboard):
973         * editing/mac/EditorMac.mm:
974         (WebCore::Editor::replaceNodeFromPasteboard):
975         (WebCore::Editor::imageInWebArchiveFormat):
976         * editing/markup.cpp:
977         (WebCore::styleFromMatchedRulesAndInlineDecl):
978         (WebCore::createFragmentForTransformToFragment):
979         * fileapi/FileReaderLoader.cpp:
980         (WebCore::FileReaderLoader::didFinishLoading):
981         * html/FTPDirectoryDocument.cpp:
982         (WebCore::createTemplateDocumentData):
983         * html/HTMLMediaElement.cpp:
984         (WebCore::HTMLMediaElement::scheduleEvent):
985         (WebCore::HTMLMediaElement::createMediaControls):
986         * html/HTMLTableElement.cpp:
987         (WebCore::HTMLTableElement::createSharedCellStyle):
988         * html/HTMLTableElement.h:
989         * html/URLUtils.h:
990         (WebCore::URLUtils<T>::origin const):
991         * html/parser/HTMLConstructionSite.cpp:
992         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
993         * html/shadow/TextControlInnerElements.cpp:
994         (WebCore::TextControlInnerElement::resolveCustomStyle):
995         * html/track/WebVTTParser.cpp:
996         (WebCore::WebVTTParser::createNewCue):
997         * inspector/DOMPatchSupport.cpp:
998         * inspector/InspectorCanvas.cpp:
999         (WebCore::InspectorCanvas::buildInitialState):
1000         (WebCore::InspectorCanvas::buildAction):
1001         * inspector/InspectorFrontendClientLocal.cpp:
1002         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1003         * inspector/InspectorStyleSheet.cpp:
1004         (WebCore::asCSSRuleList):
1005         (WebCore::InspectorStyle::styleWithProperties const):
1006         (WebCore::InspectorStyleSheet::ensureSourceData):
1007         * inspector/agents/InspectorCanvasAgent.cpp:
1008         (WebCore::InspectorCanvasAgent::didCreateCanvasRenderingContext):
1009         * inspector/agents/InspectorIndexedDBAgent.cpp:
1010         (WebCore::Inspector::keyPathFromIDBKeyPath):
1011         * inspector/agents/InspectorPageAgent.cpp:
1012         (WebCore::InspectorPageAgent::archive):
1013         * loader/EmptyClients.cpp:
1014         (WebCore::EmptyStorageNamespaceProvider::createSessionStorageNamespace):
1015         (WebCore::EmptyStorageNamespaceProvider::createLocalStorageNamespace):
1016         (WebCore::EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace):
1017         (WebCore::EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace):
1018         * loader/FrameLoader.cpp:
1019         (WebCore::FrameLoader::loadURL):
1020         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
1021         (WebCore::FrameLoader::loadDifferentDocumentItem):
1022         * loader/WorkerThreadableLoader.cpp:
1023         (WebCore::WorkerThreadableLoader::loadResourceSynchronously):
1024         * loader/archive/mhtml/MHTMLParser.cpp:
1025         (WebCore::MHTMLParser::addResourceToArchive):
1026         (WebCore::MHTMLParser::parseNextPart):
1027         * loader/cache/MemoryCache.cpp:
1028         (WebCore::MemoryCache::addImageToCache):
1029         (WebCore::MemoryCache::removeResourcesWithOrigin):
1030         * page/DOMWindow.cpp:
1031         (WebCore::DOMWindow::getMatchedCSSRules const):
1032         (WebCore::DOMWindow::createWindow):
1033         * page/EventHandler.cpp:
1034         (WebCore::textDistance):
1035         * page/Page.cpp:
1036         (WebCore::Page::userStyleSheet const):
1037         * page/animation/CSSPropertyAnimation.cpp:
1038         (WebCore::blendFilterOperations):
1039         * page/ios/FrameIOS.mm:
1040         (WebCore::Frame::initWithSimpleHTMLDocument):
1041         (WebCore::Frame::interpretationsForCurrentRoot const):
1042         * page/mac/ServicesOverlayController.mm:
1043         (WebCore::ServicesOverlayController::Highlight::fadeIn):
1044         (WebCore::ServicesOverlayController::Highlight::fadeOut):
1045         * platform/SharedBuffer.cpp:
1046         (WebCore::SharedBuffer::tryCreateArrayBuffer const):
1047         * platform/audio/HRTFElevation.cpp:
1048         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
1049         * platform/audio/SincResampler.cpp:
1050         (WebCore::SincResampler::consumeSource):
1051         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1052         (WebCore::AudioFileReader::createBus):
1053         * platform/audio/mac/AudioFileReaderMac.cpp:
1054         (WebCore::AudioFileReader::createBus):
1055         * platform/graphics/Icon.h:
1056         (WebCore::Icon::create):
1057         * platform/graphics/InbandTextTrackPrivate.h:
1058         (WebCore::InbandTextTrackPrivate::create):
1059         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1060         (WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
1061         * platform/graphics/avfoundation/objc/AudioTrackPrivateMediaSourceAVFObjC.h:
1062         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1063         (WebCore::fulfillRequestWithKeyData):
1064         (WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):
1065         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1066         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1067         (WebCore::MediaSourcePrivateAVFObjC::create):
1068         (WebCore::MediaSourcePrivateAVFObjC::addSourceBuffer):
1069         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1070         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1071         (WebCore::SourceBufferPrivateAVFObjC::create):
1072         (WebCore::SourceBufferPrivateAVFObjC::didParseStreamDataAsAsset):
1073         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
1074         * platform/graphics/ca/TileController.cpp:
1075         (WebCore::TileController::createTileLayer):
1076         * platform/graphics/ca/TileController.h:
1077         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
1078         (WebCore::CACFLayerTreeHost::acceleratedCompositingAvailable):
1079         (WebCore::CACFLayerTreeHost::create):
1080         * platform/graphics/gpu/cocoa/GPUBufferMetal.mm:
1081         (WebCore::GPUBuffer::create):
1082         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1083         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
1084         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
1085         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
1086         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
1087         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1088         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection):
1089         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
1090         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1091         (WebCore::MediaPlayerPrivateGStreamerBase::paint):
1092         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1093         (WebCore::AppendPipeline::appsinkNewSample):
1094         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
1095         (WebCore::ISOProtectionSystemSpecificHeaderBox::parse):
1096         * platform/graphics/iso/ISOTrackEncryptionBox.cpp:
1097         (WebCore::ISOTrackEncryptionBox::parse):
1098         * platform/graphics/texmap/TextureMapperAnimation.cpp:
1099         (WebCore::applyFilterAnimation):
1100         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
1101         (WebCore::TextureMapperPlatformLayerBuffer::clone):
1102         * platform/graphics/transforms/TransformOperations.cpp:
1103         (WebCore::TransformOperations::blendByMatchingOperations const):
1104         * platform/image-decoders/ico/ICOImageDecoder.cpp:
1105         (WebCore::ICOImageDecoder::setDataForPNGDecoderAtIndex):
1106         * platform/mock/mediasource/MockBox.cpp:
1107         (WebCore::MockInitializationBox::MockInitializationBox):
1108         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
1109         (WebCore::MockSourceBufferPrivate::create):
1110         (WebCore::MockSourceBufferPrivate::append):
1111         * platform/mock/mediasource/MockSourceBufferPrivate.h:
1112         * platform/mock/mediasource/MockTracks.h:
1113         (WebCore::MockTextTrackPrivate::create):
1114         (WebCore::MockVideoTrackPrivate::create):
1115         * platform/network/FormData.h:
1116         (WebCore::FormData::decode):
1117         * platform/network/cocoa/CookieStorageObserver.h:
1118         * platform/network/cocoa/CookieStorageObserver.mm:
1119         (WebCore::CookieStorageObserver::create):
1120         * platform/network/soup/ResourceRequestSoup.cpp:
1121         (WebCore::appendEncodedBlobItemToSoupMessageBody):
1122         (WebCore::ResourceRequest::updateSoupMessageBody const):
1123         * platform/text/hyphen/HyphenationLibHyphen.cpp:
1124         (WebCore::HyphenationDictionary::createNull):
1125         (WebCore::HyphenationDictionary::create):
1126         * platform/win/SearchPopupMenuWin.cpp:
1127         (WebCore::SearchPopupMenuWin::SearchPopupMenuWin):
1128         (WebCore::SearchPopupMenuWin::popupMenu):
1129         * platform/win/SearchPopupMenuWin.h:
1130         * rendering/RenderThemeIOS.mm:
1131         (WebCore::applyCommonButtonPaddingToStyle):
1132         (WebCore::RenderThemeIOS::paintProgressBar):
1133         (WebCore::RenderThemeIOS::adjustButtonStyle const):
1134         (WebCore::paintAttachmentIcon):
1135         * rendering/svg/SVGRenderTreeAsText.cpp:
1136         (WebCore::writeSVGResourceContainer):
1137         * storage/Storage.cpp:
1138         (WebCore::Storage::create):
1139         (WebCore::Storage::Storage):
1140         * storage/Storage.h:
1141         (WebCore::Storage::area const):
1142         * storage/StorageNamespace.h:
1143         * storage/StorageNamespaceProvider.cpp:
1144         (WebCore::StorageNamespaceProvider::localStorageArea):
1145         * storage/StorageNamespaceProvider.h:
1146         * svg/SVGElement.cpp:
1147         (WebCore::SVGElement::getPresentationAttribute):
1148         * svg/SVGFEBlendElement.cpp:
1149         (WebCore::SVGFEBlendElement::build):
1150         * svg/SVGFEColorMatrixElement.cpp:
1151         (WebCore::SVGFEColorMatrixElement::build):
1152         * svg/SVGFEComponentTransferElement.cpp:
1153         (WebCore::SVGFEComponentTransferElement::build):
1154         * svg/SVGFECompositeElement.cpp:
1155         (WebCore::SVGFECompositeElement::build):
1156         * svg/SVGFEDiffuseLightingElement.cpp:
1157         (WebCore::SVGFEDiffuseLightingElement::build):
1158         * svg/SVGFEDisplacementMapElement.cpp:
1159         (WebCore::SVGFEDisplacementMapElement::build):
1160         * svg/SVGFEDropShadowElement.cpp:
1161         (WebCore::SVGFEDropShadowElement::build):
1162         * svg/SVGFEGaussianBlurElement.cpp:
1163         (WebCore::SVGFEGaussianBlurElement::build):
1164         * svg/SVGFEMergeElement.cpp:
1165         (WebCore::SVGFEMergeElement::build):
1166         * svg/SVGFEMorphologyElement.cpp:
1167         (WebCore::SVGFEMorphologyElement::build):
1168         * svg/SVGFEOffsetElement.cpp:
1169         (WebCore::SVGFEOffsetElement::build):
1170         * svg/SVGFESpecularLightingElement.cpp:
1171         (WebCore::SVGFESpecularLightingElement::build):
1172         * svg/SVGFETileElement.cpp:
1173         (WebCore::SVGFETileElement::build):
1174         * testing/GCObservation.h:
1175         * xml/XSLTProcessor.cpp:
1176         (WebCore::XSLTProcessor::createDocumentFromSource):
1177         * xml/parser/XMLDocumentParser.cpp:
1178         (WebCore::XMLDocumentParser::parseDocumentFragment):
1179
1180 2018-12-21  Chris Dumez  <cdumez@apple.com>
1181
1182         navigator.userAgent in service workers does not reflect customUserAgent set by client
1183         https://bugs.webkit.org/show_bug.cgi?id=192951
1184
1185         Reviewed by Youenn Fablet.
1186
1187         Whenever a service worker client registers itself, also pass its effective user agent.
1188         In the network process, for each origin, we store the latest client's user agent and
1189         use it when starting the service worker.
1190
1191         * dom/Document.cpp:
1192         (WebCore::Document::setServiceWorkerConnection):
1193         * loader/DocumentLoader.cpp:
1194         (WebCore::DocumentLoader::registerTemporaryServiceWorkerClient):
1195         * workers/service/SWClientConnection.h:
1196         * workers/service/server/SWServer.cpp:
1197         (WebCore::SWServer::serviceWorkerClientUserAgent const):
1198         (WebCore::SWServer::installContextData):
1199         (WebCore::SWServer::runServiceWorker):
1200         (WebCore::SWServer::registerServiceWorkerClient):
1201         * workers/service/server/SWServer.h:
1202         * workers/service/server/SWServerToContextConnection.h:
1203         * workers/service/server/SWServerWorker.cpp:
1204         (WebCore::SWServerWorker::userAgent const):
1205         * workers/service/server/SWServerWorker.h:
1206
1207 2018-12-21  Youenn Fablet  <youenn@apple.com>
1208
1209         RTCRtpSender.setParameters() does set active parameter
1210         https://bugs.webkit.org/show_bug.cgi?id=192848
1211
1212         Reviewed by Eric Carlson.
1213
1214         Covered by updated test.
1215
1216         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
1217         (WebCore::updateRTCRtpSendParameters):
1218         The routine was updating the local value, not the out parameter.
1219
1220 2018-12-21  Eric Carlson  <eric.carlson@apple.com>
1221
1222         'ended' Event doesn't fire on MediaStreamTrack when a USB camera is unplugged
1223         https://bugs.webkit.org/show_bug.cgi?id=187896
1224         <rdar://problem/42681445>
1225
1226         Reviewed by Jer Noble.
1227
1228         No new tests, tested manually.
1229
1230         * platform/mediastream/mac/AVVideoCaptureSource.h:
1231         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1232         (WebCore::AVVideoCaptureSource::deviceDisconnected):
1233         (-[WebCoreAVVideoCaptureSourceObserver addNotificationObservers]):
1234         (-[WebCoreAVVideoCaptureSourceObserver removeNotificationObservers]):
1235         (-[WebCoreAVVideoCaptureSourceObserver deviceConnectedDidChange:]):
1236         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
1237         (WebCore::deviceHasInputStreams):
1238         (WebCore::isValidCaptureDevice):
1239         (WebCore::CoreAudioCaptureDeviceManager::coreAudioCaptureDevices):
1240         (WebCore::CoreAudioCaptureDeviceManager::refreshAudioCaptureDevices):
1241         (WebCore::CoreAudioCaptureDeviceManager::devicesChanged): Deleted.
1242         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.h:
1243         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
1244         (WebCore::CoreAudioSharedUnit::setCaptureDevice):
1245         (WebCore::CoreAudioSharedUnit::devicesChanged):
1246         (WebCore::CoreAudioSharedUnit::startProducingData):
1247         (WebCore::CoreAudioSharedUnit::startInternal):
1248         (WebCore::CoreAudioSharedUnit::verifyIsCapturing):
1249         (WebCore::CoreAudioSharedUnit::captureFailed):
1250         (WebCore::CoreAudioCaptureSourceFactory::devicesChanged):
1251         (WebCore::CoreAudioCaptureSource::CoreAudioCaptureSource):
1252         (WebCore::CoreAudioSharedUnit::setCaptureDeviceID): Deleted.
1253         * platform/mediastream/mac/CoreAudioCaptureSource.h:
1254
1255 2018-12-20  Ryosuke Niwa  <rniwa@webkit.org>
1256
1257         REGRESSION(r239353): iOS WK1 Assertion failure in notifyChildNodeRemoved while running
1258         TestWebKitAPI.QuickLook.LegacyQuickLookContent
1259         https://bugs.webkit.org/show_bug.cgi?id=192859
1260         <rdar://problem/46887237>
1261
1262         Reviewed by Antti Koivisto.
1263
1264         After r239353, ScriptDisallowedScope::InMainThread::isScriptAllowed() may return false when the web thread
1265         is inside a delegate callback even when there is a ScriptDisallowedScope defined.
1266
1267         Replace the existign debug assertions which assert !ScriptDisallowedScope::InMainThread::isScriptAllowed()
1268         by a newly added ScriptDisallowedScope::InMainThread::hasDisallowedScope to avoid hitting this assertion.
1269
1270         Tests: TestWebKitAPI.QuickLook.LegacyQuickLookContent
1271
1272         * dom/ContainerNodeAlgorithms.cpp:
1273         (WebCore::notifyChildNodeInserted):
1274         (WebCore::notifyChildNodeRemoved):
1275         * dom/Document.cpp:
1276         (WebCore::Document::nodeChildrenWillBeRemoved):
1277         (WebCore::Document::nodeWillBeRemoved):
1278         * dom/ScriptDisallowedScope.h:
1279         (WebCore::ScriptDisallowedScope::InMainThread::hasDisallowedScope):
1280         * html/HTMLFormElement.cpp:
1281         (WebCore:: const):
1282
1283 2018-12-21  Joseph Pecoraro  <pecoraro@apple.com>
1284
1285         Update status of some WebCore features in features.json
1286         https://bugs.webkit.org/show_bug.cgi?id=192998
1287
1288         Reviewed by Tim Horton.
1289
1290         * features.json:
1291         - Variation Fonts: Supported
1292         - Conic Gradients: Supported in Preview
1293         - Web Share: Supported in Preview
1294         - <datalist>: Supported in Preview
1295         - Intersection Observers: Supported in Preview
1296
1297 2018-12-21  Zalan Bujtas  <zalan@apple.com>
1298
1299         [iOS] Using file upload can trigger a crash under RenderThemeIOS::paintFileUploadIconDecorations()
1300         https://bugs.webkit.org/show_bug.cgi?id=192357
1301         <rdar://problem/42852260>
1302
1303         Reviewed by Simon Fraser.
1304
1305         Do not try to paint the file picker when painting is disabled.
1306
1307         * rendering/RenderFileUploadControl.cpp:
1308         (WebCore::RenderFileUploadControl::paintObject):
1309
1310 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
1311
1312         [WebAuthN] userPresence should always be true
1313         https://bugs.webkit.org/show_bug.cgi?id=192835
1314         <rdar://problem/46538788>
1315
1316         Reviewed by Brent Fulgham.
1317
1318         In the current spec as of 7 August 2018, userPresence is suggested to set to the inverse of userVerification.
1319         This doesn't comply with the CTAP spec. Details in: https://github.com/w3c/webauthn/issues/1123.
1320         After discussing with other members of the working group, we decided to make userPresence always default to true.
1321
1322         Covered by exisiting tests.
1323
1324         * Modules/webauthn/fido/DeviceRequestConverter.cpp:
1325         (fido::encodeGetAssertionRequestAsCBOR):
1326
1327 2018-12-21  Jiewen Tan  <jiewen_tan@apple.com>
1328
1329         [WebAuthN] Import an APDU coder from Chromium
1330         https://bugs.webkit.org/show_bug.cgi?id=192949
1331         <rdar://problem/46879933>
1332
1333         Reviewed by Brent Fulgham.
1334
1335         This patch imports an APDU coder from Chromium. Here is the documentation:
1336         https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#u2f-message-framing
1337         APDU is a binary format to frame any U2F requests/responses into binaries. It is equivalent to CBOR in CTAP2.
1338
1339         Here is a list of files that are imported from Chromium:
1340         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.cc?rcl=a2f290c10d132f53518e7f99d5635ee814ff8090
1341         https://cs.chromium.org/chromium/src/components/apdu/apdu_command.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1342         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1343         https://cs.chromium.org/chromium/src/components/apdu/apdu_response.h?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1344         https://cs.chromium.org/chromium/src/components/apdu/apdu_unittest.cc?rcl=867b103481f6f4ccc79a69bba16c11eefac3cdb6
1345
1346         Covered by API tests.
1347
1348         * Modules/webauthn/apdu/ApduCommand.cpp: Added.
1349         (apdu::ApduCommand::createFromMessage):
1350         (apdu::ApduCommand::ApduCommand):
1351         (apdu::ApduCommand::getEncodedCommand const):
1352         * Modules/webauthn/apdu/ApduCommand.h: Added.
1353         * Modules/webauthn/apdu/ApduResponse.cpp: Added.
1354         (apdu::ApduResponse::createFromMessage):
1355         (apdu::ApduResponse::ApduResponse):
1356         (apdu::ApduResponse::getEncodedResponse const):
1357         * Modules/webauthn/apdu/ApduResponse.h: Added.
1358         * Sources.txt:
1359         * WebCore.xcodeproj/project.pbxproj:
1360
1361 2018-12-21  Jer Noble  <jer.noble@apple.com>
1362
1363         Convert raw CDMSessionMediaSourceAVFObjC pointer in MediaPlayerPrivateMediaSourceAVFObjC
1364         https://bugs.webkit.org/show_bug.cgi?id=192985
1365         <rdar://problem/46750743>
1366
1367         Reviewed by Eric Carlson.
1368
1369         Make m_session a RefPtr; drive-by fix: make m_mediaElement in WebKitMediaKeys a WeakPtr.
1370
1371         * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
1372         (WebCore::WebKitMediaKeys::setMediaElement):
1373         * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
1374         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
1375         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1376         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1377         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1378         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
1379
1380 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
1381
1382         CSS variables don't work for colors in "border" property
1383         https://bugs.webkit.org/show_bug.cgi?id=192922
1384
1385         Reviewed by Simon Fraser.
1386
1387         ParseColorFunction no longer consumes anything if the color was not valid.
1388
1389         Test: css-custom-properties-api/border-variable-parsing.html
1390
1391         * css/parser/CSSPropertyParserHelpers.cpp:
1392         (WebCore::CSSPropertyParserHelpers::parseColorFunction):
1393
1394 2018-12-21  Justin Fan  <justin_fan@apple.com>
1395
1396         [WebGPU] GPUBindGroupLayout refactoring: no HashMap, and failure logging
1397         https://bugs.webkit.org/show_bug.cgi?id=192990
1398
1399         Reviewed by Myles C. Maxfield.
1400
1401         Refactor away the unnecessary HashMaps when creating MTLArgumentEncoders in GPUBindGroupLayout creation.
1402         Also update GPUBindGroupLayout::create -> tryCreate, in order to better handle Objective-C exceptions.
1403
1404         No new tests; no change in behavior.
1405
1406         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
1407         (WebCore::WebGPUBindGroupLayout::create):
1408         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
1409         * Modules/webgpu/WebGPUBindGroupLayout.h:
1410         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const):
1411         * Modules/webgpu/WebGPUDevice.cpp:
1412         (WebCore::WebGPUDevice::createBindGroupLayout const):
1413         * platform/graphics/gpu/GPUBindGroupLayout.h:
1414         * platform/graphics/gpu/GPUDevice.cpp:
1415         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Renamed from ::create*. Now returning a RefPtr. 
1416         (WebCore::GPUDevice::createBindGroupLayout const): Deleted.
1417         * platform/graphics/gpu/GPUDevice.h:
1418         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
1419         (WebCore::appendArgumentToArray):
1420         (WebCore::newEncoder):
1421         (WebCore::GPUBindGroupLayout::tryCreate): Renamed from ::create. Now returning a RefPtr.
1422         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
1423         (WebCore::appendArgumentToArrayInMap): Deleted.
1424         (WebCore::GPUBindGroupLayout::create): Deleted.
1425
1426         Deleted unneeded GPUBindGroupLayout.cpp:
1427         * Sources.txt:
1428         * WebCore.xcodeproj/project.pbxproj:
1429         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Removed.
1430
1431 2018-12-21  Alejandro G. Castro  <alex@igalia.com>
1432
1433         [GTK][WPE] Add DeviceIdHashSaltStorage disk persistence
1434         https://bugs.webkit.org/show_bug.cgi?id=190466
1435
1436         Reviewed by Youenn Fablet.
1437
1438         Added persistency to the DeviceIdHashSaltStorage.
1439
1440         * platform/glib/FileSystemGlib.cpp:
1441         (WebCore::FileSystem::getFileSize): Implemented this function to
1442         allow sharing code with the statistics storage class.
1443         * platform/glib/KeyedDecoderGlib.cpp:
1444         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant): Added a
1445         condition to control situations where the key is empty, it can
1446         happen if the user modifies the file in the disk.
1447         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp: Add include
1448         to make work compilation with debug, unified builds.
1449
1450 2018-12-21  Zalan Bujtas  <zalan@apple.com>
1451
1452         Synchronous media query evaluation could destroy current Frame/FrameView.
1453         https://bugs.webkit.org/show_bug.cgi?id=192781
1454         <rdar://problem/34416793>
1455
1456         Reviewed by Chris Dumez.
1457
1458         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
1459
1460         Test: printing/print-with-media-query-destory.html
1461
1462         * loader/DocumentLoader.cpp:
1463         (WebCore::DocumentLoader::finishedLoading):
1464         * page/Frame.cpp:
1465         (WebCore::Frame::setPrinting):
1466         * page/FrameView.cpp:
1467         (WebCore::FrameView::forceLayoutForPagination):
1468         * page/PrintContext.cpp:
1469         (WebCore::PrintContext::PrintContext):
1470         (WebCore::PrintContext::computePageRects):
1471         (WebCore::PrintContext::computePageRectsWithPageSizeInternal):
1472         (WebCore::PrintContext::begin):
1473         (WebCore::PrintContext::computeAutomaticScaleFactor):
1474         (WebCore::PrintContext::spoolPage):
1475         (WebCore::PrintContext::spoolRect):
1476         (WebCore::PrintContext::end):
1477         * page/PrintContext.h:
1478         (WebCore::PrintContext::frame const): Deleted.
1479
1480 2018-12-21  Wenson Hsieh  <wenson_hsieh@apple.com>
1481
1482         Setting the file wrapper and content type of an attachment to a PDF should update its image
1483         https://bugs.webkit.org/show_bug.cgi?id=192984
1484         <rdar://problem/46798028>
1485
1486         Reviewed by Tim Horton.
1487
1488         Allow PDF data to be used to update enclosing image elements when setting the file wrapper for an attachment.
1489         Covered by a new API test: WKAttachmentTests.SetFileWrapperForPDFImageAttachment.
1490
1491         * html/HTMLAttachmentElement.cpp:
1492         (WebCore::mimeTypeIsSuitableForInlineImageAttachment):
1493         (WebCore::HTMLAttachmentElement::updateEnclosingImageWithData):
1494
1495 2018-12-21  Justin Michaud  <justin_michaud@apple.com>
1496
1497         Repeated background images with zero size should display the background color
1498         https://bugs.webkit.org/show_bug.cgi?id=192962
1499
1500         Reviewed by Antti Koivisto.
1501
1502         Test: fast/backgrounds/background-repeat-with-zero-size.html
1503
1504         * platform/LengthSize.h:
1505         (WebCore::LengthSize::isEmpty const):
1506         * rendering/RenderBoxModelObject.cpp:
1507         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
1508         * rendering/style/FillLayer.h:
1509         (WebCore::FillLayer::isEmpty const):
1510
1511 2018-12-21  Manuel Rego Casasnovas  <rego@igalia.com>
1512
1513         [css-grid] Fix percentages in relative offsets for grid items
1514         https://bugs.webkit.org/show_bug.cgi?id=190492
1515
1516         Reviewed by Sergio Villar Senin.
1517
1518         The method RenderBoxModelObject::relativePositionOffset() was not considering the case of grid items,
1519         where the containing block is the grid area.
1520         The patch modifies the method so the new code uses overrideContainingBlockContentWidth|Height when required.
1521
1522         Test: imported/w3c/web-platform-tests/css/css-grid/grid-items/grid-items-relative-offsets-002.html
1523
1524         * rendering/RenderBox.cpp: Implement the physical versions of the already existent methods.
1525         (WebCore::RenderBox::overrideContainingBlockContentWidth const):
1526         (WebCore::RenderBox::overrideContainingBlockContentHeight const):
1527         (WebCore::RenderBox::hasOverrideContainingBlockContentWidth const):
1528         (WebCore::RenderBox::hasOverrideContainingBlockContentHeight const):
1529         * rendering/RenderBox.h:
1530         * rendering/RenderBoxModelObject.cpp:
1531         (WebCore::RenderBoxModelObject::relativePositionOffset const): Modified method
1532         to take into account overrideContainingBlockContentWidth|Height for grid items.
1533         * rendering/RenderBoxModelObject.h: Added new headers for physical virtual methods
1534         that will be overridden in RenderBox.
1535         (WebCore::RenderBoxModelObject::overrideContainingBlockContentWidth const):
1536         (WebCore::RenderBoxModelObject::overrideContainingBlockContentHeight const):
1537         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentWidth const):
1538         (WebCore::RenderBoxModelObject::hasOverrideContainingBlockContentHeight const):
1539
1540 2018-12-20  Justin Fan  <justin_fan@apple.com>
1541
1542         [WebGPU] Convert WebGPUBindGroups into MTLArgumentEncoders
1543         https://bugs.webkit.org/show_bug.cgi?id=192956
1544
1545         Reviewed by Myles Maxfield.
1546
1547         No testable behavior change. Existing tests cover possible crashing.
1548
1549         Add GPUBindGroupLayoutMetal.mm:
1550         * SourcesCocoa.txt:
1551         * WebCore.xcodeproj/project.pbxproj:
1552
1553         Flesh out GPUBindGroupLayout::create:
1554         * platform/graphics/gpu/GPUBindGroupLayout.cpp:
1555         * platform/graphics/gpu/GPUBindGroupLayout.h:
1556         * platform/graphics/gpu/GPUDevice.cpp:
1557         (WebCore::GPUDevice::createBindGroupLayout const):
1558         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm: Added.
1559         (WebCore::appendArgumentToArrayInMap): Added.
1560         (WebCore::GPUBindGroupLayout::create):
1561         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
1562         (WebCore::MTLDataTypeForBindingType): Added.
1563
1564 2018-12-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1565
1566         Unreviewed, remove stray #pragma once added to .cpp file
1567
1568         * svg/properties/SVGAttributeOwnerProxy.cpp:
1569
1570 2018-12-20  Justin Michaud  <justin_michaud@apple.com>
1571
1572         Adding runtime-enabled attribute to Element prevents inlining property access
1573         https://bugs.webkit.org/show_bug.cgi?id=192901
1574
1575         Add a call to flattenDictionaryObject after disabling runtime-enabled attributes.
1576
1577         Reviewed by Ryosuke Niwa.
1578
1579         * bindings/scripts/CodeGeneratorJS.pm:
1580         (GenerateImplementation):
1581         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1582         (WebCore::JSTestEnabledBySettingPrototype::finishCreation):
1583         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1584         (WebCore::JSTestGenerateIsReachablePrototype::finishCreation):
1585         * bindings/scripts/test/JS/JSTestNode.cpp:
1586         (WebCore::JSTestNodePrototype::finishCreation):
1587         * bindings/scripts/test/JS/JSTestObj.cpp:
1588         (WebCore::JSTestObjPrototype::finishCreation):
1589
1590 2018-12-20  Chris Dumez  <cdumez@apple.com>
1591
1592         Use Optional::hasValue() instead of Optional::has_value()
1593         https://bugs.webkit.org/show_bug.cgi?id=192948
1594
1595         Reviewed by Tim Horton.
1596
1597         * bindings/js/DOMPromiseProxy.h:
1598         (WebCore::DOMPromiseProxy<IDLType>::isFulfilled const):
1599         (WebCore::DOMPromiseProxy<IDLVoid>::isFulfilled const):
1600         (WebCore::DOMPromiseProxyWithResolveCallback<IDLType>::isFulfilled const):
1601         * dom/DataTransferItemList.h:
1602         (WebCore::DataTransferItemList::hasItems const):
1603         * dom/EventTarget.cpp:
1604         (WebCore::EventTarget::addEventListener):
1605         * html/HTMLMediaElement.cpp:
1606         (WebCore::HTMLMediaElement::captionDisplayMode):
1607         * platform/graphics/MediaPlayer.cpp:
1608         (WebCore::MediaPlayer::wouldTaintOrigin const):
1609         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
1610         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
1611         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1612         (WebCore::MediaPlayerPrivateGStreamerMSE::trackDetected):
1613         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
1614         (webKitMediaSrcUpdatePresentationSize):
1615         * platform/mac/NSScrollerImpDetails.mm:
1616         (WebCore::ScrollerStyle::recommendedScrollerStyle):
1617         * rendering/RenderListItem.cpp:
1618         (WebCore::RenderListItem::setExplicitValue):
1619
1620 2018-12-20  Chris Dumez  <cdumez@apple.com>
1621
1622         Move HTTPS_UPGRADE code behind a runtime flag, off by default
1623         https://bugs.webkit.org/show_bug.cgi?id=192937
1624
1625         Reviewed by Youenn Fablet.
1626
1627         Move HTTPS_UPGRADE code behind a runtime flag, off by default and drop the build time flag.
1628
1629         * page/Settings.yaml:
1630
1631 2018-12-20  Youenn Fablet  <youenn@apple.com>
1632
1633         Remove custom constructors of ReadableStreamDefaultReader and ReadableStreamBYOBReader
1634         https://bugs.webkit.org/show_bug.cgi?id=192838
1635
1636         Reviewed by Chris Dumez.
1637
1638         Generate constructor code in case of a Private but not Public constructor.
1639         Make sure this is correctly exposed in global objects.
1640         Add JS built-in constructor implementations for those two objects.
1641
1642         Also add JS built-in constructors for controller and byob request.
1643         To keep existing behavior, JS built-ins calling these constructors need to pass
1644         an additional parameter that allows making the difference between a JS builtin caller or a JS caller.
1645         In the latter case, the constructor will throw.
1646
1647         Covered by existing tests, no observable change of behavior.
1648
1649         * Modules/streams/ReadableByteStreamController.idl:
1650         * Modules/streams/ReadableByteStreamController.js:
1651         (initializeReadableByteStreamController):
1652         (getter.byobRequest):
1653         * Modules/streams/ReadableByteStreamInternals.js:
1654         (privateInitializeReadableByteStreamController): Deleted.
1655         (privateInitializeReadableStreamBYOBRequest): Deleted.
1656         * Modules/streams/ReadableStream.js:
1657         (initializeReadableStream):
1658         * Modules/streams/ReadableStreamBYOBReader.js:
1659         (initializeReadableStreamBYOBReader):
1660         * Modules/streams/ReadableStreamBYOBRequest.idl:
1661         * Modules/streams/ReadableStreamBYOBRequest.js:
1662         (initializeReadableStreamBYOBRequest):
1663         * Modules/streams/ReadableStreamDefaultController.idl:
1664         * Modules/streams/ReadableStreamDefaultController.js:
1665         (initializeReadableStreamDefaultController):
1666         (enqueue):
1667         * Modules/streams/ReadableStreamDefaultReader.js:
1668         (initializeReadableStreamDefaultReader):
1669         * Modules/streams/ReadableStreamInternals.js:
1670         (readableStreamDefaultControllerError): Deleted.
1671         * Sources.txt:
1672         * UnifiedSources-input.xcfilelist:
1673         * WebCore.xcodeproj/project.pbxproj:
1674         * bindings/js/JSDOMBuiltinConstructor.h:
1675         * bindings/js/JSDOMGlobalObject.cpp:
1676         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
1677         * bindings/js/JSReadableStreamPrivateConstructors.cpp: Removed.
1678         * bindings/js/JSReadableStreamPrivateConstructors.h: Removed.
1679         * bindings/scripts/CodeGeneratorJS.pm:
1680         (GeneratePropertiesHashTable):
1681         * bindings/scripts/preprocess-idls.pl:
1682         (shouldExposeInterface):
1683
1684 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
1685
1686         [WebAuthN] Remove hash from Client Data
1687         https://bugs.webkit.org/show_bug.cgi?id=192727
1688         <rdar://problem/46746673>
1689
1690         Reviewed by Brent Fulgham.
1691
1692         The hash algorithm for hashing the client data is enforced to SHA_256 in the latest spec:
1693         https://www.w3.org/TR/webauthn/#sec-client-data. Therefore, we should remove it.
1694
1695         Covered by existing tests.
1696
1697         * Modules/webauthn/AuthenticatorCoordinator.cpp:
1698         (WebCore::AuthenticatorCoordinatorInternal::produceClientDataJson):
1699
1700 2018-12-20  Jiewen Tan  <jiewen_tan@apple.com>
1701
1702         [WebAuthN] Add a runtime flag for local authenticator
1703         https://bugs.webkit.org/show_bug.cgi?id=192792
1704         <rdar://problem/46798738>
1705
1706         Reviewed by Brent Fulgham.
1707
1708         No tests.
1709
1710         This patch adds a runtime flag for local authenticator and removes ways to
1711         set the runtime flag for web authentication in LegacyWebKit.
1712
1713         * page/RuntimeEnabledFeatures.h:
1714         (WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
1715         (WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):
1716
1717 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
1718
1719         Pointer lock causes abandoned documents
1720         https://bugs.webkit.org/show_bug.cgi?id=188727
1721         rdar://problem/44248197
1722         
1723         Reviewed by Simon Fraser.
1724
1725         Fixes --world-leaks in these tests:
1726
1727         pointer-lock/locked-element-removed-from-dom.html
1728         pointer-lock/mouse-event-delivery.html
1729         fast/shadow-dom/pointerlockelement-in-slot.html
1730
1731         PointerLockController now uses WeakPtr instead of RefPtr because it has no need to extend the lifetime of a document.
1732
1733         * page/PointerLockController.cpp:
1734         (WebCore::PointerLockController::elementRemoved):
1735         (WebCore::PointerLockController::documentDetached):
1736         (WebCore::PointerLockController::didAcquirePointerLock):
1737         * page/PointerLockController.h:
1738
1739 2018-12-20  Chris Dumez  <cdumez@apple.com>
1740
1741         Use Optional::valueOr() instead of Optional::value_or()
1742         https://bugs.webkit.org/show_bug.cgi?id=192933
1743
1744         Reviewed by Geoffrey Garen.
1745
1746         * Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
1747         (WebCore::convert):
1748         (WebCore::ApplePayPaymentHandler::didAuthorizePayment):
1749         * Modules/encryptedmedia/MediaKeySession.cpp:
1750         (WebCore::MediaKeySession::load):
1751         * Modules/indexeddb/IDBDatabaseIdentifier.h:
1752         (WebCore::IDBDatabaseIdentifier::hash const):
1753         * Modules/indexeddb/IDBFactory.cpp:
1754         (WebCore::IDBFactory::open):
1755         * Modules/mediastream/MediaStreamTrack.cpp:
1756         (WebCore::MediaStreamTrack::applyConstraints):
1757         * Modules/mediastream/RTCDTMFSender.cpp:
1758         (WebCore::RTCDTMFSender::insertDTMF):
1759         * Modules/webdatabase/SQLTransaction.cpp:
1760         (WebCore::SQLTransaction::executeSql):
1761         * Modules/webvr/VRFrameData.cpp:
1762         (WebCore::VRFrameData::update):
1763         * animation/AnimationTimeline.cpp:
1764         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
1765         * animation/DeclarativeAnimation.cpp:
1766         (WebCore::DeclarativeAnimation::cancel):
1767         (WebCore::DeclarativeAnimation::invalidateDOMEvents):
1768         * animation/KeyframeEffect.cpp:
1769         (WebCore::computeMissingKeyframeOffsets):
1770         (WebCore::KeyframeEffect::applyPendingAcceleratedActions):
1771         * animation/WebAnimation.cpp:
1772         (WebCore::WebAnimation::runPendingPlayTask):
1773         (WebCore::WebAnimation::runPendingPauseTask):
1774         * bindings/js/SerializedScriptValue.cpp:
1775         (WebCore::CloneSerializer::write):
1776         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
1777         (WebCore::CryptoAlgorithmHMAC::generateKey):
1778         (WebCore::CryptoAlgorithmHMAC::importKey):
1779         * crypto/gcrypt/CryptoAlgorithmAES_GCMGCrypt.cpp:
1780         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
1781         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
1782         * crypto/gcrypt/CryptoKeyRSAGCrypt.cpp:
1783         (WebCore::CryptoKeyRSA::importSpki):
1784         (WebCore::CryptoKeyRSA::importPkcs8):
1785         * crypto/keys/CryptoKeyRSA.cpp:
1786         (WebCore::CryptoKeyRSA::importJwk):
1787         * crypto/mac/CryptoAlgorithmAES_GCMMac.cpp:
1788         (WebCore::CryptoAlgorithmAES_GCM::platformEncrypt):
1789         (WebCore::CryptoAlgorithmAES_GCM::platformDecrypt):
1790         * crypto/mac/CryptoKeyRSAMac.cpp:
1791         (WebCore::CryptoKeyRSA::importSpki):
1792         (WebCore::CryptoKeyRSA::importPkcs8):
1793         * css/CSSComputedStyleDeclaration.cpp:
1794         (WebCore::counterToCSSValue):
1795         * css/CSSFontFace.cpp:
1796         (WebCore::calculateItalicRange):
1797         * css/CSSPrimitiveValue.cpp:
1798         (WebCore::CSSPrimitiveValue::doubleValue const):
1799         * css/CSSStyleSheet.cpp:
1800         (WebCore::CSSStyleSheet::addRule):
1801         * css/DOMMatrix.cpp:
1802         (WebCore::DOMMatrix::rotateSelf):
1803         * css/DOMMatrixReadOnly.cpp:
1804         (WebCore::DOMMatrixReadOnly::validateAndFixup):
1805         * css/StyleBuilderCustom.h:
1806         (WebCore::StyleBuilderCustom::applyValueCounter):
1807         * css/parser/MediaQueryParser.cpp:
1808         (WebCore::MediaQueryParser::commitMediaQuery):
1809         * dom/Document.h:
1810         (WebCore::Document::referrerPolicy const):
1811         * dom/Element.cpp:
1812         (WebCore::toScrollAlignment):
1813         * dom/EventTarget.cpp:
1814         (WebCore::EventTarget::addEventListener):
1815         * dom/MutationObserver.cpp:
1816         (WebCore::MutationObserver::observe):
1817         * editing/cocoa/FontAttributeChangesCocoa.mm:
1818         (WebCore::FontChanges::platformFontFamilyNameForCSS const):
1819         * fileapi/File.cpp:
1820         (WebCore::File::File):
1821         * html/DOMTokenList.cpp:
1822         (WebCore::DOMTokenList::toggle):
1823         * html/HTMLOListElement.h:
1824         * html/ImageBitmap.cpp:
1825         (WebCore::croppedSourceRectangleWithFormatting):
1826         * html/canvas/CanvasPattern.cpp:
1827         (WebCore::CanvasPattern::setTransform):
1828         * html/canvas/CanvasRenderingContext2DBase.cpp:
1829         (WebCore::CanvasRenderingContext2DBase::setTransform):
1830         (WebCore::CanvasRenderingContext2DBase::isPointInPathInternal):
1831         (WebCore::CanvasRenderingContext2DBase::isPointInStrokeInternal):
1832         * html/canvas/Path2D.cpp:
1833         (WebCore::Path2D::addPath):
1834         * inspector/InspectorCanvas.cpp:
1835         (WebCore::InspectorCanvas::buildAction):
1836         * inspector/InspectorFrontendHost.cpp:
1837         (WebCore::populateContextMenu):
1838         * layout/FormattingContext.cpp:
1839         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
1840         * layout/FormattingContextGeometry.cpp:
1841         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
1842         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
1843         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
1844         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
1845         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
1846         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
1847         (WebCore::Layout::FormattingContext::Geometry::inFlowPositionedPositionOffset):
1848         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
1849         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
1850         * layout/FormattingContextQuirks.cpp:
1851         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
1852         * layout/MarginTypes.h:
1853         (WebCore::Layout::VerticalMargin::usedValues const):
1854         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1855         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
1856         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
1857         (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
1858         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
1859         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedHeight):
1860         * layout/displaytree/DisplayBox.h:
1861         (WebCore::Display::Box::width const):
1862         (WebCore::Display::Box::height const):
1863         (WebCore::Display::Box::contentBoxTop const):
1864         (WebCore::Display::Box::contentBoxLeft const):
1865         * layout/floats/FloatingContext.cpp:
1866         (WebCore::Layout::Iterator::set):
1867         * layout/inlineformatting/InlineFormattingContext.cpp:
1868         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
1869         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
1870         * loader/FrameLoader.cpp:
1871         (WebCore::FrameLoader::urlSelected):
1872         * loader/NavigationAction.cpp:
1873         * page/FrameView.cpp:
1874         (WebCore::FrameView::setLayoutViewportOverrideRect):
1875         (WebCore::FrameView::documentToAbsoluteScaleFactor const):
1876         (WebCore::FrameView::viewportSizeForCSSViewportUnits const):
1877         * page/Page.cpp:
1878         (WebCore::Page::setLowPowerModeEnabledOverrideForTesting):
1879         * page/SecurityOriginData.cpp:
1880         (WebCore::SecurityOriginData::databaseIdentifier const):
1881         * page/SecurityOriginData.h:
1882         (WebCore::SecurityOriginDataHash::hash):
1883         * page/SecurityOriginHash.h:
1884         (WebCore::SecurityOriginHash::hash):
1885         * page/ViewportConfiguration.cpp:
1886         (WebCore::ViewportConfiguration::setViewLayoutSize):
1887         * page/WindowFeatures.cpp:
1888         (WebCore::parseDialogFeatures):
1889         * page/animation/AnimationBase.cpp:
1890         (WebCore::AnimationBase::updateStateMachine):
1891         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
1892         (WebCore::AnimationBase::getTimeToNextEvent const):
1893         (WebCore::AnimationBase::freezeAtTime):
1894         (WebCore::AnimationBase::getElapsedTime const):
1895         * page/animation/CSSAnimationController.cpp:
1896         (WebCore::CSSAnimationControllerPrivate::updateAnimationTimer):
1897         * page/cocoa/ResourceUsageThreadCocoa.mm:
1898         (WebCore::ResourceUsageThread::platformThreadBody):
1899         * page/linux/ResourceUsageThreadLinux.cpp:
1900         (WebCore::ResourceUsageThread::platformThreadBody):
1901         * platform/graphics/ComplexTextController.cpp:
1902         (WebCore::ComplexTextController::offsetForPosition):
1903         * platform/graphics/FontCache.h:
1904         (WebCore::FontDescriptionKey::computeHash const):
1905         * platform/graphics/FontCascade.cpp:
1906         (WebCore::FontCascade::drawText const):
1907         (WebCore::FontCascade::drawEmphasisMarks const):
1908         (WebCore::FontCascade::displayListForTextRun const):
1909         (WebCore::FontCascade::adjustSelectionRectForText const):
1910         (WebCore::FontCascade::codePath const):
1911         * platform/graphics/FontSelectionAlgorithm.cpp:
1912         (WebCore::FontSelectionAlgorithm::styleDistance const):
1913         * platform/graphics/FontSelectionAlgorithm.h:
1914         (WebCore::operator<<):
1915         (WebCore::FontSelectionSpecifiedCapabilities::computeWeight const):
1916         (WebCore::FontSelectionSpecifiedCapabilities::computeWidth const):
1917         (WebCore::FontSelectionSpecifiedCapabilities::computeSlope const):
1918         * platform/graphics/ShadowBlur.cpp:
1919         (WebCore::ShadowBlur::calculateLayerBoundingRect):
1920         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
1921         (WebCore::WebCoreAVCFResourceLoader::startLoading):
1922         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1923         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1924         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1925         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
1926         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1927         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
1928         * platform/graphics/ca/GraphicsLayerCA.cpp:
1929         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
1930         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1931         (WebCore::preparePlatformFont):
1932         * platform/graphics/filters/FETurbulence.cpp:
1933         (WebCore::FETurbulence::fillRegion const):
1934         * platform/graphics/gstreamer/GStreamerCommon.cpp:
1935         (WebCore::initializeGStreamer):
1936         * platform/graphics/texmap/TextureMapperLayer.cpp:
1937         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
1938         (WebCore::TextureMapperLayer::replicaTransform):
1939         (WebCore::TextureMapperLayer::syncAnimations):
1940         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1941         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
1942         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
1943         * platform/graphics/transforms/TransformState.cpp:
1944         (WebCore::TransformState::mappedPoint const):
1945         (WebCore::TransformState::mapQuad const):
1946         (WebCore::TransformState::flattenWithTransform):
1947         * platform/network/CacheValidation.cpp:
1948         (WebCore::computeCurrentAge):
1949         (WebCore::computeFreshnessLifetimeForHTTPFamily):
1950         * platform/network/NetworkStateNotifier.cpp:
1951         (WebCore::NetworkStateNotifier::onLine):
1952         * rendering/FloatingObjects.cpp:
1953         (WebCore::FindNextFloatLogicalBottomAdapter::nextLogicalBottom const):
1954         (WebCore::FindNextFloatLogicalBottomAdapter::nextShapeLogicalBottom const):
1955         * rendering/GridBaselineAlignment.cpp:
1956         (WebCore::GridBaselineAlignment::ascentForChild const):
1957         * rendering/GridTrackSizingAlgorithm.cpp:
1958         (WebCore::GridTrack::setGrowthLimit):
1959         (WebCore::GridTrackSizingAlgorithm::initialBaseSize const):
1960         (WebCore::GridTrackSizingAlgorithm::initialGrowthLimit const):
1961         (WebCore::GridTrackSizingAlgorithm::sizeTrackToFitNonSpanningItem):
1962         (WebCore::sortByGridTrackGrowthPotential):
1963         (WebCore::GridTrackSizingAlgorithm::estimatedGridAreaBreadthForChild const):
1964         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
1965         (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
1966         * rendering/PaintInfo.h:
1967         (WebCore::PaintInfo::applyTransform):
1968         * rendering/RenderBox.cpp:
1969         (WebCore::RenderBox::computeLogicalHeight const):
1970         * rendering/RenderCounter.cpp:
1971         (WebCore::planCounter):
1972         * rendering/RenderDeprecatedFlexibleBox.cpp:
1973         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
1974         * rendering/RenderFlexibleBox.cpp:
1975         (WebCore::RenderFlexibleBox::baselinePosition const):
1976         (WebCore::RenderFlexibleBox::marginBoxAscentForChild):
1977         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1978         * rendering/RenderGrid.cpp:
1979         (WebCore::RenderGrid::gridGap const):
1980         (WebCore::RenderGrid::baselinePosition const):
1981         * rendering/RenderLayer.cpp:
1982         (WebCore::RenderLayer::paintLayerByApplyingTransform):
1983         * rendering/RenderListBox.cpp:
1984         (WebCore::RenderListBox::paintItem):
1985         (WebCore::RenderListBox::listIndexIsVisible):
1986         * rendering/RenderMultiColumnSet.cpp:
1987         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight const):
1988         * rendering/RenderTable.cpp:
1989         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
1990         * rendering/RenderTableCell.cpp:
1991         (WebCore::RenderTableCell::cellBaselinePosition const):
1992         * rendering/RenderTableSection.cpp:
1993         (WebCore::RenderTableSection::firstLineBaseline const):
1994         * rendering/RenderText.cpp:
1995         (WebCore::RenderText::computePreferredLogicalWidths):
1996         (WebCore::RenderText::previousOffset const):
1997         (WebCore::RenderText::previousOffsetForBackwardDeletion const):
1998         (WebCore::RenderText::nextOffset const):
1999         (WebCore::RenderText::stringView const):
2000         * rendering/RenderView.cpp:
2001         (WebCore::RenderView::layout):
2002         * rendering/mathml/RenderMathMLBlock.cpp:
2003         (WebCore::RenderMathMLBlock::baselinePosition const):
2004         * rendering/mathml/RenderMathMLBlock.h:
2005         (WebCore::RenderMathMLBlock::ascentForChild):
2006         * rendering/style/GridPosition.cpp:
2007         (WebCore::GridPosition::max):
2008         * rendering/style/TextUnderlineOffset.h:
2009         (WebCore::TextUnderlineOffset::lengthOr const):
2010         * rendering/svg/RenderSVGContainer.cpp:
2011         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
2012         * rendering/svg/RenderSVGForeignObject.cpp:
2013         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2014         * rendering/svg/RenderSVGImage.cpp:
2015         (WebCore::RenderSVGImage::nodeAtFloatPoint):
2016         * rendering/svg/RenderSVGResourceClipper.cpp:
2017         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2018         * rendering/svg/RenderSVGResourceFilter.cpp:
2019         (WebCore::RenderSVGResourceFilter::postApplyResource):
2020         * rendering/svg/RenderSVGRoot.cpp:
2021         (WebCore::RenderSVGRoot::nodeAtPoint):
2022         * rendering/svg/RenderSVGShape.cpp:
2023         (WebCore::RenderSVGShape::nodeAtFloatPoint):
2024         * rendering/svg/RenderSVGText.cpp:
2025         (WebCore::RenderSVGText::nodeAtFloatPoint):
2026         * rendering/svg/SVGRenderingContext.cpp:
2027         (WebCore::SVGRenderingContext::clipToImageBuffer):
2028         * svg/SVGToOTFFontConversion.cpp:
2029         (WebCore::SVGToOTFFontConverter::processGlyphElement):
2030         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2031
2032 2018-12-20  Jer Noble  <jer.noble@apple.com>
2033
2034         REGRESSION (r239419): heap-use-after-free in AudioSourceProviderAVFObjC::finalizeCallback()
2035         https://bugs.webkit.org/show_bug.cgi?id=192941
2036         <rdar://problem/46874096>
2037
2038         Reviewed by Brent Fulgham.
2039
2040         Don't delete the locked lock before unlocking the lock. 
2041
2042         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2043         (WebCore::AudioSourceProviderAVFObjC::finalizeCallback):
2044
2045 2018-12-20  Keith Rollin  <krollin@apple.com>
2046
2047         Improve release-level page-load logging
2048         https://bugs.webkit.org/show_bug.cgi?id=192872
2049         <rdar://problem/46850309>
2050
2051         Reviewed by Chris Dumez.
2052
2053         There are a number of reported bugs that are difficult or impossible
2054         to track down with our current level of logging. Additionally, some
2055         software groups lower in the page-loading stack have requested logging
2056         sufficient for tracking a user-visible error message down to the
2057         requested resource that caused the message. Add more-comprehensive
2058         logging to address these issues/requests.
2059
2060         No new tests -- no changed functionality.
2061
2062         * loader/DocumentLoader.cpp:
2063         (WebCore::DocumentLoader::setMainDocumentError):
2064         (WebCore::DocumentLoader::mainReceivedError):
2065         (WebCore::DocumentLoader::stopLoading):
2066         (WebCore::DocumentLoader::notifyFinished):
2067         (WebCore::DocumentLoader::willSendRequest):
2068         (WebCore::DocumentLoader::continueAfterContentPolicy):
2069         (WebCore::DocumentLoader::startLoadingMainResource):
2070         (WebCore::DocumentLoader::loadMainResource):
2071         (WebCore::DocumentLoader::cancelMainResourceLoad):
2072         * loader/FrameLoader.cpp:
2073         (WebCore::FrameLoader::urlSelected):
2074         (WebCore::FrameLoader::loadURLIntoChildFrame):
2075         (WebCore::FrameLoader::loadArchive):
2076         (WebCore::FrameLoader::loadInSameDocument):
2077         (WebCore::FrameLoader::loadFrameRequest):
2078         (WebCore::FrameLoader::loadURL):
2079         (WebCore::FrameLoader::load):
2080         (WebCore::FrameLoader::loadWithNavigationAction):
2081         (WebCore::FrameLoader::loadWithDocumentLoader):
2082         (WebCore::FrameLoader::reloadWithOverrideEncoding):
2083         (WebCore::FrameLoader::reload):
2084         (WebCore::FrameLoader::setState):
2085         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
2086         (WebCore::FrameLoader::loadPostRequest):
2087         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
2088         (WebCore::FrameLoader::loadDifferentDocumentItem):
2089         * loader/ProgressTracker.cpp:
2090         (WebCore::ProgressItem::ProgressItem):
2091         (WebCore::ProgressTracker::reset):
2092         (WebCore::ProgressTracker::progressStarted):
2093         (WebCore::ProgressTracker::progressCompleted):
2094         (WebCore::ProgressTracker::finalProgressComplete):
2095         (WebCore::ProgressTracker::incrementProgress):
2096         (WebCore::ProgressTracker::completeProgress):
2097         (WebCore::ProgressTracker::isAlwaysOnLoggingAllowed const):
2098         * loader/ProgressTracker.h:
2099         * loader/ResourceLoader.cpp:
2100         (WebCore::ResourceLoader::loadDataURL):
2101         (WebCore::ResourceLoader::willSendRequestInternal):
2102         (WebCore::ResourceLoader::didFinishLoading):
2103         (WebCore::ResourceLoader::didFail):
2104         (WebCore::ResourceLoader::willSendRequestAsync):
2105         (WebCore::ResourceLoader::wasBlocked):
2106         (WebCore::ResourceLoader::cannotShowURL):
2107         * loader/SubresourceLoader.cpp:
2108         (WebCore::SubresourceLoader::willSendRequestInternal):
2109         (WebCore::=):
2110         (WebCore::SubresourceLoader::didReceiveResponse):
2111         (WebCore::SubresourceLoader::didFinishLoading):
2112         (WebCore::SubresourceLoader::didFail):
2113         (WebCore::SubresourceLoader::willCancel):
2114         * loader/cache/CachedResource.cpp:
2115         (WebCore::CachedResource::load):
2116
2117 2018-12-20  Jeremy Jones  <jeremyj@apple.com>
2118
2119         Switch tabs before retuning PiP video to inline.
2120         https://bugs.webkit.org/show_bug.cgi?id=192767
2121         rdar://problem/46006046
2122
2123         Reviewed by Jer Noble.
2124
2125         No new tests because this code path only happens with a user action on system UI.
2126
2127         When exiting PiP, notify the fullscreen change observer so it can restore client UI state before exiting.
2128
2129         * platform/mac/VideoFullscreenInterfaceMac.mm:
2130         (-[WebVideoFullscreenInterfaceMacObjC pipShouldClose:]):
2131
2132 2018-12-19  Michael Catanzaro  <mcatanzaro@igalia.com>
2133
2134         Unreviewed, fix GTK build after r239410
2135
2136         It added a new file to the build, breaking the unified sources magic that obscured a bug in
2137         URLSoup.h. It forward-declares URL, but this never worked unless the URL.h header was
2138         included via another source file in the unified source bundle.
2139
2140         * platform/network/soup/URLSoup.h:
2141
2142 2018-12-19  Chris Dumez  <cdumez@apple.com>
2143
2144         wtf/Optional.h: move-constructor and move-assignment operator should disengage the value being moved from
2145         https://bugs.webkit.org/show_bug.cgi?id=192728
2146         <rdar://problem/46746779>
2147
2148         Reviewed by Geoff Garen.
2149
2150         * Modules/*:
2151         * animation/*:
2152         * bindings/*:
2153         * crypto/*:
2154         * css/*:
2155         * dom/*:
2156         * editing/*:
2157         * fileapi/*:
2158         * html/*:
2159         * inspector/*:
2160         * layout/*:
2161         * loader/*:
2162         * mathml/*:
2163         * page/*:
2164         * platform/*:
2165         * plugins/*:
2166         * rendering/*:
2167         * testing/*:
2168         * workers/*:
2169         * xml/*:
2170
2171 2018-12-19  Jer Noble  <jer.noble@apple.com>
2172
2173         Leak of MTAudioProcessingTap (304 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
2174         https://bugs.webkit.org/show_bug.cgi?id=192896
2175         <rdar://46732186>
2176
2177         Reviewed by Eric Carlson.
2178
2179         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2180         (WebCore::AudioSourceProviderAVFObjC::initCallback):
2181
2182 2018-12-19  Timothy Hatcher  <timothy@apple.com>
2183
2184         REGRESSION (r232991): Switching to dark mode in Mail does not update the message view to be transparent
2185         https://bugs.webkit.org/show_bug.cgi?id=188891
2186         rdar://problem/42344352
2187
2188         Reviewed by Simon Fraser.
2189
2190         * rendering/RenderLayerCompositor.cpp:
2191         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
2192         Don't return early when m_layerForOverhangAreas is null to avoid skipping
2193         setRootLayerConfigurationNeedsUpdate() and scheduleCompositingLayerUpdate().
2194
2195 2018-12-19  Justin Fan  <justin_fan@apple.com>
2196
2197         [WebGPU] Add stubs for WebGPUPipelineLayout/Descriptor and device::createPipelineLayout
2198         https://bugs.webkit.org/show_bug.cgi?id=192843
2199         <rdar://problem/46820395>
2200
2201         Reviewed by Myles Maxfield.
2202
2203         Test: webgpu/pipeline-layouts.html
2204
2205         Implement the emtpy WebGPUPipelineLayout interface, and enable creation via WebGPUDevice::createPipelineLayout:
2206         * Modules/webgpu/WebGPUBindGroupLayout.cpp:
2207         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2208         * Modules/webgpu/WebGPUBindGroupLayout.h:
2209         (WebCore::WebGPUBindGroupLayout::bindGroupLayout const): Added getter.
2210         * Modules/webgpu/WebGPUDevice.cpp:
2211         (WebCore::WebGPUDevice::createPipelineLayout const): Added.
2212         * Modules/webgpu/WebGPUDevice.h:
2213         * Modules/webgpu/WebGPUDevice.idl: Enable createPipelineLayout.
2214         * Modules/webgpu/WebGPUPipelineLayout.cpp: Added.
2215         (WebCore::WebGPUPipelineLayout::create):
2216         (WebCore::WebGPUPipelineLayout::WebGPUPipelineLayout):
2217         * Modules/webgpu/WebGPUPipelineLayout.h: Added.
2218         * Modules/webgpu/WebGPUPipelineLayout.idl: Added.
2219         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.h: Added.
2220         * Modules/webgpu/WebGPUPipelineLayoutDescriptor.idl: Added.
2221         * platform/graphics/gpu/GPUDevice.cpp:
2222         (WebCore::GPUDevice::createPipelineLayout const): Added.
2223         * platform/graphics/gpu/GPUDevice.h:
2224         * platform/graphics/gpu/GPUPipelineLayout.cpp: Added.
2225         (WebCore::GPUPipelineLayout::create):
2226         (WebCore::GPUPipelineLayout::GPUPipelineLayout):
2227         * platform/graphics/gpu/GPUPipelineLayout.h: Added.
2228         * platform/graphics/gpu/GPUPipelineLayoutDescriptor.h: Added.
2229
2230         Add files and symbols to project:
2231         * CMakeLists.txt:
2232         * DerivedSources.make:
2233         * Sources.txt:
2234         * WebCore.xcodeproj/project.pbxproj:
2235         * bindings/js/WebCoreBuiltinNames.h:
2236
2237         Add missing include:
2238         * Modules/webgpu/WebGPUQueue.h:
2239
2240 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
2241
2242         SVGUseElement::findTarget should return nullptr when there is a cycle
2243         https://bugs.webkit.org/show_bug.cgi?id=192840
2244
2245         Reviewed by Tim Horton.
2246
2247         r233366 added an early return to updateShadowTree() when there is a cycle between an use element and its target.
2248         Consolidate this cycle detection code with the one in SVGUseElement::findTarget which detected cycles when
2249         the SVG use element itself had a corresponding element.
2250
2251         No new tests since there should be no behavioral change.
2252
2253         * svg/SVGUseElement.cpp:
2254         (WebCore::SVGUseElement::updateShadowTree):
2255         (WebCore::SVGUseElement::findTarget const):
2256
2257 2018-12-19  Myles C. Maxfield  <mmaxfield@apple.com>
2258
2259         [WHLSL] Add a handwritten lexer
2260         https://bugs.webkit.org/show_bug.cgi?id=192294
2261
2262         Reviewed by Jon Lee.
2263
2264         This is infrastructure necessary for https://bugs.webkit.org/show_bug.cgi?id=192355. The
2265         implementation matches the lexing rules in the spec (specifically, the rules that start
2266         with an uppercase letter). The spec is at
2267         https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4.
2268
2269         This patch also modifies the lexer according to https://github.com/gpuweb/WHLSL/pull/283.
2270
2271         No new tests because the lexer isn't hooked up yet; there are tests in the parser,
2272         once that gets committed.
2273
2274         * Modules/webgpu/WHLSL/WHLSLLexer.cpp: Added.
2275         (WebCore::WHLSL::Lexer::Token::typeName):
2276         (WebCore::WHLSL::Lexer::recognizeKeyword):
2277         (WebCore::WHLSL::Lexer::consumeTokenFromStream):
2278         (WebCore::WHLSL::Lexer::skipWhitespaceAndComments):
2279         (WebCore::WHLSL::isWhitespace):
2280         (WebCore::WHLSL::isNewline):
2281         (WebCore::WHLSL::Lexer::skipWhitespace):
2282         (WebCore::WHLSL::Lexer::skipLineComment):
2283         (WebCore::WHLSL::Lexer::skipLongComment):
2284         (WebCore::WHLSL::Lexer::coreDecimalIntLiteral const):
2285         (WebCore::WHLSL::Lexer::decimalIntLiteral const):
2286         (WebCore::WHLSL::Lexer::decimalUintLiteral const):
2287         (WebCore::WHLSL::isHexadecimalCharacter):
2288         (WebCore::WHLSL::Lexer::coreHexadecimalIntLiteral const):
2289         (WebCore::WHLSL::Lexer::hexadecimalIntLiteral const):
2290         (WebCore::WHLSL::Lexer::hexadecimalUintLiteral const):
2291         (WebCore::WHLSL::Lexer::intLiteral const):
2292         (WebCore::WHLSL::Lexer::uintLiteral const):
2293         (WebCore::WHLSL::Lexer::digit const):
2294         (WebCore::WHLSL::Lexer::digitStar const):
2295         (WebCore::WHLSL::Lexer::character const):
2296         (WebCore::WHLSL::Lexer::coreFloatLiteralType1 const):
2297         (WebCore::WHLSL::Lexer::coreFloatLiteral const):
2298         (WebCore::WHLSL::Lexer::floatLiteral const):
2299         (WebCore::WHLSL::Lexer::validIdentifier const):
2300         (WebCore::WHLSL::Lexer::identifier const):
2301         (WebCore::WHLSL::Lexer::operatorName const):
2302         * Modules/webgpu/WHLSL/WHLSLLexer.h: Added.
2303         (WebCore::WHLSL::Lexer::Lexer):
2304         (WebCore::WHLSL::Lexer::consumeToken):
2305         (WebCore::WHLSL::Lexer::unconsumeToken):
2306         (WebCore::WHLSL::Lexer::state const):
2307         (WebCore::WHLSL::Lexer::setState):
2308         (WebCore::WHLSL::Lexer::isFullyConsumed const):
2309         (WebCore::WHLSL::Lexer::errorString):
2310         (WebCore::WHLSL::Lexer::string const):
2311         (WebCore::WHLSL::Lexer::anyCharacter const):
2312         * Sources.txt:
2313         * WebCore.xcodeproj/project.pbxproj:
2314
2315 2018-12-18  Simon Fraser  <simon.fraser@apple.com>
2316
2317         Web Inspector: Timelines: correctly label Intersection Observer callbacks
2318         https://bugs.webkit.org/show_bug.cgi?id=192669
2319         <rdar://problem/46702490>
2320
2321         Reviewed by Joseph Pecoraro.
2322
2323         Add InspectorInstrumentation::willFireObserverCallback() and use it to wrap calls
2324         to Intersection Observer, Performance Observer and Mutation Observer callbacks so 
2325         that they get correctly labeled in the Inspector timeline.
2326
2327         * dom/MutationObserver.cpp:
2328         (WebCore::MutationObserver::deliver):
2329         * en.lproj/Localizable.strings:
2330         * inspector/InspectorInstrumentation.cpp:
2331         (WebCore::InspectorInstrumentation::willFireObserverCallbackImpl):
2332         (WebCore::InspectorInstrumentation::didFireObserverCallbackImpl):
2333         * inspector/InspectorInstrumentation.h:
2334         (WebCore::InspectorInstrumentation::willFireObserverCallback):
2335         (WebCore::InspectorInstrumentation::didFireObserverCallback):
2336         * inspector/TimelineRecordFactory.cpp:
2337         (WebCore::TimelineRecordFactory::createObserverCallbackData):
2338         * inspector/TimelineRecordFactory.h:
2339         * inspector/agents/InspectorTimelineAgent.cpp:
2340         (WebCore::InspectorTimelineAgent::willFireObserverCallback):
2341         (WebCore::InspectorTimelineAgent::didFireObserverCallback):
2342         (WebCore::toProtocol):
2343         * inspector/agents/InspectorTimelineAgent.h:
2344         * page/IntersectionObserver.cpp:
2345         (WebCore::IntersectionObserver::notify):
2346         * page/PerformanceObserver.cpp:
2347         (WebCore::PerformanceObserver::deliver):
2348
2349 2018-12-19  Claudio Saavedra  <csaavedra@igalia.com>
2350
2351         ContentExtensions: DFANode.cpp:66:44: error: narrowing conversion of '-1' from 'int' to 'char' inside { }
2352         https://bugs.webkit.org/show_bug.cgi?id=192854
2353
2354         Reviewed by Alex Christensen.
2355
2356         * contentextensions/DFANode.h: Define CharRange's chars as signed
2357
2358 2018-12-19  Youenn Fablet  <youenn@apple.com>
2359
2360         Remove RTCRtpTransceiver.setDirection
2361         https://bugs.webkit.org/show_bug.cgi?id=192869
2362
2363         Reviewed by Alex Christensen.
2364
2365         Covered by rebased test.
2366
2367         * Modules/mediastream/RTCRtpTransceiver.idl:
2368
2369 2018-12-19  Jer Noble  <jer.noble@apple.com>
2370
2371         Force synchronous decode in WebCoreDecompressionSession::decodeSampleSync()
2372         https://bugs.webkit.org/show_bug.cgi?id=192856
2373         <rdar://problem/46843245>
2374
2375         Reviewed by Alex Christensen.
2376
2377         Some decoders exposed through VideoToolbox will decode asynchronously even when 
2378         kVTDecodeInfo_Asynchronous is not set. Force synchronous behavior with a Semaphore.
2379
2380         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
2381         (WebCore::WebCoreDecompressionSession::decodeSampleSync):
2382
2383 2018-12-19  Megan Gardner  <megan_gardner@apple.com>
2384
2385         Allow clients to set the navigator platform
2386         https://bugs.webkit.org/show_bug.cgi?id=192735
2387
2388         Reviewed by Tim Horton.
2389
2390         Expanded TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm.
2391
2392         Lots of piping to allow the setting of a custom navigator platform.
2393
2394         * loader/DocumentLoader.h:
2395         (WebCore::DocumentLoader::setCustomNavigatorPlatform):
2396         (WebCore::DocumentLoader::customNavigatorPlatform const):
2397         * loader/FrameLoader.cpp:
2398         (WebCore::FrameLoader::navigatorPlatform const):
2399         * loader/FrameLoader.h:
2400         * page/Navigator.cpp:
2401         (WebCore::Navigator::platform const):
2402         * page/Navigator.h:
2403         * page/NavigatorBase.cpp:
2404         (WebCore::NavigatorBase::platform const):
2405         (WebCore::NavigatorBase::platform): Deleted.
2406         * page/NavigatorBase.h:
2407
2408 2018-12-19  Ryan Haddad  <ryanhaddad@apple.com>
2409
2410         Unreviewed, rolling out r239347.
2411
2412         Caused the leaks bot to hit an exception and the new test
2413         crashes on certain configurations.
2414
2415         Reverted changeset:
2416
2417         "Synchronous media query evaluation could destroy current
2418         Frame/FrameView."
2419         https://bugs.webkit.org/show_bug.cgi?id=192781
2420         https://trac.webkit.org/changeset/239347
2421
2422 2018-12-19  Truitt Savell  <tsavell@apple.com>
2423
2424         Unreviewed, rolling out r239358.
2425
2426         Revision caused imported/w3c/web-platform-tests/IndexedDB/ to
2427         crash on Debug bots
2428
2429         Reverted changeset:
2430
2431         "Clean up IndexedDB files between tests"
2432         https://bugs.webkit.org/show_bug.cgi?id=192796
2433         https://trac.webkit.org/changeset/239358
2434
2435 2018-12-19  Don Olmstead  <don.olmstead@sony.com>
2436
2437         Sync some include directories in WebCore
2438         https://bugs.webkit.org/show_bug.cgi?id=192819
2439
2440         Reviewed by Michael Catanzaro.
2441
2442         Added missing include directories around features that have only been enabled on
2443         Apple ports. Removes obsolete directories from list and moves harfbuzz directories
2444         into the freetype cmake file.
2445
2446         * CMakeLists.txt:
2447         * platform/FreeType.cmake:
2448
2449 2018-12-19  Alicia Boya García  <aboya@igalia.com>
2450
2451         [MSE] Remove unused method: stopAskingForMoreSamples()
2452         https://bugs.webkit.org/show_bug.cgi?id=192754
2453
2454         Reviewed by Xabier Rodriguez-Calvar.
2455
2456         The stopAskingForMoreSamples() method from SourceBufferPrivate is not
2457         being used by anyone. SourceBuffer is not calling it and no
2458         SourceBufferPrivate is implementing it. Let's remove that noise.
2459
2460         * platform/graphics/SourceBufferPrivate.h:
2461         (WebCore::SourceBufferPrivate::setActive):
2462         (WebCore::SourceBufferPrivate::stopAskingForMoreSamples): Deleted.
2463         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
2464         (WebCore::SourceBufferPrivateGStreamer::stopAskingForMoreSamples): Deleted.
2465         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
2466
2467 2018-12-19  Alicia Boya García  <aboya@igalia.com>
2468
2469         [MSE] Remove dead code: sourceBufferPrivateSeekToTime()
2470         https://bugs.webkit.org/show_bug.cgi?id=192827
2471
2472         Reviewed by Xabier Rodriguez-Calvar.
2473
2474         This patch makes two dead code removal changes in
2475         SourceBufferPrivateClient:
2476
2477         First, sourceBufferPrivateFastSeekTimeForMediaTime() is made pure
2478         virtual in SourceBufferPrivateClient. Since SourceBufferPrivateClient
2479         is only inherited by SourceBuffer, it makes no sense to have default
2480         implementations there (they will never be used), moreso it being a
2481         client interface.
2482
2483         Second, sourceBufferPrivateSeekToTime() is removed entirely. It used
2484         to had an empty implementation, which SourceBuffer did not overwrite,
2485         therefore making any calls to it useless.
2486
2487         All calls to sourceBufferPrivateSeekToTime() have been removed:
2488
2489         SourceBufferPrivateAVFObjC::seekToTime(), which was also dead code
2490         itself, used to call this method. This patch deletes it completely.
2491
2492         MockSourceBufferPrivate::seekToTime(), which only called this empty
2493         method, has also been removed along with its only usage in
2494         MockMediaSourcePrivate::seekToTime().
2495
2496         * platform/graphics/SourceBufferPrivateClient.h:
2497         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateFastSeekTimeForMediaTime): Deleted.
2498         (WebCore::SourceBufferPrivateClient::sourceBufferPrivateSeekToTime): Deleted.
2499         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2500         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2501         (WebCore::SourceBufferPrivateAVFObjC::seekToTime): Deleted.
2502         * platform/mock/mediasource/MockMediaSourcePrivate.cpp:
2503         (WebCore::MockMediaSourcePrivate::seekToTime):
2504         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2505         (WebCore::MockSourceBufferPrivate::seekToTime): Deleted.
2506         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2507
2508 2018-12-19  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2509
2510         [EME] MediaKeySystemConfiguration distinctiveIdentifier and persistentState should default to optional
2511         https://bugs.webkit.org/show_bug.cgi?id=192815
2512
2513         Reviewed by Jer Noble.
2514
2515         https://www.w3.org/TR/encrypted-media/#dom-mediakeysystemconfiguration
2516         says that distinctiveIdentifier and persistentState default to
2517         optional. Our implementation does not define a default leaving it
2518         to the first option of the enum, which currently is Required.
2519
2520         * platform/encryptedmedia/CDMKeySystemConfiguration.h:
2521
2522 2018-12-19  Rob Buis  <rbuis@igalia.com>
2523
2524         Merge parseAccessControlExposeHeadersAllowList into parseAccessControlAllowList
2525         https://bugs.webkit.org/show_bug.cgi?id=192288
2526
2527         Reviewed by Frédéric Wang.
2528
2529         Prefer return value to out parameter for parseAccessControlAllowList.
2530
2531         * loader/CrossOriginPreflightResultCache.cpp:
2532         (WebCore::CrossOriginPreflightResultCacheItem::parse):
2533         * platform/network/HTTPParsers.h:
2534         (WebCore::parseAccessControlAllowList):
2535         * platform/network/ResourceResponseBase.cpp:
2536         (WebCore::ResourceResponseBase::filter):
2537         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
2538
2539 2018-12-18  Zan Dobersek  <zdobersek@igalia.com>
2540
2541         REGRESSION(r235165): [GTK][WPE] Garbled rendering on GitLab
2542         https://bugs.webkit.org/show_bug.cgi?id=192230
2543
2544         Reviewed by Carlos Garcia Campos.
2545
2546         Single tile can after r235165 be assigned multiple content updates
2547         without a commit occurring between each update, whereas before these
2548         commits were done for each update.
2549
2550         To avoid repeating updates for a single tile purging information about
2551         the previous update, these updates are now accumulated inside a Vector
2552         and then iterated over during the commit phase.
2553
2554         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp:
2555         (WebCore::CoordinatedBackingStoreTile::addUpdate):
2556         (WebCore::CoordinatedBackingStoreTile::swapBuffers):
2557         (WebCore::CoordinatedBackingStore::updateTile):
2558         (WebCore::CoordinatedBackingStoreTile::setBackBuffer): Deleted.
2559         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h:
2560         (WebCore::CoordinatedBackingStoreTile::scale const):
2561
2562 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2563
2564         [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
2565         https://bugs.webkit.org/show_bug.cgi?id=192842
2566         <rdar://problem/46823586>
2567
2568         Reviewed by Tim Horton.
2569
2570         Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
2571         registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
2572         inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
2573         this is internally tracked in <rdar://problem/46830277>.
2574
2575         * platform/ios/PlatformPasteboardIOS.mm:
2576         (WebCore::PlatformPasteboard::write):
2577
2578 2018-12-18  Michael Catanzaro  <mcatanzaro@igalia.com>
2579
2580         Unreviewed, add a missing UNUSED_PARAM()
2581
2582         * Modules/mediarecorder/MediaRecorder.cpp:
2583         (WebCore::MediaRecorder::getPrivateImpl):
2584
2585 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
2586
2587         Update CSS Properties and Values API to use new cycle fallback behaviour
2588         https://bugs.webkit.org/show_bug.cgi?id=192800
2589
2590         Reviewed by Antti Koivisto.
2591
2592         Make CSS variables that are registered and involved in a cycle be treated as invalid. This also fixes a crash in the
2593         wpt tests where relative units and calc() in a registered property's initial value would break things instead of failing. 
2594
2595         * css/CSSCustomPropertyValue.h:
2596         * css/CSSVariableReferenceValue.cpp:
2597         (WebCore::resolveVariableReference):
2598         * css/DOMCSSRegisterCustomProperty.cpp:
2599         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
2600         * css/StyleResolver.cpp:
2601         (WebCore::StyleResolver::applyCascadedCustomProperty):
2602         * css/parser/CSSPropertyParser.cpp:
2603         (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
2604
2605 2018-12-18  Daniel Bates  <dabates@apple.com>
2606
2607         Wrong value for key property in keydown and keyup events generated holding Control key
2608         https://bugs.webkit.org/show_bug.cgi?id=192788
2609         <rdar://problem/46795214>
2610
2611         Reviewed by Wenson Hsieh.
2612
2613         Similar to what we do on Mac, compute the DOM key property from the characters ignoring
2614         modifier keys input string when the Control key is held down.
2615
2616         * platform/ios/PlatformEventFactoryIOS.mm:
2617         (WebCore::keyForKeyEvent):
2618         * platform/mac/PlatformEventFactoryMac.mm:
2619         (WebCore::keyForKeyEvent):
2620
2621 2018-12-18  Sihui Liu  <sihui_liu@apple.com>
2622
2623         Clean up IndexedDB files between tests
2624         https://bugs.webkit.org/show_bug.cgi?id=192796
2625
2626         Reviewed by Geoffrey Garen.
2627
2628         We should clean up the IndexedDB files between tests to make sure each test is independent of others.
2629
2630         This patch also fixes some issues in IDB.
2631
2632         Covered by existing tests.
2633
2634         * Modules/indexeddb/server/IDBServer.cpp:
2635         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
2636         We should shut down all open databases instead of databases from open database connections before deleting 
2637         files, because database starts accessing files before connection to database is established.
2638
2639         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2640         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
2641         We should shutdown database after tasks in queue are completed, because tasks have pointer of UniqueIDBDatabase 
2642         and UniqueIDBDatabase can be destructed after shutdown.
2643
2644         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
2645         didDeleteBackingStore can be posted to main thread after immediateCloseForUserDelete, and timer should not be 
2646         invoked during the hard close.
2647
2648         (WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations):
2649         Tasks like didOpenBackingStore could be posted from database thread to main thread after 
2650         immediateCloseForUserDelete, but we know the backing store will be deleted soon, so no need to handle any 
2651         database operation. 
2652
2653         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
2654         performPrefetchCursor needs to be aware of whether UniqueIDBDatabase is being closed, so that it will not access 
2655         m_backingStore when m_backingStore may already be deleted. 
2656
2657         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
2658         immediateCloseForUserDelete does not handle transactions that are in the process of commit or abort. 
2659         m_objectStoreTransactionCounts and m_objectStoreWriteTransactions may be used by those transactions in 
2660         transactionCompleted, so they do not need to be cleared here.
2661
2662 2018-12-18  Myles C. Maxfield  <mmaxfield@apple.com>
2663
2664         Thick overlines and line-throughs grow in the wrong direction
2665         https://bugs.webkit.org/show_bug.cgi?id=192264
2666
2667         Reviewed by Dean Jackson.
2668
2669         Overlines should grow upward, and line-throughs should stay centered.
2670
2671         Test: fast/css3-text/css3-text-decoration/text-decoration-thicknes-overline-grow-direction.html
2672
2673         * rendering/TextDecorationPainter.cpp:
2674         (WebCore::TextDecorationPainter::paintTextDecoration):
2675         * style/InlineTextBoxStyle.cpp:
2676         (WebCore::visualOverflowForDecorations):
2677
2678 2018-12-18  Ryosuke Niwa  <rniwa@webkit.org>
2679
2680         Some iOS app crash in FrameLoader::checkCompleted
2681         https://bugs.webkit.org/show_bug.cgi?id=192804
2682         <rdar://problem/44240573>
2683
2684         Reviewed by Tim Horton.
2685
2686         It's possible for the main thread to call into WebCore / UIWebView selectors while Web thread
2687         is trying to send a delegate message. Disable the release assertion while this is happening
2688         so that iOS app would not crash.
2689
2690         Unfortunately no new test as there is no way to easily test UIWebView in iOS,
2691         and this requires a race between the web thread & the main thread.
2692
2693         * dom/ScriptDisallowedScope.h:
2694         (WebCore::ScriptDisallowedScope::InMainThread::isScriptAllowed):
2695         * platform/ios/wak/WebCoreThread.h:
2696         * platform/ios/wak/WebCoreThread.mm:
2697         (WebThreadDelegateMessageScope::WebThreadDelegateMessageScope):
2698         (WebThreadDelegateMessageScope::~WebThreadDelegateMessageScope):
2699         (SendDelegateMessage):
2700
2701 2018-12-18  David Kilzer  <ddkilzer@apple.com>
2702
2703         clang-tidy: Use const reference for MediaTime parameter to prevent object copy
2704         <https://webkit.org/b/192814>
2705
2706         Reviewed by Mark Lam.
2707
2708         * bindings/js/JSDOMConvertNumbers.h:
2709         (WebCore::JSConverter<IDLUnrestrictedDouble>::convert):
2710
2711 2018-12-18  Justin Fan  <justin_fan@apple.com>
2712
2713         [WebGPU] BindGroupLayout and Device::createBindGroupLayout
2714         https://bugs.webkit.org/show_bug.cgi?id=192817
2715
2716         Reviewed by Dean Jackson.
2717
2718         Update bind-group-layouts to test new functionality.
2719
2720         Implement the emtpy WebGPUBindGroupLayout interface, and enable creation via WebGPUDevice::createBindGroupLayout:
2721         * Modules/webgpu/WebGPUBindGroupLayout.cpp: Added.
2722         (WebCore::WebGPUBindGroupLayout::create):
2723         (WebCore::WebGPUBindGroupLayout::WebGPUBindGroupLayout):
2724         * Modules/webgpu/WebGPUBindGroupLayout.h: Added.
2725         * Modules/webgpu/WebGPUBindGroupLayout.idl: Added. Empty interface for now.
2726         * Modules/webgpu/WebGPUDevice.cpp:
2727         (WebCore::WebGPUDevice::createBindGroupLayout const): Added.
2728         * Modules/webgpu/WebGPUDevice.h:
2729         * Modules/webgpu/WebGPUDevice.idl:
2730         * platform/graphics/gpu/GPUBindGroupLayout.cpp: Added.
2731         (WebCore::GPUBindGroupLayout::tryCreate):
2732         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout):
2733         * platform/graphics/gpu/GPUBindGroupLayout.h: Added.
2734         * platform/graphics/gpu/GPUDevice.cpp:
2735         (WebCore::GPUDevice::tryCreateBindGroupLayout const): Added.
2736         * platform/graphics/gpu/GPUDevice.h:
2737
2738         Add files and symbols to project:
2739         * CMakeLists.txt:
2740         * DerivedSources.make:
2741         * Sources.txt:
2742         * WebCore.xcodeproj/project.pbxproj:
2743         * bindings/js/WebCoreBuiltinNames.h:
2744
2745         Missing includes that were previously provided via UnifiedSources:
2746         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
2747         * platform/sql/SQLiteFileSystem.h:
2748
2749 2018-12-18  Youenn Fablet  <youenn@apple.com>
2750
2751         Make ReadableStreamXX constructs use PrivateIdentifier
2752         https://bugs.webkit.org/show_bug.cgi?id=192771
2753
2754         Reviewed by Chris Dumez.
2755
2756         PrivateIdentifier is a better name for making sure a given construct does not show up in the global scope.
2757         Covered by existing binding tests.
2758
2759         * Modules/streams/ReadableByteStreamController.idl:
2760         * Modules/streams/ReadableStreamBYOBReader.idl:
2761         * Modules/streams/ReadableStreamBYOBRequest.idl:
2762         * Modules/streams/ReadableStreamDefaultController.idl:
2763         * Modules/streams/ReadableStreamDefaultReader.idl:
2764         * bindings/scripts/CodeGeneratorJS.pm:
2765         (NeedsConstructorProperty):
2766         * bindings/scripts/preprocess-idls.pl:
2767         (shouldExposeInterface):
2768         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: Removed.
2769         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h: Removed.
2770         * bindings/scripts/test/TestCustomConstructor.idl: Removed.
2771
2772 2018-12-18  Zalan Bujtas  <zalan@apple.com>
2773
2774         Synchronous media query evaluation could destroy current Frame/FrameView.
2775         https://bugs.webkit.org/show_bug.cgi?id=192781
2776         <rdar://problem/34416793>
2777
2778         Reviewed by Chris Dumez.
2779
2780         Protect Frame and FrameView when coming back from printing and check if the current Frame/FrameView/FrameLoader objects are still valid.
2781
2782         Test: printing/print-with-media-query-destory.html
2783
2784         * loader/DocumentLoader.cpp:
2785         (WebCore::DocumentLoader::finishedLoading):
2786         * page/Frame.cpp:
2787         (WebCore::Frame::setPrinting):
2788         * page/FrameView.cpp:
2789         (WebCore::FrameView::forceLayoutForPagination):
2790
2791 2018-12-18  Joseph Pecoraro  <pecoraro@apple.com>
2792
2793         Web Inspector: m3u8 content not shown, it should be text
2794         https://bugs.webkit.org/show_bug.cgi?id=192731
2795         <rdar://problem/46747728>
2796
2797         Reviewed by Devin Rousso.
2798
2799         * inspector/NetworkResourcesData.cpp:
2800         (WebCore::NetworkResourcesData::setResourceContent):
2801         Don't clobber data if setting empty content on a resource that has content.
2802
2803         * inspector/agents/InspectorNetworkAgent.cpp:
2804         (WebCore::InspectorNetworkAgent::shouldTreatAsText):
2805         Additional non-"text/" mime types that can be treated as text.
2806
2807         * platform/MIMETypeRegistry.cpp:
2808         (WebCore::MIMETypeRegistry::isTextMediaPlaylistMIMEType):
2809         * platform/MIMETypeRegistry.h:
2810         Detect media playlist mime types that are text (m3u8/m3u).
2811
2812 2018-12-18  Daniel Bates  <dabates@apple.com>
2813
2814         Remove <meta http-equiv=set-cookie> support
2815         https://bugs.webkit.org/show_bug.cgi?id=185077
2816         <rdar://problem/41791397>
2817
2818         Reviewed by Brent Fulgham.
2819
2820         Remove support for the HTTP-equiv. pragma Set-Cookie to set a cookie. In <https://github.com/whatwg/html/pull/3649>
2821         the HTML living standard was ammended to define this pragma as no-op. Chrome and Edge have also
2822         removed support for this pragma and Firefox has an open bug to remove it.
2823
2824         * dom/Document.cpp:
2825         (WebCore::Document::processHttpEquiv): Emit a message that the Set-Cookie pragma is obsolete and
2826         was ignored instead of setting the cookie.
2827         * html/parser/XSSAuditor.cpp:
2828         (WebCore::isDangerousHTTPEquiv): We no longer need to consider the Set-Cookie pragma
2829         as dangerous and erase attribute http-equiv when we find it because we no longer honor
2830         this pragma.
2831
2832 2018-12-18  Justin Michaud  <justin_michaud@apple.com>
2833
2834         CSS Typed OM should expose attributeStyleMap
2835         https://bugs.webkit.org/show_bug.cgi?id=192671
2836
2837         Reviewed by Ryosuke Niwa.
2838
2839         Exposes element.attributeStyleMap, adds a stub for the StylePropertyMap class, and updates the existing
2840         TypedOMCSSImageValue to not require a RenderObject so that it can still work inside attributeStyleMap.
2841
2842         Test: css-typedom/attributeStyleMap.html
2843
2844         * CMakeLists.txt:
2845         * DerivedSources.make:
2846         * Sources.txt:
2847         * WebCore.xcodeproj/project.pbxproj:
2848         * bindings/js/WebCoreBuiltinNames.h:
2849         * css/ElementCSSInlineStyle.idl:
2850         * css/typedom/StylePropertyMap.h: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.h.
2851         * css/typedom/StylePropertyMap.idl: Copied from Source/WebCore/css/typedom/StylePropertyMapReadOnly.idl.
2852         * css/typedom/StylePropertyMapReadOnly.cpp: Added.
2853         (WebCore::StylePropertyMapReadOnly::reifyValue):
2854         (WebCore::StylePropertyMapReadOnly::customPropertyValueOrDefault):
2855         * css/typedom/StylePropertyMapReadOnly.h:
2856         (WebCore::StylePropertyMapReadOnly::create): Deleted.
2857         (WebCore::StylePropertyMapReadOnly::get const): Deleted.
2858         (WebCore::StylePropertyMapReadOnly::StylePropertyMapReadOnly): Deleted.
2859         * css/typedom/StylePropertyMapReadOnly.idl:
2860         * css/typedom/TypedOMCSSImageValue.h:
2861         * dom/Element.cpp:
2862         (WebCore::Element::attributeStyleMap):
2863         (WebCore::Element::setAttributeStyleMap):
2864         * dom/Element.h:
2865         * dom/ElementRareData.cpp:
2866         * dom/ElementRareData.h:
2867         (WebCore::ElementRareData::attributeStyleMap):
2868         (WebCore::ElementRareData::setAttributeStyleMap):
2869         * dom/StyledElement.cpp:
2870         (WebCore::StyledElement::ensureAttributeStyleMap):
2871         * dom/StyledElement.h:
2872         * html/canvas/CanvasRenderingContext2DBase.cpp:
2873         (WebCore::size):
2874         (WebCore::CanvasRenderingContext2DBase::drawImage):
2875         * platform/graphics/CustomPaintImage.cpp:
2876         (WebCore::extractComputedProperty):
2877         (WebCore::CustomPaintImage::doCustomPaint):
2878
2879 2018-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
2880
2881         Calling setValue() while typing should invoke -textDidChangeInTextField in the injected bundle
2882         https://bugs.webkit.org/show_bug.cgi?id=192785
2883         <rdar://problem/45321184>
2884
2885         Reviewed by Tim Horton.
2886
2887         Makes a minor adjustment in `TextFieldInputType::setValue` to consider value changes as "user editing", if we're
2888         currently processing a keystroke from the user. This is useful for certain private clients, such as Safari, that
2889         need to know when the user is typing in a text form control, but the page is preventing default text insertion
2890         behavior and instead updating values programmatically.
2891
2892         Test: fast/forms/call-text-did-change-in-text-field-when-typing.html
2893
2894         * html/TextFieldInputType.cpp:
2895         (WebCore::TextFieldInputType::setValue):
2896
2897 2018-12-18  Zalan Bujtas  <zalan@apple.com>
2898
2899         [LFC][BFC][MarginCollapsing] Implement marginBeforeCollapsesWithParentMarginAfter
2900         https://bugs.webkit.org/show_bug.cgi?id=192801
2901
2902         Reviewed by Antti Koivisto.
2903
2904         * layout/blockformatting/BlockFormattingContext.h:
2905         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2906         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2907         * layout/blockformatting/BlockMarginCollapse.cpp:
2908         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
2909
2910 2018-12-18  Zalan Bujtas  <zalan@apple.com>
2911
2912         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithSiblingMarginBeforeWithClearance
2913         https://bugs.webkit.org/show_bug.cgi?id=192799
2914
2915         Reviewed by Antti Koivisto.
2916
2917         * layout/blockformatting/BlockFormattingContext.h:
2918         * layout/blockformatting/BlockMarginCollapse.cpp:
2919         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
2920         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
2921
2922 2018-12-18  Zalan Bujtas  <zalan@apple.com>
2923
2924         [LFC][BFC][MarginCollapsing] Implement marginAfterCollapsesWithParentMarginBefore
2925         https://bugs.webkit.org/show_bug.cgi?id=192798
2926
2927         Reviewed by Antti Koivisto.
2928
2929         * layout/blockformatting/BlockFormattingContext.h:
2930         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2931         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2932         * layout/blockformatting/BlockMarginCollapse.cpp:
2933         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
2934         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
2935         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
2936         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
2937
2938 2018-12-18  Zalan Bujtas  <zalan@apple.com>
2939
2940         [LFC][BFC][MarginCollapsing] Expand marginsCollapseThrough collapsing logic
2941         https://bugs.webkit.org/show_bug.cgi?id=192794
2942
2943         Reviewed by Antti Koivisto.
2944
2945         * layout/blockformatting/BlockFormattingContext.h:
2946         * layout/blockformatting/BlockMarginCollapse.cpp:
2947         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
2948         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
2949         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
2950
2951 2018-12-18  Zalan Bujtas  <zalan@apple.com>
2952
2953         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithNextSibling and marginBeforeCollapsesWithPreviousSibling collapsing logic
2954         https://bugs.webkit.org/show_bug.cgi?id=192791
2955
2956         Reviewed by Antti Koivisto.
2957
2958         * layout/blockformatting/BlockMarginCollapse.cpp:
2959         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
2960         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):
2961
2962 2018-12-18  Zalan Bujtas  <zalan@apple.com>
2963
2964         [LFC][BFC][MarginCollapsing] Expand marginAfterCollapsesWithParentMarginAfter and marginBeforeCollapsesWithParentMarginBefore collapsing logic
2965         https://bugs.webkit.org/show_bug.cgi?id=192787
2966
2967         Reviewed by Antti Koivisto.
2968
2969         * layout/blockformatting/BlockFormattingContext.h:
2970         * layout/blockformatting/BlockMarginCollapse.cpp:
2971         (WebCore::Layout::hasClearance):
2972         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
2973         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithSiblingMarginBeforeWithClearance):
2974         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginBefore):
2975         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
2976
2977 2018-12-17  Fujii Hironori  <Hironori.Fujii@sony.com>
2978
2979         [Win][Clang] Fix compilation warnings WebCore/platform/graphics directory
2980         https://bugs.webkit.org/show_bug.cgi?id=192752
2981
2982         Reviewed by Don Olmstead.
2983
2984         No new tests, no behavior changes.
2985
2986         * platform/graphics/win/DIBPixelData.cpp:
2987         Enclosed bitmapType and bitmapPixelsPerMeter with #ifndef NDEBUG.
2988         * platform/graphics/win/FontPlatformDataWin.cpp:
2989         (WebCore::FontPlatformData::openTypeTable const): Use ASSERT_UNUSED instead of ASSERT.
2990         * platform/graphics/win/GraphicsContextWin.cpp: Removed unused variable 'deg2rad'.
2991         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2992         Removed unused soft links MFCreateSampleGrabberSinkActivate, MFCreateMemoryBuffer and MFCreateSample.
2993         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerPrivateMediaFoundation):
2994         Reorder the initializer list.
2995         (WebCore::MediaPlayerPrivateMediaFoundation::seek): Use ASSERT_UNUSED instead of ASSERT.
2996         (WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes): Ditto.
2997         (WebCore::MediaPlayerPrivateMediaFoundation::createSession): Ditto.
2998         (WebCore::MediaPlayerPrivateMediaFoundation::endSession): Ditto.
2999         (WebCore::MediaPlayerPrivateMediaFoundation::onCreatedMediaSource): Ditto.
3000         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame): Added default case.
3001         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
3002         (WebCore::Font::platformBoundsForGlyph const): Use inner braces to initialize subobjects of MAT2.
3003         * platform/graphics/win/SimpleFontDataWin.cpp: Removed unused 'cSmallCapsFontSizeMultiplier'.
3004         (WebCore::Font::initGDIFont): Use inner braces to initialize subobjects of MAT2.
3005         (WebCore::Font::boundsForGDIGlyph const): Ditto.
3006         (WebCore::Font::widthForGDIGlyph const): Ditto.
3007         * platform/graphics/win/UniscribeController.cpp:
3008         (WebCore::UniscribeController::UniscribeController):
3009         Reorder the initializer list.
3010         (WebCore::UniscribeController::offsetForPosition): Use parentheses to combine && and ||.
3011         (WebCore::UniscribeController::shapeAndPlaceItem): Removed unused 'glyphCount'.
3012
3013 2018-12-17  Eric Carlson  <eric.carlson@apple.com>
3014
3015         [MediaStream] A stream's first video frame should be rendered
3016         https://bugs.webkit.org/show_bug.cgi?id=192629
3017         <rdar://problem/46664353>
3018
3019         Reviewed by Youenn Fablet.
3020
3021         Test: fast/mediastream/media-stream-renders-first-frame.html
3022
3023         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3024         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3025         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
3026         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayers):
3027         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentDisplayMode const):
3028         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateDisplayMode):
3029         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
3030         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentReadyState):
3031         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::characteristicsChanged):
3032         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::checkSelectedVideoTrack):
3033         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paintCurrentFrameInContext):
3034         * platform/mediastream/RealtimeMediaSource.cpp:
3035         (WebCore::RealtimeMediaSource::size const):
3036         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3037         (WebCore::AVVideoCaptureSource::processNewFrame):
3038         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
3039         (WebCore::RealtimeIncomingVideoSourceCocoa::processNewSample):
3040
3041 2018-12-17  Justin Michaud  <justin_michaud@apple.com>
3042
3043         Bindings generator should support Conditional= along with CachedAttribute
3044         https://bugs.webkit.org/show_bug.cgi?id=192721
3045
3046         Reviewed by Ryosuke Niwa.
3047
3048         Fix a bug where specifying both attributes causes compilation errors because the compile-time
3049         condition is not included in the derived code.
3050
3051         * bindings/scripts/CodeGeneratorJS.pm:
3052         (GenerateImplementation):
3053         * bindings/scripts/test/JS/JSTestObj.cpp:
3054         (WebCore::jsTestObjCachedAttribute3Getter):
3055         (WebCore::jsTestObjCachedAttribute3):
3056         (WebCore::JSTestObj::visitChildren):
3057         * bindings/scripts/test/JS/JSTestObj.h:
3058         * bindings/scripts/test/TestObj.idl:
3059
3060 2018-12-17  David Kilzer  <ddkilzer@apple.com>
3061
3062         clang-tidy: Fix unnecessary object copy in CPUMonitor::setCPULimit()
3063         <https://webkit.org/b/192707>
3064         <rdar://problem/46734926>
3065
3066         Reviewed by Daniel Bates.
3067
3068         * platform/CPUMonitor.cpp:
3069         (WebCore::CPUMonitor::setCPULimit):
3070         * platform/CPUMonitor.h:
3071         (WebCore::CPUMonitor::setCPULimit):
3072         - Change parameter to const reference to fix unnecessary copies.
3073
3074 2018-12-17  Ryosuke Niwa  <rniwa@webkit.org>
3075
3076         offsetLeft and offsetParent should adjust across shadow boundaries
3077         https://bugs.webkit.org/show_bug.cgi?id=157437
3078         <rdar://problem/26154021>
3079
3080         Reviewed by Simon Fraser.
3081
3082         Update the WebKit's treatment of shadow boundaries in offsetLeft, offsetTop, and offsetParent to match
3083         the latest discussion in CSS WG. See https://github.com/w3c/webcomponents/issues/497
3084         and https://github.com/w3c/webcomponents/issues/763
3085
3086         The latest consensus is to use the retargeting algorithm (https://dom.spec.whatwg.org/#retarget).
3087         In practice, this would mean that we need to keep walking up the offset parent ancestors until we find
3088         the one which is in the same tree as a shadow-inclusive ancestor of the context object.
3089
3090         For example, if a node (the context object of offsetTop, offsetLeft, offsetParent) was assigned to a slot
3091         inside a shadow tree and its offset parent was in the shadow tree, we need to walk up to its offset parent,
3092         then its offset parent, etc... until we find the offset parent in the same tree as the context object.
3093
3094         Note it's possible that the context object is inside a shadow tree which does not have its own offset parent.
3095         (e.g. all elements have position: static) For this reason, we need to consider not just offset parent in
3096         the same tree as the context object but as well as any offset parent which is in its ancestor trees.
3097
3098         Test: fast/shadow-dom/offsetParent-across-shadow-boundaries.html
3099
3100         * dom/Element.cpp:
3101         (WebCore::adjustOffsetForZoomAndSubpixelLayout): Extracted to share code between offsetLeft and offsetTop.
3102         (WebCore::collectAncestorTreeScopeAsHashSet): Added.
3103         (WebCore::Element::offsetLeftForBindings): Added. Sums up offsetLeft's until it finds the first offset parent
3104         which is a shadow-including ancestor (https://dom.spec.whatwg.org/#concept-shadow-including-ancestor).
3105         (WebCore::Element::offsetLeft): Now uses adjustOffsetForZoomAndSubpixelLayout.
3106         (WebCore::Element::offsetTopForBindings): Added. Like offsetLeftForBindings, this function sums up offsetTop's
3107         until it finds the first offset parent which is a shadow-including ancestor.
3108         (WebCore::Element::offsetTop): Now uses adjustOffsetForZoomAndSubpixelLayout.
3109         (WebCore::Element::offsetParentForBindings): Renamed from bindingsOffsetParent to be consistent with other
3110         functions meant to be used for bindings code.
3111         * dom/Element.h:
3112         * html/HTMLElement.idl:
3113
3114 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
3115
3116         Don't use more expensive layer backing store formats when subpixel text antialiasing is not enabled
3117         https://bugs.webkit.org/show_bug.cgi?id=192780
3118         rdar://problem/43394387
3119
3120         Reviewed by Tim Horton.
3121         
3122         macOS Mojave disabled text subpixel antialiasing by default, so we no longer need to use the
3123         memory-hungry "linear glyph mask" CALayer backing store formats for non-opaque with text in them.
3124         
3125         Add FontCascade::isSubpixelAntialiasingAvailable() which reports whether subpixel antialiasing is available,
3126         and consult it when making decisions that affect layer backing store format.
3127
3128         Tested by new results for existing tests.
3129
3130         * platform/graphics/FontCascade.cpp:
3131         (WebCore::FontCascade::isSubpixelAntialiasingAvailable):
3132         * platform/graphics/FontCascade.h:
3133         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3134         (WebCore::FontCascade::isSubpixelAntialiasingAvailable): CGFontRenderingGetFontSmoothingDisabled() isn't super cheap, so fetch
3135         it once.
3136         * rendering/RenderLayerBacking.cpp:
3137         (WebCore::RenderLayerBacking::updateAfterDescendants):
3138         * testing/Internals.cpp:
3139         (WebCore::Internals::setFontSmoothingEnabled): Remove a WebCore::
3140
3141 2018-12-17  Daniel Bates  <dabates@apple.com>
3142
3143         Make DocumentMarker::allMarkers() constexpr
3144         https://bugs.webkit.org/show_bug.cgi?id=192634
3145
3146         Reviewed by Simon Fraser.
3147
3148         The result of DocumentMarker::allMarkers() can be computed at compile time. We should annotate
3149         it constexpr to do just that.
3150
3151         * dom/DocumentMarker.h:
3152         (WebCore::DocumentMarker::allMarkers):
3153
3154 2018-12-17  Justin Fan  <justin_fan@apple.com>
3155
3156         [WebGPU] Implement WebGPUBindGroupLayoutDescriptor and its supporting dictionaries
3157         https://bugs.webkit.org/show_bug.cgi?id=192726
3158
3159         Reviewed by Myles C. Maxfield.
3160
3161         Test: webgpu/bind-group-layouts.html
3162         Implement the WebGPUBindGroupLayoutDescriptor struct and its sub-structs:
3163         * Modules/streams/WebGPUBindGroupLayoutDescriptor.h: Added.
3164         * Modules/streams/WebGPUBindGroupLayoutDescriptor.idl: Added.
3165         * Modules/webgpu/WebGPUBindGroupLayoutBinding.h: Added.
3166         * Modules/webgpu/WebGPUBindGroupLayoutBinding.idl: Added.
3167         * Modules/webgpu/WebGPUShaderStageBit.h: Added.
3168         * Modules/webgpu/WebGPUShaderStageBit.idl: Added.
3169         * platform/graphics/gpu/GPUBindGroupLayoutBinding.h: Added.
3170         * platform/graphics/gpu/GPUBindGroupLayoutDescriptor.h: Added.
3171
3172         Add the new symbols and files to the project:
3173         * CMakeLists.txt:
3174         * DerivedSources.make:
3175         * Sources.txt:
3176         * WebCore.xcodeproj/project.pbxproj:
3177         * bindings/js/WebCoreBuiltinNames.h:
3178
3179         Small FIXME update for later:
3180         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm:
3181         (WebCore::GPURenderPassEncoder::setVertexBuffers):
3182
3183 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3184
3185         Unreviewed build fix.
3186
3187         * page/ios/FrameIOS.mm:
3188         (WebCore::Frame::interpretationsForCurrentRoot const):
3189
3190 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3191
3192         Reproducible ASSERTion failure when toggling layer borders with find-in-page up
3193         https://bugs.webkit.org/show_bug.cgi?id=192762
3194         <rdar://problem/46676873>
3195
3196         Reviewed by Simon Fraser.
3197
3198         DocumentMarkerController::markersFor() should take a reference instead of a Node*.
3199
3200         Test: editing/document-marker-null-check.html
3201
3202         * dom/DocumentMarkerController.cpp:
3203         (DocumentMarkerController::hasMarkers):
3204         * dom/DocumentMarkerController.h:
3205         * editing/AlternativeTextController.cpp:
3206         (WebCore::AlternativeTextController::respondToChangedSelection):
3207         * editing/Editor.cpp:
3208         (WebCore::Editor::selectionStartHasMarkerFor const):
3209         * rendering/InlineTextBox.cpp:
3210         (WebCore::InlineTextBox::collectMarkedTextsForDocumentMarkers const):
3211         * rendering/RenderReplaced.cpp:
3212         (WebCore::RenderReplaced::paint):
3213         * rendering/RenderText.cpp:
3214         (WebCore::RenderText::draggedContentRangesBetweenOffsets const):
3215         * rendering/SimpleLineLayout.cpp:
3216         (WebCore::SimpleLineLayout::canUseForWithReason):
3217         * testing/Internals.cpp:
3218         (WebCore::Internals::markerCountForNode):
3219
3220 2018-12-17  Commit Queue  <commit-queue@webkit.org>
3221
3222         Unreviewed, rolling out r239265 and r239274.
3223         https://bugs.webkit.org/show_bug.cgi?id=192765
3224
3225         unorm_normalize is deprecated, and broke an internal build
3226         (Requested by Truitt on #webkit).
3227
3228         Reverted changesets:
3229
3230         "[GTK][WPE] Need a function to convert internal URI to display
3231         ("pretty") URI"
3232         https://bugs.webkit.org/show_bug.cgi?id=174816
3233         https://trac.webkit.org/changeset/239265
3234
3235         "Fix the Apple Internal Mac build with a newer SDK"
3236         https://trac.webkit.org/changeset/239274
3237
3238 2018-12-17  Daniel Bates  <dabates@apple.com>
3239
3240         [iOS] Remove -[WebEvent initWithKeyEventType:...:characterSet:]
3241         https://bugs.webkit.org/show_bug.cgi?id=192633
3242
3243         Reviewed by Wenson Hsieh.
3244
3245         UIKit has long adopted the newer -[WebEvent initWithKeyEventType:] initializer that takes an
3246         input manager hint. We no longer need to keep the variant -[WebEvent initWithKeyEventType:...:characterSet:]
3247         for binary compatibility.
3248
3249         * platform/ios/WebEvent.h:
3250         * platform/ios/WebEvent.mm:
3251         (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:keyCode:isTabKey:characterSet:]): Deleted.
3252
3253 2018-12-17  Matt Lewis  <jlewis3@apple.com>
3254
3255         Unreviewed, rolling out r239254.
3256
3257         This broke the Windows 10 Debug build
3258
3259         Reverted changeset:
3260
3261         "Replace many uses of String::format with more type-safe
3262         alternatives"
3263         https://bugs.webkit.org/show_bug.cgi?id=192742
3264         https://trac.webkit.org/changeset/239254
3265
3266 2018-12-17  Antoine Quint  <graouts@apple.com>
3267
3268         [Web Animations] Remove the redundant m_scheduledMicrotask from WebAnimation
3269         https://bugs.webkit.org/show_bug.cgi?id=192758
3270
3271         Reviewed by Dean Jackson.
3272
3273         We tracked whether we had a pending microtask twice so we remove the m_scheduledMicrotask flag as m_finishNotificationStepsMicrotaskPending
3274         gives us enough information as it is. Additionally, we remove the scheduleMicrotaskIfNeeded() and performMicrotask() functions since there is
3275         less bookkeeping to perform.
3276
3277         No new test since there is no user-observable change.
3278
3279         * animation/WebAnimation.cpp:
3280         (WebCore::WebAnimation::updateFinishedState):
3281         (WebCore::WebAnimation::scheduleMicrotaskIfNeeded): Deleted.
3282         (WebCore::WebAnimation::performMicrotask): Deleted.
3283         * animation/WebAnimation.h:
3284
3285 2018-12-17  Antoine Quint  <graouts@apple.com>
3286
3287         [Web Animations] Ensure we don't update an animation's finished state twice when updating animations
3288         https://bugs.webkit.org/show_bug.cgi?id=192757
3289
3290         Reviewed by Dean Jackson.
3291
3292         When animations are udpated and DocumentTimeline::updateAnimationsAndSendEvents() is called, we used to update an animation's finished state
3293         twice since we'd do it once when calling tick() and once again when calling resolve() in the ensuing style invalidation. We now keep track of
3294         whether we've already updated an animation's finished state during animation update in the call to tick() and avoid updating in the immediate
3295         next call to resolve(), unless any of the timing properties have changed in the meantime.
3296
3297         No new test since there is no user-observable change.
3298
3299         * animation/WebAnimation.cpp:
3300         (WebCore::WebAnimation::timingDidChange):
3301         (WebCore::WebAnimation::tick):
3302         (WebCore::WebAnimation::resolve):
3303         * animation/WebAnimation.h:
3304
3305 2018-12-17  Simon Fraser  <simon.fraser@apple.com>
3306
3307         REGRESSION (r233268): Elements animated in from offscreen sometimes don't display
3308         https://bugs.webkit.org/show_bug.cgi?id=192725
3309         rdar://problem/46011418
3310
3311         Reviewed by Antoine Quint.
3312
3313         There were two problems with backing store attachment and animation.
3314         
3315         First, animations are an input into the "backing store attached" logic, so when they change
3316         we should set the CoverageRectChanged bit on GraphicsLayerCA.
3317         
3318         Secondly, when an ancestor has unknown animation extent, all its descendants need to
3319         get backing store, so we need to set childCommitState.ancestorWithTransformAnimationIntersectsCoverageRect when
3320         the current layer has no animation extent.
3321
3322         Tests: compositing/backing/animate-into-view-with-descendant.html
3323                compositing/backing/animate-into-view.html
3324
3325         * platform/graphics/ca/GraphicsLayerCA.cpp:
3326         (WebCore::GraphicsLayerCA::addAnimation):
3327         (WebCore::GraphicsLayerCA::removeAnimation):
3328         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3329
3330 2018-12-17  Zalan Bujtas  <zalan@apple.com>
3331
3332         [LFC][BFC][MarginCollapsing] Unify margin collapse function naming
3333         https://bugs.webkit.org/show_bug.cgi?id=192747
3334
3335         Reviewed by Antti Koivisto.
3336
3337         Rename some margin collapse getters.
3338
3339         * layout/blockformatting/BlockFormattingContext.h:
3340         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3341         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3342         * layout/blockformatting/BlockMarginCollapse.cpp:
3343         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginBefore):
3344         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::computedNonCollapsedMarginAfter):
3345         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginBefore):
3346         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::nonCollapsedMarginAfter):
3347         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginBeforeFromFirstChild):
3348         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::collapsedMarginAfterFromLastChild):
3349         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginAfter):
3350         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithParentMarginBefore):
3351         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithParentMarginAfter):
3352         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBeforeCollapsesWithPreviousSibling):
3353         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfterCollapsesWithNextSibling):
3354         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginsCollapseThrough):
3355         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginBefore):
3356         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginAfter):
3357         (WebCore::Layout::isMarginBeforeCollapsedWithSibling): Deleted.
3358         (WebCore::Layout::isMarginAfterCollapsedWithSibling): Deleted.
3359         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParent): Deleted.
3360         (WebCore::Layout::isMarginAfterCollapsedThrough): Deleted.
3361         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginAfterCollapsedWithParent): Deleted.
3362         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::isMarginBeforeCollapsedWithParentMarginAfter): Deleted.
3363
3364 2018-12-17  David Kilzer  <ddkilzer@apple.com>
3365
3366         clang-tidy: loop variable is copied but only used as const reference in WebCore, WebKit, Tools
3367         <https://webkit.org/b/192751>
3368         <rdar://problem/46771623>
3369
3370         Reviewed by Daniel Bates.
3371
3372         Change loop variables to const references to avoid unnecessary
3373         copies.
3374
3375         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3376         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3377         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3378         (WebCore::IDBServer::MemoryObjectStore::populateIndexWithExistingRecords):
3379         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3380         (WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
3381         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
3382         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::objectStoreIdentifiers):
3383         * Modules/indexeddb/shared/IDBDatabaseInfo.cpp:
3384         (WebCore::IDBDatabaseInfo::IDBDatabaseInfo):
3385         (WebCore::IDBDatabaseInfo::loggingString const):
3386         * Modules/mediasource/SourceBuffer.cpp:
3387         (WebCore::removeSamplesFromTrackBuffer):
3388         * accessibility/AccessibilityRenderObject.cpp:
3389         (WebCore::AccessibilityRenderObject::targetElementForActiveDescendant const):
3390         * accessibility/AccessibilityTableRow.cpp:
3391         (WebCore::AccessibilityTableRow::headerObject):
3392         * animation/KeyframeEffect.cpp:
3393         (WebCore::KeyframeEffect::computedNeedsForcedLayout):
3394         * crypto/keys/CryptoKeyRSA.cpp:
3395         (WebCore::CryptoKeyRSA::importJwk):
3396         (WebCore::CryptoKeyRSA::exportJwk const):
3397         * css/CSSComputedStyleDeclaration.cpp:
3398         (WebCore::OrderedNamedLinesCollector::appendLines const):
3399         * dom/DataTransfer.cpp:
3400         (WebCore::readURLsFromPasteboardAsString):
3401         * dom/TreeScope.cpp:
3402         (WebCore::TreeScope::elementsFromPoint):
3403         * html/track/WebVTTParser.cpp:
3404         (WebCore::WebVTTParser::checkAndStoreRegion):
3405         * inspector/agents/InspectorTimelineAgent.cpp:
3406         (WebCore::InspectorTimelineAgent::setInstruments):
3407         * page/Page.cpp:
3408         (WebCore::Page::updateIntersectionObservations):
3409         * page/TextIndicator.cpp:
3410         (WebCore::estimatedBackgroundColorForRange):
3411         * page/animation/KeyframeAnimation.cpp:
3412         (WebCore::KeyframeAnimation::computeLayoutDependency):
3413         * platform/graphics/DisplayRefreshMonitorManager.cpp:
3414         (WebCore::DisplayRefreshMonitorManager::displayWasUpdated):
3415         * platform/graphics/ca/GraphicsLayerCA.cpp:
3416         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
3417         (WebCore::GraphicsLayerCA::updateAnimations):
3418         (WebCore::GraphicsLayerCA::isRunningTransformAnimation const):
3419         * platform/graphics/mac/ImageMac.mm:
3420         (WebCore::BitmapImage::tiffRepresentation):
3421         * rendering/HitTestResult.cpp:
3422         (WebCore::HitTestResult::append):
3423         * testing/Internals.cpp:
3424         (WebCore::Internals::acceleratedAnimationsForElement):
3425
3426 2018-12-17  Ms2ger  <Ms2ger@igalia.com>
3427
3428         [GTK][WPE] Need a function to convert internal URI to display ("pretty") URI
3429         https://bugs.webkit.org/show_bug.cgi?id=174816
3430
3431         Reviewed by Michael Catanzaro.
3432
3433         Tests: enabled fast/url/user-visible/.
3434
3435         * testing/Internals.cpp:
3436         (WebCore::Internals::userVisibleString): Enable method on all platforms.
3437
3438 2018-12-15  Yusuke Suzuki  <yusukesuzuki@slowstart.org>
3439
3440         Null pointer dereference in JSC::WriteBarrierBase()
3441         https://bugs.webkit.org/show_bug.cgi?id=191252
3442
3443         Reviewed by Keith Miller.
3444
3445         * bindings/js/JSCustomElementRegistryCustom.cpp:
3446         (WebCore::JSCustomElementRegistry::whenDefined):
3447         * bindings/js/JSDOMPromiseDeferred.cpp:
3448         (WebCore::createDeferredPromise):
3449         * bindings/js/JSDOMPromiseDeferred.h:
3450         (WebCore::DeferredPromise::create):
3451         (WebCore::callPromiseFunction):
3452         * bindings/js/JSDOMWindowBase.cpp:
3453         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
3454         (WebCore::JSDOMWindowBase::moduleLoaderImportModule):
3455         * bindings/js/ScriptModuleLoader.cpp:
3456         (WebCore::ScriptModuleLoader::fetch):
3457         (WebCore::rejectPromise):
3458
3459 2018-12-15  Darin Adler  <darin@apple.com>
3460
3461         Use warning-ignoring macros more consistently and simply
3462         https://bugs.webkit.org/show_bug.cgi?id=192743
3463
3464         Reviewed by Mark Lam.
3465
3466         * bridge/objc/WebScriptObject.mm: Use IGNORE_WARNINGS_BEGIN rather than
3467         IGNORE_CLANG_WARNINGS_BEGIN here. There is no need to compile Objective-C++
3468         files like this one with non-clang compilers, and no need to worry about
3469         them when choosing the macro.
3470
3471         * crypto/mac/CryptoKeyRSAMac.cpp:
3472         (WebCore::getPublicKeyComponents): Use ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
3473
3474         * css/makeprop.pl: Use IGNORE_WARNINGS_BEGIN/END, obviating the need for
3475         the "unknown-pragmas" trick, which the macro should take care of.
3476         * css/makevalues.pl: Ditto.
3477         * platform/ColorData.gperf: Ditto.
3478
3479         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
3480         (WebCore::CDMSessionAVStreamSession::update): Use IGNORE_WARNINGS_BEGIN/END
3481         (see rationale above for Objective-C++).
3482
3483         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3484         (WebCore::MediaPlayerPrivateAVFoundationObjC::videoPlaybackQualityMetrics): Use
3485         ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END.
3486         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3487         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::videoPlaybackQualityMetrics): Ditto.
3488
3489         * platform/ios/DragImageIOS.mm: Use IGNORE_WARNINGS_BEGIN/END
3490         (see rationale above for Objective-C++).
3491
3492         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3493         (-[WebAVPlayerViewController setWebKitOverrideRouteSharingPolicy:routingContextUID:]):
3494         Use ALLOW_NEW_API_WITHOUT_GUARDS_BEGIN/END.
3495
3496         * platform/mac/WebPlaybackControlsManager.mm: Use IGNORE_WARNINGS_BEGIN/END
3497         (see rationale above for Objective-C++).
3498
3499         * platform/network/cocoa/ResourceResponseCocoa.mm:
3500         (WebCore::ResourceResponse::platformCertificateInfo const): Use
3501         ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END.
3502
3503 2018-12-15  Darin Adler  <darin@apple.com>
3504
3505         Replace many uses of String::format with more type-safe alternatives
3506         https://bugs.webkit.org/show_bug.cgi?id=192742
3507
3508         Reviewed by Mark Lam.
3509
3510         A while back, String::format was more efficient than string concatenation,
3511         but that is no longer true, and we should prefer String::number, makeString,
3512         or concatenation with the "+" operator to String::format for new code.
3513
3514         This is not as good for programmers who are fond of printf formatting
3515         style, and in some cases it's a little harder to read the strings
3516         interspersed with variables rather than a format string, but it's better
3517         in a few ways:
3518
3519         - more efficient (I didn't measure the difference, but it's definitely
3520           slower to use String::Format which calls vsnprintf twice than to use
3521           the WTF code)
3522         - works in a type-safe way without a need to use a format specifier such
3523           as "%" PRIu64 or "%tu" making it much easier to avoid problems due to
3524           subtle differences between platforms
3525         - allows us to use StringView in some cases to sidestep the need to
3526           allocate temporary WTF::String objects
3527         - does not require converting each WTF::String to a C string, allowing
3528           us to remove many cases of ".utf8().data()" and similar expressions,
3529           eliminating the allocation of temporary WTF::CString objects
3530
3531         This patch covers a batch of easiest-to-convert call sites.
3532         Later patches will allow us to deprecate or remove String::format.
3533
3534         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3535         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Use makeString.
3536         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
3537         (WebCore::IDBCursorInfo::loggingString const): Ditto.
3538         * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
3539         (WebCore::IDBGetAllRecordsData::loggingString const): Ditto.
3540         * Modules/indexeddb/shared/IDBGetRecordData.cpp:
3541         (WebCore::IDBGetRecordData::loggingString const): Ditto.
3542         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
3543         (WebCore::IDBIndexInfo::loggingString const): Ditto.
3544         (WebCore::IDBIndexInfo::condensedLoggingString const): Ditto.
3545         * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
3546         (WebCore::IDBIterateCursorData::loggingString const): Ditto.
3547         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
3548         (WebCore::IDBObjectStoreInfo::condensedLoggingString const): Ditto.
3549         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
3550         (WebCore::IDBResourceIdentifier::loggingString const): Ditto.
3551         * Modules/webdatabase/Database.cpp:
3552         (WebCore::formatErrorMessage): Ditto.
3553         * Modules/webdatabase/SQLError.h:
3554         (WebCore::SQLError::create): Ditto.
3555
3556         * bindings/scripts/CodeGeneratorJS.pm:
3557         (GenerateImplementation): Use makeString.
3558
3559         * bindings/scripts/test/JS/JSInterfaceName.cpp:
3560         * bindings/scripts/test/JS/JSMapLike.cpp:
3561         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
3562         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3563         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
3564         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
3565         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
3566         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3567         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3568         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3569         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
3570         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3571         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3572         * bindings/scripts/test/JS/JSTestException.cpp:
3573         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3574         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
3575         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
3576         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
3577         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
3578         * bindings/scripts/test/JS/JSTestInterface.cpp:
3579         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
3580         * bindings/scripts/test/JS/JSTestIterable.cpp:
3581         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3582         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
3583         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
3584         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
3585         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3586         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
3587         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
3588         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
3589         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
3590         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
3591         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
3592         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
3593         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
3594         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
3595         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
3596         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
3597         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
3598         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
3599         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
3600         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
3601         * bindings/scripts/test/JS/JSTestNode.cpp:
3602         * bindings/scripts/test/JS/JSTestObj.cpp:
3603         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3604         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
3605         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
3606         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
3607         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
3608         * bindings/scripts/test/JS/JSTestSerialization.cpp:
3609         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
3610         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
3611         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
3612         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3613         * bindings/scripts/test/JS/JSTestStringifier.cpp:
3614         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
3615         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
3616         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
3617         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
3618         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
3619         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
3620         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3621         Updated expected results.
3622 :
3623         * css/parser/CSSPropertyParserHelpers.cpp:
3624         (WebCore::CSSPropertyParserHelpers::parseHexColor): Use String::number
3625         and makeString.
3626
3627         * html/HTMLSelectElement.cpp:
3628         (WebCore::HTMLSelectElement::setLength): Use makeString.
3629         * html/ImageDocument.cpp:
3630         (WebCore::ImageDocument::imageUpdated): Ditto.
3631         * html/parser/XSSAuditor.cpp:
3632         (WebCore::XSSAuditor::init): Ditto.
3633         * inspector/InspectorFrontendClientLocal.cpp:
3634         (WebCore::InspectorFrontendClientLocal::setDockingUnavailable): Ditto.
3635         (WebCore::InspectorFrontendClientLocal::setAttachedWindow): Ditto.
3636         (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled): Ditto.
3637         (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled): Ditto.
3638         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame): Ditto.
3639         * inspector/agents/InspectorCSSAgent.cpp: Ditto.
3640         * inspector/agents/InspectorIndexedDBAgent.cpp: Ditto.
3641         * page/MemoryRelease.cpp:
3642         (WebCore::logMemoryStatisticsAtTimeOfDeath): Ditto.
3643
3644         * page/cocoa/ResourceUsageOverlayCocoa.mm:
3645         (WebCore::formatByteNumber): Use String::number.
3646         (WebCore::ResourceUsageOverlay::platformDraw): Use string concatenation.
3647
3648         * page/cocoa/ResourceUsageThreadCocoa.mm:
3649         (WebCore::logFootprintComparison): Use makeString.
3650         * platform/animation/TimingFunction.cpp:
3651         (WebCore::TimingFunction::cssText const): Ditto.
3652
3653         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
3654         (WebCore::AVTrackPrivateAVFObjCImpl::id const): Use AtomicString::number.
3655         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.h:
3656         (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC): Ditto.
3657
3658         * platform/graphics/ca/GraphicsLayerCA.cpp:
3659         (WebCore::GraphicsLayerCA::setContentsToSolidColor): Use makeString.
3660         (WebCore::GraphicsLayerCA::updateContentsImage): Ditto.
3661         (WebCore::GraphicsLayerCA::updateContentsRects): Ditto.
3662         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): Ditto.
3663         * platform/mock/MockRealtimeVideoSource.cpp:
3664         (WebCore::MockRealtimeVideoSource::drawText): Ditto.
3665
3666         * platform/mock/mediasource/MockSourceBufferPrivate.cpp: Use String::number.
3667
3668         * platform/network/ParsedContentRange.cpp:
3669         (WebCore::ParsedContentRange::headerValue const): Use makeString.
3670
3671         * platform/network/cf/NetworkStorageSessionCFNet.cpp: Removed some unnecessary
3672         compiler conditionals and reorganized the start/stop of namespaces.
3673         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use makeString.
3674
3675         * platform/sql/SQLiteDatabase.cpp:
3676         (WebCore::unauthorizedSQLFunction): Use makeString.
3677         * rendering/RenderLayerCompositor.cpp:
3678         (WebCore::RenderLayerCompositor::logLayerInfo): Ditto.
3679         * workers/service/server/RegistrationDatabase.cpp:
3680         (WebCore::RegistrationDatabase::ensureValidRecordsTable): Ditto.
3681         (WebCore::RegistrationDatabase::importRecords): Ditto.
3682
3683 2018-12-15  Youenn Fablet  <youenn@apple.com>
3684
3685         Make RTCRtpSender.setParameters to activate specific encodings
3686         https://bugs.webkit.org/show_bug.cgi?id=192732
3687
3688         Reviewed by Eric Carlson.
3689
3690         The conversion between libwebrtc and WebCore is lossy for send parameters.
3691         Libwebrtc checking the differences of values, call to setParameters will often fail.
3692
3693         Given some parameters cannot be exposed, the sender backend keeps the
3694         current set of parameters when gathered and reuses them when parameters are set.
3695
3696         For encodings, we only change activate/maxBitRate/maxFrameRate as
3697         these are the most important parameters to be able to modify.
3698
3699         Covered by added tests in webrtc/video.html.
3700
3701         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.cpp:
3702         (WebCore::LibWebRTCRtpSenderBackend::getParameters const):
3703         (WebCore::LibWebRTCRtpSenderBackend::setParameters):
3704         * Modules/mediastream/libwebrtc/LibWebRTCRtpSenderBackend.h:
3705         * Modules/mediastream/libwebrtc/LibWebRTCUtils.cpp:
3706         (WebCore::fromRTCRtpSendParameters):
3707         (WebCore::fromRTCEncodingParameters): Deleted.
3708         * Modules/mediastream/libwebrtc/LibWebRTCUtils.h:
3709
3710 2018-12-14  Joseph Pecoraro  <pecoraro@apple.com>
3711
3712         Web Inspector: Avoid creating and evaluating in the InspectorOverlay page on iOS as it is unused
3713         https://bugs.webkit.org/show_bug.cgi?id=192724
3714         <rdar://problem/46745911>
3715
3716         Reviewed by Devin Rousso.
3717
3718         iOS never installs the InspectorOverlay page as a page overlay.
3719         It also uses its own node highlighting painting. Avoid any work
3720         and resources associated with the overlay page for iOS.
3721
3722         * inspector/InspectorOverlay.cpp:
3723         (WebCore::InspectorOverlay::paint):
3724         (WebCore::InspectorOverlay::update):
3725         (WebCore::InspectorOverlay::overlayPage):
3726         (WebCore::evaluateCommandInOverlay):
3727
3728 2018-12-14  Youenn Fablet  <youenn@apple.com>
3729
3730         MediaRecorderPrivateAVFImpl should have a Ref<MediaRecorderPrivateWriter> as member
3731         https://bugs.webkit.org/show_bug.cgi?id=192720
3732
3733         Reviewed by Eric Carlson.
3734
3735         Make sure that MediaRecorderPrivateAVFImpl takes a Ref<MediaRecorderPrivateWriter> as member,
3736         as the latter is a ref counted object.
3737         Made some refactoring to return early in case of error.
3738
3739         Also made sure that in the case of a MediaRecorder stopped by a track removal in the recorded stream
3740         the MediaRecorder will stop listening for its tracks.
3741         Otherwise, the tracks will continue calling the MediaRecorder even after it is dead.
3742
3743         Test: http/wpt/mediarecorder/MediaRecorder-onremovetrack.html
3744
3745         * Modules/mediarecorder/MediaRecorder.cpp:
3746         (WebCore::MediaRecorder::didAddOrRemoveTrack):
3747         (WebCore::MediaRecorder::setNewRecordingState): Deleted.
3748         * Modules/mediarecorder/MediaRecorder.h:
3749         * platform/mediarecorder/MediaRecorderPrivateAVFImpl.cpp:
3750         (WebCore::MediaRecorderPrivateAVFImpl::create):
3751         (WebCore::MediaRecorderPrivateAVFImpl::MediaRecorderPrivateAVFImpl):
3752         (WebCore::MediaRecorderPrivateAVFImpl::sampleBufferUpdated):
3753         (WebCore::MediaRecorderPrivateAVFImpl::audioSamplesAvailable):
3754         (WebCore::MediaRecorderPrivateAVFImpl::stopRecording):
3755         (WebCore::MediaRecorderPrivateAVFImpl::fetchData):
3756         * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h:
3757         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.h:
3758         * platform/mediarecorder/cocoa/MediaRecorderPrivateWriterCocoa.mm:
3759         (WebCore::MediaRecorderPrivateWriter::create):
3760         (WebCore::MediaRecorderPrivateWriter::MediaRecorderPrivateWriter):
3761         (WebCore::MediaRecorderPrivateWriter::appendAudioSampleBuffer):
3762         (WebCore::MediaRecorderPrivateWriter::setupWriter): Deleted.
3763
3764 2018-12-14  Youenn Fablet  <youenn@apple.com>
3765
3766         getSenders/getReceivers() should not return closed transceiver senders/receivers
3767         https://bugs.webkit.org/show_bug.cgi?id=192706
3768
3769         Reviewed by Eric Carlson.
3770
3771         Updated as per https://github.com/w3c/webrtc-pc/commit/85284b76baebf9e149d194e692be16a21768a91a
3772         This forces us to compute the sender/receiver list at getter call time.
3773         Updated the internal call sites of senders to use the list of transceivers instead.
3774
3775         Covered by updated WPT tests.
3776
3777         * Modules/mediastream/RTCPeerConnection.cpp:
3778         (WebCore::RTCPeerConnection::addTrack):
3779         (WebCore::RTCPeerConnection::getSenders const):
3780         (WebCore::RTCPeerConnection::getReceivers const):
3781         * Modules/mediastream/RTCPeerConnection.h:
3782         * Modules/mediastream/RTCRtpTransceiver.cpp:
3783         (WebCore::RTCRtpTransceiver::stopped const):
3784         (WebCore::RtpTransceiverSet::append):
3785         (WebCore::RtpTransceiverSet::senders const):
3786         (WebCore::RtpTransceiverSet::receivers const):
3787         * Modules/mediastream/RTCRtpTransceiver.h:
3788         (WebCore::RtpTransceiverSet::senders const): Deleted.
3789         (WebCore::RtpTransceiverSet::receivers const): Deleted.
3790         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
3791         (WebCore::findExistingSender):
3792         (WebCore::LibWebRTCPeerConnectionBackend::addTrack):
3793
3794 2018-12-14  David Kilzer  <ddkilzer@apple.com>
3795
3796         clang-tidy: Fix unnecessary copy of objects for operator==() methods
3797         <https://webkit.org/b/192712>
3798         <rdar://problem/46739332>
3799
3800         Reviewed by Andy Estes.
3801
3802         * contentextensions/HashableActionList.h:
3803         (WebCore::ContentExtensions::HashableActionList::operator== const):
3804         (WebCore::ContentExtensions::HashableActionList::operator!= const):
3805         * platform/network/FormData.h:
3806         (WebCore::FormDataElement::EncodedFileData::operator== const):
3807         (WebCore::FormDataElement::EncodedBlobData::operator== const):
3808         - Change arguments from const to const reference to avoid
3809           copies.
3810
3811 2018-12-14  Jer Noble  <jer.noble@apple.com>
3812
3813         CRASH in CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession(WTF::String const&, WTF::Function<void ()>&&)
3814         https://bugs.webkit.org/show_bug.cgi?id=192713
3815         <rdar://problem/46739706>
3816
3817         Reviewed by Eric Carlson.
3818
3819         A callback is being called twice, and the second time has a null Promise. Instead of these
3820         callbacks being WTF::Function, make them WTF::CompletionHandlers, which self-nullify and
3821         have ASSERTS() that they are called once-and-only-once.
3822
3823         * platform/encryptedmedia/CDMInstanceSession.h:
3824         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
3825         (WebCore::CDMInstanceSessionClearKey::closeSession):
3826         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
3827         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::closeSession):
3828         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRequest):
3829         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didProvideRenewingRequest):
3830         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::didFailToProvideRequest):
3831         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestDidSucceed):
3832
3833 2018-12-14  David Kilzer  <ddkilzer@apple.com>
3834
3835         clang-tidy: Fix unnecessary object copies in WebCore/platform/graphics/avfoundation/objc/
3836         <https://webkit.org/b/192708>
3837         <rdar://problem/46735907>
3838
3839         Reviewed by Jer Noble.
3840
3841         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
3842         (WebCore::toSample):
3843         - Make argument a const reference.
3844
3845         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3846         - Update method signatures for implementation changes.
3847         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3848         (WebCore::MediaPlayerPrivateAVFoundationObjC::setAsset):
3849         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekableTimeRangesDidChange):
3850         (WebCore::MediaPlayerPrivateAVFoundationObjC::loadedTimeRangesDidChange):
3851         - Make RetainPtr<> argument an rvalue reference and use WTFMove().
3852         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
3853         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
3854         - Make RetainPtr<> argument a const reference.
3855
3856         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3857         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVolume):
3858         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setMuted):
3859         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
3860         - Change for loop keys to be const references.
3861
3862         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
3863         - Update method signatures for implementation changes.
3864         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3865         (WebCore::SourceBufferPrivateAVFObjC::fastSeekTimeForMediaTime):
3866         (WebCore::SourceBufferPrivateAVFObjC::seekToTime):
3867         - Make Mediatime arguments a const reference.
3868
3869 2018-12-14  Simon Fraser  <simon.fraser@apple.com>
3870
3871         REGRESSION (r233268): contents of an animated element inside overflow:hidden disappear
3872         https://bugs.webkit.org/show_bug.cgi?id=188655
3873         rdar://problem/43382687
3874
3875         Reviewed by Antoine Quint.
3876
3877         The logic that computes animation extent, used by backing store attachment code, failed
3878         to account for the behavior where a keyframe animation with a missing 0% keyframe uses
3879         the transform from the unanimated style. This resulted in the computed extent being wrong,
3880         which caused us to remove the layer's backing store in some scenarios.
3881
3882         Fix both animation code paths to use the renderer style if the first keyframe doesn't
3883         contain a transform.
3884
3885         Tests: compositing/backing/backing-store-attachment-empty-keyframe.html
3886                legacy-animation-engine/compositing/backing/backing-store-attachment-empty-keyframe.html
3887
3888         * animation/KeyframeEffect.cpp:
3889         (WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):
3890         * page/animation/KeyframeAnimation.cpp:
3891         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation const):
3892
3893 2018-12-14  Chris Dumez  <cdumez@apple.com>
3894
3895         [PSON] Stop exposing PolicyAction::Suspend to WebCore
3896         https://bugs.webkit.org/show_bug.cgi?id=192701
3897
3898         Reviewed by Brady Eidson.
3899
3900         Drop PolicyAction::Suspend enum value and stop dealing with it in WebCore.
3901
3902         * loader/DocumentLoader.cpp:
3903         (WebCore::DocumentLoader::continueAfterContentPolicy):
3904         * loader/FrameLoaderTypes.h:
3905         * loader/PolicyChecker.cpp:
3906         (WebCore::PolicyChecker::checkNavigationPolicy):
3907         (WebCore::PolicyChecker::checkNewWindowPolicy):
3908
3909 2018-12-14  Youenn Fablet  <youenn@apple.com>
3910
3911         IDB should store RTCCertificate
3912         https://bugs.webkit.org/show_bug.cgi?id=192599
3913
3914         Reviewed by Brady Eidson.
3915
3916         In case there is no script execution context, do not create a JS DOM wrapper for RTCCertificate.
3917         Instead, create an empty object so that the deserialization can still succeed.
3918         This should only impact IDB deserialization in the Network Process which does not need the actual JS DOM wrapper.
3919
3920         Test: webrtc/certificates-indexeddb.html
3921
3922         * bindings/js/SerializedScriptValue.cpp:
3923         (WebCore::CloneDeserializer::readTerminal):
3924
3925 2018-12-14  Zalan Bujtas  <zalan@apple.com>
3926
3927         [LFC][BFC] Transition to logical margin types.
3928         https://bugs.webkit.org/show_bug.cgi?id=192699
3929
3930         Reviewed by Antti Koivisto.
3931
3932         This is in preparation for moving over to logical types.
3933         (This patch also transitions to singlular margin naming (verticalMargins -> VerticalMargin))
3934
3935         * layout/FormattingContext.cpp:
3936         (WebCore::Layout::FormattingContext::computeOutOfFlowHorizontalGeometry const):
3937         (WebCore::Layout::FormattingContext::computeOutOfFlowVerticalGeometry const):
3938         (WebCore::Layout::FormattingContext::validateGeometryConstraintsAfterLayout const):
3939         * layout/FormattingContext.h:
3940         * layout/FormattingContextGeometry.cpp:
3941         (WebCore::Layout::staticVerticalPositionForOutOfFlowPositioned):
3942         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
3943         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHorizontalGeometry):
3944         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedVerticalGeometry):
3945         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHorizontalGeometry):
3946         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
3947         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
3948         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
3949         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeightAndMargin):
3950         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
3951         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedHorizontalMarginValue):
3952         (WebCore::Layout::FormattingContext::Geometry::computedNonCollapsedVerticalMarginValue):
3953         * layout/FormattingContextQuirks.cpp:
3954         (WebCore::Layout::FormattingContext::Quirks::heightValueOfNearestContainingBlockWithFixedHeight):
3955         * layout/MarginTypes.h:
3956         (WebCore::Layout::VerticalMargin::usedValues const):
3957         * layout/Verification.cpp:
3958         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
3959         * layout/blockformatting/BlockFormattingContext.cpp:
3960         (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBefore const):
3961         (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBeforeForAncestors const):
3962         (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const):
3963         (WebCore::Layout::hasPrecomputedMarginBefore):
3964         (WebCore::Layout::BlockFormattingContext::computeFloatingPosition const):
3965         (WebCore::Layout::BlockFormattingContext::computePositionToAvoidFloats const):
3966         (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
3967         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
3968         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
3969         (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTop const): Deleted.
3970         (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginTopForAncestors const): Deleted.
3971         (WebCore::Layout::hasPrecomputedMarginTop): Deleted.
3972         * layout/blockformatting/BlockFormattingContext.h:
3973         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3974         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
3975         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
3976         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowReplacedWidthAndMargin):
3977         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
3978         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
3979         (WebCore::Layout::BlockFormattingContext::Geometry::instrinsicWidthConstraints):
3980         (WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginBefore):
3981         (WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginAfter):
3982         (WebCore::Layout::BlockFormattingContext::Geometry::estimatedMarginTop): Deleted.
39