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