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