Use "= default" to denote default constructor or destructor
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2017-10-19  Daniel Bates  <dabates@apple.com>
2
3         Use "= default" to denote default constructor or destructor
4         https://bugs.webkit.org/show_bug.cgi?id=178528
5
6         Rubber-stamped by Andy Estes.
7
8         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
9         * Modules/applepay/ApplePayError.cpp:
10         * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
11         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
12         * Modules/applepay/ApplePaySession.cpp:
13         * Modules/applepay/ApplePaySessionPaymentRequest.cpp:
14         * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
15         * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
16         * Modules/applepay/ApplePayValidateMerchantEvent.cpp:
17         * Modules/applepay/Payment.h:
18         * Modules/applepay/PaymentCoordinatorClient.h:
19         * Modules/credentials/BasicCredential.cpp:
20         * Modules/credentials/FederatedCredential.cpp:
21         * Modules/credentials/NavigatorCredentials.cpp:
22         * Modules/credentials/PasswordCredential.cpp:
23         * Modules/encryptedmedia/CDMClient.h:
24         * Modules/encryptedmedia/legacy/LegacyCDM.cpp:
25         * Modules/encryptedmedia/legacy/LegacyCDM.h:
26         * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h:
27         * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h:
28         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h:
29         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
30         * Modules/encryptedmedia/legacy/WebKitMediaKeyMessageEvent.cpp:
31         * Modules/encryptedmedia/legacy/WebKitMediaKeyNeededEvent.cpp:
32         * Modules/entriesapi/DOMFileSystem.cpp:
33         * Modules/entriesapi/FileSystemDirectoryReader.cpp:
34         * Modules/entriesapi/FileSystemEntry.cpp:
35         * Modules/fetch/FetchLoaderClient.h:
36         * Modules/gamepad/Gamepad.cpp:
37         * Modules/gamepad/GamepadEvent.h:
38         * Modules/gamepad/deprecated/Gamepad.cpp:
39         [ truncated ]
40
41 2017-10-19  Sam Weinig  <sam@webkit.org>
42
43         [Bindings] Standardize on DOMPromise as the way to store passed in promises
44         https://bugs.webkit.org/show_bug.cgi?id=178533
45
46         Reviewed by Youenn Fablet.
47
48         This standardizes on RefPtr<DOMPromise> as the canonical way to store a promise
49         that has been passed in from JS. This does not change promises that start off in
50         WebCore and are passed to JS; they remain using DOMPromiseDeferred and DOMPromiseProxy.
51
52         * Modules/paymentrequest/PaymentRequestUpdateEvent.cpp:
53         * Modules/paymentrequest/PaymentRequestUpdateEvent.h:
54         * dom/PromiseRejectionEvent.cpp:
55         * dom/PromiseRejectionEvent.h:
56         * dom/RejectedPromiseTracker.cpp:
57
58             Use a RefPtr<DOMPromise> rather than a JSPromise* to hold onto the promise.
59
60         * bindings/IDLTypes.h:
61
62             Use IDLWrapper to get better defaults, since DOMPromise is refcounted.
63
64         * bindings/js/JSDOMConvertPromise.h:
65         (WebCore::Converter<IDLPromise<T>>::convert):
66
67             Switch default conversion to return a RefPtr<DOMPromise> rather than a JSPromise*
68
69         (WebCore::JSConverter<IDLPromise<T>>::convert):
70
71             Add support for converting from a DOMPromise to a JSValue.
72
73         * bindings/js/JSDOMPromise.cpp:
74         * bindings/js/JSDOMPromise.h:
75         (WebCore::DOMPromise::create): Deleted.
76
77             Remove now unused constructor.    
78
79         * workers/service/ExtendableEvent.cpp:
80         (WebCore::ExtendableEvent::waitUntil):
81         * workers/service/ExtendableEvent.h:
82         * workers/service/ExtendableEvent.idl:
83         * workers/service/FetchEvent.cpp:
84         (WebCore::FetchEvent::respondWith):
85         (WebCore::FetchEvent::promiseIsSettled):
86         * workers/service/FetchEvent.h:
87         * workers/service/FetchEvent.idl:
88
89             Address FIXMEs and remove need for passing an ExecState to ExtendableEvent
90             and FetchEvent by using the new default conversion to DOMPromise.
91
92 2017-10-19  Sam Weinig  <sam@webkit.org>
93
94         [Settings] Move global settings into their own file
95         https://bugs.webkit.org/show_bug.cgi?id=178512
96
97         Reviewed by Darin Adler.
98
99         Moves all global settigns out of SettingsBase and into the new DeprecatedGlobalSettings.
100         It's called DeprecatedGlobalSettings to indicate that this is an anti-pattern we would
101         like to discourage, as WebCore can operate in a process with multiple clients, each of
102         which should be able to set their own preferences.
103
104         * WebCore.xcodeproj/project.pbxproj:
105         * CMakeLists.txt:
106
107             Add new files.
108         
109         * page/DeprecatedGlobalSettings.cpp: Copied from Source/WebCore/page/SettingsBase.cpp.
110         * page/DeprecatedGlobalSettings.h: Copied from Source/WebCore/page/SettingsBase.h.
111         * page/SettingsBase.cpp:
112         * page/SettingsBase.h:
113         
114             Move all global settings out of SettingsBase and into the new DeprecatedGlobalSettings.
115         
116         * Modules/mediastream/UserMediaRequest.cpp:
117         * bindings/js/CommonVM.cpp:
118         * css/CSSStyleDeclaration.cpp:
119         * dom/DataTransfer.cpp:
120         * dom/DataTransferItemList.cpp:
121         * editing/Editor.cpp:
122         * loader/ResourceLoadObserver.cpp:
123         * page/FrameView.cpp:
124         * page/PerformanceMonitor.cpp:
125         * platform/ScrollbarTheme.cpp:
126         (WebCore::ScrollbarTheme::theme):
127         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
128         * platform/graphics/MediaPlayer.cpp:
129         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
130         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
131         * platform/mac/NSScrollerImpDetails.mm:
132         * platform/mock/ScrollbarThemeMock.cpp:
133         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
134         * platform/network/ios/NetworkStateNotifierIOS.mm:
135         * platform/network/soup/SocketStreamHandleImplSoup.cpp:
136         * platform/win/MainThreadSharedTimerWin.cpp:
137         * rendering/RenderLayer.cpp:
138         * rendering/RenderListBox.cpp:
139         * testing/InternalSettings.cpp:
140         * testing/Internals.cpp:
141
142             Update users of global settings to reference the new class name.
143
144 2017-10-19  Youenn Fablet  <youenn@apple.com>
145
146         Add preliminary support for ServiceWorker Handle Fetch
147         https://bugs.webkit.org/show_bug.cgi?id=178475
148         <rdar://problem/35066424>
149
150         Reviewed by Chris Dumez.
151
152         Test: http/tests/workers/service/basic-fetch.https.html
153
154         Adding parameters to allow WebKit to do loading through Service Worker or through regular networking.
155         A script context is now storing its selected service worker identifier. This should be fully implemented later on.
156         This selected service worker identifier is passed to loading code as a ResourceLoaderOptions field.
157         Service workers mode is also added as a ResourceLoaderOptions field so that the service worker can be bypassed.
158
159         * WebCore.xcodeproj/project.pbxproj:
160         * dom/ScriptExecutionContext.h:
161         (WebCore::ScriptExecutionContext::selectedServiceWorkerIdentifier const):
162         (WebCore::ScriptExecutionContext::setSelectedServiceWorkerIdentifier):
163         * loader/DocumentThreadableLoader.cpp:
164         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
165         * loader/FetchOptions.h:
166         (WebCore::isPotentialNavigationOrSubresourceRequest):
167         (WebCore::isNonSubresourceRequest):
168         * loader/ResourceLoaderOptions.h:
169         * loader/WorkerThreadableLoader.cpp:
170         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
171         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
172         * loader/WorkerThreadableLoader.h:
173         * platform/network/ResourceRequestBase.h:
174         * platform/network/ResourceResponseBase.h:
175         * workers/WorkerThread.h:
176         * workers/service/ServiceWorkerContainer.cpp:
177         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
178         * workers/service/context/SWContextManager.cpp: Removed.
179         * workers/service/context/ServiceWorkerThread.h:
180
181 2017-10-19  Zalan Bujtas  <zalan@apple.com>
182
183         [FrameView::layout cleanup] Move post layout task scheduling logic to a separate function
184         https://bugs.webkit.org/show_bug.cgi?id=178538
185         <rdar://problem/35080743>
186
187         Reviewed by Simon Fraser.
188
189         Move and reorganize post layout task scheduling code.
190         
191         Covered by existing tests.
192
193         * page/FrameView.cpp:
194         (WebCore::FrameView::layout):
195         (WebCore::FrameView::runOrSchedulePostLayoutTasks):
196         * page/FrameView.h:
197
198 2017-10-19  Zalan Bujtas  <zalan@apple.com>
199
200         [FrameView::layout cleanup] Move scrollbars setup logic to a separate function
201         https://bugs.webkit.org/show_bug.cgi?id=178394
202         <rdar://problem/35031066>
203
204         Reviewed by Antti Koivisto.
205
206         Decouple scrollbars setup and the unrelated first-layout logic.
207         FIXME: find out why m_firstLayout depends on the subtree flag (I'd assume we issue full layout the very first time). 
208
209         Covered by existing test cases.
210
211         * page/FrameView.cpp:
212         (WebCore::FrameView::adjustScrollbarsForLayout):
213         (WebCore::FrameView::layout):
214         * page/FrameView.h:
215
216 2017-10-19  Tim Horton  <timothy_horton@apple.com>
217
218         Expand r209943 to suppress paste during provisional navigation as well
219         https://bugs.webkit.org/show_bug.cgi?id=178429
220         <rdar://problem/33952830>
221
222         Reviewed by Dean Jackson.
223
224         No new tests; adjusted an existing test to cover this case.
225
226         * editing/Editor.cpp:
227         (WebCore::Editor::canPaste const):
228         Disable pasting during provisional navigation, like r209943 did for
229         various other forms of text input.
230
231         (WebCore::Editor::shouldInsertText const):
232         * dom/EventDispatcher.cpp:
233         (WebCore::shouldSuppressEventDispatchInDOM):
234         * loader/FrameLoader.cpp:
235         (WebCore::FrameLoader::shouldSuppressTextInputFromEditing const):
236         (WebCore::FrameLoader::shouldSuppressKeyboardInput const): Deleted.
237         * loader/FrameLoader.h:
238         * page/Settings.in:
239         Rename the setting to be about editing-related text input, not "keyboard" input.
240
241         * editing/EditorCommand.cpp:
242         (WebCore::allowExecutionWhenDisabled):
243         (WebCore::doNotAllowExecutionWhenDisabled):
244         (WebCore::allowExecutionWhenDisabledCopyCut):
245         (WebCore::allowExecutionWhenDisabledPaste):
246         (WebCore::createCommandMap):
247         (WebCore::Editor::Command::allowExecutionWhenDisabled const):
248         Completely disable execution of paste events when in no-text-input-from-editing mode.
249         Otherwise, even though canPaste was false and we wouldn't do a default paste action,
250         we would still dispatch the paste event to the DOM.
251
252 2017-10-19  Dean Jackson  <dino@apple.com>
253
254         Avoid duplicate multisample resolve before WebGL compositing
255         https://bugs.webkit.org/show_bug.cgi?id=178537
256         <rdar://problem/35080724>
257
258         Fix iOS build.
259
260         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
261         (WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
262
263 2017-10-19  Dean Jackson  <dino@apple.com>
264
265         Avoid duplicate multisample resolve before WebGL compositing
266         https://bugs.webkit.org/show_bug.cgi?id=178537
267         <rdar://problem/35080724>
268
269         Reviewed by Jer Noble.
270
271         Both endPaint and prepareTexture were doing the MSAA resolve
272         into the renderbuffer, and being called on macOS before compositing.
273         Without that step, endPaint became unnecessary on iOS so I renamed
274         it presentRenderbuffer.
275
276         Covered by existing tests.
277
278         * platform/graphics/GraphicsContext3D.h:
279         * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
280         (WebCore::GraphicsContext3D::presentRenderbuffer):
281         (WebCore::GraphicsContext3D::endPaint): Deleted.
282         * platform/graphics/cocoa/WebGLLayer.mm:
283         (-[WebGLLayer display]):
284
285 2017-10-19  Andy Estes  <aestes@apple.com>
286
287         [Payment Request] Only process shipping options if shipping is requested, and throw an exception on duplicate shipping option IDs
288         https://bugs.webkit.org/show_bug.cgi?id=178535
289
290         Reviewed by Alex Christensen.
291
292         Progresses four tests in web-platform-tests/payment-request/payment-request-constructor.https.html.
293
294         * Modules/paymentrequest/PaymentRequest.cpp:
295         (WebCore::PaymentRequest::create):
296
297 2017-10-19  Daniel Bates  <dabates@apple.com>
298
299         Share logic in InlineTextBox to compute selection rect
300         https://bugs.webkit.org/show_bug.cgi?id=178232
301         <rdar://problem/34963452>
302
303         Reviewed by Zalan Bujtas.
304
305         Currently each paint routine in InlineTextBox duplicates similar code to compute the selection
306         rect it will paint. This change consolidates all the duplication into localSelectionRectWithClampedPositions()
307         and writes all of the paint operations, except for paintCompositionUnderline(), in terms of it.
308         We will write paintCompositionUnderline() in terms of localSelectionRectWithClampedPositions()
309         in a subsequent patch.
310
311         We also write localSelectionRect() in terms of localSelectionRectWithClampedPositions(). Ideally
312         we would have one way to compute the selection rect. However, localSelectionRect() and paintDocumentMarker()
313         currently expect the enclosing integral rectangle of the selection rectangle. The function
314         paintDocumentMarker() needs the enclosing integral rectangle to avoid truncating the dot pattern
315         drawn under marked words (e.g. a spelling error) on Cocoa platforms. With regards to localSelectionRect()
316         we should look to have it return the actual selection rectangle. See <https://bugs.webkit.org/show_bug.cgi?id=138913>
317         for more details.
318
319         * rendering/InlineTextBox.cpp:
320         (WebCore::InlineTextBox::localSelectionRect const): Move logic in common with paintSelection() into
321         localSelectionRectWithClampedPositions() and modified code to use it.
322         (WebCore::InlineTextBox::localSelectionRectWithClampedPositions const): Added.
323         (WebCore::InlineTextBox::paint): Store the local paint offset as a LayoutPoint as it is the canonical
324         data type for representing an offset when painting. Pass the local paint offset instead of the analagous boxOrigin value.
325         (WebCore::InlineTextBox::paintSelection): Write in terms of localSelectionRectWithClampedPositions().
326         (WebCore::InlineTextBox::paintTextSubrangeBackground): Ditto.
327         (WebCore::InlineTextBox::paintCompositionBackground): Ditto.
328         (WebCore::InlineTextBox::paintTextMatchMarker): Ditto.
329         (WebCore::InlineTextBox::paintDocumentMarker): Ditto.
330         (WebCore::InlineTextBox::paintDocumentMarkers): Pass paint offset instead of the analogous boxOrigin value.
331         * rendering/InlineTextBox.h:
332
333 2017-10-19  Daniel Bates  <dabates@apple.com>
334
335         Referrer policy should be inherited from creator
336         https://bugs.webkit.org/show_bug.cgi?id=178403
337         <rdar://problem/31546136>
338
339         Reviewed by Andy Estes.
340
341         As per section Browsing contexts of the the HTML standard, <https://html.spec.whatwg.org/multipage/browsers.html>
342         (17 October 2017), the referrer policy of a document should initially be inherited from its
343         creator.
344
345         Tests: http/tests/security/referrer-policy-nested-subframe.html
346                http/tests/security/referrer-policy-nested-window-open.html
347                http/tests/security/referrer-policy-subframe-window-open.html
348                http/tests/security/referrer-policy-window-open-subframe.html
349
350         * dom/Document.cpp:
351         (WebCore::Document::initSecurityContext): Ask the loader for the effective referrer policy.
352         * loader/FrameLoader.cpp:
353         (WebCore::FrameLoader::effectiveReferrerPolicy const): Added. Returns the referrer policy
354         of the creator document. The creator document is document of the parent frame or the document
355         of the opener for a subframe or child window, respectively. If we do not have a creator frame
356         then we return the default referrer policy, non-referrer-when-downgrade, by <https://www.w3.org/TR/2017/CR-referrer-policy-20170126/#referrer-policy-empty-string>.
357         * loader/FrameLoader.h:
358
359 2017-10-19  Zalan Bujtas  <zalan@apple.com>
360
361         [FrameView::layout cleanup] Do not reenter FrameView::performPostLayoutTasks
362         https://bugs.webkit.org/show_bug.cgi?id=178518
363         <rdar://problem/35075409>
364
365         Reviewed by Antti Koivisto.
366
367         This patch tightens existing reentrancy policy on performPostLayoutTasks.
368
369         Covered by existing test cases.
370
371         * page/FrameView.cpp:
372         (WebCore::FrameView::FrameView):
373         (WebCore::FrameView::reset):
374         (WebCore::FrameView::layout):
375         (WebCore::FrameView::performPostLayoutTasks):
376         * page/FrameView.h:
377
378 2017-10-19  Chris Dumez  <cdumez@apple.com>
379
380         Unreviewed, revert r223650 as it caused crashes on the bots.
381
382         * WebCore.xcodeproj/project.pbxproj:
383         * dom/ScriptExecutionContext.h:
384         * loader/DocumentThreadableLoader.cpp:
385         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
386         * loader/FetchOptions.h:
387         * loader/ResourceLoaderOptions.h:
388         * loader/WorkerThreadableLoader.cpp:
389         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
390         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
391         * loader/WorkerThreadableLoader.h:
392         * platform/network/ResourceRequestBase.h:
393         * platform/network/ResourceResponseBase.h:
394         * workers/WorkerThread.h:
395         * workers/service/ServiceWorkerContainer.cpp:
396         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
397         * workers/service/context/SWContextManager.cpp: Copied from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.
398         (WebCore::SWContextManager::singleton):
399         (WebCore::SWContextManager::SWContextManager):
400         (WebCore::SWContextManager::startServiceWorkerContext):
401         * workers/service/context/SWContextManager.h: Renamed from Source/WebKit/WebProcess/Storage/ServiceWorkerContextManager.h.
402         * workers/service/context/ServiceWorkerThread.h:
403
404 2017-10-19  Zalan Bujtas  <zalan@apple.com>
405
406         [FrameView::layout cleanup] Replace m_nestedLayoutCount with isLayoutNested()
407         https://bugs.webkit.org/show_bug.cgi?id=178503
408         <rdar://problem/35066561>
409
410         Reviewed by Antti Koivisto.
411
412         Covered by existing tests.
413
414         * page/FrameView.cpp:
415         (WebCore::FrameView::reset):
416         (WebCore::FrameView::layout):
417         (WebCore::FrameView::updateLayerPositionsAfterScrolling):
418         (WebCore::FrameView::updateCompositingLayersAfterScrolling):
419         (WebCore::FrameView::updateEmbeddedObjects):
420         (WebCore::FrameView::flushPostLayoutTasksQueue):
421         (WebCore::FrameView::performPostLayoutTasks):
422         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
423         * page/FrameView.h:
424
425 2017-10-19  Antti Koivisto  <antti@apple.com>
426
427         Overlapping text on all CSS fonts specs
428         https://bugs.webkit.org/show_bug.cgi?id=177585
429         <rdar://problem/34704078>
430
431         Reviewed by Daniel Bates.
432
433         We were resetting StyleResolver::overrideDocumentElementStyle too early when resolving slot elements.
434         This resulted in 'rem' units being miscomputed.
435
436         Reduction by Zalan.
437
438         Test: fast/html/details-line-height-overlap.html
439
440         * style/StyleTreeResolver.cpp:
441         (WebCore::Style::TreeResolver::Scope::Scope):
442         (WebCore::Style::TreeResolver::Scope::~Scope):
443
444             Only reset overrideDocumentElementStyle when destroying the scope.
445
446         (WebCore::Style::TreeResolver::pushScope):
447         (WebCore::Style::TreeResolver::pushEnclosingScope):
448         (WebCore::Style::TreeResolver::popScope):
449
450             A scope can show up multiple times in scope stack.
451
452         * style/StyleTreeResolver.h:
453
454 2017-10-19  Ryosuke Niwa  <rniwa@webkit.org>
455
456         Consolidate calls to insertedInto and expand the coverage of NoEventDispatchAssertion
457         https://bugs.webkit.org/show_bug.cgi?id=178504
458
459         Reviewed by Antti Koivisto.
460
461         Consolidated calls to notifyChildNodeInserted, childrenChanged, didFinishInsertingNode, and
462         dispatchChildInsertionEvents for inserting a node by executeNodeInsertionWithScriptAssertion,
463         a new templatefunction which takes a closure to do the node insertion to make exactly when
464         the script becomes runnable clear.
465
466         Added an exception to SVGTRefElement::updateReferencedText since this code mutates user agent
467         shadow root during insertedInto, and turned ChildChangeSource into an enum class.
468
469         * dom/CharacterData.cpp:
470         (WebCore::CharacterData::parserAppendData):
471         (WebCore::CharacterData::setDataAndUpdate):
472         * dom/ContainerNode.cpp:
473         (WebCore::executeNodeInsertionWithScriptAssertion): Extracted.
474         (WebCore::ContainerNode::takeAllChildrenFrom): Deployed executeNodeInsertionWithScriptAssertion.
475         (WebCore::ContainerNode::insertBefore): Ditto.
476         (WebCore::ContainerNode::changeForChildInsertion): Deleted.
477         (WebCore::ContainerNode::notifyChildInserted): Deleted.
478         (WebCore::ContainerNode::parserInsertBefore): Deployed executeNodeInsertionWithScriptAssertion. 
479         (WebCore::ContainerNode::replaceChild): Ditto.
480         (WebCore::ContainerNode::removeChild):
481         (WebCore::ContainerNode::parserRemoveChild):
482         (WebCore::ContainerNode::replaceAllChildren): Ditto.
483         (WebCore::ContainerNode::removeChildren):
484         (WebCore::ContainerNode::appendChildWithoutPreInsertionValidityCheck): Ditto.
485         (WebCore::ContainerNode::parserAppendChild): Ditto.
486         (WebCore::ContainerNode::childrenChanged):
487         (WebCore::ContainerNode::updateTreeAfterInsertion): Deleted.
488         * dom/ContainerNode.h:
489         * dom/Element.cpp:
490         (WebCore::Element::childrenChanged):
491         * html/HTMLOutputElement.cpp:
492         (WebCore::HTMLOutputElement::childrenChanged):
493         * svg/SVGClipPathElement.cpp:
494         (WebCore::SVGClipPathElement::childrenChanged):
495         * svg/SVGElement.cpp:
496         (WebCore::SVGElement::childrenChanged):
497         * svg/SVGFELightElement.cpp:
498         (WebCore::SVGFELightElement::childrenChanged):
499         * svg/SVGFilterElement.cpp:
500         (WebCore::SVGFilterElement::childrenChanged):
501         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
502         (WebCore::SVGFilterPrimitiveStandardAttributes::childrenChanged):
503         * svg/SVGGradientElement.cpp:
504         (WebCore::SVGGradientElement::childrenChanged):
505         * svg/SVGMarkerElement.cpp:
506         (WebCore::SVGMarkerElement::childrenChanged):
507         * svg/SVGMaskElement.cpp:
508         (WebCore::SVGMaskElement::childrenChanged):
509         * svg/SVGPatternElement.cpp:
510         (WebCore::SVGPatternElement::childrenChanged):
511         * svg/SVGTRefElement.cpp:
512         (WebCore::SVGTRefElement::updateReferencedText): Allow DOM mutations inside the user agent shadow tree here.
513
514 2017-10-19  Ryosuke Niwa  <rniwa@webkit.org>
515
516         Add an argument indicating the type of removal to Node::removedFrom
517         https://bugs.webkit.org/show_bug.cgi?id=178505
518
519         Reviewed by Antti Koivisto.
520
521         Like r223628, added RemovalType as the first argument to Node::removedFrom, which contains two booleans indicating
522         whether the node just become disconnected from a document, and whether node's tree scope had changed or not.
523
524         These boolean flags simplifies the logic in removedFrom implementations, and are required to have a better
525         guarantee about the correctness of node flags during calls to removedFrom. Right now, Node::isConnected() and
526         Node::isInShadowTree() are both outdated until Node::removedFrom is called.
527
528         Also renamed the second argument of removedFrom to parentOfRemovedTree to make the semantics clear.
529
530         Note that in some implementations of removedFrom, we check whether isConnected() was true to decide whether
531         the node had already been disconnected from a document prior to calls to this particular call of removedFrom.
532         This extra check is no longer necessary since no node will be removed from a document without first being inserted
533         completely somewhere after r223458.
534
535         No new tests since there should be no behavioral changes.
536
537         * dom/ContainerNodeAlgorithms.cpp:
538         (WebCore::notifyNodeInsertedIntoDocument): Replaced RELEASE_ASSERT with RELEASE_ASSERT_WITH_SECURITY_IMPLICATION.
539         (WebCore::notifyNodeRemovedFromDocument): Replaced the check that the node had not been re-connected by scripts
540         by a release assert now that we believe we've eliminated all causes of these unwanted DOM mutations in r223458.
541         Also moved the code to call setCSSTarget to Element::removedFrom. This random call to setCSSTarget predates r114351,
542         as well as r40475. It was originally introduced by r29311 into Node::removedFromDocument() ten years ago.
543         (WebCore::notifyNodeRemovedFromTree): Moved NoEventDispatchAssertion to notifyChildNodeRemoved.
544         (WebCore::notifyChildNodeRemoved): Added NoEventDispatchAssertion.
545         * dom/ContainerNodeAlgorithms.h:
546         * dom/Element.cpp:
547         (WebCore::Element::removedFrom): Replaced the complicated code to detect when this element is removed from a document
548         and its tree scope had changed by removalType.disconnectedFromDocument and removalType.treeScopeChanged.
549         * dom/Element.h:
550         * dom/Node.cpp:
551         (WebCore::Node::removedFrom):
552         * dom/Node.h: Replaced a long block of comments above insertedInto by two lines of concise comments now that
553         the semantics of insertedInto and didFinishInsertingNode are more clear, and enforced by assertions.
554         (WebCore::Node::RemovalType::RemovalType): Addedl
555         * dom/ProcessingInstruction.cpp:
556         (WebCore::ProcessingInstruction::removedFrom):
557         * dom/ProcessingInstruction.h:
558         * dom/ShadowRoot.cpp:
559         (WebCore::ShadowRoot::removedFrom): The extra !isConnected() check is no longer needed. See the description above.
560         * dom/ShadowRoot.h:
561         * html/FormAssociatedElement.cpp:
562         (WebCore::FormAssociatedElement::removedFrom):
563         * html/FormAssociatedElement.h:
564         * html/HTMLBaseElement.cpp:
565         (WebCore::HTMLBaseElement::removedFrom):
566         * html/HTMLBaseElement.h:
567         * html/HTMLFormControlElement.cpp:
568         (WebCore::HTMLFormControlElement::removedFrom):
569         * html/HTMLFormControlElement.h:
570         * html/HTMLFormControlElementWithState.cpp:
571         (WebCore::HTMLFormControlElementWithState::removedFrom):
572         * html/HTMLFormControlElementWithState.h:
573         * html/HTMLFormElement.cpp:
574         (WebCore::HTMLFormElement::removedFrom):
575         * html/HTMLFormElement.h:
576         * html/HTMLFrameSetElement.cpp:
577         (WebCore::HTMLFrameSetElement::removedFrom):
578         * html/HTMLFrameSetElement.h:
579         * html/HTMLImageElement.cpp:
580         (WebCore::HTMLImageElement::removedFrom):
581         * html/HTMLImageElement.h:
582         * html/HTMLInputElement.cpp:
583         (WebCore::HTMLInputElement::removedFrom):
584         * html/HTMLInputElement.h:
585         * html/HTMLLinkElement.cpp:
586         (WebCore::HTMLLinkElement::removedFrom): The extra !isConnected() check is no longer needed. See above.
587         * html/HTMLLinkElement.h:
588         * html/HTMLMapElement.cpp:
589         (WebCore::HTMLMapElement::removedFrom):
590         * html/HTMLMapElement.h:
591         * html/HTMLMediaElement.cpp:
592         (WebCore::HTMLMediaElement::removedFrom):
593         * html/HTMLMediaElement.h:
594         * html/HTMLObjectElement.cpp:
595         (WebCore::HTMLObjectElement::removedFrom):
596         * html/HTMLObjectElement.h:
597         * html/HTMLSlotElement.cpp:
598         (WebCore::HTMLSlotElement::removedFrom): Simplifies the logic to detect when this slot element is being
599         removed from a shadow tree using removalType.treeScopeChanged.
600         * html/HTMLSlotElement.h:
601         * html/HTMLSourceElement.cpp:
602         (WebCore::HTMLSourceElement::insertedInto): Added a FIXME for an obvious bug.
603         (WebCore::HTMLSourceElement::removedFrom): Ditto.
604         * html/HTMLSourceElement.h:
605         * html/HTMLStyleElement.cpp:
606         (WebCore::HTMLStyleElement::removedFrom):
607         * html/HTMLStyleElement.h:
608         * html/HTMLTitleElement.cpp:
609         (WebCore::HTMLTitleElement::removedFrom):
610         * html/HTMLTitleElement.h:
611         * html/HTMLTrackElement.cpp:
612         (WebCore::HTMLTrackElement::removedFrom): Ditto.
613         * html/HTMLTrackElement.h:
614         * svg/SVGElement.cpp:
615         (WebCore::SVGElement::removedFrom): Replaced isConnected() check before calling Node::removedFrom by the check of
616         removalType.disconnectedFromDocument.
617         * svg/SVGElement.h:
618         * svg/SVGFEImageElement.cpp:
619         (WebCore::SVGFEImageElement::removedFrom):
620         * svg/SVGFEImageElement.h:
621         * svg/SVGFontFaceElement.cpp:
622         (WebCore::SVGFontFaceElement::removedFrom):
623         * svg/SVGFontFaceElement.h:
624         * svg/SVGMPathElement.cpp:
625         (WebCore::SVGMPathElement::removedFrom):
626         * svg/SVGMPathElement.h:
627         * svg/SVGPathElement.cpp:
628         (WebCore::SVGPathElement::removedFrom):
629         * svg/SVGPathElement.h:
630         * svg/SVGSVGElement.cpp:
631         (WebCore::SVGSVGElement::removedFrom):
632         * svg/SVGSVGElement.h:
633         * svg/SVGStyleElement.cpp:
634         (WebCore::SVGStyleElement::removedFrom): The extra !isConnected() check is no longer needed. See above.
635         * svg/SVGStyleElement.h:
636         * svg/SVGTRefElement.cpp:
637         (WebCore::SVGTRefElement::removedFrom):
638         * svg/SVGTRefElement.h:
639         * svg/SVGTextPathElement.cpp:
640         (WebCore::SVGTextPathElement::removedFrom):
641         * svg/SVGTextPathElement.h:
642         * svg/SVGTitleElement.cpp:
643         (WebCore::SVGTitleElement::removedFrom):
644         * svg/SVGTitleElement.h:
645         * svg/SVGUseElement.cpp:
646         (WebCore::SVGUseElement::removedFrom):
647         * svg/SVGUseElement.h:
648         * svg/animation/SVGSMILElement.cpp:
649         (WebCore::SVGSMILElement::removedFrom):
650         * svg/animation/SVGSMILElement.h:
651
652 2017-10-19  Ms2ger  <Ms2ger@igalia.com>
653
654         Update the signatures of compressedTexSubImage3D.
655         https://bugs.webkit.org/show_bug.cgi?id=178507
656
657         Reviewed by Ryosuke Niwa.
658
659         No new tests: not much point in adding tests now; this method doesn't
660         do anything anyway.
661
662         * html/canvas/WebGL2RenderingContext.cpp:
663         (WebCore::WebGL2RenderingContext::compressedTexSubImage3D):
664         * html/canvas/WebGL2RenderingContext.h:
665         * html/canvas/WebGL2RenderingContext.idl:
666
667 2017-10-19  Basuke Suzuki  <Basuke.Suzuki@sony.com>
668
669         [curl] Segfault in WebCore::CurlRequest::setupPOST
670         https://bugs.webkit.org/show_bug.cgi?id=178434
671
672         Reviewed by Ryosuke Niwa.
673
674         * platform/network/curl/CurlRequest.cpp:
675         (WebCore::CurlRequest::resolveBlobReferences):
676         (WebCore::CurlRequest::setupPOST):
677
678 2017-10-18  Ryosuke Niwa  <rniwa@webkit.org>
679
680         Don't expose raw HTML in pasteboard to the web content
681         https://bugs.webkit.org/show_bug.cgi?id=178422
682         <rdar://problem/34567052>
683
684         Reviewed by Wenson Hsieh.
685
686         This patch enables HTML sanitization added in r223440 when WebKit pastes & concludes edit drag as opposed to
687         just when dataTransfer.get is used. This is important to avoid leaking privacy sensitive information such as
688         local file paths and pasting potentially harmful content such as scripts in event handler serialized by
689         WebKit prior to r223462. In addition, we start using blob URLs in the pasted content instead of retaining
690         the original URL and overriding the document loader like r222839 for RTFD and r222119 for image files.
691
692         To do this, a new superclass FrameWebContentReader of PasteboardWebContentReader and WebContentMarkupReader
693         is introduced, and helper functions are extracted out of WebContentMarkupReader in WebContentReaderCocoa.mm
694         to be also used in WebContentReader.
695
696         Tests: http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-across-origin.html
697                http/tests/security/clipboard/copy-paste-html-cross-origin-iframe-in-same-origin.html
698                http/tests/security/clipboard/drag-drop-html-cross-origin-iframe-in-same-origin.html
699                PasteWebArchive.SanitizesHTML
700
701         * editing/WebContentReader.cpp:
702         (WebCore::FrameWebContentReader::shouldSanitize const): Moved from WebContentMarkupReader.
703         * editing/WebContentReader.h:
704         (WebCore::FrameWebContentReader): Added to share code between WebContentReader and WebContentMarkupReader.
705         (WebCore::FrameWebContentReader::FrameWebContentReader): Added.
706         * editing/cocoa/EditorCocoa.mm:
707         (WebCore::Editor::writeSelectionToPasteboard): Store the content's origin in the pasteboard so that we can
708         avoid sanitizing the content when pasting into the same document. This is important since converting all URLs
709         into blob URLs would break editors on the Web which tracks images, etc... in the content using URLs.
710         (WebCore::Editor::writeSelection): Ditto.
711         * editing/cocoa/WebContentReaderCocoa.mm:
712         (WebCore::MarkupAndArchive): Replaced FragmentAndArchive. Now returns the markup string in the archive
713         instead of the parsed fragment.
714         (WebCore::extractMarkupAndArchive): Renamed from createFragmentFromWebArchive. Now returns the markup string.
715         (WebCore::sanitizeMarkupWithArchive): Extracted out of WebContentMarkupReader::readWebArchive to share code
716         between WebContentReader and WebContentMarkupReader, and added the code to handle subframes recursively.
717         As inefficient as this code is, we can't delay the conversion of subframes' marksup until later time since
718         the main frame's markup would contain blob URLs to refer to those subframes. 
719         (WebCore::WebContentReader::readWebArchive): Use sanitizeMarkupWithArchive when shouldSanitize() is true.
720         Don't add the subresources to the document loader when the content will be loaded into the same origin since
721         subresouces are mostly likely available in the document anyway.
722         (WebCore::WebContentMarkupReader::readWebArchive):
723         * platform/Pasteboard.h:
724         (WebCore::PasteboardWebContent): Added contentOrigin.
725         * platform/PasteboardWriterData.h:
726         (WebCore::PasteboardWriterData): Ditto.
727         * platform/ios/PasteboardIOS.mm:
728         (WebCore::Pasteboard::read): Read the origin before branching out to readRespectingUTIFidelities.
729         * platform/ios/PlatformPasteboardIOS.mm:
730         (WebCore::PlatformPasteboard::write): Record the content origin into the pasteboard.
731         * platform/mac/PasteboardMac.mm:
732         (WebCore::Pasteboard::write): Ditto.
733         * platform/mac/PasteboardWriter.mm:
734         (WebCore::createPasteboardWriter): Ditto.
735
736 2017-10-18  Sam Weinig  <sam@webkit.org>
737
738         Another attempt to fix the windows build.
739
740         * page/SettingsBase.cpp:
741         (WebCore::SettingsBase::resourceUsageOverlayVisibleChanged):
742         * page/SettingsBase.h:
743
744 2017-10-18  Sam Weinig  <sam@webkit.org>
745
746         Attempt to fix the windows build.
747
748         * page/SettingsBase.cpp:
749         (WebCore::SettingsBase::resourceUsageOverlayVisibleChanged):
750         * page/SettingsBase.h:
751
752 2017-10-18  Sam Weinig  <sam@webkit.org>
753
754         [Settings] Convert more settings to be generated
755         https://bugs.webkit.org/show_bug.cgi?id=177766
756
757         Reviewed by Dean Jackson.
758
759         - Replaces setNeedsStyleRecalcInAllFrames option in Settings.in
760           with a more generic, onChange, which allows you to specify a function
761           in SettingsBase that will be called when the setting changes. 
762           setNeedsStyleRecalcInAllFrames is then reimplemented in terms of
763           onChange.
764         - Moves most (all but two) of the remaining non-static settings from
765           SettingsBase to Settings.in
766
767         * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:
768         (printSetterBody):
769         * Scripts/GenerateSettings/Settings.py:
770         (Setting.__init__):
771         (Setting.__str__):
772         (Setting.typeIsValueType):
773         (Setting.setterFunctionName):
774         (Setting.setterChangeFunctionName):
775         (Setting.hasComplexSetter):
776         (parseInput):
777         
778             Add support for the onChange option.
779         
780         * page/Settings.in:
781
782             Migrate most of the remaining non-static settings to Settings.in.
783             Adopt onChange option.
784
785         * page/SettingsBase.cpp:
786         * page/SettingsBase.h:
787
788             Add helper functions for use by the onChange option.
789
790 2017-10-18  Chris Dumez  <cdumez@apple.com>
791
792         Implement ServiceWorkerRegistration.scope / updateViaCache
793         https://bugs.webkit.org/show_bug.cgi?id=178497
794
795         Reviewed by Youenn Fablet.
796
797         Implement ServiceWorkerRegistration.scope / updateViaCache.
798
799         No new tests, updated existing test.
800
801         * WebCore.xcodeproj/project.pbxproj:
802         * workers/service/ServiceWorkerContainer.cpp:
803         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
804         * workers/service/ServiceWorkerContainer.h:
805         * workers/service/ServiceWorkerJob.cpp:
806         (WebCore::ServiceWorkerJob::resolvedWithRegistration):
807         * workers/service/ServiceWorkerJob.h:
808         * workers/service/ServiceWorkerJobClient.h:
809         * workers/service/ServiceWorkerRegistration.cpp:
810         (WebCore::ServiceWorkerRegistration::ServiceWorkerRegistration):
811         (WebCore::ServiceWorkerRegistration::scope const):
812         (WebCore::ServiceWorkerRegistration::updateViaCache const):
813         (WebCore::ServiceWorkerRegistration::update):
814         (WebCore::ServiceWorkerRegistration::unregister):
815         (WebCore::ServiceWorkerRegistration::scriptExecutionContext const):
816         (WebCore::ServiceWorkerRegistration::activeDOMObjectName const):
817         (WebCore::ServiceWorkerRegistration::canSuspendForDocumentSuspension const):
818         * workers/service/ServiceWorkerRegistration.h:
819         * workers/service/ServiceWorkerRegistration.idl:
820         * workers/service/ServiceWorkerRegistrationData.cpp:
821         (WebCore::ServiceWorkerRegistrationData::isolatedCopy const):
822         * workers/service/ServiceWorkerRegistrationData.h:
823         (WebCore::ServiceWorkerRegistrationData::encode const):
824         (WebCore::ServiceWorkerRegistrationData::decode):
825         * workers/service/server/SWClientConnection.cpp:
826         (WebCore::SWClientConnection::jobResolvedInServer):
827         * workers/service/server/SWClientConnection.h:
828         * workers/service/server/SWServerRegistration.cpp:
829         (WebCore::SWServerRegistration::scriptContextStarted):
830         (WebCore::SWServerRegistration::data const):
831
832 2017-10-18  Youenn Fablet  <youenn@apple.com>
833
834         Add preliminary support for ServiceWorker Handle Fetch
835         https://bugs.webkit.org/show_bug.cgi?id=178475
836
837         Reviewed by Chris Dumez.
838
839         Test: http/tests/workers/service/basic-fetch.https.html
840
841         Adding parameters to allow WebKit to do loading through Service Worker or through regular networking.
842         A script context is now storing its selected service worker identifier. This should be fully implemented later on.
843         This selected service worker identifier is passed to loading code as a ResourceLoaderOptions field.
844         Service workers mode is also added as a ResourceLoaderOptions field so that the service worker can be bypassed.
845
846         * WebCore.xcodeproj/project.pbxproj:
847         * dom/ScriptExecutionContext.h:
848         (WebCore::ScriptExecutionContext::selectedServiceWorkerIdentifier const):
849         (WebCore::ScriptExecutionContext::setSelectedServiceWorkerIdentifier):
850         * loader/DocumentThreadableLoader.cpp:
851         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
852         * loader/FetchOptions.h:
853         (WebCore::isPotentialNavigationOrSubresourceRequest):
854         (WebCore::isNonSubresourceRequest):
855         * loader/ResourceLoaderOptions.h:
856         * loader/WorkerThreadableLoader.cpp:
857         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
858         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
859         * loader/WorkerThreadableLoader.h:
860         * platform/network/ResourceRequestBase.h:
861         * platform/network/ResourceResponseBase.h:
862         * workers/WorkerThread.h:
863         * workers/service/ServiceWorkerContainer.cpp:
864         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
865         * workers/service/ServiceWorkerProvider.h:
866         * workers/service/context/SWContextManager.cpp: Removed.
867         * workers/service/context/ServiceWorkerThread.h:
868         * workers/service/server/SWServer.h:
869
870 2017-10-18  Zalan Bujtas  <zalan@apple.com>
871
872         [FrameView::layout cleanup] Group related pre-layout code to improve readability
873         https://bugs.webkit.org/show_bug.cgi?id=178496
874         <rdar://problem/35065718>
875
876         Reviewed by Simon Fraser.
877
878         Early returns/asserts/member variable resets etc.
879
880         Covered by existing tests.
881
882         * page/FrameView.cpp:
883         (WebCore::FrameView::layout):
884
885 2017-10-17  Jiewen Tan  <jiewen_tan@apple.com>
886
887         Replace some stack raw pointers with RefPtrs within WebCore/html
888         https://bugs.webkit.org/show_bug.cgi?id=178201
889         <rdar://problem/34841692>
890
891         Reviewed by Ryosuke Niwa.
892
893         This is an effort to reduce raw pointer usage in DOM code. In this patch, raw pointers
894         that are ref countable are blindly selected to be replaced with RefPtrs with one exception
895         which is auto*.
896
897         Also, this patch occasionally modifies the return type of some methods, and therefore callers
898         of those methods are modified accordingly.
899
900         * Modules/encryptedmedia/legacy/LegacyCDM.cpp:
901         (WebCore::LegacyCDM::mediaPlayer const):
902         * Modules/encryptedmedia/legacy/LegacyCDM.h:
903         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:
904         (WebCore::CDMPrivateMediaPlayer::createSession):
905         * Modules/encryptedmedia/legacy/WebKitMediaKeys.cpp:
906         (WebCore::WebKitMediaKeys::cdmMediaPlayer const):
907         * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
908         * Modules/mediacontrols/MediaControlsHost.cpp:
909         (WebCore::MediaControlsHost::externalDeviceDisplayName const):
910         (WebCore::MediaControlsHost::externalDeviceType const):
911         * dom/Element.cpp:
912         (WebCore::Element::focusDelegate):
913         (WebCore::Element::userAgentShadowRoot const):
914         (WebCore::Element::ensureUserAgentShadowRoot):
915         * dom/Element.h:
916         * dom/EventContext.cpp:
917         (WebCore::TouchEventContext::checkReachability const):
918         * dom/EventPath.cpp:
919         (WebCore::shouldEventCrossShadowBoundary):
920         (WebCore::EventPath::setRelatedTarget):
921         (WebCore::EventPath::retargetTouch):
922         (WebCore:: const):
923         * dom/EventTarget.cpp:
924         (WebCore::EventTarget::toNode):
925         (WebCore::EventTarget::addEventListener):
926         * dom/EventTarget.h:
927         * dom/MouseEvent.cpp:
928         (WebCore::MouseEvent::toElement const):
929         (WebCore::MouseEvent::fromElement const):
930         * dom/MouseEvent.h:
931         * dom/MouseRelatedEvent.cpp:
932         (WebCore::MouseRelatedEvent::computeRelativePosition):
933         * dom/Node.cpp:
934         (WebCore::Node::toNode):
935         * dom/Node.h:
936         * dom/ScopedEventQueue.cpp:
937         * editing/Editor.cpp:
938         (WebCore::Editor::selectionForCommand):
939         * editing/EditorCommand.cpp:
940         (WebCore::targetFrame):
941         * editing/TextIterator.cpp:
942         (WebCore::TextIterator::handleReplacedElement):
943         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
944         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance):
945         * html/ColorInputType.cpp:
946         (WebCore::ColorInputType::updateColorSwatch):
947         (WebCore::ColorInputType::shadowColorSwatch const):
948         * html/FileInputType.cpp:
949         (WebCore::FileInputType::disabledAttributeChanged):
950         (WebCore::FileInputType::multipleAttributeChanged):
951         * html/FormAssociatedElement.cpp:
952         (WebCore::FormAssociatedElement::findAssociatedForm):
953         (WebCore::FormAssociatedElement::formOwnerRemovedFromTree):
954         (WebCore::FormAssociatedElement::resetFormOwner):
955         (WebCore::FormAssociatedElement::formAttributeChanged):
956         * html/FormController.cpp:
957         (WebCore::recordFormStructure):
958         (WebCore::FormKeyGenerator::formKey):
959         (WebCore::FormController::restoreControlStateIn):
960         * html/HTMLAnchorElement.cpp:
961         (WebCore::appendServerMapMousePosition):
962         (WebCore::HTMLAnchorElement::handleClick):
963         * html/HTMLAppletElement.cpp:
964         (WebCore::HTMLAppletElement::updateWidget):
965         * html/HTMLAreaElement.cpp:
966         (WebCore::HTMLAreaElement::imageElement const):
967         (WebCore::HTMLAreaElement::isFocusable const):
968         (WebCore::HTMLAreaElement::setFocus):
969         (WebCore::HTMLAreaElement::updateFocusAppearance):
970         * html/HTMLBodyElement.cpp:
971         (WebCore::HTMLBodyElement::scrollLeft):
972         (WebCore::HTMLBodyElement::setScrollLeft):
973         (WebCore::HTMLBodyElement::scrollTop):
974         (WebCore::HTMLBodyElement::setScrollTop):
975         (WebCore::HTMLBodyElement::scrollHeight):
976         (WebCore::HTMLBodyElement::scrollWidth):
977         * html/HTMLCanvasElement.cpp:
978         (WebCore::HTMLCanvasElement::createElementRenderer):
979         (WebCore:: const):
980         * html/HTMLDocument.cpp:
981         (WebCore::HTMLDocument::width):
982         (WebCore::HTMLDocument::height):
983         * html/HTMLElement.cpp:
984         (WebCore::HTMLElement::rendererIsNeeded):
985         (WebCore::setHasDirAutoFlagRecursively):
986         (WebCore::HTMLElement::directionality const):
987         (WebCore::HTMLElement::dirAttributeChanged):
988         (WebCore::HTMLElement::adjustDirectionalityIfNeededAfterChildrenChanged):
989         * html/HTMLEmbedElement.cpp:
990         (WebCore::HTMLEmbedElement::renderWidgetLoadingPlugin const):
991         (WebCore::HTMLEmbedElement::rendererIsNeeded):
992         * html/HTMLFieldSetElement.cpp:
993         (WebCore::updateFromControlElementsAncestorDisabledStateUnder):
994         (WebCore::HTMLFieldSetElement::disabledStateChanged):
995         (WebCore::HTMLFieldSetElement::childrenChanged):
996         * html/HTMLFormControlElement.cpp:
997         (WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor const):
998         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
999         (WebCore::HTMLFormControlElement::didChangeForm):
1000         (WebCore::HTMLFormControlElement::shouldAutocorrect const):
1001         (WebCore::HTMLFormControlElement::autocapitalizeType const):
1002         * html/HTMLFormElement.cpp:
1003         (WebCore::HTMLFormElement::handleLocalEvents):
1004         (WebCore::submitElementFromEvent):
1005         (WebCore::HTMLFormElement::prepareForSubmission):
1006         (WebCore::HTMLFormElement::submit):
1007         (WebCore::HTMLFormElement::reset):
1008         (WebCore::HTMLFormElement::shouldAutocorrect const):
1009         (WebCore::HTMLFormElement::parseAttribute):
1010         (WebCore::HTMLFormElement::resetDefaultButton):
1011         (WebCore::HTMLFormElement::elementFromPastNamesMap const):
1012         (WebCore::HTMLFormElement::namedElements):
1013         * html/HTMLFormElement.h:
1014         * html/HTMLFrameElement.cpp:
1015         (WebCore::HTMLFrameElement::didAttachRenderers):
1016         * html/HTMLFrameElementBase.cpp:
1017         (WebCore::HTMLFrameElementBase::isURLAllowed const):
1018         (WebCore::HTMLFrameElementBase::openURL):
1019         (WebCore::HTMLFrameElementBase::didAttachRenderers):
1020         * html/HTMLFrameOwnerElement.cpp:
1021         (WebCore::HTMLFrameOwnerElement::setContentFrame):
1022         (WebCore::HTMLFrameOwnerElement::clearContentFrame):
1023         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame):
1024         (WebCore::SubframeLoadingDisabler::canLoadFrame):
1025         * html/HTMLFrameSetElement.cpp:
1026         (WebCore::HTMLFrameSetElement::findContaining):
1027         (WebCore::HTMLFrameSetElement::willAttachRenderers):
1028         (WebCore::HTMLFrameSetElement::insertedInto):
1029         (WebCore::HTMLFrameSetElement::removedFrom):
1030         * html/HTMLFrameSetElement.h:
1031         * html/HTMLImageElement.cpp:
1032         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
1033         (WebCore::HTMLImageElement::pictureElement const):
1034         (WebCore::HTMLImageElement::destroyImageControls):
1035         (WebCore::HTMLImageElement::hasImageControls const):
1036         * html/HTMLInputElement.cpp:
1037         (WebCore::HTMLInputElement::innerTextElement const):
1038         (WebCore::HTMLInputElement::endEditing):
1039         (WebCore::HTMLInputElement::dataList const):
1040         (WebCore::HTMLInputElement::resetListAttributeTargetObserver): Deleted.
1041         (WebCore::HTMLInputElement::listAttributeTargetChanged): Deleted.
1042         (WebCore::HTMLInputElement::isSteppable const): Deleted.
1043         (WebCore::HTMLInputElement::dateType const): Deleted.
1044         (WebCore::HTMLInputElement::isTextButton const): Deleted.
1045         (WebCore::HTMLInputElement::isRadioButton const): Deleted.
1046         (WebCore::HTMLInputElement::isSearchField const): Deleted.
1047         (WebCore::HTMLInputElement::isInputTypeHidden const): Deleted.
1048         (WebCore::HTMLInputElement::isPasswordField const): Deleted.
1049         (WebCore::HTMLInputElement::isCheckbox const): Deleted.
1050         (WebCore::HTMLInputElement::isRangeControl const): Deleted.
1051         (WebCore::HTMLInputElement::isColorControl const): Deleted.
1052         (WebCore::HTMLInputElement::isText const): Deleted.
1053         (WebCore::HTMLInputElement::isEmailField const): Deleted.
1054         (WebCore::HTMLInputElement::isFileUpload const): Deleted.
1055         (WebCore::HTMLInputElement::isImageButton const): Deleted.
1056         (WebCore::HTMLInputElement::isNumberField const): Deleted.
1057         (WebCore::HTMLInputElement::isSubmitButton const): Deleted.
1058         (WebCore::HTMLInputElement::isTelephoneField const): Deleted.
1059         (WebCore::HTMLInputElement::isURLField const): Deleted.
1060         (WebCore::HTMLInputElement::isDateField const): Deleted.
1061         (WebCore::HTMLInputElement::isDateTimeField const): Deleted.
1062         (WebCore::HTMLInputElement::isDateTimeLocalField const): Deleted.
1063         (WebCore::HTMLInputElement::isMonthField const): Deleted.
1064         (WebCore::HTMLInputElement::isTimeField const): Deleted.
1065         (WebCore::HTMLInputElement::isWeekField const): Deleted.
1066         (WebCore::HTMLInputElement::isEnumeratable const): Deleted.
1067         (WebCore::HTMLInputElement::supportLabels const): Deleted.
1068         (WebCore::HTMLInputElement::shouldAppearChecked const): Deleted.
1069         (WebCore::HTMLInputElement::supportsPlaceholder const): Deleted.
1070         (WebCore::HTMLInputElement::updatePlaceholderText): Deleted.
1071         (WebCore::HTMLInputElement::isEmptyValue const): Deleted.
1072         (WebCore::HTMLInputElement::maxLengthAttributeChanged): Deleted.
1073         (WebCore::HTMLInputElement::minLengthAttributeChanged): Deleted.
1074         (WebCore::HTMLInputElement::updateValueIfNeeded): Deleted.
1075         (WebCore::HTMLInputElement::defaultToolTip const): Deleted.
1076         (WebCore::HTMLInputElement::matchesIndeterminatePseudoClass const): Deleted.
1077         (WebCore::HTMLInputElement::shouldAppearIndeterminate const): Deleted.
1078         (WebCore::HTMLInputElement::mediaCaptureType const): Deleted.
1079         (WebCore::HTMLInputElement::isInRequiredRadioButtonGroup): Deleted.
1080         (WebCore:: const): Deleted.
1081         (WebCore::HTMLInputElement::checkedRadioButtonForGroup const): Deleted.
1082         (WebCore::HTMLInputElement::radioButtonGroups const): Deleted.
1083         (WebCore::HTMLInputElement::addToRadioButtonGroup): Deleted.
1084         (WebCore::HTMLInputElement::removeFromRadioButtonGroup): Deleted.
1085         (WebCore::HTMLInputElement::height const): Deleted.
1086         (WebCore::HTMLInputElement::width const): Deleted.
1087         (WebCore::HTMLInputElement::setHeight): Deleted.
1088         (WebCore::HTMLInputElement::setWidth): Deleted.
1089         (WebCore::ListAttributeTargetObserver::ListAttributeTargetObserver): Deleted.
1090         (WebCore::ListAttributeTargetObserver::idTargetChanged): Deleted.
1091         (WebCore::HTMLInputElement::setRangeText): Deleted.
1092         (WebCore::HTMLInputElement::shouldTruncateText const): Deleted.
1093         (WebCore::HTMLInputElement::selectionStartForBindings const): Deleted.
1094         (WebCore::HTMLInputElement::setSelectionStartForBindings): Deleted.
1095         (WebCore::HTMLInputElement::selectionEndForBindings const): Deleted.
1096         (WebCore::HTMLInputElement::setSelectionEndForBindings): Deleted.
1097         (WebCore::HTMLInputElement::selectionDirectionForBindings const): Deleted.
1098         (WebCore::HTMLInputElement::setSelectionDirectionForBindings): Deleted.
1099         (WebCore::HTMLInputElement::setSelectionRangeForBindings): Deleted.
1100         (WebCore::HTMLInputElement::createInnerTextStyle const): Deleted.
1101         (WebCore::HTMLInputElement::setupDateTimeChooserParameters): Deleted.
1102         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged): Deleted.
1103         * html/HTMLInputElement.h:
1104         * html/HTMLKeygenElement.cpp:
1105         (WebCore::HTMLKeygenElement::shadowSelect const):
1106         * html/HTMLLabelElement.cpp:
1107         (WebCore::HTMLLabelElement::defaultEventHandler):
1108         * html/HTMLLinkElement.cpp:
1109         (WebCore::HTMLLinkElement::handleClick):
1110         * html/HTMLMapElement.cpp:
1111         (WebCore::HTMLMapElement::mapMouseEvent):
1112         * html/HTMLMediaElement.cpp:
1113         (WebCore::HTMLMediaElement::selectMediaResource):
1114         (WebCore::HTMLMediaElement::loadResource):
1115         (WebCore::HTMLMediaElement::updateActiveTextTrackCues):
1116         (WebCore::HTMLMediaElement::isSafeToLoadURL):
1117         (WebCore::HTMLMediaElement::controls const):
1118         (WebCore::HTMLMediaElement::layoutSizeChanged):
1119         (WebCore::HTMLMediaElement::enterFullscreen):
1120         (WebCore::HTMLMediaElement::mediaControls const):
1121         (WebCore::HTMLMediaElement::hasMediaControls const):
1122         (WebCore::HTMLMediaElement::mediaPlayerReferrer const):
1123         (WebCore::HTMLMediaElement::mediaPlayerUserAgent const):
1124         (WebCore::HTMLMediaElement::mediaPlayerShouldWaitForResponseToAuthenticationChallenge):
1125         (WebCore::HTMLMediaElement::sourceApplicationIdentifier const):
1126         (WebCore::HTMLMediaElement::getVideoPlaybackQuality):
1127         (WebCore::HTMLMediaElement::session const):
1128         * html/HTMLMediaElement.h:
1129         (WebCore::HTMLMediaElement::player const):
1130         * html/HTMLObjectElement.cpp:
1131         (WebCore::HTMLObjectElement::hasFallbackContent const):
1132         * html/HTMLOptGroupElement.cpp:
1133         (WebCore::HTMLOptGroupElement::ownerSelectElement const):
1134         (WebCore::HTMLOptGroupElement::accessKeyAction):
1135         * html/HTMLOptionElement.cpp:
1136         (WebCore::HTMLOptionElement::setText):
1137         (WebCore::HTMLOptionElement::accessKeyAction):
1138         (WebCore::HTMLOptionElement::index const):
1139         (WebCore::HTMLOptionElement::parseAttribute):
1140         (WebCore::HTMLOptionElement::selected):
1141         (WebCore::HTMLOptionElement::setSelected):
1142         (WebCore::HTMLOptionElement::setSelectedState):
1143         (WebCore::HTMLOptionElement::childrenChanged):
1144         (WebCore::HTMLOptionElement::ownerDataListElement const):
1145         (WebCore::HTMLOptionElement::ownerSelectElement const):
1146         (WebCore::HTMLOptionElement::textIndentedToRespectGroupLabel const):
1147         (WebCore::HTMLOptionElement::insertedInto):
1148         (WebCore::HTMLOptionElement::collectOptionInnerText const):
1149         * html/HTMLPlugInElement.cpp:
1150         (WebCore::HTMLPlugInElement::willDetachRenderers):
1151         (WebCore::HTMLPlugInElement::isKeyboardFocusable const):
1152         (WebCore::HTMLPlugInElement::isUserObservable const):
1153         * html/HTMLPlugInImageElement.cpp:
1154         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay const):
1155         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
1156         * html/HTMLSelectElement.cpp:
1157         (WebCore::HTMLSelectElement::add):
1158         (WebCore::HTMLSelectElement::recalcListItems const):
1159         (WebCore::HTMLSelectElement::selectOption):
1160         (WebCore::HTMLSelectElement::reset):
1161         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
1162         * html/HTMLSlotElement.cpp:
1163         (WebCore::flattenAssignedNodes):
1164         * html/HTMLSourceElement.cpp:
1165         (WebCore::HTMLSourceElement::removedFrom):
1166         * html/HTMLSummaryElement.cpp:
1167         (WebCore::HTMLSummaryElement::isActiveSummary const):
1168         (WebCore::isClickableControl):
1169         (WebCore::HTMLSummaryElement::defaultEventHandler):
1170         * html/HTMLTableCellElement.cpp:
1171         (WebCore::HTMLTableCellElement::additionalPresentationAttributeStyle const):
1172         * html/HTMLTableColElement.cpp:
1173         (WebCore::HTMLTableColElement::additionalPresentationAttributeStyle const):
1174         * html/HTMLTableElement.cpp:
1175         (WebCore::HTMLTableElement::tHead const):
1176         (WebCore::HTMLTableElement::setTHead):
1177         (WebCore::HTMLTableElement::tFoot const):
1178         (WebCore::HTMLTableElement::createTBody):
1179         (WebCore::HTMLTableElement::lastBody const):
1180         (WebCore::HTMLTableElement::deleteRow):
1181         * html/HTMLTablePartElement.cpp:
1182         (WebCore::HTMLTablePartElement::findParentTable const):
1183         * html/HTMLTableRowsCollection.cpp:
1184         (WebCore::HTMLTableRowsCollection::rowAfter):
1185         * html/HTMLTextAreaElement.cpp:
1186         (WebCore::HTMLTextAreaElement::subtreeHasChanged):
1187         (WebCore::HTMLTextAreaElement::innerTextElement const):
1188         * html/HTMLTextAreaElement.h:
1189         * html/HTMLTextFormControlElement.cpp:
1190         (WebCore::HTMLTextFormControlElement::setSelectionRange):
1191         (WebCore::HTMLTextFormControlElement::indexForVisiblePosition const):
1192         (WebCore::HTMLTextFormControlElement::visiblePositionForIndex const):
1193         (WebCore::HTMLTextFormControlElement::computeSelectionStart const):
1194         (WebCore::HTMLTextFormControlElement::computeSelectionEnd const):
1195         (WebCore::HTMLTextFormControlElement::computeSelectionDirection const):
1196         (WebCore::HTMLTextFormControlElement::selection const):
1197         (WebCore::HTMLTextFormControlElement::updateInnerTextElementEditability):
1198         (WebCore::innerTextValueFrom):
1199         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1200         (WebCore::HTMLTextFormControlElement::innerTextValue const):
1201         (WebCore::positionForIndex):
1202         (WebCore::HTMLTextFormControlElement::indexForPosition const):
1203         (WebCore::HTMLTextFormControlElement::hidePlaceholder):
1204         (WebCore::HTMLTextFormControlElement::showPlaceholderIfNecessary):
1205         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks const):
1206         (WebCore::enclosingTextFormControl):
1207         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
1208         * html/HTMLTextFormControlElement.h:
1209         * html/HTMLTrackElement.cpp:
1210         (WebCore::HTMLTrackElement::canLoadURL):
1211         (WebCore::HTMLTrackElement::setReadyState):
1212         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute const):
1213         (WebCore::HTMLTrackElement::textTrackKindChanged):
1214         (WebCore::HTMLTrackElement::textTrackModeChanged):
1215         (WebCore::HTMLTrackElement::textTrackAddCues):
1216         (WebCore::HTMLTrackElement::textTrackRemoveCues):
1217         (WebCore::HTMLTrackElement::textTrackAddCue):
1218         (WebCore::HTMLTrackElement::textTrackRemoveCue):
1219         (WebCore::HTMLTrackElement::mediaElement const):
1220         * html/HTMLTrackElement.h:
1221         * html/HTMLVideoElement.cpp:
1222         (WebCore::HTMLVideoElement::setDisplayMode):
1223         (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
1224         * html/ImageDocument.cpp:
1225         (WebCore::ImageDocument::createDocumentStructure):
1226         (WebCore::ImageDocument::scale):
1227         (WebCore::ImageDocument::imageFitsInWindow):
1228         * html/InputType.cpp:
1229         (WebCore::InputType::destroyShadowSubtree):
1230         * html/InputType.h:
1231         (WebCore::InputType::innerTextElement const):
1232         * html/MediaDocument.cpp:
1233         (WebCore::MediaDocumentParser::createDocumentStructure):
1234         (WebCore::MediaDocument::defaultEventHandler):
1235         * html/MediaElementSession.cpp:
1236         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
1237         (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
1238         (WebCore::isMainContentForPurposesOfAutoplay):
1239         * html/NumberInputType.cpp:
1240         (WebCore::NumberInputType::decorationWidth const):
1241         * html/PluginDocument.cpp:
1242         (WebCore::PluginDocumentParser::appendBytes):
1243         * html/RadioInputType.cpp:
1244         (WebCore::RadioInputType::handleKeydownEvent):
1245         (WebCore::RadioInputType::isKeyboardFocusable const):
1246         (WebCore::RadioInputType::didDispatchClick):
1247         * html/RadioNodeList.cpp:
1248         (WebCore::RadioNodeList::checkElementMatchesRadioNodeListFilter const):
1249         * html/RangeInputType.cpp:
1250         (WebCore::RangeInputType::handleMouseDownEvent):
1251         (WebCore::RangeInputType::handleTouchEvent):
1252         (WebCore::RangeInputType::sliderTrackElement const):
1253         (WebCore::RangeInputType::listAttributeTargetChanged):
1254         (WebCore::RangeInputType::updateTickMarkValues):
1255         * html/SearchInputType.cpp:
1256         (WebCore::SearchInputType::createShadowSubtree):
1257         * html/TextFieldInputType.cpp:
1258         (WebCore::TextFieldInputType::isEmptyValue const):
1259         (WebCore::TextFieldInputType::handleKeydownEvent):
1260         (WebCore::TextFieldInputType::handleFocusEvent):
1261         (WebCore::TextFieldInputType::innerTextElement const):
1262         (WebCore::TextFieldInputType::updatePlaceholderText):
1263         (WebCore::TextFieldInputType::didSetValueByUserEdit):
1264         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const):
1265         * html/TextFieldInputType.h:
1266         * html/canvas/CanvasRenderingContext2D.cpp:
1267         (WebCore::size):
1268         (WebCore::CanvasRenderingContext2D::drawImage):
1269         * html/canvas/WebGL2RenderingContext.cpp:
1270         (WebCore::WebGL2RenderingContext::copyBufferSubData):
1271         (WebCore::WebGL2RenderingContext::getBufferSubData):
1272         * html/canvas/WebGLFramebuffer.cpp:
1273         (WebCore::WebGLFramebuffer::attach):
1274         (WebCore::WebGLFramebuffer::getAttachmentObject const):
1275         (WebCore::WebGLFramebuffer::removeAttachmentFromBoundFramebuffer):
1276         (WebCore::WebGLFramebuffer::getColorBufferWidth const):
1277         (WebCore::WebGLFramebuffer::getColorBufferHeight const):
1278         (WebCore::WebGLFramebuffer::getColorBufferFormat const):
1279         (WebCore::WebGLFramebuffer::checkStatus const):
1280         (WebCore::WebGLFramebuffer::hasStencilBuffer const):
1281         (WebCore::WebGLFramebuffer::initializeAttachments):
1282         * html/canvas/WebGLRenderingContext.cpp:
1283         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter):
1284         * html/canvas/WebGLRenderingContextBase.cpp:
1285         (WebCore::WebGLRenderingContextBase::create):
1286         (WebCore::WebGLRenderingContextBase::bufferData):
1287         (WebCore::WebGLRenderingContextBase::bufferSubData):
1288         (WebCore::WebGLRenderingContextBase::compressedTexImage2D):
1289         (WebCore::WebGLRenderingContextBase::compressedTexSubImage2D):
1290         (WebCore::WebGLRenderingContextBase::copyTexSubImage2D):
1291         (WebCore::WebGLRenderingContextBase::generateMipmap):
1292         (WebCore::WebGLRenderingContextBase::getAttachedShaders):
1293         (WebCore::WebGLRenderingContextBase::getTexParameter):
1294         (WebCore::WebGLRenderingContextBase::linkProgramWithoutInvalidatingAttribLocations):
1295         (WebCore::WebGLRenderingContextBase::texImage2DBase):
1296         (WebCore::WebGLRenderingContextBase::validateTexFunc):
1297         (WebCore::WebGLRenderingContextBase::texSubImage2D):
1298         (WebCore::WebGLRenderingContextBase::texSubImage2DBase):
1299         (WebCore::WebGLRenderingContextBase::copyTexImage2D):
1300         (WebCore::WebGLRenderingContextBase::texImage2D):
1301         (WebCore::WebGLRenderingContextBase::texParameter):
1302         (WebCore::WebGLRenderingContextBase::loseContextImpl):
1303         (WebCore::WebGLRenderingContextBase::checkTextureCompleteness):
1304         (WebCore::WebGLRenderingContextBase::validateTextureBinding):
1305         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
1306         * html/canvas/WebGPURenderPassColorAttachmentDescriptor.cpp:
1307         (WebCore::WebGPURenderPassColorAttachmentDescriptor::clearColor const):
1308         (WebCore::WebGPURenderPassColorAttachmentDescriptor::setClearColor):
1309         * html/canvas/WebGPURenderPassDepthAttachmentDescriptor.cpp:
1310         (WebCore::WebGPURenderPassDepthAttachmentDescriptor::clearDepth const):
1311         (WebCore::WebGPURenderPassDepthAttachmentDescriptor::setClearDepth):
1312         * html/parser/HTMLConstructionSite.cpp:
1313         (WebCore::executeInsertAlreadyParsedChildTask):
1314         (WebCore::HTMLConstructionSite::insertTextNode):
1315         * html/parser/HTMLFormattingElementList.cpp:
1316         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
1317         * html/parser/HTMLParserOptions.cpp:
1318         (WebCore::HTMLParserOptions::HTMLParserOptions):
1319         * html/parser/HTMLParserScheduler.cpp:
1320         (WebCore::HTMLParserScheduler::shouldYieldBeforeExecutingScript):
1321         * html/parser/HTMLTreeBuilder.cpp:
1322         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1323         (WebCore::HTMLTreeBuilder::callTheAdoptionAgency):
1324         (WebCore::HTMLTreeBuilder::resetInsertionModeAppropriately):
1325         * html/parser/XSSAuditor.cpp:
1326         (WebCore::XSSAuditor::init):
1327         * html/shadow/MediaControlElementTypes.cpp:
1328         (WebCore::parentMediaElement):
1329         * html/shadow/MediaControlElementTypes.h:
1330         (WebCore::parentMediaElement):
1331         * html/shadow/MediaControlElements.cpp:
1332         (WebCore::MediaControlPanelElement::startDrag):
1333         (WebCore::MediaControlPanelElement::endDrag):
1334         (WebCore::MediaControlVolumeSliderContainerElement::defaultEventHandler):
1335         (WebCore::MediaControlClosedCaptionsTrackListElement::defaultEventHandler):
1336         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
1337         (WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
1338         (WebCore::MediaControlFullscreenButtonElement::defaultEventHandler):
1339         (WebCore::MediaControlTextTrackContainerElement::updateDisplay):
1340         (WebCore::MediaControlTextTrackContainerElement::updateActiveCuesFontSize):
1341         (WebCore::MediaControlTextTrackContainerElement::updateTextStrokeStyle):
1342         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):
1343         (WebCore::MediaControlTextTrackContainerElement::clearTextTrackRepresentation):
1344         (WebCore::MediaControlTextTrackContainerElement::updateSizes):
1345         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
1346         * html/shadow/MediaControls.cpp:
1347         (WebCore::MediaControls::containsRelatedTarget):
1348         * html/shadow/SliderThumbElement.cpp:
1349         (WebCore::SliderThumbElement::isDisabledFormControl const):
1350         (WebCore::SliderThumbElement::matchesReadWritePseudoClass const):
1351         (WebCore::SliderThumbElement::focusDelegate):
1352         (WebCore::SliderThumbElement::setPositionFromPoint):
1353         (WebCore::SliderThumbElement::startDragging):
1354         (WebCore::SliderThumbElement::stopDragging):
1355         (WebCore::SliderThumbElement::defaultEventHandler):
1356         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
1357         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
1358         (WebCore::SliderThumbElement::willDetachRenderers):
1359         (WebCore::findTouchWithIdentifier):
1360         (WebCore::SliderThumbElement::handleTouchStart):
1361         (WebCore::SliderThumbElement::handleTouchMove):
1362         (WebCore::SliderThumbElement::handleTouchEndAndCancel):
1363         (WebCore::SliderThumbElement::handleTouchEvent):
1364         (WebCore::SliderThumbElement::hostInput const):
1365         * html/shadow/SliderThumbElement.h:
1366         * html/shadow/SpinButtonElement.cpp:
1367         (WebCore::SpinButtonElement::defaultEventHandler):
1368         (WebCore::SpinButtonElement::releaseCapture):
1369         * html/shadow/TextControlInnerElements.cpp:
1370         (WebCore::TextControlInnerTextElement::defaultEventHandler):
1371         (WebCore::SearchFieldCancelButtonElement::willRespondToMouseClickEvents):
1372         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1373         (WebCore::ImageControlsButtonElementMac::defaultEventHandler):
1374         * html/track/LoadableTextTrack.cpp:
1375         (WebCore::LoadableTextTrack::trackElementIndex):
1376         * html/track/TextTrack.cpp:
1377         (WebCore::TextTrack::setMode):
1378         (WebCore::TextTrack::hasCue):
1379         * html/track/TextTrackCueGeneric.cpp:
1380         (WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
1381         * html/track/VTTCue.cpp:
1382         (WebCore::VTTCue::copyWebVTTNodeToDOMTree):
1383         (WebCore::VTTCue::determineTextDirection):
1384         (WebCore::VTTCue::markFutureAndPastNodes):
1385         (WebCore::VTTCue::removeDisplayTree):
1386         (WebCore::VTTCue::cueContentsMatch const):
1387         * inspector/InspectorDOMAgent.cpp:
1388         (WebCore::InspectorDOMAgent::didAddEventListener):
1389         (WebCore::InspectorDOMAgent::willRemoveEventListener):
1390         * loader/FormSubmission.cpp:
1391         (WebCore::FormSubmission::create):
1392         * page/ContextMenuController.cpp:
1393         (WebCore::ContextMenuController::maybeCreateContextMenu):
1394         * rendering/RenderSnapshottedPlugIn.cpp:
1395         (WebCore::RenderSnapshottedPlugIn::handleEvent):
1396         * rendering/RenderTextControl.cpp:
1397         (WebCore::RenderTextControl::innerTextElement const):
1398         (WebCore::RenderTextControl::styleDidChange):
1399         (WebCore::RenderTextControl::textBlockLogicalWidth const):
1400         (WebCore::RenderTextControl::computeLogicalHeight const):
1401         (WebCore::RenderTextControl::hitInnerTextElement):
1402         (WebCore::RenderTextControl::canScroll const):
1403         (WebCore::RenderTextControl::innerLineHeight const):
1404         * rendering/RenderTextControl.h:
1405         * rendering/RenderTextControlSingleLine.cpp:
1406         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1407         (WebCore::RenderTextControlSingleLine::styleDidChange):
1408         * rendering/RenderTheme.cpp:
1409         (WebCore::RenderTheme::isFocused const):
1410         * rendering/RenderThemeGtk.cpp:
1411         (WebCore::RenderThemeGtk::paintMediaSliderTrack):
1412         (WebCore::RenderThemeGtk::paintMediaVolumeSliderTrack):
1413         * rendering/RenderThemeMac.mm:
1414         (WebCore::RenderThemeMac::paintSliderThumb):
1415         * rendering/RenderVideo.cpp:
1416         (WebCore::RenderVideo::willBeDestroyed):
1417         (WebCore::RenderVideo::calculateIntrinsicSize):
1418         (WebCore::RenderVideo::paintReplaced):
1419         (WebCore::RenderVideo::updatePlayer):
1420         (WebCore::RenderVideo::supportsAcceleratedRendering const):
1421         (WebCore::RenderVideo::acceleratedRenderingStateChanged):
1422         (WebCore::RenderVideo::requiresImmediateCompositing const):
1423         (WebCore::RenderVideo::foregroundIsKnownToBeOpaqueInRect const):
1424         * svg/SVGUseElement.cpp:
1425         (WebCore::SVGUseElement::clearShadowTree):
1426         (WebCore::SVGUseElement::targetClone const):
1427
1428 2017-10-18  Dean Jackson  <dino@apple.com>
1429
1430         Some older hardware can't actually use renderbuffers at the size they advertise
1431         https://bugs.webkit.org/show_bug.cgi?id=178417
1432         <rdar://problem/35042291>
1433
1434         Reviewed by Tim Horton.
1435
1436         The change in r223567 caused some older hardware to fail, because even though
1437         they claimed to support a maximum renderbuffer and viewport of 16K, they were
1438         unable to actually handle one. Rather than trying to identify such hardware,
1439         clamp all buffers to a maximum of 8192. This is bigger than the previous value
1440         of 4096, and large enough to have a full-screen buffer on a Retina 5K iMac.
1441
1442         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1443         (WebCore::GraphicsContext3D::getIntegerv):
1444
1445 2017-10-18  Chris Dumez  <cdumez@apple.com>
1446
1447         [Service Worker] Add stubs for Client / WindowClient / Clients
1448         https://bugs.webkit.org/show_bug.cgi?id=178469
1449
1450         Reviewed by Youenn Fablet.
1451
1452         Add stubs for Client / WindowClient / Clients:
1453         - https://w3c.github.io/ServiceWorker/v1/#clients
1454         - https://w3c.github.io/ServiceWorker/v1/#client-interface
1455
1456         * CMakeLists.txt:
1457         * DerivedSources.make:
1458         * WebCore.xcodeproj/project.pbxproj:
1459         * bindings/js/WebCoreBuiltinNames.h:
1460         * dom/Document.cpp:
1461         (WebCore::Document::visibilityState const):
1462         * dom/Document.h:
1463         * dom/Document.idl:
1464         * dom/VisibilityState.h: Renamed from Source/WebCore/page/PageVisibilityState.h.
1465         * dom/VisibilityState.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1466         * page/Page.cpp:
1467         (WebCore::Page::visibilityState const):
1468         * page/Page.h:
1469         * workers/service/ServiceWorkerClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1470         (WebCore::ServiceWorkerClient::ServiceWorkerClient):
1471         (WebCore::ServiceWorkerClient::activeDOMObjectName const):
1472         (WebCore::ServiceWorkerClient::canSuspendForDocumentSuspension const):
1473         (WebCore::ServiceWorkerClient::url const):
1474         (WebCore::ServiceWorkerClient::frameType const):
1475         (WebCore::ServiceWorkerClient::id const):
1476         (WebCore::ServiceWorkerClient::postMessage):
1477         * workers/service/ServiceWorkerClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1478         * workers/service/ServiceWorkerClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1479         * workers/service/ServiceWorkerClients.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.cpp.
1480         (WebCore::ServiceWorkerClients::ServiceWorkerClients):
1481         (WebCore::ServiceWorkerClients::activeDOMObjectName const):
1482         (WebCore::ServiceWorkerClients::canSuspendForDocumentSuspension const):
1483         (WebCore::ServiceWorkerClients::get):
1484         (WebCore::ServiceWorkerClients::matchAll):
1485         (WebCore::ServiceWorkerClients::openWindow):
1486         (WebCore::ServiceWorkerClients::claim):
1487         * workers/service/ServiceWorkerClients.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.h.
1488         (WebCore::ServiceWorkerClients::create):
1489         * workers/service/ServiceWorkerClients.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1490         * workers/service/ServiceWorkerGlobalScope.cpp:
1491         (WebCore::ServiceWorkerGlobalScope::ServiceWorkerGlobalScope):
1492         * workers/service/ServiceWorkerGlobalScope.h:
1493         (WebCore::ServiceWorkerGlobalScope::clients):
1494         * workers/service/ServiceWorkerGlobalScope.idl:
1495         * workers/service/ServiceWorkerWindowClient.cpp: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1496         (WebCore::ServiceWorkerWindowClient::ServiceWorkerWindowClient):
1497         (WebCore::ServiceWorkerWindowClient::visibilityState const):
1498         (WebCore::ServiceWorkerWindowClient::isFocused const):
1499         (WebCore::ServiceWorkerWindowClient::focus):
1500         (WebCore::ServiceWorkerWindowClient::navigate):
1501         * workers/service/ServiceWorkerWindowClient.h: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1502         * workers/service/ServiceWorkerWindowClient.idl: Copied from Source/WebCore/workers/service/ServiceWorkerGlobalScope.idl.
1503
1504 2017-10-18  Zalan Bujtas  <zalan@apple.com>
1505
1506         [FrameView::layout cleanup] Use SetForScope to protect m_needsFullRepaint's value on reentrancy
1507         https://bugs.webkit.org/show_bug.cgi?id=178479
1508         <rdar://problem/35056950>
1509
1510         Reviewed by Simon Fraser.
1511
1512         No change in functionality.
1513
1514         * page/FrameView.cpp:
1515         (WebCore::FrameView::layout):
1516
1517 2017-10-18  Zalan Bujtas  <zalan@apple.com>
1518
1519         [FrameView::layout cleanup] Remove InPreLayoutStyleUpdate.
1520         https://bugs.webkit.org/show_bug.cgi?id=178483
1521         <rdar://problem/35058800>
1522
1523         Reviewed by Simon Fraser.
1524
1525         Its client, updateCompositingLayersAfterStyleChange only needs to know if there's a upcoming
1526         layer update (part of FrameView::layout()).
1527
1528         No change in functionality.
1529
1530         * page/FrameView.cpp:
1531         (WebCore::FrameView::updateCompositingLayersAfterStyleChange):
1532         (WebCore::FrameView::layout):
1533         * page/FrameView.h:
1534
1535 2017-10-18  Chris Dumez  <cdumez@apple.com>
1536
1537         Global constructors exposed to service workers should go on ServiceWorkerGlobalScope interface
1538         https://bugs.webkit.org/show_bug.cgi?id=178482
1539
1540         Reviewed by Sam Weinig.
1541
1542         Global constructors exposed to service workers should go on ServiceWorkerGlobalScope interface,
1543         not the ServiceWorker interface.
1544
1545         * bindings/scripts/preprocess-idls.pl:
1546
1547 2017-10-17  Ryosuke Niwa  <rniwa@webkit.org>
1548
1549         Add an argument indicating the type of insertion to Node::insertedInto
1550         https://bugs.webkit.org/show_bug.cgi?id=178431
1551
1552         Reviewed by Antti Koivisto.
1553
1554         Added InsertionType as the first argument to Node::insertedInto, which contains two booleans indicating
1555         whether the node just become newly connected to a document, and whether node's tree scope had changed or not.
1556
1557         These boolean flags simplifie the logic in insertedInto implementations, and are required to have a better
1558         guarantee about the correctness of node flags during calls to insertedInto. Right now, isConnected() and
1559         isInShadowTree() are both outdated until Node::insertedInto is called.
1560
1561         Also renamed the second argument from insertionPoint to parentOfInsertedTree to make the semantics clear,
1562         and renamed finishedInsertingSubtree to didFinishInsertingNode, and renamed InsertionNotificationRequest
1563         to InsertedIntoResult using enum class.
1564
1565         Note that in some implementations of insertedInto, we check whether isConnected() was false to decide whether
1566         the node is newly connected to a document. This extra check is no longer necessary since no node will be inserted
1567         into a document without first being completely removed after r223458.
1568
1569         No new tests since there should be no behavioral changes.
1570
1571         * dom/ContainerNode.cpp:
1572         (WebCore::ContainerNode::notifyChildInserted):
1573         * dom/ContainerNodeAlgorithms.cpp:
1574         (WebCore::notifyNodeInsertedIntoDocument): Replaced the check that the node had not been disconnected by scripts
1575         by a release assert now that we believe we've eliminated all causes of these unwanted DOM mutations in r223458.
1576         (WebCore::notifyNodeInsertedIntoTree): Removed NoEventDispatchAssertion since notifyChildNodeInserted has it
1577         already since r223458.
1578         (WebCore::notifyChildNodeInserted): Made this function return NodeVector (copy elision).
1579         * dom/ContainerNodeAlgorithms.h:
1580         * dom/Element.cpp:
1581         (WebCore::Element::insertedInto): Use insertionType.connectedToDocument to detect when this element had become
1582         connected to some document. Similarly, use insertionType.treeScopeChanged to detect when this element had been
1583         inserted into a new tree scope. Removed the comment which became obsolete due to this cleanup.
1584         (WebCore::Element::addShadowRoot): Simplified the code here since we never attach a ShadowRoot with children.
1585         * dom/Element.h:
1586         * dom/Node.cpp:
1587         (WebCore::Node::insertedInto):
1588         * dom/Node.h:
1589         (WebCore::Node::InsertedIntoResult): Renamed from InsertionNotificationRequest, and turned into an enum class.
1590         (WebCore::Node::InsertionType): Added. We pass this object by value to insertedInto as a performance optimization
1591         as passing two booleans by value is faster than passing a pointer and then de-referencing it in a virtual callee.
1592         (WebCore::Node::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1593         * dom/ProcessingInstruction.cpp:
1594         (WebCore::ProcessingInstruction::insertedInto):
1595         (WebCore::ProcessingInstruction::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1596         * dom/ProcessingInstruction.h:
1597         * dom/ScriptElement.cpp:
1598         (WebCore::ScriptElement::shouldCallFinishedInsertingSubtree): Deleted.
1599         (WebCore::ScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1600         * dom/ScriptElement.h:
1601         (WebCore::ScriptElement::insertedInto const): Added. Extracted from shouldCallFinishedInsertingSubtree.
1602         * dom/ShadowRoot.cpp:
1603         (WebCore::ShadowRoot::insertedInto): The extra isConnected() check is no longer needed. See the description above.
1604         * dom/ShadowRoot.h:
1605         * html/FormAssociatedElement.cpp:
1606         (WebCore::FormAssociatedElement::insertedInto):
1607         * html/FormAssociatedElement.h:
1608         * html/HTMLBaseElement.cpp:
1609         (WebCore::HTMLBaseElement::insertedInto):
1610         * html/HTMLBaseElement.h:
1611         * html/HTMLBodyElement.cpp:
1612         (WebCore::HTMLBodyElement::insertedInto):
1613         (WebCore::HTMLBodyElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1614         * html/HTMLBodyElement.h:
1615         * html/HTMLFormControlElement.cpp:
1616         (WebCore::HTMLFormControlElement::insertedInto):
1617         (WebCore::HTMLFormControlElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1618         * html/HTMLFormControlElement.h:
1619         * html/HTMLFormControlElementWithState.cpp:
1620         (WebCore::HTMLFormControlElementWithState::insertedInto):
1621         * html/HTMLFormControlElementWithState.h:
1622         * html/HTMLFormElement.cpp:
1623         (WebCore::HTMLFormElement::insertedInto):
1624         * html/HTMLFormElement.h:
1625         * html/HTMLFrameElementBase.cpp:
1626         (WebCore::HTMLFrameElementBase::insertedInto):
1627         (WebCore::HTMLFrameElementBase::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1628         * html/HTMLFrameElementBase.h:
1629         * html/HTMLFrameSetElement.cpp:
1630         (WebCore::HTMLFrameSetElement::insertedInto):
1631         * html/HTMLFrameSetElement.h:
1632         * html/HTMLImageElement.cpp:
1633         (WebCore::HTMLImageElement::insertedInto):
1634         * html/HTMLImageElement.h:
1635         * html/HTMLInputElement.cpp:
1636         (WebCore::HTMLInputElement::insertedInto):
1637         (WebCore::HTMLInputElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1638         * html/HTMLInputElement.h:
1639         * html/HTMLLinkElement.cpp:
1640         (WebCore::HTMLLinkElement::insertedInto): The extra isConnected() check is no longer needed. See above.
1641         (WebCore::HTMLLinkElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1642         * html/HTMLLinkElement.h:
1643         * html/HTMLMapElement.cpp:
1644         (WebCore::HTMLMapElement::insertedInto):
1645         * html/HTMLMapElement.h:
1646         * html/HTMLMediaElement.cpp:
1647         (WebCore::HTMLMediaElement::insertedInto):
1648         (WebCore::HTMLMediaElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1649         * html/HTMLMediaElement.h:
1650         * html/HTMLMetaElement.cpp:
1651         (WebCore::HTMLMetaElement::insertedInto):
1652         * html/HTMLMetaElement.h:
1653         * html/HTMLObjectElement.cpp:
1654         (WebCore::HTMLObjectElement::insertedInto):
1655         (WebCore::HTMLObjectElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1656         * html/HTMLObjectElement.h:
1657         * html/HTMLOptionElement.cpp:
1658         (WebCore::HTMLOptionElement::insertedInto):
1659         * html/HTMLOptionElement.h:
1660         * html/HTMLScriptElement.cpp:
1661         (WebCore::HTMLScriptElement::insertedInto):
1662         (WebCore::HTMLScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1663         * html/HTMLScriptElement.h:
1664         * html/HTMLSelectElement.cpp:
1665         (WebCore::HTMLSelectElement::insertedInto):
1666         * html/HTMLSelectElement.h:
1667         * html/HTMLSlotElement.cpp:
1668         (WebCore::HTMLSlotElement::insertedInto): Replaced a cumbersome condition by a boolean check on insertionType's
1669         treeScopeChanged and removed the accompanying comment which is no longer needed.
1670         * html/HTMLSlotElement.h:
1671         * html/HTMLSourceElement.cpp:
1672         (WebCore::HTMLSourceElement::insertedInto):
1673         * html/HTMLSourceElement.h:
1674         * html/HTMLStyleElement.cpp:
1675         (WebCore::HTMLStyleElement::insertedInto): The extra isConnected() check is no longer needed. See above.
1676         * html/HTMLStyleElement.h:
1677         * html/HTMLTextFormControlElement.cpp:
1678         (WebCore::HTMLTextFormControlElement::insertedInto):
1679         * html/HTMLTextFormControlElement.h:
1680         * html/HTMLTitleElement.cpp:
1681         (WebCore::HTMLTitleElement::insertedInto):
1682         * html/HTMLTitleElement.h:
1683         * html/HTMLTrackElement.cpp:
1684         (WebCore::HTMLTrackElement::insertedInto): Added a FIXME since this code is clearly wrong.
1685         * html/HTMLTrackElement.h:
1686         * svg/SVGElement.cpp:
1687         (WebCore::SVGElement::insertedInto):
1688         * svg/SVGElement.h:
1689         * svg/SVGFEImageElement.cpp:
1690         (WebCore::SVGFEImageElement::insertedInto):
1691         (WebCore::SVGFEImageElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1692         * svg/SVGFEImageElement.h:
1693         * svg/SVGFontFaceElement.cpp:
1694         (WebCore::SVGFontFaceElement::insertedInto):
1695         * svg/SVGFontFaceElement.h:
1696         * svg/SVGFontFaceUriElement.cpp:
1697         (WebCore::SVGFontFaceUriElement::insertedInto):
1698         * svg/SVGFontFaceUriElement.h:
1699         * svg/SVGImageElement.cpp:
1700         (WebCore::SVGImageElement::insertedInto):
1701         * svg/SVGImageElement.h:
1702         * svg/SVGMPathElement.cpp:
1703         (WebCore::SVGMPathElement::insertedInto):
1704         (WebCore::SVGMPathElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1705         * svg/SVGMPathElement.h:
1706         * svg/SVGPathElement.cpp:
1707         (WebCore::SVGPathElement::insertedInto):
1708         * svg/SVGPathElement.h:
1709         * svg/SVGSVGElement.cpp:
1710         (WebCore::SVGSVGElement::insertedInto):
1711         * svg/SVGSVGElement.h:
1712         * svg/SVGScriptElement.cpp:
1713         (WebCore::SVGScriptElement::insertedInto):
1714         (WebCore::SVGScriptElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1715         * svg/SVGScriptElement.h:
1716         * svg/SVGStyleElement.cpp:
1717         (WebCore::SVGStyleElement::insertedInto): The extra isConnected() check is no longer needed. See above description.
1718         * svg/SVGStyleElement.h:
1719         * svg/SVGTRefElement.cpp:
1720         (WebCore::SVGTRefElement::insertedInto):
1721         (WebCore::SVGTRefElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1722         * svg/SVGTRefElement.h:
1723         * svg/SVGTextPathElement.cpp:
1724         (WebCore::SVGTextPathElement::insertedInto):
1725         (WebCore::SVGTextPathElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1726         * svg/SVGTextPathElement.h:
1727         * svg/SVGTitleElement.cpp:
1728         (WebCore::SVGTitleElement::insertedInto):
1729         * svg/SVGTitleElement.h:
1730         * svg/SVGUseElement.cpp:
1731         (WebCore::SVGUseElement::insertedInto):
1732         * svg/SVGUseElement.h:
1733         * svg/animation/SVGSMILElement.cpp:
1734         (WebCore::SVGSMILElement::insertedInto):
1735         (WebCore::SVGSMILElement::didFinishInsertingNode): Renamed from finishedInsertingSubtree.
1736         * svg/animation/SVGSMILElement.h:
1737
1738 2017-10-18  Eric Carlson  <eric.carlson@apple.com>
1739
1740         Key events should not update Document.lastHandledUserGestureTimestamp unless key event is handled
1741         https://bugs.webkit.org/show_bug.cgi?id=178473
1742         <rdar://problem/34869935>
1743
1744         Reviewed by Brent Fulgham.
1745
1746         No new tests, updated media/restricted-audio-playback-with-document-gesture.html for this change.
1747
1748         * page/EventHandler.cpp:
1749         (WebCore::EventHandler::keyEvent): Restore the current Document's "lastHandledUserGestureTimestamp"
1750         if the key event was not handled.
1751
1752 2017-10-18  Wenson Hsieh  <wenson_hsieh@apple.com>
1753
1754         Unreviewed, rolling out r223291.
1755
1756         After further investigation, this removed codepath is
1757         something Mail may want to re-adopt. Additionally, the
1758         original breaking change was rolled out in r223408, so
1759         this test once again passes on ToT.
1760
1761         Reverted changeset:
1762
1763         "Remove Editor::simplifyMarkup"
1764         https://bugs.webkit.org/show_bug.cgi?id=178271
1765         https://trac.webkit.org/changeset/223291
1766
1767 2017-10-18  Sam Weinig  <sam@webkit.org>
1768
1769         [Settings] Move remaining simple settings to Settings.in
1770         https://bugs.webkit.org/show_bug.cgi?id=177730
1771         <rdar://problem/34763346>
1772
1773         Reviewed by Daniel Bates.
1774
1775         * Scripts/GenerateSettings/Settings.py:
1776         (Setting.__init__):
1777         (Setting.__str__):
1778         (Setting.getterFunctionName):
1779         (parseInput):
1780
1781             Add support for parsing the 'getter' option.
1782
1783         * page/Settings.in:
1784         
1785             Migrate simple settings from SettingsBase to here.
1786         
1787         * page/SettingsBase.cpp:
1788         (WebCore::SettingsBase::SettingsBase):
1789         (WebCore::SettingsBase::setJavaEnabled): Deleted.
1790         (WebCore::SettingsBase::setJavaEnabledForLocalFiles): Deleted.
1791         (WebCore::SettingsBase::setPreferMIMETypeForImages): Deleted.
1792         (WebCore::SettingsBase::setForcePendingWebGLPolicy): Deleted.
1793         (WebCore::SettingsBase::setNeedsAdobeFrameReloadingQuirk): Deleted.
1794         (WebCore::SettingsBase::setFontRenderingMode): Deleted.
1795         (WebCore::SettingsBase::fontRenderingMode const): Deleted.
1796         (WebCore::SettingsBase::setShowTiledScrollingIndicator): Deleted.
1797         (WebCore::SettingsBase::setFontFallbackPrefersPictographs): Deleted.
1798         * page/SettingsBase.h:
1799         (WebCore::SettingsBase::isJavaEnabled const): Deleted.
1800         (WebCore::SettingsBase::isJavaEnabledForLocalFiles const): Deleted.
1801         (WebCore::SettingsBase::preferMIMETypeForImages const): Deleted.
1802         (WebCore::SettingsBase::needsAcrobatFrameReloadingQuirk const): Deleted.
1803         (WebCore::SettingsBase::showTiledScrollingIndicator const): Deleted.
1804         (WebCore::SettingsBase::setTouchEventEmulationEnabled): Deleted.
1805         (WebCore::SettingsBase::isTouchEventEmulationEnabled const): Deleted.
1806         (WebCore::SettingsBase::setTimeWithoutMouseMovementBeforeHidingControls): Deleted.
1807         (WebCore::SettingsBase::timeWithoutMouseMovementBeforeHidingControls const): Deleted.
1808         (WebCore::SettingsBase::fontFallbackPrefersPictographs const): Deleted.
1809         (WebCore::SettingsBase::setMediaKeysStorageDirectory): Deleted.
1810         (WebCore::SettingsBase::mediaKeysStorageDirectory const): Deleted.
1811         (WebCore::SettingsBase::setMediaDeviceIdentifierStorageDirectory): Deleted.
1812         (WebCore::SettingsBase::mediaDeviceIdentifierStorageDirectory const): Deleted.
1813         (WebCore::SettingsBase::applePayEnabled const): Deleted.
1814         (WebCore::SettingsBase::setApplePayEnabled): Deleted.
1815         (WebCore::SettingsBase::applePayCapabilityDisclosureAllowed const): Deleted.
1816         (WebCore::SettingsBase::setApplePayCapabilityDisclosureAllowed): Deleted.
1817         (WebCore::SettingsBase::isForcePendingWebGLPolicy const): Deleted.
1818         
1819             Remove simple settings.
1820
1821 2017-10-18  Zalan Bujtas  <zalan@apple.com>
1822
1823         [FrameView::layout cleanup] Move root/body marking dirty logic to a separate function
1824         https://bugs.webkit.org/show_bug.cgi?id=178477
1825         <rdar://problem/35056478>
1826
1827         Reviewed by Simon Fraser.
1828
1829         No change in functionality.
1830
1831         * page/FrameView.cpp:
1832         (WebCore::FrameView::markRootOrBodyRendererDirty const):
1833         (WebCore::FrameView::layout):
1834         * page/FrameView.h:
1835
1836 2017-10-18  Keith Miller  <keith_miller@apple.com>
1837
1838         Setup WebCore build to start using unified sources.
1839         https://bugs.webkit.org/show_bug.cgi?id=178362
1840
1841         Reviewed by Tim Horton.
1842
1843         This patch adds all the long tooling needed to start adding
1844         unified sources to WebCore. Most of the source list files
1845         are empty to start but will be filled over the next few days.
1846
1847         I started by moving all the non-derived bindings code to
1848         unified sources to make sure everything worked correctly.
1849
1850         * CMakeLists.txt:
1851         * Configurations/GenerateUnifiedSources.xcconfig: Added.
1852         * Configurations/WebCore.xcconfig:
1853         * PlatformMac.cmake:
1854         * Sources.txt: Added.
1855         * SourcesCocoa.txt: Added.
1856         * SourcesIOS.txt: Added.
1857         * SourcesMac.txt: Added.
1858         * WebCore.xcodeproj/project.pbxproj:
1859         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp: Removed. No one seems to use this...
1860
1861 2017-10-18  Commit Queue  <commit-queue@webkit.org>
1862
1863         Unreviewed, rolling out r223321.
1864         https://bugs.webkit.org/show_bug.cgi?id=178476
1865
1866         This protocol change broke some internal builds (Requested by
1867         brrian__ on #webkit).
1868
1869         Reverted changeset:
1870
1871         "Web Inspector: provide a way to enable/disable event
1872         listeners"
1873         https://bugs.webkit.org/show_bug.cgi?id=177451
1874         https://trac.webkit.org/changeset/223321
1875
1876 2017-10-18  Sam Weinig  <sam@webkit.org>
1877
1878         [Settings] Miscellaneous cleanup of the settings generation scripts
1879         https://bugs.webkit.org/show_bug.cgi?id=178462
1880
1881         Reviewed by Daniel Bates.
1882
1883         - Stop generating and remove now unused SettingsMacros.h
1884         - Make functions operating on the python Setting object member functions
1885         - Add predicate to determine if a Setting's type is a value type, allowing
1886           us to exclude those from using const references.
1887
1888         * CMakeLists.txt:
1889         * DerivedSources.make:
1890         * Scripts/GenerateSettings.py:
1891         * Scripts/GenerateSettings/GenerateInternalSettingsHeaderFile.py:
1892         * Scripts/GenerateSettings/GenerateInternalSettingsIDLFile.py:
1893         * Scripts/GenerateSettings/GenerateInternalSettingsImplementationFile.py:
1894         * Scripts/GenerateSettings/GenerateSettings.py:
1895         * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
1896         * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:
1897         * Scripts/GenerateSettings/GenerateSettingsMacrosHeader.py: Removed.
1898         * Scripts/GenerateSettings/Settings.py:
1899         * WebCoreMacros.cmake:
1900         * WebCore.xcodeproj/project.pbxproj:
1901
1902 2017-10-18  Chris Dumez  <cdumez@apple.com>
1903
1904         Align ImageData constructor with the specification
1905         https://bugs.webkit.org/show_bug.cgi?id=178406
1906
1907         Reviewed by Youenn Fablet.
1908
1909         Align ImageData constructor with the specification:
1910         - https://html.spec.whatwg.org/multipage/canvas.html#dom-imagedata
1911
1912         It sometimes throws the wrong exception.
1913
1914         No new tests, rebaselined existing test.
1915
1916         * html/ImageData.cpp:
1917         (WebCore::ImageData::create):
1918         * html/ImageData.h:
1919         * html/ImageData.idl:
1920
1921 2017-10-18  Chris Dumez  <cdumez@apple.com>
1922
1923         Add an efficient data structure for WebCore to query if there is a Service Worker registered for a given origin
1924         https://bugs.webkit.org/show_bug.cgi?id=177876
1925         <rdar://problem/34813129>
1926
1927         Reviewed by Ryosuke Niwa.
1928
1929         No new tests, updatdd existing test.
1930
1931         * dom/Document.h:
1932         * testing/Internals.cpp:
1933         (WebCore::Internals::hasServiceWorkerRegisteredForOrigin):
1934         * testing/Internals.h:
1935         * testing/Internals.idl:
1936         * workers/service/ServiceWorkerProvider.h:
1937         * workers/service/context/SWContextManager.cpp:
1938         (WebCore::SWContextManager::startServiceWorkerContext):
1939         * workers/service/server/SWClientConnection.h:
1940         * workers/service/server/SWServer.cpp:
1941         (WebCore::SWServer::Connection::scriptContextStarted):
1942         (WebCore::SWServer::scriptContextStarted):
1943         * workers/service/server/SWServer.h:
1944         * workers/service/server/SWServerRegistration.cpp:
1945         (WebCore::SWServerRegistration::scriptContextFailedToStart):
1946         (WebCore::SWServerRegistration::scriptContextStarted):
1947         * workers/service/server/SWServerRegistration.h:
1948
1949 2017-10-18  Sam Weinig  <sam@webkit.org>
1950
1951         [Settings] Replace macros in Settings.h/cpp with generated code
1952         https://bugs.webkit.org/show_bug.cgi?id=178419
1953
1954         Reviewed by Antti Koivisto.
1955
1956         * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py:
1957         * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py:
1958
1959             Rather than use macros in the generated Settings class, generate the code the macros
1960             would expand to.
1961
1962 2017-10-18  Zalan Bujtas  <zalan@apple.com>
1963
1964         [FrameView::layout cleanup] Move frame flattening layout logic to a separate function
1965         https://bugs.webkit.org/show_bug.cgi?id=178425
1966         <rdar://problem/35045836>
1967
1968         Reviewed by Antti Koivisto.
1969
1970         No change in functionality.
1971
1972         * page/FrameView.cpp:
1973         (WebCore::FrameView::handleLayoutWithFrameFlatteningIfNeeded):
1974         (WebCore::FrameView::layout):
1975         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
1976         * page/FrameView.h:
1977
1978 2017-10-18  Antti Koivisto  <antti@apple.com>
1979
1980         Resolve ::before and ::after pseudo elements during style resolution
1981         https://bugs.webkit.org/show_bug.cgi?id=178339
1982
1983         Reviewed by Ryosuke Niwa.
1984
1985         They are currently resolved during render tree building which creates problems with display:contents and animations.
1986
1987         * dom/PseudoElement.cpp:
1988         (WebCore::PseudoElement::PseudoElement):
1989
1990             Call InspectorInstrumentation from constructor.
1991
1992         * style/RenderTreeUpdater.cpp:
1993         (WebCore::RenderTreeUpdater::Parent::Parent):
1994         (WebCore::RenderTreeUpdater::updateRenderTree):
1995         (WebCore::RenderTreeUpdater::pushParent):
1996
1997             Push the full update to the parent stack.
1998
1999         (WebCore::RenderTreeUpdater::popParent):
2000         (WebCore::RenderTreeUpdater::updateBeforeDescendants):
2001         (WebCore::RenderTreeUpdater::updateAfterDescendants):
2002         (WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2003         * style/RenderTreeUpdater.h:
2004         * style/RenderTreeUpdaterGeneratedContent.cpp:
2005         (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
2006
2007             No need to resolve pseudo style, we have it already.
2008
2009         (WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):
2010         (WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement): Deleted.
2011         (WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement): Deleted.
2012         * style/RenderTreeUpdaterGeneratedContent.h:
2013         * style/StyleTreeResolver.cpp:
2014         (WebCore::Style::TreeResolver::resolveElement):
2015         (WebCore::Style::TreeResolver::resolvePseudoStyle):
2016
2017             Resolve pseudos.
2018
2019         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
2020
2021             Make a private member function.
2022
2023         (WebCore::Style::TreeResolver::resolveComposedTree):
2024         * style/StyleTreeResolver.h:
2025         * style/StyleUpdate.cpp:
2026         (WebCore::Style::Update::elementUpdates const):
2027         (WebCore::Style::Update::elementUpdates):
2028
2029             Bundle the style update for an element and the associated before/after pseudos.
2030
2031         (WebCore::Style::Update::elementStyle const):
2032         (WebCore::Style::Update::elementStyle):
2033         (WebCore::Style::Update::addElement):
2034         (WebCore::Style::Update::elementUpdate const): Deleted.
2035         (WebCore::Style::Update::elementUpdate): Deleted.
2036         * style/StyleUpdate.h:
2037
2038 2017-10-18  Ms2ger  <Ms2ger@igalia.com>
2039
2040         Update the signatures of texSubImage3D.
2041         https://bugs.webkit.org/show_bug.cgi?id=178435
2042
2043         Reviewed by Sam Weinig.
2044
2045         Update the signatures of texSubImage3D.
2046
2047         No new tests: not much point in adding tests now; this method doesn't
2048         do anything anyway.
2049
2050         * html/canvas/WebGL2RenderingContext.cpp:
2051         (WebCore::WebGL2RenderingContext::texSubImage3D):
2052         * html/canvas/WebGL2RenderingContext.h:
2053         * html/canvas/WebGL2RenderingContext.idl:
2054
2055 2017-10-18  Fujii Hironori  <Hironori.Fujii@sony.com>
2056
2057         Use LazyNeverDestroyed instead of DEFINE_GLOBAL for WebKitFontFamilyNames
2058         https://bugs.webkit.org/show_bug.cgi?id=175106
2059
2060         Reviewed by Yusuke Suzuki.
2061
2062         No new tests because there is no behavior change.
2063
2064         * css/CSSFontFaceSet.cpp:
2065         (WebCore::CSSFontFaceSet::familyNameFromPrimitive): Call get() method of LazyNeverDestroyed.
2066         * dom/make_names.pl: Use LazyNeverDestroyed for font names.
2067
2068 2017-10-18  Zan Dobersek  <zdobersek@igalia.com>
2069
2070         [MSE] Move SourceBuffer's pending append data into the platform implementations
2071         https://bugs.webkit.org/show_bug.cgi?id=178003
2072
2073         Reviewed by Jer Noble.
2074
2075         In SourceBuffer::appendBufferTimerFired(), we can use move semantics to
2076         pass the pending append data into the platform layer, where it can then
2077         be used more efficiently.
2078
2079         Resources in the m_pendingAppendData member are moved into the append()
2080         call on the SourceBufferPrivate object. The m_pendingAppendData is still
2081         cleared out manually in case the underlying implementation doesn't clear
2082         it out through a move operation. The SourceBufferPrivate interface is
2083         updated to accept a Vector rvalue reference as the only parameter of the
2084         append() method.
2085
2086         For the GStreamer implementation, signature of the append() method in
2087         MediaSourceClientGStreamerMSE class is also updated. The implementation
2088         now moves the Vector resources over to a on-heap Vector object that is
2089         then wrapped into a GstBuffer object by using the
2090         gst_buffer_new_wrapped_full() API and specifying the custom deleter.
2091
2092         The AVFoundation implementation of SourceBufferPrivate is only updated
2093         to reflect the changes in the interface. The Vector data that is passed
2094         in is still copied into the NSData allocation.
2095
2096         MockSourceBufferPrivate is also updated, with the append data still
2097         being copied into the m_inputBuffer Vector.
2098
2099         No new tests -- no change in behavior.
2100
2101         * Modules/mediasource/SourceBuffer.cpp:
2102         (WebCore::SourceBuffer::appendBufferTimerFired):
2103         * platform/graphics/SourceBufferPrivate.h:
2104         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2105         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2106         (WebCore::SourceBufferPrivateAVFObjC::append):
2107         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
2108         (WebCore::MediaSourceClientGStreamerMSE::append):
2109         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.h:
2110         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.cpp:
2111         (WebCore::SourceBufferPrivateGStreamer::append):
2112         * platform/graphics/gstreamer/mse/SourceBufferPrivateGStreamer.h:
2113         * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
2114         (WebCore::MockSourceBufferPrivate::append):
2115         * platform/mock/mediasource/MockSourceBufferPrivate.h:
2116
2117 2017-10-17  Zalan Bujtas  <zalan@apple.com>
2118
2119         [FrameView::layout cleanup] Remove redundant body->renderer()->setChildNeedsLayout() call
2120         https://bugs.webkit.org/show_bug.cgi?id=178414
2121         <rdar://problem/35040876>
2122
2123         Reviewed by Simon Fraser.
2124
2125         Since m_size always equals to layoutSize() at this point, we never call setChildNeedsLayout() on the body's renderer.
2126         However a few lines below, when we adjust the frame size and check if oldSize != m_size, we actually
2127         dirty the body's renderer.
2128
2129         Covered by existing tests.
2130
2131         * page/FrameView.cpp:
2132         (WebCore::FrameView::layout):
2133
2134 2017-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
2135
2136         [Regression] Webkit "-apple-system" font fallback token handles font weights of PingFang incorrectly.
2137         https://bugs.webkit.org/show_bug.cgi?id=177345
2138         <rdar://problem/32975942>
2139
2140         Reviewed by Jon Lee.
2141
2142         This bug has a fairly insideous cause. In particular, the system font fallback path follows
2143         system conventions, which are not the same as the CSS fallback path. For example, the Chinese
2144         fallback of San Francisco weight 600 is Ping Fang weight 500. This doesn't match our
2145         assumptions in CSS, because Ping Fang does have a 600 weight, which CSS would think is closer.
2146         However, the whole point of system-ui is that it follows the system fallback path, not CSS's.
2147         Therefore, falling back from a bold system-ui request to a non-bold fallback font is correct
2148         and expected, and we shouldn't synthesize bold in this situation.
2149
2150         Test: fast/text/system-ui-chinese-bold-fallback.html
2151
2152         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
2153         (WebCore::FontFamilySpecificationCoreText::fontRanges const):
2154
2155 2017-10-17  Chelsea Pugh  <cpugh@apple.com>
2156
2157         [iOS] Don't turn fields yellow after filling credentials
2158         https://bugs.webkit.org/show_bug.cgi?id=178411
2159
2160         Reviewed by Wenson Hsieh.
2161
2162         * editing/ios/AutofillElements.cpp:
2163         (WebCore::AutofillElements::autofill): We don't want to turn fields yellow when filling the user name
2164         and password. Remove the code that was causing that to happen.
2165
2166 2017-10-16  Andy Estes  <aestes@apple.com>
2167
2168         [Apple Pay] Add subLocality and subAdministrativeArea to ApplePayPaymentContact and ApplePayError
2169         https://bugs.webkit.org/show_bug.cgi?id=178191
2170         <rdar://problem/34906367>
2171
2172         Reviewed by Tim Horton.
2173
2174         Added test cases to http/tests/ssl/applepay/ApplePaySession.html.
2175
2176         * Modules/applepay/ApplePayError.idl:
2177         * Modules/applepay/ApplePayPaymentContact.h:
2178         * Modules/applepay/ApplePayPaymentContact.idl:
2179         * Modules/applepay/ApplePaySessionPaymentRequest.h:
2180         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2181         (WebCore::subLocality):
2182         (WebCore::setSubLocality):
2183         (WebCore::subAdministrativeArea):
2184         (WebCore::setSubAdministrativeArea):
2185         (WebCore::convert):
2186
2187 2017-10-17  Commit Queue  <commit-queue@webkit.org>
2188
2189         Unreviewed, rolling out r223500.
2190         https://bugs.webkit.org/show_bug.cgi?id=178408
2191
2192         Introduced a crash in CSSAnimationController::updateAnimations
2193         (Requested by rniwa on #webkit).
2194
2195         Reverted changeset:
2196
2197         "Resolve ::before and ::after pseudo elements during style
2198         resolution"
2199         https://bugs.webkit.org/show_bug.cgi?id=178339
2200         https://trac.webkit.org/changeset/223500
2201
2202 2017-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
2203
2204         Delete button doesn't fully delete certain emoji
2205         https://bugs.webkit.org/show_bug.cgi?id=178096
2206         <rdar://problem/34785106>
2207
2208         Reviewed by Simon Fraser.
2209
2210         System infrastructure for handling emoji changes every year. Instead of having
2211         custom code to specifically walk over codepoints, we should delegate to the
2212         system handling.
2213
2214         Tests: editing/deleting/delete-emoji.html
2215                editing/deleting/delete-emoji-1.html
2216                editing/deleting/delete-emoji-2.html
2217                editing/deleting/delete-emoji-3.html
2218                editing/deleting/delete-emoji-4.html
2219                editing/deleting/delete-emoji-5.html
2220                editing/deleting/delete-emoji-6.html
2221                editing/deleting/delete-emoji-7.html
2222                editing/deleting/delete-emoji-8.html
2223                editing/deleting/delete-emoji-9.html
2224
2225         * rendering/RenderText.cpp:
2226         (WebCore::RenderText::previousOffset const):
2227         (WebCore::RenderText::previousOffsetForBackwardDeletion const):
2228         (WebCore::RenderText::nextOffset const):
2229         (WebCore::isHangulLVT): Deleted.
2230         (WebCore::isMark): Deleted.
2231         (WebCore::isRegionalIndicator): Deleted.
2232         (WebCore::isInArmenianToLimbuRange): Deleted.
2233
2234 2017-10-17  Youenn Fablet  <youenn@apple.com>
2235
2236         Add preliminary support for fetch event
2237         https://bugs.webkit.org/show_bug.cgi?id=178171
2238
2239         Unreviewed.
2240
2241         * workers/service/FetchEvent.cpp:
2242         (WebCore::FetchEvent::promiseIsSettled): build fix by removing unnecessary captured this at the moment.
2243
2244 2017-10-17  Myles C. Maxfield  <mmaxfield@apple.com>
2245
2246         [CSS Font Loading] Fonts are erroneously invisible when the policy says they should be visible
2247         https://bugs.webkit.org/show_bug.cgi?id=178238
2248
2249         Reviewed by Simon Fraser.
2250
2251         When implementing font-display, I added testing infrastructure (so we don't have to wait for
2252         3 second timeouts to occur). This testing infrastructure covered up a real bug where the wrong
2253         font would be reported to CSSFontAccessor. This patch reverts the erroneous testing
2254         infrastructure and replaces it with a real fix to the problem. The replacement fix is covered
2255         by the same tests that I wrote when implementing the feature.
2256
2257         Covered by existing tests.
2258
2259         * css/CSSFontFace.cpp:
2260         (WebCore::CSSFontFace::pump):
2261         (WebCore::visibility):
2262         (WebCore::CSSFontFace::font):
2263
2264 2017-10-16  Sam Weinig  <sam@webkit.org>
2265
2266         [Settings] Generate Settings.h/cpp
2267         https://bugs.webkit.org/show_bug.cgi?id=178361
2268
2269         Reviewed by Dean Jackson.
2270
2271         This change generates Settings.h and Settings.cpp exactly as they are,
2272         using SettingsMacros.h and everything. In follow up changes, the use of
2273         SettingsMacros.h will be removed.
2274
2275         * CMakeLists.txt:
2276         * DerivedSources.make:
2277         * Scripts/GenerateSettings.py:
2278         * Scripts/GenerateSettings/GenerateSettings.py:
2279         * Scripts/GenerateSettings/GenerateSettingsHeaderFile.py: Added.
2280         * Scripts/GenerateSettings/GenerateSettingsImplementationFile.py: Added.
2281         * WebCore.xcodeproj/project.pbxproj:
2282         * WebCoreMacros.cmake:
2283         * page/Settings.cpp: Removed.
2284         * page/Settings.h: Removed.
2285
2286 2017-10-17  Ms2ger  <Ms2ger@igalia.com>
2287
2288         Create bindings for WebGL2's versions of texSubImage2D.
2289         https://bugs.webkit.org/show_bug.cgi?id=178382
2290
2291         Reviewed by Ryosuke Niwa.
2292
2293         Create bindings for WebGL2's versions of texSubImage2D.
2294
2295         No new tests: not much point in adding tests now; this method doesn't
2296         do anything anyway.
2297
2298         * html/canvas/WebGL2RenderingContext.cpp:
2299         (WebCore::WebGL2RenderingContext::texSubImage2D):
2300         * html/canvas/WebGL2RenderingContext.h:
2301         * html/canvas/WebGL2RenderingContext.idl:
2302         * html/canvas/WebGLRenderingContext.idl:
2303         * html/canvas/WebGLRenderingContextBase.idl:
2304
2305 2017-10-17  Zalan Bujtas  <zalan@apple.com>
2306
2307         [FrameView::layout cleanup] Subtree should read subtreeLayout.
2308         https://bugs.webkit.org/show_bug.cgi?id=178401
2309
2310         Reviewed by Simon Fraser.
2311
2312         Rename some variables to improve readability.
2313
2314         No change in functionality.
2315
2316         * page/FrameView.cpp:
2317         (WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
2318         (WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
2319         (WebCore::SubtreeLayoutStateMaintainer::shouldDisableLayoutStateForSubtree):
2320         (WebCore::FrameView::reset):
2321         (WebCore::FrameView::willDestroyRenderTree):
2322         (WebCore::FrameView::didDestroyRenderTree):
2323         (WebCore::FrameView::calculateScrollbarModesForLayout):
2324         (WebCore::FrameView::layout):
2325         (WebCore::FrameView::convertSubtreeLayoutToFullLayout):
2326         (WebCore::FrameView::scheduleRelayout):
2327         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2328         (WebCore::FrameView::needsLayout const):
2329         (WebCore::FrameView::autoSizeIfEnabled):
2330         * page/FrameView.h:
2331
2332 2017-10-16  Dean Jackson  <dino@apple.com>
2333
2334         WebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
2335         https://bugs.webkit.org/show_bug.cgi?id=178223
2336         <rdar://problem/34597567>
2337
2338         Reviewed by Antoine Quint.
2339
2340         Remove the limit of 4k on the width/height of the renderbuffer.
2341
2342         Test: fast/canvas/webgl/large-drawing-buffer-resize.html
2343
2344         * html/canvas/WebGLRenderingContextBase.cpp:
2345         (WebCore::WebGLRenderingContextBase::reshape):
2346
2347 2017-10-17  John Wilander  <wilander@apple.com>
2348
2349         Add and remove cookie partition accordingly in intermediary redirect requests
2350         https://bugs.webkit.org/show_bug.cgi?id=178369
2351         <rdar://problem/34467603>
2352
2353         Reviewed by Brent Fulgham.
2354
2355         Tests: http/tests/resourceLoadStatistics/add-partitioning-to-redirect.html
2356                http/tests/resourceLoadStatistics/remove-partitioning-from-redirect.html
2357
2358         * loader/ResourceLoadObserver.h:
2359             Now exposes notifyObserver() so that it can be triggered
2360             by the TestRunner.
2361             Removed unimplemented ResourceLoadObserver::setShouldThrottleObserverNotifications().
2362
2363 2017-10-17  Jer Noble  <jer.noble@apple.com>
2364
2365         Corrupted image after looping movie-backed <img>.
2366         https://bugs.webkit.org/show_bug.cgi?id=178398
2367
2368         Reviewed by Eric Carlson.
2369
2370         Use the decode-order sample cursor rather than the destination sample cursor when generating
2371         the CMSampleBuffer to decode.
2372
2373         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
2374         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
2375
2376 2017-10-17  Ryan Haddad  <ryanhaddad@apple.com>
2377
2378         Unreviewed, rolling out r223459.
2379
2380         This change introduced LayoutTest failures.
2381
2382         Reverted changeset:
2383
2384         "WebGL clamps drawingBufferWidth to 4096 pixels on a 5120
2385         monitor/canvas"
2386         https://bugs.webkit.org/show_bug.cgi?id=178223
2387         https://trac.webkit.org/changeset/223459
2388
2389 2017-10-17  Youenn Fablet  <youenn@apple.com>
2390
2391         Add preliminary support for fetch event
2392         https://bugs.webkit.org/show_bug.cgi?id=178171
2393
2394         Reviewed by Chris Dumez.
2395
2396         Test: http/wpt/service-workers/fetchEvent.https.html
2397               http/wpt/service-workers/extendableEvent.https.html
2398
2399         Adding support for ExtendableEvent and FetchEvent as per 
2400         https://w3c.github.io/ServiceWorker/v1/#extendableevent-interface and
2401         https://w3c.github.io/ServiceWorker/v1/#fetchevent-interface.
2402
2403         Both events need to handle promises as method parameters.
2404         Beefing up DOMPromise for that purpose by exposing status, result and being able to call then.
2405         Adding a new DOMPromise create method that would be the base for https://heycam.github.io/webidl/#es-promise
2406         which might be implemented in the binding generator as a follow-up.
2407
2408         This patch makes them exposed on Window for test purposes until they can be fully tested on ServiceWorker environment.
2409         It is also adding two internal methods for the same reason. These should be removed once events can be tested in its environment.
2410
2411         * CMakeLists.txt:
2412         * DerivedSources.make:
2413         * Modules/fetch/FetchResponse.idl:
2414         * WebCore.xcodeproj/project.pbxproj:
2415         * bindings/js/JSDOMPromise.cpp: Added.
2416         (WebCore::callFunction):
2417         (WebCore::DOMPromise::create):
2418         (WebCore::DOMPromise::whenSettled):
2419         (WebCore::DOMPromise::result const):
2420         (WebCore::DOMPromise::status const):
2421         * bindings/js/JSDOMPromise.h:
2422         * bindings/js/WebCoreBuiltinNames.h:
2423         * dom/EventNames.in:
2424         * testing/Internals.cpp:
2425         (WebCore::Internals::waitFetchEventToFinish):
2426         (WebCore::Internals::waitExtendableEventToFinish):
2427         * testing/Internals.h:
2428         * testing/Internals.idl:
2429         * workers/service/ExtendableEvent.cpp: Added.
2430         (WebCore::ExtendableEvent::ExtendableEvent):
2431         (WebCore::ExtendableEvent::waitUntil):
2432         (WebCore::ExtendableEvent::addPendingPromise):
2433         * workers/service/ExtendableEvent.h:
2434         (WebCore::ExtendableEvent::onFinishedWaiting):
2435         (WebCore::ExtendableEvent::promiseSettled):
2436         * workers/service/ExtendableEvent.idl: Added.
2437         * workers/service/ExtendableEventInit.h: Added.
2438         * workers/service/ExtendableEventInit.idl: Added.
2439         * workers/service/FetchEvent.cpp: Added.
2440         (WebCore::FetchEvent::FetchEvent):
2441         (WebCore::FetchEvent::respondWith):
2442         (WebCore::FetchEvent::onResponse):
2443         (WebCore::FetchEvent::respondWithError):
2444         (WebCore::FetchEvent::processResponse):
2445         (WebCore::FetchEvent::promiseSettled):
2446         * workers/service/FetchEvent.h:
2447         * workers/service/FetchEvent.idl:
2448
2449 2017-10-17  Jer Noble  <jer.noble@apple.com>
2450
2451         Leak of one AVSampleCursor inside ImageDecoderAVFObjC::createFrameImageAtIndex()
2452         https://bugs.webkit.org/show_bug.cgi?id=178397
2453
2454         Reviewed by Eric Carlson.
2455
2456         Explicitly wrap the return value of -copy in a RetainPtr.
2457
2458         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
2459         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
2460
2461 2017-10-17  Youenn Fablet  <youenn@apple.com>
2462
2463         Cache API implementation should be able to compute storage size for WebKit client applications.
2464         https://bugs.webkit.org/show_bug.cgi?id=178350
2465
2466         Reviewed by Chris Dumez.
2467
2468         * page/SecurityOriginData.h:
2469         (WebCore::SecurityOriginData::equals const):
2470
2471 2017-10-17  Daniel Bates  <dabates@apple.com>
2472
2473         ASSERTION FAILED: m_truncation != cFullTruncation in InlineTextBox::clampedOffset()
2474         https://bugs.webkit.org/show_bug.cgi?id=178322
2475
2476         Reviewed by Darin Adler.
2477
2478         It is acceptable for InlineTextBox::clampedOffset() to be called for a fully truncated box,
2479         say a person clicks on the ellipsis in a truncated text run. Restore the behavior prior to
2480         r223259 and return the clamped offset.
2481
2482         Test: fast/text/click-ellipsis-assertion-failure.html
2483
2484         * rendering/InlineTextBox.cpp:
2485         (WebCore::InlineTextBox::clampedOffset const):
2486
2487 2017-10-17  Daniel Bates  <dabates@apple.com>
2488
2489         REGRESSION (r222670 and r222732): RTL truncated text may not be drawn
2490         https://bugs.webkit.org/show_bug.cgi?id=178278
2491         <rdar://problem/34982818>
2492
2493         Reviewed by Darin Adler.
2494
2495         Revert r222732 and partially revert r222670. The underlying font rendering machinery implements
2496         text truncation by taking a TextRun object that represents all of the text in the line fragment
2497         and a subrange of the glyphs to render from this fragment. Only the glyphs in this subrange are
2498         drawn and they are drawn in the same position they would be in had the entire line fragment been
2499         drawn. Following r222670 InlineTextBox applies the truncation to the TextRun in InlineTextBox::text().
2500         Together with r222732, which assumed that the number of glyphs to draw is equal to the length of
2501         the TextRun, a truncated text run would be drawn at the wrong position on screen and could give
2502         the impression that the text is not drawn. Instead InlineTextBox::text() should always return
2503         the text for the entire line fragment without considering truncation and when calling TextPainter::paint()
2504         we need to pass the truncated length of the line fragment.
2505
2506         Test: fast/text/ellipsis-text-rtl.html
2507
2508         * rendering/InlineTextBox.cpp:
2509         (WebCore::InlineTextBox::paint): Compute the truncated length (number of glyphs) and pass this
2510         to TextPainter::paint()
2511         (WebCore::InlineTextBox::text const): Do not apply truncation to the text run. Truncation is
2512         implemented by telling the underlying font rendering machinery to paint the subrange of the
2513         text run that represents the non-truncated (visible) text.
2514         * rendering/InlineTextBox.h:
2515         * rendering/SimpleLineLayoutFunctions.cpp:
2516         (WebCore::SimpleLineLayout::paintFlow): Pass the entire length of the text run as we did prior
2517         to r222732.
2518         * rendering/TextPainter.cpp:
2519         (WebCore::TextPainter::paint): Take a length that represents the number of glyphs to draw from
2520         the text run as we use to take prior to r222732.
2521         * rendering/TextPainter.h:
2522
2523 2017-10-17  Zalan Bujtas  <zalan@apple.com>
2524
2525         [FrameView::layout cleanup] Move text auto sizing logic to a separate function
2526         https://bugs.webkit.org/show_bug.cgi?id=178391
2527         <rdar://problem/35030264>
2528
2529         Reviewed by Antti Koivisto.
2530
2531         No change in functionality.
2532
2533         * page/FrameView.cpp:
2534         (WebCore::applyTextSizingIfNeeded):
2535         (WebCore::FrameView::layout):
2536
2537 2017-10-17  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
2538
2539         [Curl] Forward declaration "class Cookie;" in CookieJarCurl.h should be "struct Cookie;"
2540         https://bugs.webkit.org/show_bug.cgi?id=178378
2541
2542         Reviewed by Per Arne Vollan.
2543
2544         No new tests. No change in behaviors.
2545
2546         * platform/network/curl/CookieJarCurl.h:
2547
2548 2017-10-17  Zalan Bujtas  <zalan@apple.com>
2549
2550         [FrameView::layout cleanup] Merge InPreLayout blocks
2551         https://bugs.webkit.org/show_bug.cgi?id=178373
2552
2553         Reviewed by Antti Koivisto.
2554
2555         Remove redundant comment and scoping.
2556
2557         No change in functionality.
2558
2559         * page/FrameView.cpp:
2560         (WebCore::FrameView::layout):
2561
2562 2017-10-17  Antti Koivisto  <antti@apple.com>
2563
2564         Text nodes with display:contents parent should render as if they were wrapped in an unstyled <span>
2565         https://bugs.webkit.org/show_bug.cgi?id=178332
2566
2567         Reviewed by Ryosuke Niwa.
2568
2569         According to https://github.com/w3c/csswg-drafts/issues/1118
2570
2571             <div style="display:contents;color:green">text</div>
2572
2573         must result in green text even though div doesn't generate a box.
2574
2575         This patch implements the behavior by wrapping text renderers with display:contents parent element
2576         in an anonymous inline box that receives its style by inheriting from the parent element.
2577
2578         * dom/Document.cpp:
2579         (WebCore::Document::updateTextRenderer):
2580         * rendering/RenderElement.cpp:
2581         (WebCore::RenderElement::computeFirstLineStyle const):
2582
2583             Synthesize the first line style in display:contents parent case.
2584
2585         * rendering/RenderObject.cpp:
2586         (WebCore::findDestroyRootIncludingAnonymous):
2587
2588             Factor into a function.
2589
2590         (WebCore::RenderObject::removeFromParentAndDestroyCleaningUpAnonymousWrappers):
2591
2592             Get rid of the anonymous wrapper if it exists.
2593
2594         * rendering/RenderText.cpp:
2595         (WebCore::inlineWrapperForDisplayContentsMap):
2596         (WebCore::RenderText::RenderText):
2597         (WebCore::RenderText::willBeDestroyed):
2598         (WebCore::RenderText::inlineWrapperForDisplayContents):
2599         (WebCore::RenderText::setInlineWrapperForDisplayContents):
2600
2601             Add a weak member (implemented as a rare data map) for holding the wrapper pointer.
2602
2603         (WebCore::RenderText::findByDisplayContentsInlineWrapperCandidate):
2604
2605             Helper to get the text renderer for a wrapper.
2606
2607         * rendering/RenderText.h:
2608         * style/RenderTreeUpdater.cpp:
2609         (WebCore::createTextRenderer):
2610         (WebCore::RenderTreeUpdater::updateTextRenderer):
2611
2612             Create the wrapper if needed.
2613
2614         * style/StyleTreeResolver.cpp:
2615         (WebCore::Style::TreeResolver::resolveComposedTree):
2616
2617             Compute the wrapper style by inheriting from the display:contents parent.
2618
2619         * style/StyleUpdate.h:
2620         (WebCore::Style::TextUpdate::TextUpdate):
2621
2622 2017-10-17  Alicia Boya García  <aboya@igalia.com>
2623
2624         [MSE][GStreamer] Insert parser elements in AppendPipeline when demuxing opus or Vorbis
2625         https://bugs.webkit.org/show_bug.cgi?id=178076
2626
2627         Reviewed by Xabier Rodriguez-Calvar.
2628
2629         YouTube does not include durations in the WebM container for files
2630         containing Opus audio, so we need to read them from the contained
2631         stream. Fortunately, GStreamer has an element to do that: opusparse.
2632
2633         The same thing happens with Vorbis contained in WebM files from the
2634         W3C tests, which should also be fixed by the GStreamer element
2635         vorbisparse.
2636
2637         This patch adds an opusparse or vorbisparse element to the
2638         AppendPipeline at the sinkpad of the demuxer when either is found.
2639
2640         Tests: updated expectations.
2641
2642         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2643         (WebCore::AppendPipeline::appsinkNewSample):
2644         (WebCore::createOptionalParserForFormat):
2645         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
2646         (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
2647         * platform/graphics/gstreamer/mse/AppendPipeline.h:
2648         * platform/graphics/gstreamer/mse/GStreamerMediaSample.cpp:
2649         (WebCore::GStreamerMediaSample::GStreamerMediaSample):
2650         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
2651         (WebCore::PlaybackPipeline::attachTrack):
2652
2653 2017-10-17  Ms2ger  <Ms2ger@igalia.com>
2654
2655         Add WebGL2 texImage3D overloads.
2656         https://bugs.webkit.org/show_bug.cgi?id=178119
2657
2658         Reviewed by Ryosuke Niwa.
2659
2660         No new tests: not much point in adding tests now; this method doesn't
2661         do anything anyway.
2662
2663         * html/canvas/WebGL2RenderingContext.cpp:
2664         (WebCore::WebGL2RenderingContext::texImage3D):
2665         * html/canvas/WebGL2RenderingContext.h:
2666         * html/canvas/WebGL2RenderingContext.idl:
2667
2668 2017-10-17  Antti Koivisto  <antti@apple.com>
2669
2670         Resolve ::before and ::after pseudo elements during style resolution
2671         https://bugs.webkit.org/show_bug.cgi?id=178339
2672
2673         Reviewed by Ryosuke Niwa.
2674
2675         They are currently resolved during render tree building which creates problems with display:contents and animations.
2676
2677         * dom/PseudoElement.cpp:
2678         (WebCore::PseudoElement::PseudoElement):
2679
2680             Call InspectorInstrumentation from constructor.
2681
2682         * style/RenderTreeUpdater.cpp:
2683         (WebCore::RenderTreeUpdater::Parent::Parent):
2684         (WebCore::RenderTreeUpdater::updateRenderTree):
2685         (WebCore::RenderTreeUpdater::pushParent):
2686
2687             Push the full update to the parent stack.
2688
2689         (WebCore::RenderTreeUpdater::popParent):
2690         (WebCore::RenderTreeUpdater::updateBeforeDescendants):
2691         (WebCore::RenderTreeUpdater::updateAfterDescendants):
2692         (WebCore::RenderTreeUpdater::invalidateWhitespaceOnlyTextSiblingsAfterAttachIfNeeded):
2693         * style/RenderTreeUpdater.h:
2694         * style/RenderTreeUpdaterGeneratedContent.cpp:
2695         (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
2696
2697             No need to resolve pseudo style, we have it already.
2698
2699         (WebCore::RenderTreeUpdater::GeneratedContent::needsPseudoElement):
2700         (WebCore::RenderTreeUpdater::GeneratedContent::updateBeforePseudoElement): Deleted.
2701         (WebCore::RenderTreeUpdater::GeneratedContent::updateAfterPseudoElement): Deleted.
2702         * style/RenderTreeUpdaterGeneratedContent.h:
2703         * style/StyleTreeResolver.cpp:
2704         (WebCore::Style::TreeResolver::resolveElement):
2705         (WebCore::Style::TreeResolver::resolvePseudoStyle):
2706
2707             Resolve pseudos.
2708
2709         (WebCore::Style::TreeResolver::createAnimatedElementUpdate):
2710
2711             Make a private member function.
2712
2713         (WebCore::Style::TreeResolver::resolveComposedTree):
2714         * style/StyleTreeResolver.h:
2715         * style/StyleUpdate.cpp:
2716         (WebCore::Style::Update::elementUpdates const):
2717         (WebCore::Style::Update::elementUpdates):
2718
2719             Bundle the style update for an element and the associated before/after pseudos.
2720
2721         (WebCore::Style::Update::elementStyle const):
2722         (WebCore::Style::Update::elementStyle):
2723         (WebCore::Style::Update::addElement):
2724         (WebCore::Style::Update::elementUpdate const): Deleted.
2725         (WebCore::Style::Update::elementUpdate): Deleted.
2726         * style/StyleUpdate.h:
2727
2728 2017-10-17  Keith Miller  <keith_miller@apple.com>
2729
2730         Change WebCore sources to work with unified source builds
2731         https://bugs.webkit.org/show_bug.cgi?id=178229
2732
2733         Rubber stamped by Tim Horton.
2734
2735         This patch does the following:
2736
2737         1) Move all “using namespace <name>;” into the WebCore namespace
2738         (They used to go in the global namespace) and change to "using
2739         WebCore::<name>;” in .mm files.
2740
2741         2) Move a bunch of the soft linking library/framework macros out
2742         of the .mm files since those caused name collision problems.
2743
2744         3) Fix minor other naming collisions.
2745
2746         The problem with 1 in a unified source world is generic names
2747         often collide with system header names. For example, WebCore has a
2748         Rect class and that collided with a system header type elsewhere.
2749
2750         This patch shouldn't change behavior so no new tests.
2751
2752         * Configurations/FeatureDefines.xcconfig:
2753         * Modules/cache/CacheStorageConnection.cpp:
2754         * Modules/cache/DOMCache.cpp:
2755         * Modules/cache/DOMCacheStorage.cpp:
2756         * Modules/cache/WorkerCacheStorageConnection.cpp:
2757         * Modules/encryptedmedia/InitDataRegistry.cpp:
2758         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
2759         * Modules/indexeddb/IDBCursor.cpp:
2760         * Modules/indexeddb/IDBFactory.cpp:
2761         * Modules/indexeddb/IDBIndex.cpp:
2762         * Modules/indexeddb/IDBKeyRange.cpp:
2763         * Modules/indexeddb/IDBObjectStore.cpp:
2764         * Modules/indexeddb/IDBRequest.cpp:
2765         * Modules/indexeddb/IDBTransaction.cpp:
2766         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2767         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2768         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2769         * Modules/mediasource/MediaSource.cpp:
2770         (WebCore::MediaSource::setReadyState):
2771         (WebCore::toString): Deleted.
2772         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
2773         * Modules/plugins/QuickTimePluginReplacement.mm:
2774         (WebCore::jsValueWithAVMetadataItemInContext):
2775         * Modules/webdriver/NavigatorWebDriver.cpp:
2776         * PlatformAppleWin.cmake:
2777         * PlatformMac.cmake:
2778         * WebCore.xcodeproj/project.pbxproj:
2779         * accessibility/ios/AccessibilityObjectIOS.mm:
2780         (-[WAKView accessibilityIsIgnored]): Deleted.
2781         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
2782         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2783         (-[WAKView accessibilityIsIgnored]):
2784         * accessibility/win/AXObjectCacheWin.cpp:
2785         * bindings/js/CommonVM.cpp:
2786         * bindings/js/DOMWrapperWorld.cpp:
2787         * bindings/js/GCController.cpp:
2788         * bindings/js/IDBBindingUtilities.cpp:
2789         * bindings/js/JSAudioTrackCustom.cpp:
2790         * bindings/js/JSAudioTrackListCustom.cpp:
2791         * bindings/js/JSBlobCustom.cpp:
2792         * bindings/js/JSCSSRuleCustom.cpp:
2793         * bindings/js/JSCSSRuleListCustom.cpp:
2794         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2795         * bindings/js/JSCallbackData.cpp:
2796         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
2797         * bindings/js/JSCustomElementInterface.cpp:
2798         * bindings/js/JSCustomElementRegistryCustom.cpp:
2799         * bindings/js/JSCustomEventCustom.cpp:
2800         * bindings/js/JSDOMBindingSecurity.cpp:
2801         * bindings/js/JSDOMBuiltinConstructorBase.cpp:
2802         * bindings/js/JSDOMConstructorBase.cpp:
2803         * bindings/js/JSDOMConstructorWithDocument.cpp:
2804         * bindings/js/JSDOMConvertDate.cpp:
2805         * bindings/js/JSDOMConvertNumbers.cpp:
2806         * bindings/js/JSDOMConvertStrings.cpp:
2807         * bindings/js/JSDOMConvertWebGL.cpp:
2808         * bindings/js/JSDOMExceptionHandling.cpp:
2809         * bindings/js/JSDOMGlobalObject.cpp:
2810         * bindings/js/JSDOMGlobalObjectTask.cpp:
2811         * bindings/js/JSDOMGuardedObject.cpp:
2812         * bindings/js/JSDOMPromiseDeferred.cpp:
2813         * bindings/js/JSDOMQuadCustom.cpp:
2814         * bindings/js/JSDOMWindowBase.cpp:
2815         * bindings/js/JSDOMWindowCustom.cpp:
2816         * bindings/js/JSDOMWindowProxy.cpp:
2817         * bindings/js/JSDOMWrapper.cpp:
2818         * bindings/js/JSDOMWrapperCache.cpp:
2819         * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
2820         * bindings/js/JSDocumentCustom.cpp:
2821         * bindings/js/JSDocumentFragmentCustom.cpp:
2822         * bindings/js/JSElementCustom.cpp:
2823         * bindings/js/JSErrorHandler.cpp:
2824         * bindings/js/JSEventCustom.cpp:
2825         * bindings/js/JSEventListener.cpp:
2826         * bindings/js/JSEventTargetCustom.cpp:
2827         * bindings/js/JSFileSystemEntryCustom.cpp:
2828         * bindings/js/JSHTMLCollectionCustom.cpp:
2829         * bindings/js/JSHTMLDocumentCustom.cpp:
2830         * bindings/js/JSHTMLTemplateElementCustom.cpp:
2831         * bindings/js/JSHistoryCustom.cpp:
2832         * bindings/js/JSIDBCursorCustom.cpp:
2833         * bindings/js/JSIDBCursorWithValueCustom.cpp:
2834         * bindings/js/JSIDBIndexCustom.cpp:
2835         * bindings/js/JSIDBObjectStoreCustom.cpp:
2836         * bindings/js/JSIDBTransactionCustom.cpp:
2837         * bindings/js/JSImageDataCustom.cpp:
2838         * bindings/js/JSLazyEventListener.cpp:
2839         * bindings/js/JSLocationCustom.cpp:
2840         * bindings/js/JSMediaStreamCapabilitiesCustom.cpp:
2841         * bindings/js/JSMessageEventCustom.cpp:
2842         * bindings/js/JSMessagePortCustom.cpp:
2843         * bindings/js/JSMutationObserverCustom.cpp:
2844         * bindings/js/JSNodeCustom.cpp:
2845         * bindings/js/JSNodeListCustom.cpp:
2846         * bindings/js/JSPerformanceEntryCustom.cpp:
2847         * bindings/js/JSPluginElementFunctions.cpp:
2848         * bindings/js/JSPopStateEventCustom.cpp:
2849         * bindings/js/JSReadableStreamPrivateConstructors.cpp:
2850         * bindings/js/JSReadableStreamSourceCustom.cpp:
2851         * bindings/js/JSSVGPathSegCustom.cpp:
2852         * bindings/js/JSTextTrackCueCustom.cpp:
2853         * bindings/js/JSTextTrackCustom.cpp:
2854         * bindings/js/JSTextTrackListCustom.cpp:
2855         * bindings/js/JSTrackCustom.cpp:
2856         * bindings/js/JSVideoTrackCustom.cpp:
2857         * bindings/js/JSVideoTrackListCustom.cpp:
2858         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
2859         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2860         * bindings/js/JSWebGPURenderPassAttachmentDescriptorCustom.cpp:
2861         * bindings/js/JSWebGPURenderingContextCustom.cpp:
2862         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2863         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
2864         * bindings/js/JSXMLHttpRequestCustom.cpp:
2865         * bindings/js/JSXPathNSResolverCustom.cpp:
2866         * bindings/js/ReadableStream.cpp:
2867         (WebCore::ReadableStream::pipeTo):
2868         (WebCore::ReadableStream::tee):
2869         (WebCore::checkReadableStream):
2870         (WebCore::callFunction): Deleted.
2871         * bindings/js/ScheduledAction.cpp:
2872         * bindings/js/ScriptCachedFrameData.cpp:
2873         * bindings/js/ScriptController.cpp:
2874         * bindings/js/SerializedScriptValue.cpp:
2875         * bindings/js/StructuredClone.cpp:
2876         * bindings/js/WebCoreJSClientData.cpp:
2877         * bindings/js/WorkerScriptController.cpp:
2878         * bindings/scripts/CodeGeneratorJS.pm:
2879         (GenerateEnumerationImplementation):
2880         (GenerateImplementation):
2881         (GenerateDictionaryImplementation):
2882         (GenerateCallbackFunctionImplementation):
2883         (GenerateCallbackInterfaceImplementation):
2884         * bindings/scripts/test/JS/JSInterfaceName.cpp:
2885         * bindings/scripts/test/JS/JSMapLike.cpp:
2886         * bindings/scripts/test/JS/JSReadOnlyMapLike.cpp:
2887         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2888         * bindings/scripts/test/JS/JSTestCEReactions.cpp:
2889         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
2890         * bindings/scripts/test/JS/JSTestCallTracer.cpp:
2891         * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
2892         * bindings/scripts/test/JS/JSTestCallbackFunctionRethrow.cpp:
2893         * bindings/scripts/test/JS/JSTestCallbackFunctionWithThisObject.cpp:
2894         * bindings/scripts/test/JS/JSTestCallbackFunctionWithTypedefs.cpp:
2895         * bindings/scripts/test/JS/JSTestCallbackInterface.cpp:
2896         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp:
2897         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2898         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
2899         * bindings/scripts/test/JS/JSTestEnabledBySetting.cpp:
2900         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2901         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2902         * bindings/scripts/test/JS/JSTestException.cpp:
2903         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2904         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
2905         * bindings/scripts/test/JS/JSTestIndexedSetterNoIdentifier.cpp:
2906         * bindings/scripts/test/JS/JSTestIndexedSetterThrowingException.cpp:
2907         * bindings/scripts/test/JS/JSTestIndexedSetterWithIdentifier.cpp:
2908         * bindings/scripts/test/JS/JSTestInterface.cpp:
2909         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp:
2910         * bindings/scripts/test/JS/JSTestIterable.cpp:
2911         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
2912         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2913         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterNoIdentifier.cpp:
2914         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterThrowingException.cpp:
2915         * bindings/scripts/test/JS/JSTestNamedAndIndexedSetterWithIdentifier.cpp:
2916         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2917         * bindings/scripts/test/JS/JSTestNamedDeleterNoIdentifier.cpp:
2918         * bindings/scripts/test/JS/JSTestNamedDeleterThrowingException.cpp:
2919         * bindings/scripts/test/JS/JSTestNamedDeleterWithIdentifier.cpp:
2920         * bindings/scripts/test/JS/JSTestNamedDeleterWithIndexedGetter.cpp:
2921         * bindings/scripts/test/JS/JSTestNamedGetterCallWith.cpp:
2922         * bindings/scripts/test/JS/JSTestNamedGetterNoIdentifier.cpp:
2923         * bindings/scripts/test/JS/JSTestNamedGetterWithIdentifier.cpp:
2924         * bindings/scripts/test/JS/JSTestNamedSetterNoIdentifier.cpp:
2925         * bindings/scripts/test/JS/JSTestNamedSetterThrowingException.cpp:
2926         * bindings/scripts/test/JS/JSTestNamedSetterWithIdentifier.cpp:
2927         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetter.cpp:
2928         * bindings/scripts/test/JS/JSTestNamedSetterWithIndexedGetterAndSetter.cpp:
2929         * bindings/scripts/test/JS/JSTestNamedSetterWithOverrideBuiltins.cpp:
2930         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgableProperties.cpp:
2931         * bindings/scripts/test/JS/JSTestNamedSetterWithUnforgablePropertiesAndOverrideBuiltins.cpp:
2932         * bindings/scripts/test/JS/JSTestNode.cpp:
2933         * bindings/scripts/test/JS/JSTestObj.cpp:
2934         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2935         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
2936         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
2937         * bindings/scripts/test/JS/JSTestPluginInterface.cpp:
2938         * bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
2939         * bindings/scripts/test/JS/JSTestSerialization.cpp:
2940         * bindings/scripts/test/JS/JSTestSerializationIndirectInheritance.cpp:
2941         * bindings/scripts/test/JS/JSTestSerializationInherit.cpp:
2942         * bindings/scripts/test/JS/JSTestSerializationInheritFinal.cpp:
2943         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2944         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2945         * bindings/scripts/test/JS/JSTestStandaloneEnumeration.cpp:
2946         * bindings/scripts/test/JS/JSTestStringifier.cpp:
2947         * bindings/scripts/test/JS/JSTestStringifierAnonymousOperation.cpp:
2948         * bindings/scripts/test/JS/JSTestStringifierNamedOperation.cpp:
2949         * bindings/scripts/test/JS/JSTestStringifierOperationImplementedAs.cpp:
2950         * bindings/scripts/test/JS/JSTestStringifierOperationNamedToString.cpp:
2951         * bindings/scripts/test/JS/JSTestStringifierReadOnlyAttribute.cpp:
2952         * bindings/scripts/test/JS/JSTestStringifierReadWriteAttribute.cpp:
2953         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2954         * bindings/scripts/test/JS/JSTestVoidCallbackFunction.cpp:
2955         * bridge/IdentifierRep.cpp:
2956         * bridge/NP_jsobject.cpp:
2957         (ObjectMap::get): Deleted.
2958         (ObjectMap::add): Deleted.
2959         (ObjectMap::remove): Deleted.
2960         (objectMap): Deleted.
2961         (ObjectMap::RootObjectInvalidationCallback::operator()): Deleted.
2962         (getListFromVariantArgs): Deleted.
2963         (jsAllocate): Deleted.
2964         (jsDeallocate): Deleted.
2965         (_NPN_CreateNoScriptObject): Deleted.
2966         (_NPN_InvokeDefault): Deleted.
2967         (_NPN_Invoke): Deleted.
2968         (_NPN_Evaluate): Deleted.
2969         (_NPN_GetProperty): Deleted.
2970         (_NPN_SetProperty): Deleted.
2971         (_NPN_RemoveProperty): Deleted.
2972         (_NPN_HasProperty): Deleted.
2973         (_NPN_HasMethod): Deleted.
2974         (_NPN_SetException): Deleted.
2975         (_NPN_Enumerate): Deleted.
2976         (_NPN_Construct): Deleted.
2977         * bridge/NP_jsobject.h:
2978         * contentextensions/ContentExtensionParser.cpp:
2979         * crypto/SubtleCrypto.cpp:
2980         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
2981         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
2982         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
2983         (WebCore::CryptoAlgorithmAES_CBC::importKey):
2984         (WebCore::CryptoAlgorithmAES_CBC::exportKey):
2985         * crypto/algorithms/CryptoAlgorithmAES_CFB.cpp:
2986         (WebCore::CryptoAlgorithmAES_CFB::encrypt):
2987         (WebCore::CryptoAlgorithmAES_CFB::decrypt):
2988         (WebCore::CryptoAlgorithmAES_CFB::importKey):
2989         (WebCore::CryptoAlgorithmAES_CFB::exportKey):
2990         * crypto/algorithms/CryptoAlgorithmAES_CTR.cpp:
2991         (WebCore::parametersAreValid):
2992         (WebCore::CryptoAlgorithmAES_CTR::importKey):
2993         (WebCore::CryptoAlgorithmAES_CTR::exportKey):
2994         * crypto/algorithms/CryptoAlgorithmAES_GCM.cpp:
2995         (WebCore::tagLengthIsValid):
2996         (WebCore::CryptoAlgorithmAES_GCM::encrypt):
2997         (WebCore::CryptoAlgorithmAES_GCM::decrypt):
2998         (WebCore::CryptoAlgorithmAES_GCM::importKey):
2999         (WebCore::CryptoAlgorithmAES_GCM::exportKey):
3000         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
3001         (WebCore::CryptoAlgorithmAES_KW::importKey):
3002         (WebCore::CryptoAlgorithmAES_KW::exportKey):
3003         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
3004         (WebCore::CryptoAlgorithmHMAC::importKey):
3005         (WebCore::CryptoAlgorithmHMAC::exportKey):
3006         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
3007         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
3008         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):
3009         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
3010         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
3011         (WebCore::CryptoAlgorithmRSA_OAEP::exportKey):
3012         * crypto/algorithms/CryptoAlgorithmRSA_PSS.cpp:
3013         (WebCore::CryptoAlgorithmRSA_PSS::importKey):
3014         (WebCore::CryptoAlgorithmRSA_PSS::exportKey):
3015         * crypto/mac/CryptoAlgorithmPBKDF2Mac.cpp:
3016         (WebCore::CryptoAlgorithmPBKDF2::platformDeriveBits):
3017         (WebCore::commonCryptoHMACAlgorithm): Deleted.
3018         * css/CSSBasicShapes.cpp:
3019         * css/CSSPrimitiveValue.cpp:
3020         * css/parser/CSSParser.cpp:
3021         * css/parser/CSSPropertyParser.cpp:
3022         * css/parser/CSSPropertyParserHelpers.cpp:
3023         (WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues):
3024         (WebCore::CSSPropertyParserHelpers::consumePosition):
3025         (WebCore::CSSPropertyParserHelpers::createPrimitiveValuePair): Deleted.
3026         * dom/DOMQuad.cpp:
3027         * dom/Document.cpp:
3028         * dom/ErrorEvent.cpp:
3029         * dom/EventListenerMap.cpp:
3030         * dom/EventTarget.cpp:
3031         * dom/PromiseRejectionEvent.cpp:
3032         * dom/RejectedPromiseTracker.cpp:
3033         * dom/ScriptExecutionContext.cpp:
3034         * domjit/JSDocumentDOMJIT.cpp:
3035         * domjit/JSDocumentFragmentDOMJIT.cpp:
3036         * domjit/JSElementDOMJIT.cpp:
3037         * domjit/JSEventDOMJIT.cpp:
3038         * domjit/JSNodeDOMJIT.cpp:
3039         * editing/TextIterator.cpp:
3040         * editing/cocoa/HTMLConverter.mm:
3041         * history/CachedPage.cpp:
3042         * html/HTMLCanvasElement.cpp:
3043         * html/HTMLFontElement.cpp:
3044         * html/HTMLMediaElement.cpp:
3045         * html/HTMLSelectElement.cpp:
3046         * html/TypeAhead.cpp:
3047         * html/parser/HTMLSrcsetParser.cpp:
3048         (WebCore::tokenizeDescriptors):
3049         * html/parser/HTMLTokenizer.cpp:
3050         * html/parser/ParsingUtilities.h:
3051         (WebCore::isNotASCIISpace):
3052         * html/parser/XSSAuditorDelegate.cpp:
3053         * html/track/DataCue.cpp:
3054         * inspector/CommandLineAPIHost.cpp:
3055         * inspector/CommandLineAPIModule.cpp:
3056         * inspector/InspectorApplicationCacheAgent.cpp:
3057         * inspector/InspectorCSSAgent.cpp:
3058         * inspector/InspectorCanvas.cpp:
3059         * inspector/InspectorCanvasAgent.cpp:
3060         * inspector/InspectorClient.cpp:
3061         * inspector/InspectorController.cpp:
3062         * inspector/InspectorDOMAgent.cpp:
3063         * inspector/InspectorDOMDebuggerAgent.cpp:
3064         * inspector/InspectorDOMStorageAgent.cpp:
3065         * inspector/InspectorDatabaseAgent.cpp:
3066         * inspector/InspectorDatabaseResource.cpp:
3067         * inspector/InspectorFrontendClientLocal.cpp:
3068         * inspector/InspectorFrontendHost.cpp:
3069         * inspector/InspectorIndexedDBAgent.cpp:
3070         * inspector/InspectorInstrumentation.cpp:
3071         * inspector/InspectorLayerTreeAgent.cpp:
3072         * inspector/InspectorMemoryAgent.cpp:
3073         * inspector/InspectorNetworkAgent.cpp:
3074         * inspector/InspectorOverlay.cpp:
3075         * inspector/InspectorPageAgent.cpp:
3076         * inspector/InspectorShaderProgram.cpp:
3077         * inspector/InspectorStyleSheet.cpp:
3078         * inspector/InspectorTimelineAgent.cpp:
3079         * inspector/InspectorWorkerAgent.cpp:
3080         * inspector/InstrumentingAgents.cpp:
3081         * inspector/NetworkResourcesData.cpp:
3082         * inspector/PageConsoleAgent.cpp:
3083         * inspector/PageDebuggerAgent.cpp:
3084         * inspector/PageHeapAgent.cpp:
3085         * inspector/PageRuntimeAgent.cpp:
3086         * inspector/PageScriptDebugServer.cpp:
3087         * inspector/TimelineRecordFactory.cpp:
3088         * inspector/WebConsoleAgent.cpp:
3089         * inspector/WebDebuggerAgent.cpp:
3090         * inspector/WebHeapAgent.cpp:
3091         * inspector/WebInjectedScriptHost.cpp:
3092         * inspector/WebInjectedScriptManager.cpp:
3093         * inspector/WorkerConsoleAgent.cpp:
3094         * inspector/WorkerDebuggerAgent.cpp:
3095         * inspector/WorkerInspectorController.cpp:
3096         * inspector/WorkerRuntimeAgent.cpp:
3097         * inspector/WorkerScriptDebugServer.cpp:
3098         * loader/FTPDirectoryParser.cpp:
3099         * loader/TextResourceDecoder.cpp:
3100         * loader/cache/CachedResource.cpp:
3101         * loader/cache/CachedResourceLoader.cpp:
3102         * page/ContextMenuController.cpp:
3103         * page/DOMWindow.cpp:
3104         * page/Navigator.cpp:
3105         * page/PageConsoleClient.cpp:
3106         * page/PageDebuggable.cpp:
3107         * page/cocoa/ResourceUsageOverlayCocoa.mm:
3108         * page/csp/ContentSecurityPolicy.cpp:
3109         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
3110         (WebCore::isNotASCIISpace): Deleted.
3111         * page/csp/ContentSecurityPolicyMediaListDirective.cpp:
3112         (WebCore::isNotASCIISpace): Deleted.
3113         * page/scrolling/ios/ScrollingTreeIOS.cpp:
3114         * page/scrolling/ios/ScrollingTreeIOS.h:
3115         * page/scrolling/mac/ScrollingTreeFixedNode.mm:
3116         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
3117         (WebCore::operator*): Deleted.
3118         * page/scrolling/mac/ScrollingTreeStickyNode.mm:
3119         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
3120         (WebCore::operator*): Deleted.
3121         * platform/Length.cpp:
3122         * platform/URL.cpp:
3123         (WebCore::isSchemeFirstChar):
3124         (WebCore::isSchemeChar):
3125         (WebCore::isBadChar):
3126         (WebCore::isTabNewline):
3127         * platform/audio/WebAudioBufferList.cpp:
3128         (WebCore::WebAudioBufferList::WebAudioBufferList):
3129         * platform/audio/mac/AudioSampleDataSource.mm:
3130         (WebCore::AudioSampleDataSource::pushSamples):
3131         * platform/cf/CoreMediaSoftLink.cpp: Removed.
3132         * platform/cf/CoreMediaSoftLink.h: Removed.
3133         * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
3134         * platform/graphics/FloatPolygon.cpp:
3135         (WebCore::areCollinearPoints):
3136         (WebCore::FloatPolygon::FloatPolygon):
3137         (WebCore::VertexPair::intersection const):
3138         (WebCore::determinant): Deleted.
3139         * platform/graphics/FontCache.cpp:
3140         * platform/graphics/FontCascade.cpp:
3141         * platform/graphics/GraphicsContext3DPrivate.cpp:
3142         * platform/graphics/WidthIterator.cpp:
3143         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
3144         (WebCore::AudioSourceProviderAVFObjC::process):
3145         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3146         (WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
3147         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
3148         (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer):
3149         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3150         * platform/graphics/avfoundation/objc/AVAssetTrackUtilities.mm:
3151         (WebCore::assetTrackMeetsHardwareDecodeRequirements):
3152         * platform/graphics/avfoundation/objc/AVFoundationMIMETypeCache.mm:
3153         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
3154         (WebCore::ImageDecoderAVFObjC::readSampleMetadata):
3155         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
3156         (WebCore::ImageDecoderAVFObjC::frameIsCompleteAtIndex const):
3157         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3158         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageGenerator):
3159         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3160         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3161         * platform/graphics/avfoundation/objc/MediaSampleAVFObjC.mm:
3162         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3163         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
3164         * platform/graphics/ca/win/WebTiledBackingLayerWin.cpp:
3165         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3166         * platform/graphics/cairo/ImageBufferCairo.cpp:
3167         * platform/graphics/cg/ImageBufferCG.cpp:
3168         (WebCore::ImageBuffer::ImageBuffer):
3169         (WebCore::releaseImageData): Deleted.
3170         * platform/graphics/cg/ImageBufferDataCG.h:
3171         * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
3172         * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
3173         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3174         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3175         * platform/graphics/ios/DisplayRefreshMonitorIOS.mm:
3176         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3177         * platform/graphics/opentype/OpenTypeMathData.cpp:
3178         * platform/graphics/opentype/OpenTypeVerticalData.cpp:
3179         * platform/graphics/transforms/MatrixTransformOperation.cpp:
3180         (WebCore::MatrixTransformOperation::blend):
3181         (WebCore::createOperation): Deleted.
3182         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
3183         * platform/graphics/win/FontWin.cpp:
3184         * platform/graphics/win/GraphicsContextCGWin.cpp:
3185         * platform/graphics/win/GraphicsContextCairoWin.cpp:
3186         * platform/graphics/win/GraphicsContextDirect2D.cpp:
3187         * platform/graphics/win/GraphicsContextWin.cpp:
3188         * platform/graphics/win/UniscribeController.cpp:
3189         * platform/image-decoders/ScalableImageDecoder.cpp:
3190         (): Deleted.
3191         * platform/ios/LegacyTileLayer.mm:
3192         (-[LegacyTileHostLayer renderInContext:]):
3193         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
3194         * platform/ios/ScrollAnimatorIOS.mm:
3195         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
3196         * platform/ios/WebAVPlayerController.mm:
3197         (-[WebAVPlayerController skipBackwardThirtySeconds:]):
3198         (-[WebAVPlayerController gotoEndOfSeekableRanges:]):
3199         (-[WebAVPlayerController canSeekToBeginning]):
3200         (-[WebAVPlayerController canSeekToEnd]):
3201         (-[WebAVPlayerController observeValueForKeyPath:ofObject:change:context:]):
3202         (-[WebAVPlayerController updateMinMaxTiming]):
3203         * platform/ios/WebEvent.mm:
3204         * platform/ios/WebItemProviderPasteboard.mm:
3205         * platform/ios/wak/WKContentObservation.cpp:
3206         * platform/mac/KeyEventMac.mm:
3207         * platform/mac/PlaybackSessionInterfaceMac.mm:
3208         (WebCore::timeRangesToArray):
3209         * platform/mac/ScrollAnimatorMac.mm:
3210         (macScrollbarTheme): Deleted.
3211         (scrollerImpForScrollbar): Deleted.
3212         * platform/mac/ScrollbarThemeMac.mm:
3213         (WebCore::scrollbarMap):
3214         * platform/mac/VideoFullscreenInterfaceMac.mm:
3215         * platform/mac/WebCoreFullScreenPlaceholderView.mm:
3216         * platform/mac/WebCoreNSURLExtras.mm:
3217         (WebCore::dataForURLComponentType):
3218         * platform/mac/WebPlaybackControlsManager.mm:
3219         * platform/mac/WebVideoFullscreenController.mm:
3220         (SOFT_LINK_CLASS): Deleted.
3221         * platform/mac/WebVideoFullscreenHUDWindowController.mm:
3222         * platform/mac/WebWindowAnimation.mm:
3223         (WebWindowAnimationDurationFromDuration): Deleted.
3224         (scaledRect): Deleted.
3225         (squaredDistance): Deleted.
3226         * platform/mediastream/RealtimeOutgoingVideoSource.cpp:
3227         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
3228         * platform/mediastream/mac/AVMediaCaptureSource.mm:
3229         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3230         (WebCore::AVVideoCaptureSource::applyFrameRate):
3231         (WebCore::AVVideoCaptureSource::processNewFrame):
3232         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
3233         * platform/mediastream/mac/CoreAudioCaptureDevice.cpp:
3234         * platform/mediastream/mac/CoreAudioCaptureDeviceManager.cpp:
3235         * platform/mediastream/mac/CoreAudioCaptureSource.cpp:
3236         * platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
3237         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
3238         (WebCore::MockRealtimeVideoSourceMac::CMSampleBufferFromPixelBuffer):
3239         * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
3240         * platform/mediastream/mac/RealtimeIncomingVideoSourceCocoa.cpp:
3241         * platform/mediastream/mac/RealtimeOutgoingVideoSourceCocoa.cpp:
3242         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
3243         * platform/network/HTTPParsers.cpp:
3244         * platform/text/LocaleICU.cpp:
3245         * platform/text/TextCodecLatin1.cpp:
3246         * platform/text/TextCodecUTF8.cpp:
3247         * platform/text/TextEncodingRegistry.cpp:
3248         * platform/text/win/LocaleWin.cpp:
3249         * platform/win/BString.cpp:
3250         * platform/win/KeyEventWin.cpp:
3251         * platform/win/ScrollbarThemeWin.cpp:
3252         * rendering/BidiRun.cpp:
3253         * rendering/FloatingObjects.cpp:
3254         * rendering/RenderBlock.cpp:
3255         * rendering/RenderListMarker.cpp:
3256         * rendering/RenderQuote.cpp:
3257         * rendering/RenderText.cpp:
3258         * rendering/RenderThemeWin.cpp:
3259         * testing/Internals.cpp:
3260         * testing/js/WebCoreTestSupport.cpp:
3261         * workers/WorkerConsoleClient.cpp:
3262         * workers/WorkerGlobalScope.cpp:
3263         * workers/WorkerInspectorProxy.cpp:
3264         * xml/SoftLinkLibxslt.cpp: Added.
3265         * xml/SoftLinkLibxslt.h: Added.
3266         * xml/XPathGrammar.cpp:
3267         * xml/XPathParser.cpp:
3268         * xml/XSLStyleSheetLibxslt.cpp:
3269         * xml/XSLTExtensions.cpp:
3270         * xml/XSLTProcessorLibxslt.cpp:
3271         * xml/XSLTUnicodeSort.cpp:
3272         (xsltTransformErrorTrampoline):
3273         (WebCore::xsltUnicodeSortFunction):
3274         * xml/parser/XMLDocumentParser.cpp:
3275         (WebCore::XMLDocumentParser::updateLeafTextNode):
3276         (WebCore::toString): Deleted.
3277
3278 2017-10-16  Wenson Hsieh  <wenson_hsieh@apple.com>
3279
3280         Allow reading data and blob URLs via DataTransfer when the pasteboard contains files
3281         https://bugs.webkit.org/show_bug.cgi?id=178377
3282
3283         Reviewed by Ryosuke Niwa.
3284
3285         Adds data and blob URLs, alongside http(s), as URL protocols safe to expose to bindings.
3286
3287         Test: editing/pasteboard/drag-drop-href-as-url.html
3288
3289         * platform/Pasteboard.cpp:
3290         (WebCore::Pasteboard::canExposeURLToDOMWhenPasteboardContainsFiles):
3291
3292 2017-10-16  Ryosuke Niwa  <rniwa@webkit.org>
3293
3294         Strip away event handlers and JavaScript URLs when copying
3295         https://bugs.webkit.org/show_bug.cgi?id=178375
3296
3297         Reviewed by Wenson Hsieh.
3298
3299         Don't serialize event handlers and URLs with javascript protocol when serializing HTML
3300         since they're not safe to be pasted elsewhere.
3301
3302         Test: editing/pasteboard/copying-html-strips-javascript-url-and-event-handler.html
3303
3304         * dom/Element.cpp:
3305         (WebCore::Element::isEventHandlerAttribute const):
3306         (WebCore::isEventHandlerAttribute): Deleted.
3307         * dom/Element.h:
3308         * editing/markup.cpp:
3309         (WebCore::StyledMarkupAccumulator::appendElement):
3310
3311 2017-10-16  Dean Jackson  <dino@apple.com>
3312
3313         WebGL clamps drawingBufferWidth to 4096 pixels on a 5120 monitor/canvas
3314         https://bugs.webkit.org/show_bug.cgi?id=178223
3315         <rdar://problem/34597567>
3316
3317         Reviewed by Antoine Quint.
3318
3319         Remove the limit of 4k on the width/height of the renderbuffer.
3320
3321         Test: fast/canvas/webgl/large-drawing-buffer-resize.html
3322
3323         * html/canvas/WebGLRenderingContextBase.cpp:
3324         (WebCore::WebGLRenderingContextBase::reshape):
3325
3326 2017-10-16  Ryosuke Niwa  <rniwa@webkit.org>
3327
3328         Assert that Node::insertedInto doesn't fire an event
3329         https://bugs.webkit.org/show_bug.cgi?id=178376
3330         <rdar://problem/35022857>
3331
3332         Reviewed by Daniel Bates.
3333
3334         Fixed the assertion in notifyChildNodeInserted since this function MUST NOT dispatch an event,
3335         and moved a bunch of event-dispatching code from Node::insertedInto into Node::finishedInsertingSubtree.
3336
3337         No new tests since the existing tests cover the behavioral change.
3338
3339         * dom/ContainerNodeAlgorithms.cpp:
3340         (WebCore::notifyChildNodeInserted): Fixed the assertion.
3341         * dom/ProcessingInstruction.cpp:
3342         (WebCore::ProcessingInstruction::insertedInto):
3343         (WebCore::ProcessingInstruction::finishedInsertingSubtree): Extracted from insertedInto since
3344         checkStyleSheet can dispatch an event.
3345         * dom/ProcessingInstruction.h:
3346         * html/HTMLBodyElement.cpp:
3347         (WebCore::HTMLBodyElement::insertedInto):
3348         (WebCore::HTMLBodyElement::finishedInsertingSubtree): Extracted from insertedInto since
3349         setIntegralAttribute could dispatch DOMAttrModified synchronously.
3350         * html/HTMLBodyElement.h:
3351
3352 2017-10-16  Chris Dumez  <cdumez@apple.com>
3353
3354         ServiceWorkerRegistration should subclass RefCounted<>
3355         https://bugs.webkit.org/show_bug.cgi?id=178374
3356
3357         Reviewed by Ryosuke Niwa.
3358
3359         ServiceWorkerRegistration should subclass RefCounted<> or we end up with an infinite recursion
3360         when constructing such object. This is because ServiceWorkerRegistration subclasses
3361         EventTargetWithInlineData which implements ref() / deref() by calling refEventTarget() /
3362         derefEventTarget(). refEventTarget() / derefEventTarget() are implemented in
3363         ServiceWorkerRegistration so that they call ref() / deref() (which ends up being EventTarget's
3364         methods).
3365
3366         * workers/service/ServiceWorkerRegistration.h:
3367
3368 2017-10-16  Jer Noble  <jer.noble@apple.com>
3369
3370         ImageDecoderAVFObjC fails to create more CMSampleBuffers after creating about 32MB worth.
3371         https://bugs.webkit.org/show_bug.cgi?id=178360
3372
3373         Reviewed by Eric Carlson.
3374
3375         AVSampleBufferGenerator has a constrained memory pool of about 32MB in size. Once
3376         CMSampleBuffers representing about 32MB of memory are allocated, no more can be created
3377         until previously created ones are released. So rather than (only) creating the sample
3378         buffers up front in readSampleMetadata(), also create them dynamically, if missing, in
3379         createFrameImageAtIndex(...) and release them in storeSampleBuffer(...) after they have been
3380         decoded.
3381
3382         Drive-by fix: the expected content length was never actually set by the owner of ImageDecoderAVFObjC.
3383         Now that the expected content length is available, we don't have to wait until the data is complete
3384         to respond to requests.
3385
3386         * platform/graphics/ImageSource.cpp:
3387         (WebCore::ImageSource::ensureDecoderAvailable):
3388         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.h:
3389         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
3390         (SOFT_LINK_POINTER_OPTIONAL):
3391         (-[WebCoreSharedBufferResourceLoaderDelegate canFulfillRequest:]):
3392         (-[WebCoreSharedBufferResourceLoaderDelegate fulfillRequest:]):
3393         (-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
3394         (WebCore::imageDecoderAssetOptions):
3395         (WebCore::ImageDecoderAVFObjC::firstEnabledTrack):
3396         (WebCore::ImageDecoderAVFObjC::storeSampleBuffer):
3397         (WebCore::ImageDecoderAVFObjC::createFrameImageAtIndex):
3398         (WebCore::ImageDecoderAVFObjC::setExpectedContentSize):
3399
3400 2017-10-12  Matt Rajca  <mrajca@apple.com>
3401
3402         Add API support for quirk that lets an arbitrary click allow auto-play.
3403         https://bugs.webkit.org/show_bug.cgi?id=178227
3404
3405         Reviewed by Alex Christensen.
3406