ff19a88772f4c271f0442cc07ecfe1364c036003
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-08-08  Ryosuke Niwa  <rniwa@webkit.org>
2
3         REGRESSION (r228260): Events handled by input method invoke default event handler
4         https://bugs.webkit.org/show_bug.cgi?id=188370
5
6         Reviewed by Wenson Hsieh.
7
8         The bug was caused by the default event handler being invoked for the "virtual" keydown events
9         generated for input methods. Namely, when Japanese or Chinese input methods swallows TAB key,
10         WebKit should not invoke the default event handler and move the focus during input composition.
11
12         Fixed the bug by adding a new boolean on Event indicating whether the default event handler
13         should be invoked, and restoring the behavior prior to r228260 for these virtual keydown events.
14
15         Test: editing/input/press-tab-during-ime-composition.html
16
17         * dom/Event.h:
18         (WebCore::Event::isDefaultEventHandlerIgnored const): Added.
19         (WebCore::Event::setIsDefaultEventHandlerIgnored): Added.
20         * dom/EventDispatcher.cpp:
21         (WebCore::EventDispatcher::dispatchEvent): Don't invoke the default event handler if
22         isDefaultEventHandlerIgnored is set.
23         * page/EventHandler.cpp:
24         (WebCore::EventHandler::internalKeyEvent): Set isDefaultEventHandlerIgnored. This restores WebKit's
25         behavior prior to r228260.
26
27 2018-08-08  Justin Fan  <justin_fan@apple.com>
28
29         Prevent collectScreenProperties from crashing Base System
30         https://bugs.webkit.org/show_bug.cgi?id=188429
31         <rdar://problem/43075662>
32
33         Reviewed by Simon Fraser.
34
35         Adding some error-checking and early returns to further prevent calling CGLDescribeRenderer with invalid parameters.
36
37         Existing WebGL tests should cover; no expected change in behavior. Crash happened primarily on Base System.
38
39         * platform/mac/PlatformScreenMac.mm:
40         (WebCore::gpuIDForDisplayMask):
41
42 2018-08-08  Don Olmstead  <don.olmstead@sony.com>
43
44         [Curl] Surface additional NetworkLoadMetrics
45         https://bugs.webkit.org/show_bug.cgi?id=188391
46
47         Reviewed by Joseph Pecoraro.
48
49         * platform/network/curl/CurlContext.cpp:
50         (WebCore::CurlHandle::getNetworkLoadMetrics):
51
52 2018-08-08  Don Olmstead  <don.olmstead@sony.com>
53
54         [Nicosia] Add the Nicosia-specific PlatformLayer type alias
55         https://bugs.webkit.org/show_bug.cgi?id=188405
56         <rdar://problem/43039520>
57
58         Unreviewed build fix.
59
60         * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
61
62 2018-08-08  Simon Fraser  <simon.fraser@apple.com>
63
64         Add a WebKit2 logging channel for ActivityState
65         https://bugs.webkit.org/show_bug.cgi?id=188411
66
67         Reviewed by Tim Horton.
68
69         Add logging for ActivityState changes and the entrypoints that affect ActivityState.
70         
71         * Sources.txt:
72         * WebCore.xcodeproj/project.pbxproj:
73         * page/ActivityState.cpp: Added.
74         (WebCore::activityStateFlagsToString):
75         * page/ActivityState.h:
76
77 2018-08-08  Eric Carlson  <eric.carlson@apple.com>
78
79         Add LogArgument template for PlatformMediaSession::RemoteControlCommandType
80         https://bugs.webkit.org/show_bug.cgi?id=188314
81
82         Reviewed by Alex Christensen.
83
84         * html/HTMLMediaElement.cpp:
85         (WebCore::HTMLMediaElement::didReceiveRemoteControlCommand): Don't coerce to int for logging.
86
87         * platform/audio/PlatformMediaSession.cpp:
88         (WebCore::convertEnumerationToString): New.
89         (WebCore::PlatformMediaSession::didReceiveRemoteControlCommand): Log command.
90         * platform/audio/PlatformMediaSession.h:
91         (WTF::LogArgument<WebCore::PlatformMediaSession::RemoteControlCommandType>::toString):
92
93 2018-08-08  Joseph Pecoraro  <pecoraro@apple.com>
94
95         Web Inspector: XHR content sometimes shows as error even though load succeeded
96         https://bugs.webkit.org/show_bug.cgi?id=188385
97         <rdar://problem/42646160>
98
99         Reviewed by Devin Rousso.
100
101         * inspector/agents/InspectorNetworkAgent.cpp:
102         (WebCore::InspectorNetworkAgent::didReceiveData):
103         Avoid a double hash lookup in the common case.
104         Allow synchronous XHR to have text data appended in the normal case.
105         Allow synchronous XHR to set base64 encoded data right here for non-text data.
106
107         * inspector/NetworkResourcesData.h:
108         (WebCore::NetworkResourcesData::ResourceData::hasBufferedData const):
109         Getter to see if data is buffered or not for this resource.
110
111         * inspector/NetworkResourcesData.cpp:
112         (WebCore::NetworkResourcesData::maybeAddResourceData):
113         Return the updated ResourceData to avoid clients having to do a lookup.
114
115 2018-08-08  Sihui Liu  <sihui_liu@apple.com>
116
117         Assertion failed in Webcore::Process::setIdentifier()
118         https://bugs.webkit.org/show_bug.cgi?id=188404
119         <rdar://problem/43029137>
120
121         Reviewed by Chris Dumez.
122
123         App using both WebKit1 and WebKit may crash in WebKit initialization.
124
125         * platform/Process.cpp:
126         (WebCore::Process::setIdentifier):
127
128 2018-08-08  Charlie Turner  <cturner@igalia.com>
129
130         Add CENC sanitization
131         https://bugs.webkit.org/show_bug.cgi?id=188376
132
133         Reviewed by Xabier Rodriguez-Calvar.
134
135         This patch adds support for sanitizing the CENC initialization
136         data, to ensure there are no obviously bogus values in the
137         untrusted input from generateRequest, see
138         https://www.w3.org/TR/encrypted-media/#dom-mediakeysession-generaterequest
139         for more details on sanitization.
140
141         Tested by imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input.https.html
142
143         * Modules/encryptedmedia/InitDataRegistry.cpp: The diff looks a
144         bit wonky because I had to reorder extractKeyIDsCenc to come
145         before sanitizeCenc.
146         (WebCore::extractKeyIDsCenc): Added implementation, a nullopt
147         return value here indicates the parsing found an error in the box
148         values.
149         (WebCore::sanitizeCenc): Added implementation, if the box can be
150         parsed, return a copy of the buffer as before, otherwise an error
151         value.
152         * Sources.txt: Add the new PSSH box type.
153         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.cpp:
154         Added, parsing methods come from ISO/IEC 23001-7-2016 Section
155         8.1.1.
156         (WebCore::ISOProtectionSystemSpecificHeaderBox::parse): Ditto.
157         * platform/graphics/iso/ISOProtectionSystemSpecificHeaderBox.h: Ditto.
158         (WebCore::ISOProtectionSystemSpecificHeaderBox::boxTypeName): Ditto.
159         (WebCore::ISOProtectionSystemSpecificHeaderBox::systemID const): Ditto.
160         (WebCore::ISOProtectionSystemSpecificHeaderBox::keyIDs const):
161         Ditto.
162         (WebCore::ISOProtectionSystemSpecificHeaderBox::data const): Ditto.
163
164 2018-08-08  Zan Dobersek  <zdobersek@igalia.com>
165
166         [Nicosia] Add the Nicosia-specific PlatformLayer type alias
167         https://bugs.webkit.org/show_bug.cgi?id=188405
168
169         Reviewed by Carlos Garcia Campos.
170
171         Add a Nicosia-specific PlatformLayer type alias that points to the
172         Nicosia::PlatformLayer type. This is guarded by the USE(NICOSIA) macro,
173         which guards additional code in this patch but will be added to other
174         Nicosia-specific classes later.
175
176         To keep things buildable when USE(NICOSIA) is defined, additional
177         changes are made to classes that operate with platform layers.
178         Cairo-specific ImageBuffer implementation and the related
179         ImageBufferData class are modified to work with a Nicosia::ContentLayer
180         object. This object is using the TextureMapper-specific Impl class which
181         internally keeps a TextureMapperPlatformLayerProxy object. This way
182         we can reuse existing code that also works with an object of this type,
183         only difference is where the proxy object is kept. Main difference is in
184         the ImageBuffer::platformLayer() method, where pointer to the
185         Nicosia::ContentLayer object is returned when USE(NICOSIA) is enabled.
186
187         Similar approach is taked for the MediaPlayerPrivateGStreamerBase class.
188         When USE(NICOSIA) is enabled, a Nicosia::ContentLayer object is
189         constructed, and with the TextureMapper-specific Impl we again operate
190         on the TextureMapperPlatformLayerProxy object like before, so all of
191         the proxy-specific code is bundled into helper lambdas that operate on
192         the given proxy object. In the platformLayer() method, we again return
193         pointer to the Nicosia::ContentLayer object when USE(NICOSIA) is on.
194
195         For the GraphicsContext3D integration, we have to provide a separate
196         class that replicates most of the functionality currently present in the
197         TextureMapperGC3DPlatformLayer class. Main difference is that in the new
198         Nicosia::GC3DLayer class, a Nicosia::ContentLayer object is spawned with
199         the TextureMapper-specific Impl. The proxy object held by that Impl is
200         then again used to push new buffers into the rendering pipeline. As
201         before, pointer to the Nicosia::ContentLayer is returned in the
202         GraphicsContext3D::platformLayer() object.
203
204         Integration of the GraphicsContext3D class into Nicosia layering needs
205         further work in the future. Target should be providing a class that is
206         not specific to the TextureMapper layer. Additionally, when USE(NICOSIA)
207         is enabled, we remove the TextureMapperGC3DPlatformLayer class from
208         compilation since it depends on a PlatformLayer type alias to the
209         TextureMapperPlatformLayerProxyProvider class.
210
211         This patch also doesn't address the abundance of macros that this code
212         now uses. While USE(NICOSIA) is introduced, we have to work around
213         four additional macros in this code: USE(TEXTURE_MAPPER),
214         USE(TEXTURE_MAPPER_GL), USE(COORDINATED_GRAPHICS) and
215         USE(COORDINATED_GRAPHICS_THREADED). In a lot of places these are used
216         interchangeably, but they should be merged and simplified in use. I hope
217         to approach this once the USE(NICOSIA) functionality lands and is turned
218         on for ports that currently build with USE(COORDINATED_GRAPHICS).
219
220         * platform/TextureMapper.cmake:
221         * platform/graphics/GraphicsContext3D.h:
222         * platform/graphics/PlatformLayer.h:
223         * platform/graphics/cairo/ImageBufferCairo.cpp:
224         (WebCore::ImageBufferData::ImageBufferData):
225         (WebCore::ImageBufferData::~ImageBufferData):
226         (WebCore::ImageBufferData::swapBuffersIfNeeded):
227         (WebCore::ImageBuffer::platformLayer const):
228         * platform/graphics/cairo/ImageBufferDataCairo.h:
229         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
230         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
231         (WebCore::MediaPlayerPrivateGStreamerBase::~MediaPlayerPrivateGStreamerBase):
232         (WebCore::MediaPlayerPrivateGStreamerBase::platformLayer const):
233         (WebCore::MediaPlayerPrivateGStreamerBase::swapBuffersIfNeeded):
234         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
235         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
236         (WebCore::MediaPlayerPrivateGStreamerBase::flushCurrentBuffer):
237         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
238         * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.cpp: Added.
239         (Nicosia::GC3DLayer::GC3DLayer):
240         (Nicosia::GC3DLayer::~GC3DLayer):
241         (Nicosia::GC3DLayer::makeContextCurrent):
242         (Nicosia::GC3DLayer::platformContext):
243         (Nicosia::GC3DLayer::swapBuffersIfNeeded):
244         * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: Added.
245         (Nicosia::GC3DLayer::contentLayer const):
246         * platform/graphics/texmap/GraphicsContext3DTextureMapper.cpp:
247         (WebCore::GraphicsContext3D::GraphicsContext3D):
248         (WebCore::GraphicsContext3D::makeContextCurrent):
249         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
250         (WebCore::GraphicsContext3D::platformLayer const):
251         * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
252         * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
253         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
254         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
255         (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
256         (WebCore::CoordinatedGraphicsLayer::updatePlatformLayer):
257
258 2018-08-08  Manuel Rego Casasnovas  <rego@igalia.com>
259
260         [css-grid] Update behavior of percentage row tracks and gutters
261         https://bugs.webkit.org/show_bug.cgi?id=188403
262
263         Reviewed by Sergio Villar Senin.
264
265         The CSSWG decided to change how percentage row tracks and gutters
266         in a grid container with indefinite height are resolved.
267
268         The CSSWG issues are:
269         - https://github.com/w3c/csswg-drafts/issues/1921
270         - https://github.com/w3c/csswg-drafts/issues/509
271
272         So far they were resolved as "auto", like it happens with
273         percentage heights in regular blocks. But now they're going to behave
274         similar to what happens in the columns axis, they would be ignored
275         to compute the intrinsic height.
276         This causes that we need to repeat the track sizing algorithm
277         when we have a grid container with indefinite height
278         that has some percentage rows using the intrinsic height
279         calculated on the first pass. Then the percentages will be resolved
280         against the intrinsic height.
281
282         Tests: imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-second-pass-001.html
283                imported/w3c/web-platform-tests/css/css-grid/alignment/grid-content-alignment-second-pass-002.html
284                imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-rows-indefinite-height-001.html
285                imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-rows-indefinite-height-002.html
286
287         * rendering/GridTrackSizingAlgorithm.cpp:
288         (WebCore::GridTrackSizingAlgorithm::gridTrackSize const):
289         (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
290         (WebCore::GridTrackSizingAlgorithm::setup):
291         (WebCore::GridTrackSizingAlgorithm::reset):
292         * rendering/GridTrackSizingAlgorithm.h:
293         * rendering/RenderGrid.cpp:
294         (WebCore::RenderGrid::availableSpaceForGutters const):
295         (WebCore::RenderGrid::repeatTracksSizingIfNeeded):
296         (WebCore::RenderGrid::layoutBlock):
297
298 2018-08-07  Saam Barati  <sbarati@apple.com>
299
300         ResourceUsageOverlay should use physical footprint for its "Footprint" label
301         https://bugs.webkit.org/show_bug.cgi?id=188395
302
303         Reviewed by Simon Fraser.
304
305         Let's use physical footprint on Cocoa for the number we say is "footprint".
306         Before, we were just using the number of dirty pages multiplies by
307         page size. This number was an upper bound on footprint since it
308         doesn't take into account compressed memory.
309
310         * page/cocoa/ResourceUsageOverlayCocoa.mm:
311         (WebCore::ResourceUsageOverlay::platformDraw):
312
313 2018-08-05  Darin Adler  <darin@apple.com>
314
315         [Cocoa] More tweaks and refactoring to prepare for ARC
316         https://bugs.webkit.org/show_bug.cgi?id=188245
317
318         Reviewed by Dan Bernstein.
319
320         * bridge/objc/objc_instance.mm: Updated include for rename: FoundationSPI.h -> objcSPI.h.
321         * platform/ios/wak/WebCoreThread.mm: Ditto.
322
323 2018-08-07  Chris Dumez  <cdumez@apple.com>
324
325         navigator.sendBeacon does not work in pagehide callbacks
326         https://bugs.webkit.org/show_bug.cgi?id=188329
327
328         Reviewed by Alex Christensen.
329
330         Add support for sending beacons from pagehide event handlers. We normally do not allow loads because we're
331         about to enter PageCache. However, in case of Beacon, this is fine since it uses PingLoad and does not
332         WebCore to do the load.
333
334         Test: http/wpt/beacon/sendBeacon-in-pagehide.html
335
336         * loader/cache/CachedResource.cpp:
337         (WebCore::CachedResource::load):
338         - Allow Beacon loads to go through even if the document's pageCacheState is AboutToEnterPageCache (i.e.
339         we're firing the 'pagehide' event)
340         - Allow Becon loads to go though even if the FrameLoader's state is provisional (i.e. a load is pending)
341
342 2018-08-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
343
344         Allow href attribute without xlink on SVG elements
345         https://bugs.webkit.org/show_bug.cgi?id=153854
346
347         Reviewed by Dean Jackson.
348
349         SVG 2 has moved the href attribute from xlink namespace to svg namespace.
350         Instead of using xlink:href, svg:href should be used or simply use href 
351         if the svg namespace is defined.
352
353         See https://www.w3.org/TR/SVG2/linking.html#XLinkRefAttrs.
354
355         For backward compatibility, xlink:href will be treated as an alias to href
356         till it is acceptable to completely remove the support for the deprecated 
357         xlink:href.
358
359         Tests: svg/custom/href-svg-namespace-animate.svg
360                svg/custom/href-svg-namespace-dynamic.svg
361                svg/custom/href-svg-namespace-elements.html
362                svg/custom/href-svg-namespace-expected.svg
363                svg/custom/href-svg-namespace-static.svg
364
365         * dom/Element.cpp:
366         (WebCore::Element::absoluteLinkURL const):
367         * dom/Element.h:
368         (WebCore::Element::getAttribute const): This new template function with
369         template pack parameter QualifiedNames is added to return the first none
370         empty attribute value given a set of attributes' names. This should be
371         useful for deprecated attributes. When we decide to remove the support 
372         for the deprecated attribute, all we need is to remove it as a parameter
373         to getAttribute(). In this case, the none template function will be called.
374         * dom/VisitedLinkState.cpp:
375         (WebCore::linkAttribute):
376         * html/parser/XSSAuditor.cpp:
377         (WebCore::XSSAuditor::filterScriptToken):
378         * svg/SVGAElement.cpp:
379         (WebCore::SVGAElement::isURLAttribute const):
380         * svg/SVGAltGlyphElement.cpp:
381         (WebCore::SVGAltGlyphElement::hasValidGlyphElements const):
382         * svg/SVGCursorElement.cpp:
383         * svg/SVGDocumentExtensions.cpp:
384         (WebCore::SVGDocumentExtensions::rebuildElements):
385         (WebCore::SVGDocumentExtensions::rebuildAllElementReferencesForTarget):
386         * svg/SVGElement.cpp:
387         (WebCore::SVGElement::animatableAttributeForName):
388         * svg/SVGFEImageElement.cpp:
389         * svg/SVGFilterElement.cpp:
390         * svg/SVGFontFaceUriElement.cpp:
391         (WebCore::SVGFontFaceUriElement::srcValue const):
392         (WebCore::SVGFontFaceUriElement::parseAttribute):
393         (WebCore::SVGFontFaceUriElement::loadFont):
394         * svg/SVGForeignObjectElement.cpp:
395         * svg/SVGGlyphRefElement.cpp:
396         (WebCore::SVGGlyphRefElement::hasValidGlyphElement const):
397         * svg/SVGGradientElement.cpp:
398         * svg/SVGImageElement.cpp:
399         (WebCore::SVGImageElement::imageSourceURL const):
400         * svg/SVGMPathElement.cpp:
401         * svg/SVGPatternElement.cpp:
402         * svg/SVGScriptElement.h:
403         * svg/SVGTRefElement.cpp:
404         * svg/SVGTextPathElement.cpp:
405         * svg/SVGURIReference.cpp:
406         (WebCore::SVGURIReference::registerAttributes):
407         (WebCore::SVGURIReference::parseAttribute):
408         * svg/SVGUseElement.cpp:
409         (WebCore::SVGUseElement::expandUseElementsInShadowTree const):
410         * svg/animation/SVGSMILElement.cpp:
411         (WebCore::SVGSMILElement::isSupportedAttribute):
412         (WebCore::SVGSMILElement::svgAttributeChanged):
413         * svg/svgattrs.in:
414
415 2018-08-07  Ryosuke Niwa  <rniwa@webkit.org>
416
417         document.open and document.write must throw while the HTML parser is synchronously constructing a custom element
418         https://bugs.webkit.org/show_bug.cgi?id=187319
419         <rdar://problem/42843012>
420
421         Reviewed by Frédéric Wang.
422
423         Make document.open, document.write, document.writeln, and document.close throw InvalidStateError during
424         a synchronous custom element construction as specified:
425         https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
426         https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#throw-on-dynamic-markup-insertion-counter
427
428         Tests: fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html
429                fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html
430
431         * WebCore.xcodeproj/project.pbxproj:
432         * dom/Document.cpp:
433         (WebCore::Document::openForBindings): Throw InvalidStateError when m_throwOnDynamicMarkupInsertionCount is non-zero.
434         (WebCore::Document::closeForBindings): Ditto.
435         (WebCore::Document::write): Ditto.
436         (WebCore::Document::writeln): Ditto.
437         * dom/Document.h: Re-ordered the related instance variables in the order they appear in the spec, and updated spec URLs.
438         * dom/ThrowOnDynamicMarkupInsertionCountIncrementer.h: Added.
439         (WebCore::ThrowOnDynamicMarkupInsertionCountIncrementer): Added.
440         (WebCore::ThrowOnDynamicMarkupInsertionCountIncrementer::ThrowOnDynamicMarkupInsertionCountIncrementer):
441         (WebCore::ThrowOnDynamicMarkupInsertionCountIncrementer::~ThrowOnDynamicMarkupInsertionCountIncrementer):
442         * html/parser/HTMLDocumentParser.cpp:
443         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Instantiate ThrowOnDynamicMarkupInsertionCountIncrementer.
444
445 2018-08-07  Alex Christensen  <achristensen@webkit.org>
446
447         Use 1-byte enum class for Document::StandaloneStatus
448         https://bugs.webkit.org/show_bug.cgi?id=188352
449
450         Reviewed by Chris Dumez.
451
452         * dom/Document.cpp:
453         (WebCore::Document::setXMLStandalone):
454         * dom/Document.h:
455         (WebCore::Document::xmlStandalone const):
456         * editing/MarkupAccumulator.cpp:
457         (WebCore::MarkupAccumulator::appendXMLDeclaration):
458
459 2018-08-07  Rob Buis  <rbuis@igalia.com>
460
461         fetch() with subresource integrity crashes on zero length body
462         https://bugs.webkit.org/show_bug.cgi?id=184325
463
464         Reviewed by Alex Christensen.
465
466         Check that resourceBuffer() is non null before dereferencing.
467
468         Tests: http/tests/subresource-integrity/sri-fetch.js
469                http/tests/subresource-integrity/sri-fetch-worker.js
470
471         * loader/DocumentThreadableLoader.cpp:
472         (WebCore::DocumentThreadableLoader::didFinishLoading):
473
474 2018-08-07  Justin Fan  <justin_fan@apple.com>
475
476         Prevent querying for renderer info for disconnected or uninitialized displays
477         https://bugs.webkit.org/show_bug.cgi?id=188387
478         <rdar://problem/42588769>
479
480         Reviewed by Simon Fraser.
481
482         Calling CGL functions with a NULL displayMask crashes the process.
483
484         No tests; requires multiple displays.
485
486         * platform/mac/PlatformScreenMac.mm:
487         (WebCore::collectScreenProperties):
488
489 2018-08-06  Ryosuke Niwa  <rniwa@webkit.org>
490
491         document.open and document.write must throw while the HTML parser is synchronously constructing a custom element
492         https://bugs.webkit.org/show_bug.cgi?id=187319
493         <rdar://problem/42843012>
494
495         Reviewed by Frédéric Wang.
496
497         Make document.open, document.write, document.writeln, and document.close throw InvalidStateError during
498         a synchronous custom element construction as specified:
499         https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
500         https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#throw-on-dynamic-markup-insertion-counter
501
502         Tests: fast/custom-elements/throw-on-dynamic-markup-insertion-counter-construct.html
503                fast/custom-elements/throw-on-dynamic-markup-insertion-counter-reactions.html
504
505         * WebCore.xcodeproj/project.pbxproj:
506         * dom/Document.cpp:
507         (WebCore::Document::openForBindings): Throw InvalidStateError when m_throwOnDynamicMarkupInsertionCount is non-zero.
508         (WebCore::Document::closeForBindings): Ditto.
509         (WebCore::Document::write): Ditto.
510         (WebCore::Document::writeln): Ditto.
511         * dom/Document.h: Re-ordered the related instance variables in the order they appear in the spec, and updated spec URLs.
512         * dom/ThrowOnDynamicMarkupInsertionCountIncrementer.h: Added.
513         (WebCore::ThrowOnDynamicMarkupInsertionCountIncrementer): Added.
514         (WebCore::ThrowOnDynamicMarkupInsertionCountIncrementer::ThrowOnDynamicMarkupInsertionCountIncrementer):
515         (WebCore::ThrowOnDynamicMarkupInsertionCountIncrementer::~ThrowOnDynamicMarkupInsertionCountIncrementer):
516         * html/parser/HTMLDocumentParser.cpp:
517         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Instantiate ThrowOnDynamicMarkupInsertionCountIncrementer.
518
519 2018-08-07  Ryan Haddad  <ryanhaddad@apple.com>
520
521         Unreviewed, suppress warnings to fix the build.
522
523         * crypto/CommonCryptoUtilities.cpp:
524         (WebCore::getCommonCryptoDigestAlgorithm):
525
526 2018-08-07  Alex Christensen  <achristensen@webkit.org>
527
528         Removed unused *AllInOne.cpp
529         https://bugs.webkit.org/show_bug.cgi?id=188369
530
531         Reviewed by Yusuke Suzuki.
532
533         * accessibility/AccessibilityAllInOne.cpp: Removed.
534         * bindings/js/JSBindingsAllInOne.cpp: Removed.
535         * css/CSSAllInOne.cpp: Removed.
536         * dom/DOMAllInOne.cpp: Removed.
537         * editing/EditingAllInOne.cpp: Removed.
538         * html/HTMLElementsAllInOne.cpp: Removed.
539         * inspector/InspectorAllInOne.cpp: Removed.
540         * loader/appcache/ApplicationCacheAllInOne.cpp: Removed.
541         * mathml/MathMLAllInOne.cpp: Removed.
542         * platform/text/TextAllInOne.cpp: Removed.
543         * rendering/RenderingAllInOne.cpp: Removed.
544         * rendering/style/StyleAllInOne.cpp: Removed.
545         * rendering/svg/RenderSVGAllInOne.cpp: Removed.
546         * svg/SVGAllInOne.cpp: Removed.
547
548 2018-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
549
550         [WPE][GTK] Handle some virtual keys commonly used on TVs
551         https://bugs.webkit.org/show_bug.cgi?id=188375
552
553         Reviewed by Žan Doberšek.
554
555         * platform/gtk/PlatformKeyboardEventGtk.cpp:
556         (WebCore::PlatformKeyboardEvent::keyValueForGdkKeyCode):
557         (WebCore::PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode):
558         * platform/wpe/PlatformKeyboardEventWPE.cpp:
559         (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
560         (WebCore::PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode):
561
562 2018-08-07  Zan Dobersek  <zdobersek@igalia.com>
563
564         [Nicosia] Add Nicosia::CompositionLayerTextureMapperImpl
565         https://bugs.webkit.org/show_bug.cgi?id=188348
566
567         Reviewed by Carlos Garcia Campos.
568
569         Add the Nicosia::CompositionLayerTextureMapperImpl class, the
570         TextureMapper-specific implementation that will extend the
571         CompositionLayer class.
572
573         The important deatil of this implementation is the TextureMapperLayer
574         object that's expected to be managed by the composition controller. As
575         such, it is placed inside the CompositionState struct to clearly
576         indicate its utility and expected place of management. In the current
577         setup, this place would be the CoordinatedGraphicsScene class.
578
579         The Nicosia::CompositionLayer object that's spawned for each
580         CoordinatedGraphicsLayer instance is now switched to using the
581         CompositionLayerTextureMapperImpl object, with the local temporary no-op
582         CompositionLayer::Impl class removed.
583
584         * platform/TextureMapper.cmake:
585         * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.cpp: Added.
586         (Nicosia::CompositionLayerTextureMapperImpl::createFactory):
587         * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h: Added.
588         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
589         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
590         (): Deleted.
591
592 2018-08-07  Zan Dobersek  <zdobersek@igalia.com>
593
594         [Nicosia] Add the TextureMapper-specific ContentLayer::Impl derivative
595         https://bugs.webkit.org/show_bug.cgi?id=188344
596
597         Reviewed by Carlos Garcia Campos.
598
599         Add Nicosia::ContentLayerTextureMapperImpl class, providing the
600         TextureMapper-specific implementation that derives from the
601         ContentLayer::Impl class and which can be used by the
602         Nicosia::ContentLayer instances.
603
604         Internally a TextureMapperPlatformLayerProxy is created, and is
605         accessible to others through a getter. This way the content producers
606         can push new buffers into this proxy object, and the scene compositor
607         can take these buffers for display purposes.
608
609         Nicosia::ContentLayerTextureMapperImpl::swapBuffersIfNeeded() will be
610         called during layer flushes, and the call will cause the content layer
611         clients to take their texture, wrap it into a buffer, and push it into
612         the TextureMapperPlatformLayerProxy object. At the moment this operation
613         is required by the ImageBuffer and GraphicsContext3D producers.
614
615         The Client object is managed under its own lock. While the producers
616         will only live on the main thread, the thread-safe check in the
617         destructor is necessary in case the ContentLayerTextureMapperImpl object
618         ends up being destroyed on some other thread.
619
620         The patch only adds the class implementation. It will be integrated into
621         the layer tree later, once all the other pieces of the puzzle land.
622
623         * platform/TextureMapper.cmake:
624         * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.cpp: Added.
625         (Nicosia::ContentLayerTextureMapperImpl::createFactory):
626         (Nicosia::ContentLayerTextureMapperImpl::ContentLayerTextureMapperImpl):
627         (Nicosia::ContentLayerTextureMapperImpl::~ContentLayerTextureMapperImpl):
628         (Nicosia::ContentLayerTextureMapperImpl::invalidateClient):
629         (Nicosia::ContentLayerTextureMapperImpl::swapBuffersIfNeeded):
630         * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.h: Added.
631
632 2018-08-07  Frederic Wang  <fwang@igalia.com>
633
634         Make DOMWindow::scrollBy rely on DOMWindow::scrollTo
635         https://bugs.webkit.org/show_bug.cgi?id=188343
636
637         Reviewed by Darin Adler.
638
639         This patch makes DOMWindow::scrollBy rely on DOMWindow::scrollTo in order to perform actual
640         scrolling of the view. In particular, this reduces the number of code path to modify in order
641         to implement the ScrollBehavior option (bug 188043). The only change is an optimization when
642         scrolling to position (0, 0) but it is not observable.
643
644         No new tests, behavior unchanged and already tested.
645
646         * page/DOMWindow.cpp:
647         (WebCore::DOMWindow::scrollBy const): Add the current view position to the scrollBy offset in
648         order to obtain the scrollTo offset.
649
650 2018-08-04  Ryosuke Niwa  <rniwa@webkit.org>
651
652         Add CEReactions=NotNeeded for reactions only needed for customized builtins
653         https://bugs.webkit.org/show_bug.cgi?id=187851
654
655         Reviewed by Chris Dumez.
656
657         Because WebKit doesn't and will not support customized builtin elements, there are many DOM APIs marked with
658         [CEReactions] which don't actually need CustomElementReactionStack.
659
660         To clarify and document this difference, this patch introduces WebKit extention: [CEReactions=NotNeeded].
661         When this IDL attribute is specified, we generate CustomElementReactionDisallowedScope in the bindings code
662         to assert that there are no custom elements reactions being enqueued within the DOM API.
663
664         We suppress this assertion in CustomElementReactionStack since a DOM API with [CEReactions=NotNeeded] can
665         synchronously fire an event and otherwise execute arbirary scripts, which in turn could invoke a DOM API
666         with [CEReactions].
667
668         This patch deployes this change to HTMLIFrameElement since "src" IDL attribute triggers this second scenario.
669
670         Test: fast/custom-elements/custom-element-reaction-within-disallowed-scope.html
671
672         * bindings/scripts/CodeGeneratorJS.pm:
673         (GeneratePut):
674         (GeneratePutByIndex):
675         (GenerateDefineOwnProperty):
676         (GenerateDeletePropertyCommon):
677         (GenerateAttributeSetterBodyDefinition):
678         (GenerateCustomElementReactionsStackIfNeeded): Added. Generate CustomElementReactionStack for [CEReactions]
679         and CustomElementReactionDisallowedScope for [CEReactions=NotNeeded].
680         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
681         * bindings/scripts/test/TestCEReactions.idl: Added test cases for [CEReactions=NotNeeded].
682         * bindings/scripts/test/TestCEReactionsStringifier.idl: Ditto.
683         * dom/CustomElementReactionQueue.cpp:
684         (WebCore::CustomElementReactionQueue::enqueueElementUpgrade): Added an assertion to catch cases where
685         a DOM API with [CEReactions=NotNeeded] enqueues a custom element reaction; i.e. cases where [CEReactions]
686         should have been used.
687         (WebCore::CustomElementReactionQueue::enqueueElementUpgradeIfDefined): Ditto.
688         (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded): Ditto.
689         (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded): Ditto.
690         (WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded): Ditto.
691         (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded): Ditto.
692         (WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions): Ditto.
693         * dom/CustomElementReactionQueue.h:
694         (WebCore::CustomElementReactionDisallowedScope): Added. Enables the assertion in enqueue* functions above.
695         (WebCore::CustomElementReactionDisallowedScope::CustomElementReactionDisallowedScope): Added.
696         (WebCore::CustomElementReactionDisallowedScope::~CustomElementReactionDisallowedScope): Added.
697         (WebCore::CustomElementReactionDisallowedScope::isReactionAllowed): Added.
698         (WebCore::CustomElementReactionDisallowedScope::AllowedScope): Added.
699         (WebCore::CustomElementReactionDisallowedScope::AllowedScope::AllowedScope): Added.
700         (WebCore::CustomElementReactionDisallowedScope::AllowedScope::~AllowedScope): Added.
701         (WebCore::CustomElementReactionStack): Suppress the assertion. See above for why this is needed.
702         * html/HTMLIFrameElement.idl:
703
704 2018-08-06  Simon Fraser  <simon.fraser@apple.com>
705
706         Clean up initialization of some RenderLayer members
707         https://bugs.webkit.org/show_bug.cgi?id=188330
708
709         Reviewed by Dean Jackson.
710
711         Use initializers for the pointers. No need to initialize LayoutUnits, which initialize to zero.
712
713         * rendering/RenderLayer.cpp:
714         (WebCore::RenderLayer::RenderLayer):
715         * rendering/RenderLayer.h:
716
717 2018-08-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
718
719         Remove the SVG elements' attributes macros
720         https://bugs.webkit.org/show_bug.cgi?id=186751
721
722         Reviewed by Simon Fraser.
723
724         This is how the SVG attributes are implemented after removing the SVG macros:
725
726         1) The SVG attribute is defined as a super class of SVGAttribute. The super
727            classes of SVGAttribute are template classes. The type of these template
728            are the property type or the TearOff type.
729
730         2) To unify accessing attributes of the SVGElements and its super classes
731            an SVGAttributeAccessor template class is added. It is inherited by other
732            template classes. The types of these templates are the owner and the
733            attributes types. The main functions of these classes is to synchronize 
734            the new property value with the document attributes pool and to create
735            and cache the TearOff objects.
736
737         3) To make code shorter and more readable, attribute types and attribute
738            accessors are defined for every SVG TearOff type, e.g. 
739            -- SVGLength: 
740                 SVGAnimatedLengthAttribute and SVGAnimatedLengthAttributeAccessor
741            -- SVGAnimatedNumber: 
742                 SVGAnimatedNumberAttribute and SVGAnimatedNumberAttributeAccessor
743
744         4) A special accessor is defined for animated pair and optional attributes:
745            SVGAnimatedPairAttributeAccessor, e.g.
746            -- SVGMarkerElement:
747                 orient attribute: "angle" or "type"
748            -- SVGFEGaussianBlurElement:
749                 stdDeviation attribute: "x" and "y"
750
751         5) The SVG attributes have to be registered into an singleton SVGAttributeRegistry.
752            The SVGAttributeRegistry is a template class. The types of this template
753            class are the the type of the owner and the base classes of this owner.
754            This registry holds a map from "attribute name" to  "attribute accessor".
755
756         6) To make the code easier to read, the SVGAttributeRegistry implements
757            registerAttribute() for different attribute types. The owner needs only
758            to provide the attribute name and a pointer to the class member of this
759            attribute to the same function "registerAttribute()". The compiler will
760            pick the right function to call based on the type of the attribute.
761
762         7) Given a reference to the owner element, SVGAttributeRegistry can loop
763            through the attributes of this owner and through the attributes of its
764            base classes as well to do operations like synchronizing all the attributes
765            or creating the TearOff object of a certain attribute.
766
767         8) To make the base class SVGElement have the ability to access the attributes
768            of any of its super classes, SVGAttributeOwnerProxy will be used.
769            SVGAttributeOwnerProxy is a base class which have all the functions that
770            SVGElement needs as pure virtual functions.
771
772         9) SVGAttributeOwnerProxyImpl is a template class which implements 
773            SVGAttributeOwnerProxy and whose types are the owner and its base classes.
774            SVGAttributeOwnerProxyImpl keeps a reference to the owner and the context
775            SVGElement.
776
777         10) All the SVG attribute owners have to implement the virtual function
778             attributeOwnerProxy() which returns a reference to SVGAttributeOwnerProxy.
779             The local attributeOwnerProxy() returns a reference to a local
780             SVGAttributeOwnerProxyImpl. Its type and base types are the class
781             hierarchy of this element.
782
783         All the attributes of the non-SVGElement-based classes are moved as members
784         of these classes instead of adding them to all the super classes. These
785         classes are:
786            -- SVGExternalResourcesRequired
787            -- SVGURIReference
788            -- SVGFitToViewBox
789            -- SVGZoomAndPan
790            -- SVGLangSpace
791
792         The svgAttributeChanged() of all the SVGElement-based classes are now 
793         simplified by distributing the responsibilities of changing an attribute
794         to the base classes. One exception is the SVGURIReference since the action
795         to be taken when changing the "href" is different for every super class.
796
797         Other work will be done in separate patches.
798            -- Shrinking the memory of the SVGElements.
799            -- Making all the attributes RefCounted objects.
800
801         * Sources.txt:
802         * WebCore.xcodeproj/project.pbxproj:
803         * rendering/svg/RenderSVGResourceMarker.cpp:
804         (WebCore::RenderSVGResourceMarker::draw):
805         * svg/SVGAElement.cpp:
806         (WebCore::SVGAElement::SVGAElement):
807         (WebCore::SVGAElement::registerAttributes):
808         (WebCore::SVGAElement::parseAttribute):
809         (WebCore::SVGAElement::svgAttributeChanged):
810         * svg/SVGAElement.h:
811         * svg/SVGAElement.idl:
812         * svg/SVGAltGlyphElement.cpp:
813         (WebCore::SVGAltGlyphElement::SVGAltGlyphElement):
814         * svg/SVGAltGlyphElement.h:
815         * svg/SVGAnimatedAngle.h:
816         * svg/SVGAnimatedBoolean.h:
817         * svg/SVGAnimatedEnumeration.h:
818         * svg/SVGAnimatedInteger.h:
819         * svg/SVGAnimatedLength.h:
820         * svg/SVGAnimatedLengthList.h:
821         * svg/SVGAnimatedNumber.h:
822         * svg/SVGAnimatedNumberList.h:
823         * svg/SVGAnimatedPath.h:
824         * svg/SVGAnimatedPointList.h:
825         * svg/SVGAnimatedPreserveAspectRatio.h:
826         * svg/SVGAnimatedRect.h:
827         * svg/SVGAnimatedString.h:
828         * svg/SVGAnimatedTransformList.h:
829         * svg/SVGAnimatedTypeAnimator.cpp:
830         (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
831         * svg/SVGAnimationElement.cpp:
832         (WebCore::SVGAnimationElement::SVGAnimationElement):
833         (WebCore::SVGAnimationElement::requiredFeatures): Deleted.
834         (WebCore::SVGAnimationElement::requiredExtensions): Deleted.
835         (WebCore::SVGAnimationElement::systemLanguage): Deleted.
836         * svg/SVGAnimationElement.h:
837         (WebCore::SVGAnimationElement::attributeRegistry):
838         * svg/SVGCircleElement.cpp:
839         (WebCore::SVGCircleElement::SVGCircleElement):
840         (WebCore::SVGCircleElement::registerAttributes):
841         (WebCore::SVGCircleElement::parseAttribute):
842         (WebCore::SVGCircleElement::svgAttributeChanged):
843         * svg/SVGCircleElement.h:
844         * svg/SVGClipPathElement.cpp:
845         (WebCore::SVGClipPathElement::SVGClipPathElement):
846         (WebCore::SVGClipPathElement::registerAttributes):
847         (WebCore::SVGClipPathElement::parseAttribute):
848         (WebCore::SVGClipPathElement::svgAttributeChanged):
849         (WebCore::SVGClipPathElement::isSupportedAttribute): Deleted.
850         * svg/SVGClipPathElement.h:
851         * svg/SVGComponentTransferFunctionElement.cpp:
852         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement):
853         (WebCore::SVGComponentTransferFunctionElement::registerAttributes):
854         (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
855         (WebCore::SVGComponentTransferFunctionElement::svgAttributeChanged):
856         (WebCore::SVGComponentTransferFunctionElement::transferFunction const):
857         (WebCore::SVGComponentTransferFunctionElement::isSupportedAttribute): Deleted.
858         * svg/SVGComponentTransferFunctionElement.h:
859         (WebCore::SVGComponentTransferFunctionElement::type const):
860         (WebCore::SVGComponentTransferFunctionElement::tableValues const):
861         (WebCore::SVGComponentTransferFunctionElement::slope const):
862         (WebCore::SVGComponentTransferFunctionElement::intercept const):
863         (WebCore::SVGComponentTransferFunctionElement::amplitude const):
864         (WebCore::SVGComponentTransferFunctionElement::exponent const):
865         (WebCore::SVGComponentTransferFunctionElement::offset const):
866         (WebCore::SVGComponentTransferFunctionElement::typeAnimated):
867         (WebCore::SVGComponentTransferFunctionElement::tableValuesAnimated):
868         (WebCore::SVGComponentTransferFunctionElement::slopeAnimated):
869         (WebCore::SVGComponentTransferFunctionElement::interceptAnimated):
870         (WebCore::SVGComponentTransferFunctionElement::amplitudeAnimated):
871         (WebCore::SVGComponentTransferFunctionElement::exponentAnimated):
872         (WebCore::SVGComponentTransferFunctionElement::offsetAnimated):
873         (WebCore::SVGComponentTransferFunctionElement::attributeRegistry):
874         (WebCore::SVGComponentTransferFunctionElement::isKnownAttribute):
875         * svg/SVGCursorElement.cpp:
876         (WebCore::SVGCursorElement::SVGCursorElement):
877         (WebCore::SVGCursorElement::registerAttributes):
878         (WebCore::SVGCursorElement::parseAttribute):
879         (WebCore::SVGCursorElement::svgAttributeChanged):
880         (WebCore::SVGCursorElement::isSupportedAttribute): Deleted.
881         (WebCore::SVGCursorElement::requiredFeatures): Deleted.
882         (WebCore::SVGCursorElement::requiredExtensions): Deleted.
883         (WebCore::SVGCursorElement::systemLanguage): Deleted.
884         * svg/SVGCursorElement.h:
885         * svg/SVGDefsElement.cpp:
886         (WebCore::SVGDefsElement::SVGDefsElement):
887         * svg/SVGDefsElement.h:
888         * svg/SVGElement.cpp:
889         (WebCore::SVGElement::SVGElement):
890         (WebCore::SVGElement::registerAttributes):
891         (WebCore::SVGElement::parseAttribute):
892         (WebCore::SVGElement::animatedPropertyTypesForAttribute):
893         (WebCore::SVGElement::synchronizeAllAnimatedSVGAttribute):
894         (WebCore::SVGElement::synchronizeAnimatedSVGAttribute const):
895         (WebCore::SVGElement::isPresentationAttributeWithSVGDOM):
896         (WebCore::SVGElement::svgAttributeChanged):
897         (WebCore::SVGElement::synchronizeRequiredFeatures): Deleted.
898         (WebCore::SVGElement::synchronizeRequiredExtensions): Deleted.
899         (WebCore::SVGElement::synchronizeSystemLanguage): Deleted.
900         (WebCore::SVGElement::isKnownAttribute): Deleted.
901         * svg/SVGElement.h:
902         (WebCore::SVGElement::attributeRegistry):
903         (WebCore::SVGElement::isKnownAttribute):
904         (WebCore::SVGElement::attributeOwnerProxy const):
905         (WebCore::SVGElement::synchronizeAttribute):
906         (WebCore::SVGElement::synchronizeAttributes):
907         (WebCore::SVGElement::animatedTypes const):
908         (WebCore::SVGElement::lookupAnimatedProperty const):
909         (WebCore::SVGElement::lookupOrCreateAnimatedProperty):
910         (WebCore::SVGElement::lookupOrCreateAnimatedProperties):
911         (WebCore::SVGElement::className const):
912         (WebCore::SVGElement::classNameAnimated):
913         (WebCore::SVGElement::synchronizeRequiredFeatures): Deleted.
914         (WebCore::SVGElement::synchronizeRequiredExtensions): Deleted.
915         (WebCore::SVGElement::synchronizeSystemLanguage): Deleted.
916         * svg/SVGEllipseElement.cpp:
917         (WebCore::SVGEllipseElement::SVGEllipseElement):
918         (WebCore::SVGEllipseElement::registerAttributes):
919         (WebCore::SVGEllipseElement::parseAttribute):
920         (WebCore::SVGEllipseElement::svgAttributeChanged):
921         * svg/SVGEllipseElement.h:
922         * svg/SVGExternalResourcesRequired.cpp:
923         (WebCore::SVGExternalResourcesRequired::SVGExternalResourcesRequired):
924         (WebCore::SVGExternalResourcesRequired::registerAttributes):
925         (WebCore::SVGExternalResourcesRequired::parseAttribute):
926         (WebCore::SVGExternalResourcesRequired::svgAttributeChanged):
927         (WebCore::SVGExternalResourcesRequired::addSupportedAttributes):
928         (WebCore::SVGExternalResourcesRequired::dispatchLoadEvent):
929         (WebCore::SVGExternalResourcesRequired::insertedIntoDocument):
930         (WebCore::SVGExternalResourcesRequired::finishParsingChildren):
931         (WebCore::SVGExternalResourcesRequired::haveLoadedRequiredResources const):
932         (WebCore::SVGExternalResourcesRequired::isKnownAttribute): Deleted.
933         (WebCore::SVGExternalResourcesRequired::handleAttributeChange): Deleted.
934         * svg/SVGExternalResourcesRequired.h:
935         (WebCore::SVGExternalResourcesRequired::attributeRegistry):
936         (WebCore::SVGExternalResourcesRequired::externalResourcesRequiredAnimated):
937         (WebCore::SVGExternalResourcesRequired::externalResourcesRequired const):
938         (WebCore::SVGExternalResourcesRequired::setExternalResourcesRequired):
939         (WebCore::SVGExternalResourcesRequired::isKnownAttribute):
940         (WebCore::SVGExternalResourcesRequired::attributeOwnerProxy):
941         * svg/SVGFEBlendElement.cpp:
942         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
943         (WebCore::SVGFEBlendElement::registerAttributes):
944         (WebCore::SVGFEBlendElement::parseAttribute):
945         * svg/SVGFEBlendElement.h:
946         * svg/SVGFEColorMatrixElement.cpp:
947         (WebCore::SVGFEColorMatrixElement::SVGFEColorMatrixElement):
948         (WebCore::SVGFEColorMatrixElement::registerAttributes):
949         (WebCore::SVGFEColorMatrixElement::parseAttribute):
950         * svg/SVGFEColorMatrixElement.h:
951         * svg/SVGFEComponentTransferElement.cpp:
952         (WebCore::SVGFEComponentTransferElement::SVGFEComponentTransferElement):
953         (WebCore::SVGFEComponentTransferElement::registerAttributes):
954         (WebCore::SVGFEComponentTransferElement::parseAttribute):
955         * svg/SVGFEComponentTransferElement.h:
956         * svg/SVGFECompositeElement.cpp:
957         (WebCore::SVGFECompositeElement::SVGFECompositeElement):
958         (WebCore::SVGFECompositeElement::registerAttributes):
959         (WebCore::SVGFECompositeElement::parseAttribute):
960         * svg/SVGFECompositeElement.h:
961         * svg/SVGFEConvolveMatrixElement.cpp:
962         (WebCore::SVGFEConvolveMatrixElement::SVGFEConvolveMatrixElement):
963         (WebCore::SVGFEConvolveMatrixElement::registerAttributes):
964         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
965         (WebCore::SVGFEConvolveMatrixElement::setFilterEffectAttribute):
966         (WebCore::SVGFEConvolveMatrixElement::setOrder):
967         (WebCore::SVGFEConvolveMatrixElement::setKernelUnitLength):
968         * svg/SVGFEConvolveMatrixElement.h:
969         (WebCore::SVGPropertyTraits<EdgeModeType>::initialValue):
970         * svg/SVGFEDiffuseLightingElement.cpp:
971         (WebCore::SVGFEDiffuseLightingElement::SVGFEDiffuseLightingElement):
972         (WebCore::SVGFEDiffuseLightingElement::registerAttributes):
973         (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
974         * svg/SVGFEDiffuseLightingElement.h:
975         * svg/SVGFEDisplacementMapElement.cpp:
976         (WebCore::SVGFEDisplacementMapElement::SVGFEDisplacementMapElement):
977         (WebCore::SVGFEDisplacementMapElement::registerAttributes):
978         (WebCore::SVGFEDisplacementMapElement::parseAttribute):
979         * svg/SVGFEDisplacementMapElement.h:
980         * svg/SVGFEDropShadowElement.cpp:
981         (WebCore::SVGFEDropShadowElement::SVGFEDropShadowElement):
982         (WebCore::SVGFEDropShadowElement::setStdDeviation):
983         (WebCore::SVGFEDropShadowElement::registerAttributes):
984         (WebCore::SVGFEDropShadowElement::parseAttribute):
985         (WebCore::SVGFEDropShadowElement::svgAttributeChanged):
986         * svg/SVGFEDropShadowElement.h:
987         * svg/SVGFEGaussianBlurElement.cpp:
988         (WebCore::SVGFEGaussianBlurElement::SVGFEGaussianBlurElement):
989         (WebCore::SVGFEGaussianBlurElement::setStdDeviation):
990         (WebCore::SVGFEGaussianBlurElement::registerAttributes):
991         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
992         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged):
993         * svg/SVGFEGaussianBlurElement.h:
994         * svg/SVGFEImageElement.cpp:
995         (WebCore::SVGFEImageElement::SVGFEImageElement):
996         (WebCore::SVGFEImageElement::registerAttributes):
997         (WebCore::SVGFEImageElement::parseAttribute):
998         * svg/SVGFEImageElement.h:
999         * svg/SVGFELightElement.cpp:
1000         (WebCore::SVGFELightElement::SVGFELightElement):
1001         (WebCore::SVGFELightElement::registerAttributes):
1002         (WebCore::SVGFELightElement::parseAttribute):
1003         (WebCore::SVGFELightElement::svgAttributeChanged):
1004         * svg/SVGFELightElement.h:
1005         (WebCore::SVGFELightElement::azimuth const):
1006         (WebCore::SVGFELightElement::elevation const):
1007         (WebCore::SVGFELightElement::x const):
1008         (WebCore::SVGFELightElement::y const):
1009         (WebCore::SVGFELightElement::z const):
1010         (WebCore::SVGFELightElement::pointsAtX const):
1011         (WebCore::SVGFELightElement::pointsAtY const):
1012         (WebCore::SVGFELightElement::pointsAtZ const):
1013         (WebCore::SVGFELightElement::specularExponent const):
1014         (WebCore::SVGFELightElement::limitingConeAngle const):
1015         (WebCore::SVGFELightElement::azimuthAnimated):
1016         (WebCore::SVGFELightElement::elevationAnimated):
1017         (WebCore::SVGFELightElement::xAnimated):
1018         (WebCore::SVGFELightElement::yAnimated):
1019         (WebCore::SVGFELightElement::zAnimated):
1020         (WebCore::SVGFELightElement::pointsAtXAnimated):
1021         (WebCore::SVGFELightElement::pointsAtYAnimated):
1022         (WebCore::SVGFELightElement::pointsAtZAnimated):
1023         (WebCore::SVGFELightElement::specularExponentAnimated):
1024         (WebCore::SVGFELightElement::limitingConeAngleAnimated):
1025         (WebCore::SVGFELightElement::attributeRegistry):
1026         (WebCore::SVGFELightElement::isKnownAttribute):
1027         * svg/SVGFEMergeNodeElement.cpp:
1028         (WebCore::SVGFEMergeNodeElement::SVGFEMergeNodeElement):
1029         (WebCore::SVGFEMergeNodeElement::registerAttributes):
1030         (WebCore::SVGFEMergeNodeElement::parseAttribute):
1031         * svg/SVGFEMergeNodeElement.h:
1032         * svg/SVGFEMorphologyElement.cpp:
1033         (WebCore::SVGFEMorphologyElement::SVGFEMorphologyElement):
1034         (WebCore::SVGFEMorphologyElement::setRadius):
1035         (WebCore::SVGFEMorphologyElement::registerAttributes):
1036         (WebCore::SVGFEMorphologyElement::parseAttribute):
1037         * svg/SVGFEMorphologyElement.h:
1038         * svg/SVGFEOffsetElement.cpp:
1039         (WebCore::SVGFEOffsetElement::SVGFEOffsetElement):
1040         (WebCore::SVGFEOffsetElement::registerAttributes):
1041         (WebCore::SVGFEOffsetElement::parseAttribute):
1042         (WebCore::SVGFEOffsetElement::svgAttributeChanged):
1043         * svg/SVGFEOffsetElement.h:
1044         * svg/SVGFESpecularLightingElement.cpp:
1045         (WebCore::SVGFESpecularLightingElement::SVGFESpecularLightingElement):
1046         (WebCore::SVGFESpecularLightingElement::registerAttributes):
1047         (WebCore::SVGFESpecularLightingElement::parseAttribute):
1048         * svg/SVGFESpecularLightingElement.h:
1049         * svg/SVGFETileElement.cpp:
1050         (WebCore::SVGFETileElement::SVGFETileElement):
1051         (WebCore::SVGFETileElement::registerAttributes):
1052         (WebCore::SVGFETileElement::parseAttribute):
1053         * svg/SVGFETileElement.h:
1054         * svg/SVGFETurbulenceElement.cpp:
1055         (WebCore::SVGFETurbulenceElement::SVGFETurbulenceElement):
1056         (WebCore::SVGFETurbulenceElement::registerAttributes):
1057         (WebCore::SVGFETurbulenceElement::parseAttribute):
1058         (WebCore::SVGFETurbulenceElement::setFilterEffectAttribute):
1059         (WebCore::SVGFETurbulenceElement::svgAttributeChanged):
1060         * svg/SVGFETurbulenceElement.h:
1061         * svg/SVGFilterElement.cpp:
1062         (WebCore::SVGFilterElement::SVGFilterElement):
1063         (WebCore::SVGFilterElement::setFilterRes):
1064         (WebCore::SVGFilterElement::registerAttributes):
1065         (WebCore::SVGFilterElement::parseAttribute):
1066         (WebCore::SVGFilterElement::svgAttributeChanged):
1067         (WebCore::SVGFilterElement::isSupportedAttribute): Deleted.
1068         * svg/SVGFilterElement.h:
1069         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
1070         (WebCore::SVGFilterPrimitiveStandardAttributes::SVGFilterPrimitiveStandardAttributes):
1071         (WebCore::SVGFilterPrimitiveStandardAttributes::registerAttributes):
1072         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
1073         (WebCore::SVGFilterPrimitiveStandardAttributes::svgAttributeChanged):
1074         (WebCore::SVGFilterPrimitiveStandardAttributes::isSupportedAttribute): Deleted.
1075         * svg/SVGFilterPrimitiveStandardAttributes.h:
1076         (WebCore::SVGFilterPrimitiveStandardAttributes::attributeRegistry):
1077         (WebCore::SVGFilterPrimitiveStandardAttributes::x const):
1078         (WebCore::SVGFilterPrimitiveStandardAttributes::y const):
1079         (WebCore::SVGFilterPrimitiveStandardAttributes::width const):
1080         (WebCore::SVGFilterPrimitiveStandardAttributes::height const):
1081         (WebCore::SVGFilterPrimitiveStandardAttributes::result const):
1082         (WebCore::SVGFilterPrimitiveStandardAttributes::xAnimated):
1083         (WebCore::SVGFilterPrimitiveStandardAttributes::yAnimated):
1084         (WebCore::SVGFilterPrimitiveStandardAttributes::widthAnimated):
1085         (WebCore::SVGFilterPrimitiveStandardAttributes::heightAnimated):
1086         (WebCore::SVGFilterPrimitiveStandardAttributes::resultAnimated):
1087         (WebCore::SVGFilterPrimitiveStandardAttributes::isKnownAttribute):
1088         * svg/SVGFitToViewBox.cpp:
1089         (WebCore::SVGFitToViewBox::SVGFitToViewBox):
1090         (WebCore::SVGFitToViewBox::registerAttributes):
1091         (WebCore::SVGFitToViewBox::setViewBox):
1092         (WebCore::SVGFitToViewBox::resetViewBox):
1093         (WebCore::SVGFitToViewBox::reset):
1094         (WebCore::SVGFitToViewBox::parseAttribute):
1095         (WebCore::SVGFitToViewBox::parseViewBox):
1096         (WebCore::SVGFitToViewBox::isKnownAttribute): Deleted.
1097         (WebCore::SVGFitToViewBox::addSupportedAttributes): Deleted.
1098         * svg/SVGFitToViewBox.h:
1099         (WebCore::SVGFitToViewBox::attributeRegistry):
1100         (WebCore::SVGFitToViewBox::viewBox const):
1101         (WebCore::SVGFitToViewBox::preserveAspectRatio const):
1102         (WebCore::SVGFitToViewBox::viewBoxAnimated):
1103         (WebCore::SVGFitToViewBox::preserveAspectRatioAnimated):
1104         (WebCore::SVGFitToViewBox::setPreserveAspectRatio):
1105         (WebCore::SVGFitToViewBox::resetPreserveAspectRatio):
1106         (WebCore::SVGFitToViewBox::viewBoxString const):
1107         (WebCore::SVGFitToViewBox::preserveAspectRatioString const):
1108         (WebCore::SVGFitToViewBox::hasValidViewBox const):
1109         (WebCore::SVGFitToViewBox::hasEmptyViewBox const):
1110         (WebCore::SVGFitToViewBox::isKnownAttribute):
1111         (WebCore::SVGFitToViewBox::parseAttribute): Deleted.
1112         * svg/SVGFontElement.cpp:
1113         (WebCore::SVGFontElement::SVGFontElement):
1114         * svg/SVGFontElement.h:
1115         * svg/SVGForeignObjectElement.cpp:
1116         (WebCore::SVGForeignObjectElement::SVGForeignObjectElement):
1117         (WebCore::SVGForeignObjectElement::registerAttributes):
1118         (WebCore::SVGForeignObjectElement::parseAttribute):
1119         (WebCore::SVGForeignObjectElement::svgAttributeChanged):
1120         (WebCore::SVGForeignObjectElement::isSupportedAttribute): Deleted.
1121         * svg/SVGForeignObjectElement.h:
1122         * svg/SVGGElement.cpp:
1123         (WebCore::SVGGElement::SVGGElement):
1124         (WebCore::SVGGElement::svgAttributeChanged):
1125         (WebCore::SVGGElement::isSupportedAttribute): Deleted.
1126         * svg/SVGGElement.h:
1127         * svg/SVGGeometryElement.cpp:
1128         (WebCore::SVGGeometryElement::SVGGeometryElement):
1129         (WebCore::SVGGeometryElement::registerAttributes):
1130         (WebCore::SVGGeometryElement::parseAttribute):
1131         (WebCore::SVGGeometryElement::svgAttributeChanged):
1132         (WebCore::SVGGeometryElement::isSupportedAttribute): Deleted.
1133         * svg/SVGGeometryElement.h:
1134         (WebCore::SVGGeometryElement::attributeRegistry):
1135         (WebCore::SVGGeometryElement::pathLengthAnimated):
1136         (WebCore::SVGGeometryElement::isKnownAttribute):
1137         * svg/SVGGlyphRefElement.cpp:
1138         (WebCore::SVGGlyphRefElement::SVGGlyphRefElement):
1139         * svg/SVGGlyphRefElement.h:
1140         * svg/SVGGradientElement.cpp:
1141         (WebCore::SVGGradientElement::SVGGradientElement):
1142         (WebCore::SVGGradientElement::registerAttributes):
1143         (WebCore::SVGGradientElement::parseAttribute):
1144         (WebCore::SVGGradientElement::svgAttributeChanged):
1145         (WebCore::SVGGradientElement::isSupportedAttribute): Deleted.
1146         * svg/SVGGradientElement.h:
1147         (WebCore::SVGGradientElement::attributeRegistry):
1148         (WebCore::SVGGradientElement::spreadMethod const):
1149         (WebCore::SVGGradientElement::gradientUnits const):
1150         (WebCore::SVGGradientElement::gradientTransform const):
1151         (WebCore::SVGGradientElement::spreadMethodAnimated):
1152         (WebCore::SVGGradientElement::gradientUnitsAnimated):
1153         (WebCore::SVGGradientElement::gradientTransformAnimated):
1154         (WebCore::SVGGradientElement::isKnownAttribute):
1155         * svg/SVGGraphicsElement.cpp:
1156         (WebCore::SVGGraphicsElement::SVGGraphicsElement):
1157         (WebCore::SVGGraphicsElement::registerAttributes):
1158         (WebCore::SVGGraphicsElement::parseAttribute):
1159         (WebCore::SVGGraphicsElement::svgAttributeChanged):
1160         (WebCore::SVGGraphicsElement::isSupportedAttribute): Deleted.
1161         (WebCore::SVGGraphicsElement::requiredFeatures): Deleted.
1162         (WebCore::SVGGraphicsElement::requiredExtensions): Deleted.
1163         (WebCore::SVGGraphicsElement::systemLanguage): Deleted.
1164         * svg/SVGGraphicsElement.h:
1165         (WebCore::SVGGraphicsElement::attributeRegistry):
1166         (WebCore::SVGGraphicsElement::transform const):
1167         (WebCore::SVGGraphicsElement::transformAnimated):
1168         (WebCore::SVGGraphicsElement::isKnownAttribute):
1169         * svg/SVGImageElement.cpp:
1170         (WebCore::SVGImageElement::SVGImageElement):
1171         (WebCore::SVGImageElement::registerAttributes):
1172         (WebCore::SVGImageElement::parseAttribute):
1173         (WebCore::SVGImageElement::svgAttributeChanged):
1174         (WebCore::SVGImageElement::haveLoadedRequiredResources):
1175         (WebCore::SVGImageElement::isSupportedAttribute): Deleted.
1176         * svg/SVGImageElement.h:
1177         * svg/SVGImageLoader.cpp:
1178         (WebCore::SVGImageLoader::dispatchLoadEvent):
1179         * svg/SVGLangSpace.cpp:
1180         (WebCore::SVGLangSpace::SVGLangSpace):
1181         (WebCore::SVGLangSpace::registerAttributes):
1182         (WebCore::SVGLangSpace::xmlspace const):
1183         (WebCore::SVGLangSpace::svgAttributeChanged):
1184         (WebCore::SVGLangSpace::setXmllang): Deleted.
1185         (WebCore::SVGLangSpace::setXmlspace): Deleted.
1186         (WebCore::SVGLangSpace::isKnownAttribute): Deleted.
1187         (WebCore::addWithAndWithoutXMLPrefix): Deleted.
1188         (WebCore::SVGLangSpace::addSupportedAttributes): Deleted.
1189         * svg/SVGLangSpace.h:
1190         (WebCore::SVGLangSpace::xmllang const):
1191         (WebCore::SVGLangSpace::setXmllang):
1192         (WebCore::SVGLangSpace::setXmlspace):
1193         (WebCore::SVGLangSpace::attributeRegistry):
1194         (WebCore::SVGLangSpace::isKnownAttribute):
1195         * svg/SVGLineElement.cpp:
1196         (WebCore::SVGLineElement::SVGLineElement):
1197         (WebCore::SVGLineElement::registerAttributes):
1198         (WebCore::SVGLineElement::parseAttribute):
1199         (WebCore::SVGLineElement::svgAttributeChanged):
1200         (WebCore::SVGLineElement::isSupportedAttribute): Deleted.
1201         * svg/SVGLineElement.h:
1202         * svg/SVGLinearGradientElement.cpp:
1203         (WebCore::SVGLinearGradientElement::SVGLinearGradientElement):
1204         (WebCore::SVGLinearGradientElement::registerAttributes):
1205         (WebCore::SVGLinearGradientElement::parseAttribute):
1206         (WebCore::SVGLinearGradientElement::svgAttributeChanged):
1207         (WebCore::SVGLinearGradientElement::isSupportedAttribute): Deleted.
1208         * svg/SVGLinearGradientElement.h:
1209         * svg/SVGMPathElement.cpp:
1210         (WebCore::SVGMPathElement::SVGMPathElement):
1211         (WebCore::SVGMPathElement::svgAttributeChanged):
1212         * svg/SVGMPathElement.h:
1213         * svg/SVGMarkerElement.cpp:
1214         (WebCore::SVGMarkerElement::SVGMarkerElement):
1215         (WebCore::SVGMarkerElement::registerAttributes):
1216         (WebCore::SVGMarkerElement::parseAttribute):
1217         (WebCore::SVGMarkerElement::svgAttributeChanged):
1218         (WebCore::SVGMarkerElement::setOrient):
1219         (WebCore::SVGMarkerElement::orientTypePropertyInfo): Deleted.
1220         (WebCore::SVGMarkerElement::isSupportedAttribute): Deleted.
1221         (WebCore::SVGMarkerElement::synchronizeOrientType): Deleted.
1222         (WebCore::SVGMarkerElement::lookupOrCreateOrientTypeWrapper): Deleted.
1223         (WebCore::SVGMarkerElement::orientType const): Deleted.
1224         (WebCore::SVGMarkerElement::orientTypeAnimated): Deleted.
1225         * svg/SVGMarkerElement.h:
1226         * svg/SVGMaskElement.cpp:
1227         (WebCore::SVGMaskElement::SVGMaskElement):
1228         (WebCore::SVGMaskElement::registerAttributes):
1229         (WebCore::SVGMaskElement::parseAttribute):
1230         (WebCore::SVGMaskElement::svgAttributeChanged):
1231         (WebCore::SVGMaskElement::isSupportedAttribute): Deleted.
1232         (WebCore::SVGMaskElement::requiredFeatures): Deleted.
1233         (WebCore::SVGMaskElement::requiredExtensions): Deleted.
1234         (WebCore::SVGMaskElement::systemLanguage): Deleted.
1235         * svg/SVGMaskElement.h:
1236         * svg/SVGPathElement.cpp:
1237         (WebCore::SVGPathElement::SVGPathElement):
1238         (WebCore::SVGPathElement::registerAttributes):
1239         (WebCore::SVGPathElement::parseAttribute):
1240         (WebCore::SVGPathElement::svgAttributeChanged):
1241         (WebCore::SVGPathElement::pathByteStream const):
1242         (WebCore::SVGPathElement::lookupOrCreateDWrapper):
1243         (WebCore::SVGPathElement::animatedPropertyWillBeDeleted):
1244         (WebCore::SVGPathElement::pathSegList):
1245         (WebCore::SVGPathElement::animatedPathSegList):
1246         (WebCore::SVGPathElement::pathSegListChanged):
1247         (WebCore::SVGPathElement::dPropertyInfo): Deleted.
1248         (WebCore::SVGPathElement::isSupportedAttribute): Deleted.
1249         (WebCore::SVGPathElement::synchronizeD): Deleted.
1250         * svg/SVGPathElement.h:
1251         * svg/SVGPathSegListValues.h:
1252         (WebCore::SVGPropertyTraits<SVGPathSegListValues>::toString):
1253         * svg/SVGPathSegWithContext.h:
1254         (WebCore::SVGPathSegWithContext::animatedProperty const):
1255         * svg/SVGPatternElement.cpp:
1256         (WebCore::SVGPatternElement::SVGPatternElement):
1257         (WebCore::SVGPatternElement::registerAttributes):
1258         (WebCore::SVGPatternElement::parseAttribute):
1259         (WebCore::SVGPatternElement::svgAttributeChanged):
1260         (WebCore::SVGPatternElement::collectPatternAttributes const):
1261         (WebCore::SVGPatternElement::isSupportedAttribute): Deleted.
1262         (WebCore::SVGPatternElement::requiredFeatures): Deleted.
1263         (WebCore::SVGPatternElement::requiredExtensions): Deleted.
1264         (WebCore::SVGPatternElement::systemLanguage): Deleted.
1265         * svg/SVGPatternElement.h:
1266         * svg/SVGPointListValues.h:
1267         (WebCore::SVGPropertyTraits<SVGPointListValues>::toString):
1268         * svg/SVGPolyElement.cpp:
1269         (WebCore::SVGPolyElement::SVGPolyElement):
1270         (WebCore::SVGPolyElement::registerAttributes):
1271         (WebCore::SVGPolyElement::parseAttribute):
1272         (WebCore::SVGPolyElement::svgAttributeChanged):
1273         (WebCore::SVGPolyElement::points):
1274         (WebCore::SVGPolyElement::animatedPoints):
1275         (WebCore::SVGPolyElement::pointsPropertyInfo): Deleted.
1276         (WebCore::SVGPolyElement::synchronizePoints): Deleted.
1277         (WebCore::SVGPolyElement::lookupOrCreatePointsWrapper): Deleted.
1278         * svg/SVGPolyElement.h:
1279         (WebCore::SVGPolyElement::pointList const):
1280         (WebCore::SVGPolyElement::attributeRegistry):
1281         (WebCore::SVGPolyElement::isKnownAttribute):
1282         * svg/SVGPreserveAspectRatioValue.cpp:
1283         (WebCore::SVGPreserveAspectRatioValue::transformRect const):
1284         (WebCore::SVGPreserveAspectRatioValue::transformRect): Deleted.
1285         * svg/SVGPreserveAspectRatioValue.h:
1286         * svg/SVGRadialGradientElement.cpp:
1287         (WebCore::SVGRadialGradientElement::SVGRadialGradientElement):
1288         (WebCore::SVGRadialGradientElement::registerAttributes):
1289         (WebCore::SVGRadialGradientElement::parseAttribute):
1290         (WebCore::SVGRadialGradientElement::svgAttributeChanged):
1291         (WebCore::SVGRadialGradientElement::isSupportedAttribute): Deleted.
1292         * svg/SVGRadialGradientElement.h:
1293         * svg/SVGRectElement.cpp:
1294         (WebCore::SVGRectElement::SVGRectElement):
1295         (WebCore::SVGRectElement::registerAttributes):
1296         (WebCore::SVGRectElement::parseAttribute):
1297         (WebCore::SVGRectElement::svgAttributeChanged):
1298         * svg/SVGRectElement.h:
1299         * svg/SVGSVGElement.cpp:
1300         (WebCore::SVGSVGElement::SVGSVGElement):
1301         (WebCore::SVGSVGElement::registerAttributes):
1302         (WebCore::SVGSVGElement::parseAttribute):
1303         (WebCore::SVGSVGElement::svgAttributeChanged):
1304         (WebCore::SVGSVGElement::viewBoxToViewTransform const):
1305         (WebCore::SVGSVGElement::resetScrollAnchor):
1306         (WebCore::SVGSVGElement::inheritViewAttributes):
1307         * svg/SVGSVGElement.h:
1308         (WebCore::SVGSVGElement::useCurrentView const): Deleted.
1309         (WebCore::SVGSVGElement::currentTranslateValue): Deleted.
1310         (WebCore::SVGSVGElement::zoomAndPan const): Deleted.
1311         (WebCore::SVGSVGElement::setZoomAndPan): Deleted.
1312         (WebCore::SVGSVGElement::timeContainer): Deleted.
1313         (WebCore::SVGSVGElement::hasEmptyViewBox const): Deleted.
1314         * svg/SVGScriptElement.cpp:
1315         (WebCore::SVGScriptElement::SVGScriptElement):
1316         (WebCore::SVGScriptElement::svgAttributeChanged):
1317         (WebCore::SVGScriptElement::insertedIntoAncestor):
1318         (WebCore::SVGScriptElement::addSubresourceAttributeURLs const):
1319         (WebCore::SVGScriptElement::isURLAttribute const): Deleted.
1320         (WebCore::SVGScriptElement::sourceAttributeValue const): Deleted.
1321         (WebCore::SVGScriptElement::charsetAttributeValue const): Deleted.
1322         (WebCore::SVGScriptElement::typeAttributeValue const): Deleted.
1323         (WebCore::SVGScriptElement::languageAttributeValue const): Deleted.
1324         (WebCore::SVGScriptElement::forAttributeValue const): Deleted.
1325         (WebCore::SVGScriptElement::eventAttributeValue const): Deleted.
1326         (WebCore::SVGScriptElement::hasAsyncAttribute const): Deleted.
1327         (WebCore::SVGScriptElement::hasDeferAttribute const): Deleted.
1328         (WebCore::SVGScriptElement::hasNoModuleAttribute const): Deleted.
1329         (WebCore::SVGScriptElement::hasSourceAttribute const): Deleted.
1330         (WebCore::SVGScriptElement::filterOutAnimatableAttribute const): Deleted.
1331         * svg/SVGScriptElement.h:
1332         * svg/SVGStopElement.cpp:
1333         (WebCore::SVGStopElement::SVGStopElement):
1334         (WebCore::SVGStopElement::registerAttributes):
1335         (WebCore::SVGStopElement::parseAttribute):
1336         * svg/SVGStopElement.h:
1337         * svg/SVGStringListValues.h:
1338         (WebCore::SVGPropertyTraits<SVGStringListValues>::toString):
1339         * svg/SVGSwitchElement.cpp:
1340         (WebCore::SVGSwitchElement::SVGSwitchElement):
1341         * svg/SVGSwitchElement.h:
1342         * svg/SVGSymbolElement.cpp:
1343         (WebCore::SVGSymbolElement::SVGSymbolElement):
1344         (WebCore::SVGSymbolElement::parseAttribute):
1345         (WebCore::SVGSymbolElement::svgAttributeChanged):
1346         * svg/SVGSymbolElement.h:
1347         * svg/SVGTRefElement.cpp:
1348         (WebCore::SVGTRefElement::SVGTRefElement):
1349         * svg/SVGTRefElement.h:
1350         * svg/SVGTests.cpp:
1351         (WebCore::SVGTests::SVGTests):
1352         (WebCore::SVGTests::registerAttributes):
1353         (WebCore::SVGTests::attributeRegistry):
1354         (WebCore::SVGTests::isKnownAttribute):
1355         (WebCore::SVGTests::isValid const):
1356         (WebCore::SVGTests::parseAttribute):
1357         (WebCore::SVGTests::svgAttributeChanged):
1358         (WebCore::SVGTests::requiredFeatures):
1359         (WebCore::SVGTests::requiredExtensions):
1360         (WebCore::SVGTests::systemLanguage):
1361         (WebCore::createSVGTestPropertyInfo): Deleted.
1362         (WebCore::createSVGTextAttributeToPropertyMap): Deleted.
1363         (WebCore::SVGTests::attributeToPropertyMap): Deleted.
1364         (WebCore::SVGTests::handleAttributeChange): Deleted.
1365         (WebCore::SVGTests::synchronizeAttribute): Deleted.
1366         (WebCore::SVGTests::synchronizeRequiredFeatures): Deleted.
1367         (WebCore::SVGTests::synchronizeRequiredExtensions): Deleted.
1368         (WebCore::SVGTests::synchronizeSystemLanguage): Deleted.
1369         * svg/SVGTests.h:
1370         * svg/SVGTextContentElement.cpp:
1371         (WebCore::SVGTextContentElement::SVGTextContentElement):
1372         (WebCore::SVGTextContentElement::registerAttributes):
1373         (WebCore::SVGTextContentElement::parseAttribute):
1374         (WebCore::SVGTextContentElement::svgAttributeChanged):
1375         (WebCore::SVGTextContentElement::textLengthPropertyInfo): Deleted.
1376         (WebCore::SVGTextContentElement::synchronizeTextLength): Deleted.
1377         (WebCore::SVGTextContentElement::lookupOrCreateTextLengthWrapper): Deleted.
1378         (WebCore::SVGTextContentElement::textLengthAnimated): Deleted.
1379         (WebCore::SVGTextContentElement::isSupportedAttribute): Deleted.
1380         * svg/SVGTextContentElement.h:
1381         (WebCore::SVGTextContentElement::specifiedTextLength):
1382         (WebCore::SVGTextContentElement::attributeRegistry):
1383         (WebCore::SVGTextContentElement::textLength const):
1384         (WebCore::SVGTextContentElement::lengthAdjust const):
1385         (WebCore::SVGTextContentElement::textLengthAnimated):
1386         (WebCore::SVGTextContentElement::lengthAdjustAnimated):
1387         (WebCore::SVGTextContentElement::isKnownAttribute):
1388         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::SVGAnimatedCustomLengthAttribute):
1389         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::synchronize):
1390         (WebCore::SVGTextContentElement::SVGAnimatedCustomLengthAttribute::animatedProperty):
1391         * svg/SVGTextPathElement.cpp:
1392         (WebCore::SVGTextPathElement::SVGTextPathElement):
1393         (WebCore::SVGTextPathElement::registerAttributes):
1394         (WebCore::SVGTextPathElement::parseAttribute):
1395         (WebCore::SVGTextPathElement::svgAttributeChanged):
1396         (WebCore::SVGTextPathElement::isSupportedAttribute): Deleted.
1397         * svg/SVGTextPathElement.h:
1398         * svg/SVGTextPositioningElement.cpp:
1399         (WebCore::SVGTextPositioningElement::SVGTextPositioningElement):
1400         (WebCore::SVGTextPositioningElement::registerAttributes):
1401         (WebCore::SVGTextPositioningElement::parseAttribute):
1402         (WebCore::SVGTextPositioningElement::svgAttributeChanged):
1403         * svg/SVGTextPositioningElement.h:
1404         (WebCore::SVGTextPositioningElement::attributeRegistry):
1405         (WebCore::SVGTextPositioningElement::x const):
1406         (WebCore::SVGTextPositioningElement::y const):
1407         (WebCore::SVGTextPositioningElement::dx const):
1408         (WebCore::SVGTextPositioningElement::dy const):
1409         (WebCore::SVGTextPositioningElement::rotate const):
1410         (WebCore::SVGTextPositioningElement::xAnimated):
1411         (WebCore::SVGTextPositioningElement::yAnimated):
1412         (WebCore::SVGTextPositioningElement::dxAnimated):
1413         (WebCore::SVGTextPositioningElement::dyAnimated):
1414         (WebCore::SVGTextPositioningElement::rotateAnimated):
1415         (WebCore::SVGTextPositioningElement::isKnownAttribute):
1416         * svg/SVGURIReference.cpp:
1417         (WebCore::SVGURIReference::SVGURIReference):
1418         (WebCore::SVGURIReference::registerAttributes):
1419         (WebCore::SVGURIReference::attributeRegistry):
1420         (WebCore::SVGURIReference::isKnownAttribute):
1421         (WebCore::SVGURIReference::parseAttribute):
1422         (WebCore::SVGURIReference::href const):
1423         (WebCore::SVGURIReference::hrefAnimated):
1424         (WebCore::SVGURIReference::addSupportedAttributes): Deleted.
1425         * svg/SVGURIReference.h:
1426         * svg/SVGUseElement.cpp:
1427         (WebCore::SVGUseElement::SVGUseElement):
1428         (WebCore::SVGUseElement::registerAttributes):
1429         (WebCore::SVGUseElement::parseAttribute):
1430         (WebCore::SVGUseElement::insertedIntoAncestor):
1431         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone const):
1432         (WebCore::SVGUseElement::svgAttributeChanged):
1433         (WebCore::SVGUseElement::notifyFinished):
1434         * svg/SVGUseElement.h:
1435         * svg/SVGValue.h:
1436         * svg/SVGViewElement.cpp:
1437         (WebCore::SVGViewElement::SVGViewElement):
1438         (WebCore::SVGViewElement::parseAttribute):
1439         * svg/SVGViewElement.h:
1440         * svg/SVGViewSpec.cpp:
1441         (WebCore::SVGViewSpec::SVGViewSpec):
1442         (WebCore::SVGViewSpec::registerAttributes):
1443         (WebCore::SVGViewSpec::transform):
1444         (WebCore::SVGViewSpec::reset):
1445         (WebCore::SVGViewSpec::parseViewSpec):
1446         (WebCore::SVGViewSpec::viewBoxPropertyInfo): Deleted.
1447         (WebCore::SVGViewSpec::preserveAspectRatioPropertyInfo): Deleted.
1448         (WebCore::SVGViewSpec::transformPropertyInfo): Deleted.
1449         (WebCore::SVGViewSpec::viewBoxIdentifier): Deleted.
1450         (WebCore::SVGViewSpec::preserveAspectRatioIdentifier): Deleted.
1451         (WebCore::SVGViewSpec::transformIdentifier): Deleted.
1452         (WebCore::SVGViewSpec::setZoomAndPan): Deleted.
1453         (WebCore::SVGViewSpec::transformString const): Deleted.
1454         (WebCore::SVGViewSpec::viewBoxString const): Deleted.
1455         (WebCore::SVGViewSpec::preserveAspectRatioString const): Deleted.
1456         (WebCore::SVGViewSpec::viewBoxAnimated): Deleted.
1457         (WebCore::SVGViewSpec::preserveAspectRatioAnimated): Deleted.
1458         (WebCore::SVGViewSpec::lookupOrCreateViewBoxWrapper): Deleted.
1459         (WebCore::SVGViewSpec::lookupOrCreatePreserveAspectRatioWrapper): Deleted.
1460         (WebCore::SVGViewSpec::lookupOrCreateTransformWrapper): Deleted.
1461         * svg/SVGViewSpec.h:
1462         * svg/SVGViewSpec.idl:
1463         * svg/SVGZoomAndPan.cpp:
1464         (WebCore::SVGZoomAndPan::SVGZoomAndPan):
1465         (WebCore::SVGZoomAndPan::registerAttributes):
1466         (WebCore::SVGZoomAndPan::parseZoomAndPan):
1467         (WebCore::SVGZoomAndPan::parseAttribute):
1468         (WebCore::SVGZoomAndPan::parse): Deleted.
1469         (WebCore::SVGZoomAndPan::parseAttributeValue): Deleted.
1470         * svg/SVGZoomAndPan.h:
1471         (WebCore::SVGZoomAndPan::zoomAndPan const):
1472         (WebCore::SVGZoomAndPan::setZoomAndPan):
1473         (WebCore::SVGZoomAndPan::reset):
1474         (WebCore::SVGZoomAndPan::attributeRegistry):
1475         (WebCore::SVGZoomAndPan::isKnownAttribute):
1476         (WebCore::SVGZoomAndPan::parseFromNumber): Deleted.
1477         (WebCore::SVGZoomAndPan::parseAttribute): Deleted.
1478         * svg/SVGZoomAndPanType.h: Copied from Source/WebCore/svg/SVGValue.h.
1479         (WebCore::SVGPropertyTraits<SVGZoomAndPanType>::initialValue):
1480         (WebCore::SVGPropertyTraits<SVGZoomAndPanType>::toString):
1481         (WebCore::SVGPropertyTraits<SVGZoomAndPanType>::fromString):
1482         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h:
1483         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.cpp: Copied from Source/WebCore/svg/SVGValue.h.
1484         (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
1485         (WebCore::SVGAnimatedPathSegListPropertyTearOff::~SVGAnimatedPathSegListPropertyTearOff):
1486         (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
1487         * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
1488         * svg/properties/SVGAnimatedProperty.cpp:
1489         (WebCore::SVGAnimatedProperty::SVGAnimatedProperty):
1490         (WebCore::SVGAnimatedProperty::~SVGAnimatedProperty):
1491         (WebCore::SVGAnimatedProperty::animatedPropertyCache): Deleted.
1492         * svg/properties/SVGAnimatedProperty.h:
1493         (WebCore::SVGAnimatedProperty::isAnimating const):
1494         (WebCore::SVGAnimatedProperty::isAnimatedListTearOff const):
1495         (WebCore::SVGAnimatedProperty::lookupOrCreateAnimatedProperty):
1496         (WebCore::SVGAnimatedProperty::lookupAnimatedProperty):
1497         (WebCore::SVGAnimatedProperty::animatedPropertyCache):
1498         (WebCore::SVGAnimatedProperty::lookupOrCreateWrapper): Deleted.
1499         (WebCore::SVGAnimatedProperty::lookupWrapper): Deleted.
1500         * svg/properties/SVGAnimatedPropertyMacros.h: Removed.
1501         * svg/properties/SVGAnimatedPropertyType.h: Copied from Source/WebCore/svg/SVGAElement.idl.
1502         * svg/properties/SVGAttribute.h: Added.
1503         (WebCore::SVGPropertyAttribute::SVGPropertyAttribute):
1504         (WebCore::SVGPropertyAttribute::value):
1505         (WebCore::SVGPropertyAttribute::value const):
1506         (WebCore::SVGPropertyAttribute::setValue):
1507         (WebCore::SVGPropertyAttribute::resetValue):
1508         (WebCore::SVGPropertyAttribute::toString const):
1509         (WebCore::SVGPropertyAttribute::setShouldSynchronize):
1510         (WebCore::SVGPropertyAttribute::shouldSynchronize const):
1511         (WebCore::SVGPropertyAttribute::synchronize):
1512         (WebCore::SVGAnimatedAttribute::SVGAnimatedAttribute):
1513         (WebCore::SVGAnimatedAttribute::currentValue const):
1514         (WebCore::SVGAnimatedAttribute::animatedProperty):
1515         (WebCore::SVGAnimatedAttributeList::SVGAnimatedAttributeList):
1516         (WebCore::SVGAnimatedAttributeList::detachAnimatedListWrappers):
1517         * svg/properties/SVGAttributeAccessor.h: Added.
1518         (WebCore::SVGAttributeAccessor::SVGAttributeAccessor):
1519         (WebCore::SVGAttributeAccessor::attributeName const):
1520         (WebCore::SVGAttributeAccessor::isAnimatedLengthAttribute const):
1521         (WebCore::SVGAttributeAccessor::animatedType const):
1522         (WebCore::SVGAttributeAccessor::animatedTypes const):
1523         (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperty const):
1524         (WebCore::SVGAttributeAccessor::lookupAnimatedProperty const):
1525         (WebCore::SVGAttributeAccessor::lookupOrCreateAnimatedProperties const):
1526         (WebCore::SVGPropertyAttributeAccessor::singleton):
1527         (WebCore::SVGPropertyAttributeAccessor::SVGPropertyAttributeAccessor):
1528         (WebCore::SVGPropertyAttributeAccessor::attribute const):
1529         (WebCore::SVGAnimatedAttributeAccessor::singleton):
1530         (WebCore::SVGAnimatedAttributeAccessor::SVGAnimatedAttributeAccessor):
1531         (WebCore::SVGAnimatedAttributeAccessor::lookupOrCreateAnimatedProperty):
1532         (WebCore::SVGAnimatedAttributeAccessor::lookupAnimatedProperty):
1533         (WebCore::SVGAnimatedPairAttributeAccessor::SVGAnimatedPairAttributeAccessor):
1534         (WebCore::SVGAnimatedPairAttributeAccessor::secondAttribute const):
1535         * svg/properties/SVGAttributeOwnerProxy.h: Copied from Source/WebCore/svg/SVGValue.h.
1536         (WebCore::SVGAttributeOwnerProxy::SVGAttributeOwnerProxy):
1537         (WebCore::SVGAttributeOwnerProxy::element const):
1538         * svg/properties/SVGAttributeOwnerProxyImpl.h: Added.
1539         (WebCore::SVGAttributeOwnerProxyImpl::SVGAttributeOwnerProxyImpl):
1540         (WebCore::SVGAttributeOwnerProxyImpl::attributeRegistry):
1541         (WebCore::SVGAttributeOwnerProxyImpl::isKnownAttribute):
1542         (WebCore::SVGAttributeOwnerProxyImpl::isAnimatedLengthAttribute):
1543         * svg/properties/SVGAttributeRegistry.h: Added.
1544         (WebCore::SVGAttributeRegistry::registerAttribute):
1545         (WebCore::SVGAttributeRegistry::isEmpty const):
1546         (WebCore::SVGAttributeRegistry::isKnownAttribute const):
1547         (WebCore::SVGAttributeRegistry::isAnimatedLengthAttribute const):
1548         (WebCore::SVGAttributeRegistry::animatedTypes const):
1549         (WebCore::SVGAttributeRegistry::synchronizeAttributes const):
1550         (WebCore::SVGAttributeRegistry::synchronizeAttribute const):
1551         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperty const):
1552         (WebCore::SVGAttributeRegistry::lookupAnimatedProperty const):
1553         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedProperties const):
1554         (WebCore::SVGAttributeRegistry::animatedTypesBaseTypes):
1555         (WebCore::SVGAttributeRegistry::synchronizeAttributesBaseTypes):
1556         (WebCore::SVGAttributeRegistry::synchronizeAttributeBaseTypes):
1557         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertyBaseTypes):
1558         (WebCore::SVGAttributeRegistry::lookupAnimatedPropertyBaseTypes):
1559         (WebCore::SVGAttributeRegistry::lookupOrCreateAnimatedPropertiesBaseTypes):
1560         (WebCore::SVGAttributeRegistry::findAttributeAccessor const):
1561         * svg/properties/SVGAttributeToPropertyMap.cpp: Removed.
1562         * svg/properties/SVGAttributeToPropertyMap.h: Removed.
1563         * svg/properties/SVGPropertyInfo.cpp: Removed.
1564         * svg/properties/SVGPropertyInfo.h: Removed.
1565
1566 2018-08-06  Alex Christensen  <achristensen@webkit.org>
1567
1568         Use enum classes and OptionSets for PaintPhase and PaintBehavior
1569         https://bugs.webkit.org/show_bug.cgi?id=188323
1570
1571         Reviewed by Simon Fraser.
1572
1573         No change in behaviour.
1574
1575         * html/shadow/MediaControlElements.cpp:
1576         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
1577         * page/FrameSnapshotting.cpp:
1578         (WebCore::snapshotFrameRectWithClip):
1579         * page/FrameView.cpp:
1580         (WebCore::FrameView::reset):
1581         (WebCore::FrameView::willPaintContents):
1582         (WebCore::FrameView::paintContents):
1583         (WebCore::FrameView::setPaintBehavior):
1584         (WebCore::FrameView::paintBehavior const):
1585         (WebCore::FrameView::paintContentsForSnapshot):
1586         * page/FrameView.h:
1587         * rendering/InlineElementBox.cpp:
1588         (WebCore::InlineElementBox::paint):
1589         * rendering/InlineFlowBox.cpp:
1590         (WebCore::InlineFlowBox::paint):
1591         (WebCore::InlineFlowBox::paintBoxDecorations):
1592         (WebCore::InlineFlowBox::paintMask):
1593         * rendering/InlineTextBox.cpp:
1594         (WebCore::InlineTextBox::paint):
1595         * rendering/PaintInfo.h:
1596         (WebCore::PaintInfo::PaintInfo):
1597         (WebCore::PaintInfo::forceBlackText const):
1598         (WebCore::PaintInfo::forceWhiteText const):
1599         (WebCore::PaintInfo::skipRootBackground const):
1600         (WebCore::PaintInfo::paintRootBackgroundOnly const):
1601         * rendering/PaintPhase.h:
1602         (): Deleted.
1603         * rendering/RenderBlock.cpp:
1604         (WebCore::RenderBlock::paint):
1605         (WebCore::RenderBlock::paintContents):
1606         (WebCore::RenderBlock::paintObject):
1607         (WebCore::RenderBlock::paintSelection):
1608         * rendering/RenderBlockFlow.cpp:
1609         (WebCore::RenderBlockFlow::paintFloats):
1610         * rendering/RenderBox.cpp:
1611         (WebCore::RenderBox::paintMask):
1612         (WebCore::RenderBox::paintClippingMask):
1613         (WebCore::RenderBox::paintMaskImages):
1614         (WebCore::RenderBox::pushContentsClip):
1615         (WebCore::RenderBox::popContentsClip):
1616         * rendering/RenderBox.h:
1617         * rendering/RenderBoxModelObject.cpp:
1618         (WebCore::RenderBoxModelObject::decodingModeForImageDraw const):
1619         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
1620         (WebCore::RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates const):
1621         * rendering/RenderDetailsMarker.cpp:
1622         (WebCore::RenderDetailsMarker::paint):
1623         * rendering/RenderElement.cpp:
1624         (WebCore::RenderElement::paintAsInlineBlock):
1625         (WebCore::RenderElement::selectionColor const):
1626         * rendering/RenderEmbeddedObject.cpp:
1627         (WebCore::RenderEmbeddedObject::paint):
1628         (WebCore::RenderEmbeddedObject::paintReplaced):
1629         * rendering/RenderFileUploadControl.cpp:
1630         (WebCore::RenderFileUploadControl::paintObject):
1631         * rendering/RenderFrameSet.cpp:
1632         (WebCore::RenderFrameSet::paint):
1633         * rendering/RenderHTMLCanvas.cpp:
1634         (WebCore::RenderHTMLCanvas::paintReplaced):
1635         * rendering/RenderImage.cpp:
1636         (WebCore::RenderImage::paintReplaced):
1637         (WebCore::RenderImage::paint):
1638         * rendering/RenderLayer.cpp:
1639         (WebCore::RenderLayer::renderableTransform const):
1640         (WebCore::transparencyClipBox):
1641         (WebCore::expandClipRectForDescendantsAndReflection):
1642         (WebCore::paintingExtent):
1643         (WebCore::RenderLayer::paint):
1644         (WebCore::RenderLayer::paintOverlayScrollbars):
1645         (WebCore::RenderLayer::paintLayer):
1646         (WebCore::RenderLayer::paintLayerContents):
1647         (WebCore::RenderLayer::paintBackgroundForFragments):
1648         (WebCore::RenderLayer::paintForegroundForFragments):
1649         (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase):
1650         (WebCore::RenderLayer::paintOutlineForFragments):
1651         (WebCore::RenderLayer::paintMaskForFragments):
1652         (WebCore::RenderLayer::paintChildClippingMaskForFragments):
1653         (WebCore::RenderLayer::calculateClipRects const):
1654         * rendering/RenderLayer.h:
1655         * rendering/RenderLayerBacking.cpp:
1656         (WebCore::RenderLayerBacking::paintIntoLayer):
1657         (WebCore::RenderLayerBacking::paintContents):
1658         * rendering/RenderLayerBacking.h:
1659         * rendering/RenderLineBoxList.cpp:
1660         (WebCore::RenderLineBoxList::paint const):
1661         * rendering/RenderListBox.cpp:
1662         (WebCore::RenderListBox::paintObject):
1663         * rendering/RenderListMarker.cpp:
1664         (WebCore::RenderListMarker::paint):
1665         * rendering/RenderReplaced.cpp:
1666         (WebCore::RenderReplaced::paint):
1667         (WebCore::RenderReplaced::shouldPaint):
1668         * rendering/RenderReplica.cpp:
1669         (WebCore::RenderReplica::paint):
1670         * rendering/RenderScrollbarPart.cpp:
1671         (WebCore::RenderScrollbarPart::paintIntoRect):
1672         * rendering/RenderSnapshottedPlugIn.cpp:
1673         (WebCore::RenderSnapshottedPlugIn::paint):
1674         * rendering/RenderTable.cpp:
1675         (WebCore::RenderTable::paintObject):
1676         (WebCore::RenderTable::paintMask):
1677         (WebCore::RenderTable::overflowClipRect):
1678         * rendering/RenderTable.h:
1679         * rendering/RenderTableCell.cpp:
1680         (WebCore::RenderTableCell::paint):
1681         (WebCore::RenderTableCell::paintCollapsedBorders):
1682         (WebCore::RenderTableCell::paintMask):
1683         * rendering/RenderTableRow.cpp:
1684         (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
1685         (WebCore::RenderTableRow::paint):
1686         * rendering/RenderTableSection.cpp:
1687         (WebCore::RenderTableSection::paint):
1688         (WebCore::RenderTableSection::paintCell):
1689         (WebCore::RenderTableSection::paintObject):
1690         * rendering/RenderThemeMac.mm:
1691         (WebCore::RenderThemeMac::paintSnapshottedPluginOverlay):
1692         (WebCore::RenderThemeMac::paintImageControlsButton):
1693         * rendering/RenderVideo.cpp:
1694         (WebCore::RenderVideo::paintReplaced):
1695         * rendering/RenderWidget.cpp:
1696         (WebCore::RenderWidget::paintContents):
1697         (WebCore::RenderWidget::paint):
1698         * rendering/RootInlineBox.cpp:
1699         (WebCore::RootInlineBox::paintEllipsisBox const):
1700         * rendering/SimpleLineLayoutFunctions.cpp:
1701         (WebCore::SimpleLineLayout::paintFlow):
1702         * rendering/mathml/MathOperator.cpp:
1703         (WebCore::MathOperator::paint):
1704         * rendering/mathml/RenderMathMLBlock.cpp:
1705         (WebCore::RenderMathMLBlock::paint):
1706         * rendering/mathml/RenderMathMLFraction.cpp:
1707         (WebCore::RenderMathMLFraction::paint):
1708         * rendering/mathml/RenderMathMLMenclose.cpp:
1709         (WebCore::RenderMathMLMenclose::paint):
1710         * rendering/mathml/RenderMathMLToken.cpp:
1711         (WebCore::RenderMathMLToken::paint):
1712         * rendering/svg/RenderSVGContainer.cpp:
1713         (WebCore::RenderSVGContainer::paint):
1714         * rendering/svg/RenderSVGForeignObject.cpp:
1715         (WebCore::RenderSVGForeignObject::paint):
1716         * rendering/svg/RenderSVGImage.cpp:
1717         (WebCore::RenderSVGImage::paint):
1718         * rendering/svg/RenderSVGResource.cpp:
1719         (WebCore::requestPaintingResource):
1720         * rendering/svg/RenderSVGResourceClipper.cpp:
1721         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1722         * rendering/svg/RenderSVGResourceSolidColor.cpp:
1723         (WebCore::RenderSVGResourceSolidColor::applyResource):
1724         * rendering/svg/RenderSVGRoot.cpp:
1725         (WebCore::RenderSVGRoot::paintReplaced):
1726         * rendering/svg/RenderSVGShape.cpp:
1727         (WebCore::RenderSVGShape::paint):
1728         * rendering/svg/RenderSVGText.cpp:
1729         (WebCore::RenderSVGText::paint):
1730         * rendering/svg/SVGInlineFlowBox.cpp:
1731         (WebCore::SVGInlineFlowBox::paintSelectionBackground):
1732         (WebCore::SVGInlineFlowBox::paint):
1733         * rendering/svg/SVGInlineTextBox.cpp:
1734         (WebCore::SVGInlineTextBox::paintSelectionBackground):
1735         (WebCore::SVGInlineTextBox::paint):
1736         * rendering/svg/SVGRenderingContext.cpp:
1737         (WebCore::isRenderingMaskImage):
1738         (WebCore::SVGRenderingContext::renderSubtreeToImageBuffer):
1739         * rendering/svg/SVGRootInlineBox.cpp:
1740         (WebCore::SVGRootInlineBox::paint):
1741
1742 2018-08-06  Ryan Haddad  <ryanhaddad@apple.com>
1743
1744         Unreviewed, rolling out r234569.
1745
1746         Breaks internal builds.
1747
1748         Reverted changeset:
1749
1750         "We should cache the compiled sandbox profile in a data vault"
1751         https://bugs.webkit.org/show_bug.cgi?id=184991
1752         https://trac.webkit.org/changeset/234569
1753
1754 2018-08-06  Alex Christensen  <achristensen@webkit.org>
1755
1756         Make BlendMode an enum class
1757         https://bugs.webkit.org/show_bug.cgi?id=188325
1758
1759         Reviewed by Darin Adler.
1760
1761         No change in behavior.
1762
1763         * css/CSSPrimitiveValueMappings.h:
1764         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1765         (WebCore::CSSPrimitiveValue::operator BlendMode const):
1766         * html/HTMLImageElement.cpp:
1767         (WebCore::HTMLImageElement::parseAttribute):
1768         * html/canvas/CanvasRenderingContext2DBase.cpp:
1769         (WebCore::CanvasRenderingContext2DBase::State::State):
1770         (WebCore::CanvasRenderingContext2DBase::setGlobalCompositeOperation):
1771         (WebCore::CanvasRenderingContext2DBase::drawImageFromRect):
1772         * platform/graphics/BitmapImage.h:
1773         * platform/graphics/GraphicsContext.h:
1774         (WebCore::ImagePaintingOptions::ImagePaintingOptions):
1775         * platform/graphics/GraphicsContextImpl.h:
1776         * platform/graphics/GraphicsLayer.cpp:
1777         (WebCore::GraphicsLayer::dumpProperties const):
1778         * platform/graphics/GraphicsLayer.h:
1779         * platform/graphics/GraphicsTypes.cpp:
1780         (WebCore::parseBlendMode):
1781         (WebCore::parseCompositeAndBlendOperator):
1782         (WebCore::compositeOperatorName):
1783         (WebCore::blendModeName):
1784         (WebCore::operator<<):
1785         * platform/graphics/GraphicsTypes.h:
1786         * platform/graphics/Image.cpp:
1787         (WebCore::Image::drawTiled):
1788         * platform/graphics/Image.h:
1789         * platform/graphics/ImageBuffer.h:
1790         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
1791         (PlatformCAFilters::setBlendingFiltersOnLayer):
1792         * platform/graphics/cg/GraphicsContextCG.cpp:
1793         (WebCore::selectCGBlendMode):
1794         * platform/graphics/cpu/arm/filters/FEBlendNEON.h:
1795         (WebCore::FEBlend::platformApplyNEON):
1796         * platform/graphics/displaylists/DisplayListItems.h:
1797         * platform/graphics/displaylists/DisplayListRecorder.h:
1798         * platform/graphics/filters/FEBlend.cpp:
1799         (WebCore::FEBlend::externalRepresentation const):
1800         * rendering/RenderBox.cpp:
1801         (WebCore::RenderBox::paintFillLayers):
1802         * rendering/RenderImage.cpp:
1803         (WebCore::RenderImage::paintIntoRect):
1804         * rendering/RenderLayer.cpp:
1805         (WebCore::RenderLayer::RenderLayer):
1806         (WebCore::RenderLayer::updateBlendMode):
1807         (WebCore::RenderLayer::beginTransparencyLayers):
1808         * rendering/RenderLayerBacking.cpp:
1809         (WebCore::RenderLayerBacking::updateBlendMode):
1810         * rendering/style/FillLayer.cpp:
1811         (WebCore::FillLayer::FillLayer):
1812         (WebCore::FillLayer::hasOpaqueImage const):
1813         * rendering/style/FillLayer.h:
1814         (WebCore::FillLayer::initialFillBlendMode):
1815         * rendering/style/RenderStyle.h:
1816         (WebCore::RenderStyle::setBlendMode):
1817         (WebCore::RenderStyle::hasBlendMode const):
1818         (WebCore::RenderStyle::blendMode const):
1819         (WebCore::RenderStyle::initialBlendMode):
1820         * rendering/style/StyleRareNonInheritedData.cpp:
1821         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1822         * rendering/svg/SVGRenderingContext.cpp:
1823         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
1824         * svg/SVGAnimatedEnumeration.cpp:
1825         (WebCore::enumerationValueForTargetAttribute):
1826         * svg/SVGFEBlendElement.cpp:
1827         (WebCore::SVGFEBlendElement::SVGFEBlendElement):
1828         (WebCore::SVGFEBlendElement::parseAttribute):
1829         * svg/SVGFEBlendElement.h:
1830         (WebCore::SVGPropertyTraits<BlendMode>::highestEnumValue):
1831         (WebCore::SVGPropertyTraits<BlendMode>::toString):
1832         * svg/graphics/SVGImage.cpp:
1833         (WebCore::SVGImage::nativeImageForCurrentFrame):
1834         (WebCore::SVGImage::nativeImage):
1835         (WebCore::SVGImage::drawPatternForContainer):
1836         (WebCore::SVGImage::draw):
1837
1838 2018-08-06  Aditya Keerthi  <akeerthi@apple.com>
1839
1840         [iOS] Indeterminate checkboxes appear unchecked
1841         https://bugs.webkit.org/show_bug.cgi?id=160484
1842         <rdar://problem/31143185>
1843
1844         Reviewed by Wenson Hsieh.
1845
1846         Add support for rendering indeterminate checkboxes on iOS.
1847
1848         We now paint the unchecked appearance only if the checkbox is not checked and is
1849         not indeterminate. Otherwise, we draw a checkmark if the checkbox is in the
1850         checked state and a dash if the checkbox is in the indeterminate state. Both of
1851         these states share the same dark background.
1852
1853         Test: fast/forms/ios/render-indeterminate-checkbox.html
1854
1855         * css/html.css:
1856         (input[type="checkbox"]:indeterminate):
1857         (input[type="checkbox"]:indeterminate:disabled):
1858         * rendering/RenderThemeIOS.mm:
1859         (WebCore::drawJoinedLines):
1860         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
1861
1862 2018-08-06  Ryosuke Niwa  <rniwa@webkit.org>
1863
1864         HTML parser should execute custom element reactions for setting attributes immediately after creating a custom element
1865         https://bugs.webkit.org/show_bug.cgi?id=188336
1866
1867         Reviewed by Frédéric Wang.
1868
1869         Push and pop an element queue from the custom element reactions stack when constructing a custom element:
1870         https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
1871
1872         To do this, we instantiate CustomElementReactionStack in HTMLDocumentParser::runScriptsForPausedTreeBuilder
1873         where we synchronously construct a custom element. We don't have to worry about whether *will execute script*
1874         is set or not since the presence of an element queue should not be observable in the case where we're constructing
1875         a fallback element (since it would not enqueue any new custom element reaction).
1876
1877         Tests: imported/w3c/web-platform-tests/custom-elements/parser/parser-sets-attributes-and-children.html
1878
1879         * html/parser/HTMLDocumentParser.cpp:
1880         (WebCore::HTMLDocumentParser::runScriptsForPausedTreeBuilder): Instantiate CustomElementReactionStack. Note that we
1881         don't insert the custom element into the parser until we finish processing the custom element reactions.
1882
1883 2018-08-06  Charlie Turner  <cturner@igalia.com>
1884
1885         Return extracted key ids as an optional
1886         https://bugs.webkit.org/show_bug.cgi?id=188303
1887
1888         Reviewed by Darin Adler.
1889
1890         An empty list of extracted key ids was being considered a failure
1891         case before this patch. In the PSSH boxes from the CENC standard,
1892         it's not uncommon for the box to be version 0, meaning it has no
1893         embedded key ids, so the case when there's an empty list should
1894         not be treated as an error. Given this, the interface should be
1895         more general and allow for a sentinel value indicating a parsing
1896         error rather than an absence of key ids.
1897
1898         Covered by existing tests.
1899
1900         * Modules/encryptedmedia/InitDataRegistry.cpp:
1901         (WebCore::extractKeyIDsKeyids): Change return type to be wrapped
1902         in an optional, and make parsing errors return a nullopt rather
1903         than an empty vector.
1904         (WebCore::sanitizeKeyids): Use the new optional interface, return
1905         a null RefPtr in the case of a parsing error, this method may now
1906         return an empty vector.
1907         (WebCore::extractKeyIDsCenc): Not implemented, so return an error
1908         value rather than an empty vector.
1909         (WebCore::extractKeyIDsWebM): Ditto.
1910         (WebCore::InitDataRegistry::extractKeyIDs): Ditto.
1911         * Modules/encryptedmedia/InitDataRegistry.h: Update the interface
1912         to use an optional return type.
1913         * platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
1914         (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsSinf): Update
1915         to use the new interface.
1916         (WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsSkd): Ditto.
1917         * platform/graphics/avfoundation/CDMFairPlayStreaming.h: Ditto.
1918         * platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
1919         (WebCore::CDMInstanceFairPlayStreamingAVFObjC::keyIDs): Convert
1920         the optional value into a vector, since it is assumed you can not
1921         have an empty vector of key ids in the init datas FPS supports.
1922         * testing/MockCDMFactory.cpp:
1923         (WebCore::MockCDMInstance::requestLicense): Only return an error
1924         if there really was a parsing error, rather than the case of there
1925         being zero key ids in the init data payload.
1926
1927 2018-08-06  Frederic Wang  <fwang@igalia.com>
1928
1929         Make two-arguments versions of scrollBy/scrollTo depend on the one-argument versions
1930         https://bugs.webkit.org/show_bug.cgi?id=188300
1931
1932         Reviewed by Darin Adler.
1933
1934         This patch refactors a bit the scrollBy/scrollTo code, so that the two-arguments versions
1935         share the same code path as the more generic one-argument versions. In particular, this
1936         helps to implement the ScrollBehavior option (bug 188043) since the one-argument versions
1937         will require to distinguish between smooth and instant scrolling. The logic to normalize
1938         non finite left/right values or to use a fallback when they are absent is also factored out
1939         into ScrollToOptions.
1940
1941         References:
1942         https://drafts.csswg.org/cssom-view/#dom-element-scroll
1943         https://drafts.csswg.org/cssom-view/#dom-element-scrollby
1944         https://drafts.csswg.org/cssom-view/#dom-window-scroll
1945         https://drafts.csswg.org/cssom-view/#dom-window-scrollby
1946
1947         No new tests, behavior is unchanged.
1948
1949         * dom/Element.cpp:
1950         (WebCore::Element::scrollBy): Make two-parameter version depends on one-parameter version
1951         and rewrite the normalize / fallback logic.
1952         (WebCore::Element::scrollTo): Rewrite the normalize / fallback logic.
1953         (WebCore::normalizeNonFiniteValue): Deleted. The logic is moved to ScrollToOptions.
1954         * page/DOMWindow.cpp:
1955         (WebCore::DOMWindow::scrollBy const): Make two-parameter version depends on one-parameter
1956         version and rewrite the normalize / fallback logic.
1957         (WebCore::DOMWindow::scrollTo const): Make two-parameter version depends on one-parameter
1958         version and rewrite the normalize / fallback logic.
1959         * page/ScrollToOptions.h: Add <cmath> to use std::isfinite
1960         (WebCore::ScrollToOptions::normalizeNonFiniteCoordinatesOrFallBackTo): New function to
1961         normalize left/right values or fallback to the specified value if it is missing.
1962
1963 2018-08-06  Zan Dobersek  <zdobersek@igalia.com>
1964
1965         Unreviewed follow-up to r234594.
1966
1967         Add missing constructor and destructor definitions for the bunch of new
1968         classes that were added in that revision.
1969
1970         * platform/graphics/nicosia/NicosiaPlatformLayer.cpp:
1971         (Nicosia::ContentLayer::ContentLayer):
1972         (Nicosia::BackingStore::BackingStore):
1973         (Nicosia::ImageBacking::ImageBacking):
1974
1975 2018-08-06  Zan Dobersek  <zdobersek@igalia.com>
1976
1977         [Nicosia] Add additional layer state classes, use impl-based approach to make them extendable
1978         https://bugs.webkit.org/show_bug.cgi?id=188341
1979
1980         Reviewed by Carlos Garcia Campos.
1981
1982         Add the ContentLayer, BackingStore and ImageBacking classes in the
1983         Nicosia namespace. State objects of CompositionLayer instances keep
1984         references to objects of these classes depending on the content that's
1985         presented in the associated GraphicsLayer.
1986
1987         ContentLayer derives from the PlatformLayer class. It's used for layers
1988         that display things like WebGL and HTML5 canvas and media content in a
1989         platform-specific way. In case of TextureMapper the hardware-accelerated
1990         content is piped into that rendering pipeline.
1991
1992         BackingStore is meant to represent the painted contents of a layer. The
1993         equivalent current functionality is using a tiled backing store that
1994         has its contents copied into the CoordinatedBackingStore instance.
1995
1996         ImageBacking is used for a layer whose content is a simple Image object.
1997         Image's pixel data is rasterized and again managed through
1998         CoordinatedBackingStore for rendering.
1999
2000         All these classes, along with the CompositionLayer class, should now be
2001         constructed with a factory function that returns an object that derives
2002         the class-specific Impl interface. This will allow for simpler
2003         implementation of different approaches in parallel. The TextureMapper
2004         variants will be the first ones, replicating the current behavior as it
2005         is implemented across classes in the CoordinatedGraphics and
2006         TextureMapper layers.
2007
2008         * platform/graphics/nicosia/NicosiaPlatformLayer.cpp:
2009         (Nicosia::CompositionLayer::CompositionLayer):
2010         * platform/graphics/nicosia/NicosiaPlatformLayer.h:
2011         (Nicosia::PlatformLayer::isContentLayer const):
2012         (Nicosia::CompositionLayer::Impl::isTextureMapperImpl const):
2013         (Nicosia::CompositionLayer::create):
2014         (Nicosia::CompositionLayer::impl const):
2015         (Nicosia::ContentLayer::Impl::isTextureMapperImpl const):
2016         (Nicosia::ContentLayer::create):
2017         (Nicosia::ContentLayer::impl const):
2018         (Nicosia::BackingStore::Impl::isTextureMapperImpl const):
2019         (Nicosia::BackingStore::create):
2020         (Nicosia::BackingStore::impl const):
2021         (Nicosia::ImageBacking::Impl::isTextureMapperImpl const):
2022         (Nicosia::ImageBacking::create):
2023         (Nicosia::ImageBacking::impl const):
2024         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2025         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
2026
2027 2018-08-06  Zan Dobersek  <zdobersek@igalia.com>
2028
2029         [Nicosia] Add Nicosia::Scene
2030         https://bugs.webkit.org/show_bug.cgi?id=188340
2031
2032         Reviewed by Carlos Garcia Campos.
2033
2034         Add the Nicosia::Scene class that controls the scene's state and enables
2035         thread-safe updates to that state.
2036
2037         The State struct itself holds a set of all the layers in the scene, and
2038         separates out the root layer specifically. An ID counter is also present
2039         there, allowing consumers of this state to easily check for any updates.
2040
2041         A reference to the Nicosia::Scene object now replaces the
2042         HashSet-and-root-layer pair in the CoordinatedGraphicsState struct.
2043
2044         * platform/TextureMapper.cmake:
2045         * platform/graphics/nicosia/NicosiaScene.cpp: Added.
2046         * platform/graphics/nicosia/NicosiaScene.h: Added.
2047         (Nicosia::Scene::create):
2048         (Nicosia::Scene::accessState):
2049         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
2050
2051 2018-08-06  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
2052
2053         [GTK] Buttons are drawn too large, text not centered
2054         https://bugs.webkit.org/show_bug.cgi?id=185854
2055
2056         Reviewed by Carlos Garcia Campos.
2057
2058         Some pages require small buttons and the GTK theme was
2059         drawing only down to a minimum size.
2060
2061         No new tests required. Current layout tests and ManualTests/gtk/theme.html
2062         already cover it.
2063
2064         * platform/gtk/RenderThemeGadget.cpp:
2065         (WebCore::RenderThemeGadget::create):
2066         (WebCore::RenderThemeButtonGadget::RenderThemeButtonGadget): Added
2067         (WebCore::RenderThemeButtonGadget::minimumSize const):
2068         Allow sizes smaller than the minimum size.
2069         * platform/gtk/RenderThemeGadget.h:
2070         * platform/gtk/RenderThemeWidget.cpp:
2071         (WebCore::RenderThemeButton::RenderThemeButton):
2072
2073 2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2074
2075         Implement self.queueMicrotask in Workers
2076         https://bugs.webkit.org/show_bug.cgi?id=188247
2077
2078         Reviewed by Ryosuke Niwa.
2079
2080         This patch adds support for self.queueMicrotask to workers.
2081
2082         Tests: http/wpt/workers/queue-microtask.any.html
2083                http/wpt/workers/queue-microtask.any.worker.html
2084
2085         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2086         (WebCore::JSWorkerGlobalScope::queueMicrotask):
2087         * page/DOMWindow.idl:
2088         Move queueMicrotask declaration to WindowOrWorkerGlobalScope.idl.
2089         * page/WindowOrWorkerGlobalScope.idl:
2090
2091 2018-08-05  Rob Buis  <rbuis@igalia.com>
2092
2093         [GTK][WPE] Fetch tests assert in SubresourceLoader::didReceiveResponse()
2094         https://bugs.webkit.org/show_bug.cgi?id=188163
2095
2096         Reviewed by Frédéric Wang.
2097
2098         Fetch in manual redirect mode uses didReceiveResponse instead of
2099         willSendRequestInternal, so update the ASSERT.
2100
2101         * loader/SubresourceLoader.cpp:
2102         (WebCore::SubresourceLoader::didReceiveResponse):
2103
2104 2018-08-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2105
2106         Add support for microtasks in workers
2107         https://bugs.webkit.org/show_bug.cgi?id=188246
2108
2109         Reviewed by Darin Adler.
2110
2111         This patch adds the microtask mechanism to workers. To adopt the existing microtask mechanism from the main thread,
2112         we extend JSMainThreadExecState for non-main-threads. We rename it to JSExecState, and store stacked
2113         ExecState* data in thread local storage in ThreadGlobalData instead of a static variable s_mainThreadState.
2114
2115         We add MicrotaskQueue to WorkerGlobalScope since each worker has its own thread and it should have its
2116         own microtask queue.
2117
2118         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
2119         * Sources.txt:
2120         * WebCore.xcodeproj/project.pbxproj:
2121         * bindings/js/JSBindingsAllInOne.cpp:
2122         * bindings/js/JSCallbackData.cpp:
2123         (WebCore::JSCallbackData::invokeCallback):
2124         * bindings/js/JSCustomElementInterface.cpp:
2125         (WebCore::constructCustomElementSynchronously):
2126         (WebCore::JSCustomElementInterface::upgradeElement):
2127         (WebCore::JSCustomElementInterface::invokeCallback):
2128         * bindings/js/JSCustomXPathNSResolver.cpp:
2129         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2130         * bindings/js/JSDOMGlobalObjectTask.cpp:
2131         * bindings/js/JSDOMWindowBase.cpp:
2132         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
2133         Queue a microtask to MicrotaskQueue instead of posting a macrotask.
2134
2135         (WebCore::JSDOMWindowMicrotaskCallback::create): Deleted.
2136         (WebCore::JSDOMWindowMicrotaskCallback::call): Deleted.
2137         (WebCore::JSDOMWindowMicrotaskCallback::JSDOMWindowMicrotaskCallback): Deleted.
2138         (): Deleted.
2139         Extract JSDOMWindowMicrotaskCallback as JSMicrotaskCallback and create a new file for it.
2140
2141         * bindings/js/JSErrorHandler.cpp:
2142         (WebCore::JSErrorHandler::handleEvent):
2143         * bindings/js/JSEventListener.cpp:
2144         (WebCore::JSEventListener::handleEvent):
2145         * bindings/js/JSExecState.cpp: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.cpp.
2146         (WebCore::JSExecState::didLeaveScriptContext):
2147         If we are in a main thread, we consume main thread microtask queue. If we are in worker thread,
2148         we consume a microtask queue per worker.
2149
2150         (WebCore::functionCallHandlerFromAnyThread):
2151         (WebCore::evaluateHandlerFromAnyThread):
2152         * bindings/js/JSExecState.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecState.h.
2153         (WebCore::JSExecState::currentState):
2154         (WebCore::JSExecState::call):
2155         (WebCore::JSExecState::evaluate):
2156         (WebCore::JSExecState::profiledCall):
2157         (WebCore::JSExecState::profiledEvaluate):
2158         (WebCore::JSExecState::runTask):
2159         (WebCore::JSExecState::loadModule):
2160         (WebCore::JSExecState::linkAndEvaluateModule):
2161         (WebCore::JSExecState::JSExecState):
2162         (WebCore::JSExecState::~JSExecState):
2163         (WebCore::JSExecState::setCurrentState):
2164         Store and load ExecState in thread local storage, ThreadGlobalData. This allows us to use it for workers.
2165
2166         (WebCore::JSMainThreadNullState::JSMainThreadNullState):
2167         (WebCore::JSMainThreadNullState::~JSMainThreadNullState):
2168         We keep this name "JSMainThreadNullState" since CustomElementReactionStack should be stick to the main thread.
2169         And this class is only used in the main thread.
2170
2171         * bindings/js/JSExecStateInstrumentation.h: Renamed from Source/WebCore/bindings/js/JSMainThreadExecStateInstrumentation.h.
2172         (WebCore::JSExecState::instrumentFunctionInternal):
2173         (WebCore::JSExecState::instrumentFunctionCall):
2174         (WebCore::JSExecState::instrumentFunctionConstruct):
2175         * bindings/js/JSMicrotaskCallback.h: Copied from Source/WebKitLegacy/mac/DOM/DOMHTMLBaseElement.mm.
2176         (WebCore::JSMicrotaskCallback::create):
2177         (WebCore::JSMicrotaskCallback::call):
2178         (WebCore::JSMicrotaskCallback::JSMicrotaskCallback):
2179         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2180         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
2181         * bindings/js/ScheduledAction.cpp:
2182         (WebCore::ScheduledAction::executeFunctionInContext):
2183         * bindings/js/ScriptController.cpp:
2184         (WebCore::ScriptController::evaluateInWorld):
2185         (WebCore::ScriptController::loadModuleScriptInWorld):
2186         (WebCore::ScriptController::linkAndEvaluateModuleScriptInWorld):
2187         (WebCore::ScriptController::canAccessFromCurrentOrigin):
2188         * bindings/js/WorkerScriptController.cpp:
2189         (WebCore::WorkerScriptController::evaluate):
2190         * bridge/objc/WebScriptObject.mm:
2191         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2192         (-[WebScriptObject evaluateWebScript:]):
2193         * html/canvas/WebGLRenderingContextBase.cpp:
2194         (WebCore::WebGLRenderingContextBase::compileShader):
2195         (WebCore::WebGLRenderingContextBase::printToConsole):
2196         * inspector/InspectorCanvas.cpp:
2197         (WebCore::InspectorCanvas::buildObjectForCanvas):
2198         (WebCore::InspectorCanvas::buildAction):
2199         * inspector/InspectorController.cpp:
2200         * inspector/InspectorFrontendHost.cpp:
2201         * inspector/TimelineRecordFactory.cpp:
2202         (WebCore::TimelineRecordFactory::createGenericRecord):
2203         * inspector/WorkerInspectorController.cpp:
2204         * inspector/agents/InspectorCanvasAgent.cpp:
2205         * inspector/agents/InspectorNetworkAgent.cpp:
2206         (WebCore::InspectorNetworkAgent::buildInitiatorObject):
2207         * page/DOMWindow.cpp:
2208         (WebCore::DOMWindow::postMessage):
2209         * page/PageConsoleClient.cpp:
2210         (WebCore::PageConsoleClient::addMessage):
2211         * page/csp/ContentSecurityPolicy.cpp:
2212         (WebCore::ContentSecurityPolicy::reportViolation const):
2213         * platform/ThreadGlobalData.h:
2214         (WebCore::ThreadGlobalData::ThreadGlobalData::currentState const):
2215         (WebCore::ThreadGlobalData::ThreadGlobalData::setCurrentState):
2216         * workers/WorkerGlobalScope.cpp:
2217         (WebCore::WorkerGlobalScope::WorkerGlobalScope):
2218         (WebCore::WorkerGlobalScope::removeMicrotaskQueue):
2219         * workers/WorkerGlobalScope.h:
2220         (WebCore::WorkerGlobalScope::microtaskQueue const):
2221         * workers/WorkerThread.cpp:
2222         (WebCore::WorkerThread::stop):
2223         * workers/service/ExtendableEvent.cpp:
2224         (WebCore::ExtendableEvent::addExtendLifetimePromise):
2225         When dispatching an "install" event from service worker, we first create an event,
2226         dispatch it, and set a handler which is called when a pending promise count becomes zero.
2227         However, the old code checked pending promise count in a queued microtask. It worked
2228         previously because microtask is actually a macrotask in the service worker. So this check
2229         is done after a handler is set. But this patch introduces real microtask, and this check
2230         happens before a handler is set because dispatching an event can exhaust microtask queue.
2231         According to the spec, this check should not be done in microtask[1]. We make this checking
2232         part as a macrotask. We note that algorithm noted as FIXMEs should be done in this
2233         microtask while the checking part should not be done.
2234
2235         [1]: https://w3c.github.io/ServiceWorker/#installation-algorithm
2236
2237 2018-08-05  Ryosuke Niwa  <rniwa@webkit.org>
2238
2239         Properties set on window.customElements can disappear due to GC
2240         https://bugs.webkit.org/show_bug.cgi?id=172575
2241
2242         Lexicologically sort the IDL attributes per Darin's comment.
2243
2244         * dom/CustomElementRegistry.idl:
2245
2246 2018-08-05  Zalan Bujtas  <zalan@apple.com>
2247
2248         [LFC][BFC] contentHeightForFormattingContextRoot uses the wrong coordinate system to compute the height.
2249         https://bugs.webkit.org/show_bug.cgi?id=188319
2250
2251         Reviewed by Antti Koivisto.
2252
2253         Display::Box::marginBox() is in the coordinate system of the box itself (8px top margin translates to y = -8px).
2254         What we need instead to compute the content height is the top/bottom position in the containing block's coordinate system (rect and rectWithMargin).
2255
2256         * layout/FormattingContextGeometry.cpp:
2257         (WebCore::Layout::contentHeightForFormattingContextRoot):
2258
2259 2018-08-05  Ms2ger  <Ms2ger@igalia.com>
2260
2261         [GStreamer] Remove unsound assertions in MediaPlayerPrivateGStreamerBase.
2262         https://bugs.webkit.org/show_bug.cgi?id=188162
2263
2264         Reviewed by Philippe Normand.
2265
2266         These assertions sometimes fail, and there's a runtime check right
2267         after them anyway.
2268
2269         Tests: fast/canvas/webgl/texImage2D-video-flipY-false.html
2270                fast/canvas/webgl/texImage2D-video-flipY-true.html
2271
2272         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2273         (WebCore::MediaPlayerPrivateGStreamerBase::copyVideoTextureToPlatformTexture):
2274         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
2275
2276 2018-08-05  Philippe Normand  <pnormand@igalia.com>
2277
2278         [MediaCapabilities] Platform integration
2279         https://bugs.webkit.org/show_bug.cgi?id=187850
2280
2281         Reviewed by Eric Carlson.
2282
2283         Mock platform support for the MediaCapabilities specification.
2284
2285         Test: media/mediacapabilities/mock-decodingInfo.html
2286               media/mediacapabilities/mock-encodingInfo.html
2287
2288         * Modules/mediacapabilities/MediaCapabilities.cpp:
2289         (WebCore::MediaCapabilities::decodingInfo):
2290         (WebCore::MediaCapabilities::encodingInfo):
2291         * Modules/mediacapabilities/MediaCapabilitiesInfo.h:
2292         (WebCore::MediaCapabilitiesInfo::create):
2293         * PlatformGTK.cmake:
2294         * PlatformMac.cmake:
2295         * PlatformWPE.cmake:
2296         * Sources.txt:
2297         * WebCore.xcodeproj/project.pbxproj:
2298         * platform/mediacapabilities/MediaEngineConfiguration.cpp: Added.
2299         (WebCore::MediaEngineVideoConfiguration::MediaEngineVideoConfiguration):
2300         (WebCore::MediaEngineAudioConfiguration::MediaEngineAudioConfiguration):
2301         (WebCore::MediaEngineConfiguration::MediaEngineConfiguration):
2302         * platform/mediacapabilities/MediaEngineConfiguration.h: Added.
2303         (WebCore::MediaEngineVideoConfiguration::create):
2304         (WebCore::MediaEngineVideoConfiguration::contentType const):
2305         (WebCore::MediaEngineVideoConfiguration::size const):
2306         (WebCore::MediaEngineVideoConfiguration::bitrate const):
2307         (WebCore::MediaEngineVideoConfiguration::framerate const):
2308         (WebCore::MediaEngineAudioConfiguration::create):
2309         (WebCore::MediaEngineAudioConfiguration::contentType const):
2310         (WebCore::MediaEngineAudioConfiguration::channels const):
2311         (WebCore::MediaEngineAudioConfiguration::bitrate const):
2312         (WebCore::MediaEngineAudioConfiguration::samplerate const):
2313         (WebCore::MediaEngineConfiguration::audioConfiguration const):
2314         (WebCore::MediaEngineConfiguration::videoConfiguration const):
2315         * platform/mediacapabilities/MediaEngineConfigurationFactory.cpp: Added.
2316         (WebCore::mockEnabled):
2317         (WebCore::MediaEngineConfigurationFactory::createDecodingConfiguration):
2318         (WebCore::MediaEngineConfigurationFactory::createEncodingConfiguration):
2319         (WebCore::MediaEngineConfigurationFactory::enableMock):
2320         (WebCore::MediaEngineConfigurationFactory::disableMock):
2321         * platform/mediacapabilities/MediaEngineConfigurationFactory.h: Added.
2322         * platform/mediacapabilities/MediaEngineDecodingConfiguration.h: Added.
2323         (WebCore::MediaEngineDecodingConfiguration::MediaEngineDecodingConfiguration):
2324         (WebCore::MediaEngineDecodingConfiguration::canDecodeMedia):
2325         (WebCore::MediaEngineDecodingConfiguration::canSmoothlyDecodeMedia):
2326         (WebCore::MediaEngineDecodingConfiguration::canPowerEfficientlyDecodeMedia):
2327         (WebCore::MediaEngineDecodingConfiguration::decodingType const):
2328         * platform/mediacapabilities/MediaEngineEncodingConfiguration.h: Added.
2329         (WebCore::MediaEngineEncodingConfiguration::MediaEngineEncodingConfiguration):
2330         (WebCore::MediaEngineEncodingConfiguration::canEncodeMedia):
2331         (WebCore::MediaEngineEncodingConfiguration::canSmoothlyEncodeMedia):
2332         (WebCore::MediaEngineEncodingConfiguration::canPowerEfficientlyEncodeMedia):
2333         (WebCore::MediaEngineEncodingConfiguration::encodingType const):
2334         * platform/mock/MediaEngineDecodingConfigurationMock.cpp: Added.
2335         (WebCore::MediaEngineDecodingConfigurationMock::canDecodeMedia):
2336         (WebCore::MediaEngineDecodingConfigurationMock::canSmoothlyDecodeMedia):
2337         (WebCore::MediaEngineDecodingConfigurationMock::canPowerEfficientlyDecodeMedia):
2338         * platform/mock/MediaEngineDecodingConfigurationMock.h: Added.
2339         * platform/mock/MediaEngineEncodingConfigurationMock.cpp: Added.
2340         (WebCore::MediaEngineEncodingConfigurationMock::canEncodeMedia):
2341         (WebCore::MediaEngineEncodingConfigurationMock::canSmoothlyEncodeMedia):
2342         (WebCore::MediaEngineEncodingConfigurationMock::canPowerEfficientlyEncodeMedia):
2343         * platform/mock/MediaEngineEncodingConfigurationMock.h: Added.
2344         * testing/Internals.cpp:
2345         (WebCore::Internals::resetToConsistentState):
2346         (WebCore::Internals::enableMockMediaCapabilities):
2347         * testing/Internals.h:
2348         * testing/Internals.idl:
2349
2350 2018-08-04  Simon Fraser  <simon.fraser@apple.com>
2351
2352         Make WebCore::Timer more space-efficient
2353         https://bugs.webkit.org/show_bug.cgi?id=187455
2354
2355         Reviewed by Brent Fulgham.
2356
2357         Steal a bit from m_heapIndex for m_wasDeleted to eliminate padding in Timer.
2358         This reduces the size of Document, which has 8 Timers, from 3360 to 3296 bytes (saving 64 bytes).
2359
2360         * platform/Timer.cpp:
2361         (WebCore::TimerBase::TimerBase):
2362         * platform/Timer.h:
2363
2364 2018-08-04  Ryosuke Niwa  <rniwa@webkit.org>
2365
2366         Properties set on window.customElements can disappear due to GC
2367         https://bugs.webkit.org/show_bug.cgi?id=172575
2368         <rdar://problem/32440668>
2369
2370         Reviewed by Saam Barati.
2371
2372         Fixed the bug that JS wrapper of CustomElementsRegistry can erroneously get collected during GC
2373         by keeping it alive as long as the global object is alive.
2374
2375         Test: fast/custom-elements/custom-element-registry-wrapper-should-stay-alive.html
2376
2377         * dom/CustomElementRegistry.cpp:
2378         (WebCore::CustomElementRegistry::create):
2379         (WebCore::CustomElementRegistry::CustomElementRegistry):
2380         * dom/CustomElementRegistry.h:
2381         (WebCore::CustomElementRegistry): Make this inherited from ContextDestructionObserver.
2382         * dom/CustomElementRegistry.idl: Set GenerateIsReachable=ImplScriptExecutionContext in IDL. This will
2383         make CustomElementRegistry reachable from the global object.
2384         * page/DOMWindow.cpp:
2385         (WebCore::DOMWindow::ensureCustomElementRegistry):
2386
2387 2018-08-03  Ryosuke Niwa  <rniwa@webkit.org>
2388
2389         innerHTML should not synchronously create a custom element
2390         https://bugs.webkit.org/show_bug.cgi?id=188327
2391         <rdar://problem/42923114>
2392
2393         Reviewed by Daniel Bates.
2394
2395         Fixed the bug that the fragment parsing algorithm was synchronously constructing a custom element instead of
2396         enqueuing an element to upgrade.
2397
2398         The fragment parsing algorithm creates an element for a token with *will execute script* flag set to false:
2399         https://html.spec.whatwg.org/multipage/parsing.html#create-an-element-for-the-token
2400         which results in creating an element with synchronous custom elements flag *not* set:
2401         https://dom.spec.whatwg.org/#concept-create-element
2402
2403         When synchronous custom elements flag is false, we're supposed to create an element and enqueue a custom element
2404         upgrade reaction. createHTMLElementOrFindCustomElementInterface was missing this last logic. 
2405
2406         Also fixed a bug that Element::enqueueToUpgrade would hit a debug assertion when a custom element which has been
2407         enqueued to upgrade is enqueued to upgrade for the second time. In this case, we need to put the element into the
2408         current element queue (https://html.spec.whatwg.org/multipage/custom-elements.html#current-element-queue) again.
2409
2410         While the specification simply enqueues another upgrade reaction and bails out immediately in the first step of
2411         the upgrade, WebKit's implementation simply avoids this redundancy in the first place:
2412         https://html.spec.whatwg.org/multipage/custom-elements.html#concept-upgrade-an-element
2413
2414         Existing tests such as imported/w3c/web-platform-tests/custom-elements/reactions/Document.html exercises this
2415         code path after the fragment parsing algorithm fix.
2416
2417         Tests: imported/w3c/web-platform-tests/custom-elements/connected-callbacks-html-fragment-parsing.html
2418
2419         * dom/CustomElementReactionQueue.cpp:
2420         (WebCore::CustomElementReactionQueueItem::type const): Added for an assertion.
2421         (WebCore::CustomElementReactionQueue::enqueueElementUpgrade): Enqueue this element to the current element queue
2422         by calling ensureCurrentQueue and avoid inserting a redundant upgrade reaction.
2423         * dom/CustomElementReactionQueue.h:
2424         * dom/Element.cpp:
2425         (WebCore::Element::enqueueToUpgrade): Handle the case when a custom element is enqueued to upgrade for the second
2426         time while it had been waiting in some element queue. In this case, the reaction queue for this element has
2427         already been created and we simply need to put this element back into the current element queue (i.e. this element
2428         now belongs to both element queues).
2429         * html/parser/HTMLConstructionSite.cpp:
2430         (WebCore::findCustomElementInterface): Extracted out of createHTMLElementOrFindCustomElementInterface.
2431         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface): Fixed the bug that the HTML parser
2432         was synchronously constructing a custom element even for the fragment parsing algorithm.
2433
2434 2018-08-03  Ben Richards  <benton_richards@apple.com>
2435
2436         We should cache the compiled sandbox profile in a data vault
2437         https://bugs.webkit.org/show_bug.cgi?id=184991
2438
2439         Reviewed by Ryosuke Niwa.
2440
2441         Added functionality to FileHandle so that it can lock a file while open.
2442         Added a function to FileSystem to delete non empty directories.
2443
2444         * platform/FileHandle.cpp:
2445         (WebCore::FileHandle::FileHandle):
2446         (WebCore::FileHandle::open):
2447         (WebCore::FileHandle::close):
2448         * platform/FileHandle.h:
2449         * platform/FileSystem.h:
2450         * platform/cocoa/FileSystemCocoa.mm:
2451         (WebCore::FileSystem::deleteNonEmptyDirectory):
2452
2453 2018-08-03  Justin Fan  <justin_fan@apple.com>
2454
2455         WebGL 2 conformance: vertex_arrays/vertex_array_object.html
2456         https://bugs.webkit.org/show_bug.cgi?id=188291
2457         <rdar://problem/42792709>
2458
2459         Reviewed by Dean Jackson.
2460
2461         Get https://www.khronos.org/registry/webgl/conformance-suites/2.0.0/conformance2/vertex_arrays/vertex-array-object.html 
2462         working on Mac OS and iOS, and check in the new test expectations.
2463
2464         Existing test: webgl/2.0.0/conformance2/vertex_arrays/vertex-array-object.html
2465
2466         * html/canvas/WebGL2RenderingContext.cpp:
2467         (WebCore::WebGL2RenderingContext::initializeVertexArrayObjects):
2468         (WebCore::WebGL2RenderingContext::deleteVertexArray):
2469         * html/canvas/WebGLRenderingContextBase.cpp:
2470         (WebCore::WebGLRenderingContextBase::deleteObject):
2471         * html/canvas/WebGLVertexArrayObject.cpp:
2472         (WebCore::WebGLVertexArrayObject::WebGLVertexArrayObject):
2473         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2474         (WebCore::GraphicsContext3D::checkVaryingsPacking const):
2475         (WebCore::GraphicsContext3D::createVertexArray):
2476         (WebCore::GraphicsContext3D::deleteVertexArray):
2477         (WebCore::GraphicsContext3D::isVertexArray):
2478         (WebCore::GraphicsContext3D::bindVertexArray):
2479
2480 2018-08-03  Sam Weinig  <sam@webkit.org>
2481
2482         Remove WebGPUObject
2483         https://bugs.webkit.org/show_bug.cgi?id=188114
2484
2485         Reviewed by Darin Adler.
2486
2487         This removes the unecessary WebGPUObject base class and updates the classes
2488         that were inheriting from it to instead inherit directly from RefCounted. This
2489         shrinks the size of all the classes that were inheriting from it, as they no
2490         longer store a RefPtr<WebGPURenderingContext> member, which is unused. Most
2491         of the classes also shrink because they can be devirtualized.
2492
2493         This also updates most of the create functions and constructors for the classes
2494         that were inheriting from WebGPUObject to no longer require the WebGPURenderingContext
2495         to be passed in. 
2496         - For WebGPUBuffer, WebGPUCommandQueue, WebGPUComputeCommandEncoder, WebGPUComputePipelineState, 
2497         WebGPUDepthStencilState, WebGPUDrawable, WebGPUFunction, WebGPULibrary, WebGPURenderCommandEncoder, 
2498         WebGPURenderPassDepthAttachmentDescriptor, WebGPURenderPipelineColorAttachmentDescriptor, 
2499         WebGPURenderPipelineState, and WebGPUTexture the WebGPURenderingContext and any other additional 
2500         parameters needed for initialization were replaced with the underlying type (e.g. WebGPUBuffer 
2501         now gets passed a GPUBuffer).
2502         - WebGPUCommandBuffer is passed a GPUCommandQueue, since it needs to construct the underlying
2503         GPUCommandBuffer itself so it can pass in the completion handler.
2504         - For WebGPUDepthStencilDescriptor, WebGPURenderPassAttachmentDescriptor, 
2505         WebGPURenderPassColorAttachmentDescriptor, WebGPURenderPassDescriptor and WebGPURenderPipelineDescriptor
2506         the create and constructor functions are empty.        
2507
2508         * Sources.txt:
2509         * WebCore.xcodeproj/project.pbxproj:
2510         Remove WebGPUObject.h/cpp
2511
2512         * html/canvas/WebGPUBuffer.cpp:
2513         (WebCore::WebGPUBuffer::WebGPUBuffer):
2514         * html/canvas/WebGPUBuffer.h:
2515         * html/canvas/WebGPUBuffer.idl:
2516         Switch from inheriting from WebGPUObject to directly inheriting from 
2517         RefCounted<WebGPUBuffer>. Since this de-virtualizes it, also add 
2518         ImplementationLacksVTable to the IDL file. Also update create 
2519         and constructor to take a GPUBuffer directly, rather than the context.
2520
2521         * html/canvas/WebGPUCommandBuffer.cpp:
2522         (WebCore::WebGPUCommandBuffer::create):
2523         (WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
2524         Update create and constructor to no longer require a context, as it would
2525         now be unused, as it no longer inherits from WebGPUObject nor needs to hold
2526         onto the context for any reason.
2527
2528         (WebCore::WebGPUCommandBuffer::createRenderCommandEncoderWithDescriptor):
2529         Update to call the new WebGPURenderCommandEncoder::create, which no longer
2530         requires a context.
2531
2532         (WebCore::WebGPUCommandBuffer::createComputeCommandEncoder):
2533         Update to call the new WebGPUComputeCommandEncoder::create, which no longer
2534         requires a context.
2535
2536         * html/canvas/WebGPUCommandBuffer.h:
2537         * html/canvas/WebGPUCommandBuffer.idl:
2538         Switch from inheriting from GPUObject to directly inheriting from 
2539         RefCounted<WebGPUCommandBuffer>. Since this de-virtualizes it, also add 
2540         ImplementationLacksVTable to the IDL file. Also update create and constructor 
2541         to no longer take a context, and just take a GPUCommandQueue. We can't directly
2542         pass a GPUCommandBuffer as WebGPUCommandBuffer needs to pass in a completion handler
2543         on construction of the underlying GPUCommandBuffer.
2544         
2545         * html/canvas/WebGPUCommandQueue.cpp:
2546         (WebCore::WebGPUCommandQueue::WebGPUCommandQueue):
2547         (WebCore::WebGPUCommandQueue::createCommandBuffer):
2548         Update to call the new WebGPUCommandBuffer::create, which no longer
2549         requires a context.
2550     
2551         * html/canvas/WebGPUCommandQueue.h:
2552         * html/canvas/WebGPUCommandQueue.idl:
2553         Switch from inheriting from GPUObject to directly inheriting from 
2554         RefCounted<WebGPUCommandQueue>. Since this de-virtualizes it, also add 
2555         ImplementationLacksVTable to the IDL file. Also update create and
2556         constructor to take a GPUCommandQueue directly.
2557
2558         * html/canvas/WebGPUComputeCommandEncoder.cpp:
2559         (WebCore::WebGPUComputeCommandEncoder::create):
2560         (WebCore::WebGPUComputeCommandEncoder::WebGPUComputeCommandEncoder):
2561         * html/canvas/WebGPUComputeCommandEncoder.h:
2562         * html/canvas/WebGPUComputeCommandEncoder.idl:
2563         Switch from inheriting from GPUObject to directly inheriting from 
2564         RefCounted<WebGPUComputeCommandEncoder>. Since this de-virtualizes it, 
2565         also add ImplementationLacksVTable to the IDL file. Also update create and
2566         constructor to take a GPUComputeCommandEncoder directly
2567
2568         * html/canvas/WebGPUComputePipelineState.cpp:
2569         (WebCore::WebGPUComputePipelineState::WebGPUComputePipelineState):
2570         * html/canvas/WebGPUComputePipelineState.h:
2571         * html/canvas/WebGPUComputePipelineState.idl:
2572         Switch from inheriting from WebGPUObject to directly inheriting from 
2573         RefCounted<WebGPUComputePipelineState>. Since this de-virtualizes it, also add 
2574         ImplementationLacksVTable to the IDL file. Also update create and
2575         constructor to take a GPUComputePipelineState directly.
2576
2577         * html/canvas/WebGPUDepthStencilDescriptor.cpp:
2578         Remove unneeded include of include "WebGPURenderingContext.h".
2579
2580         * html/canvas/WebGPUDepthStencilDescriptor.h:
2581         * html/canvas/WebGPUDepthStencilDescriptor.idl:
2582         Switch from inheriting from WebGPUObject to directly inheriting from 
2583         RefCounted<WebGPUDepthStencilDescriptor>. Since this de-virtualizes it, also add 
2584         ImplementationLacksVTable to the IDL file.
2585
2586         * html/canvas/WebGPUDepthStencilState.cpp:
2587         (WebCore::WebGPUDepthStencilState::WebGPUDepthStencilState):
2588         * html/canvas/WebGPUDepthStencilState.h:
2589         * html/canvas/WebGPUDepthStencilState.idl:
2590         Switch from inheriting from WebGPUObject to directly inheriting from 
2591         RefCounted<WebGPUDepthStencilState>. Since this de-virtualizes it, also add 
2592         ImplementationLacksVTable to the IDL file. Also update create and
2593         constructor to take a GPUDepthStencilState directly.
2594
2595         * html/canvas/WebGPUDrawable.cpp:
2596         (WebCore::WebGPUDrawable::WebGPUDrawable):
2597         * html/canvas/WebGPUDrawable.h:
2598         * html/canvas/WebGPUDrawable.idl:
2599         Switch from inheriting from WebGPUObject to directly inheriting from 
2600         RefCounted<WebGPUDrawable>. Since this de-virtualizes it, also add 
2601         ImplementationLacksVTable to the IDL file. Also update create and
2602         constructor to take a GPUDrawable directly.
2603
2604         * html/canvas/WebGPUFunction.cpp:
2605         (WebCore::WebGPUFunction::create):
2606         (WebCore::WebGPUFunction::WebGPUFunction):
2607         * html/canvas/WebGPUFunction.h:
2608         * html/canvas/WebGPUFunction.idl:
2609         Switch from inheriting from GPUObject to directly inheriting from 
2610         RefCounted<WebGPUFunction>. Since this de-virtualizes it, also add 
2611         ImplementationLacksVTable to the IDL file. Also update create and
2612         constructor to take a GPUFunction directly.
2613
2614         * html/canvas/WebGPULibrary.cpp:
2615         (WebCore::WebGPULibrary::WebGPULibrary):
2616         (WebCore::WebGPULibrary::functionWithName const):
2617         Update for new WebGPUFunction::create, which no longer requires a
2618         context.
2619
2620         * html/canvas/WebGPULibrary.h:
2621         * html/canvas/WebGPULibrary.idl:
2622         Switch from inheriting from WebGPUObject to directly inheriting from 
2623         RefCounted<WebGPULibrary>. Since this de-virtualizes it, also add 
2624         ImplementationLacksVTable to the IDL file. Also update create and
2625         constructor to take a GPULibrary directly, rather than the context.
2626         Unlike the other create functions that take their underlying type, this
2627         one also continues to need the sourceCode String to be passed, as that
2628         is not available from the underlying GPULibrary and must be stored
2629         seperately.
2630
2631         * html/canvas/WebGPUObject.cpp: Removed.
2632         * html/canvas/WebGPUObject.h: Removed.
2633         Deleted.
2634
2635         * html/canvas/WebGPURenderCommandEncoder.cpp:
2636         (WebCore::WebGPURenderCommandEncoder::create):
2637         (WebCore::WebGPURenderCommandEncoder::WebGPURenderCommandEncoder):
2638         * html/canvas/WebGPURenderCommandEncoder.h:
2639         * html/canvas/WebGPURenderCommandEncoder.idl:
2640         Switch from inheriting from GPUObject to directly inheriting from
2641         RefCounted<WebGPURenderCommandEncoder>. Since this de-virtualizes it, also add
2642         ImplementationLacksVTable to the IDL file. Also update create and
2643         constructor to take a GPURenderCommandEncoder directly.
2644
2645         * html/canvas/WebGPURenderPassAttachmentDescriptor.cpp:
2646         (WebCore::WebGPURenderPassAttachmentDescriptor::WebGPURenderPassAttachmentDescriptor):
2647         * html/canvas/WebGPURenderPassAttachmentDescriptor.h:
2648         Switch from inheriting from GPUObject to directly inheriting from 
2649         RefCounted<WebGPURenderPassAttachmentDescriptor>. Also update create and 
2650         constructor to no longer take a context, as it is now not used. This remains virtual
2651         as it is inherited from by WebGPURenderPassColorAttachmentDescriptor and WebGPURenderPassDepthAttachmentDescriptor.
2652
2653         * html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:
2654         (WebCore::WebGPURenderPassColorAttachmentDescriptor::create):
2655         (WebCore::WebGPURenderPassColorAttachmentDescriptor::WebGPURenderPassColorAttachmentDescriptor):
2656         * html/canvas/WebGPURenderPassColorAttachmentDescriptor.h:
2657         Update create and constructor to no longer take a context, as it is now not used. Declare final
2658         as this is not inherited by anything.
2659
2660         * html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:
2661         (WebCore::WebGPURenderPassDepthAttachmentDescriptor::create):
2662         (WebCore::WebGPURenderPassDepthAttachmentDescriptor::WebGPURenderPassDepthAttachmentDescriptor):
2663         * html/canvas/WebGPURenderPassDepthAttachmentDescriptor.h:
2664         Update create and constructor to no longer take a context, as it is now not used. Declare final
2665         as this is not inherited by anything.
2666
2667         * html/canvas/WebGPURenderPassDescriptor.cpp:
2668         (WebCore::WebGPURenderPassDescriptor::depthAttachment):
2669         Update for new WebGPURenderPassDepthAttachmentDescriptor::create function which no longer requires
2670         a context. 
2671         
2672         Semi-interesting note: This function was previously calling "*context()" to pass a WebGPURenderingContext&
2673         to WebGPURenderPassDepthAttachmentDescriptor::create. However, "context()" was always returning null, as
2674         the constructor of WebGPURenderPassDescriptor was not initializing the WebGPUObject with a WebGPURenderingContext.
2675         Now, one might think that this would cause a null-deref, but, because it was being assigned into a 
2676         WebGPURenderingContext&, no dereference happens right away (it essentially just passes a pointer) and since
2677         the function it is being passed to does not use it, it never actually gets dereferenced.
2678
2679         (WebCore::WebGPURenderPassDescriptor::colorAttachments):
2680         Update for new WebGPURenderPassColorAttachmentDescriptor::create function which no longer requires
2681         a context. 
2682
2683         * html/canvas/WebGPURenderPassDescriptor.h:
2684         * html/canvas/WebGPURenderPassDescriptor.idl:
2685         Switch from inheriting from GPUObject to directly inheriting from
2686         RefCounted<WebGPURenderPassDescriptor>. Since this de-virtualizes it, also add
2687         ImplementationLacksVTable to the IDL file.
2688
2689         * html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.cpp:
2690         (WebCore::WebGPURenderPipelineColorAttachmentDescriptor::create):
2691         (WebCore::WebGPURenderPipelineColorAttachmentDescriptor::WebGPURenderPipelineColorAttachmentDescriptor):
2692         * html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.h:
2693         * html/canvas/WebGPURenderPipelineColorAttachmentDescriptor.idl:
2694         Switch from inheriting from GPUObject to directly inheriting from
2695         RefCounted<WebGPURenderPipelineColorAttachmentDescriptor>. Since this de-virtualizes it, also add
2696         ImplementationLacksVTable to the IDL file. Also update create and constructor to
2697         no longer take a context, as it is now not used.
2698
2699         * html/canvas/WebGPURenderPipelineDescriptor.cpp:
2700         (WebCore::WebGPURenderPipelineDescriptor::colorAttachments):
2701         Update for new WebGPURenderPipelineColorAttachmentDescriptor::create which no longer requires
2702         a context.
2703
2704         * html/canvas/WebGPURenderPipelineDescriptor.h:
2705         * html/canvas/WebGPURenderPipelineDescriptor.idl:
2706         Switch from inheriting from GPUObject to directly inheriting from
2707         RefCounted<WebGPURenderPipelineDescriptor>. Since this de-virtualizes it, also add
2708         ImplementationLacksVTable to the IDL file.
2709
2710         * html/canvas/WebGPURenderPipelineState.cpp:
2711         (WebCore::WebGPURenderPipelineState::WebGPURenderPipelineState):
2712         * html/canvas/WebGPURenderPipelineState.h:
2713         * html/canvas/WebGPURenderPipelineState.idl:
2714         Switch from inheriting from GPUObject to directly inheriting from
2715         RefCounted<WebGPURenderPipelineState>. Since this de-virtualizes it, also add
2716         ImplementationLacksVTable to the IDL file. Also update create and
2717         constructor to take a GPURenderPipelineState directly.
2718
2719         * html/canvas/WebGPURenderingContext.cpp:
2720         (WebCore::WebGPURenderingContext::createLibrary):
2721         (WebCore::WebGPURenderingContext::createRenderPipelineState):
2722         (WebCore::WebGPURenderingContext::createDepthStencilState):
2723         (WebCore::WebGPURenderingContext::createComputePipelineState):
2724         (WebCore::WebGPURenderingContext::createCommandQueue):
2725         (WebCore::WebGPURenderingContext::nextDrawable):
2726         (WebCore::WebGPURenderingContext::createBuffer):
2727         (WebCore::WebGPURenderingContext::createTexture):
2728         Update for new create functions which require the caller to pass
2729         the underlying type.
2730
2731         * html/canvas/WebGPUTexture.cpp:
2732         (WebCore::WebGPUTexture::createFromDrawableTexture):
2733         Renamed to create.
2734
2735         (WebCore::WebGPUTexture::create): Deleted
2736         All callers now pass a GPUTexture directly.
2737
2738         * html/canvas/WebGPUTexture.h:
2739         * html/canvas/WebGPUTexture.idl:
2740         Switch from inheriting from GPUObject to directly inheriting from
2741         RefCounted<WebGPUTexture>. Since this de-virtualizes it, also add
2742         ImplementationLacksVTable to the IDL file. 
2743
2744         * html/canvas/WebGPUTextureDescriptor.h:
2745         * html/canvas/WebGPUTextureDescriptor.idl:
2746         Switch from inheriting from GPUObject to directly inheriting from
2747         RefCounted<WebGPUTextureDescriptor>. Since this de-virtualizes it, also add
2748         ImplementationLacksVTable to the IDL file.
2749
2750 2018-08-03  Alex Christensen  <achristensen@webkit.org>
2751
2752         Fix spelling of "overridden"
2753         https://bugs.webkit.org/show_bug.cgi?id=188315
2754
2755         Reviewed by Darin Adler.
2756
2757         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2758         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
2759         (-[WebAccessibilityObjectWrapper accessibilityValue]):
2760         * contentextensions/ContentExtensionsBackend.h:
2761         * editing/EditingStyle.cpp:
2762         (WebCore::EditingStyle::removeStyleFromRulesAndContext):
2763         * inspector/CommandLineAPIModuleSource.js:
2764         * platform/ScrollView.h:
2765         * platform/ScrollableArea.h:
2766         * platform/mediasession/MediaSessionInterruptionProvider.h:
2767         * rendering/RenderFragmentedFlow.cpp:
2768         (WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
2769         * rendering/RenderLayer.h:
2770         * rendering/RenderListBox.h:
2771         * rendering/svg/RenderSVGResourceClipper.cpp:
2772         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2773         * svg/SVGElement.cpp:
2774         (WebCore::SVGElement::localCoordinateSpaceTransform const):
2775         * svg/SVGLengthContext.cpp:
2776         (WebCore::SVGLengthContext::SVGLengthContext):
2777         (WebCore::SVGLengthContext::convertValueToUserUnits const):
2778         (WebCore::SVGLengthContext::determineViewport const):
2779         * svg/SVGLengthContext.h:
2780
2781 2018-08-03  Zalan Bujtas  <zalan@apple.com>
2782
2783         [LFC][BFC] Special case the document renderer when computing the height and margin
2784         https://bugs.webkit.org/show_bug.cgi?id=188313
2785
2786         Reviewed by Antti Koivisto.
2787
2788         The document renderer is certainly special and its geometry is likely to be computed as part of "10.6.6 Complicated cases" (spec is unclear) but probably not by
2789         making the it a formatting root. Let's just special case it at contentHeightForFormattingContextRoot(), since having the document renderer as a context root has unwanted side effect. 
2790
2791         * layout/FormattingContextGeometry.cpp:
2792         (WebCore::Layout::contentHeightForFormattingContextRoot):
2793         * layout/layouttree/LayoutBox.cpp:
2794         (WebCore::Layout::Box::establishesBlockFormattingContext const):
2795
2796 2018-08-03  Zalan Bujtas  <zalan@apple.com>
2797
2798         [LFC][BFC] Layout out-of-flow descendants only on the formatting context root.
2799         https://bugs.webkit.org/show_bug.cgi?id=188312
2800
2801         Reviewed by Antti Koivisto.
2802
2803         Collect out-of-flow descendants on the formatting root container instead of the containing block and run layout on them on the root level. It's more efficient this way.
2804
2805         * layout/blockformatting/BlockFormattingContext.cpp:
2806         (WebCore::Layout::BlockFormattingContext::layout const):
2807         * layout/layouttree/LayoutTreeBuilder.cpp:
2808         (WebCore::Layout::TreeBuilder::createSubTree):
2809
2810 2018-08-03  Andy Estes  <aestes@apple.com>
2811
2812         ContentFilterUnblockHandler's constructors access moved-from variables
2813         https://bugs.webkit.org/show_bug.cgi?id=188308
2814         <rdar://problem/42882758>
2815
2816         Reviewed by Alex Christensen.
2817
2818         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2819
2820 2018-08-03  Zalan Bujtas  <zalan@apple.com>
2821
2822         [LFC][Floating] Now that the document renderer belongs to "complicated cases", adjust viewport stretching.
2823         https://bugs.webkit.org/show_bug.cgi?id=188306
2824
2825         Reviewed by Antti Koivisto.
2826
2827         And add passing cases for floats.
2828
2829         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2830         (WebCore::Layout::initialContainingBlock):
2831         (WebCore::Layout::isStretchedToInitialContainingBlock):
2832         (WebCore::Layout::stretchHeightToInitialContainingBlock):
2833         (WebCore::Layout::stretchWidthToInitialContainingBlock):
2834         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2835         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
2836         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2837         (WebCore::Layout::isStretchedToViewport): Deleted.
2838
2839 2018-08-03  Zalan Bujtas  <zalan@apple.com>
2840
2841         [LFC] Do not check margin box while validating geometry.
2842         https://bugs.webkit.org/show_bug.cgi?id=188297
2843
2844         Reviewed by Antti Koivisto.
2845
2846         The current RenderBox::marginBox implementation is not spec compliant. Ignore it for now.
2847
2848         * layout/Verification.cpp:
2849         (WebCore::Layout::outputMismatchingBlockBoxInformationIfNeeded):
2850
2851 2018-08-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2852
2853         [WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
2854         https://bugs.webkit.org/show_bug.cgi?id=188093
2855
2856         Reviewed by Žan Doberšek.
2857
2858         Add helper functions to get key code, hardware key code, key identifier and windows key code from a WPE key symbol.
2859
2860         * platform/PlatformKeyboardEvent.h:
2861         * platform/wpe/PlatformKeyboardEventWPE.cpp:
2862         (WebCore::PlatformKeyboardEvent::keyValueForWPEKeyCode):
2863         (WebCore::PlatformKeyboardEvent::keyCodeForHardwareKeyCode):
2864         (WebCore::PlatformKeyboardEvent::keyIdentifierForWPEKeyCode):
2865         (WebCore::PlatformKeyboardEvent::windowsKeyCodeForWPEKeyCode):
2866         (WebCore::PlatformKeyboardEvent::singleCharacterString):
2867
2868 2018-08-02  Ryosuke Niwa  <rniwa@webkit.org>
2869
2870         Release assert when throwing exceptions in custom element reactions
2871         https://bugs.webkit.org/show_bug.cgi?id=187805
2872         <rdar://problem/42432714>
2873
2874         Reviewed by Saam Barati.
2875
2876         The release assertion was hit because we were not catching & re-throwing the exception thrown by DOM API
2877         before trying to execute custom elements reactions in ~CustomElementReactionStack as specified here:
2878         https://html.spec.whatwg.org/multipage/custom-elements.html#cereactions
2879         Fixed the bug by capturing the exception and re-throwing the exception as specified.
2880
2881         Tests: imported/w3c/web-platform-tests/custom-elements/reactions/with-exceptions.html
2882
2883         * bindings/js/JSMainThreadExecState.h:
2884         (WebCore::JSMainThreadNullState::JSMainThreadNullState): Use the previous JS state.
2885         * bindings/scripts/CodeGeneratorJS.pm:
2886         (GeneratePut): Pass in the exec state to CustomElementReactionStack.
2887         (GeneratePutByIndex): Ditto.
2888         (GenerateDefineOwnProperty): Ditto.
2889         (GenerateDeletePropertyCommon): Ditto.
2890         (GenerateAttributeSetterBodyDefinition): Ditto.
2891         (GenerateOperationBodyDefinition): Ditto.
2892         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
2893         (WebCore::setJSTestCEReactionsAttributeWithCEReactionsSetter):
2894         (WebCore::setJSTestCEReactionsReflectAttributeWithCEReactionsSetter):
2895         (WebCore::jsTestCEReactionsPrototypeFunctionMethodWithCEReactionsBody):
2896         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
2897         (WebCore::setJSTestCEReactionsStringifierValueSetter):
2898         * dom/CustomElementReactionQueue.cpp:
2899         (WebCore::CustomElementReactionQueue::ElementQueue::processQueue): Added. If there is a script running
2900         in the stack (i.e. ExecState is not null), catch any exception before executing custom element reactions,
2901         then re-throw the exception afterwards. ExecState is null when DOM API is invoked via Objective-C bindings
2902         or when custom element reactions are executed in the backup queue (e.g. for editing operations).
2903         (WebCore::CustomElementReactionStack::processQueue):
2904         (WebCore::CustomElementReactionQueue::processBackupQueue):
2905         * dom/CustomElementReactionQueue.h:
2906         (WebCore::CustomElementReactionStack::CustomElementReactionStack):
2907         (WebCore::CustomElementReactionStack::~CustomElementReactionStack):
2908
2909 2018-08-02  Zalan Bujtas  <zalan@apple.com>
2910
2911         [LFC][BFC] Apply the "10.6.6 Complicated cases" when computing height and margin for the document renderer
2912         https://bugs.webkit.org/show_bug.cgi?id=188296
2913
2914         Reviewed by Simon Fraser.
2915
2916         The spec is not clear about what to do with the document renderer. It behaves as if it was a formatting context root when
2917         it comes to computing the content height. Let's apply "10.6.6 Complicated cases" for now.
2918
2919         * layout/FormattingContext.h:
2920         * layout/FormattingContextGeometry.cpp:
2921         (WebCore::Layout::FormattingContext::Geometry::complicatedCases):
2922         (WebCore::Layout::FormattingContext::Geometry::floatingHeightAndMargin):
2923         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedHeightAndMargin): Deleted.
2924         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2925         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeightAndMargin):
2926         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeightAndMargin):
2927         * layout/layouttree/LayoutBox.cpp:
2928         (WebCore::Layout::Box::establishesBlockFormattingContext const):
2929         * layout/layouttree/LayoutBox.h:
2930
2931 2018-08-02  Zalan Bujtas  <zalan@apple.com>
2932
2933         [LFC][Floating] Add FloatingState::bottom() to enable content height computation for formatting roots.
2934         https://bugs.webkit.org/show_bug.cgi?id=188294
2935
2936         Reviewed by Simon Fraser.
2937
2938         "10.6.7 'Auto' heights for block formatting context roots
2939         ...
2940         In addition, if the element has any floating descendants whose bottom margin edge is below the element's bottom content edge,
2941         then the height is increased to include those edges. Only floats that participate in this block formatting context are taken into
2942         account, e.g., floats inside absolutely positioned descendants or other floats are not..."
2943
2944         * layout/FloatingState.cpp:
2945         (WebCore::Layout::FloatingState::bottom const):
2946         * layout/FloatingState.h:
2947         * layout/FormattingContextGeometry.cpp:
2948         (WebCore::Layout::contentHeightForFormattingContextRoot):
2949
2950 2018-08-02  Jer Noble  <jer.noble@apple.com>
2951
2952         Control center controls disappear when pausing, locking device.
2953         https://bugs.webkit.org/show_bug.cgi?id=188282
2954         <rdar://problem/42497809>
2955
2956         Reviewed by Eric Carlson.
2957
2958         Test: platform/mac/media/audio-session-category-video-paused.html
2959
2960         MediaRemote will set any app whose audio session category changes from MediaPlayback to
2961         Ambient as not eligable for being the "now playing" app. Previously, due to the ordering of
2962         events, we never moved from MediaPlayback to Ambient when pausing <video>, even though that
2963         was the intention. Now that that bug is fixed, it exposed this new issue with MediaRemote.
2964
2965         To solve the new issue, make our audio session category policy more explicit: once we are in
2966         MediaPlayback category, we will remain so as long as the media element in queston stays
2967         loaded, has played, and is never interrupted by the system.
2968
2969         Make MediaSessionManagerCocoa a proper subclass of PlatformMediaSessionManager, and make
2970         MediaSessionManageriOS and -Mac subclasses of the -Cocoa class. Add a new
2971         m_hasPlayedSinceLastInterruption ivar to PlatformMediaSession, set when the state() changes
2972         to Playing, and cleared during an interruption. Check this flag when deciding what audio 
2973         sessino category to set in MediaSessionManagerCocoa.
2974
2975         * WebCore.xcodeproj/project.pbxproj:
2976         * platform/audio/PlatformMediaSession.cpp:
2977         (WebCore::PlatformMediaSession::setState):
2978         * platform/audio/PlatformMediaSession.h:
2979         (WebCore::PlatformMediaSession::hasPlayedSinceLastInterruption const):
2980         (WebCore::PlatformMediaSession::clearHasPlayedSinceLastInterruption):
2981         * platform/audio/PlatformMediaSessionManager.cpp:
2982         (WebCore::PlatformMediaSessionManager::updateSessionState): Deleted.
2983         * platform/audio/PlatformMediaSessionManager.h:
2984         (WebCore::PlatformMediaSessionManager::audioHardwareListener):
2985         (WebCore::PlatformMediaSessionManager::updateSessionState):
2986         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
2987         (MediaSessionManagerCocoa::updateSessionState):
2988         (MediaSessionManagerCocoa::beginInterruption):
2989         (PlatformMediaSessionManager::updateSessionState): Deleted.
2990         * platform/audio/cocoa/MediaSessionManagerCocoa.h: Added.
2991         * platform/audio/ios/MediaSessionManagerIOS.h:
2992         * platform/audio/ios/MediaSessionManagerIOS.mm:
2993         (WebCore::MediaSessionManageriOS::MediaSessionManageriOS):
2994         * platform/audio/mac/MediaSessionManagerMac.h:
2995         * platform/audio/mac/MediaSessionManagerMac.mm:
2996         (WebCore::MediaSessionManagerMac::MediaSessionManagerMac):
2997
2998 2018-08-02  Nan Wang  <n_wang@apple.com>
2999
3000         AX: [iOS] add support to return the attributed string under the element
3001         https://bugs.webkit.org/show_bug.cgi?id=188276
3002         <rdar://problem/42872357>
3003
3004         Reviewed by Chris Fleizach.
3005
3006         Provided a way on iOS to return the attributed string under the element for 
3007         better performance.
3008
3009         Test: accessibility/ios-simulator/attributed-string-for-element.html
3010
3011         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3012         (-[WebAccessibilityObjectWrapper _stringFromStartMarker:toEndMarker:attributed:]):
3013         (-[WebAccessibilityObjectWrapper _stringForRange:attributed:]):
3014         (-[WebAccessibilityObjectWrapper attributedStringForElement]):
3015
3016 2018-08-02  Zalan Bujtas  <zalan@apple.com>
3017
3018         [LFC][Floating] Remove redundant LayoutContext member variable.
3019         https://bugs.webkit.org/show_bug.cgi?id=188286
3020
3021         Reviewed by Simon Fraser.
3022
3023         * layout/FloatingContext.cpp:
3024         (WebCore::Layout::begin):
3025         (WebCore::Layout::end):
3026         (WebCore::Layout::FloatingContext::floatingPosition const):
3027         (WebCore::Layout::FloatingPair::FloatingPair):
3028         (WebCore::Layout::Iterator::Iterator):
3029
3030 2018-08-02  Ryosuke Niwa  <rniwa@webkit.org>
3031
3032         Move queue processing logic from CustomElementReactionStack to CustomElementReactionQueue
3033         https://bugs.webkit.org/show_bug.cgi?id=188277
3034
3035         Reviewed by Wenson Hsieh.
3036
3037         Moved ensureCurrentQueue, processBackupQueue, ElementQueue, ensureBackupQueue, and backupElementQueue
3038         from CustomElementReactionStack to CustomElementReactionQueue to simplify CustomElementReactionStack.
3039
3040         No new tests since there is no behavior change.
3041
3042         * dom/CustomElementReactionQueue.cpp:
3043         (WebCore::CustomElementReactionQueue::enqueueElementUpgrade):
3044         (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded):
3045         (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded):
3046         (WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded):
3047         (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded):
3048         (WebCore::CustomElementReactionQueue::ElementQueue::add): Moved from CustomElementReactionStack.
3049         (WebCore::CustomElementReactionQueue::ElementQueue::invokeAll): Ditto.
3050         (WebCore::CustomElementReactionQueue::ensureCurrentQueue): Ditto.
3051         (WebCore::CustomElementReactionQueue::ensureBackupQueue): Ditto.
3052         (WebCore::CustomElementReactionQueue::processBackupQueue): Ditto.
3053         (WebCore::CustomElementReactionQueue::backupElementQueue): Ditto.
3054         * dom/CustomElementReactionQueue.h:
3055         (WebCore::CustomElementReactionStack::hasCurrentProcessingStack): Deleted. It was never called.
3056
3057 2018-08-02  Timothy Hatcher  <timothy@apple.com>
3058
3059         Text selection color is hard to see in dark mode web views.
3060         https://bugs.webkit.org/show_bug.cgi?id=188260
3061         rdar://problem/42721294
3062
3063         Reviewed by Simon Fraser.
3064
3065         Stop using blendWithWhite() to transform the AppKit selection color in dark mode.
3066         Using an alpha of 80% gives good contrast, and still works good for selections over images.
3067
3068         * platform/graphics/Color.cpp:
3069         (WebCore::Color::blendWithWhite const): Mark new colors as semantic if the original is.
3070         (WebCore::Color::colorWithAlpha const): Ditto.
3071         * rendering/RenderElement.cpp:
3072         (WebCore::RenderElement::selectionBackgroundColor const): Use transformSelectionBackgroundColor.
3073         * rendering/RenderTheme.cpp:
3074         (WebCore::RenderTheme::activeSelectionBackgroundColor const): Use transformSelectionBackgroundColor.
3075         (WebCore::RenderTheme::inactiveSelectionBackgroundColor const): Ditto.
3076         (WebCore::RenderTheme::transformSelectionBackgroundColor const): Added. Just blend with white.
3077         * rendering/RenderTheme.h:
3078         * rendering/RenderThemeMac.h:
3079         * rendering/RenderThemeMac.mm:
3080         (WebCore::RenderThemeMac::transformSelectionBackgroundColor const): Added. Use an alpha with the color
3081         in dark mode, otherwise fallback to RenderTheme.
3082         (WebCore::RenderThemeMac::systemColor const): Use activeListBoxSelectionBackgroundColor()
3083         and activeSelectionBackgroundColor() instead of caching the colors again. Update hardcoded color.
3084
3085 2018-08-02  Zalan Bujtas  <zalan@apple.com>
3086
3087         [LFC][Floating] Use displayBox.rectWithMargin().bottom instead of displayBox.bottom() to where applicable.
3088         https://bugs.webkit.org/show_bug.cgi?id=188274
3089
3090         Reviewed by Antti Koivisto.
3091
3092         Float placement uses the margin box.
3093
3094         * layout/FloatingContext.cpp:
3095         (WebCore::Layout::FloatingPair::bottom const):
3096         (WebCore::Layout::Iterator::operator++):
3097         (WebCore::Layout::Iterator::set):
3098
3099 2018-08-02  Zalan Bujtas  <zalan@apple.com>
3100
3101         [LFC][Floating] Right aligned float's horizontal candidate position is miscomputed.
3102         https://bugs.webkit.org/show_bug.cgi?id=188273
3103
3104         Reviewed by Antti Koivisto.
3105
3106         rightAlignedBoxLeft is already shifted with the size of the margin box.
3107
3108         * layout/FloatingContext.cpp:
3109         (WebCore::Layout::FloatingContext::alignWithFloatings const):
3110
3111 2018-08-02  Zalan Bujtas  <zalan@apple.com>
3112
3113         [LFC] Display:Box::rectWithMargin()'s width and height don't include margin left/top.
3114         https://bugs.webkit.org/show_bug.cgi?id=188272
3115
3116         Reviewed by Antti Koivisto.
3117
3118         * layout/displaytree/DisplayBox.h:
3119         (WebCore::Display::Box::rectWithMargin const):
3120
3121 2018-08-02  Zalan Bujtas  <zalan@apple.com>
3122
3123         [LFC][Floating] Containing block of a float could push the candidate position beyond the current float.
3124         https://bugs.webkit.org/show_bug.cgi?id=188264
3125
3126         Reviewed by Antti Koivisto.
3127
3128         <div id=first style="float: left; width: 100px; height: 10px;"></div>
3129         <div id=second style="float: left; width: 10px; height: 10px;"></div>
3130         <div style="width: 50px; height: 50px;>
3131             <div id=third style="float: left; width: 10px; height: 10px;"></div>
3132         </div>
3133         In the example above by the time the "third" float comes in, we are already at 110px horizontally. However the containing block of the "third" float forces
3134         the candidate position at 0px. In such cases intersecting won't work since the candidate position is beyond the last(second) float (horizontally).
3135         We could either keep going back to the previous floats on this vertical position and eventually intersect with "first" or just compare the horizontal
3136         positions and ensure that the left/right float is not going to be placed to the left/right of the last float on the current vertical position.
3137
3138         * layout/FloatingContext.cpp:
3139         (WebCore::Layout::FloatingPair::intersects const):
3140
3141 2018-08-01  Ryosuke Niwa  <rniwa@webkit.org>
3142
3143         Implement customElements.upgrade()
3144         https://bugs.webkit.org/show_bug.cgi?id=183397
3145
3146         Reviewed by Frédéric Wang.
3147
3148         Added the support to upgrade custom elements directly. Ordinarily, custom elements get upgraded as they are
3149         inserted / connected into a document but some script libraries and authors want to be able to upgrade them before that.
3150         Also see https://github.com/w3c/webcomponents/issues/710
3151
3152         Implemented the method as specified at:
3153         https://html.spec.whatwg.org/multipage/custom-elements.html#dom-customelementregistry-upgrade
3154
3155             When invoked, the upgrade(root) method must run these steps:
3156             1. Let candidates be a list of all of root's shadow-including inclusive descendant elements,
3157                in shadow-including tree order.
3158             2. For each candidate of candidates, try to upgrade candidate.
3159
3160         Tests: imported/w3c/web-platform-tests/custom-elements/custom-element-registry/upgrade.html
3161
3162         * dom/CustomElementReactionQueue.cpp:
3163         (WebCore::CustomElementReactionQueue::enqueueElementUpgradeIfDefined): Removed the assertion that the upgraded element
3164         is connected since the whole point of this API is to upgrade a disconnected element.
3165         * dom/CustomElementRegistry.cpp:
3166         (WebCore::upgradeElementsInShadowIncludingdescendants): Added.
3167         (WebCore::CustomElementRegistry::upgrade): Added.
3168         * dom/CustomElementRegistry.h: Forward declare DeferredPromise instead of unnecessarily including JSDOMPromiseDeferred.h.
3169         * dom/CustomElementRegistry.idl:
3170         * dom/Element.cpp:
3171         (WebCore::Element::insertedIntoAncestor): Moved the assertion here.
3172
3173 2018-08-02  Simon Fraser  <simon.fraser@apple.com>
3174
3175         Convert calc-related enums to 8-bit enum classes
3176         https://bugs.webkit.org/show_bug.cgi?id=188215
3177
3178         Reviewed by Zalan Bujtas.
3179
3180         This shrinks CSSCalcOperation from 48 to 32 bytes.
3181
3182         * css/CSSCalculationValue.cpp:
3183         (WebCore::unitCategory):
3184         (WebCore::determineCategory):
3185         (WebCore::resolvedTypeForMinOrMax):
3186         (WebCore::isIntegerResult):
3187         (WebCore::CSSCalcExpressionNodeParser::parseValue):
3188         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
3189         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
3190         (WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
3191         (WebCore::createBlendHalf):
3192         (WebCore::createCSS):
3193         * css/CSSCalculationValue.h:
3194         * css/CSSPrimitiveValue.cpp:
3195         (WebCore::CSSPrimitiveValue::primitiveType const):
3196         * css/StyleBuilderConverter.h:
3197         (WebCore::StyleBuilderConverter::convertTo100PercentMinusLength):
3198         * css/parser/CSSPropertyParserHelpers.cpp:
3199         (WebCore::CSSPropertyParserHelpers::CalcParser::consumeNumberRaw):
3200         (WebCore::CSSPropertyParserHelpers::CalcParser::consumePositiveIntegerRaw):
3201         (WebCore::CSSPropertyParserHelpers::consumeInteger):
3202         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
3203         (WebCore::CSSPropertyParserHelpers::consumeNumberRaw):
3204         (WebCore::CSSPropertyParserHelpers::consumeNumber):
3205         (WebCore::CSSPropertyParserHelpers::consumeFontWeightNumber):
3206         (WebCore::CSSPropertyParserHelpers::consumeLength):
3207         (WebCore::CSSPropertyParserHelpers::consumePercent):
3208         (WebCore::CSSPropertyParserHelpers::canConsumeCalcValue):
3209         (WebCore::CSSPropertyParserHelpers::consumeLengthOrPercent):
3210         (WebCore::CSSPropertyParserHelpers::consumeAngle):
3211         (WebCore::CSSPropertyParserHelpers::consumeAngleOrPercent):
3212         (WebCore::CSSPropertyParserHelpers::consumeTime):
3213         * platform/CalculationValue.cpp:
3214         (WebCore::CalcExpressionNumber::operator== const):
3215         (WebCore::CalcExpressionOperation::evaluate const):
3216         (WebCore::CalcExpressionOperation::operator== const):
3217         (WebCore::CalcExpressionOperation::dump const):
3218         (WebCore::CalcExpressionLength::operator== const):
3219         (WebCore::CalcExpressionBlendLength::CalcExpressionBlendLength):
3220         (WebCore::CalcExpressionBlendLength::operator== const):
3221         (WebCore::operator<<):
3222         * platform/CalculationValue.h:
3223         (WebCore::CalcExpressionNumber::CalcExpressionNumber):
3224         (WebCore::toCalcExpressionNumber):
3225         (WebCore::CalcExpressionLength::CalcExpressionLength):
3226         (WebCore::toCalcExpressionLength):
3227         (WebCore::CalcExpressionOperation::CalcExpressionOperation):
3228         (WebCore::toCalcExpressionOperation):
3229         (WebCore::toCalcExpressionBlendLength):
3230         * platform/Length.cpp:
3231         (WebCore::convertTo100PercentMinusLength):
3232
3233 2018-08-02  Charlie Turner  <cturner@igalia.com>
3234
3235         Handle zero-sized ISOMP4 boxes appropriately
3236         https://bugs.webkit.org/show_bug.cgi?id=188256
3237
3238         Reviewed by Jer Noble.
3239
3240         According to ISO/IEC 14496-12:2012(E), when the Box classes' size
3241         field is zero, the implied size of the box extends to the end of
3242         the file. If this detail is not taken into account, CENC
3243         sanitization can incorrectly report an invalid box size, since 0
3244         != the number of bytes in this box, specifically, the data layout
3245         of Box is as follows,
3246
3247         aligned(8) class Box (unsigned int(32) boxtype,
3248               optional unsigned int(8)[16] extended_type) {
3249            unsigned int(32) size;
3250            unsigned int(32) type = boxtype;
3251            if (size==1) {
3252              unsigned int(64) largesize;
3253            } else if (size==0) { // This is the case now handled.
3254              // box extends to end of file
3255            }
3256            if (boxtype==‘uuid’) {
3257              unsigned int(8)[16] usertype = extended_type;
3258            }
3259         }
3260
3261         Tested by imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input.https.html
3262
3263         * platform/graphics/iso/ISOBox.cpp:
3264         (WebCore::ISOBox::peekBox): Check if the parsed size is zero, and
3265         if it is, the size is calculated as the total number of bytes in
3266         the incoming DataView.
3267         (WebCore::ISOBox::parse): Ditto.
3268
3269 2018-08-01  Dan Bernstein  <mitz@apple.com>
3270
3271         Optionally expose Attr::style to JavaScript
3272         https://bugs.webkit.org/show_bug.cgi?id=188226
3273         <rdar://problem/42818113>
3274
3275         Reviewed by Darin Adler.
3276
3277         Test: TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm
3278
3279         * dom/Attr.cpp: Update comment.
3280         * dom/Attr.idl: Define the style attribute, enabled at runtime by the AttrStyle feature.
3281
3282         * page/RuntimeEnabledFeatures.h:
3283         (WebCore::RuntimeEnabledFeatures::setAttrStyleEnabled): Added this accessor.
3284         (WebCore::RuntimeEnabledFeatures::attrStyleEnabled const): Ditto.
3285
3286 2018-08-02  David Fenton  <david_fenton@apple.com>
3287
3288         Unreviewed, rolling out r234489.
3289
3290         Caused 50+ crashes and 60+ API failures on iOS
3291
3292         Reverted changeset:
3293
3294         "[WTF] Rename String::format to String::deprecatedFormat"
3295         https://bugs.webkit.org/show_bug.cgi?id=188191
3296         https://trac.webkit.org/changeset/234489
3297
3298 2018-08-02  Zalan Bujtas  <zalan@apple.com>
3299
3300         [LFC][Floating] Do not pass formatting root to FloatingContext
3301         https://bugs.webkit.org/show_bug.cgi?id=188257
3302
3303         Reviewed by Antti Koivisto.
3304
3305         If we ever need it, we can get it from FloatingState.
3306
3307         * layout/FloatingContext.cpp:
3308         (WebCore::Layout::FloatingContext::FloatingContext):
3309         * layout/FloatingContext.h:
3310         * layout/blockformatting/BlockFormattingContext.cpp:
3311         (WebCore::Layout::BlockFormattingContext::layout const):
3312
3313 2018-08-01  Zalan Bujtas  <zalan@apple.com>
3314
3315         [LFC][Floating] Convert all coordinates relative to the formatting context root.
3316         https://bugs.webkit.org/show_bug.cgi?id=188249
3317
3318         Reviewed by Antti Koivisto.
3319
3320         The idea here is that all the float related computation should be happening in the same coordinate system.
3321         FloatItem holds the transformed Display::Box for both the layout box and its containing block. 
3322
3323         * layout/FloatingContext.cpp:
3324         (WebCore::Layout::begin):
3325         (WebCore::Layout::end):
3326         (WebCore::Layout::FloatingContext::computePosition const):
3327         (WebCore::Layout::FloatingContext::floatingPosition const):
3328         (WebCore::Layout::FloatingContext::initialVerticalPosition const):
3329         (WebCore::Layout::FloatingContext::alignWithContainingBlock const):
3330         (WebCore::Layout::FloatingContext::alignWithFloatings const):
3331         (WebCore::Layout::FloatingContext::toContainingBlock const):
3332         (WebCore::Layout::FloatingPair::FloatingPair):
3333         (WebCore::Layout::FloatingPair::left const):
3334         (WebCore::Layout::FloatingPair::right const):
3335         (WebCore::Layout::Iterator::Iterator):
3336         (WebCore::Layout::previousFloatingIndex):
3337         (WebCore::Layout::Iterator::operator++):
3338         (WebCore::Layout::Iterator::set):
3339         * layout/FloatingContext.h:
3340         * layout/FloatingState.cpp:
3341         (WebCore::Layout::FloatingState::FloatItem::FloatItem):
3342         (WebCore::Layout::FloatingState::remove):
3343         (WebCore::Layout::FloatingState::append):
3344         * layout/FloatingState.h:
3345         (WebCore::Layout::FloatingState::isEmpty const):
3346         (WebCore::Layout::FloatingState::FloatItem::layoutBox const):
3347         (WebCore::Layout::FloatingState::FloatItem::containingBlock const):
3348         (WebCore::Layout::FloatingState::FloatItem::displayBox const):
3349         (WebCore::Layout::FloatingState::FloatItem::containingBlockDisplayBox const):
3350         (WebCore::Layout::FloatingState::floats const):
3351         (WebCore::Layout::FloatingState::last const):
3352         (WebCore::Layout::FloatingState::root const):
3353         (WebCore::Layout::FloatingState::floatings const): Deleted.
3354         * layout/displaytree/DisplayBox.h:
3355
3356 2018-08-02  Charlie Turner  <cturner@igalia.com>
3357
3358         [GStreamer] Dynamically adjust blocksize
3359         https://bugs.webkit.org/show_bug.cgi?id=188194
3360
3361         Reviewed by Xabier Rodriguez-Calvar.
3362
3363         Update the blocksize depending on how much is obtained from a read
3364         of the input stream. This avoids doing too many reads in small
3365         chunks when larger amounts of data are available and also prevents
3366         using a very large memory area to read a small chunk of data.
3367
3368         Adapted from https://bugzilla.gnome.org/show_bug.cgi?id=767833
3369
3370         No tests new tests since no change in functionality.
3371
3372         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3373         (webkit_web_src_init):
3374         (CachedResourceStreamingClient::checkUpdateBlocksize):
3375         (CachedResourceStreamingClient::dataReceived):
3376
3377 2018-08-02  Charlie Turner  <cturner@igalia.com>
3378
3379         [GStreamer] Stop pushing buffers when seeking status changes
3380         https://bugs.webkit.org/show_bug.cgi?id=188193
3381
3382         Reviewed by Xabier Rodriguez-Calvar.
3383
3384         After switching to splitting buffers into smaller block sizes in
3385
3386             https://bugs.webkit.org/show_bug.cgi?id=182829
3387
3388         It was found that during the individual buffer pushes, the seeking
3389         status could change behind our backs from another thread. When
3390         this happens, buffers from incorrect offsets would find their way
3391         into appsrc and eventually the demuxer itself, which would start
3392         parsing from a random place and at best give a confusing error
3393         message.
3394
3395         The solution here is break from pushing buffers when the seeking
3396         status has been has changed. Flushes will clear out what we've
3397         already delivered into the appsrc, then we must make sure to not
3398         continue sending buffers in there after the flush.
3399
3400         No new tests since this is a timing bug.
3401
3402         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
3403         (CachedResourceStreamingClient::dataReceived):
3404
3405 2018-08-01  Yusuke Suzuki  <utatane.tea@gmail.com>
3406
3407         Unreviewed, revert TransformationMatrix::operator== change
3408         https://bugs.webkit.org/show_bug.cgi?id=188197
3409
3410         This change partially revert cleaning up of TransformationMatrix since memcmp does not
3411         follow double comparison algorithm. So semantics was accidentally changed.
3412
3413         * platform/graphics/transforms/TransformationMatrix.h:
3414         (WebCore::TransformationMatrix::operator== const):
3415
3416 2018-08-01  Yusuke Suzuki  <utatane.tea@gmail.com>
3417
3418         Unreviewed, rename TransformationMatrix::Identity to TransformationMatrix::identity
3419         https://bugs.webkit.org/show_bug.cgi?id=188204
3420
3421         Follow the coding style.
3422
3423         * platform/graphics/GraphicsLayer.cpp:
3424         (WebCore::GraphicsLayer::transform const):
3425         (WebCore::GraphicsLayer::childrenTransform const):
3426         * platform/graphics/transforms/TransformationMatrix.cpp:
3427         * platform/graphics/transforms/TransformationMatrix.h:
3428
3429 2018-08-01  Yusuke Suzuki  <utatane.tea@gmail.com>
3430
3431         Add self.queueMicrotask(f) on DOMWindow
3432         https://bugs.webkit.org/show_bug.cgi?id=188212
3433
3434         Reviewed by Ryosuke Niwa.
3435
3436         This patch adds self.queueMicrotask(f) in DOMWindow, which takes a function and enqueue it into microtask queue.
3437         We do not add this to Worker's global scope since our worker does not support microtasks correctly.
3438
3439         Tests: js/dom/queue-microtask-window.html
3440
3441         * bindings/js/JSDOMWindowCustom.cpp:
3442         (WebCore::JSDOMWindow::queueMicrotask):
3443         Post a microtask to JSC's microtask mechanism. This will eventually go to WebCore's MicrotaskQueue code.
3444
3445         * page/DOMWindow.idl:
3446
3447 2018-08-01  Tomas Popela  <tpopela@redhat.com>
3448
3449         [WTF] Rename String::format to String::deprecatedFormat
3450         https://bugs.webkit.org/show_bug.cgi?id=188191
3451
3452         Reviewed by Darin Adler.
3453
3454         It should be replaced with string concatenation.
3455
3456         * Modules/indexeddb/IDBKeyData.cpp:
3457         (WebCore::IDBKeyData::loggingString const):
3458         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3459         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
3460         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
3461         (WebCore::IDBCursorInfo::loggingString const):
3462         * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
3463         (WebCore::IDBGetAllRecordsData::loggingString const):
3464         * Modules/indexeddb/shared/IDBGetRecordData.cpp:
3465         (WebCore::IDBGetRecordData::loggingString const):
3466         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
3467         (WebCore::IDBIndexInfo::loggingString const):
3468         (WebCore::IDBIndexInfo::condensedLoggingString const):
3469         * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
3470         (WebCore::IDBIterateCursorData::loggingString const):
3471         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
3472         (WebCore::IDBObjectStoreInfo::condensedLoggingString const):
3473         * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
3474         (WebCore::IDBResourceIdentifier::loggingString const):
3475         * Modules/webdatabase/Database.cpp:
3476         (WebCore::formatErrorMessage):
3477         * Modules/webdatabase/SQLError.h:
3478         (WebCore::SQLError::create):
3479         * Modules/websockets/WebSocket.cpp:
3480         (WebCore::encodeProtocolString):
3481         * accessibility/win/AccessibilityObjectWrapperWin.cpp:
3482         (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):
3483         * css/CSSUnicodeRangeValue.cpp:
3484         (WebCore::CSSUnicodeRangeValue::customCSSText const):
3485         * css/MediaQueryEvaluator.cpp:
3486         (WebCore::aspectRatioValueAsString):
3487         * css/parser/CSSParserToken.cpp:
3488         (WebCore::CSSParserToken::serialize const):
3489         * css/parser/CSSPropertyParserHelpers.cpp:
3490         (WebCore::CSSPropertyParserHelpers::parseHexColor):
3491         * dom/Document.cpp:
3492         (WebCore::Document::lastModified):
3493         * html/FTPDirectoryDocument.cpp:
3494         (WebCore::processFilesizeString):
3495         (WebCore::processFileDateString):
3496         * html/HTMLMediaElement.h:
3497         (WTF::ValueToString<WebCore::TextTrackCue::string):
3498         * html/HTMLSelectElement.cpp:
3499         (WebCore::HTMLSelectElement::setLength):
3500         * html/ImageDocument.cpp:
3501         (WebCore::ImageDocument::imageUpdated):
3502         * html/canvas/WebGLRenderingContextBase.cpp:
3503         * html/parser/XSSAuditor.cpp:
3504         (WebCore::XSSAuditor::init):
3505         * html/track/VTTCue.cpp:
3506         (WebCore::VTTCueBox::applyCSSProperties):
3507         * inspector/InspectorFrontendClientLocal.cpp:
3508         (WebCore::InspectorFrontendClientLocal::setDockingUnavailable):
3509         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
3510         (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
3511         (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
3512         (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
3513         * inspector/agents/InspectorCSSAgent.cpp:
3514         * inspector/agents/InspectorIndexedDBAgent.cpp:
3515         * page/CaptionUserPreferencesMediaAF.cpp:
3516         (WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const):
3517         * page/History.cpp:
3518         (WebCore::History::stateObjectAdded):
3519         * page/MemoryRelease.cpp:
3520         (WebCore::logMemoryStatisticsAtTimeOfDeath):
3521         * page/cocoa/ResourceUsageOverlayCocoa.mm:
3522         (WebCore::formatByteNumber):
3523         (WebCore::gcTimerString):
3524         (WebCore::ResourceUsageOverlay::platformDraw):
3525         * page/cocoa/ResourceUsageThreadCocoa.mm:
3526         (WebCore::logFootprintComparison):
3527         * page/linux/ResourceUsageOverlayLinux.cpp:
3528         (WebCore::cpuUsageString):
3529         (WebCore::formatByteNumber):
3530         (WebCore::gcTimerString):
3531         * page/scrolling/AxisScrollSnapOffsets.cpp:
3532         (WebCore::snapOffsetsToString):
3533         (WebCore::snapOffsetRangesToString):
3534         (WebCore::snapPortOrAreaToString):
3535         * platform/DateComponents.cpp:
3536         (WebCore::DateComponents::toStringForTime const):
3537         (WebCore::DateComponents::toString const):
3538         * platform/LocalizedStrings.cpp:
3539         * platform/animation/TimingFunction.cpp:
3540         (WebCore::TimingFunction::cssText const):
3541         * platform/audio/HRTFElevation.cpp:
3542         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
3543         * platform/cocoa/KeyEventCocoa.mm:
3544         (WebCore::keyIdentifierForCharCode):
3545         * platform/gamepad/mac/HIDGamepad.cpp:
3546         (WebCore::HIDGamepad::HIDGamepad):
3547         * platform/glib/UserAgentGLib.cpp:
3548         (WebCore::platformVersionForUAString):
3549         * platform/graphics/Color.cpp:
3550         (WebCore::Color::nameForRenderTreeAsText const):
3551         * platform/graphics/FloatPolygon.h:
3552         (WTF::ValueToString<WebCore::FloatPolygonEdge::string):
3553         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
3554         (WebCore::AVTrackPrivateAVFObjCImpl::id const):
3555         * platform/graphics/avfoundation/MediaSampleAVFObjC.h:
3556         (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
3557         * platform/graphics/ca/GraphicsLayerCA.cpp:
3558         (WebCore::GraphicsLayerCA::setName):
3559         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
3560         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
3561         (WebCore::GraphicsLayerCA::updateContentsImage):
3562         (WebCore::GraphicsLayerCA::updateContentsRects):
3563         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
3564         * platform/graphics/gstreamer/GStreamerCommon.cpp:
3565         (WebCore::simpleBusMessageCallback):
3566         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3567         (WebCore::MediaPlayerPrivateGStreamer::load):
3568         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
3569         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
3570         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
3571         (WebCore::AppendPipeline::handleStateChangeMessage):
3572         (WebCore::AppendPipeline::resetPipeline):
3573         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
3574         (WebCore::MediaPlayerPrivateGStreamerMSE::load):
3575         (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
3576         * platform/graphics/gtk/ImageBufferGtk.cpp:
3577         (WebCore::encodeImage):
3578         * platform/gtk/PlatformKeyboardEventGtk.cpp:
3579         (WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode):
3580         * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
3581         (WebCore::GStreamerAudioCaptureSource::create):
3582         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
3583         (WebCore::webkitMediaStreamSrcAddPad):
3584         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
3585         (WebCore::GStreamerVideoCaptureSource::create):
3586         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
3587         (WebCore::GStreamerVideoEncoder::makeElement):
3588         * platform/mock/MockRealtimeVideoSource.cpp:
3589         (WebCore::MockRealtimeVideoSource::drawText):
3590         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
3591         * platform/network/ParsedContentRange.cpp:
3592         (WebCore::ParsedContentRange::headerValue const):
3593         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3594         (WebCore::NetworkStorageSession::switchToNewTestingSession):
3595         * platform/sql/SQLiteDatabase.cpp:
3596         (WebCore::unauthorizedSQLFunction):
3597         * platform/text/PlatformLocale.cpp:
3598         (WebCore::DateTimeStringBuilder::visitField):
3599         * platform/win/GDIObjectCounter.cpp:
3600         (WebCore::GDIObjectCounter::GDIObjectCounter):
3601         * platform/win/KeyEventWin.cpp:
3602         (WebCore::keyIdentifierForWindowsKeyCode):
3603         * rendering/FloatingObjects.h:
3604         (WTF::ValueToString<WebCore::FloatingObject::string):
3605         * rendering/RenderFragmentedFlow.h:
3606         (WTF::ValueToString<WebCore::RenderFragmentContainer::string):
3607         * rendering/RenderLayerCompositor.cpp:
3608         (WebCore::RenderLayerCompositor::logLayerInfo):
3609         * rendering/RenderTheme.cpp:
3610         (WebCore::RenderTheme::formatMediaControlsTime const):
3611         * testing/Internals.cpp:
3612         (WebCore::Internals::address):
3613         * workers/service/server/RegistrationDatabase.cpp:
3614         (WebCore::RegistrationDatabase::ensureValidRecordsTable):
3615         (WebCore::RegistrationDatabase::importRecords):
3616
3617 2018-08-01  Alex Christensen  <achristensen@webkit.org>
3618
3619         Move all calls to ResourceLoader::start to WebKitLegacy
3620         https://bugs.webkit.org/show_bug.cgi?id=184946
3621
3622         Reviewed by Andy Estes.
3623
3624         This is in preparation for moving ResourceLoader::start to WebKitLegacy along with all ResourceHandle code.
3625         I move the code that moves m_deferredRequest into m_request into WebKitLegacy, which won't change behavior for
3626         modern WebKit because modern WebKit never calls ResourceLoader::start, the only place where m_deferredRequest
3627         is ever set.  This won't change behavior for WebKitLegacy because the same operations happen in the same order.
3628
3629         * loader/LoaderStrategy.h:
3630         * loader/ResourceLoader.cpp:
3631         (WebCore::ResourceLoader::setDefersLoading):
3632         * loader/ResourceLoader.h:
3633         (WebCore::ResourceLoader::setRequest):
3634         (WebCore::ResourceLoader::deferredRequest const):
3635         (WebCore::ResourceLoader::takeDeferredRequest):
3636
3637 2018-08-01  Nan Wang  <n_wang@apple.com>
3638
3639         AX: AOM: Add ARIA IDL Attribute Reflection
3640         https://bugs.webkit.org/show_bug.cgi?id=184676
3641         <rdar://problem/39476882>
3642
3643         Reviewed by Chris Fleizach.
3644
3645         Test: accessibility/ARIA-reflection.html
3646
3647         * CMakeLists.txt:
3648         * DerivedSources.make:
3649         * WebCore.xcodeproj/project.pbxproj:
3650         * accessibility/AccessibilityRole.idl: Added.
3651         * accessibility/AriaAttributes.idl: Added.
3652         * dom/Element.idl:
3653         * page/RuntimeEnabledFeatures.h:
3654         (WebCore::RuntimeEnabledFeatures::setAriaReflectionEnabled):
3655         (WebCore::RuntimeEnabledFeatures::ariaReflectionEnabled const):
3656
3657 2018-08-01  Zalan Bujtas  <zalan@apple.com>
3658
3659         [LFC][Floating] Revert back to only one list for the all the floatings.
3660         https://bugs.webkit.org/show_bug.cgi?id=188232
3661
3662         Reviewed by Antti Koivisto.
3663
3664         If the combined floating list turns out to be a performance bottleneck, we can still split it into left and right. However at this point
3665         having 2 dedicated lists just makes the implementation more complicated.
3666
3667         * layout/FloatingContext.cpp:
3668         (WebCore::Layout::begin):
3669         (WebCore::Layout::end):
3670         (WebCore::Layout::FloatingPair::FloatingPair):
3671         (WebCore::Layout::FloatingPair::left const):
3672         (WebCore::Layout::FloatingPair::right const):
3673         (WebCore::Layout::Iterator::Iterator):
3674         (WebCore::Layout::previousFloatingIndex):
3675         (WebCore::Layout::Iterator::operator++):
3676         (WebCore::Layout::Iterator::set):
3677         (WebCore::Layout::floatingDisplayBox): Deleted.
3678         * layout/FloatingState.cpp:
3679         (WebCore::Layout::FloatingState::remove):
3680         (WebCore::Layout::FloatingState::append):
3681         * layout/FloatingState.h:
3682         (WebCore::Layout::FloatingState::isEmpty const):
3683         (WebCore::Layout::FloatingState::floatings const):
3684         (WebCore::Layout::FloatingState::last const):
3685
3686 2018-08-01  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3687
3688         [Curl] Change synchronous request logic using MessageQueue to match with Mac port.
3689         https://bugs.webkit.org/show_bug.cgi?id=188206
3690
3691         Reviewed by Alex Christensen.
3692
3693         Port synchronous request logic from ResourceHandleMac to use MessageQueue for
3694         client callback invocation. This makes simplify the logic of CurlRequest because
3695         now every requests are handled in Curl thread and there's no difference between
3696         sync and async requests.
3697
3698         Test: Covered by these tests:
3699         - http\tests\xmlhttprequest\simple-sync.html
3700         - http\tests\xmlhttprequest\xmlhttprequest-unsafe-redirect.html
3701
3702         * platform/network/ResourceHandleInternal.h:
3703         * platform/network/curl/CurlRequest.cpp: Remove synchronous request logics.
3704         (WebCore::CurlRequest::CurlRequest):
3705         (WebCore::CurlRequest::invalidateClient):
3706         (WebCore::CurlRequest::start):
3707         (WebCore::CurlRequest::cancel):
3708         (WebCore::CurlRequest::runOnMainThread): Added message queue handling.
3709         (WebCore::CurlRequest::runOnWorkerThreadIfRequired):
3710         (WebCore::CurlRequest::didReceiveData):
3711         (WebCore::CurlRequest::invokeDidReceiveResponseForFile):
3712         (WebCore::CurlRequest::completeDidReceiveResponse):
3713         (WebCore::CurlRequest::updateHandlePauseState):
3714         (WebCore::CurlRequest::isHandlePaused const):
3715         * platform/network/curl/CurlRequest.h:
3716         (WebCore::CurlRequest::create):
3717         (WebCore::CurlRequest::resourceRequest const):
3718         * platform/network/curl/ResourceHandleCurl.cpp:
3719         (WebCore::ResourceHandle::createCurlRequest):
3720         (WebCore::ResourceHandle::restartRequestWithCredential):
3721         (WebCore::ResourceHandle::platformLoadResourceSynchronously):
3722         (WebCore::ResourceHandle::platformContinueSynchronousDidReceiveResponse):
3723         (WebCore::ResourceHandle::continueAfterDidReceiveResponse):
3724         (WebCore::ResourceHandle::continueAfterWillSendRequest):
3725         (WebCore::ResourceHandle::handleDataURL):
3726
3727 2018-08-01  Zalan Bujtas  <zalan@apple.com>
3728
3729         [LFC][Floating] Use margin box consistently while placing a floating.
3730         https://bugs.webkit.org/show_bug.cgi?id=188222
3731
3732         Reviewed by Antti Koivisto.
3733
3734         The floating box fits when its margin box fits.
3735
3736         * layout/FloatingContext.cpp:
3737         (WebCore::Layout::FloatingContext::computePosition const):
3738         (WebCore::Layout::FloatingContext::floatingPosition const):
3739         (WebCore::Layout::FloatingContext::initialVerticalPosition const):
3740         (WebCore::Layout::FloatingContext::alignWithContainingBlock const):
3741         (WebCore::Layout::FloatingContext::alignWithFloatings const):
3742         (WebCore::Layout::FloatingPair::intersects const):
3743         * layout/displaytree/DisplayBox.h:
3744         (WebCore::Display::Box::rectWithMargin const):
3745
3746 2018-08-01  Zalan Bujtas  <zalan@apple.com>
3747
3748         [LFC] Add FormattingContext::mapToAncestor geometry mapping function
3749         https://bugs.webkit.org/show_bug.cgi?id=188188
3750
3751         Reviewed by Antti Koivisto.
3752
3753         * layout/FormattingContext.cpp:
3754         (WebCore::Layout::FormattingContext::mapToAncestor):
3755         * layout/FormattingContext.h:
3756         * layout/displaytree/DisplayBox.cpp:
3757         (WebCore::Display::Box::clone const):
3758         * layout/displaytree/DisplayBox.h:
3759
3760 2018-08-01  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3761
3762         [Curl] Bugfix on ResourceHandle::cancel()
3763         https://bugs.webkit.org/show_bug.cgi?id=188234
3764
3765         Reviewed by Darin Adler.
3766         Trivial bug. The actual request was not cancelled correctly.
3767
3768         * platform/network/curl/ResourceHandleCurl.cpp:
3769         (WebCore::ResourceHandle::cancel):
3770
3771 2018-08-01  Zalan Bujtas  <zalan@apple.com>
3772
3773         [LFC][Floating] FloatingState should take the formatting root box.
3774         https://bugs.webkit.org/show_bug.cgi?id=188214
3775
3776         Reviewed by Antti Koivisto.
3777
3778         This will be taken into use when FormattingContext takes all boxes in the coordinate system of the formatting root.
3779
3780         * layout/FloatingState.cpp:
3781         (WebCore::Layout::FloatingState::FloatingState):
3782         (WebCore::Layout::belongsToThisFloatingContext):
3783         (WebCore::Layout::FloatingState::append):
3784         * layout/FloatingState.h:
3785         (WebCore::Layout::FloatingState::create):
3786         * layout/LayoutContext.cpp:
3787         (WebCore::Layout::LayoutContext::establishedFormattingState):
3788
3789 2018-08-01  Zalan Bujtas  <zalan@apple.com>
3790
3791         [LFC][Floating] Align new floating with the bottom of the existing floatings.
3792         https://bugs.webkit.org/show_bug.cgi?id=188213
3793
3794         Reviewed by Antti Koivisto.
3795
3796         When the incoming floating does not fit at all, align its top with the bottom of the existing floatings.
3797
3798         * layout/FloatingContext.cpp:
3799         (WebCore::Layout::FloatingContext::floatingPosition const):
3800         (WebCore::Layout::FloatingPair::bottom const):
3801
3802 2018-08-01  Eric Carlson  <eric.carlson@apple.com>
3803
3804         Always use MediaPlayback audio category when playing to AppleTV
3805         https://bugs.webkit.org/show_bug.cgi?id=188230
3806         <rdar://problem/42497809>
3807
3808         Reviewed by Jer Noble.
3809
3810         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
3811         (PlatformMediaSessionManager::updateSessionState): Check session.isPlayingToWirelessPlaybackTarget().
3812
3813 2018-08-01  Timothy Hatcher  <timothy@apple.com>
3814
3815         Hardcode some system colors to avoid fingerprinting exposure.
3816         https://bugs.webkit.org/show_bug.cgi?id=188203
3817         rdar://problem/42781630
3818
3819         Reviewed by Tim Horton.
3820
3821         Passes existing tests with the hardcoded blue system appearance.
3822
3823         * rendering/RenderTheme.h:
3824         * rendering/RenderThemeMac.mm:
3825         (WebCore::RenderThemeMac::systemColor const):
3826         Adds special handling for some system colors. Fixes -apple-system-selected-text-background
3827         to match the real selection color by using blendWithWhite().
3828
3829 2018-08-01  Eric Carlson  <eric.carlson@apple.com>
3830
3831         [iOS] Remove the delay before setting audio session category added in r233535
3832         https://bugs.webkit.org/show_bug.cgi?id=188225
3833
3834         Reviewed by Jer Noble.
3835
3836         * platform/audio/PlatformMediaSessionManager.cpp:
3837         (WebCore::PlatformMediaSessionManager::beginInterruption): scheduleUpdateSessionState -> updateSessionState.
3838         (WebCore::PlatformMediaSessionManager::addSession): Ditto.
3839         (WebCore::PlatformMediaSessionManager::removeSession): Ditto.
3840         (WebCore::PlatformMediaSessionManager::sessionStateChanged): Ditto.
3841         (WebCore::PlatformMediaSessionManager::sessionCanProduceAudioChanged): Ditto.
3842         (WebCore::PlatformMediaSessionManager::updateSessionState): Ditto.
3843         (WebCore::PlatformMediaSessionManager::audioOutputDeviceChanged): Ditto.
3844         (WebCore::PlatformMediaSessionManager::scheduleUpdateSessionState): Deleted.
3845         * platform/audio/PlatformMediaSessionManager.h:
3846
3847         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
3848         (PlatformMediaSessionManager::updateSessionState):
3849         (PlatformMediaSessionManager::scheduleUpdateSessionState): Deleted.
3850         * rendering/RenderLayer.cpp:
3851         (WebCore::RenderLayer::updateClipRects):
3852
3853 2018-08-01  Yusuke Suzuki  <utatane.tea@gmail.com>
3854
3855         Add TransformationMatrix::Identity
3856         https://bugs.webkit.org/show_bug.cgi?id=188204
3857
3858         Reviewed by Simon Fraser.
3859
3860         This patch adds TransformationMatrix::Identity, which is a static const variable holding an identity matrix.
3861
3862         No behavior change.
3863
3864         * platform/graphics/GraphicsLayer.cpp:
3865         (WebCore::GraphicsLayer::transform const):
3866         (WebCore::GraphicsLayer::childrenTransform const):
3867         (): Deleted.
3868         * platform/graphics/transforms/TransformationMatrix.cpp:
3869         * platform/graphics/transforms/TransformationMatrix.h:
3870
3871 2018-08-01  Thibault Saunier  <tsaunier@igalia.com>
3872
3873         [GStreamer] Make sure that first buffer running time is 0 in GStreamerMediaStreamSource
3874         https://bugs.webkit.org/show_bug.cgi?id=188210
3875
3876         This is a live source and the first frame is the beginning of the stream,
3877         but that doesn't mean that the incoming stream from the camera didn't start
3878         before. We need to set a pad offset on each srcpad of the source to compensate
3879         for that. This is the exact same logic as in webrtc GStreamerVideo/Enc/Dec/oder.
3880
3881         Reviewed by Alejandro G. Castro.
3882
3883         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
3884         (WebCore::webkit_media_stream_src_init):
3885         (WebCore::webkitMediaStreamSrcPushVideoSample):
3886         (WebCore::webkitMediaStreamSrcPushAudioSample):
3887
3888 2018-08-01  Zan Dobersek  <zdobersek@igalia.com>
3889
3890         [CoordGraphics] Move CoordinatedBackingStore to WebCore
3891         https://bugs.webkit.org/show_bug.cgi?id=188158
3892
3893         Reviewed by Carlos Garcia Campos.
3894
3895         Move the CoordinatedBackingStore class from WebKit to WebCore. It has no
3896         dependency on anything in the WebKit layer, and it's more suitable to
3897         future needs to keep it in the WebCore layer.
3898
3899         * platform/TextureMapper.cmake:
3900         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp: Renamed from Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp.
3901         * platform/graphics/texmap/coordinated/CoordinatedBackingStore.h: Renamed from Source/WebKit/Shared/CoordinatedGraphics/CoordinatedBackingStore.h.
3902         (WebCore::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile):
3903         (WebCore::CoordinatedBackingStore::rect const):
3904
3905 2018-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
3906
3907         [WIN] Fix tests for text with initial advances
3908         https://bugs.webkit.org/show_bug.cgi?id=188099
3909
3910         Reviewed by Darin Adler.
3911
3912         Fixup after r234318.
3913
3914         Tests: fast/text/complex-first-glyph-with-initial-advance.html
3915                fast/text/initial-advance-in-intermediate-run-complex.html
3916
3917         * platform/graphics/ComplexTextController.cpp: