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