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