Remove required setting for libAccessibility.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2020-03-09  Andres Gonzalez  <andresg_22@apple.com>
2
3         Remove required setting for libAccessibility.
4         https://bugs.webkit.org/show_bug.cgi?id=208836
5         <rdar://problem/60227703>
6
7         Reviewed by Chris Fleizach.
8
9         Made libAccessibility an optional library for Webcore since
10         accessibility is soft linking it.
11
12         * WebCore.xcodeproj/project.pbxproj:
13
14 2020-03-09  Chris Dumez  <cdumez@apple.com>
15
16         Unreviewed, drop forward declaration that is no longer needed after r258159.
17
18         * xml/XMLHttpRequestProgressEventThrottle.h:
19
20 2020-03-09  Chris Dumez  <cdumez@apple.com>
21
22         Align garbage collection for XMLHttpRequest objects with the specification
23         https://bugs.webkit.org/show_bug.cgi?id=208481
24
25         Reviewed by Ryosuke Niwa.
26
27         Align garbage collection for XMLHttpRequest objects with the specification:
28         - https://xhr.spec.whatwg.org/#garbage-collection
29
30         We now override ActiveDOMObject::hasPendingActivity() to match exactly the text
31         in the specification:
32         """
33         An XMLHttpRequest object must not be garbage collected if its state is either
34         opened with the send() flag set, headers received, or loading, and it has one or
35         more event listeners registered whose type is one of readystatechange, progress,
36         abort, error, load, timeout, and loadend.
37         """
38
39         Previously, we were trying to implement this behavior with ActiveDOMObject's
40         setPendingActivity() / unsetPendingActivity() but this was error and leak prone.
41         It was also keeping the JS wrapper alive too long in the cases where the JS
42         does not have any event listeners. If the JS has not event listeners, then we
43         can collect the JS wrapper, we just need to keep the implementation
44         XMLHttpRequest object for the duration of the load.
45
46         No new tests, covered by existing test such as:
47         fast/xmlhttprequest/xmlhttprequest-gc.html
48
49         * dom/EventTarget.cpp:
50         (WebCore::EventTarget::addEventListener):
51         (WebCore::EventTarget::removeEventListener):
52         (WebCore::EventTarget::removeAllEventListeners):
53         * dom/EventTarget.h:
54         (WebCore::EventTarget::eventListenersDidChange):
55         * xml/XMLHttpRequest.cpp:
56         (WebCore::XMLHttpRequest::XMLHttpRequest):
57         (WebCore::XMLHttpRequest::changeState):
58         (WebCore::XMLHttpRequest::open):
59         (WebCore::XMLHttpRequest::prepareToSend):
60         (WebCore::XMLHttpRequest::createRequest):
61         (WebCore::XMLHttpRequest::abort):
62         (WebCore::XMLHttpRequest::internalAbort):
63         (WebCore::XMLHttpRequest::networkError):
64         (WebCore::XMLHttpRequest::didFail):
65         (WebCore::XMLHttpRequest::didFinishLoading):
66         (WebCore::XMLHttpRequest::didReachTimeout):
67         (WebCore::XMLHttpRequest::contextDestroyed):
68         (WebCore::XMLHttpRequest::eventListenersDidChange):
69         (WebCore::XMLHttpRequest::hasPendingActivity const):
70         * xml/XMLHttpRequest.h:
71         * xml/XMLHttpRequestProgressEventThrottle.cpp:
72         (WebCore::XMLHttpRequestProgressEventThrottle::XMLHttpRequestProgressEventThrottle):
73         (WebCore::XMLHttpRequestProgressEventThrottle::dispatchEventWhenPossible):
74         (WebCore::XMLHttpRequestProgressEventThrottle::suspend):
75         (WebCore::XMLHttpRequestProgressEventThrottle::resume):
76         * xml/XMLHttpRequestProgressEventThrottle.h:
77
78 2020-03-09  Wenson Hsieh  <wenson_hsieh@apple.com>
79
80         Creating paths that are single-segment bezier or quad curves should not require a CGPath allocation
81         https://bugs.webkit.org/show_bug.cgi?id=208812
82
83         Reviewed by Tim Horton.
84
85         Extend the inline path data mechanism introduced in r258118 to encompass two more cases of simple path objects:
86         single-segment quad and bezier curves. In these scenarios, we can simply store the start point, end point, and
87         one or two control points (respectively). See below for more details; there should be no change in behavior.
88
89         * platform/graphics/InlinePathData.h:
90
91         Add the new inline path data types to the variant. Note that does not increase the size of the InlinePathData
92         variant, nor does it increase the size of Path, since the variant is already 32 bytes large due to ArcData.
93
94         (WebCore::QuadCurveData::encode const):
95         (WebCore::QuadCurveData::decode):
96         (WebCore::BezierCurveData::encode const):
97         (WebCore::BezierCurveData::decode):
98
99         Add encoders and decoders for QuadCurveData and BezierCurveData.
100
101         * platform/graphics/Path.cpp:
102         (WebCore::Path::apply const):
103
104         In the cases where we have quad and bezier curves, we can apply the path without having to fall back to
105         allocating a platform path object.
106
107         (WebCore::Path::currentPoint const):
108
109         Return endPoint in both of the new inline curve cases.
110
111         (WebCore::Path::elementCount const):
112
113         Return 2 in both of the new cases.
114
115         (WebCore::Path::addQuadCurveTo):
116         (WebCore::Path::addBezierCurveTo):
117
118         If the path is null (we haven't modified anything yet) or the path was only moved to some location, stuff
119         information about the quad or bezier curve into inline data on Path and avoid creating a CGPath on CoreGraphics
120         platforms (and other types of platform paths elsewhere).
121
122         * platform/graphics/Path.h:
123         * platform/graphics/cairo/PathCairo.cpp:
124         (WebCore::Path::addQuadCurveToSlowCase):
125         (WebCore::Path::addBezierCurveToSlowCase):
126         (WebCore::Path::addQuadCurveTo): Deleted.
127         (WebCore::Path::addBezierCurveTo): Deleted.
128         * platform/graphics/cg/PathCG.cpp:
129         (WebCore::Path::createCGPath const):
130         (WebCore::Path::addQuadCurveToSlowCase):
131         (WebCore::Path::addBezierCurveToSlowCase):
132
133         Add -SlowCase suffixes to these methods, and move the main implementation of addQuadCurve and addBezierCurve
134         into platform-agnostic code in Path.cpp where we update the inline path data and bail early if appropriate, and
135         otherwise fall back to addQuadCurveToSlowCase or addBezierCurveToSlowCase.
136
137         (WebCore::Path::addQuadCurveTo): Deleted.
138         (WebCore::Path::addBezierCurveTo): Deleted.
139         * platform/graphics/win/PathDirect2D.cpp:
140         (WebCore::Path::addQuadCurveToSlowCase):
141         (WebCore::Path::addBezierCurveToSlowCase):
142         (WebCore::Path::addQuadCurveTo): Deleted.
143         (WebCore::Path::addBezierCurveTo): Deleted.
144
145 2020-03-09  Antoine Quint  <graouts@apple.com>
146
147         Remove the compile-time flag for Pointer Events
148         https://bugs.webkit.org/show_bug.cgi?id=208821
149         <rdar://problem/60223471>
150
151         Reviewed by Dean Jackson.
152
153         * Configurations/FeatureDefines.xcconfig:
154         * css/CSSComputedStyleDeclaration.cpp:
155         (WebCore::touchActionFlagsToCSSValue):
156         (WebCore::ComputedStyleExtractor::valueForPropertyInStyle):
157         * css/CSSPrimitiveValueMappings.h:
158         (WebCore::CSSPrimitiveValue::operator OptionSet<TouchAction> const):
159         * css/CSSProperties.json:
160         * css/CSSValueKeywords.in:
161         * css/parser/CSSPropertyParser.cpp:
162         (WebCore::consumeTouchAction):
163         (WebCore::CSSPropertyParser::parseSingleValue):
164         * dom/Document.cpp:
165         (WebCore::Document::prepareMouseEvent):
166         (WebCore::Document::invalidateRenderingDependentRegions):
167         * dom/Document.h:
168         * dom/Element.cpp:
169         (WebCore::dispatchPointerEventIfNeeded):
170         (WebCore::Element::allowsDoubleTapGesture const):
171         (WebCore::Element::removedFromAncestor):
172         * dom/Element.h:
173         * dom/Element.idl:
174         * dom/EventNames.in:
175         * dom/NavigatorMaxTouchPoints.idl:
176         * dom/PointerEvent.cpp:
177         * dom/PointerEvent.h:
178         * dom/PointerEvent.idl:
179         * dom/ios/PointerEventIOS.cpp:
180         * page/EventHandler.cpp:
181         (WebCore::EventHandler::pointerCaptureElementDidChange):
182         (WebCore::EventHandler::prepareMouseEvent):
183         * page/EventHandler.h:
184         * page/Navigator.h:
185         * page/Page.cpp:
186         (WebCore::Page::Page):
187         (WebCore::Page::didChangeMainDocument):
188         * page/Page.h:
189         (WebCore::Page::inspectorController const):
190         (WebCore::Page::pointerCaptureController const):
191         * page/PointerCaptureController.cpp:
192         * page/PointerCaptureController.h:
193         * page/PointerLockController.cpp:
194         (WebCore::PointerLockController::requestPointerLock):
195         * platform/TouchAction.h:
196         * rendering/EventRegion.cpp:
197         (WebCore::EventRegion::operator== const):
198         (WebCore::EventRegion::unite):
199         (WebCore::EventRegion::translate):
200         (WebCore::operator<<):
201         * rendering/EventRegion.h:
202         (WebCore::EventRegion::encode const):
203         (WebCore::EventRegion::decode):
204         * rendering/RenderBlock.cpp:
205         (WebCore::RenderBlock::paintObject):
206         * rendering/RenderElement.cpp:
207         (WebCore::RenderElement::styleWillChange):
208         * rendering/RenderLayer.cpp:
209         (WebCore::RenderLayer::calculateClipRects const):
210         * rendering/RenderLayerBacking.cpp:
211         (WebCore::RenderLayerBacking::updateEventRegion):
212         (WebCore::patternForTouchAction):
213         (WebCore::RenderLayerBacking::paintDebugOverlays):
214         * rendering/style/RenderStyle.h:
215         (WebCore::RenderStyle::effectiveTouchActions const):
216         (WebCore::RenderStyle::setEffectiveTouchActions):
217         (WebCore::RenderStyle::initialTouchActions):
218         * rendering/style/StyleRareInheritedData.cpp:
219         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
220         (WebCore::StyleRareInheritedData::operator== const):
221         * rendering/style/StyleRareInheritedData.h:
222         * rendering/style/StyleRareNonInheritedData.cpp:
223         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
224         (WebCore::StyleRareNonInheritedData::operator== const):
225         * rendering/style/StyleRareNonInheritedData.h:
226         * style/StyleAdjuster.cpp:
227         (WebCore::Style::isScrollableOverflow):
228         (WebCore::Style::computeEffectiveTouchActions):
229         (WebCore::Style::Adjuster::adjust const):
230         * style/StyleBuilderConverter.h:
231         (WebCore::Style::BuilderConverter::convertTouchAction):
232         * style/StyleTreeResolver.cpp:
233         (WebCore::Style::TreeResolver::resolveElement):
234
235 2020-03-09  Rob Buis  <rbuis@igalia.com>
236
237         Rename urlSelected to changeLocation
238         https://bugs.webkit.org/show_bug.cgi?id=208529
239
240         Reviewed by Darin Adler.
241
242         Rename urlSelected to changeLocation and remove the existing
243         changeLocation. The name changeLocation is more intuitive
244         than urlSelected.
245
246         No new tests -- no new or changed functionality.
247
248         * html/HTMLAnchorElement.cpp:
249         (WebCore::HTMLAnchorElement::handleClick):
250         * html/HTMLLinkElement.cpp:
251         (WebCore::HTMLLinkElement::handleClick):
252         * loader/FrameLoader.cpp:
253         (WebCore::FrameLoader::changeLocation):
254         (WebCore::FrameLoader::urlSelected): Deleted.
255         * loader/FrameLoader.h:
256         * loader/NavigationScheduler.cpp:
257         * mathml/MathMLElement.cpp:
258         (WebCore::MathMLElement::defaultEventHandler):
259         * svg/SVGAElement.cpp:
260         (WebCore::SVGAElement::defaultEventHandler):
261
262 2020-03-09  youenn fablet  <youenn@apple.com>
263
264         Log error in clearNowPlayingInfo/setNowPlayingInfo
265         https://bugs.webkit.org/show_bug.cgi?id=208805
266
267         Reviewed by Eric Carlson.
268
269         No change of behavior.
270
271         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
272         (MediaSessionManagerCocoa::clearNowPlayingInfo):
273         (MediaSessionManagerCocoa::setNowPlayingInfo):
274
275 2020-03-09  Zalan Bujtas  <zalan@apple.com>
276
277         [LFC][IFC] Do not floor the computed intrinsic width values
278         https://bugs.webkit.org/show_bug.cgi?id=208796
279         <rdar://problem/60209522>
280
281         Reviewed by Antti Koivisto.
282
283         Floored intrinsic values could lead to unexpected line breaks.
284         (This happens because IFC uses float currently, while other layout systems use LayoutUnit.)
285
286         Test: fast/layoutformattingcontext/absolute-positioned-simple-table3.html
287
288         * layout/LayoutUnits.h:
289         (WebCore::Layout::ceiledLayoutUnit):
290         * layout/inlineformatting/InlineFormattingContext.cpp:
291         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints):
292         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
293         * layout/inlineformatting/InlineFormattingContext.h:
294
295 2020-03-09  Zalan Bujtas  <zalan@apple.com>
296
297         [LFC][TFC] Do no try to distribute extra space in case of shrink to fit (max preferred width).
298         https://bugs.webkit.org/show_bug.cgi?id=208795
299         <rdar://problem/60208329>
300
301         Reviewed by Antti Koivisto.
302
303         When we shrink-to-fit the table and it isn't constrained by the containing block's width, we
304         should use the maximum width instead of trying to distribute the space.
305
306         * layout/tableformatting/TableFormattingContext.cpp:
307         (WebCore::Layout::TableFormattingContext::layoutInFlowContent):
308         (WebCore::Layout::TableFormattingContext::layoutTableCellBox):
309         (WebCore::Layout::TableFormattingContext::computeAndDistributeExtraHorizontalSpace):
310         * layout/tableformatting/TableFormattingContext.h:
311
312 2020-03-07  Darin Adler  <darin@apple.com>
313
314         Begin moving off of live ranges for WebKit internals
315         https://bugs.webkit.org/show_bug.cgi?id=208432
316
317         Reviewed by Daniel Bates.
318
319         The DOM Range class is a live range. The live updating feature of these ranges mean
320         they are expensive to create and destroy and also make all DOM mutation more expensive
321         while they are alive. We will be able to speed up, likely measurable on Speedometer,
322         if we can cut down uses of live ranges.
323
324         - Refactored the StaticRange class to create two new structs.
325         - The BoundaryPoint struct implements what the DOM standard calls a boundary point:
326           a node and offset. Similar to the RangeBoundaryPoint class, which supports
327           being the boundary point of a live range, but simpler and not live.
328         - The SimpleRange struct implements what the DOM standard calls a range (not a live
329           range). Like StaticRange but without reference counting and DOM binding.
330         - Since StaticRange is derived publicly from SimpleRange you can pass either to any
331           function that takes a SimpleRange. And since there is a constructor to create a
332           SimpleRange from a Range you can pass a Range to those functions too.
333         - Renamed StaticRange::createFromRange to StaticRange::create.
334
335         * Headers.cmake: Added BoundaryPoint.h, SimpleRange.h, and StaticRange.h.
336         * Sources.txt: Added BoundaryPoint.cpp and SimpleRange.cpp.
337         * WebCore.xcodeproj/project.pbxproj: Added BoundaryPoint.cpp/h and SimpleRange.cpp/h.
338
339         * dom/BoundaryPoint.cpp: Added.
340         * dom/BoundaryPoint.h: Added.
341         * dom/SimpleRange.cpp: Added.
342         * dom/SimpleRange.h: Added.
343
344         * dom/StaticRange.cpp:
345         (WebCore::StaticRange::StaticRange): Take an rvalue reference to a SimpleRange.
346         (WebCore::StaticRange::create): Ditto. Changed the other overloads to create
347         a SimpleRange first then call through to the main one.
348         (WebCore::isDocumentTypeOrAttr): Wrote a much more efficient version of this.
349         The old version called the virtual function nodeType twice. This calls it at
350         most once, and mostly doesn't call it at all.
351         * dom/StaticRange.h: Simplified this class, putting most of the actual range
352         logic into the base class. Note that this change eliminated the peculiar code
353         that in the == operator that compared nodes using isEqualNode instead of using
354         node identity. There was no one who needed that other behavior. Also fixed
355         mistaken use of unsigned long in StaticRange::Init. It's unsigned long in
356         the IDL file, but confusingly that's just unsigned in .cpp files.
357
358         * dom/StaticRange.idl: Tweaked formatting.
359
360         * editing/CompositeEditCommand.cpp:
361         (WebCore::CompositeEditCommand::targetRanges const): Updated for rename
362         of StaticRange::create.
363         * editing/ReplaceRangeWithTextCommand.cpp:
364         (WebCore::ReplaceRangeWithTextCommand::doApply): Updated since VisibleSelection
365         takes SimpleRange now.
366         (WebCore::ReplaceRangeWithTextCommand::targetRanges const): Updated for
367         rename of StaticRange::create.
368         * editing/SpellingCorrectionCommand.cpp:
369         (WebCore::SpellingCorrectionCommand::SpellingCorrectionCommand): Updated
370         since a selection now takes a SimpleRange&, not a StaticRange.
371         (WebCore::SpellingCorrectionCommand::targetRanges const): Updated for
372         rename of StaticRange::create.
373         * editing/TypingCommand.cpp:
374         (WebCore::TypingCommand::willAddTypingToOpenCommand): Ditto.
375
376         * editing/VisibleSelection.cpp:
377         (WebCore::VisibleSelection::VisibleSelection): Use SimpleRange
378         instead of StaticRange and Range.
379         * editing/VisibleSelection.h: Updated for the above.
380
381         * editing/mac/EditorMac.mm: Added include.
382         * page/DragController.cpp: Ditto.
383         * page/TextIndicator.cpp: Ditto.
384         (WebCore::TextIndicator::createWithRange): Updated since VisibleSelection
385         takes SimpleRange now.
386
387         * page/mac/EventHandlerMac.mm:
388         (WebCore::InlineTextBox::collectMarkedTextsForHighlights): Tweaked coding
389         style a bit.
390
391 2020-03-08  Per Arne Vollan  <pvollan@apple.com>
392
393         Unreviewed, speculative link fix.
394
395         * platform/cocoa/UTTypeRecordSwizzler.mm:
396
397 2020-03-08  Per Arne Vollan  <pvollan@apple.com>
398
399         Unreviewed, speculative link fix.
400
401         * platform/cocoa/UTTypeRecordSwizzler.mm:
402
403 2020-03-08  Konstantin Tokarev  <annulen@yandex.ru>
404
405         [CMake] Unreviewed build fix for Mac port
406
407         * PlatformMac.cmake:
408
409 2020-03-08  Per Arne Vollan  <pvollan@apple.com>
410
411         [iOS] Mapping to UTI from tag and tag class should be performed in the UI process
412         https://bugs.webkit.org/show_bug.cgi?id=208783
413
414         Reviewed by Brent Fulgham.
415
416         This mapping should be done in the UI process, since it is using a system service that will no longer be available
417         in the WebContent process. To achieve this, the method +[UTTypeRecord typeRecordWithTagOverride] is swizzled in
418         the WebContent process, and is using the cached mapping sent from the UI process.
419
420         API test: WebKit.UTIFromTag
421
422         * WebCore.xcodeproj/project.pbxproj:
423         * platform/cocoa/UTTypeRecordSwizzler.h: Added.
424         (WebCore::UTTypeItem::encode const):
425         (WebCore::UTTypeItem::decode):
426         * platform/cocoa/UTTypeRecordSwizzler.mm: Added.
427         (-[WebUTTypeRecord setIdentifier:]):
428         (WebCore::vectorOfUTTypeRecords):
429         (WebCore::typeRecordWithTagOverride):
430         (WebCore::createVectorOfUTTypeItem):
431         (WebCore::setVectorOfUTTypeItem):
432         (WebCore::swizzleUTTypeRecord):
433         * platform/network/mac/UTIUtilities.h:
434         * platform/network/mac/UTIUtilities.mm:
435         (WebCore::UTIFromTag):
436         * testing/Internals.cpp:
437         (WebCore::Internals::getUTIFromTag):
438         * testing/Internals.h:
439         * testing/Internals.idl:
440         * testing/Internals.mm:
441         (WebCore::Internals::getUTIFromTag):
442
443 2020-03-08  Wenson Hsieh  <wenson_hsieh@apple.com>
444
445         Lazily generate CGPaths for some simple types of paths, such as arcs and lines
446         https://bugs.webkit.org/show_bug.cgi?id=208464
447         <rdar://problem/59963226>
448
449         Reviewed by Daniel Bates, Darin Adler and Tim Horton.
450
451         When the GPU process is enabled and used to render the canvas element, some canvas-related subtests in
452         MotionMark see significant performance regressions. One of the reasons for this is that in the process of
453         decoding display list items that contain `WebCore::Path`s in the GPU process, we end up allocating a new CGPath
454         for each WebCore::Path. This dramatically increases page demand and memory usage in the GPU process in contrast
455         to shipping WebKit, due to the fact that all of these CGPaths allocated up-front, and must all exist somewhere
456         in the heap upon decoding the display list.
457
458         In contrast, in shipping WebKit, each call to stroke the current canvas path (i.e. invoking
459         GraphicsContext::strokePath) is succeeded by clearing the path, which deallocates the CGPath backing the WebCore
460         Path. The next time a CGPath needs to be created, CoreGraphics is free to then allocate the new CGPath at the
461         address of the previous CGPath which was just destroyed, which prevents us from dirtying more pages than
462         necessary. This phenomenon affects most of the canvas-related MotionMark subtests to some degree, though the
463         impact is most noticeable with Canvas Lines.
464
465         On top of all this, a significant portion of time is also spent calling CGPathApply and converting the resulting
466         CGPathElements into serializable data when encoding each WebCore Path.
467
468         To mitigate these two issues and restore the wins we get from memory locality when drawing paths in large
469         quantities, we can:
470
471         1.  In the case of simple paths, stuff some information about how each path was created as inline data on
472             WebCore::Path itself, as a new data member. For now, this only encompasses lines, arcs, and moves (Paths
473             where only `Path::moveTo` was invoked), but may be expanded in the future to include ellipses and rects.
474             This allows us to achieve two things: (a) make encoding cheaper by not requiring a walk through all of
475             CGPath's elements, and (b) make decoding cheaper by just initializing the Path using inline data, rather
476             than having to create a new CGPath.
477
478         2.  When painting the StrokePath display list item, just discard `m_path` after we're done painting with it.
479             This, in conjunction with (1), means that the CGPath backing the WebCore::Path in the GPU process is only
480             created when we're just about to paint (i.e. when calling into strokePath()), and destroyed right after
481             we're done painting with it.
482
483         See below for details. There should be no change in behavior.
484
485         * Headers.cmake:
486         * WebCore.xcodeproj/project.pbxproj:
487         * platform/graphics/InlinePathData.h: Added.
488         (WebCore::MoveData::encode const):
489         (WebCore::MoveData::decode):
490         (WebCore::LineData::encode const):
491         (WebCore::LineData::decode):
492         (WebCore::ArcData::encode const):
493         (WebCore::ArcData::decode):
494
495         Introduce InlinePathData, a Variant of several different inline data types, each of which represents one simple
496         path type that is stored using only inline data. This includes line segments (a start point and an end point),
497         as well as arcs (which, in addition to a center and start and end angles) also includes an optional offset,
498         which represents the current position of the path at the time "addArc" was called.
499
500         For instance, in the following scenario, the path would have an arc that is offset by (100, 0); if filled, it
501         would result in a composite shape resembling a semicircle on top of a triangle:
502
503         path.moveTo(100, 0);
504         path.addArc(100, 100, 50, 0, PI, false);
505         context.fill(path);
506
507         When a Path is initialized (or after it is cleared), it starts off with neither a CGPath nor inline data. Moving
508         the path causes it to store inline MoveData; calling calling `addLineTo` or `addArc` then replaces the inline
509         data with either LineData or ArcData.
510
511         If, at any point, the path changes in a different way (i.e. neither line, arc, nor move), we clear out the
512         inline data and fall back to just representing the path data using the CGPath (m_path).
513
514         * platform/graphics/Path.cpp:
515
516         Refactor the following 10 methods: moveTo, addLineTo, addArc, isEmpty, currentPoint, apply, elementCount,
517         hasCurrentPoint, fastBoundingRect, and boundingRect such that their implementations are now in platform-agnostic
518         code in Path.cpp. Logic in this platform-agnostic code will generally attempt to use inline path data to compute
519         an answer (or apply the requested mutations) without having to initialize the platform path representation.
520         Failing this, we fall back to calling -SlowCase versions of these methods, which will exercise the appropriate
521         APIs on each platform.
522
523         (WebCore::Path::elementCountSlowCase const):
524         (WebCore::Path::apply const):
525         (WebCore::Path::isEmpty const):
526         (WebCore::Path::hasCurrentPoint const):
527         (WebCore::Path::currentPoint const):
528         (WebCore::Path::elementCount const):
529         (WebCore::Path::addArc):
530         (WebCore::Path::addLineTo):
531         (WebCore::Path::moveTo):
532
533         In the case of these three methods for mutating a path, if we've either only moved the path or haven't touched
534         it at all, we can get away with only updating our inline path data, and avoid creating a CGPath.
535
536         (WebCore::Path::boundingRect const):
537         (WebCore::Path::fastBoundingRect const):
538         (WebCore::Path::boundingRectFromInlineData const):
539         (WebCore::Path::polygonPathFromPoints):
540         * platform/graphics/Path.h:
541         (WebCore::Path::encode const):
542         (WebCore::Path::decode):
543
544         Teach Path::encode and Path::decode to respectively serialize and deserialize WebCore::Path by consulting only
545         the inline data, if it is present. For simple types of paths, this decreases the cost of both IPC encoding and
546         decoding, but adds a negligible amount of overhead in the case where the path is non-inline.
547
548         (WebCore::Path::hasInlineData const):
549         (WebCore::Path::hasAnyInlineData const):
550         (WebCore::Path::isNull const): Deleted.
551         * platform/graphics/cairo/PathCairo.cpp:
552         (WebCore::Path::isEmptySlowCase const):
553         (WebCore::Path::currentPointSlowCase const):
554         (WebCore::Path::moveToSlowCase):
555         (WebCore::Path::addLineToSlowCase):
556         (WebCore::Path::addArcSlowCase):
557         (WebCore::Path::boundingRectSlowCase const):
558         (WebCore::Path::applySlowCase const):
559         (WebCore::Path::fastBoundingRectSlowCase const):
560         (WebCore::Path::isNull const):
561         (WebCore::Path::isEmpty const): Deleted.
562         (WebCore::Path::hasCurrentPoint const): Deleted.
563         (WebCore::Path::currentPoint const): Deleted.
564         (WebCore::Path::moveTo): Deleted.
565         (WebCore::Path::addLineTo): Deleted.
566         (WebCore::Path::addArc): Deleted.
567         (WebCore::Path::boundingRect const): Deleted.
568         (WebCore::Path::apply const): Deleted.
569         * platform/graphics/cg/PathCG.cpp:
570         (WebCore::Path::createCGPath const):
571
572         Add a helper method that is invoked when the Path is asked for a CGPath. In this case, if there is inline data,
573         we need to lazily create the path and apply any inline path data we've accumulated. Once we're done applying the
574         inline data, set a flag (m_needsToApplyInlineData) to false to avoid re-applying inline data to the path.
575
576         (WebCore::Path::platformPath const):
577         (WebCore::Path::ensurePlatformPath):
578
579         When ensurePlatformPath is invoked, we are about to mutate our CGPath in such a way that it can't be expressed
580         in terms of inline data (at least, not with the changes in this patch). Clear out the inline path data in this
581         case, and apply the CGPath mutations that were previously stashed away in inline path data.
582
583         (WebCore::Path::isNull const):
584
585         A path is now considered null if it is not only missing a CGPath, but also does not have any inline path data.
586         This maintains the invariant that `isNull()` is true iff the `platformPath()` returns 0x0.
587
588         (WebCore::Path::Path):
589         (WebCore::Path::swap):
590
591         Update the constructors and `swap` helper method (used by assignment operators) to account for the new members.
592
593         (WebCore::Path::contains const):
594         (WebCore::Path::transform):
595         (WebCore::zeroRectIfNull):
596         (WebCore::Path::boundingRectSlowCase const):
597         (WebCore::Path::fastBoundingRectSlowCase const):
598         (WebCore::Path::moveToSlowCase):
599         (WebCore::Path::addLineToSlowCase):
600         (WebCore::Path::addArcSlowCase):
601         (WebCore::Path::clear):
602
603         When clearing Path, instead of setting `m_path` to a newly allocated CGPath, simply reset it to null. This
604         ensures that if we then apply some changes that can be expressed using only inline path data, we avoid having to
605         update the CGPath, and instead just update the inline path data.
606
607         (WebCore::Path::isEmptySlowCase const):
608         (WebCore::Path::currentPointSlowCase const):
609         (WebCore::Path::applySlowCase const):
610         (WebCore::Path::elementCountSlowCase const):
611         (WebCore::Path::boundingRect const): Deleted.
612         (WebCore::Path::fastBoundingRect const): Deleted.
613         (WebCore::Path::moveTo): Deleted.
614         (WebCore::Path::addLineTo): Deleted.
615         (WebCore::Path::addArc): Deleted.
616         (WebCore::Path::isEmpty const): Deleted.
617         (WebCore::Path::hasCurrentPoint const): Deleted.
618         (WebCore::Path::currentPoint const): Deleted.
619         (WebCore::Path::apply const): Deleted.
620         (WebCore::Path::elementCount const): Deleted.
621         * platform/graphics/displaylists/DisplayListItems.cpp:
622         (WebCore::DisplayList::StrokePath::apply const):
623
624         Throw out the current WebCore::Path after we're done painting with it (see (2) in the above ChangeLog entry).
625
626         * platform/graphics/displaylists/DisplayListItems.h:
627         * platform/graphics/win/PathDirect2D.cpp:
628         (WebCore::Path::boundingRectSlowCase const):
629         (WebCore::Path::fastBoundingRectSlowCase const):
630         (WebCore::Path::moveToSlowCase):
631         (WebCore::Path::addLineToSlowCase):
632         (WebCore::Path::addArcSlowCase):
633         (WebCore::Path::isEmptySlowCase const):
634         (WebCore::Path::currentPointSlowCase const):
635         (WebCore::Path::applySlowCase const):
636         (WebCore::Path::isNull const):
637         (WebCore::Path::boundingRect const): Deleted.
638         (WebCore::Path::fastBoundingRect const): Deleted.
639         (WebCore::Path::moveTo): Deleted.
640         (WebCore::Path::addLineTo): Deleted.
641         (WebCore::Path::addArc): Deleted.
642         (WebCore::Path::isEmpty const): Deleted.
643         (WebCore::Path::hasCurrentPoint const): Deleted.
644         (WebCore::Path::currentPoint const): Deleted.
645         (WebCore::Path::apply const): Deleted.
646
647 2020-03-08  Konstantin Tokarev  <annulen@yandex.ru>
648
649         [CMake] Some fixes for building Mac port
650         https://bugs.webkit.org/show_bug.cgi?id=208770
651
652         Reviewed by Don Olmstead.
653
654         * PlatformMac.cmake:
655
656 2020-03-08  Andres Gonzalez  <andresg_22@apple.com>
657
658         Implementation of AccessibilitySupport AXSIsolatedTreeMode.
659         https://bugs.webkit.org/show_bug.cgi?id=208691
660         <rdar://problem/60178602>
661
662         Reviewed by Chris Fleizach.
663
664         Honors the system AccessibilitySupport IsolatedTreeMode setting. The
665         system has three modes for IsolatedTree functionality: off, on on main
666         thread, and on on secondary thread.
667
668         * WebCore.xcodeproj/project.pbxproj:
669         * accessibility/AXObjectCache.cpp:
670         (WebCore::AXObjectCache::isolatedTreeFocusedObject):
671         (WebCore::AXObjectCache::focusedUIElementForPage):
672         (WebCore::AXObjectCache::isIsolatedTreeEnabled):
673         (WebCore::AXObjectCache::isolatedTreeRootObject):
674         (WebCore::AXObjectCache::canUseSecondaryAXThread):
675         * accessibility/AXObjectCache.h:
676         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
677         (-[WebAccessibilityObjectWrapperBase detach]):
678         (-[WebAccessibilityObjectWrapperBase axBackingObject]):
679         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
680         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
681
682 2020-03-08  Jer Noble  <jer.noble@apple.com>
683
684         Unreviewed watchOS build fix: add platform guards.
685
686         * platform/audio/ios/MediaSessionHelperIOS.mm:
687         (MediaSessionHelperiOS::startMonitoringWirelessRoutes):
688         (MediaSessionHelperiOS::stopMonitoringWirelessRoutes):
689
690 2020-03-08  Fujii Hironori  <Hironori.Fujii@sony.com>
691
692         generate-bindings-all.pl: "my" variable $fh masks earlier declaration in same scope
693         https://bugs.webkit.org/show_bug.cgi?id=208757
694
695         Reviewed by Yusuke Suzuki.
696
697         * bindings/scripts/generate-bindings-all.pl: Reuse $fh variable instead of defining new one.
698
699 2020-03-06  Jer Noble  <jer.noble@apple.com>
700
701         [GPUP] Move AVSystemController code into the GPU process
702         https://bugs.webkit.org/show_bug.cgi?id=208727
703
704         Reviewed by Eric Carlson.
705
706         Move AVSystemController code out of MediaSessionManageriOS and into a new
707         class MediaSessionHelper, which is currently iOS only. The abstract base class
708         will be overriden by WebKit in the WebContent process.
709
710         Drive-by fix: Don't call a virtual method (resetRestrictions()) from the constructor of a
711         virtual base class; the virtual function table hasn't been created yet, and the subclasses'
712         overridden methods won't be called. Move the call to post-creation.
713
714         * platform/audio/PlatformMediaSessionManager.cpp:
715         (WebCore::PlatformMediaSessionManager::sharedManager):
716         (WebCore::PlatformMediaSessionManager::PlatformMediaSessionManager):
717         * platform/audio/ios/MediaSessionHelperIOS.h: Added.
718         * platform/audio/ios/MediaSessionHelperIOS.mm: Copied from Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm.
719         (sharedHelperInstance):
720         (MediaSessionHelper::sharedHelper):
721         (MediaSessionHelper::resetSharedHelper):
722         (MediaSessionHelper::setSharedHelper):
723         (MediaSessionHelper::addClient):
724         (MediaSessionHelper::removeClient):
725         (MediaSessionHelperiOS::MediaSessionHelperiOS):
726         (MediaSessionHelperiOS::~MediaSessionHelperiOS):
727         (MediaSessionHelperiOS::providePresentingApplicationPID):
728         (MediaSessionHelperiOS::startMonitoringWirelessRoutes):
729         (MediaSessionHelperiOS::stopMonitoringWirelessRoutes):
730         (MediaSessionHelperiOS::carPlayServerDied):
731         (MediaSessionHelperiOS::updateCarPlayIsConnected):
732         (MediaSessionHelperiOS::setIsPlayingToAutomotiveHeadUnit):
733         (MediaSessionHelperiOS::activeAudioRouteDidChange):
734         (MediaSessionHelperiOS::activeVideoRouteDidChange):
735         (MediaSessionHelperiOS::receivedInterruption):
736         (MediaSessionHelperiOS::applicationDidBecomeActive):
737         (MediaSessionHelperiOS::applicationDidEnterBackground):
738         (MediaSessionHelperiOS::applicationWillBecomeInactive):
739         (MediaSessionHelperiOS::applicationWillEnterForeground):
740         (MediaSessionHelperiOS::externalOutputDeviceAvailableDidChange):
741         (-[WebMediaSessionHelper initWithCallback:]):
742         (-[WebMediaSessionHelper dealloc]):
743         (-[WebMediaSessionHelper clearCallback]):
744         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
745         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]):
746         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]):
747         (-[WebMediaSessionHelper interruption:]):
748         (-[WebMediaSessionHelper applicationWillEnterForeground:]):
749         (-[WebMediaSessionHelper applicationDidBecomeActive:]):
750         (-[WebMediaSessionHelper applicationWillResignActive:]):
751         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]):
752         (-[WebMediaSessionHelper applicationDidEnterBackground:]):
753         (-[WebMediaSessionHelper carPlayServerDied:]):
754         (-[WebMediaSessionHelper carPlayIsConnectedDidChange:]):
755         (-[WebMediaSessionHelper activeAudioRouteDidChange:]):
756         * platform/audio/ios/MediaSessionManagerIOS.h:
757         * platform/audio/ios/MediaSessionManagerIOS.mm:
758         (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
759         (WebCore::MediaSessionManageriOS::~MediaSessionManageriOS):
760         (WebCore::MediaSessionManageriOS::hasWirelessTargetsAvailable):
761         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
762         (WebCore::MediaSessionManageriOS::providePresentingApplicationPIDIfNecessary):
763         (WebCore::MediaSessionManageriOS::providePresentingApplicationPID):
764         (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
765         (WebCore::MediaSessionManageriOS::isPlayingToAutomotiveHeadUnitDidChange):
766         (WebCore::MediaSessionManageriOS::activeAudioRouteDidChange):
767         (WebCore::MediaSessionManageriOS::activeVideoRouteDidChange):
768         (WebCore::MediaSessionManageriOS::receivedInterruption):
769         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
770         (WebCore::MediaSessionManageriOS::applicationDidBecomeActive):
771         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
772         (WebCore::MediaSessionManageriOS::applicationWillBecomeInactive):
773         (WebCore::MediaSessionManageriOS::carPlayServerDied): Deleted.
774         (WebCore::MediaSessionManageriOS::updateCarPlayIsConnected): Deleted.
775         (-[WebMediaSessionHelper initWithCallback:]): Deleted.
776         (-[WebMediaSessionHelper dealloc]): Deleted.
777         (-[WebMediaSessionHelper clearCallback]): Deleted.
778         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Deleted.
779         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Deleted.
780         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Deleted.
781         (-[WebMediaSessionHelper interruption:]): Deleted.
782         (-[WebMediaSessionHelper applicationWillEnterForeground:]): Deleted.
783         (-[WebMediaSessionHelper applicationDidBecomeActive:]): Deleted.
784         (-[WebMediaSessionHelper applicationWillResignActive:]): Deleted.
785         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Deleted.
786         (-[WebMediaSessionHelper applicationDidEnterBackground:]): Deleted.
787         (-[WebMediaSessionHelper carPlayServerDied:]): Deleted.
788         (-[WebMediaSessionHelper carPlayIsConnectedDidChange:]): Deleted.
789         (-[WebMediaSessionHelper activeAudioRouteDidChange:]): Deleted.
790
791 2020-03-08  Andres Gonzalez  <andresg_22@apple.com>
792
793         Fix for LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html in IsolatedTree mode.
794         https://bugs.webkit.org/show_bug.cgi?id=208462
795         <rdar://problem/59980673>
796
797         Reviewed by Chris Fleizach.
798
799         Covered by LayoutTests/accessibility/mac/value-change/value-change-user-info-contenteditable.html.
800
801         - Updates the IsolatedTree on the TextStateChange notification.
802         - Renamed isAccessibilityScrollView to isAccessibilityScrollViewInstance
803         and used isScrollView instead everywhere it's appropriate. This makes
804         code like AXObjectCache::rootWebArea work for both AXObjects and IsolatedObjects.
805         - Moved several utility functions from WebAccessibilityObjectWrapperMac.mm
806         to AXObjectCacheMac.mm where they belong, so that they can be used by
807         AXObjectCache implementation in addition to by the wrapper.
808
809         * accessibility/AXObjectCache.cpp:
810         (WebCore::AXObjectCache::postTextStateChangeNotification):
811         (WebCore::AXObjectCache::rootWebArea):
812         * accessibility/AccessibilityObject.cpp:
813         (WebCore::AccessibilityObject::isOnScreen const):
814         (WebCore::AccessibilityObject::scrollToGlobalPoint const):
815         * accessibility/AccessibilityObject.h:
816         * accessibility/AccessibilityObjectInterface.h:
817         * accessibility/AccessibilityRenderObject.cpp:
818         (WebCore::AccessibilityRenderObject::getScrollableAreaIfScrollable const):
819         * accessibility/AccessibilityScrollView.h:
820         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
821         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
822         * accessibility/isolatedtree/AXIsolatedObject.cpp:
823         (WebCore::AXIsolatedObject::isAccessibilityScrollViewInstance const):
824         (WebCore::AXIsolatedObject::isAccessibilityScrollView const): Renamed.
825         * accessibility/isolatedtree/AXIsolatedObject.h:
826         * accessibility/mac/AXObjectCacheMac.mm:
827         (WebCore::AXObjectCache::postTextStateChangePlatformNotification): Uses
828         TextMarker utilities instead of calling into the wrapper. This fixes
829         the crash caused by the wrapper updating the backingObject that in turn
830         may change the wrapper.
831         (WebCore::AXTextMarkerRange): Moved from WebAccessibilityObjectWrapperMac.mm.
832         (WebCore::textMarkerRangeFromMarkers): Moved from WebAccessibilityObjectWrapperMac.mm.
833         (WebCore::textMarkerForVisiblePosition): Moved from WebAccessibilityObjectWrapperMac.mm.
834         (WebCore::textMarkerRangeFromVisiblePositions): Moved from WebAccessibilityObjectWrapperMac.mm.
835         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
836         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
837         (AXTextMarkerRange): Moved.
838         (textMarkerForVisiblePosition): Moved.
839         (textMarkerRangeFromMarkers): Moved.
840         (textMarkerRangeFromVisiblePositions): Moved.
841
842 2020-03-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
843
844         Canvas drawing commands have to be flushed to the GPUProcess in batches
845         https://bugs.webkit.org/show_bug.cgi?id=208597
846
847         Reviewed by Myles C. Maxfield.
848
849         Make DisplayList::ImageBuffer an observer of DisplayList::Recorder.
850         It can track adding an item to the recoded DisplayList.
851
852         * platform/graphics/displaylists/DisplayListDrawingContext.cpp:
853         (WebCore::DisplayList::DrawingContext::DrawingContext):
854         * platform/graphics/displaylists/DisplayListDrawingContext.h:
855         * platform/graphics/displaylists/DisplayListImageBuffer.h:
856         (WebCore::DisplayList::ImageBuffer::ImageBuffer):
857         * platform/graphics/displaylists/DisplayListRecorder.cpp:
858         (WebCore::DisplayList::Recorder::Recorder):
859         (WebCore::DisplayList::Recorder::willAppendItem):
860         * platform/graphics/displaylists/DisplayListRecorder.h:
861         (WebCore::DisplayList::Recorder::Observer::~Observer):
862         (WebCore::DisplayList::Recorder::Observer::willAppendItem):
863
864 2020-03-08  Konstantin Tokarev  <annulen@yandex.ru>
865
866         [GTK] Fix compilation with disabled OpenGL
867         https://bugs.webkit.org/show_bug.cgi?id=208773
868
869         Reviewed by Yusuke Suzuki.
870
871         * html/OffscreenCanvas.h:
872
873 2020-03-07  Brent Fulgham  <bfulgham@apple.com>
874
875         Create a flag to disable in-app browser quirks
876         https://bugs.webkit.org/show_bug.cgi?id=208777
877         <rdar://problem/60062197>
878
879         Reviewed by Simon Fraser.
880
881         This patch makes the following changes:
882
883         1. Adds a new flag 'NeedsInAppBrowserPrivacyQuirks' to allow quirks to be toggled
884            during testing.
885         2. Reclassify this new flag, and the existing 'InAppBrowserPrivacyEnabled' flag from 
886            'settings' to Internal Debug settings
887
888         The renamed flags are covered by existing tests.
889
890         * page/RuntimeEnabledFeatures.h:
891         (WebCore::RuntimeEnabledFeatures::setNeedsInAppBrowserPrivacyQuirks):
892         (WebCore::RuntimeEnabledFeatures::needsInAppBrowserPrivacyQuirks const):
893         * page/Settings.yaml:
894
895 2020-03-07  Jer Noble  <jer.noble@apple.com>
896
897         [GPUP] Implement Legacy EME API in the GPU Process
898         https://bugs.webkit.org/show_bug.cgi?id=208402
899
900         Reviewed by Eric Carlson.
901
902         Prepare for running the LegacyCDM et. al. in the GPU process.
903
904         Slightly modernize LegacyCDM to allow all methods representaing a LegacyCDMFactory to be WTF::Functions.
905
906         Allow the list of registered factories to be cleared and reset at runtime.
907
908         Modify WebKitMediaKeys to notify the MediaPlayer when the keys object is added to a HTMLMediaElement.
909
910         Expose the pointer to the internal CDMPrivateInterface for use in WebKit.
911
912         * Modules/encryptedmedia/legacy/LegacyCDM.cpp:
913         (WebCore::LegacyCDM::platformRegisterFactories):
914         (WebCore::installedCDMFactories):
915         (WebCore::LegacyCDM::registerCDMFactory):
916         (WebCore::LegacyCDMFactoryForKeySystem):
917         (WebCore::LegacyCDM::supportsKeySystem):
918         (WebCore::LegacyCDM::keySystemSupportsMimeType):
919         (WebCore::LegacyCDM::LegacyCDM):
920         (WebCore::LegacyCDM::createSession):
921         * Modules/encryptedmedia/legacy/LegacyCDM.h:
922         * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
923         (WebCore::WebKitMediaKeys::setMediaElement):
924         * WebCore.xcodeproj/project.pbxproj:
925         * html/HTMLMediaElement.cpp:
926         (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
927         * platform/graphics/LegacyCDMSession.h:
928         * platform/graphics/MediaPlayer.cpp:
929         (WebCore::MediaPlayer::setCDM):
930         * platform/graphics/MediaPlayer.h:
931         * platform/graphics/MediaPlayerPrivate.h:
932         (WebCore::MediaPlayerPrivateInterface::setCDM):
933
934 2020-03-07  Jer Noble  <jer.noble@apple.com>
935
936         [GPUP] LayoutTest debug assertion crashes: InitDataRegistry::registerInitDataType() called mulitple times with same type
937         https://bugs.webkit.org/show_bug.cgi?id=208765
938
939         Reviewed by Simon Fraser.
940
941         Wrap calls to registerInitDataType() in a std::call_once, to ensure it's not called muliple times when
942         platformRegisterFactories() is called multiple times.
943
944         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
945         (WebCore::CDMFactory::platformRegisterFactories):
946
947 2020-03-07  Simon Fraser  <simon.fraser@apple.com>
948
949         Generalize setSynchronousScrollingReasons() to take a ScrollingNodeID
950         https://bugs.webkit.org/show_bug.cgi?id=208774
951
952         Reviewed by Zalan Bujtas.
953
954         We'll be calling setSynchronousScrollingReasons() for overflow nodes at some point,
955         so change the argument from FrameView to ScrollingNodeID.
956
957         * page/scrolling/AsyncScrollingCoordinator.cpp:
958         (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
959         * page/scrolling/AsyncScrollingCoordinator.h:
960         * page/scrolling/ScrollingCoordinator.cpp:
961         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
962         * page/scrolling/ScrollingCoordinator.h:
963         (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):
964
965 2020-03-07  Andres Gonzalez  <andresg_22@apple.com>
966
967         REGRESSION: (r257760?) [ Mac wk2 Debug ] ASSERTION FAILED: child->parentObject() == this in WebCore::AccessibilityObject::insertChild
968         https://bugs.webkit.org/show_bug.cgi?id=208648
969
970         Reviewed by Chris Fleizach.
971
972         [WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions] must
973         not update the backing store but instead just get the backing object.
974
975         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
976         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
977
978 2020-03-07  Ryosuke Niwa  <rniwa@webkit.org>
979
980         TextManipulationController should work with ARIA labels
981         https://bugs.webkit.org/show_bug.cgi?id=208759
982
983         Reviewed by Wenson Hsieh.
984
985         This patch makes TextManipulationController work with a few ARIA content attributes.
986
987         It also makes observeParagraphs observe content across the entire document since canonicalizing
988         the starting position can end up skipping some content with ARIA.
989
990         Tests: TextManipulation.StartTextManipulationFindAttributeContent
991                TextManipulation.CompleteTextManipulationShouldReplaceAttributeContent
992
993         * editing/TextManipulationController.cpp:
994         (WebCore::TextManipulationController::startObservingParagraphs): Now takes two Positions instead
995         of two VisiblePositions.
996         (WebCore::isAttributeForTextManipulation): Added.
997         (WebCore::TextManipulationController::observeParagraphs): Added the code to find elements with
998         ARIA attributes and a few other elements that don't generate RenderObject's.
999         (WebCore::TextManipulationController::scheduleObservartionUpdate):
1000         (WebCore::TextManipulationController::addItem): Now takes ManipulationItemData instead of indivisual
1001         fields in it.
1002         (WebCore::TextManipulationController::replace): Added the logic to handle ManipulationItemData
1003         that specify element and attributeName.
1004         * editing/TextManipulationController.h:
1005         (WebCore::TextManipulationController::ManipulationItemData): Added element and attributeName.
1006
1007 2020-03-07  Megan Gardner  <megan_gardner@apple.com>
1008
1009         Adopt UIContextMenu for WKFileUploadPanel
1010         https://bugs.webkit.org/show_bug.cgi?id=208687
1011
1012         Reviewed by Tim Horton.
1013
1014         New string, no tests needed.
1015
1016         * en.lproj/Localizable.strings:
1017
1018 2020-03-07  Daniel Bates  <dabates@apple.com>
1019
1020         [iOS] Implement support for dictation alternatives
1021         https://bugs.webkit.org/show_bug.cgi?id=208720
1022         <rdar://problem/58540114>
1023
1024         Reviewed by Brent Fulgham.
1025
1026         Part 3
1027
1028         Separate code that is actually USE(AUTOCORRECTION_PANEL)-specific from code that can also
1029         be used when building with USE(DICTATION_ALTERNATIVES) enabled.
1030
1031         Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
1032         compiled for iOS. I will do that in a subsequent change once after all the code is in place
1033         to do so.
1034
1035         * SourcesCocoa.txt: Mark TextAlternativeWithRange.mm as @no-unify to fix build breakage when
1036         a unified source file includes both TextAlternativeWithRange.mm and a file that ultimately
1037         includes LengthBox.h (e.g. WebArchiveResourceFromNSAttributedString.mm). TextAlternativeWithRange.mm
1038         ultimately includes SFNTLayoutTypes.h, which defines a Fixed type that conflicts with enumerator
1039         Fixed (part of the LengthType enumeration) defined in Length.h. Ideally the LengthType enumeration
1040         would be an enum class or scoped to Length to avoid this ambiguity. This would be a big change to do
1041         and so for now I am fixing the build breakage using @no-unify.
1042         * WebCore.xcodeproj/project.pbxproj: Add TextAlternativeWithRange.mm to the project now that
1043         it is excluded from the unified build.
1044         * editing/AlternativeTextController.cpp:
1045         (WebCore::markerTypesForAppliedDictationAlternative):
1046         (WebCore::AlternativeTextController::alternativeTextClient):
1047         (WebCore::AlternativeTextController::markerDescriptionForAppliedAlternativeText):
1048         (WebCore::AlternativeTextController::applyAlternativeTextToRange):
1049         * editing/AlternativeTextController.h:
1050
1051 2020-03-07  Daniel Bates  <dabates@apple.com>
1052
1053         [iOS] Implement support for dictation alternatives
1054         https://bugs.webkit.org/show_bug.cgi?id=208720
1055         <rdar://problem/58540114>
1056
1057         Reviewed by Wenson Hsieh.
1058
1059         Part 2
1060
1061         Include UIKitSPI.h in TextAlternativeWithRange.mm to get the definition of NSTextAlternatives
1062         when building for iOS. Also while I am here, fix up some code style issues and use uniform
1063         initializer syntax.
1064
1065         Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
1066         compiled for iOS. I will do that in a subsequent change once after all the code is in place
1067         to do so.
1068
1069         * editing/mac/TextAlternativeWithRange.mm:
1070         (WebCore::TextAlternativeWithRange::TextAlternativeWithRange):
1071
1072 2020-03-07  Daniel Bates  <dabates@apple.com>
1073
1074         [iOS] Implement support for dictation alternatives
1075         https://bugs.webkit.org/show_bug.cgi?id=208720
1076         <rdar://problem/58540114>
1077
1078         Reviewed by Wenson Hsieh.
1079
1080         Part 1
1081
1082         Rename editing/mac/AlternativeTextUIController.{h, mm} to editing/cocoa/AlternativeTextUIController.{h, mm}
1083         as it can be shared by both Mac and iOS. I also took this opportunity to do some very minor modernization
1084         and cleanup to these files: use =default constructors and put the * on the right side for Objective-C types.
1085
1086         Note that I haven't enable USE_DICTATION_ALTERNATIVES on iOS. So, this code isn't being
1087         compiled for iOS. I will do that in a subsequent change once after all the code is in place
1088         to do so.
1089
1090         * SourcesCocoa.txt:
1091         * WebCore.xcodeproj/project.pbxproj:
1092         * editing/cocoa/AlternativeTextContextController.h:
1093         * editing/cocoa/AlternativeTextContextController.mm: Added.
1094         (WebCore::AlternativeTextContextController::addAlternatives):
1095         (WebCore::AlternativeTextContextController::alternativesForContext):
1096         (WebCore::AlternativeTextContextController::removeAlternativesForContext):
1097         (WebCore::AlternativeTextContextController::clear):
1098         * editing/cocoa/AlternativeTextUIController.h: Renamed from Source/WebCore/editing/mac/AlternativeTextUIController.h.
1099         * editing/cocoa/AlternativeTextUIController.mm: Renamed from Source/WebCore/editing/mac/AlternativeTextUIController.mm.
1100         (WebCore::AlternativeTextUIController::addAlternatives):
1101         (WebCore::AlternativeTextUIController::alternativesForContext):
1102         (WebCore::AlternativeTextUIController::clear):
1103         (WebCore::AlternativeTextUIController::showAlternatives):
1104         (WebCore::AlternativeTextUIController::handleAcceptedAlternative):
1105         (WebCore::AlternativeTextUIController::dismissAlternatives):
1106         (WebCore::AlternativeTextUIController::removeAlternatives):
1107
1108 2020-03-07  Fujii Hironori  <Hironori.Fujii@sony.com>
1109
1110         [CMake][Win] GenerateSettings.rb are invoked twice in WebCoreBindings.vcxproj and WebCoreTestSupportBindings.vcxproj
1111         https://bugs.webkit.org/show_bug.cgi?id=208771
1112
1113         Reviewed by Konstantin Tokarev.
1114
1115         CMake Visual Studio generator put a custom command of
1116         GenerateSettings.rb into both WebCoreBindings.vcxproj and
1117         WebCoreTestSupportBindings.vcxproj because both projects are
1118         using the generated files as source files. This causes
1119         unnecessary recompilation.
1120
1121         The fundamental issue of this bug was fixed in CMake 3.12.
1122         <https://gitlab.kitware.com/cmake/cmake/issues/16767>
1123         All Windows ports are using newer CMake for Visual Studio 2019
1124         support.
1125
1126         However, WebCoreTestSupportBindings needs to have a direct or
1127         indirect dependency to WebCoreBindings for CMake Visual Studio
1128         generator to eliminate duplicated custom commands. Otherwise,
1129         GenerateSettings.rb will be triggered in both projects.
1130
1131         * CMakeLists.txt: Added a explicit dependency to WebCoreBindings
1132         for WebCoreTestSupportBindings.
1133         * WebCoreMacros.cmake: Removed stale comment.
1134
1135 2020-03-07  Eric Carlson  <eric.carlson@apple.com>
1136
1137         Implement setWirelessPlaybackTarget, performTaskAtMediaTime, and wouldTaintOrigin in GPUProcess
1138         https://bugs.webkit.org/show_bug.cgi?id=208651
1139         <rdar://problem/60088298>
1140
1141         Reviewed by Youenn Fablet.
1142
1143         * html/HTMLMediaElement.cpp:
1144         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Remove unused lambda parameter.
1145
1146         * platform/graphics/MediaPlayer.cpp:
1147         (WebCore::MediaPlayer::performTaskAtMediaTime): Make MediaTime parameter const ref
1148         so it isn't copied.
1149         * platform/graphics/MediaPlayer.h:
1150
1151         * platform/graphics/MediaPlayerPrivate.h:
1152         (WebCore::MediaPlayerPrivateInterface::performTaskAtMediaTime): Ditto.
1153
1154         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1155         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1156         (WebCore::MediaPlayerPrivateAVFoundationObjC::performTaskAtMediaTime): Ditto.
1157
1158         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1159         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1160         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::performTaskAtMediaTime): Ditto.
1161
1162         * platform/graphics/avfoundation/objc/VideoLayerManagerObjC.mm:
1163         (WebCore::VideoLayerManagerObjC::setVideoFullscreenLayer): Don't set inline image
1164         contents if image is NULL.
1165
1166 2020-03-07  Brady Eidson  <beidson@apple.com>
1167
1168         Add runtime flag for incremental PDF loading.
1169         https://bugs.webkit.org/show_bug.cgi?id=208763
1170
1171         Reviewed by Tim Horton.
1172
1173         * page/RuntimeEnabledFeatures.h:
1174         (WebCore::RuntimeEnabledFeatures::setIncrementalPDFLoadingEnabled):
1175         (WebCore::RuntimeEnabledFeatures::incrementalPDFLoadingEnabled const):
1176
1177 2020-03-07  Zalan Bujtas  <zalan@apple.com>
1178
1179         [LFC][Verification] Use the table wrapper box's offset when matching out-of-flow tables
1180         https://bugs.webkit.org/show_bug.cgi?id=208769
1181         <rdar://problem/60191322>
1182
1183         Reviewed by Antti Koivisto.
1184
1185         In LFC, an out-of-flow table initiates a wrapper table box (out-of-flow) and a child table box (in-flow).
1186         Apply the wrapper table box's offset, when matching the display and the render tree.
1187
1188         Test: fast/layoutformattingcontext/absolute-positioned-simple-table2.html
1189
1190         * layout/Verification.cpp:
1191         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
1192
1193 2020-03-07  Darin Adler  <darin@apple.com>
1194
1195         Make Editor::applyEditingStyleToBodyElement do things in a straightforward manner
1196         https://bugs.webkit.org/show_bug.cgi?id=208177
1197
1198         Reviewed by Wenson Hsieh.
1199
1200         * editing/Editor.cpp:
1201         (WebCore::Editor::applyEditingStyleToBodyElement const): Use Document::body and
1202         StyledElement::setInlineStyleProperty to apply styles to the body. The older code
1203         was looping over all body elements in the document, for no good reason, and using
1204         the CSS object model wrapper object for the styles, also for no good reason.
1205
1206 2020-03-05  Sam Weinig  <weinig@apple.com>
1207
1208         Move JavaScriptCore related feature defines from FeatureDefines.xcconfig to PlatformEnableCocoa.h
1209         https://bugs.webkit.org/show_bug.cgi?id=207436
1210         <rdar://problem/59296762>
1211
1212         Reviewed by Darin Adler.
1213
1214         * Configurations/FeatureDefines.xcconfig:
1215         Remove JSC related defines.
1216
1217 2020-03-07  Chris Fleizach  <cfleizach@apple.com>
1218
1219         AX: Provide a way to run tests in isolated tree mode
1220         https://bugs.webkit.org/show_bug.cgi?id=208629
1221         <rdar://problem/60075583>
1222
1223         Reviewed by Ryosuke Niwa.
1224
1225         Now that we have a way to run this with tests, we don't need to allow usage for an unknown client.
1226
1227         * accessibility/AXObjectCache.cpp:
1228         (WebCore::AXObjectCache::clientSupportsIsolatedTree):
1229
1230 2020-03-07  Zalan Bujtas  <zalan@apple.com>
1231
1232         [LFC][IFC] Use start-aligned horizontal adjustment when justify is not eligible.
1233         https://bugs.webkit.org/show_bug.cgi?id=208762
1234         <rdar://problem/60188433>
1235
1236         Reviewed by Antti Koivisto.
1237
1238         Make sure we apply "text-align: start" when "text-align: justify" is not eligible.
1239         Currently "text-align: start" is a no-op, so no chnange in functionality (this might change in the future).
1240
1241         * layout/inlineformatting/InlineLineBuilder.cpp:
1242         (WebCore::Layout::LineBuilder::alignHorizontally):
1243         (WebCore::Layout::LineBuilder::removeTrailingTrimmableContent):
1244         * layout/inlineformatting/InlineLineBuilder.h:
1245         (WebCore::Layout::LineBuilder::isTextAlignJustify const): Deleted.
1246         (WebCore::Layout::LineBuilder::isTextAlignRight const): Deleted.
1247
1248 2020-03-07  Zalan Bujtas  <zalan@apple.com>
1249
1250         [LFC][IFC] Do not text-align: justify the runs on the current line if they are followed by a forced break
1251         https://bugs.webkit.org/show_bug.cgi?id=208761
1252         <rdar://problem/59825136>
1253
1254         Reviewed by Antti Koivisto.
1255
1256         https://www.w3.org/TR/css-text-3/#text-align-property
1257         "Text is justified according to the method specified by the text-justify property,
1258         in order to exactly fill the line box. Unless otherwise specified by text-align-last,
1259         the last line before a forced break or the end of the block is start-aligned."
1260
1261         Test: fast/text/text-align-justify-and-forced-line-break.html
1262
1263         * layout/inlineformatting/InlineLineBuilder.cpp:
1264         (WebCore::Layout::LineBuilder::alignHorizontally):
1265
1266 2020-03-07  Konstantin Tokarev  <annulen@yandex.ru>
1267
1268         REGRESSION(r257975): [GTK][WPE] Build failure after a clean build
1269         https://bugs.webkit.org/show_bug.cgi?id=208711
1270
1271         Reviewed by Yusuke Suzuki.
1272
1273         Make sure that InternalSettingsGenerated,idl is generated before bindings
1274         generation starts.
1275
1276         Also, make IDL preprocessor die if specified IDL file is missing, instead
1277         of going on silently.
1278
1279         * CMakeLists.txt:
1280         * WebCoreMacros.cmake:
1281         * bindings/scripts/preprocess-idls.pl:
1282         (getFileContents):
1283
1284 2020-03-07  Andres Gonzalez  <andresg_22@apple.com>
1285
1286         AXIsolatedObject support for documentLinks.
1287         https://bugs.webkit.org/show_bug.cgi?id=208734
1288
1289         Reviewed by Chris Fleizach.
1290
1291         - Expose documentLinks through the AXCoreObject interface, so that
1292         wrapper code works for both AXObject and AXIsolatedObjects.
1293         - Struct NodeChange now retains wrapper which was causing crash as the
1294         wrapper was destroyed before it was attached to the IsolatedObject.
1295
1296         * accessibility/AccessibilityObject.h:
1297         * accessibility/AccessibilityObjectInterface.h:
1298         * accessibility/AccessibilityRenderObject.cpp:
1299         (WebCore::AccessibilityRenderObject::documentLinks):
1300         (WebCore::AccessibilityRenderObject::getDocumentLinks): Deleted.
1301         * accessibility/AccessibilityRenderObject.h:
1302         * accessibility/isolatedtree/AXIsolatedObject.cpp:
1303         (WebCore::AXIsolatedObject::initializeAttributeData):
1304         * accessibility/isolatedtree/AXIsolatedObject.h:
1305         * accessibility/isolatedtree/AXIsolatedTree.cpp:
1306         (WebCore::AXIsolatedTree::setFocusedNode):
1307         (WebCore::AXIsolatedTree::applyPendingChanges):
1308         * accessibility/isolatedtree/AXIsolatedTree.h:
1309         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1310         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1311
1312 2020-03-07  chris fleizach  <cfleizach@apple.com>
1313
1314         Unreviewed, rolling out r258047.
1315
1316         Referenced SPI not yet available for Safari builders.
1317
1318         Reverted changeset:
1319
1320         "Implementation of AccessibilitySupport AXSIsolatedTreeMode."
1321         https://bugs.webkit.org/show_bug.cgi?id=208691
1322         https://trac.webkit.org/changeset/258047
1323
1324 2020-03-06  David Kilzer  <ddkilzer@apple.com>
1325
1326         REGRESSION (r258051): WinCairo/WPE/GTK build failures
1327         <https://bugs.webkit.org/show_bug.cgi?id=208621>
1328         <rdar://problem/60068047>
1329
1330         * Headers.cmake:
1331         (WebCore_PRIVATE_FRAMEWORK_HEADERS): Add html/ImageData.h to
1332         attempt a build fix.
1333
1334 2020-03-06  Yusuke Suzuki  <ysuzuki@apple.com>
1335
1336         Put remaining fixed-sized cells into IsoSubspace
1337         https://bugs.webkit.org/show_bug.cgi?id=208754
1338
1339         Reviewed by Keith Miller.
1340
1341         * bindings/js/JSDOMIterator.h:
1342         * bindings/scripts/CodeGeneratorJS.pm:
1343         (GeneratePrototypeDeclaration):
1344         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1345         * bindings/scripts/test/JS/JSMapLike.cpp:
1346         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1347         * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
1348         * bindings/scripts/test/JS/JSSetLike.cpp:
1349         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1350         (WebCore::JSTestActiveDOMObjectConstructor::prototypeForStructure):
1351         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1352         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1353         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1354         (WebCore::JSTestCallTracerConstructor::prototypeForStructure):
1355         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1356         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
1357         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1358         * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
1359         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1360         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1361         * bindings/scripts/test/JS/JSTestException.cpp:
1362         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1363         * bindings/scripts/test/JS/JSTestGlobalObject.h:
1364         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
1365         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
1366         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
1367         * bindings/scripts/test/JS/JSTestInterface.cpp:
1368         (WebCore::JSTestInterfaceConstructor::construct):
1369         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
1370         * bindings/scripts/test/JS/JSTestIterable.cpp:
1371         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1372         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1373         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
1374         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
1375         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
1376         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1377         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
1378         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
1379         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
1380         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
1381         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
1382         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
1383         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
1384         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
1385         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
1386         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
1387         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
1388         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
1389         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
1390         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
1391         (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::prototypeForStructure):
1392         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
1393         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::prototypeForStructure):
1394         * bindings/scripts/test/JS/JSTestNode.cpp:
1395         * bindings/scripts/test/JS/JSTestObj.cpp:
1396         (WebCore::JSTestObjConstructor::construct):
1397         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1398         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1399         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1400         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
1401         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1402         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1403         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
1404         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
1405         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
1406         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1407         * bindings/scripts/test/JS/JSTestStringifier.cpp:
1408         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
1409         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
1410         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
1411         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
1412         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
1413         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
1414         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1415         (WebCore::JSTestTypedefsConstructor::construct):
1416
1417 2020-03-06  Simon Fraser  <simon.fraser@apple.com>
1418
1419         Fix scrolling tree hit-testing on scrolled and zoomed pages
1420         https://bugs.webkit.org/show_bug.cgi?id=208755
1421
1422         Reviewed by Zalan Bujtas.
1423
1424         Map the hit-test point from view to content coordinates before hit-testing the scrolling tree.
1425
1426         Tests: fast/scrolling/mac/overflow-scrolled-document.html
1427                fast/scrolling/mac/overflow-zoomed-document.html
1428
1429         * page/scrolling/ScrollingTree.cpp:
1430         (WebCore::ScrollingTree::handleWheelEvent):
1431
1432 2020-03-06  Alex Christensen  <achristensen@webkit.org>
1433
1434         Add SPI to disable cross origin access control checks
1435         https://bugs.webkit.org/show_bug.cgi?id=208748
1436         <rdar://problem/59861114>
1437
1438         Reviewed by Tim Hatcher.
1439
1440         Because loading is done process-globally in the WebProcess, use a CrossOriginAccessControlCheckDisabler::singleton for those checks.
1441         Pass a parameter to the NetworkResourceLoaders to disable these checks only for loads from a web process without access control checks.
1442         As long as we're changing the signature of passesAccessControlCheck, make it return an Expected instead of a bool with an out parameter.
1443
1444         * loader/CrossOriginAccessControl.cpp:
1445         (WebCore::CrossOriginAccessControlCheckDisabler::singleton):
1446         (WebCore::CrossOriginAccessControlCheckDisabler::setCrossOriginAccessControlCheckEnabled):
1447         (WebCore::CrossOriginAccessControlCheckDisabler::crossOriginAccessControlCheckEnabled const):
1448         (WebCore::passesAccessControlCheck):
1449         (WebCore::validatePreflightResponse):
1450         * loader/CrossOriginAccessControl.h:
1451         * loader/CrossOriginPreflightChecker.cpp:
1452         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
1453         * loader/DocumentThreadableLoader.cpp:
1454         (WebCore::DocumentThreadableLoader::loadRequest):
1455         * loader/SubresourceLoader.cpp:
1456         (WebCore::SubresourceLoader::willSendRequestInternal):
1457         (WebCore::SubresourceLoader::didReceiveResponse):
1458         (WebCore::SubresourceLoader::checkResponseCrossOriginAccessControl):
1459         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
1460         * loader/SubresourceLoader.h:
1461         * loader/cache/CachedResource.cpp:
1462         (WebCore::CachedResource::loadFrom):
1463
1464 2020-03-06  Myles C. Maxfield  <mmaxfield@apple.com>
1465
1466         [GPU Process] Implement CanvasRenderingContext2D.putImageData()
1467         https://bugs.webkit.org/show_bug.cgi?id=208621
1468         <rdar://problem/60068047>
1469
1470         Reviewed by Simon Fraser.
1471
1472         putImageData() is implemented just as a DisplayListItem. Conceptually, it's the
1473         same as a draw command. Unfortunately, it can't be implemented on top of
1474         GraphicsContext, and instead has to be implemented on top of ImageBuffer, so
1475         this patch also adds a delegate to DisplayList::Replayer which can implement the
1476         commands that require an ImageBuffer. This moves in the direction of making the
1477         display list raw data, and moving the applier functions somewhere else at a
1478         higher level.
1479
1480         Implementing this as a DisplayListItem rather than its own IPC message is superior
1481         because it gives us more control about when to flush the in-flight display list.
1482
1483         There is still a few unnecessary copies - we're copying into / out of a SharedData
1484         during encoding. Being able to either have the ImageBuffer retain the SharedBuffer,
1485         or have putImageData() have an overload which accepts a SharedBuffer, would be a
1486         good opportunity for improvement.
1487
1488         Test: fast/canvas/putImageData-multiple.html
1489
1490         * html/ImageData.cpp:
1491         (WebCore::ImageData::deepClone const):
1492         * html/ImageData.h:
1493         * platform/graphics/AlphaPremultiplication.h:
1494         * platform/graphics/GraphicsContext.h:
1495         (WebCore::GraphicsContext::impl):
1496         * platform/graphics/displaylists/DisplayList.h:
1497         * platform/graphics/displaylists/DisplayListDrawingContext.cpp:
1498         (WebCore::DisplayList::DrawingContext::recorder):
1499         * platform/graphics/displaylists/DisplayListDrawingContext.h:
1500         * platform/graphics/displaylists/DisplayListItems.cpp:
1501         (WebCore::DisplayList::Item::sizeInBytes):
1502         (WebCore::DisplayList::PutImageData::PutImageData):
1503         (WebCore::DisplayList::PutImageData::apply const):
1504         (WebCore::DisplayList::operator<<):
1505         * platform/graphics/displaylists/DisplayListItems.h:
1506         (WebCore::DisplayList::DrawingItem::globalBounds const):
1507         (WebCore::DisplayList::PutImageData::create):
1508         (WebCore::DisplayList::PutImageData::inputFormat const):
1509         (WebCore::DisplayList::PutImageData::imageData const):
1510         (WebCore::DisplayList::PutImageData::srcRect const):
1511         (WebCore::DisplayList::PutImageData::destPoint const):
1512         (WebCore::DisplayList::PutImageData::encode const):
1513         (WebCore::DisplayList::PutImageData::decode):
1514         (WebCore::DisplayList::Item::encode const):
1515         (WebCore::DisplayList::Item::decode):
1516         * platform/graphics/displaylists/DisplayListRecorder.cpp:
1517         (WebCore::DisplayList::Recorder::putImageData):
1518         (WebCore::DisplayList::Recorder::updateItemExtent const):
1519         * platform/graphics/displaylists/DisplayListRecorder.h:
1520         * platform/graphics/displaylists/DisplayListReplayer.cpp:
1521         (WebCore::DisplayList::Replayer::Replayer):
1522         (WebCore::DisplayList::Replayer::replay):
1523         * platform/graphics/displaylists/DisplayListReplayer.h:
1524         (WebCore::DisplayList::Replayer::Delegate::~Delegate):
1525         (WebCore::DisplayList::Replayer::Delegate::apply):
1526
1527 2020-03-06  Daniel Bates  <dabates@apple.com>
1528
1529         Add support for inserting and removing a text placeholder
1530         https://bugs.webkit.org/show_bug.cgi?id=208661
1531         <rdar://problem/59371073>
1532
1533         Reviewed by Simon Fraser and Ryosuke Niwa.
1534
1535         Implements the concept of a text placeholder, which is an element that acts like whitespace:
1536         it takes up space in the page layout, but has no visual appearance.
1537
1538         Tests: editing/text-placeholder/insert-and-remove-into-text-field.html
1539                editing/text-placeholder/insert-into-content-editable.html
1540                editing/text-placeholder/insert-into-empty-text-field.html
1541                editing/text-placeholder/insert-into-text-field-in-iframe.html
1542                editing/text-placeholder/insert-into-text-field.html
1543
1544         * Sources.txt:
1545         * WebCore.xcodeproj/project.pbxproj:
1546         * dom/Element.h:
1547         (WebCore::Element::isTextPlaceholderElement const): Added. Defaults to false. I override this
1548         in TextPlaceholderElement.h.
1549
1550         * editing/Editor.cpp:
1551         (WebCore::Editor::insertTextPlaceholder):
1552         (WebCore::Editor::removeTextPlaceholder):
1553         Insert a new placeholder or remove an existing one.
1554
1555         * editing/Editor.h:
1556         * html/shadow/TextPlaceholderElement.cpp: Added.
1557         (WebCore::TextPlaceholderElement::create):
1558         (WebCore::TextPlaceholderElement::TextPlaceholderElement): Set inline styles to size the placeholder.
1559         (WebCore::TextPlaceholderElement::insertedIntoAncestor): If the placeholder is inserted inside an
1560         HTMLTextFormControlElement (e.g. <input> or <textarea>) then hide the HTML placeholder text.
1561         (WebCore::TextPlaceholderElement::removedFromAncestor): If the placeholder was removed from inside
1562         an HTMLTextFormControlElement then show the HTML placeholder text.
1563         * html/shadow/TextPlaceholderElement.h:
1564         (isType):
1565         * testing/Internals.cpp:
1566         (WebCore::Internals::insertTextPlaceholder): Added.
1567         (WebCore::Internals::removeTextPlaceholder): Added.
1568         * testing/Internals.h:
1569         * testing/Internals.idl:
1570
1571 2020-03-06  Andres Gonzalez  <andresg_22@apple.com>
1572
1573         Implementation of AccessibilitySupport AXSIsolatedTreeMode.
1574         https://bugs.webkit.org/show_bug.cgi?id=208691
1575
1576         Reviewed by Chris Fleizach.
1577
1578         Support for the AccessibilitySupport AXIsolatedTreMode accessibility setting.
1579
1580         * accessibility/AXObjectCache.cpp:
1581         (WebCore::AXObjectCache::isolatedTreeFocusedObject):
1582         (WebCore::AXObjectCache::focusedUIElementForPage):
1583         (WebCore::AXObjectCache::isIsolatedTreeEnabled):
1584         (WebCore::AXObjectCache::rootObject):
1585         (WebCore::AXObjectCache::isolatedTreeRootObject):
1586         (WebCore::AXObjectCache::canUseSecondaryAXThread):
1587         * accessibility/AXObjectCache.h:
1588         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
1589         (-[WebAccessibilityObjectWrapperBase detach]):
1590         (-[WebAccessibilityObjectWrapperBase axBackingObject]):
1591         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1592         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1593
1594 2020-03-06  Simon Fraser  <simon.fraser@apple.com>
1595
1596         Hit-test CALayers on the scrolling thread for async frame/overflow scrolling
1597         https://bugs.webkit.org/show_bug.cgi?id=208740
1598         <rdar://problem/48028836>
1599
1600         Reviewed by Tim Horton.
1601
1602         Implement hit-testing in the scrolling thread so we can determine which overflow/subframe
1603         to scroll without hitting the main thread.
1604
1605         ScrollingTreeMac overrides scrollingNodeForPoint() and hit-tests through CALayers, starting at the
1606         root content layer. Locking ensures that the CALayer tree doesn't change while we're hit-testing it.
1607         We collect layers for the given point in back-to-front order much like the iOS code _web_findDescendantViewAtPoint
1608         (too different to share though), and consult event regions on PlatformCALayerCocoa's to determine if the
1609         point is inside the part of the layer that should receive events.
1610
1611         To handle the complex stacking/containing block cases, isScrolledBy() consults the scrolling tree.
1612
1613         For testing, fix it so that multiple calls to monitorWheelEvents() in a single test each start
1614         with clean state.
1615
1616         Tests: fast/scrolling/mac/absolute-in-overflow-scroll.html
1617                fast/scrolling/mac/async-scroll-overflow.html
1618                fast/scrolling/mac/move-node-in-overflow-scroll.html
1619                fast/scrolling/mac/overlapped-overflow-scroll.html
1620
1621         * page/scrolling/ScrollingTree.cpp:
1622         (WebCore::ScrollingTree::handleWheelEvent):
1623         (WebCore::ScrollingTree::scrollingNodeForPoint):
1624         * page/scrolling/ScrollingTree.h:
1625         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1626         * page/scrolling/mac/ScrollingTreeMac.h:
1627         * page/scrolling/mac/ScrollingTreeMac.mm:
1628         (collectDescendantLayersAtPoint):
1629         (scrollingNodeIDForLayer):
1630         (isScrolledBy):
1631         (ScrollingTreeMac::scrollingNodeForPoint):
1632         * testing/js/WebCoreTestSupport.cpp:
1633         (WebCoreTestSupport::monitorWheelEvents): Make sure that each call to eventSender.monitorWheelEvents() clears previous state.
1634
1635 2020-03-06  Jer Noble  <jer.noble@apple.com>
1636
1637         [GPUP] Convert CDMFactory away from platformStrategies() and use WebProcess settings instead
1638         https://bugs.webkit.org/show_bug.cgi?id=208699
1639
1640         Reviewed by Youenn Fablet.
1641
1642         * platform/MediaStrategy.h:
1643         * platform/encryptedmedia/CDMFactory.cpp:
1644
1645 2020-03-06  Ryosuke Niwa  <rniwa@webkit.org>
1646
1647         TextManipulationController should preserve images
1648         https://bugs.webkit.org/show_bug.cgi?id=208692
1649
1650         Reviewed by Wenson Hsieh.
1651
1652         This patch makes TextManipulationController preserve images (img and SVG) and their ordering,
1653         and lays down the foundation for preserving other non-text content.
1654
1655         To do this, this patch introduces ParagraphContentIterator which wraps TextIterator and introduces
1656         a secondary node iteration which detects all ndoes that have been skipped. Ideally, we would update
1657         TextIterator to do this natively but this is tricky due to the multitude of the node traveral options
1658         supported by TextIterator at the moment. ParagraphContentIterator::advance stops at every node
1659         including ones that do not generate text in TextIterator. This also allows more code sharing between
1660         TextManipulationController's observeParagraphs and replace functions.
1661
1662         For now, we special case nodes with RenderReplaced like img element and the root SVG element.
1663
1664         Tests: TextManipulation.CompleteTextManipulationShouldPreserveImagesAsExcludedTokens
1665                TextManipulation.CompleteTextManipulationShouldPreserveSVGAsExcludedTokens
1666                TextManipulation.CompleteTextManipulationShouldPreserveOrderOfBlockImage
1667
1668         * editing/TextManipulationController.cpp:
1669         (WebCore::ParagraphContentIterator): Added.
1670         (WebCore::ParagraphContentIterator::ParagraphContentIterator): Added.
1671         (WebCore::ParagraphContentIterator::advance): Added.
1672         (WebCore::ParagraphContentIterator::currentContent): Added.
1673         (WebCore::ParagraphContentIterator::startPosition): Added.
1674         (WebCore::ParagraphContentIterator::endPosition): Added.
1675         (WebCore::ParagraphContentIterator::atEnd const): Added.
1676         (WebCore::ParagraphContentIterator::moveCurrentNodeForward): Added.
1677         (WebCore::TextManipulationController::observeParagraphs): Adopted ParagraphContentIterator. For
1678         nodes with RenderReplaced, we generate an excluded token "[]". Removed the dead code which was
1679         creating a subrange from TextIterator, and renamed the previously misleadingly named endOfLastNewLine
1680         to startOfCurrentLine for clarity.
1681         (WebCore::TextManipulationController::replace): Adopted ParagraphContentIterator. Fixed a bug that
1682         excluded content were always assumed to be text, and a bug that the replaced content was inserted
1683         at a wrong location when insertionPoint is a position anchored at a node being removed. Also fixed
1684         an obvious bug that we were inserting root replaced contents at the position before a node which
1685         appears immediately before insertionPoint instead of after; this also resulted in the replaced content
1686         being inserted at a wrong location in some cases.
1687
1688 2020-03-06  Andres Gonzalez  <andresg_22@apple.com>
1689
1690         Crash accessing AXIsolatedObject::m_childrenIDS from removeSubtree on the main thread.
1691         https://bugs.webkit.org/show_bug.cgi?id=208728
1692
1693         Reviewed by Chris Fleizach.
1694
1695         AXIsolatedTree::removeSubtree was accessing AXIsolatedObject::m_childrenIDs
1696         on the main thread to remove all descendants recursively. But the lock
1697         had to be unlocked and locked again on each iteration, creating problems
1698         if the secondary thread modifies the children in between iterations.
1699         The solution in this patch is to eliminate removeSubtree, and make
1700         removeNode and applyPendingChanges to remove all descendants.
1701
1702         * accessibility/AXObjectCache.cpp:
1703         (WebCore::AXObjectCache::updateIsolatedTree):
1704         * accessibility/isolatedtree/AXIsolatedTree.cpp:
1705         (WebCore::AXIsolatedTree::appendNodeChanges): Renamed local vars to make it clearer.
1706         (WebCore::AXIsolatedTree::applyPendingChanges):
1707         (WebCore::AXIsolatedTree::removeSubtree): Deleted.
1708         * accessibility/isolatedtree/AXIsolatedTree.h:
1709
1710 2020-03-06  Yusuke Suzuki  <ysuzuki@apple.com>
1711
1712         JSDOMIterator classes should be in IsoSubspace
1713         https://bugs.webkit.org/show_bug.cgi?id=208705
1714
1715         Reviewed by Sam Weinig.
1716
1717         JSDOMIterator should be allocated in IsoSubspace. So we can put all WebCore related cells into IsoSubspaces.
1718         To collect all iterator subspaces in DOMIsoSubspaces class, we scan `iterable<...>` pattern in preprocess-idls.pl.
1719         Then, we create a class for each DOM iterator instead of using `using XXXIterator = JSDOMIterator<...>` to put
1720         subspaceFor implementation easily. And we rename JSDOMIterator to JSDOMIteratorBase to explicitly state that
1721         this is Base class of actual iterators.
1722
1723         * bindings/js/JSDOMIterator.h:
1724         (WebCore::JSDOMIteratorBase::JSDOMIteratorBase):
1725         (WebCore::IteratorTraits>::asJS):
1726         (WebCore::IteratorTraits>::destroy):
1727         (WebCore::IteratorTraits>::next):
1728         (WebCore::JSDOMIterator::createStructure): Deleted.
1729         (WebCore::JSDOMIterator::create): Deleted.
1730         (WebCore::JSDOMIterator::createPrototype): Deleted.
1731         (WebCore::JSDOMIterator::JSDOMIterator): Deleted.
1732         * bindings/js/JSDOMWrapper.h:
1733         (WebCore::JSDOMObject::subspaceFor):
1734         * bindings/scripts/CodeGeneratorJS.pm:
1735         (GenerateIterableDefinition):
1736         (GeneratePrototypeDeclaration):
1737         * bindings/scripts/preprocess-idls.pl:
1738         (interfaceIsIterable):
1739         * bindings/scripts/test/JS/JSInterfaceName.cpp:
1740         (WebCore::JSInterfaceNamePrototype::create): Deleted.
1741         (WebCore::JSInterfaceNamePrototype::createStructure): Deleted.
1742         (WebCore::JSInterfaceNamePrototype::JSInterfaceNamePrototype): Deleted.
1743         * bindings/scripts/test/JS/JSMapLike.cpp:
1744         (WebCore::JSMapLikePrototype::create): Deleted.
1745         (WebCore::JSMapLikePrototype::createStructure): Deleted.
1746         (WebCore::JSMapLikePrototype::JSMapLikePrototype): Deleted.
1747         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
1748         (WebCore::JSReadOnlyMapLikePrototype::create): Deleted.
1749         (WebCore::JSReadOnlyMapLikePrototype::createStructure): Deleted.
1750         (WebCore::JSReadOnlyMapLikePrototype::JSReadOnlyMapLikePrototype): Deleted.
1751         * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
1752         (WebCore::JSReadOnlySetLikePrototype::create): Deleted.
1753         (WebCore::JSReadOnlySetLikePrototype::createStructure): Deleted.
1754         (WebCore::JSReadOnlySetLikePrototype::JSReadOnlySetLikePrototype): Deleted.
1755         * bindings/scripts/test/JS/JSSetLike.cpp:
1756         (WebCore::JSSetLikePrototype::create): Deleted.
1757         (WebCore::JSSetLikePrototype::createStructure): Deleted.
1758         (WebCore::JSSetLikePrototype::JSSetLikePrototype): Deleted.
1759         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1760         (WebCore::JSTestActiveDOMObjectConstructor::prototypeForStructure):
1761         (WebCore::JSTestActiveDOMObjectPrototype::create): Deleted.
1762         (WebCore::JSTestActiveDOMObjectPrototype::createStructure): Deleted.
1763         (WebCore::JSTestActiveDOMObjectPrototype::JSTestActiveDOMObjectPrototype): Deleted.
1764         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
1765         (WebCore::JSTestCEReactionsPrototype::create): Deleted.
1766         (WebCore::JSTestCEReactionsPrototype::createStructure): Deleted.
1767         (WebCore::JSTestCEReactionsPrototype::JSTestCEReactionsPrototype): Deleted.
1768         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
1769         (WebCore::JSTestCEReactionsStringifierPrototype::create): Deleted.
1770         (WebCore::JSTestCEReactionsStringifierPrototype::createStructure): Deleted.
1771         (WebCore::JSTestCEReactionsStringifierPrototype::JSTestCEReactionsStringifierPrototype): Deleted.
1772         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
1773         (WebCore::JSTestCallTracerConstructor::prototypeForStructure):
1774         (WebCore::JSTestCallTracerPrototype::create): Deleted.
1775         (WebCore::JSTestCallTracerPrototype::createStructure): Deleted.
1776         (WebCore::JSTestCallTracerPrototype::JSTestCallTracerPrototype): Deleted.
1777         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
1778         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::create): Deleted.
1779         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::createStructure): Deleted.
1780         (WebCore::JSTestClassWithJSBuiltinConstructorPrototype::JSTestClassWithJSBuiltinConstructorPrototype): Deleted.
1781         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
1782         (WebCore::JSTestDOMJITPrototype::create): Deleted.
1783         (WebCore::JSTestDOMJITPrototype::createStructure): Deleted.
1784         (WebCore::JSTestDOMJITPrototype::JSTestDOMJITPrototype): Deleted.
1785         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
1786         (WebCore::JSTestEnabledBySettingPrototype::create): Deleted.
1787         (WebCore::JSTestEnabledBySettingPrototype::createStructure): Deleted.
1788         (WebCore::JSTestEnabledBySettingPrototype::JSTestEnabledBySettingPrototype): Deleted.
1789         * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
1790         (WebCore::JSTestEnabledForContextPrototype::create): Deleted.
1791         (WebCore::JSTestEnabledForContextPrototype::createStructure): Deleted.
1792         (WebCore::JSTestEnabledForContextPrototype::JSTestEnabledForContextPrototype): Deleted.
1793         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1794         (WebCore::JSTestEventConstructorPrototype::create): Deleted.
1795         (WebCore::JSTestEventConstructorPrototype::createStructure): Deleted.
1796         (WebCore::JSTestEventConstructorPrototype::JSTestEventConstructorPrototype): Deleted.
1797         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1798         (WebCore::JSTestEventTargetPrototype::create): Deleted.
1799         (WebCore::JSTestEventTargetPrototype::createStructure): Deleted.
1800         (WebCore::JSTestEventTargetPrototype::JSTestEventTargetPrototype): Deleted.
1801         * bindings/scripts/test/JS/JSTestException.cpp:
1802         (WebCore::JSTestExceptionPrototype::create): Deleted.
1803         (WebCore::JSTestExceptionPrototype::createStructure): Deleted.
1804         (WebCore::JSTestExceptionPrototype::JSTestExceptionPrototype): Deleted.
1805         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
1806         (WebCore::JSTestGenerateIsReachablePrototype::create): Deleted.
1807         (WebCore::JSTestGenerateIsReachablePrototype::createStructure): Deleted.
1808         (WebCore::JSTestGenerateIsReachablePrototype::JSTestGenerateIsReachablePrototype): Deleted.
1809         * bindings/scripts/test/JS/JSTestGlobalObject.h:
1810         (WebCore::JSTestGlobalObjectPrototype::create): Deleted.
1811         (WebCore::JSTestGlobalObjectPrototype::createStructure): Deleted.
1812         (WebCore::JSTestGlobalObjectPrototype::JSTestGlobalObjectPrototype): Deleted.
1813         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
1814         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::create): Deleted.
1815         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::createStructure): Deleted.
1816         (WebCore::JSTestIndexedSetterNoIdentifierPrototype::JSTestIndexedSetterNoIdentifierPrototype): Deleted.
1817         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
1818         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::create): Deleted.
1819         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::createStructure): Deleted.
1820         (WebCore::JSTestIndexedSetterThrowingExceptionPrototype::JSTestIndexedSetterThrowingExceptionPrototype): Deleted.
1821         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
1822         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::create): Deleted.
1823         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::createStructure): Deleted.
1824         (WebCore::JSTestIndexedSetterWithIdentifierPrototype::JSTestIndexedSetterWithIdentifierPrototype): Deleted.
1825         * bindings/scripts/test/JS/JSTestInterface.cpp:
1826         (WebCore::JSTestInterfaceConstructor::construct):
1827         (WebCore::jsTestInterfacePrototypeFunctionEntriesCaller):
1828         (WebCore::JSTestInterfacePrototype::create): Deleted.
1829         (WebCore::JSTestInterfacePrototype::createStructure): Deleted.
1830         (WebCore::JSTestInterfacePrototype::JSTestInterfacePrototype): Deleted.
1831         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
1832         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::create): Deleted.
1833         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::createStructure): Deleted.
1834         (WebCore::JSTestInterfaceLeadingUnderscorePrototype::JSTestInterfaceLeadingUnderscorePrototype): Deleted.
1835         * bindings/scripts/test/JS/JSTestIterable.cpp:
1836         (WebCore::jsTestIterablePrototypeFunctionEntriesCaller):
1837         (WebCore::JSTestIterablePrototype::create): Deleted.
1838         (WebCore::JSTestIterablePrototype::createStructure): Deleted.
1839         (WebCore::JSTestIterablePrototype::JSTestIterablePrototype): Deleted.
1840         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
1841         (WebCore::JSTestJSBuiltinConstructorPrototype::create): Deleted.
1842         (WebCore::JSTestJSBuiltinConstructorPrototype::createStructure): Deleted.
1843         (WebCore::JSTestJSBuiltinConstructorPrototype::JSTestJSBuiltinConstructorPrototype): Deleted.
1844         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
1845         (WebCore::JSTestMediaQueryListListenerPrototype::create): Deleted.
1846         (WebCore::JSTestMediaQueryListListenerPrototype::createStructure): Deleted.
1847         (WebCore::JSTestMediaQueryListListenerPrototype::JSTestMediaQueryListListenerPrototype): Deleted.
1848         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
1849         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::create): Deleted.
1850         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::createStructure): Deleted.
1851         (WebCore::JSTestNamedAndIndexedSetterNoIdentifierPrototype::JSTestNamedAndIndexedSetterNoIdentifierPrototype): Deleted.
1852         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
1853         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::create): Deleted.
1854         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::createStructure): Deleted.
1855         (WebCore::JSTestNamedAndIndexedSetterThrowingExceptionPrototype::JSTestNamedAndIndexedSetterThrowingExceptionPrototype): Deleted.
1856         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
1857         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::create): Deleted.
1858         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::createStructure): Deleted.
1859         (WebCore::JSTestNamedAndIndexedSetterWithIdentifierPrototype::JSTestNamedAndIndexedSetterWithIdentifierPrototype): Deleted.
1860         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
1861         (WebCore::JSTestNamedConstructorPrototype::create): Deleted.
1862         (WebCore::JSTestNamedConstructorPrototype::createStructure): Deleted.
1863         (WebCore::JSTestNamedConstructorPrototype::JSTestNamedConstructorPrototype): Deleted.
1864         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
1865         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::create): Deleted.
1866         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::createStructure): Deleted.
1867         (WebCore::JSTestNamedDeleterNoIdentifierPrototype::JSTestNamedDeleterNoIdentifierPrototype): Deleted.
1868         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
1869         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::create): Deleted.
1870         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::createStructure): Deleted.
1871         (WebCore::JSTestNamedDeleterThrowingExceptionPrototype::JSTestNamedDeleterThrowingExceptionPrototype): Deleted.
1872         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
1873         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::create): Deleted.
1874         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::createStructure): Deleted.
1875         (WebCore::JSTestNamedDeleterWithIdentifierPrototype::JSTestNamedDeleterWithIdentifierPrototype): Deleted.
1876         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
1877         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::create): Deleted.
1878         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::createStructure): Deleted.
1879         (WebCore::JSTestNamedDeleterWithIndexedGetterPrototype::JSTestNamedDeleterWithIndexedGetterPrototype): Deleted.
1880         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
1881         (WebCore::JSTestNamedGetterCallWithPrototype::create): Deleted.
1882         (WebCore::JSTestNamedGetterCallWithPrototype::createStructure): Deleted.
1883         (WebCore::JSTestNamedGetterCallWithPrototype::JSTestNamedGetterCallWithPrototype): Deleted.
1884         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
1885         (WebCore::JSTestNamedGetterNoIdentifierPrototype::create): Deleted.
1886         (WebCore::JSTestNamedGetterNoIdentifierPrototype::createStructure): Deleted.
1887         (WebCore::JSTestNamedGetterNoIdentifierPrototype::JSTestNamedGetterNoIdentifierPrototype): Deleted.
1888         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
1889         (WebCore::JSTestNamedGetterWithIdentifierPrototype::create): Deleted.
1890         (WebCore::JSTestNamedGetterWithIdentifierPrototype::createStructure): Deleted.
1891         (WebCore::JSTestNamedGetterWithIdentifierPrototype::JSTestNamedGetterWithIdentifierPrototype): Deleted.
1892         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
1893         (WebCore::JSTestNamedSetterNoIdentifierPrototype::create): Deleted.
1894         (WebCore::JSTestNamedSetterNoIdentifierPrototype::createStructure): Deleted.
1895         (WebCore::JSTestNamedSetterNoIdentifierPrototype::JSTestNamedSetterNoIdentifierPrototype): Deleted.
1896         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
1897         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::create): Deleted.
1898         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::createStructure): Deleted.
1899         (WebCore::JSTestNamedSetterThrowingExceptionPrototype::JSTestNamedSetterThrowingExceptionPrototype): Deleted.
1900         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
1901         (WebCore::JSTestNamedSetterWithIdentifierPrototype::create): Deleted.
1902         (WebCore::JSTestNamedSetterWithIdentifierPrototype::createStructure): Deleted.
1903         (WebCore::JSTestNamedSetterWithIdentifierPrototype::JSTestNamedSetterWithIdentifierPrototype): Deleted.
1904         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
1905         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::create): Deleted.
1906         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::createStructure): Deleted.
1907         (WebCore::JSTestNamedSetterWithIndexedGetterPrototype::JSTestNamedSetterWithIndexedGetterPrototype): Deleted.
1908         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
1909         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::create): Deleted.
1910         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::createStructure): Deleted.
1911         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetterPrototype::JSTestNamedSetterWithIndexedGetterAndSetterPrototype): Deleted.
1912         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
1913         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::create): Deleted.
1914         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::createStructure): Deleted.
1915         (WebCore::JSTestNamedSetterWithOverrideBuiltinsPrototype::JSTestNamedSetterWithOverrideBuiltinsPrototype): Deleted.
1916         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
1917         (WebCore::JSTestNamedSetterWithUnforgablePropertiesConstructor::prototypeForStructure):
1918         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::create): Deleted.
1919         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::createStructure): Deleted.
1920         (WebCore::JSTestNamedSetterWithUnforgablePropertiesPrototype::JSTestNamedSetterWithUnforgablePropertiesPrototype): Deleted.
1921         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
1922         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsConstructor::prototypeForStructure):
1923         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::create): Deleted.
1924         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::createStructure): Deleted.
1925         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltinsPrototype): Deleted.
1926         * bindings/scripts/test/JS/JSTestNode.cpp:
1927         (WebCore::jsTestNodePrototypeFunctionEntriesCaller):
1928         (WebCore::JSTestNodePrototype::create): Deleted.
1929         (WebCore::JSTestNodePrototype::createStructure): Deleted.
1930         (WebCore::JSTestNodePrototype::JSTestNodePrototype): Deleted.
1931         * bindings/scripts/test/JS/JSTestObj.cpp:
1932         (WebCore::JSTestObjConstructor::construct):
1933         (WebCore::JSTestObjPrototype::create): Deleted.
1934         (WebCore::JSTestObjPrototype::createStructure): Deleted.
1935         (WebCore::JSTestObjPrototype::JSTestObjPrototype): Deleted.
1936         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
1937         (WebCore::JSTestOverloadedConstructorsPrototype::create): Deleted.
1938         (WebCore::JSTestOverloadedConstructorsPrototype::createStructure): Deleted.
1939         (WebCore::JSTestOverloadedConstructorsPrototype::JSTestOverloadedConstructorsPrototype): Deleted.
1940         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
1941         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::create): Deleted.
1942         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::createStructure): Deleted.
1943         (WebCore::JSTestOverloadedConstructorsWithSequencePrototype::JSTestOverloadedConstructorsWithSequencePrototype): Deleted.
1944         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
1945         (WebCore::JSTestOverrideBuiltinsPrototype::create): Deleted.
1946         (WebCore::JSTestOverrideBuiltinsPrototype::createStructure): Deleted.
1947         (WebCore::JSTestOverrideBuiltinsPrototype::JSTestOverrideBuiltinsPrototype): Deleted.
1948         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
1949         (WebCore::JSTestPluginInterfacePrototype::create): Deleted.
1950         (WebCore::JSTestPluginInterfacePrototype::createStructure): Deleted.
1951         (WebCore::JSTestPluginInterfacePrototype::JSTestPluginInterfacePrototype): Deleted.
1952         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
1953         (WebCore::JSTestPromiseRejectionEventPrototype::create): Deleted.
1954         (WebCore::JSTestPromiseRejectionEventPrototype::createStructure): Deleted.
1955         (WebCore::JSTestPromiseRejectionEventPrototype::JSTestPromiseRejectionEventPrototype): Deleted.
1956         * bindings/scripts/test/JS/JSTestSerialization.cpp:
1957         (WebCore::JSTestSerializationPrototype::create): Deleted.
1958         (WebCore::JSTestSerializationPrototype::createStructure): Deleted.
1959         (WebCore::JSTestSerializationPrototype::JSTestSerializationPrototype): Deleted.
1960         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
1961         (WebCore::JSTestSerializationIndirectInheritancePrototype::create): Deleted.
1962         (WebCore::JSTestSerializationIndirectInheritancePrototype::createStructure): Deleted.
1963         (WebCore::JSTestSerializationIndirectInheritancePrototype::JSTestSerializationIndirectInheritancePrototype): Deleted.
1964         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
1965         (WebCore::JSTestSerializationInheritPrototype::create): Deleted.
1966         (WebCore::JSTestSerializationInheritPrototype::createStructure): Deleted.
1967         (WebCore::JSTestSerializationInheritPrototype::JSTestSerializationInheritPrototype): Deleted.
1968         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
1969         (WebCore::JSTestSerializationInheritFinalPrototype::create): Deleted.
1970         (WebCore::JSTestSerializationInheritFinalPrototype::createStructure): Deleted.
1971         (WebCore::JSTestSerializationInheritFinalPrototype::JSTestSerializationInheritFinalPrototype): Deleted.
1972         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1973         (WebCore::JSTestSerializedScriptValueInterfacePrototype::create): Deleted.
1974         (WebCore::JSTestSerializedScriptValueInterfacePrototype::createStructure): Deleted.
1975         (WebCore::JSTestSerializedScriptValueInterfacePrototype::JSTestSerializedScriptValueInterfacePrototype): Deleted.
1976         * bindings/scripts/test/JS/JSTestStringifier.cpp:
1977         (WebCore::JSTestStringifierPrototype::create): Deleted.
1978         (WebCore::JSTestStringifierPrototype::createStructure): Deleted.
1979         (WebCore::JSTestStringifierPrototype::JSTestStringifierPrototype): Deleted.
1980         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
1981         (WebCore::JSTestStringifierAnonymousOperationPrototype::create): Deleted.
1982         (WebCore::JSTestStringifierAnonymousOperationPrototype::createStructure): Deleted.
1983         (WebCore::JSTestStringifierAnonymousOperationPrototype::JSTestStringifierAnonymousOperationPrototype): Deleted.
1984         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
1985         (WebCore::JSTestStringifierNamedOperationPrototype::create): Deleted.
1986         (WebCore::JSTestStringifierNamedOperationPrototype::createStructure): Deleted.
1987         (WebCore::JSTestStringifierNamedOperationPrototype::JSTestStringifierNamedOperationPrototype): Deleted.
1988         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
1989         (WebCore::JSTestStringifierOperationImplementedAsPrototype::create): Deleted.
1990         (WebCore::JSTestStringifierOperationImplementedAsPrototype::createStructure): Deleted.
1991         (WebCore::JSTestStringifierOperationImplementedAsPrototype::JSTestStringifierOperationImplementedAsPrototype): Deleted.
1992         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
1993         (WebCore::JSTestStringifierOperationNamedToStringPrototype::create): Deleted.
1994         (WebCore::JSTestStringifierOperationNamedToStringPrototype::createStructure): Deleted.
1995         (WebCore::JSTestStringifierOperationNamedToStringPrototype::JSTestStringifierOperationNamedToStringPrototype): Deleted.
1996         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
1997         (WebCore::JSTestStringifierReadOnlyAttributePrototype::create): Deleted.
1998         (WebCore::JSTestStringifierReadOnlyAttributePrototype::createStructure): Deleted.
1999         (WebCore::JSTestStringifierReadOnlyAttributePrototype::JSTestStringifierReadOnlyAttributePrototype): Deleted.
2000         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
2001         (WebCore::JSTestStringifierReadWriteAttributePrototype::create): Deleted.
2002         (WebCore::JSTestStringifierReadWriteAttributePrototype::createStructure): Deleted.
2003         (WebCore::JSTestStringifierReadWriteAttributePrototype::JSTestStringifierReadWriteAttributePrototype): Deleted.
2004         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2005         (WebCore::JSTestTypedefsConstructor::construct):
2006         (WebCore::JSTestTypedefsPrototype::create): Deleted.
2007         (WebCore::JSTestTypedefsPrototype::createStructure): Deleted.
2008         (WebCore::JSTestTypedefsPrototype::JSTestTypedefsPrototype): Deleted.
2009
2010 2020-03-06  James Darpinian  <jdarpinian@chromium.org>
2011
2012         Set important EGL context attributes
2013         https://bugs.webkit.org/show_bug.cgi?id=208724
2014
2015         Reviewed by Dean Jackson.
2016
2017         These EGL context attributes are important to make ANGLE's validation correct for
2018         WebGL contexts. ROBUST_RESOURCE_INITIALIZATION is especially important; the lack
2019         of it may be a root cause of some of the test flakiness we have seen. With this
2020         change WebKit's EGL context attributes now match Chromium's for ANGLE/WebGL
2021         contexts.
2022
2023         * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm:
2024         (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL):
2025
2026 2020-03-06  Youenn Fablet  <youenn@apple.com>
2027
2028         Use ObjectIdentifier to identify media sessions
2029         https://bugs.webkit.org/show_bug.cgi?id=208710
2030
2031         Reviewed by Eric Carlson.
2032
2033         No change of behavior, except that the identifier is now stable over time and unique per process.
2034
2035         * Headers.cmake:
2036         * WebCore.xcodeproj/project.pbxproj:
2037         * html/HTMLMediaElement.cpp:
2038         (WebCore::HTMLMediaElement::HTMLMediaElement):
2039         (WebCore::HTMLMediaElement::mediaSessionUniqueIdentifier const):
2040         * html/HTMLMediaElement.h:
2041         * platform/audio/NowPlayingInfo.h:
2042         (WebCore::NowPlayingInfo::decode):
2043         * platform/audio/PlatformMediaSessionManager.h:
2044         (WebCore::PlatformMediaSessionManager::lastUpdatedNowPlayingInfoUniqueIdentifier const):
2045         * platform/audio/cocoa/MediaSessionManagerCocoa.h:
2046         * platform/audio/cocoa/MediaSessionManagerCocoa.mm:
2047         (MediaSessionManagerCocoa::setNowPlayingInfo):
2048         (MediaSessionManagerCocoa::updateNowPlayingInfo):
2049         * testing/Internals.cpp:
2050         (WebCore::Internals::nowPlayingState const):
2051
2052 2020-03-06  Jason Lawrence  <lawrence.j@apple.com>
2053
2054         Unreviewed, rolling out r257760.
2055
2056         This commit caused flaky crashing on Mac wk2.
2057
2058         Reverted changeset:
2059
2060         "Fix for LayoutTests/accessibility/mac/value-change/value-
2061         change-user-info-contenteditable.html in IsolatedTree mode."
2062         https://bugs.webkit.org/show_bug.cgi?id=208462
2063         https://trac.webkit.org/changeset/257760
2064
2065 2020-03-06  David Quesada  <david_quesada@apple.com>
2066
2067         Add _WKResourceLoadInfo.resourceType SPI
2068         https://bugs.webkit.org/show_bug.cgi?id=208723
2069
2070         Reviewed by Alex Christensen.
2071
2072         Covered by API tests.
2073
2074         * Modules/beacon/NavigatorBeacon.cpp:
2075         (WebCore::NavigatorBeacon::sendBeacon):
2076         * loader/PingLoader.cpp:
2077         (WebCore::PingLoader::sendPing):
2078         * platform/network/ResourceRequestBase.h:
2079
2080 2020-03-06  Youenn Fablet  <youenn@apple.com>
2081
2082         Add support for NowPlaying commands in GPUProcess
2083         https://bugs.webkit.org/show_bug.cgi?id=208707
2084
2085         Reviewed by Eric Carlson.
2086
2087         Add a NowPlayingManager that is responsible to clear/set/update NowPlaying information as well as receive commands
2088         and send them to the current NowPlaying client.
2089         Manually tested.
2090
2091         * Headers.cmake:
2092         * Sources.txt:
2093         * WebCore.xcodeproj/project.pbxproj:
2094         * platform/audio/PlatformMediaSessionManager.h:
2095
2096 2020-03-06  Simon Fraser  <simon.fraser@apple.com>
2097
2098         Move synchronousScrollingReasons to ScrollingTreeScrollingNode
2099         https://bugs.webkit.org/show_bug.cgi?id=208721
2100
2101         Reviewed by Antti Koivisto.
2102
2103         synchronousScrollingReasons was on Scrolling*FrameScrollingNode, but with async overflow
2104         scrolling, some overflow scrolls will need to scroll synchronously if they paint any
2105         background-attachment:fixed, so move synchronousScrollingReasons down to Scrolling*ScrollingNode.
2106
2107         Also wrap the scrolling tree parts in #if ENABLE(SCROLLING_THREAD) since synchronous scrolling
2108         is only a thing if you use threaded scrolling. Ideally more of the ScrollingCoordinator code
2109         would also have #if ENABLE(SCROLLING_THREAD) but that can be done later.
2110
2111         * page/scrolling/AsyncScrollingCoordinator.cpp:
2112         (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
2113         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2114         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
2115         (WebCore::ScrollingStateFrameScrollingNode::setPropertyChangedBitsAfterReattach):
2116         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
2117         (WebCore::ScrollingStateFrameScrollingNode::setSynchronousScrollingReasons): Deleted.
2118         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2119         * page/scrolling/ScrollingStateScrollingNode.cpp:
2120         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
2121         (WebCore::ScrollingStateScrollingNode::setPropertyChangedBitsAfterReattach):
2122         (WebCore::ScrollingStateScrollingNode::setSynchronousScrollingReasons):
2123         (WebCore::ScrollingStateScrollingNode::dumpProperties const):
2124         * page/scrolling/ScrollingStateScrollingNode.h:
2125         (WebCore::ScrollingStateScrollingNode::synchronousScrollingReasons const):
2126         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2127         (WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
2128         (WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
2129         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2130         * page/scrolling/ScrollingTreeScrollingNode.cpp:
2131         (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
2132         (WebCore::ScrollingTreeScrollingNode::dumpProperties const):
2133         * page/scrolling/ScrollingTreeScrollingNode.h:
2134
2135 2020-03-06  Simon Fraser  <simon.fraser@apple.com>
2136
2137         Make it possible to safely access CALayers and PlatformCALayerCocoa objects on the scrolling thread
2138         https://bugs.webkit.org/show_bug.cgi?id=208672
2139
2140         Reviewed by Antti Koivisto.
2141
2142         Async overflow/frame scrolling on macOS is going to hit-test through the CALayer tree on the
2143         scrolling thread, and access PlatformCALayers that hang off CALayers. We therefore have to ensure
2144         that those layers are not getting mutated while hit-testing.
2145
2146         We only touch PlatformCALayers and CALayers through two codepaths: GraphicsLayer::flushCompositingState()
2147         when pushing GraphicsLayer changes to CA, and when destroying GraphicsLayers which tears down their associated
2148         PlatformCALayers (the CALayers remain parented in the tree).
2149
2150         To prevent a PlatformCALayer from being destroyed while being accessed on the scrolling thread, we make
2151         it ThreadSafeRefCounted<>, and lock around fetching thePlatformCALayer from the layerToPlatformLayerMap() which
2152         retains it.
2153
2154         To prevent the CALayer/PlatformCALayer trees being mutated during layer flushing, we lock around 
2155         rootLayer->flushCompositingState() in RenderLayerCompositor::flushPendingLayerChanges().
2156
2157         The lock is owned by ScrollingTreeMac.
2158
2159         * page/scrolling/AsyncScrollingCoordinator.h:
2160         (WebCore::LayerTreeHitTestLocker::LayerTreeHitTestLocker):
2161         (WebCore::LayerTreeHitTestLocker::~LayerTreeHitTestLocker):
2162         * page/scrolling/ScrollingTree.h:
2163         (WebCore::ScrollingTree::lockLayersForHitTesting):
2164         (WebCore::ScrollingTree::unlockLayersForHitTesting):
2165         * page/scrolling/mac/ScrollingTreeMac.h:
2166         * page/scrolling/mac/ScrollingTreeMac.mm:
2167         (ScrollingTreeMac::lockLayersForHitTesting):
2168         (ScrollingTreeMac::unlockLayersForHitTesting):
2169         * platform/graphics/ca/PlatformCALayer.h:
2170         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2171         (WebCore::layerToPlatformLayerMapMutex):
2172         (WebCore::PlatformCALayer::platformCALayerForLayer):
2173         * rendering/RenderLayerCompositor.cpp:
2174         (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
2175
2176 2020-03-06  Simon Fraser  <simon.fraser@apple.com>
2177
2178         Put an event region on scroll container layers
2179         https://bugs.webkit.org/show_bug.cgi?id=208684
2180
2181         Reviewed by Antti Koivisto.
2182         
2183         Hit-testing through the CALayer tree on macOS, where we don't have scroll views for overflow,
2184         is simpler if scroll container layers have an event region that just represents the bounds of
2185         the layer. These regions are harmless to have on iOS too.
2186
2187         This patch adds them for overflow scroll, and for m_clipLayer which is the scroll container
2188         layer for scrollable subframes.
2189
2190         Tests: fast/scrolling/mac/event-region-scrolled-contents-layer.html
2191                fast/scrolling/mac/event-region-subframe.html
2192
2193         * rendering/RenderLayerBacking.cpp:
2194         (WebCore::RenderLayerBacking::updateEventRegion):
2195         * rendering/RenderLayerCompositor.cpp:
2196         (WebCore::RenderLayerCompositor::updateScrollLayerClipping):
2197
2198 2020-03-06  Antti Koivisto  <antti@apple.com>
2199
2200         Reduce ThreadTimers maxDurationOfFiringTimers to 16ms
2201         https://bugs.webkit.org/show_bug.cgi?id=208717
2202
2203         Reviewed by Simon Fraser.
2204
2205         50ms -> 16ms.
2206
2207         This gives us more chances to do rendering updates. A/B testing says it is neutral for performance.
2208
2209         * platform/ThreadTimers.cpp:
2210
2211 2020-03-06  Kate Cheney  <katherine_cheney@apple.com>
2212
2213         Remove redundant flags in script evaluation checks
2214         https://bugs.webkit.org/show_bug.cgi?id=208609
2215         <rdar://problem/60058656>
2216         
2217         Reviewed by Brent Fulgham.
2218         
2219         hasNavigatedAwayFromAppBoundDomain only gets set in WebPageProxy if
2220         its a main frame navigation and In-App Browser privacy is enabled,
2221         we don't need to check again at the sites.
2222
2223         * bindings/js/ScriptController.cpp:
2224         (WebCore::ScriptController::executeScriptInWorld):
2225         * page/Frame.cpp:
2226         (WebCore::Frame::injectUserScriptImmediately):
2227
2228 2020-03-06  Zalan Bujtas  <zalan@apple.com>
2229
2230         [LFC][TFC] Absolute positioned table should generate a static table box inside the out-of-flow table wrapper box
2231         https://bugs.webkit.org/show_bug.cgi?id=208713
2232         <rdar://problem/60151358>
2233
2234         Reviewed by Antti Koivisto.
2235
2236         Test: fast/layoutformattingcontext/absolute-positioned-simple-table.html
2237
2238         <table style="position: absolute"> should generate
2239         1. absolute positioned table wrapper box
2240         2. static (inflow) positioned table box inside the out-of-flow table wrapper box. 
2241
2242         * layout/layouttree/LayoutTreeBuilder.cpp:
2243         (WebCore::Layout::TreeBuilder::buildTableStructure):
2244
2245 2020-03-05  Darin Adler  <darin@apple.com>
2246
2247         Improve some media code
2248         https://bugs.webkit.org/show_bug.cgi?id=208322
2249
2250         Reviewed by Anders Carlsson.
2251
2252         - TextTrack objects now take Document instead of ScriptExecutionContext.
2253         - Made more TextTrack functions private and protected.
2254         - Made TextTrack parsing functions use return values rather than out arguments.
2255         - Use references rather than pointers and Ref rather than RefPtr for non-null things.
2256         - Made MediaControlsHost use a WeakPtr instead of a raw pointer.
2257
2258         * Modules/mediacontrols/MediaControlsHost.cpp:
2259         (WebCore::alwaysOnKeyword): Made private to this file instead of exposed in header.
2260         (WebCore::manualKeyword): Ditto.
2261         (WebCore::MediaControlsHost::create): Take a reference instead of a pointer to
2262         the media element.
2263         (WebCore::MediaControlsHost::MediaControlsHost): Ditto, and make a weak pointer.
2264         (WebCore::MediaControlsHost::sortedTrackListForMenu): Added null check.
2265         (WebCore::MediaControlsHost::displayNameForTrack): Ditto.
2266         (WebCore::MediaControlsHost::captionMenuOffItem): Ditto.
2267         (WebCore::MediaControlsHost::captionMenuAutomaticItem): Ditto.
2268         (WebCore::MediaControlsHost::captionDisplayMode const): Ditto.
2269         (WebCore::MediaControlsHost::setSelectedTextTrack): Ditto.
2270         (WebCore::MediaControlsHost::textTrackContainer): Ditto.
2271         (WebCore::MediaControlsHost::allowsInlineMediaPlayback const): Ditto.
2272         (WebCore::MediaControlsHost::supportsFullscreen const): Ditto.
2273         (WebCore::MediaControlsHost::isVideoLayerInline const): Ditto.
2274         (WebCore::MediaControlsHost::isInMediaDocument const): Ditto.
2275         (WebCore::MediaControlsHost::setPreparedToReturnVideoLayerToInline): Ditto.
2276         (WebCore::MediaControlsHost::userGestureRequired const): Ditto.
2277         (WebCore::MediaControlsHost::shouldForceControlsDisplay const): Ditto.
2278         (WebCore::MediaControlsHost::externalDeviceDisplayName const): Ditto.
2279         (WebCore::MediaControlsHost::externalDeviceType const): Ditto.
2280         (WebCore::MediaControlsHost::controlsDependOnPageScaleFactor const): Ditto.
2281         (WebCore::MediaControlsHost::setControlsDependOnPageScaleFactor): Ditto.
2282         (WebCore::MediaControlsHost::generateUUID): Made a static member.
2283         (WebCore::MediaControlsHost::shadowRootCSSText): Ditto.
2284         (WebCore::MediaControlsHost::base64StringForIconNameAndType): Ditto.
2285         (WebCore::MediaControlsHost::formattedStringForDuration): Ditto.
2286         (WebCore::MediaControlsHost::compactMode const): Tweaked logic a bit.
2287
2288         * Modules/mediacontrols/MediaControlsHost.h: Made various member functions
2289         into static member functions, used references instead of pointers for
2290         things that are never null, used WeakPtr for m_mediaElement.
2291
2292         * Modules/mediasource/SourceBuffer.cpp:
2293         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveInitializationSegment):
2294         Document instead of ScriptExecutionContext.
2295
2296         * html/HTMLMediaElement.cpp:
2297         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Document instead of
2298         ScriptExecutionContext.
2299         (WebCore::HTMLMediaElement::updateCaptionContainer): Pass reference to
2300         MediaControlsHost::create.
2301         (WebCore::HTMLMediaElement::setSelectedTextTrack): Update since special items
2302         are now references rather than pointers.
2303         (WebCore::HTMLMediaElement::updateTextTrackDisplay): Pass reference.
2304         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): Ditto.
2305
2306         * html/HTMLTrackElement.cpp:
2307         (WebCore::HTMLTrackElement::parseAttribute): Removed setIsDefault function
2308         since the track can simply read the attribute out of the element instead.
2309
2310         * html/shadow/MediaControlElements.cpp:
2311         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
2312         Update since special items are now referencse rather than pointers.
2313
2314         * html/track/DataCue.cpp:
2315         (WebCore::DataCue::DataCue): Document instead of ScriptExecutionContext.
2316         (WebCore::DataCue::create): Moved these functions out of the header.
2317         * html/track/DataCue.h: Updated for the above.
2318         * html/track/DataCue.idl: Ditto.
2319
2320         * html/track/InbandDataTextTrack.cpp:
2321         (WebCore::InbandDataTextTrack::InbandDataTextTrack): Document instead
2322         of ScriptExecutionContext.
2323         (WebCore::InbandDataTextTrack::create): Ditto.
2324         (WebCore::InbandDataTextTrack::addDataCue): Ditto. Also use reference
2325         instead of pointer when calling hasCue.
2326         * html/track/InbandDataTextTrack.h: Updated for the above.
2327
2328         * html/track/InbandGenericTextTrack.cpp:
2329         (WebCore::InbandGenericTextTrack::InbandGenericTextTrack): Document
2330         instead of ScriptExecutionContext.
2331         (WebCore::InbandGenericTextTrack::create): Ditto.
2332         (WebCore::InbandGenericTextTrack::addGenericCue): Ditto. Also use
2333         reference instead of pointer when calling hasCue.
2334         (WebCore::InbandGenericTextTrack::parser): Ditto.
2335         (WebCore::InbandGenericTextTrack::newCuesParsed): Ditto. Also use
2336         return value from takeCues instead of out arguenmt from getNewCues.
2337         Also use reference instead of pointer when calling hasCue.
2338         (WebCore::InbandGenericTextTrack::newRegionsParsed): Ditto.
2339         * html/track/InbandGenericTextTrack.h: Update for above.
2340
2341         * html/track/InbandTextTrack.cpp:
2342         (WebCore::InbandTextTrack::create): Document instead of
2343         ScriptExecutionContext.
2344         (WebCore::InbandTextTrack::InbandTextTrack): Ditto.
2345         * html/track/InbandTextTrack.h: Update for above.
2346
2347         * html/track/InbandWebVTTTextTrack.cpp:
2348         (WebCore::InbandWebVTTTextTrack::InbandWebVTTTextTrack): Document
2349         instead of ScriptExecutionContext.
2350         (WebCore::InbandWebVTTTextTrack::create): Ditto.
2351         (WebCore::InbandWebVTTTextTrack::parser): Ditto.
2352         (WebCore::InbandWebVTTTextTrack::newCuesParsed): Ditto. Also use
2353         return value from takeCues instead of out arguenmt from getNewCues.
2354         Also use reference instead of pointer when calling hasCue.
2355         (WebCore::InbandWebVTTTextTrack::newRegionsParsed): Ditto.
2356         * html/track/InbandWebVTTTextTrack.h: Update for above.
2357
2358         * html/track/LoadableTextTrack.cpp:
2359         (WebCore::LoadableTextTrack::create): Moved here from header.
2360         (WebCore::LoadableTextTrack::loadTimerFired): Document instead of
2361         ScriptExecutionContext.
2362         (WebCore::LoadableTextTrack::newRegionsAvailable): Use return value
2363         from getNewRegions instead of out argument.
2364         (WebCore::LoadableTextTrack::isDefault const): New implementation that
2365         does not rely on a data member; checks attribute on video element.
2366         * html/track/LoadableTextTrack.h: Updated for above changes.
2367
2368         * html/track/TextTrack.cpp:
2369         (WebCore::TextTrack::captionMenuOffItem): Return a reference rather
2370         than a pointer.
2371         (WebCore::TextTrack::captionMenuAutomaticItem): Ditto.
2372         (WebCore::TextTrack::create): Document rather than ScriptExecutionContext.
2373         (WebCore::TextTrack::document const): Added. For use by derived classes.
2374         (WebCore::TextTrack::addRegion): Ref rather than RefPtr.
2375         (WebCore::TextTrack::removeRegion): Reference rather than pointer.
2376         (WebCore::TextTrack::cueWillChange): Ditto.
2377         (WebCore::TextTrack::cueDidChange): Ditto.
2378         (WebCore::TextTrack::hasCue): Ditto.
2379
2380         * html/track/TextTrack.h: Removed declarations of non-existent
2381         disabledKeyword, hiddenKeyword, and showingKeyword functions.
2382         Made setKind, client, and hasCue protected. Made overrides of
2383         eventTargetInterface, scriptExecutionContext, and logClassName
2384         private. Removed setIsDefault. Updated for changes above.
2385
2386         * html/track/TextTrack.idl: Did what FIXME suggested, making the region
2387         parameters non-nullable. Passing null silently did nothing before. There
2388         is some small risk of website incompatibility if someone accidentally
2389         relied on this WebKit-specific behavior.
2390
2391         * html/track/TextTrackCue.cpp:
2392         (WebCore::TextTrackCue::create): Document instead of ScriptExecutionContext.
2393         (WebCore::TextTrackCue::TextTrackCue): Ditto.
2394         (WebCore::TextTrackCue::willChange): Pass reference.
2395         (WebCore::TextTrackCue::didChange): Ditto.
2396         * html/track/TextTrackCue.h: Update for above changes.
2397         * html/track/TextTrackCue.idl: Ditto.
2398
2399         * html/track/TextTrackCueGeneric.cpp:
2400         (WebCore::TextTrackCueGeneric::TextTrackCueGeneric): Update since the base
2401         class now takes an rvalue reference to the string.
2402         (WebCore::TextTrackCueGeneric::isOrderedBefore const): Use auto.
2403         (WebCore::TextTrackCueGeneric::isPositionedAbove const): Ditto.
2404
2405         * html/track/VTTCue.cpp:
2406         (WebCore::VTTCue::create): Document instead of ScriptExecutionContext.
2407         Also take String with an rvalue reference.
2408         (WebCore::VTTCue::VTTCue): Ditto.
2409         * html/track/VTTCue.h: Update for above changes.
2410         * html/track/VTTCue.idl: Ditto.
2411
2412         * html/track/WebVTTParser.cpp:
2413         (WebCore::WebVTTParser::WebVTTParser): Document instead of
2414         ScriptExecutionContext. References instead of pointers. Initialize
2415         m_state in class definition.
2416         (WebCore::WebVTTParser::takeCues): Renamed from getNewCues and changed
2417         to use a return value instead of an out argument.
2418         (WebCore::WebVTTParser::takeRegions): Ditto.
2419         (WebCore::WebVTTParser::takeStyleSheets): Ditto.
2420         (WebCore::WebVTTParser::parseCueData): Remove null check of m_client.
2421         (WebCore::WebVTTParser::parse): Ditto.
2422         (WebCore::WebVTTParser::collectWebVTTBlock): Ditto.
2423         (WebCore::WebVTTParser::checkAndCreateRegion): Pass document.
2424         (WebCore::WebVTTParser::checkAndStoreRegion): Use
2425         Vector::removeFirstMatching instead of Vector::removeFirst.
2426         (WebCore::WebVTTParser::createNewCue): Remove null check of m_client.
2427         * html/track/WebVTTParser.h: Update for above changes.
2428
2429         * loader/TextTrackLoader.cpp:
2430         (WebCore::TextTrackLoader::TextTrackLoader): Document instead of
2431         ScriptExecutionContext. References instead of pointers. Initialize
2432         data members in in class definition.
2433         (WebCore::TextTrackLoader::processNewCueData): Pass references.
2434         (WebCore::TextTrackLoader::corsPolicyPreventedLoad): Use m_document.
2435         (WebCore::TextTrackLoader::load): Ditto.
2436         (WebCore::TextTrackLoader::getNewCues): Use takeCues.
2437         (WebCore::TextTrackLoader::getNewRegions): Changed to return a vector
2438         instead of using an out argument. Use takeRegions.
2439         (WebCore::TextTrackLoader::getNewStyleSheets): Ditto.
2440         * loader/TextTrackLoader.h: Updated for the above.
2441
2442         * page/CaptionUserPreferences.cpp:
2443         (WebCore::trackDisplayName): Updated since these are references.
2444         (WebCore::CaptionUserPreferences::mediaSelectionOptionForTrack const): Ditto.
2445         (WebCore::CaptionUserPreferences::sortedTrackListForMenu): Ditto.
2446         * page/CaptionUserPreferencesMediaAF.cpp:
2447         (WebCore::trackDisplayName): Ditto.
2448         (WebCore::CaptionUserPreferencesMediaAF::sortedTrackListForMenu): Ditto.
2449         * platform/cocoa/PlaybackSessionModelMediaElement.mm:
2450         (WebCore::PlaybackSessionModelMediaElement::selectLegibleMediaOption): Ditto.
2451         (WebCore::PlaybackSessionModelMediaElement::legibleMediaSelectedIndex const):
2452         Updated to use references rather than pointers. Refactored the logic to
2453         use Optional and nested if statements to make the algorithm clearer.
2454
2455 2020-03-05  Simon Fraser  <simon.fraser@apple.com>
2456
2457         Use an OptionSet<> for SynchronousScrollingReasons
2458         https://bugs.webkit.org/show_bug.cgi?id=208697
2459
2460         Reviewed by Antti Koivisto.
2461
2462         Convert SynchronousScrollingReasons to an OptionSet<SynchronousScrollingReason>.
2463
2464         * page/PerformanceLoggingClient.cpp:
2465         (WebCore::PerformanceLoggingClient::synchronousScrollingReasonsAsString):
2466         * page/PerformanceLoggingClient.h:
2467         * page/scrolling/AsyncScrollingCoordinator.cpp:
2468         (WebCore::AsyncScrollingCoordinator::setSynchronousScrollingReasons):
2469         (WebCore::AsyncScrollingCoordinator::reportSynchronousScrollingReasonsChanged):
2470         * page/scrolling/AsyncScrollingCoordinator.h:
2471         * page/scrolling/ScrollingCoordinator.cpp:
2472         (WebCore::ScrollingCoordinator::synchronousScrollingReasons const):
2473         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously const):
2474         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
2475         * page/scrolling/ScrollingCoordinator.h:
2476         (WebCore::ScrollingCoordinator::setSynchronousScrollingReasons):
2477         * page/scrolling/ScrollingCoordinatorTypes.h:
2478         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
2479         (WebCore::ScrollingStateFrameScrollingNode::setSynchronousScrollingReasons):
2480         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties const):
2481         * page/scrolling/ScrollingStateFrameScrollingNode.h:
2482         * page/scrolling/ScrollingTree.h:
2483         (WebCore::ScrollingTree::reportSynchronousScrollingReasonsChanged):
2484         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
2485         (WebCore::ScrollingTreeFrameScrollingNode::dumpProperties const):
2486         * page/scrolling/ScrollingTreeFrameScrollingNode.h:
2487         * page/scrolling/ThreadedScrollingTree.cpp:
2488         (WebCore::ThreadedScrollingTree::reportSynchronousScrollingReasonsChanged):
2489         * page/scrolling/ThreadedScrollingTree.h:
2490
2491 2020-03-06  Antoine Quint  <graouts@webkit.org>
2492
2493         Remove the experimental flag for Pointer Events
2494         https://bugs.webkit.org/show_bug.cgi?id=208655
2495         <rdar://problem/60090545>
2496
2497         Reviewed by Dean Jackson.
2498
2499         * dom/Element.cpp:
2500         (WebCore::dispatchPointerEventIfNeeded):
2501         (WebCore::Element::removedFromAncestor):
2502         * dom/Element.idl:
2503         * dom/NavigatorMaxTouchPoints.idl:
2504         * dom/PointerEvent.idl:
2505         * page/RuntimeEnabledFeatures.h:
2506         (WebCore::RuntimeEnabledFeatures::setPointerEventsEnabled): Deleted.
2507         (WebCore::RuntimeEnabledFeatures::pointerEventsEnabled const): Deleted.
2508         * style/StyleTreeResolver.cpp:
2509         (WebCore::Style::TreeResolver::resolveElement):
2510
2511 2020-03-06  Enrique Oca├▒a Gonz├ílez  <eocanha@igalia.com>
2512
2513         [GStreamer] Streaming aac/mp3 audio doesn't always work
2514         https://bugs.webkit.org/show_bug.cgi?id=205801
2515
2516         Reviewed by Philippe Normand.
2517
2518         Don't rely on response size to replace Content-Length. This may break streaming videos,
2519         which should always have an Infinite duration.
2520
2521         This patch is based on the fix found by Philippe Normand <pnormand@igalia.com>
2522
2523         Test: http/tests/media/video-no-content-length-stall.html
2524
2525         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2526         (CachedResourceStreamingClient::dataReceived):
2527
2528 2020-03-06  Frederic Wang  <fwang@igalia.com>
2529
2530         [intersection-observer] Accept a Document as an explicit root
2531         https://bugs.webkit.org/show_bug.cgi?id=208047
2532
2533         Reviewed by Simon Fraser.
2534
2535         This patch introduces a recent enhancement to the Intersection Observer specification: the
2536         root initialization parameter can be explicitly be set to a Document. The typical use case
2537         is when document is an iframe. See https://github.com/w3c/IntersectionObserver/issues/372
2538
2539         This patch also updates the way Element's intersection observer data is handled so that it is
2540         more consistent with the explicit Document root case introduced here.
2541
2542         Test: imported/w3c/web-platform-tests/intersection-observer/document-scrolling-element-root.html
2543
2544         * dom/Document.cpp:
2545         (WebCore::Document::~Document): Notify observers about our desctruction.
2546         (WebCore::Document::updateIntersectionObservations): Use new method name. This does not
2547         require null-check because ensureIntersectionObserverData() has been called in
2548         IntersectionObserver::observe().
2549         (WebCore::Document::ensureIntersectionObserverData): Return reference to intersection
2550         observer data for this document, creating one if it does not exist.
2551         * dom/Document.h: Add new intersection observer data, used for documents that are explicit
2552         intersection observer roots.
2553         (WebCore::Document::intersectionObserverDataIfExists): Return pointer to intersection
2554         observer data or null if it does not exist.
2555         * dom/Element.cpp:
2556         (WebCore::Element::didMoveToNewDocument): Use new method name.
2557         (WebCore::Element::disconnectFromIntersectionObservers): Ditto and null-check weak refs.
2558         (WebCore::Element::intersectionObserverDataIfExists): Rename method to match Document's one
2559         and be more explicit that it will be null if it does not exist.
2560         (WebCore::Element::intersectionObserverData): Renamed.
2561         * dom/Element.h: Renamed.
2562         * html/LazyLoadImageObserver.cpp:
2563         (WebCore::LazyLoadImageObserver::intersectionObserver): Initialize with a WTF::Optional
2564         after API change.
2565         * page/IntersectionObserver.cpp:
2566         (WebCore::IntersectionObserver::create): Pass a Node* root, which can be null (implicit
2567         root), Document* or Element* (explicit roots). This is determined from init.root.
2568         (WebCore::IntersectionObserver::IntersectionObserver): Handle the case of explicit Document
2569         root.
2570         (WebCore::IntersectionObserver::~IntersectionObserver): Ditto and update method name for
2571         the explicit Element case. Note that in both explicit root cases the corresponding
2572         ensureIntersectionObserverData() method had been called in the constructor so they can
2573         be safely deferenced.
2574         (WebCore::IntersectionObserver::removeTargetRegistration): Use new method name.
2575         * page/IntersectionObserver.h: Update comment and code now that explicit root is a Node* and
2576         IntersectionObserver::Init::root is either an Element or a Document or null.
2577         (WebCore::IntersectionObserver::root const): Ditto.
2578         (): Deleted.
2579         * page/IntersectionObserver.idl: Update IDL to match the spec IntersectionObserver::root
2580         is a nullable Node and IntersectionObserverInit::root a nullable Element or Document.
2581
2582 2020-03-06  Yusuke Suzuki  <ysuzuki@apple.com>
2583
2584         Put all generated JSCells in WebCore into IsoSubspace
2585         https://bugs.webkit.org/show_bug.cgi?id=205107
2586
2587         Reviewed by Saam Barati.
2588
2589         This patch automatically generates IsoSubspace per WebCore DOM object type.
2590         In preprocess-idls.pl, we collect all the DOM object types and generate DOMIsoSubspaces class,
2591         which contains all the necessary IsoSubspaces. And it is held by WebCoreJSClientData.
2592
2593         CodeGeneratorJS.pm starts putting `subspaceFor` and `subspaceForImpl` for each JS DOM wrapper classes.
2594         And we dynamically create IsoSubspace and set it to WebCoreJSClientData's DOMIsoSubspaces. At the same
2595         time, we register IsoSubspace to m_outputConstraintSpaces if the class has output constraits callback.
2596
2597         From the previous patch, we fixed outputConstraintSpaces bug, which is returning a copy of Vector<>
2598         instead of a reference to the member Vector.
2599
2600         * CMakeLists.txt:
2601         * DerivedSources-output.xcfilelist:
2602         * DerivedSources.make:
2603         * WebCoreMacros.cmake:
2604         * bindings/js/JSDOMWrapper.cpp:
2605         (WebCore::outputConstraintSubspaceFor): Deleted.
2606         * bindings/js/JSDOMWrapper.h:
2607         * bindings/js/WebCoreJSClientData.cpp:
2608         (WebCore::JSVMClientData::JSVMClientData):
2609         * bindings/js/WebCoreJSClientData.h:
2610         (WebCore::JSVMClientData::forEachOutputConstraintSpace):
2611         (WebCore::JSVMClientData::subspaces):
2612         (WebCore::JSVMClientData::outputConstraintSpace): Deleted.
2613         (WebCore::JSVMClientData::subspaceForJSDOMWindow): Deleted.
2614         (WebCore::JSVMClientData::subspaceForJSDedicatedWorkerGlobalScope): Deleted.
2615         (WebCore::JSVMClientData::subspaceForJSRemoteDOMWindow): Deleted.
2616         (WebCore::JSVMClientData::subspaceForJSWorkerGlobalScope): Deleted.
2617         (WebCore::JSVMClientData::subspaceForJSServiceWorkerGlobalScope): Deleted.
2618         (WebCore::JSVMClientData::subspaceForJSPaintWorkletGlobalScope): Deleted.
2619         (WebCore::JSVMClientData::subspaceForJSWorkletGlobalScope): Deleted.
2620         * bindings/scripts/CodeGeneratorJS.pm:
2621         (GenerateHeader):
2622         (GenerateImplementation):
2623         * bindings/scripts/generate-bindings-all.pl:
2624         * bindings/scripts/preprocess-idls.pl:
2625         * bindings/scripts/test/JS/JSInterfaceName.cpp:
2626         (WebCore::JSInterfaceName::subspaceForImpl):
2627         * bindings/scripts/test/JS/JSInterfaceName.h:
2628         (WebCore::JSInterfaceName::subspaceFor):
2629         * bindings/scripts/test/JS/JSMapLike.cpp:
2630         (WebCore::JSMapLike::subspaceForImpl):
2631         * bindings/scripts/test/JS/JSMapLike.h:
2632         (WebCore::JSMapLike::subspaceFor):
2633         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
2634         (WebCore::JSReadOnlyMapLike::subspaceForImpl):
2635         * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
2636         (WebCore::JSReadOnlyMapLike::subspaceFor):
2637         * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
2638         (WebCore::JSReadOnlySetLike::subspaceForImpl):
2639         * bindings/scripts/test/JS/JSReadOnlySetLike.h:
2640         (WebCore::JSReadOnlySetLike::subspaceFor):
2641         * bindings/scripts/test/JS/JSSetLike.cpp:
2642         (WebCore::JSSetLike::subspaceForImpl):
2643         * bindings/scripts/test/JS/JSSetLike.h:
2644         (WebCore::JSSetLike::subspaceFor):
2645         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2646         (WebCore::JSTestActiveDOMObject::subspaceForImpl):
2647         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2648         (WebCore::JSTestActiveDOMObject::subspaceFor):
2649         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
2650         (WebCore::JSTestCEReactions::subspaceForImpl):
2651         * bindings/scripts/test/JS/JSTestCEReactions.h:
2652         (WebCore::JSTestCEReactions::subspaceFor):
2653         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
2654         (WebCore::JSTestCEReactionsStringifier::subspaceForImpl):
2655         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
2656         (WebCore::JSTestCEReactionsStringifier::subspaceFor):
2657         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
2658         (WebCore::JSTestCallTracer::subspaceForImpl):
2659         * bindings/scripts/test/JS/JSTestCallTracer.h:
2660         (WebCore::JSTestCallTracer::subspaceFor):
2661         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2662         (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceForImpl):
2663         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
2664         (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceFor):
2665         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
2666         (WebCore::JSTestDOMJIT::subspaceForImpl):
2667         * bindings/scripts/test/JS/JSTestDOMJIT.h:
2668         (WebCore::JSTestDOMJIT::subspaceFor):
2669         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
2670         (WebCore::JSTestEnabledBySetting::subspaceForImpl):
2671         * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
2672         (WebCore::JSTestEnabledBySetting::subspaceFor):
2673         * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
2674         (WebCore::JSTestEnabledForContext::subspaceForImpl):
2675         * bindings/scripts/test/JS/JSTestEnabledForContext.h:
2676         (WebCore::JSTestEnabledForContext::subspaceFor):
2677         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2678         (WebCore::JSTestEventConstructor::subspaceForImpl):
2679         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2680         (WebCore::JSTestEventConstructor::subspaceFor):
2681         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2682         (WebCore::JSTestEventTarget::subspaceForImpl):
2683         * bindings/scripts/test/JS/JSTestEventTarget.h:
2684         (WebCore::JSTestEventTarget::subspaceFor):
2685         * bindings/scripts/test/JS/JSTestException.cpp:
2686         (WebCore::JSTestException::subspaceForImpl):
2687         * bindings/scripts/test/JS/JSTestException.h:
2688         (WebCore::JSTestException::subspaceFor):
2689         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2690         (WebCore::JSTestGenerateIsReachable::subspaceForImpl):
2691         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2692         (WebCore::JSTestGenerateIsReachable::subspaceFor):
2693         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2694         (WebCore::JSTestGlobalObject::subspaceForImpl):
2695         * bindings/scripts/test/JS/JSTestGlobalObject.h:
2696         (WebCore::JSTestGlobalObject::subspaceFor):
2697         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
2698         (WebCore::JSTestIndexedSetterNoIdentifier::subspaceForImpl):
2699         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
2700         (WebCore::JSTestIndexedSetterNoIdentifier::subspaceFor):
2701         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
2702         (WebCore::JSTestIndexedSetterThrowingException::subspaceForImpl):
2703         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
2704         (WebCore::JSTestIndexedSetterThrowingException::subspaceFor):
2705         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
2706         (WebCore::JSTestIndexedSetterWithIdentifier::subspaceForImpl):
2707         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
2708         (WebCore::JSTestIndexedSetterWithIdentifier::subspaceFor):
2709         * bindings/scripts/test/JS/JSTestInterface.cpp:
2710         (WebCore::JSTestInterface::subspaceForImpl):
2711         * bindings/scripts/test/JS/JSTestInterface.h:
2712         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
2713         (WebCore::JSTestInterfaceLeadingUnderscore::subspaceForImpl):
2714         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
2715         (WebCore::JSTestInterfaceLeadingUnderscore::subspaceFor):
2716         * bindings/scripts/test/JS/JSTestIterable.cpp:
2717         (WebCore::JSTestIterable::subspaceForImpl):
2718         * bindings/scripts/test/JS/JSTestIterable.h:
2719         (WebCore::JSTestIterable::subspaceFor):
2720         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2721         (WebCore::JSTestJSBuiltinConstructor::subspaceForImpl):
2722         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
2723         (WebCore::JSTestJSBuiltinConstructor::subspaceFor):
2724         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2725         (WebCore::JSTestMediaQueryListListener::subspaceForImpl):
2726         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2727         (WebCore::JSTestMediaQueryListListener::subspaceFor):
2728         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
2729         (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceForImpl):
2730         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
2731         (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceFor):
2732         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
2733         (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceForImpl):
2734         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
2735         (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceFor):
2736         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
2737         (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceForImpl):
2738         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
2739         (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceFor):
2740         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2741         (WebCore::JSTestNamedConstructor::subspaceForImpl):
2742         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2743         (WebCore::JSTestNamedConstructor::subspaceFor):
2744         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
2745         (WebCore::JSTestNamedDeleterNoIdentifier::subspaceForImpl):
2746         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
2747         (WebCore::JSTestNamedDeleterNoIdentifier::subspaceFor):
2748         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
2749         (WebCore::JSTestNamedDeleterThrowingException::subspaceForImpl):
2750         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
2751         (WebCore::JSTestNamedDeleterThrowingException::subspaceFor):
2752         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
2753         (WebCore::JSTestNamedDeleterWithIdentifier::subspaceForImpl):
2754         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
2755         (WebCore::JSTestNamedDeleterWithIdentifier::subspaceFor):
2756         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
2757         (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceForImpl):
2758         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
2759         (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceFor):
2760         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
2761         (WebCore::JSTestNamedGetterCallWith::subspaceForImpl):
2762         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
2763         (WebCore::JSTestNamedGetterCallWith::subspaceFor):
2764         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
2765         (WebCore::JSTestNamedGetterNoIdentifier::subspaceForImpl):
2766         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.h:
2767         (WebCore::JSTestNamedGetterNoIdentifier::subspaceFor):
2768         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
2769         (WebCore::JSTestNamedGetterWithIdentifier::subspaceForImpl):
2770         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.h:
2771         (WebCore::JSTestNamedGetterWithIdentifier::subspaceFor):
2772         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
2773         (WebCore::JSTestNamedSetterNoIdentifier::subspaceForImpl):
2774         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.h:
2775         (WebCore::JSTestNamedSetterNoIdentifier::subspaceFor):
2776         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
2777         (WebCore::JSTestNamedSetterThrowingException::subspaceForImpl):
2778         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.h:
2779         (WebCore::JSTestNamedSetterThrowingException::subspaceFor):
2780         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
2781         (WebCore::JSTestNamedSetterWithIdentifier::subspaceForImpl):
2782         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.h:
2783         (WebCore::JSTestNamedSetterWithIdentifier::subspaceFor):
2784         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
2785         (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceForImpl):
2786         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.h:
2787         (WebCore::JSTestNamedSetterWithIndexedGetter::subspaceFor):
2788         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
2789         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceForImpl):
2790         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.h:
2791         (WebCore::JSTestNamedSetterWithIndexedGetterAndSetter::subspaceFor):
2792         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
2793         (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceForImpl):
2794         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.h:
2795         (WebCore::JSTestNamedSetterWithOverrideBuiltins::subspaceFor):
2796         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
2797         (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceForImpl):
2798         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.h:
2799         (WebCore::JSTestNamedSetterWithUnforgableProperties::subspaceFor):
2800         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
2801         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceForImpl):
2802         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.h:
2803         (WebCore::JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins::subspaceFor):
2804         * bindings/scripts/test/JS/JSTestNode.cpp:
2805         (WebCore::JSTestNode::subspaceForImpl):
2806         * bindings/scripts/test/JS/JSTestNode.h:
2807         * bindings/scripts/test/JS/JSTestObj.cpp:
2808         (WebCore::JSTestObj::subspaceForImpl):
2809         * bindings/scripts/test/JS/JSTestObj.h:
2810         (WebCore::JSTestObj::subspaceFor):
2811         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2812         (WebCore::JSTestOverloadedConstructors::subspaceForImpl):
2813         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2814         (WebCore::JSTestOverloadedConstructors::subspaceFor):
2815         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2816         (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceForImpl):
2817         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.h:
2818         (WebCore::JSTestOverloadedConstructorsWithSequence::subspaceFor):
2819         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2820         (WebCore::JSTestOverrideBuiltins::subspaceForImpl):
2821         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
2822         (WebCore::JSTestOverrideBuiltins::subspaceFor):
2823         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
2824         (WebCore::JSTestPluginInterface::subspaceForImpl):
2825         * bindings/scripts/test/JS/JSTestPluginInterface.h:
2826         (WebCore::JSTestPluginInterface::subspaceFor):
2827         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
2828         (WebCore::JSTestPromiseRejectionEvent::subspaceForImpl):
2829         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.h:
2830         (WebCore::JSTestPromiseRejectionEvent::subspaceFor):
2831         * bindings/scripts/test/JS/JSTestSerialization.cpp:
2832         (WebCore::JSTestSerialization::subspaceForImpl):
2833         * bindings/scripts/test/JS/JSTestSerialization.h:
2834         (WebCore::JSTestSerialization::subspaceFor):
2835         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
2836         (WebCore::JSTestSerializationIndirectInheritance::subspaceForImpl):
2837         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.h:
2838         (WebCore::JSTestSerializationIndirectInheritance::subspaceFor):
2839         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
2840         (WebCore::JSTestSerializationInherit::subspaceForImpl):
2841         * bindings/scripts/test/JS/JSTestSerializationInherit.h:
2842         (WebCore::JSTestSerializationInherit::subspaceFor):
2843         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
2844         (WebCore::JSTestSerializationInheritFinal::subspaceForImpl):
2845         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.h:
2846         (WebCore::JSTestSerializationInheritFinal::subspaceFor):
2847         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2848         (WebCore::JSTestSerializedScriptValueInterface::subspaceForImpl):
2849         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2850         (WebCore::JSTestSerializedScriptValueInterface::subspaceFor):
2851         * bindings/scripts/test/JS/JSTestStringifier.cpp:
2852         (WebCore::JSTestStringifier::subspaceForImpl):
2853         * bindings/scripts/test/JS/JSTestStringifier.h:
2854         (WebCore::JSTestStringifier::subspaceFor):
2855         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
2856         (WebCore::JSTestStringifierAnonymousOperation::subspaceForImpl):
2857         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.h:
2858         (WebCore::JSTestStringifierAnonymousOperation::subspaceFor):
2859         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
2860         (WebCore::JSTestStringifierNamedOperation::subspaceForImpl):
2861         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.h:
2862         (WebCore::JSTestStringifierNamedOperation::subspaceFor):
2863         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
2864         (WebCore::JSTestStringifierOperationImplementedAs::subspaceForImpl):
2865         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.h:
2866         (WebCore::JSTestStringifierOperationImplementedAs::subspaceFor):
2867         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
2868         (WebCore::JSTestStringifierOperationNamedToString::subspaceForImpl):
2869         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.h:
2870         (WebCore::JSTestStringifierOperationNamedToString::subspaceFor):
2871         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
2872         (WebCore::JSTestStringifierReadOnlyAttribute::subspaceForImpl):
2873         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.h:
2874         (WebCore::JSTestStringifierReadOnlyAttribute::subspaceFor):
2875         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
2876         (WebCore::JSTestStringifierReadWriteAttribute::subspaceForImpl):
2877         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.h:
2878         (WebCore::JSTestStringifierReadWriteAttribute::subspaceFor):
2879         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2880         (WebCore::JSTestTypedefs::subspaceForImpl):
2881         * bindings/scripts/test/JS/JSTestTypedefs.h:
2882         (WebCore::JSTestTypedefs::subspaceFor):
2883
2884 2020-03-06  Commit Queue  <commit-queue@webkit.org>
2885
2886         Unreviewed, rolling out r257950.
2887         https://bugs.webkit.org/show_bug.cgi?id=208704
2888
2889         causing debug failure (Requested by yusukesuzuki on #webkit).
2890
2891         Reverted changeset:
2892
2893         "Put all generated JSCells in WebCore into IsoSubspace"
2894         https://bugs.webkit.org/show_bug.cgi?id=205107
2895         https://trac.webkit.org/changeset/257950
2896
2897 2020-03-06  Michael Catanzaro  <mcatanzaro@gnome.org>
2898
2899         [WPE][GTK] Use Firefox user agent quirk more aggressively on Google Docs
2900         https://bugs.webkit.org/show_bug.cgi?id=208647
2901
2902         Reviewed by Carlos Garcia Campos.
2903
2904         I had previously determined that we need to send a Firefox user agent quirk to
2905         accounts.youtube.com to avoid unsupported browser warnings on Google Docs. Either the user
2906         agent check has since become more aggressive, or it somehow depends on factors I don't
2907         understand, but as of today it's no longer enough. We now need the quirk for docs.google.com
2908         as well.
2909
2910         * platform/UserAgentQuirks.cpp:
2911         (WebCore::urlRequiresFirefoxBrowser):
2912
2913 2020-03-05  Zalan Bujtas  <zalan@apple.com>
2914
2915         [LFC][TFC] An absolute positioned <table> should establish a table formatting context
2916         https://bugs.webkit.org/show_bug.cgi?id=208695
2917         <rdar://problem/60122473>
2918
2919         Reviewed by Antti Koivisto.
2920
2921         Not all type of content gets blockified when out-of-flow positioned or floated.
2922
2923         * layout/layouttree/LayoutBox.cpp:
2924         (WebCore::Layout::Box::establishesBlockFormattingContext const):
2925
2926 2020-02-29  Darin Adler  <darin@apple.com>
2927
2928         Simplify gradient parsing
2929         https://bugs.webkit.org/show_bug.cgi?id=208417
2930
2931         Reviewed by Anders Carlsson.
2932
2933         - Use Optional<> and invalid Color to represent unspecified positions and colors.
2934           This is simpler and easier to get right than separate booleans.
2935         - Simplified sorting of stops in legacy gradients to remove extra CSS value
2936           evaluation and unnecessary "sort in place" technique.
2937         - Rewrote equals functions for CSS gradient value classes. The new pattern is
2938           to compare all the data members that hold parsed CSS data, handling null
2939           correctly, since the parser won't set inappropriate ones. The old code had
2940           complex logic to only compare certain data members, which was unnecessary
2941           and hard to read to tell if it was correct.
2942         - Added some more use of WTFMove to cut down on reference count churn.
2943
2944         * css/CSSGradientValue.cpp:
2945         (WebCore::CSSGradientValue::image): Removed unneeded call to get().
2946         (WebCore::compareStops): Deleted.
2947         (WebCore::CSSGradientValue::sortStopsIfNeeded): Deleted.
2948         (WebCore::resolveStopColors): Take advantage of the fact that we know because
2949         of parsing rules that the only stops without colors are midpoints to drastically
2950         simplify this function to a trivial loop.
2951         (WebCore::CSSGradientValue::hasColorDerivedFromElement const): Added.
2952         Checks to see if any of the stop colors is derived from the element. The old
2953         code confusingly would store the answer to this in the stop, but only in the
2954         first stop with this property. Computing it without modifying the stop, and
2955         memoizing it in the gradient preserves the same performance characteristics
2956         as before without requiring a boolean in each stop in the stops vector.
2957         (WebCore::CSSGradientValue::gradientWithStylesResolved): Call the new
2958         hasColorDerivedFromElement function instead of having the logic here.
2959         (WebCore::LinearGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
2960         Update since GradientStop now has optional offsets. By the time this
2961         function is called they are all guaranteed to be filled in, so we can
2962         just use the * operator.
2963         (WebCore::RadialGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
2964         Ditto.
2965         (WebCore::ConicGradientAdapter::normalizeStopsAndEndpointsOutsideRange):
2966         Ditto.
2967         (WebCore::CSSGradientValue::computeStops): Moved the sorting of stops for
2968         the deprecated gradients here. Also updated since Gradient::ColorStop
2969         no longer uses "m_" prefixes on its public struct data members. Some
2970         simplification because we no longer need to explicitly set "specified"
2971         to true since it's no longer a separate boolean.
2972         (WebCore::positionFromValue): Handle a null pointer for value by returning
2973         0, which is what the caller was doing explicitly before. Use float
2974         instead of int for some internal computations that were mixing the two
2975         for no good reason.
2976         (WebCore::computeEndPoint): Removed null checks now that positionFromValue
2977         does them for us, turning this into a one-liner.
2978         (WebCore::CSSGradientValue::isCacheable const): Use hasColorDerivedFromElement.
2979         (WebCore::CSSGradientValue::knownToBeOpaque const): Removed unnnecessary
2980         checking the color both before and after when a color filter is involved.
2981         (WebCore::CSSGradientValue::equals const): Added. Shared by all the equals
2982         functions for derived classes.
2983         (WebCore::appendGradientStops): Updated for changes to CSSGradientColorStop.
2984         (WebCore::appendSpaceSeparatedOptionalCSSPtrText): Added template helper
2985         for writing two optional CSS values with a space between.
2986         (WebCore::writeColorStop): Ditto. Also converted to non-member function,
2987         removed unneeded isMidpoint check, use appendSpaceSeparatedOptionalCSSPtrText.
2988         (WebCore::CSSLinearGradientValue::customCSSText const): Call function
2989         members so we don't have to expose CSSGradientValue data members as
2990         protected things that can be accessed by derived classes. Some other
2991         small refactoring, such as getting rid of extra boolean wroteFirstStop.
2992         (WebCore::CSSLinearGradientValue::createGradient): Updated to use
2993         function members instead of protected data members.
2994         (WebCore::CSSLinearGradientValue::equals const): Compare all data
2995         members and use CSSGradientValue::equals, makes this a 1-liner.
2996         (WebCore::CSSRadialGradientValue::customCSSText const): Call function
2997         members as described above and use appendSpaceSeparatedOptionalCSSPtrText.
2998         (WebCore::CSSRadialGradientValue::createGradient): Ditto.
2999         (WebCore::CSSRadialGradientValue::equals const): Compare all data
3000         members and use CSSGradientValue::equals.
3001         (WebCore::CSSConicGradientValue::customCSSText const): Call function
3002         members as described above and use appendSpaceSeparatedOptionalCSSPtrText.
3003         (WebCore::CSSConicGradientValue::createGradient): Ditto.
3004         (WebCore::CSSConicGradientValue::equals const): Compare all data
3005         members and use CSSGradientValue::equals, makes this a 1-liner.
3006
3007         * css/CSSGradientValue.h: Removed unneeded includes and forward declarations.
3008         Renamed CSSGradientColorStop data members to not use m_ prefix since this is
3009         a struct with public data members, and WebKit style says not to do that here.
3010         Removed m_colorIsDerivedFromElement and isMidpoint from CSSGradientColorStop,
3011         m_colorIsDerivedFromElement is now stored in the gradient, not the color stop,
3012         and midpoints are any color stop with null color. Replaced the
3013         CSSGradientValue::stopCount function, which mixed size_t and unsigned types,
3014         with a hasTwoStops function, which is all the caller needs. Converted the
3015         isFixedSize, fixedSize, isPending, and loadSubimages into static member
3016         functions: they don't do any work and so don't need an instance. Removed
3017         the unneeded gradient type argument to the cloning constructors. Removed
3018         m_stopsSorted and added m_hasColorDerivedFromElement and
3019         hasColorDerivedFromElement. Added getter functions that are protected so
3020         the data members themselves can be private. Removed sortStopsIfNeeded
3021         and writeColorStop.
3022
3023         * css/parser/CSSPropertyParserHelpers.cpp:
3024         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradientColorStop):
3025         Updated for CSSGradientColorStop member renaming.
3026         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedGradient): Use
3027         more WTFMove to save a little bit of reference count churn; in some cases
3028         that means moving the setter calls to the end of the function after all
3029         the error checking.
3030         (WebCore::CSSPropertyParserHelpers::consumeGradientColorStops): Ditto.
3031         Removed code to set isMidpoint and the FIXME-NEWPARSER comment that said
3032         it could be removed. Used lambda to cut down on repeated code. Changed
3033         parsing of stops with a second position to repeat the color instead of
3034         relying on later computation to repeat it; this is required so we can
3035         always treat an omitted color as a midpoint.
3036         (WebCore::CSSPropertyParserHelpers::consumeDeprecatedRadialGradient): Ditto.
3037         (WebCore::CSSPropertyParserHelpers::consumeRadialGradient): Ditto.
3038         (WebCore::CSSPropertyParserHelpers::consumeLinearGradient): Ditto.
3039         (WebCore::CSSPropertyParserHelpers::consumeConicGradient): Ditto.
3040
3041         * html/HTMLInputElement.cpp:
3042         (WebCore::autoFillStrongPasswordMaskImage): Updated for the renamed
3043         CSSGradientColorStop members, added a missing call to doneAddingStops,
3044         and use some WTFMove to cut down on reference count churn.
3045
3046 2020-03-05  Said Abou-Hallawa  <sabouhallawa@apple.com>
3047
3048         Remove the optimization for discarding no operation DisplayList items between Save and Restore items
3049         https://bugs.webkit.org/show_bug.cgi?id=208659
3050
3051         Reviewed by Simon Fraser.
3052
3053         This optimization is wrong in the case of drawing a canvas in general.
3054         The original implementation of the DisplayList assumes balanced Save/
3055         Restore GraphicsContext. In canvas a GraphicsConext 'save' can be issued
3056         in a frame and the corresponding restore is issued many frames later.
3057
3058         * platform/graphics/displaylists/DisplayList.cpp:
3059         (WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
3060         * platform/graphics/displaylists/DisplayList.h:
3061         * platform/graphics/displaylists/DisplayListItems.cpp:
3062         (WebCore::DisplayList::operator<<):
3063         * platform/graphics/displaylists/DisplayListItems.h:
3064         (WebCore::DisplayList::Save::encode const):
3065         (WebCore::DisplayList::Save::decode):
3066         (WebCore::DisplayList::Save::restoreIndex const): Deleted.
3067         (WebCore::DisplayList::Save::setRestoreIndex): Deleted.
3068         * platform/graphics/displaylists/DisplayListRecorder.cpp:
3069         (WebCore::DisplayList::Recorder::save):
3070         (WebCore::DisplayList::Recorder::restore):
3071         * platform/graphics/displaylists/DisplayListRecorder.h:
3072         (WebCore::DisplayList::Recorder::ContextState::cloneForSave const):
3073
3074 2020-03-05  Ben Nham  <nham@apple.com>
3075
3076         Add signposts for top-level execution of script elements
3077         https://bugs.webkit.org/show_bug.cgi?id=208548
3078
3079         Reviewed by Alex Christensen.
3080
3081         This adds signposts for initial global scope code evaluation of script elements. This makes
3082         it easier to understand what code is executing and blocking initial HTML parsing from
3083         completing.
3084
3085         In the long run, it would be nice to extend this to all top-level entry points back into JS
3086         (e.g. we should emit an interval if we re-enter a script via setTimeout). However, such
3087         probes have been removed in the past for being too noisy or slow (like in
3088         https://bugs.webkit.org/show_bug.cgi?id=187196), so let's just start with this for now.
3089
3090         Note that we do emit the script URL in the signpost, but the signpost is gated behind both
3091         an environment variable and an Apple-internal check to prevent accidentally leaking
3092         sensitive info.
3093
3094         * dom/ScriptElement.cpp:
3095         (WebCore::ScriptElement::executeClassicScript):
3096         (WebCore::ScriptElement::executeModuleScript):
3097
3098 2020-03-05  Zalan Bujtas  <zalan@apple.com>
3099
3100         [First paint] Fixed sized SVG content should taken into account when computing VNE status
3101         https://bugs.webkit.org/show_bug.cgi?id=208663
3102         <rdar://problem/60096896>
3103
3104         Reviewed by Simon Fraser.
3105
3106         Let's add fixed sized SVG to the list of content we track as VNE pixel count.
3107         It helps to reach VNE status sooner on youtube.com.
3108
3109         * rendering/updating/RenderTreeBuilder.cpp:
3110         (WebCore::RenderTreeBuilder::reportVisuallyNonEmptyContent):
3111
3112 2020-03-05  Yusuke Suzuki  <ysuzuki@apple.com>
3113
3114         Put all generated JSCells in WebCore into IsoSubspace
3115         https://bugs.webkit.org/show_bug.cgi?id=205107
3116
3117         Reviewed by Saam Barati.
3118
3119         This patch automatically generates IsoSubspace per WebCore DOM object type.
3120         In preprocess-idls.pl, we collect all the DOM object types and generate DOMIsoSubspaces class,
3121         which contains all the necessary IsoSubspaces. And it is held by WebCoreJSClientData.
3122
3123         CodeGeneratorJS.pm starts putting `subspaceFor` and `subspaceForImpl` for each JS DOM wrapper classes.
3124         And we dynamically create IsoSubspace and set it to WebCoreJSClientData's DOMIsoSubspaces. At the same
3125         time, we register IsoSubspace to m_outputConstraintSpaces if the class has output constraits callback.
3126
3127         We also remove stale assertion in JSEventListener. It is saying the following.
3128
3129             1. If the world is normal.
3130             2. If m_wrapper is gone.
3131             3. If m_jsFunction is not gone.
3132
3133         Then, the assertion hits. But this is wrong. We have no guarantee that m_jsFunction is gone when m_wrapper is gone.
3134         We have conservative GC. We have generational GC. Someone can hold m_jsFunction's instance. Everything makes it possible
3135         that m_jsFunction is live while m_wrapper is gone. This patch removes this assertion.
3136
3137         * CMakeLists.txt:
3138         * DerivedSources-output.xcfilelist:
3139         * DerivedSources.make:
3140         * WebCoreMacros.cmake:
3141         * bindings/js/JSDOMWrapper.cpp:
3142         (WebCore::outputConstraintSubspaceFor): Deleted.
3143         * bindings/js/JSDOMWrapper.h:
3144         * bindings/js/JSEventListener.h:
3145         (WebCore::JSEventListener::jsFunction const):
3146         * bindings/js/WebCoreJSClientData.cpp:
3147         (WebCore::JSVMClientData::JSVMClientData):
3148         * bindings/js/WebCoreJSClientData.h:
3149         (WebCore::JSVMClientData::forEachOutputConstraintSpace):
3150         (WebCore::JSVMClientData::subspaces):
3151         (WebCore::JSVMClientData::outputConstraintSpace): Deleted.
3152         (WebCore::JSVMClientData::subspaceForJSDOMWindow): Deleted.
3153         (WebCore::JSVMClientData::subspaceForJSDedicatedWorkerGlobalScope): Deleted.
3154         (WebCore::JSVMClientData::subspaceForJSRemoteDOMWindow): Deleted.
3155         (WebCore::JSVMClientData::subspaceForJSWorkerGlobalScope): Deleted.
3156         (WebCore::JSVMClientData::subspaceForJSServiceWorkerGlobalScope): Deleted.
3157         (WebCore::JSVMClientData::subspaceForJSPaintWorkletGlobalScope): Deleted.
3158         (WebCore::JSVMClientData::subspaceForJSWorkletGlobalScope): Deleted.
3159         * bindings/scripts/CodeGeneratorJS.pm:
3160         (GenerateHeader):
3161         (GenerateImplementation):
3162         * bindings/scripts/generate-bindings-all.pl:
3163         * bindings/scripts/preprocess-idls.pl:
3164         * bindings/scripts/test/JS/JSInterfaceName.cpp:
3165         (WebCore::JSInterfaceName::subspaceForImpl):
3166         * bindings/scripts/test/JS/JSInterfaceName.h:
3167         (WebCore::JSInterfaceName::subspaceFor):
3168         * bindings/scripts/test/JS/JSMapLike.cpp:
3169         (WebCore::JSMapLike::subspaceForImpl):
3170         * bindings/scripts/test/JS/JSMapLike.h:
3171         (WebCore::JSMapLike::subspaceFor):
3172         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
3173         (WebCore::JSReadOnlyMapLike::subspaceForImpl):
3174         * bindings/scripts/test/JS/JSReadOnlyMapLike.h:
3175         (WebCore::JSReadOnlyMapLike::subspaceFor):
3176         * bindings/scripts/test/JS/JSReadOnlySetLike.cpp:
3177         (WebCore::JSReadOnlySetLike::subspaceForImpl):
3178         * bindings/scripts/test/JS/JSReadOnlySetLike.h:
3179         (WebCore::JSReadOnlySetLike::subspaceFor):
3180         * bindings/scripts/test/JS/JSSetLike.cpp:
3181         (WebCore::JSSetLike::subspaceForImpl):
3182         * bindings/scripts/test/JS/JSSetLike.h:
3183         (WebCore::JSSetLike::subspaceFor):
3184         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3185         (WebCore::JSTestActiveDOMObject::subspaceForImpl):
3186         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
3187         (WebCore::JSTestActiveDOMObject::subspaceFor):
3188         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
3189         (WebCore::JSTestCEReactions::subspaceForImpl):
3190         * bindings/scripts/test/JS/JSTestCEReactions.h:
3191         (WebCore::JSTestCEReactions::subspaceFor):
3192         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
3193         (WebCore::JSTestCEReactionsStringifier::subspaceForImpl):
3194         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.h:
3195         (WebCore::JSTestCEReactionsStringifier::subspaceFor):
3196         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
3197         (WebCore::JSTestCallTracer::subspaceForImpl):
3198         * bindings/scripts/test/JS/JSTestCallTracer.h:
3199         (WebCore::JSTestCallTracer::subspaceFor):
3200         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
3201         (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceForImpl):
3202         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h:
3203         (WebCore::JSTestClassWithJSBuiltinConstructor::subspaceFor):
3204         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3205         (WebCore::JSTestDOMJIT::subspaceForImpl):
3206         * bindings/scripts/test/JS/JSTestDOMJIT.h:
3207         (WebCore::JSTestDOMJIT::subspaceFor):
3208         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
3209         (WebCore::JSTestEnabledBySetting::subspaceForImpl):
3210         * bindings/scripts/test/JS/JSTestEnabledBySetting.h:
3211         (WebCore::JSTestEnabledBySetting::subspaceFor):
3212         * bindings/scripts/test/JS/JSTestEnabledForContext.cpp:
3213         (WebCore::JSTestEnabledForContext::subspaceForImpl):
3214         * bindings/scripts/test/JS/JSTestEnabledForContext.h:
3215         (WebCore::JSTestEnabledForContext::subspaceFor):
3216         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3217         (WebCore::JSTestEventConstructor::subspaceForImpl):
3218         * bindings/scripts/test/JS/JSTestEventConstructor.h:
3219         (WebCore::JSTestEventConstructor::subspaceFor):
3220         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3221         (WebCore::JSTestEventTarget::subspaceForImpl):
3222         * bindings/scripts/test/JS/JSTestEventTarget.h:
3223         (WebCore::JSTestEventTarget::subspaceFor):
3224         * bindings/scripts/test/JS/JSTestException.cpp:
3225         (WebCore::JSTestException::subspaceForImpl):
3226         * bindings/scripts/test/JS/JSTestException.h:
3227         (WebCore::JSTestException::subspaceFor):
3228         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3229         (WebCore::JSTestGenerateIsReachable::subspaceForImpl):
3230         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
3231         (WebCore::JSTestGenerateIsReachable::subspaceFor):
3232         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
3233         (WebCore::JSTestGlobalObject::subspaceForImpl):
3234         * bindings/scripts/test/JS/JSTestGlobalObject.h:
3235         (WebCore::JSTestGlobalObject::subspaceFor):
3236         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
3237         (WebCore::JSTestIndexedSetterNoIdentifier::subspaceForImpl):
3238         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.h:
3239         (WebCore::JSTestIndexedSetterNoIdentifier::subspaceFor):
3240         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
3241         (WebCore::JSTestIndexedSetterThrowingException::subspaceForImpl):
3242         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.h:
3243         (WebCore::JSTestIndexedSetterThrowingException::subspaceFor):
3244         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
3245         (WebCore::JSTestIndexedSetterWithIdentifier::subspaceForImpl):
3246         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.h:
3247         (WebCore::JSTestIndexedSetterWithIdentifier::subspaceFor):
3248         * bindings/scripts/test/JS/JSTestInterface.cpp:
3249         (WebCore::JSTestInterface::subspaceForImpl):
3250         * bindings/scripts/test/JS/JSTestInterface.h:
3251         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
3252         (WebCore::JSTestInterfaceLeadingUnderscore::subspaceForImpl):
3253         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.h:
3254         (WebCore::JSTestInterfaceLeadingUnderscore::subspaceFor):
3255         * bindings/scripts/test/JS/JSTestIterable.cpp:
3256         (WebCore::JSTestIterable::subspaceForImpl):
3257         * bindings/scripts/test/JS/JSTestIterable.h:
3258         (WebCore::JSTestIterable::subspaceFor):
3259         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
3260         (WebCore::JSTestJSBuiltinConstructor::subspaceForImpl):
3261         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
3262         (WebCore::JSTestJSBuiltinConstructor::subspaceFor):
3263         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3264         (WebCore::JSTestMediaQueryListListener::subspaceForImpl):
3265         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
3266         (WebCore::JSTestMediaQueryListListener::subspaceFor):
3267         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
3268         (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceForImpl):
3269         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.h:
3270         (WebCore::JSTestNamedAndIndexedSetterNoIdentifier::subspaceFor):
3271         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
3272         (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceForImpl):
3273         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.h:
3274         (WebCore::JSTestNamedAndIndexedSetterThrowingException::subspaceFor):
3275         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
3276         (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceForImpl):
3277         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.h:
3278         (WebCore::JSTestNamedAndIndexedSetterWithIdentifier::subspaceFor):
3279         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3280         (WebCore::JSTestNamedConstructor::subspaceForImpl):
3281         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
3282         (WebCore::JSTestNamedConstructor::subspaceFor):
3283         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
3284         (WebCore::JSTestNamedDeleterNoIdentifier::subspaceForImpl):
3285         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.h:
3286         (WebCore::JSTestNamedDeleterNoIdentifier::subspaceFor):
3287         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
3288         (WebCore::JSTestNamedDeleterThrowingException::subspaceForImpl):
3289         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.h:
3290         (WebCore::JSTestNamedDeleterThrowingException::subspaceFor):
3291         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
3292         (WebCore::JSTestNamedDeleterWithIdentifier::subspaceForImpl):
3293         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.h:
3294         (WebCore::JSTestNamedDeleterWithIdentifier::subspaceFor):
3295         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
3296         (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceForImpl):
3297         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.h:
3298         (WebCore::JSTestNamedDeleterWithIndexedGetter::subspaceFor):
3299         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
3300         (WebCore::JSTestNamedGetterCallWith::subspaceForImpl):
3301         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.h:
3302         (WebCore::JSTestNamedGetterCallWith::subspaceFor):
3303         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
3304         (WebCore::JSTestNamedGetterNoIdentifier::subspaceForImpl):