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