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