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