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