3e86ef3a592651fc8e20626eecb42c1986d7d8fd
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2019-07-03  Andres Gonzalez  <andresg_22@apple.com>
2
3         Safari hanging while loading pages - WebCore::AccessibilityRenderObject::visiblePositionRangeForLine.
4         https://bugs.webkit.org/show_bug.cgi?id=199434
5         <rdar://problem/52475140>
6
7         Reviewed by Chris Fleizach.
8
9         Tests were disabled until underlying bug is fixed.
10
11         Rolling out a workaround for CharacterIterator::advance bug because it
12         seems to be causing a hang in Safari.
13         * editing/Editing.cpp:
14         (WebCore::visiblePositionForIndexUsingCharacterIterator):
15
16 2019-07-02  Simon Fraser  <simon.fraser@apple.com>
17
18         REGRESSION (r246723): ScrollingTreeOverflowScrollProxyNode::m_overflowScrollingNodeID is uninitialized sometimes
19         https://bugs.webkit.org/show_bug.cgi?id=199432
20
21         Reviewed by Antti Koivisto.
22         
23         I noticed while debugging rdar://problem/52291642 that m_overflowScrollingNodeID was uninitialized in
24         ScrollingTreeOverflowScrollProxyNode. This could lead to the wrong node being found by m_scrollingTree->nodeForID(),
25         which could result in type confusion bugs.
26         
27         This can happen with negative z-order layers when we fail to find their related scrolling tree node
28         on the first pass.
29
30         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h:
31
32 2019-07-02  Zan Dobersek  <zdobersek@igalia.com>
33
34         FetchResponse::BodyLoader should not be movable
35         https://bugs.webkit.org/show_bug.cgi?id=199380
36
37         Reviewed by Youenn Fablet.
38
39         The FetchResponse::BodyLoader class has a FetchLoader member that is
40         initialized in the start() method with the reference of the owning
41         FetchResponse::BodyLoader object. This reference doesn't change when
42         the FetchResponse::BodyLoader object is moved into a different object
43         and the FetchLoader unique_ptr along with it, leading to problems when
44         that FetchLoader tries to invoke the FetchLoaderClient methods on the
45         FetchResponse::BodyLoader object that's been moved from and is possibly
46         already destroyed.
47
48         To avoid this, the FetchResponse::BodyLoader has the move constructor
49         removed and is now managed through std::unique_ptr instead of Optional,
50         ensuring the FetchResponse::BodyLoader object itself isn't moved around.
51
52         * Modules/fetch/FetchResponse.cpp:
53         (WebCore::FetchResponse::fetch):
54         (WebCore::FetchResponse::BodyLoader::didSucceed):
55         (WebCore::FetchResponse::BodyLoader::didFail):
56         * Modules/fetch/FetchResponse.h:
57
58 2019-07-02  Said Abou-Hallawa  <sabouhallawa@apple.com>
59
60         Assertion fires when animating the 'class' attribute of an SVG element
61         https://bugs.webkit.org/show_bug.cgi?id=197372
62
63         Reviewed by Ryosuke Niwa.
64
65         All instances of SVG animated properties have to share a single animVal
66         such that once its value is progressed, all the instances will see the
67         change. This was not happening for SVGAnimatedPrimitiveProperty. To do
68         that we need to:
69
70         -- Introduce the new template class SVGSharedPrimitiveProperty which is
71            derived from SVGProperty. This class manages a single primitive value.
72         -- Change the type of SVGAnimatedPrimitiveProperty::m_animVal to
73            RefPtr<SVGSharedPrimitiveProperty<PropertyType>>. The master property
74            creates it and all the instances hold references to the same pointer.
75         -- Change the type of SVGAnimatedPrimitiveProperty::m_baseVal to
76            Ref<SVGSharedPrimitiveProperty<PropertyType>> for simplicity and get
77            rid of SVGAnimatedPrimitiveProperty::m_state.
78         -- Override the virtual methods instanceStartAnimation() and
79            instanceStopAnimation() of SVGAnimatedPrimitiveProperty.
80         -- SVGAnimatedStringAnimator should invalidate the style of the target
81            element if attribute name is 'class' and when its animVal changes.
82
83         * WebCore.xcodeproj/project.pbxproj:
84         * svg/properties/SVGAnimatedPrimitiveProperty.h:
85         (WebCore::SVGAnimatedPrimitiveProperty::setBaseVal):
86         (WebCore::SVGAnimatedPrimitiveProperty::setBaseValInternal):
87         (WebCore::SVGAnimatedPrimitiveProperty::baseVal const):
88         (WebCore::SVGAnimatedPrimitiveProperty::setAnimVal):
89         (WebCore::SVGAnimatedPrimitiveProperty::animVal const):
90         (WebCore::SVGAnimatedPrimitiveProperty::animVal):
91         (WebCore::SVGAnimatedPrimitiveProperty::currentValue const):
92         (WebCore::SVGAnimatedPrimitiveProperty::SVGAnimatedPrimitiveProperty):
93         (WebCore::SVGAnimatedPrimitiveProperty::ensureAnimVal):
94         * svg/properties/SVGAnimatedPropertyAnimatorImpl.h:
95         * svg/properties/SVGAttributeAnimator.cpp:
96         (WebCore::SVGAttributeAnimator::invalidateStyle):
97         (WebCore::SVGAttributeAnimator::applyAnimatedStylePropertyChange):
98         (WebCore::SVGAttributeAnimator::removeAnimatedStyleProperty):
99         * svg/properties/SVGAttributeAnimator.h:
100         * svg/properties/SVGSharedPrimitiveProperty.h: Added.
101         (WebCore::SVGSharedPrimitiveProperty::create):
102         (WebCore::SVGSharedPrimitiveProperty::value const):
103         (WebCore::SVGSharedPrimitiveProperty::value):
104         (WebCore::SVGSharedPrimitiveProperty::setValue):
105         (WebCore::SVGSharedPrimitiveProperty::SVGSharedPrimitiveProperty):
106
107 2019-07-02  Andres Gonzalez  <andresg_22@apple.com>
108
109         Enhance support of aria-haspopup per ARIA 1.1 specification.
110         https://bugs.webkit.org/show_bug.cgi?id=199216
111         <rdar://problem/46221342>
112
113         Reviewed by Chris Fleizach.
114
115         Test button-with-aria-haspopup-role.html was expanded to cover testing
116         of new functionality.
117
118         * accessibility/AccessibilityObject.cpp:
119         (WebCore::AccessibilityObject::popupValue const): replaces hasPopupValue.
120         (WebCore::AccessibilityObject::hasPopupValue const): Deleted.
121         * accessibility/AccessibilityObject.h:
122         * accessibility/AccessibilityRenderObject.cpp:
123         (WebCore::AccessibilityRenderObject::hasPopup const): method rename.
124         * accessibility/atk/WebKitAccessible.cpp:
125         (webkitAccessibleGetAttributes): method rename.
126         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
127         (-[WebAccessibilityObjectWrapper accessibilityPopupValue]):
128         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
129         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
130
131 2019-07-02  Saam Barati  <sbarati@apple.com>
132
133         [WHLSL] Import bitwise bool tests
134         https://bugs.webkit.org/show_bug.cgi?id=199093
135
136         Reviewed by Myles C. Maxfield.
137
138         Add standard library functions for:
139         - bool bit ops
140         - converting from bool to number
141         - converting from number to bool
142
143         Test: webgpu/whlsl-bitwise-bool-ops.html
144
145         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
146
147 2019-07-02  Takashi Komori  <Takashi.Komori@sony.com>
148
149         [Curl] Fix CookieJarCurl::getRawCookie.
150         https://bugs.webkit.org/show_bug.cgi?id=199300
151
152         Reviewed by Fujii Hironori.
153
154         On wincairo some cookie information was not displayed in WebInspector's storage tab as
155         CookieJarCurl::getRawCookies was calling CookieJarDB::searchCookies with wrong arguments.
156         This patch fixes it.
157
158         Test: http/tests/inspector/page/get-cookies.html
159
160         * platform/network/curl/CookieJarCurl.cpp:
161         (WebCore::CookieJarCurl::getRawCookies const):
162
163 2019-07-02  Robin Morisset  <rmorisset@apple.com>
164
165         [WHLSL] the initializer in VariableDeclaration should be a std::unique_ptr, not Optional<UniqueRef<..>>
166         https://bugs.webkit.org/show_bug.cgi?id=199389
167
168         Reviewed by Sam Weinig.
169
170         Optional<UniqueRef<..>> is not only semantically weird (UniqueRef is basically a unique_ptr that promises not to be null), but also inefficient, wasting 8 bytes for the boolean in Optional.
171         It is a pattern that appears throughout the AST. In this patch I start by removing it in a fairly simple spot: the initializer for VariableDeclaration.
172
173         No test because there is no intended functional change.
174
175         * Modules/webgpu/WHLSL/AST/WHLSLReadModifyWriteExpression.h:
176         (WebCore::WHLSL::AST::ReadModifyWriteExpression::ReadModifyWriteExpression):
177         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
178         (WebCore::WHLSL::AST::VariableDeclaration::VariableDeclaration):
179         (WebCore::WHLSL::AST::VariableDeclaration::initializer):
180         (WebCore::WHLSL::AST::VariableDeclaration::takeInitializer):
181         (WebCore::WHLSL::AST::VariableDeclaration::setInitializer):
182         * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp:
183         (WebCore::WHLSL::AutoInitialize::visit):
184         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
185         (WebCore::WHLSL::resolveWithOperatorAnderIndexer):
186         (WebCore::WHLSL::resolveWithOperatorLength):
187         (WebCore::WHLSL::resolveWithReferenceComparator):
188         * Modules/webgpu/WHLSL/WHLSLParser.cpp:
189         (WebCore::WHLSL::Parser::parseParameter):
190         (WebCore::WHLSL::Parser::parseVariableDeclaration):
191         * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
192         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
193         (WebCore::WHLSL::wrapAnderCallArgument):
194         (WebCore::WHLSL::modify):
195         (WebCore::WHLSL::PropertyResolver::visit):
196         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
197         (WebCore::WHLSL::synthesizeArrayOperatorLength):
198         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp:
199         (WebCore::WHLSL::synthesizeConstructors):
200         * Modules/webgpu/WHLSL/WHLSLSynthesizeEnumerationFunctions.cpp:
201         (WebCore::WHLSL::synthesizeEnumerationFunctions):
202         * Modules/webgpu/WHLSL/WHLSLSynthesizeStructureAccessors.cpp:
203         (WebCore::WHLSL::synthesizeStructureAccessors):
204
205 2019-07-02  Jer Noble  <jer.noble@apple.com>
206
207         Pipe suport for 'cenc' init data type into CDMFairPlayStreaming
208         https://bugs.webkit.org/show_bug.cgi?id=199381
209
210         Reviewed by Eric Carlson.
211
212         Expose the parsing of 'cenc' init data from InitDataRegistry, so it can be used in the
213         evaluation steps inside CDMFairPlayStreaming.
214
215         + Add a new method, extractPsshBoxesFromCenc() which returns an optional array of
216           unique_ptrs to different types of ISOPSSHBoxes.
217         + Add a peekScheme() method to ISOPSSHBox so that we can create the correct subclass
218           of ISOPSSHBox from the above method.
219         + Remove an extra definition of fairPlaySystemID() from CDMFairPlayStreaming.
220         + Add 'cenc' to the list of supported types in CDMPrivateFairPlayStreaming::vaildInitDataTypes().
221         + Add support for 'cenc' in CDMPrivateFairPlayStreaming::supportsInitData().
222         + Format the 'cenc' init data as an encodec-JSON structure for AVContentKeySession.
223         + Update the ISOFairPlayStreamingKeyRequestInfoBox to be a ISOFullBox.
224         + Update the box name of ISOFairPlayStreamingInitDataBox.
225
226         * Modules/encryptedmedia/InitDataRegistry.cpp:
227         (WebCore::InitDataRegistry::extractPsshBoxesFromCenc):
228         (WebCore::InitDataRegistry::extractKeyIDsCenc):
229         (WebCore::InitDataRegistry::sanitizeCenc):
230         (WebCore::InitDataRegistry::cencName):
231         (WebCore::InitDataRegistry::keyidsName):
232         (WebCore::InitDataRegistry::webmName):
233         (WebCore::extractKeyIDsCenc): Deleted.
234         (WebCore::sanitizeCenc): Deleted.
235         * Modules/encryptedmedia/InitDataRegistry.h:
236         (WebCore::SourceBuffer::changeType):
237         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
238         (WebCore::validInitDataTypes):
239         (WebCore::CDMPrivateFairPlayStreaming::supportsInitData const):
240         (WebCore::CDMPrivateFairPlayStreaming::fairPlaySystemID): Deleted.
241         * platform/graphics/avfoundation/CDMFairPlayStreaming.h:
242         * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h:
243         (isType):
244         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
245         (WebCore::CDMInstanceSessionFairPlayStreamingAVFObjC::requestLicense):
246         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
247         (WebCore::ISOProtectionSystemSpecificHeaderBox::peekSystemID):
248         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h:
249
250 2019-07-02  Daniel Bates  <dabates@apple.com>
251
252         [iOS] Cannot tab cycle through credit card fields on antonsvpatisserie.com checkout page
253         https://bugs.webkit.org/show_bug.cgi?id=196053
254         <rdar://problem/49093034>
255
256         Reviewed by Wenson Hsieh.
257
258         Remove the iOS override for isKeyboardFocusable() so that the focus controller allows
259         iframes to be keyboard focusable.
260
261         Tests: fast/events/ios/tab-cycle.html
262                fast/events/ios/tab-into-text-field-inside-iframe.html
263
264         * html/HTMLIFrameElement.h:
265
266 2019-07-02  Daniel Bates  <dabates@apple.com>
267
268         Left and right option key has Unidentified key identifier
269         https://bugs.webkit.org/show_bug.cgi?id=199392
270         <rdar://problem/52497604>
271
272         Reviewed by Wenson Hsieh.
273
274         Fix up switch case for left Option key and add a case statement for the right Option key.
275
276         * platform/ios/PlatformEventFactoryIOS.mm:
277         (WebCore::codeForKeyEvent):
278
279 2019-07-02  Antti Koivisto  <antti@apple.com>
280
281         Crash when adding inline stylesheet to shadow tree in document with null base URL
282         https://bugs.webkit.org/show_bug.cgi?id=199400
283
284         Reviewed by Zalan Bujtas.
285
286         We compute CSSParserContextHash for the inline stylesheet cache but that hits a nullptr crash
287         if the document happens to have null base URL (which is uncommon but possible).
288
289         Test: fast/shadow-dom/stylesheet-in-shadow-without-base-url-crash.html
290
291         * css/parser/CSSParserContext.h:
292         (WebCore::CSSParserContextHash::hash):
293
294         Null check the base URL (like other strings), it is a valid case.
295
296 2019-07-02  Devin Rousso  <drousso@apple.com>
297
298         Web Inspector: Debug: "Reset Web Inspector" should also clear the saved window size and attachment side
299         https://bugs.webkit.org/show_bug.cgi?id=198956
300
301         Reviewed by Matt Baker.
302
303         * inspector/InspectorFrontendClient.h:
304
305         * inspector/InspectorFrontendClientLocal.h:
306         * inspector/InspectorFrontendClientLocal.cpp:
307         (WebCore::InspectorFrontendClientLocal::Settings::deleteProperty): Added.
308         (WebCore::InspectorFrontendClientLocal::resetWindowState): Added.
309
310         * inspector/InspectorFrontendHost.idl:
311         * inspector/InspectorFrontendHost.h:
312         * inspector/InspectorFrontendHost.cpp:
313         (WebCore::InspectorFrontendHost::reset): Added.
314
315 2019-07-01  Zalan Bujtas  <zalan@apple.com>
316
317         [Text autosizing] [iPadOS] AutosizeStatus::idempotentTextSize returns the computed font size in certain cases.
318         https://bugs.webkit.org/show_bug.cgi?id=199382
319         <rdar://problem/52483097>
320
321         Reviewed by Wenson Hsieh.
322
323         Adjust the font size on the style only when the autosized value is different from the computed value. 
324
325         * css/StyleResolver.cpp:
326         (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
327
328 2019-07-01  Chris Dumez  <cdumez@apple.com>
329
330         It should not be possible to trigger a load while in the middle of restoring a page in PageCache
331         https://bugs.webkit.org/show_bug.cgi?id=199190
332         <rdar://problem/52114552>
333
334         Reviewed by Brady Eidson.
335
336         Test: http/tests/security/navigate-when-restoring-cached-page.html
337
338         * history/CachedFrame.cpp:
339         (WebCore::CachedFrame::open):
340         Stop attaching the cached document before calling FrameLoader::open() given that the previous document
341         is still attached to the frame at this point. This avoids having 2 documents attached to the same frame
342         during a short period of time.
343
344         * loader/FrameLoader.cpp:
345         (WebCore::FrameLoader::open):
346         We now attach the cached document to the frame *after* calling FrameLoader::clear(), which means that
347         the previous document now has been detached from this frame.
348
349         (WebCore::FrameLoader::detachChildren):
350         As per the HTML specification [1], an attempt to navigate should fail if the prompt to unload algorithm
351         is being run for the active document of browsingContext. Note that the "prompt to unload" algorithm [2]
352         includes firing the 'unload' event in the current document and in all the documents in the subframes.
353         As a result, FrameLoader::detachChildren() is the right prevent such navigations. We were actually trying
354         to do this via the SubframeLoadingDisabler stack variable inside detachChildren(). The issue is that this
355         only prevents navigation in the subframes (i.e. <iframe> elements), not the main frame. As a result,
356         script would be able to navigate the top-frame even though detachChildren() is being called on the top
357         frame. To address the issue, I now create a NavigationDisabler variable in the scope of detachChildren()
358         when detachChildren() is called on the top frame. NavigationDisabler prevents all navigations within the
359         page, including navigations on the main/top frame.
360
361         [1] https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigate
362         [2] https://html.spec.whatwg.org/multipage/browsing-the-web.html#prompt-to-unload-a-document
363
364 2019-07-01  Truitt Savell  <tsavell@apple.com>
365
366         Unreviewed, rolling out r246844.
367
368         Broke 12 tests in imported/w3c/web-platform-
369         tests/pointerevents/
370
371         Reverted changeset:
372
373         "[Pointer Events] Respect pointer capture when dispatching
374         mouse boundary events and updating :hover"
375         https://bugs.webkit.org/show_bug.cgi?id=198999
376         https://trac.webkit.org/changeset/246844
377
378 2019-07-01  Truitt Savell  <tsavell@apple.com>
379
380         Unreviewed, rolling out r246849.
381
382         12 tests broken in r246844 require this to be rolled out.
383
384         Reverted changeset:
385
386         "[Pointer Events] Respect pointer capture when dispatching
387         mouse boundary events and updating :hover"
388         https://bugs.webkit.org/show_bug.cgi?id=198999
389         https://trac.webkit.org/changeset/246849
390
391 2019-07-01  Alex Christensen  <achristensen@webkit.org>
392
393         Null check provisionalItem in FrameLoader::continueLoadAfterNavigationPolicy
394         https://bugs.webkit.org/show_bug.cgi?id=199327
395         <rdar://problem/48262384>
396
397         Reviewed by Darin Adler.
398
399         * loader/FrameLoader.cpp:
400         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
401         Sometimes provisionalItem is null.  Let's not crash.
402
403 2019-07-01  Truitt Savell  <tsavell@apple.com>
404
405         Unreviewed, rolling out r246958.
406
407         Broke inspector/dom/getAccessibilityPropertiesForNode.html
408
409         Reverted changeset:
410
411         "Enhance support of aria-haspopup per ARIA 1.1 specification."
412         https://bugs.webkit.org/show_bug.cgi?id=199216
413         https://trac.webkit.org/changeset/246958
414
415 2019-07-01  Brady Eidson  <beidson@apple.com>
416
417         More judiciously handle clearing/creation of DOMWindows for new Documents.
418         <rdar://problem/51665406> and https://bugs.webkit.org/show_bug.cgi?id=198786
419
420         Reviewed by Chris Dumez.
421
422         * bindings/js/ScriptController.cpp:
423         (WebCore::ScriptController::executeIfJavaScriptURL):
424
425         * loader/DocumentWriter.cpp:
426         (WebCore::DocumentWriter::replaceDocumentWithResultOfExecutingJavascriptURL): Rename for clarity.
427         (WebCore::DocumentWriter::begin): Handle DOMWindow taking/creation inside FrameLoader::clear via a lambda. 
428         (WebCore::DocumentWriter::replaceDocument): Deleted.
429         * loader/DocumentWriter.h:
430
431         * loader/FrameLoader.cpp:
432         (WebCore::FrameLoader::clear): Take a "handleDOMWindowCreation" lambda to run after clearing the previous document.
433         * loader/FrameLoader.h:
434
435 2019-07-01  Zalan Bujtas  <zalan@apple.com>
436
437         [iPadOS] Tapping on the bottom part of youtube video behaves as if controls were visible
438         https://bugs.webkit.org/show_bug.cgi?id=199349
439         <rdar://problem/51955744>
440
441         Reviewed by Simon Fraser.
442
443         Synthetic click event should not be dispatched to a node that is initially hidden (by opacity: 0) and becomes visible by the touchStart event.
444         While this behaves different from macOS where opacity: 0; content is "clickable", it impoves usability on certain sites like YouTube.com. 
445
446         Test: fast/events/touch/ios/content-observation/opacity-change-happens-on-touchstart-with-transition2.html
447
448         * dom/Node.cpp:
449         (WebCore::Node::defaultEventHandler):
450         * page/ios/ContentChangeObserver.cpp:
451         (WebCore::ContentChangeObserver::isConsideredHidden):
452         (WebCore::ContentChangeObserver::reset):
453         (WebCore::isConsideredHidden): Deleted.
454         * page/ios/ContentChangeObserver.h:
455         (WebCore::ContentChangeObserver::setHiddenTouchTarget):
456         (WebCore::ContentChangeObserver::resetHiddenTouchTarget):
457         (WebCore::ContentChangeObserver::hiddenTouchTarget const):
458
459 2019-06-28  Brent Fulgham  <bfulgham@apple.com>
460
461         [FTW] Build WebCore
462         https://bugs.webkit.org/show_bug.cgi?id=199199
463
464         Reviewed by Don Olmstead.
465
466         Make some minor corrections needed to get FTW WebCore to build and link.
467
468         * PlatformFTW.cmake: Added.
469         * platform/graphics/win/GlyphPageTreeNodeDirect2D.cpp:
470         (WebCore::GlyphPage::fill):
471         * platform/graphics/win/GraphicsContextDirect2D.cpp:
472         (WebCore::GraphicsContext::setURLForRect):
473         * platform/graphics/win/PatternDirect2D.cpp:
474         * platform/graphics/win/SimpleFontDataDirect2D.cpp:
475         * platform/image-decoders/ScalableImageDecoder.cpp:
476         (WebCore::ScalableImageDecoder::setTargetContext): Added stub.
477         * platform/image-decoders/ScalableImageDecoder.h:
478         * platform/network/curl/CookieJarDB.cpp:
479         (WebCore::CookieJarDB::hasCookies):
480         (WebCore::CookieJarDB::canAcceptCookie):
481
482 2019-07-01  Wenson Hsieh  <wenson_hsieh@apple.com>
483
484         iOS: REGRESSION(async scroll): Caret doesn't scroll when scrolling textarea
485         https://bugs.webkit.org/show_bug.cgi?id=198217
486         <rdar://problem/51097296>
487
488         Reviewed by Simon Fraser.
489
490         Add a ScrollingLayerPositionAction argument to ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling, and
491         avoid bailing early in the case where ScrollingLayerPositionAction::Set is used. See the WebKit ChangeLog for
492         more detail.
493
494         Test: editing/selection/ios/update-selection-after-overflow-scroll.html
495
496         * page/scrolling/ScrollingTreeScrollingNode.cpp:
497         (WebCore::ScrollingTreeScrollingNode::wasScrolledByDelegatedScrolling):
498         * page/scrolling/ScrollingTreeScrollingNode.h:
499
500 2019-07-01  Antti Koivisto  <antti@apple.com>
501
502         REGRESSION(r240047): Overflow scrollers on WK1 fail to update their content size when it changes
503         https://bugs.webkit.org/show_bug.cgi?id=199360
504         <rdar://problem/51643386>
505
506         Reviewed by Simon Fraser.
507
508         r240047 replaced didCommitChangesForLayer() mechanism by a more narrow didChangePlatformLayerForLayer.
509         Unfortunately on WK1 we relied on scroll layers being invalidated after every size (and scrollbar) change.
510         Without this invalidation we don't call WebChromeClientIOS::addOrUpdateScrollingLayer and the UIKit delegate
511         that resizes the UIScrollView content.
512
513         Fix by removing the scroll layer invalidation mechanism from LegacyWebKitScrollingLayerCoordinator completely and instead
514         simply update all scroll layers after commit. The UIKit delegate doesn't do any significant work if nothing changes,
515         this was not a very meaninful optimization.
516
517         * rendering/RenderLayerCompositor.cpp:
518         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayersAfterFlush):
519
520         Update all scroll layers after flush (similar to viewport constrained layers).
521
522         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
523         (WebCore::LegacyWebKitScrollingLayerCoordinator::updateScrollingLayer):
524         (WebCore::LegacyWebKitScrollingLayerCoordinator::addScrollingLayer):
525         (WebCore::LegacyWebKitScrollingLayerCoordinator::removeScrollingLayer):
526         (WebCore::LegacyWebKitScrollingLayerCoordinator::registerScrollingLayersNeedingUpdate): Deleted.
527         (WebCore::LegacyWebKitScrollingLayerCoordinator::didChangePlatformLayerForLayer): Deleted.
528         * rendering/RenderLayerCompositor.h:
529
530 2019-07-01  Philippe Normand  <pnormand@igalia.com>
531
532         [GStreamer] Cannot play Bert's Bytes radio stream from http://radio.dos.nl/
533         https://bugs.webkit.org/show_bug.cgi?id=198376
534
535         Reviewed by Xabier Rodriguez-Calvar.
536
537         The delayed startup was due to a mix of buffering feedback
538         messages not handled correctly by the player. We were handling
539         download and streaming buffering metrics without distinction.
540         Range requests (used for seeking) were also triggering on-disk
541         buffering in some cases. The buffering percentage estimation based
542         on network read position was not working either because uint64_t
543         division doesn't return a floating point value.
544
545         No new tests, existing media tests cover this patch.
546
547         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
548         (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
549         (WebCore::MediaPlayerPrivateGStreamer::play):
550         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
551         (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
552         (WebCore::MediaPlayerPrivateGStreamer::updateBufferingStatus):
553         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
554         (WebCore::MediaPlayerPrivateGStreamer::maxTimeLoaded const):
555         (WebCore::MediaPlayerPrivateGStreamer::didLoadingProgress const):
556         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
557         (WebCore::MediaPlayerPrivateGStreamer::updateDownloadBufferingFlag):
558         (WebCore::MediaPlayerPrivateGStreamer::setPreload):
559         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
560         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
561         (webkitWebSrcReset):
562         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.h:
563
564 2019-07-01  Miguel Gomez  <magomez@igalia.com>
565
566         REGRESSION(r246963) GTK's debug build is broken
567         https://bugs.webkit.org/show_bug.cgi?id=199358
568
569         Reviewed by Michael Catanzaro.
570
571         Add traits to be able to downcast AnimatedBackingStoreClient.
572
573         * platform/graphics/nicosia/NicosiaAnimatedBackingStoreClient.h:
574         (Nicosia::AnimatedBackingStoreClient::AnimatedBackingStoreClient):
575         (Nicosia::AnimatedBackingStoreClient::type const):
576         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
577         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
578
579 2019-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>
580
581         Unreviewed. Fix GTK build with GSTREAMER_GL disabled after r246710
582
583         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
584
585 2019-07-01  Carlos Garcia Campos  <cgarcia@igalia.com>
586
587         WebSockets: add support for sending blob messages when using web sockets platform APIs
588         https://bugs.webkit.org/show_bug.cgi?id=199189
589
590         Reviewed by Youenn Fablet.
591
592         * Headers.cmake: Add missing headers.
593
594 2019-07-01  Miguel Gomez  <magomez@igalia.com>
595
596         [WPE][GTK] Content disappearing when using CSS transforms
597         https://bugs.webkit.org/show_bug.cgi?id=181757
598
599         Reviewed by Žan Doberšek.
600
601         During each layer flush, create an AnimatedBackingStoreClient instance for each layer that
602         has a backingStore and is to be animated, and send that client to the appropriate
603         TextureMapperLayer on the compositor thread. During each frame rendering, the client will
604         use the future layer position (currently 50ms in the future) to check whether new tiles are
605         required to keep the animation ongoing, and notify the appropriate CoordinatedGraphicsLayer so
606         it can perform a layer flush and provide new tiles.
607
608         * platform/TextureMapper.cmake:
609         * platform/graphics/nicosia/NicosiaAnimatedBackingStoreClient.h: Added.
610         * platform/graphics/nicosia/NicosiaPlatformLayer.h:
611         (Nicosia::CompositionLayer::flushState):
612         * platform/graphics/texmap/TextureMapperAnimation.cpp:
613         (WebCore::TextureMapperAnimation::applyKeepingInternalState):
614         (WebCore::TextureMapperAnimations::applyKeepingInternalState):
615         * platform/graphics/texmap/TextureMapperAnimation.h:
616         * platform/graphics/texmap/TextureMapperLayer.cpp:
617         (WebCore::TextureMapperLayer::computeTransformsRecursive):
618         (WebCore::TextureMapperLayer::setAnimatedBackingStoreClient):
619         (WebCore::TextureMapperLayer::syncAnimations):
620         * platform/graphics/texmap/TextureMapperLayer.h:
621         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
622         (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer):
623         (WebCore::clampToContentsRectIfRectIsInfinite):
624         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
625         (WebCore::CoordinatedGraphicsLayer::requestBackingStoreUpdate):
626         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
627         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
628
629 2019-06-30  Antti Koivisto  <antti@apple.com>
630
631         Use separate variables for moving and stationary scrolling relationships in RemoteLayerTreeNode
632         https://bugs.webkit.org/show_bug.cgi?id=199348
633
634         Reviewed by Darin Adler.
635
636         * page/scrolling/ScrollingStateStickyNode.cpp:
637         * page/scrolling/ScrollingTree.cpp:
638         (WebCore::ScrollingTree::commitTreeState):
639         * page/scrolling/ScrollingTree.h:
640         (WebCore::ScrollingTree::activeOverflowScrollProxyNodes):
641         (WebCore::ScrollingTree::activePositionedNodes):
642         (WebCore::ScrollingTree::nodesWithRelatedOverflow): Deleted.
643
644         Use separate sets for overflow proxies and positioned nodes.
645         Use Refs to nodes instead of ids to simplify client code. This doesn't affect lifetimes, these sets are cleared
646         at the beginning of each commit.
647
648         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
649         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
650         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
651         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
652
653 2019-06-30  Andres Gonzalez  <andresg_22@apple.com>
654
655         Enhance support of aria-haspopup per ARIA 1.1 specification.
656         https://bugs.webkit.org/show_bug.cgi?id=199216
657         <rdar://problem/46221342>
658
659         Reviewed by Chris Fleizach.
660
661         Test button-with-aria-haspopup-role.html was expanded to cover testing
662         of new functionality.
663
664         * accessibility/AccessibilityObject.cpp:
665         (WebCore::AccessibilityObject::popupValue const): replaces hasPopupValue.
666         (WebCore::AccessibilityObject::hasPopupValue const): Deleted.
667         * accessibility/AccessibilityObject.h:
668         * accessibility/AccessibilityRenderObject.cpp:
669         (WebCore::AccessibilityRenderObject::hasPopup const): method rename.
670         * accessibility/atk/WebKitAccessible.cpp:
671         (webkitAccessibleGetAttributes): method rename.
672         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
673         (-[WebAccessibilityObjectWrapper accessibilityPopupValue]):
674         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
675         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
676
677 2019-06-30  Zalan Bujtas  <zalan@apple.com>
678
679         [LFC] Implement Layout::printLayoutTreeForLiveDocuments
680         https://bugs.webkit.org/show_bug.cgi?id=199343
681         <rdar://problem/52393047>
682
683         Reviewed by Antti Koivisto.
684
685         * layout/layouttree/LayoutTreeBuilder.cpp:
686         (WebCore::Layout::printLayoutTreeForLiveDocuments):
687         * page/FrameViewLayoutContext.cpp:
688         (WebCore::layoutUsingFormattingContext):
689
690 2019-06-22  Darin Adler  <darin@apple.com>
691
692         Streamline some string code, focusing on functions that were using substringSharingImpl
693         https://bugs.webkit.org/show_bug.cgi?id=198898
694
695         Reviewed by Daniel Bates.
696
697         * css/CSSComputedStyleDeclaration.cpp:
698         (WebCore::CSSComputedStyleDeclaration::CSSComputedStyleDeclaration): Take a StringView
699         instead of a String argument for the pseudo-element name. This prevents us from having
700         to use substringSharingImpl to strip off leading colons.
701         (WebCore::CSSComputedStyleDeclaration::create): Moved this function in here since it's
702         no longer being inlined.
703
704         * css/CSSComputedStyleDeclaration.h: Moved the create function to no longer be inlined,
705         since it's better to have the constructor be inlined in the create function instead.
706         Changed the pseudo-element name argument to be a StringView rather than a String.
707         Also initialize m_refCount in the class definition.
708
709         * css/CSSSelector.cpp:
710         (WebCore::CSSSelector::parsePseudoElementType): Take a StringView instead of a String.
711         * css/CSSSelector.h: Updated for the above change.
712
713         * css/SelectorPseudoTypeMap.h: Change both parse functions to take StringView. Before
714         one took a StringImpl and the other used const StringView&, which is not as good as
715         StringView.
716
717         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py: Use StringView, not
718         const StringView&.
719
720         * css/makeSelectorPseudoElementsMap.py: Use StringView rather than StringImpl.
721
722         * css/parser/CSSParserImpl.cpp:
723         (WebCore::CSSParserImpl::parsePageSelector): Use a StringView for the pseudo-element
724         name. It was already computed as a StringView, but the old code converted it to
725         an AtomicString.
726
727         * css/parser/CSSParserSelector.cpp:
728         (WebCore::CSSParserSelector::parsePagePseudoSelector): Take a StringView, and
729         return a std::unique_ptr.
730         (WebCore::CSSParserSelector::parsePseudoElementSelector): Renamed to not mention
731         StringView in function name. Take a StringView, not a StringView&. Do the lowercasing
732         inside this function rather than having it be a caller responsibility. Don't convert
733         from a StringView to an AtomicString before starting to parse; only do it in the
734         "unknown/custom" case. Return a std::unique_ptr.
735         (WebCore::CSSParserSelector::parsePseudoClassSelector): Ditto.
736         * css/parser/CSSParserSelector.h: Make the three parse functions all take a StringView
737         and all return a std::unique_ptr. They were already creating objects, but before
738         callers just had to know to adopt.
739         * css/parser/CSSSelectorParser.cpp:
740         (WebCore::CSSSelectorParser::consumePseudo): Updated to use improved parse
741         functions above.
742
743         * page/DOMWindow.cpp:
744         (WebCore::DOMWindow::getMatchedCSSRules const): Updated to use the new
745         parsePseudoElementType above and use StringView::substring instead of
746         String::substringSharingImpl.
747
748         * platform/Length.cpp:
749         (WebCore::newCoordsArray): Local string that is "spacified" can't have any non-Latin-1
750         characters, so use LChar instead of UChar.
751
752         * rendering/RenderText.cpp:
753         (WebCore::convertNoBreakSpaceToSpace): Renamed for clarity. Also use constexpr
754         instead of inline since this is a pure function.
755         (WebCore::capitalize): Tighten up logic a bit.
756
757 2019-06-29  Simon Fraser  <simon.fraser@apple.com>
758
759         Remove a PLATFORM(IOS_FAMILY) related to repaint offsets in composited scrolling layers
760         https://bugs.webkit.org/show_bug.cgi?id=199342
761
762         Reviewed by Zalan Bujtas.
763
764         Code in RenderObject::shouldApplyCompositedContainerScrollsForRepaint() adds VisibleRectContextOption::ApplyCompositedContainerScrolls
765         only for iOS, and RenderLayerBacking::setContentsNeedDisplayInRect() subtracts out scroll position for only iOS,
766         so remove this iOS-specific code.
767
768         Blame for this code mentions touch event regions, so I tested these but they use absoluteBoundingBoxRect()
769         which doesn't hit this code. Still, I added a layout test for touch regions inside scrolled overflow.
770
771         Existing tests exist for repaint inside scrolled overflow.
772
773         Test: fast/events/touch/ios/touch-event-regions/scrolled-overflow.html
774
775         * rendering/RenderLayerBacking.cpp:
776         (WebCore::RenderLayerBacking::setContentsNeedDisplayInRect):
777         * rendering/RenderObject.cpp:
778         (WebCore::RenderObject::shouldApplyCompositedContainerScrollsForRepaint): Deleted.
779         (WebCore::RenderObject::visibleRectContextForRepaint): Deleted.
780         * rendering/RenderObject.h:
781         (WebCore::RenderObject::visibleRectContextForRepaint):
782
783 2019-06-28  Tim Horton  <timothy_horton@apple.com>
784
785         iOS WebKit2 find-in-page indicator doesn't move with 'overflow: scroll'
786         https://bugs.webkit.org/show_bug.cgi?id=175032
787         <rdar://problem/29346482>
788
789         Reviewed by Wenson Hsieh.
790
791         * editing/FrameSelection.cpp:
792         (WebCore::FrameSelection::selectionBounds const):
793         (WebCore::FrameSelection::revealSelection):
794         * editing/FrameSelection.h:
795         Make selectionBounds' clipToVisibleContent param an enum class.
796
797         * page/TextIndicator.cpp:
798         (WebCore::initializeIndicator):
799         Save the un-clipped selection rect; otherwise we'll frequently save 0, 0
800         here when finding a match that is off-screen.
801
802 2019-06-28  Zalan Bujtas  <zalan@apple.com>
803
804         [Text autosizing][iPadOS] bing.com is hard to read even with boosted text because of the line height
805         https://bugs.webkit.org/show_bug.cgi?id=199318
806         <rdar://problem/51826096>
807
808         Reviewed by Wenson Hsieh.
809
810         Initial implementation of line height boosting on iPadOs. It enlarges line height in certain cases to improve readability when the text content feels too dense.
811         It kicks in only for relatively small text (12px) where it slightly (1.25x) changes the line height to widen the gap between lines.
812
813         * css/StyleResolver.cpp:
814         (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
815
816 2019-06-28  Alex Christensen  <achristensen@webkit.org>
817
818         Make getHostnamesWithCookies more robust
819         https://bugs.webkit.org/show_bug.cgi?id=199334
820         <rdar://problem/51860593>
821
822         Reviewed by Brent Fulgham.
823
824         Crash logs suggest either httpCookies is returning a nil cookie or a cookie without a domain.
825         This should not happen, but if it does we shouldn't crash.
826
827         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
828         (WebCore::NetworkStorageSession::getHostnamesWithCookies):
829
830 2019-06-28  chris fleizach  <cfleizach@apple.com>
831
832         AX: Both convertToNSArray() functions in WebAccessibilityObjectWrapperBase.mm leak every NSMutableArray returned
833         https://bugs.webkit.org/show_bug.cgi?id=199306
834
835         Reviewed by David Kilzer.
836
837         Stop leaking every instance of convertToNSArray and return an autoreleased version.
838         Remove unneeded casts.
839
840         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
841         (-[WebAccessibilityObjectWrapper accessibilityFindMatchingObjects:]):
842         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
843         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
844         (convertToNSArray):
845         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
846         (-[WebAccessibilityObjectWrapper childrenVectorArray]):
847         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
848         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
849
850 2019-06-28  Wenson Hsieh  <wenson_hsieh@apple.com>
851
852         Followup to r246931
853         https://bugs.webkit.org/show_bug.cgi?id=199331
854
855         Reviewed by Tim Horton.
856
857         Extend the site-specific quirk added in r246931 to *.sharepoint.com, so that it fixes Word for enterprise
858         customers as well.
859
860         * page/Quirks.cpp:
861         (WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const):
862
863 2019-06-28  Timothy Hatcher  <timothy@apple.com>
864
865         Rename effectiveAppearanceIsInactive and useInactiveAppearance to better match UIUserInterfaceLevel.
866         https://bugs.webkit.org/show_bug.cgi?id=199336
867         rdar://problem/52348938
868
869         Reviewed by Tim Horton.
870
871         * css/StyleColor.h:
872         * dom/Document.cpp:
873         (WebCore::Document::useElevatedUserInterfaceLevel const):
874         (WebCore::Document::styleColorOptions const):
875         (WebCore::Document::useInactiveAppearance const): Deleted.
876         * dom/Document.h:
877         * page/Page.cpp:
878         (WebCore::Page::effectiveAppearanceDidChange):
879         * page/Page.h:
880         (WebCore::Page::useElevatedUserInterfaceLevel const):
881         (WebCore::Page::useInactiveAppearance const): Deleted.
882         * platform/ios/LocalCurrentTraitCollection.h:
883         (WebCore::LocalCurrentTraitCollection::usingElevatedUserInterfaceLevel const):
884         (WebCore::LocalCurrentTraitCollection::usingBaseLevelAppearance const): Deleted.
885         * platform/ios/LocalCurrentTraitCollection.mm:
886         (WebCore::LocalCurrentTraitCollection::LocalCurrentTraitCollection):
887         * rendering/RenderThemeIOS.mm:
888         (WebCore::RenderThemeIOS::systemColor const):
889         * testing/InternalSettings.cpp:
890         (WebCore::InternalSettings::setUseDarkAppearanceInternal):
891
892 2019-06-28  Simon Fraser  <simon.fraser@apple.com>
893
894         REGRESSION (r239984): pages with custom scrollbars also show normal scrollbars
895         https://bugs.webkit.org/show_bug.cgi?id=199321
896         <rdar://problem/52308095>
897
898         Reviewed by Timothy Hatcher.
899
900         Revert the part of r239984 that made isCustomScrollbar() virtual, since theme().registerScrollbar()
901         calls it from the base class constructor.
902
903         I wasn't able to make a test that tests rendering of overlay scrollbars (webkit.org/b/199323).
904
905         * platform/Scrollbar.cpp:
906         (WebCore::Scrollbar::Scrollbar):
907         * platform/Scrollbar.h:
908         (WebCore::Scrollbar::isCustomScrollbar const):
909         * rendering/RenderScrollbar.cpp:
910         (WebCore::RenderScrollbar::RenderScrollbar):
911         * rendering/RenderScrollbar.h:
912
913 2019-06-28  Wenson Hsieh  <wenson_hsieh@apple.com>
914
915         Need a way for SPI clients to know when to avoid resizing to accommodate for the input view bounds
916         https://bugs.webkit.org/show_bug.cgi?id=199331
917         <rdar://problem/52116170>
918
919         Reviewed by Tim Horton.
920
921         Add a new quirk to avoid resizing the web view when input view bounds change.
922
923         * page/Quirks.cpp:
924         (WebCore::Quirks::shouldAvoidResizingWhenInputViewBoundsChange const):
925         * page/Quirks.h:
926
927 2019-06-28  Konstantin Tokarev  <annulen@yandex.ru>
928
929         Remove traces of ENABLE_ICONDATABASE remaining after its removal in 219733
930         https://bugs.webkit.org/show_bug.cgi?id=199317
931
932         Reviewed by Michael Catanzaro.
933
934         While IconDatabase and all code using it was removed,
935         ENABLE_ICONDATABASE still exists as build option and C++ macro.
936
937         * Configurations/FeatureDefines.xcconfig:
938         * Resources/urlIcon.png: Removed file which was only used in
939         IconDatabase.cpp.
940
941 2019-06-28  Fujii Hironori  <Hironori.Fujii@sony.com>
942
943         [Win] unresolved external symbol "JSC::JSObject::didBecomePrototype(void)" referenced in function "JSC::Structure::create(...)"
944         https://bugs.webkit.org/show_bug.cgi?id=199312
945
946         Reviewed by Keith Miller.
947
948         WinCairo port, clang-cl Release builds reported a following linkage error:
949
950         > WebCore.lib(UnifiedSource-4babe430-10.cpp.obj) : error LNK2019: unresolved external symbol "public: void __cdecl JSC::JSObject::didBecomePrototype(void)" (?didBecomePrototype@JSObject@JSC@@QEAAXXZ) referenced in function "public: static class JSC::Structure * __cdecl JSC::Structure::create(class JSC::VM &,class JSC::JSGlobalObject *,class JSC::JSValue,class JSC::TypeInfo const &,struct JSC::ClassInfo const *,unsigned char,unsigned int)" (?create@Structure@JSC@@SAPEAV12@AEAVVM@2@PEAVJSGlobalObject@2@VJSValue@2@AEBVTypeInfo@2@PEBUClassInfo@2@EI@Z)
951
952         No new tests because there is no behavior change.
953
954         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Include <JavaScriptCore/JSCInlines.h>,
955         and do not include headers which is included by it.
956
957 2019-06-27  Zalan Bujtas  <zalan@apple.com>
958
959         REGRESSION(r244633): e-mail with "height: 100%" causes unstable layout.
960         https://bugs.webkit.org/show_bug.cgi?id=199303
961         <rdar://problem/51340927>
962
963         Reviewed by Tim Horton.
964
965         This patch restores the previous behavior (pre r244633) where we intentionally reported stale content size value to
966         avoid unstable layout for content like height: 100px.
967
968         * page/FrameView.cpp:
969         (WebCore::FrameView::autoSizeIfEnabled):
970
971 2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>
972
973         [WinCairo][MediaFoundation] Stop using soft linking for Media Foundation
974         https://bugs.webkit.org/show_bug.cgi?id=198783
975         <rdar://problem/52301843>
976
977         Unreviewed compilation warning fix. clang-cl reports:
978
979         ..\..\Source\WebCore\platform\graphics\win\MediaPlayerPrivateMediaFoundation.cpp(526,10): warning: address of function 'MFCreateTopology' will always evaluate to 'true' [-Wpointer-bool-conversion]
980             if (!MFCreateTopology)
981                 ~^~~~~~~~~~~~~~~~
982         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
983         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource): Removed the pointer check of MFCreateTopology.
984
985 2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>
986
987         [WinCairo][MediaFoundation] Stop using soft linking for Media Foundation
988         https://bugs.webkit.org/show_bug.cgi?id=198783
989
990         Reviewed by Alex Christensen.
991
992         WinCairo is supporting Windows 7 or newer. It doesn't need soft
993         linking anymore.
994
995         No new tests because there is no behavior change.
996
997         * PlatformWinCairo.cmake: Added libraries to WebCore_LIBRARIES.
998         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
999         (WebCore::mimeTypeCache):
1000         (WebCore::MediaPlayerPrivateMediaFoundation::setRate):
1001         (WebCore::MediaPlayerPrivateMediaFoundation::setAllChannelVolumes):
1002         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
1003         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
1004         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
1005         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
1006         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
1007         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
1008         (WebCore::MediaPlayerPrivateMediaFoundation::updateReadyState):
1009         (WebCore::MediaPlayerPrivateMediaFoundation::videoDisplay):
1010         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
1011         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::setFrameRate):
1012         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
1013         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::initializeD3D):
1014         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::createD3DSample):
1015
1016 2019-06-27  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1017
1018          Fix build error on WebCore when disabling ENABLE_INDEXED_DATABASE.
1019         https://bugs.webkit.org/show_bug.cgi?id=199286
1020
1021          Unreviewed build fix.
1022
1023          * testing/Internals.cpp: Make method conditional.
1024          * testing/Internals.h: Ditto.
1025          * testing/Internals.idl: Ditto.
1026
1027 2019-06-27  Simon Fraser  <simon.fraser@apple.com>
1028
1029         Fix crash in ScrollingStateNode::insertChild()
1030         https://bugs.webkit.org/show_bug.cgi?id=199297
1031         rdar://problem/49415136
1032
1033         Reviewed by Tim Horton.
1034
1035         Crash data suggest that 'parent' can be deleted in ScrollingStateTree::insertNode(). To avoid this,
1036         have ScrollingStateTree::m_stateNodeMap store RefPts, and do the same for ScrollingTree::m_nodeMap.
1037
1038         * page/scrolling/ScrollingStateNode.cpp:
1039         (WebCore::ScrollingStateNode::ScrollingStateNode): The relaxAdoptionRequirement() is required
1040         to avoid ASSERT(!m_adoptionIsRequired) when the node is added to the tree in its constructor.
1041         * page/scrolling/ScrollingStateTree.cpp:
1042         (WebCore::ScrollingStateTree::unparentNode):
1043         (WebCore::ScrollingStateTree::unparentChildrenAndDestroyNode):
1044         (WebCore::ScrollingStateTree::detachAndDestroySubtree):
1045         (WebCore::ScrollingStateTree::stateNodeForID const):
1046         * page/scrolling/ScrollingStateTree.h:
1047         * page/scrolling/ScrollingTree.cpp:
1048         (WebCore::ScrollingTree::updateTreeFromStateNode):
1049         * page/scrolling/ScrollingTree.h:
1050
1051 2019-06-27  Simon Fraser  <simon.fraser@apple.com>
1052
1053         REGRESSION (r246869): ASSERTION FAILED: !renderer().hasRepaintLayoutRects() || renderer().repaintLayoutRects().m_repaintRect == renderer().clippedOverflowRectForRepaint(renderer().containerForRepaint())
1054         https://bugs.webkit.org/show_bug.cgi?id=199274
1055
1056         Reviewed by Zalan Bujtas.
1057
1058         When layer backing sharing changes, we need to clear cached repaint rects, since they
1059         painting root changes.
1060
1061         * rendering/RenderLayer.cpp:
1062         (WebCore::RenderLayer::setBackingProviderLayer):
1063
1064 2019-06-27  Beth Dakin  <bdakin@apple.com>
1065
1066         Upstream use of MACCATALYST
1067         https://bugs.webkit.org/show_bug.cgi?id=199245
1068         rdar://problem/51687723
1069
1070         Reviewed by Tim Horton.
1071
1072         * Configurations/Base.xcconfig:
1073         * Configurations/FeatureDefines.xcconfig:
1074         * Configurations/SDKVariant.xcconfig:
1075         * Configurations/WebCore.xcconfig:
1076         * Modules/geolocation/ios/GeolocationPositionIOS.mm:
1077         (WebCore::GeolocationPosition::GeolocationPosition):
1078         * editing/cocoa/DictionaryLookup.mm:
1079         (-[WebRevealHighlight drawHighlightContentForItem:context:]):
1080         (WebCore::showPopupOrCreateAnimationController):
1081         * editing/cocoa/WebContentReaderCocoa.mm:
1082         * page/Navigator.h:
1083         * page/SettingsBase.cpp:
1084         (WebCore::SettingsBase::defaultContentChangeObserverEnabled):
1085         * page/cocoa/MemoryReleaseCocoa.mm:
1086         (WebCore::platformReleaseMemory):
1087         * platform/audio/ios/AudioSessionIOS.mm:
1088         (WebCore::AudioSession::setCategory):
1089         (WebCore::AudioSession::routingContextUID const):
1090         * platform/cocoa/ParentalControlsContentFilter.mm:
1091         (WebCore::canHandleResponse):
1092         * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
1093         (WebCore::AVAssetMIMETypeCache::isAvailable const):
1094         * platform/graphics/avfoundation/objc/AVStreamDataParserMIMETypeCache.mm:
1095         (WebCore::AVStreamDataParserMIMETypeCache::isAvailable const):
1096         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1097         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1098         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
1099         * platform/graphics/cv/ImageTransferSessionVT.h:
1100         * platform/graphics/cv/ImageTransferSessionVT.mm:
1101         (WebCore::cvPixelFormatOpenGLKey):
1102         (WebCore::ImageTransferSessionVT::ImageTransferSessionVT):
1103         * platform/ios/PasteboardIOS.mm:
1104         (WebCore::Pasteboard::readPasteboardWebContentDataForType):
1105         (WebCore::Pasteboard::supportedWebContentPasteboardTypes):
1106         * platform/ios/PlatformPasteboardIOS.mm:
1107         (WebCore::registerItemToPasteboard):
1108         (WebCore::PlatformPasteboard::write):
1109         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1110         (-[WebAVPlayerLayer setVideoGravity:]):
1111         * platform/ios/WebItemProviderPasteboard.mm:
1112         (-[WebItemProviderRegistrationInfoList itemProvider]):
1113         (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):
1114         (-[WebItemProviderPasteboard numberOfFiles]):
1115         * platform/network/cf/CertificateInfoCFNet.cpp:
1116         (WebCore::CertificateInfo::summaryInfo const):
1117
1118 2019-06-27  Brent Fulgham  <bfulgham@apple.com>
1119
1120         Correct document lifecycle while processing commands
1121         https://bugs.webkit.org/show_bug.cgi?id=199146
1122         <rdar://problem/52047462>
1123
1124         Reviewed by Darin Adler.
1125
1126         Protect the document while commands are being processed since script may run
1127         during the style resolution. We should protect against this.
1128
1129         * dom/Document.cpp:
1130         (WebCore::command):
1131
1132 2019-06-27  Jon Davis  <jond@apple.com>
1133
1134         Add status for Web Bluetooth Scanning standards specification.
1135         https://bugs.webkit.org/show_bug.cgi?id=199235
1136
1137         Reviewed by Joseph Pecoraro.
1138
1139         * features.json:
1140
1141 2019-06-27  Saam Barati  <sbarati@apple.com>
1142
1143         Make WEBGPU enabled only on Mojave and later.
1144
1145         Rubber-stamped by Myles C. Maxfield.
1146
1147         We're going to look into re-enabling it on High Sierra in:
1148         https://bugs.webkit.org/show_bug.cgi?id=199275
1149
1150         * Configurations/FeatureDefines.xcconfig:
1151
1152 2019-06-27  Antti Koivisto  <antti@apple.com>
1153
1154         REGRESSION (touch-action): Can't scroll vertically when touching a horizontally-scrollable element on instagram.com
1155         https://bugs.webkit.org/show_bug.cgi?id=199268
1156         <rdar://problem/52246473>
1157
1158         Reviewed by Antoine Quint.
1159
1160         Test: pointerevents/ios/touch-action-region-manipulation.html
1161
1162         Having a restrictive touch-action value like 'pan-y' on on element and then having a descendant with
1163         'touch-action: manipulation' computes to 'none'.
1164
1165         * css/StyleResolver.cpp:
1166         (WebCore::computeEffectiveTouchActions):
1167
1168         For value 'manipulation' return the current effective value, similar to the reverse case above.
1169         Set intersection should only be computed out of restrictive values (pan-x/pan-y/pinch-zoom/none).
1170
1171 2019-06-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1172
1173         [SOUP] Use libsoup WebSockets API
1174         https://bugs.webkit.org/show_bug.cgi?id=199151
1175
1176         Reviewed by Michael Catanzaro.
1177
1178         Use createWebSocketChannel() from the provider also for libsoup when WEBKIT_USE_SOUP_WEBSOCKETS env var is set.
1179
1180         * Modules/websockets/ThreadableWebSocketChannel.cpp:
1181         (WebCore::ThreadableWebSocketChannel::create):
1182
1183 2019-06-27  Devin Rousso  <drousso@apple.com>
1184
1185         Web Inspector: throw an error if console.count/console.countReset is called with an object that throws an error from toString
1186         https://bugs.webkit.org/show_bug.cgi?id=199252
1187
1188         Reviewed by Joseph Pecoraro.
1189
1190         Parse the arguments passed to `console.count` and `console.countReset` before sending it to
1191         the `ConsoleClient` so that an error can be thrown if the first argument doesn't `toString`
1192         nicely (e.g. without throwing an error).
1193
1194         Generate call stacks for `console.countReset` to match other `console` methods. Also do this
1195         for `console.time`, `console.timeLog`, and `console.timeEnd`. Limit the call stack to only
1196         have the top frame, so no unnecessary/extra data is sent to the frontend (right now, only
1197         the call location is displayed).
1198
1199         Rename `title` to `label` for `console.time`, `console.timeLog`, and `console.timeEnd` to
1200         better match the spec.
1201
1202         Updated existing LayoutTests:
1203          - inspector/console/console-count.html
1204          - inspector/console/console-api.html
1205
1206         Also covered by existing WPT tests.
1207
1208         * inspector/InspectorInstrumentation.h:
1209         (WebCore::InspectorInstrumentation::consoleCount):
1210         (WebCore::InspectorInstrumentation::consoleCountReset):
1211         (WebCore::InspectorInstrumentation::startConsoleTiming):
1212         (WebCore::InspectorInstrumentation::logConsoleTiming):
1213         (WebCore::InspectorInstrumentation::stopConsoleTiming):
1214         * inspector/InspectorInstrumentation.cpp:
1215         (WebCore::InspectorInstrumentation::consoleCountImpl):
1216         (WebCore::InspectorInstrumentation::consoleCountResetImpl):
1217         (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
1218         (WebCore::InspectorInstrumentation::logConsoleTimingImpl):
1219         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
1220
1221         * page/PageConsoleClient.h:
1222         * page/PageConsoleClient.cpp:
1223         (WebCore::PageConsoleClient::count):
1224         (WebCore::PageConsoleClient::countReset):
1225         (WebCore::PageConsoleClient::time):
1226         (WebCore::PageConsoleClient::timeLog):
1227         (WebCore::PageConsoleClient::timeEnd):
1228
1229         * workers/WorkerConsoleClient.h:
1230         * workers/WorkerConsoleClient.cpp:
1231         (WebCore::WorkerConsoleClient::count):
1232         (WebCore::WorkerConsoleClient::countReset):
1233         (WebCore::WorkerConsoleClient::time):
1234         (WebCore::WorkerConsoleClient::timeLog):
1235         (WebCore::WorkerConsoleClient::timeEnd):
1236
1237         * worklets/WorkletConsoleClient.h:
1238         * worklets/WorkletConsoleClient.cpp:
1239         (WebCore::WorkletConsoleClient::count):
1240         (WebCore::WorkletConsoleClient::countReset):
1241
1242 2019-06-27  Saam Barati  <sbarati@apple.com>
1243
1244         [WHLSL] Implement arrays and MakeArrayReference
1245         https://bugs.webkit.org/show_bug.cgi?id=198414
1246
1247         Reviewed by Myles C. Maxfield.
1248
1249         This patch implements WHLSL arrays. The main implementation detail is that
1250         arrays get compiled to use Metal's array type. To make everything work, this
1251         patch also fixes a few bugs:
1252         - The checker now allows "operator.length" to be called on arrays. Prior to
1253         this patch, it was just allowed on array references.
1254         
1255         - The preserve variable lifetimes pass now looks at MakeArrayReference nodes.
1256         Prior to this patch, it just looked at MakePointerExpression.
1257         
1258         - We were producing the wrong type for ander arguments for indexed accesses
1259         on array types. We were saying the argument that was produced was a reference
1260         to an array instead of an array reference to the element type.
1261         
1262         - The trie we compose for the reverse type hierarchy was inserting elements
1263         into the wrong "children" vector. We were always inserting things into the
1264         top level vector. This is wrong when we have a nesting of types > 1.
1265         
1266         I also found a bug with having arrays of pointers when writing this patch.
1267         Work on this will take place in a follow up: https://bugs.webkit.org/show_bug.cgi?id=199197
1268
1269         Tests: webgpu/whlsl-huge-array.html
1270                webgpu/whlsl-make-array-reference.html
1271                webgpu/whlsl-simple-arrays.html
1272                webgpu/whlsl-two-dimensional-array.html
1273
1274         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
1275         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
1276         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
1277         (WebCore::WHLSL::Metal::writeNativeFunction):
1278         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.cpp:
1279         (WebCore::WHLSL::Metal::TypeNamer::insert):
1280         (WebCore::WHLSL::Metal::TypeNamer::emitUnnamedTypeDefinition):
1281         * Modules/webgpu/WHLSL/Metal/WHLSLTypeNamer.h:
1282         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
1283         (WebCore::WHLSL::resolveByInstantiation):
1284         (WebCore::WHLSL::Checker::visit):
1285         * Modules/webgpu/WHLSL/WHLSLPreserveVariableLifetimes.cpp:
1286         (WebCore::WHLSL::EscapedVariableCollector::escapeVariableUse):
1287         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
1288         (WebCore::WHLSL::wrapAnderCallArgument):
1289         (WebCore::WHLSL::anderCallArgument):
1290         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
1291
1292 2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>
1293
1294         [CMake] Bump cmake_minimum_required version to 3.10
1295         https://bugs.webkit.org/show_bug.cgi?id=199181
1296
1297         Reviewed by Don Olmstead.
1298
1299         No new tests because there is no behavior change.
1300
1301         * CMakeLists.txt:
1302
1303 2019-06-26  Simon Fraser  <simon.fraser@apple.com>
1304
1305         [Async overflow scrolling] Fix missing or misplaced content inside overflow:scroll
1306         https://bugs.webkit.org/show_bug.cgi?id=199253
1307         rdar://problem/51855156, rdar://problem/51934514
1308
1309         Reviewed by Zalan Bujtas.
1310
1311         This patch fixes a couple of related issues triggered by failing to composite layers inside non-stacking-context
1312         overflow scroll.
1313
1314         First, we relied on overlap testing to composite position:relative layers inside overflow:scroll, but this only
1315         worked when they came later in z-order, so didn't work for layers with negative z-index.
1316         RenderLayerCompositor::requiresCompositingForIndirectReason() was intended to trigger compositing in such cases,
1317         but it only did so for position:absolute inside stacking-context scroller, because
1318         isNonScrolledLayerInsideScrolledCompositedAncestor() tested ancestorMovedByScroller && !layerMovedByScroller.
1319
1320         I fixed this by sharing code between the three places that ask whether compositing crosses a containing-block
1321         boundary to call a single function, RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor(),
1322         that returns a ScrollPositioningBehavior. We now do compositing for both "moves" and "stationary" behaviors (but
1323         not "none"), ensuring that position:relative inside non-stacking scroller is always composited.
1324
1325         However, this would trigger compositing on layers that should be using backing sharing; if they were outside the
1326         visible part of the scroller, the overlap code would not trigger, but the
1327         "IndirectCompositingReason::OverflowScrollPositioning" code would. This is undesirable; any layer that can use
1328         backing sharing should, because that's fewer composited layers, so smaller layer trees and less backing store.
1329         To fix this, I moved the backing-sharing check before the overlap check in
1330         RenderLayerCompositor::computeCompositingRequirements().
1331
1332         The "layer.setHasCompositingDescendant(currentState.subtreeIsCompositing)" line was in the wrong place,
1333         triggering assertions on some content; "subtreeIsCompositing" only refers to child layers, so this bit needs to
1334         be set right after we've traversed the z-order lists.
1335
1336         Tests: compositing/scrolling/async-overflow-scrolling/hidden-relative-layer-content-in-scroller.html
1337                compositing/scrolling/async-overflow-scrolling/layer-for-negative-z-in-scroller.html
1338                compositing/scrolling/async-overflow-scrolling/negative-z-in-scroller.html
1339
1340         * rendering/RenderLayerCompositor.cpp:
1341         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1342         (WebCore::RenderLayerCompositor::traverseUnchangedSubtree):
1343         (WebCore::RenderLayerCompositor::requiresCompositingForIndirectReason const):
1344         (WebCore::isScrolledByOverflowScrollLayer):
1345         (WebCore::enclosingCompositedScrollingLayer):
1346         (WebCore::RenderLayerCompositor::layerScrollBehahaviorRelativeToCompositedAncestor):
1347         (WebCore::RenderLayerCompositor::computeCoordinatedPositioningForLayer const):
1348         (WebCore::isNonScrolledLayerInsideScrolledCompositedAncestor): Deleted.
1349         (WebCore::RenderLayerCompositor::layerContainingBlockCrossesCoordinatedScrollingBoundary): Deleted.
1350         * rendering/RenderLayerCompositor.h:
1351
1352 2019-06-26  Ryosuke Niwa  <rniwa@webkit.org>
1353
1354         ReplacementFragment should not have script observable side effects
1355         https://bugs.webkit.org/show_bug.cgi?id=199147
1356
1357         Reviewed by Wenson Hsieh.
1358
1359         Fixed the bug that ReplacementFragment has script observable side effects.
1360
1361         Use a brand new document for sanitization where the script is disabled for test rendering,
1362         and remove style and script elements as well as event handlers before the test rendering
1363         and the actual pasting.
1364
1365         Test: editing/pasteboard/paste-contents-with-side-effects.html
1366
1367         * editing/ReplaceSelectionCommand.cpp:
1368         (WebCore::ReplacementFragment::document): Deleted.
1369         (WebCore::ReplacementFragment::ReplacementFragment): Use createPageForSanitizingWebContent
1370         to create our own document for test rendering. We need to copy over the computed style
1371         from the root editable element (editing host) to respect whitespace treatment, etc...
1372         (WebCore::ReplacementFragment::removeContentsWithSideEffects): Moved from removeHeadContents.
1373         Now removes event handlers and JavaScript URLs.
1374         (WebCore::ReplacementFragment::insertFragmentForTestRendering): Renamed variable names.
1375         (WebCore::ReplaceSelectionCommand::willApplyCommand): Create the plain text and HTML markup
1376         for beforeinput and input events before ReplacementFragment removes contents with side effects.
1377         (WebCore::ReplaceSelectionCommand::ensureReplacementFragment): The removal of head elements
1378         is now done in ReplacementFragment's constructor.
1379
1380 2019-06-26  Andy Estes  <aestes@apple.com>
1381
1382         [Payment Request] Set state to Closed when show() is called during an active session
1383         https://bugs.webkit.org/show_bug.cgi?id=199239
1384
1385         Reviewed by Alex Christensen.
1386
1387         According to step 7 of https://w3c.github.io/payment-request/#show-method (as of 26 June
1388         2019), when another payment request is showing, calling show() should set the [[state]]
1389         internal slot to Closed in addition to rejecting the show promise with an AbortError. WebKit
1390         was only doing the latter. Let's do both.
1391
1392         Test: http/tests/paymentrequest/payment-is-showing.https.html
1393
1394         * Modules/paymentrequest/PaymentRequest.cpp:
1395         (WebCore::PaymentRequest::show):
1396
1397 2019-06-26  Joseph Pecoraro  <pecoraro@apple.com>
1398
1399         Web Inspector: Implement console.countReset
1400         https://bugs.webkit.org/show_bug.cgi?id=199200
1401
1402         Reviewed by Devin Rousso.
1403
1404         Updated existing tests.
1405
1406         * inspector/InspectorInstrumentation.cpp:
1407         (WebCore::InspectorInstrumentation::consoleCountImpl):
1408         (WebCore::InspectorInstrumentation::consoleCountResetImpl):
1409         * inspector/InspectorInstrumentation.h:
1410         (WebCore::InspectorInstrumentation::consoleCountReset):
1411         * page/PageConsoleClient.cpp:
1412         (WebCore::PageConsoleClient::countReset):
1413         * page/PageConsoleClient.h:
1414         * workers/WorkerConsoleClient.cpp:
1415         (WebCore::WorkerConsoleClient::countReset):
1416         * workers/WorkerConsoleClient.h:
1417         * worklets/WorkletConsoleClient.cpp:
1418         (WebCore::WorkletConsoleClient::countReset):
1419         * worklets/WorkletConsoleClient.h:
1420
1421 2019-06-26  Antoine Quint  <graouts@apple.com>
1422
1423         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
1424         https://bugs.webkit.org/show_bug.cgi?id=198999
1425         <rdar://problem/51979477>
1426
1427         Reviewed by Dean Jackson.
1428
1429         Make sure we don't return early prior to setting the flag that prevents re-entrancy, or else we would never
1430         enter this function again. No new tests, this was caught because Pointer Events WPT tests on iOS tests regressed.
1431
1432         * page/PointerCaptureController.cpp:
1433         (WebCore::PointerCaptureController::processPendingPointerCapture):
1434
1435 2019-06-26  Myles C. Maxfield  <mmaxfield@apple.com>
1436
1437         REGRESSION: ( r246394 ) webgpu/whlsl-buffer-fragment.html and webgpu/whlsl-buffer-vertex.html are failing
1438         https://bugs.webkit.org/show_bug.cgi?id=199012
1439
1440         Reviewed by Saam Barati.
1441
1442         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm:
1443         (WebCore::isAcceptableDevice):
1444         (WebCore::GPUDevice::tryCreate):
1445
1446 2019-06-26  Simon Fraser  <simon.fraser@apple.com>
1447
1448         Incorrect clippping with overflow:scroll inside oveflow:hidden with border-radius
1449         https://bugs.webkit.org/show_bug.cgi?id=199135
1450         rdar://problem/51882383
1451
1452         Reviewed by Zalan Bujtas.
1453         
1454         In some cases the geometry of the shape mask layer added to m_childContainmentLayer, for
1455         border-radius, was incorrect. GraphicsLayerCA::updateClippingStrategy() treated
1456         the rounded rect as if it were in renderer coordinates, but to match the other geometry
1457         on GraphicsLayer, it should in GraphicsLayer coordinates, so we need to offset by
1458         clipLayer->offsetFromRenderer().
1459         
1460         In addition, RenderLayerBacking::updateChildClippingStrategy() is called from
1461         the updateConfiguration(), which is before we've set offsetFromRenderer() on the clipLayer.
1462         This first call is really to find out whether the platform supports this rounded rect
1463         as a shape mask.
1464         
1465         So we need to call setMasksToBoundsRect() a second time in RenderLayerBacking::updateGeometry()
1466         after clipLayers's offsetFromRenderer() has been computed.
1467
1468         Test: compositing/scrolling/async-overflow-scrolling/border-radius-on-scroll-container.html
1469
1470         * platform/graphics/ca/GraphicsLayerCA.cpp:
1471         (WebCore::GraphicsLayerCA::updateClippingStrategy):
1472         * rendering/RenderLayerBacking.cpp:
1473         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
1474         (WebCore::RenderLayerBacking::updateDescendantClippingLayer):
1475         (WebCore::RenderLayerBacking::updateChildClippingStrategy):
1476
1477 2019-06-26  Antoine Quint  <graouts@apple.com>
1478
1479         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
1480         https://bugs.webkit.org/show_bug.cgi?id=198999
1481         <rdar://problem/51979477>
1482
1483         Reviewed by Dean Jackson.
1484
1485         Up until now, we would not account for pointer capture (see ​https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
1486         mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
1487         for it when updating :hover styles.
1488
1489         Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
1490         that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
1491         boundary mouse events. Additionally, when calling Document::prepareMouseEvent(), we also use the pointer capture element to
1492         pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.
1493
1494         * dom/Document.cpp:
1495         (WebCore::Document::prepareMouseEvent): When a new event is going to be dispatched, we must run the Process Pending Capture Element
1496         steps as mandated by the Pointer Events spec. Calling this will dispatch the appropriate pointer capture change events and also
1497         required boundary events since EventHandler::setCapturingMouseEventsElement() calls into EventHandler::updateMouseEventTargetNode().
1498         Since this may update the capturing mouse events element, we ensure that we call updateHoverActiveState() with a flag that indicates that.
1499         Finally, we use the capturing mouse events element instead of the hit-testing element to pass to updateHoverActiveState() to ensure
1500         that is has :hover styles applied.
1501         (WebCore::Document::updateHoverActiveState): Account for the new CaptureChange flag to force the invalidation of the :hover and :active
1502         elements chain at all times when the capturing mouse events element changed.
1503         * dom/Document.h:
1504         * dom/PointerEvent.h: Update PointerEvent::createForPointerCapture() to take specific parameters rather than a single PointerEvent to
1505         set the pointerId, isPrimary and pointerType properties of the generated event. This is required to call processPendingPointerCapture()
1506         outside of PointerEvent dispatch logic since we now call it from Document::prepareMouseEvent() where we haven't yet generated such an
1507         event.
1508         * page/EventHandler.cpp:
1509         (WebCore::EventHandler::pointerCaptureElementDidChange): When a new pointer capture element is set, call updateMouseEventTargetNode()
1510         to ensure that boundary events are fired to indicate the pointer capture state change.
1511         (WebCore::EventHandler::prepareMouseEvent): Keep track of the last PlatformMouseEvent used to prepare a mouse event so that we can use
1512         it when setCapturingMouseEventsElement() is called.
1513         * page/EventHandler.h:
1514         * page/PointerCaptureController.cpp:
1515         (WebCore::PointerCaptureController::pointerCaptureElement): Since Document::prepareMouseEvent() needs to know the current pointer capture
1516         element, add a new public method that indicates the pointer capture element if that element is contained in the provided document. We need
1517         to provide the document since PointerCaptureController is owned by the Page and may manage several documents.
1518         (WebCore::PointerCaptureController::dispatchEvent): Only run the Process Pending Capture Element steps when dealing with a touch or pen
1519         event since those steps are already ran for mouse events in Document::prepareMouseEvent(). Additionally, since the element target is already
1520         set to be the pointer capture element with the changes made to processPendingPointerCapture(), and because on iOS pointer capture is always
1521         active, we can remove the code that would retarget the event to the pointer capture element.
1522         (WebCore::PointerCaptureController::pointerEventWasDispatched):
1523         (WebCore::PointerCaptureController::cancelPointer):
1524         (WebCore::PointerCaptureController::processPendingPointerCapture): We now call into EventHandler::setCapturingMouseEventsElement() when the
1525         capture target element changes. We must be careful to call this method prior to dispatching the "gotpointercapture" event and after dispatching
1526         the "lostpointercapture" event so that boundary events are fired at the right time.
1527         * page/PointerCaptureController.h:
1528
1529 2019-06-25  Fujii Hironori  <Hironori.Fujii@sony.com>
1530
1531         [WinCairo] incorrect font height for 'Google Sans Display' font
1532         https://bugs.webkit.org/show_bug.cgi?id=198909
1533
1534         Reviewed by Frédéric Wang.
1535
1536         r191893 changed to use OS/2 typo metrics, but its calculation
1537         wasn't correct. And, there is no reliable way to get OS/2 table by
1538         using Windows API. Revert the part of r191893 change at the
1539         moment.
1540
1541         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
1542         (WebCore::Font::platformInit):
1543         * platform/graphics/win/SimpleFontDataWin.cpp:
1544         (WebCore::Font::initGDIFont):
1545         Reverted the part of r191893 change, and added FIXME comments.
1546
1547 2019-06-25  Timothy Hatcher  <timothy@apple.com>
1548
1549         Clicking the up/down spin buttons for a number input increments/decrements by 2.
1550         https://bugs.webkit.org/show_bug.cgi?id=198809
1551
1552         Reviewed by Tim Horton.
1553
1554         AppKit no longer registers NSScrollerButtonDelay and NSScrollerButtonPeriod in the base
1555         NSUserDefaults for an app. This caused our use to always get 0s when setting the click
1556         and hold timer, causing the value to increment quickly for a single press.
1557
1558         * platform/mac/ScrollbarThemeMac.h:
1559         (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Added. Hardcode 500ms.
1560         (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Added. Hardcode 50ms.
1561         * platform/mac/ScrollbarThemeMac.mm:
1562         (WebCore::ScrollbarThemeMac::preferencesChanged): Removed use of old user defaults.
1563         (WebCore::ScrollbarThemeMac::initialAutoscrollTimerDelay): Deleted.
1564         (WebCore::ScrollbarThemeMac::autoscrollTimerDelay): Deleted.
1565
1566 2019-06-25  Keith Miller  <keith_miller@apple.com>
1567
1568         Unreviewed, windows build fix.
1569
1570         * bindings/js/JSDOMGlobalObject.h:
1571
1572 2019-06-25  Keith Miller  <keith_miller@apple.com>
1573
1574         Add didBecomePrototype() calls to global context prototypes
1575         https://bugs.webkit.org/show_bug.cgi?id=199202
1576
1577         Reviewed by Mark Lam.
1578
1579         This fixes some crashes related to asserting that all prototypes
1580         have been marked as such in JSC from
1581         https://trac.webkit.org/changeset/246801. It's ok to call
1582         didBecomePrototype here as we setting up the world state right now
1583         so we won't be having a bad time.
1584
1585         We don't automatically call didBecomePrototype() for
1586         setPrototypeWithoutTransition because existing objects may already
1587         have this structure so it seems more reasonable to be explicit
1588         there.
1589
1590         * bindings/js/JSWindowProxy.cpp:
1591         (WebCore::JSWindowProxy::setWindow):
1592         * bindings/js/WorkerScriptController.cpp:
1593         (WebCore::WorkerScriptController::initScript):
1594         * worklets/WorkletScriptController.cpp:
1595         (WebCore::WorkletScriptController::initScriptWithSubclass):
1596
1597 2019-06-25  Joseph Pecoraro  <pecoraro@apple.com>
1598
1599         Web Inspector: Implement console.timeLog
1600         https://bugs.webkit.org/show_bug.cgi?id=199184
1601
1602         Reviewed by Devin Rousso.
1603
1604         Updated existing tests.
1605
1606         * inspector/InspectorInstrumentation.cpp:
1607         (WebCore::InspectorInstrumentation::logConsoleTimingImpl):
1608         * inspector/InspectorInstrumentation.h:
1609         (WebCore::InspectorInstrumentation::logConsoleTiming):
1610         * page/PageConsoleClient.cpp:
1611         (WebCore::PageConsoleClient::timeLog):
1612         * page/PageConsoleClient.h:
1613         * workers/WorkerConsoleClient.cpp:
1614         (WebCore::WorkerConsoleClient::timeLog):
1615         * workers/WorkerConsoleClient.h:
1616         * worklets/WorkletConsoleClient.cpp:
1617         (WebCore::WorkletConsoleClient::timeLog):
1618         * worklets/WorkletConsoleClient.h:
1619
1620 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
1621
1622         Add user agent quirk for bankofamerica.com
1623         https://bugs.webkit.org/show_bug.cgi?id=199154
1624
1625         Reviewed by Carlos Garcia Campos.
1626
1627         This suppresses an unsupported browser warning.
1628
1629         * platform/UserAgentQuirks.cpp:
1630         (WebCore::urlRequiresMacintoshPlatform):
1631
1632 2019-06-25  Michael Catanzaro  <mcatanzaro@igalia.com>
1633
1634         Fully rename WebKitGTK+ -> WebKitGTK everywhere
1635         https://bugs.webkit.org/show_bug.cgi?id=199159
1636
1637         Reviewed by Carlos Garcia Campos.
1638
1639         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1640         (webkitAccessibleTextGetStringAtOffset):
1641         * platform/UserAgentQuirks.cpp:
1642         (WebCore::urlRequiresMacintoshPlatform):
1643         * platform/network/soup/NetworkStorageSessionSoup.cpp:
1644         (WebCore::NetworkStorageSession::saveCredentialToPersistentStorage):
1645         * rendering/RenderThemeGtk.cpp:
1646         (WebCore::RenderThemeGtk::adjustTextFieldStyle const):
1647
1648 2019-06-25  Rob Buis  <rbuis@igalia.com>
1649
1650         Introduce LinkLoadParameters
1651         https://bugs.webkit.org/show_bug.cgi?id=198960
1652
1653         Reviewed by Frédéric Wang.
1654
1655         Avoid the long parameters lists in LinkLoader by moving them
1656         to LinkLoadParameters.
1657
1658         No new tests because there is no behavior change.
1659
1660         * html/HTMLLinkElement.cpp:
1661         (WebCore::HTMLLinkElement::process):
1662         * loader/LinkLoader.cpp:
1663         (WebCore::LinkLoader::loadLinksFromHeader):
1664         (WebCore::LinkLoader::preconnectIfNeeded):
1665         (WebCore::LinkLoader::preloadIfNeeded):
1666         (WebCore::LinkLoader::prefetchIfNeeded):
1667         (WebCore::LinkLoader::loadLink):
1668         * loader/LinkLoader.h:
1669
1670 2019-06-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1671
1672         [Text autosizing] [iPadOS] Revise our heuristics to determine idempotent text autosizing candidates
1673         https://bugs.webkit.org/show_bug.cgi?id=198763
1674         <rdar://problem/51826266>
1675
1676         Reviewed by Simon Fraser.
1677
1678         This patch adjusts existing text autosizing heuristics, based on a survey of text on websites in the Alexa top
1679         500 that shrink down to fit the viewport when requesting the desktop version of the site. The new heuristic is
1680         derived from training decision trees against the dataset obtained from this survey, and balances false positives
1681         (cases where layout is broken due to autosizing) against overall accuracy (measured using cross-validation).
1682
1683         See below for more details. Additionally, please refer to the link in the radar for more details, as well as
1684         resources used to generate, validate, and analyze these decision trees.
1685
1686         Test: fast/text-autosizing/ios/idempotentmode/idempotent-autosizing-candidates.html
1687
1688         * css/StyleResolver.cpp:
1689         (WebCore::StyleResolver::adjustRenderStyleForTextAutosizing):
1690         * rendering/style/RenderStyle.cpp:
1691         (WebCore::RenderStyle::isIdempotentTextAutosizingCandidate const):
1692
1693         Rename AutosizeStatus::shouldSkipSubtree to RenderStyle::isIdempotentTextAutosizingCandidate. We relocate this
1694         logic to RenderStyle, such that we're able to ask the element's RenderStyle questions when determining whether
1695         the element should be autosized.
1696
1697         Of course, this patch additionally revamps the heuristic used to determine whether it is safe to autosize an
1698         element. Our current heuristic in trunk simply checks for the presence of inline block display, out of flow
1699         positioning and a fixed height ancestor; if any of these conditions are satisfied, we opt the element out of
1700         text autosizing. This is an excellent strategy for boosting some runs of text while avoiding autosizing in the
1701         vast majority of cases where increasing font size may lead to layout breakage (e.g. overlapping or clipped text,
1702         content unexpectedly flowing to the next line, etc.). However, it also avoids boosting font sizes in many
1703         scenarios where boosting font sizes is desired; for concrete examples, see the (currently 24) radars about small
1704         font sizes that are duped to <rdar://problem/51826266>.
1705
1706         To help analyze and identify trends in autosizable and non-autosizable text, we assembled a dataset of elements
1707         with text from the Alexa top 500 that either: (1) were too small and could be boosted safely, or (2) would break
1708         layout if boosted. With this labeled dataset, we then trained binary decision trees to classify the data. Each
1709         decision tree was trained with a number of hyperparameters: namely, maximum depth, minimum leaf size, and the
1710         amount of bias towards negative samples (i.e. the ratio of the weight of a non-autosizable sample relative to
1711         the weight of an autosizable sample).
1712
1713         For each 3-tuple of these hyperparameters (800 in total: max depth between 3 and 10, min leaf size between 1 and
1714         10 and bias between 1 and 10), for 5000 iterations each, we split the full dataset into a training dataset and
1715         a cross-validation dataset, trained a decision tree using the training set, and tested against the cross-
1716         validation set to compute average precision, recall, and overall accuracy for each tuple of hyperparameters.
1717
1718         The decision tree introduced in this patch was generated using a hand-picked set of hyperparameters (max depth
1719         10, min leaf size 4, and negative bias 2) to provide a balance between precision scores (limiting layout
1720         breakage) and recall score (ensuring that small text is mostly autosized), while optimizing for overall
1721         accuracy. Cross-validation scores predict that the overall accuracy of this classifier is approximately 70%, up
1722         from the current accuracy in trunk (~53%).
1723
1724         * rendering/style/RenderStyle.h:
1725
1726         Grow the width of `autosizeStatus` from 4 to 8 (notably, this does not increase the size of RenderStyle).
1727
1728         * rendering/style/TextSizeAdjustment.cpp:
1729         (WebCore::AutosizeStatus::updateStatus):
1730         (WebCore::AutosizeStatus::shouldSkipSubtree const): Deleted.
1731         * rendering/style/TextSizeAdjustment.h:
1732
1733         Introduce new text autosizing state flags, and remove some existing ones.
1734
1735 2019-06-24  Commit Queue  <commit-queue@webkit.org>
1736
1737         Unreviewed, rolling out r246714.
1738         https://bugs.webkit.org/show_bug.cgi?id=199179
1739
1740         revert to do patch in a different way. (Requested by keith_mi_
1741         on #webkit).
1742
1743         Reverted changeset:
1744
1745         "All prototypes should call didBecomePrototype()"
1746         https://bugs.webkit.org/show_bug.cgi?id=196315
1747         https://trac.webkit.org/changeset/246714
1748
1749 2019-06-24  Sihui Liu  <sihui_liu@apple.com>
1750
1751         REGRESSION (r244436): IndexedDB Uint8Array returned as ArrayBuffer
1752         https://bugs.webkit.org/show_bug.cgi?id=198738
1753         <rdar://problem/51614053>
1754
1755         Reviewed by Brady Eidson.
1756
1757         In InexedDB, two binary keys are the same as long as their data is the same.
1758
1759         Modified tests: storage/indexeddb/key-type-binary.html
1760                         storage/indexeddb/key-type-binary-private.html
1761
1762         * bindings/js/IDBBindingUtilities.cpp:
1763         (WebCore::injectIDBKeyIntoScriptValue):
1764         * bindings/js/SerializedScriptValue.cpp:
1765         (WebCore::CloneDeserializer::readArrayBufferView):
1766
1767 2019-06-24  Sihui Liu  <sihui_liu@apple.com>
1768
1769         Remove WebSQL quirk for nytimes.com
1770         https://bugs.webkit.org/show_bug.cgi?id=199175
1771
1772         Reviewed by Geoffrey Garen.
1773
1774         Removed unused code.
1775
1776         * bindings/scripts/CodeGeneratorJS.pm:
1777         (GenerateRuntimeEnableConditionalString):
1778         * bindings/scripts/IDLAttributes.json:
1779         * page/Quirks.cpp:
1780         (WebCore::Quirks::hasBrokenEncryptedMediaAPISupportQuirk const):
1781         (WebCore::Quirks::hasWebSQLSupportQuirk const): Deleted.
1782         * page/Quirks.h:
1783
1784 2019-06-24  Brady Eidson  <beidson@apple.com>
1785
1786         Null deref in WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad.
1787         <rdar://problem/51535942> and https://bugs.webkit.org/show_bug.cgi?id=199123
1788
1789         Reviewed by Andy Estes.
1790
1791         * loader/FrameLoaderStateMachine.h:
1792         (WebCore::FrameLoaderStateMachine::stateForDebugging const):
1793
1794 2019-06-24  Simon Fraser  <simon.fraser@apple.com>
1795
1796         REGRESSION (r246725 ): Crashes on twitch.tv
1797         https://bugs.webkit.org/show_bug.cgi?id=199176
1798         rdar://problem/52071249
1799
1800         Reviewed by Zalan Bujtas.
1801         
1802         With a composited negative z-index child inside a scroller, we can register the overflow scroll
1803         proxy node before we've traversed the overflow layer, so it that layer hasn't got its OverflowScrollingNode
1804         yet. Thus, AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes() can be called with an empty vector.
1805         Avoid crashing when this happens.
1806
1807         Test: scrollingcoordinator/scrolling-tree/scroller-with-negative-z-child.html
1808
1809         * page/scrolling/AsyncScrollingCoordinator.cpp:
1810         (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
1811         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
1812         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
1813
1814 2019-06-24  Chris Dumez  <cdumez@apple.com>
1815
1816         Pages using Google's anti-flicker optimization may take ~5 seconds to do initial paint
1817         https://bugs.webkit.org/show_bug.cgi?id=199173
1818         <rdar://problem/45968770>
1819
1820         Reviewed by Geoffrey Garen.
1821
1822         Pages using Google's anti-flicker optimization [1] take ~5 seconds to do initial paint when
1823         analytics.js load is blocked by a content blocker.
1824
1825         To address the issue, this patch introduces a quirk behind an experimental feature flag that
1826         calls window.dataLayer.hide.end() on the page when the load of https://www.google-analytics.com/analytics.js
1827         is blocked by a content blocker. Note that this is more robust than dropping the 'async-hide'
1828         class from document.documentElement since the class name is customizable by the caller.
1829         A message is logged in the console when the quirk causes window.dataLayer.hide.end() to get called
1830         early.
1831
1832         [1] https://developers.google.com/optimize/
1833
1834         * contentextensions/ContentExtensionsBackend.cpp:
1835         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
1836         * page/Settings.yaml:
1837
1838 2019-06-24  John Wilander  <wilander@apple.com>
1839
1840         Remove IsITPFirstPartyWebsiteDataRemovalEnabled as runtime check
1841         https://bugs.webkit.org/show_bug.cgi?id=199164
1842         <rdar://problem/52061147>
1843
1844         Reviewed by Brent Fulgham.
1845
1846         No new tests. Just a removal of a runtime feature check. The functionality
1847         already has a layout test.
1848
1849         We've had this toggle as a safety thing since mid-March. No need for it any longer.
1850
1851         * page/RuntimeEnabledFeatures.h:
1852         (WebCore::RuntimeEnabledFeatures::isITPDatabaseEnabled const):
1853         (WebCore::RuntimeEnabledFeatures::setIsITPFirstPartyWebsiteDataRemovalEnabled): Deleted.
1854         (WebCore::RuntimeEnabledFeatures::isITPFirstPartyWebsiteDataRemovalEnabled const): Deleted.
1855
1856 2019-06-24  Jer Noble  <jer.noble@apple.com>
1857
1858         iOS 12.2 Drawing portrait video to canvas is sideways
1859         https://bugs.webkit.org/show_bug.cgi?id=196772
1860         <rdar://problem/49781802>
1861
1862         Reviewed by Eric Carlson.
1863
1864         Test: media/video-orientation-canvas.html
1865
1866         Move rotation code into its own ImageRotationSessionVT class for re-use across
1867         all existing classes with rotation operations. Should slightly increase performance
1868         for painting rotated media files, as the rotation only occurs once per frame, rather
1869         than once per drawing operation.
1870
1871         * WebCore.xcodeproj/project.pbxproj:
1872         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
1873         (WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.
1874         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1875         (WebCore::ImageDecoderAVFObjC::readTrackMetadata):
1876         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
1877         (WebCore::ImageDecoderAVFObjC::setTrack):
1878         (WebCore::transformToRotationProperties): Deleted.
1879         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1880         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1881         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1882         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
1883         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1884         * platform/graphics/cv/ImageRotationSessionVT.h: Added.
1885         (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
1886         (WebCore::ImageRotationSessionVT::rotationProperties const):
1887         (WebCore::ImageRotationSessionVT::rotatedSize):
1888         * platform/graphics/cv/ImageRotationSessionVT.mm: Added.
1889         (WebCore::transformToRotationProperties):
1890         (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
1891         (WebCore::ImageRotationSessionVT::rotate):
1892         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
1893         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
1894         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
1895         (WebCore::rotationToAngle):
1896         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
1897         (WebCore::computeRotatedWidthAndHeight): Deleted.
1898
1899 2019-06-24  Zalan Bujtas  <zalan@apple.com>
1900
1901         [StyleResolver] Pass RenderStyle& instead of RenderStyle* to updateFont() related functions.
1902         https://bugs.webkit.org/show_bug.cgi?id=199167
1903         <rdar://problem/52062669>
1904
1905         Reviewed by Antti Koivisto.
1906
1907         It is expected to have a valid RenderStyle object here (and existing code relies on it).
1908
1909         * css/StyleResolver.cpp:
1910         (WebCore::checkForOrientationChange):
1911         (WebCore::StyleResolver::updateFont):
1912         (WebCore::StyleResolver::checkForTextSizeAdjust):
1913         (WebCore::StyleResolver::checkForZoomChange):
1914         (WebCore::StyleResolver::checkForGenericFamilyChange):
1915         * css/StyleResolver.h:
1916
1917 2019-06-24  Antoine Quint  <graouts@apple.com>
1918
1919         [Pointer Events WPT] Unskip imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html
1920         https://bugs.webkit.org/show_bug.cgi?id=197005
1921
1922         Reviewed by Dean Jackson.
1923
1924         We were calling processPendingPointerCapture() at the wrong time, calling in after dispatching a PointerEvent rather than before.
1925         We now do this correctly in the consolidated PointerCaptureController::dispatchEvent() method, which we call for dispatching all
1926         PointerEvents, save for gotpointercapture and lostpointercapture since these should not yield the processing of the pending pointer
1927         capture per the spec.
1928
1929         This uncovered a couple of new issues. First, since we would now call processPendingPointerCapture() and dispatch a lostpointercapture
1930         event earlier, the alternative lostpointercapture dispatch when an element is removed (which is dispatched asynchronously on the
1931         document) would be dispatched *after* dispatching the event in processPendingPointerCapture(). We now check in processPendingPointerCapture()
1932         whether the event target is connected to fix this. This makes sure pointerevent_lostpointercapture_for_disconnected_node.html doesn't regress.
1933
1934         Finally, we must also call processPendingPointerCapture() when implicitly releasing pointer capture during handling of a "pointerup" event.
1935         This ensures that pointerevent_releasepointercapture_invalid_pointerid.html doesn't regress.
1936
1937         As a result of all these changes, we now pass imported/w3c/web-platform-tests/pointerevents/pointerevent_lostpointercapture_is_first.html reliably.
1938
1939         * page/PointerCaptureController.cpp:
1940         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
1941         (WebCore::PointerCaptureController::dispatchEvent): We now more closely adhere to the spec when determining what the pointer capture target is by
1942         only checking for the target override. We can now do this safely since we call processPendingPointerCapture() before and not after event dispatch.
1943         (WebCore::PointerCaptureController::pointerEventWasDispatched):
1944         (WebCore::PointerCaptureController::processPendingPointerCapture): Cache the pending target override to make sure that dispatching a "gotpointercapture"
1945         or "lostpointercapture" event during this function does not alter it until the next call is made when the next event is dispatched.
1946
1947 2019-06-24  Greg Doolittle  <gr3g@apple.com>
1948
1949         Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
1950         https://bugs.webkit.org/show_bug.cgi?id=194754
1951
1952         Reviewed by Chris Fleizach.
1953
1954         Test: accessibility/img-alt-attribute-unassigned-value.html
1955
1956         * accessibility/AccessibilityObject.cpp:
1957         (WebCore::AccessibilityObject::computedRoleString const):
1958
1959 2019-06-24  Adrian Perez de Castro  <aperez@igalia.com>
1960
1961         [WPE][GTK] Fixes for compilation with unified builds disabled
1962         https://bugs.webkit.org/show_bug.cgi?id=199155
1963
1964         Reviewed by Michael Catanzaro.
1965
1966         No new tests needed.
1967
1968         * rendering/LayerAncestorClippingStack.h: Add missing inclusion of RenderLayer.h
1969
1970 2019-06-24  Michael Catanzaro  <mcatanzaro@igalia.com>
1971
1972         Add user agent quirk for Google Drive
1973         https://bugs.webkit.org/show_bug.cgi?id=199153
1974
1975         Reviewed by Carlos Garcia Campos.
1976
1977         This suppresses an unsupported browser warning.
1978
1979         * platform/UserAgentQuirks.cpp:
1980         (WebCore::urlRequiresMacintoshPlatform):
1981         (WebCore::urlRequiresLinuxDesktopPlatform):
1982
1983 2019-06-24  Charlie Turner  <cturner@igalia.com>
1984
1985         [GStreamer][MSE] Pausing video sometimes causes skip to finish
1986         https://bugs.webkit.org/show_bug.cgi?id=197355
1987
1988         Reviewed by Philippe Normand.
1989
1990         Covered by existing tests.
1991
1992         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
1993         (WebCore::MediaPlayerPrivateGStreamerMSE::currentMediaTime const):
1994         Assuming that when m_eosPending is on and we're paused() that the
1995         network resource is fully loaded and the end is reached is clearly
1996         wrong. Whether this is now correct is unclear...
1997
1998 2019-06-24  Charlie Turner  <cturner@igalia.com>
1999
2000         [GStreamer] Volume level sometimes changes inappropriately
2001         https://bugs.webkit.org/show_bug.cgi?id=197358
2002
2003         Reviewed by Xabier Rodriguez-Calvar.
2004
2005         Be consistent with our application of volume scaling. We were
2006         setting volumes using cubic interpolation in setVolume() and using
2007         the inverse in volume(); however setting initial volumes was done
2008         linearly in setStreamVolumeElement, which was causing strange
2009         jumps in the volume level at non-deterministic times. The fix
2010         looks to be that we should use linear interpolation consistently,
2011         since PulseAudio already applies cubic scaling to software
2012         volumes.
2013
2014         Covered by existing tests.
2015
2016         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2017         (WebCore::MediaPlayerPrivateGStreamer::paused const): Bump the
2018         logging here to LOG level, it's very spammy at DEBUG.
2019         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2020         (WebCore::MediaPlayerPrivateGStreamerBase::setVolume): Switch to
2021         linear interpolation.
2022         (WebCore::MediaPlayerPrivateGStreamerBase::volume const): Ditto.
2023         (WebCore::MediaPlayerPrivateGStreamerBase::notifyPlayerOfVolumeChange):
2024         Ditto.
2025         (WebCore::MediaPlayerPrivateGStreamerBase::setStreamVolumeElement):
2026         Ditto, and be consistent here with the API, do not set the raw
2027         volume managed by MediaElement.
2028
2029 2019-06-24  Antoine Quint  <graouts@apple.com>
2030
2031         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
2032         https://bugs.webkit.org/show_bug.cgi?id=198999
2033         <rdar://problem/51979477>
2034
2035         Unreviewed.
2036
2037         Rolling back all changes made for this bug (r246728 + r246716 + r246674) as it regressed one test
2038         (imported/w3c/web-platform-tests/pointerevents/pointerevent_mouse_pointercapture_in_frame.html).
2039
2040         * dom/Document.cpp:
2041         (WebCore::Document::prepareMouseEvent):
2042         (WebCore::Document::updateHoverActiveState):
2043         * page/EventHandler.cpp:
2044         (WebCore::EventHandler::handleMousePressEvent):
2045         (WebCore::EventHandler::handleMouseMoveEvent):
2046         (WebCore::EventHandler::handleMouseReleaseEvent):
2047         (WebCore::EventHandler::setCapturingMouseEventsElement):
2048         * page/EventHandler.h:
2049         * page/PointerCaptureController.cpp:
2050         (WebCore::PointerCaptureController::releasePointerCapture):
2051         (WebCore::PointerCaptureController::hasPointerCapture):
2052         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
2053         (WebCore::PointerCaptureController::dispatchEvent):
2054         (WebCore::PointerCaptureController::processPendingPointerCapture):
2055         (WebCore::PointerCaptureController::pointerCaptureElement): Deleted.
2056         * page/PointerCaptureController.h:
2057         * rendering/HitTestRequest.h:
2058         (WebCore::HitTestRequest::includesAllElementsUnderPoint const):
2059         (WebCore::HitTestRequest::pointerCaptureElementChanged const): Deleted.
2060
2061 2019-06-23  Antoine Quint  <graouts@apple.com>
2062
2063         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
2064         https://bugs.webkit.org/show_bug.cgi?id=198999
2065         <rdar://problem/52005663>
2066
2067         Reviewed by Dean Jackson.
2068
2069         We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events (part 2).
2070
2071         * page/PointerCaptureController.cpp:
2072         (WebCore::PointerCaptureController::releasePointerCapture):
2073
2074 2019-06-23  Simon Fraser  <simon.fraser@apple.com>
2075
2076         [Async overflow scroll] Clipped composited layers inside overflow scroll jitter and get incorrectly clipped
2077         https://bugs.webkit.org/show_bug.cgi?id=199133
2078         rdar://problem/43614439
2079
2080         Reviewed by Antti Koivisto.
2081
2082         Currently a composited layer with an overflow:scroll ancestor (which is not a paint-order
2083         ancestor) gets a single "ancestor clip layer" that represents the intersection of all the
2084         clips provided by its containing-block ancestors with non-visible overflow (both scrolling
2085         and non-scrolling ones).
2086
2087         To correctly update clips with async overflow scroll, this single clip layer needs to be
2088         broken up into multiple clipping ancestors. We need a separate layer, and scrolling tree
2089         node for each ancestor that is an overflow scroll, and layers that represent non-moving
2090         clips (i.e. overflow:hidden and 'clip') between them. This patch adds
2091         LayerAncestorClippingStack to represent this stack of clipping layers. For example with the
2092         following content:
2093         
2094         <div style="overflow:hidden"> <--- A
2095             <div style="overflow:scroll"> <--- B
2096                 <div style="overflow:hidden"> <--- C
2097                     <div style="overflow:hidden"> <--- D
2098                         <div style="overflow:scroll">  <--- E
2099                             <div style="overflow:hidden"> <--- F
2100                                 <div style="overflow:hidden"> <--- G
2101                                     <div></div> <--- H
2102                                 <div>
2103                             <div>
2104                         <div>
2105                     <div>
2106                 <div>
2107             <div>
2108         <div>
2109         
2110         the composited RenderLayer for H owns a LayerAncestorClippingStack with the following contents:
2111             [clip - A]
2112             [scroller - B]
2113             [clip - intersection of C and D]
2114             [scroller - E]
2115             [clip - intersection of F and G]
2116
2117         Each stack entry has a 'masksToBounds' GraphicsLayer for clipping. Entries representing
2118         overflow:scroll clips have a ScrollingNodeID for their OverflowScrollProxy scrolling tree
2119         node (which references the actual OverflowScrollingNode). The non-scroller clips in this
2120         stack are computed unconstrained by the enclosing overflow:scroll.
2121
2122         When the OverflowScrollingNode is scrolled, the boundsOrigin of related OverflowScrollProxy nodes
2123         is adjusted to move the descendant layers (other clipping layers, or composited layers).
2124
2125         OverflowScrollProxy nodes thus take over the role that "Moves" ScrollingTreePositionedNode had.
2126         With this patch, ScrollingTreePositionedNode are purely for absolute position inside non-containing-block
2127         stacking context overflow scroll. LayoutConstraints is renamed to AbsolutePositionConstraints accordingly.
2128
2129         Tests: compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-clipped-by-scroll.html
2130                compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow-nested.html
2131                compositing/scrolling/async-overflow-scrolling/clipped-layer-in-overflow.html
2132                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-hidden.html
2133                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-clip-to-visible.html
2134                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-gain-clipping-layer.html
2135                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-in-clipped.html
2136                compositing/scrolling/async-overflow-scrolling/layer-in-overflow-lose-clipping-layer.html
2137                compositing/scrolling/async-overflow-scrolling/layer-in-overflow.html
2138                scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow-nested.html
2139                scrollingcoordinator/scrolling-tree/clipped-layer-in-overflow.html
2140
2141         * Sources.txt:
2142         * WebCore.xcodeproj/project.pbxproj:
2143         * page/scrolling/AsyncScrollingCoordinator.cpp:
2144         (WebCore::AsyncScrollingCoordinator::setPositionedNodeConstraints):
2145         (WebCore::AsyncScrollingCoordinator::setPositionedNodeGeometry): Deleted.
2146         * page/scrolling/AsyncScrollingCoordinator.h:
2147         * page/scrolling/ScrollingConstraints.cpp:
2148         (WebCore::operator<<):
2149         * page/scrolling/ScrollingConstraints.h:
2150         (WebCore::AbsolutePositionConstraints::operator== const):
2151         (WebCore::AbsolutePositionConstraints::operator!= const):
2152         (WebCore::LayoutConstraints::operator== const): Deleted.
2153         (WebCore::LayoutConstraints::operator!= const): Deleted.
2154         (WebCore::LayoutConstraints::alignmentOffset const): Deleted.
2155         (WebCore::LayoutConstraints::setAlignmentOffset): Deleted.
2156         (WebCore::LayoutConstraints::layerPositionAtLastLayout const): Deleted.
2157         (WebCore::LayoutConstraints::setLayerPositionAtLastLayout): Deleted.
2158         (WebCore::LayoutConstraints::scrollPositioningBehavior const): Deleted.
2159         (WebCore::LayoutConstraints::setScrollPositioningBehavior): Deleted.
2160         * page/scrolling/ScrollingCoordinator.h:
2161         (WebCore::ScrollingCoordinator::setPositionedNodeConstraints):
2162         (WebCore::ScrollingCoordinator::setPositionedNodeGeometry): Deleted.
2163         * page/scrolling/ScrollingStatePositionedNode.cpp:
2164         (WebCore::ScrollingStatePositionedNode::updateConstraints):
2165         * page/scrolling/ScrollingStatePositionedNode.h:
2166         * page/scrolling/ScrollingTree.cpp:
2167         (WebCore::ScrollingTree::commitTreeState):
2168         * page/scrolling/ScrollingTree.h:
2169         (WebCore::ScrollingTree::nodesWithRelatedOverflow):
2170         (WebCore::ScrollingTree::positionedNodesWithRelatedOverflow): Deleted.
2171         * page/scrolling/cocoa/ScrollingTreeFixedNode.mm:
2172         (WebCore::ScrollingTreeFixedNode::applyLayerPositions):
2173         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm:
2174         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
2175         * page/scrolling/cocoa/ScrollingTreePositionedNode.h:
2176         (WebCore::ScrollingTreePositionedNode::scrollPositioningBehavior const): Deleted.
2177         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
2178         (WebCore::ScrollingTreePositionedNode::commitStateBeforeChildren):
2179         (WebCore::ScrollingTreePositionedNode::scrollDeltaSinceLastCommit const):
2180         * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
2181         (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
2182         * rendering/LayerAncestorClippingStack.cpp: Added.
2183         (WebCore::LayerAncestorClippingStack::LayerAncestorClippingStack):
2184         (WebCore::LayerAncestorClippingStack::equalToClipData const):
2185         (WebCore::LayerAncestorClippingStack::hasAnyScrollingLayers const):
2186         (WebCore::LayerAncestorClippingStack::clear):
2187         (WebCore::LayerAncestorClippingStack::detachFromScrollingCoordinator):
2188         (WebCore::LayerAncestorClippingStack::firstClippingLayer const):
2189         (WebCore::LayerAncestorClippingStack::lastClippingLayer const):
2190         (WebCore::LayerAncestorClippingStack::lastOverflowScrollProxyNodeID const):
2191         (WebCore::LayerAncestorClippingStack::updateScrollingNodeLayers):
2192         (WebCore::LayerAncestorClippingStack::updateWithClipData):
2193         (WebCore::operator<<):
2194         * rendering/LayerAncestorClippingStack.h: Added.
2195         (WebCore::CompositedClipData::CompositedClipData):
2196         (WebCore::CompositedClipData::operator== const):
2197         (WebCore::CompositedClipData::operator!= const):
2198         (WebCore::LayerAncestorClippingStack::stack):
2199         (WebCore::LayerAncestorClippingStack::stack const):
2200         * rendering/RenderLayerBacking.cpp:
2201         (WebCore::RenderLayerBacking::~RenderLayerBacking):
2202         (WebCore::RenderLayerBacking::updateDebugIndicators):
2203         (WebCore::RenderLayerBacking::destroyGraphicsLayers):
2204         (WebCore::RenderLayerBacking::updateTransform):
2205         (WebCore::RenderLayerBacking::updateBlendMode):
2206         (WebCore::RenderLayerBacking::updateAfterLayout):
2207         (WebCore::RenderLayerBacking::updateConfiguration):
2208         (WebCore::computeOffsetFromAncestorGraphicsLayer):
2209         (WebCore::RenderLayerBacking::computePrimaryGraphicsLayerRect const):
2210         (WebCore::RenderLayerBacking::computeParentGraphicsLayerRect const):
2211         (WebCore::RenderLayerBacking::updateGeometry):
2212         (WebCore::RenderLayerBacking::updateInternalHierarchy):
2213         (WebCore::RenderLayerBacking::updateAncestorClippingStack):
2214         (WebCore::RenderLayerBacking::updateAncestorClipping):
2215         (WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
2216         (WebCore::RenderLayerBacking::scrollingNodeIDForChildren const):
2217         (WebCore::RenderLayerBacking::childForSuperlayers const):
2218         (WebCore::RenderLayerBacking::backingStoreMemoryEstimate const):
2219         (WebCore::operator<<):
2220         (WebCore::RenderLayerBacking::updateAncestorClippingLayer): Deleted.
2221         (WebCore::RenderLayerBacking::coordinatedScrollingRoles const): Deleted.
2222         * rendering/RenderLayerBacking.h:
2223         * rendering/RenderLayerCompositor.cpp:
2224         (WebCore::RenderLayerCompositor::didChangePlatformLayerForLayer):
2225         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy):
2226         (WebCore::RenderLayerCompositor::layerStyleChanged): We need to run the checks for changed
2227         clipping whether or not this layer has backing, because a non-composited layer with clipping can be
2228         represented in the clipping stack of some other layer.
2229         (WebCore::RenderLayerCompositor::clippedByAncestor const):
2230         (WebCore::RenderLayerCompositor::updateAncestorClippingStack const):
2231         (WebCore::RenderLayerCompositor::computeAncestorClippingStack const): The output of this function
2232         is a Vector<CompositedClipData> which represents the ancestor clipping stack, but without the proxy node
2233         and GraphicsLayer information. It's input to LayerAncestorClippingStack::updateWithClipData() which does
2234         the merging of old and new states.
2235         (WebCore::collectRelatedCoordinatedScrollingNodes):
2236         (WebCore::RenderLayerCompositor::removeFromScrollCoordinatedLayers):
2237         (WebCore::scrollCoordinationRoleForNodeType):
2238         (WebCore::RenderLayerCompositor::attachScrollingNode):
2239         (WebCore::RenderLayerCompositor::registerScrollingNodeID):
2240         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayerWithRole):
2241         (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
2242         (WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const): Code moved from RenderLayerBacking.
2243         (WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
2244         (WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingProxyRole):
2245         (WebCore::RenderLayerCompositor::updateScrollingNodeForPositioningRole):
2246         * rendering/RenderLayerCompositor.h:
2247         (WebCore::allScrollCoordinationRoles):
2248
2249 2019-06-23  Simon Fraser  <simon.fraser@apple.com>
2250
2251         Add OverflowScrollProxyNodes to the scrolling tree
2252         https://bugs.webkit.org/show_bug.cgi?id=199132
2253
2254         Reviewed by Antti Koivisto.
2255
2256         Add ScrollingStateOverflowScrollProxyNode and ScrollingTreeOverflowScrollProxyNode. These
2257         nodes represent clip and scroll position for an overflow:scroll in the containing block chain,
2258         but not the paint ancestor chain of a layer. They will be used to correctly manipulate clip
2259         rects for composited layers in non-stacking-context scrollers, and in a future patch will
2260         replace the functionality of "Moves" positioned nodes.
2261
2262         An OverflowScrollProxyNode has the ScrollingNodeID of the scrolling node that it relates to,
2263         and we use the existing "related overflow nodes" to create the back references in the scrolling tree.
2264
2265         These nodes are not instantiated yet; a future patch will hook them up.
2266
2267         * Sources.txt:
2268         * SourcesCocoa.txt:
2269         * WebCore.xcodeproj/project.pbxproj:
2270         * page/scrolling/AsyncScrollingCoordinator.cpp:
2271         (WebCore::AsyncScrollingCoordinator::setRelatedOverflowScrollingNodes):
2272         * page/scrolling/ScrollingCoordinator.cpp:
2273         (WebCore::operator<<):
2274         * page/scrolling/ScrollingCoordinatorTypes.h:
2275         * page/scrolling/ScrollingStateNode.h:
2276         (WebCore::ScrollingStateNode::isOverflowScrollProxyNode const):
2277         * page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp: Added.
2278         (WebCore::ScrollingStateOverflowScrollProxyNode::create):
2279         (WebCore::ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode):
2280         (WebCore::ScrollingStateOverflowScrollProxyNode::clone):
2281         (WebCore::ScrollingStateOverflowScrollProxyNode::setOverflowScrollingNode):
2282         (WebCore::ScrollingStateOverflowScrollProxyNode::dumpProperties const):
2283         * page/scrolling/ScrollingStateOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
2284         (WebCore::ScrollingStateOverflowScrollProxyNode::overflowScrollingNode const):
2285         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
2286         * page/scrolling/ScrollingStateTree.cpp:
2287         (WebCore::ScrollingStateTree::createNode):
2288         * page/scrolling/ScrollingTreeNode.h:
2289         (WebCore::ScrollingTreeNode::isOverflowScrollProxyNode const):
2290         * page/scrolling/ScrollingTreeOverflowScrollProxyNode.cpp: Added.
2291         (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
2292         (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
2293         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
2294         (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
2295         (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
2296         * page/scrolling/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
2297         * page/scrolling/ScrollingTreeScrollingNode.h:
2298         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.h: Copied from Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp.
2299         (WebCore::ScrollingTreeOverflowScrollProxyNode::overflowScrollingNodeID const):
2300         (WebCore::ScrollingTreeOverflowScrollProxyNode::layer const):
2301         * page/scrolling/cocoa/ScrollingTreeOverflowScrollProxyNode.mm: Added.
2302         (WebCore::ScrollingTreeOverflowScrollProxyNode::create):
2303         (WebCore::ScrollingTreeOverflowScrollProxyNode::ScrollingTreeOverflowScrollProxyNode):
2304         (WebCore::ScrollingTreeOverflowScrollProxyNode::commitStateBeforeChildren):
2305         (WebCore::ScrollingTreeOverflowScrollProxyNode::scrollDeltaSinceLastCommit const):
2306         (WebCore::ScrollingTreeOverflowScrollProxyNode::applyLayerPositions):
2307         (WebCore::ScrollingTreeOverflowScrollProxyNode::dumpProperties const):
2308         * page/scrolling/cocoa/ScrollingTreePositionedNode.mm:
2309         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2310         * page/scrolling/mac/ScrollingTreeMac.cpp:
2311         (ScrollingTreeMac::createScrollingTreeNode):
2312         * page/scrolling/mac/ScrollingTreeOverflowScrollingNodeMac.mm:
2313         (WebCore::ScrollingTreeOverflowScrollingNodeMac::repositionScrollingLayers):
2314         * rendering/RenderLayerCompositor.cpp:
2315         (WebCore::scrollCoordinationRoleForNodeType):
2316
2317 2019-06-23  Zalan Bujtas  <zalan@apple.com>
2318
2319         [LFC][IFC] Non-baseline aligned inline container should not mutate the baseline
2320         https://bugs.webkit.org/show_bug.cgi?id=199129
2321         <rdar://problem/52022533>
2322
2323         Reviewed by Antti Koivisto.
2324
2325         Only baseline aligned inline container (<span style="vertical-aligned: baseline">) should adjust line's baseline.
2326         This patch also fixes m_baselineTop's value when we apply the initial strut.
2327
2328         * layout/inlineformatting/InlineLine.cpp:
2329         (WebCore::Layout::isInlineContainerConsideredEmpty):
2330         (WebCore::Layout::Line::isVisuallyEmpty const):
2331         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2332
2333 2019-06-22  Zalan Bujtas  <zalan@apple.com>
2334
2335         [LFC][IFC] The anonymous InlineBox wrapper for the text node should take the parent style.
2336         https://bugs.webkit.org/show_bug.cgi?id=199127
2337         <rdar://problem/52017744>
2338
2339         Reviewed by Antti Koivisto.
2340
2341         <span style="vertical-align: bottom">bottom aligned text</span>
2342         The InlineBox wrapper for the "bottom aligned text" content should take the parent span's style.
2343
2344         * layout/layouttree/LayoutTreeBuilder.cpp:
2345         (WebCore::Layout::TreeBuilder::createSubTree):
2346
2347 2019-06-22  Antoine Quint  <graouts@apple.com>
2348
2349         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
2350         https://bugs.webkit.org/show_bug.cgi?id=198999
2351         <rdar://problem/52005663>
2352
2353         Reviewed by Dean Jackson.
2354
2355         We should only set the mouse events capturing element in EventHandler if we're dealing with mouse-originated Pointer Events.
2356
2357         * page/PointerCaptureController.cpp:
2358         (WebCore::PointerCaptureController::processPendingPointerCapture):
2359
2360 2019-06-22  Andres Gonzalez  <andresg_22@apple.com>
2361
2362         Accessibility objects contained in links should honor the aria-haspopup attribute in the ancestor link.
2363         https://bugs.webkit.org/show_bug.cgi?id=199107
2364         <rdar://problem/43663611>
2365
2366         Reviewed by Chris Fleizach.
2367
2368         Tests: accessibility/ios-simulator/button-with-aria-haspopup-role.html
2369                accessibility/ios-simulator/element-haspopup.html
2370
2371         If an accessibility object is contained within an <a>, we should check
2372         the aria-haspopup attribute on the ancestor <a> element. This was done
2373         before in the iOS WebKit accessibility bunddle override.
2374         * accessibility/AccessibilityRenderObject.cpp:
2375         (WebCore::AccessibilityRenderObject::hasPopup const):
2376
2377 2019-06-22  Robin Morisset  <rmorisset@apple.com> and Yusuke Suzuki  <ysuzuki@apple.com>
2378
2379         All prototypes should call didBecomePrototype()
2380         https://bugs.webkit.org/show_bug.cgi?id=196315
2381
2382         Reviewed by Saam Barati.
2383
2384         * bindings/js/JSDOMIterator.h:
2385         (WebCore::IteratorTraits>::finishCreation):
2386         * bindings/js/JSDOMWindowProperties.h:
2387         (WebCore::JSDOMWindowProperties::create): Deleted.
2388         (WebCore::JSDOMWindowProperties::createStructure): Deleted.
2389         (WebCore::JSDOMWindowProperties::JSDOMWindowProperties): Deleted.
2390         * bindings/js/JSWindowProxy.cpp:
2391         (WebCore::JSWindowProxy::setWindow):
2392         * bindings/scripts/CodeGeneratorJS.pm:
2393         (GeneratePrototypeDeclaration):
2394         (GenerateConstructorHelperMethods):
2395         * bindings/scripts/test/JS/JSInterfaceName.cpp:
2396         (WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype):
2397         * bindings/scripts/test/JS/JSMapLike.cpp:
2398         (WebCore::JSMapLikePrototype::JSMapLikePrototype):
2399         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
2400         (WebCore::JSReadOnlyMapLikePrototype::JSReadOnlyMapLikePrototype):
2401         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2402         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype):
2403         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
2404         (WebCore::JSTestCEReactionsPrototype::JSTestCEReactionsPrototype):
2405         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
2406         (WebCore::JSTestCEReactionsStringifierPrototype::JSTestCEReactionsStringifierPrototype):
2407         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
2408         (WebCore::JSTestCallTracerPrototype::JSTestCallTracerPrototype):
2409         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2410         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype):
2411         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
2412         (WebCore::JSTestDOMJITPrototype::JSTestDOMJITPrototype):
2413         (WebCore::JSTestDOMJITConstructor::prototypeForStructure):
2414         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
2415         (WebCore::JSTestEnabledBySettingPrototype::JSTestEnabledBySettingPrototype):
2416         * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
2417         (WebCore::JSTestEnabledForContextPrototype::JSTestEnabledForContextPrototype):
2418         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2419         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype):
2420         (WebCore::JSTestEventConstructorConstructor::prototypeForStructure):
2421         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2422         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype):
2423         (WebCore::JSTestEventTargetConstructor::prototypeForStructure):
2424         * bindings/scripts/test/JS/JSTestException.cpp:
2425         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype):
2426         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2427         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype):
2428         * bindings/scripts/test/JS/JSTestGlobalObject.h:
2429         (WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype):
2430         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
2431         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::JSTestIndexedSetterNoIdentifierPrototype):
2432         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
2433         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::JSTestIndexedSetterThrowingExceptionPrototype):
2434         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
2435         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::JSTestIndexedSetterWithIdentifierPrototype):
2436         * bindings/scripts/test/JS/JSTestInterface.cpp:
2437         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype):
2438         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
2439         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::JSTestInterfaceLeadingUnderscorePrototype):
2440         * bindings/scripts/test/JS/JSTestIterable.cpp:
2441         (WebCore::JSTestIterablePrototype::JSTestIterablePrototype):
2442         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2443         (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype):
2444         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2445         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype):
2446         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
2447         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::JSTestNamedAndIndexedSetterNoIdentifierPrototype):
2448         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
2449         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::JSTestNamedAndIndexedSetterThrowingExceptionPrototype):
2450         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
2451         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::JSTestNamedAndIndexedSetterWithIdentifierPrototype):
2452         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2453         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype):
2454         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
2455         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::JSTestNamedDeleterNoIdentifierPrototype):
2456         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
2457         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::JSTestNamedDeleterThrowingExceptionPrototype):
2458         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
2459         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::JSTestNamedDeleterWithIdentifierPrototype):
2460         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
2461         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::JSTestNamedDeleterWithIndexedGetterPrototype):
2462         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
2463         (WebCore::JSTestNamedGetterCallWithPrototype::JSTestNamedGetterCallWithPrototype):
2464         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
2465         (WebCore::JSTestNamedGetterNoIdentifierPrototype::JSTestNamedGetterNoIdentifierPrototype):
2466         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
2467         (WebCore::JSTestNamedGetterWithIdentifierPrototype::JSTestNamedGetterWithIdentifierPrototype):
2468         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
2469         (WebCore::JSTestNamedSetterNoIdentifierPrototype::JSTestNamedSetterNoIdentifierPrototype):
2470         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
2471         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::JSTestNamedSetterThrowingExceptionPrototype):
2472         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
2473         (WebCore::JSTestNamedSetterWithIdentifierPrototype::JSTestNamedSetterWithIdentifierPrototype):
2474         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
2475         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::JSTestNamedSetterWithIndexedGetterPrototype):
2476         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
2477         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::JSTestNamedSetterWithIndexedGetterAndSetterPrototype):
2478         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
2479         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::JSTestNamedSetterWithOverrideBuiltinsPrototype):
2480         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
2481         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::JSTestNamedSetterWithUnforgablePropertiesPrototype):
2482         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
2483         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype):
2484         * bindings/scripts/test/JS/JSTestNode.cpp:
2485         (WebCore::JSTestNodePrototype::JSTestNodePrototype):
2486         (WebCore::JSTestNodeConstructor::prototypeForStructure):
2487         * bindings/scripts/test/JS/JSTestObj.cpp:
2488         (WebCore::JSTestObjPrototype::JSTestObjPrototype):
2489         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2490         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype):
2491         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2492         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::JSTestOverloadedConstructorsWithSequencePrototype):
2493         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2494         (WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype):
2495         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
2496         (WebCore::JSTestPluginInterfacePrototype::JSTestPluginInterfacePrototype):
2497         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
2498         (WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype):
2499         (WebCore::JSTestPromiseRejectionEventConstructor::prototypeForStructure):
2500         * bindings/scripts/test/JS/JSTestSerialization.cpp:
2501         (WebCore::JSTestSerializationPrototype::JSTestSerializationPrototype):
2502         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
2503         (WebCore::JSTestSerializationIndirectInheritancePrototype::JSTestSerializationIndirectInheritancePrototype):
2504         (WebCore::JSTestSerializationIndirectInheritanceConstructor::prototypeForStructure):
2505         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
2506         (WebCore::JSTestSerializationInheritPrototype::JSTestSerializationInheritPrototype):
2507         (WebCore::JSTestSerializationInheritConstructor::prototypeForStructure):
2508         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
2509         (WebCore::JSTestSerializationInheritFinalPrototype::JSTestSerializationInheritFinalPrototype):
2510         (WebCore::JSTestSerializationInheritFinalConstructor::prototypeForStructure):
2511         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2512         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype):
2513         * bindings/scripts/test/JS/JSTestStringifier.cpp:
2514         (WebCore::JSTestStringifierPrototype::JSTestStringifierPrototype):
2515         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
2516         (WebCore::JSTestStringifierAnonymousOperationPrototype::JSTestStringifierAnonymousOperationPrototype):
2517         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
2518         (WebCore::JSTestStringifierNamedOperationPrototype::JSTestStringifierNamedOperationPrototype):
2519         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
2520         (WebCore::JSTestStringifierOperationImplementedAsPrototype::JSTestStringifierOperationImplementedAsPrototype):
2521         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
2522         (WebCore::JSTestStringifierOperationNamedToStringPrototype::JSTestStringifierOperationNamedToStringPrototype):
2523         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
2524         (WebCore::JSTestStringifierReadOnlyAttributePrototype::JSTestStringifierReadOnlyAttributePrototype):
2525         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
2526         (WebCore::JSTestStringifierReadWriteAttributePrototype::JSTestStringifierReadWriteAttributePrototype):
2527         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2528         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype):
2529
2530 2019-06-22  Mike Gorse  <mgorse@suse.com>
2531
2532         webkitgtk 2.24.2 fails to build w/gstreamer 1.12.5
2533         https://bugs.webkit.org/show_bug.cgi?id=198080
2534
2535         Reviewed by Philippe Normand.
2536
2537         No new tests (build fix only).
2538
2539         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2540         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2541         Move includes of gst/gl/gl.h and epoxy/gl.h into
2542         MediaPlayerPrivateGStreamerBase.h.
2543
2544 2019-06-21  Sihui Liu  <sihui_liu@apple.com>
2545
2546         openDatabase should return an empty object when WebSQL is disabled
2547         https://bugs.webkit.org/show_bug.cgi?id=198805
2548
2549         Reviewed by Geoffrey Garen.
2550
2551         Some websites rely on calling openDatabase with null parameters to check for private browsing. To not break 
2552         those sites, we now expose openDatabase interface even if Web SQL is disabled. When Web SQL is disabled, 
2553         window.openDatabase returns false, but it is callable and returns empty object.
2554
2555         Test: WebSQL.OpenDatabaseAlwaysExists
2556
2557         * Modules/webdatabase/DOMWindowWebDatabase.idl:
2558         * bindings/js/JSDOMWindowCustom.cpp:
2559         (WebCore::jsDOMWindowInstanceFunctionOpenDatabaseBody):
2560         (WebCore::IDLOperation<JSDOMWindow>::cast):
2561         (WebCore::jsDOMWindowInstanceFunctionOpenDatabase):
2562         (WebCore::JSDOMWindow::openDatabase const):
2563
2564 2019-06-21  Ryosuke Niwa  <rniwa@webkit.org>
2565
2566         Nullptr crash in DeleteSelectionCommand::handleGeneralDelete
2567         https://bugs.webkit.org/show_bug.cgi?id=199126
2568
2569         Reviewed by Wenson Hsieh.
2570
2571         Added null checks to handleGeneralDelete as well as mergeParagraphs which runs after handleGeneralDelete to be defensive.
2572
2573         Unfortunately no new tests since there is no reproducible test case.
2574
2575         * editing/DeleteSelectionCommand.cpp:
2576         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2577         (WebCore::DeleteSelectionCommand::mergeParagraphs):
2578
2579 2019-06-21  Youenn Fablet  <youenn@apple.com>
2580
2581         ResourceLoadNotifier should check whether its frame document loader is null
2582         https://bugs.webkit.org/show_bug.cgi?id=199118
2583
2584         Reviewed by Geoffrey Garen.
2585
2586         * loader/ResourceLoadNotifier.cpp:
2587         (WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
2588
2589 2019-06-21  Jiewen Tan  <jiewen_tan@apple.com>
2590
2591         WebPageProxy::loadData should accept ShouldOpenExternalURLsPolicy
2592         https://bugs.webkit.org/show_bug.cgi?id=199114
2593         <rdar://problem/51671674>
2594
2595         Reviewed by Youenn Fablet.
2596
2597         Covered by new test content within existing tests.
2598
2599         * loader/FrameLoaderTypes.h:
2600         Adds an EnumTraits for ShouldOpenExternalURLsPolicy.
2601
2602 2019-06-21  Saam Barati  <sbarati@apple.com>
2603
2604         [WHLSL] Code that accesses an undefined variable crashes
2605         https://bugs.webkit.org/show_bug.cgi?id=198775
2606
2607         Reviewed by Myles C. Maxfield.
2608
2609         Myles mostly fixed this in r246631 when he made NameResolver propagate
2610         its error to its parent NameResolver. However, there was still one bug
2611         where we ended up calling setError twice for an if statement. This patch
2612         fixes that and adds tests.
2613
2614         Tests: webgpu/whlsl-use-undefined-variable-2.html
2615                webgpu/whlsl-use-undefined-variable.html
2616
2617         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp:
2618         (WebCore::WHLSL::NameResolver::visit):
2619
2620 2019-06-21  Truitt Savell  <tsavell@apple.com>
2621
2622         Unreviewed, rolling out r246611.
2623
2624         Introduced a flakey test.
2625
2626         Reverted changeset:
2627
2628         "iOS 12.2 Drawing portrait video to canvas is sideways"
2629         https://bugs.webkit.org/show_bug.cgi?id=196772
2630         https://trac.webkit.org/changeset/246611
2631
2632 2019-06-21  Tim Horton  <timothy_horton@apple.com>
2633
2634         Preview of <picture> element doesn't match element bounds
2635         https://bugs.webkit.org/show_bug.cgi?id=199049
2636         <rdar://problem/51474402>
2637
2638         Reviewed by Simon Fraser.
2639
2640         Test: fast/text-indicator/text-indicator-uses-img-size-inside-picture.html
2641
2642         * dom/DOMRectReadOnly.idl:
2643         * dom/Range.cpp:
2644         (WebCore::Range::absoluteRectsForRangeInText const):
2645         (WebCore::Range::absoluteTextRects const):
2646         (WebCore::Range::borderAndTextRects const):
2647         (WebCore::Range::boundingRect const):
2648         (WebCore::Range::absoluteBoundingRect const):
2649         * dom/Range.h:
2650         (WebCore::Range::absoluteTextRects):
2651         (WebCore::Range::absoluteBoundingRect):
2652         (WebCore::Range::borderAndTextRects):
2653         (WebCore::Range::boundingRect):
2654         * page/TextIndicator.cpp:
2655         (WebCore::absoluteBoundingRectForRange):
2656         (WebCore::estimatedBackgroundColorForRange):
2657         (WebCore::initializeIndicator):
2658         * rendering/RenderBlock.h:
2659         * testing/Internals.cpp:
2660         (WebCore::Internals::TextIndicatorData::TextIndicatorData):
2661         (WebCore::Internals::TextIndicatorData::~TextIndicatorData):
2662         (WebCore::Internals::textIndicatorForRange):
2663         * testing/Internals.h:
2664         * testing/Internals.idl:
2665
2666 2019-06-21  Youenn Fablet  <youenn@apple.com>
2667
2668         Safari crashes after ~2028 OfflineAudioContext objects are created (they never get garbage collected, consuming a thread each)
2669         https://bugs.webkit.org/show_bug.cgi?id=198964
2670         <rdar://problem/51891520>
2671
2672         Reviewed by Jer Noble.
2673
2674         Move from setPendingActivity/unsetPendingActivity to an
2675         m_pendingActivity member which is easier to manage.
2676
2677         Keep setting a pending activity for AudioContext at construction time
2678         but do not do that for Offline contexts.
2679         Instead, set the pending activity when startRendering is called.
2680         Unset the pending activity when the rendering activity is finished.
2681
2682         Make m_audioDecoder a unique pointer so that it can lazily be initialized.
2683         This removes the burden of creating an audio decoder thread for each context.
2684
2685         Test: webaudio/offlineaudiocontext-gc.html
2686
2687         * Modules/webaudio/AudioContext.cpp:
2688         (WebCore::AudioContext::AudioContext):
2689         (WebCore::AudioContext::constructCommon):
2690         (WebCore::AudioContext::clear):
2691         (WebCore::AudioContext::decodeAudioData):
2692         (WebCore::AudioContext::startRendering):
2693         (WebCore::AudioContext::finishedRendering):
2694         (WebCore::AudioContext::dispatchEvent):
2695         (WebCore::AudioContext::clearPendingActivity):
2696         (WebCore::AudioContext::makePendingActivity):
2697         To keep it consistent with setPendingActivity/unsetPendingActivity, we
2698         explicitly ref/unref the AudioContext. We should try to remove this ref/unref.
2699         * Modules/webaudio/AudioContext.h:
2700         * Modules/webaudio/OfflineAudioDestinationNode.cpp:
2701         (WebCore::OfflineAudioDestinationNode::startRendering):
2702
2703 2019-06-21  Truitt Savell  <tsavell@apple.com>
2704
2705         Unreviewed, rolling out r246655.
2706
2707         Introduced a failing test
2708
2709         Reverted changeset:
2710
2711         "Web Inspector: AXI: Audit: image label test is throwing
2712         spurious errors on elements with existing alt attr, but no
2713         value: <img alt>"
2714         https://bugs.webkit.org/show_bug.cgi?id=194754
2715         https://trac.webkit.org/changeset/246655
2716
2717 2019-06-21  Myles C. Maxfield  <mmaxfield@apple.com>
2718
2719         [WHLSL] read modify write expressions do no work as expected
2720         https://bugs.webkit.org/show_bug.cgi?id=195864
2721
2722         Reviewed by Saam Barati.
2723
2724         Turns out https://bugs.webkit.org/show_bug.cgi?id=199037 already fixed everything.
2725         This patch just adds a test.
2726
2727         Test: webgpu/whlsl-read-modify-write.html
2728
2729         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
2730
2731 2019-06-21  Zalan Bujtas  <zalan@apple.com>
2732
2733         [LFC][IFC] Adjust baseline top when the baseline moves.
2734         https://bugs.webkit.org/show_bug.cgi?id=199091
2735         <rdar://problem/51966257>
2736
2737         Reviewed by Antti Koivisto.
2738
2739         Currently only "text-align: bottom" adjusts the baseline top. This patch fixes the "text-align: baseline" case when
2740         the growing ascent pushes the baseline top closer to the line top.
2741
2742         * layout/inlineformatting/InlineLine.cpp:
2743         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2744
2745 2019-06-21  Zalan Bujtas  <zalan@apple.com>
2746
2747         [LFC][IFC] Rename Line::m_contentLogicalHeight to m_lineLogicalHeight
2748         https://bugs.webkit.org/show_bug.cgi?id=199100
2749         <rdar://problem/51973614>
2750
2751         Reviewed by Antti Koivisto.
2752
2753         m_logicalLineHeight name seems more appropriate at this point (though the line heigh is driven by the content height).
2754
2755         * layout/inlineformatting/InlineLine.cpp:
2756         (WebCore::Layout::Line::close):
2757         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2758         * layout/inlineformatting/InlineLine.h:
2759         (WebCore::Layout::Line::logicalHeight const):
2760
2761 2019-06-21  Zalan Bujtas  <zalan@apple.com>
2762
2763         [LFC][IFC] LineBox::Baseline should have a height getter.
2764         https://bugs.webkit.org/show_bug.cgi?id=199092
2765         <rdar://problem/51966958>
2766
2767         Reviewed by Antti Koivisto.
2768
2769         The baseline height does not need to be a getter on the Line (no one calls it).
2770
2771         * layout/inlineformatting/InlineLine.cpp:
2772         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
2773         * layout/inlineformatting/InlineLine.h:
2774         (WebCore::Layout::Line::contentLogicalWidth const):
2775         (WebCore::Layout::Line::baselineAlignedContentHeight const): Deleted.
2776         * layout/inlineformatting/InlineLineBox.h:
2777         (WebCore::Layout::LineBox::Baseline::height const):
2778
2779 2019-06-21  Michael Catanzaro  <mcatanzaro@igalia.com>
2780
2781         [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo
2782         https://bugs.webkit.org/show_bug.cgi?id=199094
2783
2784         Reviewed by Carlos Garcia Campos.
2785
2786         * accessibility/atk/AXObjectCacheAtk.cpp:
2787         (WebCore::AXObjectCache::postPlatformNotification):
2788         * accessibility/atk/WebKitAccessible.cpp:
2789         (atkRole):
2790         (setAtkStateSetFromCoreObject):
2791         (interfaceMaskFromObject):
2792         * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp:
2793         * accessibility/atk/WebKitAccessibleInterfaceTableCell.h:
2794         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2795         (webkitAccessibleTextGetStringAtOffset):
2796         (webkitAccessibleTextInterfaceInit):
2797         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
2798         (webkitAccessibleValueInterfaceInit):
2799         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp:
2800         (WebCore::AudioTrackPrivateGStreamer::kind const):
2801         * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h:
2802         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
2803         (WTF::derefGPtr<GstStreamCollection>):
2804         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
2805         * platform/graphics/gstreamer/GStreamerCommon.cpp:
2806         (WebCore::initializeGStreamerAndRegisterWebKitElements):
2807         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2808         (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer):
2809         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2810         (WebCore::InbandTextTrackPrivateGStreamer::create):
2811         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2812         (WebCore::MediaPlayerPrivateGStreamer::load):
2813         (WebCore::MediaPlayerPrivateGStreamer::updateTracks):
2814         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
2815         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2816         (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
2817         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage):
2818         (WebCore::MediaPlayerPrivateGStreamer::supportsType):
2819         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2820         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
2821         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2822         (WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext):
2823         (WebCore::MediaPlayerPrivateGStreamerBase::createGLAppSink):
2824         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
2825         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2826         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2827         (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer):
2828         (WebCore::TrackPrivateBaseGStreamer::disconnect):
2829         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
2830         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2831         (WebCore::TrackPrivateBaseGStreamer::stream):
2832         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp:
2833         (WebCore::VideoTrackPrivateGStreamer::kind const):
2834         * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h:
2835         * platform/gtk/PlatformKeyboardEventGtk.cpp:
2836         (WebCore::eventTypeForGdkKeyEvent):
2837         * platform/gtk/PlatformMouseEventGtk.cpp:
2838         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
2839         * platform/gtk/PlatformScreenGtk.cpp:
2840         (WebCore::screenRect):
2841         (WebCore::screenAvailableRect):
2842         (WebCore::screenHasTouchDevice):
2843         (WebCore::screenIsTouchPrimaryInputDevice):
2844         (): Deleted.
2845         (WebCore::isTouchDevice): Deleted.
2846         (WebCore::deviceAddedCallback): Deleted.
2847         (WebCore::deviceRemovedCallback): Deleted.
2848         * platform/gtk/PlatformWheelEventGtk.cpp:
2849         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
2850         * platform/gtk/RenderThemeGadget.cpp:
2851         * platform/gtk/RenderThemeGadget.h:
2852         * platform/gtk/RenderThemeWidget.cpp:
2853         * platform/gtk/RenderThemeWidget.h:
2854         * platform/gtk/ScrollbarThemeGtk.cpp:
2855         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk):
2856         (WebCore::ScrollbarThemeGtk::themeChanged):
2857         (WebCore::ScrollbarThemeGtk::updateThemeProperties):
2858         (WebCore::ScrollbarThemeGtk::trackRect):
2859         (WebCore::ScrollbarThemeGtk::forwardButtonRect):
2860         (WebCore::ScrollbarThemeGtk::paint):
2861         (WebCore::ScrollbarThemeGtk::scrollbarThickness):
2862         (WebCore::createStyleContext): Deleted.
2863         (WebCore::createChildStyleContext): Deleted.
2864         (WebCore::paintStepper): Deleted.
2865         (WebCore::adjustRectAccordingToMargin): Deleted.
2866         * platform/mediastream/gstreamer/GStreamerCapturer.cpp:
2867         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
2868         * platform/network/soup/ResourceRequest.h:
2869         (WebCore::toSoupMessagePriority):
2870         * platform/network/soup/SoupNetworkSession.cpp:
2871         (WebCore::SoupNetworkSession::SoupNetworkSession):
2872         * rendering/RenderThemeGtk.cpp:
2873         (WebCore::themePartStateFlags):
2874         (WebCore::paintToggle):
2875         (WebCore::RenderThemeGtk::paintButton):
2876         (WebCore::menuListColor):
2877         (WebCore::RenderThemeGtk::paintMenuList):
2878         (WebCore::RenderThemeGtk::paintTextField):
2879         (WebCore::adjustSearchFieldIconStyle):
2880         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
2881         (WebCore::RenderThemeGtk::paintSliderThumb):
2882         (WebCore::RenderThemeGtk::paintProgressBar):
2883         (WebCore::RenderThemeGtk::paintInnerSpinButton):
2884         (WebCore::styleColor):
2885         (WebCore::RenderThemeGtk::systemColor const):
2886         (WebCore::RenderThemeGtk::paintMediaButton):
2887         (WebCore::createStyleContext): Deleted.
2888         (WebCore::loadThemedIcon): Deleted.
2889         (WebCore::gtkTextDirection): Deleted.
2890         (WebCore::gtkIconStateFlags): Deleted.
2891         (WebCore::adjustRectForFocus): Deleted.
2892         (WebCore::renderButton): Deleted.
2893         (WebCore::getIconSizeForPixelSize): Deleted.
2894         (WebCore::paintIcon): Deleted.
2895         (WebCore::paintEntryIcon): Deleted.
2896         (WebCore::centerRectVerticallyInParentInputElement): Deleted.
2897         (WebCore::spinButtonArrowSize): Deleted.
2898         (WebCore::paintSpinArrowButton): Deleted.
2899
2900 2019-06-20  Antoine Quint  <graouts@apple.com>
2901
2902         [Pointer Events] Respect pointer capture when dispatching mouse boundary events and updating :hover
2903         https://bugs.webkit.org/show_bug.cgi?id=198999
2904
2905         Reviewed by Dean Jackson.
2906
2907         Up until now, we would not account for pointer capture (see https://w3c.github.io/pointerevents/#pointer-capture) when dispatching
2908         mouse boundary events (mouseover, mouseout, mouseenter, mouseleave) and their counterpart pointer events. We would also not account
2909         for it when updating :hover styles.
2910
2911         Now, when pointer capture changes for an element, we call setCapturingMouseEventsElement() on the EventHandler such that the element
2912         that would naturally hit-test is overridden by the pointer capture element when identifying which target to use for the dispatch of
2913         boundary mouse events. Additionally, when calling EventHandler::prepareMouseEvent(), we also use the pointer capture element to
2914         eventually pass down to Document::updateHoverActiveState() such that :hover styles are applied to the correct element.
2915
2916         This also means that we need to re-run EventHandler::prepareMouseEvent() during mouse state changes to ensure that the :hover styles
2917         are applied correctly should the pointer capture element change during dispatch of boundary mouse events.
2918
2919         * dom/Document.cpp:
2920         (WebCore::Document::prepareMouseEvent): If there is one, use the pointer capture element instead of the hit-test target.
2921         (WebCore::Document::updateHoverActiveState): Relax the mustBeInActiveChain condition in case the pointer capture element changed when
2922         updating the :hover/:active chains.
2923         * page/EventHandler.cpp:
2924         (WebCore::EventHandler::handleMousePressEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
2925         (WebCore::EventHandler::handleMouseMoveEvent): Re-process the mouse event if the pointer capture element changed during event dispatch.
2926         (WebCore::EventHandler::handleMouseReleaseEvent): As we know the pointer capture element will be reset as part of the mouse being
2927         released, we reset the pointer capture element and EventHandler's capture element prior to invalidating hover styles and boundary events.
2928         (WebCore::EventHandler::setCapturingMouseEventsElement): Dispatch boundary events when a new element is set.
2929         (WebCore::EventHandler::dispatchMouseEvent): New dispatchMouseEvent() variant that re-processes the provided MouseEventWithHitTestResults
2930         in case the pointer capture element changes during event dispatch, as called by handleMousePressEvent() and handleMouseMoveEvent().
2931         * page/EventHandler.h:
2932         * page/PointerCaptureController.cpp:
2933         (WebCore::PointerCaptureController::pointerCaptureElement): We now need to query whay the pointer capture element might be from EventHandler,
2934         so expose a new method to access it.
2935         (WebCore::PointerCaptureController::releasePointerCapture): Since we may not call processPendingPointerCapture() until the dispatch of the
2936         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.
2937         (WebCore::PointerCaptureController::hasPointerCapture): We would mistakenly return true if the provided element was null, which could be the
2938         case of EventHandler's capturing element. Rather than changing call sites to check that the provided value exists, we change the method to
2939         return false when the provided element is null. Note that this does not affect the API since it's exposed on Element itself.
2940         (WebCore::PointerCaptureController::dispatchEventForTouchAtIndex): Call dispatchEvent() instead of calling pointerEventWillBeDispatched() and
2941         pointerEventWasDispatched().
2942         (WebCore::PointerCaptureController::dispatchEvent): Remove all code specific to pointer capture since now the events will be dispatched on the
2943         pointer capture element by EventHandler.
2944         (WebCore::PointerCaptureController::processPendingPointerCapture): Make sure this method is not re-entrant since it dispatches events.
2945         * page/PointerCaptureController.h:
2946         * rendering/HitTestRequest.h:
2947         (WebCore::HitTestRequest::pointerCaptureElementChanged const): Add a new HitTestRequestType bit such that we can indicate to Document::updateHoverActiveState()
2948         that it must be update the :hover/:active chains when the pointer capture element has just changed.
2949
2950 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
2951
2952         [GTK] Stop pretending WebCore::Widget can have a platform widget
2953         https://bugs.webkit.org/show_bug.cgi?id=199066
2954
2955         Reviewed by Michael Catanzaro.
2956
2957         That was only possible in legacy WebKit that we no longer support. The code can be simplified a bit.
2958
2959         * platform/Widget.cpp:
2960         (WebCore::Widget::init):
2961         * platform/Widget.h:
2962         (WebCore::Widget::setPlatformWidget):
2963         (WebCore::Widget::releasePlatformWidget): Deleted.
2964         (WebCore::Widget::retainPlatformWidget): Deleted.
2965         * platform/gtk/PlatformScreenGtk.cpp:
2966         (WebCore::systemVisual):
2967         (WebCore::screenDepth):
2968         (WebCore::screenDepthPerComponent):
2969         (WebCore::screenRect):
2970         (WebCore::screenAvailableRect):
2971         (WebCore::getToplevel): Deleted.
2972         (WebCore::getVisual): Deleted.
2973         (WebCore::getScreen): Deleted.
2974         * platform/gtk/WidgetGtk.cpp:
2975         (WebCore::Widget::~Widget):
2976         (WebCore::Widget::show):
2977         (WebCore::Widget::hide):
2978         (WebCore::Widget::setIsSelected):
2979         (WebCore::Widget::setFrameRect):
2980         (WebCore::Widget::releasePlatformWidget): Deleted.
2981         (WebCore::Widget::retainPlatformWidget): Deleted.
2982         * platform/ios/WidgetIOS.mm:
2983         (WebCore::Widget::~Widget):
2984
2985 2019-06-20  Simon Fraser  <simon.fraser@apple.com>
2986
2987         Make it possible to include clipping in GraphicsLayer tree dumps
2988         https://bugs.webkit.org/show_bug.cgi?id=199096
2989
2990         Reviewed by Zalan Bujtas.
2991
2992         Add LAYER_TREE_INCLUDES_CLIPPING and plumb it down to GraphicsLayers, turning
2993         it on for a couple of tests.
2994
2995         * page/Frame.h:
2996         * platform/graphics/GraphicsLayer.cpp:
2997         (WebCore::GraphicsLayer::dumpProperties const):
2998         * platform/graphics/GraphicsLayerClient.h:
2999         * rendering/RenderLayerCompositor.cpp:
3000         (WebCore::RenderLayerCompositor::layerTreeAsText):
3001         * testing/Internals.cpp:
3002         (WebCore::toLayerTreeFlags):
3003         * testing/Internals.h:
3004         * testing/Internals.idl:
3005
3006 2019-06-20  Daniel Bates  <dabates@apple.com>
3007
3008         [iOS] Evernote crashes when creating a note
3009         https://bugs.webkit.org/show_bug.cgi?id=199083
3010         <rdar://problem/51759247>
3011
3012         Reviewed by Brent Fulgham.
3013
3014         Add runtime check whether WebKit is being used in Evernote. Evernote's bundle ID
3015         references iPhone, but they use the same ID for their iPad app as well.
3016
3017         * platform/RuntimeApplicationChecks.h:
3018         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
3019         (WebCore::IOSApplication::isEvernote): Added.
3020
3021 2019-06-20  Greg Doolittle  <gr3g@apple.com>
3022
3023         Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt>
3024         https://bugs.webkit.org/show_bug.cgi?id=194754
3025
3026         Reviewed by Chris Fleizach.
3027
3028         Test: accessibility/img-alt-attribute-unassigned-value.html
3029
3030         * accessibility/AccessibilityObject.cpp:
3031         (WebCore::AccessibilityObject::computedRoleString const):
3032
3033 2019-06-20  Ryosuke Niwa  <rniwa@webkit.org>
3034
3035         REGRESSION(r245912): Crash in TextIterator::range via visiblePositionForIndexUsingCharacterIterator
3036         https://bugs.webkit.org/show_bug.cgi?id=199061
3037
3038         Reviewed by Wenson Hsieh.
3039
3040         Avoid calling CharacterIterator::range when it's at the end. Otherwise, we'd crash with null pointer dereferencing.
3041
3042         Unfortunately no new tests since we don't have any reproducible test case.
3043
3044         * editing/Editing.cpp:
3045         (WebCore::visiblePositionForIndexUsingCharacterIterator):
3046
3047 2019-06-20  Brent Fulgham  <bfulgham@apple.com>
3048
3049         Resolve frequent crashes in topPrivatelyControlledDomain
3050         https://bugs.webkit.org/show_bug.cgi?id=199072
3051         <rdar://problem/51428162>
3052
3053         Reviewed by Youenn Fablet.
3054
3055         Crash data indicates that we are frequently crashing when multiple threads call
3056         WebCore::topPrivatelyControlledDomain. 
3057
3058         Code review showed the potential for a thread contention issue, since WebKit builds
3059         with '--fno-threadsafe-statics'.
3060
3061         This patch corrects the thread safety issue in WebCore::topPrivatelyControlledDomain.
3062
3063         * platform/mac/PublicSuffixMac.mm:
3064         (WebCore::topPrivatelyControlledDomain): Only instantiate the static cache after the
3065         current thread has achieved its lock.
3066
3067 2019-06-20  Saam Barati  <sbarati@apple.com>
3068
3069         [WHLSL] Property resolver needs to recurse on newValueExpression for RMW operations
3070         https://bugs.webkit.org/show_bug.cgi?id=199037
3071
3072         Reviewed by Myles C. Maxfield.
3073
3074         When we had an expression like `<e1> += <e2>`, we weren't running the property
3075         resolver on <e2>. If <e2> was something like `mat[1][2]`, we wouldn't end up
3076         simplifying that into the needed getter calls. This patch fixes this by having
3077         the property resolver recurse on <e2>.
3078         
3079         This patch also fixes a bug in the property resolver where we weren't marking some
3080         dereference expressions as LValues. This was causing bugs in the metal code generator.
3081         
3082         This patch also adds a way to dump the AST between passes that are
3083         guaranteed to not fail.
3084
3085         Test: webgpu/whlsl-read-modify-write-high-zombies.html
3086
3087         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
3088         (WebCore::WHLSL::prepareShared):
3089         * Modules/webgpu/WHLSL/WHLSLPropertyResolver.cpp:
3090         (WebCore::WHLSL::PropertyResolver::visit):
3091         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
3092
3093 2019-06-20  John Wilander  <wilander@apple.com>
3094
3095         Storage Access API: Cap the number of times an iframe document can request access
3096         https://bugs.webkit.org/show_bug.cgi?id=199074
3097         <rdar://problem/51857195>
3098
3099         Reviewed by Brent Fulgham.
3100
3101         Tested manually.
3102
3103         This change just adds a counter to the number of times the user explicitly
3104         denies storage access and returns early if the counter has reached the limit
3105         of 2.
3106
3107         We hoped that iframes that request storage access would count the number
3108         of times the user has been asked and not repeat the request over and over.
3109         However, we're seeing pretty aggressive use of the API and users are
3110         complaining. Therefore, we need a cap on how many times an iframed
3111         document can ask if it is explicitly denied access by the user.
3112
3113         This is a first measure. If we see continued aggressive use of the API,
3114         we'll have to consider more drastic measures.
3115
3116         * dom/DocumentStorageAccess.cpp:
3117         (WebCore::DocumentStorageAccess::requestStorageAccess):
3118         * dom/DocumentStorageAccess.h:
3119
3120 2019-06-20  Youenn Fablet  <youenn@apple.com>
3121
3122         Changing settings of a MediaStreamTrack clone should not alter the settings of the original track
3123         https://bugs.webkit.org/show_bug.cgi?id=198840
3124
3125         Reviewed by Eric Carlson.
3126
3127         Rename RealtimeVideoSource in RealtimeVideoCaptureSource.
3128         Introduce RealtimeVideoSource as a class wrapping RealtimeVideoCaptureSource.
3129         Its goal is to be able to have independent settings from its underlying RealtimeVideoCaptureSource.
3130         It can also adapt size based on its settings if different than its RealtimeVideoCaptureSource.
3131         Apply this wrapping for AV video sources as well as mock video sources.
3132         Test: fast/mediastream/mediastreamtrack-video-clone.html
3133
3134         * Sources.txt:
3135         * WebCore.xcodeproj/project.pbxproj:
3136         * platform/mediastream/MediaStreamTrackPrivate.cpp:
3137         (WebCore::MediaStreamTrackPrivate::clone):
3138         * platform/mediastream/RealtimeMediaSource.h:
3139         * platform/mediastream/RealtimeVideoCaptureSource.cpp: Added.
3140         (WebCore::RealtimeVideoCaptureSource::RealtimeVideoCaptureSource):
3141         (WebCore::RealtimeVideoCaptureSource::~RealtimeVideoCaptureSource):
3142         (WebCore::RealtimeVideoCaptureSource::prepareToProduceData):
3143         (WebCore::RealtimeVideoCaptureSource::presets):
3144         (WebCore::RealtimeVideoCaptureSource::setSupportedPresets):
3145         (WebCore::RealtimeVideoCaptureSource::standardVideoSizes):
3146         (WebCore::updateMinMax):
3147         (WebCore::RealtimeVideoCaptureSource::updateCapabilities):
3148         (WebCore::RealtimeVideoCaptureSource::supportsSizeAndFrameRate):
3149         (WebCore::RealtimeVideoCaptureSource::frameRateRangeIncludesRate):
3150         (WebCore::RealtimeVideoCaptureSource::presetSupportsFrameRate):
3151         (WebCore::RealtimeVideoCaptureSource::supportsCaptureSize):
3152         (WebCore::RealtimeVideoCaptureSource::shouldUsePreset):
3153         (WebCore::RealtimeVideoCaptureSource::bestSupportedSizeAndFrameRate):
3154         (WebCore::RealtimeVideoCaptureSource::setSizeAndFrameRate):
3155         (WebCore::RealtimeVideoCaptureSource::adaptVideoSample):
3156         (WebCore::RealtimeVideoCaptureSource::dispatchMediaSampleToObservers):
3157         (WebCore::RealtimeVideoCaptureSource::clientUpdatedSizeAndFrameRate):
3158         (WebCore::SizeAndFrameRate::toJSONObject const):
3159         (WebCore::SizeAndFrameRate::toJSONString const):
3160         * platform/mediastream/RealtimeVideoCaptureSource.h: Added.
3161         (WebCore::RealtimeVideoCaptureSource::sampleRotation const):
3162         (WebCore::RealtimeVideoCaptureSource::prefersPreset):
3163         (WebCore::RealtimeVideoCaptureSource::setFrameRateWithPreset):
3164         (WebCore::RealtimeVideoCaptureSource::canResizeVideoFrames const):
3165         (WebCore::RealtimeVideoCaptureSource::setDefaultSize):
3166         (WebCore::RealtimeVideoCaptureSource::observedFrameRate const):
3167         (WTF::LogArgument<WebCore::SizeAndFrameRate>::toString):
3168         * platform/mediastream/RealtimeVideoSource.cpp:
3169         (WebCore::RealtimeVideoSource::RealtimeVideoSource):
3170         (WebCore::m_source):
3171         (WebCore::RealtimeVideoSource::~RealtimeVideoSource):
3172         (WebCore::RealtimeVideoSource::startProducingData):
3173         (WebCore::RealtimeVideoSource::stopProducingData):
3174         (WebCore::RealtimeVideoSource::supportsSizeAndFrameRate):
3175         (WebCore::RealtimeVideoSource::setSizeAndFrameRate):
3176         (WebCore::RealtimeVideoSource::sourceMutedChanged):
3177         (WebCore::RealtimeVideoSource::sourceSettingsChanged):
3178         (WebCore::RealtimeVideoSource::preventSourceFromStopping):
3179         (WebCore::RealtimeVideoSource::sourceStopped):
3180         (WebCore::RealtimeVideoSource::videoSampleAvailable):
3181         (WebCore::RealtimeVideoSource::clone):
3182         * platform/mediastream/RealtimeVideoSource.h:
3183         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
3184         (WebCore::GStreamerVideoCaptureSource::GStreamerVideoCaptureSource):
3185         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.h:
3186         * platform/mediastream/mac/AVVideoCaptureSource.h:
3187         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3188         (WebCore::AVVideoCaptureSource::create):
3189         (WebCore::AVVideoCaptureSource::AVVideoCaptureSource):
3190         * platform/mediastream/mac/MockRealtimeVideoSourceMac.h:
3191         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
3192         (WebCore::MockRealtimeVideoSource::create):
3193         * platform/mock/MockRealtimeVideoSource.cpp:
3194         (WebCore::MockRealtimeVideoSource::create):
3195         (WebCore::MockRealtimeVideoSource::MockRealtimeVideoSource):
3196         (WebCore::MockRealtimeVideoSource::supportsSizeAndFrameRate):
3197         (WebCore::MockRealtimeVideoSource::setSizeAndFrameRate):
3198         * platform/mock/MockRealtimeVideoSource.h:
3199
3200 2019-06-20  Saam Barati  <sbarati@apple.com>
3201
3202         Unreviewed. More speculative build fixing for watchOS after r246631.
3203
3204         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
3205
3206 2019-06-20  Saam Barati  <sbarati@apple.com>
3207
3208         Unreviewed. Speculative build fix for watchOS after r246631.
3209
3210         * Modules/webgpu/WHLSL/WHLSLVisitor.cpp:
3211
3212 2019-06-18  Darin Adler  <darin@apple.com>
3213
3214         Tidy up the remaining bits of the AtomicString to AtomString rename
3215         https://bugs.webkit.org/show_bug.cgi?id=198990
3216
3217         Reviewed by Michael Catanzaro.
3218
3219         * bindings/scripts/test/JS/JSTestObj.cpp: Updated names.
3220         * bindings/scripts/test/TestObj.idl: Ditto.
3221
3222         * css/makeprop.pl: Updated comment.
3223         * css/makevalues.pl: Ditto.
3224         * html/FormController.cpp:
3225         (WebCore::FormKeyGenerator::formKey): Ditto.
3226
3227 2019-06-20  Zalan Bujtas  <zalan@apple.com>
3228
3229         [LFC][IFC] Make the initial strut explicit
3230         https://bugs.webkit.org/show_bug.cgi?id=199057
3231         <rdar://problem/51927864>
3232
3233         Reviewed by Antti Koivisto.
3234
3235         The strut always sets the initial vertical constraints on the new line in strict mode. However in quirks mode
3236         we can ignore it as long as there's no baseline type content on the line.  
3237
3238         * layout/inlineformatting/InlineFormattingContext.h:
3239         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3240         (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
3241         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
3242         (WebCore::Layout::InlineFormattingContext::Quirks::lineHeightConstraints):
3243         * layout/inlineformatting/InlineLine.cpp:
3244         (WebCore::Layout::Line::appendTextContent):
3245         (WebCore::Layout::Line::appendHardLineBreak):
3246         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
3247         * layout/inlineformatting/InlineLine.h:
3248
3249 2019-06-20  Zalan Bujtas  <zalan@apple.com>
3250
3251         [LFC][IFC] Introduce Line::InitialConstraints
3252         https://bugs.webkit.org/show_bug.cgi?id=199056
3253         <rdar://problem/51927597>
3254
3255         Reviewed by Antti Koivisto.
3256
3257         Line::InitialConstraints, as the name suggests, holds the initial constraint values for the new line. 
3258
3259         * layout/inlineformatting/InlineFormattingContext.h:
3260         * layout/inlineformatting/InlineFormattingContextLineLayout.cpp:
3261         (WebCore::Layout::InlineFormattingContext::LineLayout::LineInput::LineInput):
3262         (WebCore::Layout::InlineFormattingContext::LineLayout::placeInlineItems const):
3263         (WebCore::Layout::InlineFormattingContext::LineLayout::layout const):
3264         (WebCore::Layout::InlineFormattingContext::LineLayout::computedIntrinsicWidth const):
3265         * layout/inlineformatting/InlineLine.cpp:
3266         (WebCore::Layout::Line::Line):
3267         (WebCore::Layout::m_skipVerticalAligment):
3268         (WebCore::Layout::m_lineLogicalWidth): Deleted.
3269         * layout/inlineformatting/InlineLine.h:
3270
3271 2019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3272
3273         [GTK] Remove support for GTK2 plugins
3274         https://bugs.webkit.org/show_bug.cgi?id=199065
3275
3276         Reviewed by Sergio Villar Senin.
3277
3278         * PlatformGTK.cmake:
3279         * SourcesGTK.txt:
3280         * SourcesWPE.txt:
3281         * platform/FreeType.cmake:
3282         * platform/SourcesGLib.txt:
3283         * platform/graphics/Color.h:
3284         * platform/graphics/PlatformDisplay.cpp:
3285         (WebCore::PlatformDisplay::createPlatformDisplay):
3286         * platform/graphics/gtk/ColorGtk.cpp:
3287         (WebCore::Color::operator GdkRGBA const):
3288         * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp:
3289         (WebCore::onFrameClockUpdate):
3290         (WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback):
3291         * platform/graphics/gtk/DisplayRefreshMonitorGtk.h:
3292         (WebCore::DisplayRefreshMonitorGtk::create):
3293         * platform/graphics/gtk/GdkCairoUtilities.cpp:
3294         * platform/gtk/GRefPtrGtk.cpp:
3295         * platform/gtk/GRefPtrGtk.h:
3296         * platform/gtk/GtkVersioning.c: Removed.
3297         * platform/gtk/GtkVersioning.h: Removed.
3298         * platform/gtk/PasteboardHelper.cpp:
3299         (WebCore::PasteboardHelper::getClipboardContents):
3300         * platform/gtk/PlatformKeyboardEventGtk.cpp:
3301         (WebCore::modifiersForGdkKeyEvent):
3302         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3303         * platform/gtk/PlatformMouseEventGtk.cpp:
3304         (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3305         * platform/gtk/PlatformScreenGtk.cpp:
3306         (WebCore::screenIsTouchPrimaryInputDevice):
3307         * platform/gtk/PlatformWheelEventGtk.cpp:
3308         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
3309         * platform/gtk/ScrollbarThemeGtk.cpp:
3310         * platform/gtk/ScrollbarThemeGtk.h:
3311         * platform/gtk/WidgetGtk.cpp:
3312         * rendering/RenderThemeGtk.cpp:
3313         * rendering/RenderThemeGtk.h:
3314
3315 2019-06-19  Myles C. Maxfield  <mmaxfield@apple.com>
3316
3317         [WHLSL] Hook up common texture functions
3318         https://bugs.webkit.org/show_bug.cgi?id=198704
3319         <rdar://problem/51668841>
3320
3321         Reviewed by Saam Barati.
3322
3323         This patch adds the Metal implementation of the Sample(), Load(), and GetDimensions()
3324         texture functions. The implementation simply performs string concatenation to produce the 
3325         correct results, and adds many new native functions to the standard library.
3326
3327         We can't zero-fill texture types or sampler types, so this patch forbids default
3328         constructors for those types. It also forbids those types to exist within arrays, array
3329         references, or pointers, becuase an out-of-bounds access may cause us to try to zero-fill
3330         them.
3331
3332         Tests: webgpu/whlsl-textures-getdimensions.html
3333                webgpu/whlsl-textures-load.html
3334                webgpu/whlsl-textures-sample.html
3335
3336         * Modules/webgpu/WHLSL/AST/WHLSLNativeTypeDeclaration.h: Add some more introspection functions
3337         so we can generate the necessary Metal functions for the appropriate texture types.
3338         (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtomic const):
3339         (WebCore::WHLSL::AST::NativeTypeDeclaration::isTextureArray const):
3340         (WebCore::WHLSL::AST::NativeTypeDeclaration::isDepthTexture const):
3341         (WebCore::WHLSL::AST::NativeTypeDeclaration::isWritableTexture const):
3342         (WebCore::WHLSL::AST::NativeTypeDeclaration::textureDimension const):
3343         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsTextureArray):
3344         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsDepthTexture):
3345         (WebCore::WHLSL::AST::NativeTypeDeclaration::setIsWritableTexture):
3346         (WebCore::WHLSL::AST::NativeTypeDeclaration::setTextureDimension):
3347         (WebCore::WHLSL::AST::NativeTypeDeclaration::isAtom const): Deleted.
3348         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp: Native types can be passed into 
3349         entry points, too.
3350         (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
3351         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp: Entry points that return void don't need a
3352         semantic.
3353         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
3354         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp: Implement the functions.
3355         (WebCore::WHLSL::Metal::vectorLength):
3356         (WebCore::WHLSL::Metal::vectorInnerType):
3357         (WebCore::WHLSL::Metal::vectorSuffix):
3358         (WebCore::WHLSL::Metal::writeNativeFunction):
3359         * Modules/webgpu/WHLSL/Metal/WHLSLNativeTypeWriter.cpp: Textures come in two flavors: sample-able
3360         and read/write-able. Make sure we produce the correct Metal types for them.
3361         (WebCore::WHLSL::Metal::writeNativeType):
3362         * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.cpp: We can't auto-initialize textures and 
3363         samplers. Therefore, this function needs to be able to fail.
3364         (WebCore::WHLSL::AutoInitialize::visit):
3365         (WebCore::WHLSL::autoInitializeVariables):
3366         * Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h:
3367         * Modules/webgpu/WHLSL/WHLSLCheckDuplicateFunctions.cpp: We can't auto-initialize textures, so users
3368         shouldn't be able to either.
3369         (WebCore::WHLSL::checkDuplicateFunctions):
3370         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.cpp: Added. Make sure textures and samplers can't
3371         exist inside arrays, array references, or pointers. This is because out-of-bounds accesses may cause
3372         us to attempt to zero-fill the inner type, but we can't zero-fill textures and samplers.
3373         (WebCore::WHLSL::TextureReferencesChecker::TextureReferencesChecker):
3374         (WebCore::WHLSL::Searcher::Searcher):
3375         (WebCore::WHLSL::Searcher::found const):
3376         (WebCore::WHLSL::Searcher::visit):
3377         (WebCore::WHLSL::TextureReferencesChecker::containsTextureOrSampler):
3378         (WebCore::WHLSL::TextureReferencesChecker::visit):
3379         (WebCore::WHLSL::checkTextureReferences):
3380         * Modules/webgpu/WHLSL/WHLSLCheckTextureReferences.h: Copied from Source/WebCore/Modules/webgpu/WHLSL/WHLSLAutoInitializeVariables.h.
3381         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3382         * Modules/webgpu/WHLSL/WHLSLIntrinsics.cpp: Record more detailed information about texture types,
3383         so we can emit correct Metal code.
3384         (WebCore::WHLSL::Intrinsics::addFullTexture):
3385         (WebCore::WHLSL::Intrinsics::addDepthTexture):
3386         * Modules/webgpu/WHLSL/WHLSLIntrinsics.h:
3387         (WebCore::WHLSL::Intrinsics::WTF_ARRAY_LENGTH):
3388         * Modules/webgpu/WHLSL/WHLSLNameResolver.cpp: Nested NameResolvers need to propagate their error. Also,
3389         native functions with named arguments shouldn't be adding their arguments to the global scope.
3390         (WebCore::WHLSL::NameResolver::visit):
3391         * Modules/webgpu/WHLSL/WHLSLNameResolver.h:
3392         * Modules/webgpu/WHLSL/WHLSLPrepare.cpp:
3393         (WebCore::WHLSL::prepareShared):
3394         * Modules/webgpu/WHLSL/WHLSLProgram.h:
3395         (WebCore::WHLSL::Program::intrinsics const):
3396         * Modules/webgpu/WHLSL/WHLSLRecursiveTypeChecker.cpp:
3397         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt: Metal doesn't have writable depth textures.
3398         * Modules/webgpu/WHLSL/WHLSLSynthesizeArrayOperatorLength.cpp:
3399         * Modules/webgpu/WHLSL/WHLSLSynthesizeConstructors.cpp: Don't generate default constructors for textures
3400         or samplers.
3401         (WebCore::WHLSL::synthesizeConstructors):
3402         * Sources.txt:
3403         * WebCore.xcodeproj/project.pbxproj:
3404         * platform/graphics/gpu/GPUTexture.h: Make texture usages more clear.
3405         (WebCore::GPUTexture::isSampled const):
3406         (WebCore::GPUTexture::isStorage const):
3407         * platform/graphics/gpu/cocoa/GPUBindGroupMetal.mm: Ditto.
3408         (WebCore::GPUBindGroup::tryCreate):
3409         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Ditto.
3410         (WebCore::GPUProgrammablePassEncoder::setBindGroup):
3411         * platform/graphics/gpu/cocoa/GPUTextureMetal.mm: Ditto.
3412         (WebCore::mtlTextureUsageForGPUTextureUsageFlags):
3413
3414 2019-06-19  Justin Fan  <justin_fan@apple.com>
3415
3416         [WHLSL] Create a shading language test harness
3417         https://bugs.webkit.org/show_bug.cgi?id=198978
3418
3419         Reviewed by Myles C. Maxfield.
3420
3421         When creating MTLArgumentEncoders for argument buffers, the user's arguments
3422         must match the order that they are declared in the shader. Move back-end information
3423         such as buffer lengths to the end of the argument arrays.
3424
3425         Test: webgpu/whlsl-harness-test.html
3426
3427         * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.cpp:
3428         (WebCore::WHLSL::Metal::EntryPointScaffolding::resourceHelperTypes):
3429         * platform/graphics/gpu/cocoa/GPUBindGroupLayoutMetal.mm:
3430         (WebCore::GPUBindGroupLayout::tryCreate):
3431
3432 2019-06-19  Saam Barati  <sbarati@apple.com>
3433
3434         [WHLSL] The checker needs to resolve types for the anonymous variables in ReadModifyWrite expressions
3435         https://bugs.webkit.org/show_bug.cgi?id=198988
3436
3437         Reviewed by Dean Jackson and Myles C. Maxfield.
3438
3439         This patch makes it so that the Checker assigns types to the internal variables
3440         in a read modify write expression. These were the only variables that didn't have
3441         types ascribed to them.
3442
3443         This patch also does a fly by fix where we kept pointers to value types
3444         in a HashMap in the checker. This is wrong precisely when the HashMap gets
3445         resized. Instead, we now just store the value itself since we're just
3446         dealing with a simple Variant that wraps either an empty struct or an
3447         enum.
3448
3449         Test: webgpu/whlsl-checker-should-set-type-of-read-modify-write-variables.html
3450
3451         * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h:
3452         (WebCore::WHLSL::AST::VariableDeclaration::setType):
3453         (WebCore::WHLSL::AST::VariableDeclaration::type const):
3454         * Modules/webgpu/WHLSL/WHLSLASTDumper.cpp: Make it obvious that read
3455         modify write expressions are such by prefixing them with "RMW".
3456         (WebCore::WHLSL::ASTDumper::visit):
3457         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3458         (WebCore::WHLSL::Checker::visit):
3459
3460 2019-06-19  Devin Rousso  <drousso@apple.com>
3461
3462         Web Inspector: Network: replace CFNetwork SPI with new API where able
3463         https://bugs.webkit.org/show_bug.cgi?id=198762
3464
3465         Reviewed by Timothy Hatcher.
3466
3467         * platform/network/NetworkLoadMetrics.h:
3468
3469 2019-06-19  Jer Noble  <jer.noble@apple.com>
3470
3471         iOS 12.2 Drawing portrait video to canvas is sideways
3472         https://bugs.webkit.org/show_bug.cgi?id=196772
3473         <rdar://problem/49781802>
3474
3475         Reviewed by Eric Carlson.
3476
3477         Test: media/video-orientation-canvas.html
3478
3479         Move rotation code into its own ImageRotationSessionVT class for re-use across
3480         all existing classes with rotation operations. Should slightly increase performance
3481         for painting rotated media files, as the rotation only occurs once per frame, rather
3482         than once per drawing operation.
3483
3484         * WebCore.xcodeproj/project.pbxproj:
3485         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
3486         (WebCore::ImageDecoderAVFObjC::RotationProperties::isIdentity const): Deleted.
3487         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
3488         (WebCore::ImageDecoderAVFObjC::readTrackMetadata):
3489         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
3490         (WebCore::ImageDecoderAVFObjC::setTrack):
3491         (WebCore::transformToRotationProperties): Deleted.
3492         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
3493         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3494         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
3495         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateLastPixelBuffer):
3496         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
3497         * platform/graphics/cv/ImageRotationSessionVT.h: Added.
3498         (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const):
3499         (WebCore::ImageRotationSessionVT::rotationProperties const):
3500         (WebCore::ImageRotationSessionVT::rotatedSize):
3501         * platform/graphics/cv/ImageRotationSessionVT.mm: Added.
3502         (WebCore::transformToRotationProperties):
3503         (WebCore::ImageRotationSessionVT::ImageRotationSessionVT):
3504         (WebCore::ImageRotationSessionVT::rotate):
3505         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
3506         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.h:
3507         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.mm:
3508         (WebCore::rotationToAngle):
3509         (WebCore::RealtimeOutgoingVideoSourceCocoa::rotatePixelBuffer):
3510         (WebCore::computeRotatedWidthAndHeight): Deleted.
3511
3512 2019-06-19  Simon Fraser  <simon.fraser@apple.com>
3513
3514         REGRESSION (246538): Newyorker.com header scrolls on page
3515         
3516         Revert parts of r246538 so that frame scrolling is reverted to using layer positions.
3517         Overflow scroll will still scroll by changing boundsOrigin.
3518         
3519         The bug was caused by confusion about insetClipLayer and scrollContainerLayer; macOS
3520         positions the clip layer using FrameView::yPositionForInsetClipLayer(), so it's not just
3521         a simple scroll container, and this change broke positioning for fixed position layers.
3522
3523         * page/scrolling/AsyncScrollingCoordinator.cpp:
3524         (WebCore::AsyncScrollingCoordinator::reconcileScrollPosition):
3525         * page/scrolling/ScrollingCoordinator.cpp:
3526         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
3527         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3528         (WebCore::ScrollingTreeFrameScrollingNodeMac::repositionScrollingLayers):
3529         * rendering/RenderLayerCompositor.cpp:
3530         (WebCore::RenderLayerCompositor::~RenderLayerCompositor):
3531         (WebCore::RenderLayerCompositor::frameViewDidChangeSize):
3532         (WebCore::RenderLayerCompositor::updateScrollLayerPosition):
3533         (WebCore::RenderLayerCompositor::updateScrollLayerClipping):
3534         (WebCore::RenderLayerCompositor::frameViewDidScroll):
3535         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3536         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
3537         (WebCore::RenderLayerCompositor::ensureRootLayer):
3538         (WebCore::RenderLayerCompositor::destroyRootLayer):
3539         (WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
3540         (WebCore::RenderLayerCompositor::updateLayersForScrollPosition): Deleted.
3541         (WebCore::RenderLayerCompositor::updateScrollContainerGeometry): Deleted.
3542         * rendering/RenderLayerCompositor.h:
3543
3544 2019-06-19  Adrian Perez de Castro  <aperez@igalia.com>
3545
3546         [WPE][GTK] Fix build with unified sources disabled
3547         https://bugs.webkit.org/show_bug.cgi?id=198752
3548
3549         Reviewed by Michael Catanzaro.
3550
3551         No new tests needed.
3552
3553         * Modules/indexeddb/server/UniqueIDBDatabase.h: Add missing forward declaration for IDBGetRecordData,
3554         replace inclusion of UniqueIDBDatabaseConnection.h with a forward declaration.
3555         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.h: Remove unneeded inclusion of
3556         UniqueIDBDatabaseTransaction.h, add missing inclusion of UniqueIDBDatabase.h
3557         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h: Remove unneeded inclusion of
3558         UniqueIDBDatabaseConnection.h inclusion.
3559         * bridge/c/c_class.cpp: Add inclusion of JSCJSValueInlines.h to avoid linker errors due
3560         to missing JSValue inline functions.
3561         * dom/DocumentParser.h: Replace forward declaration of Document with inclusion of Document.h,
3562         to avoid error due to usage of incomplete type in template expansion.
3563         * dom/Microtasks.h: Add missing forward declaration of JSC::VM
3564         * editing/markup.cpp: Add missing inclusion of PasteboardItemInfo.h
3565         * page/Quirks.h: Add missing forward declaration of WebCore::EventTarget
3566         * page/RuntimeEnabledFeatures.h: Add missing inclusion of wtf/Optional.h to avoid error due to
3567         expansion of undefined template.
3568         * page/SocketProvider.h: Add missing forward declaration for Document.
3569         * platform/graphics/GraphicsLayerClient.h: Add missing inclusion of wtf/OptionSet.h to avoid
3570         error due to expansion of undefined template.
3571         * rendering/RenderMultiColumnSpannerPlaceholder.h: Replace forward declaration of RenderMultiColumnFlow
3572         with inclusion of RenderMultiColumnFlow.h to avoid error due to usage of undefined class.
3573
3574 2019-06-19  Antti Koivisto  <antti@apple.com>
3575
3576         RequestedScrollPosition shouldn't be applied after node reattach
3577         https://bugs.webkit.org/show_bug.cgi?id=198994
3578         <rdar://problem/51439685>
3579
3580         Reviewed by Simon Fraser.
3581
3582         Test: scrollingcoordinator/ios/scroll-position-after-reattach.html
3583
3584         If a scrolling node gets reattached, its scroll position resets to (0,0) or whatever the previous
3585         requestedScrollPosition was, and the current position is lost.
3586
3587         * page/scrolling/ScrollingStateFixedNode.cpp:
3588         (WebCore::ScrollingStateFixedNode::setPropertyChangedBitsAfterReattach):
3589         (WebCore::ScrollingStateFixedNode::setAllPropertiesChanged): Deleted.
3590
3591         Rename to better reflect what this is for.
3592
3593         * page/scrolling/ScrollingStateFixedNode.h:
3594         * page/scrolling/ScrollingStateFrameHostingNode.cpp:
3595         (WebCore::ScrollingStateFrameHostingNode::setPropertyChangedBitsAfterReattach):
3596         (WebCore::ScrollingStateFrameHostingNode::setAllPropertiesChanged): Deleted.
3597         * page/scrolling/ScrollingStateFrameHostingNode.h:
3598         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3599         (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
3600         (WebCore::ScrollingStateFrameScrollingNode::setAllPropertiesChanged): Deleted.
3601         * page/scrolling/ScrollingStateFrameScrollingNode.h:
3602         * page/scrolling/ScrollingStateNode.cpp:
3603         (WebCore::ScrollingStateNode::setPropertyChangedBitsAfterReattach):
3604         (WebCore::ScrollingStateNode::setAllPropertiesChanged): Deleted.
3605         * page/scrolling/ScrollingStateNode.h:
3606         * page/scrolling/ScrollingStatePositionedNode.cpp:
3607         (WebCore::ScrollingStatePositionedNode::setPropertyChangedBitsAfterReattach):
3608         (WebCore::ScrollingStatePositionedNode::setAllPropertiesChanged): Deleted.
3609         * page/scrolling/ScrollingStatePositionedNode.h:
3610         * page/scrolling/ScrollingStateScrollingNode.cpp:
3611         (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):
3612
3613         Don't set RequestedScrollPosition. It is a special property that is applied only once on request
3614         and shouldn't get reapplied. Nodes should keep their existing scroll position on reattach.
3615
3616         (WebCore::ScrollingStateScrollingNode::setAllPropertiesChanged): Deleted.
3617         * page/scrolling/ScrollingStateScrollingNode.h:
3618         * page/scrolling/ScrollingStateStickyNode.cpp:
3619         (WebCore::ScrollingStateStickyNode::setPropertyChangedBitsAfterReattach):
3620         (WebCore::ScrollingStateStickyNode::setAllPropertiesChanged): Deleted.
3621         * page/scrolling/ScrollingStateStickyNode.h:
3622         * page/scrolling/ScrollingStateTree.cpp:
3623         (WebCore::ScrollingStateTree::nodeWasReattachedRecursive):
3624
3625 2019-06-18  Saam Barati  <sbarati@apple.com>
3626
3627         [WHLSL] Support matrices
3628         https://bugs.webkit.org/show_bug.cgi?id=198876
3629         <rdar://problem/51768882>
3630
3631         Reviewed by Dean Jackson and Myles Maxfield.
3632
3633         This patch adds in support for matrices to WHLSL. Most matrix related code
3634         is defined by the standard library. This patch just needed to add support
3635         for the native functions operator[] and operator[]= on matrix types. The only
3636         native functions that are named operator[] and operator[]= are for matrix
3637         operations, so we strongly assume when generating code for native operator[] and
3638         operator[]= that we're dealing with matrix types.
3639         
3640         operator[]= ignores the write if the index is out of bounds. operator[]
3641         returns a zeroed vector if the index is out of bounds.  
3642         
3643         This patch also incorporates two bug fixes:
3644         1. This patch takes Robin's patch in https://bugs.webkit.org/show_bug.cgi?id=198313 to ensure
3645         we don't have pointers to values in a hash map. This was needed in this patch
3646         otherwise we'd crash parsing the standard library.
3647         
3648         2. This patch fixes how we handle "break" in metal codegen. When I first
3649         implemented break, I strongly assumed we were in a loop. However, break
3650         can be either from a loop or from switch. This patch teaches the metal code
3651         generator to track which context we're in and to emit code accordingly.
3652
3653         Tests: webgpu/whlsl-matrix-2.html
3654                webgpu/whlsl-matrix.html
3655
3656         * Modules/webgpu/WHLSL/Metal/WHLSLFunctionWriter.cpp:
3657         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::visit):
3658         (WebCore::WHLSL::Metal::FunctionDefinitionWriter::emitLoop):
3659         * Modules/webgpu/WHLSL/Metal/WHLSLMetalCodeGenerator.cpp:
3660         (WebCore::WHLSL::Metal::generateMetalCodeShared):
3661         * Modules/webgpu/WHLSL/Metal/WHLSLNativeFunctionWriter.cpp:
3662         (WebCore::WHLSL::Metal::writeNativeFunction):
3663         * Modules/webgpu/WHLSL/WHLSLChecker.cpp:
3664         (WebCore::WHLSL::Checker::assignTypes):
3665         (WebCore::WHLSL::Checker::getInfo):
3666         (WebCore::WHLSL::Checker::assignType):
3667         (WebCore::WHLSL::Checker::forwardType):
3668         * Modules/webgpu/WHLSL/WHLSLStandardLibrary.txt:
3669
3670 2019-06-18  Yusuke Suzuki  <ysuzuki@apple.com>
3671
3672         [JSC] JSLock should be WebThread aware
3673         https://bugs.webkit.org/show_bug.cgi?id=198911
3674
3675         Reviewed by Geoffrey Garen.
3676
3677         * bindings/js/CommonVM.cpp:
3678         (WebCore::commonVMSlow):
3679
3680 2019-06-18  Joseph Pecoraro  <pecoraro@apple.com>
3681
3682         WebSocketDeflater uses an unnecessarily constrained compression memory level
3683         https://bugs.webkit.org/show_bug.cgi?id=198973
3684
3685         Reviewed by Alex Christensen.
3686
3687         * Modules/websockets/WebSocketDeflater.cpp:
3688         Set the memLevel to the deflateInit2 default value, not a minimum value.
3689
3690 2019-06-18  Keith Miller  <keith_miller@apple.com>
3691
3692         Add support for WeakRef
3693         https://bugs.webkit.org/show_bug.cgi?id=198710
3694
3695         Reviewed by Yusuke Suzuki.
3696
3697         We need to make sure the Web MicrotaskQueue notifies the JSC VM
3698         that it has finished performing a microtask checkpoint. This lets
3699         the JSC VM know it is safe to collect referenced WeakRefs. Since
3700         there was no way to get the VM from the MicrotaskQueue I have
3701         added a RefPtr to the queue's VM. For the main thread the VM lives
3702         forever so is fine. For workers the queue and the VM share an
3703         owner so this shouldn't matter either.
3704
3705         Tests: js/weakref-async-is-collected.html
3706                js/weakref-eventually-collects-values.html
3707                js/weakref-microtasks-dont-collect.html
3708                js/weakref-weakset-consistency.html
3709
3710         * dom/Microtasks.cpp:
3711         (WebCore::MicrotaskQueue::MicrotaskQueue):
3712         (WebCore::MicrotaskQueue::mainThreadQueue):
3713         (WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
3714         * dom/Microtasks.h:
3715         (WebCore::MicrotaskQueue::vm const):
3716         * workers/WorkerGlobalScope.cpp:
3717         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
3718
3719 2019-06-18  Kenneth Russell  <kbr@chromium.org>
3720
3721         Add preliminary ANGLE backend to WebCore
3722         https://bugs.webkit.org/show_bug.cgi?id=197755
3723
3724         Reviewed by Dean Jackson.
3725
3726         Add new files supplying an ANGLE version of GraphicsContext3D and
3727         Extensions3D, conditionalized under USE_ANGLE. Update Xcode project to
3728         build these files. This option compiles and links successfully.
3729
3730         FIXMEs remain in several common files which will be addressed in
3731         subsequent patches.
3732
3733         This work will be tested with the preexisting WebGL conformance
3734         suite.
3735
3736         * SourcesCocoa.txt:
3737         * WebCore.xcodeproj/project.pbxproj:
3738         * platform/graphics/ANGLEWebKitBridge.h:
3739         * platform/graphics/GraphicsContext3D.h:
3740         * platform/graphics/GraphicsContext3DManager.cpp:
3741         (WebCore::GraphicsContext3DManager::updateAllContexts):
3742         (WebCore::GraphicsContext3DManager::updateHighPerformanceState):
3743         (WebCore::GraphicsContext3DManager::disableHighPerformanceGPUTimerFired):
3744         * platform/graphics/angle/Extensions3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/Extensions3DOpenGLCommon.cpp.
3745         (WebCore::Extensions3DANGLE::Extensions3DANGLE):
3746         (WebCore::Extensions3DANGLE::supports):
3747         (WebCore::Extensions3DANGLE::ensureEnabled):
3748         (WebCore::Extensions3DANGLE::isEnabled):
3749         (WebCore::Extensions3DANGLE::getGraphicsResetStatusARB):
3750         (WebCore::Extensions3DANGLE::getTranslatedShaderSourceANGLE):
3751         (WebCore::Extensions3DANGLE::initializeAvailableExtensions):
3752         (WebCore::Extensions3DANGLE::readnPixelsEXT):
3753         (WebCore::Extensions3DANGLE::getnUniformfvEXT):
3754         (WebCore::Extensions3DANGLE::getnUniformivEXT):
3755         (WebCore::Extensions3DANGLE::blitFramebuffer):
3756         (WebCore::Extensions3DANGLE::renderbufferStorageMultisample):
3757         (WebCore::Extensions3DANGLE::createVertexArrayOES):
3758         (WebCore::Extensions3DANGLE::deleteVertexArrayOES):
3759         (WebCore::Extensions3DANGLE::isVertexArrayOES):
3760         (WebCore::Extensions3DANGLE::bindVertexArrayOES):
3761         (WebCore::Extensions3DANGLE::insertEventMarkerEXT):
3762         (WebCore::Extensions3DANGLE::pushGroupMarkerEXT):
3763         (WebCore::Extensions3DANGLE::popGroupMarkerEXT):
3764         (WebCore::Extensions3DANGLE::supportsExtension):
3765         (WebCore::Extensions3DANGLE::drawBuffersEXT):
3766         (WebCore::Extensions3DANGLE::drawArraysInstanced):
3767         (WebCore::Extensions3DANGLE::drawElementsInstanced):
3768         (WebCore::Extensions3DANGLE::vertexAttribDivisor):
3769         (WebCore::Extensions3DANGLE::getExtensions):
3770         * platform/graphics/angle/Extensions3DANGLE.h: Added.
3771         * platform/graphics/angle/GraphicsContext3DANGLE.cpp: Copied from Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp.
3772         (WebCore::GraphicsContext3D::releaseShaderCompiler):
3773         (WebCore::wipeAlphaChannelFromPixels):
3774         (WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
3775         (WebCore::GraphicsContext3D::validateAttributes):
3776         (WebCore::GraphicsContext3D::reshapeFBOs):
3777         (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
3778         (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
3779         (WebCore::GraphicsContext3D::renderbufferStorage):
3780         (WebCore::GraphicsContext3D::getIntegerv):
3781         (WebCore::GraphicsContext3D::getShaderPrecisionFormat):
3782         (WebCore::GraphicsContext3D::texImage2D):
3783         (WebCore::GraphicsContext3D::depthRange):
3784         (WebCore::GraphicsContext3D::clearDepth):
3785         (WebCore::GraphicsContext3D::getExtensions):
3786         (WebCore::GraphicsContext3D::readPixels):
3787         (WebCore::setCurrentNameHashMapForShader):
3788         (WebCore::nameHashForShader):
3789         (WebCore::GraphicsContext3D::validateDepthStencil):
3790         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
3791         (WebCore::GraphicsContext3D::paintCompositedResultsToCanvas):
3792         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
3793         (WebCore::GraphicsContext3D::prepareTexture):
3794         (WebCore::GraphicsContext3D::readRenderingResults):
3795         (WebCore::GraphicsContext3D::reshape):
3796         (WebCore::GraphicsContext3D::checkVaryingsPacking const):
3797         (WebCore::GraphicsContext3D::precisionsMatch const):
3798         (WebCore::GraphicsContext3D::getInternalFramebufferSize const):
3799         (WebCore::GraphicsContext3D::activeTexture):
3800         (WebCore::GraphicsContext3D::attachShader):
3801         (WebCore::GraphicsContext3D::bindAttribLocation):
3802         (WebCore::GraphicsContext3D::bindBuffer):
3803         (WebCore::GraphicsContext3D::bindFramebuffer):
3804         (WebCore::GraphicsContext3D::bindRenderbuffer):
3805         (WebCore::GraphicsContext3D::bindTexture):
3806         (WebCore::GraphicsContext3D::blendColor):
3807         (WebCore::GraphicsContext3D::blendEquation):
3808         (WebCore::GraphicsContext3D::blendEquationSeparate):
3809         (WebCore::GraphicsContext3D::blendFunc):
3810         (WebCore::GraphicsContext3D::blendFuncSeparate):
3811         (WebCore::GraphicsContext3D::bufferData):
3812         (WebCore::GraphicsContext3D::bufferSubData):
3813         (WebCore::GraphicsContext3D::mapBufferRange):
3814         (WebCore::GraphicsContext3D::unmapBuffer):
3815         (WebCore::GraphicsContext3D::copyBufferSubData):
3816         (WebCore::GraphicsContext3D::getInternalformativ):
3817         (WebCore::GraphicsContext3D::renderbufferStorageMultisample):
3818         (WebCore::GraphicsContext3D::texStorage2D):
3819         (WebCore::GraphicsContext3D::texStorage3D):
3820         (WebCore::GraphicsContext3D::getActiveUniforms):
3821         (WebCore::GraphicsContext3D::checkFramebufferStatus):
3822         (WebCore::GraphicsContext3D::clearColor):
3823         (WebCore::GraphicsContext3D::clear):
3824         (WebCore::GraphicsContext3D::clearStencil):
3825         (WebCore::GraphicsContext3D::colorMask):
3826         (WebCore::GraphicsContext3D::compileShader):
3827         (WebCore::GraphicsContext3D::compileShaderDirect):
3828         (WebCore::GraphicsContext3D::copyTexImage2D):
3829         (WebCore::GraphicsContext3D::copyTexSubImage2D):
3830         (WebCore::GraphicsContext3D::cullFace):
3831         (WebCore::GraphicsContext3D::depthFunc):
3832         (WebCore::GraphicsContext3D::depthMask):
3833         (WebCore::GraphicsContext3D::detachShader):
3834         (WebCore::GraphicsContext3D::disable):
3835         (WebCore::GraphicsContext3D::disableVertexAttribArray):
3836         (WebCore::GraphicsContext3D::drawArrays):
3837         (WebCore::GraphicsContext3D::drawElements):
3838         (WebCore::GraphicsContext3D::enable):
3839         (WebCore::GraphicsContext3D::enableVertexAttribArray):
3840         (WebCore::GraphicsContext3D::finish):
3841         (WebCore::GraphicsContext3D::flush):
3842         (WebCore::GraphicsContext3D::framebufferRenderbuffer):
3843         (WebCore::GraphicsContext3D::framebufferTexture2D):
3844         (WebCore::GraphicsContext3D::frontFace):
3845         (WebCore::GraphicsContext3D::generateMipmap):
3846         (WebCore::GraphicsContext3D::getActiveAttribImpl):
3847         (WebCore::GraphicsContext3D::getActiveAttrib):
3848         (WebCore::GraphicsContext3D::getActiveUniformImpl):
3849         (WebCore::GraphicsContext3D::getActiveUniform):
3850         (WebCore::GraphicsContext3D::getAttachedShaders):
3851         (WebCore::generateHashedName):
3852         (WebCore::GraphicsContext3D::mappedSymbolInShaderSourceMap):
3853         (WebCore::GraphicsContext3D::mappedSymbolName):
3854         (WebCore::GraphicsContext3D::originalSymbolInShaderSourceMap):
3855         (WebCore::GraphicsContext3D::originalSymbolName):
3856         (WebCore::GraphicsContext3D::getAttribLocation):
3857         (WebCore::GraphicsContext3D::getAttribLocationDirect):
3858         (WebCore::GraphicsContext3D::getContextAttributes):
3859         (WebCore::GraphicsContext3D::moveErrorsToSyntheticErrorList):
3860         (WebCore::GraphicsContext3D::getError):
3861         (WebCore::GraphicsContext3D::getString):
3862         (WebCore::GraphicsContext3D::hint):
3863         (WebCore::GraphicsContext3D::isBuffer):
3864         (WebCore::GraphicsContext3D::isEnabled):
3865         (WebCore::GraphicsContext3D::isFramebuffer):
3866         (WebCore::GraphicsContext3D::isProgram):
3867         (WebCore::GraphicsContext3D::isRenderbuffer):
3868         (WebCore::GraphicsContext3D::isShader):
3869         (WebCore::GraphicsContext3D::isTexture):
3870         (WebCore::GraphicsContext3D::lineWidth):
3871         (WebCore::GraphicsContext3D::linkProgram):
3872         (WebCore::GraphicsContext3D::pixelStorei):
3873         (WebCore::GraphicsContext3D::polygonOffset):
3874         (WebCore::GraphicsContext3D::sampleCoverage):
3875         (WebCore::GraphicsContext3D::scissor):
3876         (WebCore::GraphicsContext3D::shaderSource):
3877         (WebCore::GraphicsContext3D::stencilFunc):
3878         (WebCore::GraphicsContext3D::stencilFuncSeparate):
3879         (WebCore::GraphicsContext3D::stencilMask):
3880         (WebCore::GraphicsContext3D::stencilMaskSeparate):
3881         (WebCore::GraphicsContext3D::stencilOp):
3882         (WebCore::GraphicsContext3D::stencilOpSeparate):
3883         (WebCore::GraphicsContext3D::texParameterf):
3884         (WebCore::GraphicsContext3D::texParameteri):
3885         (WebCore::GraphicsContext3D::uniform1f):
3886         (WebCore::GraphicsContext3D::uniform1fv):
3887         (WebCore::GraphicsContext3D::uniform2f):
3888         (WebCore::GraphicsContext3D::uniform2fv):
3889         (WebCore::GraphicsContext3D::uniform3f):
3890         (WebCore::GraphicsContext3D::uniform3fv):
3891         (WebCore::GraphicsContext3D::uniform4f):
3892         (WebCore::GraphicsContext3D::uniform4fv):
3893         (WebCore::GraphicsContext3D::uniform1i):
3894         (WebCore::GraphicsContext3D::uniform1iv):
3895         (WebCore::GraphicsContext3D::uniform2i):
3896         (WebCore::GraphicsContext3D::uniform2iv):
3897         (WebCore::GraphicsContext3D::uniform3i):
3898         (WebCore::GraphicsContext3D::uniform3iv):
3899         (WebCore::GraphicsContext3D::uniform4i):
3900         (WebCore::GraphicsContext3D::uniform4iv):
3901         (WebCore::GraphicsContext3D::uniformMatrix2fv):
3902         (WebCore::GraphicsContext3D::uniformMatrix3fv):
3903         (WebCore::GraphicsContext3D::uniformMatrix4fv):
3904         (WebCore::GraphicsContext3D::useProgram):
3905         (WebCore::GraphicsContext3D::validateProgram):
3906         (WebCore::GraphicsContext3D::vertexAttrib1f):
3907         (WebCore::GraphicsContext3D::vertexAttrib1fv):
3908         (WebCore::GraphicsContext3D::vertexAttrib2f):
3909         (WebCore::GraphicsContext3D::vertexAttrib2fv):
3910         (WebCore::GraphicsContext3D::vertexAttrib3f):
3911         (WebCore::GraphicsContext3D::vertexAttrib3fv):
3912         (WebCore::GraphicsContext3D::vertexAttrib4f):
3913         (WebCore::GraphicsContext3D::vertexAttrib4fv):