24ae30eca753cc1491247a00203179b137d68756
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-01-23  Oriol Brufau  <obrufau@igalia.com>
2
3         Add CSS Logical spec to features.json
4         https://bugs.webkit.org/show_bug.cgi?id=193717
5
6         Reviewed by Manuel Rego Casasnovas.
7
8         * features.json:
9
10 2019-01-22  Conrad Shultz  <conrad_shultz@apple.com>
11
12         Clean up USE(WEB_THREAD)
13         https://bugs.webkit.org/show_bug.cgi?id=193698
14
15         Rubber-stamped by Tim Horton.
16
17         * page/CaptionUserPreferencesMediaAF.cpp:
18         (WebCore::userCaptionPreferencesChangedNotificationCallback):
19         * platform/cf/MainThreadSharedTimerCF.cpp:
20         (WebCore::applicationDidBecomeActive):
21         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
22         (WebCore::dispatchToMainThread):
23         * platform/graphics/cocoa/TextTrackRepresentationCocoa.mm:
24         (-[WebCoreTextTrackRepresentationCocoaHelper observeValueForKeyPath:ofObject:change:context:]):
25         * platform/ios/LegacyTileCache.mm:
26         (WebCore::LegacyTileCache::layoutTiles):
27         (WebCore::LegacyTileCache::setTilingMode):
28         * platform/ios/WebCoreMotionManager.mm:
29         (-[WebCoreMotionManager sendAccelerometerData:]):
30         (-[WebCoreMotionManager sendMotionData:withHeading:]):
31         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
32         (VideoFullscreenControllerContext::requestUpdateInlineRect):
33         (VideoFullscreenControllerContext::requestVideoContentLayer):
34         (VideoFullscreenControllerContext::returnVideoContentLayer):
35         (VideoFullscreenControllerContext::didSetupFullscreen):
36         (VideoFullscreenControllerContext::willExitFullscreen):
37         (VideoFullscreenControllerContext::didExitFullscreen):
38         (VideoFullscreenControllerContext::didCleanupFullscreen):
39         (VideoFullscreenControllerContext::fullscreenMayReturnToInline):
40         (VideoFullscreenControllerContext::requestFullscreenMode):
41         (VideoFullscreenControllerContext::setVideoLayerFrame):
42         (VideoFullscreenControllerContext::setVideoLayerGravity):
43         (VideoFullscreenControllerContext::fullscreenModeChanged):
44         (VideoFullscreenControllerContext::play):
45         (VideoFullscreenControllerContext::pause):
46         (VideoFullscreenControllerContext::togglePlayState):
47         (VideoFullscreenControllerContext::toggleMuted):
48         (VideoFullscreenControllerContext::setMuted):
49         (VideoFullscreenControllerContext::setVolume):
50         (VideoFullscreenControllerContext::setPlayingOnSecondScreen):
51         (VideoFullscreenControllerContext::beginScrubbing):
52         (VideoFullscreenControllerContext::endScrubbing):
53         (VideoFullscreenControllerContext::seekToTime):
54         (VideoFullscreenControllerContext::fastSeek):
55         (VideoFullscreenControllerContext::beginScanningForward):
56         (VideoFullscreenControllerContext::beginScanningBackward):
57         (VideoFullscreenControllerContext::endScanning):
58         (VideoFullscreenControllerContext::selectAudioMediaOption):
59         (VideoFullscreenControllerContext::selectLegibleMediaOption):
60         (VideoFullscreenControllerContext::duration const):
61         (VideoFullscreenControllerContext::currentTime const):
62         (VideoFullscreenControllerContext::bufferedTime const):
63         (VideoFullscreenControllerContext::isPlaying const):
64         (VideoFullscreenControllerContext::playbackRate const):
65         (VideoFullscreenControllerContext::seekableRanges const):
66         (VideoFullscreenControllerContext::seekableTimeRangesLastModifiedTime const):
67         (VideoFullscreenControllerContext::liveUpdateInterval const):
68         (VideoFullscreenControllerContext::canPlayFastReverse const):
69         (VideoFullscreenControllerContext::audioMediaSelectionOptions const):
70         (VideoFullscreenControllerContext::audioMediaSelectedIndex const):
71         (VideoFullscreenControllerContext::legibleMediaSelectionOptions const):
72         (VideoFullscreenControllerContext::legibleMediaSelectedIndex const):
73         (VideoFullscreenControllerContext::externalPlaybackEnabled const):
74         (VideoFullscreenControllerContext::externalPlaybackTargetType const):
75         (VideoFullscreenControllerContext::externalPlaybackLocalizedDeviceName const):
76         (VideoFullscreenControllerContext::wirelessVideoPlaybackDisabled const):
77         (VideoFullscreenControllerContext::setUpFullscreen):
78         (VideoFullscreenControllerContext::exitFullscreen):
79         (VideoFullscreenControllerContext::requestHideAndExitFullscreen):
80         (-[WebVideoFullscreenController enterFullscreen:mode:]):
81         (-[WebVideoFullscreenController exitFullscreen]):
82         (-[WebVideoFullscreenController requestHideAndExitFullscreen]):
83         * platform/ios/wak/WAKWindow.mm:
84         (-[WAKWindow setVisible:]):
85         (-[WAKWindow setScreenScale:]):
86         (-[WAKWindow sendEvent:]):
87         (-[WAKWindow sendMouseMoveEvent:contentChange:]):
88         * platform/network/ios/NetworkStateNotifierIOS.mm:
89         (WebCore::NetworkStateNotifier::startObserving):
90         * rendering/RenderThemeIOS.mm:
91         (WebCore::contentSizeCategoryDidChange):
92
93 2019-01-23  David Kilzer  <ddkilzer@apple.com>
94
95         REGRESSION (r240292): Attempt to fix WinCairo build
96
97         * platform/network/curl/CurlResourceHandleDelegate.cpp:
98         (WebCore::handleCookieHeaders): Remove argument to
99         NetworkingContext::storageSession().
100
101 2019-01-23  Wenson Hsieh  <wenson_hsieh@apple.com>
102
103         Introduce UndoStep::label() and adopt it in WebKitLegacy and WebKit
104         https://bugs.webkit.org/show_bug.cgi?id=193706
105         <rdar://problem/44807048>
106
107         Reviewed by Ryosuke Niwa.
108
109         Refactors some existing logic when registering undoable actions, such that we propagate the undoable action's
110         label string instead of the EditAction to the client layer. This will help make handling of CustomUndoStep's
111         undo/redo label simpler, as the client layer won't need to worry about managing an EditAction and undo/redo
112         label simultaneously. There should be no change in behavior.
113
114         * editing/CompositeEditCommand.cpp:
115         (WebCore::EditCommandComposition::label const):
116         * editing/CompositeEditCommand.h:
117         * editing/CustomUndoStep.cpp:
118         (WebCore::CustomUndoStep::label const):
119         * editing/CustomUndoStep.h:
120         * editing/EditAction.cpp:
121         (WebCore::undoRedoLabel):
122         (WebCore::nameForUndoRedo): Deleted.
123         * editing/EditAction.h:
124
125         Rename nameForUndoRedo to undoRedoLabel, and remove the WEBCORE_EXPORT since it's no longer needed in WebKit or
126         WebKitLegacy.
127
128         * editing/UndoStep.h:
129
130         Add UndoStep::label(). While EditCommandComposition implements this by mapping its EditAction to a
131         localized string, CustomUndoStep implements this by returning the undoable action label provided by script.
132
133 2019-01-23  Michael Catanzaro  <mcatanzaro@igalia.com>
134
135         [SOUP] Clean up NetworkStorageSession
136         https://bugs.webkit.org/show_bug.cgi?id=193707
137
138         Reviewed by Carlos Garcia Campos.
139
140         A NetworkStorageSession now always has a SoupNetworkSession, so we can remove a lot of
141         complexity that is no longer needed. getOrCreateSoupNetworkSession can go away because we
142         know the session has always already been created. The soupNetworkSession getter can now
143         return a reference rather than a pointer, because it will never be NULL except after it has
144         been cleared with clearSoupNetworkSession (renamed), and that should only happen immediately
145         before process termination after nothing else is using it. Cookie jar syncing can also go
146         away; the NetworkStorageSession can now rely on the SoupNetworkSession to exist and just
147         use its cookie jar.
148
149         * platform/network/NetworkStorageSession.h:
150         (WebCore::NetworkStorageSession::soupNetworkSession const): Deleted.
151         * platform/network/soup/DNSResolveQueueSoup.cpp:
152         (WebCore::DNSResolveQueueSoup::updateIsUsingProxy):
153         (WebCore::DNSResolveQueueSoup::platformResolve):
154         (WebCore::DNSResolveQueueSoup::resolve):
155         * platform/network/soup/NetworkStorageSessionSoup.cpp:
156         (WebCore::NetworkStorageSession::NetworkStorageSession):
157         (WebCore::NetworkStorageSession::~NetworkStorageSession):
158         (WebCore::NetworkStorageSession::soupNetworkSession const):
159         (WebCore::NetworkStorageSession::clearSoupNetworkSession):
160         (WebCore::NetworkStorageSession::cookieStorage const):
161         (WebCore::NetworkStorageSession::setCookieStorage):
162         (WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession const): Deleted.
163         (WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage): Deleted.
164         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
165         (WebCore::SocketStreamHandleImpl::create):
166
167 2019-01-23  Zalan Bujtas  <zalan@apple.com>
168
169         [LFC][BFC] computeStaticPosition should include estimated computation as well.
170         https://bugs.webkit.org/show_bug.cgi?id=193719
171
172         Reviewed by Antti Koivisto.
173
174         Consolidate all static position (non-estimated, estimated) computation in BlockFormattingContext::computeStaticPosition.
175         It requires to compute width/horizontal margin first, since vertical top estimation needs valid horizontal widths (margin-top: 5% is computed using
176         the containing block's width).
177         This is also in preparation for moving 'clear' positioning to computeStaticPosition.
178
179         * layout/blockformatting/BlockFormattingContext.cpp:
180         (WebCore::Layout::BlockFormattingContext::layout const):
181         (WebCore::Layout::BlockFormattingContext::layoutFormattingContextRoot const):
182         (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
183         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPosition const):
184         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForAncestors const):
185         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFormattingRoot const):
186         (WebCore::Layout::BlockFormattingContext::computeEstimatedVerticalPositionForFloatClear const):
187         (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
188         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
189         (WebCore::Layout::BlockFormattingContext::computeHeightAndMargin const):
190         (WebCore::Layout::BlockFormattingContext::adjustedVerticalPositionAfterMarginCollapsing const):
191         (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBefore const): Deleted.
192         (WebCore::Layout::BlockFormattingContext::computeEstimatedMarginBeforeForAncestors const): Deleted.
193         (WebCore::Layout::BlockFormattingContext::precomputeVerticalPositionForFormattingRootIfNeeded const): Deleted.
194         * layout/blockformatting/BlockFormattingContext.h:
195         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
196         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
197         * layout/blockformatting/BlockMarginCollapse.cpp:
198         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBeforeCollapsesWithFirstInFlowChildMarginBefore):
199
200 2019-01-22  Simon Fraser  <simon.fraser@apple.com>
201
202         Compositing updates need to reparent scrolling tree nodes with a changed ancestor
203         https://bugs.webkit.org/show_bug.cgi?id=193699
204
205         Reviewed by Frédéric Wang.
206
207         Now that compositing updates are incremental and may not do a full layer walk,
208         we need to ensure that when a scrolling tree node is removed, we traverse to all
209         descendant layers whose scrolling tree nodes refer to the removed node as their parent.
210
211         To achieve this, add a RenderLayer dirty bit for "NeedsScrollingTreeUpdate" which
212         ensures that the updateBackingAndHierarchy part of the compositing update traverses
213         layers with the bit set.
214
215         Adjust the compositing logging to make the legend easier to read.
216
217         Tests: scrollingcoordinator/reparent-across-compositing-layers.html
218                scrollingcoordinator/reparent-with-layer-removal.html
219
220         * page/scrolling/AsyncScrollingCoordinator.cpp:
221         (WebCore::AsyncScrollingCoordinator::childrenOfNode const):
222         * page/scrolling/AsyncScrollingCoordinator.h:
223         * page/scrolling/ScrollingCoordinator.h:
224         (WebCore::ScrollingCoordinator::childrenOfNode const):
225         * rendering/RenderLayer.cpp:
226         (WebCore::outputPaintOrderTreeLegend):
227         (WebCore::outputPaintOrderTreeRecursive):
228         * rendering/RenderLayer.h:
229         * rendering/RenderLayerCompositor.cpp:
230         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
231         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
232
233 2019-01-23  Oriol Brufau  <obrufau@igalia.com>
234
235         [css-logical] Implement flow-relative inset properties
236         https://bugs.webkit.org/show_bug.cgi?id=189441
237
238         Reviewed by Dean Jackson.
239
240         Implement 'inset', 'inset-block', 'inset-block-start', 'inset-block-end',
241         'inset-inline', 'inset-inline-start' and 'inset-inline-end' CSS properties
242         behind the CSSLogicalEnabled runtime flag.
243
244         Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-inset.html
245                webexposed/css-properties-behind-flags.html
246
247         * css/CSSComputedStyleDeclaration.cpp:
248         (WebCore::isLayoutDependent):
249         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
250         * css/CSSProperties.json:
251         * css/CSSProperty.cpp:
252         (WebCore::CSSProperty::resolveDirectionAwareProperty):
253         (WebCore::CSSProperty::isDirectionAwareProperty):
254         * css/StyleProperties.cpp:
255         (WebCore::StyleProperties::getPropertyValue const):
256         (WebCore::StyleProperties::asText const):
257         * css/parser/CSSParserFastPaths.cpp:
258         (WebCore::isSimpleLengthPropertyID):
259         * css/parser/CSSPropertyParser.cpp:
260         (WebCore::CSSPropertyParser::parseSingleValue):
261         (WebCore::CSSPropertyParser::parseShorthand):
262
263 2019-01-23  Oriol Brufau  <obrufau@igalia.com>
264
265         [css-grid] Properly handle static positions of abspos inside grid items
266         https://bugs.webkit.org/show_bug.cgi?id=193657
267
268         Reviewed by Javier Fernandez.
269
270         Rename findChildLogicalPosition to setLogicalPositionForChild and let it set the position.
271         Add setLogicalOffsetForChild like setLogicalPositionForChild but just for one offset,
272         and only if it's needed (not for abspos descentants in their static position).
273         Add logicalOffsetForChild that finds the value to be set by the functions above.
274         Rename existing logicalOffsetForChild to logicalOffsetForOutOfFlowChild.
275
276         Tests: imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-001.html
277                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-002.html
278                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-003.html
279                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-004.html
280                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-005.html
281                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-006.html
282                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-007.html
283                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-008.html
284                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-009.html
285                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-010.html
286                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-011.html
287                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-012.html
288                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-013.html
289                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-014.html
290                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-015.html
291                imported/w3c/web-platform-tests/css/css-grid/abspos/orthogonal-positioned-grid-descendants-016.html
292                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-001.html
293                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-002.html
294                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-003.html
295                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-004.html
296                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-005.html
297                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-006.html
298                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-007.html
299                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-008.html
300                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-009.html
301                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-010.html
302                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-011.html
303                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-012.html
304                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-013.html
305                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-014.html
306                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-015.html
307                imported/w3c/web-platform-tests/css/css-grid/abspos/positioned-grid-descendants-016.html
308
309         * rendering/RenderGrid.cpp:
310         (WebCore::RenderGrid::layoutGridItems):
311         (WebCore::RenderGrid::layoutPositionedObject):
312         (WebCore::RenderGrid::logicalOffsetForOutOfFlowChild const):
313         (WebCore::RenderGrid::gridAreaPositionForOutOfFlowChild const):
314         (WebCore::RenderGrid::setLogicalPositionForChild const):
315         (WebCore::RenderGrid::setLogicalOffsetForChild const):
316         (WebCore::RenderGrid::logicalOffsetForChild const):
317         * rendering/RenderGrid.h:
318
319 2019-01-23  Rob Buis  <rbuis@igalia.com>
320
321         Update MIME type parser
322         https://bugs.webkit.org/show_bug.cgi?id=180526
323
324         Reviewed by Frédéric Wang.
325
326         Add an enum to allow two modes of MIME type parsing, one mode
327         to keep supporting RFC2045 as before, and one mode to support
328         the updated MIME parser from mimesniff [1]. Mimesniff support
329         brings the following changes:
330         - allows parameter names without matching =value.
331         - skips whitespace after subtype, parameter value and before
332           parameter name.
333         - lower cases MIME type and parameter name.
334         - parameter names parsed before are discarded.
335
336         The old mode is still used by CDM.cpp and MIMEHeader.cpp.
337
338         [1] https://mimesniff.spec.whatwg.org/
339
340         * Modules/encryptedmedia/CDM.cpp:
341         (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
342         * platform/network/MIMEHeader.cpp:
343         (WebCore::MIMEHeader::parseHeader):
344         * platform/network/ParsedContentType.cpp:
345         (WebCore::DummyParsedContentType::setContentType const):
346         (WebCore::DummyParsedContentType::setContentTypeParameter const):
347         (WebCore::isQuotedStringTokenCharacter):
348         (WebCore::isTokenCharacter):
349         (WebCore::parseToken):
350         (WebCore::containsNonTokenCharacters):
351         (WebCore::parseQuotedString):
352         (WebCore::isNotForwardSlash):
353         (WebCore::isNotSemicolon):
354         (WebCore::isNotSemicolonOrEqualSign):
355         (WebCore::parseContentType):
356         (WebCore::isValidContentType):
357         (WebCore::ParsedContentType::ParsedContentType):
358         (WebCore::ParsedContentType::setContentType):
359         (WebCore::isNonTokenCharacter):
360         (WebCore::isNonQuotedStringTokenCharacter):
361         (WebCore::ParsedContentType::setContentTypeParameter):
362         * platform/network/ParsedContentType.h:
363
364         Test: web-platform-tests/xhr/overridemimetype-blob.html
365
366 2019-01-22  Wenson Hsieh  <wenson_hsieh@apple.com>
367
368         Introduce CustomUndoStep.h and CustomUndoStep.cpp
369         https://bugs.webkit.org/show_bug.cgi?id=193704
370         <rdar://problem/44807048>
371
372         Reviewed by Ryosuke Niwa.
373
374         This patch is more work in progress towards supporting `UndoManager.addItem()`. Here, we introduce a helper
375         class, CustomUndoStep, that holds a weak reference to a script-defined UndoItem. See below for more details.
376
377         No change in behavior.
378
379         * Sources.txt:
380         * WebCore.xcodeproj/project.pbxproj:
381         * editing/CustomUndoStep.cpp:
382         (WebCore::CustomUndoStep::CustomUndoStep):
383
384         Subclass UndoStep.
385
386         (WebCore::CustomUndoStep::unapply):
387         (WebCore::CustomUndoStep::reapply):
388
389         If possible, invoke the UndoItem's undo and redo handlers.
390
391         (WebCore::CustomUndoStep::isValid const):
392         * editing/CustomUndoStep.h:
393         * editing/EditingStyle.cpp:
394         * editing/InsertEditableImageCommand.cpp:
395         (WebCore::InsertEditableImageCommand::doApply):
396
397         Unified build fixes.
398
399         * page/UndoItem.h:
400
401 2019-01-22  Simon Fraser  <simon.fraser@apple.com>
402
403         Adding a child to a ScrollingStateNode needs to trigger a tree state commit
404         https://bugs.webkit.org/show_bug.cgi?id=193682
405
406         Reviewed by Zalan Bujtas.
407
408         Scrolling tree mutations that re-arrange nodes (e.g. node reordering when z-index changes)
409         need to trigger scrolling tree updates, and currently do not.
410
411         Fix by adding a "ChildNodes" dirty bit to ScrollingStateNode. There isn't any code that consults
412         this flag when committing the scrolling tree because we always eagerly traverse children, but
413         we could use it to optimize later. The important part is that we use it to trigger a tree update.
414         
415         Can't test via z-reordering until webkit.org/b/192529 is fixed.
416
417         Tests: scrollingcoordinator/gain-scrolling-node-parent.html
418                scrollingcoordinator/lose-scrolling-node-parent.html
419
420         * page/scrolling/ScrollingStateNode.cpp:
421         (WebCore::ScrollingStateNode::appendChild):
422         (WebCore::ScrollingStateNode::insertChild):
423         (WebCore::ScrollingStateNode::removeChildAtIndex):
424         * page/scrolling/ScrollingStateNode.h:
425         * page/scrolling/ScrollingStateTree.cpp:
426         (WebCore::ScrollingStateTree::attachNode):
427
428 2019-01-22  Devin Rousso  <drousso@apple.com>
429
430         Web Inspector: InspectorInstrumentation::willEvaluateScript should include column number
431         https://bugs.webkit.org/show_bug.cgi?id=116191
432         <rdar://problem/13905910>
433
434         Reviewed by Joseph Pecoraro.
435
436         Test inspector/timeline/line-column.html
437
438         * bindings/js/ScriptController.cpp:
439         (WebCore::ScriptController::evaluateInWorld):
440         (WebCore::ScriptController::evaluateModule):
441
442         * bindings/js/JSExecStateInstrumentation.h:
443         (WebCore::JSExecState::instrumentFunctionInternal):
444
445         * inspector/InspectorInstrumentation.h:
446         (WebCore::InspectorInstrumentation::willCallFunction):
447         (WebCore::InspectorInstrumentation::willEvaluateScript):
448         * inspector/InspectorInstrumentation.cpp:
449         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
450         (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
451
452         * inspector/agents/InspectorTimelineAgent.h:
453         * inspector/agents/InspectorTimelineAgent.cpp:
454         (WebCore::InspectorTimelineAgent::willCallFunction):
455         (WebCore::InspectorTimelineAgent::willEvaluateScript):
456
457         * inspector/TimelineRecordFactory.h:
458         * inspector/TimelineRecordFactory.cpp:
459         (WebCore::TimelineRecordFactory::createFunctionCallData):
460         (WebCore::TimelineRecordFactory::createEvaluateScriptData):
461
462         * bindings/js/ScriptSourceCode.h:
463         (WebCore::ScriptSourceCode::startColumn const): Added.
464
465 2019-01-22  Devin Rousso  <drousso@apple.com>
466
467         Web Inspector: expose Audit and Recording versions to the frontend
468         https://bugs.webkit.org/show_bug.cgi?id=193262
469         <rdar://problem/47130684>
470
471         Reviewed by Joseph Pecoraro.
472
473         Tests: inspector/audit/version.html
474                inspector/recording/version.html
475
476         * inspector/agents/InspectorCanvasAgent.cpp:
477         (WebCore::InspectorCanvasAgent::didFinishRecordingCanvasFrame):
478
479 2019-01-22  Wenson Hsieh  <wenson_hsieh@apple.com>
480
481         Add some bindings-related bookkeeping to UndoManager and UndoItem
482         https://bugs.webkit.org/show_bug.cgi?id=193111
483         <rdar://problem/44807048>
484
485         Reviewed by Ryosuke Niwa.
486
487         This patch is work in progress towards supporting `UndoManager.addItem()`. Here, we add helper methods to
488         UndoItem and UndoManager which later patches will exercise, as well as introduce some custom bindings to
489         properly handle the case where UndoItems are given anonymous JavaScript functions (see below for more details).
490
491         No new tests, because there is no script-observable change in behavior yet. When `addItems()` is hooked up, I
492         will write a test to verify that the undo and redo JavaScript functions survive garbage collection.
493
494         * Sources.txt:
495         * WebCore.xcodeproj/project.pbxproj:
496         * bindings/js/JSUndoItemCustom.cpp:
497         (WebCore::JSUndoItem::visitAdditionalChildren):
498
499         Have each JSUndoItem visit its undo and redo callback functions to ensure that the JavaScript wrapper objects
500         for these functions are not garbage collected underneath the item.
501
502         (WebCore::JSUndoItemOwner::isReachableFromOpaqueRoots):
503
504         Consider the undo item wrapper reachable from opaque roots if it is associated with its UndoManager's Document.
505         This ensures that if script isn't holding on to a reference to the wrapper (for instance, by calling
506         `UndoManager.addItem(new UndoItem({ ... }))`), we still protect the corresponding JSUndoItem as long as the
507         UndoManager's Document is alive. In the case where the undo item is not associated with a document, either (1)
508         script is keeping a reference to it, in which case it will be trivially reachable, or (2) script won't be able
509         to observe the destruction of the wrapper anyways (e.g. calling `new UndoItem({ ... })` by itself).
510
511         * dom/Document.cpp:
512         (WebCore::Document::prepareForDestruction):
513
514         Invalidate all undo items when the document is about to go away.
515
516         * page/UndoItem.cpp:
517         (WebCore::UndoItem::setUndoManager):
518         (WebCore::UndoItem::invalidate):
519         (WebCore::UndoItem::isValid const):
520
521         Add a few helpers, to be used in a future patch. We consider an UndoItem valid if it has been added to an
522         UndoManager, and is thus associated with a document.
523
524         (WebCore::UndoItem::document const):
525         * page/UndoItem.h:
526         * page/UndoItem.idl:
527         * page/UndoManager.cpp:
528         (WebCore::UndoManager::UndoManager):
529         (WebCore::UndoManager::addItem):
530
531         Have an UndoManager keep its UndoItems alive. These UndoItems remain in this set until either the document will
532         be destroyed, or the corresponding undo action is no longer needed because the platform undo stack has changed
533         (this latter behavior is yet to be implemented).
534
535         (WebCore::UndoManager::removeItem):
536         (WebCore::UndoManager::removeAllItems):
537         * page/UndoManager.h:
538         (WebCore::UndoManager::UndoManager): Deleted.
539         * page/scrolling/ScrollingTreeScrollingNode.cpp:
540
541         Unified build fix.
542
543 2019-01-22  Fujii Hironori  <Hironori.Fujii@sony.com>
544
545         [WinCairo][WebKitTestRunner] Null dereference of GraphicsContext::m_data in GraphicsContext::releaseWindowsContext
546         https://bugs.webkit.org/show_bug.cgi?id=193664
547
548         Reviewed by Brent Fulgham.
549
550         WinCairo WebKitTestRunner always crash on openning test cases of
551         HTMLMeterElement.
552
553         If GraphicsContext::getWindowsContext retruned null HDC,
554         LocalWindowsContext shouldn't release the null HDC.
555
556         Covered by existing tests.
557
558         * platform/graphics/win/LocalWindowsContext.h:
559         (WebCore::LocalWindowsContext::~LocalWindowsContext):
560         Release m_hdc only if it isn't null.
561
562 2019-01-22  Michael Catanzaro  <mcatanzaro@igalia.com>
563
564         Unreviewed, fix -Wsign-compare warning
565         https://bugs.webkit.org/show_bug.cgi?id=188697
566         <rdar://problem/46105624>
567
568         * css/StyleProperties.cpp:
569         (WebCore::StyleProperties::asText const):
570
571 2019-01-22  Devin Rousso  <drousso@apple.com>
572
573         Web Inspector: Audit: provide a way to get related Accessibility properties for a given node
574         https://bugs.webkit.org/show_bug.cgi?id=193227
575         <rdar://problem/46787862>
576
577         Reviewed by Joseph Pecoraro.
578
579         Test: inspector/audit/run-accessibility.html
580
581         * inspector/InspectorAuditAccessibilityObject.idl:
582         * inspector/InspectorAuditAccessibilityObject.h:
583         * inspector/InspectorAuditAccessibilityObject.cpp:
584         (WebCore::InspectorAuditAccessibilityObject::getComputedProperties): Added.
585
586 2019-01-22  Simon Fraser  <simon.fraser@apple.com>
587
588         Remove an iOS quirk where iframe renderers are identified as "RenderPartObject" in layout test results
589         https://bugs.webkit.org/show_bug.cgi?id=193692
590
591         Reviewed by Zalan Bujtas.
592
593         Remove the iOS-specific renderName() implementation.
594
595         * rendering/RenderIFrame.h:
596
597 2019-01-22  Said Abou-Hallawa  <sabouhallawa@apple.com>
598
599         Dynamic changes in the style attributes of an SVGElement do no affect the <use> instances
600         https://bugs.webkit.org/show_bug.cgi?id=193647
601
602         Reviewed by Simon Fraser.
603
604         Changing a style attribute of an SVGELement needs to call invalidateInstances().
605
606         Tests: svg/custom/svg-use-style-dynamic-change-invalidate.svg
607
608         * svg/SVGElement.cpp:
609         (WebCore::SVGElement::attributeChanged):
610
611 2019-01-22  Alex Christensen  <achristensen@webkit.org>
612
613         Fix more builds.
614
615         * platform/network/curl/CurlResourceHandleDelegate.cpp:
616         (WebCore::handleCookieHeaders):
617         (WebCore::CurlResourceHandleDelegate::curlDidReceiveResponse):
618
619 2019-01-22  Alex Christensen  <achristensen@webkit.org>
620
621         Fix some builds after r240292
622         https://bugs.webkit.org/show_bug.cgi?id=193580
623
624         * platform/network/curl/ResourceHandleCurl.cpp:
625         (WebCore::ResourceHandle::createCurlRequest):
626         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
627         (WebCore::ResourceHandle::receivedCredential):
628         (WebCore::ResourceHandle::getCredential):
629
630 2019-01-22  Alex Christensen  <achristensen@webkit.org>
631
632         Move NetworkStorageSession ownership to NetworkProcess
633         https://bugs.webkit.org/show_bug.cgi?id=193580
634
635         Reviewed by Geoff Garen.
636
637         NetworkStorageSessions used to be owned by a process-global map living in WebCore.
638         This patch moves the ownership to the WebKit/WebKitLegacy layer.
639         In WebKitLegacy they are still owned by a process-global map for compatibility.
640         In WebKit they are owned by a map owned by the NetworkProcess object.
641         There were three non-NetworkProcess uses of NetworkStorageSessions which have been dealt with thusly:
642         1. The WebProcess used to clear credentials from a NetworkStorageSession.  Since this was the only use
643         of a NetworkStorageSession in the WebProcess we can conclude there were no credentials to clear,
644         so this code was removed with no change in behavior.
645         2. The WebProcess used NetworkStorageSessions to get persistent credentials.  This was turned
646         into a static method that does the same thing.  We should audit these calls and decide if we really want them.
647         3. The UIProcess used NetworkStorageSessions in APIHTTPCookieStore to interact with the default cookie
648         storage on Cocoa platforms.  This has been replaced by functions that do the same thing directly.
649
650         * platform/network/CredentialStorage.h:
651         * platform/network/NetworkStorageSession.cpp:
652         (WebCore::NetworkStorageSession::processMayUseCookieAPI):
653         (WebCore::NetworkStorageSession::globalSessionMap): Deleted.
654         (WebCore::NetworkStorageSession::storageSession): Deleted.
655         (WebCore::NetworkStorageSession::destroySession): Deleted.
656         (WebCore::NetworkStorageSession::forEach): Deleted.
657         * platform/network/NetworkStorageSession.h:
658         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
659         (WebCore::NetworkStorageSession::createCFStorageSessionForIdentifier):
660         (WebCore::createCFStorageSessionForIdentifier): Deleted.
661         (WebCore::defaultNetworkStorageSession): Deleted.
662         (WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.
663         (WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
664         (WebCore::NetworkStorageSession::ensureSession): Deleted.
665         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
666         (WebCore::SocketStreamHandleImpl::getStoredCONNECTProxyCredentials):
667         * platform/network/cocoa/CookieStorageObserver.h:
668         * platform/network/curl/NetworkStorageSessionCurl.cpp:
669         (WebCore::defaultSession): Deleted.
670         (WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
671         (WebCore::NetworkStorageSession::ensureSession): Deleted.
672         (WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.
673         * platform/network/soup/NetworkStorageSessionSoup.cpp:
674         (WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage):
675         (WebCore::defaultSession): Deleted.
676         (WebCore::NetworkStorageSession::defaultStorageSession): Deleted.
677         (WebCore::NetworkStorageSession::ensureSession): Deleted.
678         (WebCore::NetworkStorageSession::switchToNewTestingSession): Deleted.
679
680 2019-01-22  Devin Rousso  <drousso@apple.com>
681
682         Web Inspector: Audit: provide a way to get related Accessibility nodes for a given node
683         https://bugs.webkit.org/show_bug.cgi?id=193225
684         <rdar://problem/46799956>
685
686         Reviewed by Joseph Pecoraro.
687
688         Test: inspector/audit/run-accessibility.html
689
690         * inspector/InspectorAuditAccessibilityObject.idl:
691         * inspector/InspectorAuditAccessibilityObject.h:
692         * inspector/InspectorAuditAccessibilityObject.cpp:
693         (WebCore::InspectorAuditAccessibilityObject::getActiveDescendant): Added.
694         (WebCore::addChildren): Added.
695         (WebCore::InspectorAuditAccessibilityObject::getChildNodes): Added.
696         (WebCore::InspectorAuditAccessibilityObject::getControlledNodes): Added.
697         (WebCore::InspectorAuditAccessibilityObject::getFlowedNodes): Added.
698         (WebCore::InspectorAuditAccessibilityObject::getMouseEventNode): Added.
699         (WebCore::InspectorAuditAccessibilityObject::getOwnedNodes): Added.
700         (WebCore::InspectorAuditAccessibilityObject::getParentNode): Added.
701         (WebCore::InspectorAuditAccessibilityObject::getSelectedChildNodes): Added.
702
703 2019-01-22  David Kilzer  <ddkilzer@apple.com>
704
705         Switch remaining QuickLook soft-linking in WebCore, WebKit over to QuickLookSoftLink.{cpp,h}
706         <https://webkit.org/b/193654>
707         <rdar://problem/47430290>
708
709         Reviewed by Alex Christensen.
710
711         - Moves QuickLookSoftLink.{h,mm} to PAL.
712         - Adds soft-link to 3 classes to consolidate QuickLook.framework
713           soft-linking.
714         - Updates existing source to work with above changes.
715
716         * SourcesCocoa.txt:
717         * UnifiedSources-input.xcfilelist:
718         * WebCore.xcodeproj/project.pbxproj:
719         - Remove QuickLookSoftLink.{h,mm} due to move to PAL.
720
721         * platform/ios/QuickLook.mm:
722         (WebCore::QLPreviewGetSupportedMIMETypesSet):
723         (WebCore::registerQLPreviewConverterIfNeeded):
724         - Update for QuickLookSoftLink.{h,mm} move to PAL.
725
726         * platform/network/ios/PreviewConverter.mm:
727         (WebCore::optionsWithPassword):
728         (WebCore::PreviewConverter::PreviewConverter):
729         - Switch to using QuickLookSoftLink.{h,mm} in PAL.
730
731         * platform/network/ios/WebCoreURLResponseIOS.mm:
732         (WebCore::adjustMIMETypeIfNecessary):
733         - Update for QuickLookSoftLink.{h,mm} move to PAL.
734
735 2019-01-22  Simon Fraser  <simon.fraser@apple.com>
736
737         Fix the position of layers nested inside of composited overflow-scroll
738         https://bugs.webkit.org/show_bug.cgi?id=193642
739
740         Reviewed by Antti Koivisto and Sam Weinig.
741
742         Remove an iOS #ifdef so that layers inside composited overflow gets the correct
743         positions on macOS too.
744
745         Test: compositing/geometry/fixed-inside-overflow-scroll.html
746
747         * rendering/RenderLayerBacking.cpp:
748         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
749
750 2019-01-22  Claudio Saavedra  <csaavedra@igalia.com>
751
752         [GTK] Build fix for Ubuntu LTS 16.04
753         https://bugs.webkit.org/show_bug.cgi?id=193672
754
755         Unreviewed build fix.
756
757         * html/canvas/CanvasStyle.h: Add default copy constructor for
758         CMYKAColor struct.
759
760 2019-01-22  David Kilzer  <ddkilzer@apple.com>
761
762         Leak of NSMutableArray (128 bytes) in com.apple.WebKit.WebContent running WebKit layout tests
763         <https://webkit.org/b/193673>
764         <rdar://problem/47448241>
765
766         Reviewed by Dean Jackson.
767
768         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
769         (WebCore::appendArgumentToArray): Use adoptNS() to fix the leak.
770
771 2019-01-22  Zalan Bujtas  <zalan@apple.com>
772
773         [LFC][Floats] Decouple clearance computation and margin collapsing reset.
774         https://bugs.webkit.org/show_bug.cgi?id=193670
775
776         Reviewed by Antti Koivisto.
777
778         Move margin collapsing reset logic from FloatingContext to BlockFormattingContext. It's the BlockFormattingContext's job to do.
779         This is also in preparation for adding clear to static position.
780
781         * layout/FormattingContext.cpp:
782         (WebCore::Layout::FormattingContext::mapTopToAncestor):
783         (WebCore::Layout::FormattingContext::mapTopLeftToAncestor): Deleted.
784         * layout/FormattingContext.h:
785         * layout/blockformatting/BlockFormattingContext.cpp:
786         (WebCore::Layout::BlockFormattingContext::computeVerticalPositionForFloatClear const):
787         * layout/floats/FloatingContext.cpp:
788         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
789         * layout/floats/FloatingContext.h:
790
791 2019-01-22  Frederic Wang  <fwang@igalia.com>
792
793         Minor refactoring of the scrolling code
794         https://bugs.webkit.org/show_bug.cgi?id=192398
795
796         Unreviewed build fix.
797
798         * page/scrolling/ScrollingTreeScrollingNode.cpp: Add missing header.
799
800 2019-01-22  Oriol Brufau  <obrufau@igalia.com>
801
802         [css-logical] Implement flow-relative margin, padding and border shorthands
803         https://bugs.webkit.org/show_bug.cgi?id=188697
804
805         Reviewed by Simon Fraser and Antti Koivisto.
806
807         Tests: imported/w3c/web-platform-tests/css/css-logical/logical-box-border-color.html
808                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-shorthands.html
809                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-style.html
810                imported/w3c/web-platform-tests/css/css-logical/logical-box-border-width.html
811                imported/w3c/web-platform-tests/css/css-logical/logical-box-margin.html
812                imported/w3c/web-platform-tests/css/css-logical/logical-box-padding.html
813                webexposed/css-properties-behind-flags.html
814
815         * css/CSSComputedStyleDeclaration.cpp:
816         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
817         Allow the new properties to serialize their computed value.
818
819         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor2SidesShorthand):
820         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesFor4SidesShorthand):
821         * css/CSSComputedStyleDeclaration.h:
822         Rename getCSSPropertyValuesForSidesShorthand to getCSSPropertyValuesFor4SidesShorthand,
823         and add analogous getCSSPropertyValuesFor2SidesShorthand for serializing 2-sided
824         shorthands.
825
826         * css/CSSProperties.json:
827         Add the new properties behind the CSSLogicalEnabled runtime flag.
828
829         * css/CSSStyleDeclaration.cpp:
830         (WebCore::CSSStyleDeclaration::supportedPropertyNames const):
831         Prevent CSS properties disabled behind a runtime flag from being exposed in
832         style declarations.
833
834         * css/StyleProperties.cpp:
835         (WebCore::StyleProperties::getPropertyValue const):
836         Allow the new properties to serialize their specified value.
837
838         (WebCore::StyleProperties::get2Values const):
839         Add get2Values, analogous to get4Values, for serializing 2-sided shorthands.
840
841         (WebCore::StyleProperties::borderPropertyValue const):
842         Allow borderPropertyValue to serialize arbitrary multi-sided border shorthands
843         corresponding to width, style and color.
844
845         (WebCore::MutableStyleProperties::setProperty):
846         Prevent CSS properties disabled behind a runtime flag from being set a value.
847
848         (WebCore::StyleProperties::asText const):
849         Allow the new properties to be serialized in cssText.
850         Prevent CSS shorthands disabled behind a runtime flag from appearing in cssText,
851         and serialize the longhands instead. Note that there could be another shorthand
852         available which is enabled, but a proper solution would require bug 190496.
853
854         * css/StyleProperties.h:
855         Update declarations of borderPropertyValue and get2Values.
856
857         * css/makeprop.pl:
858         (addProperty):
859         Add isEnabledCSSProperty function for checking that a CSS property is not
860         disabled behind a runtime flag.
861
862         * css/parser/CSSPropertyParser.cpp:
863         (WebCore::cssPropertyID):
864         Prevent CSS properties disabled behind a runtime flag from being exposed in
865         computed styles.
866
867         (WebCore::CSSPropertyParser::addProperty):
868         Prevent CSS properties disabled behind a runtime flag from being set a value.
869
870         (WebCore::CSSPropertyParser::consumeBorder):
871         Change consumeBorder to provide the caller with the parsed values instead of
872         setting properties. Then the caller can decide to which properties the values
873         should be set, and whether border-image should be reset or not.
874
875         (WebCore::CSSPropertyParser::consume2ValueShorthand):
876         (WebCore::CSSPropertyParser::consume4ValueShorthand):
877         Rename consume4Values to consume4ValueShorthand, and add analogous
878         consume2ValueShorthand for parsing shorthands with two longhands.
879
880         (WebCore::CSSPropertyParser::parseShorthand):
881         Allow the new properties to be parsed.
882
883         * css/parser/CSSPropertyParser.h:
884         Update declarations of consumeBorder, consume2ValueShorthand and
885         consume4ValueShorthand.
886
887         * inspector/agents/InspectorCSSAgent.cpp:
888         (WebCore::InspectorCSSAgent::getSupportedCSSProperties):
889         Prevent CSS properties disabled behind a runtime flag from being exposed in
890         the CSS inspector tool.
891
892         * page/RuntimeEnabledFeatures.h:
893         (WebCore::RuntimeEnabledFeatures::setCSSLogicalEnabled):
894         (WebCore::RuntimeEnabledFeatures::cssLogicalEnabled const):
895         Add the CSSLogicalEnabled runtime flag.
896
897 2019-01-21  Antti Koivisto  <antti@apple.com>
898
899         [iOS] Handle hit testing for subframes
900         https://bugs.webkit.org/show_bug.cgi?id=192303
901
902         Reviewed by Frédéric Wang.
903
904         Don't set delegatesScrolling bit for subframes on iOS. It is meant for top level application
905         controlled scrolling. This fixes coordinate conversions for subframes and makes events work.
906
907         Test by Frederic Wang.
908
909         Test: fast/scrolling/ios/hit-testing-iframe.html
910
911         * platform/ScrollView.cpp:
912         (WebCore::ScrollView::managesScrollbars const):
913
914         Add a function that tells if the scrollview should deal with scrollbars at all
915         This is always false on iOS and not connected to delegatesScrolling bit.
916
917         (WebCore::ScrollView::updateScrollbars):
918         * platform/ScrollView.h:
919         * rendering/RenderLayerCompositor.cpp:
920         (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls const):
921
922 2019-01-21  Brent Fulgham  <bfulgham@apple.com>
923
924         Implement message handlers for NetworkProcess-based ResourceLoadStatistics
925         https://bugs.webkit.org/show_bug.cgi?id=193556
926         <rdar://problem/47368501>
927
928         Reviewed by Alex Christensen.
929
930         This patch adds a new observer callback used to message the NetworkProcess when
931         user interaction events are received. This is needed when the ResourceLoadStatistics
932         data is not being managed by the UIProcess.
933
934         Tested by existing ResourceLoadStatistics and storageAccess tests.
935
936         * loader/ResourceLoadObserver.cpp:
937         (WebCore::ResourceLoadObserver::setLogUserInteractionNotificationCallback):
938         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
939         * loader/ResourceLoadObserver.h:
940         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
941         (WebCore::NetworkStorageSession::setCookiesFromDOM):
942
943 2019-01-21  Zalan Bujtas  <zalan@apple.com>
944
945         [LFC][Floats] Take float top position into account when computing containing block height.
946         https://bugs.webkit.org/show_bug.cgi?id=193655
947
948         Reviewed by Antti Koivisto.
949
950         When computing the containing block height, we take the first in-flow child's top position and use it as the base position.
951         However when the first in-flow child clears a previous sibling, its vertical position is not necessarily the correct base for
952         computing the containing block's height. Let's take the relevant floats into account as well.
953
954         Test: fast/block/float/float-first-child-and-clear-sibling.html
955
956         * layout/FormattingContextGeometry.cpp:
957         (WebCore::Layout::contentHeightForFormattingContextRoot):
958         * layout/floats/FloatingContext.cpp:
959         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
960         * layout/floats/FloatingState.cpp:
961         (WebCore::Layout::FloatingState::top const):
962         * layout/floats/FloatingState.h:
963
964 2019-01-21  David Kilzer  <ddkilzer@apple.com>
965
966         REGRESSION (r240237): Revert changes to WebCore Xcode project
967
968         * WebCore.xcodeproj/project.pbxproj: Revert changes that were
969         fixed in r240135.  Darin's patch must have been made prior to
970         r240135.
971
972 2019-01-21  David Kilzer  <ddkilzer@apple.com>
973
974         REGRESSION (r240201): Add a POINTER_EVENTS feature flag
975         https://bugs.webkit.org/show_bug.cgi?id=193577
976         <rdar://problem/47408511>
977
978         * dom/ios/PointerEventIOS.cpp: Add ENABLE(POINTER_EVENTS) macro
979         to fix tvOS & watchOS builds.
980
981 2019-01-15  Darin Adler  <darin@apple.com>
982
983         Use references rather than pointers for register/unregister functions, and more
984         https://bugs.webkit.org/show_bug.cgi?id=175028
985
986         Reviewed by Daniel Bates.
987
988         * Modules/applepay/ApplePaySession.cpp:
989         (WebCore::ApplePaySession::begin): Pass a reference.
990         (WebCore::ApplePaySession::completePayment): Ditto.
991         (WebCore::ApplePaySession::didReachFinalState): Ditto.
992         * Modules/cache/DOMCache.cpp:
993         (WebCore::DOMCache::retrieveRecords): Ditto.
994         (WebCore::DOMCache::batchDeleteOperation): Ditto.
995         (WebCore::DOMCache::batchPutOperation): Ditto.
996         * Modules/cache/DOMCacheStorage.cpp:
997         (WebCore::DOMCacheStorage::match): Ditto.
998         * Modules/fetch/FetchBodyOwner.cpp:
999         (WebCore::FetchBodyOwner::loadBlob): Ditto.
1000         (WebCore::FetchBodyOwner::finishBlobLoading): Ditto.
1001         * Modules/fetch/FetchBodySource.cpp:
1002         (WebCore::FetchBodySource::setActive): Ditto.
1003         (WebCore::FetchBodySource::setInactive): Ditto.
1004         * Modules/fetch/FetchResponse.cpp:
1005         (WebCore::FetchResponse::BodyLoader::BodyLoader): Ditto.
1006         (WebCore::FetchResponse::BodyLoader::~BodyLoader): Ditto.
1007         * Modules/mediasource/MediaSource.cpp:
1008         (WebCore::MediaSource::addedToRegistry): Ditto.
1009         (WebCore::MediaSource::removedFromRegistry): Ditto.
1010         * Modules/mediastream/MediaStream.cpp:
1011         (WebCore::MediaStream::~MediaStream): Ditto.
1012         (WebCore::MediaStream::startProducingData): Ditto.
1013         * Modules/mediastream/MediaStreamTrack.cpp:
1014         (WebCore::MediaStreamTrack::MediaStreamTrack): Ditto.
1015         (WebCore::MediaStreamTrack::~MediaStreamTrack): Ditto.
1016         * Modules/mediastream/RTCDataChannel.cpp:
1017         (WebCore::RTCDataChannel::create): Ditto.
1018         (WebCore::RTCDataChannel::close): Ditto.
1019         * Modules/mediastream/RTCPeerConnection.cpp:
1020         (WebCore::RTCPeerConnection::create): Use auto.
1021         * Modules/notifications/Notification.cpp:
1022         (WebCore::Notification::show): Pass a reference.
1023         (WebCore::Notification::finalize): Ditto.
1024         * Modules/webaudio/AudioBasicInspectorNode.cpp:
1025         (WebCore::AudioBasicInspectorNode::updatePullStatus): Ditto.
1026
1027         * Modules/webaudio/AudioContext.cpp:
1028         (WebCore::AudioContext::constructCommon): Ditto.
1029         (WebCore::AudioContext::lazyInitialize): Ditto.
1030         (WebCore::AudioContext::clear): Ditto.
1031         (WebCore::AudioContext::uninitialize): Ditto.
1032         (WebCore::AudioContext::markForDeletion): Take a reference.
1033         (WebCore::AudioContext::addAutomaticPullNode): Ditto.
1034         (WebCore::AudioContext::removeAutomaticPullNode): Ditto.
1035         (WebCore::AudioContext::willBeginPlayback): Pass a reference.
1036         (WebCore::AudioContext::willPausePlayback): Ditto.
1037         * Modules/webaudio/AudioContext.h: Update above functions to take
1038         references rather than pointers.
1039
1040         * Modules/webaudio/AudioNode.cpp:
1041         (WebCore::AudioNode::finishDeref): Pass a reference.
1042         * Modules/websockets/WebSocket.cpp:
1043         (WebCore::WebSocket::connect): Ditto.
1044         (WebCore::WebSocket::stop): Ditto.
1045         (WebCore::WebSocket::didClose): Ditto.
1046
1047         * WebCore.xcodeproj/project.pbxproj: Allowed Xcode to update this file.
1048
1049         * bindings/js/JSDOMWindowBase.cpp:
1050         (WebCore::JSDOMWindowBase::moduleLoaderResolve): Update since
1051         moduleLoader is now a reference.
1052         (WebCore::JSDOMWindowBase::moduleLoaderFetch): Ditto.
1053         (WebCore::JSDOMWindowBase::moduleLoaderEvaluate): Ditto.
1054         (WebCore::JSDOMWindowBase::moduleLoaderImportModule): Ditto.
1055         (WebCore::JSDOMWindowBase::moduleLoaderCreateImportMetaProperties): Ditto.
1056
1057         * dom/ActiveDOMObject.h:
1058         (WebCore::ActiveDOMObject::setPendingActivity): Take a reference.
1059         (WebCore::ActiveDOMObject::unsetPendingActivity): Ditto.
1060
1061         * dom/CharacterData.cpp:
1062         (WebCore::CharacterData::setData): Pass a reference.
1063         (WebCore::CharacterData::insertData): Ditto.
1064         (WebCore::CharacterData::deleteData): Ditto.
1065         (WebCore::CharacterData::replaceData): Ditto.
1066
1067         * dom/Document.cpp:
1068         (WebCore::Document::getElementByAccessKey): Pass a reference.
1069         (WebCore::Document::buildAccessKeyMap): Take a reference.
1070         (WebCore::Document::registerForVisibilityStateChangedCallbacks): Ditto.
1071         (WebCore::Document::unregisterForVisibilityStateChangedCallbacks): Ditto.
1072         (WebCore::Document::addAudioProducer): Ditto.
1073         (WebCore::Document::removeAudioProducer): Ditto.
1074         (WebCore::Document::hoveredElementDidDetach): Ditto.
1075         (WebCore::Document::elementInActiveChainDidDetach): Ditto.
1076         (WebCore::Document::attachNodeIterator): Ditto.
1077         (WebCore::Document::detachNodeIterator): Ditto.
1078         (WebCore::Document::moveNodeIteratorsToNewDocumentSlowCase): Pass
1079         a reference.
1080         (WebCore::Document::nodeChildrenWillBeRemoved): Ditto.
1081         (WebCore::Document::nodeWillBeRemoved): Ditto.
1082         (WebCore::Document::textInserted): Take a reference.
1083         (WebCore::Document::textRemoved): Ditto.
1084         (WebCore::Document::textNodesMerged): Ditto.
1085         (WebCore::Document::textNodeSplit): Ditto.
1086         (WebCore::Document::takeDOMWindowFrom): Ditto.
1087         (WebCore::Document::registerForDocumentSuspensionCallbacks): Ditto.
1088         (WebCore::Document::unregisterForDocumentSuspensionCallbacks): Ditto.
1089         (WebCore::Document::registerForMediaVolumeCallbacks): Ditto.
1090         (WebCore::Document::unregisterForMediaVolumeCallbacks): Ditto.
1091         (WebCore::Document::registerForPrivateBrowsingStateChangedCallbacks): Ditto.
1092         (WebCore::Document::unregisterForPrivateBrowsingStateChangedCallbacks): Ditto.
1093         (WebCore::Document::registerForCaptionPreferencesChangedCallbacks): Ditto.
1094         (WebCore::Document::unregisterForCaptionPreferencesChangedCallbacks): Ditto.
1095         (WebCore::Document::registerForPageScaleFactorChangedCallbacks): Ditto.
1096         (WebCore::Document::unregisterForPageScaleFactorChangedCallbacks): Ditto.
1097         (WebCore::Document::finishedParsing): Use a reference.
1098         (WebCore::Document::attachRange): Take a reference.
1099         (WebCore::Document::detachRange): Ditto.
1100         (WebCore::Document::suspendScheduledTasks): Use a reference.
1101         (WebCore::Document::resumeScheduledTasks): Ditto.
1102         (WebCore::Document::addMediaCanStartListener): Take a reference.
1103         (WebCore::Document::removeMediaCanStartListener): Ditto.
1104         (WebCore::Document::deviceMotionController const): Return a reference.
1105         (WebCore::Document::deviceOrientationController const): Ditto.
1106         (WebCore::Document::simulateDeviceOrientationChange): Use a reference.
1107         (WebCore::Document::fullScreenIsAllowedForElement const): Take a reference.
1108         (WebCore::Document::requestFullScreenForElement): Pass a reference.
1109         (WebCore::Document::webkitExitFullscreen): Ditto.
1110         (WebCore::Document::webkitWillEnterFullScreen): Renamed to remove the
1111         "ForElement" from the function name. Take a reference rather than a pointer.
1112         (WebCore::Document::webkitDidEnterFullScreen): Renamed to remove the
1113         "ForElement" from the function name and removed the unused element argument.
1114         (WebCore::Document::webkitWillExitFullScreen): Ditto.
1115         (WebCore::Document::webkitDidExitFullScreen): Ditto.
1116         (WebCore::Document::pushFullscreenElementStack): Take a reference.
1117         (WebCore::Document::addDocumentToFullScreenChangeEventQueue): Ditto.
1118         (WebCore::DocumentParserYieldToken::DocumentParserYieldToken): Use a reference.
1119         (WebCore::DocumentParserYieldToken::~DocumentParserYieldToken): Ditto.
1120         (WebCore::Document::updateHoverActiveState): Updated name of isInActiveChain.
1121
1122         * dom/Document.h: Updated argument types as described above. Changed a couple
1123         of inline functions to return references.
1124
1125         * dom/DocumentMarkerController.cpp:
1126         (WebCore::DocumentMarkerController::addMarker): Take a reference.
1127         (WebCore::DocumentMarkerController::addMarkerToNode): Ditto.
1128         (WebCore::DocumentMarkerController::addTextMatchMarker): Ditto.
1129         (WebCore::DocumentMarkerController::addDictationPhraseWithAlternativesMarker): Ditto.
1130         (WebCore::DocumentMarkerController::addDictationResultMarker): Ditto.
1131         (WebCore::DocumentMarkerController::addDraggedContentMarker): Ditto.
1132         (WebCore::DocumentMarkerController::removeMarkers): Ditto.
1133         (WebCore::DocumentMarkerController::copyMarkers): Ditto.
1134         (WebCore::DocumentMarkerController::shiftMarkers): Ditto.
1135         (WebCore::DocumentMarkerController::setMarkersActive): DItto.
1136         * dom/DocumentMarkerController.h: Updated argument types as described above.
1137
1138         * dom/Element.cpp:
1139         (WebCore::Element::~Element): Pass a reference.
1140         (WebCore::Element::isUserActionElementInActiveChain const): Updated name of
1141         isInActiveChain.
1142         (WebCore::Element::hasEquivalentAttributes const): Take a reference.
1143         (WebCore::Element::removedFromAncestor): Pass a reference.
1144         (WebCore::Element::clearHoverAndActiveStatusBeforeDetachingRenderer):
1145         Pass a reference and updated name of isInActiveChain.
1146
1147         * dom/Element.h: Renamed inActiveChain to isInActiveChain, updated argument
1148         types to be references, and removed unneeded friend declaration and made
1149         SynchronizationOfLazyAttribute private.
1150
1151         * dom/Node.cpp:
1152         (WebCore::Node::normalize): Pass a reference.
1153         (WebCore::Node::isEqualNode const): Ditto.
1154         * dom/NodeIterator.cpp:
1155         (WebCore::NodeIterator::NodeIterator): Ditto.
1156         (WebCore::NodeIterator::~NodeIterator): Ditto.
1157
1158         * dom/RadioButtonGroups.cpp:
1159         (WebCore::RadioButtonGroup::add): Take a reference.
1160         (WebCore::RadioButtonGroup::updateCheckedState): Ditto.
1161         (WebCore::RadioButtonGroup::remove): Ditto.
1162         (WebCore::RadioButtonGroup::contains const): Ditto.
1163         (WebCore::RadioButtonGroups::addButton): Ditto.
1164         (WebCore::RadioButtonGroups::updateCheckedState): Ditto.
1165         (WebCore::RadioButtonGroups::hasCheckedButton const): Ditto.
1166         (WebCore::RadioButtonGroups::isInRequiredGroup const): Ditto.
1167         (WebCore::RadioButtonGroups::removeButton): Ditto.
1168         * dom/RadioButtonGroups.h: Updated argument types.
1169
1170         * dom/Range.cpp:
1171         (WebCore::Range::Range): Pass a reference.
1172         (WebCore::Range::~Range): Ditto.
1173         (WebCore::Range::setDocument): Ditto.
1174         (WebCore::Range::createContextualFragment): Ditto.
1175         (WebCore::boundaryTextInserted): Ditto.
1176         (WebCore::Range::textInserted): Ditto.
1177         (WebCore::boundaryTextRemoved): Ditto.
1178         (WebCore::Range::textRemoved): Ditto.
1179         (WebCore::boundaryTextNodesSplit): Ditto.
1180         (WebCore::Range::textNodeSplit): Ditto.
1181         * dom/Range.h: Take references instead of pointers.
1182
1183         * dom/ScriptElement.cpp:
1184         (WebCore::ScriptElement::prepareScript): Use reference.
1185
1186         * dom/Text.cpp:
1187         (WebCore::Text::splitText): Pass reference.
1188
1189         * dom/UserActionElementSet.h: Renamed inActiveChain to isInActiveChain to
1190         match the naming scheme of the other similar functions, like isActive.
1191
1192         * editing/AlternativeTextController.cpp:
1193         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1194         Pass a reference.
1195         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): Ditto.
1196         (WebCore::AlternativeTextController::handleAlternativeTextUIResult): Ditto.
1197         (WebCore::AlternativeTextController::respondToUnappliedEditing): Ditto.
1198         (WebCore::AlternativeTextController::markReversed): Ditto.
1199         (WebCore::AlternativeTextController::markCorrection): Ditto.
1200         (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection): Ditto.
1201         (WebCore::AlternativeTextController::markPrecedingWhitespaceForDeletedAutocorrectionAfterCommand): Ditto.
1202         * editing/CompositeEditCommand.cpp:
1203         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers): Ditto.
1204         * editing/DictationCommand.cpp: Ditto.
1205         * editing/Editing.cpp:
1206         (WebCore::areIdenticalElements): Ditto.
1207         * editing/Editor.cpp:
1208         (WebCore::Editor::ignoreSpelling): Ditto.
1209         (WebCore::Editor::learnSpelling): Ditto.
1210         (WebCore::Editor::advanceToNextMisspelling): Ditto.
1211         (WebCore::Editor::clearMisspellingsAndBadGrammar): Ditto.
1212         (WebCore::Editor::markMisspellingsAfterTypingToWord): Ditto.
1213         (WebCore::Editor::markAndReplaceFor): Ditto.
1214         (WebCore::Editor::changeBackToReplacedString): Ditto.
1215         (WebCore::Editor::updateMarkersForWordsAffectedByEditing): Ditto.
1216         (WebCore::Editor::countMatchesForText): Ditto.
1217         (WebCore::Editor::scanRangeForTelephoneNumbers): Ditto.
1218         (WebCore::Editor::editorUIUpdateTimerFired): Ditto.
1219         (WebCore::Editor::handleAcceptedCandidate): Ditto.
1220
1221         * editing/InsertTextCommand.cpp:
1222         (WebCore::InsertTextCommand::doApply): Pass a reference.
1223         * editing/InsertTextCommand.h: Take a reference.
1224
1225         * editing/SpellChecker.cpp:
1226         (WebCore::SpellChecker::didCheckSucceed): Pass a reference.
1227         * editing/SplitTextNodeCommand.cpp:
1228         (WebCore::SplitTextNodeCommand::doApply): Ditto.
1229         (WebCore::SplitTextNodeCommand::doUnapply): Ditto.
1230         * editing/TextCheckingHelper.cpp:
1231         (WebCore::TextCheckingHelper::findFirstMisspelling): Pass a reference.
1232         (WebCore::TextCheckingHelper::findFirstGrammarDetail const): Ditto.
1233         * editing/ios/DictationCommandIOS.cpp:
1234         (WebCore::DictationCommandIOS::doApply): Ditto.
1235         Also added a comment about a possible missing null check; behavior should
1236         be no different than before, but using a reference helps make clear there
1237         was never any null check.
1238         * editing/ios/EditorIOS.mm:
1239         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto.
1240         * fileapi/FileReader.cpp:
1241         (WebCore::FileReader::readInternal): Ditto.
1242         (WebCore::FileReader::abort): Ditto.
1243         (WebCore::FileReader::didFinishLoading): Ditto.
1244         (WebCore::FileReader::didFail): Ditto.
1245
1246         * html/HTMLAppletElement.cpp: Removed unneeded include of HTMLDocument.h.
1247         There's very little left that is truly specific to HTMLDocument vs. Document.
1248
1249         * html/HTMLDocument.h:
1250         (WebCore::HTMLDocument::create): Take a reference.
1251         (WebCore::HTMLDocument::createSynthesizedDocument): Ditto.
1252
1253         * html/HTMLFormElement.cpp:
1254         (WebCore::HTMLFormElement::~HTMLFormElement): Pass a reference.
1255         (WebCore::HTMLFormElement::parseAttribute): Ditto.
1256         (WebCore::HTMLFormElement::didMoveToNewDocument): Ditto.
1257
1258         * html/HTMLIFrameElement.cpp: Removed unneeded include of HTMLDocument.h.
1259
1260         * html/HTMLInputElement.cpp:
1261         (WebCore::HTMLInputElement::~HTMLInputElement): Pass a reference.
1262         (WebCore::HTMLInputElement::setChecked): Ditto.
1263         (WebCore::HTMLInputElement::registerForSuspensionCallbackIfNeeded): Ditto.
1264         (WebCore::HTMLInputElement::unregisterForSuspensionCallbackIfNeeded): Ditto.
1265         (WebCore::HTMLInputElement::didMoveToNewDocument): Ditto.
1266         (WebCore::HTMLInputElement::isInRequiredRadioButtonGroup): Ditto.
1267         (WebCore::HTMLInputElement::addToRadioButtonGroup): Ditto.
1268         (WebCore::HTMLInputElement::removeFromRadioButtonGroup): Ditto.
1269         * html/HTMLMediaElement.cpp:
1270         (WebCore::HTMLMediaElement::registerWithDocument): Ditto.
1271         (WebCore::HTMLMediaElement::unregisterWithDocument): Ditto.
1272         (WebCore::HTMLMediaElement::selectMediaResource): Ditto.
1273         (WebCore::HTMLMediaElement::addTextTrack): Ditto.
1274         (WebCore::HTMLMediaElement::clearMediaPlayer): Ditto.
1275         (WebCore::HTMLMediaElement::resume): Ditto.
1276         (WebCore::HTMLMediaElement::setMediaControlsDependOnPageScaleFactor): Ditto.
1277
1278         * html/HTMLNameCollection.cpp: Removed unneeded include of HTMLDocument.h.
1279
1280         * html/HTMLPlugInImageElement.cpp:
1281         (WebCore::HTMLPlugInImageElement::~HTMLPlugInImageElement): Pass a reference.
1282         (WebCore::HTMLPlugInImageElement::createElementRenderer): Ditto.
1283         (WebCore::HTMLPlugInImageElement::didMoveToNewDocument): Ditto.
1284
1285         * html/HTMLSourceElement.cpp: Removed unneeded include of HTMLDocument.h.
1286         * html/HTMLTemplateElement.cpp: Ditto.
1287
1288         * html/RadioInputType.cpp:
1289         (WebCore::RadioInputType::matchesIndeterminatePseudoClass const):
1290         Pass a reference.
1291         * loader/DocumentWriter.cpp:
1292         (WebCore::DocumentWriter::begin): Ditto.
1293         * page/DOMWindow.cpp:
1294         (WebCore::DOMWindow::addEventListener): Ditto.
1295         (WebCore::DOMWindow::removeEventListener): Ditto.
1296         (WebCore::DOMWindow::removeAllEventListeners): Ditto.
1297
1298         * page/EventHandler.cpp:
1299         (WebCore::EventHandler::didStartDrag): Use a reference.
1300
1301         * page/EventSource.cpp:
1302         (WebCore::EventSource::create): Pass reference.
1303         (WebCore::EventSource::networkRequestEnded): Ditto.
1304         (WebCore::EventSource::close): Ditto.
1305         (WebCore::EventSource::abortConnectionAttempt): Ditto.
1306
1307         * page/Frame.cpp: Removed unneeded include of HTMLDocument.h.
1308         * page/FrameView.cpp: Ditto.
1309         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty const): Use reference.
1310
1311         * page/animation/AnimationBase.cpp:
1312         (WebCore::AnimationBase::updateStateMachine): Pass reference.
1313
1314         * page/animation/CSSAnimationController.cpp:
1315         (WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStyle): Take reference.
1316         (WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStyle): Ditto.
1317         (WebCore::CSSAnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse): Ditto.
1318         (WebCore::CSSAnimationControllerPrivate::removeFromAnimationsWaitingForStartTimeResponse): Ditto.
1319         (WebCore::CSSAnimationControllerPrivate::animationWillBeRemoved): Ditto.
1320         * page/animation/CSSAnimationControllerPrivate.h: Ditto.
1321
1322         * page/animation/CompositeAnimation.cpp:
1323         (WebCore::CompositeAnimation::clearElement): Pass reference.
1324         (WebCore::CompositeAnimation::updateTransitions): Ditto.
1325         (WebCore::CompositeAnimation::updateKeyframeAnimations): Ditto.
1326         * page/ios/FrameIOS.mm:
1327         (WebCore::Frame::initWithSimpleHTMLDocument): Ditto.
1328
1329         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1330         (WebCore::layerContentsFormat): Add ALLOW_DEPRECATED_DECLARATIONS_BEGIN/END so
1331         I can continue to compile with latest headers.
1332
1333         * rendering/CSSFilter.cpp:
1334         (WebCore::CSSFilter::buildReferenceFilter): Pass reference, small coding style
1335         tweaks as well.
1336
1337         * rendering/svg/RenderSVGResource.cpp:
1338         (WebCore::removeFromCacheAndInvalidateDependencies): Pass reference.
1339         * rendering/svg/RenderSVGResourceContainer.cpp:
1340         (WebCore::RenderSVGResourceContainer::registerResource): Ditto.
1341         * rendering/svg/SVGResources.cpp:
1342         (WebCore::registerPendingResource): Ditto.
1343         * rendering/svg/SVGResourcesCache.cpp:
1344         (WebCore::SVGResourcesCache::resourceDestroyed): Ditto.
1345
1346         * svg/SVGDocumentExtensions.cpp:
1347         (WebCore::SVGDocumentExtensions::addTimeContainer): Take reference.
1348         (WebCore::SVGDocumentExtensions::removeTimeContainer): Ditto.
1349         (WebCore::SVGDocumentExtensions::addResource): Ditto.
1350         (WebCore::SVGDocumentExtensions::addPendingResource): Ditto.
1351         (WebCore::SVGDocumentExtensions::isElementWithPendingResources const): Ditto.
1352         (WebCore::SVGDocumentExtensions::isPendingResource const): Ditto.
1353         (WebCore::SVGDocumentExtensions::clearHasPendingResourcesIfPossible): Ditto.
1354         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources): Ditto.
1355         (WebCore::SVGDocumentExtensions::setOfElementsReferencingTarget): Ditto.
1356         (WebCore::SVGDocumentExtensions::addElementReferencingTarget): Ditto.
1357         (WebCore::SVGDocumentExtensions::removeAllTargetReferencesForElement): Ditto.
1358         (WebCore::SVGDocumentExtensions::clearTargetDependencies): Ditto.
1359         (WebCore::SVGDocumentExtensions::removeAllElementReferencesForTarget): Ditto.
1360         (WebCore::SVGDocumentExtensions::registerSVGFontFaceElement): Ditto.
1361         (WebCore::SVGDocumentExtensions::unregisterSVGFontFaceElement): Ditto.
1362         * svg/SVGDocumentExtensions.h: Ditto.
1363
1364         * svg/SVGElement.cpp:
1365         (WebCore::SVGElement::~SVGElement): Pass reference.
1366         (WebCore::SVGElement::removedFromAncestor): Ditto.
1367         (WebCore::SVGElement::buildPendingResourcesIfNeeded): Ditto.
1368         * svg/SVGFEImageElement.cpp:
1369         (WebCore::SVGFEImageElement::clearResourceReferences): Ditto.
1370         (WebCore::SVGFEImageElement::buildPendingResource): Ditto.
1371         * svg/SVGFontFaceElement.cpp:
1372         (WebCore::SVGFontFaceElement::insertedIntoAncestor): Ditto.
1373         (WebCore::SVGFontFaceElement::removedFromAncestor): Ditto.
1374         * svg/SVGMPathElement.cpp:
1375         (WebCore::SVGMPathElement::buildPendingResource): Ditto.
1376         (WebCore::SVGMPathElement::clearResourceReferences): Ditto.
1377         * svg/SVGPathElement.cpp:
1378         (WebCore::SVGPathElement::invalidateMPathDependencies): Ditto.
1379         * svg/SVGSVGElement.cpp:
1380         (WebCore::SVGSVGElement::SVGSVGElement): Ditto.
1381         (WebCore::SVGSVGElement::~SVGSVGElement): Ditto.
1382         (WebCore::SVGSVGElement::didMoveToNewDocument): Ditto.
1383         (WebCore::SVGSVGElement::insertedIntoAncestor): Ditto.
1384         (WebCore::SVGSVGElement::removedFromAncestor): Ditto.
1385         * svg/SVGTRefElement.cpp:
1386         (WebCore::SVGTRefElement::detachTarget): Ditto.
1387         (WebCore::SVGTRefElement::buildPendingResource): Ditto.
1388         * svg/SVGTextPathElement.cpp:
1389         (WebCore::SVGTextPathElement::clearResourceReferences): Ditto.
1390         (WebCore::SVGTextPathElement::buildPendingResource): Ditto.
1391         * svg/SVGUseElement.cpp:
1392         (WebCore::SVGUseElement::updateShadowTree): Ditto.
1393         * svg/animation/SVGSMILElement.cpp:
1394         (WebCore::SVGSMILElement::clearResourceReferences): Ditto.
1395         (WebCore::SVGSMILElement::buildPendingResource): Ditto.
1396         * testing/Internals.cpp:
1397         (WebCore::Internals::addTextMatchMarker): Ditto.
1398         (WebCore::Internals::webkitWillEnterFullScreenForElement): Ditto.
1399         (WebCore::Internals::webkitDidEnterFullScreenForElement): Ditto.
1400         (WebCore::Internals::webkitWillExitFullScreenForElement): Ditto.
1401         (WebCore::Internals::webkitDidExitFullScreenForElement): Ditto.
1402         * workers/Worker.cpp:
1403         (WebCore::Worker::create): Ditto.
1404         (WebCore::Worker::notifyFinished): Ditto.
1405         * workers/service/ServiceWorkerContainer.cpp:
1406         (WebCore::ServiceWorkerContainer::scheduleJob): Ditto.
1407         (WebCore::ServiceWorkerContainer::jobDidFinish): Ditto.
1408         * xml/XMLHttpRequest.cpp:
1409         (WebCore::XMLHttpRequest::prepareToSend): Ditto.
1410         (WebCore::XMLHttpRequest::createRequest): Ditto.
1411         (WebCore::XMLHttpRequest::internalAbort): Ditto.
1412         (WebCore::XMLHttpRequest::networkErrorTimerFired): Ditto.
1413         (WebCore::XMLHttpRequest::didFail): Ditto.
1414         (WebCore::XMLHttpRequest::didFinishLoading): Ditto.
1415
1416         * xml/XPathStep.cpp: Removed unneeded include of HTMLDocument.h.
1417         (WebCore::XPath::nodeMatchesBasicTest): Changed code to call isHTMLDocument
1418         rather than is<HTMLDocument> since this is not a type check for a downcast,
1419         but rather a behavioral difference that does not depend on any of the data
1420         stored in an HTMLDocument or the use of a distinct C++ class for it.
1421
1422         * xml/XSLTProcessor.cpp:
1423         (WebCore::XSLTProcessor::createDocumentFromSource): Pass a reference.
1424
1425 2019-01-21  David Kilzer  <ddkilzer@apple.com>
1426
1427         Switch remaining VideoToolbox soft-linking in WebCore over to VideoToolboxSoftLink.{cpp,h}
1428         <https://webkit.org/b/193645>
1429         <rdar://problem/47421574>
1430
1431         Reviewed by Alex Christensen.
1432
1433         * platform/cocoa/VideoToolboxSoftLink.cpp:
1434         * platform/cocoa/VideoToolboxSoftLink.h:
1435         - Move soft-linking of VTPixelBufferConformer* functions from
1436           PixelBufferConformerCV.cpp to here.
1437         * platform/graphics/cv/PixelBufferConformerCV.cpp:
1438         - Remove local soft-linking of VideoToolbox.framework and switch
1439           to VideoToolboxSoftLink.h.
1440
1441 2019-01-21  Antti Koivisto  <antti@apple.com>
1442
1443         Move delegatesScrolling() tests to lower level conversion function in ScrollView
1444         https://bugs.webkit.org/show_bug.cgi?id=193649
1445
1446         Reviewed by Frédéric Wang.
1447
1448         This reduces places where these tests are needed and helps avoid mistakes.
1449
1450         * dom/Document.cpp:
1451         (WebCore::computeIntersectionState):
1452         * page/FrameView.cpp:
1453         (WebCore::FrameView::convertFromRendererToContainingView const):
1454         (WebCore::FrameView::convertFromContainingViewToRenderer const):
1455         * platform/ScrollView.cpp:
1456         (WebCore::ScrollView::viewToContents const):
1457         (WebCore::ScrollView::contentsToView const):
1458         (WebCore::ScrollView::contentsToContainingViewContents const):
1459         (WebCore::ScrollView::rootViewToContents const):
1460         (WebCore::ScrollView::contentsToRootView const):
1461         (WebCore::ScrollView::windowToContents const):
1462         (WebCore::ScrollView::contentsToWindow const):
1463
1464 2019-01-21  Carlos Garcia Campos  <cgarcia@igalia.com>
1465
1466         REGRESSION(r239915): about 130 test failures on WPE
1467         https://bugs.webkit.org/show_bug.cgi?id=193395
1468
1469         Reviewed by Žan Doberšek.
1470
1471         Since r239915 we are only overriding the characters with Default_Ignorable unicode property when the font
1472         doesn't support the code point. If the font happens to provide a glyph for the character, it's later ignored by
1473         harfbuzz when shaping, but the simple text code path doesn't ignore them unless there isn't a glyph.
1474
1475         * platform/graphics/WidthIterator.cpp:
1476         (WebCore::WidthIterator::advanceInternal): Always ignore characters with Default_Ignorable unicode property.
1477         (WebCore::characterMustDrawSomething): Moved to CharacterProperties.h and renamed as isDefaultIgnorableCodePoint().
1478         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
1479         (WebCore::GlyphPage::fill): Use isDefaultIgnorableCodePoint().
1480         * platform/text/CharacterProperties.h:
1481         (WebCore::isDefaultIgnorableCodePoint): Return whether the character has Default_Ignorable unicode property.
1482
1483 2019-01-20  Myles C. Maxfield  <mmaxfield@apple.com>
1484
1485         [WHLSL] Implement Metal code generation
1486         https://bugs.webkit.org/show_bug.cgi?id=193531
1487
1488         Reviewed by Dean Jackson.
1489
1490         This implements the majority of the metal code generation piece. There are still a few pieces missing,
1491         that I'll add in follow up patches. There's still enough complexity here that this is worth reviewing
1492         on its own, though.
1493
1494         This patch includes a few pieces:
1495         - Metal typedefs for every WHLSL type. This analysis is actually pretty interesting, because complex
1496               types depend on their inner types, and the inner types need to be emitted first. Therefore,
1497               this patch implements a topological sort when emitting types. Also, WHLSL types need to be de-
1498               duped because array references are implemented in MSL as structs, and if you have two structs
1499               in MSL with the same contents, those two structs are not equal and cannot be assigned to each
1500               other. So, this patch creates a trie to de-dup all the UnnamedTypes, and implements a
1501               dependency graph which includes both nodes in the trie as well as NamedTypes which don't appear
1502               in the trie.
1503         - WHLSL enumeration code generation
1504         - A name mangler, which ensures that no text from the source program is contained within the result
1505               program
1506         - Full support for expressions. An expression like "y = *x + 7;" would be converted to something like
1507               Type1 variable1 = *x;
1508               Type2 variable2 = 7;
1509               Type3 variable3 = variable1 + variable2;
1510               y = variable3;
1511         - Mostly complete support for control flow. This is tricky because of how we transform WHLSL
1512               expressions into C++ statements. Therefore, things like "for ( ; *x + 7; )" is difficult to
1513               compile, because we can't put the "*x + 7" generated statements into the for loop itself.
1514               Instead, we have to emit this code inside the loop, in all the places that would implicitly run
1515               it. This patch doesn't fully handle this, see below. (If MSL supported lambdas, we could put
1516               the statements into a lambda and do something like "for ( ; theLambda(); )" but MSL doesn't
1517               support lambdas.)
1518
1519         Missing pieces:
1520         - Entry point pack / unpack code
1521         - Support for "continue" (See above regarding control flow)
1522         - Knowing whether or not a switch case should end with break or fallthrough
1523         - Trapping
1524         - Zero filling variables
1525         - Code generation for compiler-generated native functions (this patch supports native functions in the
1526               standard library), texture functions, and HLSL's half <-> int functions.
1527
1528         No new tests because it isn't hooked up yet. As soon as we can do entry point packing and unpacking,
1529         I'll start porting the test suite.
1530
1531         * Modules/webgpu/WHLSL/AST/WHLSLBuiltInSemantic.h:
1532         (WebCore::WHLSL::AST::BuiltInSemantic::targetIndex):
1533         * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
1534         (WebCore::WHLSL::AST::Expression::resolvedType):
1535         (WebCore::WHLSL::AST::Expression::type): Deleted.
1536         * Modules/webgpu/WHLSL/AST/WHLSLFunctionDeclaration.h:
1537         (WebCore::WHLSL::AST::FunctionDeclaration::name):
1538         * Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h:
1539         (WebCore::WHLSL::AST::StructureDefinition::find):
1540         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Added.
1541         (WebCore::WHLSL::Metal::EntryPointScaffolding::EntryPointScaffolding):
1542         (WebCore::WHLSL::Metal::EntryPointScaffolding::helperTypes):
1543         (WebCore::WHLSL::Metal::EntryPointScaffolding::signature):
1544         (WebCore::WHLSL::Metal::EntryPointScaffolding::unpack):
1545         (WebCore::WHLSL::Metal::EntryPointScaffolding::pack):
1546         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
1547         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Added.
1548         (WebCore::WHLSL::Metal::FunctionDeclarationWriter::FunctionDeclarationWriter):
1549         (WebCore::WHLSL::Metal::FunctionDeclarationWriter::toString):
1550         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::FunctionDefinitionWriter):
1551         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::toString):
1552         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::constantExpressionString):
1553         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::generateNextVariableName):
1554         (WebCore::WHLSL::Metal::metalFunctions):
1555         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
1556         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLStructureDefinition.h.
1557         (WebCore::WHLSL::Metal::generateMetalCode):
1558         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
1559         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Added.
1560         (WebCore::WHLSL::Metal::getNativeName):
1561         (WebCore::WHLSL::Metal::mapFunctionName):
1562         (WebCore::WHLSL::Metal::convertAddressSpace):
1563         (WebCore::WHLSL::Metal::writeNativeFunction):
1564         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
1565         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp: Added.
1566         (WebCore::WHLSL::Metal::BaseTypeNameNode::BaseTypeNameNode):
1567         (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayTypeNameNode const):
1568         (WebCore::WHLSL::Metal::BaseTypeNameNode::isArrayReferenceTypeNameNode const):
1569         (WebCore::WHLSL::Metal::BaseTypeNameNode::isPointerTypeNameNode const):
1570         (WebCore::WHLSL::Metal::BaseTypeNameNode::isReferenceTypeNameNode const):
1571         (WebCore::WHLSL::Metal::BaseTypeNameNode::children):
1572         (WebCore::WHLSL::Metal::BaseTypeNameNode::append):
1573         (WebCore::WHLSL::Metal::BaseTypeNameNode::parent):
1574         (WebCore::WHLSL::Metal::BaseTypeNameNode::mangledName const):
1575         (WebCore::WHLSL::Metal::ArrayTypeNameNode::ArrayTypeNameNode):
1576         (WebCore::WHLSL::Metal::ArrayTypeNameNode::numElements const):
1577         (WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::ArrayReferenceTypeNameNode):
1578         (WebCore::WHLSL::Metal::ArrayReferenceTypeNameNode::addressSpace const):
1579         (WebCore::WHLSL::Metal::PointerTypeNameNode::PointerTypeNameNode):
1580         (WebCore::WHLSL::Metal::PointerTypeNameNode::addressSpace const):
1581         (WebCore::WHLSL::Metal::ReferenceTypeNameNode::ReferenceTypeNameNode):
1582         (WebCore::WHLSL::Metal::ReferenceTypeNameNode::namedType):
1583         (WebCore::WHLSL::Metal::TypeNamer::TypeNamer):
1584         (WebCore::WHLSL::Metal::TypeNamer::visit):
1585         (WebCore::WHLSL::Metal::findInVector):
1586         (WebCore::WHLSL::Metal::find):
1587         (WebCore::WHLSL::Metal::TypeNamer::mangledNameForType):
1588         (WebCore::WHLSL::Metal::TypeNamer::createNameNode):
1589         (WebCore::WHLSL::Metal::TypeNamer::insert):
1590         (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::MetalTypeDeclarationWriter):
1591         (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::toString):
1592         (WebCore::WHLSL::Metal::MetalTypeDeclarationWriter::visit):
1593         (WebCore::WHLSL::Metal::TypeNamer::metalTypeDeclarations):
1594         (WebCore::WHLSL::Metal::toString):
1595         (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
1596         (WebCore::WHLSL::Metal::TypeNamer::emitNamedTypeDefinition):
1597         (WebCore::WHLSL::Metal::TypeNamer::metalTypeDefinitions):
1598         (WebCore::WHLSL::Metal::TypeNamer::mangledNameForEnumerationMember):
1599         (WebCore::WHLSL::Metal::TypeNamer::mangledNameForStructureElement):
1600         (WebCore::WHLSL::Metal::TypeNamer::metalTypes):
1601         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h: Added.
1602         (WebCore::WHLSL::Metal::TypeNamer::generateNextTypeName):
1603         (WebCore::WHLSL::Metal::TypeNamer::generateNextStructureElementName):
1604         (WebCore::WHLSL::Metal::TypeNamer::generateNextEnumerationMemberName):
1605         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
1606         (WebCore::WHLSL::checkSemantics):
1607         (WebCore::WHLSL::Checker::visit):
1608         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
1609         (WebCore::WHLSL::Gatherer::visit):
1610         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:
1611         (WebCore::WHLSL::EntryPointItem::EntryPointItem):
1612         * Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp: Removed.
1613         * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp: Added.
1614         (WebCore::WHLSL::StatementBehaviorChecker::takeFunctionBehavior):
1615         (WebCore::WHLSL::checkStatementBehavior):
1616         * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h: Renamed from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
1617         * Sources.txt:
1618         * WebCore.xcodeproj/project.pbxproj:
1619
1620 2019-01-20  Myles C. Maxfield  <mmaxfield@apple.com>
1621
1622         [WHLSL] Add the statement behavior checker
1623         https://bugs.webkit.org/show_bug.cgi?id=193487
1624
1625         Reviewed by Dean Jackson.
1626
1627         This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Spec/source/index.rst#typing-statements
1628         into C++. It is meant to replace the ReturnChecker and UnreachableCodeChecker in the reference implementation.
1629
1630         No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
1631         of test. When enough of the compiler is present, I'll port the reference implementation's test suite.
1632
1633         * Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp: Removed. StatementBehaviorChecker does everything that LoopChecker
1634         does.
1635         * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.cpp: Added.
1636         (WebCore::WHLSL::StatementBehaviorChecker::takeFunctionBehavior):
1637         (WebCore::WHLSL::checkStatementBehavior):
1638         * Modules/webgpu/WHLSL/WHLSLStatementBehaviorChecker.h: Renamed from Source/WebCore/Modules/webgpu/WHLSL/WHLSLLoopChecker.h.
1639         * Sources.txt:
1640         * WebCore.xcodeproj/project.pbxproj:
1641
1642 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1643
1644         REGRESSION(r240174): Wrong preprocessor guards in RenderImage::paintAreaElementFocusRing
1645         https://bugs.webkit.org/show_bug.cgi?id=193630
1646
1647         Reviewed by Daniel Bates.
1648
1649         r240174 inadvertently disabled this function on non-Apple platforms.
1650
1651         This fixes layout test fast/images/image-map-outline-in-positioned-container.html.
1652
1653         * rendering/RenderImage.cpp:
1654         (WebCore::RenderImage::paintAreaElementFocusRing):
1655
1656 2019-01-20  chris fleizach  <cfleizach@apple.com>
1657
1658         AX: Support returning relative frames for accessibility
1659         https://bugs.webkit.org/show_bug.cgi?id=193414
1660         <rdar://problem/47268501>
1661
1662         Reviewed by Zalan Bujtas.
1663
1664         Create a way for assistive technologies to retrieve a frame in page space that can be transformed to its final screen space by having the AT message the UI process separately.
1665
1666         Consolidate rect/point conversion methods for macOS and iOS.
1667         This is only needed on WebKit2, where we have to reach back across to the hosting process to get the final frame, so we can skip this test on WK1.
1668
1669         Tests: accessibility/mac/relative-frame.html
1670
1671         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1672         (-[WebAccessibilityObjectWrapper _accessibilityConvertPointToViewSpace:]):
1673         (-[WebAccessibilityObjectWrapper _accessibilityRelativeFrame]):
1674         (-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]):
1675         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
1676         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
1677         (-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
1678         (-[WebAccessibilityObjectWrapper rectsForSelectionRects:]):
1679         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.
1680         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]): Deleted.
1681         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1682         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1683         (convertPathToScreenSpaceFunction):
1684         (-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]):
1685         (-[WebAccessibilityObjectWrapperBase convertPointToScreenSpace:]): Deleted.
1686         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1687         (-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]):
1688         (-[WebAccessibilityObjectWrapper position]):
1689         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1690         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.
1691
1692 2019-01-20  Simon Fraser  <simon.fraser@apple.com>
1693
1694         On RenderBox, make client sizing be derived from padding box sizing
1695         https://bugs.webkit.org/show_bug.cgi?id=193621
1696
1697         Reviewed by Daniel Bates.
1698
1699         I never liked how clientWidth/Height, an IE-originated term, was used as the basis
1700         for various RenderBox geometry functions.
1701
1702         Fix by adding some functions which return the dimensions of the padding box (which
1703         is the inside of the border and any scrollbar), and define clientWidth/Height in
1704         terms of them.
1705
1706         Also add paddingBoxRectIncludingScrollbar() function that is used by compositing code.
1707
1708         * rendering/RenderBox.cpp:
1709         (WebCore::RenderBox::clientWidth const):
1710         (WebCore::RenderBox::clientHeight const):
1711         * rendering/RenderBox.h:
1712         (WebCore::RenderBox::borderBoxRect const):
1713         (WebCore::RenderBox::computedCSSContentBoxRect const):
1714         (WebCore::RenderBox::contentWidth const):
1715         (WebCore::RenderBox::contentHeight const):
1716         (WebCore::RenderBox::paddingBoxWidth const):
1717         (WebCore::RenderBox::paddingBoxHeight const):
1718         (WebCore::RenderBox::paddingBoxRect const):
1719         (WebCore::RenderBox::paddingBoxRectIncludingScrollbar const):
1720         (WebCore::RenderBox::hasHorizontalOverflow const):
1721         (WebCore::RenderBox::hasVerticalOverflow const):
1722         * rendering/RenderLayerBacking.cpp:
1723         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
1724         (WebCore::RenderLayerBacking::updateGeometry):
1725
1726 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1727
1728         Unreviewed, rolling out r238275.
1729
1730         Regressed css3/shapes/shape-outside/shape-image/shape-
1731         image-025.html
1732
1733         Reverted changeset:
1734
1735         "ScalableImageDecoder: don't forcefully decode image data when
1736         querying frame completeness, duration"
1737         https://bugs.webkit.org/show_bug.cgi?id=191354
1738         https://trac.webkit.org/changeset/238275
1739
1740 2019-01-19  Zalan Bujtas  <zalan@apple.com>
1741
1742         [LFC][BFC] <body>'s overflow property value is propagated to viewport
1743         https://bugs.webkit.org/show_bug.cgi?id=193617
1744
1745         Reviewed by Antti Koivisto.
1746
1747         When the root element is an HTML "HTML" element or an XHTML "html" element, and that element has an HTML "BODY" element
1748         or an XHTML "body" element as a child, user agents must instead apply the 'overflow' property from the first such child element to the viewport,
1749         if the value on the root element is 'visible'. The 'visible' value when used for the viewport must be interpreted as 'auto'.
1750         The element from which the value is propagated must have a used value for 'overflow' of 'visible'.
1751
1752         This also has impact on layout since <body style="overflow: hidden"> would establish a block formatting context.
1753
1754         * layout/layouttree/LayoutBox.cpp:
1755         (WebCore::Layout::Box::isOverflowVisible const):
1756
1757 2019-01-20  Michael Catanzaro  <mcatanzaro@igalia.com>
1758
1759         Unreviewed, rolling out r240209.
1760
1761         Broke GTK/WPE injected bundle
1762
1763         Reverted changeset:
1764
1765         "AX: Support returning relative frames for accessibility"
1766         https://bugs.webkit.org/show_bug.cgi?id=193414
1767         https://trac.webkit.org/changeset/240209
1768
1769 2019-01-12  Dan Bernstein  <mitz@apple.com>
1770
1771         [Cocoa] Avoid importing directly from subumbrella frameworks
1772         https://bugs.webkit.org/show_bug.cgi?id=186016
1773         <rdar://problem/40591038>
1774
1775         Reviewed by Sam Weinig.
1776
1777         * Configurations/WebCore.xcconfig: Removed -iframework options from OTHER_CFLAGS and
1778           OTHER_CPLUSPLUSFLAGS.
1779         * editing/mac/DictionaryLookupLegacy.mm: Import Quartz.h instead of a PDFKit header.
1780         * platform/mac/PlatformEventFactoryMac.mm: Import Carbon.h instead of HIToolbox headers.
1781         * platform/text/mac/TextEncodingRegistryMac.mm: Import Carbon.h instead of CarbonCore.h.
1782
1783 2019-01-20  chris fleizach  <cfleizach@apple.com>
1784
1785         AX: Support returning relative frames for accessibility
1786         https://bugs.webkit.org/show_bug.cgi?id=193414
1787         <rdar://problem/47268501>
1788
1789         Reviewed by Zalan Bujtas.
1790
1791         Create a way for assistive technologies to retrieve a frame in page space that can be transformed to its final screen space by having the AT message the UI process separately.
1792
1793         Consolidate rect/point conversion methods for macOS and iOS.
1794         This is only needed on WebKit2, where we have to reach back across to the hosting process to get the final frame, so we can skip this test on WK1.
1795
1796         Tests: accessibility/mac/relative-frame.html
1797
1798         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1799         (-[WebAccessibilityObjectWrapper _accessibilityConvertPointToViewSpace:]):
1800         (-[WebAccessibilityObjectWrapper _accessibilityRelativeFrame]):
1801         (-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]):
1802         (-[WebAccessibilityObjectWrapper accessibilityActivationPoint]):
1803         (-[WebAccessibilityObjectWrapper accessibilityFrame]):
1804         (-[WebAccessibilityObjectWrapper frameForTextMarkers:]):
1805         (-[WebAccessibilityObjectWrapper rectsForSelectionRects:]):
1806         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.
1807         (-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]): Deleted.
1808         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
1809         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1810         (convertPathToScreenSpaceFunction):
1811         (-[WebAccessibilityObjectWrapperBase convertRectToSpace:space:]):
1812         (-[WebAccessibilityObjectWrapperBase convertPointToScreenSpace:]): Deleted.
1813         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1814         (-[WebAccessibilityObjectWrapper IGNORE_WARNINGS_END]):
1815         (-[WebAccessibilityObjectWrapper position]):
1816         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1817         (-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]): Deleted.
1818
1819 2019-01-20  Antoine Quint  <graouts@apple.com>
1820
1821         Add a POINTER_EVENTS feature flag
1822         https://bugs.webkit.org/show_bug.cgi?id=193577
1823         <rdar://problem/47408511>
1824
1825         Unreviewed. Also enable Pointer Events for iosmac.
1826
1827         * Configurations/FeatureDefines.xcconfig:
1828
1829 2019-01-19  Zalan Bujtas  <zalan@apple.com>
1830
1831         [LFC][Floats] Ensure that floats in FloatingContext::m_floats are always horizontally ordered.
1832         https://bugs.webkit.org/show_bug.cgi?id=193613
1833
1834         Reviewed by Antti Koivisto.
1835
1836         Float items in m_floats list should stay in horizontal position order (left/right edge).
1837
1838         When adding a new float item to floating state list, we have to ensure that it is definitely the left(right)-most item.
1839         Normally it is, but negative horizontal margins can push the float box beyond another float box.
1840
1841         <div style="float: left; height: 10px; width: 10px;"></div>
1842         <div style="float: left; height: 10px; width: 10px; margin-left: -80px;"></div>
1843
1844         The second float's right edge beyond the first float' left edge. THe second float is not the right(inner)-most float anymore.
1845
1846         Test: fast/block/float/floats-with-negative-horizontal-margin.html
1847
1848         * layout/floats/FloatingContext.cpp:
1849         (WebCore::Layout::areFloatsHorizontallySorted):
1850         (WebCore::Layout::FloatingContext::positionForFloat const):
1851         (WebCore::Layout::FloatingContext::positionForFloatAvoiding const):
1852         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
1853         * layout/floats/FloatingState.cpp:
1854         (WebCore::Layout::FloatingState::append):
1855
1856 2019-01-19  Youenn Fablet  <youenn@apple.com>
1857
1858         getUserMedia with a deviceId exact constraint with an empty string value should succeed
1859         https://bugs.webkit.org/show_bug.cgi?id=193541
1860         <rdar://problem/47357218>
1861
1862         Reviewed by Eric Carlson.
1863
1864         If there is a deviceId constraint, remove any empty string from ideal/exact string list.
1865         This will make the device selection be solely based on other constraints.
1866         An improvement might be for 'exact' constraint to pick the default device.
1867         There is currently no such notion of a default device.
1868         Picking the best fitting device seems a good tradeoff.
1869         Covered by updated test.
1870
1871         * platform/mediastream/MediaConstraints.cpp:
1872         (WebCore::MediaTrackConstraintSetMap::set):
1873         * platform/mediastream/MediaConstraints.h:
1874         (WebCore::StringConstraint::removeEmptyStringConstraint):
1875
1876 2019-01-19  Eric Liang  <ericliang@apple.com>
1877
1878         AXSelected attribute on RadioButton should not be settable.
1879         https://bugs.webkit.org/show_bug.cgi?id=193371
1880
1881         Reviewed by Chris Fleizach.
1882
1883         Test: accessibility/set-selected-editable.html
1884
1885         * accessibility/AccessibilityNodeObject.cpp:
1886         (WebCore::AccessibilityNodeObject::canSetSelectedAttribute const):
1887
1888 2019-01-19  Antoine Quint  <graouts@apple.com>
1889
1890         Add a POINTER_EVENTS feature flag
1891         https://bugs.webkit.org/show_bug.cgi?id=193577
1892
1893         Reviewed by Dean Jackson.
1894
1895         Only expose the PointerEvent interface if the POINTER_EVENTS feature is enabled.
1896
1897         * Configurations/FeatureDefines.xcconfig:
1898         * dom/EventNames.in:
1899         * dom/PointerEvent.cpp:
1900         * dom/PointerEvent.h:
1901         * dom/PointerEvent.idl:
1902
1903 2019-01-18  Ryosuke Niwa  <rniwa@webkit.org>
1904
1905         iOS: Updating input mode should update the software keyboard
1906         https://bugs.webkit.org/show_bug.cgi?id=193565
1907         <rdar://problem/47376334>
1908
1909         Reviewed by Wenson Hsieh.
1910
1911         Let the chrome client know that the focused element's inputmode had changed.
1912
1913         Test: fast/forms/ios/inputmode-none-removed.html
1914
1915         * html/HTMLElement.cpp:
1916         (WebCore::HTMLElement::parseAttribute):
1917         * page/ChromeClient.h:
1918
1919 2019-01-18  Brian Burg  <bburg@apple.com>
1920
1921         Automation.computeElementLayout should return visual viewport-aware coordinates
1922         https://bugs.webkit.org/show_bug.cgi?id=193598
1923         <rdar://problem/35325644>
1924
1925         Reviewed by Simon Fraser.
1926
1927         * page/FrameView.h: export symbol to be usable from WebKit.
1928         * page/FrameView.cpp:
1929         (WebCore::FrameView::clientToLayoutViewportRect const): Added.
1930         Do the same thing as clientToLayoutViewportPoint with a rect instead.
1931
1932
1933 2019-01-18  Eric Carlson  <eric.carlson@apple.com>
1934
1935         Revert r238815, it broke WK1 video fullscreen on Mac
1936         https://bugs.webkit.org/show_bug.cgi?id=193586
1937         <rdar://problem/47358941>
1938
1939         Reviewed by Jer Noble.
1940
1941         * PlatformMac.cmake:
1942         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1943         (WebCore::MediaPlayerPrivateAVFoundation::supportsFullscreen const):
1944
1945 2019-01-18  Devin Rousso  <drousso@apple.com>
1946
1947         Web Inspector: Audit: don't keep the injected sub-objects alive between runs
1948         https://bugs.webkit.org/show_bug.cgi?id=193594
1949         <rdar://problem/47398091>
1950
1951         Reviewed by Joseph Pecoraro.
1952
1953         Rather than save the `InspectorAuditAccessibilityObject` and `InspectorAuditDOMObject`
1954         between individual `Audit.setup` invocations, we should only keep them alive so long as the
1955         injected `WebInspectorAudit` object is alive (e.g. from `Audit.setup` to `Audit.teardown`).
1956
1957         This change fixes inspector/audit/run-accessibility.html.
1958
1959         * inspector/agents/page/PageAuditAgent.h:
1960         * inspector/agents/page/PageAuditAgent.cpp:
1961         (WebCore::PageAuditAgent::populateAuditObject):
1962
1963 2019-01-18  Daniel Bates  <dabates@apple.com>
1964
1965         Another attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
1966         (https://bugs.webkit.org/show_bug.cgi?id=193583)
1967
1968         Substitute ENABLE(FULL_KEYBOARD_ACCESS) for PLATFORM(MAC). On Mac, we always build with
1969         ENABLE(FULL_KEYBOARD_ACCESS) enabled.
1970
1971         * rendering/RenderElement.cpp:
1972         (WebCore::RenderElement::paintFocusRing):
1973
1974 2019-01-18  Daniel Bates  <dabates@apple.com>
1975
1976         Fix some build issues.
1977
1978         Including UIKitSoftLinking.h is not compatible with unified builds.
1979
1980         * SourcesCocoa.txt:
1981         * WebCore.xcodeproj/project.pbxproj:
1982
1983 2019-01-18  Justin Fan  <justin_fan@apple.com>
1984
1985         (WIP) [WebGPU] WebGPUProgrammablePassEncoder::setBindGroup prototype
1986         https://bugs.webkit.org/show_bug.cgi?id=193457
1987         <rdar://problem/47296678>
1988
1989         Reviewed by Dean Jackson.
1990
1991         Enable WebGPU developers to assign buffer bind groups and access them via render pipeline. 
1992
1993         Test: webgpu/buffer-resource-triangles.html
1994
1995         * Modules/webgpu/WebGPUBindGroup.h:
1996         (WebCore::WebGPUBindGroup::bindGroup const): Added getter.
1997         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp: 
1998         (WebCore::WebGPUProgrammablePassEncoder::setBindGroup const): Added. Delegates call to GPUProgrammablePassEncoder.
1999         * Modules/webgpu/WebGPUProgrammablePassEncoder.h: Enable setBindGroup.
2000         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: ditto.
2001         * WebCore.xcodeproj/project.pbxproj:
2002         * platform/graphics/gpu/GPUBindGroup.h: 
2003         (WebCore::GPUBindGroup::layout const): Added getter.
2004         (WebCore::GPUBindGroup::bindings const): ditto.
2005         * platform/graphics/gpu/GPUBindGroupLayout.h: Added ArgumentEncoderBuffer struct to retain ptr to both MTLArgumentEncoders and their argument MTLBuffers.
2006         (WebCore::GPUBindGroupLayout::ArgumentEncoderBuffer::operator! const):
2007         (WebCore::GPUBindGroupLayout::vertexArguments const): Added. Getter.
2008         (WebCore::GPUBindGroupLayout::fragmentArguments const): ditto.
2009         (WebCore::GPUBindGroupLayout::computeArguments const): ditto.
2010         * platform/graphics/gpu/GPUDevice.cpp: Refactored unnecessary header include.
2011         * platform/graphics/gpu/GPUDevice.h: ditto.
2012         * platform/graphics/gpu/GPUProgrammablePassEncoder.h:
2013         (WebCore::GPUProgrammablePassEncoder::setVertexBuffer): Added. Delegates to MTLCommandEncoder call.
2014         (WebCore::GPUProgrammablePassEncoder::setFragmentBuffer): ditto.
2015         * platform/graphics/gpu/GPURenderPassEncoder.h: 
2016         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
2017         (WebCore::tryCreateArgumentEncoderAndBuffer): Replace newEncoder(). Now create an ArgumentEncoderBuffer object from an array of MTLArgumentDescriptors, if able.
2018         (WebCore::GPUBindGroupLayout::tryCreate): Refactor to support ArgumentEncoderBuffers, and allocate MTLBuffers for argument encoders.
2019         (WebCore::GPUBindGroupLayout::GPUBindGroupLayout): Support ArgumentEncoderBuffers.
2020         (WebCore::newEncoder): Deleted.
2021         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm:
2022         (WebCore::GPUCommandBuffer::GPUCommandBuffer):
2023         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm:
2024         (WebCore::GPUProgrammablePassEncoder::setResourceAsBufferOnEncoder): Set a buffer resource on the MTLArgumentEncoder, and call useResource on the command encoder.
2025         (WebCore::GPUProgrammablePassEncoder::setBindGroup): Parses the bind group to assign each resource on its matching MTLArgumentEncoder.
2026         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm: 
2027         (WebCore::GPURenderPassEncoder::useResource): Resolves call from GPUProgrammablePassEncoder to call on MTLRenderCommandEncoder.
2028         (WebCore::GPURenderPassEncoder::setVertexBuffer): ditto.
2029         (WebCore::GPURenderPassEncoder::setFragmentBuffer): ditto.
2030
2031 2019-01-18  Daniel Bates  <dabates@apple.com>
2032
2033         Another attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
2034         (https://bugs.webkit.org/show_bug.cgi?id=193583)
2035
2036         Only override RenderTheme::platformFocusRingColor() when building with ENABLE(FULL_KEYBOARD_ACCESS)
2037         enabled.
2038
2039         * rendering/RenderThemeIOS.h:
2040         * rendering/RenderThemeIOS.mm:
2041
2042 2019-01-18  Daniel Bates  <dabates@apple.com>
2043
2044         Attempt to fix the iOS build following <https://trac.webkit.org/changeset/240174>
2045         (https://bugs.webkit.org/show_bug.cgi?id=193583)
2046
2047         Namespace qualify call to getUIColorClass().
2048
2049         * rendering/RenderThemeIOS.mm:
2050         (WebCore::RenderThemeIOS::platformFocusRingColor const):
2051
2052 2019-01-18  Jer Noble  <jer.noble@apple.com>
2053
2054         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
2055         https://bugs.webkit.org/show_bug.cgi?id=189553
2056
2057         Reviewed by Tim Horton.
2058
2059         * Configurations/Base.xcconfig:
2060         * Configurations/SDKVariant.xcconfig: Added.
2061         * Configurations/WebCore.xcconfig:
2062
2063 2019-01-18  Daniel Bates  <dabates@apple.com>
2064
2065         CSS auto focus-ring outlines don't render on iOS
2066         https://bugs.webkit.org/show_bug.cgi?id=193583
2067         <rdar://problem/6508697>
2068
2069         Reviewed by Simon Fraser.
2070
2071         Implement support for drawing focus rings on iOS when built with ENABLE(FULL_KEYBOARD_ACCESS)
2072         enabled.
2073
2074         For now the focus ring drawing for iOS is tangled up into the Mac-specific code to draw
2075         animated focus rings. I will fix this in <https://bugs.webkit.org/show_bug.cgi?id=193591>.
2076
2077         * SourcesCocoa.txt: Add file ColorIOS.mm.
2078         * WebCore.xcodeproj/project.pbxproj: Add files ColorIOS.{h, mm}.
2079
2080         * platform/graphics/GraphicsContext.h:
2081         * platform/graphics/cocoa/GraphicsContextCocoa.mm:
2082         (WebCore::drawFocusRingAtTime):
2083         (WebCore::GraphicsContext::drawFocusRing):
2084         Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
2085         This is always enabled on Mac.
2086         
2087         * platform/ios/ColorIOS.h: Added.
2088         * platform/ios/ColorIOS.mm: Added.
2089         (WebCore::colorFromUIColor): Convert a UIColor to a WebCore::Color.
2090
2091         * rendering/RenderElement.cpp:
2092         (WebCore::RenderElement::paintFocusRing):
2093         * rendering/RenderImage.cpp:
2094         (WebCore::RenderImage::paintAreaElementFocusRing):
2095         Compile focus ring drawing code when building with ENABLE(FULL_KEYBOARD_ACCESS) enabled.
2096         This is always enabled on Mac.
2097
2098         * rendering/RenderThemeIOS.h:
2099         * rendering/RenderThemeIOS.mm:
2100         (WebCore::RenderThemeIOS::platformFocusRingColor const): Implement this override for iOS.
2101         (WebCore::RenderThemeIOS::supportsFocusRing const): Implement this override for iOS to always
2102         return false - the iOS theme code does not support painting focus rings. By returning false we
2103         will use the platform-independent, non-theme code path to draw focus rings.
2104
2105 2019-01-18  David Kilzer  <ddkilzer@apple.com>
2106
2107         Follow-up: Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
2108         <https://webkit.org/b/193568>
2109         <rdar://problem/47381130>
2110
2111         * editing/cocoa/DictionaryLookup.mm:
2112         (-[WebRevealHighlight drawHighlightContentForItem:context:]):
2113         Fix the build by changing getUIApplicationClass() to
2114         PAL::getUIApplicationClass().
2115
2116 2019-01-18  David Kilzer  <ddkilzer@apple.com>
2117
2118         Switch remaining UIKit soft-linking in WebCore, WebKitLegacy over to UIKitSoftLink.{cpp,h}
2119         <https://webkit.org/b/193568>
2120         <rdar://problem/47381130>
2121
2122         Reviewed by Alex Christensen.
2123
2124         This does the following:
2125         - Removes local soft-linking of UIKit.
2126         - Switches to using PAL functions for soft-linking.
2127
2128         * SourcesCocoa.txt: Add 4 source files to UnifiedSources.
2129         * WebCore.xcodeproj/project.pbxproj: Remove 4 sources files
2130         from WebCore target now that they are in UnifiedSources.
2131         * editing/cocoa/DictionaryLookup.mm:
2132         * editing/cocoa/HTMLConverter.mm: Move SPI to UIKitSPI.h. Remove
2133         declarations in public headers.
2134         (_fontForNameAndSize): Change use of getUIFontClass() to
2135         PlatformFontClass.
2136         (HTMLConverter::_processElement): Add cast here since compiler
2137         finds the wrong selector for +clearColor and thinks it returns a
2138         `CIColor *` object.  The same cast already exists in
2139         VideoFullscreenInterfaceAVKit.mm.
2140         * page/cocoa/SettingsBaseCocoa.mm:
2141         (WebCore::SettingsBase::defaultTextAutosizingEnabled):
2142         * platform/audio/ios/MediaSessionManagerIOS.mm:
2143         (-[WebMediaSessionHelper initWithCallback:]):
2144         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2145         (WebCore::exernalDeviceDisplayNameForPlayer):
2146         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2147         (WebCore::showLetterpressedGlyphsWithAdvances):
2148         * platform/ios/DragImageIOS.mm:
2149         (WebCore::scaleDragImage):
2150         (WebCore::createDragImageFromImage):
2151         (WebCore::cascadeForSystemFont):
2152         (WebCore::createDragImageForLink):
2153         (WebCore::createDragImageForSelection):
2154         (WebCore::createDragImageForRange):
2155         (WebCore::createDragImageForColor):
2156         * platform/ios/PlatformPasteboardIOS.mm:
2157         (WebCore::PlatformPasteboard::PlatformPasteboard):
2158         (WebCore::PlatformPasteboard::color):
2159         (WebCore::registerItemToPasteboard):
2160         (WebCore::PlatformPasteboard::setColor):
2161         * platform/ios/ThemeIOS.mm:
2162         (WebCore::ThemeIOS::userPrefersReducedMotion const):
2163         * platform/ios/UserAgentIOS.mm:
2164         (WebCore::isClassic):
2165         (WebCore::isClassicPad):
2166         (WebCore::isClassicPhone):
2167         * platform/ios/ValidationBubbleIOS.mm:
2168         (-[WebValidationBubbleTapRecognizer initWithPopoverController:]):
2169         (WebCore::ValidationBubble::ValidationBubble):
2170         (WebCore::ValidationBubble::show):
2171         (WebCore::fallbackViewController):
2172         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2173         (clearUIColor):
2174         (allocWebAVPictureInPicturePlayerLayerViewInstance):
2175         (WebAVPlayerLayerView_videoView):
2176         (fallbackViewController):
2177         (VideoFullscreenInterfaceAVKit::doSetup):
2178         * platform/ios/WebEvent.mm:
2179         (+[WebEvent modifierFlags]):
2180         * platform/ios/WebItemProviderPasteboard.mm:
2181         (allLoadableClasses):
2182         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2183         (VideoFullscreenControllerContext::setUpFullscreen):
2184         * platform/network/mac/WebCoreURLResponse.mm: Add missing header
2185         after unified sources were updated.
2186         * rendering/RenderThemeIOS.mm:
2187         (WebCore::contentSizeCategoryDidChange):
2188         (WebCore::RenderThemeIOS::RenderThemeIOS):
2189         (WebCore::RenderThemeIOS::contentSizeCategory):
2190         (WebCore::RenderThemeIOS::systemColor const):
2191         (WebCore::attachmentActionColor):
2192         (WebCore::attachmentTitleColor):
2193         (WebCore::attachmentSubtitleColor):
2194         (WebCore::iconForAttachment):
2195         * testing/Internals.mm:
2196         (WebCore::Internals::userPrefersReducedMotion const):
2197
2198 2019-01-18  Antti Koivisto  <antti@apple.com>
2199
2200         Implement asynchronous frame scrolling for iOS
2201         https://bugs.webkit.org/show_bug.cgi?id=193539
2202         <rdar://problem/47379873>
2203
2204         Reviewed by Simon Fraser.
2205
2206         This patch implements UIScrollView based frame scrolling on iOS, enabled by the "Async Frame Scrolling"
2207         internal setting (still off by default).
2208
2209         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
2210         (WebCore::ScrollingTreeFrameScrollingNodeIOS::scrollLayer const): Deleted.
2211         * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
2212         (WebCore::ScrollingTreeFrameScrollingNodeIOS::setScrollPosition):
2213
2214         Export ScrollingTreeFrameScrollingNodeIOS.
2215
2216         * rendering/RenderLayerCompositor.cpp:
2217         (WebCore::RenderLayerCompositor::visibleRectForLayerFlushing const):
2218         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
2219         (WebCore::RenderLayerCompositor::updateScrollLayerClipping):
2220
2221         If we don't have a separate clip layer, just resize and position the scroll layer.
2222
2223         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2224         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2225         (WebCore::RenderLayerCompositor::ensureRootLayer):
2226
2227         Use GraphicsLayer::Type::Scrolling as the scroll layer type when async frame scrolling is enabled.
2228         Don't create a separate clip layer since the scroll layer will handle clipping.
2229
2230         * rendering/RenderLayerCompositor.h:
2231
2232 2019-01-18  Ali Juma  <ajuma@chromium.org>
2233
2234         FetchResponse::url should return the empty string for tainted responses
2235         https://bugs.webkit.org/show_bug.cgi?id=193553
2236
2237         Reviewed by Youenn Fablet.
2238
2239         Check whether the response is tainted in FetchResponse::url, to match
2240         the behavior described in https://fetch.spec.whatwg.org/#concept-filtered-response-opaque.
2241
2242         * Modules/fetch/FetchResponse.cpp:
2243         (WebCore::FetchResponse::url const):
2244
2245 2019-01-18  Youenn Fablet  <youenn@apple.com>
2246
2247         A track source should be unmuted whenever reenabled after setDirection changes
2248         https://bugs.webkit.org/show_bug.cgi?id=193554
2249         <rdar://problem/47366196>
2250
2251         Reviewed by Eric Carlson.
2252
2253         Ensure that track gets unmuted after being fired as part of track event.
2254         Test is triggering some existing issues with MediaPlayerPrivateMediaStreamAVFObjC.
2255         Given the enqueuing of samples happens in a different frame than the thread used to update media stream and the active video track,
2256         some enqueued samples might not be from the right active video track or there might be no active video track.
2257
2258         Test: webrtc/video-setDirection.html
2259
2260         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2261         (WebCore::LibWebRTCMediaEndpoint::fireTrackEvent):
2262         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
2263         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2264         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::enqueueVideoSample):
2265         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::requestNotificationWhenReadyForVideoData):
2266
2267 2019-01-18  Charlie Turner  <cturner@igalia.com>
2268
2269         [GStreamer][EME][ClearKey] Request keys from CDMInstance rather than passing via bus messages
2270         https://bugs.webkit.org/show_bug.cgi?id=192229
2271
2272         Reviewed by Xabier Rodriguez-Calvar.
2273
2274         Covered by existing tests.
2275
2276         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
2277         (WebCore::parseLicenseFormat): There is a defect in some C++11
2278         compiles where they will copy this return value since the type
2279         doesn't exactly match. Force a move with WTFMove.
2280         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2281         (WebCore::MediaPlayerPrivateGStreamerBase::dispatchDecryptionKey):
2282         Deleted. No longer used by anything.
2283         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: Ditto.
2284         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
2285         Rename these methods to avoid "namespacing names".
2286         (webkit_media_clear_key_decrypt_class_init):
2287         (finalize):
2288         (handleKeyResponse): This is a temporary fix, we need some more
2289         reorganisation to be full driven by CDMInstance APIs for decryption.
2290         (findAndSetKey):
2291         (decrypt):
2292         (webKitMediaClearKeyDecryptorFinalize): Deleted.
2293         (webKitMediaClearKeyDecryptorHandleKeyResponse): Deleted.
2294         (webKitMediaClearKeyDecryptorFindAndSetKey): Deleted.
2295         (webKitMediaClearKeyDecryptorDecrypt): Deleted.
2296         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp: Ditto.
2297         (webkit_media_common_encryption_decrypt_class_init):
2298         (finalize):
2299         (transformCaps):
2300         (transformInPlace):
2301         (isCDMInstanceAvailable):
2302         (sinkEventHandler):
2303         (queryHandler):
2304         (changeState):
2305         (setContext):
2306         (webKitMediaCommonEncryptionDecryptorFinalize): Deleted.
2307         (webkitMediaCommonEncryptionDecryptTransformCaps): Deleted.
2308         (webkitMediaCommonEncryptionDecryptTransformInPlace): Deleted.
2309         (webkitMediaCommonEncryptionDecryptIsCDMInstanceAvailable): Deleted.
2310         (webkitMediaCommonEncryptionDecryptSinkEventHandler): Deleted.
2311         (webkitMediaCommonEncryptionDecryptorQueryHandler): Deleted.
2312         (webKitMediaCommonEncryptionDecryptorChangeState): Deleted.
2313         (webKitMediaCommonEncryptionDecryptorSetContext): Deleted.
2314         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
2315         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2316         (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithLocalInstance):
2317         Deleted. No longer passing key information over bus messages.
2318         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
2319
2320 2019-01-18  Zalan Bujtas  <zalan@apple.com>
2321
2322         [LFC][BFC][MarginCollapsing] Collapsing through should not ignore floats.
2323         https://bugs.webkit.org/show_bug.cgi?id=193564
2324
2325         Reviewed by Antti Koivisto.
2326
2327         Float boxes prevent collapsing through.
2328
2329         Test: fast/block/float/float-in-descendant-formatting-context.html
2330
2331         * layout/blockformatting/BlockMarginCollapse.cpp:
2332         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginsCollapseThrough):
2333
2334 2019-01-18  Zalan Bujtas  <zalan@apple.com>
2335
2336         [LFC] Do not skip float boxes that are not part of the current formatting context when computing bottom.
2337         https://bugs.webkit.org/show_bug.cgi?id=193562
2338
2339         Reviewed by Antti Koivisto.
2340
2341         The current floating context's (float) boxes could belong to descendant formatting contexts.
2342         We need to include them as well when computing height (bottom) (we essentially need to skip ancestor floats only).
2343
2344         <div id=container style="overflow: hidden"><div>foo<div style="float: left">bar</div></div></div>
2345         While computing the height for "container", the float box needs to be taken into account even though
2346         it is part of another (descendant) formatting context (the inline formatting context established by its parent div).
2347
2348         * layout/floats/FloatingState.cpp:
2349         (WebCore::Layout::FloatingState::bottom const):
2350         * layout/floats/FloatingState.h:
2351         (WebCore::Layout::FloatingState::FloatItem::isDescendantOfFormattingRoot const):
2352         (WebCore::Layout::FloatingState::FloatItem::inFormattingContext const): Deleted.
2353
2354 2019-01-18  Zalan Bujtas  <zalan@apple.com>
2355
2356         [LFC][BFC] Check for inflow children while computing height for block formatting context roots.
2357         https://bugs.webkit.org/show_bug.cgi?id=193555
2358
2359         Reviewed by Antti Koivisto.
2360
2361         This patch also extends areEssentiallyEqual to 0.125px to be able to match (essentially equal) inline runs. 
2362
2363         * layout/FormattingContextGeometry.cpp:
2364         (WebCore::Layout::contentHeightForFormattingContextRoot):
2365         * layout/Verification.cpp:
2366         (WebCore::Layout::areEssentiallyEqual):
2367         * page/FrameViewLayoutContext.cpp:
2368         (WebCore::layoutUsingFormattingContext):
2369
2370 2019-01-18  Yacine Bandou  <yacine.bandou@softathome.com>
2371
2372         [WebAudio] Release the AudioDestination when uninitializing DefaultAudioDestinationNode
2373         https://bugs.webkit.org/show_bug.cgi?id=192590
2374
2375         Reviewed by Philippe Normand.
2376
2377         When we uninitialize DefaultAudioDestinationNode, the AudioDestination is stopped but not destroyed.
2378
2379         On some platforms the resources are allocated and released with the AudioDestination, thus when we uninitialize
2380         DefaultAudioDestinationNode we don't release resources because the AudioDestination is not destroyed.
2381
2382         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
2383         (WebCore::DefaultAudioDestinationNode::uninitialize):
2384
2385 2019-01-18  Yacine Bandou  <yacine.bandou@softathome.com>
2386
2387         [WebAudio] Call AudioContext::uninitialize() immediately when the AudioContext is stopped
2388         https://bugs.webkit.org/show_bug.cgi?id=192586
2389
2390         Reviewed by Philippe Normand.
2391
2392         When WebProcess is killed, AudioContext::uninitialize() is not called immediately in the stop so
2393         the AudioDestinationNode is not destroyed.
2394
2395         In my case, I have a resource device manager, the output audio device is reserved when AudioDestinationNode
2396         is instantiated and it is released when AudioDestinationNode is destroyed, thus when the webprocess is killed,
2397         the resources leak.
2398
2399         AudioContext::uninitialize() is not called immediately since r94608.
2400         This modification can now be reverted without regression in WebAudio tests.
2401
2402         Test: webaudio/mediaelementaudiosourcenode-gc.html
2403
2404         * Modules/webaudio/AudioContext.cpp:
2405         (WebCore::AudioContext::stop):
2406
2407 2019-01-18  Simon Fraser  <simon.fraser@apple.com>
2408
2409         ScrollingCoordinator::scrollableAreaScrollLayerDidChange() can be removed
2410         https://bugs.webkit.org/show_bug.cgi?id=193559
2411
2412         Reviewed by Antti Koivisto.
2413
2414         ScrollingCoordinator::scrollableAreaScrollLayerDidChange() existed for CoordinatedGraphics,
2415         but the code that used it was removed in webkit.org/r229318 so we can remove it and
2416         code that calls it.
2417
2418         * page/scrolling/ScrollingCoordinator.h:
2419         (WebCore::ScrollingCoordinator::willDestroyScrollableArea):
2420         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange): Deleted.
2421         * rendering/RenderLayerBacking.cpp:
2422         (WebCore::RenderLayerBacking::updateGeometry):
2423         * rendering/RenderLayerCompositor.cpp:
2424         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
2425         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
2426         (WebCore::RenderLayerCompositor::scrollingLayerDidChange): Deleted.
2427         * rendering/RenderLayerCompositor.h:
2428
2429 2019-01-17  Wenson Hsieh  <wenson_hsieh@apple.com>
2430
2431         [iOS] Content offset jumps erratically when autoscrolling near scroll view content inset areas
2432         https://bugs.webkit.org/show_bug.cgi?id=193494
2433         <rdar://problem/46859627>
2434
2435         Reviewed by Simon Fraser and Tim Horton.
2436
2437         When computing the content offset to scroll to when revealing a given rect in content coordinates, we currently
2438         just use the unobscured content rect. As a result, when scrolling to reveal a rect, we'll clamp the final scroll
2439         position such that only content is visible. For example, when asked to reveal the rect `(0, 0, 1, 1)`, we adjust
2440         the scroll position to be the origin.
2441
2442         However, consider the case where a client (e.g. Mail on iOS) has added a content inset to the web view's scroll
2443         view. If we're asked to reveal a rect that is outside the content area but within a content inset, we will still
2444         end up clamping the scroll position to the unobscured rect. This manifests in a bug where selecting text and
2445         autoscrolling in iOS Mail compose while the scroll view is scrolled all the way to the top to reveal the To/Cc/
2446         Subject fields causes the content offset to jump to the origin, rather than staying at (0, -topContentInset).
2447
2448         To fix this, we teach `RenderLayer::scrollRectToVisible` about content insets that are visible. Rather than use
2449         the content rects as-is, expand to encompass visible content insets as well. This ensures that revealing a
2450         position which is already visible won't cause us to scroll away the content inset area and only show the
2451         unobscured rect.
2452
2453         Tests:  editing/selection/ios/autoscroll-with-top-content-inset.html
2454                 fast/scrolling/ios/scroll-into-view-with-top-content-inset.html
2455
2456         * page/FrameView.cpp:
2457         (WebCore::FrameView::unobscuredContentRectExpandedByContentInsets const):
2458
2459         Introduce a helper method that expands the unobscured content rect to include surrounding content insets.
2460
2461         * page/FrameView.h:
2462         * page/Page.h:
2463         (WebCore::Page::contentInsets const):
2464         (WebCore::Page::setContentInsets):
2465         * rendering/RenderLayer.cpp:
2466         (WebCore::RenderLayer::scrollRectToVisible):
2467         (WebCore::RenderLayer::getRectToExpose const):
2468
2469 2019-01-17  Truitt Savell  <tsavell@apple.com>
2470
2471         Unreviewed, rolling out r240124.
2472
2473         This commit broke an internal build.
2474
2475         Reverted changeset:
2476
2477         "SDK_VARIANT build destinations should be separate from non-
2478         SDK_VARIANT builds"
2479         https://bugs.webkit.org/show_bug.cgi?id=189553
2480         https://trac.webkit.org/changeset/240124
2481
2482 2019-01-17  Devin Rousso  <drousso@apple.com>
2483
2484         Web Inspector: fix Xcode project file list after r239976
2485         https://bugs.webkit.org/show_bug.cgi?id=193474
2486
2487         Reviewed by Timothy Hatcher.
2488
2489         * WebCore.xcodeproj/project.pbxproj:
2490
2491 2019-01-17  Ross Kirsling  <ross.kirsling@sony.com>
2492
2493         Unreviewed WinCairo fix -- hundreds of tests crash after r240031.
2494
2495         * platform/network/curl/ResourceHandleCurl.cpp:
2496         (WebCore::ResourceHandle::createCurlRequest):
2497         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2498         (WebCore::ResourceHandle::receivedCredential):
2499         (WebCore::ResourceHandle::getCredential):
2500
2501 2019-01-17  John Wilander  <wilander@apple.com>
2502
2503         Add infrastructure to enable/disable ITP Debug Mode through Preferences
2504         https://bugs.webkit.org/show_bug.cgi?id=193510
2505         <rdar://problem/47330969>
2506
2507         Reviewed by Dean Jackson.
2508
2509         No new tests. These changes are purely for settings/preferences.
2510
2511         * page/RuntimeEnabledFeatures.h:
2512         (WebCore::RuntimeEnabledFeatures::setItpDebugModeEnabled):
2513         (WebCore::RuntimeEnabledFeatures::itpDebugModeEnabled const):
2514         (WebCore::RuntimeEnabledFeatures::setResourceLoadStatisticsDebugMode): Deleted.
2515         (WebCore::RuntimeEnabledFeatures::resourceLoadStatisticsDebugMode const): Deleted.
2516             Renamed.
2517         * page/Settings.yaml:
2518             Removed since this particular setting should not be persisted for privacy
2519             reasons.
2520
2521 2019-01-17  Jer Noble  <jer.noble@apple.com>
2522
2523         SDK_VARIANT build destinations should be separate from non-SDK_VARIANT builds
2524         https://bugs.webkit.org/show_bug.cgi?id=189553
2525
2526         Reviewed by Tim Horton.
2527
2528         * Configurations/Base.xcconfig:
2529         * Configurations/SDKVariant.xcconfig: Added.
2530         * Configurations/WebCore.xcconfig:
2531
2532 2019-01-17  Jer Noble  <jer.noble@apple.com>
2533
2534         MediaPlayerPrivateAVFoundationObjC can return incorrect paused information
2535         https://bugs.webkit.org/show_bug.cgi?id=193499
2536
2537         Reviewed by Eric Carlson.
2538
2539         MediaPlayerPrivateAVFoundation uses rate() as an indicator of whether the player
2540         is paused or not. This is incorrect when playback is stalled waiting for more data.
2541         For MPPAVFObjC, use the timeControlStatus as a more accurate indicator of whether
2542         the player is playing.
2543
2544         Now that we have correct play state information, we can remove the handlePlaybackCommand()
2545         path when playing remotely for a more direct approach of notifying the HTMLMediaElement
2546         that the play state has changed.
2547
2548         Drive-by fix: Before throwing away the AVPlayer, clear its output context. This keeps
2549         remote devices from keeping the AVPlayer alive.
2550
2551         Drive-by fix #2: The NullMediaPlayer should always return "true" for paused(), not "false",
2552         since it can't possibly play anything.
2553
2554         * platform/graphics/MediaPlayer.cpp:
2555         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2556         (WebCore::MediaPlayerPrivateAVFoundation::paused const):
2557         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2558         (WebCore::MediaPlayerPrivateAVFoundation::platformPaused const):
2559         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2560         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2561         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2562         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformPaused const):
2563         (WebCore::MediaPlayerPrivateAVFoundationObjC::timeControlStatusDidChange):
2564
2565 2019-01-17  Jiewen Tan  <jiewen_tan@apple.com>
2566
2567         [Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable
2568         https://bugs.webkit.org/show_bug.cgi?id=193478
2569         <rdar://problem/34368591>
2570
2571         Reviewed by Brent Fulgham.
2572
2573         By default in macOS, submit buttons (controls) are not focusable. WebKit follows this system convention
2574         as suggested by the spec: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area. This
2575         is also the convention Firefox respects. However, Chrome doesn't. ceac.state.gov is by far the only
2576         website that assumes submit buttons are focusable, and will prohibit users from completing immigration
2577         forms, such as DS160 if buttons are not. To help immigrations, we decide to add a new quirk to
2578         HTMLFormControlElement::isMouseFocusable such that submit buttons are mouse focusable.
2579
2580         This quirk is for ceac.state.gov specifically, and therefore no tests.
2581
2582         * html/HTMLFormControlElement.cpp:
2583         (WebCore::HTMLFormControlElement::isMouseFocusable const):
2584         (WebCore::HTMLFormControlElement::needsSiteSpecificQuirks const):
2585         * html/HTMLFormControlElement.h:
2586
2587 2019-01-17  Alex Christensen  <achristensen@webkit.org>
2588
2589         Fix WinCairo build after r240117
2590         https://bugs.webkit.org/show_bug.cgi?id=193529
2591
2592         * PlatformWin.cmake:
2593         * platform/network/curl/SocketStreamHandleImplCurl.cpp:
2594
2595 2019-01-17  Youenn Fablet  <youenn@apple.com>
2596
2597         Add release logging for incoming and outgoing webrtc audio tracks
2598         https://bugs.webkit.org/show_bug.cgi?id=185545
2599
2600         Reviewed by Eric Carlson.
2601
2602         Add logging of audio tracks. When doing a WebRTC call,
2603         one log line is added each second for each audio track.
2604         Validated that logging is done through manual testing.
2605
2606         Refactored code to use LogHelper and apply it to video sources as well.
2607
2608         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2609         (WebCore::LibWebRTCMediaEndpoint::addTrack):
2610         (WebCore::LibWebRTCMediaEndpoint::sourceFromNewReceiver):
2611         (WebCore::sourceFromNewReceiver): Deleted.
2612         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h:
2613         * platform/mediastream/RealtimeIncomingAudioSource.cpp:
2614         (WebCore::RealtimeIncomingAudioSource::RealtimeIncomingAudioSource):
2615         (WebCore::RealtimeIncomingAudioSource::logChannel const):
2616         (WebCore::RealtimeIncomingAudioSource::logger const):
2617         * platform/mediastream/RealtimeIncomingAudioSource.h:
2618         (WebCore::RealtimeIncomingAudioSource::setLogger):
2619         * platform/mediastream/RealtimeIncomingVideoSource.cpp:
2620         (WebCore::RealtimeIncomingVideoSource::RealtimeIncomingVideoSource):
2621         (WebCore::RealtimeIncomingVideoSource::logChannel const):
2622         (WebCore::RealtimeIncomingVideoSource::logger const):
2623         * platform/mediastream/RealtimeIncomingVideoSource.h:
2624         (WebCore::RealtimeIncomingVideoSource::setLogger):
2625         * platform/mediastream/RealtimeOutgoingAudioSource.cpp:
2626         (WebCore::RealtimeOutgoingAudioSource::RealtimeOutgoingAudioSource):
2627         (WebCore::RealtimeOutgoingAudioSource::sendAudioFrames):
2628         (WebCore::RealtimeOutgoingAudioSource::logChannel const):
2629         (WebCore::RealtimeOutgoingAudioSource::logger const):
2630         * platform/mediastream/RealtimeOutgoingAudioSource.h:
2631         (WebCore::RealtimeOutgoingAudioSource::setLogger):
2632         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
2633         (WebCore::RealtimeOutgoingVideoSource::RealtimeOutgoingVideoSource):
2634         (WebCore::RealtimeOutgoingVideoSource::sendBlackFramesIfNeeded):
2635         (WebCore::RealtimeOutgoingVideoSource::sendOneBlackFrame):
2636         (WebCore::RealtimeOutgoingVideoSource::logChannel const):
2637         (WebCore::RealtimeOutgoingVideoSource::logger const):
2638         * platform/mediastream/RealtimeOutgoingVideoSource.h:
2639         (WebCore::RealtimeOutgoingVideoSource::setLogger):
2640         * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
2641         (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
2642         * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.h:
2643         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.mm:
2644         (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferPool):
2645         (WebCore::RealtimeIncomingVideoSourceCocoa::pixelBufferFromVideoFrame):
2646         (WebCore::RealtimeIncomingVideoSourceCocoa::OnFrame):
2647         * platform/mediastream/mac/RealtimeOutgoingAudioSourceCocoa.cpp:
2648         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
2649         (WebCore::RealtimeOutgoingVideoSourceCocoa::sampleBufferUpdated):
2650         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
2651         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
2652
2653 2019-01-17  Alex Christensen  <achristensen@webkit.org>
2654
2655         Stop using NetworkStorageSession::storageSession in WebCore
2656         https://bugs.webkit.org/show_bug.cgi?id=193529
2657
2658         Reviewed by Tim Horton.
2659
2660         Ownership of the map that NetworkStorageSession::storageSession searches needs to move to the WebKit/WebKitLegacy layer,
2661         so when WebCore used to look in this map it needs to call a client function to ask the layer above it for the storage object.
2662         I've called this client StorageSessionProvider::storageSession.  Right now it just looks in NetworkStorageSession::storageSession,
2663         but this added abstraction makes it possible to move the currently process-global map to be a member of the NetworkProcess object.
2664
2665         * Modules/websockets/WebSocketChannel.cpp:
2666         (WebCore::WebSocketChannel::connect):
2667         * WebCore.xcodeproj/project.pbxproj:
2668         * loader/CookieJar.cpp:
2669         (WebCore::CookieJar::create):
2670         (WebCore::CookieJar::CookieJar):
2671         (WebCore::CookieJar::cookies const):
2672         (WebCore::CookieJar::setCookies):
2673         (WebCore::CookieJar::cookiesEnabled const):
2674         (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
2675         (WebCore::CookieJar::getRawCookies const):
2676         (WebCore::CookieJar::deleteCookie):
2677         * loader/CookieJar.h:
2678         * loader/EmptyClients.cpp:
2679         (WebCore::pageConfigurationWithEmptyClients):
2680         * page/Page.h:
2681         * page/SocketProvider.cpp:
2682         (WebCore::SocketProvider::createSocketStreamHandle):
2683         * page/SocketProvider.h:
2684         * platform/network/NetworkingContext.h:
2685         * platform/network/SocketStreamHandleImpl.cpp:
2686         (WebCore::cookieDataForHandshake):
2687         (WebCore::SocketStreamHandleImpl::platformSendHandshake):
2688         * platform/network/StorageSessionProvider.h: Added.
2689         (WebCore::StorageSessionProvider::~StorageSessionProvider):
2690         * platform/network/cf/SocketStreamHandleImpl.h:
2691         (WebCore::SocketStreamHandleImpl::create):
2692         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
2693         (WebCore::SocketStreamHandleImpl::SocketStreamHandleImpl):
2694         (WebCore::SocketStreamHandleImpl::getStoredCONNECTProxyCredentials):
2695         * platform/network/curl/SocketStreamHandleImpl.h:
2696         (WebCore::SocketStreamHandleImpl::create):
2697         * platform/network/soup/SocketStreamHandleImpl.h:
2698         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
2699         (WebCore::SocketStreamHandleImpl::create):
2700
2701 2019-01-17  Jon Lee  <jonlee@apple.com>
2702
2703         [EME] Remove Amazon Prime Video from quirks list
2704         https://bugs.webkit.org/show_bug.cgi?id=193514
2705         rdar://problem/47295330
2706
2707         Reviewed by Jer Noble.
2708
2709         * page/Quirks.cpp:
2710         (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
2711
2712 2019-01-17  Zalan Bujtas  <zalan@apple.com>
2713
2714         [LFC][BFC] An element with transform is a containing block for positioned descendants.
2715         https://bugs.webkit.org/show_bug.cgi?id=193534
2716
2717         Reviewed by Antti Koivisto.
2718
2719         "For elements whose layout is governed by the CSS box model, any value other than none for the transform
2720         property also causes the element to establish a containing block for all descendants."
2721         https://www.w3.org/TR/css-transforms-1/
2722
2723         * layout/layouttree/LayoutBox.cpp:
2724         (WebCore::Layout::Box::containingBlock const):
2725
2726 2019-01-17  Simon Fraser  <simon.fraser@apple.com>
2727
2728         ScrollingCoordinator: separate updating node geometry from node layers
2729         https://bugs.webkit.org/show_bug.cgi?id=193527
2730
2731         Reviewed by Antti Koivisto.
2732
2733         Updating scrolling tree node layers happens in a different code path from updating geometry;
2734         the former has to be post-flush, when GraphicsLayer has made tiled or structural layers.
2735         Geometry only needs to be updated after layout, and soon we'll do this via compositing updates.
2736         
2737         We can also clean up the ScrollingCoordinator API and have a single function that updates
2738         node layers (handling different node types), and separate functions for pushing viewport-constrained
2739         and scrolling node geometry.
2740
2741         No observable behavior change.
2742
2743         * page/scrolling/AsyncScrollingCoordinator.cpp:
2744         (WebCore::AsyncScrollingCoordinator::setNodeLayers):
2745         (WebCore::AsyncScrollingCoordinator::setScrollingNodeGeometry):
2746         (WebCore::AsyncScrollingCoordinator::setViewportConstraintedNodeGeometry):
2747         (WebCore::AsyncScrollingCoordinator::updateFrameScrollingNode): Deleted.
2748         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Deleted.
2749         (WebCore::AsyncScrollingCoordinator::updateNodeLayer): Deleted.
2750         (WebCore::AsyncScrollingCoordinator::updateNodeViewportConstraints): Deleted.
2751         * page/scrolling/AsyncScrollingCoordinator.h:
2752         * page/scrolling/ScrollingCoordinator.h:
2753         (WebCore::ScrollingCoordinator::setNodeLayers):
2754         (WebCore::ScrollingCoordinator::setScrollingNodeGeometry):
2755         (WebCore::ScrollingCoordinator::setViewportConstraintedNodeGeometry):
2756         (WebCore::ScrollingCoordinator::updateNodeLayer): Deleted.
2757         (WebCore::ScrollingCoordinator::updateNodeViewportConstraints): Deleted.
2758         (WebCore::ScrollingCoordinator::updateFrameScrollingNode): Deleted.
2759         (WebCore::ScrollingCoordinator::updateOverflowScrollingNode): Deleted.
2760         * rendering/RenderLayerCompositor.cpp:
2761         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
2762         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
2763         * rendering/RenderLayerCompositor.h:
2764
2765 2019-01-17  Zalan Bujtas  <zalan@apple.com>
2766
2767         [LFC][BFC][Quirk] Take body padding and border into account when stretching height.
2768         https://bugs.webkit.org/show_bug.cgi?id=193528
2769
2770         Reviewed by Antti Koivisto.
2771
2772         * layout/blockformatting/BlockFormattingContextQuirks.cpp:
2773         (WebCore::Layout::BlockFormattingContext::Quirks::stretchedInFlowHeight):
2774         * layout/displaytree/DisplayBox.h:
2775         (WebCore::Display::Box::verticalBorder const):
2776         (WebCore::Display::Box::horizontalBorder const):
2777         (WebCore::Display::Box::verticalPadding const):
2778         (WebCore::Display::Box::horizontalPadding const):
2779         * page/FrameViewLayoutContext.cpp:
2780         (WebCore::layoutUsingFormattingContext):
2781
2782 2019-01-17  Zalan Bujtas  <zalan@apple.com>
2783
2784         [LFC][BFC] For height computation, the bottom edge of the last line box value should not include top border/padding
2785         https://bugs.webkit.org/show_bug.cgi?id=193520
2786
2787         Reviewed by Antti Koivisto.
2788
2789         This is similar to the other "10.6.3" cases. The bottom edge of the last inline box is in the coordinate systyem
2790         of the containing block's border box (and for content height computation it needs to be mapped to the containing block's content box instead).
2791
2792         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2793         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2794
2795 2019-01-16  Simon Fraser  <simon.fraser@apple.com>
2796
2797         Stub out scrolling tree classes for overflow scrolling nodes on macOS
2798         https://bugs.webkit.org/show_bug.cgi?id=193524
2799
2800         Reviewed by Antti Koivisto.
2801
2802         Add an empty implementation of ScrollingTreeOverflowScrollingNodeMac for macOS. Change
2803         ScrollingTreeMac::createScrollingTreeNode() to create these nodes.
2804         
2805         Minor refactor of RenderLayerCompositor::useCoordinatedScrollingForLayer() code to ask
2806         the scrolling coordinator if it can coordinate scrolling for this layer; no behavior
2807         change for existing code paths.
2808
2809         * SourcesCocoa.txt:
2810         * WebCore.xcodeproj/project.pbxproj:
2811         * page/scrolling/ScrollingCoordinator.cpp:
2812         (WebCore::ScrollingCoordinator::coordinatesScrollingForOverflowLayer const):
2813         * page/scrolling/ScrollingCoordinator.h:
2814         * page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm:
2815         * page/scrolling/mac/ScrollingTreeMac.cpp:
2816         (ScrollingTreeMac::createScrollingTreeNode):
2817         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingStateFrameScrollingNodeMac.mm.
2818         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm: Added.
2819         (WebCore::ScrollingTreeOverflowScrollingNodeMac::create):
2820         (WebCore::ScrollingTreeOverflowScrollingNodeMac::ScrollingTreeOverflowScrollingNodeMac):
2821         (WebCore::ScrollingTreeOverflowScrollingNodeMac::~ScrollingTreeOverflowScrollingNodeMac):
2822         (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateBeforeChildren):
2823         (WebCore::ScrollingTreeOverflowScrollingNodeMac::commitStateAfterChildren):
2824         (WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterAncestorChange):
2825         (WebCore::ScrollingTreeOverflowScrollingNodeMac::scrollPosition const):
2826         (WebCore::ScrollingTreeOverflowScrollingNodeMac::setScrollLayerPosition):
2827         (WebCore::ScrollingTreeOverflowScrollingNodeMac::updateLayersAfterDelegatedScroll):
2828         * rendering/RenderLayer.cpp:
2829         (WebCore::RenderLayer::usesAsyncScrolling const):
2830         * rendering/RenderLayerCompositor.cpp:
2831         (WebCore::RenderLayerCompositor::useCoordinatedScrollingForLayer const):
2832         * rendering/RenderLayerCompositor.h:
2833
2834 2019-01-16  Justin Fan  <justin_fan@apple.com>
2835
2836         [WebGPU] Update vertex-buffer-triangle-strip.html to actually use vertex buffer
2837         https://bugs.webkit.org/show_bug.cgi?id=193473
2838
2839         Reviewed by Dean Jackson and Myles Maxfield.
2840
2841         Also, switch to using the inputSlot instead of the shaderLocation field, as this seems more correct. 
2842         As of now I cannot determine an analog for WebGPU's shaderLocation in Metal. 
2843
2844         Test: Covered by vertex-buffer-triangle-strip.html. No change in behavior.
2845
2846         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm:
2847         (WebCore::setInputStateForPipelineDescriptor): Use the inputSlot instead of shaderLocation as bufferIndex. 
2848
2849 2019-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
2850
2851         [WHLSL] Add the function stage checker
2852         https://bugs.webkit.org/show_bug.cgi?id=193479
2853
2854         Reviewed by Dean Jackson and Robin Morisset.
2855
2856         This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/CheckNativeFuncStages.mjs into C++.
2857
2858         No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
2859         of test. When enough of the compiler is present, I'll port the reference implementation's test suite.
2860
2861         * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
2862         (WebCore::WHLSL::AST::CallExpression::function):
2863         * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.cpp: Added.
2864         (WebCore::WHLSL::FunctionStageChecker::FunctionStageChecker):
2865         (WebCore::WHLSL::checkFunctionStages):
2866         * Modules/webgpu/WHLSL/WHLSLFunctionStageChecker.h: Added.
2867         * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
2868         (WebCore::WHLSL::Intrinsics::add):
2869         * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
2870         (WebCore::WHLSL::Intrinsics::ddx const):
2871         (WebCore::WHLSL::Intrinsics::ddy const):
2872         (WebCore::WHLSL::Intrinsics::allMemoryBarrier const):
2873         (WebCore::WHLSL::Intrinsics::deviceMemoryBarrier const):
2874         (WebCore::WHLSL::Intrinsics::groupMemoryBarrier const):
2875         (WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):
2876         * Sources.txt:
2877         * WebCore.xcodeproj/project.pbxproj:
2878
2879 2019-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
2880
2881         [WHLSL] Delete the 'restricted' keyword
2882         https://bugs.webkit.org/show_bug.cgi?id=193469
2883
2884         Reviewed by Dean Jackson and Robin Morisset.
2885
2886         This change mirrors https://github.com/gpuweb/WHLSL/pull/304 in the reference implementation.
2887
2888         No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
2889         of test. When enough of the compiler is present, I'll port the reference implementation's test suite.
2890
2891         * Modules/webgpu/WHLSL/AST/WHLSLFunctionDefinition.h:
2892         (WebCore::WHLSL::AST::FunctionDefinition::FunctionDefinition):
2893         (WebCore::WHLSL::AST::FunctionDefinition::block):
2894         (WebCore::WHLSL::AST::FunctionDefinition::restricted const): Deleted.
2895         * Modules/webgpu/WHLSL/AST/WHLSLNativeFunctionDeclaration.h:
2896         (WebCore::WHLSL::AST::NativeFunctionDeclaration::NativeFunctionDeclaration):
2897         (WebCore::WHLSL::AST::NativeFunctionDeclaration::restricted const): Deleted.
2898         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
2899         (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
2900         (WebCore::WHLSL::resolveWithOperatorLength):
2901         (WebCore::WHLSL::resolveWithReferenceComparator):
2902         * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
2903         (WebCore::WHLSL::resolveFunctionOverloadImpl):
2904         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
2905         (WebCore::WHLSL::synthesizeArrayOperatorLength):
2906         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
2907         (WebCore::WHLSL::synthesizeConstructors):
2908         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
2909         (WebCore::WHLSL::synthesizeEnumerationFunctions):
2910         * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
2911         (WebCore::WHLSL::synthesizeStructureAccessors):
2912
2913 2019-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
2914
2915         [WHLSL] Implement the recursion checker
2916         https://bugs.webkit.org/show_bug.cgi?id=193436
2917
2918         Reviewed by Saam Barati.
2919
2920         This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/RecursionChecker.mjs into C++.
2921
2922         No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
2923         of test. When enough of the compiler is present, I'll port the reference implementation's test suite.
2924
2925         * Modules/webgpu/WHLSL/AST/WHLSLCallExpression.h:
2926         (WebCore::WHLSL::AST::CallExpression::function):
2927         * Modules/webgpu/WHLSL/WHLSLRecursionChecker.cpp: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp.
2928         (WebCore::WHLSL::checkRecursion):
2929         * Modules/webgpu/WHLSL/WHLSLRecursionChecker.h: Added.
2930         * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
2931         * Sources.txt:
2932         * WebCore.xcodeproj/project.pbxproj:
2933
2934 2019-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
2935
2936         [WHLSL] Add the literal type checker
2937         https://bugs.webkit.org/show_bug.cgi?id=193430
2938
2939         Reviewed by Dean Jackson.
2940
2941         This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/LiteralTypeChecker.mjs into C++.
2942
2943         No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
2944         of test. When enough of the compiler is present, I'll port the reference implementation's test suite.
2945
2946         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
2947         (WebCore::WHLSL::AST::FloatLiteralType::value const):
2948         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
2949         (WebCore::WHLSL::AST::IntegerLiteralType::value const):
2950         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
2951         (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::value const):
2952         * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.cpp: Added.
2953         (WebCore::WHLSL::getNativeTypeDeclaration):
2954         (WebCore::WHLSL::LiteralTypeChecker::visit):
2955         (WebCore::WHLSL::checkLiteralTypes):
2956         * Modules/webgpu/WHLSL/WHLSLLiteralTypeChecker.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h.
2957         * Sources.txt:
2958         * WebCore.xcodeproj/project.pbxproj:
2959
2960 2019-01-16  Zalan Bujtas  <zalan@apple.com>
2961
2962         [LFC][BFC] Inflow non-replaced used width should not be negative.
2963         https://bugs.webkit.org/show_bug.cgi?id=193495
2964
2965         Reviewed by Antti Koivisto.
2966
2967         min-width (initial value 0) enforces non-negative used width. 
2968
2969         * layout/blockformatting/BlockFormattingContext.cpp:
2970         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
2971
2972 2019-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
2973
2974         [WHLSL] Add a handwritten parser
2975         https://bugs.webkit.org/show_bug.cgi?id=192355
2976
2977         Reviewed by Dean Jackson.
2978
2979         The parser is a mechanical representation of WHLSL's ANTLR grammar at
2980         https://github.com/gpuweb/WHLSL/blob/master/Spec/WHLSL.g4. The parser
2981         uses Expected<> to return an appropriate Error string when parsing fails.
2982
2983         This patch doesn't include the AST nodes themselves - those are in
2984         https://bugs.webkit.org/show_bug.cgi?id=192991. I split up the patch to
2985         aid easier reviewing.
2986
2987         No new tests because the parser isn't hooked up yet.
2988
2989         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
2990         (WebCore::WHLSL::Parser::Parser):
2991         (WebCore::WHLSL::Parser::parse):
2992         (WebCore::WHLSL::Parser::fail):
2993         (WebCore::WHLSL::Parser::peek):
2994         (WebCore::WHLSL::Parser::tryType):
2995         (WebCore::WHLSL::Parser::tryTypes):
2996         (WebCore::WHLSL::Parser::consumeType):
2997         (WebCore::WHLSL::Parser::consumeTypes):
2998         (WebCore::WHLSL::digitValue):
2999         (WebCore::WHLSL::intLiteralToInt):
3000         (WebCore::WHLSL::uintLiteralToUint):
3001         (WebCore::WHLSL::floatLiteralToFloat):
3002         (WebCore::WHLSL::Parser::consumeIntegralLiteral):
3003         (WebCore::WHLSL::Parser::consumeNonNegativeIntegralLiteral):
3004         (WebCore::WHLSL::recognizeSimpleUnsignedInteger):
3005         (WebCore::WHLSL::Parser::parseConstantExpression):
3006         (WebCore::WHLSL::Parser::parseTypeArgument):
3007         (WebCore::WHLSL::Parser::parseTypeArguments):
3008         (WebCore::WHLSL::Parser::parseTypeSuffixAbbreviated):
3009         (WebCore::WHLSL::Parser::parseTypeSuffixNonAbbreviated):
3010         (WebCore::WHLSL::Parser::parseAddressSpaceType):
3011         (WebCore::WHLSL::Parser::parseNonAddressSpaceType):
3012         (WebCore::WHLSL::Parser::parseType):
3013         (WebCore::WHLSL::Parser::parseTypeDefinition):
3014         (WebCore::WHLSL::Parser::parseBuiltInSemantic):
3015         (WebCore::WHLSL::Parser::parseResourceSemantic):
3016         (WebCore::WHLSL::Parser::parseSpecializationConstantSemantic):
3017         (WebCore::WHLSL::Parser::parseStageInOutSemantic):
3018         (WebCore::WHLSL::Parser::parseSemantic):
3019         (WebCore::WHLSL::Parser::parseQualifiers):
3020         (WebCore::WHLSL::Parser::parseStructureElement):
3021         (WebCore::WHLSL::Parser::parseStructureDefinition):
3022         (WebCore::WHLSL::Parser::parseEnumerationDefinition):
3023         (WebCore::WHLSL::Parser::parseEnumerationMember):
3024         (WebCore::WHLSL::Parser::parseNativeTypeDeclaration):
3025         (WebCore::WHLSL::Parser::parseNumThreadsFunctionAttribute):
3026         (WebCore::WHLSL::Parser::parseAttributeBlock):
3027         (WebCore::WHLSL::Parser::parseParameter):
3028         (WebCore::WHLSL::Parser::parseParameters):
3029         (WebCore::WHLSL::Parser::parseFunctionDefinition):
3030         (WebCore::WHLSL::Parser::parseEntryPointFunctionDeclaration):
3031         (WebCore::WHLSL::Parser::parseRegularFunctionDeclaration):
3032         (WebCore::WHLSL::Parser::parseOperatorFunctionDeclaration):
3033         (WebCore::WHLSL::Parser::parseFunctionDeclaration):
3034         (WebCore::WHLSL::Parser::parseNativeFunctionDeclaration):
3035         (WebCore::WHLSL::Parser::parseBlock):
3036         (WebCore::WHLSL::Parser::parseBlockBody):
3037         (WebCore::WHLSL::Parser::parseIfStatement):
3038         (WebCore::WHLSL::Parser::parseSwitchStatement):
3039         (WebCore::WHLSL::Parser::parseSwitchCase):
3040         (WebCore::WHLSL::Parser::parseForLoop):
3041         (WebCore::WHLSL::Parser::parseWhileLoop):
3042         (WebCore::WHLSL::Parser::parseDoWhileLoop):
3043         (WebCore::WHLSL::Parser::parseVariableDeclaration):
3044         (WebCore::WHLSL::Parser::parseVariableDeclarations):
3045         (WebCore::WHLSL::Parser::parseStatement):
3046         (WebCore::WHLSL::Parser::parseEffectfulExpression):
3047         (WebCore::WHLSL::Parser::parseEffectfulAssignment):
3048         (WebCore::WHLSL::Parser::parseEffectfulPrefix):
3049         (WebCore::WHLSL::Parser::parseEffectfulSuffix):
3050         (WebCore::WHLSL::Parser::parseLimitedSuffixOperator):
3051         (WebCore::WHLSL::Parser::parseSuffixOperator):
3052         (WebCore::WHLSL::Parser::parseExpression):
3053         (WebCore::WHLSL::Parser::parseTernaryConditional):
3054         (WebCore::WHLSL::Parser::parseAssignment):
3055         (WebCore::WHLSL::Parser::parsePossibleTernaryConditional):
3056         (WebCore::WHLSL::Parser::parsePossibleLogicalBinaryOperation):
3057         (WebCore::WHLSL::Parser::parsePossibleRelationalBinaryOperation):
3058         (WebCore::WHLSL::Parser::parsePossibleShift):
3059         (WebCore::WHLSL::Parser::parsePossibleAdd):
3060         (WebCore::WHLSL::Parser::parsePossibleMultiply):
3061         (WebCore::WHLSL::Parser::parsePossiblePrefix):
3062         (WebCore::WHLSL::Parser::parsePossibleSuffix):
3063         (WebCore::WHLSL::Parser::parseCallExpression):
3064         (WebCore::WHLSL::Parser::parseTerm):
3065         * Modules/webgpu/WHLSL/WHLSLParser.h:
3066         (WebCore::WHLSL::Parser::Error::Error):
3067         (WebCore::WHLSL::Parser::backtrackingScope):
3068         (WebCore::WHLSL::Parser::SuffixExpression::SuffixExpression):
3069         (WebCore::WHLSL::Parser::SuffixExpression::operator bool const):
3070
3071 2019-01-16  Sihui Liu  <sihui_liu@apple.com>
3072
3073         IndexedDB: UniqueIDBDatabase should not be freed if the database task queue is not empty.
3074         https://bugs.webkit.org/show_bug.cgi?id=193093
3075
3076         Reviewed by Brady Eidson.
3077
3078         performUnconditionalDeleteBackingStore killed the database task queue immediately, but performPrefetchCursor
3079         task may be scheduled behind performUnconditionalDeleteBackingStore on database thread.
3080
3081         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3082         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
3083         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
3084         (WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose):
3085
3086 2019-01-16  Alex Christensen  <achristensen@webkit.org>
3087
3088         Internal build fix.
3089
3090         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
3091         (WebCore::layerContentsFormat):
3092
3093 2019-01-16  Youenn Fablet  <youenn@apple.com>
3094
3095         ServiceWorkerContainer is leaking due to a ref cycle
3096         https://bugs.webkit.org/show_bug.cgi?id=193462
3097         <rdar://problem/47026303>
3098
3099         Reviewed by Brady Eidson.
3100
3101         ServiceWorkerContainer keeps a reference to its ready promise.
3102         The ready promise keeps a ref to its value which is a ServiceWorkerRegistration.
3103         ServiceWorkerRegistration keeps a ref to ServiceWorkerContainer.
3104
3105         To break the reference cycle, set the ready promise to zero when ServiceWorkerContainer is stopped.
3106
3107         Covered by imported/w3c/web-platform-tests/service-workers/service-worker/ready.https.html no longer leaking.
3108
3109         * workers/service/ServiceWorkerContainer.cpp:
3110         (WebCore::ServiceWorkerContainer::stop):
3111
3112 2019-01-15  Simon Fraser  <simon.fraser@apple.com>
3113
3114         Make didCommitChangesForLayer() explicitly about the platform layer changing because of tile/non-tile swapping
3115         https://bugs.webkit.org/show_bug.cgi?id=193290
3116
3117         Reviewed by Tim Horton.
3118
3119         RenderLayerCompositor::didFlushChangesForLayer() triggers updates scrolling tree nodes for
3120         the flushed layer, but it's not clear what has changed at this point.
3121
3122         didCommitChangesForLayer()/didFlushChangesForLayer() were added to explicitly handle the
3123         case where the underlying platform layer for a GraphicsLayer changes because the layer swaps
3124         between tiled and non-tiled, and structural layer changes; we need to push the new layer to
3125         the scrolling tree because it operates on platform layers. So the only work that
3126         didFlushChangesForLayer() should do is to update layers on scrolling tree nodes; it doesn't
3127         need to do any geometry updating. Move towards that goal by renaming this callback to
3128         didChangePlatformLayerForLayer() to make its function more explicit.
3129
3130         * platform/graphics/GraphicsLayerClient.h:
3131         (WebCore::GraphicsLayerClient::didChangePlatformLayerForLayer):
3132         (WebCore::GraphicsLayerClient::didCommitChangesForLayer const): Deleted.
3133         * platform/graphics/ca/GraphicsLayerCA.cpp:
3134         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
3135         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3136         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3137         * platform/graphics/ca/GraphicsLayerCA.h:
3138         * rendering/RenderLayerBacking.cpp:
3139         (WebCore::RenderLayerBacking::didChangePlatformLayerForLayer):
3140         (WebCore::RenderLayerBacking::didCommitChangesForLayer const): Deleted.
3141         * rendering/RenderLayerBacking.h:
3142         * rendering/RenderLayerCompositor.cpp:
3143         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
3144         (WebCore::LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer):
3145         (WebCore::RenderLayerCompositor::didFlushChangesForLayer): Deleted.
3146         (WebCore::RenderLayerCompositor::didCommitChangesForLayer const): Deleted.
3147         (WebCore::LegacyWebKitScrollingLayerCoordinator::didFlushChangesForLayer): Deleted.
3148         * rendering/RenderLayerCompositor.h:
3149
3150 2019-01-16  Chris Dumez  <cdumez@apple.com>
3151
3152         Regression(PSON) View becomes blank after click a cross-site download link
3153         https://bugs.webkit.org/show_bug.cgi?id=193361
3154         <rdar://problem/47099573>
3155
3156         Reviewed by Geoffrey Garen.
3157
3158         * loader/FrameLoader.cpp:
3159         (WebCore::FrameLoader::commitProvisionalLoad):
3160         When restoring from PageCache, make sure we notify the client that the load was committed
3161         *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy
3162         logic in the UIProcess.
3163
3164 2019-01-16  Devin Rousso  <drousso@apple.com>
3165
3166         Web Inspector: extend overlay element bounds lines to the right/below as well
3167         https://bugs.webkit.org/show_bug.cgi?id=193336
3168
3169         Reviewed by Matt Baker.
3170
3171         This patch is purely a visual change for WebInspector, and doesn't affect anything else.
3172
3173         * inspector/InspectorOverlayPage.js:
3174         (_drawBounds):
3175
3176 2019-01-16  Youenn Fablet  <youenn@apple.com>
3177
3178         Prevent WorkerRunLoop::runInMode from spinning in nested cases
3179         https://bugs.webkit.org/show_bug.cgi?id=193359
3180         <rdar://problem/46345353>
3181
3182         Reviewed by Joseph Pecoraro.
3183
3184         Speculative fix for some cases where service worker is spinning and consuming a lot of CPU.
3185         The hypothesis is that:
3186         - Service Worker is checking for its script freshness through WorkerScriptLoader.
3187         This triggers the worker run loop to be nested.
3188         - The run loop timer is active and needs to fire immediately.
3189         The hypothesis is that this happens in some cases like restarting a device after sleep mode.
3190
3191         WorkerRunLoop::runInMode will then compute a 0 timeout value for getting a message.
3192         This will trigger a timeout while waiting for the message queue.
3193         Since the run loop is nested,  the run loop timer will not be able to fire,
3194         and it will keep ask to fire immediately.
3195         runInMode will return timeout as a result and WorkerRunLoop::run will call it immediately.
3196
3197         The fix is to prevent the shared timer to fire only when the run loop is being debugged through the web inspector.
3198         We compute this by checking the run loop mode as debuggerMode().
3199         Did some refactoring by introducing helper routines for running the loop and posting task in debugger mode.
3200
3201         * inspector/WorkerScriptDebugServer.cpp:
3202         (WebCore::WorkerScriptDebugServer::runEventLoopWhilePaused):
3203         * workers/WorkerInspectorProxy.cpp:
3204         (WebCore::WorkerInspectorProxy::resumeWorkerIfPaused):
3205         (WebCore::WorkerInspectorProxy::connectToWorkerInspectorController):
3206         (WebCore::WorkerInspectorProxy::disconnectFromWorkerInspectorController):
3207         (WebCore::WorkerInspectorProxy::sendMessageToWorkerInspectorController):
3208         * workers/WorkerRunLoop.cpp:
3209         (WebCore::ModePredicate::ModePredicate):
3210         (WebCore::WorkerRunLoop::WorkerRunLoop):
3211         (WebCore::debuggerMode):
3212         (WebCore::RunLoopSetup::RunLoopSetup):
3213         (WebCore::RunLoopSetup::~RunLoopSetup):
3214         (WebCore::WorkerRunLoop::run):
3215         (WebCore::WorkerRunLoop::runInDebuggerMode):
3216         (WebCore::WorkerRunLoop::runInMode):
3217         (WebCore::WorkerRunLoop::Task::performTask):
3218         * workers/WorkerRunLoop.h:
3219         (WebCore::WorkerRunLoop::isBeingDebugged const):
3220         * workers/WorkerThread.cpp:
3221         (WebCore::WorkerThread::startRunningDebuggerTasks):
3222         * workers/service/context/ServiceWorkerInspectorProxy.cpp:
3223         (WebCore::ServiceWorkerInspectorProxy::connectToWorker):
3224         (WebCore::ServiceWorkerInspectorProxy::disconnectFromWorker):
3225         (WebCore::ServiceWorkerInspectorProxy::sendMessageToWorker):
3226
3227 2019-01-16  Sihui Liu  <sihui_liu@apple.com>
3228
3229         IndexedDB: leak WebIDBConnectionToClient for retain cycle
3230         https://bugs.webkit.org/show_bug.cgi?id=193097
3231         <rdar://problem/46899601>
3232
3233         Reviewed by David Kilzer.
3234
3235         Fix API test failure after r239887. After removing the retain cycle, IDBConnectionToClient will no longer live 
3236         forever so make sure it is not destructed before UniqueIDBDatabaseConnection unregisters itself.
3237
3238         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3239         (WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection):
3240         (WebCore::IDBServer::UniqueIDBDatabaseConnection::~UniqueIDBDatabaseConnection):
3241         (WebCore::IDBServer::UniqueIDBDatabaseConnection::fireVersionChangeEvent):
3242         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didAbortTransaction):
3243         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCommitTransaction):
3244         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateObjectStore):
3245         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteObjectStore):
3246         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameObjectStore):
3247         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didClearObjectStore):
3248         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didCreateIndex):
3249         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didDeleteIndex):
3250         (WebCore::IDBServer::UniqueIDBDatabaseConnection::didRenameIndex):
3251         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h:
3252
3253 2019-01-16  Antti Koivisto  <antti@apple.com>
3254
3255         Add more assertions to find root cause for release assert hit in StyleResolver
3256         https://bugs.webkit.org/show_bug.cgi?id=193488
3257         <rdar://problem/30983040>
3258
3259         Reviewed by Zalan Bujtas.
3260
3261         * css/StyleResolver.cpp:
3262         (WebCore::StyleResolver::~StyleResolver):
3263
3264         Release assert we are not resolving tree style.
3265
3266         * dom/Document.cpp:
3267         (WebCore::Document::setIsResolvingTreeStyle):
3268         * dom/Document.h:
3269         (WebCore::Document::isResolvingTreeStyle const):
3270         * style/StyleTreeResolver.cpp:
3271         (WebCore::Style::TreeResolver::Scope::Scope):
3272         (WebCore::Style::TreeResolver::Scope::~Scope):
3273
3274         Set isResolvingTreeStyle bit when we have a tree resolver scope.
3275
3276 2019-01-16  Zalan Bujtas  <zalan@apple.com>
3277
3278         [LFC][Out-of-flow] Set used vertical margin values when top/height/bottom are non-auto.
3279         https://bugs.webkit.org/show_bug.cgi?id=193470
3280
3281         Reviewed by Antti Koivisto.
3282
3283         Non-auto vertical margin values (which is mostly the case) should be set as used values.
3284
3285         Test: fast/block/block-only/non-auto-top-bottom-height-with-margins.html
3286
3287         * layout/FormattingContextGeometry.cpp:
3288         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
3289
3290 2019-01-16  Alan Kinsley  <zalan@apple.com>
3291
3292         [LFC] Adjust margin box verification.
3293         https://bugs.webkit.org/show_bug.cgi?id=193482
3294
3295         Reviewed by Antti Koivisto.
3296
3297         In certain cases, like out-of-flow boxes with margin auto, marginBoxRect() returns 0. It's clearly incorrect,
3298         so let's check the individual margin values instead (and at this point we know that all other boxes match).
3299
3300         Test: fast/block/block-only/non-auto-top-bottom-height-with-auto-margins.html
3301
3302         * layout/Verification.cpp:
3303         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
3304
3305 2019-01-16  Zan Dobersek  <zdobersek@igalia.com>
3306
3307         [FreeType] Cache the zero-width space glyph in GlyphPage::fill()
3308         https://bugs.webkit.org/show_bug.cgi?id=193485
3309
3310         Reviewed by Carlos Garcia Campos.
3311
3312         In FreeType's implementation of GlyphPage::fill(), we can cache the
3313         zero-width space glyph upon first retrieval through the
3314         FcFreeTypeCharIndex() entrypoint, avoiding any subsequent calls
3315         for other ignorable characters.
3316
3317         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
3318         (WebCore::GlyphPage::fill):
3319
3320 2019-01-16  Myles C. Maxfield  <mmaxfield@apple.com>
3321
3322         [WHLSL] Add the high zombie finder
3323         https://bugs.webkit.org/show_bug.cgi?id=193432
3324
3325         Reviewed by Robin Morisset and Saam Barati.
3326
3327         This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/HighZombieFinder.mjs into C++.
3328
3329         No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
3330         of test. When enough of the compiler is present, I'll port the reference implementation's test suite.
3331
3332         * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.cpp: Added.
3333         (WebCore::WHLSL::findHighZombies):
3334         * Modules/webgpu/WHLSL/WHLSLHighZombieFinder.h: Added.
3335         * Sources.txt:
3336         * WebCore.xcodeproj/project.pbxproj:
3337
3338 2019-01-15  Fujii Hironori  <Hironori.Fujii@sony.com>
3339
3340         Unreviewed WinCairo build fix.
3341
3342         * platform/network/curl/ResourceHandleCurl.cpp:
3343         (WebCore::ResourceHandle::createCurlRequest):
3344         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
3345         (WebCore::ResourceHandle::receivedCredential):
3346         (WebCore::ResourceHandle::getCredential):
3347
3348 2019-01-15  Alex Christensen  <achristensen@webkit.org>
3349
3350         Reduce use of NetworkStorageSession::defaultStorageSession in WebCore
3351         https://bugs.webkit.org/show_bug.cgi?id=193368
3352
3353         Reviewed by Geoff Garen.
3354
3355         The NetworkStorageSession ownership needs to move to the WebKit/WebKitLegacy layer instead of being a process-global static map.
3356
3357         * loader/EmptyClients.cpp:
3358         * platform/network/CredentialStorage.cpp:
3359         (WebCore::CredentialStorage::defaultCredentialStorage): Deleted.
3360         * platform/network/CredentialStorage.h:
3361         * platform/network/NetworkStorageSession.h:
3362         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3363         (WebCore::NetworkStorageSession::switchToNewTestingSession):
3364         (WebCore::NetworkStorageSession::ensureSession):
3365         * platform/network/cf/NetworkStorageSessionCFNetWin.cpp:
3366         (WebCore::createPrivateStorageSession):
3367         * platform/network/curl/ResourceHandleCurl.cpp:
3368         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
3369         (WebCore::ResourceHandle::receivedCredential):
3370         (WebCore::ResourceHandle::getCredential):
3371
3372 2019-01-15  Ryosuke Niwa  <rniwa@webkit.org>
3373
3374         VisualViewport API should be updated upon opening of keyboard
3375         https://bugs.webkit.org/show_bug.cgi?id=193475
3376
3377         Reviewed by Simon Fraser.
3378
3379         Added a function to update the visual viewport API and schedule a resize event to FrameView.
3380
3381         Test: fast/visual-viewport/ios/resize-event-for-keyboard.html
3382
3383         * page/FrameView.cpp:
3384         (WebCore::FrameView::didUpdateViewportOverrideRects):
3385         * page/FrameView.h:
3386
3387 2019-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
3388
3389         Fix build after r240018
3390         https://bugs.webkit.org/show_bug.cgi?id=193434
3391
3392         Unreviewed.
3393
3394         * Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp:
3395         (WebCore::WHLSL::checkLoops):
3396         (WebCore::WHLSL::findHighZombies): Deleted.
3397         * Modules/webgpu/WHLSL/WHLSLLoopChecker.h:
3398
3399 2019-01-15  Megan Gardner  <megan_gardner@apple.com>
3400
3401         Add Reveal support in iOSMac
3402         https://bugs.webkit.org/show_bug.cgi?id=193408
3403         <rdar://problem/47300699>
3404
3405         Reviewed by Tim Horton.
3406
3407         iOSMac and Reveal are currently not testable.
3408
3409         Add support for the reveal SPI specifically for iOSMac.
3410         Show the controller when called, and implement the delegate to 
3411         correctly re-paint the content with the auto-generated highlight from
3412         the reveal framework.
3413
3414         * Configurations/WebCore.xcconfig:
3415         * editing/cocoa/DictionaryLookup.mm:
3416         (-[WebRevealHighlight initWithHighlightRect:view:]):
3417         (-[WebRevealHighlight setImage:]):
3418         (-[WebRevealHighlight highlightRectsForItem:]):
3419         (-[WebRevealHighlight startHighlightingItem:]):
3420         (-[WebRevealHighlight highlightItem:withProgress:]):
3421         (-[WebRevealHighlight completeHighlightingItem:]):
3422         (-[WebRevealHighlight stopHighlightingItem:]):
3423         (-[WebRevealHighlight highlightRangeChangedForItem:]):
3424         (-[WebRevealHighlight highlighting]):
3425         (-[WebRevealHighlight drawHighlightContentForItem:context:]):
3426         (WebCore::showPopupOrCreateAnimationController):
3427         (WebCore::DictionaryLookup::showPopup):
3428         * editing/mac/DictionaryLookup.h:
3429
3430 2019-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
3431
3432         [WHLSL] Add ending namespace comments to make namespace boundaries more clear
3433         https://bugs.webkit.org/show_bug.cgi?id=193471
3434
3435         Reviewed by Saam Barati.
3436
3437         This patch only adds the comments to the files that are too long to fit on a single screen in my editor.
3438
3439         No new tests because there is no behavior change.
3440
3441         * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp:
3442         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3443         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.cpp:
3444         * Modules/webgpu/WHLSL/WHLSLGatherEntryPointItems.h:
3445         * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
3446         * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp:
3447         * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
3448         * Modules/webgpu/WHLSL/WHLSLLexer.cpp:
3449         * Modules/webgpu/WHLSL/WHLSLLexer.h:
3450         * Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp:
3451         * Modules/webgpu/WHLSL/WHLSLNameContext.cpp:
3452         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
3453         * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
3454         * Modules/webgpu/WHLSL/WHLSLParser.h:
3455         * Modules/webgpu/WHLSL/WHLSLProgram.h:
3456         * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
3457         * Modules/webgpu/WHLSL/WHLSLResolveOverloadImpl.cpp:
3458         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
3459         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
3460         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
3461         * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
3462         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
3463         * Modules/webgpu/WHLSL/WHLSLVisitor.h:
3464
3465 2019-01-15  Myles C. Maxfield  <mmaxfield@apple.com>
3466
3467         [WHLSL] Implement the loop checker
3468         https://bugs.webkit.org/show_bug.cgi?id=193434
3469
3470         Reviewed by Saam Barati.
3471
3472         This is a translation of https://github.com/gpuweb/WHLSL/blob/master/Source/LoopChecker.mjs into C++.
3473
3474         No new tests because it isn't hooked up yet. Not enough of the compiler exists to have any meaningful sort
3475         of test. When enough of the compiler is present, I'll port the reference implementation's test suite.
3476
3477         * Modules/webgpu/WHLSL/WHLSLLoopChecker.cpp: Added.
3478         (WebCore::WHLSL::findHighZombies):
3479         * Modules/webgpu/WHLSL/WHLSLLoopChecker.h: Added.
3480         * Sources.txt:
3481         * WebCore.xcodeproj/project.pbxproj:
3482
3483 2019-01-15  Chris Dumez  <cdumez@apple.com>
3484
3485         Unreviewed, rolling out r239993, r239995, r239997, and
3486         r239999.
3487
3488         Caused assertions under
3489         ViewGestureController::disconnectFromProcess()
3490
3491         Reverted changesets:
3492
3493         "Regression(PSON) View becomes blank after click a cross-site
3494         download link"
3495         https://bugs.webkit.org/show_bug.cgi?id=193361
3496         https://trac.webkit.org/changeset/239993
3497
3498         "Unreviewed iOS build fix after r239993."
3499         https://trac.webkit.org/changeset/239995
3500
3501         "Fix iOS build after r239993"
3502         https://bugs.webkit.org/show_bug.cgi?id=193361
3503         https://trac.webkit.org/changeset/239997
3504
3505         "Unreviewed, revert part of r239997 as it is not needed to fix
3506         the build."
3507         https://trac.webkit.org/changeset/239999
3508
3509 2019-01-15  Alex Christensen  <achristensen@webkit.org>
3510
3511         Stop using CookiesStrategy
3512         https://bugs.webkit.org/show_bug.cgi?id=161106
3513
3514         Reviewed by Don Olmstead and Antti Koivisto.
3515
3516         CookiesStrategy is process-global and makes it difficult to switch NetworkStorageSession from having a process-global map.
3517         Instead, use a CookieJar object in the WebProcess.  This has the additional benefit of making it more clear which code
3518         is used in the WebProcess and which code is used in the NetworkProcess.
3519
3520         * Modules/beacon/NavigatorBeacon.cpp:
3521         * Modules/websockets/WebSocketChannel.cpp:
3522         (WebCore::WebSocketChannel::processBuffer):
3523         * Modules/websockets/WebSocketHandshake.cpp:
3524         (WebCore::WebSocketHandshake::clientHandshakeRequest const):
3525         (WebCore::WebSocketHandshake::clientHandshakeCookieRequestHeaderFieldProxy const):
3526         * WebCore.xcodeproj/project.pbxproj:
3527         * css/StyleRuleImport.cpp:
3528         (WebCore::StyleRuleImport::requestStyleSheet):
3529         * dom/Document.cpp:
3530         (WebCore::Document::cookie):
3531         (WebCore::Document::setCookie):
3532         * html/HTMLMediaElement.cpp:
3533         (WebCore::HTMLMediaElement::mediaPlayerGetRawCookies const):
3534         * inspector/agents/InspectorPageAgent.cpp:
3535         (WebCore::InspectorPageAgent::getCookies):
3536         (WebCore::InspectorPageAgent::deleteCookie):
3537         * loader/CookieJar.cpp:
3538         (WebCore::CookieJar::shouldIncludeSecureCookies):
3539         (WebCore::CookieJar::sameSiteInfo):
3540         (WebCore::CookieJar::create):
3541         (WebCore::CookieJar::cookies const):
3542         (WebCore::CookieJar::cookieRequestHeaderFieldProxy):
3543         (WebCore::CookieJar::setCookies):
3544         (WebCore::CookieJar::cookiesEnabled const):
3545         (WebCore::CookieJar::cookieRequestHeaderFieldValue const):
3546         (WebCore::CookieJar::getRawCookies const):
3547         (WebCore::CookieJar::deleteCookie):
3548         (WebCore::shouldIncludeSecureCookies): Deleted.
3549         (WebCore::sameSiteInfo): Deleted.
3550         (WebCore::cookies): Deleted.
3551         (WebCore::cookieRequestHeaderFieldProxy): Deleted.
3552         (WebCore::setCookies): Deleted.
3553         (WebCore::cookiesEnabled): Deleted.
3554         (WebCore::cookieRequestHeaderFieldValue): Deleted.
3555         (WebCore::getRawCookies): Deleted.
3556         (WebCore::deleteCookie): Deleted.
3557         * loader/CookieJar.h:
3558         * loader/EmptyClients.cpp:
3559         (WebCore::pageConfigurationWithEmptyClients):
3560         * loader/ImageLoader.cpp:
3561         (WebCore::ImageLoader::updateFromElement):
3562         * loader/cache/CachedApplicationManifest.cpp:
3563         (WebCore::CachedApplicationManifest::CachedApplicationManifest):
3564         * loader/cache/CachedApplicationManifest.h:
3565         * loader/cache/CachedCSSStyleSheet.cpp:
3566         (WebCore::CachedCSSStyleSheet::CachedCSSStyleSheet):
3567         * loader/cache/CachedCSSStyleSheet.h:
3568         * loader/cache/CachedFont.cpp:
3569         (WebCore::CachedFont::CachedFont):
3570         * loader/cache/CachedFont.h:
3571         * loader/cache/CachedImage.cpp:
3572         (WebCore::CachedImage::CachedImage):
3573         * loader/cache/CachedImage.h:
3574         * loader/cache/CachedRawResource.cpp:
3575         (WebCore::CachedRawResource::CachedRawResource):
3576         * loader/cache/CachedRawResource.h:
3577         * loader/cache/CachedResource.cpp:
3578         (WebCore::CachedResource::CachedResource):
3579         (WebCore::CachedResource::setResponse):
3580         (WebCore::CachedResource::varyHeaderValuesMatch):
3581         * loader/cache/CachedResource.h:
3582         (WebCore::CachedResource::cookieJar const):
3583         * loader/cache/CachedResourceLoader.cpp:
3584         (WebCore::createResource):
3585         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
3586         (WebCore::CachedResourceLoader::updateCachedResourceWithCurrentRequest):
3587         (WebCore::CachedResourceLoader::requestResource):
3588         (WebCore::CachedResourceLoader::revalidateResource):
3589         (WebCore::CachedResourceLoader::loadResource):
3590         * loader/cache/CachedResourceLoader.h:
3591         * loader/cache/CachedSVGDocument.cpp:
3592         (WebCore::CachedSVGDocument::CachedSVGDocument):
3593         * loader/cache/CachedSVGDocument.h:
3594         * loader/cache/CachedSVGFont.cpp:
3595         (WebCore::CachedSVGFont::CachedSVGFont):
3596         * loader/cache/CachedSVGFont.h:
3597         * loader/cache/CachedScript.cpp:
3598         (WebCore::CachedScript::CachedScript):
3599         * loader/cache/CachedScript.h:
3600         * loader/cache/CachedTextTrack.cpp:
3601         (WebCore::CachedTextTrack::CachedTextTrack):
3602         * loader/cache/CachedTextTrack.h:
3603         * loader/cache/CachedXSLStyleSheet.cpp:
3604         (WebCore::CachedXSLStyleSheet::CachedXSLStyleSheet):
3605         * loader/cache/CachedXSLStyleSheet.h:
3606         * loader/cache/MemoryCache.cpp:
3607         (WebCore::MemoryCache::addImageToCache):
3608         * loader/cache/MemoryCache.h:
3609         * page/Navigator.cpp:
3610         (WebCore::Navigator::cookieEnabled const):
3611         * page/Page.cpp:
3612         (WebCore::Page::Page):
3613         * page/Page.h:
3614         (WebCore::Page::cookieJar):
3615         * page/PageConfiguration.cpp:
3616         (WebCore::PageConfiguration::PageConfiguration):
3617         * page/PageConfiguration.h:
3618         * platform/CookiesStrategy.h: Removed.
3619         * platform/PlatformStrategies.h:
3620         (WebCore::PlatformStrategies::cookiesStrategy): Deleted.
3621         * platform/network/CacheValidation.cpp:
3622         (WebCore::cookieRequestHeaderFieldValue):
3623         (WebCore::collectVaryingRequestHeaders):
3624         (WebCore::verifyVaryingRequestHeaders):
3625         * platform/network/CacheValidation.h:
3626         * platform/network/CookieRequestHeaderFieldProxy.h:
3627         * platform/network/cf/NetworkStorageSessionCFNetWin.cpp:
3628         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
3629         * platform/network/curl/ResourceHandleCurl.cpp:
3630         * rendering/RenderSnapshottedPlugIn.cpp:
3631         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
3632         * testing/Internals.cpp:
3633         (WebCore::Internals::getCookies const):
3634
3635 2019-01-15  Simon Fraser  <simon.fraser@apple.com>
3636
3637         Animations should only trigger layer recomposite when necessary
3638         https://bugs.webkit.org/show_bug.cgi?id=193450
3639
3640         Reviewed by Antoine Quint.
3641
3642         Animations only need to trigger compositing updates when their states change in a way
3643         that affects compositing. RenderLayerCompositor::requiresCompositingForAnimation() checks for
3644         running animations of properties that can be accelerated, so this patch fixes the legacy
3645         animation logic to only set 'shouldRecompositeLayer' in TreeResolver::createAnimatedElementUpdate()
3646         when the running state of such an animation changes.
3647
3648         ImplicitAnimation::animate() and KeyframeAnimation::animate() now return OptionSet<AnimateChange>.
3649         This contains information about whether the running state changed, so CompositeAnimation::animate()
3650         asks about whether the running state of an accelerated property changed, and returns this in
3651         the AnimationUpdate result.
3652
3653         * page/animation/AnimationBase.h:
3654         (WebCore::AnimationBase::isPausedState):
3655         (WebCore::AnimationBase::isRunningState):
3656         (WebCore::AnimationBase::inPausedState const):
3657         (WebCore::AnimationBase::inRunningState const):
3658         (WebCore::AnimationBase::isAnimatingProperty const):
3659         * page/animation/CSSAnimationController.h:
3660         * page/animation/CompositeAnimation.cpp:
3661         (WebCore::CompositeAnimation::animate):
3662         * page/animation/ImplicitAnimation.cpp:
3663         (WebCore::ImplicitAnimation::animate):
3664         (WebCore::ImplicitAnimation::affectsAcceleratedProperty const):
3665         * page/animation/ImplicitAnimation.h:
3666         * page/animation/KeyframeAnimation.cpp:
3667         (WebCore::KeyframeAnimation::KeyframeAnimation):
3668         (WebCore::KeyframeAnimation::animate):
3669         (WebCore::KeyframeAnimation::computeStackingContextImpact): Deleted.
3670         * page/animation/KeyframeAnimation.h:
3671         * style/StyleTreeResolver.cpp:
3672         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
3673
3674 2019-01-15  Simon Fraser  <simon.fraser@apple.com>
3675
3676         Clean up code related to the updating of Dashboard and touch event regions
3677         https://bugs.webkit.org/show_bug.cgi?id=193460
3678
3679         Reviewed by Zalan Bujtas.
3680
3681         In preparation for layout testing that can count the number of event region
3682         updates, move the code related to updating "annotated" (Dashboard) regions, and
3683         touch event regions into bottleneck functions in Document.
3684         
3685         Updating these two kinds of regions is generally similar, but there are some code paths
3686         that eagerly update annotated regions.
3687
3688         No behavior change.
3689
3690         * dom/Document.cpp:
3691         (WebCore::Document::updateAnnotatedRegions): Moved from FrameView.
3692         (WebCore::Document::invalidateRenderingDependentRegions):
3693         (WebCore::Document::invalidateScrollbarDependentRegions):
3694         (WebCore::Document::updateZOrderDependentRegions):
3695         * dom/Document.h:
3696         (WebCore::Document::setAnnotatedRegionsDirty):
3697         (WebCore::Document::annotatedRegionsDirty const):
3698         (WebCore::Document::hasAnnotatedRegions const):
3699         * page/FrameView.cpp:
3700         (WebCore::FrameView::didLayout):
3701         (WebCore::FrameView::didPaintContents):
3702         (WebCore::FrameView::updateAnnotatedRegions): Deleted.
3703         * page/FrameView.h:
3704         * rendering/RenderElement.cpp: Drive-by header cleanup.
3705         (WebCore::RenderElement::styleWillChange):
3706         * rendering/RenderLayer.cpp:
3707         (WebCore::RenderLayer::scrollTo):
3708         (WebCore::RenderLayer::setHasHorizontalScrollbar):
3709         (WebCore::RenderLayer::setHasVerticalScrollbar):
3710         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
3711         (WebCore::RenderLayer::calculateClipRects const):
3712         * rendering/RenderListBox.cpp:
3713         (WebCore::RenderListBox::setHasVerticalScrollbar):
3714
3715 2019-01-15  David Kilzer  <ddkilzer@apple.com>
3716
3717         Let Xcode have its way with the WebCore project
3718
3719         * WebCore.xcodeproj/project.pbxproj:
3720         - Change the lastKnownFileType for *.gperf and *.idl files from
3721           "file" to "text".
3722         - Resort source files into UUID order.
3723
3724 2019-01-15  Youenn Fablet  <youenn@apple.com>
3725
3726         Correctly handle rotation for local video playback
3727         https://bugs.webkit.org/show_bug.cgi?id=193412
3728
3729         Reviewed by Eric Carlson.
3730
3731         Update AVVideoCaptureSource to compute the size given to settings after rotating the sample.
3732         This ensures computing the size of video elements appropriately.
3733         Also makes sure to notify observers of size change whenever rotation happens as settings() call will provide a different size.
3734         Covered by manual testing as we do not have yet emulation of local capture with rotation.
3735
3736         * platform/mediastream/RealtimeMediaSource.cpp:
3737         (WebCore::RealtimeMediaSource::setIntrinsicSize):
3738         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3739         (WebCore::AVVideoCaptureSource::settings):
3740         (WebCore::AVVideoCaptureSource::computeSampleRotation):
3741
3742 2019-01-15  Chris Dumez  <cdumez@apple.com>
3743
3744         Regression(PSON) View becomes blank after click a cross-site download link
3745         https://bugs.webkit.org/show_bug.cgi?id=193361
3746         <rdar://problem/47099573>
3747
3748         Reviewed by Geoff Garen.
3749
3750         * loader/FrameLoader.cpp:
3751         (WebCore::FrameLoader::commitProvisionalLoad):
3752         When restoring from PageCache, make sure we notify the client that the load was committed
3753         *before* we tell it that the navigation is complete. This would confuse the ProvisionalPageProxy
3754         logic in the UIProcess.
3755
3756 2019-01-15  Zalan Bujtas  <zalan@apple.com>
3757
3758         [LFC][Out-of-flow] Ignore bottom when the vertical values are over-constrained
3759         https://bugs.webkit.org/show_bug.cgi?id=193448
3760
3761         Reviewed by Antti Koivisto.
3762
3763         Add missing check. We should only resolve auto values. 
3764
3765         Test: fast/block/block-only/non-auto-top-bottom-left-right-widht-height-out-of-flow.html
3766
3767         * layout/FormattingContextGeometry.cpp:
3768         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedVerticalGeometry):
3769
3770 2019-01-15  Devin Rousso  <drousso@apple.com>
3771
3772         Web Inspector: Audit: provide a way to determine whether a give node has event listeners
3773         https://bugs.webkit.org/show_bug.cgi?id=193226
3774         <rdar://problem/46800005>
3775
3776         Reviewed by Joseph Pecoraro.
3777
3778         Test: inspector/audit/run-dom.html
3779
3780         * inspector/InspectorAuditDOMObject.idl:
3781         * inspector/InspectorAuditDOMObject.h:
3782         * inspector/InspectorAuditDOMObject.cpp:
3783         (WebCore::InspectorAuditDOMObject::hasEventListeners): Added.
3784
3785 2019-01-15  Devin Rousso  <drousso@apple.com>
3786
3787         Web Inspector: Audit: provide a way to query for all nodes with a given computed Accessibility role
3788         https://bugs.webkit.org/show_bug.cgi?id=193228
3789         <rdar://problem/46787787>
3790
3791         Reviewed by Joseph Pecoraro.
3792
3793         Test: inspector/audit/run-accessibility.html
3794
3795         * inspector/InspectorAuditAccessibilityObject.idl:
3796         * inspector/InspectorAuditAccessibilityObject.h:
3797         * inspector/InspectorAuditAccessibilityObject.cpp:
3798         (WebCore::accessiblityObjectForNode): Added.
3799         (WebCore::InspectorAuditAccessibilityObject::getElementsByComputedRole): Added.
3800
3801 2019-01-15  Simon Fraser  <simon.fraser@apple.com>
3802
3803         Simplify isRunningAnimationOnRenderer()
3804         https://bugs.webkit.org/show_bug.cgi?id=193435
3805
3806         Reviewed by Darin Adler.
3807
3808         All callers of CSSAnimationController::isRunningAnimationOnRenderer() pass AnimationBase::Running | AnimationBase::Paused,
3809         so we can remove the parameter and just hardcode this behavior.
3810         
3811         This will simplify a later patch that needs to consider state changes between running and not running.
3812         
3813         No behavior change.
3814
3815         * page/animation/AnimationBase.h:
3816         (WebCore::AnimationBase::isAnimatingProperty const):
3817         * page/animation/CSSAnimationController.cpp:
3818         (WebCore::CSSAnimationControllerPrivate::isRunningAnimationOnRenderer const):
3819         (WebCore::CSSAnimationControllerPrivate::isRunningAcceleratedAnimationOnRenderer const):
3820         (WebCore::CSSAnimationControllerPrivate::computeExtentOfAnimation const):
3821         (WebCore::CSSAnimationController::isRunningAnimationOnRenderer const):
3822         (WebCore::CSSAnimationController::isRunningAcceleratedAnimationOnRenderer const):
3823         * page/animation/CSSAnimationController.h:
3824         * page/animation/CSSAnimationControllerPrivate.h:
3825         * page/animation/CompositeAnimation.cpp:
3826         (WebCore::CompositeAnimation::isAnimatingProperty const):
3827         * page/animation/CompositeAnimation.h:
3828         * rendering/RenderLayer.cpp:
3829         (WebCore::RenderLayer::currentTransform const):
3830         * rendering/RenderLayerBacking.cpp:
3831         (WebCore::RenderLayerBacking::updateGeometry):
3832         * rendering/RenderLayerCompositor.cpp:
3833         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
3834         (WebCore::RenderLayerCompositor::isRunningTransformAnimation const):
3835
3836 2019-01-15  Antti Koivisto  <antti@apple.com>
3837
3838         Remove unused fields from Scrollbar
3839         https://bugs.webkit.org/show_bug.cgi?id=193442
3840
3841         Reviewed by Zalan Bujtas.
3842
3843         * platform/Scrollbar.cpp:
3844         (WebCore::Scrollbar::Scrollbar):
3845         * platform/Scrollbar.h:
3846         (WebCore::Scrollbar::isCustomScrollbar const):
3847
3848         Make virtual so it doesn't need a bit.
3849
3850         (WebCore::Scrollbar::isAlphaLocked const): Deleted.
3851         (WebCore::Scrollbar::setIsAlphaLocked): Deleted.
3852         * platform/mac/ScrollAnimatorMac.mm:
3853         (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting):
3854         * rendering/RenderScrollbar.cpp:
3855         (WebCore::RenderScrollbar::RenderScrollbar):
3856         * rendering/RenderScrollbar.h:
3857
3858 2019-01-15  Zalan Bujtas  <zalan@apple.com>
3859
3860         [LFC] Use the containing block's padding box to position out-of-flow elements.
3861         https://bugs.webkit.org/show_bug.cgi?id=193431
3862
3863         Reviewed by Antti Koivisto.
3864
3865         If the element has 'position: absolute', the containing block is established by the nearest ancestor
3866         with a 'position' of 'absolute', 'relative' or 'fixed', in the following way:
3867
3868         1. In the case that the ancestor is an inline element, the containing block is the bounding box around the padding
3869         boxes of the first and the last inline boxes generated for that element. In CSS 2.2, if the inline element is split
3870         across multiple lines, the containing block is undefined.
3871
3872         2. Otherwise, the containing block is formed by the padding edge of the ancestor.
3873
3874         This patch covers #2. 
3875
3876         Test: fast/block/block-only/out-of-flow-with-containing-block-border-padding.html
3877
3878         * layout/displaytree/DisplayBox.h:
3879         (WebCore::Display::Box::width const):
3880         (WebCore::Display::Box::height const):
3881         (WebCore::Display::Box::contentBoxTop const):
3882         (WebCore::Display::Box::contentBoxLeft const):
3883         (WebCore::Display::Box::paddingBoxTop const):
3884         (WebCore::Display::Box::paddingBoxLeft const):
3885         (WebCore::Display::Box::paddingBoxBottom const):
3886         (WebCore::Display::Box::paddingBoxRight const):
3887         (WebCore::Display::Box::paddingBoxHeight const):
3888         (WebCore::Display::Box::paddingBoxWidth const):
3889         * page/FrameViewLayoutContext.cpp:
3890         (WebCore::layoutUsingFormattingContext):
3891
3892 2019-01-11  Antoine Quint  <graouts@apple.com>
3893
3894         Support parsing of additional values for the touch-action property
3895         https://bugs.webkit.org/show_bug.cgi?id=193314
3896         <rdar://problem/47176519>
3897
3898         Reviewed by Dean Jackson.
3899
3900         We add parsing support for the "none", "pan-x", "pan-y" and "pinch-zoom" values of the CSS "touch-action" property.
3901
3902         * WebCore.xcodeproj/project.pbxproj:
3903         * css/CSSComputedStyleDeclaration.cpp:
3904         (WebCore::touchActionFlagsToCSSValue):
3905         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
3906         * css/CSSPrimitiveValueMappings.h:
3907         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3908         (WebCore::CSSPrimitiveValue::operator OptionSet<TouchAction> const):
3909         (WebCore::CSSPrimitiveValue::operator TouchAction const): Deleted.
3910         * css/CSSProperties.json:
3911         * css/CSSValueKeywords.in:
3912         * css/StyleBuilderConverter.h:
3913         (WebCore::StyleBuilderConverter::convertTouchAction):
3914         * css/parser/CSSParserFastPaths.cpp:
3915         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
3916         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
3917         * css/parser/CSSPropertyParser.cpp:
3918         (WebCore::consumeTouchAction):
3919         * dom/Element.cpp:
3920         (WebCore::Element::allowsDoubleTapGesture const):
3921         * platform/TouchAction.h: Added.
3922         * rendering/style/RenderStyle.h:
3923         (WebCore::RenderStyle::touchActions const):
3924         (WebCore::RenderStyle::setTouchActions):
3925         (WebCore::RenderStyle::initialTouchActions):
3926         (WebCore::RenderStyle::touchAction const): Deleted.
3927         (WebCore::RenderStyle::setTouchAction): Deleted.
3928         (WebCore::RenderStyle::initialTouchAction): Deleted.
3929         * rendering/style/RenderStyleConstants.h:
3930         * rendering/style/StyleRareNonInheritedData.cpp:
3931         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3932         (WebCore::StyleRareNonInheritedData::operator== const):
3933         * rendering/style/StyleRareNonInheritedData.h:
3934
3935 2019-01-15  Devin Rousso  <drousso@apple.com>
3936
3937         Web Inspector: Audit: create new IDL type for exposing special functionality in test context
3938         https://bugs.webkit.org/show_bug.cgi?id=193149
3939         <rdar://problem/46801218>
3940
3941         Reviewed by Joseph Pecoraro.
3942
3943         Tests: inspector/audit/run.html
3944                inspector/audit/setup.html
3945                inspector/audit/teardown.html
3946
3947         Create a new `AuditAgent` (and various subclasses for different inspection targets), as well
3948         as `InspectorAuditAccessibilityObject` and `InspectorAuditDOMObject` objects that will
3949         be injected into the test function to allow for more advanced testing.
3950
3951         * inspector/InspectorAuditAccessibilityObject.idl: Added.
3952         * inspector/InspectorAuditAccessibilityObject.h: Added.
3953         (WebCore::InspectorAuditAccessibilityObject::create):
3954         * inspector/InspectorAuditAccessibilityObject.cpp: Added.
3955         (WebCore::InspectorAuditAccessibilityObject::InspectorAuditAccessibilityObject):
3956
3957         * inspector/InspectorAuditDOMObject.idl: Added.
3958         * inspector/InspectorAuditDOMObject.h: Added.
3959         (WebCore::InspectorAuditDOMObject::create):
3960         * inspector/InspectorAuditDOMObject.cpp: Added.
3961         (WebCore::InspectorAuditDOMObject::InspectorAuditDOMObject):
3962
3963         * inspector/agents/page/PageAuditAgent.h: Added.
3964         * inspector/agents/page/PageAuditAgent.cpp: Added.
3965  &nbs