[Async overflow scrolling] Fix missing or misplaced content inside overflow:scroll
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-06-26  Simon Fraser  <simon.fraser@apple.com>
2
3         [Async overflow scrolling] Fix missing or misplaced content inside overflow:scroll
4         https://bugs.webkit.org/show_bug.cgi?id=199253
5         rdar://problem/51855156, rdar://problem/51934514
6
7         Reviewed by Zalan Bujtas.
8
9         This patch fixes a couple of related issues triggered by failing to composite layers inside non-stacking-context
10         overflow scroll.
11
12         First, we relied on overlap testing to composite position:relative layers inside overflow:scroll, but this only
13         worked when they came later in z-order, so didn't work for layers with negative z-index.
14         RenderLayerCompositor::requiresCompositingForIndirectReason() was intended to trigger compositing in such cases,
15         but it only did so for position:absolute inside stacking-context scroller, because
16         isNonScrolledLayerInsideScrolledCompositedAncestor() tested ancestorMovedByScroller && !layerMovedByScroller.
17
18         I fixed this by sharing code between the three places that ask whether compositing crosses a containing-block
19         boundary to call a single function, RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor(),
20         that returns a ScrollPositioningBehavior. We now do compositing for both "moves" and "stationary" behaviors (but
21         not "none"), ensuring that position:relative inside non-stacking scroller is always composited.
22
23         However, this would trigger compositing on layers that should be using backing sharing; if they were outside the
24         visible part of the scroller, the overlap code would not trigger, but the
25         "IndirectCompositingReason::OverflowScrollPositioning" code would. This is undesirable; any layer that can use
26         backing sharing should, because that's fewer composited layers, so smaller layer trees and less backing store.
27         To fix this, I moved the backing-sharing check before the overlap check in
28         RenderLayerCompositor::computeCompositingRequirements().
29
30         The "layer.setHasCompositingDescendant(currentState.subtreeIsCompositing)" line was in the wrong place,
31         triggering assertions on some content; "subtreeIsCompositing" only refers to child layers, so this bit needs to
32         be set right after we've traversed the z-order lists.
33
34         Tests: compositing/scrolling/async-overflow-scrolling/hidden-relative-layer-content-in-scroller.html
35                compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller.html
36                compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller.html
37
38         * rendering/RenderLayerCompositor.cpp:
39         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
40         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
41         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
42         (WebCore::isScrolledByOverflowScrollLayer):
43         (WebCore::enclosingCompositedScrollingLayer):
44         (WebCore::RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor):
45         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
46         (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor): Deleted.
47         (WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary): Deleted.
48         * rendering/RenderLayerCompositor.h:
49
50 2019-06-26  Ryosuke Niwa  <rniwa@webkit.org>
51
52         ReplacementFragment should not have script observable side effects
53         https://bugs.webkit.org/show_bug.cgi?id=199147
54
55         Reviewed by Wenson Hsieh.
56
57         Fixed the bug that ReplacementFragment has script observable side effects.
58
59         Use a brand new document for sanitization where the script is disabled for test rendering,
60         and remove style and script elements as well as event handlers before the test rendering
61         and the actual pasting.
62
63         Test: editing/pasteboard/paste-contents-with-side-effects.html
64
65         * editing/ReplaceSelectionCommand.cpp:
66         (WebCore::ReplacementFragment::document): Deleted.
67         (WebCore::ReplacementFragment::ReplacementFragment): Use createPageForSanitizingWebContent
68         to create our own document for test rendering. We need to copy over the computed style
69         from the root editable element (editing host) to respect whitespace treatment, etc...
70         (WebCore::ReplacementFragment::removeContentsWithSideEffects): Moved from removeHeadContents.
71         Now removes event handlers and JavaScript URLs.
72         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Renamed variable names.
73         (WebCore::ReplaceSelectionCommand::willApplyCommand): Create the plain text and HTML markup
74         for beforeinput and input events before ReplacementFragment removes contents with side effects.
75         (WebCore::ReplaceSelectionCommand::ensureReplacementFragment): The removal of head elements
76         is now done in ReplacementFragment's constructor.
77
78 2019-06-26  Andy Estes  <aestes@apple.com>
79
80         [Payment Request] Set state to Closed when show() is called during an active session
81         https://bugs.webkit.org/show_bug.cgi?id=199239
82
83         Reviewed by Alex Christensen.
84
85         According to step 7 of https://w3c.github.io/payment-request/#show-method (as of 26 June
86         2019), when another payment request is showing, calling show() should set the [[state]]
87         internal slot to Closed in addition to rejecting the show promise with an AbortError. WebKit
88         was only doing the latter. Let's do both.
89
90         Test: http/tests/paymentrequest/payment-is-showing.https.html
91
92         * Modules/paymentrequest/PaymentRequest.cpp:
93         (WebCore::PaymentRequest::show):
94
95 2019-06-26  Joseph Pecoraro  <pecoraro@apple.com>
96
97         Web Inspector: Implement console.countReset
98         https://bugs.webkit.org/show_bug.cgi?id=199200
99
100         Reviewed by Devin Rousso.
101
102         Updated existing tests.
103
104         * inspector/InspectorInstrumentation.cpp:
105         (WebCore::InspectorInstrumentation::consoleCountImpl):
106         (WebCore::InspectorInstrumentation::consoleCountResetImpl):
107         * inspector/InspectorInstrumentation.h:
108         (WebCore::InspectorInstrumentation::consoleCountReset):
109         * page/PageConsoleClient.cpp:
110         (WebCore::PageConsoleClient::countReset):
111         * page/PageConsoleClient.h:
112         * workers/WorkerConsoleClient.cpp:
113         (WebCore::WorkerConsoleClient::countReset):
114         * workers/WorkerConsoleClient.h:
115         * worklets/WorkletConsoleClient.cpp:
116         (WebCore::WorkletConsoleClient::countReset):
117         * worklets/WorkletConsoleClient.h:
118
119 2019-06-26  Antoine Quint  <graouts@apple.com>
120
121         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
122         https://bugs.webkit.org/show_bug.cgi?id=198999
123         <rdar://problem/51979477>
124
125         Reviewed by Dean Jackson.
126
127         Make sure we don't return early prior to setting the flag that prevents re-entrancy, or else we would never
128         enter this function again. No new tests, this was caught because Pointer Events WPT tests on iOS tests regressed.
129
130         * page/PointerCaptureController.cpp:
131         (WebCore::PointerCaptureController::processPendingPointerCapture):
132
133 2019-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
134
135         REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
136         https://bugs.webkit.org/show_bug.cgi?id=199012
137
138         Reviewed by Saam Barati.
139
140         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
141         (WebCore::isAcceptableDevice):
142         (WebCore::GPUDevice::tryCreate):
143
144 2019-06-26  Simon Fraser  <simon.fraser@apple.com>
145
146         Incorrect clippping with overflow:scroll inside oveflow:hidden with border-radius
147         https://bugs.webkit.org/show_bug.cgi?id=199135
148         rdar://problem/51882383
149
150         Reviewed by Zalan Bujtas.
151         
152         In some cases the geometry of the shape mask layer added to m_childContainmentLayer, for
153         border-radius, was incorrect. GraphicsLayerCA::updateClippingStrategy() treated
154         the rounded rect as if it were in renderer coordinates, but to match the other geometry
155         on GraphicsLayer, it should in GraphicsLayer coordinates, so we need to offset by
156         clipLayer->offsetFromRenderer().
157         
158         In addition, RenderLayerBacking::updateChildClippingStrategy() is called from
159         the updateConfiguration(), which is before we've set offsetFromRenderer() on the clipLayer.
160         This first call is really to find out whether the platform supports this rounded rect
161         as a shape mask.
162         
163         So we need to call setMasksToBoundsRect() a second time in RenderLayerBacking::updateGeometry()
164         after clipLayers's offsetFromRenderer() has been computed.
165
166         Test: compositing/scrolling/async-overflow-scrolling/border-radius-on-scroll-container.html
167
168         * platform/graphics/ca/GraphicsLayerCA.cpp:
169         (WebCore::GraphicsLayerCA::updateClippingStrategy):
170         * rendering/RenderLayerBacking.cpp:
171         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
172         (WebCore::RenderLayerBacking::updateDescendantClippingLayer):
173         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
174
175 2019-06-26  Antoine Quint  <graouts@apple.com>
176
177         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
178         https://bugs.webkit.org/show_bug.cgi?id=198999
179         <rdar://problem/51979477>
180
181         Reviewed by Dean Jackson.
182
183         Up until now, we would not account for pointer capture (see ​https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
184         mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
185         for it when updating :hover styles.
186
187         Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
188         that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
189         boundary mouse events. Additionally, when calling Document::prepareMouseEvent(), we also use the pointer capture element to
190         pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.
191
192         * dom/Document.cpp:
193         (WebCore::Document::prepareMouseEvent): When a new event is going to be dispatched, we must run the Process Pending Capture Element
194         steps as mandated by the Pointer Events spec. Calling this will dispatch the appropriate pointer capture change events and also
195         required boundary events since EventHandler::setCapturingMouseEventsElement() calls into EventHandler::updateMouseEventTargetNode().
196         Since this may update the capturing mouse events element, we ensure that we call updateHoverActiveState() with a flag that indicates that.
197         Finally, we use the capturing mouse events element instead of the hit-testing element to pass to updateHoverActiveState() to ensure
198         that is has :hover styles applied.
199         (WebCore::Document::updateHoverActiveState): Account for the new CaptureChange flag to force the invalidation of the :hover and :active
200         elements chain at all times when the capturing mouse events element changed.
201         * dom/Document.h:
202         * dom/PointerEvent.h: Update PointerEvent::createForPointerCapture() to take specific parameters rather than a single PointerEvent to
203         set the pointerId, isPrimary and pointerType properties of the generated event. This is required to call processPendingPointerCapture()
204         outside of PointerEvent dispatch logic since we now call it from Document::prepareMouseEvent() where we haven't yet generated such an
205         event.
206         * page/EventHandler.cpp:
207         (WebCore::EventHandler::pointerCaptureElementDidChange): When a new pointer capture element is set, call updateMouseEventTargetNode()
208         to ensure that boundary events are fired to indicate the pointer capture state change.
209         (WebCore::EventHandler::prepareMouseEvent): Keep track of the last PlatformMouseEvent used to prepare a mouse event so that we can use
210         it when setCapturingMouseEventsElement() is called.
211         * page/EventHandler.h:
212         * page/PointerCaptureController.cpp:
213         (WebCore::PointerCaptureController::pointerCaptureElement): Since Document::prepareMouseEvent() needs to know the current pointer capture
214         element, add a new public method that indicates the pointer capture element if that element is contained in the provided document. We need
215         to provide the document since PointerCaptureController is owned by the Page and may manage several documents.
216         (WebCore::PointerCaptureController::dispatchEvent): Only run the Process Pending Capture Element steps when dealing with a touch or pen
217         event since those steps are already ran for mouse events in Document::prepareMouseEvent(). Additionally, since the element target is already
218         set to be the pointer capture element with the changes made to processPendingPointerCapture(), and because on iOS pointer capture is always
219         active, we can remove the code that would retarget the event to the pointer capture element.
220         (WebCore::PointerCaptureController::pointerEventWasDispatched):
221         (WebCore::PointerCaptureController::cancelPointer):
222         (WebCore::PointerCaptureController::processPendingPointerCapture): We now call into EventHandler::setCapturingMouseEventsElement() when the
223         capture target element changes. We must be careful to call this method prior to dispatching the "gotpointercapture" event and after dispatching
224         the "lostpointercapture" event so that boundary events are fired at the right time.
225         * page/PointerCaptureController.h:
226
227 2019-06-25  Fujii Hironori  <Hironori.Fujii@sony.com>
228
229         [WinCairo] incorrect font height for 'Google Sans Display' font
230         https://bugs.webkit.org/show_bug.cgi?id=198909
231
232         Reviewed by Frédéric Wang.
233
234         r191893 changed to use OS/2 typo metrics, but its calculation
235         wasn't correct. And, there is no reliable way to get OS/2 table by
236         using Windows API. Revert the part of r191893 change at the
237         moment.
238
239         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
240         (WebCore::Font::platformInit):
241         * platform/graphics/win/SimpleFontDataWin.cpp:
242         (WebCore::Font::initGDIFont):
243         Reverted the part of r191893 change, and added FIXME comments.
244
245 2019-06-25  Timothy Hatcher  <timothy@apple.com>
246
247         Clicking the up/down spin buttons for a number input increments/decrements by 2.
248         https://bugs.webkit.org/show_bug.cgi?id=198809
249
250         Reviewed by Tim Horton.
251
252         AppKit no longer registers NSScrollerButtonDelay and NSScrollerButtonPeriod in the base
253         NSUserDefaults for an app. This caused our use to always get 0s when setting the click
254         and hold timer, causing the value to increment quickly for a single press.
255
256         * platform/mac/ScrollbarThemeMac.h:
257         (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Added. Hardcode 500ms.
258         (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Added. Hardcode 50ms.
259         * platform/mac/ScrollbarThemeMac.mm:
260         (WebCore::ScrollbarThemeMac::preferencesChanged): Removed use of old user defaults.
261         (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Deleted.
262         (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Deleted.
263
264 2019-06-25  Keith Miller  <keith_miller@apple.com>
265
266         Unreviewed, windows build fix.
267
268         * bindings/js/JSDOMGlobalObject.h:
269
270 2019-06-25  Keith Miller  <keith_miller@apple.com>
271
272         Add didBecomePrototype() calls to global context prototypes
273         https://bugs.webkit.org/show_bug.cgi?id=199202
274
275         Reviewed by Mark Lam.
276
277         This fixes some crashes related to asserting that all prototypes
278         have been marked as such in JSC from
279         https://trac.webkit.org/changeset/246801. It's ok to call
280         didBecomePrototype here as we setting up the world state right now
281         so we won't be having a bad time.
282
283         We don't automatically call didBecomePrototype() for
284         setPrototypeWithoutTransition because existing objects may already
285         have this structure so it seems more reasonable to be explicit
286         there.
287
288         * bindings/js/JSWindowProxy.cpp:
289         (WebCore::JSWindowProxy::setWindow):
290         * bindings/js/WorkerScriptController.cpp:
291         (WebCore::WorkerScriptController::initScript):
292         * worklets/WorkletScriptController.cpp:
293         (WebCore::WorkletScriptController::initScriptWithSubclass):
294
295 2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
296
297         Web Inspector: Implement console.timeLog
298         https://bugs.webkit.org/show_bug.cgi?id=199184
299
300         Reviewed by Devin Rousso.
301
302         Updated existing tests.
303
304         * inspector/InspectorInstrumentation.cpp:
305         (WebCore::InspectorInstrumentation::logConsoleTimingImpl):
306         * inspector/InspectorInstrumentation.h:
307         (WebCore::InspectorInstrumentation::logConsoleTiming):
308         * page/PageConsoleClient.cpp:
309         (WebCore::PageConsoleClient::timeLog):
310         * page/PageConsoleClient.h:
311         * workers/WorkerConsoleClient.cpp:
312         (WebCore::WorkerConsoleClient::timeLog):
313         * workers/WorkerConsoleClient.h:
314         * worklets/WorkletConsoleClient.cpp:
315         (WebCore::WorkletConsoleClient::timeLog):
316         * worklets/WorkletConsoleClient.h:
317
318 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
319
320         Add user agent quirk for bankofamerica.com
321         https://bugs.webkit.org/show_bug.cgi?id=199154
322
323         Reviewed by Carlos Garcia Campos.
324
325         This suppresses an unsupported browser warning.
326
327         * platform/UserAgentQuirks.cpp:
328         (WebCore::urlRequiresMacintoshPlatform):
329
330 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
331
332         Fully rename WebKitGTK+ -> WebKitGTK everywhere
333         https://bugs.webkit.org/show_bug.cgi?id=199159
334
335         Reviewed by Carlos Garcia Campos.
336
337         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
338         (webkitAccessibleTextGetStringAtOffset):
339         * platform/UserAgentQuirks.cpp:
340         (WebCore::urlRequiresMacintoshPlatform):
341         * platform/network/soup/NetworkStorageSessionSoup.cpp:
342         (WebCore::NetworkStorageSession::saveCredentialToPersistentStorage):
343         * rendering/RenderThemeGtk.cpp:
344         (WebCore::RenderThemeGtk::adjustTextFieldStyle const):
345
346 2019-06-25  Rob Buis  <rbuis@igalia.com>
347
348         Introduce LinkLoadParameters
349         https://bugs.webkit.org/show_bug.cgi?id=198960
350
351         Reviewed by Frédéric Wang.
352
353         Avoid the long parameters lists in LinkLoader by moving them
354         to LinkLoadParameters.
355
356         No new tests because there is no behavior change.
357
358         * html/HTMLLinkElement.cpp:
359         (WebCore::HTMLLinkElement::process):
360         * loader/LinkLoader.cpp:
361         (WebCore::LinkLoader::loadLinksFromHeader):
362         (WebCore::LinkLoader::preconnectIfNeeded):
363         (WebCore::LinkLoader::preloadIfNeeded):
364         (WebCore::LinkLoader::prefetchIfNeeded):
365         (WebCore::LinkLoader::loadLink):
366         * loader/LinkLoader.h:
367
368 2019-06-24  Wenson Hsieh  <wenson_hsieh@apple.com>
369
370         [Text autosizing] [iPadOS] Revise our heuristics to determine idempotent text autosizing candidates
371         https://bugs.webkit.org/show_bug.cgi?id=198763
372         <rdar://problem/51826266>
373
374         Reviewed by Simon Fraser.
375
376         This patch adjusts existing text autosizing heuristics, based on a survey of text on websites in the Alexa top
377         500 that shrink down to fit the viewport when requesting the desktop version of the site. The new heuristic is
378         derived from training decision trees against the dataset obtained from this survey, and balances false positives
379         (cases where layout is broken due to autosizing) against overall accuracy (measured using cross-validation).
380
381         See below for more details. Additionally, please refer to the link in the radar for more details, as well as
382         resources used to generate, validate, and analyze these decision trees.
383
384         Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html
385
386         * css/StyleResolver.cpp:
387         (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
388         * rendering/style/RenderStyle.cpp:
389         (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):
390
391         Rename AutosizeStatus::shouldSkipSubtree to RenderStyle::isIdempotentTextAutosizingCandidate. We relocate this
392         logic to RenderStyle, such that we're able to ask the element's RenderStyle questions when determining whether
393         the element should be autosized.
394
395         Of course, this patch additionally revamps the heuristic used to determine whether it is safe to autosize an
396         element. Our current heuristic in trunk simply checks for the presence of inline block display, out of flow
397         positioning and a fixed height ancestor; if any of these conditions are satisfied, we opt the element out of
398         text autosizing. This is an excellent strategy for boosting some runs of text while avoiding autosizing in the
399         vast majority of cases where increasing font size may lead to layout breakage (e.g. overlapping or clipped text,
400         content unexpectedly flowing to the next line, etc.). However, it also avoids boosting font sizes in many
401         scenarios where boosting font sizes is desired; for concrete examples, see the (currently 24) radars about small
402         font sizes that are duped to <rdar://problem/51826266>.
403
404         To help analyze and identify trends in autosizable and non-autosizable text, we assembled a dataset of elements
405         with text from the Alexa top 500 that either: (1) were too small and could be boosted safely, or (2) would break
406         layout if boosted. With this labeled dataset, we then trained binary decision trees to classify the data. Each
407         decision tree was trained with a number of hyperparameters: namely, maximum depth, minimum leaf size, and the
408         amount of bias towards negative samples (i.e. the ratio of the weight of a non-autosizable sample relative to
409         the weight of an autosizable sample).
410
411         For each 3-tuple of these hyperparameters (800 in total: max depth between 3 and 10, min leaf size between 1 and
412         10 and bias between 1 and 10), for 5000 iterations each, we split the full dataset into a training dataset and
413         a cross-validation dataset, trained a decision tree using the training set, and tested against the cross-
414         validation set to compute average precision, recall, and overall accuracy for each tuple of hyperparameters.
415
416         The decision tree introduced in this patch was generated using a hand-picked set of hyperparameters (max depth
417         10, min leaf size 4, and negative bias 2) to provide a balance between precision scores (limiting layout
418         breakage) and recall score (ensuring that small text is mostly autosized), while optimizing for overall
419         accuracy. Cross-validation scores predict that the overall accuracy of this classifier is approximately 70%, up
420         from the current accuracy in trunk (~53%).
421
422         * rendering/style/RenderStyle.h:
423
424         Grow the width of `autosizeStatus` from 4 to 8 (notably, this does not increase the size of RenderStyle).
425
426         * rendering/style/TextSizeAdjustment.cpp:
427         (WebCore::AutosizeStatus::updateStatus):
428         (WebCore::AutosizeStatus::shouldSkipSubtree const): Deleted.
429         * rendering/style/TextSizeAdjustment.h:
430
431         Introduce new text autosizing state flags, and remove some existing ones.
432
433 2019-06-24  Commit Queue  <commit-queue@webkit.org>
434
435         Unreviewed, rolling out r246714.
436         https://bugs.webkit.org/show_bug.cgi?id=199179
437
438         revert to do patch in a different way. (Requested by keith_mi_
439         on #webkit).
440
441         Reverted changeset:
442
443         "All prototypes should call didBecomePrototype()"
444         https://bugs.webkit.org/show_bug.cgi?id=196315
445         https://trac.webkit.org/changeset/246714
446
447 2019-06-24  Sihui Liu  <sihui_liu@apple.com>
448
449         REGRESSION (r244436): IndexedDB Uint8Array returned as ArrayBuffer
450         https://bugs.webkit.org/show_bug.cgi?id=198738
451         <rdar://problem/51614053>
452
453         Reviewed by Brady Eidson.
454
455         In InexedDB, two binary keys are the same as long as their data is the same.
456
457         Modified tests: storage/indexeddb/key-type-binary.html
458                         storage/indexeddb/key-type-binary-private.html
459
460         * bindings/js/IDBBindingUtilities.cpp:
461         (WebCore::injectIDBKeyIntoScriptValue):
462         * bindings/js/SerializedScriptValue.cpp:
463         (WebCore::CloneDeserializer::readArrayBufferView):
464
465 2019-06-24  Sihui Liu  <sihui_liu@apple.com>
466
467         Remove WebSQL quirk for nytimes.com
468         https://bugs.webkit.org/show_bug.cgi?id=199175
469
470         Reviewed by Geoffrey Garen.
471
472         Removed unused code.
473
474         * bindings/scripts/CodeGeneratorJS.pm:
475         (GenerateRuntimeEnableConditionalString):
476         * bindings/scripts/IDLAttributes.json:
477         * page/Quirks.cpp:
478         (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
479         (WebCore::Quirks::hasWebSQLSupportQuirk const): Deleted.
480         * page/Quirks.h:
481
482 2019-06-24  Brady Eidson  <beidson@apple.com>
483
484         Null deref in WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad.
485         <rdar://problem/51535942> and https://bugs.webkit.org/show_bug.cgi?id=199123
486
487         Reviewed by Andy Estes.
488
489         * loader/FrameLoaderStateMachine.h:
490         (WebCore::FrameLoaderStateMachine::stateForDebugging const):
491
492 2019-06-24  Simon Fraser  <simon.fraser@apple.com>
493
494         REGRESSION (r246725 ): Crashes on twitch.tv
495         https://bugs.webkit.org/show_bug.cgi?id=199176
496         rdar://problem/52071249
497
498         Reviewed by Zalan Bujtas.
499         
500         With a composited negative z-index child inside a scroller, we can register the overflow scroll
501         proxy node before we've traversed the overflow layer, so it that layer hasn't got its OverflowScrollingNode
502         yet. Thus, AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes() can be called with an empty vector.
503         Avoid crashing when this happens.
504
505         Test: scrollingcoordinator/scrolling-tree/scroller-with-negative-z-child.html
506
507         * page/scrolling/AsyncScrollingCoordinator.cpp:
508         (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
509         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
510         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
511
512 2019-06-24  Chris Dumez  <cdumez@apple.com>
513
514         Pages using Google's anti-flicker optimization may take ~5 seconds to do initial paint
515         https://bugs.webkit.org/show_bug.cgi?id=199173
516         <rdar://problem/45968770>
517
518         Reviewed by Geoffrey Garen.
519
520         Pages using Google's anti-flicker optimization [1] take ~5 seconds to do initial paint when
521         analytics.js load is blocked by a content blocker.
522
523         To address the issue, this patch introduces a quirk behind an experimental feature flag that
524         calls window.dataLayer.hide.end() on the page when the load of https://www.google-analytics.com/analytics.js
525         is blocked by a content blocker. Note that this is more robust than dropping the 'async-hide'
526         class from document.documentElement since the class name is customizable by the caller.
527         A message is logged in the console when the quirk causes window.dataLayer.hide.end() to get called
528         early.
529
530         [1] https://developers.google.com/optimize/
531
532         * contentextensions/ContentExtensionsBackend.cpp:
533         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
534         * page/Settings.yaml:
535
536 2019-06-24  John Wilander  <wilander@apple.com>
537
538         Remove IsITPFirstPartyWebsiteDataRemovalEnabled as runtime check
539         https://bugs.webkit.org/show_bug.cgi?id=199164
540         <rdar://problem/52061147>
541
542         Reviewed by Brent Fulgham.
543
544         No new tests. Just a removal of a runtime feature check. The functionality
545         already has a layout test.
546
547         We've had this toggle as a safety thing since mid-March. No need for it any longer.
548
549         * page/RuntimeEnabledFeatures.h:
550         (WebCore::RuntimeEnabledFeatures::isITPDatabaseEnabled const):
551         (WebCore::RuntimeEnabledFeatures::setIsITPFirstPartyWebsiteDataRemovalEnabled): Deleted.
552         (WebCore::RuntimeEnabledFeatures::isITPFirstPartyWebsiteDataRemovalEnabled const): Deleted.
553
554 2019-06-24  Jer Noble  <jer.noble@apple.com>
555
556         iOS 12.2 Drawing portrait video to canvas is sideways
557         https://bugs.webkit.org/show_bug.cgi?id=196772
558         <rdar://problem/49781802>
559
560         Reviewed by Eric Carlson.
561
562         Test: media/video-orientation-canvas.html
563
564         Move rotation code into its own ImageRotationSessionVT class for re-use across
565         all existing classes with rotation operations. Should slightly increase performance
566         for painting rotated media files, as the rotation only occurs once per frame, rather
567         than once per drawing operation.
568
569         * WebCore.xcodeproj/project.pbxproj:
570         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
571         (WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.
572         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
573         (WebCore::ImageDecoderAVFObjC::readTrackMetadata):
574         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
575         (WebCore::ImageDecoderAVFObjC::setTrack):
576         (WebCore::transformToRotationProperties): Deleted.
577         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
578         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
579         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
580         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
581         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
582         * platform/graphics/cv/ImageRotationSessionVT.h: Added.
583         (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
584         (WebCore::ImageRotationSessionVT::rotationProperties const):
585         (WebCore::ImageRotationSessionVT::rotatedSize):
586         * platform/graphics/cv/ImageRotationSessionVT.mm: Added.
587         (WebCore::transformToRotationProperties):
588         (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
589         (WebCore::ImageRotationSessionVT::rotate):
590         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
591         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
592         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
593         (WebCore::rotationToAngle):
594         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
595         (WebCore::computeRotatedWidthAndHeight): Deleted.
596
597 2019-06-24  Zalan Bujtas  <zalan@apple.com>
598
599         [StyleResolver] Pass RenderStyle& instead of RenderStyle* to updateFont() related functions.
600         https://bugs.webkit.org/show_bug.cgi?id=199167
601         <rdar://problem/52062669>
602
603         Reviewed by Antti Koivisto.
604
605         It is expected to have a valid RenderStyle object here (and existing code relies on it).
606
607         * css/StyleResolver.cpp:
608         (WebCore::checkForOrientationChange):
609         (WebCore::StyleResolver::updateFont):
610         (WebCore::StyleResolver::checkForTextSizeAdjust):
611         (WebCore::StyleResolver::checkForZoomChange):
612         (WebCore::StyleResolver::checkForGenericFamilyChange):
613         * css/StyleResolver.h:
614
615 2019-06-24  Antoine Quint  <graouts@apple.com>
616
617         [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html
618         https://bugs.webkit.org/show_bug.cgi?id=197005
619
620         Reviewed by Dean Jackson.
621
622         We were calling processPendingPointerCapture() at the wrong time, calling in after dispatching a PointerEvent rather than before.
623         We now do this correctly in the consolidated PointerCaptureController::dispatchEvent() method, which we call for dispatching all
624         PointerEvents, save for gotpointercapture and lostpointercapture since these should not yield the processing of the pending pointer
625         capture per the spec.
626
627         This uncovered a couple of new issues. First, since we would now call processPendingPointerCapture() and dispatch a lostpointercapture
628         event earlier, the alternative lostpointercapture dispatch when an element is removed (which is dispatched asynchronously on the
629         document) would be dispatched *after* dispatching the event in processPendingPointerCapture(). We now check in processPendingPointerCapture()
630         whether the event target is connected to fix this. This makes sure pointerevent_lostpointercapture_for_disconnected_node.html doesn't regress.
631
632         Finally, we must also call processPendingPointerCapture() when implicitly releasing pointer capture during handling of a "pointerup" event.
633         This ensures that pointerevent_releasepointercapture_invalid_pointerid.html doesn't regress.
634
635         As a result of all these changes, we now pass imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html reliably.
636
637         * page/PointerCaptureController.cpp:
638         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
639         (WebCore::PointerCaptureController::dispatchEvent): We now more closely adhere to the spec when determining what the pointer capture target is by
640         only checking for the target override. We can now do this safely since we call processPendingPointerCapture() before and not after event dispatch.
641         (WebCore::PointerCaptureController::pointerEventWasDispatched):
642         (WebCore::PointerCaptureController::processPendingPointerCapture): Cache the pending target override to make sure that dispatching a "gotpointercapture"
643         or "lostpointercapture" event during this function does not alter it until the next call is made when the next event is dispatched.
644
645 2019-06-24  Greg Doolittle  <gr3g@apple.com>
646
647         Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
648         https://bugs.webkit.org/show_bug.cgi?id=194754
649
650         Reviewed by Chris Fleizach.
651
652         Test: accessibility/img-alt-attribute-unassigned-value.html
653
654         * accessibility/AccessibilityObject.cpp:
655         (WebCore::AccessibilityObject::computedRoleString const):
656
657 2019-06-24  Adrian Perez de Castro  <aperez@igalia.com>
658
659         [WPE][GTK] Fixes for compilation with unified builds disabled
660         https://bugs.webkit.org/show_bug.cgi?id=199155
661
662         Reviewed by Michael Catanzaro.
663
664         No new tests needed.
665
666         * rendering/LayerAncestorClippingStack.h: Add missing inclusion of RenderLayer.h
667
668 2019-06-24  Michael Catanzaro  <mcatanzaro@igalia.com>
669
670         Add user agent quirk for Google Drive
671         https://bugs.webkit.org/show_bug.cgi?id=199153
672
673         Reviewed by Carlos Garcia Campos.
674
675         This suppresses an unsupported browser warning.
676
677         * platform/UserAgentQuirks.cpp:
678         (WebCore::urlRequiresMacintoshPlatform):
679         (WebCore::urlRequiresLinuxDesktopPlatform):
680
681 2019-06-24  Charlie Turner  <cturner@igalia.com>
682
683         [GStreamer][MSE] Pausing video sometimes causes skip to finish
684         https://bugs.webkit.org/show_bug.cgi?id=197355
685
686         Reviewed by Philippe Normand.
687
688         Covered by existing tests.
689
690         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
691         (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
692         Assuming that when m_eosPending is on and we're paused() that the
693         network resource is fully loaded and the end is reached is clearly
694         wrong. Whether this is now correct is unclear...
695
696 2019-06-24  Charlie Turner  <cturner@igalia.com>
697
698         [GStreamer] Volume level sometimes changes inappropriately
699         https://bugs.webkit.org/show_bug.cgi?id=197358
700
701         Reviewed by Xabier Rodriguez-Calvar.
702
703         Be consistent with our application of volume scaling. We were
704         setting volumes using cubic interpolation in setVolume() and using
705         the inverse in volume(); however setting initial volumes was done
706         linearly in setStreamVolumeElement, which was causing strange
707         jumps in the volume level at non-deterministic times. The fix
708         looks to be that we should use linear interpolation consistently,
709         since PulseAudio already applies cubic scaling to software
710         volumes.
711
712         Covered by existing tests.
713
714         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
715         (WebCore::MediaPlayerPrivateGStreamer::paused const): Bump the
716         logging here to LOG level, it's very spammy at DEBUG.
717         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
718         (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Switch to
719         linear interpolation.
720         (WebCore::MediaPlayerPrivateGStreamerBase::volume const): Ditto.
721         (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange):
722         Ditto.
723         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
724         Ditto, and be consistent here with the API, do not set the raw
725         volume managed by MediaElement.
726
727 2019-06-24  Antoine Quint  <graouts@apple.com>
728
729         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
730         https://bugs.webkit.org/show_bug.cgi?id=198999
731         <rdar://problem/51979477>
732
733         Unreviewed.
734
735         Rolling back all changes made for this bug (r246728 + r246716 + r246674) as it regressed one test
736         (imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_pointercapture_in_frame.html).
737
738         * dom/Document.cpp:
739         (WebCore::Document::prepareMouseEvent):
740         (WebCore::Document::updateHoverActiveState):
741         * page/EventHandler.cpp:
742         (WebCore::EventHandler::handleMousePressEvent):
743         (WebCore::EventHandler::handleMouseMoveEvent):
744         (WebCore::EventHandler::handleMouseReleaseEvent):
745         (WebCore::EventHandler::setCapturingMouseEventsElement):
746         * page/EventHandler.h:
747         * page/PointerCaptureController.cpp:
748         (WebCore::PointerCaptureController::releasePointerCapture):
749         (WebCore::PointerCaptureController::hasPointerCapture):
750         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
751         (WebCore::PointerCaptureController::dispatchEvent):
752         (WebCore::PointerCaptureController::processPendingPointerCapture):
753         (WebCore::PointerCaptureController::pointerCaptureElement): Deleted.
754         * page/PointerCaptureController.h:
755         * rendering/HitTestRequest.h:
756         (WebCore::HitTestRequest::includesAllElementsUnderPoint const):
757         (WebCore::HitTestRequest::pointerCaptureElementChanged const): Deleted.
758
759 2019-06-23  Antoine Quint  <graouts@apple.com>
760
761         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
762         https://bugs.webkit.org/show_bug.cgi?id=198999
763         <rdar://problem/52005663>
764
765         Reviewed by Dean Jackson.
766
767         We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events (part 2).
768
769         * page/PointerCaptureController.cpp:
770         (WebCore::PointerCaptureController::releasePointerCapture):
771
772 2019-06-23  Simon Fraser  <simon.fraser@apple.com>
773
774         [Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped
775         https://bugs.webkit.org/show_bug.cgi?id=199133
776         rdar://problem/43614439
777
778         Reviewed by Antti Koivisto.
779
780         Currently a composited layer with an overflow:scroll ancestor (which is not a paint-order
781         ancestor) gets a single "ancestor clip layer" that represents the intersection of all the
782         clips provided by its containing-block ancestors with non-visible overflow (both scrolling
783         and non-scrolling ones).
784
785         To correctly update clips with async overflow scroll, this single clip layer needs to be
786         broken up into multiple clipping ancestors. We need a separate layer, and scrolling tree
787         node for each ancestor that is an overflow scroll, and layers that represent non-moving
788         clips (i.e. overflow:hidden and 'clip') between them. This patch adds
789         LayerAncestorClippingStack to represent this stack of clipping layers. For example with the
790         following content:
791         
792         <div style="overflow:hidden"> <--- A
793             <div style="overflow:scroll"> <--- B
794                 <div style="overflow:hidden"> <--- C
795                     <div style="overflow:hidden"> <--- D
796                         <div style="overflow:scroll">  <--- E
797                             <div style="overflow:hidden"> <--- F
798                                 <div style="overflow:hidden"> <--- G
799                                     <div></div> <--- H
800                                 <div>
801                             <div>
802                         <div>
803                     <div>
804                 <div>
805             <div>
806         <div>
807         
808         the composited RenderLayer for H owns a LayerAncestorClippingStack with the following contents:
809             [clip - A]
810             [scroller - B]
811             [clip - intersection of C and D]
812             [scroller - E]
813             [clip - intersection of F and G]
814
815         Each stack entry has a 'masksToBounds' GraphicsLayer for clipping. Entries representing
816         overflow:scroll clips have a ScrollingNodeID for their OverflowScrollProxy scrolling tree
817         node (which references the actual OverflowScrollingNode). The non-scroller clips in this
818         stack are computed unconstrained by the enclosing overflow:scroll.
819
820         When the OverflowScrollingNode is scrolled, the boundsOrigin of related OverflowScrollProxy nodes
821         is adjusted to move the descendant layers (other clipping layers, or composited layers).
822
823         OverflowScrollProxy nodes thus take over the role that "Moves" ScrollingTreePositionedNode had.
824         With this patch, ScrollingTreePositionedNode are purely for absolute position inside non-containing-block
825         stacking context overflow scroll. LayoutConstraints is renamed to AbsolutePositionConstraints accordingly.
826
827         Tests: compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html
828                compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html
829                compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html
830                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html
831                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html
832                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html
833                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html
834                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html
835                compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html
836                scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html
837                scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html
838
839         * Sources.txt:
840         * WebCore.xcodeproj/project.pbxproj:
841         * page/scrolling/AsyncScrollingCoordinator.cpp:
842         (WebCore::AsyncScrollingCoordinator::setPositionedNodeConstraints):
843         (WebCore::AsyncScrollingCoordinator::setPositionedNodeGeometry): Deleted.
844         * page/scrolling/AsyncScrollingCoordinator.h:
845         * page/scrolling/ScrollingConstraints.cpp:
846         (WebCore::operator<<):
847         * page/scrolling/ScrollingConstraints.h:
848         (WebCore::AbsolutePositionConstraints::operator== const):
849         (WebCore::AbsolutePositionConstraints::operator!= const):
850         (WebCore::LayoutConstraints::operator== const): Deleted.
851         (WebCore::LayoutConstraints::operator!= const): Deleted.
852         (WebCore::LayoutConstraints::alignmentOffset const): Deleted.
853         (WebCore::LayoutConstraints::setAlignmentOffset): Deleted.
854         (WebCore::LayoutConstraints::layerPositionAtLastLayout const): Deleted.
855         (WebCore::LayoutConstraints::setLayerPositionAtLastLayout): Deleted.
856         (WebCore::LayoutConstraints::scrollPositioningBehavior const): Deleted.
857         (WebCore::LayoutConstraints::setScrollPositioningBehavior): Deleted.
858         * page/scrolling/ScrollingCoordinator.h:
859         (WebCore::ScrollingCoordinator::setPositionedNodeConstraints):
860         (WebCore::ScrollingCoordinator::setPositionedNodeGeometry): Deleted.
861         * page/scrolling/ScrollingStatePositionedNode.cpp:
862         (WebCore::ScrollingStatePositionedNode::updateConstraints):
863         * page/scrolling/ScrollingStatePositionedNode.h:
864         * page/scrolling/ScrollingTree.cpp:
865         (WebCore::ScrollingTree::commitTreeState):
866         * page/scrolling/ScrollingTree.h:
867         (WebCore::ScrollingTree::nodesWithRelatedOverflow):
868         (WebCore::ScrollingTree::positionedNodesWithRelatedOverflow): Deleted.
869         * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
870         (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
871         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
872         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
873         * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
874         (WebCore::ScrollingTreePositionedNode::scrollPositioningBehavior const): Deleted.
875         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
876         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
877         (WebCore::ScrollingTreePositionedNode::scrollDeltaSinceLastCommit const):
878         * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
879         (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
880         * rendering/LayerAncestorClippingStack.cpp: Added.
881         (WebCore::LayerAncestorClippingStack::LayerAncestorClippingStack):
882         (WebCore::LayerAncestorClippingStack::equalToClipData const):
883         (WebCore::LayerAncestorClippingStack::hasAnyScrollingLayers const):
884         (WebCore::LayerAncestorClippingStack::clear):
885         (WebCore::LayerAncestorClippingStack::detachFromScrollingCoordinator):
886         (WebCore::LayerAncestorClippingStack::firstClippingLayer const):
887         (WebCore::LayerAncestorClippingStack::lastClippingLayer const):
888         (WebCore::LayerAncestorClippingStack::lastOverflowScrollProxyNodeID const):
889         (WebCore::LayerAncestorClippingStack::updateScrollingNodeLayers):
890         (WebCore::LayerAncestorClippingStack::updateWithClipData):
891         (WebCore::operator<<):
892         * rendering/LayerAncestorClippingStack.h: Added.
893         (WebCore::CompositedClipData::CompositedClipData):
894         (WebCore::CompositedClipData::operator== const):
895         (WebCore::CompositedClipData::operator!= const):
896         (WebCore::LayerAncestorClippingStack::stack):
897         (WebCore::LayerAncestorClippingStack::stack const):
898         * rendering/RenderLayerBacking.cpp:
899         (WebCore::RenderLayerBacking::~RenderLayerBacking):
900         (WebCore::RenderLayerBacking::updateDebugIndicators):
901         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
902         (WebCore::RenderLayerBacking::updateTransform):
903         (WebCore::RenderLayerBacking::updateBlendMode):
904         (WebCore::RenderLayerBacking::updateAfterLayout):
905         (WebCore::RenderLayerBacking::updateConfiguration):
906         (WebCore::computeOffsetFromAncestorGraphicsLayer):
907         (WebCore::RenderLayerBacking::computePrimaryGraphicsLayerRect const):
908         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
909         (WebCore::RenderLayerBacking::updateGeometry):
910         (WebCore::RenderLayerBacking::updateInternalHierarchy):
911         (WebCore::RenderLayerBacking::updateAncestorClippingStack):
912         (WebCore::RenderLayerBacking::updateAncestorClipping):
913         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
914         (WebCore::RenderLayerBacking::scrollingNodeIDForChildren const):
915         (WebCore::RenderLayerBacking::childForSuperlayers const):
916         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate const):
917         (WebCore::operator<<):
918         (WebCore::RenderLayerBacking::updateAncestorClippingLayer): Deleted.
919         (WebCore::RenderLayerBacking::coordinatedScrollingRoles const): Deleted.
920         * rendering/RenderLayerBacking.h:
921         * rendering/RenderLayerCompositor.cpp:
922         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
923         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
924         (WebCore::RenderLayerCompositor::layerStyleChanged): We need to run the checks for changed
925         clipping whether or not this layer has backing, because a non-composited layer with clipping can be
926         represented in the clipping stack of some other layer.
927         (WebCore::RenderLayerCompositor::clippedByAncestor const):
928         (WebCore::RenderLayerCompositor::updateAncestorClippingStack const):
929         (WebCore::RenderLayerCompositor::computeAncestorClippingStack const): The output of this function
930         is a Vector<CompositedClipData> which represents the ancestor clipping stack, but without the proxy node
931         and GraphicsLayer information. It's input to LayerAncestorClippingStack::updateWithClipData() which does
932         the merging of old and new states.
933         (WebCore::collectRelatedCoordinatedScrollingNodes):
934         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
935         (WebCore::scrollCoordinationRoleForNodeType):
936         (WebCore::RenderLayerCompositor::attachScrollingNode):
937         (WebCore::RenderLayerCompositor::registerScrollingNodeID):
938         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
939         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
940         (WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const): Code moved from RenderLayerBacking.
941         (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
942         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):
943         (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):
944         * rendering/RenderLayerCompositor.h:
945         (WebCore::allScrollCoordinationRoles):
946
947 2019-06-23  Simon Fraser  <simon.fraser@apple.com>
948
949         Add OverflowScrollProxyNodes to the scrolling tree
950         https://bugs.webkit.org/show_bug.cgi?id=199132
951
952         Reviewed by Antti Koivisto.
953
954         Add ScrollingStateOverflowScrollProxyNode and ScrollingTreeOverflowScrollProxyNode. These
955         nodes represent clip and scroll position for an overflow:scroll in the containing block chain,
956         but not the paint ancestor chain of a layer. They will be used to correctly manipulate clip
957         rects for composited layers in non-stacking-context scrollers, and in a future patch will
958         replace the functionality of "Moves" positioned nodes.
959
960         An OverflowScrollProxyNode has the ScrollingNodeID of the scrolling node that it relates to,
961         and we use the existing "related overflow nodes" to create the back references in the scrolling tree.
962
963         These nodes are not instantiated yet; a future patch will hook them up.
964
965         * Sources.txt:
966         * SourcesCocoa.txt:
967         * WebCore.xcodeproj/project.pbxproj:
968         * page/scrolling/AsyncScrollingCoordinator.cpp:
969         (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
970         * page/scrolling/ScrollingCoordinator.cpp:
971         (WebCore::operator<<):
972         * page/scrolling/ScrollingCoordinatorTypes.h:
973         * page/scrolling/ScrollingStateNode.h:
974         (WebCore::ScrollingStateNode::isOverflowScrollProxyNode const):
975         * page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp: Added.
976         (WebCore::ScrollingStateOverflowScrollProxyNode::create):
977         (WebCore::ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode):
978         (WebCore::ScrollingStateOverflowScrollProxyNode::clone):
979         (WebCore::ScrollingStateOverflowScrollProxyNode::setOverflowScrollingNode):
980         (WebCore::ScrollingStateOverflowScrollProxyNode::dumpProperties const):
981         * page/scrolling/ScrollingStateOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
982         (WebCore::ScrollingStateOverflowScrollProxyNode::overflowScrollingNode const):
983         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
984         * page/scrolling/ScrollingStateTree.cpp:
985         (WebCore::ScrollingStateTree::createNode):
986         * page/scrolling/ScrollingTreeNode.h:
987         (WebCore::ScrollingTreeNode::isOverflowScrollProxyNode const):
988         * page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
989         (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
990         (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
991         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
992         (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
993         (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
994         * page/scrolling/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
995         * page/scrolling/ScrollingTreeScrollingNode.h:
996         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
997         (WebCore::ScrollingTreeOverflowScrollProxyNode::overflowScrollingNodeID const):
998         (WebCore::ScrollingTreeOverflowScrollProxyNode::layer const):
999         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: Added.
1000         (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
1001         (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
1002         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
1003         (WebCore::ScrollingTreeOverflowScrollProxyNode::scrollDeltaSinceLastCommit const):
1004         (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
1005         (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
1006         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
1007         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1008         * page/scrolling/mac/ScrollingTreeMac.cpp:
1009         (ScrollingTreeMac::createScrollingTreeNode):
1010         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
1011         (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
1012         * rendering/RenderLayerCompositor.cpp:
1013         (WebCore::scrollCoordinationRoleForNodeType):
1014
1015 2019-06-23  Zalan Bujtas  <zalan@apple.com>
1016
1017         [LFC][IFC] Non-baseline aligned inline container should not mutate the baseline
1018         https://bugs.webkit.org/show_bug.cgi?id=199129
1019         <rdar://problem/52022533>
1020
1021         Reviewed by Antti Koivisto.
1022
1023         Only baseline aligned inline container (<span style="vertical-aligned: baseline">) should adjust line's baseline.
1024         This patch also fixes m_baselineTop's value when we apply the initial strut.
1025
1026         * layout/inlineformatting/InlineLine.cpp:
1027         (WebCore::Layout::isInlineContainerConsideredEmpty):
1028         (WebCore::Layout::Line::isVisuallyEmpty const):
1029         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
1030
1031 2019-06-22  Zalan Bujtas  <zalan@apple.com>
1032
1033         [LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style.
1034         https://bugs.webkit.org/show_bug.cgi?id=199127
1035         <rdar://problem/52017744>
1036
1037         Reviewed by Antti Koivisto.
1038
1039         <span style="vertical-align: bottom">bottom aligned text</span>
1040         The InlineBox wrapper for the "bottom aligned text" content should take the parent span's style.
1041
1042         * layout/layouttree/LayoutTreeBuilder.cpp:
1043         (WebCore::Layout::TreeBuilder::createSubTree):
1044
1045 2019-06-22  Antoine Quint  <graouts@apple.com>
1046
1047         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
1048         https://bugs.webkit.org/show_bug.cgi?id=198999
1049         <rdar://problem/52005663>
1050
1051         Reviewed by Dean Jackson.
1052
1053         We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events.
1054
1055         * page/PointerCaptureController.cpp:
1056         (WebCore::PointerCaptureController::processPendingPointerCapture):
1057
1058 2019-06-22  Andres Gonzalez  <andresg_22@apple.com>
1059
1060         Accessibility objects contained in links should honor the aria-haspopup attribute in the ancestor link.
1061         https://bugs.webkit.org/show_bug.cgi?id=199107
1062         <rdar://problem/43663611>
1063
1064         Reviewed by Chris Fleizach.
1065
1066         Tests: accessibility/ios-simulator/button-with-aria-haspopup-role.html
1067                accessibility/ios-simulator/element-haspopup.html
1068
1069         If an accessibility object is contained within an <a>, we should check
1070         the aria-haspopup attribute on the ancestor <a> element. This was done
1071         before in the iOS WebKit accessibility bunddle override.
1072         * accessibility/AccessibilityRenderObject.cpp:
1073         (WebCore::AccessibilityRenderObject::hasPopup const):
1074
1075 2019-06-22  Robin Morisset  <rmorisset@apple.com> and Yusuke Suzuki  <ysuzuki@apple.com>
1076
1077         All prototypes should call didBecomePrototype()
1078         https://bugs.webkit.org/show_bug.cgi?id=196315
1079
1080         Reviewed by Saam Barati.
1081
1082         * bindings/js/JSDOMIterator.h:
1083         (WebCore::IteratorTraits>::finishCreation):
1084         * bindings/js/JSDOMWindowProperties.h:
1085         (WebCore::JSDOMWindowProperties::create): Deleted.
1086         (WebCore::JSDOMWindowProperties::createStructure): Deleted.
1087         (WebCore::JSDOMWindowProperties::JSDOMWindowProperties): Deleted.
1088         * bindings/js/JSWindowProxy.cpp:
1089         (WebCore::JSWindowProxy::setWindow):
1090         * bindings/scripts/CodeGeneratorJS.pm:
1091         (GeneratePrototypeDeclaration):
1092         (GenerateConstructorHelperMethods):
1093         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1094         (WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype):
1095         * bindings/scripts/test/JS/JSMapLike.cpp:
1096         (WebCore::JSMapLikePrototype::JSMapLikePrototype):
1097         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1098         (WebCore::JSReadOnlyMapLikePrototype::JSReadOnlyMapLikePrototype):
1099         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1100         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
1101         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1102         (WebCore::JSTestCEReactionsPrototype::JSTestCEReactionsPrototype):
1103         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1104         (WebCore::JSTestCEReactionsStringifierPrototype::JSTestCEReactionsStringifierPrototype):
1105         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1106         (WebCore::JSTestCallTracerPrototype::JSTestCallTracerPrototype):
1107         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1108         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype):
1109         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
1110         (WebCore::JSTestDOMJITPrototype::JSTestDOMJITPrototype):
1111         (WebCore::JSTestDOMJITConstructor::prototypeForStructure):
1112         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1113         (WebCore::JSTestEnabledBySettingPrototype::JSTestEnabledBySettingPrototype):
1114         * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
1115         (WebCore::JSTestEnabledForContextPrototype::JSTestEnabledForContextPrototype):
1116         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1117         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
1118         (WebCore::JSTestEventConstructorConstructor::prototypeForStructure):
1119         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1120         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
1121         (WebCore::JSTestEventTargetConstructor::prototypeForStructure):
1122         * bindings/scripts/test/JS/JSTestException.cpp:
1123         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
1124         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1125         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
1126         * bindings/scripts/test/JS/JSTestGlobalObject.h:
1127         (WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype):
1128         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
1129         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::JSTestIndexedSetterNoIdentifierPrototype):
1130         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
1131         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::JSTestIndexedSetterThrowingExceptionPrototype):
1132         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
1133         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::JSTestIndexedSetterWithIdentifierPrototype):
1134         * bindings/scripts/test/JS/JSTestInterface.cpp:
1135         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
1136         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
1137         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::JSTestInterfaceLeadingUnderscorePrototype):
1138         * bindings/scripts/test/JS/JSTestIterable.cpp:
1139         (WebCore::JSTestIterablePrototype::JSTestIterablePrototype):
1140         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1141         (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
1142         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1143         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
1144         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
1145         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::JSTestNamedAndIndexedSetterNoIdentifierPrototype):
1146         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
1147         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::JSTestNamedAndIndexedSetterThrowingExceptionPrototype):
1148         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
1149         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::JSTestNamedAndIndexedSetterWithIdentifierPrototype):
1150         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1151         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
1152         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
1153         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::JSTestNamedDeleterNoIdentifierPrototype):
1154         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
1155         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::JSTestNamedDeleterThrowingExceptionPrototype):
1156         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
1157         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::JSTestNamedDeleterWithIdentifierPrototype):
1158         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
1159         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::JSTestNamedDeleterWithIndexedGetterPrototype):
1160         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
1161         (WebCore::JSTestNamedGetterCallWithPrototype::JSTestNamedGetterCallWithPrototype):
1162         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
1163         (WebCore::JSTestNamedGetterNoIdentifierPrototype::JSTestNamedGetterNoIdentifierPrototype):
1164         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
1165         (WebCore::JSTestNamedGetterWithIdentifierPrototype::JSTestNamedGetterWithIdentifierPrototype):
1166         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
1167         (WebCore::JSTestNamedSetterNoIdentifierPrototype::JSTestNamedSetterNoIdentifierPrototype):
1168         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
1169         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::JSTestNamedSetterThrowingExceptionPrototype):
1170         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
1171         (WebCore::JSTestNamedSetterWithIdentifierPrototype::JSTestNamedSetterWithIdentifierPrototype):
1172         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
1173         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::JSTestNamedSetterWithIndexedGetterPrototype):
1174         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
1175         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::JSTestNamedSetterWithIndexedGetterAndSetterPrototype):
1176         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
1177         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::JSTestNamedSetterWithOverrideBuiltinsPrototype):
1178         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
1179         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::JSTestNamedSetterWithUnforgablePropertiesPrototype):
1180         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
1181         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype):
1182         * bindings/scripts/test/JS/JSTestNode.cpp:
1183         (WebCore::JSTestNodePrototype::JSTestNodePrototype):
1184         (WebCore::JSTestNodeConstructor::prototypeForStructure):
1185         * bindings/scripts/test/JS/JSTestObj.cpp:
1186         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
1187         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1188         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
1189         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1190         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::JSTestOverloadedConstructorsWithSequencePrototype):
1191         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1192         (WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype):
1193         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
1194         (WebCore::JSTestPluginInterfacePrototype::JSTestPluginInterfacePrototype):
1195         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1196         (WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype):
1197         (WebCore::JSTestPromiseRejectionEventConstructor::prototypeForStructure):
1198         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1199         (WebCore::JSTestSerializationPrototype::JSTestSerializationPrototype):
1200         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
1201         (WebCore::JSTestSerializationIndirectInheritancePrototype::JSTestSerializationIndirectInheritancePrototype):
1202         (WebCore::JSTestSerializationIndirectInheritanceConstructor::prototypeForStructure):
1203         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
1204         (WebCore::JSTestSerializationInheritPrototype::JSTestSerializationInheritPrototype):
1205         (WebCore::JSTestSerializationInheritConstructor::prototypeForStructure):
1206         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
1207         (WebCore::JSTestSerializationInheritFinalPrototype::JSTestSerializationInheritFinalPrototype):
1208         (WebCore::JSTestSerializationInheritFinalConstructor::prototypeForStructure):
1209         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1210         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
1211         * bindings/scripts/test/JS/JSTestStringifier.cpp:
1212         (WebCore::JSTestStringifierPrototype::JSTestStringifierPrototype):
1213         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
1214         (WebCore::JSTestStringifierAnonymousOperationPrototype::JSTestStringifierAnonymousOperationPrototype):
1215         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
1216         (WebCore::JSTestStringifierNamedOperationPrototype::JSTestStringifierNamedOperationPrototype):
1217         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
1218         (WebCore::JSTestStringifierOperationImplementedAsPrototype::JSTestStringifierOperationImplementedAsPrototype):
1219         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
1220         (WebCore::JSTestStringifierOperationNamedToStringPrototype::JSTestStringifierOperationNamedToStringPrototype):
1221         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
1222         (WebCore::JSTestStringifierReadOnlyAttributePrototype::JSTestStringifierReadOnlyAttributePrototype):
1223         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1224         (WebCore::JSTestStringifierReadWriteAttributePrototype::JSTestStringifierReadWriteAttributePrototype):
1225         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1226         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
1227
1228 2019-06-22  Mike Gorse  <mgorse@suse.com>
1229
1230         webkitgtk 2.24.2 fails to build w/gstreamer 1.12.5
1231         https://bugs.webkit.org/show_bug.cgi?id=198080
1232
1233         Reviewed by Philippe Normand.
1234
1235         No new tests (build fix only).
1236
1237         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1238         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1239         Move includes of gst/gl/gl.h and epoxy/gl.h into
1240         MediaPlayerPrivateGStreamerBase.h.
1241
1242 2019-06-21  Sihui Liu  <sihui_liu@apple.com>
1243
1244         openDatabase should return an empty object when WebSQL is disabled
1245         https://bugs.webkit.org/show_bug.cgi?id=198805
1246
1247         Reviewed by Geoffrey Garen.
1248
1249         Some websites rely on calling openDatabase with null parameters to check for private browsing. To not break 
1250         those sites, we now expose openDatabase interface even if Web SQL is disabled. When Web SQL is disabled, 
1251         window.openDatabase returns false, but it is callable and returns empty object.
1252
1253         Test: WebSQL.OpenDatabaseAlwaysExists
1254
1255         * Modules/webdatabase/DOMWindowWebDatabase.idl:
1256         * bindings/js/JSDOMWindowCustom.cpp:
1257         (WebCore::jsDOMWindowInstanceFunctionOpenDatabaseBody):
1258         (WebCore::IDLOperation<JSDOMWindow>::cast):
1259         (WebCore::jsDOMWindowInstanceFunctionOpenDatabase):
1260         (WebCore::JSDOMWindow::openDatabase const):
1261
1262 2019-06-21  Ryosuke Niwa  <rniwa@webkit.org>
1263
1264         Nullptr crash in DeleteSelectionCommand::handleGeneralDelete
1265         https://bugs.webkit.org/show_bug.cgi?id=199126
1266
1267         Reviewed by Wenson Hsieh.
1268
1269         Added null checks to handleGeneralDelete as well as mergeParagraphs which runs after handleGeneralDelete to be defensive.
1270
1271         Unfortunately no new tests since there is no reproducible test case.
1272
1273         * editing/DeleteSelectionCommand.cpp:
1274         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
1275         (WebCore::DeleteSelectionCommand::mergeParagraphs):
1276
1277 2019-06-21  Youenn Fablet  <youenn@apple.com>
1278
1279         ResourceLoadNotifier should check whether its frame document loader is null
1280         https://bugs.webkit.org/show_bug.cgi?id=199118
1281
1282         Reviewed by Geoffrey Garen.
1283
1284         * loader/ResourceLoadNotifier.cpp:
1285         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
1286
1287 2019-06-21  Jiewen Tan  <jiewen_tan@apple.com>
1288
1289         WebPageProxy::loadData should accept ShouldOpenExternalURLsPolicy
1290         https://bugs.webkit.org/show_bug.cgi?id=199114
1291         <rdar://problem/51671674>
1292
1293         Reviewed by Youenn Fablet.
1294
1295         Covered by new test content within existing tests.
1296
1297         * loader/FrameLoaderTypes.h:
1298         Adds an EnumTraits for ShouldOpenExternalURLsPolicy.
1299
1300 2019-06-21  Saam Barati  <sbarati@apple.com>
1301
1302         [WHLSL] Code that accesses an undefined variable crashes
1303         https://bugs.webkit.org/show_bug.cgi?id=198775
1304
1305         Reviewed by Myles C. Maxfield.
1306
1307         Myles mostly fixed this in r246631 when he made NameResolver propagate
1308         its error to its parent NameResolver. However, there was still one bug
1309         where we ended up calling setError twice for an if statement. This patch
1310         fixes that and adds tests.
1311
1312         Tests: webgpu/whlsl-use-undefined-variable-2.html
1313                webgpu/whlsl-use-undefined-variable.html
1314
1315         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
1316         (WebCore::WHLSL::NameResolver::visit):
1317
1318 2019-06-21  Truitt Savell  <tsavell@apple.com>
1319
1320         Unreviewed, rolling out r246611.
1321
1322         Introduced a flakey test.
1323
1324         Reverted changeset:
1325
1326         "iOS 12.2 Drawing portrait video to canvas is sideways"
1327         https://bugs.webkit.org/show_bug.cgi?id=196772
1328         https://trac.webkit.org/changeset/246611
1329
1330 2019-06-21  Tim Horton  <timothy_horton@apple.com>
1331
1332         Preview of <picture> element doesn't match element bounds
1333         https://bugs.webkit.org/show_bug.cgi?id=199049
1334         <rdar://problem/51474402>
1335
1336         Reviewed by Simon Fraser.
1337
1338         Test: fast/text-indicator/text-indicator-uses-img-size-inside-picture.html
1339
1340         * dom/DOMRectReadOnly.idl:
1341         * dom/Range.cpp:
1342         (WebCore::Range::absoluteRectsForRangeInText const):
1343         (WebCore::Range::absoluteTextRects const):
1344         (WebCore::Range::borderAndTextRects const):
1345         (WebCore::Range::boundingRect const):
1346         (WebCore::Range::absoluteBoundingRect const):
1347         * dom/Range.h:
1348         (WebCore::Range::absoluteTextRects):
1349         (WebCore::Range::absoluteBoundingRect):
1350         (WebCore::Range::borderAndTextRects):
1351         (WebCore::Range::boundingRect):
1352         * page/TextIndicator.cpp:
1353         (WebCore::absoluteBoundingRectForRange):
1354         (WebCore::estimatedBackgroundColorForRange):
1355         (WebCore::initializeIndicator):
1356         * rendering/RenderBlock.h:
1357         * testing/Internals.cpp:
1358         (WebCore::Internals::TextIndicatorData::TextIndicatorData):
1359         (WebCore::Internals::TextIndicatorData::~TextIndicatorData):
1360         (WebCore::Internals::textIndicatorForRange):
1361         * testing/Internals.h:
1362         * testing/Internals.idl:
1363
1364 2019-06-21  Youenn Fablet  <youenn@apple.com>
1365
1366         Safari crashes after ~2028 OfflineAudioContext objects are created (they never get garbage collected, consuming a thread each)
1367         https://bugs.webkit.org/show_bug.cgi?id=198964
1368         <rdar://problem/51891520>
1369
1370         Reviewed by Jer Noble.
1371
1372         Move from setPendingActivity/unsetPendingActivity to an
1373         m_pendingActivity member which is easier to manage.
1374
1375         Keep setting a pending activity for AudioContext at construction time
1376         but do not do that for Offline contexts.
1377         Instead, set the pending activity when startRendering is called.
1378         Unset the pending activity when the rendering activity is finished.
1379
1380         Make m_audioDecoder a unique pointer so that it can lazily be initialized.
1381         This removes the burden of creating an audio decoder thread for each context.
1382
1383         Test: webaudio/offlineaudiocontext-gc.html
1384
1385         * Modules/webaudio/AudioContext.cpp:
1386         (WebCore::AudioContext::AudioContext):
1387         (WebCore::AudioContext::constructCommon):
1388         (WebCore::AudioContext::clear):
1389         (WebCore::AudioContext::decodeAudioData):
1390         (WebCore::AudioContext::startRendering):
1391         (WebCore::AudioContext::finishedRendering):
1392         (WebCore::AudioContext::dispatchEvent):
1393         (WebCore::AudioContext::clearPendingActivity):
1394         (WebCore::AudioContext::makePendingActivity):
1395         To keep it consistent with setPendingActivity/unsetPendingActivity, we
1396         explicitly ref/unref the AudioContext. We should try to remove this ref/unref.
1397         * Modules/webaudio/AudioContext.h:
1398         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
1399         (WebCore::OfflineAudioDestinationNode::startRendering):
1400
1401 2019-06-21  Truitt Savell  <tsavell@apple.com>
1402
1403         Unreviewed, rolling out r246655.
1404
1405         Introduced a failing test
1406
1407         Reverted changeset:
1408
1409         "Web Inspector: AXI: Audit: image label test is throwing
1410         spurious errors on elements with existing alt attr, but no
1411         value: <img alt>"
1412         https://bugs.webkit.org/show_bug.cgi?id=194754
1413         https://trac.webkit.org/changeset/246655
1414
1415 2019-06-21  Myles C. Maxfield  <mmaxfield@apple.com>
1416
1417         [WHLSL] read modify write expressions do no work as expected
1418         https://bugs.webkit.org/show_bug.cgi?id=195864
1419
1420         Reviewed by Saam Barati.
1421
1422         Turns out https://bugs.webkit.org/show_bug.cgi?id=199037 already fixed everything.
1423         This patch just adds a test.
1424
1425         Test: webgpu/whlsl-read-modify-write.html
1426
1427         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
1428
1429 2019-06-21  Zalan Bujtas  <zalan@apple.com>
1430
1431         [LFC][IFC] Adjust baseline top when the baseline moves.
1432         https://bugs.webkit.org/show_bug.cgi?id=199091
1433         <rdar://problem/51966257>
1434
1435         Reviewed by Antti Koivisto.
1436
1437         Currently only "text-align: bottom" adjusts the baseline top. This patch fixes the "text-align: baseline" case when
1438         the growing ascent pushes the baseline top closer to the line top.
1439
1440         * layout/inlineformatting/InlineLine.cpp:
1441         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
1442
1443 2019-06-21  Zalan Bujtas  <zalan@apple.com>
1444
1445         [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
1446         https://bugs.webkit.org/show_bug.cgi?id=199100
1447         <rdar://problem/51973614>
1448
1449         Reviewed by Antti Koivisto.
1450
1451         m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height).
1452
1453         * layout/inlineformatting/InlineLine.cpp:
1454         (WebCore::Layout::Line::close):
1455         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
1456         * layout/inlineformatting/InlineLine.h:
1457         (WebCore::Layout::Line::logicalHeight const):
1458
1459 2019-06-21  Zalan Bujtas  <zalan@apple.com>
1460
1461         [LFC][IFC] LineBox::Baseline should have a height getter.
1462         https://bugs.webkit.org/show_bug.cgi?id=199092
1463         <rdar://problem/51966958>
1464
1465         Reviewed by Antti Koivisto.
1466
1467         The baseline height does not need to be a getter on the Line (no one calls it).
1468
1469         * layout/inlineformatting/InlineLine.cpp:
1470         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
1471         * layout/inlineformatting/InlineLine.h:
1472         (WebCore::Layout::Line::contentLogicalWidth const):
1473         (WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted.
1474         * layout/inlineformatting/InlineLineBox.h:
1475         (WebCore::Layout::LineBox::Baseline::height const):
1476
1477 2019-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
1478
1479         [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo
1480         https://bugs.webkit.org/show_bug.cgi?id=199094
1481
1482         Reviewed by Carlos Garcia Campos.
1483
1484         * accessibility/atk/AXObjectCacheAtk.cpp:
1485         (WebCore::AXObjectCache::postPlatformNotification):
1486         * accessibility/atk/WebKitAccessible.cpp:
1487         (atkRole):
1488         (setAtkStateSetFromCoreObject):
1489         (interfaceMaskFromObject):
1490         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
1491         * accessibility/atk/WebKitAccessibleInterfaceTableCell.h:
1492         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1493         (webkitAccessibleTextGetStringAtOffset):
1494         (webkitAccessibleTextInterfaceInit):
1495         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
1496         (webkitAccessibleValueInterfaceInit):
1497         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
1498         (WebCore::AudioTrackPrivateGStreamer::kind const):
1499         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
1500         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1501         (WTF::derefGPtr<GstStreamCollection>):
1502         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
1503         * platform/graphics/gstreamer/GStreamerCommon.cpp:
1504         (WebCore::initializeGStreamerAndRegisterWebKitElements):
1505         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1506         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
1507         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1508         (WebCore::InbandTextTrackPrivateGStreamer::create):
1509         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1510         (WebCore::MediaPlayerPrivateGStreamer::load):
1511         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
1512         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
1513         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1514         (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
1515         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
1516         (WebCore::MediaPlayerPrivateGStreamer::supportsType):
1517         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
1518         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1519         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1520         (WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext):
1521         (WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink):
1522         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
1523         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1524         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1525         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
1526         (WebCore::TrackPrivateBaseGStreamer::disconnect):
1527         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1528         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1529         (WebCore::TrackPrivateBaseGStreamer::stream):
1530         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
1531         (WebCore::VideoTrackPrivateGStreamer::kind const):
1532         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
1533         * platform/gtk/PlatformKeyboardEventGtk.cpp:
1534         (WebCore::eventTypeForGdkKeyEvent):
1535         * platform/gtk/PlatformMouseEventGtk.cpp:
1536         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
1537         * platform/gtk/PlatformScreenGtk.cpp:
1538         (WebCore::screenRect):
1539         (WebCore::screenAvailableRect):
1540         (WebCore::screenHasTouchDevice):
1541         (WebCore::screenIsTouchPrimaryInputDevice):
1542         (): Deleted.
1543         (WebCore::isTouchDevice): Deleted.
1544         (WebCore::deviceAddedCallback): Deleted.
1545         (WebCore::deviceRemovedCallback): Deleted.
1546         * platform/gtk/PlatformWheelEventGtk.cpp:
1547         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
1548         * platform/gtk/RenderThemeGadget.cpp:
1549         * platform/gtk/RenderThemeGadget.h:
1550         * platform/gtk/RenderThemeWidget.cpp:
1551         * platform/gtk/RenderThemeWidget.h:
1552         * platform/gtk/ScrollbarThemeGtk.cpp:
1553         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk):
1554         (WebCore::ScrollbarThemeGtk::themeChanged):
1555         (WebCore::ScrollbarThemeGtk::updateThemeProperties):
1556         (WebCore::ScrollbarThemeGtk::trackRect):
1557         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
1558         (WebCore::ScrollbarThemeGtk::paint):
1559         (WebCore::ScrollbarThemeGtk::scrollbarThickness):
1560         (WebCore::createStyleContext): Deleted.
1561         (WebCore::createChildStyleContext): Deleted.
1562         (WebCore::paintStepper): Deleted.
1563         (WebCore::adjustRectAccordingToMargin): Deleted.
1564         * platform/mediastream/gstreamer/GStreamerCapturer.cpp:
1565         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
1566         * platform/network/soup/ResourceRequest.h:
1567         (WebCore::toSoupMessagePriority):
1568         * platform/network/soup/SoupNetworkSession.cpp:
1569         (WebCore::SoupNetworkSession::SoupNetworkSession):
1570         * rendering/RenderThemeGtk.cpp:
1571         (WebCore::themePartStateFlags):
1572         (WebCore::paintToggle):
1573         (WebCore::RenderThemeGtk::paintButton):
1574         (WebCore::menuListColor):
1575         (WebCore::RenderThemeGtk::paintMenuList):
1576         (WebCore::RenderThemeGtk::paintTextField):
1577         (WebCore::adjustSearchFieldIconStyle):
1578         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
1579         (WebCore::RenderThemeGtk::paintSliderThumb):
1580         (WebCore::RenderThemeGtk::paintProgressBar):
1581         (WebCore::RenderThemeGtk::paintInnerSpinButton):
1582         (WebCore::styleColor):
1583         (WebCore::RenderThemeGtk::systemColor const):
1584         (WebCore::RenderThemeGtk::paintMediaButton):
1585         (WebCore::createStyleContext): Deleted.
1586         (WebCore::loadThemedIcon): Deleted.
1587         (WebCore::gtkTextDirection): Deleted.
1588         (WebCore::gtkIconStateFlags): Deleted.
1589         (WebCore::adjustRectForFocus): Deleted.
1590         (WebCore::renderButton): Deleted.
1591         (WebCore::getIconSizeForPixelSize): Deleted.
1592         (WebCore::paintIcon): Deleted.
1593         (WebCore::paintEntryIcon): Deleted.
1594         (WebCore::centerRectVerticallyInParentInputElement): Deleted.
1595         (WebCore::spinButtonArrowSize): Deleted.
1596         (WebCore::paintSpinArrowButton): Deleted.
1597
1598 2019-06-20  Antoine Quint  <graouts@apple.com>
1599
1600         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
1601         https://bugs.webkit.org/show_bug.cgi?id=198999
1602
1603         Reviewed by Dean Jackson.
1604
1605         Up until now, we would not account for pointer capture (see https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
1606         mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
1607         for it when updating :hover styles.
1608
1609         Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
1610         that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
1611         boundary mouse events. Additionally, when calling EventHandler::prepareMouseEvent(), we also use the pointer capture element to
1612         eventually pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.
1613
1614         This also means that we need to re-run EventHandler::prepareMouseEvent() during mouse state changes to ensure that the :hover styles
1615         are applied correctly should the pointer capture element change during dispatch of boundary mouse events.
1616
1617         * dom/Document.cpp:
1618         (WebCore::Document::prepareMouseEvent): If there is one, use the pointer capture element instead of the hit-test target.
1619         (WebCore::Document::updateHoverActiveState): Relax the mustBeInActiveChain condition in case the pointer capture element changed when
1620         updating the :hover/:active chains.
1621         * page/EventHandler.cpp:
1622         (WebCore::EventHandler::handleMousePressEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
1623         (WebCore::EventHandler::handleMouseMoveEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
1624         (WebCore::EventHandler::handleMouseReleaseEvent): As we know the pointer capture element will be reset as part of the mouse being
1625         released, we reset the pointer capture element and EventHandler's capture element prior to invalidating hover styles and boundary events.
1626         (WebCore::EventHandler::setCapturingMouseEventsElement): Dispatch boundary events when a new element is set.
1627         (WebCore::EventHandler::dispatchMouseEvent): New dispatchMouseEvent() variant that re-processes the provided MouseEventWithHitTestResults
1628         in case the pointer capture element changes during event dispatch, as called by handleMousePressEvent() and handleMouseMoveEvent().
1629         * page/EventHandler.h:
1630         * page/PointerCaptureController.cpp:
1631         (WebCore::PointerCaptureController::pointerCaptureElement): We now need to query whay the pointer capture element might be from EventHandler,
1632         so expose a new method to access it.
1633         (WebCore::PointerCaptureController::releasePointerCapture): Since we may not call processPendingPointerCapture() until the dispatch of the
1634         next event, we must reset EventHandler's capturing mouse element right now so that the next event processed does not use it as an overriding target.
1635         (WebCore::PointerCaptureController::hasPointerCapture): We would mistakenly return true if the provided element was null, which could be the
1636         case of EventHandler's capturing element. Rather than changing call sites to check that the provided value exists, we change the method to
1637         return false when the provided element is null. Note that this does not affect the API since it's exposed on Element itself.
1638         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex): Call dispatchEvent() instead of calling pointerEventWillBeDispatched() and
1639         pointerEventWasDispatched().
1640         (WebCore::PointerCaptureController::dispatchEvent): Remove all code specific to pointer capture since now the events will be dispatched on the
1641         pointer capture element by EventHandler.
1642         (WebCore::PointerCaptureController::processPendingPointerCapture): Make sure this method is not re-entrant since it dispatches events.
1643         * page/PointerCaptureController.h:
1644         * rendering/HitTestRequest.h:
1645         (WebCore::HitTestRequest::pointerCaptureElementChanged const): Add a new HitTestRequestType bit such that we can indicate to Document::updateHoverActiveState()
1646         that it must be update the :hover/:active chains when the pointer capture element has just changed.
1647
1648 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1649
1650         [GTK] Stop pretending WebCore::Widget can have a platform widget
1651         https://bugs.webkit.org/show_bug.cgi?id=199066
1652
1653         Reviewed by Michael Catanzaro.
1654
1655         That was only possible in legacy WebKit that we no longer support. The code can be simplified a bit.
1656
1657         * platform/Widget.cpp:
1658         (WebCore::Widget::init):
1659         * platform/Widget.h:
1660         (WebCore::Widget::setPlatformWidget):
1661         (WebCore::Widget::releasePlatformWidget): Deleted.
1662         (WebCore::Widget::retainPlatformWidget): Deleted.
1663         * platform/gtk/PlatformScreenGtk.cpp:
1664         (WebCore::systemVisual):
1665         (WebCore::screenDepth):
1666         (WebCore::screenDepthPerComponent):
1667         (WebCore::screenRect):
1668         (WebCore::screenAvailableRect):
1669         (WebCore::getToplevel): Deleted.
1670         (WebCore::getVisual): Deleted.
1671         (WebCore::getScreen): Deleted.
1672         * platform/gtk/WidgetGtk.cpp:
1673         (WebCore::Widget::~Widget):
1674         (WebCore::Widget::show):
1675         (WebCore::Widget::hide):
1676         (WebCore::Widget::setIsSelected):
1677         (WebCore::Widget::setFrameRect):
1678         (WebCore::Widget::releasePlatformWidget): Deleted.
1679         (WebCore::Widget::retainPlatformWidget): Deleted.
1680         * platform/ios/WidgetIOS.mm:
1681         (WebCore::Widget::~Widget):
1682
1683 2019-06-20  Simon Fraser  <simon.fraser@apple.com>
1684
1685         Make it possible to include clipping in GraphicsLayer tree dumps
1686         https://bugs.webkit.org/show_bug.cgi?id=199096
1687
1688         Reviewed by Zalan Bujtas.
1689
1690         Add LAYER_TREE_INCLUDES_CLIPPING and plumb it down to GraphicsLayers, turning
1691         it on for a couple of tests.
1692
1693         * page/Frame.h:
1694         * platform/graphics/GraphicsLayer.cpp:
1695         (WebCore::GraphicsLayer::dumpProperties const):
1696         * platform/graphics/GraphicsLayerClient.h:
1697         * rendering/RenderLayerCompositor.cpp:
1698         (WebCore::RenderLayerCompositor::layerTreeAsText):
1699         * testing/Internals.cpp:
1700         (WebCore::toLayerTreeFlags):
1701         * testing/Internals.h:
1702         * testing/Internals.idl:
1703
1704 2019-06-20  Daniel Bates  <dabates@apple.com>
1705
1706         [iOS] Evernote crashes when creating a note
1707         https://bugs.webkit.org/show_bug.cgi?id=199083
1708         <rdar://problem/51759247>
1709
1710         Reviewed by Brent Fulgham.
1711
1712         Add runtime check whether WebKit is being used in Evernote. Evernote's bundle ID
1713         references iPhone, but they use the same ID for their iPad app as well.
1714
1715         * platform/RuntimeApplicationChecks.h:
1716         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1717         (WebCore::IOSApplication::isEvernote): Added.
1718
1719 2019-06-20  Greg Doolittle  <gr3g@apple.com>
1720
1721         Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
1722         https://bugs.webkit.org/show_bug.cgi?id=194754
1723
1724         Reviewed by Chris Fleizach.
1725
1726         Test: accessibility/img-alt-attribute-unassigned-value.html
1727
1728         * accessibility/AccessibilityObject.cpp:
1729         (WebCore::AccessibilityObject::computedRoleString const):
1730
1731 2019-06-20  Ryosuke Niwa  <rniwa@webkit.org>
1732
1733         REGRESSION(r245912): Crash in TextIterator::range via visiblePositionForIndexUsingCharacterIterator
1734         https://bugs.webkit.org/show_bug.cgi?id=199061
1735
1736         Reviewed by Wenson Hsieh.
1737
1738         Avoid calling CharacterIterator::range when it's at the end. Otherwise, we'd crash with null pointer dereferencing.
1739
1740         Unfortunately no new tests since we don't have any reproducible test case.
1741
1742         * editing/Editing.cpp:
1743         (WebCore::visiblePositionForIndexUsingCharacterIterator):
1744
1745 2019-06-20  Brent Fulgham  <bfulgham@apple.com>
1746
1747         Resolve frequent crashes in topPrivatelyControlledDomain
1748         https://bugs.webkit.org/show_bug.cgi?id=199072
1749         <rdar://problem/51428162>
1750
1751         Reviewed by Youenn Fablet.
1752
1753         Crash data indicates that we are frequently crashing when multiple threads call
1754         WebCore::topPrivatelyControlledDomain. 
1755
1756         Code review showed the potential for a thread contention issue, since WebKit builds
1757         with '--fno-threadsafe-statics'.
1758
1759         This patch corrects the thread safety issue in WebCore::topPrivatelyControlledDomain.
1760
1761         * platform/mac/PublicSuffixMac.mm:
1762         (WebCore::topPrivatelyControlledDomain): Only instantiate the static cache after the
1763         current thread has achieved its lock.
1764
1765 2019-06-20  Saam Barati  <sbarati@apple.com>
1766
1767         [WHLSL] Property resolver needs to recurse on newValueExpression for RMW operations
1768         https://bugs.webkit.org/show_bug.cgi?id=199037
1769
1770         Reviewed by Myles C. Maxfield.
1771
1772         When we had an expression like `<e1> += <e2>`, we weren't running the property
1773         resolver on <e2>. If <e2> was something like `mat[1][2]`, we wouldn't end up
1774         simplifying that into the needed getter calls. This patch fixes this by having
1775         the property resolver recurse on <e2>.
1776         
1777         This patch also fixes a bug in the property resolver where we weren't marking some
1778         dereference expressions as LValues. This was causing bugs in the metal code generator.
1779         
1780         This patch also adds a way to dump the AST between passes that are
1781         guaranteed to not fail.
1782
1783         Test: webgpu/whlsl-read-modify-write-high-zombies.html
1784
1785         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
1786         (WebCore::WHLSL::prepareShared):
1787         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
1788         (WebCore::WHLSL::PropertyResolver::visit):
1789         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
1790
1791 2019-06-20  John Wilander  <wilander@apple.com>
1792
1793         Storage Access API: Cap the number of times an iframe document can request access
1794         https://bugs.webkit.org/show_bug.cgi?id=199074
1795         <rdar://problem/51857195>
1796
1797         Reviewed by Brent Fulgham.
1798
1799         Tested manually.
1800
1801         This change just adds a counter to the number of times the user explicitly
1802         denies storage access and returns early if the counter has reached the limit
1803         of 2.
1804
1805         We hoped that iframes that request storage access would count the number
1806         of times the user has been asked and not repeat the request over and over.
1807         However, we're seeing pretty aggressive use of the API and users are
1808         complaining. Therefore, we need a cap on how many times an iframed
1809         document can ask if it is explicitly denied access by the user.
1810
1811         This is a first measure. If we see continued aggressive use of the API,
1812         we'll have to consider more drastic measures.
1813
1814         * dom/DocumentStorageAccess.cpp:
1815         (WebCore::DocumentStorageAccess::requestStorageAccess):
1816         * dom/DocumentStorageAccess.h:
1817
1818 2019-06-20  Youenn Fablet  <youenn@apple.com>
1819
1820         Changing settings of a MediaStreamTrack clone should not alter the settings of the original track
1821         https://bugs.webkit.org/show_bug.cgi?id=198840
1822
1823         Reviewed by Eric Carlson.
1824
1825         Rename RealtimeVideoSource in RealtimeVideoCaptureSource.
1826         Introduce RealtimeVideoSource as a class wrapping RealtimeVideoCaptureSource.
1827         Its goal is to be able to have independent settings from its underlying RealtimeVideoCaptureSource.
1828         It can also adapt size based on its settings if different than its RealtimeVideoCaptureSource.
1829         Apply this wrapping for AV video sources as well as mock video sources.
1830         Test: fast/mediastream/mediastreamtrack-video-clone.html
1831
1832         * Sources.txt:
1833         * WebCore.xcodeproj/project.pbxproj:
1834         * platform/mediastream/MediaStreamTrackPrivate.cpp:
1835         (WebCore::MediaStreamTrackPrivate::clone):
1836         * platform/mediastream/RealtimeMediaSource.h:
1837         * platform/mediastream/RealtimeVideoCaptureSource.cpp: Added.
1838         (WebCore::RealtimeVideoCaptureSource::RealtimeVideoCaptureSource):
1839         (WebCore::RealtimeVideoCaptureSource::~RealtimeVideoCaptureSource):
1840         (WebCore::RealtimeVideoCaptureSource::prepareToProduceData):
1841         (WebCore::RealtimeVideoCaptureSource::presets):
1842         (WebCore::RealtimeVideoCaptureSource::setSupportedPresets):
1843         (WebCore::RealtimeVideoCaptureSource::standardVideoSizes):
1844         (WebCore::updateMinMax):
1845         (WebCore::RealtimeVideoCaptureSource::updateCapabilities):
1846         (WebCore::RealtimeVideoCaptureSource::supportsSizeAndFrameRate):
1847         (WebCore::RealtimeVideoCaptureSource::frameRateRangeIncludesRate):
1848         (WebCore::RealtimeVideoCaptureSource::presetSupportsFrameRate):
1849         (WebCore::RealtimeVideoCaptureSource::supportsCaptureSize):
1850         (WebCore::RealtimeVideoCaptureSource::shouldUsePreset):
1851         (WebCore::RealtimeVideoCaptureSource::bestSupportedSizeAndFrameRate):
1852         (WebCore::RealtimeVideoCaptureSource::setSizeAndFrameRate):
1853         (WebCore::RealtimeVideoCaptureSource::adaptVideoSample):
1854         (WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers):
1855         (WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):
1856         (WebCore::SizeAndFrameRate::toJSONObject const):
1857         (WebCore::SizeAndFrameRate::toJSONString const):
1858         * platform/mediastream/RealtimeVideoCaptureSource.h: Added.
1859         (WebCore::RealtimeVideoCaptureSource::sampleRotation const):
1860         (WebCore::RealtimeVideoCaptureSource::prefersPreset):
1861         (WebCore::RealtimeVideoCaptureSource::setFrameRateWithPreset):
1862         (WebCore::RealtimeVideoCaptureSource::canResizeVideoFrames const):
1863         (WebCore::RealtimeVideoCaptureSource::setDefaultSize):
1864         (WebCore::RealtimeVideoCaptureSource::observedFrameRate const):
1865         (WTF::LogArgument<WebCore::SizeAndFrameRate>::toString):
1866         * platform/mediastream/RealtimeVideoSource.cpp:
1867         (WebCore::RealtimeVideoSource::RealtimeVideoSource):
1868         (WebCore::m_source):
1869         (WebCore::RealtimeVideoSource::~RealtimeVideoSource):
1870         (WebCore::RealtimeVideoSource::startProducingData):
1871         (WebCore::RealtimeVideoSource::stopProducingData):
1872         (WebCore::RealtimeVideoSource::supportsSizeAndFrameRate):
1873         (WebCore::RealtimeVideoSource::setSizeAndFrameRate):
1874         (WebCore::RealtimeVideoSource::sourceMutedChanged):
1875         (WebCore::RealtimeVideoSource::sourceSettingsChanged):
1876         (WebCore::RealtimeVideoSource::preventSourceFromStopping):
1877         (WebCore::RealtimeVideoSource::sourceStopped):
1878         (WebCore::RealtimeVideoSource::videoSampleAvailable):
1879         (WebCore::RealtimeVideoSource::clone):
1880         * platform/mediastream/RealtimeVideoSource.h:
1881         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
1882         (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):
1883         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
1884         * platform/mediastream/mac/AVVideoCaptureSource.h:
1885         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1886         (WebCore::AVVideoCaptureSource::create):
1887         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
1888         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
1889         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
1890         (WebCore::MockRealtimeVideoSource::create):
1891         * platform/mock/MockRealtimeVideoSource.cpp:
1892         (WebCore::MockRealtimeVideoSource::create):
1893         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
1894         (WebCore::MockRealtimeVideoSource::supportsSizeAndFrameRate):
1895         (WebCore::MockRealtimeVideoSource::setSizeAndFrameRate):
1896         * platform/mock/MockRealtimeVideoSource.h:
1897
1898 2019-06-20  Saam Barati  <sbarati@apple.com>
1899
1900         Unreviewed. More speculative build fixing for watchOS after r246631.
1901
1902         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
1903
1904 2019-06-20  Saam Barati  <sbarati@apple.com>
1905
1906         Unreviewed. Speculative build fix for watchOS after r246631.
1907
1908         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
1909
1910 2019-06-18  Darin Adler  <darin@apple.com>
1911
1912         Tidy up the remaining bits of the AtomicString to AtomString rename
1913         https://bugs.webkit.org/show_bug.cgi?id=198990
1914
1915         Reviewed by Michael Catanzaro.
1916
1917         * bindings/scripts/test/JS/JSTestObj.cpp: Updated names.
1918         * bindings/scripts/test/TestObj.idl: Ditto.
1919
1920         * css/makeprop.pl: Updated comment.
1921         * css/makevalues.pl: Ditto.
1922         * html/FormController.cpp:
1923         (WebCore::FormKeyGenerator::formKey): Ditto.
1924
1925 2019-06-20  Zalan Bujtas  <zalan@apple.com>
1926
1927         [LFC][IFC] Make the initial strut explicit
1928         https://bugs.webkit.org/show_bug.cgi?id=199057
1929         <rdar://problem/51927864>
1930
1931         Reviewed by Antti Koivisto.
1932
1933         The strut always sets the initial vertical constraints on the new line in strict mode. However in quirks mode
1934         we can ignore it as long as there's no baseline type content on the line.  
1935
1936         * layout/inlineformatting/InlineFormattingContext.h:
1937         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1938         (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
1939         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
1940         (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints):
1941         * layout/inlineformatting/InlineLine.cpp:
1942         (WebCore::Layout::Line::appendTextContent):
1943         (WebCore::Layout::Line::appendHardLineBreak):
1944         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
1945         * layout/inlineformatting/InlineLine.h:
1946
1947 2019-06-20  Zalan Bujtas  <zalan@apple.com>
1948
1949         [LFC][IFC] Introduce Line::InitialConstraints
1950         https://bugs.webkit.org/show_bug.cgi?id=199056
1951         <rdar://problem/51927597>
1952
1953         Reviewed by Antti Koivisto.
1954
1955         Line::InitialConstraints, as the name suggests, holds the initial constraint values for the new line. 
1956
1957         * layout/inlineformatting/InlineFormattingContext.h:
1958         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
1959         (WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
1960         (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
1961         (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
1962         (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
1963         * layout/inlineformatting/InlineLine.cpp:
1964         (WebCore::Layout::Line::Line):
1965         (WebCore::Layout::m_skipVerticalAligment):
1966         (WebCore::Layout::m_lineLogicalWidth): Deleted.
1967         * layout/inlineformatting/InlineLine.h:
1968
1969 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
1970
1971         [GTK] Remove support for GTK2 plugins
1972         https://bugs.webkit.org/show_bug.cgi?id=199065
1973
1974         Reviewed by Sergio Villar Senin.
1975
1976         * PlatformGTK.cmake:
1977         * SourcesGTK.txt:
1978         * SourcesWPE.txt:
1979         * platform/FreeType.cmake:
1980         * platform/SourcesGLib.txt:
1981         * platform/graphics/Color.h:
1982         * platform/graphics/PlatformDisplay.cpp:
1983         (WebCore::PlatformDisplay::createPlatformDisplay):
1984         * platform/graphics/gtk/ColorGtk.cpp:
1985         (WebCore::Color::operator GdkRGBA const):
1986         * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp:
1987         (WebCore::onFrameClockUpdate):
1988         (WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback):
1989         * platform/graphics/gtk/DisplayRefreshMonitorGtk.h:
1990         (WebCore::DisplayRefreshMonitorGtk::create):
1991         * platform/graphics/gtk/GdkCairoUtilities.cpp:
1992         * platform/gtk/GRefPtrGtk.cpp:
1993         * platform/gtk/GRefPtrGtk.h:
1994         * platform/gtk/GtkVersioning.c: Removed.
1995         * platform/gtk/GtkVersioning.h: Removed.
1996         * platform/gtk/PasteboardHelper.cpp:
1997         (WebCore::PasteboardHelper::getClipboardContents):
1998         * platform/gtk/PlatformKeyboardEventGtk.cpp:
1999         (WebCore::modifiersForGdkKeyEvent):
2000         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2001         * platform/gtk/PlatformMouseEventGtk.cpp:
2002         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2003         * platform/gtk/PlatformScreenGtk.cpp:
2004         (WebCore::screenIsTouchPrimaryInputDevice):
2005         * platform/gtk/PlatformWheelEventGtk.cpp:
2006         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2007         * platform/gtk/ScrollbarThemeGtk.cpp:
2008         * platform/gtk/ScrollbarThemeGtk.h:
2009         * platform/gtk/WidgetGtk.cpp:
2010         * rendering/RenderThemeGtk.cpp:
2011         * rendering/RenderThemeGtk.h:
2012
2013 2019-06-19  Myles C. Maxfield  <mmaxfield@apple.com>
2014
2015         [WHLSL] Hook up common texture functions
2016         https://bugs.webkit.org/show_bug.cgi?id=198704
2017         <rdar://problem/51668841>
2018
2019         Reviewed by Saam Barati.
2020
2021         This patch adds the Metal implementation of the Sample(), Load(), and GetDimensions()
2022         texture functions. The implementation simply performs string concatenation to produce the 
2023         correct results, and adds many new native functions to the standard library.
2024
2025         We can't zero-fill texture types or sampler types, so this patch forbids default
2026         constructors for those types. It also forbids those types to exist within arrays, array
2027         references, or pointers, becuase an out-of-bounds access may cause us to try to zero-fill
2028         them.
2029
2030         Tests: webgpu/whlsl-textures-getdimensions.html
2031                webgpu/whlsl-textures-load.html
2032                webgpu/whlsl-textures-sample.html
2033
2034         * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h: Add some more introspection functions
2035         so we can generate the necessary Metal functions for the appropriate texture types.
2036         (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const):
2037         (WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const):
2038         (WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const):
2039         (WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const):
2040         (WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const):
2041         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray):
2042         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture):
2043         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture):
2044         (WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension):
2045         (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtom const): Deleted.
2046         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Native types can be passed into 
2047         entry points, too.
2048         (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
2049         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Entry points that return void don't need a
2050         semantic.
2051         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
2052         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Implement the functions.
2053         (WebCore::WHLSL::Metal::vectorLength):
2054         (WebCore::WHLSL::Metal::vectorInnerType):
2055         (WebCore::WHLSL::Metal::vectorSuffix):
2056         (WebCore::WHLSL::Metal::writeNativeFunction):
2057         * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp: Textures come in two flavors: sample-able
2058         and read/write-able. Make sure we produce the correct Metal types for them.
2059         (WebCore::WHLSL::Metal::writeNativeType):
2060         * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: We can't auto-initialize textures and 
2061         samplers. Therefore, this function needs to be able to fail.
2062         (WebCore::WHLSL::AutoInitialize::visit):
2063         (WebCore::WHLSL::autoInitializeVariables):
2064         * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h:
2065         * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: We can't auto-initialize textures, so users
2066         shouldn't be able to either.
2067         (WebCore::WHLSL::checkDuplicateFunctions):
2068         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp: Added. Make sure textures and samplers can't
2069         exist inside arrays, array references, or pointers. This is because out-of-bounds accesses may cause
2070         us to attempt to zero-fill the inner type, but we can't zero-fill textures and samplers.
2071         (WebCore::WHLSL::TextureReferencesChecker::TextureReferencesChecker):
2072         (WebCore::WHLSL::Searcher::Searcher):
2073         (WebCore::WHLSL::Searcher::found const):
2074         (WebCore::WHLSL::Searcher::visit):
2075         (WebCore::WHLSL::TextureReferencesChecker::containsTextureOrSampler):
2076         (WebCore::WHLSL::TextureReferencesChecker::visit):
2077         (WebCore::WHLSL::checkTextureReferences):
2078         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h.
2079         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
2080         * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp: Record more detailed information about texture types,
2081         so we can emit correct Metal code.
2082         (WebCore::WHLSL::Intrinsics::addFullTexture):
2083         (WebCore::WHLSL::Intrinsics::addDepthTexture):
2084         * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
2085         (WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):
2086         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: Nested NameResolvers need to propagate their error. Also,
2087         native functions with named arguments shouldn't be adding their arguments to the global scope.
2088         (WebCore::WHLSL::NameResolver::visit):
2089         * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
2090         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
2091         (WebCore::WHLSL::prepareShared):
2092         * Modules/webgpu/WHLSL/WHLSLProgram.h:
2093         (WebCore::WHLSL::Program::intrinsics const):
2094         * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
2095         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: Metal doesn't have writable depth textures.
2096         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
2097         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Don't generate default constructors for textures
2098         or samplers.
2099         (WebCore::WHLSL::synthesizeConstructors):
2100         * Sources.txt:
2101         * WebCore.xcodeproj/project.pbxproj:
2102         * platform/graphics/gpu/GPUTexture.h: Make texture usages more clear.
2103         (WebCore::GPUTexture::isSampled const):
2104         (WebCore::GPUTexture::isStorage const):
2105         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Ditto.
2106         (WebCore::GPUBindGroup::tryCreate):
2107         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Ditto.
2108         (WebCore::GPUProgrammablePassEncoder::setBindGroup):
2109         * platform/graphics/gpu/cocoa/GPUTextureMetal.mm: Ditto.
2110         (WebCore::mtlTextureUsageForGPUTextureUsageFlags):
2111
2112 2019-06-19  Justin Fan  <justin_fan@apple.com>
2113
2114         [WHLSL] Create a shading language test harness
2115         https://bugs.webkit.org/show_bug.cgi?id=198978
2116
2117         Reviewed by Myles C. Maxfield.
2118
2119         When creating MTLArgumentEncoders for argument buffers, the user's arguments
2120         must match the order that they are declared in the shader. Move back-end information
2121         such as buffer lengths to the end of the argument arrays.
2122
2123         Test: webgpu/whlsl-harness-test.html
2124
2125         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
2126         (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
2127         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
2128         (WebCore::GPUBindGroupLayout::tryCreate):
2129
2130 2019-06-19  Saam Barati  <sbarati@apple.com>
2131
2132         [WHLSL] The checker needs to resolve types for the anonymous variables in ReadModifyWrite expressions
2133         https://bugs.webkit.org/show_bug.cgi?id=198988
2134
2135         Reviewed by Dean Jackson and Myles C. Maxfield.
2136
2137         This patch makes it so that the Checker assigns types to the internal variables
2138         in a read modify write expression. These were the only variables that didn't have
2139         types ascribed to them.
2140
2141         This patch also does a fly by fix where we kept pointers to value types
2142         in a HashMap in the checker. This is wrong precisely when the HashMap gets
2143         resized. Instead, we now just store the value itself since we're just
2144         dealing with a simple Variant that wraps either an empty struct or an
2145         enum.
2146
2147         Test: webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables.html
2148
2149         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
2150         (WebCore::WHLSL::AST::VariableDeclaration::setType):
2151         (WebCore::WHLSL::AST::VariableDeclaration::type const):
2152         * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Make it obvious that read
2153         modify write expressions are such by prefixing them with "RMW".
2154         (WebCore::WHLSL::ASTDumper::visit):
2155         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
2156         (WebCore::WHLSL::Checker::visit):
2157
2158 2019-06-19  Devin Rousso  <drousso@apple.com>
2159
2160         Web Inspector: Network: replace CFNetwork SPI with new API where able
2161         https://bugs.webkit.org/show_bug.cgi?id=198762
2162
2163         Reviewed by Timothy Hatcher.
2164
2165         * platform/network/NetworkLoadMetrics.h:
2166
2167 2019-06-19  Jer Noble  <jer.noble@apple.com>
2168
2169         iOS 12.2 Drawing portrait video to canvas is sideways
2170         https://bugs.webkit.org/show_bug.cgi?id=196772
2171         <rdar://problem/49781802>
2172
2173         Reviewed by Eric Carlson.
2174
2175         Test: media/video-orientation-canvas.html
2176
2177         Move rotation code into its own ImageRotationSessionVT class for re-use across
2178         all existing classes with rotation operations. Should slightly increase performance
2179         for painting rotated media files, as the rotation only occurs once per frame, rather
2180         than once per drawing operation.
2181
2182         * WebCore.xcodeproj/project.pbxproj:
2183         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
2184         (WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.
2185         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
2186         (WebCore::ImageDecoderAVFObjC::readTrackMetadata):
2187         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
2188         (WebCore::ImageDecoderAVFObjC::setTrack):
2189         (WebCore::transformToRotationProperties): Deleted.
2190         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2191         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2192         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
2193         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
2194         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2195         * platform/graphics/cv/ImageRotationSessionVT.h: Added.
2196         (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
2197         (WebCore::ImageRotationSessionVT::rotationProperties const):
2198         (WebCore::ImageRotationSessionVT::rotatedSize):
2199         * platform/graphics/cv/ImageRotationSessionVT.mm: Added.
2200         (WebCore::transformToRotationProperties):
2201         (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
2202         (WebCore::ImageRotationSessionVT::rotate):
2203         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
2204         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
2205         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
2206         (WebCore::rotationToAngle):
2207         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
2208         (WebCore::computeRotatedWidthAndHeight): Deleted.
2209
2210 2019-06-19  Simon Fraser  <simon.fraser@apple.com>
2211
2212         REGRESSION (246538): Newyorker.com header scrolls on page
2213         
2214         Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
2215         Overflow scroll will still scroll by changing boundsOrigin.
2216         
2217         The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
2218         positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
2219         a simple scroll container, and this change broke positioning for fixed position layers.
2220
2221         * page/scrolling/AsyncScrollingCoordinator.cpp:
2222         (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
2223         * page/scrolling/ScrollingCoordinator.cpp:
2224         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
2225         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2226         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
2227         * rendering/RenderLayerCompositor.cpp:
2228         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
2229         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
2230         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
2231         (WebCore::RenderLayerCompositor::updateScrollLayerClipping):
2232         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2233         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2234         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2235         (WebCore::RenderLayerCompositor::ensureRootLayer):
2236         (WebCore::RenderLayerCompositor::destroyRootLayer):
2237         (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
2238         (WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
2239         (WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.
2240         * rendering/RenderLayerCompositor.h:
2241
2242 2019-06-19  Adrian Perez de Castro  <aperez@igalia.com>
2243
2244         [WPE][GTK] Fix build with unified sources disabled
2245         https://bugs.webkit.org/show_bug.cgi?id=198752
2246
2247         Reviewed by Michael Catanzaro.
2248
2249         No new tests needed.
2250
2251         * Modules/indexeddb/server/UniqueIDBDatabase.h: Add missing forward declaration for IDBGetRecordData,
2252         replace inclusion of UniqueIDBDatabaseConnection.h with a forward declaration.
2253         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: Remove unneeded inclusion of
2254         UniqueIDBDatabaseTransaction.h, add missing inclusion of UniqueIDBDatabase.h
2255         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h: Remove unneeded inclusion of
2256         UniqueIDBDatabaseConnection.h inclusion.
2257         * bridge/c/c_class.cpp: Add inclusion of JSCJSValueInlines.h to avoid linker errors due
2258         to missing JSValue inline functions.
2259         * dom/DocumentParser.h: Replace forward declaration of Document with inclusion of Document.h,
2260         to avoid error due to usage of incomplete type in template expansion.
2261         * dom/Microtasks.h: Add missing forward declaration of JSC::VM
2262         * editing/markup.cpp: Add missing inclusion of PasteboardItemInfo.h
2263         * page/Quirks.h: Add missing forward declaration of WebCore::EventTarget
2264         * page/RuntimeEnabledFeatures.h: Add missing inclusion of wtf/Optional.h to avoid error due to
2265         expansion of undefined template.
2266         * page/SocketProvider.h: Add missing forward declaration for Document.
2267         * platform/graphics/GraphicsLayerClient.h: Add missing inclusion of wtf/OptionSet.h to avoid
2268         error due to expansion of undefined template.
2269         * rendering/RenderMultiColumnSpannerPlaceholder.h: Replace forward declaration of RenderMultiColumnFlow
2270         with inclusion of RenderMultiColumnFlow.h to avoid error due to usage of undefined class.
2271
2272 2019-06-19  Antti Koivisto  <antti@apple.com>
2273
2274         RequestedScrollPosition shouldn't be applied after node reattach
2275         https://bugs.webkit.org/show_bug.cgi?id=198994
2276         <rdar://problem/51439685>
2277
2278         Reviewed by Simon Fraser.
2279
2280         Test: scrollingcoordinator/ios/scroll-position-after-reattach.html
2281
2282         If a scrolling node gets reattached, its scroll position resets to (0,0) or whatever the previous
2283         requestedScrollPosition was, and the current position is lost.
2284
2285         * page/scrolling/ScrollingStateFixedNode.cpp:
2286         (WebCore::ScrollingStateFixedNode::setPropertyChangedBitsAfterReattach):
2287         (WebCore::ScrollingStateFixedNode::setAllPropertiesChanged): Deleted.
2288
2289         Rename to better reflect what this is for.
2290
2291         * page/scrolling/ScrollingStateFixedNode.h:
2292         * page/scrolling/ScrollingStateFrameHostingNode.cpp:
2293         (WebCore::ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach):
2294         (WebCore::ScrollingStateFrameHostingNode::setAllPropertiesChanged): Deleted.
2295         * page/scrolling/ScrollingStateFrameHostingNode.h:
2296         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2297         (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
2298         (WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged): Deleted.
2299         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2300         * page/scrolling/ScrollingStateNode.cpp:
2301         (WebCore::ScrollingStateNode::setPropertyChangedBitsAfterReattach):
2302         (WebCore::ScrollingStateNode::setAllPropertiesChanged): Deleted.
2303         * page/scrolling/ScrollingStateNode.h:
2304         * page/scrolling/ScrollingStatePositionedNode.cpp:
2305         (WebCore::ScrollingStatePositionedNode::setPropertyChangedBitsAfterReattach):
2306         (WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged): Deleted.
2307         * page/scrolling/ScrollingStatePositionedNode.h:
2308         * page/scrolling/ScrollingStateScrollingNode.cpp:
2309         (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):
2310
2311         Don't set RequestedScrollPosition. It is a special property that is applied only once on request
2312         and shouldn't get reapplied. Nodes should keep their existing scroll position on reattach.
2313
2314         (WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged): Deleted.
2315         * page/scrolling/ScrollingStateScrollingNode.h:
2316         * page/scrolling/ScrollingStateStickyNode.cpp:
2317         (WebCore::ScrollingStateStickyNode::setPropertyChangedBitsAfterReattach):
2318         (WebCore::ScrollingStateStickyNode::setAllPropertiesChanged): Deleted.
2319         * page/scrolling/ScrollingStateStickyNode.h:
2320         * page/scrolling/ScrollingStateTree.cpp:
2321         (WebCore::ScrollingStateTree::nodeWasReattachedRecursive):
2322
2323 2019-06-18  Saam Barati  <sbarati@apple.com>
2324
2325         [WHLSL] Support matrices
2326         https://bugs.webkit.org/show_bug.cgi?id=198876
2327         <rdar://problem/51768882>
2328
2329         Reviewed by Dean Jackson and Myles Maxfield.
2330
2331         This patch adds in support for matrices to WHLSL. Most matrix related code
2332         is defined by the standard library. This patch just needed to add support
2333         for the native functions operator[] and operator[]= on matrix types. The only
2334         native functions that are named operator[] and operator[]= are for matrix
2335         operations, so we strongly assume when generating code for native operator[] and
2336         operator[]= that we're dealing with matrix types.
2337         
2338         operator[]= ignores the write if the index is out of bounds. operator[]
2339         returns a zeroed vector if the index is out of bounds.  
2340         
2341         This patch also incorporates two bug fixes:
2342         1. This patch takes Robin's patch in https://bugs.webkit.org/show_bug.cgi?id=198313 to ensure
2343         we don't have pointers to values in a hash map. This was needed in this patch
2344         otherwise we'd crash parsing the standard library.
2345         
2346         2. This patch fixes how we handle "break" in metal codegen. When I first
2347         implemented break, I strongly assumed we were in a loop. However, break
2348         can be either from a loop or from switch. This patch teaches the metal code
2349         generator to track which context we're in and to emit code accordingly.
2350
2351         Tests: webgpu/whlsl-matrix-2.html
2352                webgpu/whlsl-matrix.html
2353
2354         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
2355         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
2356         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
2357         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
2358         (WebCore::WHLSL::Metal::generateMetalCodeShared):
2359         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
2360         (WebCore::WHLSL::Metal::writeNativeFunction):
2361         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
2362         (WebCore::WHLSL::Checker::assignTypes):
2363         (WebCore::WHLSL::Checker::getInfo):
2364         (WebCore::WHLSL::Checker::assignType):
2365         (WebCore::WHLSL::Checker::forwardType):
2366         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
2367
2368 2019-06-18  Yusuke Suzuki  <ysuzuki@apple.com>
2369
2370         [JSC] JSLock should be WebThread aware
2371         https://bugs.webkit.org/show_bug.cgi?id=198911
2372
2373         Reviewed by Geoffrey Garen.
2374
2375         * bindings/js/CommonVM.cpp:
2376         (WebCore::commonVMSlow):
2377
2378 2019-06-18  Joseph Pecoraro  <pecoraro@apple.com>
2379
2380         WebSocketDeflater uses an unnecessarily constrained compression memory level
2381         https://bugs.webkit.org/show_bug.cgi?id=198973
2382
2383         Reviewed by Alex Christensen.
2384
2385         * Modules/websockets/WebSocketDeflater.cpp:
2386         Set the memLevel to the deflateInit2 default value, not a minimum value.
2387
2388 2019-06-18  Keith Miller  <keith_miller@apple.com>
2389
2390         Add support for WeakRef
2391         https://bugs.webkit.org/show_bug.cgi?id=198710
2392
2393         Reviewed by Yusuke Suzuki.
2394
2395         We need to make sure the Web MicrotaskQueue notifies the JSC VM
2396         that it has finished performing a microtask checkpoint. This lets
2397         the JSC VM know it is safe to collect referenced WeakRefs. Since
2398         there was no way to get the VM from the MicrotaskQueue I have
2399         added a RefPtr to the queue's VM. For the main thread the VM lives
2400         forever so is fine. For workers the queue and the VM share an
2401         owner so this shouldn't matter either.
2402
2403         Tests: js/weakref-async-is-collected.html
2404                js/weakref-eventually-collects-values.html
2405                js/weakref-microtasks-dont-collect.html
2406                js/weakref-weakset-consistency.html
2407
2408         * dom/Microtasks.cpp:
2409         (WebCore::MicrotaskQueue::MicrotaskQueue):
2410         (WebCore::MicrotaskQueue::mainThreadQueue):
2411         (WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
2412         * dom/Microtasks.h:
2413         (WebCore::MicrotaskQueue::vm const):
2414         * workers/WorkerGlobalScope.cpp:
2415         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2416
2417 2019-06-18  Kenneth Russell  <kbr@chromium.org>
2418
2419         Add preliminary ANGLE backend to WebCore
2420         https://bugs.webkit.org/show_bug.cgi?id=197755
2421
2422         Reviewed by Dean Jackson.
2423
2424         Add new files supplying an ANGLE version of GraphicsContext3D and
2425         Extensions3D, conditionalized under USE_ANGLE. Update Xcode project to
2426         build these files. This option compiles and links successfully.
2427
2428         FIXMEs remain in several common files which will be addressed in
2429         subsequent patches.
2430
2431         This work will be tested with the preexisting WebGL conformance
2432         suite.
2433
2434         * SourcesCocoa.txt:
2435         * WebCore.xcodeproj/project.pbxproj:
2436         * platform/graphics/ANGLEWebKitBridge.h:
2437         * platform/graphics/GraphicsContext3D.h:
2438         * platform/graphics/GraphicsContext3DManager.cpp:
2439         (WebCore::GraphicsContext3DManager::updateAllContexts):
2440         (WebCore::GraphicsContext3DManager::updateHighPerformanceState):
2441         (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):
2442         * platform/graphics/angle/Extensions3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
2443         (WebCore::Extensions3DANGLE::Extensions3DANGLE):
2444         (WebCore::Extensions3DANGLE::supports):
2445         (WebCore::Extensions3DANGLE::ensureEnabled):
2446         (WebCore::Extensions3DANGLE::isEnabled):
2447         (WebCore::Extensions3DANGLE::getGraphicsResetStatusARB):
2448         (WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
2449         (WebCore::Extensions3DANGLE::initializeAvailableExtensions):
2450         (WebCore::Extensions3DANGLE::readnPixelsEXT):
2451         (WebCore::Extensions3DANGLE::getnUniformfvEXT):
2452         (WebCore::Extensions3DANGLE::getnUniformivEXT):
2453         (WebCore::Extensions3DANGLE::blitFramebuffer):
2454         (WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
2455         (WebCore::Extensions3DANGLE::createVertexArrayOES):
2456         (WebCore::Extensions3DANGLE::deleteVertexArrayOES):
2457         (WebCore::Extensions3DANGLE::isVertexArrayOES):
2458         (WebCore::Extensions3DANGLE::bindVertexArrayOES):
2459         (WebCore::Extensions3DANGLE::insertEventMarkerEXT):
2460         (WebCore::Extensions3DANGLE::pushGroupMarkerEXT):
2461         (WebCore::Extensions3DANGLE::popGroupMarkerEXT):
2462         (WebCore::Extensions3DANGLE::supportsExtension):
2463         (WebCore::Extensions3DANGLE::drawBuffersEXT):
2464         (WebCore::Extensions3DANGLE::drawArraysInstanced):
2465         (WebCore::Extensions3DANGLE::drawElementsInstanced):
2466         (WebCore::Extensions3DANGLE::vertexAttribDivisor):
2467         (WebCore::Extensions3DANGLE::getExtensions):
2468         * platform/graphics/angle/Extensions3DANGLE.h: Added.
2469         * platform/graphics/angle/GraphicsContext3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
2470         (WebCore::GraphicsContext3D::releaseShaderCompiler):
2471         (WebCore::wipeAlphaChannelFromPixels):
2472         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
2473         (WebCore::GraphicsContext3D::validateAttributes):
2474         (WebCore::GraphicsContext3D::reshapeFBOs):
2475         (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
2476         (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
2477         (WebCore::GraphicsContext3D::renderbufferStorage):
2478         (WebCore::GraphicsContext3D::getIntegerv):
2479         (WebCore::GraphicsContext3D::getShaderPrecisionFormat):
2480         (WebCore::GraphicsContext3D::texImage2D):
2481         (WebCore::GraphicsContext3D::depthRange):
2482         (WebCore::GraphicsContext3D::clearDepth):
2483         (WebCore::GraphicsContext3D::getExtensions):
2484         (WebCore::GraphicsContext3D::readPixels):
2485         (WebCore::setCurrentNameHashMapForShader):
2486         (WebCore::nameHashForShader):
2487         (WebCore::GraphicsContext3D::validateDepthStencil):
2488         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
2489         (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
2490         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2491         (WebCore::GraphicsContext3D::prepareTexture):
2492         (WebCore::GraphicsContext3D::readRenderingResults):
2493         (WebCore::GraphicsContext3D::reshape):
2494         (WebCore::GraphicsContext3D::checkVaryingsPacking const):
2495         (WebCore::GraphicsContext3D::precisionsMatch const):
2496         (WebCore::GraphicsContext3D::getInternalFramebufferSize const):
2497         (WebCore::GraphicsContext3D::activeTexture):
2498         (WebCore::GraphicsContext3D::attachShader):
2499         (WebCore::GraphicsContext3D::bindAttribLocation):
2500         (WebCore::GraphicsContext3D::bindBuffer):
2501         (WebCore::GraphicsContext3D::bindFramebuffer):
2502         (WebCore::GraphicsContext3D::bindRenderbuffer):
2503         (WebCore::GraphicsContext3D::bindTexture):
2504         (WebCore::GraphicsContext3D::blendColor):
2505         (WebCore::GraphicsContext3D::blendEquation):
2506         (WebCore::GraphicsContext3D::blendEquationSeparate):
2507         (WebCore::GraphicsContext3D::blendFunc):
2508         (WebCore::GraphicsContext3D::blendFuncSeparate):
2509         (WebCore::GraphicsContext3D::bufferData):
2510         (WebCore::GraphicsContext3D::bufferSubData):
2511         (WebCore::GraphicsContext3D::mapBufferRange):
2512         (WebCore::GraphicsContext3D::unmapBuffer):
2513         (WebCore::GraphicsContext3D::copyBufferSubData):
2514         (WebCore::GraphicsContext3D::getInternalformativ):
2515         (WebCore::GraphicsContext3D::renderbufferStorageMultisample):
2516         (WebCore::GraphicsContext3D::texStorage2D):
2517         (WebCore::GraphicsContext3D::texStorage3D):
2518         (WebCore::GraphicsContext3D::getActiveUniforms):
2519         (WebCore::GraphicsContext3D::checkFramebufferStatus):
2520         (WebCore::GraphicsContext3D::clearColor):
2521         (WebCore::GraphicsContext3D::clear):
2522         (WebCore::GraphicsContext3D::clearStencil):
2523         (WebCore::GraphicsContext3D::colorMask):
2524         (WebCore::GraphicsContext3D::compileShader):
2525         (WebCore::GraphicsContext3D::compileShaderDirect):
2526         (WebCore::GraphicsContext3D::copyTexImage2D):
2527         (WebCore::GraphicsContext3D::copyTexSubImage2D):
2528         (WebCore::GraphicsContext3D::cullFace):
2529         (WebCore::GraphicsContext3D::depthFunc):
2530         (WebCore::GraphicsContext3D::depthMask):
2531         (WebCore::GraphicsContext3D::detachShader):
2532         (WebCore::GraphicsContext3D::disable):
2533         (WebCore::GraphicsContext3D::disableVertexAttribArray):
2534         (WebCore::GraphicsContext3D::drawArrays):
2535         (WebCore::GraphicsContext3D::drawElements):
2536         (WebCore::GraphicsContext3D::enable):
2537         (WebCore::GraphicsContext3D::enableVertexAttribArray):
2538         (WebCore::GraphicsContext3D::finish):
2539         (WebCore::GraphicsContext3D::flush):
2540         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
2541         (WebCore::GraphicsContext3D::framebufferTexture2D):
2542         (WebCore::GraphicsContext3D::frontFace):
2543         (WebCore::GraphicsContext3D::generateMipmap):
2544         (WebCore::GraphicsContext3D::getActiveAttribImpl):
2545         (WebCore::GraphicsContext3D::getActiveAttrib):
2546         (WebCore::GraphicsContext3D::getActiveUniformImpl):
2547         (WebCore::GraphicsContext3D::getActiveUniform):
2548         (WebCore::GraphicsContext3D::getAttachedShaders):
2549         (WebCore::generateHashedName):
2550         (WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap):
2551         (WebCore::GraphicsContext3D::mappedSymbolName):
2552         (WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap):
2553         (WebCore::GraphicsContext3D::originalSymbolName):
2554         (WebCore::GraphicsContext3D::getAttribLocation):
2555         (WebCore::GraphicsContext3D::getAttribLocationDirect):
2556         (WebCore::GraphicsContext3D::getContextAttributes):
2557         (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
2558         (WebCore::GraphicsContext3D::getError):
2559         (WebCore::GraphicsContext3D::getString):
2560         (WebCore::GraphicsContext3D::hint):
2561         (WebCore::GraphicsContext3D::isBuffer):
2562         (WebCore::GraphicsContext3D::isEnabled):
2563         (WebCore::GraphicsContext3D::isFramebuffer):
2564         (WebCore::GraphicsContext3D::isProgram):
2565         (WebCore::GraphicsContext3D::isRenderbuffer):
2566         (WebCore::GraphicsContext3D::isShader):
2567         (WebCore::GraphicsContext3D::isTexture):
2568         (WebCore::GraphicsContext3D::lineWidth):
2569         (WebCore::GraphicsContext3D::linkProgram):
2570         (WebCore::GraphicsContext3D::pixelStorei):
2571         (WebCore::GraphicsContext3D::polygonOffset):
2572         (WebCore::GraphicsContext3D::sampleCoverage):
2573         (WebCore::GraphicsContext3D::scissor):
2574         (WebCore::GraphicsContext3D::shaderSource):
2575         (WebCore::GraphicsContext3D::stencilFunc):
2576         (WebCore::GraphicsContext3D::stencilFuncSeparate):
2577         (WebCore::GraphicsContext3D::stencilMask):
2578         (WebCore::GraphicsContext3D::stencilMaskSeparate):
2579         (WebCore::GraphicsContext3D::stencilOp):
2580         (WebCore::GraphicsContext3D::stencilOpSeparate):
2581         (WebCore::GraphicsContext3D::texParameterf):
2582         (WebCore::GraphicsContext3D::texParameteri):
2583         (WebCore::GraphicsContext3D::uniform1f):
2584         (WebCore::GraphicsContext3D::uniform1fv):
2585         (WebCore::GraphicsContext3D::uniform2f):
2586         (WebCore::GraphicsContext3D::uniform2fv):
2587         (WebCore::GraphicsContext3D::uniform3f):
2588         (WebCore::GraphicsContext3D::uniform3fv):
2589         (WebCore::GraphicsContext3D::uniform4f):
2590         (WebCore::GraphicsContext3D::uniform4fv):
2591         (WebCore::GraphicsContext3D::uniform1i):
2592         (WebCore::GraphicsContext3D::uniform1iv):
2593         (WebCore::GraphicsContext3D::uniform2i):
2594         (WebCore::GraphicsContext3D::uniform2iv):
2595         (WebCore::GraphicsContext3D::uniform3i):
2596         (WebCore::GraphicsContext3D::uniform3iv):
2597         (WebCore::GraphicsContext3D::uniform4i):
2598         (WebCore::GraphicsContext3D::uniform4iv):
2599         (WebCore::GraphicsContext3D::uniformMatrix2fv):
2600         (WebCore::GraphicsContext3D::uniformMatrix3fv):
2601         (WebCore::GraphicsContext3D::uniformMatrix4fv):
2602         (WebCore::GraphicsContext3D::useProgram):
2603         (WebCore::GraphicsContext3D::validateProgram):
2604         (WebCore::GraphicsContext3D::vertexAttrib1f):
2605         (WebCore::GraphicsContext3D::vertexAttrib1fv):
2606         (WebCore::GraphicsContext3D::vertexAttrib2f):
2607         (WebCore::GraphicsContext3D::vertexAttrib2fv):
2608         (WebCore::GraphicsContext3D::vertexAttrib3f):
2609         (WebCore::GraphicsContext3D::vertexAttrib3fv):
2610         (WebCore::GraphicsContext3D::vertexAttrib4f):
2611         (WebCore::GraphicsContext3D::vertexAttrib4fv):
2612         (WebCore::GraphicsContext3D::vertexAttribPointer):
2613         (WebCore::GraphicsContext3D::viewport):
2614         (WebCore::GraphicsContext3D::createVertexArray):
2615         (WebCore::GraphicsContext3D::deleteVertexArray):
2616         (WebCore::GraphicsContext3D::isVertexArray):
2617         (WebCore::GraphicsContext3D::bindVertexArray):
2618         (WebCore::GraphicsContext3D::getBooleanv):
2619         (WebCore::GraphicsContext3D::getBufferParameteriv):
2620         (WebCore::GraphicsContext3D::getFloatv):
2621         (WebCore::GraphicsContext3D::getInteger64v):
2622         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
2623         (WebCore::GraphicsContext3D::getProgramiv):
2624         (WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount):
2625         (WebCore::GraphicsContext3D::getUnmangledInfoLog):
2626         (WebCore::GraphicsContext3D::getProgramInfoLog):
2627         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
2628         (WebCore::GraphicsContext3D::getShaderiv):
2629         (WebCore::GraphicsContext3D::getShaderInfoLog):
2630         (WebCore::GraphicsContext3D::getShaderSource):
2631         (WebCore::GraphicsContext3D::getTexParameterfv):
2632         (WebCore::GraphicsContext3D::getTexParameteriv):
2633         (WebCore::GraphicsContext3D::getUniformfv):
2634         (WebCore::GraphicsContext3D::getUniformiv):
2635         (WebCore::GraphicsContext3D::getUniformLocation):
2636         (WebCore::GraphicsContext3D::getVertexAttribfv):
2637         (WebCore::GraphicsContext3D::getVertexAttribiv):
2638         (WebCore::GraphicsContext3D::getVertexAttribOffset):
2639         (WebCore::GraphicsContext3D::texSubImage2D):
2640         (WebCore::GraphicsContext3D::compressedTexImage2D):
2641         (WebCore::GraphicsContext3D::compressedTexSubImage2D):
2642         (WebCore::GraphicsContext3D::createBuffer):
2643         (WebCore::GraphicsContext3D::createFramebuffer):
2644         (WebCore::GraphicsContext3D::createProgram):
2645         (WebCore::GraphicsContext3D::createRenderbuffer):
2646         (WebCore::GraphicsContext3D::createShader):
2647         (WebCore::GraphicsContext3D::createTexture):
2648         (WebCore::GraphicsContext3D::deleteBuffer):
2649         (WebCore::GraphicsContext3D::deleteFramebuffer):
2650         (WebCore::GraphicsContext3D::deleteProgram):
2651         (WebCore::GraphicsContext3D::deleteRenderbuffer):
2652         (WebCore::GraphicsContext3D::deleteShader):
2653         (WebCore::GraphicsContext3D::deleteTexture):
2654         (WebCore::GraphicsContext3D::synthesizeGLError):
2655         (WebCore::GraphicsContext3D::markContextChanged):
2656         (WebCore::GraphicsContext3D::markLayerComposited):
2657         (WebCore::GraphicsContext3D::layerComposited const):
2658         (WebCore::GraphicsContext3D::forceContextLost):
2659         (WebCore::GraphicsContext3D::recycleContext):
2660         (WebCore::GraphicsContext3D::dispatchContextChangedNotification):
2661         (WebCore::GraphicsContext3D::texImage2DDirect):
2662         (WebCore::GraphicsContext3D::drawArraysInstanced):
2663         (WebCore::GraphicsContext3D::drawElementsInstanced):
2664         (WebCore::GraphicsContext3D::vertexAttribDivisor):
2665         * platform/graphics/angle/TemporaryANGLESetting.cpp: Added.
2666         (WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
2667         (WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):
2668         * platform/graphics/angle/TemporaryANGLESetting.h: Added.
2669         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
2670         (WebCore::GraphicsContext3D::GraphicsContext3D):
2671         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2672         (WebCore::GraphicsContext3D::makeContextCurrent):
2673         (WebCore::GraphicsContext3D::checkGPUStatus):
2674         (WebCore::GraphicsContext3D::screenDidChange):
2675         * platform/graphics/cocoa/WebGLLayer.h:
2676         * platform/graphics/cocoa/WebGLLayer.mm:
2677         (-[WebGLLayer display]):
2678         * platform/graphics/cv/TextureCacheCV.mm:
2679         (WebCore::TextureCacheCV::create):
2680         (WebCore::TextureCacheCV::textureFromImage):
2681         * platform/graphics/cv/VideoTextureCopierCV.cpp:
2682         (WebCore::enumToStringMap):
2683         (WebCore::VideoTextureCopierCV::initializeContextObjects):
2684         (WebCore::VideoTextureCopierCV::initializeUVContextObjects):
2685         (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
2686         (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
2687         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
2688         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
2689         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2690         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2691         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
2692
2693 2019-06-18  Saam Barati  <sbarati@apple.com>
2694
2695         [WHLSL] Do not generate duplicate constructors/copy constructors in synthesizeConstructors
2696         https://bugs.webkit.org/show_bug.cgi?id=198580
2697
2698         Reviewed by Robin Morisset.
2699
2700         Prior to this patch, we were generating duplicate constructors 
2701         for unnamed types. This is bad for two reasons:
2702         1. It's inefficient, since we'd generate a constructor for every place in
2703         the AST where we'd visit this unnamed type.
2704         2. It made it impossible to resolve function overloads to call
2705         the default constructor. This made it so that the autoInitializeVariables
2706         pass would crash if we ever generated more than one of these functions
2707         for the same type.
2708         
2709         To make this work, this patch splits up what used to be the resolveNamesInFunctions
2710         pass. Previously, this pass would both resolve calls and resolve type names.
2711         Synthesize constructors would run before this, since resolving calls meant we
2712         may resolve a call to one of these synthesized constructors. However, synthesize
2713         constructors now needs to test for the equality unnamed types, so it now requires
2714         running the type resolution part of resolveNamesInFunctions before it runs.
2715         
2716         This patch splits resolveNamesInFunctions into two parts:
2717         resolveTypeNamesInFunctions and resolveCallsInFunctions.
2718         
2719         So we used to run:
2720         synthesizeConstructors
2721         resolveNamesInFunctions
2722         
2723         And now we run:
2724         resolveTypeNamesInFunctions 
2725         synthesizeConstructors
2726         resolveCallsInFunctions
2727
2728         Test: webgpu/whlsl-duplicate-types-should-not-produce-duplicate-ctors.html
2729
2730         * Modules/webgpu/WHLSL/AST/WHLSLArrayReferenceType.h:
2731         * Modules/webgpu/WHLSL/AST/WHLSLArrayType.h:
2732         * Modules/webgpu/WHLSL/AST/WHLSLBooleanLiteral.h:
2733         (WebCore::WHLSL::AST::BooleanLiteral::clone const):
2734         * Modules/webgpu/WHLSL/AST/WHLSLEnumerationMemberLiteral.h:
2735         (WebCore::WHLSL::AST::EnumerationMemberLiteral::clone const):
2736         * Modules/webgpu/WHLSL/AST/WHLSLExpression.h:
2737         (WebCore::WHLSL::AST::Expression::copyTypeTo const):
2738         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteral.h:
2739         (WebCore::WHLSL::AST::FloatLiteral::clone const):
2740         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.cpp:
2741         (WebCore::WHLSL::AST::FloatLiteralType::clone const):
2742         * Modules/webgpu/WHLSL/AST/WHLSLFloatLiteralType.h:
2743         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteral.h:
2744         (WebCore::WHLSL::AST::IntegerLiteral::clone const):
2745         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.cpp:
2746         (WebCore::WHLSL::AST::IntegerLiteralType::clone const):
2747         * Modules/webgpu/WHLSL/AST/WHLSLIntegerLiteralType.h:
2748         * Modules/webgpu/WHLSL/AST/WHLSLNullLiteral.h:
2749         (WebCore::WHLSL::AST::NullLiteral::clone const):
2750         * Modules/webgpu/WHLSL/AST/WHLSLPointerType.h:
2751         * Modules/webgpu/WHLSL/AST/WHLSLTypeReference.h:
2752         * Modules/webgpu/WHLSL/AST/WHLSLUnnamedType.h:
2753         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteral.h:
2754         (WebCore::WHLSL::AST::UnsignedIntegerLiteral::clone const):
2755         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.cpp:
2756         (WebCore::WHLSL::AST::UnsignedIntegerLiteralType::clone const):
2757         * Modules/webgpu/WHLSL/AST/WHLSLUnsignedIntegerLiteralType.h:
2758         * Modules/webgpu/WHLSL/WHLSLASTDumper.h:
2759         * Modules/webgpu/WHLSL/WHLSLInferTypes.cpp:
2760         (WebCore::WHLSL::matches):
2761         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
2762         (WebCore::WHLSL::NameResolver::NameResolver):
2763         (WebCore::WHLSL::NameResolver::visit):
2764         (WebCore::WHLSL::resolveTypeNamesInFunctions):
2765         (WebCore::WHLSL::resolveCallsInFunctions):
2766         (WebCore::WHLSL::resolveNamesInFunctions): Deleted.
2767         * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
2768         (WebCore::WHLSL::NameResolver::setIsResolvingCalls):
2769         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
2770         (WebCore::WHLSL::prepareShared):
2771         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
2772         (WebCore::WHLSL::UnnamedTypeKey::UnnamedTypeKey):
2773         (WebCore::WHLSL::UnnamedTypeKey::isEmptyValue const):
2774         (WebCore::WHLSL::UnnamedTypeKey::isHashTableDeletedValue const):
2775         (WebCore::WHLSL::UnnamedTypeKey::hash const):
2776         (WebCore::WHLSL::UnnamedTypeKey::operator== const):
2777         (WebCore::WHLSL::UnnamedTypeKey::unnamedType const):
2778         (WebCore::WHLSL::UnnamedTypeKey::Hash::hash):
2779         (WebCore::WHLSL::UnnamedTypeKey::Hash::equal):
2780         (WebCore::WHLSL::UnnamedTypeKey::Traits::isEmptyValue):
2781         (WebCore::WHLSL::FindAllTypes::takeUnnamedTypes):
2782         (WebCore::WHLSL::FindAllTypes::appendNamedType):
2783         (WebCore::WHLSL::synthesizeConstructors):
2784
2785 2019-06-18  Truitt Savell  <tsavell@apple.com>
2786
2787         Unreviewed, rolling out r246524.
2788
2789         Caused 45 webgpu/ crashes.
2790
2791         Reverted changeset:
2792
2793         "[WHLSL] The name resolver does not deal with
2794         nativeFunctionDeclaration"
2795         https://bugs.webkit.org/show_bug.cgi?id=198306
2796         https://trac.webkit.org/changeset/246524
2797
2798 2019-06-18  Zalan Bujtas  <zalan@apple.com>
2799
2800         [LFC][IFC] Inline quirks should have their dedicated class.
2801         https://bugs.webkit.org/show_bug.cgi?id=198962
2802         <rdar://problem/51848170>
2803
2804         Reviewed by Antti Koivisto.
2805
2806         * Sources.txt:
2807         * WebCore.xcodeproj/project.pbxproj:
2808         * layout/LayoutState.h:
2809         * layout/inlineformatting/InlineFormattingContext.h:
2810         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2811         (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const):
2812         * layout/inlineformatting/InlineFormattingContextQuirks.cpp: Added.
2813         (WebCore::Layout::InlineFormattingContext::Quirks::collapseLineDescent):
2814         * layout/inlineformatting/InlineLine.cpp:
2815         (WebCore::Layout::Line::close):
2816         * layout/inlineformatting/InlineLineBreaker.cpp:
2817         * layout/inlineformatting/InlineLineBreaker.h:
2818
2819 2019-06-18  Zalan Bujtas  <zalan@apple.com>
2820
2821         [LFC][IFC] Line::append() should take care of all the inline types.
2822         https://bugs.webkit.org/show_bug.cgi?id=198961
2823         <rdar://problem/51847712>
2824
2825         Reviewed by Antti Koivisto.
2826
2827         Make all the existing Line::append* functions private.
2828
2829         * layout/FormattingContextGeometry.cpp:
2830         (WebCore::Layout::staticHorizontalPositionForOutOfFlowPositioned): fix a typo.
2831         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
2832         (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
2833         * layout/inlineformatting/InlineLine.cpp:
2834         (WebCore::Layout::Line::append):
2835         * layout/inlineformatting/InlineLine.h:
2836
2837 2019-06-18  Simon Fraser  <simon.fraser@apple.com>
2838
2839         Convert macOS to scroll by changing layer boundsOrigin
2840         https://bugs.webkit.org/show_bug.cgi?id=198917
2841
2842         Reviewed by Antti Koivisto.
2843
2844         macOS did frame and overflow scrolling by changing the position of the scrolled
2845         contents layer. iOS scrolls by changing the boundsOrigin of the scrollContainer layer
2846         (which it has to, to match how UIScrollView works).
2847
2848         The iOS approach removes the need for an extra layer whose only role is for
2849         scroll positioning, so migrate macOS to the same approach. A later patch can remove
2850         m_scrolledContentsLayer.
2851         
2852         We can remove RenderLayerCompositor::m_clipLayer since m_scrollContainerLayer has exactly
2853         the same role now.
2854
2855         * page/scrolling/AsyncScrollingCoordinator.cpp:
2856         (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
2857         * page/scrolling/ScrollingCoordinator.cpp:
2858         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
2859         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2860         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
2861         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
2862         (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
2863         * platform/graphics/cocoa/WebCoreCALayerExtras.h:
2864         * platform/graphics/cocoa/WebCoreCALayerExtras.mm:
2865         (-[CALayer _web_setLayerBoundsOrigin:]):
2866         * rendering/RenderLayerBacking.cpp:
2867         (WebCore::RenderLayerBacking::updateGeometry):
2868         (WebCore::RenderLayerBacking::setLocationOfScrolledContents):
2869         (WebCore::RenderLayerBacking::updateScrollOffset):
2870         * rendering/RenderLayerCompositor.cpp:
2871         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
2872         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2873         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
2874         (WebCore::RenderLayerCompositor::updateLayersForScrollPosition):
2875         (WebCore::RenderLayerCompositor::updateScrollContainerGeometry):
2876         (WebCore::RenderLayerCompositor::frameViewDidScroll):
2877         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2878         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
2879         (WebCore::RenderLayerCompositor::ensureRootLayer):
2880         (WebCore::RenderLayerCompositor::destroyRootLayer):
2881         (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
2882         (WebCore::RenderLayerCompositor::updateScrollLayerPosition): Deleted.
2883         (WebCore::RenderLayerCompositor::updateScrollLayerClipping): Deleted.
2884         * rendering/RenderLayerCompositor.h:
2885
2886 2019-06-18  Philippe Normand  <pnormand@igalia.com>
2887
2888         [GStreamer] Identify elements with monotonically increasing counters
2889         https://bugs.webkit.org/show_bug.cgi?id=198916
2890
2891         Reviewed by Xabier Rodriguez-Calvar.
2892
2893         Those ids tend to be shorter, easier to read for humans and for
2894         diff tools :) Underscores were also replaced by dashes, for
2895         consistency with the usual GStreamer element naming untold
2896         conventions.
2897
2898         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2899         (WebCore::MediaPlayerPrivateGStreamer::load):
2900         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2901         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
2902         (WebCore::GStreamerVideoEncoder::makeElement):
2903         (WebCore::GStreamerVideoEncoder::InitEncode):
2904
2905 2019-06-18  Zan Dobersek  <zdobersek@igalia.com>
2906
2907         [WebGL] Extensions3DOpenGLES::bindVertexArrayOES() should allow zero array object
2908         https://bugs.webkit.org/show_bug.cgi?id=198929
2909
2910         Reviewed by Carlos Garcia Campos.
2911
2912         A 0 object parameter for the glBindVertexArrayOES() call is a valid
2913         value since it binds the default vertex array object for any updates and
2914         draws. As such the Extensions3DOpenGLES implementation shouldn't return
2915         early if the object value is 0.
2916
2917         No new tests -- covered by existing tests.
2918
2919         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
2920         (WebCore::Extensions3DOpenGLES::bindVertexArrayOES):
2921
2922 2019-06-17  Sihui Liu  <sihui_liu@apple.com>
2923
2924         -[WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't delete _WKWebsiteDataTypeCredentials
2925         https://bugs.webkit.org/show_bug.cgi?id=198854
2926         <rdar://problem/51386058>
2927
2928         Reviewed by Geoffrey Garen.
2929
2930         Add option NSURLCredentialStorageRemoveSynchronizableCredentials when removing persistent credential so 
2931         credentials from same account will be removed from all devices.
2932
2933         Test: WKWebsiteDataStore.RemoveAllPersistentCredentials
2934
2935         * platform/network/CredentialStorage.cpp:
2936         (WebCore::CredentialStorage::originsWithPersistentCredentials):
2937         (WebCore::CredentialStorage::removePersistentCredentialsWithOrigins):
2938         (WebCore::CredentialStorage::clearPersistentCredentials):
2939         * platform/network/CredentialStorage.h:
2940         * platform/network/mac/CredentialStorageMac.mm:
2941         (WebCore::CredentialStorage::originsWithPersistentCredentials):
2942         (WebCore::CredentialStorage::removePersistentCredentialsWithOrigins):
2943         (WebCore::CredentialStorage::clearPersistentCredentials):
2944
2945 2019-06-17  Ryosuke Niwa  <rniwa@webkit.org>
2946
2947         m_disconnectedFrame can be null in DOMWindowExtension::willDestroyGlobalObjectInCachedFrame()
2948         https://bugs.webkit.org/show_bug.cgi?id=198943
2949
2950         Reviewed by Brady Eidson.
2951
2952         Apparently it's possible for m_disconnectedFrame to be null in this function even though this should never happen.
2953
2954         We've been trying to diagnose a class of issues in this area (e.g. r246187, r244971, r242797, r242677, r242676, r241848)
2955         but at some point, we need to stop crashing for the sake of user.
2956
2957         Worked around the bug by adding a null pointer check here.
2958
2959         * page/DOMWindowExtension.cpp:
2960         (WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
2961
2962 2019-06-17  Alex Christensen  <achristensen@webkit.org>
2963
2964         Fix iOS crash when starting loads with no active DocumentLoader
2965         https://bugs.webkit.org/show_bug.cgi?id=187360
2966         <rdar://problem/29389084>
2967
2968         Reviewed by Geoff Garen.
2969
2970         When FrameLoader::activeDocumentLoader returns null in the ResourceLoader constructor,
2971         on iOS we will dereference it to ask if it has a frame in an early return in init.
2972         Let's not.  If we don't have a DocumentLoader, we don't have a frame and should fail.
2973
2974         Crash reports indicate this crash is related to Beacon and other uses of LoaderStrategy::startPingLoad,
2975         but attempts to make a unit test to reproduce the crash were unsuccessful.
2976
2977         * loader/ResourceLoader.cpp:
2978         (WebCore::ResourceLoader::init):
2979
2980 2019-06-17  Robin Morisset  <rmorisset@apple.com>
2981
2982         [WHLSL] The name resolver does not deal with nativeFunctionDeclaration
2983         https://bugs.webkit.org/show_bug.cgi?id=198306
2984
2985         Reviewed by Saam Barati.
2986
2987         We currently have a crash in the nameResolver when trying to use the full standard library.
2988         What is happening is that because we don't specify anything to do to nativeFunctionDeclarations, names in their parameters
2989         are added to the global environment. And so as soon as we have two such parameters with the same name, the name resolver fails.
2990
2991         Tested by adding two native functions that share a parameter name to the standard library.
2992
2993         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
2994         (WebCore::WHLSL::NameResolver::visit):
2995         * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
2996
2997 2019-06-17  Robin Morisset  <rmorisset@apple.com>
2998
2999         [WHLSL] Remove backtracking from parseAttributeBlock
3000         https://bugs.webkit.org/show_bug.cgi?id=198934
3001
3002         Reviewed by Myles C. Maxfield.
3003
3004         No functional change intended.
3005
3006         Tested by running LayoutTests/webgpu/whlsl-compute.html
3007
3008         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
3009         (WebCore::WHLSL::Parser::parseAttributeBlock):
3010
3011 2019-06-17  Saam Barati  <sbarati@apple.com>
3012
3013         [WHLSL] Make .length work
3014         https://bugs.webkit.org/show_bug.cgi?id=198890
3015
3016         Reviewed by Myles Maxfield.
3017
3018         This patch makes accessing .length on buffers work. To make this work as
3019         expected, I've fixed a handful of small bugs:
3020         
3021         - The checker was not calling resolveByInstantiation for getters. This patch
3022           modifies the checker to do that, so we can now resolve a getter to
3023           "operator.length". I also refactored the checker to have a helper method
3024           that both does overload resolution and resolveByInstantiation to make it
3025           difficult to forget to call resolveByInstantiation.
3026         - The property resolver had a bug where it would return a non-null value
3027           in anderCallArgument for array references even when there was no ander and
3028           no thread ander function. This patch makes it now return null if there is
3029           neither an ander nor a thread ander.
3030         - The metal codegen incorrectly unpacked the length of buffers. It swapped the
3031           bottom four bytes and the top four bytes of the size_t value. This patch
3032           corrects that. This was also a cause of flakiness in various tests since
3033           we ended up with a length much larger than expected, leading to bounds
3034           checks always passing in our tests.
3035         - This patch also fixes our tests to specify the output buffer length
3036           properly for various programs.
3037
3038         Test: webgpu/whlsl-buffer-length.html
3039
3040         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
3041         (WebCore::WHLSL::Metal::EntryPointScaffolding::unpackResourcesAndNamedBuiltIns):
3042         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3043         (WebCore::WHLSL::resolveFunction):
3044         (WebCore::WHLSL::Checker::finishVisiting):
3045         (WebCore::WHLSL::Checker::visit):
3046         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
3047         (WebCore::WHLSL::anderCallArgument):
3048
3049 2019-06-17  Ryan Haddad  <ryanhaddad@apple.com>
3050
3051         Unreviewed, rolling out r246501.
3052
3053         Breaks Apple internal builds.
3054
3055         Reverted changeset:
3056
3057         "Support using ANGLE as the backend for the WebGL
3058         implementation"
3059         https://bugs.webkit.org/show_bug.cgi?id=197755
3060         https://trac.webkit.org/changeset/246501
3061
3062 2019-06-17  Kenneth Russell  <kbr@chromium.org>
3063
3064         Support using ANGLE as the backend for the WebGL implementation
3065         https://bugs.webkit.org/show_bug.cgi?id=197755
3066
3067         Reviewed by Dean Jackson.
3068
3069         Add new files supplying an ANGLE version of GraphicsContext3D and
3070         Extensions3D, conditionalized under USE_ANGLE. Update Xcode project to
3071         build these files. This option compiles and links successfully.
3072
3073         FIXMEs remain in several common files which will be addressed in
3074         subsequent patches.
3075
3076         This work will be tested with the preexisting WebGL conformance
3077         suite.
3078
3079         * SourcesCocoa.txt:
3080         * WebCore.xcodeproj/project.pbxproj:
3081         * platform/graphics/ANGLEWebKitBridge.h:
3082         * platform/graphics/GraphicsContext3D.h:
3083         * platform/graphics/GraphicsContext3DManager.cpp:
3084         (WebCore::GraphicsContext3DManager::updateAllContexts):
3085         (WebCore::GraphicsContext3DManager::updateHighPerformanceState):
3086         (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):
3087         * platform/graphics/angle/Extensions3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
3088         (WebCore::Extensions3DANGLE::Extensions3DANGLE):
3089         (WebCore::Extensions3DANGLE::supports):
3090         (WebCore::Extensions3DANGLE::ensureEnabled):
3091         (WebCore::Extensions3DANGLE::isEnabled):
3092         (WebCore::Extensions3DANGLE::getGraphicsResetStatusARB):
3093         (WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
3094         (WebCore::Extensions3DANGLE::initializeAvailableExtensions):
3095         (WebCore::Extensions3DANGLE::readnPixelsEXT):
3096         (WebCore::Extensions3DANGLE::getnUniformfvEXT):
3097         (WebCore::Extensions3DANGLE::getnUniformivEXT):
3098         (WebCore::Extensions3DANGLE::blitFramebuffer):
3099         (WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
3100         (WebCore::Extensions3DANGLE::createVertexArrayOES):
3101         (WebCore::Extensions3DANGLE::deleteVertexArrayOES):
3102         (WebCore::Extensions3DANGLE::isVertexArrayOES):
3103         (WebCore::Extensions3DANGLE::bindVertexArrayOES):
3104         (WebCore::Extensions3DANGLE::insertEventMarkerEXT):
3105         (WebCore::Extensions3DANGLE::pushGroupMarkerEXT):
3106         (WebCore::Extensions3DANGLE::popGroupMarkerEXT):
3107         (WebCore::Extensions3DANGLE::supportsExtension):
3108         (WebCore::Extensions3DANGLE::drawBuffersEXT):
3109         (WebCore::Extensions3DANGLE::drawArraysInstanced):
3110         (WebCore::Extensions3DANGLE::drawElementsInstanced):
3111         (WebCore::Extensions3DANGLE::vertexAttribDivisor):
3112         (WebCore::Extensions3DANGLE::getExtensions):
3113         * platform/graphics/angle/Extensions3DANGLE.h: Added.
3114         * platform/graphics/angle/GraphicsContext3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
3115         (WebCore::GraphicsContext3D::releaseShaderCompiler):
3116         (WebCore::wipeAlphaChannelFromPixels):
3117         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
3118         (WebCore::GraphicsContext3D::validateAttributes):
3119         (WebCore::GraphicsContext3D::reshapeFBOs):
3120         (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
3121         (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
3122         (WebCore::GraphicsContext3D::renderbufferStorage):
3123         (WebCore::GraphicsContext3D::getIntegerv):
3124         (WebCore::GraphicsContext3D::getShaderPrecisionFormat):
3125         (WebCore::GraphicsContext3D::texImage2D):
3126         (WebCore::GraphicsContext3D::depthRange):
3127         (WebCore::GraphicsContext3D::clearDepth):
3128         (WebCore::GraphicsContext3D::getExtensions):
3129         (WebCore::GraphicsContext3D::readPixels):
3130         (WebCore::setCurrentNameHashMapForShader):
3131         (WebCore::nameHashForShader):
3132         (WebCore::GraphicsContext3D::validateDepthStencil):
3133         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
3134         (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
3135         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
3136         (WebCore::GraphicsContext3D::prepareTexture):
3137         (WebCore::GraphicsContext3D::readRenderingResults):
3138         (WebCore::GraphicsContext3D::reshape):
3139         (WebCore::GraphicsContext3D::checkVaryingsPacking const):
3140         (WebCore::GraphicsContext3D::precisionsMatch const):
3141         (WebCore::GraphicsContext3D::getInternalFramebufferSize const):
3142         (WebCore::GraphicsContext3D::activeTexture):
3143         (WebCore::GraphicsContext3D::attachShader):
3144         (WebCore::GraphicsContext3D::bindAttribLocation):
3145         (WebCore::GraphicsContext3D::bindBuffer):
3146         (WebCore::GraphicsContext3D::bindFramebuffer):
3147         (WebCore::GraphicsContext3D::bindRenderbuffer):
3148         (WebCore::GraphicsContext3D::bindTexture):
3149         (WebCore::GraphicsContext3D::blendColor):
3150         (WebCore::GraphicsContext3D::blendEquation):
3151         (WebCore::GraphicsContext3D::blendEquationSeparate):
3152         (WebCore::GraphicsContext3D::blendFunc):
3153         (WebCore::GraphicsContext3D::blendFuncSeparate):
3154         (WebCore::GraphicsContext3D::bufferData):
3155         (WebCore::GraphicsContext3D::bufferSubData):
3156         (WebCore::GraphicsContext3D::mapBufferRange):
3157         (WebCore::GraphicsContext3D::unmapBuffer):
3158         (WebCore::GraphicsContext3D::copyBufferSubData):
3159         (WebCore::GraphicsContext3D::getInternalformativ):
3160         (WebCore::GraphicsContext3D::renderbufferStorageMultisample):
3161         (WebCore::GraphicsContext3D::texStorage2D):
3162         (WebCore::GraphicsContext3D::texStorage3D):
3163         (WebCore::GraphicsContext3D::getActiveUniforms):
3164         (WebCore::GraphicsContext3D::checkFramebufferStatus):
3165         (WebCore::GraphicsContext3D::clearColor):
3166         (WebCore::GraphicsContext3D::clear):
3167         (WebCore::GraphicsContext3D::clearStencil):
3168         (WebCore::GraphicsContext3D::colorMask):
3169         (WebCore::GraphicsContext3D::compileShader):
3170         (WebCore::GraphicsContext3D::compileShaderDirect):
3171         (WebCore::GraphicsContext3D::copyTexImage2D):
3172         (WebCore::GraphicsContext3D::copyTexSubImage2D):
3173         (WebCore::GraphicsContext3D::cullFace):
3174         (WebCore::GraphicsContext3D::depthFunc):
3175         (WebCore::GraphicsContext3D::depthMask):
3176         (WebCore::GraphicsContext3D::detachShader):
3177         (WebCore::GraphicsContext3D::disable):
3178         (WebCore::GraphicsContext3D::disableVertexAttribArray):
3179         (WebCore::GraphicsContext3D::drawArrays):
3180         (WebCore::GraphicsContext3D::drawElements):
3181         (WebCore::GraphicsContext3D::enable):
3182         (WebCore::GraphicsContext3D::enableVertexAttribArray):
3183         (WebCore::GraphicsContext3D::finish):
3184         (WebCore::GraphicsContext3D::flush):
3185         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
3186         (WebCore::GraphicsContext3D::framebufferTexture2D):
3187         (WebCore::GraphicsContext3D::frontFace):
3188         (WebCore::GraphicsContext3D::generateMipmap):
3189         (WebCore::GraphicsContext3D::getActiveAttribImpl):
3190         (WebCore::GraphicsContext3D::getActiveAttrib):
3191         (WebCore::GraphicsContext3D::getActiveUniformImpl):
3192         (WebCore::GraphicsContext3D::getActiveUniform):
3193         (WebCore::GraphicsContext3D::getAttachedShaders):
3194         (WebCore::generateHashedName):
3195         (WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap):
3196         (WebCore::GraphicsContext3D::mappedSymbolName):
3197         (WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap):
3198         (WebCore::GraphicsContext3D::originalSymbolName):
3199         (WebCore::GraphicsContext3D::getAttribLocation):
3200         (WebCore::GraphicsContext3D::getAttribLocationDirect):
3201         (WebCore::GraphicsContext3D::getContextAttributes):
3202         (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
3203         (WebCore::GraphicsContext3D::getError):
3204         (WebCore::GraphicsContext3D::getString):
3205         (WebCore::GraphicsContext3D::hint):
3206         (WebCore::GraphicsContext3D::isBuffer):
3207         (WebCore::GraphicsContext3D::isEnabled):
3208         (WebCore::GraphicsContext3D::isFramebuffer):
3209         (WebCore::GraphicsContext3D::isProgram):
3210         (WebCore::GraphicsContext3D::isRenderbuffer):
3211         (WebCore::GraphicsContext3D::isShader):
3212         (WebCore::GraphicsContext3D::isTexture):
3213         (WebCore::GraphicsContext3D::lineWidth):
3214         (WebCore::GraphicsContext3D::linkProgram):
3215         (WebCore::GraphicsContext3D::pixelStorei):
3216         (WebCore::GraphicsContext3D::polygonOffset):
3217         (WebCore::GraphicsContext3D::sampleCoverage):
3218         (WebCore::GraphicsContext3D::scissor):
3219         (WebCore::GraphicsContext3D::shaderSource):
3220         (WebCore::GraphicsContext3D::stencilFunc):
3221         (WebCore::GraphicsContext3D::stencilFuncSeparate):
3222         (WebCore::GraphicsContext3D::stencilMask):
3223         (WebCore::GraphicsContext3D::stencilMaskSeparate):
3224         (WebCore::GraphicsContext3D::stencilOp):
3225         (WebCore::GraphicsContext3D::stencilOpSeparate):
3226         (WebCore::GraphicsContext3D::texParameterf):
3227         (WebCore::GraphicsContext3D::texParameteri):
3228         (WebCore::GraphicsContext3D::uniform1f):
3229         (WebCore::GraphicsContext3D::uniform1fv):
3230         (WebCore::GraphicsContext3D::uniform2f):
3231         (WebCore::GraphicsContext3D::uniform2fv):
3232         (WebCore::GraphicsContext3D::uniform3f):
3233         (WebCore::GraphicsContext3D::uniform3fv):
3234         (WebCore::GraphicsContext3D::uniform4f):
3235         (WebCore::GraphicsContext3D::uniform4fv):
3236         (WebCore::GraphicsContext3D::uniform1i):
3237         (WebCore::GraphicsContext3D::uniform1iv):
3238         (WebCore::GraphicsContext3D::uniform2i):
3239         (WebCore::GraphicsContext3D::uniform2iv):
3240         (WebCore::GraphicsContext3D::uniform3i):
3241         (WebCore::GraphicsContext3D::uniform3iv):
3242         (WebCore::GraphicsContext3D::uniform4i):
3243         (WebCore::GraphicsContext3D::uniform4iv):
3244         (WebCore::GraphicsContext3D::uniformMatrix2fv):
3245         (WebCore::GraphicsContext3D::uniformMatrix3fv):
3246         (WebCore::GraphicsContext3D::uniformMatrix4fv):
3247         (WebCore::GraphicsContext3D::useProgram):
3248         (WebCore::GraphicsContext3D::validateProgram):
3249         (WebCore::GraphicsContext3D::vertexAttrib1f):
3250         (WebCore::GraphicsContext3D::vertexAttrib1fv):
3251         (WebCore::GraphicsContext3D::vertexAttrib2f):
3252         (WebCore::GraphicsContext3D::vertexAttrib2fv):
3253         (WebCore::GraphicsContext3D::vertexAttrib3f):
3254         (WebCore::GraphicsContext3D::vertexAttrib3fv):
3255         (WebCore::GraphicsContext3D::vertexAttrib4f):
3256         (WebCore::GraphicsContext3D::vertexAttrib4fv):
3257         (WebCore::GraphicsContext3D::vertexAttribPointer):
3258         (WebCore::GraphicsContext3D::viewport):
3259         (WebCore::GraphicsContext3D::createVertexArray):
3260         (WebCore::GraphicsContext3D::deleteVertexArray):
3261         (WebCore::GraphicsContext3D::isVertexArray):
3262         (WebCore::GraphicsContext3D::bindVertexArray):
3263         (WebCore::GraphicsContext3D::getBooleanv):
3264         (WebCore::GraphicsContext3D::getBufferParameteriv):
3265         (WebCore::GraphicsContext3D::getFloatv):
3266         (WebCore::GraphicsContext3D::getInteger64v):
3267         (WebCore::GraphicsContext3D::getFramebufferAttachmentParameteriv):
3268         (WebCore::GraphicsContext3D::getProgramiv):
3269         (WebCore::GraphicsContext3D::getNonBuiltInActiveSymbolCount):
3270         (WebCore::GraphicsContext3D::getUnmangledInfoLog):
3271         (WebCore::GraphicsContext3D::getProgramInfoLog):
3272         (WebCore::GraphicsContext3D::getRenderbufferParameteriv):
3273         (WebCore::GraphicsContext3D::getShaderiv):
3274         (WebCore::GraphicsContext3D::getShaderInfoLog):
3275         (WebCore::GraphicsContext3D::getShaderSource):
3276         (WebCore::GraphicsContext3D::getTexParameterfv):
3277         (WebCore::GraphicsContext3D::getTexParameteriv):
3278         (WebCore::GraphicsContext3D::getUniformfv):
3279         (WebCore::GraphicsContext3D::getUniformiv):
3280         (WebCore::GraphicsContext3D::getUniformLocation):
3281         (WebCore::GraphicsContext3D::getVertexAttribfv):
3282         (WebCore::GraphicsContext3D::getVertexAttribiv):
3283         (WebCore::GraphicsContext3D::getVertexAttribOffset):
3284         (WebCore::GraphicsContext3D::texSubImage2D):
3285         (WebCore::GraphicsContext3D::compressedTexImage2D):
3286         (WebCore::GraphicsContext3D::compressedTexSubImage2D):
3287         (WebCore::GraphicsContext3D::createBuffer):
3288         (WebCore::GraphicsContext3D::createFramebuffer):
3289         (WebCore::GraphicsContext3D::createProgram):
3290         (WebCore::GraphicsContext3D::createRenderbuffer):
3291         (WebCore::GraphicsContext3D::createShader):
3292         (WebCore::GraphicsContext3D::createTexture):
3293         (WebCore::GraphicsContext3D::deleteBuffer):
3294         (WebCore::GraphicsContext3D::deleteFramebuffer):
3295         (WebCore::GraphicsContext3D::deleteProgram):
3296         (WebCore::GraphicsContext3D::deleteRenderbuffer):
3297         (WebCore::GraphicsContext3D::deleteShader):
3298         (WebCore::GraphicsContext3D::deleteTexture):
3299         (WebCore::GraphicsContext3D::synthesizeGLError):
3300         (WebCore::GraphicsContext3D::markContextChanged):
3301         (WebCore::GraphicsContext3D::markLayerComposited):
3302         (WebCore::GraphicsContext3D::layerComposited const):
3303         (WebCore::GraphicsContext3D::forceContextLost):
3304         (WebCore::GraphicsContext3D::recycleContext):
3305         (WebCore::GraphicsContext3D::dispatchContextChangedNotification):
3306         (WebCore::GraphicsContext3D::texImage2DDirect):
3307         (WebCore::GraphicsContext3D::drawArraysInstanced):
3308         (WebCore::GraphicsContext3D::drawElementsInstanced):
3309         (WebCore::GraphicsContext3D::vertexAttribDivisor):
3310         * platform/graphics/angle/TemporaryANGLESetting.cpp: Added.
3311         (WebCore::TemporaryANGLESetting::TemporaryANGLESetting):
3312         (WebCore::TemporaryANGLESetting::~TemporaryANGLESetting):
3313         * platform/graphics/angle/TemporaryANGLESetting.h: Added.
3314         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
3315         (WebCore::GraphicsContext3D::GraphicsContext3D):
3316         (WebCore::GraphicsContext3D::~GraphicsContext3D):
3317         (WebCore::GraphicsContext3D::makeContextCurrent):
3318         (WebCore::GraphicsContext3D::checkGPUStatus):
3319         (WebCore::GraphicsContext3D::screenDidChange):
3320         * platform/graphics/cocoa/WebGLLayer.h:
3321         * platform/graphics/cocoa/WebGLLayer.mm:
3322         (-[WebGLLayer display]):
3323         * platform/graphics/cv/TextureCacheCV.mm:
3324         (WebCore::TextureCacheCV::create):
3325         (WebCore::TextureCacheCV::textureFromImage):
3326         * platform/graphics/cv/VideoTextureCopierCV.cpp:
3327         (WebCore::enumToStringMap):
3328         (WebCore::VideoTextureCopierCV::initializeContextObjects):
3329         (WebCore::VideoTextureCopierCV::initializeUVContextObjects):
3330         (WebCore::VideoTextureCopierCV::copyImageToPlatformTexture):
3331         (WebCore::VideoTextureCopierCV::copyVideoTextureToPlatformTexture):
3332         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
3333