29032046332d559570170f1ebd1873303d88a8e6
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-06-04  Chris Dumez  <cdumez@apple.com>
2
3         Rename "Cross-Origin-Options" HTTP header to "Cross-Origin-Window-Policy"
4         https://bugs.webkit.org/show_bug.cgi?id=186287
5         <rdar://problem/40783352>
6
7         Reviewed by Youenn Fablet.
8
9         Tests: http/wpt/cross-origin-window-policy/allow-postmessage-from-deny.html
10                http/wpt/cross-origin-window-policy/allow-postmessage.html
11                http/wpt/cross-origin-window-policy/cross-origin-window-policy-header.html
12                http/wpt/cross-origin-window-policy/navigation-from-opener-via-open-target.html
13                http/wpt/cross-origin-window-policy/navigation-from-subframe-via-anchor-target.html
14
15         * bindings/js/JSDOMBindingSecurity.cpp:
16         (WebCore::BindingSecurity::shouldAllowAccessToDOMWindowGivenMinimumCrossOriginWindowPolicy):
17         * bindings/js/JSDOMBindingSecurity.h:
18         * bindings/js/JSDOMWindowCustom.cpp:
19         (WebCore::effectiveCrossOriginWindowPolicyForAccess):
20         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
21         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
22         (WebCore::addCrossOriginWindowPropertyNames):
23         (WebCore::addScopedChildrenIndexes):
24         * bindings/scripts/CodeGeneratorJS.pm:
25         (GenerateAttributeGetterBodyDefinition):
26         (GetCrossOriginsOptionsFromExtendedAttributeValue):
27         (GenerateAttributeSetterBodyDefinition):
28         (GenerateOperationBodyDefinition):
29         * bindings/scripts/IDLAttributes.json:
30         * dom/Document.cpp:
31         (WebCore::Document::canNavigate):
32         * loader/FrameLoader.cpp:
33         (WebCore::FrameLoader::didBeginDocument):
34         * page/AbstractDOMWindow.cpp:
35         (WebCore::AbstractDOMWindow::AbstractDOMWindow):
36         * page/AbstractDOMWindow.h:
37         (WebCore::AbstractDOMWindow::crossOriginWindowPolicy):
38         (WebCore::AbstractDOMWindow::setCrossOriginWindowPolicy):
39         * page/DOMWindow.idl:
40         * page/Settings.yaml:
41         * platform/network/HTTPHeaderNames.in:
42         * platform/network/HTTPParsers.cpp:
43         (WebCore::parseCrossOriginWindowPolicyHeader):
44         * platform/network/HTTPParsers.h:
45
46 2018-06-04  Brent Fulgham  <bfulgham@apple.com>
47
48         REGRESSION(r231291): InputType should hold a WeakPtr to its HTMLInputElement
49         https://bugs.webkit.org/show_bug.cgi?id=186096
50         <rdar://problem/40651015>
51
52         Reviewed by Ryosuke Niwa.
53
54         Now that the InputType may be kept alive as part of in-flight form submissions, we
55         shouldn't assume that the referenced HTMLInputElement is still valid before using it.
56
57         The only time we should be lacking a referencing element is in cases where the InputType
58         is changing, either through a change in the HTMLInputElement's type attribute. In those
59         cases we should check for a valid HTMLInputElement. In other cases, we should ASSERT.
60
61         * html/BaseButtonInputType.cpp:
62         (WebCore::BaseButtonInputType::createInputRenderer):
63         (WebCore::BaseButtonInputType::setValue):
64         * html/BaseCheckableInputType.cpp:
65         (WebCore::BaseCheckableInputType::saveFormControlState const):
66         (WebCore::BaseCheckableInputType::restoreFormControlState):
67         (WebCore::BaseCheckableInputType::appendFormData const):
68         (WebCore::BaseCheckableInputType::handleKeydownEvent):
69         (WebCore::BaseCheckableInputType::accessKeyAction):
70         (WebCore::BaseCheckableInputType::setValue):
71         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
72         (WebCore::BaseChooserOnlyDateAndTimeInputType::attributeChanged): Add a nullptr check
73         here, since this is called directly by code that causes the old InputType to be removed,
74         which could leave us with a nullptr element().
75         * html/BaseClickableWithKeyInputType.cpp:
76         (WebCore::BaseClickableWithKeyInputType::handleKeydownEvent):
77         (WebCore::BaseClickableWithKeyInputType::handleKeypressEvent):
78         (WebCore::BaseClickableWithKeyInputType::accessKeyAction):
79         * html/BaseDateAndTimeInputType.cpp:
80         (WebCore::BaseDateAndTimeInputType::attributeChanged): Add a nullptr check
81         here, since this is called directly by code that causes the old InputType to be removed,
82         which could leave us with a nullptr element().
83         * html/BaseTextInputType.cpp:
84         (WebCore::BaseTextInputType::patternMismatch const):
85         * html/CheckboxInputType.cpp:
86         (WebCore::CheckboxInputType::valueMissing const):
87         (WebCore::CheckboxInputType::willDispatchClick):
88         (WebCore::CheckboxInputType::didDispatchClick):
89         (WebCore::CheckboxInputType::shouldAppearIndeterminate const):
90         * html/ColorInputType.cpp:
91         (WebCore::ColorInputType::valueAsColor const):
92         (WebCore::ColorInputType::createShadowSubtree):
93         (WebCore::ColorInputType::handleDOMActivateEvent):
94         (WebCore::ColorInputType::didChooseColor):
95         (WebCore::ColorInputType::updateColorSwatch):
96         (WebCore::ColorInputType::shadowColorSwatch const):
97         (WebCore::ColorInputType::elementRectRelativeToRootView const):
98         (WebCore::ColorInputType::shouldShowSuggestions const):
99         (WebCore::ColorInputType::suggestions const):
100         * html/EmailInputType.cpp:
101         (WebCore::EmailInputType::typeMismatchFor const):
102         (WebCore::EmailInputType::typeMismatch const):
103         (WebCore::EmailInputType::typeMismatchText const):
104         (WebCore::EmailInputType::sanitizeValue const):
105         * html/FileInputType.cpp:
106         (WebCore::FileInputType::appendFormData const):
107         (WebCore::FileInputType::attributeChanged): Add a nullptr check here, since
108         this is called directly by code that causes the old InputType to be removed,
109         which could leave us with a nullptr element().
110         (WebCore::FileInputType::valueMissing const):
111         (WebCore::FileInputType::valueMissingText const):
112         (WebCore::FileInputType::handleDOMActivateEvent):
113         (WebCore::FileInputType::createInputRenderer):
114         (WebCore::FileInputType::setValue):
115         (WebCore::FileInputType::createShadowSubtree):
116         (WebCore::FileInputType::disabledAttributeChanged):
117         (WebCore::FileInputType::multipleAttributeChanged):
118         (WebCore::FileInputType::allowsDirectories const):
119         (WebCore::FileInputType::setFiles):
120         (WebCore::FileInputType::iconLoaded):
121         (WebCore::FileInputType::receiveDroppedFiles):
122         (WebCore::FileInputType::defaultToolTip const):
123         * html/HTMLInputElement.h:
124         (WebCore::HTMLInputElement::weakPtrFactory const):
125         * html/HiddenInputType.cpp:
126         (WebCore::HiddenInputType::saveFormControlState const):
127         (WebCore::HiddenInputType::restoreFormControlState):
128         (WebCore::HiddenInputType::setValue):
129         (WebCore::HiddenInputType::appendFormData const):
130         * html/ImageInputType.cpp:
131         (WebCore::ImageInputType::appendFormData const):
132         (WebCore::ImageInputType::handleDOMActivateEvent):
133         (WebCore::ImageInputType::createInputRenderer):
134         (WebCore::ImageInputType::altAttributeChanged):
135         (WebCore::ImageInputType::srcAttributeChanged):
136         (WebCore::ImageInputType::attach):
137         (WebCore::ImageInputType::height const):
138         (WebCore::ImageInputType::width const):
139         * html/InputType.cpp:
140         (WebCore::InputType::saveFormControlState const):
141         (WebCore::InputType::restoreFormControlState):
142         (WebCore::InputType::isFormDataAppendable const):
143         (WebCore::InputType::appendFormData const):
144         (WebCore::InputType::sizeShouldIncludeDecoration const):
145         (WebCore::InputType::validationMessage const):
146         (WebCore::InputType::createInputRenderer):
147         (WebCore::InputType::blur):
148         (WebCore::InputType::destroyShadowSubtree):
149         (WebCore::InputType::dispatchSimulatedClickIfActive const):
150         (WebCore::InputType::chrome const):
151         (WebCore::InputType::isKeyboardFocusable const):
152         (WebCore::InputType::isMouseFocusable const):
153         (WebCore::InputType::accessKeyAction):
154         (WebCore::InputType::setValue):
155         (WebCore::InputType::visibleValue const):
156         (WebCore::InputType::applyStep):
157         (WebCore::InputType::stepUpFromRenderer):
158         * html/InputType.h:
159         (WebCore::InputType::InputType):
160         (WebCore::InputType::element const):
161         * html/NumberInputType.cpp:
162         (WebCore::NumberInputType::attributeChanged): Add a nullptr check here, since
163         this is called directly by code that causes the old InputType to be removed,
164         which could leave us with a nullptr element().
165         (WebCore::NumberInputType::setValue):
166         (WebCore::NumberInputType::valueAsDouble const):
167         (WebCore::NumberInputType::setValueAsDouble const):
168         (WebCore::NumberInputType::setValueAsDecimal const):
169         (WebCore::NumberInputType::typeMismatch const):
170         (WebCore::NumberInputType::createStepRange const):
171         (WebCore::NumberInputType::sizeShouldIncludeDecoration const):
172         (WebCore::NumberInputType::decorationWidth const):
173         (WebCore::NumberInputType::localizeValue const):
174         (WebCore::NumberInputType::visibleValue const):
175         (WebCore::NumberInputType::convertFromVisibleValue const):
176         (WebCore::NumberInputType::hasBadInput const):
177         (WebCore::NumberInputType::minOrMaxAttributeChanged):
178         (WebCore::NumberInputType::stepAttributeChanged):
179         * html/RadioInputType.cpp:
180         (WebCore::RadioInputType::valueMissing const):
181         (WebCore::RadioInputType::handleKeydownEvent):
182         (WebCore::RadioInputType::handleKeyupEvent):
183         (WebCore::RadioInputType::isKeyboardFocusable const):
184         (WebCore::RadioInputType::shouldSendChangeEventAfterCheckedChanged):
185         (WebCore::RadioInputType::willDispatchClick):
186         (WebCore::RadioInputType::didDispatchClick):
187         (WebCore::RadioInputType::matchesIndeterminatePseudoClass const):
188         * html/RangeInputType.cpp:
189         (WebCore::RangeInputType::attributeChanged): Add a nullptr check here, since
190         this is called directly by code that causes the old InputType to be removed,
191         which could leave us with a nullptr element().
192         (WebCore::RangeInputType::valueAsDouble const):
193         (WebCore::RangeInputType::setValueAsDecimal const):
194         (WebCore::RangeInputType::createStepRange const):
195         (WebCore::RangeInputType::handleMouseDownEvent):
196         (WebCore::RangeInputType::handleTouchEvent):
197         (WebCore::RangeInputType::handleKeydownEvent):
198         (WebCore::RangeInputType::createShadowSubtree):
199         (WebCore::RangeInputType::sliderTrackElement const):
200         (WebCore::RangeInputType::createInputRenderer):
201         (WebCore::RangeInputType::accessKeyAction):
202         (WebCore::RangeInputType::minOrMaxAttributeChanged):
203         (WebCore::RangeInputType::setValue):
204         (WebCore::RangeInputType::updateTickMarkValues):
205         * html/ResetInputType.cpp:
206         (WebCore::ResetInputType::handleDOMActivateEvent):
207         * html/SearchInputType.cpp:
208         (WebCore::SearchInputType::addSearchResult):
209         (WebCore::SearchInputType::maxResultsAttributeChanged):
210         (WebCore::SearchInputType::createInputRenderer):
211         (WebCore::SearchInputType::createShadowSubtree):
212         (WebCore::SearchInputType::handleKeydownEvent):
213         (WebCore::SearchInputType::startSearchEventTimer):
214         (WebCore::SearchInputType::searchEventTimerFired):
215         (WebCore::SearchInputType::searchEventsShouldBeDispatched const):
216         (WebCore::SearchInputType::didSetValueByUserEdit):
217         (WebCore::SearchInputType::sizeShouldIncludeDecoration const):
218         * html/SubmitInputType.cpp:
219         (WebCore::SubmitInputType::appendFormData const):
220         (WebCore::SubmitInputType::handleDOMActivateEvent):
221         * html/TextFieldInputType.cpp:
222         (WebCore::TextFieldInputType::attributeChanged): Add a nullptr check here, since
223         this is called directly by code that causes the old InputType to be removed,
224         which could leave us with a nullptr element().
225         (WebCore::TextFieldInputType::isKeyboardFocusable const):
226         (WebCore::TextFieldInputType::isMouseFocusable const):
227         (WebCore::TextFieldInputType::valueMissing const):
228         (WebCore::TextFieldInputType::setValue):
229         (WebCore::TextFieldInputType::handleKeydownEvent):
230         (WebCore::TextFieldInputType::handleKeydownEventForSpinButton):
231         (WebCore::TextFieldInputType::forwardEvent):
232         (WebCore::TextFieldInputType::elementDidBlur):
233         (WebCore::TextFieldInputType::handleFocusEvent):
234         (WebCore::TextFieldInputType::handleBlurEvent):
235         (WebCore::TextFieldInputType::createInputRenderer):
236         (WebCore::TextFieldInputType::shouldHaveSpinButton const):
237         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator const):
238         (WebCore::TextFieldInputType::createShadowSubtree):
239         (WebCore::TextFieldInputType::handleBeforeTextInsertedEvent):
240         (WebCore::TextFieldInputType::updatePlaceholderText):
241         (WebCore::TextFieldInputType::appendFormData const):
242         (WebCore::TextFieldInputType::subtreeHasChanged):
243         (WebCore::TextFieldInputType::didSetValueByUserEdit):
244         (WebCore::TextFieldInputType::updateInnerTextValue):
245         (WebCore::TextFieldInputType::focusAndSelectSpinButtonOwner):
246         (WebCore::TextFieldInputType::shouldSpinButtonRespondToMouseEvents):
247         (WebCore::TextFieldInputType::shouldSpinButtonRespondToWheelEvents):
248         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const):
249         (WebCore::TextFieldInputType::shouldDrawAutoFillButton const):
250         (WebCore::TextFieldInputType::autoFillButtonElementWasClicked):
251         (WebCore::TextFieldInputType::createContainer):
252         (WebCore::TextFieldInputType::createAutoFillButton):
253         (WebCore::TextFieldInputType::updateAutoFillButton):
254         * html/URLInputType.cpp:
255         (WebCore::URLInputType::typeMismatch const):
256
257 2018-06-04  Chris Dumez  <cdumez@apple.com>
258
259         Unreviewed iOS build fix with recent SDKs.
260
261         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
262         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
263
264 2018-06-04  Dean Jackson  <dino@apple.com>
265
266         AR Badging on transparent thumbnail images makes the glyph look really dark
267         https://bugs.webkit.org/show_bug.cgi?id=186289
268         <rdar://problem/40627111>
269
270         Reviewed by Anders Carlsson.
271
272         Clip out the shape for the drop shadow, so that it isn't visible if
273         there is transparent pixel data on top of it.
274
275         * rendering/RenderThemeIOS.mm:
276         (WebCore::RenderThemeIOS::paintSystemPreviewBadge):
277
278 2018-06-04  Timothy Hatcher  <timothy@apple.com>
279
280         Selection color is dark when using Safari in dark mode.
281
282         https://bugs.webkit.org/show_bug.cgi?id=186288
283         rdar://problem/38438625
284
285         Reviewed by Simon Fraser.
286
287         Pass StyleColor::Options to all of the selection color functions.
288         Removed supportsSelectionForegroundColors() from RenderThemeMac,
289         to get the default of true, since the forground colors in dark mode
290         can be different now. Use new semantic color methods on NSColor.
291
292         * rendering/RenderElement.cpp:
293         (WebCore::RenderElement::selectionColor const):
294         (WebCore::RenderElement::selectionBackgroundColor const):
295         * rendering/RenderListBox.cpp:
296         (WebCore::RenderListBox::paintItemForeground):
297         (WebCore::RenderListBox::paintItemBackground):
298         * rendering/RenderTheme.cpp:
299         (WebCore::RenderTheme::activeSelectionBackgroundColor const):
300         (WebCore::RenderTheme::inactiveSelectionBackgroundColor const):
301         (WebCore::RenderTheme::activeSelectionForegroundColor const):
302         (WebCore::RenderTheme::inactiveSelectionForegroundColor const):
303         (WebCore::RenderTheme::activeListBoxSelectionBackgroundColor const):
304         (WebCore::RenderTheme::activeListBoxSelectionForegroundColor const):
305         (WebCore::RenderTheme::inactiveListBoxSelectionForegroundColor const):
306         (WebCore::RenderTheme::platformActiveSelectionBackgroundColor const):
307         (WebCore::RenderTheme::platformActiveSelectionForegroundColor const):
308         (WebCore::RenderTheme::platformInactiveSelectionBackgroundColor const):
309         (WebCore::RenderTheme::platformInactiveSelectionForegroundColor const):
310         (WebCore::RenderTheme::platformActiveListBoxSelectionBackgroundColor const):
311         (WebCore::RenderTheme::platformActiveListBoxSelectionForegroundColor const):
312         (WebCore::RenderTheme::platformInactiveListBoxSelectionBackgroundColor const):
313         (WebCore::RenderTheme::platformInactiveListBoxSelectionForegroundColor const):
314         * rendering/RenderTheme.h:
315         * rendering/RenderThemeGtk.cpp:
316         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor const):
317         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor const):
318         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor const):
319         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor const):
320         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor const):
321         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor const):
322         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor const):
323         * rendering/RenderThemeGtk.h:
324         * rendering/RenderThemeIOS.h:
325         * rendering/RenderThemeIOS.mm:
326         (WebCore::RenderThemeIOS::platformActiveSelectionBackgroundColor const):
327         (WebCore::RenderThemeIOS::platformInactiveSelectionBackgroundColor const):
328         * rendering/RenderThemeMac.h:
329         * rendering/RenderThemeMac.mm:
330         (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor const):
331         (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const):
332         (WebCore::RenderThemeMac::platformActiveSelectionForegroundColor const):
333         (WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const):
334         (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const):
335         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const):
336         (WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor const):
337         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const):
338         * rendering/RenderThemeWin.cpp:
339         (WebCore::RenderThemeWin::platformActiveSelectionBackgroundColor const):
340         (WebCore::RenderThemeWin::platformInactiveSelectionBackgroundColor const):
341         (WebCore::RenderThemeWin::platformActiveSelectionForegroundColor const):
342         (WebCore::RenderThemeWin::platformInactiveSelectionForegroundColor const):
343         * rendering/RenderThemeWin.h:
344
345 2018-06-04  Chris Dumez  <cdumez@apple.com>
346
347         Update Fetch code to provide more useful exception messages
348         https://bugs.webkit.org/show_bug.cgi?id=186156
349
350         Reviewed by Youenn Fablet.
351
352         Provide more useful error messages in our Loading / Fetch code.
353
354         * Modules/fetch/FetchBodyOwner.cpp:
355         (WebCore::FetchBodyOwner::arrayBuffer):
356         (WebCore::FetchBodyOwner::blob):
357         (WebCore::FetchBodyOwner::consumeOnceLoadingFinished):
358         (WebCore::FetchBodyOwner::formData):
359         (WebCore::FetchBodyOwner::json):
360         (WebCore::FetchBodyOwner::text):
361         * Modules/fetch/FetchHeaders.cpp:
362         (WebCore::canWriteHeader):
363         (WebCore::FetchHeaders::get const):
364         (WebCore::FetchHeaders::has const):
365         * Modules/fetch/FetchRequest.cpp:
366         (WebCore::FetchRequest::setBody):
367         (WebCore::FetchRequest::clone):
368         * Modules/fetch/FetchResponse.cpp:
369         (WebCore::FetchResponse::redirect):
370         (WebCore::FetchResponse::clone):
371         * workers/service/context/ServiceWorkerFetch.cpp:
372         (WebCore::ServiceWorkerFetch::processResponse):
373         (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
374         * workers/service/context/ServiceWorkerFetch.h:
375
376 2018-06-04  Daniel Bates  <dabates@apple.com>
377
378         Update Strong Password appearance
379         https://bugs.webkit.org/show_bug.cgi?id=186239
380         <rdar://problem/38183795>
381
382         Reviewed by Brent Fulgham.
383
384         Fix up the gradient mask to start half-way through the visible text and size it to the
385         width of the visible text. Also change the color of the Strong Password label to 80% black.
386
387         We achieve sizing of the gradient to the width of the visible text by changing the CSS display
388         of the inner text element to be an inline-block and specifying "max-width: 100%" so that
389         its maximum width is less than or equal to the width of its containing block. Additionally,
390         only apply strong password-specific inner text element styles when the field is not disabled
391         or read-only and has a strong password appearance. Otherwise these styles, specifically the
392         display type, will adversely effect rendering of the text when the field is disabled or readonly.
393
394         * css/html.css:
395         (input::-webkit-strong-password-auto-fill-button):
396         * html/HTMLInputElement.cpp:
397         (WebCore::autoFillStrongPasswordMaskImage):
398         (WebCore::HTMLInputElement::createInnerTextStyle):
399
400 2018-06-04  Wenson Hsieh  <wenson_hsieh@apple.com>
401
402         [WebKit on watchOS] Remove all uses of the EXTRA_ZOOM_MODE compiler flag
403         https://bugs.webkit.org/show_bug.cgi?id=186279
404
405         Reviewed by Tim Horton.
406
407         Replaces uses of ENABLE(EXTRA_ZOOM_MODE) with PLATFORM(WATCHOS). No change in behavior.
408
409         * Modules/mediacontrols/MediaControlsHost.cpp:
410         (WebCore::MediaControlsHost::compactMode const):
411         * html/HTMLMediaElement.cpp:
412         (WebCore::HTMLMediaElement::updatePlayState):
413         * page/Page.cpp:
414         (WebCore::relevantViewRect):
415         * page/SettingsBase.cpp:
416         (WebCore::SettingsBase::defaultMinimumZoomFontSize):
417         (WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled):
418         * page/ViewportConfiguration.cpp:
419         (WebCore::platformDeviceWidthOverride):
420         (WebCore::shouldOverrideShrinkToFitArgument):
421         (WebCore::needsUpdateAfterChangingDisabledAdaptations):
422         * platform/LocalizedStrings.cpp:
423         * platform/LocalizedStrings.h:
424         * platform/audio/ios/MediaSessionManagerIOS.mm:
425         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
426         (-[WebMediaSessionHelper dealloc]):
427         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
428         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
429         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
430         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
431         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
432         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
433         (WebCore::PlaybackSessionInterfaceAVKit::seekableRangesChanged):
434         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
435         (-[WebAVPlayerViewController initWithFullscreenInterface:]):
436         (-[WebAVPlayerViewController enterFullScreenAnimated:completionHandler:]):
437         (-[WebAVPlayerViewController exitFullScreenAnimated:completionHandler:]):
438         (-[WebAVPlayerViewController MY_NO_RETURN]):
439         (-[WebAVPlayerViewController isPictureInPicturePossible]):
440         (-[WebAVPlayerViewController isPictureInPictureActive]):
441         (-[WebAVPlayerViewController pictureInPictureActive]):
442         (-[WebAVPlayerViewController pictureInPictureWasStartedWhenEnteringBackground]):
443         (-[WebAVPlayerViewController showsPlaybackControls]):
444         (-[WebAVPlayerViewController setShowsPlaybackControls:]):
445         (-[WebAVPlayerViewController setAllowsPictureInPicturePlayback:]):
446         (-[WebAVPlayerViewController setDelegate:]):
447         (VideoFullscreenInterfaceAVKit::setupFullscreen):
448         (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
449         (VideoFullscreenInterfaceAVKit::doSetup):
450         (WebCore::supportsPictureInPicture):
451         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
452         (VideoFullscreenControllerContext::willExitFullscreen):
453         * rendering/RenderThemeIOS.h:
454         * rendering/RenderThemeIOS.mm:
455
456 2018-06-04  Youenn Fablet  <youenn@apple.com>
457
458         [WK1] Add an option to restrict communication to localhost sockets
459         https://bugs.webkit.org/show_bug.cgi?id=186249
460
461         Reviewed by Eric Carlson.
462
463         Covered by existing tests.
464         Set explicitly webrtc socket IP address to 127.0.0.1 in testing mode.
465         For that purpose, we need WK1 to create a wrapper around a socket factory,
466         this wrapper being responsible of setting or not the IP address to 127.0.0.1.
467
468         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
469         (WebCore::prepareSocketAddress):
470         (WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory):
471         (WebCore::BasicPacketSocketFactory::setDisableNonLocalhostConnections):
472         (WebCore::BasicPacketSocketFactory::CreateClientTcpSocket):
473         (WebCore::LibWebRTCProvider::createPeerConnection):
474         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
475
476 2018-06-04  Zalan Bujtas  <zalan@apple.com>
477
478         [LFC] Merge width and margin computation for block-level, non-replaced and inline,replaced element in normal flow
479         https://bugs.webkit.org/show_bug.cgi?id=186225
480
481         Reviewed by Antti Koivisto.
482
483         This patch merges the width and horizontal margin computation for
484         https://www.w3.org/TR/CSS22/visudet.html#inline-replaced-width and https://www.w3.org/TR/CSS22/visudet.html#blockwidth
485
486         * layout/FormattingContextGeometry.cpp:
487         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
488         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
489         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
490
491 2018-06-01  Zalan Bujtas  <zalan@apple.com>
492
493         [LFC] Merge width and horizontal margin computation
494         https://bugs.webkit.org/show_bug.cgi?id=186217
495
496         Reviewed by Antti Koivisto.
497
498         We could certainly compute width and maring separately, but to match each steps defined
499         at https://www.w3.org/TR/CSS22/visudet.html, we should just merge width and horizontal margin computations
500         (followed by height and vertical margins).
501         Use 0 computed marings for now.
502
503         * layout/FormattingContext.cpp:
504         (WebCore::Layout::FormattingContext::computeFloatingWidthAndMargin const):
505         (WebCore::Layout::FormattingContext::computeOutOfFlowWidthAndMargin const):
506         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
507         (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
508         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const): Deleted.
509         (WebCore::Layout::FormattingContext::computeFloatingWidth const): Deleted.
510         * layout/FormattingContext.h:
511         * layout/FormattingContextGeometry.cpp:
512         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedWidthAndMargin):
513         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidthAndMargin):
514         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
515         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
516         (WebCore::Layout::FormattingContext::Geometry::outOfFlowWidthAndMargin):
517         (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
518         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
519         (WebCore::Layout::FormattingContext::Geometry::computedPadding):
520         (WebCore::Layout::outOfFlowNonReplacedWidth): Deleted.
521         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidth): Deleted.
522         (WebCore::Layout::floatingNonReplacedWidth): Deleted.
523         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidth): Deleted.
524         (WebCore::Layout::FormattingContext::Geometry::outOfFlowWidth): Deleted.
525         (WebCore::Layout::FormattingContext::Geometry::floatingWidth): Deleted.
526         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidth): Deleted.
527         * layout/LayoutContext.cpp:
528         (WebCore::Layout::LayoutContext::initializeRoot):
529         * layout/blockformatting/BlockFormattingContext.cpp:
530         (WebCore::Layout::BlockFormattingContext::layout const):
531         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
532         (WebCore::Layout::BlockFormattingContext::computeInFlowWidthAndMargin const):
533         (WebCore::Layout::BlockFormattingContext::computeWidth const): Deleted.
534         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const): Deleted.
535         (WebCore::Layout::BlockFormattingContext::computeMargin const): Deleted.
536         * layout/blockformatting/BlockFormattingContext.h:
537         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
538         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
539         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
540         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidth): Deleted.
541         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidth): Deleted.
542         (WebCore::Layout::BlockFormattingContext::Geometry::computedMargin): Deleted.
543         * layout/displaytree/DisplayBox.cpp:
544         (WebCore::Display::Box::marginBox const):
545         * layout/displaytree/DisplayBox.h:
546         (WebCore::Display::Box::setHasValidVerticalMargin):
547         (WebCore::Display::Box::setHasValidHorizontalMargin):
548         (WebCore::Display::Box::invalidateMargin):
549         (WebCore::Display::Box::setHorizontalMargin):
550         (WebCore::Display::Box::setVerticalMargin):
551         (WebCore::Display::Box::marginTop const):
552         (WebCore::Display::Box::marginLeft const):
553         (WebCore::Display::Box::marginBottom const):
554         (WebCore::Display::Box::marginRight const):
555         (WebCore::Display::Box::Edges::Edges): Deleted.
556         (WebCore::Display::Box::setHasValidMargin): Deleted.
557         (WebCore::Display::Box::setMargin): Deleted.
558
559 2018-06-03  Michael Catanzaro  <mcatanzaro@igalia.com>
560
561         REGRESSION(r232338): [GTK] Broke a few layout tests
562         https://bugs.webkit.org/show_bug.cgi?id=186244
563
564         Unreviewed, also rollout r232392.
565
566         * rendering/RenderTheme.cpp:
567         (WebCore::RenderTheme::adjustStyle):
568         * rendering/RenderTheme.h:
569         (WebCore::RenderTheme::adjustListboxStyle const): Deleted.
570         * rendering/RenderThemeGtk.cpp:
571         (WebCore::RenderThemeGtk::adjustListboxStyle const): Deleted.
572         * rendering/RenderThemeGtk.h:
573
574 2018-06-03  Michael Catanzaro  <mcatanzaro@igalia.com>
575
576         REGRESSION(r232338): [GTK] Broke a few layout tests
577         https://bugs.webkit.org/show_bug.cgi?id=186244
578
579         Unreviewed, rollout r232338.
580
581         * platform/gtk/RenderThemeGadget.cpp:
582         (WebCore::RenderThemeGadget::RenderThemeGadget):
583         (WebCore::baseStyleContext): Deleted.
584         * rendering/RenderThemeGtk.cpp:
585         (WebCore::RenderThemeGtk::adjustButtonStyle const):
586         (WebCore::RenderThemeGtk::adjustTextFieldStyle const):
587         (WebCore::RenderThemeGtk::adjustSearchFieldStyle const):
588         (WebCore::styleColor):
589         (WebCore::RenderThemeGtk::adjustTextAreaStyle const): Deleted.
590         * rendering/RenderThemeGtk.h:
591
592 2018-06-03  Eric Carlson  <eric.carlson@apple.com>
593
594         [iOS] MediaPlayer.framework is not always available
595         https://bugs.webkit.org/show_bug.cgi?id=186220
596         <rdar://problem/40571286>
597
598         Reviewed by Tim Horton.
599
600         * platform/ios/RemoteCommandListenerIOS.mm:
601         (WebCore::RemoteCommandListener::create):
602
603 2018-06-02  Darin Adler  <darin@apple.com>
604
605         [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption
606         https://bugs.webkit.org/show_bug.cgi?id=186227
607
608         Reviewed by Dan Bernstein.
609
610         * bridge/objc/objc_instance.mm:
611         (ObjcInstance::~ObjcInstance): Use @autoreleasepool instead of NSAutoreleasePool.
612         * platform/ios/wak/WAKView.mm:
613         (-[WAKView _appendDescriptionToString:atLevel:]): Ditto.
614
615 2018-06-03  Zan Dobersek  <zdobersek@igalia.com>
616
617         [WebGL] GL_EXT_robustness utilization should depend on CONTEXT_ROBUST_ACCESS value
618         https://bugs.webkit.org/show_bug.cgi?id=186187
619
620         Reviewed by Carlos Garcia Campos.
621
622         Don't utilize the GL_EXT_robustness extension for reading pixels from
623         the GPU if the underlying OpenGL context did not enable robust access
624         support upon creation. For EGL contexts, this would be done by passing
625         EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT and EGL_TRUE key-value pair in the
626         attribute list passed to eglCreateContext() (as specified in the
627         EGL_EXT_create_context_robustness extension), but at the moment this
628         capability is not utilized.
629
630         As such, on drivers that implement GL_EXT_robustness support, pixel
631         reads done in WebGLRenderingContextBase end up using glReadnPixels(),
632         but that fails to successfully read anything due to the context
633         rejecting such calls.
634
635         GL_EXT_robustness is specific to OpenGL ES versions, so to fix this,
636         Extensions3DOpenGLES overrides the isEnabled() method. That override
637         returns false immediately if the inherited isEnabled() implementation
638         returns false. Otherwise it returns true, unless the tested extension
639         is GL_EXT_robustness, in which case we now check that the context's
640         CONTEXT_ROBUST_ACCESS state value is true, meaning the context was
641         created with robust access support enabled.
642
643         No new tests are possible because this is optional driver-provided
644         functionality that Web content cannot have effect on.
645
646         * platform/graphics/Extensions3D.h:
647         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
648         (WebCore::Extensions3DOpenGLES::isEnabled):
649         * platform/graphics/opengl/Extensions3DOpenGLES.h:
650
651 2018-06-01  Ryosuke Niwa  <rniwa@webkit.org>
652
653         Editor can hold references to Documents after you navigate away
654         https://bugs.webkit.org/show_bug.cgi?id=186215
655
656         Reviewed by Simon Fraser.
657
658         Clear the various member variables that can hold onto a document in Editor::clear and FrameSelection::prepareForDestruction.
659
660         Test: editing/selection/navigation-clears-editor-state.html
661
662         * editing/Editor.cpp:
663         (WebCore::Editor::clear):
664         * editing/Editor.h:
665         * editing/FrameSelection.cpp:
666         (WebCore::FrameSelection::FrameSelection):
667         (WebCore::FrameSelection::prepareForDestruction):
668         * editing/FrameSelection.h:
669
670 2018-06-01  Ryosuke Niwa  <rniwa@webkit.org>
671
672         ResourceLoader::cancel() shouldn't synchronously fire load event on document
673         https://bugs.webkit.org/show_bug.cgi?id=185284
674
675         Revert the erroneous change to SSFontSelector::beginLoadTimerFired(), which broke CancelLoading.CancelFontSubresource.
676         FrameLoader::loadDone calls checkCompleted, not checkLoadComplete so we still need to call checkLoadComplete here.
677
678         * css/CSSFontSelector.cpp:
679         (WebCore::CSSFontSelector::beginLoadTimerFired): 
680
681 2018-06-01  Jeremy Jones  <jeremyj@apple.com>
682
683         Keyboard focus should exit fullscreen.
684         https://bugs.webkit.org/show_bug.cgi?id=185617
685         rdar://problem/34697938
686
687         Reviewed by Ryosuke Niwa.
688
689         No opensource test because feature is not enabled.
690
691         While in element fullscreen, initiating keyboard focus should exit fullscreen in iOS.
692
693         Improve fullscreen testability by exposing isAnimatingFullScreen.
694
695         * dom/Document.h:
696         * testing/Internals.cpp:
697         (WebCore::Internals::isAnimatingFullScreen const):
698         * testing/Internals.h:
699         * testing/Internals.idl:
700
701 2018-06-01  Jeremy Jones  <jeremyj@apple.com>
702
703         Don't continue playing in background when auto-picture-in-picture is disabled.
704         https://bugs.webkit.org/show_bug.cgi?id=186089
705         rdar://problem/40314314
706
707         Reviewed by Eric Carlson.
708
709         No new tests because we don't have a way to test auto-pip.
710
711         With the refactoring work done in VideoFullscreenInterfaceAVKit, HTMLMediaElement no longer has to anticipate 
712         auto-pip when if it should pause on suspend. Instead VideoFullscreenInterfaceAVKit proactively updates 
713         videoFullscreenMode, so checking for PIP is sufficient.
714
715         * html/HTMLMediaElement.cpp:
716         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):
717
718 2018-06-01  Chris Dumez  <cdumez@apple.com>
719
720         REGRESSION (r231456): Colloquy is broken
721         https://bugs.webkit.org/show_bug.cgi?id=186197
722         <rdar://problem/40722960>
723
724         Reviewed by Timothy Hatcher.
725
726         Restore pre-r231456 behavior for Colloquy app so that it works again.
727
728         * html/HTMLFrameElementBase.cpp:
729         (WebCore::HTMLFrameElementBase::openURL):
730         * page/Settings.yaml:
731
732 2018-06-01  Chris Dumez  <cdumez@apple.com>
733
734         Regression(r230567): Unable to log into twitter.com in private sessions
735         https://bugs.webkit.org/show_bug.cgi?id=186205
736         <rdar://problem/40670799>
737
738         Reviewed by Youenn Fablet.
739
740         We were using the same SWServer for all private sessions and the SWServer's sessionID would
741         be legacyPrivateSessionID(). As a result, the service worker's sessionID would be legacyPrivateSessionID()
742         as well and would not match the sessionID of its client pages. This sessionID mismatch was
743         causing the breakage.
744
745         Instead of using the same SWServer of all private sessions, we now go back to using a SWServer
746         per private session. However, we now make sure that the SWServer gets destroyed whenever its
747         corresponding session gets destroyed.
748
749         * workers/service/server/SWServer.cpp:
750         (WebCore::SWServer::~SWServer):
751
752 2018-06-01  Youenn Fablet  <youenn@apple.com>
753
754         Add an option to restrict communication to localhost sockets
755         https://bugs.webkit.org/show_bug.cgi?id=186208
756
757         Reviewed by Eric Carlson.
758
759         Covered by existing tests.
760         Add an option in LibWebRTCProvider to restrict to localhost sockets.
761         Use that option when Internals is used.
762
763         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
764         * testing/Internals.cpp:
765         (WebCore::Internals::resetToConsistentState):
766
767 2018-06-01  Ryosuke Niwa  <rniwa@webkit.org>
768
769         ResourceLoader::cancel() shouldn't synchronously fire load event on document
770         https://bugs.webkit.org/show_bug.cgi?id=185284
771
772         Reviewed by Antti Koivisto.
773
774         Because a resource loading can be canceled as a node is removed a document or CachedResource is destructed,
775         it's not safe to synchronously fire load event on document upon cancelation. This patch makes the cancellation
776         of a resource load schedule m_checkTimer in FrameLoader to fire a load event asynchronously instead.
777
778         Specifically, this patch makes FrameLoader::loadDone call FrameLoader::scheduleCheckCompleted when the load
779         had failed or cancled instead of calling FrameLoader::checkCompleted which can synchronously fire load event.
780         To differentiate the two cases, new enum LoadCompletionType has been added to FrameLoader::loadDone and related
781         functions. To avoid calling the navigation delegate too early, the same abstraction for checkLoadComplete()
782         has been added in the form of FrameLoader::subresourceLoadDone.
783
784         Unfortunately, delaying calls to checkCompleted() and checkLoadComplete() by a timer can result in client
785         callbacks such as didFinishLoadForFrame and didFailLoadWithError to never get called when the frame gets
786         detached from the parent after the last resource had stopped loading but before the timer fires. To preserve
787         these deleagte callbacks, this patch expedites the timer in FrameLoader::frameDetached and Page::goToItem by
788         by invoking newly added stopAllLoadersAndCheckCompleteness, which stops all loading and then immediately invokes
789         checkCompleted() and checkLoadComplete() synchronously if m_checkTimer had been started.
790
791         Tests: http/tests/preload/dynamic_removing_preload.html
792
793         * css/CSSFontSelector.cpp:
794         (WebCore::CSSFontSelector::beginLoadTimerFired): Removed superfluous call to checkLoadComplete since
795         cachedResourceLoader's loadDone would call checkLoadComplete anyway.
796         * html/HTMLFrameOwnerElement.cpp:
797         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): Removed the misleading comment added in r140090.
798         Firefox DOES indeed fire unload event in the content document of a removed frame. While this comment made
799         it sound like this function isn't called when a frame is removed from the tree when in reality we simply
800         remove a frame prior to removing the node via disconnectSubframesIfNeeded.
801         * loader/DocumentLoader.cpp:
802         (WebCore::DocumentLoader::removeSubresourceLoader):
803         * loader/DocumentLoader.h:
804         * loader/FrameLoader.cpp:
805         (WebCore::FrameLoader::FrameLoader):
806         (WebCore::FrameLoader::loadDone):
807         (WebCore::FrameLoader::subresourceLoadDone):
808         (WebCore::FrameLoader::checkCompleted): Added a release assert that this function is only called when it's safe
809         to execute scripts.
810         (WebCore::FrameLoader::checkTimerFired):
811         (WebCore::FrameLoader::checkCompletenessNow):Extracted from checkTimerFired.
812         (WebCore::FrameLoader::stopAllLoaders): Removed the code to stop m_checkTimer introduced in r53655.
813         Stopping the timer here would prevent FrameLoader::frameDetached to detect the case when stopping the loader
814         scheduled a load completion check. Also stopping this timer without clearing the corresponding booleans:
815         m_checkingLoadCompleteForDetachment and m_checkingLoadCompleteForDetachment is problematic. The assertion
816         r53655 addressed is now addressed by explicitly checking & clearing the timer in frameDetached.
817         (WebCore::FrameLoader::stopAllLoadersAndCheckCompleteness): Added.
818         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Avoid an early exit when the newly added boolean
819         m_checkingLoadCompleteForDetachment is set since m_isStopping is no longer set in frameDetached in order
820         to invoke didFailLoadWithError when detaching a frame.
821         (WebCore::FrameLoader::frameDetached): Call checkCompletenessNow in the case the frame had already been
822         completed loading. Also call stopAllLoadersAndCheckCompleteness in the case stopping loading would complete
823         the loading before stopping active DOM objects.
824         * loader/FrameLoader.h:
825         (WebCore::FrameLoader::m_checkingLoadCompleteForDetachment): Added.
826         * loader/FrameLoaderTypes.h:
827         (WebCore::LoadCompletionType): Added.
828         * loader/SubresourceLoader.cpp:
829         (WebCore::SubresourceLoader::didFinishLoading):
830         (WebCore::SubresourceLoader::didFail):
831         (WebCore::SubresourceLoader::didCancel):
832         (WebCore::SubresourceLoader::notifyDone):
833         * loader/SubresourceLoader.h:
834         * loader/cache/CachedResourceLoader.cpp:
835         (WebCore::CachedResourceLoader::loadDone):
836         * loader/cache/CachedResourceLoader.h:
837         * page/Page.cpp:
838         (WebCore::Page::goToItem): Call stopAllLoadersAndCheckCompleteness instead of stopAllLoaders since stopping
839         loading here may complete loading.
840
841 2018-06-01  Sihui Liu  <sihui_liu@apple.com>
842
843         Stop using StorageTracker.db in LocalStorageDatabaseTracker
844         https://bugs.webkit.org/show_bug.cgi?id=186104
845
846         Reviewed by Geoffrey Garen.
847
848         No behavior change.
849
850         * platform/sql/SQLiteFileSystem.h:
851
852 2018-06-01  Zalan Bujtas  <zalan@apple.com>
853
854         [LFC] Simplify the formatting class implementation by pushing down some of the logic to the Geometry class
855         https://bugs.webkit.org/show_bug.cgi?id=186179
856
857         Reviewed by Antti Koivisto.
858
859         * layout/FormattingContext.cpp:
860         (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
861         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
862         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
863         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
864         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
865         * layout/FormattingContext.h:
866         * layout/FormattingContextGeometry.cpp:
867         (WebCore::Layout::outOfFlowNonReplacedHeight):
868         (WebCore::Layout::outOfFlowNonReplacedWidth):
869         (WebCore::Layout::outOfFlowReplacedHeight):
870         (WebCore::Layout::outOfFlowReplacedWidth):
871         (WebCore::Layout::floatingNonReplacedHeight):
872         (WebCore::Layout::floatingNonReplacedWidth):
873         (WebCore::Layout::floatingReplacedHeight):
874         (WebCore::Layout::floatingReplacedWidth):
875         (WebCore::Layout::outOfFlowNonReplacedPosition):
876         (WebCore::Layout::outOfFlowReplacedPosition):
877         (WebCore::Layout::FormattingContext::Geometry::outOfFlowHeight):
878         (WebCore::Layout::FormattingContext::Geometry::outOfFlowWidth):
879         (WebCore::Layout::FormattingContext::Geometry::floatingHeight):
880         (WebCore::Layout::FormattingContext::Geometry::floatingWidth):
881         (WebCore::Layout::FormattingContext::Geometry::outOfFlowPosition):
882         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeight):
883         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidth):
884         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHeight): Deleted.
885         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedWidth): Deleted.
886         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeight): Deleted.
887         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidth): Deleted.
888         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedHeight): Deleted.
889         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidth): Deleted.
890         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeight): Deleted.
891         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidth): Deleted.
892         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedPosition): Deleted.
893         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedPosition): Deleted.
894         (WebCore::Layout::FormattingContext::Geometry::replacedHeight): Deleted.
895         (WebCore::Layout::FormattingContext::Geometry::replacedWidth): Deleted.
896         * layout/blockformatting/BlockFormattingContext.cpp:
897         (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
898         (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const):
899         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
900         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
901         * layout/blockformatting/BlockFormattingContext.h:
902         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
903         (WebCore::Layout::inFlowNonReplacedHeight):
904         (WebCore::Layout::inFlowNonReplacedWidth):
905         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeight):
906         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidth):
907         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight): Deleted.
908         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidth): Deleted.
909
910 2018-06-01  Zalan Bujtas  <zalan@apple.com>
911
912         [LFC] Push FormattingContext::computeWidth/computeHeight logic from the base to the subclasses.
913         https://bugs.webkit.org/show_bug.cgi?id=186172
914
915         Reviewed by Antti Koivisto.
916
917         FormattingContext::computeWidth/computeHeight virtual functions have very little benefit and in the long run
918         it's better if we keep the number of virtual functions to the minimum necessary.
919
920         * layout/FormattingContext.cpp:
921         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
922         (WebCore::Layout::FormattingContext::computeStaticPosition const): Deleted.
923         (WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const): Deleted.
924         (WebCore::Layout::FormattingContext::computeWidth const): Deleted.
925         (WebCore::Layout::FormattingContext::computeHeight const): Deleted.
926         (WebCore::Layout::FormattingContext::computeMargin const): Deleted.
927         * layout/FormattingContext.h:
928         * layout/FormattingContextGeometry.cpp:
929         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeight):
930         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidth):
931         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeight):
932         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidth):
933         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeight):
934         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidth):
935         (WebCore::Layout::FormattingContext::Geometry::replacedHeight): Deleted.
936         (WebCore::Layout::FormattingContext::Geometry::replacedWidth): Deleted.
937         * layout/blockformatting/BlockFormattingContext.cpp:
938         (WebCore::Layout::BlockFormattingContext::computeWidth const):
939         (WebCore::Layout::BlockFormattingContext::computeHeight const):
940         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
941         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
942         * layout/blockformatting/BlockFormattingContext.h:
943         * layout/inlineformatting/InlineFormattingContext.cpp:
944         (WebCore::Layout::InlineFormattingContext::computeStaticPosition const):
945         (WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const):
946         (WebCore::Layout::InlineFormattingContext::computeInFlowWidth const): Deleted.
947         (WebCore::Layout::InlineFormattingContext::computeInFlowHeight const): Deleted.
948         * layout/inlineformatting/InlineFormattingContext.h:
949
950 2018-06-01  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
951
952         [GTK] Difficult to read combo box text in dark theme
953         https://bugs.webkit.org/show_bug.cgi?id=165072
954
955         Reviewed by Carlos Garcia Campos.
956
957         Set listbox foreground color to theme color to fix hard-to-read
958         text color in combo box while using dark theme.
959
960         No new tests required. ManualTests/gtk/theme.html already covers it.
961         See the "Option Lists" section.
962
963         * rendering/RenderTheme.cpp:
964         (WebCore::RenderTheme::adjustStyle):
965         Adjust style for ListboxPart as well.
966         * rendering/RenderTheme.h: Add adjustListboxStyle()
967         * rendering/RenderThemeGtk.cpp:
968         (WebCore::RenderThemeGtk::adjustListboxStyle const):
969         Set color to the theme foreground color.
970         * rendering/RenderThemeGtk.h: adjustListboxStyle() overriden.
971
972 2018-06-01  Carlos Garcia Campos  <cgarcia@igalia.com>
973
974         [GTK] Switch to use a popup window with a tree view instead of a menu for option menu default implementation
975         https://bugs.webkit.org/show_bug.cgi?id=186146
976
977         Reviewed by Michael Catanzaro.
978
979         Make it possible to use GUniquePtr with GtkTreePath.
980
981         * platform/gtk/GUniquePtrGtk.h:
982
983 2018-05-31  Per Arne Vollan  <pvollan@apple.com>
984
985         Add OpenGL display mask to WebPage creation parameters.
986         https://bugs.webkit.org/show_bug.cgi?id=186163
987         <rdar://problem/40634504>
988
989         Reviewed by Brent Fulgham.
990
991         To make sure the OpenGL display mask is always available, include it in the WebPage creation parameters.
992         The OpenGL display mask is sent to the WebProcess when the platform display ID changes, but that is not
993         early enough in all cases. If the OpenGL display mask is not set, only OpenGL software rendering is offered
994         on some hardware configurations.
995  
996         No new tests, since it is not trivial to test whether OpenGL rendering is hardware accelerated.
997
998         * platform/PlatformScreen.h:
999         * platform/mac/PlatformScreenMac.mm:
1000         (WebCore::displayID):
1001
1002 2018-05-31  Megan Gardner  <megan_gardner@apple.com>
1003
1004         Add setting to allow override screen size to be disabled.
1005         https://bugs.webkit.org/show_bug.cgi?id=186109
1006
1007         Reviewed by Andy Estes.
1008
1009         Not Testable, and for debug only.
1010
1011         Pipe settings and use them to ignore override screen size if setting is set. 
1012
1013         * page/DeprecatedGlobalSettings.cpp:
1014         * page/DeprecatedGlobalSettings.h:
1015         (WebCore::DeprecatedGlobalSettings::setDisableScreenSizeOverride):
1016         (WebCore::DeprecatedGlobalSettings::disableScreenSizeOverride):
1017         * page/Settings.yaml:
1018         * platform/ios/PlatformScreenIOS.mm:
1019
1020 2018-05-31  Brent Fulgham  <bfulgham@apple.com>
1021
1022         REGRESSION(r216119): DocumentLoader::detachFromFrame still encounters nullptr frame
1023         https://bugs.webkit.org/show_bug.cgi?id=186081
1024         <rdar://problem/34918109>
1025
1026         Reviewed by David Kilzer.
1027
1028         The nullptr check that was removed in r216119 was still needed because when the DocumentLoader
1029         is in 'm_waitingForNavigationPolicy' or in 'm_waitingForContentPolicy', a call to the policy checker
1030         to stopCheck we will clear the frame as part of the cleanup phase.
1031
1032         If m_frame is nullptr after cancelPolicyCheckIfNeeded, our work is already done so just return.
1033
1034         * loader/DocumentLoader.cpp:
1035         (WebCore::DocumentLoader::detachFromFrame):
1036
1037 2018-05-31  Dean Jackson  <dino@apple.com>
1038
1039         Don't paint the System Preview badge if the image isn't fully decoded
1040         https://bugs.webkit.org/show_bug.cgi?id=186158
1041         <rdar://problem/40454866>
1042
1043         Reviewed by Antoine Quint.
1044
1045         Only paint the system preview badge if the image itself said
1046         that it succeeded in drawing.
1047
1048         * rendering/RenderImage.cpp:
1049         (WebCore::RenderImage::paintIntoRect): Check the ImageDrawResult.
1050
1051 2018-05-31  David Kilzer  <ddkilzer@apple.com>
1052
1053         Implement checked cast for DDResultRef once DDResultGetCFTypeID() is available
1054         <https://webkit.org/b/184554>
1055         <rdar://problem/36241894>
1056
1057         Reviewed by Brent Fulgham.
1058
1059         * editing/cocoa/DataDetection.mm:
1060         (WebCore::detectItemAtPositionWithRange): Implement checked cast
1061         for DDResultRef.
1062
1063 2018-05-31  Alex Christensen  <achristensen@webkit.org>
1064
1065         Fix Windows build after r232246.
1066         https://bugs.webkit.org/show_bug.cgi?id=186024
1067
1068         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
1069         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift const):
1070
1071 2018-05-31  Chris Dumez  <cdumez@apple.com>
1072
1073         Fix memory leak under NetworkStateNotifier::updateStateWithoutNotifying()
1074         https://bugs.webkit.org/show_bug.cgi?id=186149
1075         <rdar://problem/40674537>
1076
1077         Reviewed by Geoffrey Garen.
1078
1079         * platform/network/mac/NetworkStateNotifierMac.cpp:
1080         (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
1081
1082 2018-05-31  Zalan Bujtas  <zalan@apple.com>
1083
1084         [LFC] Layout code needs to know the type of the Element associated with a Layout::Box
1085         https://bugs.webkit.org/show_bug.cgi?id=186117
1086
1087         Reviewed by Antti Koivisto.
1088
1089         Since these attributes don't change during layout, we could just pass them in to Layout::Box instead
1090         of keep querying the Element.
1091
1092         * layout/layouttree/LayoutBlockContainer.cpp:
1093         (WebCore::Layout::BlockContainer::BlockContainer):
1094         * layout/layouttree/LayoutBlockContainer.h:
1095         * layout/layouttree/LayoutBox.cpp:
1096         (WebCore::Layout::Box::Box):
1097         (WebCore::Layout::Box::isPaddingApplicable const):
1098         (WebCore::Layout::Box::isDocumentBox const): Deleted.
1099         (WebCore::Layout::Box::isBodyBox const): Deleted.
1100         * layout/layouttree/LayoutBox.h:
1101         (WebCore::Layout::Box::isAnonymous const):
1102         (WebCore::Layout::Box::isDocumentBox const):
1103         (WebCore::Layout::Box::isBodyBox const):
1104         (WebCore::Layout::Box::ElementAttributes::ElementAttributes):
1105         (WebCore::Layout::Box::setPreviousSibling):
1106         (WebCore::Layout::Box::setIsAnonymous): Deleted.
1107         * layout/layouttree/LayoutContainer.cpp:
1108         (WebCore::Layout::Container::Container):
1109         * layout/layouttree/LayoutContainer.h:
1110         * layout/layouttree/LayoutInlineBox.cpp:
1111         (WebCore::Layout::InlineBox::InlineBox):
1112         * layout/layouttree/LayoutInlineBox.h:
1113         * layout/layouttree/LayoutInlineContainer.cpp:
1114         (WebCore::Layout::InlineContainer::InlineContainer):
1115         * layout/layouttree/LayoutInlineContainer.h:
1116         * layout/layouttree/LayoutTreeBuilder.cpp:
1117         (WebCore::Layout::TreeBuilder::createLayoutTree):
1118         (WebCore::Layout::TreeBuilder::createSubTree):
1119
1120 2018-05-31  Chris Dumez  <cdumez@apple.com>
1121
1122         Unreviewed iOS build fix after r232335.
1123
1124         * html/BaseChooserOnlyDateAndTimeInputType.h:
1125         * html/BaseDateAndTimeInputType.h:
1126
1127 2018-05-31  Chris Dumez  <cdumez@apple.com>
1128
1129         Unreviewed, apply review comments from Darin after r232310.
1130
1131         * platform/ReferrerPolicy.cpp:
1132         (WebCore::parseReferrerPolicy):
1133
1134 2018-05-31  Zalan Bujtas  <zalan@apple.com>
1135
1136         [LFC] Margin box is border box + margins.
1137         https://bugs.webkit.org/show_bug.cgi?id=186124
1138
1139         Reviewed by Antti Koivisto.
1140
1141         * layout/displaytree/DisplayBox.cpp:
1142         (WebCore::Display::Box::marginBox const):
1143
1144 2018-05-31  Zalan Bujtas  <zalan@apple.com>
1145
1146         [LFC] Add quirks mode setter/getting to LayoutContext
1147         https://bugs.webkit.org/show_bug.cgi?id=186122
1148
1149         Reviewed by Antti Koivisto.
1150
1151         * layout/LayoutContext.h:
1152         (WebCore::Layout::LayoutContext::setInQuirksMode):
1153         (WebCore::Layout::LayoutContext::inQuirksMode const):
1154         * page/FrameViewLayoutContext.cpp:
1155         (WebCore::layoutUsingFormattingContext):
1156
1157 2018-05-30  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
1158
1159         [GTK] Hardcoded text color in input fields
1160         https://bugs.webkit.org/show_bug.cgi?id=126907
1161
1162         Reviewed by Carlos Garcia Campos.
1163
1164         Set text color in input fields to foreground theme color.
1165         Also, set "window.background" as base GtkStyleContext to mimic
1166         GTK applications and fix some theme bugs.
1167
1168         No new tests required. ManualTests/gtk/theme.html already covers it.
1169
1170         * platform/gtk/RenderThemeGadget.cpp:
1171         (WebCore::baseStyleContext): Added.
1172         (WebCore::RenderThemeGadget::RenderThemeGadget):
1173         Use "window.background" GtkStyleContext instead of
1174         null parent for RenderThemeGadgets.
1175         * rendering/RenderThemeGtk.cpp:
1176         (WebCore::RenderThemeGtk::adjustButtonStyle const):
1177         Set color as foreground theme color.
1178         (WebCore::RenderThemeGtk::adjustTextFieldStyle const): Ditto.
1179         (WebCore::RenderThemeGtk::adjustTextAreaStyle const): Ditto.
1180         (WebCore::RenderThemeGtk::adjustSearchFieldStyle const): Ditto.
1181         * rendering/RenderThemeGtk.h: adjustTextAreaStyle() overriden.
1182
1183 2018-05-30  Yusuke Suzuki  <utatane.tea@gmail.com>
1184
1185         [JSC] Pass VM& parameter as much as possible
1186         https://bugs.webkit.org/show_bug.cgi?id=186085
1187
1188         Reviewed by Saam Barati.
1189
1190         No behavior change.
1191
1192         * bindings/js/JSCSSRuleListCustom.cpp:
1193         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
1194         * bindings/js/JSCallbackData.cpp:
1195         (WebCore::JSCallbackData::invokeCallback):
1196         * bindings/js/JSCustomXPathNSResolver.cpp:
1197         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
1198         * bindings/js/JSDOMBuiltinConstructorBase.cpp:
1199         (WebCore::JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments):
1200         * bindings/js/JSDOMConvertScheduledAction.h:
1201         (WebCore::Converter<IDLScheduledAction>::convert):
1202         * bindings/js/JSDOMIterator.h:
1203         (WebCore::iteratorForEach):
1204         * bindings/js/JSDOMMapLike.cpp:
1205         (WebCore::forwardFunctionCallToBackingMap):
1206         (WebCore::forwardForEachCallToBackingMap):
1207         * bindings/js/JSDOMPromise.cpp:
1208         (WebCore::callFunction):
1209         * bindings/js/JSDOMPromiseDeferred.cpp:
1210         (WebCore::DeferredPromise::callFunction):
1211         (WebCore::createRejectedPromiseWithTypeError):
1212         * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
1213         (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
1214         * bindings/js/JSEventListener.cpp:
1215         (WebCore::JSEventListener::handleEvent):
1216         * bindings/js/JSNodeListCustom.cpp:
1217         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
1218         * bindings/js/JSPluginElementFunctions.cpp:
1219         (WebCore::pluginElementCustomPut):
1220         (WebCore::callPlugin):
1221         * bindings/js/JSWindowProxy.cpp:
1222         (WebCore::JSWindowProxy::setWindow):
1223         * bindings/js/ReadableStream.cpp:
1224         (WebCore::ReadableStreamInternal::callFunction):
1225         * bindings/js/ReadableStreamDefaultController.cpp:
1226         (WebCore::callFunction):
1227         * bindings/js/ScheduledAction.cpp:
1228         (WebCore::ScheduledAction::executeFunctionInContext):
1229         * bindings/js/SerializedScriptValue.cpp:
1230         (WebCore::CloneSerializer::getProperty):
1231         (WebCore::CloneSerializer::serialize):
1232         * bindings/js/StructuredClone.cpp:
1233         (WebCore::structuredCloneArrayBufferView):
1234         * bindings/js/WorkerScriptController.cpp:
1235         (WebCore::WorkerScriptController::initScript):
1236         * bridge/NP_jsobject.cpp:
1237         * bridge/objc/WebScriptObject.mm:
1238         (-[WebScriptObject callWebScriptMethod:withArguments:]):
1239         * testing/Internals.cpp:
1240         (WebCore::Internals::cloneArrayBuffer):
1241         * testing/js/WebCoreTestSupport.cpp:
1242         (WebCoreTestSupport::injectInternalsObject):
1243
1244 2018-05-28  Darin Adler  <darin@apple.com>
1245
1246         Straighten out HTMLInputElement attribute handling
1247         https://bugs.webkit.org/show_bug.cgi?id=186043
1248
1249         Reviewed by Daniel Bates.
1250
1251         * dom/RadioButtonGroups.cpp:
1252         (WebCore::RadioButtonGroup::requiredStateChanged): Renamed from requiredAttributeChanged,
1253         and changed to take a reference.
1254         (WebCore::RadioButtonGroups::requiredStateChanged): Ditto.
1255         * dom/RadioButtonGroups.h: Updated for changes above.
1256
1257         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1258         (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree): Call
1259         updateInnerTextValue by its new name.
1260         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateInnerTextValue): Renamed
1261         from updateAppearance.
1262         (WebCore::BaseChooserOnlyDateAndTimeInputType::setValue): Call
1263         updateInnerTextValue by its new name.
1264         (WebCore::BaseChooserOnlyDateAndTimeInputType::attributeChanged): Override this
1265         instead of valueAttributeChanged.
1266         * html/BaseChooserOnlyDateAndTimeInputType.h: Tighten up inheritance a bit.
1267         Also use final a bit more and update for changes above.
1268
1269         * html/BaseDateAndTimeInputType.cpp:
1270         (WebCore::BaseDateAndTimeInputType::attributeChanged): Replaced
1271         minOrMaxAttributeChanged with this override, checking for the attribute names.
1272         * html/BaseDateAndTimeInputType.h: Updated for changes above.
1273
1274         * html/FileInputType.cpp:
1275         (WebCore::FileInputType::disabledStateChanged): Renamed from disabledAttributeChanged.
1276         (WebCore::FileInputType::attributeChanged): Replaced
1277         multipleAttributeChanged with this override, checking for the attribute names.
1278         * html/FileInputType.h: Updated for changes above.
1279
1280         * html/HTMLFormControlElement.cpp:
1281         (WebCore::HTMLFormControlElement::parseAttribute): Updated function names to say
1282         "state changed" rather than "attribute changed" if they are called only when the
1283         computed value is changed, not the raw attribute value.
1284         (WebCore::HTMLFormControlElement::readOnlyStateChanged): Updated name.
1285         (WebCore::HTMLFormControlElement::requiredStateChanged): Ditto.
1286         * html/HTMLFormControlElement.h: Updated for changes above.
1287
1288         * html/HTMLInputElement.cpp:
1289         (WebCore::HTMLInputElement::parseAttribute): Removed the code to call lots of specific
1290         attribute changed functions that have now been deleted. Also removed empty code for a
1291         couple of attributes.
1292         (WebCore::HTMLInputElement::disabledStateChanged): Added. Forward call to input type.
1293         (WebCore::HTMLInputElement::readOnlyStateChanged): Ditto.
1294         (WebCore::HTMLInputElement::requiredStateChanged): Renamed from requiredAttributeChanged.
1295         * html/HTMLInputElement.h: Updated for changes above.
1296
1297         * html/HTMLTextFormControlElement.cpp:
1298         (WebCore::HTMLTextFormControlElement::readOnlyStateChanged): Renamed from
1299         readOnlyAttributeChanged. Also fixed incorrect call to base class. This may have
1300         fixed a bug: With some work we could probably create a test case to demonstrate that.
1301         * html/HTMLTextFormControlElement.h: Updated for changes above.
1302
1303         * html/ImageInputType.cpp:
1304         (WebCore::ImageInputType::attributeChanged): Replaced
1305         altAttributeChanged and srcAttributeChanged with this override, checking for the
1306         attribute names.
1307         * html/ImageInputType.h: Updated for changes above.
1308
1309         * html/InputType.cpp:
1310         (WebCore::InputType::altAttributeChanged): Deleted.
1311         (WebCore::InputType::srcAttributeChanged): Deleted.
1312         (WebCore::InputType::maxResultsAttributeChanged): Deleted.
1313         (WebCore::InputType::minOrMaxAttributeChanged): Deleted.
1314         (WebCore::InputType::stepAttributeChanged): Deleted.
1315         (WebCore::InputType::valueAttributeChanged): Deleted.
1316         (WebCore::InputType::attributeChanged): Moved to header as an inline so derived
1317         classes can call through to the base class with the empty function inlined.
1318         (WebCore::InputType::multipleAttributeChanged): Deleted.
1319         (WebCore::InputType::disabledAttributeChanged): Moved to header as an inline.
1320         (WebCore::InputType::readonlyAttributeChanged): Ditto.
1321         (WebCore::InputType::requiredAttributeChanged): Ditto.
1322         * html/InputType.h: Updated for changes above.
1323
1324         * html/NumberInputType.cpp:
1325         (WebCore::NumberInputType::attributeChanged): Replaced
1326         minOrMaxAttributeChanged and stepAttributeChanged with this override, checking
1327         for the attribute names.
1328         * html/NumberInputType.h: Updated for changes above.
1329
1330         * html/RangeInputType.cpp:
1331         (WebCore::RangeInputType::disabledStateChanged): Renamed from
1332         disabledAttributeChanged.
1333         (WebCore::RangeInputType::attributeChanged): Replaced
1334         minOrMaxAttributeChanged with this override, checking for the attribute names.
1335         * html/RangeInputType.h: Updated for changes above.
1336
1337         * html/SearchInputType.cpp:
1338         (WebCore::SearchInputType::SearchInputType): Removed unneeded initialization of
1339         RefPtr data members to nullptr.
1340         (WebCore::updateResultButtonPseudoType): Removed unneeded if statement; the two
1341         cases above cover 0, and less than 0, so there is no need to check for greater
1342         than 0 for the third case.
1343         (WebCore::SearchInputType::attributeChanged): Replaced
1344         maxResultsAttributeChanged with this override, checking for the attribute name.
1345         * html/SearchInputType.h: Updated for changes above and marked more
1346         member functions final.
1347
1348         * html/TextFieldInputType.cpp:
1349         (WebCore::TextFieldInputType::attributeChanged): Added a call through to the
1350         base class to match the style of other overrides of this function.
1351         (WebCore::TextFieldInputType::disabledStateChanged): Renamed from disabledAttributeChanged.
1352         (WebCore::TextFieldInputType::readOnlyStateChanged): Renamed from readonlyAttributeChanged.
1353         * html/TextFieldInputType.h: Updated for changes above. Also made attributeChanged no
1354         longer be marked final since derived classes now override it.
1355
1356         * html/shadow/SliderThumbElement.cpp:
1357         (WebCore::SliderThumbElement::SliderThumbElement): Moved some data member initialization
1358         from this constructor to the class definition.
1359         (WebCore::SliderThumbElement::hostDisabledStateChanged): Renamed from disabledAttributeChanged.
1360         * html/shadow/SliderThumbElement.h: Updated for changes above and marked more
1361         member functions final.
1362
1363 2018-05-30  Nan Wang  <n_wang@apple.com>
1364
1365         AX: VoiceOver on macOS does not announce fieldset description from aria-describedby when focussing inputs
1366         https://bugs.webkit.org/show_bug.cgi?id=185246
1367         <rdar://problem/39939028>
1368
1369         Reviewed by Chris Fleizach.
1370
1371         Exposed the fieldset's description to its form control children.
1372
1373         Test: accessibility/mac/aria-describedby-fieldset.html
1374
1375         * accessibility/AccessibilityNodeObject.cpp:
1376         (WebCore::AccessibilityNodeObject::helpText const):
1377
1378 2018-05-30  Chris Fleizach  <cfleizach@apple.com>
1379
1380         AX: Expose link rel type to voiceover
1381         https://bugs.webkit.org/show_bug.cgi?id=186084
1382         <rdar://problem/40640871>
1383
1384         Reviewed by Sam Weinig.
1385
1386         Make the link rel attribute available to accessibility clients.
1387
1388         Test: accessibility/mac/linkrel.html
1389
1390         * accessibility/AccessibilityObject.cpp:
1391         (WebCore::AccessibilityObject::linkRelValue const):
1392         * accessibility/AccessibilityObject.h:
1393         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1394         (-[WebAccessibilityObjectWrapper accessibilityLinkRelationshipType]):
1395         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1396         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1397         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1398
1399 2018-05-30  Brady Eidson  <beidson@apple.com>
1400
1401         REGRESSION (r224684): User-agent seen by page does not change when modified by the develop menu options after reloading.
1402         <rdar://problem/34918109> and https://bugs.webkit.org/show_bug.cgi?id=186111
1403
1404         Reviewed by Andy Estes.
1405
1406         Test: http/tests/navigation/useragent-reload.php
1407
1408         * Modules/websockets/WebSocketHandshake.cpp:
1409         (WebCore::WebSocketHandshake::clientHandshakeRequest const): Use setUserAgent() for consistency.
1410
1411         * loader/DocumentLoader.cpp:
1412         (WebCore::DocumentLoader::startLoadingMainResource): Clear the user agent from the original DocumentLoader request
1413           before adding additional fields, as reloads should pick up user agent changes.
1414
1415 2018-05-30  Dean Jackson  <dino@apple.com>
1416
1417         WebContent crashes with system preview content
1418         https://bugs.webkit.org/show_bug.cgi?id=186118
1419
1420         Reviewed by Myles Maxfield.
1421
1422         We were receiving crash reports on iOS devices when getting
1423         platformContext() from a GraphicsContext. This usually
1424         occurred when the page was invisible. Debugging showed that
1425         it was trying to draw with a disabled context.
1426
1427         * rendering/RenderThemeIOS.mm:
1428         (WebCore::RenderThemeIOS::paintSystemPreviewBadge): Early
1429         return if the context has painting disabled.
1430
1431 2018-05-30  Daniel Bates  <dabates@apple.com>
1432
1433         Web Inspector: Annotate Same-Site cookies
1434         https://bugs.webkit.org/show_bug.cgi?id=184897
1435         <rdar://problem/35178209>
1436
1437         Reviewed by Brian Burg.
1438
1439         Store and retrieve the Same-Site cookie policy from CFNetwork.
1440
1441         * inspector/agents/InspectorPageAgent.cpp:
1442         (WebCore::cookieSameSitePolicyJSON): Added.
1443         (WebCore::buildObjectForCookie): Modified to include cookie Same-Site policy. 
1444         * platform/Cookie.h:
1445         (WebCore::Cookie::encode const): Encode Same-Site policy.
1446         (WebCore::Cookie::decode): Decode Same-Site policy.
1447         * platform/network/cocoa/CookieCocoa.mm:
1448         (WebCore::portStringFromVector):
1449         (WebCore::coreSameSitePolicy):
1450         (WebCore::nsSameSitePolicy):
1451         (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
1452         (WebCore::Cookie::operator NSHTTPCookie * const): Deleted.
1453
1454 2018-05-30  Daniel Bates  <dabates@apple.com>
1455
1456         NavigationAction does not need to hold initiating DOM Event
1457         https://bugs.webkit.org/show_bug.cgi?id=185958
1458         <rdar://problem/40531539>
1459
1460         Reviewed by Simon Fraser.
1461
1462         Take a similar approach as was done in <https://bugs.webkit.org/show_bug.cgi?id=185712>
1463         and have NavigationAction hold only as many details of the initiating DOM Event as
1464         necessary to support WebKit functionality. Retaining a DOM Event effectively retains
1465         the document that associated with the event. And DocumentLoader always keeps around
1466         the NavigationAction of the last navigation for the "benefit of the various policy handlers".
1467         Therefore, having NavigationAction hold only the relevant details of the DOM Event
1468         instead of the DOM Event itself we avoid keeping the document we navigated from alive
1469         longer than necessary. 
1470
1471         * dom/MouseRelatedEvent.h:
1472         * dom/UIEventWithKeyState.h:
1473         * loader/NavigationAction.cpp:
1474         (WebCore::NavigationAction::UIEventWithKeyStateData::UIEventWithKeyStateData): Added.
1475         (WebCore::NavigationAction::MouseEventData::MouseEventData): Added.
1476         (WebCore::keyStateDataForFirstEventWithKeyState): Added.
1477         (WebCore::mouseEventDataForFirstMouseEvent): Added.
1478         * loader/NavigationAction.h:
1479         (WebCore::NavigationAction::keyStateEventData const): Added.
1480         (WebCore::NavigationAction::mouseEventData const): Added
1481         (WebCore::NavigationAction::event const): Deleted.
1482
1483 2018-05-30  Youenn Fablet  <youenn@apple.com>
1484
1485         Revert changes made to URLWithUserTypedString made in https://trac.webkit.org/changeset/232281
1486         https://bugs.webkit.org/show_bug.cgi?id=186108
1487         <rdar://problem/40663065>
1488
1489         Reviewed by Alex Christensen.
1490
1491         Covered by existing API tests.
1492
1493         * platform/mac/WebCoreNSURLExtras.mm:
1494         (WebCore::URLWithUserTypedString):
1495         Return early if WebCore::URL is not able to create a CFURL.
1496         Use CFURL otherwise to keep the existing behavior as much as possible.
1497
1498 2018-05-30  Youenn Fablet  <youenn@apple.com>
1499
1500         Rename FromOrigin runtime flag to CrossOriginResourcePolicy and enable it by default
1501         https://bugs.webkit.org/show_bug.cgi?id=186082
1502
1503         Reviewed by Chris Dumez.
1504
1505         No change of behavior.
1506
1507         * page/RuntimeEnabledFeatures.h:
1508         (WebCore::RuntimeEnabledFeatures::setCrossOriginResourcePolicyEnabled):
1509         (WebCore::RuntimeEnabledFeatures::crossOriginResourcePolicyEnabled const):
1510         (WebCore::RuntimeEnabledFeatures::setFromOriginResponseHeaderEnabled): Deleted.
1511         (WebCore::RuntimeEnabledFeatures::fromOriginResponseHeaderEnabled const): Deleted.
1512
1513 2018-05-30  Chris Dumez  <cdumez@apple.com>
1514
1515         Referrer-Policy response header is ignored
1516         https://bugs.webkit.org/show_bug.cgi?id=186037
1517         <rdar://problem/40600335>
1518
1519         Reviewed by Youenn Fablet.
1520
1521         Add support for Referrer-Policy HTTP response header:
1522         - https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header
1523
1524         Tests: http/tests/security/referrer-policy-header-and-meta-tag-emptyString.html
1525                http/tests/security/referrer-policy-header-and-meta-tag.html
1526                http/tests/security/referrer-policy-header.html
1527
1528         * dom/Document.cpp:
1529         (WebCore::Document::setReferrerPolicy):
1530         (WebCore::Document::processReferrerPolicy):
1531         * dom/Document.h:
1532         (WebCore::Document::referrerPolicy const):
1533         * html/HTMLMetaElement.cpp:
1534         (WebCore::HTMLMetaElement::process):
1535         * loader/FrameLoader.cpp:
1536         (WebCore::FrameLoader::didBeginDocument):
1537         * loader/SubresourceLoader.cpp:
1538         (WebCore::SubresourceLoader::updateReferrerPolicy):
1539         * platform/ReferrerPolicy.cpp:
1540         (WebCore::parseReferrerPolicyToken):
1541         (WebCore::parseReferrerPolicy):
1542         * platform/ReferrerPolicy.h:
1543
1544 2018-05-30  Youenn Fablet  <youenn@apple.com>
1545
1546         Rename CrossOriginResourcePolicy same to same-origin
1547         https://bugs.webkit.org/show_bug.cgi?id=186080
1548
1549         Reviewed by Chris Dumez.
1550
1551         Covered by updated tests.
1552
1553         * platform/network/HTTPParsers.cpp:
1554         (WebCore::parseCrossOriginResourcePolicyHeader):
1555         * platform/network/HTTPParsers.h:
1556
1557 2018-05-30  Aditya Keerthi  <akeerthi@apple.com>
1558
1559         Fix the ENABLE(DATALIST_ELEMENT) build
1560         https://bugs.webkit.org/show_bug.cgi?id=186105
1561
1562         Reviewed by Wenson Hsieh.
1563
1564         * WebCore.xcodeproj/project.pbxproj:
1565         * html/ColorInputType.cpp:
1566         (WebCore::ColorInputType::suggestions const):
1567         * html/HTMLInputElement.h:
1568         * html/HTMLOptionElement.cpp:
1569         (WebCore::HTMLOptionElement::ownerDataListElement const):
1570         * rendering/RenderTheme.cpp:
1571         (WebCore::RenderTheme::paintSliderTicks):
1572
1573 2018-05-30  Alex Christensen  <achristensen@webkit.org>
1574
1575         Reduce String allocations
1576         https://bugs.webkit.org/show_bug.cgi?id=186059
1577
1578         Reviewed by Darin Adler.
1579
1580         Don't allocate Strings just to convert it to another form.
1581         Based mostly on Darin's feedback on bug 185986.
1582
1583         No change in behavior.
1584
1585         * Modules/websockets/WebSocketHandshake.cpp:
1586         (WebCore::hostName):
1587         (WebCore::WebSocketHandshake::host const):
1588         * css/parser/CSSSelectorParser.cpp:
1589         (WebCore::CSSSelectorParser::consumePseudo):
1590         (WebCore::CSSSelectorParser::consumeANPlusB):
1591         * loader/mac/LoaderNSURLExtras.mm:
1592         (suggestedFilenameWithMIMEType):
1593         * page/SecurityOriginData.h:
1594         (WebCore::SecurityOriginData::fromURL):
1595         * page/csp/ContentSecurityPolicySource.cpp:
1596         (WebCore::wildcardMatches):
1597         (WebCore::ContentSecurityPolicySource::hostMatches const):
1598         * platform/URL.cpp:
1599         (WebCore::URL::hostAndPort const):
1600         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
1601         (WebCore::SocketStreamHandleImpl::createStreams):
1602
1603 2018-05-30  Jer Noble  <jer.noble@apple.com>
1604
1605         Media elements outside fullscreen should not be considered main content.
1606         https://bugs.webkit.org/show_bug.cgi?id=186063
1607         <rdar://problem/40630437>
1608
1609         Reviewed by Eric Carlson.
1610
1611         Test: platform/mac/media/video-best-element-for-playback-controls-purpose.html
1612
1613         Media elements outside the current fullscreen element are not visible, and thus should not be considered
1614         main content.
1615
1616         Drive-by fix: set the m_hasEverNotifiedAboutPlaying before dispatching the 'playing' event, so that
1617         tests can check bestMediaElementForShowingPlaybackControlsManager() in the 'playing' handler.
1618
1619         * html/HTMLMediaElement.cpp:
1620         (WebCore::HTMLMediaElement::notifyAboutPlaying):
1621         * html/HTMLMediaElement.h:
1622         * html/MediaElementSession.cpp:
1623         (WebCore::MediaElementSession::canShowControlsManager const):
1624         * testing/Internals.cpp:
1625         (WebCore::Internals::bestMediaElementForShowingPlaybackControlsManager):
1626         * testing/Internals.h:
1627         * testing/Internals.idl:
1628
1629 2018-05-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1630
1631         Unreviewed, silence a -Wreturn-type warning
1632
1633         * css/SVGCSSComputedStyleDeclaration.cpp:
1634         (WebCore::glyphOrientationToCSSPrimitiveValue):
1635
1636 2018-05-30  Alexey Proskuryakov  <ap@apple.com>
1637
1638         Build fix attempt after https://trac.webkit.org/r232198
1639
1640         * platform/network/cf/ResourceHandleCFNet.cpp:
1641         (WebCore::ResourceHandle::createCFURLConnection): Added some toString() calls.
1642
1643 2018-05-30  Zalan Bujtas  <zalan@apple.com>
1644
1645         [LFC] Miscellaneous fixes to get closer to geometry correctness
1646         https://bugs.webkit.org/show_bug.cgi?id=186083
1647
1648         Reviewed by Antti Koivisto.
1649
1650         * layout/FormattingContextGeometry.cpp:
1651         (WebCore::Layout::FormattingContext::Geometry::computedBorder):
1652         * layout/LayoutContext.cpp:
1653         (WebCore::Layout::LayoutContext::initializeRoot):
1654         * layout/Verification.cpp:
1655         (WebCore::Layout::outputMismatchingBoxInformationIfNeeded):
1656         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1657         (WebCore::Layout::isStretchedToViewport):
1658         (WebCore::Layout::initialContainingBlock):
1659         (WebCore::Layout::computedInFlowNonReplacedComputedHeight):
1660         (WebCore::Layout::inFlowNonReplacedComputedWidth):
1661         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight): lambda should capture the specification part. 
1662         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidth):
1663         * layout/displaytree/DisplayBox.cpp:
1664         (WebCore::Display::Box::marginBox const):
1665         (WebCore::Display::Box::paddingBox const):
1666         (WebCore::Display::Box::contentBox const):
1667         * layout/layouttree/LayoutBox.cpp:
1668         (WebCore::Layout::Box::isDocumentBox const):
1669         (WebCore::Layout::Box::isBodyBox const):
1670         * layout/layouttree/LayoutBox.h:
1671         * rendering/style/BorderValue.h: ignore border-width when type is hidden or none. 
1672         (WebCore::BorderValue::boxModelWidth const):
1673
1674 2018-05-30  Stephen McGruer  <smcgruer@chromium.org>
1675
1676         iOS: setting 'defaultValue' of input type=date from script should cause a UI update
1677         https://bugs.webkit.org/show_bug.cgi?id=185982
1678
1679         Reviewed by Darin Adler.
1680
1681         Test: fast/forms/date/date-appearance-defaultValue.html
1682
1683         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1684         (WebCore::BaseChooserOnlyDateAndTimeInputType::valueAttributeChanged):
1685         * html/BaseChooserOnlyDateAndTimeInputType.h:
1686         * html/HTMLInputElement.cpp:
1687         (WebCore::HTMLInputElement::parseAttribute):
1688         * html/InputType.cpp:
1689         (WebCore::InputType::valueAttributeChanged):
1690         * html/InputType.h:
1691
1692 2018-05-29  Nan Wang  <n_wang@apple.com>
1693
1694         Unreviewed, follow-up after r232285
1695         https://bugs.webkit.org/show_bug.cgi?id=180871
1696
1697         Removed redundant null check.
1698
1699         * accessibility/AccessibilityObject.cpp:
1700         (WebCore::AccessibilityObject::isExpanded const):
1701
1702 2018-05-29  Nan Wang  <n_wang@apple.com>
1703
1704         AX: macOS VoiceOver doesn't announce when details element is expanded when using role group
1705         https://bugs.webkit.org/show_bug.cgi?id=180866
1706         <rdar://problem/36074338>
1707
1708         Reviewed by Chris Fleizach.
1709
1710         We should use is<HTMLDetailsElement> to check for the details parent instead
1711         of using the role.
1712
1713         Added test cases to the existing test.
1714
1715         * accessibility/AccessibilityObject.cpp:
1716         (WebCore::AccessibilityObject::isExpanded const):
1717
1718 2018-05-29  Youenn Fablet  <youenn@apple.com>
1719
1720         Add a consistency check between URL and CFURL
1721         https://bugs.webkit.org/show_bug.cgi?id=186057
1722         <rdar://problem/40258457>
1723
1724         Reviewed by Geoff Garen.
1725
1726         It is important that WebCore::URL used in WebCore and CFURL that gets serialized in the network pipe remain consistent.
1727         Otherwise, we will end-up with odd bugs.
1728
1729         We add such a check when creating a CFURL from an URL.
1730         To make things more consistent, we also rely now more on WebCore::URL instead of directly creating a CFURL.
1731
1732         * platform/URL.h:
1733         * platform/cf/CFURLExtras.cpp:
1734         (WebCore::isCFURLSameOrigin):
1735         * platform/cf/CFURLExtras.h:
1736         * platform/cf/URLCF.cpp:
1737         (WebCore::URL::createCFURL const):
1738         * platform/mac/URLMac.mm:
1739         (WebCore::URL::createCFURL const):
1740         * platform/mac/WebCoreNSURLExtras.mm:
1741         (WebCore::URLWithUserTypedString):
1742
1743 2018-05-29  Timothy Hatcher  <timothy@apple.com>
1744
1745         Printing does not apply the right colors in all cases.
1746
1747         https://bugs.webkit.org/show_bug.cgi?id=186066
1748         rdar://problem/40274975
1749
1750         Reviewed by Tim Horton.
1751
1752         * inspector/agents/InspectorPageAgent.cpp:
1753         (WebCore::InspectorPageAgent::setEmulatedMedia): Call RenderTheme::platformColorsDidChange
1754         to invalidate the color cache.
1755         * page/FrameView.cpp:
1756         (WebCore::FrameView::adjustMediaTypeForPrinting): Ditto.
1757         * page/Page.cpp:
1758         (WebCore::Page::defaultAppearance const): Added. Use default when not screen.
1759         * page/Page.h:
1760         (WebCore::Page::defaultAppearance const): Deleted.
1761
1762 2018-05-29  Per Arne Vollan  <pvollan@apple.com>
1763
1764         Create typedef for HashMap<PlatformDisplayID, ScreenProperties>
1765         https://bugs.webkit.org/show_bug.cgi?id=186056
1766
1767         Reviewed by Brent Fulgham.
1768
1769         No new tests, no change in behavior.
1770
1771         * platform/PlatformScreen.h:
1772         * platform/mac/PlatformScreenMac.mm:
1773         (WebCore::screenProperties):
1774         (WebCore::getScreenProperties):
1775         (WebCore::setScreenProperties):
1776
1777 2018-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1778
1779         iOS WK1: Occasional crash in sanitizedMarkupForFragmentInDocument
1780         https://bugs.webkit.org/show_bug.cgi?id=186011
1781
1782         Reviewed by David Kilzer.
1783
1784         The crash was caused by the HTML parser in sanitizedMarkupForFragmentInDocument yielding in the web thread
1785         when _WebThreadLock() sets webThreadShouldYield to true in the main thread.
1786
1787         No new tests. This is occasionally caught by existing tests.
1788
1789         * editing/markup.cpp:
1790         (WebCore::createPageForSanitizingWebContent): Fixed the bug by making the HTML parser never yield.
1791         Also release-assert that the body is never null here.
1792         (WebCore::sanitizedMarkupForFragmentInDocument): Removed superflous call to WTFMove since appendChild
1793         takes a reference, not a Ref.
1794         * inspector/InspectorOverlay.cpp:
1795         (WebCore::InspectorOverlay::overlayPage): Deployed the same fix.
1796         * loader/DocumentWriter.cpp:
1797         (WebCore::DocumentWriter::insertDataSynchronously): Added.
1798         * loader/DocumentWriter.h:
1799
1800 2018-05-29  Chris Dumez  <cdumez@apple.com>
1801
1802         Avoid unnecessary String allocation in isPublicSuffix(const String&)
1803         https://bugs.webkit.org/show_bug.cgi?id=186054
1804
1805         Reviewed by Sam Weinig.
1806
1807         Avoid unnecessary String allocation in isPublicSuffix(const String&) by calling directly
1808         the decodeHostName() overload taking in a NSString*. This overload returns a NSString*,
1809         which is what we need. We would previously call the overloading taking in a String, which
1810         would return a String, which we would have to convert back to a NSString*.
1811
1812         * platform/mac/PublicSuffixMac.mm:
1813         (WebCore::isPublicSuffix):
1814
1815 2018-05-29  Alex Christensen  <achristensen@webkit.org>
1816
1817         Do even fewer allocations in URL host operations
1818         https://bugs.webkit.org/show_bug.cgi?id=186003
1819
1820         Reviewed by Geoffrey Garen.
1821
1822         * loader/ResourceLoadStatistics.cpp:
1823         (WebCore::ResourceLoadStatistics::primaryDomain):
1824         * loader/ResourceLoadStatistics.h:
1825         * platform/URL.cpp:
1826         (WebCore::URL::hostIsIPAddress):
1827         * platform/URL.h:
1828         * platform/mac/URLMac.mm:
1829         (WebCore::URL::hostIsIPAddress):
1830         * platform/soup/URLSoup.cpp:
1831         (WebCore::URL::hostIsIPAddress):
1832
1833 2018-05-29  Tadeu Zagallo  <tzagallo@apple.com>
1834
1835         Don't assert on m_actionsStart when setting actions on DFA nodes
1836         https://bugs.webkit.org/show_bug.cgi?id=185979
1837         <rdar://problem/39669458>
1838
1839         Reviewed by Geoffrey Garen.
1840
1841         DFANode::setActions is called immediately after the node is created, and once again to set
1842         the actions of catch-all regular expressions (.*) on the root node. That works because
1843         m_actionsStart is initially 0, since the root was the first node to be created, but may fail
1844         after minimizing the DFA, when the root may no longer be the first node, and therefore
1845         m_actionsStart would not be 0, even if there are no actions attached to that node.
1846
1847         Test: http/tests/contentextensions/root-actions.html
1848
1849         * contentextensions/DFANode.h:
1850
1851 2018-05-29  Nan Wang  <n_wang@apple.com>
1852
1853         AX: setValue on contenteditable should preserve whitespace
1854         https://bugs.webkit.org/show_bug.cgi?id=185897
1855
1856         Reviewed by Ryosuke Niwa.
1857
1858         We should mimic typing when setting value to a contenteditable from accessibility
1859         instead of mutating the DOM by using setInnerText.
1860
1861         Updated tests to cover this change.
1862
1863         * accessibility/AccessibilityRenderObject.cpp:
1864         (WebCore::AccessibilityRenderObject::setValue):
1865
1866 2018-05-29  Zalan Bujtas  <zalan@apple.com>
1867
1868         [LFC] Miscellaneous fixes to ensure no assertion in LayoutContext::layout
1869         https://bugs.webkit.org/show_bug.cgi?id=186052
1870
1871         Reviewed by Antti Koivisto.
1872
1873         With this patch, LayoutContext::layout() does not assert on <html><body><div></div></body></html> anymore.
1874
1875         * layout/LayoutContext.cpp:
1876         (WebCore::Layout::LayoutContext::initializeRoot): New context root is always a layout root.
1877         * layout/LayoutContext.h:
1878         * layout/Verification.cpp:
1879         (WebCore::Layout::outputMismatchingBoxInformationIfNeeded):
1880         * layout/blockformatting/BlockFormattingContext.cpp:
1881         (WebCore::Layout::BlockFormattingContext::layout const): we need computed margin/border/padding for width computation  
1882         * layout/displaytree/DisplayBox.cpp: Add clone() method to be able to carry over the 'hasValid*' bits.
1883         (WebCore::Display::Box::Style::Style):
1884         (WebCore::Display::Box::borderBox const):
1885         (WebCore::Display::Box::contentBox const):
1886         * layout/displaytree/DisplayBox.h:
1887         (WebCore::Display::Box::Rect::operator LayoutRect const):
1888         (WebCore::Display::Box::setSize):
1889         (WebCore::Display::Box::setHasValidMargin):
1890         (WebCore::Display::Box::setHasValidBorder):
1891         (WebCore::Display::Box::setHasValidPadding):
1892         (WebCore::Display::Box::Rect::setHasValidPosition):
1893         (WebCore::Display::Box::Rect::setHasValidSize):
1894         (WebCore::Display::Box::Rect::setSize):
1895         (WebCore::Display::Box::Rect::clone const):
1896         (WebCore::Display::Box::setMargin):
1897         (WebCore::Display::Box::setBorder):
1898         (WebCore::Display::Box::setPadding):
1899         (WebCore::Display::Box::Rect::Rect): Deleted.
1900
1901 2018-05-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1902
1903         [Extra zoom mode] "Significant area painted" rendering progress event is rarely fired
1904         https://bugs.webkit.org/show_bug.cgi?id=186042
1905         <rdar://problem/40604182>
1906
1907         Reviewed by Tim Horton.
1908
1909         Makes a minor tweak to the size of the relevant view rect in extra zoom mode, such that it's no wider than the
1910         visible content rect. Previously, the width of this rect has hard-coded to a value optimized for macOS (980),
1911         which makes it difficult for content laid out at device width in extra zoom mode to cover a significant portion
1912         of the relevant view rect.
1913
1914         Test: RenderingProgressTests.FirstPaintWithSignificantArea
1915
1916         * page/Page.cpp:
1917         (WebCore::relevantViewRect):
1918
1919 2018-05-29  Antoine Quint  <graouts@apple.com>
1920
1921         [Web Animations] Handle relative length units
1922         https://bugs.webkit.org/show_bug.cgi?id=186047
1923
1924         Reviewed by Dean Jackson.
1925
1926         In order to correctly handle relative units, such as "em", "vw" and "vh", we need to do two things.
1927
1928         First, because we need to apply the cascade to correctly compute relative lengths, we need to delay the computation of
1929         "blending keyframes" to when we have both keyframes data and a valid target. This also means that we need to reset blending
1930         keyframes when the target changes. As a result, old call sites of updateBlendingKeyframes() have been replaced by a call to
1931         m_blendingKeyframes.clear() and the method now gets called as part of apply() with the RenderStyle of the targeted element
1932         as a parameter.
1933
1934         Second, and as a result of the first change, we need to update the accelerated animation state based on animation
1935         progress rather than when calling specific methods, such as Animation.play() and Animation.pause(), since blending
1936         keyframes may not be available at those more specific call sites. We now have a new updateAcceleratedAnimationState()
1937         method that gets called as part of apply(). We also rename animationPlayStateDidChange() to animationSuspensionStateDidChange()
1938         since this method was specific to suspension and had a confusing name.
1939
1940         * animation/AnimationEffectReadOnly.h: Rename animationPlayStateDidChange() to animationSuspensionStateDidChange().
1941         * animation/KeyframeEffectReadOnly.cpp:
1942         (WebCore::KeyframeEffectReadOnly::getKeyframes): Fix a crash that revealed itself after other changes in this patch. We would later
1943         call into ComputedStyleExtractor::animationSuspensionStateDidChange() and this would yield an assertion because we'd call potentially
1944         call it with a custom CSS property.
1945         (WebCore::KeyframeEffectReadOnly::processKeyframes): Reset blending keyframes instead of calling updateBlendingKeyframes() since
1946         blending keyframes is now performed asynchronously upon style resolution.
1947         (WebCore::KeyframeEffectReadOnly::updateBlendingKeyframes): Take the target's RenderStyle as a parameter and use it to reset the
1948         associated StyleResolver's state, just like we do in StyleResolver::keyframeStylesForAnimation(), so that the CSS cascade is correctly
1949         accounted for when computing values using relative length units. Since blending keyframes can now be computed several times for a
1950         given set of keyframes, since the effect's target may change, we also need to create a copy of the MutableStyleProperties to pass
1951         to StyleRuleKeyframe::create().
1952         (WebCore::KeyframeEffectReadOnly::setTarget): Reset blending keyframes instead of calling updateBlendingKeyframes() since
1953         blending keyframes is now performed asynchronously upon style resolution.
1954         (WebCore::KeyframeEffectReadOnly::apply): Update blending keyframes and the accelerated animation state.
1955         (WebCore::KeyframeEffectReadOnly::getAnimatedStyle): Make sure we have blending keyframes with a call to updateBlendingKeyframes()
1956         in case the animation hasn't naturally progressed when this method is called.
1957         (WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): Make sure we have blending keyframes with a call to
1958         updateBlendingKeyframes() in case the animation hasn't naturally progressed when this method is called.
1959         (WebCore::KeyframeEffectReadOnly::updateAcceleratedAnimationState): Account for the animation's local time and play state to update
1960         the accelerated animation state.
1961         (WebCore::KeyframeEffectReadOnly::addPendingAcceleratedAction): Record the last accelerated action in a member variable which we can
1962         use to determine if we're running accelerated accounting for uncommited changes.
1963         (WebCore::KeyframeEffectReadOnly::animationDidSeek): Only record an AcceleratedAction::Seek action if we're already running accelerated.
1964         (WebCore::KeyframeEffectReadOnly::animationSuspensionStateDidChange): Only record an AcceleratedAction::Pause or AcceleratedAction::Play
1965         action if we're already running accelerated.
1966         (WebCore::KeyframeEffectReadOnly::applyPendingAcceleratedActions): Ensure we clone and clear the list of accelerated actions and check that
1967         we have any cloned actions before proceeding any further. Then we can stop accounting for m_startedAccelerated since the list of accelerated
1968         actions already account for animation state changes.
1969         (WebCore::KeyframeEffectReadOnly::animationPlayStateDidChange): Deleted.
1970         * animation/KeyframeEffectReadOnly.h:
1971         (WebCore::KeyframeEffectReadOnly::isRunningAccelerated const): Account for the m_lastRecordedAcceleratedAction to identify whether we're running.
1972         * animation/WebAnimation.cpp:
1973         (WebCore::WebAnimation::play): Stop calling animationPlayStateDidChange() directly since the accelerated animation state is now updated when
1974         the animation's effect is applied.
1975         (WebCore::WebAnimation::pause): Stop calling animationPlayStateDidChange() directly since the accelerated animation state is now updated when
1976         the animation's effect is applied.
1977         (WebCore::WebAnimation::resolve): Make sure we update the finished state prior to applying the animation's effect since the play state can
1978         change when updating the finished state and KeyframeEffectReadOnly::updateAcceleratedAnimationState(), which is called when calling into
1979         KeyframeEffectReadOnly::apply(), relies on it to correctly update the accelerated animation state.
1980         (WebCore::WebAnimation::setSuspended): Rename animationPlayStateDidChange() to animationSuspensionStateDidChange().
1981         * css/StyleResolver.cpp:
1982         (WebCore::StyleResolver::setNewStateWithElement): Add a new public method to reset a StyleResolver's state such that we can call it when creating
1983         blending keyframes for JS-originated animations just like we do when creating blending keyframes for CSS Animations in keyframeStylesForAnimation().
1984         (WebCore::StyleResolver::keyframeStylesForAnimation): Use the new setNewStateWithElement() method.
1985         * css/StyleResolver.h:
1986
1987 2018-05-29  Thibault Saunier  <tsaunier@igalia.com>
1988
1989         [GStreamer] Update "qtdemux: Clarify field name about stream-encryption-system" patch
1990         https://bugs.webkit.org/show_bug.cgi?id=186040
1991
1992         Reviewed by Xabier Rodriguez-Calvar.
1993
1994         s/avalaible-stream-encryption-systems/available-stream-encryption-systems/g
1995
1996         Tests: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-*
1997
1998         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1999         (WebCore::extractEventsAndSystemsFromMessage):
2000
2001 2018-05-28  Zalan Bujtas  <zalan@apple.com>
2002
2003         Unreviewed build fix.
2004
2005         * layout/displaytree/DisplayBox.h:
2006         (WebCore::Display::Box::Rect::operator LayoutRect const):
2007
2008 2018-05-28  Zalan Bujtas  <zalan@apple.com>
2009
2010         [LFC] Add Rect interface to Display::Box
2011         https://bugs.webkit.org/show_bug.cgi?id=186019
2012
2013         Reviewed by Antti Koivisto.
2014
2015         Having a dedicated Rect class and moving the geometry invalidation to it enables us to call
2016         displayBox.contentBox().left() even when the widht/height are not computed yet.
2017         Also having Rect with top/left/bottom/right interface is more aligned with the rest of the layout code than x/y/maxX/maxY.
2018
2019         * layout/FormattingContextGeometry.cpp:
2020         (WebCore::Layout::contentHeightForFormattingContextRoot):
2021         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2022         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
2023         * layout/displaytree/DisplayBox.cpp:
2024         (WebCore::Display::Box::marginBox const):
2025         (WebCore::Display::Box::borderBox const):
2026         (WebCore::Display::Box::paddingBox const):
2027         (WebCore::Display::Box::contentBox const):
2028         * layout/displaytree/DisplayBox.h:
2029         (WebCore::Display::Box::Rect::invalidateTop):
2030         (WebCore::Display::Box::Rect::invalidateLeft):
2031         (WebCore::Display::Box::Rect::invalidateWidth):
2032         (WebCore::Display::Box::Rect::invalidateHeight):
2033         (WebCore::Display::Box::Rect::hasValidPosition const):
2034         (WebCore::Display::Box::Rect::hasValidSize const):
2035         (WebCore::Display::Box::Rect::hasValidGeometry const):
2036         (WebCore::Display::Box::rect const):
2037         (WebCore::Display::Box::top const):
2038         (WebCore::Display::Box::left const):
2039         (WebCore::Display::Box::bottom const):
2040         (WebCore::Display::Box::right const):
2041         (WebCore::Display::Box::topLeft const):
2042         (WebCore::Display::Box::bottomRight const):
2043         (WebCore::Display::Box::size const):
2044         (WebCore::Display::Box::width const):
2045         (WebCore::Display::Box::height const):
2046         (WebCore::Display::Box::setTopLeft):
2047         (WebCore::Display::Box::setTop):
2048         (WebCore::Display::Box::setLeft):
2049         (WebCore::Display::Box::setWidth):
2050         (WebCore::Display::Box::setHeight):
2051         (WebCore::Display::Box::Rect::invalidatePosition):
2052         (WebCore::Display::Box::Rect::setHasValidPosition):
2053         (WebCore::Display::Box::Rect::Rect):
2054         (WebCore::Display::Box::Rect::top const):
2055         (WebCore::Display::Box::Rect::left const):
2056         (WebCore::Display::Box::Rect::bottom const):
2057         (WebCore::Display::Box::Rect::right const):
2058         (WebCore::Display::Box::Rect::topLeft const):
2059         (WebCore::Display::Box::Rect::bottomRight const):
2060         (WebCore::Display::Box::Rect::size const):
2061         (WebCore::Display::Box::Rect::width const):
2062         (WebCore::Display::Box::Rect::height const):
2063         (WebCore::Display::Box::Rect::setTopLeft):
2064         (WebCore::Display::Box::Rect::setTop):
2065         (WebCore::Display::Box::Rect::setLeft):
2066         (WebCore::Display::Box::Rect::setWidth):
2067         (WebCore::Display::Box::Rect::setHeight):
2068         (WebCore::Display::Box::Rect::shiftLeftTo):
2069         (WebCore::Display::Box::Rect::shiftRightTo):
2070         (WebCore::Display::Box::Rect::shiftTopTo):
2071         (WebCore::Display::Box::Rect::shiftBottomTo):
2072         (WebCore::Display::Box::Rect::expand):
2073         (WebCore::Display::Box::invalidateTop): Deleted.
2074         (WebCore::Display::Box::invalidateLeft): Deleted.
2075         (WebCore::Display::Box::invalidateWidth): Deleted.
2076         (WebCore::Display::Box::invalidateHeight): Deleted.
2077         (WebCore::Display::Box::hasValidPosition const): Deleted.
2078         (WebCore::Display::Box::hasValidSize const): Deleted.
2079         (WebCore::Display::Box::hasValidGeometry const): Deleted.
2080         (WebCore::Display::Box::invalidatePosition): Deleted.
2081         (WebCore::Display::Box::setHasValidPosition): Deleted.
2082
2083 2018-05-28  Zalan Bujtas  <zalan@apple.com>
2084
2085         [LFC] Add formatting context testing codepath in FrameViewLayoutContext
2086         https://bugs.webkit.org/show_bug.cgi?id=186036
2087
2088         Reviewed by Antti Koivisto.
2089
2090         This is to verify the formatting context layout correctness.
2091
2092         * layout/LayoutContext.cpp:
2093         (WebCore::Layout::LayoutContext::LayoutContext):
2094         (WebCore::Layout::LayoutContext::initializeRoot):
2095         * layout/LayoutContext.h:
2096         (WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):
2097         * page/FrameViewLayoutContext.cpp:
2098         (WebCore::layoutUsingFormattingContext):
2099         (WebCore::FrameViewLayoutContext::layout):
2100
2101 2018-05-28  Zalan Bujtas  <zalan@apple.com>
2102
2103         [LFC] Add layout tree verification.
2104         https://bugs.webkit.org/show_bug.cgi?id=186018
2105
2106         Reviewed by Antti Koivisto.
2107
2108         Compare layout and render tree geometry and output the mismtaching rectangles.
2109
2110         * Sources.txt:
2111         * WebCore.xcodeproj/project.pbxproj: Add missing headers and make then private.
2112         * layout/LayoutContext.h:
2113         * layout/Verification.cpp: Added.
2114         (WebCore::Layout::outputMismatchedBoxInformationIfNeeded):
2115         (WebCore::Layout::verifySubtree):
2116         (WebCore::Layout::LayoutContext::verifyAndOutputLayoutTree const):
2117
2118 2018-05-28  Sam Weinig  <sam@webkit.org>
2119
2120         Modernize SVGRenderStyleDefs.h
2121         https://bugs.webkit.org/show_bug.cgi?id=186024
2122
2123         Reviewed by Daniel Bates.
2124
2125         Modernized the set of enums in SVGRenderStyleDefs.h and WindRule.h by:
2126             - Converting them to enum classes
2127             - Renaming them to remove unnecessary prefix 'E's
2128             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
2129             - Renaming to match modern conventions (e.g BNONE -> None)
2130
2131         Modernizes the following enums:
2132             SVGPaintType
2133             BaselineShift (renamed from EBaselineShift)
2134             TextAnchor (renamed from ETextAnchor)
2135             ColorInterpolation (renamed from EColorInterpolation)
2136             ColorRendering (renamed from EColorRendering)
2137             ShapeRendering (renamed from EShapeRendering)
2138             GlyphOrientation (renamed from EGlyphOrientation)
2139             AlignmentBaseline (renamed from EAlignmentBaseline)
2140             DominantBaseline (renamed from EDominantBaseline)
2141             VectorEffect (renamed from EVectorEffect)
2142             BufferedRendering (renamed from EBufferedRendering)
2143             MaskType (renamed from EMaskType)
2144             WindRule
2145
2146         * css/CSSBasicShapes.cpp:
2147         (WebCore::buildPathString):
2148         (WebCore::buildPolygonString):
2149         * css/CSSBasicShapes.h:
2150         * css/CSSPrimitiveValueMappings.h:
2151         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2152         (WebCore::CSSPrimitiveValue::operator WindRule const):
2153         (WebCore::CSSPrimitiveValue::operator AlignmentBaseline const):
2154         (WebCore::CSSPrimitiveValue::operator BufferedRendering const):
2155         (WebCore::CSSPrimitiveValue::operator ColorInterpolation const):
2156         (WebCore::CSSPrimitiveValue::operator ColorRendering const):
2157         (WebCore::CSSPrimitiveValue::operator DominantBaseline const):
2158         (WebCore::CSSPrimitiveValue::operator ShapeRendering const):
2159         (WebCore::CSSPrimitiveValue::operator TextAnchor const):
2160         (WebCore::CSSPrimitiveValue::operator VectorEffect const):
2161         (WebCore::CSSPrimitiveValue::operator MaskType const):
2162         (WebCore::CSSPrimitiveValue::operator EAlignmentBaseline const): Deleted.
2163         (WebCore::CSSPrimitiveValue::operator EBufferedRendering const): Deleted.
2164         (WebCore::CSSPrimitiveValue::operator EColorInterpolation const): Deleted.
2165         (WebCore::CSSPrimitiveValue::operator EColorRendering const): Deleted.
2166         (WebCore::CSSPrimitiveValue::operator EDominantBaseline const): Deleted.
2167         (WebCore::CSSPrimitiveValue::operator EShapeRendering const): Deleted.
2168         (WebCore::CSSPrimitiveValue::operator ETextAnchor const): Deleted.
2169         (WebCore::CSSPrimitiveValue::operator EVectorEffect const): Deleted.
2170         (WebCore::CSSPrimitiveValue::operator EMaskType const): Deleted.
2171         * css/SVGCSSComputedStyleDeclaration.cpp:
2172         (WebCore::glyphOrientationToCSSPrimitiveValue):
2173         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
2174         (WebCore::ComputedStyleExtractor::svgPropertyValue):
2175         * css/StyleBuilderConverter.h:
2176         (WebCore::StyleBuilderConverter::convertGlyphOrientation):
2177         (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
2178         * css/StyleBuilderCustom.h:
2179         (WebCore::StyleBuilderCustom::applyValueBaselineShift):
2180         (WebCore::StyleBuilderCustom::applyValueFill):
2181         (WebCore::StyleBuilderCustom::applyValueStroke):
2182         * css/parser/CSSPropertyParser.cpp:
2183         (WebCore::consumeBasicShapePolygon):
2184         (WebCore::consumeBasicShapePath):
2185         * html/canvas/CanvasRenderingContext2DBase.cpp:
2186         (WebCore::toWindRule):
2187         * page/animation/CSSPropertyAnimation.cpp:
2188         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
2189         * platform/graphics/FloatPolygon.cpp:
2190         (WebCore::FloatPolygon::contains const):
2191         * platform/graphics/GraphicsContext.cpp:
2192         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2193         * platform/graphics/GraphicsContext.h:
2194         * platform/graphics/GraphicsLayer.cpp:
2195         (WebCore::GraphicsLayer::shapeLayerWindRule const):
2196         * platform/graphics/GraphicsLayer.h:
2197         * platform/graphics/GraphicsTypes.cpp:
2198         (WebCore::operator<<):
2199         * platform/graphics/Path.h:
2200         * platform/graphics/ShadowBlur.cpp:
2201         (WebCore::ShadowBlur::drawInsetShadow):
2202         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
2203         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
2204         * platform/graphics/WindRule.h:
2205         (): Deleted.
2206         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2207         (PlatformCALayerCocoa::shapeWindRule const):
2208         (PlatformCALayerCocoa::setShapeWindRule):
2209         * platform/graphics/cg/GraphicsContextCG.cpp:
2210         (WebCore::calculateDrawingMode):
2211         (WebCore::GraphicsContext::fillPath):
2212         (WebCore::GraphicsContext::fillRectWithRoundedHole):
2213         (WebCore::GraphicsContext::clipPath):
2214         * platform/graphics/cg/PathCG.cpp:
2215         (WebCore::Path::contains const):
2216         * platform/mock/MockRealtimeVideoSource.cpp:
2217         (WebCore::MockRealtimeVideoSource::drawAnimation):
2218         * rendering/FilterEffectRenderer.cpp:
2219         (WebCore::FilterEffectRenderer::buildReferenceFilter):
2220         * rendering/RenderBoxModelObject.cpp:
2221         (WebCore::RenderBoxModelObject::paintBorder):
2222         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
2223         * rendering/RenderElement.cpp:
2224         (WebCore::RenderElement::paintOutline):
2225         * rendering/RenderLayer.cpp:
2226         (WebCore::RenderLayer::computeClipPath const):
2227         * rendering/style/BasicShapes.h:
2228         (WebCore::BasicShape::windRule const):
2229         * rendering/style/RenderStyle.h:
2230         (WebCore::RenderStyle::fillPaintType const):
2231         (WebCore::RenderStyle::setFillPaintColor):
2232         (WebCore::RenderStyle::strokePaintType const):
2233         (WebCore::RenderStyle::setStrokePaintColor):
2234         * rendering/style/SVGRenderStyle.h:
2235         (WebCore::SVGRenderStyle::initialAlignmentBaseline):
2236         (WebCore::SVGRenderStyle::initialDominantBaseline):
2237         (WebCore::SVGRenderStyle::initialBaselineShift):
2238         (WebCore::SVGRenderStyle::initialVectorEffect):
2239         (WebCore::SVGRenderStyle::initialBufferedRendering):
2240         (WebCore::SVGRenderStyle::initialClipRule):
2241         (WebCore::SVGRenderStyle::initialColorInterpolation):
2242         (WebCore::SVGRenderStyle::initialColorInterpolationFilters):
2243         (WebCore::SVGRenderStyle::initialColorRendering):
2244         (WebCore::SVGRenderStyle::initialFillRule):
2245         (WebCore::SVGRenderStyle::initialShapeRendering):
2246         (WebCore::SVGRenderStyle::initialTextAnchor):
2247         (WebCore::SVGRenderStyle::initialGlyphOrientationHorizontal):
2248         (WebCore::SVGRenderStyle::initialGlyphOrientationVertical):
2249         (WebCore::SVGRenderStyle::initialFillPaintType):
2250         (WebCore::SVGRenderStyle::initialStrokePaintType):
2251         (WebCore::SVGRenderStyle::initialMaskType):
2252         (WebCore::SVGRenderStyle::setAlignmentBaseline):
2253         (WebCore::SVGRenderStyle::setDominantBaseline):
2254         (WebCore::SVGRenderStyle::setBaselineShift):
2255         (WebCore::SVGRenderStyle::setVectorEffect):
2256         (WebCore::SVGRenderStyle::setBufferedRendering):
2257         (WebCore::SVGRenderStyle::setClipRule):
2258         (WebCore::SVGRenderStyle::setColorInterpolation):
2259         (WebCore::SVGRenderStyle::setColorInterpolationFilters):
2260         (WebCore::SVGRenderStyle::setColorRendering):
2261         (WebCore::SVGRenderStyle::setFillRule):
2262         (WebCore::SVGRenderStyle::setShapeRendering):
2263         (WebCore::SVGRenderStyle::setTextAnchor):
2264         (WebCore::SVGRenderStyle::setGlyphOrientationHorizontal):
2265         (WebCore::SVGRenderStyle::setGlyphOrientationVertical):
2266         (WebCore::SVGRenderStyle::setMaskType):
2267         (WebCore::SVGRenderStyle::alignmentBaseline const):
2268         (WebCore::SVGRenderStyle::dominantBaseline const):
2269         (WebCore::SVGRenderStyle::baselineShift const):
2270         (WebCore::SVGRenderStyle::vectorEffect const):
2271         (WebCore::SVGRenderStyle::bufferedRendering const):
2272         (WebCore::SVGRenderStyle::clipRule const):
2273         (WebCore::SVGRenderStyle::colorInterpolation const):
2274         (WebCore::SVGRenderStyle::colorInterpolationFilters const):
2275         (WebCore::SVGRenderStyle::colorRendering const):
2276         (WebCore::SVGRenderStyle::fillRule const):
2277         (WebCore::SVGRenderStyle::shapeRendering const):
2278         (WebCore::SVGRenderStyle::textAnchor const):
2279         (WebCore::SVGRenderStyle::glyphOrientationHorizontal const):
2280         (WebCore::SVGRenderStyle::glyphOrientationVertical const):
2281         (WebCore::SVGRenderStyle::fillPaintType const):
2282         (WebCore::SVGRenderStyle::strokePaintType const):
2283         (WebCore::SVGRenderStyle::maskType const):
2284         (WebCore::SVGRenderStyle::visitedLinkFillPaintType const):
2285         (WebCore::SVGRenderStyle::visitedLinkStrokePaintType const):
2286         (WebCore::SVGRenderStyle::hasStroke const):
2287         (WebCore::SVGRenderStyle::hasFill const):
2288         (WebCore::SVGRenderStyle::setBitDefaults):
2289         * rendering/style/SVGRenderStyleDefs.h:
2290         (WebCore::StyleFillData::create):
2291         (WebCore::StyleFillData::operator!= const):
2292         (WebCore::StyleStrokeData::create):
2293         (WebCore::StyleStrokeData::operator!= const):
2294         (WebCore::StyleStopData::create):
2295         (WebCore::StyleStopData::operator!= const):
2296         (WebCore::StyleTextData::create):
2297         (WebCore::StyleTextData::operator!= const):
2298         (WebCore::StyleMiscData::create):
2299         (WebCore::StyleMiscData::operator!= const):
2300         (WebCore::StyleShadowSVGData::create):
2301         (WebCore::StyleShadowSVGData::operator!= const):
2302         (WebCore::StyleResourceData::create):
2303         (WebCore::StyleResourceData::operator!= const):
2304         (WebCore::StyleInheritedResourceData::create):
2305         (WebCore::StyleInheritedResourceData::operator!= const):
2306         (WebCore::StyleLayoutData::create):
2307         (WebCore::StyleLayoutData::operator!= const):
2308         (): Deleted.
2309         * rendering/svg/RenderSVGImage.cpp:
2310         (WebCore::RenderSVGImage::paint):
2311         * rendering/svg/RenderSVGRect.cpp:
2312         (WebCore::RenderSVGRect::updateShapeFromElement):
2313         * rendering/svg/RenderSVGResource.cpp:
2314         (WebCore::requestPaintingResource):
2315         * rendering/svg/RenderSVGResourceClipper.cpp:
2316         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
2317         * rendering/svg/RenderSVGResourceFilter.cpp:
2318         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
2319         * rendering/svg/RenderSVGResourceGradient.cpp:
2320         (WebCore::RenderSVGResourceGradient::applyResource):
2321         * rendering/svg/RenderSVGResourceMasker.cpp:
2322         (WebCore::RenderSVGResourceMasker::applyResource):
2323         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2324         * rendering/svg/RenderSVGResourcePattern.cpp:
2325         (WebCore::RenderSVGResourcePattern::applyResource):
2326         * rendering/svg/RenderSVGShape.cpp:
2327         (WebCore::RenderSVGShape::paint):
2328         * rendering/svg/RenderSVGShape.h:
2329         (WebCore::RenderSVGShape::hasNonScalingStroke const):
2330         * rendering/svg/SVGRenderTreeAsText.cpp:
2331         (WebCore::writeStyle):
2332         (WebCore::writeSVGInlineTextBox):
2333         * rendering/svg/SVGResources.cpp:
2334         (WebCore::paintingResourceFromSVGPaint):
2335         * rendering/svg/SVGTextChunk.cpp:
2336         (WebCore::SVGTextChunk::SVGTextChunk):
2337         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
2338         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
2339         (WebCore::SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBaseline const):
2340         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift const):
2341         (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle const):
2342         * rendering/svg/SVGTextLayoutEngineBaseline.h:
2343
2344 2018-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2345
2346         [Web Animations] Test webanimations/css-animations.html is crashing
2347         https://bugs.webkit.org/show_bug.cgi?id=186031
2348
2349         Reviewed by Antoine Quint.
2350
2351         This is another case of std::optional value being used while it's nullopt, I guess this started to fail when we
2352         stopped using the WTF implementation of std::optional. The problem is that we try to get the current iteration
2353         of a declarative animation when the active time is unresolved.
2354
2355         * animation/DeclarativeAnimation.cpp:
2356         (WebCore::DeclarativeAnimation::invalidateDOMEvents): Use value_or(0) instead of value() to get the current
2357         iteration of the effect.
2358
2359 2018-05-28  Thibault Saunier  <tsaunier@igalia.com>
2360
2361         [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.
2362         https://bugs.webkit.org/show_bug.cgi?id=185948
2363
2364         Reviewed by Xabier Rodriguez-Calvar.
2365
2366         - The "stream-encryption-systems" field of the "drm-preferred-decryption-system-id" query was renamed to
2367           "avalaible-stream-encryption-systems"
2368         - It can now be NULL, meaning there is no decryptor avalaible.
2369
2370         Tests: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-*
2371
2372         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2373         (WebCore::extractEventsAndSystemsFromMessage): Handle NULL value for "avalaible-stream-encryption-systems",
2374         moved some code to make the order of the Arrays in the pair clearer.
2375
2376 2018-05-27  Dan Bernstein  <mitz@apple.com>
2377
2378         Reverted the changes made for https://webkit.org/b/186016
2379
2380         They broke the USE(APPLE_INTERNAL_SDK) Sierra build.
2381
2382 2018-05-27  David Kilzer  <ddkilzer@apple.com>
2383
2384         [iOS] Fix warnings about leaks found by clang static analyzer
2385         <https://webkit.org/b/186009>
2386         <rdar://problem/40574267>
2387
2388         Reviewed by Daniel Bates.
2389
2390         * Modules/webauthn/cocoa/LocalAuthenticator.mm:
2391         (WebCore::LocalAuthenticator::makeCredential):
2392         (WebCore::LocalAuthenticator::getAssertion):
2393         (WebCore::LocalAuthenticator::issueClientCertificate const):
2394         - Don't leak CF objects in early return paths, and get rid of
2395           `retained*` variables, by making original variables use
2396           RetainPtr<>.
2397         * bridge/objc/WebScriptObject.mm:
2398         (+[WebUndefined allocWithZone:]): Modernize WebUndefined by
2399         using NeverDestroyed<RetainPr<WebUndefined>> type.  Explicitly
2400         retain the object returned on each call.
2401         (+[WebUndefined undefined]): Explicitly autorelease the object
2402         returned.  Note that neither of these changes fixes the static
2403         analyzer warnings in this source file.
2404         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2405         (WebCore::exernalDeviceDisplayNameForPlayer): Use RetainPtr<> to
2406         stop leaking NSString objects in a loop.
2407         * platform/ios/wak/WAKWindow.h:
2408         (-[WAKWindow _newFirstResponderAfterResigning]): Mark as
2409         NS_RETURNS_NOT_RETAINED like the corresponding AppKit method
2410         since this doesn't return a new object.  This fixes some
2411         false-positive leaks warnings.
2412
2413 2018-05-27  Dan Bernstein  <mitz@apple.com>
2414
2415         [Cocoa] Avoid importing directly from subumbrella frameworks
2416         https://bugs.webkit.org/show_bug.cgi?id=186016
2417
2418         Reviewed by Sam Weinig.
2419
2420         * Configurations/WebCore.xcconfig: Removed -iframework options from OTHER_CFLAGS and
2421           OTHER_CPLUSPLUSFLAGS.
2422         * editing/mac/DictionaryLookup.mm: Import Quartz.h instead of a PDFKit header.
2423         * html/HTMLKeygenElement.cpp: Removed "using namespace WebCore" from this WebCore
2424           implementation file.
2425         * platform/mac/PlatformEventFactoryMac.mm: Import Carbon.h instead of HIToolbox headers.
2426         * platform/mac/PlatformScreenMac.mm: Import ApplicationServices.h instead of ColorSync.h
2427           when using SDKs earlier than 10.13.
2428         * platform/mediastream/CaptureDeviceManager.cpp: Enclosed the definitions in the WebCore
2429           namespace and removed "using namespace WebCore" from this WebCore implementation file.
2430         * platform/text/mac/TextEncodingRegistryMac.mm: Import Carbon.h instead of CarbonCore.h.
2431
2432 2018-05-27  Fujii Hironori  <Hironori.Fujii@sony.com>
2433
2434         REGRESSION(r232198) [WinCairo] cannot convert from 'WTF::StringView' to 'const WTF::String'
2435         https://bugs.webkit.org/show_bug.cgi?id=186027
2436
2437         Unreviewed build fix
2438
2439         No new tests (No behavior change).
2440
2441         * platform/network/curl/AuthenticationChallengeCurl.cpp:
2442         (WebCore::AuthenticationChallenge::protectionSpaceFromHandle):
2443         * platform/network/curl/CurlRequest.cpp:
2444         (WebCore::CurlRequest::setupTransfer):
2445         (WebCore::CurlRequest::willSetupSslCtx):
2446
2447 2018-05-27  Sam Weinig  <sam@webkit.org>
2448
2449         Modernize RenderStyleConstants.h - Part 3
2450         https://bugs.webkit.org/show_bug.cgi?id=186015
2451
2452         Reviewed by Yusuke Suzuki.
2453
2454         Modernized the third and final set of enums in RenderStyleConstants.h by:
2455             - Converting them to enum classes
2456             - Renaming them to remove unnecessary prefix 'E's
2457             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
2458
2459         Modernizes the following enums:
2460             TextDecoration
2461             TextDecorationSkip (renamed from TextDecorationSkipItems)
2462             TextUnderlinePosition
2463             HangingPunctuation
2464             SpeakAs (renamed from ESpeakAs)
2465             TextEmphasisPosition (renamed from TextEmphasisPositions)
2466
2467         This final set of enums are mostly (TextUnderlinePosition isn't really) used as bitmasks,
2468         so this change also converts their uses to use OptionSet. 
2469
2470         * accessibility/AccessibilityObject.h:
2471         (WebCore::AccessibilityObject::speakAsProperty const):
2472         * accessibility/AccessibilityRenderObject.cpp:
2473         (WebCore::AccessibilityRenderObject::speakAsProperty const):
2474         (WebCore::AccessibilityRenderObject::hasPlainText const):
2475         (WebCore::AccessibilityRenderObject::hasUnderline const):
2476         * accessibility/AccessibilityRenderObject.h:
2477         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2478         (AXAttributeStringSetStyle):
2479         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2480         (-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]):
2481         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2482         (AXAttributeStringSetStyle):
2483         * css/CSSComputedStyleDeclaration.cpp:
2484         (WebCore::renderTextDecorationFlagsToCSSValue):
2485         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
2486         (WebCore::renderEmphasisPositionFlagsToCSSValue):
2487         (WebCore::speakAsToCSSValue):
2488         (WebCore::hangingPunctuationToCSSValue):
2489         * css/CSSLineBoxContainValue.h:
2490         * css/CSSPrimitiveValueMappings.h:
2491         (WebCore::CSSPrimitiveValue::operator HangingPunctuation const):
2492         (WebCore::CSSPrimitiveValue::operator TextDecoration const):
2493         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2494         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition const):
2495         (WebCore::CSSPrimitiveValue::operator SpeakAs const):
2496         (WebCore::CSSPrimitiveValue::operator ESpeakAs const): Deleted.
2497         * css/StyleBuilderConverter.h:
2498         (WebCore::StyleBuilderConverter::convertTextDecoration):
2499         (WebCore::StyleBuilderConverter::valueToEmphasisPosition):
2500         (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
2501         (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
2502         (WebCore::StyleBuilderConverter::valueToDecorationSkip):
2503         (WebCore::StyleBuilderConverter::convertTextDecorationSkip):
2504         (WebCore::StyleBuilderConverter::convertSpeakAs):
2505         (WebCore::StyleBuilderConverter::convertHangingPunctuation):
2506         * editing/cocoa/EditorCocoa.mm:
2507         (WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle const):
2508         * editing/cocoa/HTMLConverter.mm:
2509         (WebCore::editingAttributedStringFromRange):
2510         * rendering/InlineFlowBox.cpp:
2511         (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine const):
2512         (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine const):
2513         * rendering/InlineFlowBox.h:
2514         * rendering/InlineTextBox.cpp:
2515         (WebCore::emphasisPositionHasNeitherLeftNorRight):
2516         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):
2517         (WebCore::InlineTextBox::paint):
2518         (WebCore::InlineTextBox::paintMarkedTextDecoration):
2519         * rendering/RenderBlockFlow.cpp:
2520         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
2521         * rendering/RenderBlockLineLayout.cpp:
2522         (WebCore::setLogicalWidthForTextRun):
2523         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2524         * rendering/RenderElement.cpp:
2525         (WebCore::RenderElement::enclosingRendererWithTextDecoration const):
2526         * rendering/RenderElement.h:
2527         * rendering/RenderTableSection.cpp:
2528         (WebCore::RenderTableSection::addCell):
2529         * rendering/SimpleLineLayout.cpp:
2530         (WebCore::SimpleLineLayout::canUseForStyle):
2531         (WebCore::SimpleLineLayout::canUseForWithReason):
2532         * rendering/SimpleLineLayoutFunctions.cpp:
2533         (WebCore::SimpleLineLayout::paintFlow):
2534         * rendering/TextDecorationPainter.cpp:
2535         (WebCore::TextDecorationPainter::TextDecorationPainter):
2536         (WebCore::TextDecorationPainter::paintTextDecoration):
2537         (WebCore::collectStylesForRenderer):
2538         (WebCore::TextDecorationPainter::stylesForRenderer):
2539         * rendering/TextDecorationPainter.h:
2540         * rendering/TextPaintStyle.cpp:
2541         (WebCore::computeTextPaintStyle):
2542         * rendering/line/BreakingContext.h:
2543         (WebCore::BreakingContext::handleText):
2544         * rendering/style/RenderStyle.cpp:
2545         (WebCore::RenderStyle::RenderStyle):
2546         (WebCore::RenderStyle::changeAffectsVisualOverflow const):
2547         * rendering/style/RenderStyle.h:
2548         (WebCore::RenderStyle::textDecorationsInEffect const):
2549         (WebCore::RenderStyle::textDecoration const):
2550         (WebCore::RenderStyle::textDecorationSkip const):
2551         (WebCore::RenderStyle::hangingPunctuation const):
2552         (WebCore::RenderStyle::textEmphasisPosition const):
2553         (WebCore::RenderStyle::speakAs const):
2554         (WebCore::RenderStyle::addToTextDecorationsInEffect):
2555         (WebCore::RenderStyle::setTextDecorationsInEffect):
2556         (WebCore::RenderStyle::setTextDecoration):
2557         (WebCore::RenderStyle::setTextDecorationSkip):
2558         (WebCore::RenderStyle::setSpeakAs):
2559         (WebCore::RenderStyle::setTextEmphasisPosition):
2560         (WebCore::RenderStyle::setHangingPunctuation):
2561         (WebCore::RenderStyle::initialHangingPunctuation):
2562         (WebCore::RenderStyle::initialTextDecoration):
2563         (WebCore::RenderStyle::initialTextDecorationSkip):
2564         (WebCore::RenderStyle::initialTextUnderlinePosition):
2565         (WebCore::RenderStyle::initialSpeakAs):
2566         (WebCore::RenderStyle::initialTextEmphasisPosition):
2567         * rendering/style/RenderStyleConstants.h:
2568         (WebCore::operator|): Deleted.
2569         (WebCore::operator|=): Deleted.
2570         * rendering/style/StyleRareInheritedData.cpp:
2571         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2572         * rendering/style/StyleVisualData.cpp:
2573         (WebCore::StyleVisualData::StyleVisualData):
2574         * rendering/svg/SVGInlineTextBox.cpp:
2575         (WebCore::SVGInlineTextBox::paint):
2576         (WebCore::positionOffsetForDecoration):
2577         (WebCore::thicknessForDecoration):
2578         (WebCore::findRendererDefininingTextDecoration):
2579         (WebCore::SVGInlineTextBox::paintDecoration):
2580         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
2581         * rendering/svg/SVGInlineTextBox.h:
2582         * style/InlineTextBoxStyle.cpp:
2583         (WebCore::computeUnderlineOffset):
2584         (WebCore::visualOverflowForDecorations):
2585
2586 2018-05-26  Zalan Bujtas  <zalan@apple.com>
2587
2588         [LFC] Implement margin computation
2589         https://bugs.webkit.org/show_bug.cgi?id=186008
2590
2591         Reviewed by Antti Koivisto.
2592
2593         * WebCore.xcodeproj/project.pbxproj:
2594         * layout/FormattingContext.cpp:
2595         (WebCore::Layout::FormattingContext::computeMargin const):
2596         (WebCore::Layout::FormattingContext::marginTop const): Deleted.
2597         (WebCore::Layout::FormattingContext::marginLeft const): Deleted.
2598         (WebCore::Layout::FormattingContext::marginBottom const): Deleted.
2599         (WebCore::Layout::FormattingContext::marginRight const): Deleted.
2600         * layout/FormattingContext.h:
2601         * layout/blockformatting/BlockFormattingContext.cpp:
2602         (WebCore::Layout::BlockFormattingContext::layout const):
2603         (WebCore::Layout::BlockFormattingContext::computeMargin const):
2604         (WebCore::Layout::BlockFormattingContext::marginTop const): Deleted.
2605         (WebCore::Layout::BlockFormattingContext::marginBottom const): Deleted.
2606         * layout/blockformatting/BlockFormattingContext.h:
2607         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2608         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight):
2609         (WebCore::Layout::BlockFormattingContext::Geometry::computedMargin):
2610         * layout/blockformatting/BlockMarginCollapse.cpp:
2611         (WebCore::Layout::_isMarginBottomCollapsedWithParent):
2612         (WebCore::Layout::collapsedMarginBottomFromLastChild):
2613         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginTop):
2614         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBottom):
2615         (WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent):
2616         (WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginTopCollapsedWithParentMarginBottom):
2617         (WebCore::Layout::BlockMarginCollapse::marginTop): Deleted.
2618         (WebCore::Layout::BlockMarginCollapse::marginBottom): Deleted.
2619         (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithParent): Deleted.
2620         (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithParentMarginBottom): Deleted.
2621         * layout/blockformatting/BlockMarginCollapse.h: Removed.
2622
2623 2018-05-25  Myles C. Maxfield  <mmaxfield@apple.com>
2624
2625         [Cocoa] Delete unnecessary WebCascadeList in ComplexTextController
2626         https://bugs.webkit.org/show_bug.cgi?id=186007
2627
2628         Reviewed by Zalan Bujtas.
2629
2630         Inside ComplexTextController::collectComplexTextRuns(), we chop up text based on which fonts should be
2631         used to render which grapheme clusters. For each grapheme cluster, we run through the font-family list
2632         in FontCascade::fontForCombiningCharacterSequence() and find the first font that can render the cluster.
2633         If no items can render the cluster, we construct a WebCascadeList and let CoreText try to figure out
2634         which fonts can render which clusters.
2635
2636         Except there's no point, because we just determined that no font in the list can be used to render the
2637         cluster. CoreText isn't magic; it isn't going to somehow disagree with us. WebCascadeList is just
2638         useless code.
2639
2640         No new tests because there is no behavior change.
2641
2642         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2643         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2644         (-[WebCascadeList initWithFont:character:]): Deleted.
2645         (-[WebCascadeList count]): Deleted.
2646         (-[WebCascadeList objectAtIndex:]): Deleted.
2647
2648 2018-05-25  Myles C. Maxfield  <mmaxfield@apple.com>
2649
2650         Improve the performance of Font::canRenderCombiningCharacterSequence()
2651         https://bugs.webkit.org/show_bug.cgi?id=185933
2652
2653         Reviewed by Ryosuke Niwa.
2654
2655         We don't need to create a whole CTLine just to determine whether or not a font supports rendering a grapheme cluster.
2656         Instead, the right way to do it is just see if the font's cmap table supports every code point in the cluster.
2657
2658         This patch reports a 2% progression on the attached PerformanceTest.
2659
2660         Test: Layout/ComplexLongUnique.html
2661
2662         * platform/graphics/Font.cpp:
2663         (WebCore::Font::canRenderCombiningCharacterSequence const):
2664         * platform/graphics/Font.h:
2665         * platform/graphics/cocoa/FontCocoa.mm:
2666         (WebCore::provideStringAndAttributes): Deleted.
2667         (WebCore::Font::canRenderCombiningCharacterSequence const): Deleted.
2668         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2669         (WebCore::Font::canRenderCombiningCharacterSequence const): Deleted.
2670
2671 2018-05-25  Eric Carlson  <eric.carlson@apple.com>
2672
2673         Captions are sized incorrectly in PiP mode
2674         https://bugs.webkit.org/show_bug.cgi?id=186005
2675         <rdar://problem/39729718>
2676
2677         Reviewed by Dean Jackson.
2678
2679         * html/shadow/MediaControlElements.cpp:
2680         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Only sync text track bounds 
2681         when the size actually changes.
2682
2683         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:
2684         (WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenFrame): Call syncTextTrackBounds.
2685         (WebCore::VideoFullscreenLayerManagerObjC::syncTextTrackBounds): Set the text track layer size
2686         to m_videoFullscreenFrame, it is always set the size of the PiP/Fullscreen layer.
2687
2688 2018-05-25  Timothy Hatcher  <timothy@apple.com>
2689
2690         Setting drawsBackground to YES on a WKView doesn't take effect immediately
2691         https://bugs.webkit.org/show_bug.cgi?id=185885
2692         rdar://problem/39706506
2693
2694         Reviewed by Simon Fraser.
2695
2696         * page/Frame.cpp:
2697         (WebCore::Frame::createView): Always call updateBackgroundRecursively, it handles
2698         invalid colors correctly already.
2699         * page/FrameView.cpp:
2700         (WebCore::FrameView::setTransparent): Call setNeedsLayout() since base background color
2701         and transparent is used to update layers.
2702         (WebCore::FrameView::setBaseBackgroundColor): Ditto.
2703         (WebCore::FrameView::updateBackgroundRecursively): Schedule layout if needed.
2704         * page/FrameView.h:
2705         * rendering/RenderLayerCompositor.cpp:
2706         (WebCore::RenderLayerCompositor::viewHasTransparentBackground const): Use baseBackgroundColor
2707         instead of hardcoding white.
2708         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): Fixed incorrect changed logging.
2709
2710 2018-05-25  Youenn Fablet  <youenn@apple.com>
2711
2712         Migrate From-Origin to Cross-Origin-Resource-Policy
2713         https://bugs.webkit.org/show_bug.cgi?id=185840
2714
2715         Reviewed by Chris Dumez.
2716
2717         Tests: http/wpt/cross-origin-resource-policy/fetch-in-iframe.html
2718                http/wpt/cross-origin-resource-policy/fetch.html
2719                http/wpt/cross-origin-resource-policy/iframe-loads.html
2720                http/wpt/cross-origin-resource-policy/image-loads.html
2721                http/wpt/cross-origin-resource-policy/script-loads.html
2722
2723         * platform/network/HTTPHeaderNames.in:
2724         * platform/network/HTTPParsers.cpp:
2725         (WebCore::parseCrossOriginResourcePolicyHeader):
2726         * platform/network/HTTPParsers.h:
2727
2728 2018-05-25  Daniel Bates  <dabates@apple.com>
2729
2730         NavigationAction should not hold a strong reference to a Document
2731         https://bugs.webkit.org/show_bug.cgi?id=185712
2732         <rdar://problem/40320916>
2733
2734         Reviewed by Brent Fulgham.
2735
2736         Have NavigationAction store all the relevant details callers need to know about the document
2737         that initiated the navigation in an independent data structure, called NavigationAction::Requester,
2738         as opposed to holding a RefPtr to the document itself. The benefit of this approach is that it
2739         is a step towards ensuring that NavigationAction does not keep the document alive after navigating
2740         to a new document given that DocumentLoader stores the NavigationAction for the last navigation.
2741
2742         * loader/NavigationAction.cpp:
2743         (WebCore::NavigationAction::Requester::Requester): Track all relevant details of the document that
2744         requested this navigation that are needed to support WebKit API/SPI. We hold the SecurityOrigin in
2745         a RefPtr to avoid the need to explicitly define a copy constructor and copy-assignment constructor
2746         because Requester needs to be copyable as NavigationAction, which owns a Requester, is copyable.
2747         (WebCore::shouldTreatAsSameOriginNavigation): Fix some style nits.
2748         (WebCore::NavigationAction::NavigationAction): Instantiate a Requester from the specified document.
2749         * loader/NavigationAction.h:
2750         (WebCore::NavigationAction::Requester::url const): Added.
2751         (WebCore::NavigationAction::Requester::securityOrigin const): Added.
2752         (WebCore::NavigationAction::Requester::pageID const): Added.
2753         (WebCore::NavigationAction::Requester::frameID const): Added.
2754         (WebCore::NavigationAction::requester const): Returns details about the document that requested
2755         this navigation, if applicable.
2756         (WebCore::NavigationAction::isEmpty const): Update criterion for being empty to consider the
2757         requester.
2758         (WebCore::NavigationAction::setOpener): Extracted out the datatype of the parameter into a
2759         type alias to avoid duplication and updated this code to use the alias.
2760         (WebCore::NavigationAction::opener const): Ditto.
2761         (WebCore::NavigationAction::sourceDocument const): Deleted.
2762
2763 2018-05-25  Jeremy Jones  <jeremyj@apple.com>
2764
2765         Fullscreen element can be clipped by ancestor.
2766         https://bugs.webkit.org/show_bug.cgi?id=185980
2767         rdar://problem/40320006
2768
2769         Reviewed by Jer Noble.
2770
2771         Adds style to fullscreen css to prevent the fullscreen element from being clipped by an ancestor element.
2772
2773         * css/fullscreen.css:
2774         (:-webkit-full-screen-ancestor:not(iframe)):
2775
2776 2018-05-25  Jeremy Jones  <jeremyj@apple.com>
2777
2778         Use correct AVKit delegate for picture in picture failure.
2779         https://bugs.webkit.org/show_bug.cgi?id=185981
2780         rdar://problem/40549652
2781
2782         Reviewed by Eric Carlson.
2783
2784         No new tests since we don't have a way to simulate picture-in-picture failure.
2785
2786         Use the new name for this delegate callback.
2787
2788         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2789         (-[WebAVPlayerViewControllerDelegate playerViewController:failedToStartPictureInPictureWithError:]):
2790         (-[WebAVPlayerViewControllerDelegate playerViewControllerFailedToStartPictureInPicture:withError:]): Deleted.
2791
2792 2018-05-25  Zalan Bujtas  <zalan@apple.com>
2793
2794         iBooks: text can disappear/flash during finger drag highlight
2795         https://bugs.webkit.org/show_bug.cgi?id=185993
2796         <rdar://problem/34026943>
2797
2798         Reviewed by Simon Fraser.
2799
2800         Reuse existing tiles when override rect is fully covered by the active grid.
2801         Also, recover dropped tiles if override rect forces us to create new ones. 
2802
2803         Unable to create a reproducible test case.
2804
2805         * platform/ios/LegacyTileCache.h:
2806         * platform/ios/LegacyTileCache.mm:
2807         (WebCore::LegacyTileCache::setOverrideVisibleRect):
2808         * platform/ios/LegacyTileLayer.mm:
2809         (-[LegacyTileHostLayer renderInContext:]):
2810
2811 2018-05-25  Eric Carlson  <eric.carlson@apple.com>
2812
2813         Encode ISOWebVTTCue "strings" when logging
2814         https://bugs.webkit.org/show_bug.cgi?id=185991
2815         <rdar://problem/40563902>
2816
2817         Reviewed by Jer Noble.
2818
2819         * platform/graphics/iso/ISOVTTCue.cpp:
2820         (WebCore::ISOWebVTTCue::toJSONString const): Use encodeWithURLEscapeSequences for all Strings
2821         taken from ISO boxes.
2822
2823 2018-05-25  Alex Christensen  <achristensen@webkit.org>
2824
2825         URL::host should return a StringView to reduce allocations
2826         https://bugs.webkit.org/show_bug.cgi?id=185986
2827
2828         Reviewed by Geoff Garen.
2829
2830         No change in behaviour.  Just fewer allocations.
2831
2832         * Modules/plugins/YouTubePluginReplacement.cpp:
2833         (WebCore::isYouTubeURL):
2834         (WebCore::processAndCreateYouTubeURL):
2835         * Modules/websockets/WebSocketHandshake.cpp:
2836         (WebCore::hostName):
2837         (WebCore::WebSocketHandshake::host const):
2838         * contentextensions/ContentExtension.cpp:
2839         (WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
2840         * html/HTMLAnchorElement.cpp:
2841         (WebCore::HTMLAnchorElement::parseAttribute):
2842         * html/HTMLMediaElement.cpp:
2843         (WebCore::HTMLMediaElement::mediaSessionTitle const):
2844         (WebCore::needsSeekingSupportQuirk):
2845         * html/HTMLPlugInImageElement.cpp:
2846         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
2847         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
2848         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2849         * html/ImageDocument.cpp:
2850         (WebCore::ImageDocument::finishedParsing):
2851         * html/URLUtils.h:
2852         (WebCore::URLUtils<T>::hostname const):
2853         * loader/FrameLoader.cpp:
2854         (WebCore::FrameLoader::setFirstPartyForCookies):
2855         * loader/LinkLoader.cpp:
2856         (WebCore::LinkLoader::loadLink):
2857         * loader/ResourceLoadStatistics.cpp:
2858         (WebCore::ResourceLoadStatistics::primaryDomain):
2859         * loader/mac/LoaderNSURLExtras.mm:
2860         (suggestedFilenameWithMIMEType):
2861         * page/Chrome.cpp:
2862         (WebCore::Chrome::mouseDidMoveOverElement):
2863         * page/Location.cpp:
2864         (WebCore::Location::hostname const):
2865         * page/Page.cpp:
2866         (WebCore::Page::mainFrameLoadStarted):
2867         * page/PerformanceMonitor.cpp:
2868         (WebCore::reportPageOverPostLoadResourceThreshold):
2869         * page/SecurityOrigin.cpp:
2870         (WebCore::isLoopbackIPAddress):
2871         (WebCore::shouldTreatAsPotentiallyTrustworthy):
2872         (WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
2873         * page/SecurityOrigin.h:
2874         * page/SecurityOriginData.h:
2875         (WebCore::SecurityOriginData::fromURL):
2876         * page/UserContentURLPattern.cpp:
2877         (WebCore::UserContentURLPattern::matchesHost const):
2878         * page/csp/ContentSecurityPolicySource.cpp:
2879         (WebCore::ContentSecurityPolicySource::hostMatches const):
2880         * platform/PublicSuffix.h:
2881         * platform/URL.cpp:
2882         (WebCore::URL::host const):
2883         (WebCore::URL::hostAndPort const):
2884         (WebCore::URL::isMatchingDomain const):
2885         * platform/URL.h:
2886         * platform/mac/SSLKeyGeneratorMac.mm:
2887         (WebCore::signedPublicKeyAndChallengeString):
2888         * platform/network/ResourceRequestBase.h:
2889         (WebCore::registrableDomainsAreEqual):
2890         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2891         (WebCore::getPartitioningDomain):
2892         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
2893         (WebCore::SocketStreamHandleImpl::createStreams):
2894         * workers/WorkerLocation.cpp:
2895         (WebCore::WorkerLocation::hostname const):
2896         * workers/service/server/SWServer.cpp:
2897         (WebCore::SWServer::performGetOriginsWithRegistrationsCallbacks):
2898
2899 2018-05-24  Dean Jackson  <dino@apple.com>
2900
2901         Need to provide a way to feature detect support for system preview
2902         https://bugs.webkit.org/show_bug.cgi?id=185970
2903         <rdar://problem/40538321>
2904
2905         Reviewed by Sam Weinig.
2906
2907         Update the supports function in the DOMTokenList that HTMLAnchorElement
2908         produces for relList to return true for the system preview token.
2909
2910         Tested internally.
2911
2912         * html/HTMLAnchorElement.cpp:
2913         (WebCore::HTMLAnchorElement::relList const):
2914
2915 2018-05-25  Chris Dumez  <cdumez@apple.com>
2916
2917         Minor ApplicationCacheStorage clean up
2918         https://bugs.webkit.org/show_bug.cgi?id=185984
2919
2920         Reviewed by Youenn Fablet.
2921
2922         * loader/appcache/ApplicationCacheStorage.cpp:
2923         (WebCore::ApplicationCacheStorage::getManifestURLs):
2924         (WebCore::ApplicationCacheStorage::deleteCacheGroup):
2925         (WebCore::ApplicationCacheStorage::originsWithCache):
2926         (WebCore::ApplicationCacheStorage::deleteAllCaches):
2927         (WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
2928         (WebCore::ApplicationCacheStorage::ApplicationCacheStorage):
2929         (WebCore::ApplicationCacheStorage::cacheDirectory const): Deleted.
2930         (WebCore::ApplicationCacheStorage::cacheGroupSize): Deleted.
2931         (WebCore::ApplicationCacheStorage::getOriginsWithCache): Deleted.
2932         (WebCore::ApplicationCacheStorage::create): Deleted.
2933         * loader/appcache/ApplicationCacheStorage.h:
2934         (WebCore::ApplicationCacheStorage::create):
2935
2936 2018-05-25  Sihui Liu  <sihui_liu@apple.com>
2937
2938         [WKHTTPCookieStore getAllCookies] returns inconsistent creation time
2939         https://bugs.webkit.org/show_bug.cgi?id=185041
2940         <rdar://problem/34684214>
2941
2942         Reviewed by Geoffrey Garen.
2943
2944         Set creationtime property when creating Cookie object to keep consistency after conversion.
2945
2946         New API test: WebKit.WKHTTPCookieStoreCreationTime.
2947
2948         * platform/network/cocoa/CookieCocoa.mm:
2949         (WebCore::Cookie::operator NSHTTPCookie * const):
2950
2951 2018-05-25  Zalan Bujtas  <zalan@apple.com>
2952
2953         [LFC] Implement border and padding computation
2954         https://bugs.webkit.org/show_bug.cgi?id=185972
2955
2956         Reviewed by Antti Koivisto.
2957
2958         This patch also removes redundant Display::Box methods and adds a lightweight Edge struct.
2959         (Since padding is optional, if during layout we mistakenly try to access paddingTop/Left/Bottom/Right, Display::Box will assert!)
2960
2961         * layout/FormattingContext.cpp:
2962         (WebCore::Layout::FormattingContext::computeBorderAndPadding const):
2963         * layout/FormattingContext.h:
2964         * layout/FormattingContextGeometry.cpp:
2965         (WebCore::Layout::FormattingContext::Geometry::computedBorder):
2966         (WebCore::Layout::FormattingContext::Geometry::computedPadding):
2967         * layout/blockformatting/BlockFormattingContext.cpp:
2968         (WebCore::Layout::BlockFormattingContext::layout const):
2969         * layout/displaytree/DisplayBox.cpp:
2970         (WebCore::Display::Box::marginBox const):
2971         (WebCore::Display::Box::paddingBox const):
2972         (WebCore::Display::Box::contentBox const):
2973         * layout/displaytree/DisplayBox.h:
2974         (WebCore::Display::Box::Edges::Edges):
2975         (WebCore::Display::Box::setHasValidPosition):
2976         (WebCore::Display::Box::setWidth):
2977         (WebCore::Display::Box::setHeight):
2978         (WebCore::Display::Box::setMargin):
2979         (WebCore::Display::Box::setBorder):
2980         (WebCore::Display::Box::setPadding):
2981         (WebCore::Display::Box::marginTop const):
2982         (WebCore::Display::Box::marginLeft const):
2983         (WebCore::Display::Box::marginBottom const):
2984         (WebCore::Display::Box::marginRight const):
2985         (WebCore::Display::Box::paddingTop const):
2986         (WebCore::Display::Box::paddingLeft const):
2987         (WebCore::Display::Box::paddingBottom const):
2988         (WebCore::Display::Box::paddingRight const):
2989         (WebCore::Display::Box::borderTop const):
2990         (WebCore::Display::Box::borderLeft const):
2991         (WebCore::Display::Box::borderBottom const):
2992         (WebCore::Display::Box::borderRight const):
2993         (WebCore::Display::Box::invalidateSize): Deleted.
2994         (WebCore::Display::Box::setHasValidSize): Deleted.
2995         (WebCore::Display::Box::setHasValidGeometry): Deleted.
2996         (WebCore::Display::Box::setRect): Deleted.
2997         (WebCore::Display::Box::setSize): Deleted.
2998         * layout/layouttree/LayoutBox.cpp:
2999         (WebCore::Layout::Box::isPaddingEnabled const):
3000         * layout/layouttree/LayoutBox.h:
3001
3002 2018-05-25  David Kilzer  <ddkilzer@apple.com>
3003
3004         Fix issues with -dealloc methods found by clang static analyzer
3005         <https://webkit.org/b/185887>
3006
3007         Reviewed by Joseph Pecoraro.
3008
3009         * platform/ios/WebAVPlayerController.mm:
3010         (-[WebAVPlayerController dealloc]): Release `_minTiming` and
3011         `_maxTiming` to fix leaks.
3012         * platform/ios/WebBackgroundTaskController.mm:
3013         (-[WebBackgroundTaskController dealloc]): Release
3014         `_backgroundTaskStartBlock` and `_backgroundTaskEndBlock` to fix
3015         leaks.
3016         * platform/ios/WebItemProviderPasteboard.mm:
3017         (-[WebItemProviderRegistrationInfoList dealloc]): Release
3018         `_teamData` to fix leak.
3019
3020 2018-05-25  Antoine Quint  <graouts@apple.com>
3021
3022         [Web Animations] WebAnimation objects never get destroyed
3023         https://bugs.webkit.org/show_bug.cgi?id=185917
3024         <rdar://problem/39539371>
3025
3026         Reviewed by Dean Jackson and Antti Koivisto.
3027
3028         The AnimationTimeline class keeps references to WebAnimation objects organized in various ways. First, there
3029         are three main maps across which all animations are stored, one for non-subclass WebAnimation objects
3030         (m_elementToAnimationsMap), one for CSSSAnimation objects (m_elementToCSSAnimationsMap) and one for CSSTranstion
3031         objects (m_elementToCSSTransitionsMap). On top of that, we also keep a map to access CSSAnimation objects for
3032         a given element by CSS animation name (m_elementToCSSAnimationByName) and another map to access CSSTransition 
3033         objects for a given element by CSS property (m_elementToCSSTransitionByCSSPropertyID).
3034
3035         None of the RefPtr<WebAnimation> stored in these maps would get cleared when the document would get torn down,
3036         which would also prevent the AnimationTimeline (and its DocumentTimeline subclass) from being destroyed.
3037
3038         We now ensure that element and document tear-down correctly removes animations and clears those maps, which
3039         in turn allows the DocumentTimeline to be destroyed, fixing the significant memory leak introduced by Web Animations
3040         so far.
3041
3042         Finally, we change the collection type for those maps to be ListHashRef instead of Vector to guarantee we only
3043         add an animation once per collection due to changes in how setEffect() and setTimeline() operate.
3044
3045         Test: animations/leak-document-with-css-animation.html
3046
3047         * animation/AnimationTimeline.cpp:
3048         (WebCore::AnimationTimeline::~AnimationTimeline): There is no need to clear those tables as they'll need to be empty
3049         for the AnimationTimeline to even be destroyed.
3050         (WebCore::AnimationTimeline::relevantMapForAnimation): Change to use ListHashRef instead of Vector.
3051         (WebCore::AnimationTimeline::animationWasAddedToElement): Change to use ListHashRef instead of Vector.
3052         (WebCore::AnimationTimeline::animationWasRemovedFromElement): When an animation is removed from an element, ensure that
3053         references to this animation stored in the m_elementToCSSAnimationByName and m_elementToCSSTransitionByCSSPropertyID maps
3054         are cleared.
3055         (WebCore::AnimationTimeline::animationsForElement const): Change to use ListHashRef instead of Vector.
3056         (WebCore::AnimationTimeline::removeAnimationsForElement): Instead of just calling cancel() on all known declarative animations
3057         (this method used to be called cancelDeclarativeAnimationsForElement()), we now set the effect of known animations, declarative
3058         or not, for the provided element which will in turn call animationWasRemovedFromElement() and remove the animation from all
3059         maps that might keep a reference to it.
3060         (WebCore::AnimationTimeline::updateCSSTransitionsForElement): Replace call to removeDeclarativeAnimation() with a simple call
3061         to removeAnimation() which will remove references for this animation from the relevant maps.
3062         (WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation): Ditto.
3063         (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): Deleted.
3064         (WebCore::AnimationTimeline::removeDeclarativeAnimation): Deleted.
3065         * animation/AnimationTimeline.h:
3066         (WebCore::AnimationTimeline::elementToAnimationsMap): Change to use ListHashRef instead of Vector.
3067         (WebCore::AnimationTimeline::elementToCSSAnimationsMap): Change to use ListHashRef instead of Vector.
3068         (WebCore::AnimationTimeline::elementToCSSTransitionsMap): Change to use ListHashRef instead of Vector.
3069         * animation/WebAnimation.cpp:
3070         (WebCore::WebAnimation::setEffect): In the case of a declarative animation, we don't want to remove the animation from the relevant
3071         maps because while the effect was set via the API, the element still has a transition or animation set up and we must not break the
3072         timeline-to-animation relationship.
3073         (WebCore::WebAnimation::setEffectInternal): Factor parts of setEffect() out into a new method that can be called from
3074         AnimationTimeline::removeAnimationsForElement() to reset the m_effect member and correctly call animationWasRemovedFromElement()
3075         without all the Web Animations machinery of setEffect(), which is a public API that has unwanted side effects (such as rejecting
3076         promises).
3077         (WebCore::WebAnimation::setTimeline): In the case of a declarative animation, we don't want to remove the animation from the
3078         relevant maps because, while the timeline was set via the API, the element still has a transition or animation set up and we must
3079         not break the relationship.
3080         * animation/DocumentTimeline.cpp:
3081         (WebCore::DocumentTimeline::~DocumentTimeline):
3082         (WebCore::DocumentTimeline::detachFromDocument): Close the GenericTaskQueues when detaching from the document as it's too late to
3083         perform this work in the destructor. We also cancel the schedule timer which we had forgotten to do before.
3084         * animation/WebAnimation.h:
3085         * dom/Document.cpp:
3086         (WebCore::Document::prepareForDestruction):
3087         * dom/Element.cpp:
3088         (WebCore::Element::removedFromAncestor):
3089         * dom/PseudoElement.cpp:
3090         (WebCore::PseudoElement::clearHostElement):
3091         * rendering/updating/RenderTreeUpdater.cpp:
3092         (WebCore::RenderTreeUpdater::tearDownRenderers):
3093
3094 2018-05-24  Chris Dumez  <cdumez@apple.com>
3095
3096         Avoid doing unnecessary work in Document::shouldEnforceContentDispositionAttachmentSandbox() when setting is disabled
3097         https://bugs.webkit.org/show_bug.cgi?id=185964
3098
3099         Reviewed by Geoffrey Garen.
3100
3101         * dom/Document.cpp:
3102         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox const):
3103
3104 2018-05-24  Chris Dumez  <cdumez@apple.com>
3105
3106         [iOS] Avoid dlopening QuickLooks in the common case where the main resource is HTML or plain text
3107         https://bugs.webkit.org/show_bug.cgi?id=185966
3108
3109         Reviewed by Geoffrey Garen.
3110
3111         Avoid dlopening QuickLooks in the common case where the main resource is HTML or plain text
3112         for performance reasons.
3113
3114         * loader/ios/PreviewLoader.mm:
3115         (WebCore::PreviewLoader::shouldCreateForMIMEType):
3116
3117 2018-05-24  Sam Weinig  <sam@webkit.org>
3118
3119         Modernize RenderStyleConstants.h - Part 2
3120         https://bugs.webkit.org/show_bug.cgi?id=185901
3121
3122         Reviewed by Simon Fraser.
3123
3124         Modernized the second set of enums in RenderStyleConstants.h by:
3125             - Converting them to enum classes
3126             - Renaming them to remove unnecessary prefix 'E's
3127             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
3128             - Renaming to match modern conventions (e.g BNONE -> None)
3129             - Reformatting them so that each value is on its own line.
3130
3131         Modernizes the following enums:
3132             PseudoId
3133             ListStyleType (renamed from EListStyleType)
3134             BorderFit (renamed from EBorderFit)
3135             AnimationFillMode (renamed from EAnimationFillMode)
3136             AnimationPlayState (renamed from EAnimPlayState)
3137             WhiteSpace (renamed from EWhiteSpace)
3138             TextAlignMode (renamed from ETextAlign)
3139             TextTransform (renamed from ETextTransform)
3140             TextDecorationStyle
3141             TextAlignLast
3142             TextJustify
3143             TextZoom
3144             BreakBetween
3145             BreakInside
3146             EmptyCell (renamed from EEmptyCell)
3147             CaptionSide (renamed from ECaptionSide)
3148             ListStylePosition (renamed from EListStylePosition)
3149             Visibility (renamed from EVisibility)
3150             CursorType (renamed from ECursor)
3151             CursorVisibility
3152             DisplayType (renamed from EDisplay)
3153             InsideLink (renamed from EInsideLink)
3154             PointerEvents (renamed from EPointerEvents)
3155             Hyphens
3156             TextEmphasisFill
3157             TextEmphasisMark
3158             ImageResolutionSource
3159             ImageResolutionSnap
3160             Order
3161             ColumnAxis
3162             ColumnProgression
3163             LineSnap
3164             LineAlign
3165             RubyPosition
3166             AutoRepeatType
3167             CSSBoxType
3168
3169         * accessibility/AXObjectCache.cpp:
3170         (WebCore::AXObjectCache::isNodeVisible const):
3171         * accessibility/AccessibilityList.cpp:
3172         (WebCore::AccessibilityList::determineAccessibilityRole):
3173         * accessibility/AccessibilityMediaControls.cpp:
3174         (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored const):
3175         (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored const):
3176         * accessibility/AccessibilityObject.cpp:
3177         (WebCore::AccessibilityObject::isDOMHidden const):
3178         * accessibility/AccessibilityRenderObject.cpp:
3179         (WebCore::AccessibilityRenderObject::defaultObjectInclusion const):
3180         (WebCore::AccessibilityRenderObject::isUnvisited const):
3181         (WebCore::AccessibilityRenderObject::isVisited const):
3182         (WebCore::AccessibilityRenderObject::setValue):
3183         * accessibility/AccessibilityTable.cpp:
3184         (WebCore::AccessibilityTable::isDataTable const):
3185         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
3186         (getAttributeSetForAccessibilityObject):
3187         * animation/AnimationTimeline.cpp:
3188         (WebCore::AnimationTimeline::updateCSSAnimationsForElement):
3189         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
3190         * animation/CSSAnimation.cpp:
3191         (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
3192         * animation/DeclarativeAnimation.cpp:
3193         (WebCore::DeclarativeAnimation::initialize):
3194         * animation/KeyframeEffectReadOnly.cpp:
3195         (WebCore::KeyframeEffectReadOnly::backingAnimationForCompositedRenderer const):
3196         * css/CSSComputedStyleDeclaration.cpp:
3197         (WebCore::renderTextDecorationStyleFlagsToCSSValue):
3198         (WebCore::convertToPageBreak):
3199         (WebCore::convertToColumnBreak):
3200         (WebCore::ComputedStyleExtractor::styledElement const):
3201         (WebCore::ComputedStyleExtractor::styledRenderer const):
3202         (WebCore::computeRenderStyleForProperty):
3203         (WebCore::shapePropertyValue):
3204         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
3205         * css/CSSComputedStyleDeclaration.h:
3206         * css/CSSPrimitiveValueMappings.h:
3207         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
3208         (WebCore::CSSPrimitiveValue::operator CaptionSide const):
3209         (WebCore::CSSPrimitiveValue::operator CursorType const):
3210         (WebCore::CSSPrimitiveValue::operator CursorVisibility const):
3211         (WebCore::CSSPrimitiveValue::operator DisplayType const):
3212         (WebCore::CSSPrimitiveValue::operator EmptyCell const):
3213         (WebCore::CSSPrimitiveValue::operator ListStylePosition const):
3214         (WebCore::CSSPrimitiveValue::operator ListStyleType const):
3215         (WebCore::CSSPrimitiveValue::operator BreakBetween const):
3216         (WebCore::CSSPrimitiveValue::operator BreakInside const):
3217         (WebCore::CSSPrimitiveValue::operator TextAlignMode const):
3218         (WebCore::CSSPrimitiveValue::operator TextAlignLast const):
3219         (WebCore::CSSPrimitiveValue::operator TextJustify const):
3220         (WebCore::CSSPrimitiveValue::operator TextDecorationStyle const):
3221         (WebCore::CSSPrimitiveValue::operator TextTransform const):
3222         (WebCore::CSSPrimitiveValue::operator Visibility const):
3223         (WebCore::CSSPrimitiveValue::operator WhiteSpace const):
3224         (WebCore::CSSPrimitiveValue::operator RubyPosition const):
3225         (WebCore::CSSPrimitiveValue::operator TextEmphasisFill const):
3226         (WebCore::CSSPrimitiveValue::operator TextEmphasisMark const):
3227         (WebCore::CSSPrimitiveValue::operator PointerEvents const):
3228         (WebCore::CSSPrimitiveValue::operator Hyphens const):
3229         (WebCore::CSSPrimitiveValue::operator LineSnap const):
3230         (WebCore::CSSPrimitiveValue::operator LineAlign const):
3231         (WebCore::CSSPrimitiveValue::operator Order const):
3232         (WebCore::CSSPrimitiveValue::operator BorderFit const):
3233         (WebCore::CSSPrimitiveValue::operator ColumnAxis const):
3234         (WebCore::CSSPrimitiveValue::operator ColumnProgression const):
3235         (WebCore::CSSPrimitiveValue::operator CSSBoxType const):
3236         (WebCore::CSSPrimitiveValue::operator TextZoom const):
3237         (WebCore::CSSPrimitiveValue::operator ECaptionSide const): Deleted.
3238         (WebCore::CSSPrimitiveValue::operator ECursor const): Deleted.
3239         (WebCore::CSSPrimitiveValue::operator EDisplay const): Deleted.
3240         (WebCore::CSSPrimitiveValue::operator EEmptyCell const): Deleted.
3241         (WebCore::CSSPrimitiveValue::operator EListStylePosition const): Deleted.
3242         (WebCore::CSSPrimitiveValue::operator EListStyleType const): Deleted.
3243         (WebCore::CSSPrimitiveValue::operator ETextAlign const): Deleted.
3244         (WebCore::CSSPrimitiveValue::operator ETextTransform const): Deleted.
3245         (WebCore::CSSPrimitiveValue::operator EVisibility const): Deleted.
3246         (WebCore::CSSPrimitiveValue::operator EWhiteSpace const): Deleted.
3247         (WebCore::CSSPrimitiveValue::operator EPointerEvents const): Deleted.
3248         (WebCore::CSSPrimitiveValue::operator EBorderFit const): Deleted.
3249         * css/CSSSelector.cpp:
3250         (WebCore::CSSSelector::pseudoId):
3251         * css/CSSToStyleMap.cpp:
3252         (WebCore::CSSToStyleMap::mapAnimationFillMode):
3253         (WebCore::CSSToStyleMap::mapAnimationPlayState):
3254         * css/CSSValueKeywords.in:
3255         * css/ElementRuleCollector.cpp:
3256         (WebCore::ElementRuleCollector::collectMatchingRules):
3257         (WebCore::ElementRuleCollector::ruleMatches):
3258         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3259         * css/ElementRuleCollector.h:
3260         * css/SelectorChecker.cpp:
3261         (WebCore::SelectorChecker::match const):
3262         (WebCore::SelectorChecker::matchHostPseudoClass const):
3263         (WebCore::hasScrollbarPseudoElement):
3264         (WebCore::SelectorChecker::matchRecursively const):
3265         * css/SelectorChecker.h:
3266         * css/StyleBuilderConverter.h:
3267         (WebCore::StyleBuilderConverter::convertTextAlign):
3268         (WebCore::StyleBuilderConverter::convertClipPath):
3269         (WebCore::StyleBuilderConverter::convertShapeValue):
3270         (WebCore::StyleBuilderConverter::createGridTrackList):
3271         (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
3272         (WebCore::StyleBuilderConverter::convertPageBreakBetween):
3273         (WebCore::StyleBuilderConverter::convertPageBreakInside):
3274         (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
3275         (WebCore::StyleBuilderConverter::convertColumnBreakInside):
3276         * css/StyleBuilderCustom.h:
3277         (WebCore::StyleBuilderCustom::applyValueImageResolution):
3278         (WebCore::computeBaseSpecifiedFontSize):
3279         (WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
3280         (WebCore::StyleBuilderCustom::isValidDisplayValue):
3281         (WebCore::StyleBuilderCustom::applyInheritDisplay):
3282         (WebCore::StyleBuilderCustom::applyValueDisplay):
3283         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
3284         (WebCore::StyleBuilderCustom::applyValueCursor):
3285         (WebCore::StyleBuilderCustom::applyValueContent):
3286         (WebCore::StyleBuilderCustom::determineRubyTextSizeMultiplier):
3287         (WebCore::StyleBuilderCustom::applyValueAlt):
3288         * css/StyleResolver.cpp:
3289         (WebCore::StyleResolver::styleForElement):
3290         (WebCore::equivalentBlockDisplay):
3291         (WebCore::doesNotInheritTextDecoration):
3292         (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
3293         (WebCore::adjustDisplayContentsStyle):
3294         (WebCore::StyleResolver::adjustSVGElementStyle):
3295         (WebCore::StyleResolver::adjustRenderStyle):
3296         (WebCore::StyleResolver::styleRulesForElement):
3297         (WebCore::isCacheableInMatchedPropertiesCache):
3298         (WebCore::StyleResolver::applyMatchedProperties):
3299         (WebCore::StyleResolver::CascadedProperties::Property::apply):
3300         * css/StyleResolver.h:
3301         (WebCore::StyleResolver::State::elementLinkState const):
3302         * cssjit/SelectorCompiler.cpp:
3303         (WebCore::SelectorCompiler::constructFragmentsInternal):
3304         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
3305         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
3306         * dom/Document.cpp:
3307         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
3308         (WebCore::Document::isPageBoxVisible):
3309         (WebCore::Document::setVisuallyOrdered):
3310         * dom/Document.h:
3311         * dom/Element.cpp:
3312         (WebCore::Element::isFocusable const):
3313         (WebCore::Element::hasDisplayContents const):
3314         (WebCore::Element::storeDisplayContentsStyle):
3315         (WebCore::Element::rendererIsNeeded):
3316         (WebCore::beforeOrAfterPseudoElement):
3317         (WebCore::Element::computedStyle):
3318         * dom/Element.h:
3319         * dom/Node.cpp:
3320         (WebCore::computeEditabilityFromComputedStyle):
3321         * dom/Node.h:
3322         (WebCore::Node::isPseudoElement const):
3323         (WebCore::Node::isBeforePseudoElement const):
3324         (WebCore::Node::isAfterPseudoElement const):
3325         (WebCore::Node::pseudoId const):
3326         (WebCore::Node::customPseudoId const):
3327         * dom/Position.cpp:
3328         (WebCore::Position::upstream const):
3329         (WebCore::Position::downstream const):
3330         (WebCore::Position::isCandidate const):
3331         (WebCore::Position::rendersInDifferentPosition const):
3332         * dom/PositionIterator.cpp:
3333         (WebCore::PositionIterator::isCandidate const):
3334         * dom/PseudoElement.cpp:
3335         (WebCore::PseudoElement::pseudoElementNameForEvents):
3336         (WebCore::PseudoElement::PseudoElement):
3337         * dom/VisitedLinkState.cpp:
3338         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
3339         * dom/VisitedLinkState.h:
3340         (WebCore::VisitedLinkState::determineLinkState):
3341         * editing/Editing.cpp:
3342         (WebCore::isSpecialHTMLElement):
3343         (WebCore::isNodeRendered):
3344         * editing/TextIterator.cpp:
3345         (WebCore::hasVisibleTextNode):
3346         (WebCore::TextIterator::handleTextNode):
3347         (WebCore::TextIterator::handleTextBox):
3348         (WebCore::TextIterator::handleTextNodeFirstLetter):
3349         (WebCore::TextIterator::handleReplacedElement):
3350         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
3351         (WebCore::SimplifiedBackwardsTextIterator::advance):
3352         * editing/VisibleUnits.cpp:
3353         (WebCore::findStartOfParagraph):
3354         (WebCore::findEndOfParagraph):
3355         * editing/ios/EditorIOS.mm:
3356         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3357         * html/HTMLAreaElement.cpp:
3358         (WebCore::HTMLAreaElement::isFocusable const):
3359         * html/HTMLFormElement.cpp:
3360         (WebCore::HTMLFormElement::rendererIsNeeded):
3361         * html/HTMLIFrameElement.cpp:
3362         (WebCore::HTMLIFrameElement::rendererIsNeeded):
3363         * html/HTMLInputElement.cpp:
3364         (WebCore::HTMLInputElement::createInnerTextStyle):
3365         * html/HTMLOptGroupElement.cpp:
3366         (WebCore::HTMLOptGroupElement::isFocusable const):
3367         * html/HTMLOptionElement.cpp:
3368         (WebCore::HTMLOptionElement::isFocusable const):
3369         * html/HTMLTextAreaElement.cpp:
3370         (WebCore::HTMLTextAreaElement::createInnerTextStyle):
3371         * html/HTMLTextFormControlElement.cpp:
3372         (WebCore::HTMLTextFormControlElement::setSelectionRange):
3373         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
3374         * html/MediaElementSession.cpp:
3375         (WebCore::MediaElementSession::autoplayPermitted const):
3376         (WebCore::isMainContentForPurposesOfAutoplay):
3377         * html/RubyElement.cpp:
3378         (WebCore::RubyElement::createElementRenderer):
3379         * html/RubyTextElement.cpp:
3380         (WebCore::RubyTextElement::createElementRenderer):
3381         * html/shadow/TextControlInnerElements.cpp:
3382         (WebCore::TextControlInnerElement::resolveCustomStyle):
3383         (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
3384         * inspector/InspectorOverlay.cpp:
3385         (WebCore::buildObjectForElementData):
3386         * inspector/agents/InspectorCSSAgent.cpp:
3387         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3388         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3389         * inspector/agents/InspectorDOMAgent.cpp:
3390         (WebCore::pseudoElementType):
3391         (WebCore::InspectorDOMAgent::buildObjectForNode):
3392         * inspector/agents/InspectorLayerTreeAgent.cpp:
3393         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3394         * layout/layouttree/LayoutBox.cpp:
3395         (WebCore::Layout::Box::isInlineBlockBox const):
3396         (WebCore::Layout::Box::isBlockLevelBox const):
3397         (WebCore::Layout::Box::isInlineLevelBox const):
3398         (WebCore::Layout::Box::isBlockContainerBox const):
3399         * page/EventHandler.cpp:
3400         (WebCore::EventHandler::selectCursor):
3401         * page/Frame.cpp:
3402         (WebCore::Frame::searchForLabelsAboveCell):
3403         (WebCore::Frame::searchForLabelsBeforeElement):
3404         * page/FrameView.cpp:
3405         (WebCore::FrameView::createScrollbar):
3406         (WebCore::FrameView::adjustScrollStepForFixedContent):
3407         (WebCore::FrameView::updateScrollCorner):
3408         * page/animation/AnimationBase.cpp:
3409         (WebCore::AnimationBase::playStatePlaying const):
3410         (WebCore::AnimationBase::updatePlayState):
3411         * page/animation/AnimationBase.h:
3412         * page/animation/CSSPropertyAnimation.cpp:
3413         (WebCore::blendFunc):
3414         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3415         * page/animation/CompositeAnimation.cpp:
3416         (WebCore::CompositeAnimation::updateTransitions):
3417         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3418         (WebCore::CompositeAnimation::suspendAnimations):
3419         (WebCore::CompositeAnimation::resumeAnimations):
3420         * page/animation/KeyframeAnimation.cpp:
3421         (WebCore::KeyframeAnimation::animate):
3422         * page/ios/FrameIOS.mm:
3423         (WebCore::Frame::nodeRespondingToClickEvents):
3424         * platform/animation/Animation.cpp:
3425         (WebCore::Animation::Animation):
3426         * platform/animation/Animation.h:
3427         (WebCore::Animation::clearPlayState):
3428         (WebCore::Animation::fillMode const):
3429         (WebCore::Animation::playState const):
3430         (WebCore::Animation::setFillMode):
3431         (WebCore::Animation::setPlayState):
3432         (WebCore::Animation::fillsBackwards const):
3433         (WebCore::Animation::fillsForwards const):
3434         (WebCore::Animation::initialFillMode):
3435         (WebCore::Animation::initialPlayState):
3436         * platform/graphics/GraphicsTypes.h:
3437         * platform/graphics/ca/GraphicsLayerCA.cpp:
3438         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
3439         * platform/ios/wak/WAKWindow.mm:
3440         (-[WAKWindow dumpTiles]):
3441         * platform/mac/WebCoreNSURLExtras.mm:
3442         (WebCore::isLookalikeCharacter):
3443         * rendering/ClipPathOperation.h:
3444         * rendering/InlineBox.h:
3445         (WebCore::InlineBox::visibleToHitTesting const):
3446         * rendering/InlineFlowBox.cpp:
3447         (WebCore::InlineFlowBox::addToLine):
3448         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3449         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
3450         (WebCore::InlineFlowBox::paint):
3451         (WebCore::InlineFlowBox::paintBoxDecorations):
3452         (WebCore::InlineFlowBox::paintMask):
3453         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
3454         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
3455         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
3456         * rendering/InlineFlowBox.h:
3457         (WebCore::InlineFlowBox::InlineFlowBox):
3458         * rendering/InlineTextBox.cpp:
3459         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):
3460         (WebCore::InlineTextBox::paint):
3461         (WebCore::InlineTextBox::createTextRun const):
3462         * rendering/PointerEventsHitRules.cpp:
3463         (WebCore::PointerEventsHitRules::PointerEventsHitRules):
3464         * rendering/PointerEventsHitRules.h:
3465         * rendering/RenderBlock.cpp:
3466         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
3467         (WebCore::RenderBlock::paint):
3468         (WebCore::RenderBlock::paintObject):
3469         (WebCore::RenderBlock::shouldPaintSelectionGaps const):
3470         (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
3471         (WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
3472         (WebCore::isChildHitTestCandidate):
3473         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
3474         (WebCore::RenderBlock::firstLineBlock const):
3475         (WebCore::findFirstLetterBlock):
3476         (WebCore::RenderBlock::getFirstLetter):
3477         (WebCore::RenderBlock::createAnonymousBlockWithStyleAndDisplay):
3478         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
3479         (WebCore::RenderBlock::constructTextRun):
3480         (WebCore::RenderBlock::layoutExcludedChildren):
3481         * rendering/RenderBlock.h:
3482         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
3483         (WebCore::RenderBlock::createAnonymousBlock const):
3484         * rendering/RenderBlockFlow.cpp:
3485         (WebCore::RenderBlockFlow::willCreateColumns const):
3486         (WebCore::RenderBlockFlow::layoutBlock):
3487         (WebCore::RenderBlockFlow::applyBeforeBreak):
3488         (WebCore::RenderBlockFlow::applyAfterBreak):
3489         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
3490         (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
3491         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
3492         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
3493         (WebCore::RenderBlockFlow::adjustForBorderFit const):
3494         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
3495         (WebCore::RenderBlockFlow::lineAtIndex const):
3496         (WebCore::RenderBlockFlow::lineCount const):
3497         (WebCore::getHeightForLineCount):
3498         (WebCore::RenderBlockFlow::clearTruncation):
3499         (WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
3500         (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
3501         (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
3502         (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
3503         (WebCore::RenderBlockFlow::isTopLayoutOverflowAllowed const):
3504         (WebCore::RenderBlockFlow::isLeftLayoutOverflowAllowed const):
3505         * rendering/RenderBlockFlow.h:
3506         * rendering/RenderBlockLineLayout.cpp:
3507         (WebCore::RenderBlockFlow::constructLine):
3508         (WebCore::RenderBlockFlow::textAlignmentForLine const):
3509         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
3510         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
3511         (WebCore::expansionBehaviorForInlineTextBox):
3512         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
3513         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
3514         (WebCore::RenderBlockFlow::checkFloatInCleanLine):
3515         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
3516         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
3517         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
3518         * rendering/RenderBox.cpp:
3519         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
3520         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
3521         (WebCore::isCandidateForOpaquenessTest):
3522         (WebCore::RenderBox::paintMask):
3523         (WebCore::RenderBox::paintClippingMask):
3524         (WebCore::RenderBox::positionLineBox):
3525         (WebCore::RenderBox::clippedOverflowRectForRepaint const):
3526         (WebCore::RenderBox::computeLogicalWidthInFragment const):
3527         (WebCore::RenderBox::computeInlineDirectionMargins const):
3528         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):
3529         (WebCore::RenderBox::positionForPoint):
3530         (WebCore::RenderBox::isUnsplittableForPagination const):
3531         * rendering/RenderBoxModelObject.cpp:
3532         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
3533         * rendering/RenderBoxModelObject.h:
3534         * rendering/RenderCounter.cpp:
3535         (WebCore::planCounter):
3536         (WebCore::RenderCounter::originalText const):
3537         * rendering/RenderDeprecatedFlexibleBox.cpp:
3538         (WebCore::childDoesNotAffectWidthOrFlexing):
3539         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3540         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3541         * rendering/RenderDetailsMarker.cpp:
3542         (WebCore::RenderDetailsMarker::paint):
3543         * rendering/RenderElement.cpp:
3544         (WebCore::RenderElement::createFor):
3545         (WebCore::RenderElement::computeFirstLineStyle const):
3546         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
3547         (WebCore::RenderElement::styleWillChange):
3548         (WebCore::RenderElement::insertedIntoTree):
3549         (WebCore::RenderElement::willBeRemovedFromTree):
3550         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
3551         (WebCore::RenderElement::isVisibleInDocumentRect const):
3552         (WebCore::RenderElement::getCachedPseudoStyle const):
3553         (WebCore::RenderElement::getUncachedPseudoStyle const):
3554         (WebCore::RenderElement::selectionPseudoStyle const):
3555         * rendering/RenderElement.h:
3556         (WebCore::RenderElement::visibleToHitTesting const):
3557         * rendering/RenderFileUploadControl.cpp:
3558         (WebCore::RenderFileUploadControl::paintObject):
3559         * rendering/RenderFullScreen.cpp:
3560         (WebCore::createFullScreenStyle):
3561         * rendering/RenderGrid.cpp:
3562         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
3563         * rendering/RenderImage.cpp:
3564         (WebCore::RenderImage::repaintOrMarkForLayout):
3565         * rendering/RenderInline.cpp:
3566         (WebCore::RenderInline::willBeDestroyed):
3567         (WebCore::updateStyleOfAnonymousBlockContinuations):
3568         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
3569         (WebCore::RenderInline::clippedOverflowRectForRepaint const):
3570         (WebCore::RenderInline::addAnnotatedRegions):
3571         * rendering/RenderLayer.cpp:
3572         (WebCore::RenderLayer::RenderLayer):
3573         (WebCore::RenderLayer::updateDescendantDependentFlags):
3574         (WebCore::RenderLayer::createScrollbar):
3575         (WebCore::styleRequiresScrollbar):
3576         (WebCore::styleDefinesAutomaticScrollbar):
3577         (WebCore::computeReferenceBox):
3578         (WebCore::RenderLayer::calculateClipRects const):
3579         * rendering/RenderLayerBacking.cpp:
3580         (WebCore::RenderLayerBacking::updateAfterDescendants):
3581         * rendering/RenderLayerCompositor.cpp:
3582         (WebCore::scrollbarHasDisplayNone):
3583         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
3584         (WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
3585         * rendering/RenderListBox.cpp:
3586         (WebCore::RenderListBox::paintObject):
3587         (WebCore::itemOffsetForAlignment):
3588         (WebCore::RenderListBox::paintItemForeground):
3589         (WebCore::RenderListBox::paintItemBackground):
3590         (WebCore::RenderListBox::createScrollbar):
3591         * rendering/RenderListItem.cpp:
3592         (WebCore::RenderListItem::computeMarkerStyle const):
3593         * rendering/RenderListMarker.cpp:
3594         (WebCore::effectiveListMarkerType):
3595         (WebCore::listMarkerSuffix):
3596         (WebCore::listMarkerText):
3597         (WebCore::RenderListMarker::paint):
3598         (WebCore::RenderListMarker::updateContent):
3599         (WebCore::RenderListMarker::computePreferredLogicalWidths):
3600         (WebCore::RenderListMarker::updateMargins):
3601         (WebCore::RenderListMarker::suffix const):
3602         (WebCore::RenderListMarker::isInside const):
3603         (WebCore::RenderListMarker::getRelativeMarkerRect):
3604         * rendering/RenderListMarker.h:
3605         * rendering/RenderMediaControlElements.cpp:
3606         (WebCore::RenderMediaVolumeSliderContainer::layout):
3607         (WebCore::RenderTextTrackContainerElement::layout):
3608         * rendering/RenderMenuList.cpp:
3609         (WebCore::RenderMenuList::adjustInnerStyle):
3610         (WebCore::if):
3611         (RenderMenuList::itemStyle const):
3612         (RenderMenuList::menuStyle const):
3613         (RenderMenuList::createScrollbar):
3614         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
3615         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
3616         * rendering/RenderObject.cpp:
3617         (WebCore::RenderObject::addAnnotatedRegions):
3618         * rendering/RenderObject.h:
3619         (WebCore::RenderObject::isAnonymousBlock const):
3620         (WebCore::RenderObject::isBeforeContent const):
3621         (WebCore::RenderObject::isAfterContent const):
3622         * rendering/RenderReplaced.cpp:
3623         (WebCore::RenderReplaced::shouldPaint):
3624         (WebCore::RenderReplaced::clippedOverflowRectForRepaint const):
3625         * rendering/RenderRubyBase.cpp:
3626         (WebCore::RenderRubyBase::textAlignmentForLine const):
3627         * rendering/RenderRubyBase.h:
3628         * rendering/RenderRubyRun.cpp:
3629         (WebCore::RenderRubyRun::createRubyBase const):
3630         (WebCore::RenderRubyRun::staticCreateRubyRun):
3631         (WebCore::RenderRubyRun::layoutBlock):
3632         * rendering/RenderRubyText.cpp:
3633         (WebCore::RenderRubyText::textAlignmentForLine const):
3634         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds const):
3635         * rendering/RenderRubyText.h:
3636         * rendering/RenderScrollbar.cpp:
3637         (WebCore::pseudoForScrollbarPart):
3638         (WebCore::RenderScrollbar::updateScrollbarPart):
3639         * rendering/RenderSearchField.cpp:
3640         (WebCore::RenderSearchField::updateCancelButtonVisibility const):
3641         (WebCore::RenderSearchField::visibilityForCancelButton const):
3642         (WebCore::RenderSearchField::menuStyle const):
3643         (WebCore::RenderSearchField::createScrollbar):
3644         * rendering/RenderSearchField.h:
3645         * rendering/RenderTable.cpp:
3646         (WebCore::RenderTable::willInsertTableSection):
3647         (WebCore::RenderTable::layoutCaptions):
3648         (WebCore::RenderTable::layout):
3649         (WebCore::RenderTable::paintObject):
3650         (WebCore::RenderTable::adjustBorderBoxRectForPainting):
3651         (WebCore::RenderTable::paintMask):
3652         (WebCore::RenderTable::recalcSections const):
3653         (WebCore::RenderTable::createTableWithStyle):
3654         * rendering/RenderTableCell.cpp:
3655         (WebCore::RenderTableCell::styleDidChange):
3656         (WebCore::RenderTableCell::paintCollapsedBorders):
3657         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3658         (WebCore::RenderTableCell::paintBoxDecorations):
3659         (WebCore::RenderTableCell::paintMask):
3660         (WebCore::RenderTableCell::createTableCellWithStyle):
3661         * rendering/RenderTableCol.cpp:
3662         (WebCore::RenderTableCol::updateFromElement):
3663         (WebCore::RenderTableCol::isChildAllowed const):
3664         * rendering/RenderTableCol.h:
3665         * rendering/RenderTableRow.cpp:
3666         (WebCore::RenderTableRow::styleDidChange):
3667         (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
3668         (WebCore::RenderTableRow::createTableRowWithStyle):
3669         * rendering/RenderTableSection.cpp:
3670         (WebCore::RenderTableSection::addCell):
3671         (WebCore::RenderTableSection::paint):
3672         (WebCore::RenderTableSection::createTableSectionWithStyle):
3673         * rendering/RenderText.cpp:
3674         (WebCore::RenderText::styleDidChange):
3675         (WebCore::RenderText::computePreferredLogicalWidths):
3676         (WebCore::applyTextTransform):
3677         * rendering/RenderTextFragment.cpp:
3678         (WebCore::RenderTextFragment::styleDidChange):
3679         (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
3680         * rendering/RenderTheme.cpp:
3681         (WebCore::RenderTheme::adjustStyle):
3682         * rendering/RenderThemeMac.mm:
3683         (WebCore::RenderThemeMac::adjustMenuListStyle const):
3684         * rendering/RenderThemeWin.cpp:
3685         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
3686         * rendering/RenderView.cpp:
3687         (WebCore::rendererObscuresBackground):
3688         * rendering/RenderWidget.cpp:
3689         (WebCore::RenderWidget::setWidget):
3690         (WebCore::RenderWidget::styleDidChange):
3691         * rendering/RootInlineBox.cpp:
3692         (WebCore::RootInlineBox::paintEllipsisBox const):
3693         (WebCore::RootInlineBox::lineSnapAdjustment const):
3694         (WebCore::RootInlineBox::lineSelectionGap):
3695         (WebCore::RootInlineBox::computeCaretRect const):
3696         * rendering/SimpleLineLayout.cpp:
3697         (WebCore::SimpleLineLayout::canUseForFontAndText):
3698         (WebCore::SimpleLineLayout::canUseForStyle):
3699         (WebCore::SimpleLineLayout::computeLineLeft):
3700         (WebCore::SimpleLineLayout::updateLineConstrains):
3701         (WebCore::SimpleLineLayout::createLineRuns):
3702         (WebCore::SimpleLineLayout::textAlignForLine):
3703         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
3704         * rendering/SimpleLineLayoutFunctions.cpp:
3705         (WebCore::SimpleLineLayout::paintFlow):
3706         (WebCore::SimpleLineLayout::hitTestFlow):
3707         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3708         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
3709         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3710         * rendering/TextDecorationPainter.cpp:
3711         (WebCore::textDecorationStyleToStrokeStyle):
3712         (WebCore::TextDecorationPainter::paintTextDecoration):
3713         (WebCore::collectStylesForRenderer):
3714         * rendering/TextDecorationPainter.h:
3715         * rendering/line/BreakingContext.h:
3716         (WebCore::BreakingContext::BreakingContext):
3717         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
3718         (WebCore::BreakingContext::handleBR):
3719         (WebCore::BreakingContext::handleOutOfFlowPositioned):
3720         (WebCore::BreakingContext::handleText):
3721         (WebCore::BreakingContext::canBreakAtThisPosition):
3722         (WebCore::BreakingContext::handleEndOfLine):
3723         * rendering/line/LineInlineHeaders.h:
3724         (WebCore::shouldCollapseWhiteSpace):
3725         * rendering/line/LineWidth.cpp:
3726         (WebCore::newFloatShrinksLine):
3727         * rendering/mathml/MathOperator.cpp:
3728         (WebCore::MathOperator::paint):
3729         * rendering/mathml/RenderMathMLFraction.cpp:
3730         (WebCore::RenderMathMLFraction::paint):
3731         * rendering/mathml/RenderMathMLMath.cpp:
3732         (WebCore::RenderMathMLMath::layoutBlock):
3733         * rendering/mathml/RenderMathMLMenclose.cpp:
3734         (WebCore::RenderMathMLMenclose::paint):
3735         * rendering/mathml/RenderMathMLRoot.cpp:
3736         (WebCore::RenderMathMLRoot::paint):
3737         * rendering/mathml/RenderMathMLToken.cpp:
3738         (WebCore::RenderMathMLToken::paint):
3739         * rendering/shapes/BoxShape.cpp:
3740         (WebCore::computeRoundedRectForBoxShape):
3741         * rendering/shapes/ShapeOutsideInfo.cpp:
3742         (WebCore::referenceBox):
3743         (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
3744         (WebCore::ShapeOutsideInfo::logicalTopOffset const):
3745         (WebCore::ShapeOutsideInfo::logicalLeftOffset const):
3746         * rendering/style/CounterContent.h:
3747         (WebCore::CounterContent::CounterContent):
3748         (WebCore::CounterContent::listStyle const):
3749         * rendering/style/RenderStyle.cpp:
3750         (WebCore::RenderStyle::createAnonymousStyleWithDisplay):
3751         (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
3752         (WebCore::RenderStyle::RenderStyle):
3753         (WebCore::RenderStyle::hasUniquePseudoStyle const):
3754         (WebCore::RenderStyle::getCachedPseudoStyle const):
3755         (WebCore::RenderStyle::addCachedPseudoStyle):
3756         (WebCore::RenderStyle::changeRequiresLayout const):
3757         (WebCore::requiresPainting):
3758         (WebCore::RenderStyle::hyphenString const):
3759         (WebCore::RenderStyle::textEmphasisMarkString const):
3760         (WebCore::RenderStyle::visitedDependentColor const):
3761         (WebCore::RenderStyle::textEmphasisMark const):
3762         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
3763         * rendering/style/RenderStyle.h:
3764         (WebCore::RenderStyle::setStyleType):
3765         (WebCore::RenderStyle::setRTLOrdering):
3766         (WebCore::RenderStyle::display const):
3767         (WebCore::RenderStyle::visibility const):
3768         (WebCore::RenderStyle::textAlign const):
3769         (WebCore::RenderStyle::textTransform const):
3770         (WebCore::RenderStyle::whiteSpace const):
3771         (WebCore::RenderStyle::emptyCells const):
3772         (WebCore::RenderStyle::captionSide const):
3773         (WebCore::RenderStyle::listStyleType const):
3774         (WebCore::RenderStyle::listStylePosition const):
3775         (WebCore::RenderStyle::cursor const):
3776         (WebCore::RenderStyle::insideLink const):
3777         (WebCore::RenderStyle::borderFit const):
3778         (WebCore::RenderStyle::pointerEvents const):
3779         (WebCore::RenderStyle::setDisplay):
3780         (WebCore::RenderStyle::setOriginalDisplay):
3781         (WebCore::RenderStyle::setVisibility):
3782         (WebCore::RenderStyle::setTextAlign):
3783         (WebCore::RenderStyle::setTextTransform):
3784         (WebCore::RenderStyle::setTextDecorationStyle):
3785         (WebCore::RenderStyle::setTextDecorationSkip):
3786         (WebCore::RenderStyle::setTextUnderlinePosition):
3787         (WebCore::RenderStyle::setDirection):
3788         (WebCore::RenderStyle::setTextZoom):
3789         (WebCore::RenderStyle::setWhiteSpace):
3790         (WebCore::RenderStyle::setEmptyCells):
3791         (WebCore::RenderStyle::setCaptionSide):
3792         (WebCore::RenderStyle::setListStyleType):
3793         (WebCore::RenderStyle::setListStylePosition):
3794         (WebCore::RenderStyle::setCursor):
3795         (WebCore::RenderStyle::setCursorVisibility):
3796         (WebCore::RenderStyle::setInsideLink):
3797         (WebCore::RenderStyle::setHyphens):
3798         (WebCore::RenderStyle::setBorderFit):
3799         (WebCore::RenderStyle::setColumnAxis):
3800         (WebCore::RenderStyle::setColumnProgression):
3801         (WebCore::RenderStyle::setTextEmphasisFill):
3802         (WebCore::RenderStyle::setTextEmphasisMark):
3803         (WebCore::RenderStyle::setRubyPosition):
3804         (WebCore::RenderStyle::setBreakBefore):
3805         (WebCore::RenderStyle::setBreakAfter):
3806         (WebCore::RenderStyle::setBreakInside):
3807         (WebCore::RenderStyle::setHangingPunctuation):
3808         (WebCore::RenderStyle::setLineSnap):
3809         (WebCore::RenderStyle::setLineAlign):
3810         (WebCore::RenderStyle::setPointerEvents):
3811         (WebCore::RenderStyle::initialDisplay):
3812         (WebCore::RenderStyle::initialBreakBetween):
3813         (WebCore::RenderStyle::initialBreakInside):
3814         (WebCore::RenderStyle::initialCaptionSide):
3815         (WebCore::RenderStyle::initialColumnAxis):
3816         (WebCore::RenderStyle::initialColumnProgression):
3817         (WebCore::RenderStyle::initialEmptyCells):
3818         (WebCore::RenderStyle::initialListStylePosition):
3819         (WebCore::RenderStyle::initialListStyleType):
3820         (WebCore::RenderStyle::initialTextTransform):
3821         (WebCore::RenderStyle::initialVisibility):
3822         (WebCore::RenderStyle::initialWhiteSpace):
3823         (WebCore::RenderStyle::initialCursor):
3824         (WebCore::RenderStyle::initialTextAlign):
3825         (WebCore::RenderStyle::initialTextDecorationStyle):
3826         (WebCore::RenderStyle::initialTextZoom):
3827         (WebCore::RenderStyle::initialHyphens):
3828         (WebCore::RenderStyle::initialBorderFit):
3829         (WebCore::RenderStyle::initialRTLOrdering):
3830         (WebCore::RenderStyle::initialPointerEvents):
3831         (WebCore::RenderStyle::initialTextEmphasisColor):
3832         (WebCore::RenderStyle::initialTextEmphasisFill):
3833         (WebCore::RenderStyle::initialTextEmphasisMark):
3834         (WebCore::RenderStyle::initialRubyPosition):
3835         (WebCore::RenderStyle::initialImageResolutionSource):
3836         (WebCore::RenderStyle::initialImageResolutionSnap):
3837         (WebCore::RenderStyle::initialTextAlignLast):
3838         (WebCore::RenderStyle::initialTextJustify):
3839         (WebCore::RenderStyle::initialCursorVisibility):
3840         (WebCore::RenderStyle::initialGridAutoRepeatType):
3841         (WebCore::RenderStyle::initialLineSnap):
3842         (WebCore::RenderStyle::initialLineAlign):
3843         (WebCore::RenderStyle::NonInheritedFlags::hasAnyPublicPseudoStyles const):
3844         (WebCore::RenderStyle::originalDisplay const):
3845         (WebCore::RenderStyle::NonInheritedFlags::hasPseudoStyle const):
3846         (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyle):
3847         (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyles):
3848         (WebCore::RenderStyle::autoWrap):
3849         (WebCore::RenderStyle::preserveNewline):
3850         (WebCore::RenderStyle::collapseWhiteSpace):
3851         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const):
3852         (WebCore::RenderStyle::hasInlineColumnAxis const):
3853         (WebCore::RenderStyle::isDisplayRegionType const):
3854         (WebCore::RenderStyle::isDisplayReplacedType):
3855         (WebCore::RenderStyle::isDisplayInlineType):
3856         (WebCore::RenderStyle::isDisplayFlexibleBox):
3857         (WebCore::RenderStyle::isDisplayGridBox):
3858         (WebCore::RenderStyle::isDisplayFlexibleOrGridBox):
3859         (WebCore::pseudoElementRendererIsNeeded):
3860         * rendering/style/RenderStyleConstants.cpp:
3861         (WebCore::operator<<):
3862         (WebCore::alwaysPageBreak):
3863         * rendering/style/RenderStyleConstants.h:
3864         (WebCore::PseudoIdSet::has const):
3865         (WebCore::PseudoIdSet::add):
3866         * rendering/style/ShapeValue.h:
3867         * rendering/style/StyleMultiColData.cpp:
3868         (WebCore::StyleMultiColData::StyleMultiColData):
3869         * rendering/style/StyleRareInheritedData.cpp:
3870         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3871         * rendering/style/StyleRareNonInheritedData.cpp:
3872         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3873         * rendering/style/StyleRareNonInheritedData.h:
3874         * rendering/svg/RenderSVGContainer.cpp:
3875         (WebCore::RenderSVGContainer::paint):
3876         * rendering/svg/RenderSVGImage.cpp:
3877         (WebCore::RenderSVGImage::paint):
3878         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3879         * rendering/svg/RenderSVGInlineText.cpp:
3880         (WebCore::RenderSVGInlineText::styleDidChange):
3881         * rendering/svg/RenderSVGModelObject.cpp:
3882         (WebCore::RenderSVGModelObject::checkIntersection):
3883         (WebCore::RenderSVGModelObject::checkEnclosure):
3884         * rendering/svg/RenderSVGResource.cpp:
3885         (WebCore::requestPaintingResource):
3886         * rendering/svg/RenderSVGResourceClipper.cpp:
3887         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
3888         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
3889         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
3890         * rendering/svg/RenderSVGResourceMasker.cpp:
3891         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
3892         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
3893         * rendering/svg/RenderSVGRoot.cpp:
3894         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint const):
3895         * rendering/svg/RenderSVGShape.cpp:
3896         (WebCore::RenderSVGShape::paint):
3897         (WebCore::RenderSVGShape::nodeAtFloatPoint):
3898         * rendering/svg/RenderSVGText.cpp:
3899         (WebCore::RenderSVGText::nodeAtFloatPoint):
3900         * rendering/svg/SVGInlineTextBox.cpp:
3901         (WebCore::SVGInlineTextBox::paintSelectionBackground):
3902         (WebCore::SVGInlineTextBox::paint):
3903         (WebCore::SVGInlineTextBox::constructTextRun const):
3904         (WebCore::SVGInlineTextBox::paintDecoration):
3905         (WebCore::SVGInlineTextBox::nodeAtPoint):
3906         * rendering/svg/SVGRenderSupport.cpp:
3907         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
3908         * rendering/svg/SVGRenderingContext.cpp:
3909         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3910         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3911         (WebCore::processRenderSVGInlineText):
3912         * rendering/svg/SVGTextMetricsBuilder.cpp:
3913         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
3914         * rendering/updating/RenderTreeBuilderBlock.cpp:
3915         (WebCore::RenderTreeBuilder::Block::detach):
3916         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
3917         (WebCore::styleForFirstLetter):
3918         (WebCore::RenderTreeBuilder::FirstLetter::updateAfterDescendants):
3919         (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
3920         (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
3921         * rendering/updating/RenderTreeBuilderInline.cpp:
3922         (WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation):
3923         (WebCore::RenderTreeBuilder::Inline::newChildIsInline):
3924         * rendering/updating/RenderTreeBuilderList.cpp:
3925         (WebCore::RenderTreeBuilder::List::updateItemMarker):
3926         * rendering/updating/RenderTreeBuilderMathML.cpp:
3927         (WebCore::RenderTreeBuilder::MathML::createMathMLOperator):
3928         * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
3929         (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
3930         (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
3931        &n