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