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