40bbf917b3c3d6607dc4de1674a995b875fb4a48
[WebKit.git] / Source / WebCore / ChangeLog
1 2019-10-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GTK][WPE] ImageDecoders: use SharedBuffer::DataSegment instead of SharedBuffer
4         https://bugs.webkit.org/show_bug.cgi?id=202807
5
6         Reviewed by Adrian Perez de Castro.
7
8         Because SharedBuffer::DataSegment is ThreadSafeRefCounted.
9
10         * platform/image-decoders/ScalableImageDecoder.h:
11         * platform/image-decoders/bmp/BMPImageDecoder.cpp:
12         (WebCore::BMPImageDecoder::setData):
13         (WebCore::BMPImageDecoder::decodeHelper):
14         * platform/image-decoders/bmp/BMPImageDecoder.h:
15         * platform/image-decoders/bmp/BMPImageReader.h:
16         (WebCore::BMPImageReader::readUint16):
17         (WebCore::BMPImageReader::readUint32):
18         (WebCore::BMPImageReader::setData):
19         (WebCore::BMPImageReader::readUint16 const):
20         (WebCore::BMPImageReader::readUint32 const):
21         * platform/image-decoders/gif/GIFImageDecoder.cpp:
22         (WebCore::GIFImageDecoder::setData):
23         (WebCore::GIFImageDecoder::decode):
24         * platform/image-decoders/gif/GIFImageReader.h:
25         (GIFImageReader::setData):
26         * platform/image-decoders/ico/ICOImageDecoder.cpp:
27         (WebCore::ICOImageDecoder::setData):
28         (WebCore::ICOImageDecoder::decodeAtIndex):
29         * platform/image-decoders/ico/ICOImageDecoder.h:
30         * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
31         (WebCore::JPEGImageReader::decode):
32         * platform/image-decoders/jpeg2000/JPEG2000ImageDecoder.cpp:
33         (WebCore::JPEG2000ImageDecoder::decode):
34         * platform/image-decoders/png/PNGImageDecoder.cpp:
35         (WebCore::PNGImageReader::decode):
36         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
37         (WebCore::WEBPImageDecoder::decode):
38
39 2019-10-30  Peng Liu  <peng.liu6@apple.com>
40
41         [Picture-in-Picture Web API] Enable the support for iOS
42         https://bugs.webkit.org/show_bug.cgi?id=202618
43
44         Reviewed by Jer Noble.
45
46         Enable the Picture-in-Picture API support for iOS (iPad only).
47         Add a file WebCore/platform/PictureInPictureSupport.h to define supportsPictureInPicture()
48         and provide a default implementation of that function if a configuration does not provide it (just return false).
49         The original definition of this function in platform/cocoa/VideoFullscreenModel.h is removed,
50         and the usage of this function is cleaned up.
51         Also fix a build error related to including header file (pal/spi/cg/CoreGraphicsSPI.h).
52
53         Covered by existing test cases.
54
55         * Configurations/FeatureDefines.xcconfig:
56         * Modules/pictureinpicture/DocumentPictureInPicture.cpp:
57         (WebCore::DocumentPictureInPicture::pictureInPictureEnabled):
58         * Modules/pictureinpicture/DocumentPictureInPicture.h:
59         (WebCore::DocumentPictureInPicture::pictureInPictureEnabled): Deleted.
60         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
61         (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
62
63         * Configurations/FeatureDefines.xcconfig:
64         * Modules/pictureinpicture/DocumentPictureInPicture.cpp:
65         (WebCore::DocumentPictureInPicture::pictureInPictureEnabled):
66         * Modules/pictureinpicture/DocumentPictureInPicture.h:
67         (WebCore::DocumentPictureInPicture::pictureInPictureEnabled): Deleted.
68         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
69         (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
70         * WebCore.xcodeproj/project.pbxproj:
71         * html/HTMLMediaElement.cpp:
72         * html/HTMLVideoElement.cpp:
73         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode const):
74         * platform/PictureInPictureSupport.h: Copied from Source/WebCore/Modules/pictureinpicture/DocumentPictureInPicture.h.
75         (WebCore::supportsPictureInPicture):
76         * platform/cocoa/VideoFullscreenModel.h:
77         * platform/graphics/cg/PathCG.cpp:
78         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
79         * platform/mac/VideoFullscreenInterfaceMac.mm:
80
81 2019-10-30  Devin Rousso  <drousso@apple.com>
82
83         Web Inspector: Timelines: ResizeObserver callbacks are not labeled in the Events timeline
84         https://bugs.webkit.org/show_bug.cgi?id=203634
85         <rdar://problem/56760736>
86
87         Reviewed by Simon Fraser.
88
89         Wrap the `ResizeObserver` event handler in two `InspectorInstrumentation` calls so the
90         frontend knows how to properly label the callbacks.
91
92         * page/ResizeObserver.cpp:
93         (WebCore::ResizeObserver::deliverObservations):
94
95 2019-10-30  Alex Christensen  <achristensen@webkit.org>
96
97         Prevent Mac CMake build from bit rotting
98         https://bugs.webkit.org/show_bug.cgi?id=203647
99
100         Rubber-stamped by Tim Horton.
101
102         * PlatformMac.cmake:
103         * platform/graphics/mac/WebKitNSImageExtras.mm:
104
105 2019-10-30  Jer Noble  <jer.noble@apple.com>
106
107         Add fullscreen style quirk for reddit.com
108         https://bugs.webkit.org/show_bug.cgi?id=203635
109         <rdar://problem/55813774>
110
111         Reviewed by Eric Carlson.
112
113         Reddit.com expects the UA stylesheet to give the fullscreen element
114         a "width:100%; height:100%;" style.
115
116         * css/CSSDefaultStyleSheets.cpp:
117         (WebCore::CSSDefaultStyleSheets::ensureDefaultStyleSheetsForElement):
118         * page/Quirks.cpp:
119         (WebCore::Quirks::needsFullWidthHeightFullscreenStyleQuirk const):
120         * page/Quirks.h:
121
122 2019-10-30  Yusuke Suzuki  <ysuzuki@apple.com>
123
124         [JSC] Date functions should have intrinsic
125         https://bugs.webkit.org/show_bug.cgi?id=202187
126
127         Reviewed by Keith Miller.
128
129         * loader/archive/mhtml/MHTMLArchive.cpp:
130         (WebCore::MHTMLArchive::generateMHTMLData):
131
132 2019-10-30  Simon Fraser  <simon.fraser@apple.com>
133
134         Opacity should always serialize as a number
135         https://bugs.webkit.org/show_bug.cgi?id=203601
136
137         Reviewed by Dean Jackson.
138         
139         opacity should always serialize as a number, even if it was specified as a percentage.
140
141         Tests: imported/w3c/web-platform-tests/css/css-color/parsing/opacity-valid
142
143         * css/StyleProperties.cpp:
144         (WebCore::StyleProperties::getPropertyValue const):
145
146 2019-10-30  Chris Dumez  <cdumez@apple.com>
147
148         GPUCanvasContext should not prevent entering the back/forward cache
149         https://bugs.webkit.org/show_bug.cgi?id=203104
150         <rdar://problem/56748066>
151
152         Reviewed by Tim Horton.
153
154         Let pages with a GPUCanvasContext into the back/forward cache. The current implementation
155         does not run any script.
156
157         Test: fast/history/page-cache-gpu-canvas-context.html
158
159         * Modules/webgpu/GPUCanvasContext.h:
160
161 2019-10-30  Daniel Bates  <dabates@apple.com>
162
163         Move tracking and computation of timer heap current insertion order to ThreadTimers
164         https://bugs.webkit.org/show_bug.cgi?id=203519
165
166         Reviewed by Jer Noble.
167
168         Each thread maintains its own heap of timers. So, they should also maintain the running insertion count.
169         The running insertion count is used to ensure timers with the same firing time are ordered by when
170         they were inserted into the heap. This is important to ensure that code like:
171
172                 window.setTimeout(a, 0)
173                 window.setTimeout(b, 0)
174
175         schedule a() to be called before b() even though both has the same firing time.
176
177         Currently the insertion count is process-wide. That is, it is globally unique across all threads. The
178         current width of the count is sizeof(unsigned) and so the more threads that increment it the faster it
179         approaches the point of wrapping around. The current code can only ensure correct timer ordering in a
180         window of sizeof(unsigned) / 2 timers (see TimerHeapLessThanFunction::compare(MonotonicTime, unsigned, MonotonicTime, unsigned)).
181         We could simply leave it process-wide and increases the width to 64-bits, but I felt it made more
182         sense conceptually to move the count to the thread local storage and be with the timer heap itself
183         despite the extra 4 bytes per thread that it adds.
184
185         * dom/ActiveDOMObject.h:
186         * platform/ThreadTimers.h:
187         (WebCore::ThreadTimers::nextHeapInsertionCount): Added.
188         * platform/Timer.cpp:
189         (WebCore::TimerBase::setNextFireTime):
190
191 2019-10-30  Said Abou-Hallawa  <sabouhallawa@apple.com>
192
193         Remove the argument 'resultElement' from the SVG animation functions
194         https://bugs.webkit.org/show_bug.cgi?id=202052
195
196          Reviewed by Simon Fraser.
197
198          This is a clean-up patch, which does the following:
199
200          -- It removes the argument 'resultElement' from all the SVG animation
201            functions except from SVGSMILElement::progress(). In this function, we
202            need to start the animation only with the first animation.
203
204          -- It renames resetAnimatedType() and clearAnimatedType() to startAnimation()
205            and stopAnimation() respectively. These functions were named for the
206            type SVGAnimatedType which had been deleted. The real purpose of these
207            functions is to start/stop the animation.
208
209         * svg/SVGAnimateElementBase.cpp:
210         (WebCore::SVGAnimateElementBase::startAnimation):
211         (WebCore::SVGAnimateElementBase::calculateAnimatedValue):
212         (WebCore::SVGAnimateElementBase::stopAnimation):
213         (WebCore::SVGAnimateElementBase::resetAnimatedType): Deleted.
214         (WebCore::SVGAnimateElementBase::clearAnimatedType): Deleted.
215         * svg/SVGAnimateElementBase.h:
216         * svg/SVGAnimateMotionElement.cpp:
217         (WebCore::SVGAnimateMotionElement::startAnimation):
218         (WebCore::SVGAnimateMotionElement::stopAnimation):
219         (WebCore::SVGAnimateMotionElement::calculateAnimatedValue):
220         (WebCore::SVGAnimateMotionElement::resetAnimatedType): Deleted.
221         (WebCore::SVGAnimateMotionElement::clearAnimatedType): Deleted.
222         * svg/SVGAnimateMotionElement.h:
223         * svg/SVGAnimationElement.cpp:
224         (WebCore::SVGAnimationElement::updateAnimation):
225         * svg/SVGAnimationElement.h:
226         * svg/animation/SMILTimeContainer.cpp:
227         (WebCore::SMILTimeContainer::updateAnimations):
228         * svg/animation/SVGSMILElement.cpp:
229         (WebCore::SVGSMILElement::reset):
230         (WebCore::SVGSMILElement::setAttributeName):
231         (WebCore::SVGSMILElement::setTargetElement):
232         (WebCore::SVGSMILElement::progress):
233         * svg/animation/SVGSMILElement.h:
234
235 2019-10-30  Zalan Bujtas  <zalan@apple.com>
236
237         ASSERTION FAILED: !object || !isRuby(object->parent()) || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && is<RenderBlock>(*object) && object->style().display() == D
238         https://bugs.webkit.org/show_bug.cgi?id=196003
239         <rdar://problem/49219890>
240
241         Reviewed by Antti Koivisto.
242
243         This test case triggered two slightly different issues.
244         1. It's valid to have column flows/sets as the child of the ruby renderer (isRubyChildForNormalRemoval already accepts these type of renderers).
245         2. When the parent finding logic comes back with the insertion point as parent candidate, we can only call the simple internal insert when the multicol context is not present (since the multicol context (sadly) mutates the insertion point).
246
247         * rendering/updating/RenderTreeBuilder.cpp:
248         (WebCore::RenderTreeBuilder::attach):
249         * rendering/updating/RenderTreeBuilderRuby.cpp:
250         (WebCore::isAnonymousRubyInlineBlock):
251         (WebCore::lastRubyRun):
252
253 2019-10-30  Andres Gonzalez  <andresg_22@apple.com>
254
255         Create base class common to AccessibilityObject and AXIsolatedTreeNode.
256         https://bugs.webkit.org/show_bug.cgi?id=203408
257
258         Reviewed by Chris Fleizach.
259
260         No new tests needed since this doesn't change any functionality.
261
262         AXCoreObject is now a common base class for both AccessibilityObject and
263         AXIsolatedTreeNode. All client code should use AXCoreObject instead of
264         any of the derived classes. This will allow to seamlessly switch
265         between using AXIsolatedTreeNode in the secondary thread and
266         AccessibilityObject in the main thread when needed. This change also
267         allows for cleaner client code, encapsulating the decision whether
268         AXIsolatedTreeNode can respond to a request or need to resort to its
269         corresponding AccessibilityObject, and reducing the number of compile
270         time flag checks for ENABLE(ACCESSIBILITY_ISOLATED_TREE).
271
272         * accessibility/AXObjectCache.cpp:
273         (WebCore::AXObjectCache::~AXObjectCache):
274         (WebCore::AXObjectCache::focusedImageMapUIElement):
275         (WebCore::AXObjectCache::focusedUIElementForPage):
276         (WebCore::AXObjectCache::getOrCreate):
277         (WebCore::AXObjectCache::remove):
278         (WebCore::AXObjectCache::getAXID):
279         (WebCore::AXObjectCache::childrenChanged):
280         (WebCore::AXObjectCache::notificationPostTimerFired):
281         (WebCore::AXObjectCache::postNotification):
282         (WebCore::AXObjectCache::setTextMarkerDataWithCharacterOffset):
283         (WebCore::AXObjectCache::textMarkerDataForVisiblePosition):
284         (WebCore::AXObjectCache::textMarkerDataForFirstPositionInTextControl):
285         (WebCore::AXObjectCache::performDeferredCacheUpdate):
286         * accessibility/AXObjectCache.h:
287         (WebCore::AXObjectCache::childrenChanged):
288         * accessibility/AccessibilityARIAGrid.cpp:
289         (WebCore::AccessibilityARIAGrid::addTableCellChild):
290         (WebCore::AccessibilityARIAGrid::addRowDescendant):
291         * accessibility/AccessibilityARIAGrid.h:
292         * accessibility/AccessibilityARIAGridCell.cpp:
293         (WebCore::AccessibilityARIAGridCell::parentTable const):
294         (WebCore::AccessibilityARIAGridCell::rowIndexRange const):
295         (WebCore::AccessibilityARIAGridCell::axRowSpanWithRowIndex const):
296         (WebCore::AccessibilityARIAGridCell::columnIndexRange const):
297         * accessibility/AccessibilityARIAGridRow.cpp:
298         (WebCore::AccessibilityARIAGridRow::disclosedRows):
299         (WebCore::AccessibilityARIAGridRow::disclosedByRow const):
300         (WebCore::AccessibilityARIAGridRow::headerObject):
301         * accessibility/AccessibilityARIAGridRow.h:
302         * accessibility/AccessibilityLabel.cpp:
303         (WebCore::AccessibilityLabel::insertChild):
304         * accessibility/AccessibilityLabel.h:
305         * accessibility/AccessibilityListBox.cpp:
306         (WebCore::AccessibilityListBox::elementAccessibilityHitTest const):
307         * accessibility/AccessibilityListBox.h:
308         * accessibility/AccessibilityMathMLElement.cpp:
309         (WebCore::AccessibilityMathMLElement::isMathScriptObject const):
310         (WebCore::AccessibilityMathMLElement::isMathMultiscriptObject const):
311         (WebCore::AccessibilityMathMLElement::mathRadicandObject):
312         (WebCore::AccessibilityMathMLElement::mathRootIndexObject):
313         (WebCore::AccessibilityMathMLElement::mathNumeratorObject):
314         (WebCore::AccessibilityMathMLElement::mathDenominatorObject):
315         (WebCore::AccessibilityMathMLElement::mathUnderObject):
316         (WebCore::AccessibilityMathMLElement::mathOverObject):
317         (WebCore::AccessibilityMathMLElement::mathBaseObject):
318         (WebCore::AccessibilityMathMLElement::mathSubscriptObject):
319         (WebCore::AccessibilityMathMLElement::mathSuperscriptObject):
320         * accessibility/AccessibilityMathMLElement.h:
321         * accessibility/AccessibilityMediaControls.h:
322         * accessibility/AccessibilityMenuList.cpp:
323         (WebCore::AccessibilityMenuList::addChildren):
324         * accessibility/AccessibilityMenuListPopup.cpp:
325         (WebCore::AccessibilityMenuListPopup::childrenChanged):
326         (WebCore::AccessibilityMenuListPopup::didUpdateActiveOption):
327         * accessibility/AccessibilityNodeObject.cpp:
328         (WebCore::AccessibilityNodeObject::selectedRadioButton):
329         (WebCore::AccessibilityNodeObject::selectedTabItem):
330         * accessibility/AccessibilityNodeObject.h:
331         * accessibility/AccessibilityObject.cpp:
332         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
333         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
334         (WebCore::AccessibilityObject::isAccessibilityTextSearchMatch):
335         (WebCore::AccessibilityObject::containsText const):
336         (WebCore::AccessibilityObject::parentObjectUnignored const):
337         (WebCore::appendAccessibilityObject):
338         (WebCore::AccessibilityObject::insertChild):
339         (WebCore::AccessibilityObject::addChild):
340         (WebCore::appendChildrenToArray):
341         (WebCore::AccessibilityObject::objectMatchesSearchCriteriaWithResultLimit):
342         (WebCore::AccessibilityObject::findMatchingObjects):
343         (WebCore::AccessibilityObject::headingElementForNode):
344         (WebCore::AccessibilityObject::isDescendantOfObject const):
345         (WebCore::AccessibilityObject::isAncestorOfObject const):
346         (WebCore::AccessibilityObject::elementAccessibilityHitTest const):
347         (WebCore::AccessibilityObject::focusedUIElement const):
348         (WebCore::AccessibilityObject::isExpanded const):
349         (WebCore::AccessibilityObject::isOnScreen const):
350         (WebCore::AccessibilityObject::accessibilityIsIgnored const):
351         (WebCore::AccessibilityObject::selectedListItem):
352         (WebCore::AccessibilityObject::setIsIgnoredFromParentDataForChild):
353         (WebCore::AccessibilityObject::accessibilityObjectContainsText const): Deleted.
354         (WebCore::AccessibilityObject::isOnscreen const): Deleted.
355         * accessibility/AccessibilityObject.h:
356         (isType):
357         (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode): Deleted.
358         (WebCore::AccessibilityIsIgnoredFromParentData::AccessibilityIsIgnoredFromParentData): Deleted.
359         (WebCore::AccessibilityIsIgnoredFromParentData::isNull const): Deleted.
360         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria): Deleted.
361         (WebCore::VisiblePositionRange::VisiblePositionRange): Deleted.
362         (WebCore::VisiblePositionRange::isNull const): Deleted.
363         (WebCore::PlainTextRange::PlainTextRange): Deleted.
364         (WebCore::PlainTextRange::isNull const): Deleted.
365         (WebCore::AccessibilitySearchTextCriteria::AccessibilitySearchTextCriteria): Deleted.
366         (WebCore::AccessibilityTextOperation::AccessibilityTextOperation): Deleted.
367         (WebCore::AccessibilityObject::setAXObjectID): Deleted.
368         (WebCore::AccessibilityObject::init): Deleted.
369         (WebCore::AccessibilityObject::isAccessibilityNodeObject const): Deleted.
370         (WebCore::AccessibilityObject::isAccessibilityRenderObject const): Deleted.
371         (WebCore::AccessibilityObject::isAccessibilityScrollbar const): Deleted.
372         (WebCore::AccessibilityObject::isAccessibilityScrollView const): Deleted.
373         (WebCore::AccessibilityObject::isAccessibilitySVGRoot const): Deleted.
374         (WebCore::AccessibilityObject::isAccessibilitySVGElement const): Deleted.
375         (WebCore::AccessibilityObject::isAttachmentElement const): Deleted.
376         (WebCore::AccessibilityObject::isHeading const): Deleted.
377         (WebCore::AccessibilityObject::isImageMap const): Deleted.
378         (WebCore::AccessibilityObject::isNativeImage const): Deleted.
379         (WebCore::AccessibilityObject::isImageButton const): Deleted.
380         (WebCore::AccessibilityObject::isPasswordField const): Deleted.
381         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField): Deleted.
382         (WebCore::AccessibilityObject::isNativeTextControl const): Deleted.
383         (WebCore::AccessibilityObject::isSearchField const): Deleted.
384         (WebCore::AccessibilityObject::isWebArea const): Deleted.
385         (WebCore::AccessibilityObject::isCheckbox const): Deleted.
386         (WebCore::AccessibilityObject::isRadioButton const): Deleted.
387         (WebCore::AccessibilityObject::isNativeListBox const): Deleted.
388         (WebCore::AccessibilityObject::isListBox const): Deleted.
389         (WebCore::AccessibilityObject::isListBoxOption const): Deleted.
390         (WebCore::AccessibilityObject::isMediaTimeline const): Deleted.
391         (WebCore::AccessibilityObject::isMenuRelated const): Deleted.
392         (WebCore::AccessibilityObject::isMenu const): Deleted.
393         (WebCore::AccessibilityObject::isMenuBar const): Deleted.
394         (WebCore::AccessibilityObject::isMenuButton const): Deleted.
395         (WebCore::AccessibilityObject::isMenuItem const): Deleted.
396         (WebCore::AccessibilityObject::isInputImage const): Deleted.
397         (WebCore::AccessibilityObject::isProgressIndicator const): Deleted.
398         (WebCore::AccessibilityObject::isSlider const): Deleted.
399         (WebCore::AccessibilityObject::isSliderThumb const): Deleted.
400         (WebCore::AccessibilityObject::isInputSlider const): Deleted.
401         (WebCore::AccessibilityObject::isControl const): Deleted.
402         (WebCore::AccessibilityObject::isLabel const): Deleted.
403         (WebCore::AccessibilityObject::isList const): Deleted.
404         (WebCore::AccessibilityObject::isTable const): Deleted.
405         (WebCore::AccessibilityObject::isDataTable const): Deleted.
406         (WebCore::AccessibilityObject::isTableRow const): Deleted.
407         (WebCore::AccessibilityObject::isTableColumn const): Deleted.
408         (WebCore::AccessibilityObject::isTableCell const): Deleted.
409         (WebCore::AccessibilityObject::isFieldset const): Deleted.
410         (WebCore::AccessibilityObject::isGroup const): Deleted.
411         (WebCore::AccessibilityObject::isARIATreeGridRow const): Deleted.
412         (WebCore::AccessibilityObject::isMenuList const): Deleted.
413         (WebCore::AccessibilityObject::isMenuListPopup const): Deleted.
414         (WebCore::AccessibilityObject::isMenuListOption const): Deleted.
415         (WebCore::AccessibilityObject::isSpinButton const): Deleted.
416         (WebCore::AccessibilityObject::isNativeSpinButton const): Deleted.
417         (WebCore::AccessibilityObject::isSpinButtonPart const): Deleted.
418         (WebCore::AccessibilityObject::isMockObject const): Deleted.
419         (WebCore::AccessibilityObject::isMediaObject const): Deleted.
420         (WebCore::AccessibilityObject::isSwitch const): Deleted.
421         (WebCore::AccessibilityObject::isToggleButton const): Deleted.
422         (WebCore::AccessibilityObject::isTabList const): Deleted.
423         (WebCore::AccessibilityObject::isTabItem const): Deleted.
424         (WebCore::AccessibilityObject::isRadioGroup const): Deleted.
425         (WebCore::AccessibilityObject::isComboBox const): Deleted.
426         (WebCore::AccessibilityObject::isTreeGrid const): Deleted.
427         (WebCore::AccessibilityObject::isListItem const): Deleted.
428         (WebCore::AccessibilityObject::isCheckboxOrRadio const): Deleted.
429         (WebCore::AccessibilityObject::isScrollView const): Deleted.
430         (WebCore::AccessibilityObject::isCanvas const): Deleted.
431         (WebCore::AccessibilityObject::isPopUpButton const): Deleted.
432         (WebCore::AccessibilityObject::isColorWell const): Deleted.
433         (WebCore::AccessibilityObject::isSplitter const): Deleted.
434         (WebCore::AccessibilityObject::isToolbar const): Deleted.
435         (WebCore::AccessibilityObject::isSummary const): Deleted.
436         (WebCore::AccessibilityObject::isChecked const): Deleted.
437         (WebCore::AccessibilityObject::isEnabled const): Deleted.
438         (WebCore::AccessibilityObject::isSelected const): Deleted.
439         (WebCore::AccessibilityObject::isFocused const): Deleted.
440         (WebCore::AccessibilityObject::isHovered const): Deleted.
441         (WebCore::AccessibilityObject::isIndeterminate const): Deleted.
442         (WebCore::AccessibilityObject::isLoaded const): Deleted.
443         (WebCore::AccessibilityObject::isMultiSelectable const): Deleted.
444         (WebCore::AccessibilityObject::isOffScreen const): Deleted.
445         (WebCore::AccessibilityObject::isPressed const): Deleted.
446         (WebCore::AccessibilityObject::isUnvisited const): Deleted.
447         (WebCore::AccessibilityObject::isVisited const): Deleted.
448         (WebCore::AccessibilityObject::isRequired const): Deleted.
449         (WebCore::AccessibilityObject::supportsRequiredAttribute const): Deleted.
450         (WebCore::AccessibilityObject::isLinked const): Deleted.
451         (WebCore::AccessibilityObject::isVisible const): Deleted.
452         (WebCore::AccessibilityObject::isCollapsed const): Deleted.
453         (WebCore::AccessibilityObject::setIsExpanded): Deleted.
454         (WebCore::AccessibilityObject::isSelectedOptionActive const): Deleted.
455         (WebCore::AccessibilityObject::hasBoldFont const): Deleted.
456         (WebCore::AccessibilityObject::hasItalicFont const): Deleted.
457         (WebCore::AccessibilityObject::hasPlainText const): Deleted.
458         (WebCore::AccessibilityObject::hasSameFont const): Deleted.
459         (WebCore::AccessibilityObject::hasSameFontColor const): Deleted.
460         (WebCore::AccessibilityObject::hasSameStyle const): Deleted.
461         (WebCore::AccessibilityObject::isStaticText const): Deleted.
462         (WebCore::AccessibilityObject::hasUnderline const): Deleted.
463         (WebCore::AccessibilityObject::canSetFocusAttribute const): Deleted.
464         (WebCore::AccessibilityObject::canSetTextRangeAttributes const): Deleted.
465         (WebCore::AccessibilityObject::canSetValueAttribute const): Deleted.
466         (WebCore::AccessibilityObject::canSetNumericValue const): Deleted.
467         (WebCore::AccessibilityObject::canSetSelectedAttribute const): Deleted.
468         (WebCore::AccessibilityObject::canSetSelectedChildrenAttribute const): Deleted.
469         (WebCore::AccessibilityObject::canSetExpandedAttribute const): Deleted.
470         (WebCore::AccessibilityObject::node const): Deleted.
471         (WebCore::AccessibilityObject::renderer const): Deleted.
472         (WebCore::AccessibilityObject::headingLevel const): Deleted.
473         (WebCore::AccessibilityObject::tableLevel const): Deleted.
474         (WebCore::AccessibilityObject::valueDescription const): Deleted.
475         (WebCore::AccessibilityObject::valueForRange const): Deleted.
476         (WebCore::AccessibilityObject::maxValueForRange const): Deleted.
477         (WebCore::AccessibilityObject::minValueForRange const): Deleted.
478         (WebCore::AccessibilityObject::stepValueForRange const): Deleted.
479         (WebCore::AccessibilityObject::selectedRadioButton): Deleted.
480         (WebCore::AccessibilityObject::selectedTabItem): Deleted.
481         (WebCore::AccessibilityObject::layoutCount const): Deleted.
482         (WebCore::AccessibilityObject::estimatedLoadingProgress const): Deleted.
483         (WebCore::AccessibilityObject::supportsARIAOwns const): Deleted.
484         (WebCore::AccessibilityObject::hasPopup const): Deleted.
485         (WebCore::AccessibilityObject::canvasHasFallbackContent const): Deleted.
486         (WebCore::AccessibilityObject::supportsARIADropping const): Deleted.
487         (WebCore::AccessibilityObject::supportsARIADragging const): Deleted.
488         (WebCore::AccessibilityObject::isARIAGrabbed): Deleted.
489         (WebCore::AccessibilityObject::setARIAGrabbed): Deleted.
490         (WebCore::AccessibilityObject::determineARIADropEffects): Deleted.
491         (WebCore::AccessibilityObject::firstChild const): Deleted.
492         (WebCore::AccessibilityObject::lastChild const): Deleted.
493         (WebCore::AccessibilityObject::previousSibling const): Deleted.
494         (WebCore::AccessibilityObject::nextSibling const): Deleted.
495         (WebCore::AccessibilityObject::parentObject const): Deleted.
496         (WebCore::AccessibilityObject::parentObjectIfExists const): Deleted.
497         (WebCore::AccessibilityObject::isDescendantOfBarrenParent const): Deleted.
498         (WebCore::AccessibilityObject::observableObject const): Deleted.
499         (WebCore::AccessibilityObject::linkedUIElements const): Deleted.
500         (WebCore::AccessibilityObject::titleUIElement const): Deleted.
501         (WebCore::AccessibilityObject::exposesTitleUIElement const): Deleted.
502         (WebCore::AccessibilityObject::correspondingLabelForControlElement const): Deleted.
503         (WebCore::AccessibilityObject::correspondingControlForLabelElement const): Deleted.
504         (WebCore::AccessibilityObject::scrollBar): Deleted.
505         (WebCore::AccessibilityObject::ariaRoleAttribute const): Deleted.
506         (WebCore::AccessibilityObject::isPresentationalChildOfAriaRole const): Deleted.
507         (WebCore::AccessibilityObject::ariaRoleHasPresentationalChildren const): Deleted.
508         (WebCore::AccessibilityObject::inheritsPresentationalRole const): Deleted.
509         (WebCore::AccessibilityObject::accessibilityText const): Deleted.
510         (WebCore::AccessibilityObject::setAccessibleName): Deleted.
511         (WebCore::AccessibilityObject::accessibilityDescription const): Deleted.
512         (WebCore::AccessibilityObject::title const): Deleted.
513         (WebCore::AccessibilityObject::helpText const): Deleted.
514         (WebCore::AccessibilityObject::isARIAStaticText const): Deleted.
515         (WebCore::AccessibilityObject::stringValue const): Deleted.
516         (WebCore::AccessibilityObject::textUnderElement const): Deleted.
517         (WebCore::AccessibilityObject::text const): Deleted.
518         (WebCore::AccessibilityObject::textLength const): Deleted.
519         (WebCore::AccessibilityObject::ariaLabeledByAttribute const): Deleted.
520         (WebCore::AccessibilityObject::ariaDescribedByAttribute const): Deleted.
521         (WebCore::AccessibilityObject::expandedTextValue const): Deleted.
522         (WebCore::AccessibilityObject::supportsExpandedTextValue const): Deleted.
523         (WebCore::AccessibilityObject::colorValue const): Deleted.
524         (WebCore::AccessibilityObject::axObjectID const): Deleted.
525         (WebCore::AccessibilityObject::anchorElement const): Deleted.
526         (WebCore::AccessibilityObject::actionElement const): Deleted.
527         (WebCore::AccessibilityObject::boundingBoxRect const): Deleted.
528         (WebCore::AccessibilityObject::pixelSnappedBoundingBoxRect const): Deleted.
529         (WebCore::AccessibilityObject::size const): Deleted.
530         (WebCore::AccessibilityObject::elementPath const): Deleted.
531         (WebCore::AccessibilityObject::supportsPath const): Deleted.
532         (WebCore::AccessibilityObject::selectedTextRange const): Deleted.
533         (WebCore::AccessibilityObject::selectionStart const): Deleted.
534         (WebCore::AccessibilityObject::selectionEnd const): Deleted.
535         (WebCore::AccessibilityObject::url const): Deleted.
536         (WebCore::AccessibilityObject::selection const): Deleted.
537         (WebCore::AccessibilityObject::selectedText const): Deleted.
538         (WebCore::AccessibilityObject::accessKey const): Deleted.
539         (WebCore::AccessibilityObject::widget const): Deleted.
540         (WebCore::AccessibilityObject::widgetForAttachmentView const): Deleted.
541         (WebCore::AccessibilityObject::hierarchicalLevel const): Deleted.
542         (WebCore::AccessibilityObject::setFocused): Deleted.
543         (WebCore::AccessibilityObject::setSelectedText): Deleted.
544         (WebCore::AccessibilityObject::setSelectedTextRange): Deleted.
545         (WebCore::AccessibilityObject::setValue): Deleted.
546         (WebCore::AccessibilityObject::setSelected): Deleted.
547         (WebCore::AccessibilityObject::setSelectedRows): Deleted.
548         (WebCore::AccessibilityObject::makeRangeVisible): Deleted.
549         (WebCore::AccessibilityObject::performDefaultAction): Deleted.
550         (WebCore::AccessibilityObject::increment): Deleted.
551         (WebCore::AccessibilityObject::decrement): Deleted.
552         (WebCore::AccessibilityObject::childrenChanged): Deleted.
553         (WebCore::AccessibilityObject::textChanged): Deleted.
554         (WebCore::AccessibilityObject::updateAccessibilityRole): Deleted.
555         (WebCore::AccessibilityObject::addChildren): Deleted.
556         (WebCore::AccessibilityObject::shouldIgnoreAttributeRole const): Deleted.
557         (WebCore::AccessibilityObject::canHaveChildren const): Deleted.
558         (WebCore::AccessibilityObject::hasChildren const): Deleted.
559         (WebCore::AccessibilityObject::setNeedsToUpdateChildren): Deleted.
560         (WebCore::AccessibilityObject::setNeedsToUpdateSubtree): Deleted.
561         (WebCore::AccessibilityObject::needsToUpdateChildren const): Deleted.
562         (WebCore::AccessibilityObject::detachFromParent): Deleted.
563         (WebCore::AccessibilityObject::isDetachedFromParent): Deleted.
564         (WebCore::AccessibilityObject::canHaveSelectedChildren const): Deleted.
565         (WebCore::AccessibilityObject::selectedChildren): Deleted.
566         (WebCore::AccessibilityObject::visibleChildren): Deleted.
567         (WebCore::AccessibilityObject::tabChildren): Deleted.
568         (WebCore::AccessibilityObject::shouldFocusActiveDescendant const): Deleted.
569         (WebCore::AccessibilityObject::activeDescendant const): Deleted.
570         (WebCore::AccessibilityObject::handleActiveDescendantChanged): Deleted.
571         (WebCore::AccessibilityObject::handleAriaExpandedChanged): Deleted.
572         (WebCore::AccessibilityObject::visiblePositionRange const): Deleted.
573         (WebCore::AccessibilityObject::visiblePositionRangeForLine const): Deleted.
574         (WebCore::AccessibilityObject::boundsForVisiblePositionRange const): Deleted.
575         (WebCore::AccessibilityObject::boundsForRange const): Deleted.
576         (WebCore::AccessibilityObject::setSelectedVisiblePositionRange const): Deleted.
577         (WebCore::AccessibilityObject::visiblePositionForPoint const): Deleted.
578         (WebCore::AccessibilityObject::nextVisiblePosition const): Deleted.
579         (WebCore::AccessibilityObject::previousVisiblePosition const): Deleted.
580         (WebCore::AccessibilityObject::visiblePositionForIndex const): Deleted.
581         (WebCore::AccessibilityObject::indexForVisiblePosition const): Deleted.
582         (WebCore::AccessibilityObject::index const): Deleted.
583         (WebCore::AccessibilityObject::lineBreaks const): Deleted.
584         (WebCore::AccessibilityObject::doAXRangeForLine const): Deleted.
585         (WebCore::AccessibilityObject::doAXRangeForIndex const): Deleted.
586         (WebCore::AccessibilityObject::doAXStringForRange const): Deleted.
587         (WebCore::AccessibilityObject::doAXBoundsForRange const): Deleted.
588         (WebCore::AccessibilityObject::doAXBoundsForRangeUsingCharacterOffset const): Deleted.
589         (WebCore::AccessibilityObject::stringValueForMSAA const): Deleted.
590         (WebCore::AccessibilityObject::stringRoleForMSAA const): Deleted.
591         (WebCore::AccessibilityObject::nameForMSAA const): Deleted.
592         (WebCore::AccessibilityObject::descriptionForMSAA const): Deleted.
593         (WebCore::AccessibilityObject::roleValueForMSAA const): Deleted.
594         (WebCore::AccessibilityObject::passwordFieldValue const): Deleted.
595         (WebCore::AccessibilityObject::liveRegionStatus const): Deleted.
596         (WebCore::AccessibilityObject::liveRegionRelevant const): Deleted.
597         (WebCore::AccessibilityObject::liveRegionAtomic const): Deleted.
598         (WebCore::AccessibilityObject::isBusy const): Deleted.
599         (WebCore::AccessibilityObject::speakAsProperty const): Deleted.
600         (WebCore::AccessibilityObject::isMathElement const): Deleted.
601         (WebCore::AccessibilityObject::isMathFraction const): Deleted.
602         (WebCore::AccessibilityObject::isMathFenced const): Deleted.
603         (WebCore::AccessibilityObject::isMathSubscriptSuperscript const): Deleted.
604         (WebCore::AccessibilityObject::isMathRow const): Deleted.
605         (WebCore::AccessibilityObject::isMathUnderOver const): Deleted.
606         (WebCore::AccessibilityObject::isMathRoot const): Deleted.
607         (WebCore::AccessibilityObject::isMathSquareRoot const): Deleted.
608         (WebCore::AccessibilityObject::isMathText const): Deleted.
609         (WebCore::AccessibilityObject::isMathNumber const): Deleted.
610         (WebCore::AccessibilityObject::isMathOperator const): Deleted.
611         (WebCore::AccessibilityObject::isMathFenceOperator const): Deleted.
612         (WebCore::AccessibilityObject::isMathSeparatorOperator const): Deleted.
613         (WebCore::AccessibilityObject::isMathIdentifier const): Deleted.
614         (WebCore::AccessibilityObject::isMathTable const): Deleted.
615         (WebCore::AccessibilityObject::isMathTableRow const): Deleted.
616         (WebCore::AccessibilityObject::isMathTableCell const): Deleted.
617         (WebCore::AccessibilityObject::isMathMultiscript const): Deleted.
618         (WebCore::AccessibilityObject::isMathToken const): Deleted.
619         (WebCore::AccessibilityObject::isMathScriptObject const): Deleted.
620         (WebCore::AccessibilityObject::isMathMultiscriptObject const): Deleted.
621         (WebCore::AccessibilityObject::mathRadicandObject): Deleted.
622         (WebCore::AccessibilityObject::mathRootIndexObject): Deleted.
623         (WebCore::AccessibilityObject::mathUnderObject): Deleted.
624         (WebCore::AccessibilityObject::mathOverObject): Deleted.
625         (WebCore::AccessibilityObject::mathNumeratorObject): Deleted.
626         (WebCore::AccessibilityObject::mathDenominatorObject): Deleted.
627         (WebCore::AccessibilityObject::mathBaseObject): Deleted.
628         (WebCore::AccessibilityObject::mathSubscriptObject): Deleted.
629         (WebCore::AccessibilityObject::mathSuperscriptObject): Deleted.
630         (WebCore::AccessibilityObject::mathFencedOpenString const): Deleted.
631         (WebCore::AccessibilityObject::mathFencedCloseString const): Deleted.
632         (WebCore::AccessibilityObject::mathLineThickness const): Deleted.
633         (WebCore::AccessibilityObject::isAnonymousMathOperator const): Deleted.
634         (WebCore::AccessibilityObject::mathPrescripts): Deleted.
635         (WebCore::AccessibilityObject::mathPostscripts): Deleted.
636         (WebCore::AccessibilityObject::isHidden const): Deleted.
637         (WebCore::AccessibilityObject::setWrapper): Deleted.
638         (WebCore::AccessibilityObject::overrideAttachmentParent): Deleted.
639         (WebCore::AccessibilityObject::accessibilityIgnoreAttachment const): Deleted.
640         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject const): Deleted.
641         (WebCore::AccessibilityObject::clearIsIgnoredFromParentData): Deleted.
642         (WebCore::AccessibilityObject::setIsIgnoredFromParentData): Deleted.
643         (WebCore::AccessibilityObject::children): Deleted.
644         (WebCore::AccessibilityObject::updateBackingStore): Deleted.
645         * accessibility/AccessibilityObjectInterface.h:
646         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
647         (WebCore::AccessibilitySearchTextCriteria::AccessibilitySearchTextCriteria):
648         (WebCore::AccessibilityTextOperation::AccessibilityTextOperation):
649         (WebCore::AccessibilityTextUnderElementMode::AccessibilityTextUnderElementMode):
650         (WebCore::PlainTextRange::PlainTextRange):
651         (WebCore::PlainTextRange::isNull const):
652         (WebCore::VisiblePositionRange::VisiblePositionRange):
653         (WebCore::VisiblePositionRange::isNull const):
654         (WebCore::AccessibilityIsIgnoredFromParentData::AccessibilityIsIgnoredFromParentData):
655         (WebCore::AccessibilityIsIgnoredFromParentData::isNull const):
656         (WebCore::AccessibilityObjectInterface::isAccessibilityObject const): Deleted.
657         * accessibility/AccessibilityRenderObject.cpp:
658         (WebCore::AccessibilityRenderObject::addRadioButtonGroupChildren const):
659         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
660         (WebCore::AccessibilityRenderObject::accessibilityImageMapHitTest const):
661         (WebCore::AccessibilityRenderObject::remoteSVGElementHitTest const):
662         (WebCore::AccessibilityRenderObject::elementAccessibilityHitTest const):
663         (WebCore::AccessibilityRenderObject::accessibilityHitTest const):
664         (WebCore::AccessibilityRenderObject::addImageMapChildren):
665         (WebCore::AccessibilityRenderObject::addHiddenChildren):
666         (WebCore::AccessibilityRenderObject::selectedChildren):
667         * accessibility/AccessibilityRenderObject.h:
668         * accessibility/AccessibilityScrollView.cpp:
669         (WebCore::AccessibilityScrollView::accessibilityHitTest const):
670         * accessibility/AccessibilityScrollView.h:
671         * accessibility/AccessibilitySlider.cpp:
672         (WebCore::AccessibilitySlider::addChildren):
673         (WebCore::AccessibilitySlider::elementAccessibilityHitTest const):
674         * accessibility/AccessibilitySlider.h:
675         * accessibility/AccessibilitySpinButton.cpp:
676         (WebCore::AccessibilitySpinButton::incrementButton):
677         (WebCore::AccessibilitySpinButton::decrementButton):
678         * accessibility/AccessibilitySpinButton.h:
679         * accessibility/AccessibilityTable.cpp:
680         (WebCore::AccessibilityTable::columnHeaders):
681         (WebCore::AccessibilityTable::rowHeaders):
682         (WebCore::AccessibilityTable::cellForColumnAndRow):
683         * accessibility/AccessibilityTableCell.cpp:
684         (WebCore::AccessibilityTableCell::parentRow const):
685         * accessibility/AccessibilityTableColumn.cpp:
686         (WebCore::AccessibilityTableColumn::headerObject):
687         * accessibility/AccessibilityTableColumn.h:
688         * accessibility/AccessibilityTableRow.cpp:
689         (WebCore::AccessibilityTableRow::headerObject):
690         * accessibility/AccessibilityTableRow.h:
691         * accessibility/atk/AXObjectCacheAtk.cpp:
692         (WebCore::getListObject):
693         (WebCore::notifyChildrenSelectionChange):
694         (WebCore::AXObjectCache::postPlatformNotification):
695         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
696         * accessibility/atk/WebKitAccessible.cpp:
697         (interfaceMaskFromObject):
698         * accessibility/atk/WebKitAccessibleHyperlink.cpp:
699         (rangeLengthForObject):
700         (webkitAccessibleHyperlinkGetStartIndex):
701         (webkitAccessibleHyperlinkGetEndIndex):
702         * accessibility/atk/WebKitAccessibleInterfaceHypertext.cpp:
703         (webkitAccessibleHypertextGetLink):
704         (webkitAccessibleHypertextGetNLinks):
705         * accessibility/atk/WebKitAccessibleInterfaceSelection.cpp:
706         (listObjectForCoreSelection):
707         (optionFromList):
708         (optionFromSelection):
709         (webkitAccessibleSelectionAddSelection):
710         (webkitAccessibleSelectionRefSelection):
711         (webkitAccessibleSelectionIsChildSelected):
712         (webkitAccessibleSelectionRemoveSelection):
713         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
714         (offsetAdjustmentForListItem):
715         (webCoreOffsetToAtkOffset):
716         (webkitAccessibleTextGetCaretOffset):
717         * accessibility/atk/WebKitAccessibleUtil.cpp:
718         (objectFocusedAndCaretOffsetUnignored):
719         * accessibility/atk/WebKitAccessibleUtil.h:
720         * accessibility/ios/AXObjectCacheIOS.mm:
721         (WebCore::AXObjectCache::postPlatformNotification):
722         * accessibility/ios/AccessibilityObjectIOS.mm:
723         (WebCore::AccessibilityObject::overrideAttachmentParent):
724         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
725         (AccessibilityUnignoredAncestor):
726         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
727         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
728         (-[WebAccessibilityObjectWrapper accessibilityContainer]):
729         (-[WebAccessibilityObjectWrapper accessibilityLinkedElement]):
730         * accessibility/isolatedtree/AXIsolatedTreeNode.cpp:
731         (WebCore::AXIsolatedTreeNode::focusedUIElement const):
732         (WebCore::AXIsolatedTreeNode::parentObjectInterfaceUnignored const):
733         (WebCore::AXIsolatedTreeNode::accessibilityHitTest const):
734         * accessibility/isolatedtree/AXIsolatedTreeNode.h:
735         * accessibility/mac/AXObjectCacheMac.mm:
736         (WebCore::AXObjectCache::postPlatformNotification):
737         * accessibility/mac/AccessibilityObjectMac.mm:
738         (WebCore::AccessibilityObject::overrideAttachmentParent):
739         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
740         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
741         (addChildToArray):
742         (-[WebAccessibilityObjectWrapperBase initWithAccessibilityObject:]):
743         (-[WebAccessibilityObjectWrapperBase axBackingObject]):
744         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
745         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
746         (-[WebAccessibilityObjectWrapper accessibilityHitTest:]):
747         * accessibility/win/AXObjectCacheWin.cpp:
748         * editing/atk/FrameSelectionAtk.cpp:
749         (WebCore::emitTextSelectionChange):
750         (WebCore::maybeEmitTextFocusChange):
751         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
752         * inspector/InspectorAuditAccessibilityObject.cpp:
753         (WebCore::accessiblityObjectForNode):
754         (WebCore::InspectorAuditAccessibilityObject::getElementsByComputedRole):
755         (WebCore::InspectorAuditAccessibilityObject::getActiveDescendant):
756         (WebCore::addChildren):
757         (WebCore::InspectorAuditAccessibilityObject::getChildNodes):
758         (WebCore::InspectorAuditAccessibilityObject::getComputedProperties):
759         (WebCore::InspectorAuditAccessibilityObject::getControlledNodes):
760         (WebCore::InspectorAuditAccessibilityObject::getFlowedNodes):
761         (WebCore::InspectorAuditAccessibilityObject::getMouseEventNode):
762         (WebCore::InspectorAuditAccessibilityObject::getOwnedNodes):
763         (WebCore::InspectorAuditAccessibilityObject::getParentNode):
764         (WebCore::InspectorAuditAccessibilityObject::getSelectedChildNodes):
765         * inspector/agents/InspectorDOMAgent.cpp:
766         (WebCore::InspectorDOMAgent::processAccessibilityChildren):
767         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
768         * inspector/agents/InspectorDOMAgent.h:
769
770 2019-10-30  Antti Koivisto  <antti@apple.com>
771
772         Move style building state to a class of its own
773         https://bugs.webkit.org/show_bug.cgi?id=203562
774
775         Reviewed by Zalan Bujtas.
776
777         Move most of the state needed for applying properties from StyleResolver::State and PropertyCascade::ApplyState to
778         new Style::BuilderState. Pass BuilderState around in all functions invoked during style building
779         instead of StyleResolver.
780
781         Unlike StyleResolver, BuilderState is a stack-allocated object that exists during style building only.
782
783         * Sources.txt:
784         * WebCore.xcodeproj/project.pbxproj:
785         * css/CSSToStyleMap.cpp:
786         (WebCore::CSSToStyleMap::CSSToStyleMap):
787         (WebCore::CSSToStyleMap::style const):
788         (WebCore::CSSToStyleMap::useSVGZoomRules const):
789         (WebCore::CSSToStyleMap::styleImage):
790         (WebCore::CSSToStyleMap::mapFillSize):
791         (WebCore::CSSToStyleMap::mapFillXPosition):
792         (WebCore::CSSToStyleMap::mapFillYPosition):
793         (WebCore::CSSToStyleMap::mapAnimationName):
794         (WebCore::CSSToStyleMap::mapNinePieceImageQuad):
795         (WebCore::CSSToStyleMap::rootElementStyle const): Deleted.
796         * css/CSSToStyleMap.h:
797         * css/CSSVariableReferenceValue.cpp:
798         (WebCore::resolveVariableFallback):
799         (WebCore::resolveVariableReference):
800         (WebCore::resolveTokenRange):
801         (WebCore::CSSVariableReferenceValue::resolveVariableReferences const):
802         * css/CSSVariableReferenceValue.h:
803         * css/DOMCSSRegisterCustomProperty.cpp:
804         (WebCore::DOMCSSRegisterCustomProperty::registerProperty):
805         * css/StyleBuilder.h:
806         * css/StyleBuilderConverter.h:
807         (WebCore::StyleBuilderConverter::convertLength):
808         (WebCore::StyleBuilderConverter::convertLengthOrAuto):
809         (WebCore::StyleBuilderConverter::convertLengthSizing):
810         (WebCore::StyleBuilderConverter::convertLengthMaxSizing):
811         (WebCore::StyleBuilderConverter::convertTabSize):
812         (WebCore::StyleBuilderConverter::convertComputedLength):
813         (WebCore::StyleBuilderConverter::convertLineWidth):
814         (WebCore::StyleBuilderConverter::convertSpacing):
815         (WebCore::StyleBuilderConverter::convertRadius):
816         (WebCore::StyleBuilderConverter::convertPositionComponentX):
817         (WebCore::StyleBuilderConverter::convertPositionComponentY):
818         (WebCore::StyleBuilderConverter::convertPositionComponent):
819         (WebCore::StyleBuilderConverter::convertObjectPosition):
820         (WebCore::StyleBuilderConverter::convertTextDecoration):
821         (WebCore::StyleBuilderConverter::convertNumber):
822         (WebCore::StyleBuilderConverter::convertNumberOrAuto):
823         (WebCore::StyleBuilderConverter::convertWebkitHyphenateLimitLines):
824         (WebCore::StyleBuilderConverter::convertBorderImage):
825         (WebCore::StyleBuilderConverter::convertBorderMask):
826         (WebCore::StyleBuilderConverter::convertStyleImage):
827         (WebCore::StyleBuilderConverter::convertTransform):
828         (WebCore::StyleBuilderConverter::convertColorScheme):
829         (WebCore::StyleBuilderConverter::convertString):
830         (WebCore::StyleBuilderConverter::convertStringOrAuto):
831         (WebCore::StyleBuilderConverter::convertStringOrNone):
832         (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
833         (WebCore::StyleBuilderConverter::convertTextAlign):
834         (WebCore::StyleBuilderConverter::convertClipPath):
835         (WebCore::StyleBuilderConverter::convertResize):
836         (WebCore::StyleBuilderConverter::convertMarqueeRepetition):
837         (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
838         (WebCore::StyleBuilderConverter::convertQuotes):
839         (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
840         (WebCore::StyleBuilderConverter::convertTextUnderlineOffset):
841         (WebCore::StyleBuilderConverter::convertTextDecorationThickness):
842         (WebCore::StyleBuilderConverter::convertReflection):
843         (WebCore::StyleBuilderConverter::convertInitialLetter):
844         (WebCore::StyleBuilderConverter::convertTextStrokeWidth):
845         (WebCore::StyleBuilderConverter::convertLineBoxContain):
846         (WebCore::StyleBuilderConverter::convertTextDecorationSkip):
847         (WebCore::StyleBuilderConverter::convertShapeValue):
848         (WebCore::StyleBuilderConverter::convertScrollSnapType):
849         (WebCore::StyleBuilderConverter::convertScrollSnapAlign):
850         (WebCore::StyleBuilderConverter::createGridTrackBreadth):
851         (WebCore::StyleBuilderConverter::createGridTrackSize):
852         (WebCore::StyleBuilderConverter::createGridTrackList):
853         (WebCore::StyleBuilderConverter::convertGridTrackSizeList):
854         (WebCore::StyleBuilderConverter::convertGridTrackSize):
855         (WebCore::StyleBuilderConverter::convertGridPosition):
856         (WebCore::StyleBuilderConverter::convertGridAutoFlow):
857         (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
858         (WebCore::StyleBuilderConverter::convertWordSpacing):
859         (WebCore::StyleBuilderConverter::convertPerspective):
860         (WebCore::StyleBuilderConverter::convertMarqueeIncrement):
861         (WebCore::StyleBuilderConverter::convertFilterOperations):
862         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
863         (WebCore::StyleBuilderConverter::convertFontWeight):
864         (WebCore::StyleBuilderConverter::convertFontStretch):
865         (WebCore::StyleBuilderConverter::convertFontVariationSettings):
866         (WebCore::StyleBuilderConverter::convertTouchCallout):
867         (WebCore::StyleBuilderConverter::convertTapHighlightColor):
868         (WebCore::StyleBuilderConverter::convertTouchAction):
869         (WebCore::StyleBuilderConverter::convertOverflowScrolling):
870         (WebCore::StyleBuilderConverter::convertSVGLengthValue):
871         (WebCore::StyleBuilderConverter::convertSVGLengthVector):
872         (WebCore::StyleBuilderConverter::convertStrokeDashArray):
873         (WebCore::StyleBuilderConverter::convertPaintOrder):
874         (WebCore::StyleBuilderConverter::convertOpacity):
875         (WebCore::StyleBuilderConverter::convertSVGURIReference):
876         (WebCore::StyleBuilderConverter::convertSVGColor):
877         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData):
878         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
879         (WebCore::StyleBuilderConverter::convertGlyphOrientation):
880         (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
881         (WebCore::StyleBuilderConverter::convertLineHeight):
882         (WebCore::StyleBuilderConverter::convertFontSynthesis):
883         (WebCore::StyleBuilderConverter::convertSpeakAs):
884         (WebCore::StyleBuilderConverter::convertHangingPunctuation):
885         (WebCore::StyleBuilderConverter::convertGapLength):
886         * css/StyleBuilderCustom.h:
887         (WebCore::StyleBuilderCustom::applyInitialWebkitMaskImage):
888         (WebCore::StyleBuilderCustom::applyInheritWebkitMaskImage):
889         (WebCore::StyleBuilderCustom::applyInitialFontFeatureSettings):
890         (WebCore::StyleBuilderCustom::applyInheritFontFeatureSettings):
891         (WebCore::StyleBuilderCustom::applyInitialFontVariationSettings):
892         (WebCore::StyleBuilderCustom::applyInheritFontVariationSettings):
893         (WebCore::StyleBuilderCustom::applyValueDirection):
894         (WebCore::StyleBuilderCustom::applyInitialTextAlign):
895         (WebCore::StyleBuilderCustom::applyValueTextAlign):
896         (WebCore::StyleBuilderCustom::resetEffectiveZoom):
897         (WebCore::StyleBuilderCustom::applyInitialZoom):
898         (WebCore::StyleBuilderCustom::applyInheritZoom):
899         (WebCore::StyleBuilderCustom::applyValueZoom):
900         (WebCore::StyleBuilderCustom::applyValueVerticalAlign):
901         (WebCore::StyleBuilderCustom::applyInheritImageResolution):
902         (WebCore::StyleBuilderCustom::applyInitialImageResolution):
903         (WebCore::StyleBuilderCustom::applyValueImageResolution):
904         (WebCore::StyleBuilderCustom::applyInheritSize):
905         (WebCore::StyleBuilderCustom::applyInitialSize):
906         (WebCore::StyleBuilderCustom::applyValueSize):
907         (WebCore::StyleBuilderCustom::applyInheritTextIndent):
908         (WebCore::StyleBuilderCustom::applyInitialTextIndent):
909         (WebCore::StyleBuilderCustom::applyValueTextIndent):
910         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue):
911         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue):
912         (WebCore::ApplyPropertyBorderImageModifier::applyValue):
913         (WebCore::ApplyPropertyBorderImageModifier::getValue):
914         (WebCore::ApplyPropertyBorderImageModifier::setValue):
915         (WebCore::StyleBuilderCustom::applyInheritLineHeight):
916         (WebCore::StyleBuilderCustom::applyInitialLineHeight):
917         (WebCore::StyleBuilderCustom::applyValueLineHeight):
918         (WebCore::StyleBuilderCustom::applyInheritOutlineStyle):
919         (WebCore::StyleBuilderCustom::applyInitialOutlineStyle):
920         (WebCore::StyleBuilderCustom::applyValueOutlineStyle):
921         (WebCore::StyleBuilderCustom::applyInitialClip):
922         (WebCore::StyleBuilderCustom::applyInheritClip):
923         (WebCore::StyleBuilderCustom::applyValueClip):
924         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
925         (WebCore::StyleBuilderCustom::applyValueWritingMode):
926         (WebCore::StyleBuilderCustom::applyValueWebkitTextOrientation):
927         (WebCore::StyleBuilderCustom::applyValueWebkitTextSizeAdjust):
928         (WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
929         (WebCore::StyleBuilderCustom::applyValueColorScheme):
930         (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue):
931         (WebCore::StyleBuilderCustom::applyInitialTextShadow):
932         (WebCore::StyleBuilderCustom::applyInheritTextShadow):
933         (WebCore::StyleBuilderCustom::applyValueTextShadow):
934         (WebCore::StyleBuilderCustom::applyInitialBoxShadow):
935         (WebCore::StyleBuilderCustom::applyInheritBoxShadow):
936         (WebCore::StyleBuilderCustom::applyValueBoxShadow):
937         (WebCore::StyleBuilderCustom::applyInitialWebkitBoxShadow):
938         (WebCore::StyleBuilderCustom::applyInheritWebkitBoxShadow):
939         (WebCore::StyleBuilderCustom::applyValueWebkitBoxShadow):
940         (WebCore::StyleBuilderCustom::applyInitialFontFamily):
941         (WebCore::StyleBuilderCustom::applyInheritFontFamily):
942         (WebCore::StyleBuilderCustom::applyValueFontFamily):
943         (WebCore::StyleBuilderCustom::isValidDisplayValue):
944         (WebCore::StyleBuilderCustom::applyInheritDisplay):
945         (WebCore::StyleBuilderCustom::applyValueDisplay):
946         (WebCore::StyleBuilderCustom::applyValueBaselineShift):
947         (WebCore::StyleBuilderCustom::applyInitialWebkitAspectRatio):
948         (WebCore::StyleBuilderCustom::applyInheritWebkitAspectRatio):
949         (WebCore::StyleBuilderCustom::applyValueWebkitAspectRatio):
950         (WebCore::StyleBuilderCustom::applyInitialWebkitTextEmphasisStyle):
951         (WebCore::StyleBuilderCustom::applyInheritWebkitTextEmphasisStyle):
952         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
953         (WebCore::StyleBuilderCustom::applyInheritCounter):
954         (WebCore::StyleBuilderCustom::applyValueCounter):
955         (WebCore::StyleBuilderCustom::applyInitialCounterIncrement):
956         (WebCore::StyleBuilderCustom::applyInheritCounterIncrement):
957         (WebCore::StyleBuilderCustom::applyValueCounterIncrement):
958         (WebCore::StyleBuilderCustom::applyInitialCounterReset):
959         (WebCore::StyleBuilderCustom::applyInheritCounterReset):
960         (WebCore::StyleBuilderCustom::applyValueCounterReset):
961         (WebCore::StyleBuilderCustom::applyInitialCursor):
962         (WebCore::StyleBuilderCustom::applyInheritCursor):
963         (WebCore::StyleBuilderCustom::applyValueCursor):
964         (WebCore::StyleBuilderCustom::applyInitialFill):
965         (WebCore::StyleBuilderCustom::applyInheritFill):
966         (WebCore::StyleBuilderCustom::applyValueFill):
967         (WebCore::StyleBuilderCustom::applyInitialStroke):
968         (WebCore::StyleBuilderCustom::applyInheritStroke):
969         (WebCore::StyleBuilderCustom::applyValueStroke):
970         (WebCore::StyleBuilderCustom::applyInitialContent):
971         (WebCore::StyleBuilderCustom::applyInheritContent):
972         (WebCore::StyleBuilderCustom::applyValueContent):
973         (WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
974         (WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
975         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
976         (WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
977         (WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
978         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
979         (WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
980         (WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
981         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
982         (WebCore::StyleBuilderCustom::applyInitialFontSize):
983         (WebCore::StyleBuilderCustom::applyInheritFontSize):
984         (WebCore::StyleBuilderCustom::determineRubyTextSizeMultiplier):
985         (WebCore::StyleBuilderCustom::applyInitialFontStyle):
986         (WebCore::StyleBuilderCustom::applyInheritFontStyle):
987         (WebCore::StyleBuilderCustom::applyValueFontStyle):
988         (WebCore::StyleBuilderCustom::applyValueFontSize):
989         (WebCore::StyleBuilderCustom::applyInitialGridTemplateAreas):
990         (WebCore::StyleBuilderCustom::applyInheritGridTemplateAreas):
991         (WebCore::StyleBuilderCustom::applyValueGridTemplateAreas):
992         (WebCore::StyleBuilderCustom::applyInitialGridTemplateColumns):
993         (WebCore::StyleBuilderCustom::applyInheritGridTemplateColumns):
994         (WebCore::StyleBuilderCustom::applyValueGridTemplateColumns):
995         (WebCore::StyleBuilderCustom::applyInitialGridTemplateRows):
996         (WebCore::StyleBuilderCustom::applyInheritGridTemplateRows):
997         (WebCore::StyleBuilderCustom::applyValueGridTemplateRows):
998         (WebCore::StyleBuilderCustom::applyValueAlt):
999         (WebCore::StyleBuilderCustom::applyValueWillChange):
1000         (WebCore::StyleBuilderCustom::applyValueStrokeWidth):
1001         (WebCore::StyleBuilderCustom::applyValueStrokeColor):
1002         (WebCore::StyleBuilderCustom::applyInitialCustomProperty):
1003         (WebCore::StyleBuilderCustom::applyInheritCustomProperty):
1004         (WebCore::StyleBuilderCustom::applyValueCustomProperty):
1005         * css/StyleResolver.cpp:
1006         (WebCore::StyleResolver::StyleResolver):
1007         (WebCore::StyleResolver::State::State):
1008         (WebCore::StyleResolver::styleForKeyframe):
1009         (WebCore::StyleResolver::styleForPage):
1010         (WebCore::StyleResolver::updateFont):
1011         (WebCore::StyleResolver::applyMatchedProperties):
1012         (WebCore::StyleResolver::applyPropertyToCurrentStyle):
1013         (WebCore::StyleResolver::initializeFontStyle):
1014         * css/StyleResolver.h:
1015         (WebCore::StyleResolver::inspectorCSSOMWrappers):
1016         (WebCore::StyleResolver::State::setApplyPropertyToRegularStyle): Deleted.
1017         (WebCore::StyleResolver::State::setApplyPropertyToVisitedLinkStyle): Deleted.
1018         (WebCore::StyleResolver::State::applyPropertyToRegularStyle const): Deleted.
1019         (WebCore::StyleResolver::State::applyPropertyToVisitedLinkStyle const): Deleted.
1020         (WebCore::StyleResolver::State::setFontDirty): Deleted.
1021         (WebCore::StyleResolver::State::fontDirty const): Deleted.
1022         (WebCore::StyleResolver::State::fontDescription): Deleted.
1023         (WebCore::StyleResolver::State::parentFontDescription): Deleted.
1024         (WebCore::StyleResolver::State::setFontDescription): Deleted.
1025         (WebCore::StyleResolver::State::setZoom): Deleted.
1026         (WebCore::StyleResolver::State::setEffectiveZoom): Deleted.
1027         (WebCore::StyleResolver::State::setWritingMode): Deleted.
1028         (WebCore::StyleResolver::State::setTextOrientation): Deleted.
1029         (WebCore::StyleResolver::State::cascadeLevel const): Deleted.
1030         (WebCore::StyleResolver::State::setCascadeLevel): Deleted.
1031         (WebCore::StyleResolver::State::styleScopeOrdinal const): Deleted.
1032         (WebCore::StyleResolver::State::setStyleScopeOrdinal): Deleted.
1033         (WebCore::StyleResolver::applyPropertyToRegularStyle const): Deleted.
1034         (WebCore::StyleResolver::applyPropertyToVisitedLinkStyle const): Deleted.
1035         (WebCore::StyleResolver::styleMap): Deleted.
1036         (WebCore::StyleResolver::fontDescription): Deleted.
1037         (WebCore::StyleResolver::parentFontDescription): Deleted.
1038         (WebCore::StyleResolver::setFontDescription): Deleted.
1039         (WebCore::StyleResolver::setZoom): Deleted.
1040         (WebCore::StyleResolver::setEffectiveZoom): Deleted.
1041         (WebCore::StyleResolver::setWritingMode): Deleted.
1042         (WebCore::StyleResolver::setTextOrientation): Deleted.
1043         * css/makeprop.pl:
1044         (getAutoGetter):
1045         (getAutoSetter):
1046         (getVisitedLinkSetter):
1047         (colorFromPrimitiveValue):
1048         (generateColorValueSetter):
1049         (handleCurrentColorValue):
1050         (generateAnimationPropertyInitialValueSetter):
1051         (generateAnimationPropertyInheritValueSetter):
1052         (generateAnimationPropertyValueSetter):
1053         (generateFillLayerPropertyInitialValueSetter):
1054         (generateFillLayerPropertyInheritValueSetter):
1055         (generateFillLayerPropertyValueSetter):
1056         (generateSetValueStatement):
1057         (generateInitialValueSetter):
1058         (generateInheritValueSetter):
1059         (generateValueSetter):
1060         * css/parser/CSSParser.cpp:
1061         (WebCore::CSSParser::parseValueWithVariableReferences):
1062         * css/parser/CSSParser.h:
1063         * css/parser/CSSPropertyParser.cpp:
1064         (WebCore::CSSPropertyParser::parseTypedCustomPropertyValue):
1065         * css/parser/CSSPropertyParser.h:
1066         * html/canvas/CanvasRenderingContext2D.cpp:
1067         (WebCore::CanvasRenderingContext2D::setFont):
1068         * platform/graphics/GraphicsContext.cpp:
1069         (WebCore::GraphicsContext::builderState):
1070         (WebCore::GraphicsContext::applyState): Deleted.
1071         * platform/graphics/GraphicsContext.h:
1072         * platform/graphics/displaylists/DisplayListItems.h:
1073         * style/CascadeLevel.h: Copied from Source/WebCore/css/StyleBuilder.h.
1074         (WebCore::Style::allCascadeLevels):
1075         * style/PropertyCascade.cpp:
1076         (WebCore::Style::PropertyCascade::PropertyCascade):
1077         (WebCore::Style::PropertyCascade::applyPropertiesImpl):
1078         (WebCore::Style::PropertyCascade::applyCustomProperty):
1079         (WebCore::Style::PropertyCascade::applyProperty):
1080         (WebCore::Style::PropertyCascade::resolveValue):
1081         (WebCore::Style::PropertyCascade::resolvedVariableValue):
1082         (WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode):
1083         * style/PropertyCascade.h:
1084         (WebCore::Style::PropertyCascade::builderState):
1085         (WebCore::Style::allCascadeLevels): Deleted.
1086         (WebCore::Style::PropertyCascade::styleResolver): Deleted.
1087         * style/StyleBuilderState.cpp: Added.
1088         (WebCore::Style::BuilderState::BuilderState):
1089         (WebCore::Style::BuilderState::useSVGZoomRules const):
1090         (WebCore::Style::BuilderState::useSVGZoomRulesForLength const):
1091         (WebCore::Style::BuilderState::createStyleImage):
1092         (WebCore::Style::BuilderState::createFilterOperations):
1093         (WebCore::Style::BuilderState::colorFromPrimitiveValue const):
1094         (WebCore::Style::BuilderState::setFontSize):
1095         * style/StyleBuilderState.h: Added.
1096         (WebCore::Style::BuilderState::cascade):
1097         (WebCore::Style::BuilderState::styleResolver):
1098         (WebCore::Style::BuilderState::style):
1099         (WebCore::Style::BuilderState::parentStyle const):
1100         (WebCore::Style::BuilderState::rootElementStyle const):
1101         (WebCore::Style::BuilderState::document const):
1102         (WebCore::Style::BuilderState::element const):
1103         (WebCore::Style::BuilderState::setFontDescription):
1104         (WebCore::Style::BuilderState::setZoom):
1105         (WebCore::Style::BuilderState::setEffectiveZoom):
1106         (WebCore::Style::BuilderState::setWritingMode):
1107         (WebCore::Style::BuilderState::setTextOrientation):
1108         (WebCore::Style::BuilderState::fontDirty const):
1109         (WebCore::Style::BuilderState::setFontDirty):
1110         (WebCore::Style::BuilderState::clearFontDirty):
1111         (WebCore::Style::BuilderState::fontDescription):
1112         (WebCore::Style::BuilderState::parentFontDescription):
1113         (WebCore::Style::BuilderState::applyPropertyToRegularStyle const):
1114         (WebCore::Style::BuilderState::applyPropertyToVisitedLinkStyle const):
1115         (WebCore::Style::BuilderState::styleScopeOrdinal const):
1116         (WebCore::Style::BuilderState::cssToLengthConversionData const):
1117         (WebCore::Style::BuilderState::styleMap):
1118
1119 2019-10-30  Ryosuke Niwa  <rniwa@webkit.org>
1120
1121         Introduce WorkerEventLoop and use it in FetchBodyOwner::runNetworkTaskWhenPossible
1122         https://bugs.webkit.org/show_bug.cgi?id=203526
1123
1124         Reviewed by Chris Dumez.
1125
1126         Added WorkerEventLoop to implement the worker event loop:
1127         https://html.spec.whatwg.org/multipage/webappapis.html#worker-event-loop-2
1128
1129         Each ScriptExecutionContext now returns an AbstractEventLoop so the code that may run in either
1130         main thread or a worker thread can simply get the event loop object via ScriptExecutionContext.
1131
1132         For now, WorkerEventLoop also implements the worklet event loop:
1133         https://html.spec.whatwg.org/multipage/webappapis.html#worklet-event-loop
1134
1135         WorkerEventLoop is an active DOM object since it's used by at most one ScriptExecutionContext
1136         unlike WindowEventLoop, which can be shared by multiple documents and needs a custom logic to
1137         suspend and resume a subset of tasks enqueued to the event loop.
1138
1139         No new tests since there should be no behavioral change for now.
1140
1141         * Modules/fetch/FetchBodyOwner.cpp:
1142         (WebCore::FetchBodyOwner::runNetworkTaskWhenPossible): Use WorkerEventLoop.
1143         * Sources.txt:
1144         * WebCore.xcodeproj/project.pbxproj:
1145         * dom/AbstractEventLoop.h:
1146         (WebCore::AbstractEventLoop::suspend): Removed since it's not needed for WorkerEventLoop.
1147         (WebCore::AbstractEventLoop::resume): Ditto.
1148         * dom/Document.cpp:
1149         (WebCore::Document::eventLoop): Returns AbstractEventLoop as it now overrides the abstract
1150         member function defined in AbstractEventLoop.
1151         * dom/Document.h:
1152         * dom/ScriptExecutionContext.h:
1153         * dom/WindowEventLoop.cpp:
1154         (WebCore::WindowEventLoop::suspend):
1155         (WebCore::WindowEventLoop::resume):
1156         * dom/WindowEventLoop.h:
1157         * workers/WorkerEventLoop.cpp: Added.
1158         (WebCore::WorkerEventLoop::create): Added.
1159         (WebCore::WorkerEventLoop::WorkerEventLoop): Added.
1160         (WebCore::WorkerEventLoop::queueTask): Added.
1161         (WebCore::WorkerEventLoop::hasPendingActivity const): Added.
1162         (WebCore::WorkerEventLoop::activeDOMObjectName const): Added.
1163         (WebCore::WorkerEventLoop::suspend): Added.
1164         (WebCore::WorkerEventLoop::resume): Added. Unlike WindowEventLoop, we only need to check
1165         whether m_tasks is empty or not since WorkerEventLoop is associated with at most one
1166         ScriptExecutionContext as noted above.
1167         (WebCore::WorkerEventLoop::stop): Added. Clear m_tasks to free memory as early as possible.
1168         (WebCore::WorkerEventLoop::scheduleToRunIfNeeded): Added.
1169         (WebCore::WorkerEventLoop::run): Added.
1170         * workers/WorkerEventLoop.h: Added.
1171         * workers/WorkerGlobalScope.cpp:
1172         (WebCore::WorkerGlobalScope::eventLoop): Added.
1173         * workers/WorkerGlobalScope.h:
1174         * worklets/WorkletGlobalScope.cpp:
1175         (WebCore::WorkletGlobalScope::eventLoop): Added. It returns WorkerEventLoop for now since
1176         there is no implementation difference.
1177         * worklets/WorkletGlobalScope.h:
1178
1179 2019-10-30  Antoine Quint  <graouts@apple.com>
1180
1181         [ Mac Debug ] (r251706) webanimations/empty-keyframes-crash.html is crashing
1182         https://bugs.webkit.org/show_bug.cgi?id=203588
1183
1184         Reviewed by Dean Jackson.
1185
1186         The KeyframeEffect for which the blending keyframes were generated for a CSS Transition could be applied to a different animation,
1187         which is not a CSSTransition, which does not change the fact that we can blend the single CSS property with two fully-qualified
1188         keyframes directly. So we can remove that assertion and simply check that we have a single CSS property instead and access the
1189         single CSS property in the KeyframeList.
1190
1191         * animation/KeyframeEffect.cpp:
1192         (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
1193
1194 2019-10-30  Chris Dumez  <cdumez@apple.com>
1195
1196         WKFrameIsDisplayingMarkupDocument() should return true after a window.open/document.write
1197         https://bugs.webkit.org/show_bug.cgi?id=203587
1198         <rdar://problem/56717726>
1199
1200         Reviewed by Alex Christensen.
1201
1202         When doing a document.open(), we were propagating the document's URL to the UIProcess but not its
1203         MIME type. WKFrameIsDisplayingMarkupDocument() was relying on this MIME type.
1204
1205         * loader/FrameLoader.cpp:
1206         (WebCore::FrameLoader::didExplicitOpen):
1207         * loader/FrameLoaderClient.h:
1208
1209 2019-10-30  Antoine Quint  <graouts@apple.com>
1210
1211         [Web Animations] Precompute an animation effect's active duration and end time
1212         https://bugs.webkit.org/show_bug.cgi?id=203611
1213
1214         Reviewed by Dean Jackson.
1215
1216         We would compute an animation effect's active duration and end time in AnimationEffect::getBasicTiming()
1217         but these two properties could be computed ahead of time when the other static timing properties of an
1218         animation effect are changed. This allows several calls sites to WebAnimation::effectEndTime() to no
1219         longer require the dynamic computation of all the other timing properties in AnimationEffect::getBasicTiming(),
1220         (local time, active time and phase) which need to be computed dynamically as they rely on the current
1221         timeline time.
1222
1223         * animation/AnimationEffect.cpp:
1224         (WebCore::AnimationEffect::getBasicTiming const):
1225         (WebCore::AnimationEffect::getComputedTiming const):
1226         (WebCore::AnimationEffect::updateTiming):
1227         (WebCore::AnimationEffect::updateStaticTimingProperties):
1228         * animation/AnimationEffect.h:
1229         (WebCore::AnimationEffect::activeDuration const):
1230         (WebCore::AnimationEffect::endTime const):
1231         * animation/CSSAnimation.cpp:
1232         (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
1233         * animation/CSSTransition.cpp:
1234         (WebCore::CSSTransition::setTimingProperties):
1235         * animation/KeyframeEffect.cpp:
1236         (WebCore::KeyframeEffect::copyPropertiesFromSource):
1237         * animation/WebAnimation.cpp:
1238         (WebCore::WebAnimation::effectEndTime const):
1239         (WebCore::WebAnimation::timeToNextTick const):
1240
1241 2019-10-30  Antti Koivisto  <antti@apple.com>
1242
1243         ::before/::after elements not filling their grid cell when container has display: contents
1244         https://bugs.webkit.org/show_bug.cgi?id=193567
1245
1246         Reviewed by Simon Fraser.
1247
1248         Test: fast/css/display-contents-before-after-grid.html
1249
1250         We were not providing parent box style when resolving :before/:after pseudo elements. Because of this we
1251         failed to blockify the pseudo elements when their host element had 'display:contents' and the parent
1252         box was a grid.
1253
1254         Original test case by Michał Gołębiowski-Owczarek.
1255
1256         * css/StyleResolver.cpp:
1257         (WebCore::StyleResolver::pseudoStyleForElement):
1258
1259         Pass the parent box style.
1260
1261         * css/StyleResolver.h:
1262         * style/StyleTreeResolver.cpp:
1263         (WebCore::Style::TreeResolver::resolvePseudoStyle):
1264         (WebCore::Style::TreeResolver::parentBoxStyle const):
1265         (WebCore::Style::TreeResolver::parentBoxStyleForPseudo const):
1266
1267         If the element has 'display:contents', look for style of its ancestors.
1268
1269         * style/StyleTreeResolver.h:
1270
1271 2019-10-30  Dirk Schulze  <krit@webkit.org>
1272
1273         [css-masking] Unprefix -webkit-clip-path
1274         https://bugs.webkit.org/show_bug.cgi?id=187888
1275
1276         Reviewed by Simon Fraser.
1277
1278         Unprefix -webkit-clip-path. Make clip-path alias the prefixed version.
1279
1280         We already have a wide variaty of pre-/unprexied clip-path tests.
1281
1282         * css/CSSComputedStyleDeclaration.cpp:
1283         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
1284         * css/CSSProperties.json:
1285         * css/SVGCSSComputedStyleDeclaration.cpp:
1286         (WebCore::ComputedStyleExtractor::svgPropertyValue):
1287         * css/parser/CSSPropertyParser.cpp:
1288         (WebCore::CSSPropertyParser::parseSingleValue):
1289         * page/animation/CSSPropertyAnimation.cpp:
1290         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1291         * rendering/style/SVGRenderStyle.h:
1292         (WebCore::SVGRenderStyle::initialShadow):
1293         (WebCore::SVGRenderStyle::y const):
1294         (WebCore::SVGRenderStyle::initialClipperResource): Deleted.
1295         (WebCore::SVGRenderStyle::clipperResource const): Deleted.
1296         (WebCore::SVGRenderStyle::hasClipper const): Deleted.
1297         (WebCore::SVGRenderStyle::setClipperResource): Deleted.
1298         * rendering/style/SVGRenderStyleDefs.cpp:
1299         (WebCore::StyleResourceData::StyleResourceData):
1300         (WebCore::StyleResourceData::operator== const):
1301         * rendering/style/SVGRenderStyleDefs.h:
1302         * rendering/style/WillChangeData.cpp:
1303         (WebCore::WillChangeData::propertyCreatesStackingContext):
1304         * rendering/svg/RenderSVGResourceClipper.cpp:
1305         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
1306         * rendering/svg/SVGRenderTreeAsText.cpp:
1307         (WebCore::writeResources):
1308         * rendering/svg/SVGResources.cpp:
1309         (WebCore::SVGResources::buildCachedResources):
1310
1311 2019-10-30  Philippe Normand  <philn@igalia.com>
1312
1313         REGRESSION(r249428): [GStreamer] VP9 video rendered green
1314         https://bugs.webkit.org/show_bug.cgi?id=201422
1315         <rdar://problem/55945741>
1316
1317         Reviewed by Carlos Garcia Campos.
1318
1319         Enable the texture upload GStreamer meta code path. Until
1320         GStreamer 1.16.2 this workaround is needed to fix VP9 (vp9dec)
1321         rendering.
1322
1323         Original patch by: Chris Lord <clord@igalia.com>
1324
1325         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1326         (WebCore::MediaPlayerPrivateGStreamerBase::createVideoSinkGL):
1327
1328 2019-10-30  Carlos Garcia Campos  <cgarcia@igalia.com>
1329
1330         ImageDecoders: use a thread safe data buffer for Cairo backing store
1331         https://bugs.webkit.org/show_bug.cgi?id=201727
1332         <rdar://problem/56665041>
1333
1334         Reviewed by Fujii Hironori.
1335
1336         Use SharedBuffer::dataSegment which is ThreadSafeRefCounted.
1337
1338         * platform/graphics/ImageBackingStore.h:
1339         (WebCore::ImageBackingStore::setSize):
1340         (WebCore::ImageBackingStore::ImageBackingStore):
1341         * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
1342         (WebCore::ImageBackingStore::image const):
1343
1344 2019-10-29  Ryosuke Niwa  <rniwa@webkit.org>
1345
1346         Remove HTMLMediaElementDestructorScope
1347         https://bugs.webkit.org/show_bug.cgi?id=203600
1348
1349         Reviewed by Chris Dumez.
1350
1351         Removed the workaround introduced in r231392 for the bug 185284 now that it's been fixed.
1352
1353         No new tests since this code should be dead code.
1354
1355         * html/HTMLMediaElement.cpp:
1356         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1357         (WebCore::HTMLMediaElement::isRunningDestructor): Deleted.
1358         (WebCore::HTMLMediaElementDestructorScope::HTMLMediaElementDestructorScope): Deleted.
1359         (WebCore::HTMLMediaElementDestructorScope::~HTMLMediaElementDestructorScope): Deleted.
1360         * html/HTMLMediaElement.h:
1361         * loader/FrameLoader.cpp:
1362         (WebCore::FrameLoader::checkCompleted):
1363
1364 2019-10-29  Andy Estes  <aestes@apple.com>
1365
1366         [Quick Look] Clean up LegacyPreviewLoaderClients
1367         https://bugs.webkit.org/show_bug.cgi?id=203472
1368
1369         Reviewed by Brady Eidson.
1370
1371         * loader/ios/LegacyPreviewLoader.mm:
1372         (WebCore::LegacyPreviewLoader::didReceiveBuffer):
1373         * platform/network/ios/LegacyPreviewLoaderClient.h:
1374         (WebCore::LegacyPreviewLoaderClient::didReceiveBuffer):
1375         (WebCore::LegacyPreviewLoaderClient::didReceiveDataArray): Deleted.
1376
1377 2019-10-29  Said Abou-Hallawa  <sabouhallawa@apple.com>
1378
1379         [SVG2] SVGSymbolElement should inherits SVGGraphicsElement
1380         https://bugs.webkit.org/show_bug.cgi?id=203573
1381
1382         Reviewed by Simon Fraser.
1383
1384         The spec link is:
1385             https://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSymbolElement
1386
1387         * svg/SVGSymbolElement.cpp:
1388         (WebCore::SVGSymbolElement::SVGSymbolElement):
1389         (WebCore::SVGSymbolElement::parseAttribute):
1390         * svg/SVGSymbolElement.h:
1391         * svg/SVGSymbolElement.idl:
1392
1393 2019-10-29  Jiewen Tan  <jiewen_tan@apple.com>
1394
1395         [WebAuthn] Add more information to _WKWebAuthenticationPanel
1396         https://bugs.webkit.org/show_bug.cgi?id=202561
1397         <rdar://problem/55973910>
1398
1399         Reviewed by Youenn Fablet and Brent Fulgham.
1400
1401         Covered by new tests within existing test files.
1402
1403         * Modules/webauthn/AuthenticatorCoordinator.cpp:
1404         * Modules/webauthn/WebAuthenticationConstants.h:
1405
1406 2019-10-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1407
1408         REGRESSION (r251693): [iOS] Unable to change selection after focusing an element with keyboard attached
1409         https://bugs.webkit.org/show_bug.cgi?id=203582
1410
1411         Reviewed by Tim Horton.
1412
1413         Introduces a new helper method to check whether two ElementContexts refer to the same element. Importantly, this
1414         ignores any information on ElementContext that is not either the element, document, or page identifier (for now,
1415         this only includes the element's bounding rect, which may change over time).
1416
1417         Test: editing/selection/ios/set-selection-by-tapping-after-changing-focused-element-bounds.html
1418
1419         * dom/ElementContext.h:
1420         (WebCore::ElementContext::isSameElement const):
1421         (WebCore::operator==):
1422
1423 2019-10-29  Chris Dumez  <cdumez@apple.com>
1424
1425         UserMediaRequest should not prevent entering the back/forward cache
1426         https://bugs.webkit.org/show_bug.cgi?id=203098
1427         <rdar://problem/56716101>
1428
1429         Reviewed by Eric Carlson.
1430
1431         Allow pages to enter the back/forward cache, even if they have a pending
1432         getUserMedia promise. Whenever we get a permission decision from the
1433         UIProcess, we now schedule a task to resolve/reject the promise on the
1434         WindowEventLoop. The WindowEventLoop properly gets suspended while in
1435         the back/forward cache.
1436
1437         Test: http/tests/navigation/page-cache-getUserMedia-pending-promise.html
1438
1439         * Modules/mediastream/MediaDevices.cpp:
1440         (WebCore::MediaDevices::getUserMedia const):
1441         If the document is not fully active, reject the promise with an InvalidStateError, as per:
1442         - https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia (Step 4)
1443
1444         * Modules/mediastream/UserMediaRequest.cpp:
1445         (WebCore::UserMediaRequest::allow):
1446         (WebCore::UserMediaRequest::deny):
1447         (WebCore::UserMediaRequest::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
1448         * Modules/mediastream/UserMediaRequest.h:
1449
1450 2019-10-29  Peng Liu  <peng.liu6@apple.com>
1451
1452         [Picture-in-Picture Web API] Implement PictureInPictureWindow
1453         https://bugs.webkit.org/show_bug.cgi?id=202615
1454
1455         Reviewed by Eric Carlson.
1456
1457         Tests: media/picture-in-picture-api-enter-pip-1.html
1458                media/picture-in-picture-api-enter-pip-2.html
1459                media/picture-in-picture-api-enter-pip-3.html
1460                media/picture-in-picture-api-enter-pip-4.html
1461                media/picture-in-picture-api-exit-pip-1.html
1462                media/picture-in-picture-api-exit-pip-2.html
1463                media/picture-in-picture-api-pip-events.html
1464                media/picture-in-picture-api-pip-window.html
1465
1466         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
1467         (WebCore::HTMLVideoElementPictureInPicture::HTMLVideoElementPictureInPicture):
1468         (WebCore::HTMLVideoElementPictureInPicture::requestPictureInPicture):
1469         (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
1470         (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
1471         (WebCore::HTMLVideoElementPictureInPicture::pictureInPictureWindowResized):
1472         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:
1473         * Modules/pictureinpicture/PictureInPictureWindow.cpp:
1474         (WebCore::PictureInPictureWindow::create):
1475         (WebCore::PictureInPictureWindow::PictureInPictureWindow):
1476         (WebCore::PictureInPictureWindow::setSize):
1477         (WebCore::PictureInPictureWindow::close):
1478         * Modules/pictureinpicture/PictureInPictureWindow.h:
1479         * html/HTMLVideoElement.cpp:
1480         (WebCore::HTMLVideoElement::fullscreenModeChanged):
1481         (WebCore::HTMLVideoElement::didBecomeFullscreenElement):
1482         (WebCore::HTMLVideoElement::setPictureInPictureObserver):
1483         (WebCore::HTMLVideoElement::setVideoFullscreenFrame):
1484         * html/HTMLVideoElement.h:
1485         * platform/PictureInPictureObserver.h:
1486
1487 2019-10-29  Antoine Quint  <graouts@apple.com>
1488
1489         WebAnimation should never prevent entering the back/forward cache
1490         https://bugs.webkit.org/show_bug.cgi?id=203088
1491         <rdar://problem/56374249>
1492
1493         Reviewed by Antti Koivisto.
1494
1495         Test: webanimations/animation-page-cache.html
1496
1497         We remove the Web Animation override of the deprecated method ActiveDOMObject::shouldPreventEnteringBackForwardCache_DEPRECATED()
1498         and instead ensure event dispatch is suspended along with the WebAnimation object through the adoption of a SuspendableTaskQueue.
1499
1500         We also ensure an animation correctly suspends itself when ActiveDOMObject::suspend() and ActiveDOMObject::resume() are called.
1501         Implementing these methods showed that we have some placeholders in DeclarativeAnimation that were not necessary, so we remove those.
1502
1503         Finally, we no longer need to track the stopped state since the SuspendableTaskQueue will close itself when ActiveDOMObject::stop()
1504         is called.
1505
1506         * animation/DeclarativeAnimation.cpp:
1507         (WebCore::DeclarativeAnimation::stop): Deleted.
1508         (WebCore::DeclarativeAnimation::suspend): Deleted.
1509         (WebCore::DeclarativeAnimation::resume): Deleted.
1510         * animation/DeclarativeAnimation.h:
1511         * animation/WebAnimation.cpp:
1512         (WebCore::WebAnimation::WebAnimation):
1513         (WebCore::WebAnimation::enqueueAnimationPlaybackEvent):
1514         (WebCore::WebAnimation::suspend):
1515         (WebCore::WebAnimation::resume):
1516         (WebCore::WebAnimation::stop):
1517         (WebCore::WebAnimation::hasPendingActivity):
1518         (WebCore::WebAnimation::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
1519         * animation/WebAnimation.h:
1520
1521 2019-10-29  Simon Fraser  <simon.fraser@apple.com>
1522
1523         Align CSS hsl() -> rgb() color conversion with the spec
1524         https://bugs.webkit.org/show_bug.cgi?id=203592
1525
1526         Reviewed by Tim Horton.
1527
1528         Fix lots of tests in css/css-color/color-resolving-hsl.html by matching the specified rounding
1529         when converting between hsl() and rgb().
1530         
1531         Remove some duplicated code, and call HSLToSRGB().
1532         
1533         Tested by WPT.
1534
1535         * css/parser/CSSPropertyParserHelpers.cpp:
1536         (WebCore::CSSPropertyParserHelpers::parseHSLParameters):
1537         * platform/graphics/Color.cpp:
1538         (WebCore::makeRGBAFromHSLA):
1539         (WebCore::calcHue): Deleted.
1540         * platform/graphics/Color.h:
1541
1542 2019-10-07  Jer Noble  <jer.noble@apple.com>
1543
1544         Implement the Remote Playback API.
1545         https://bugs.webkit.org/show_bug.cgi?id=162971
1546
1547         Reviewed by Youenn Fablet.
1548
1549         Tests: media/remoteplayback-cancel-invalid.html
1550                media/remoteplayback-prompt.html
1551                media/remoteplayback-target-availability.html
1552                media/remoteplayback-watch-disableremoteplayback.html
1553                imported/w3c/web-platform-tests/remote-playback/cancel-watch-availability.html
1554                imported/w3c/web-platform-tests/remote-playback/disable-remote-playback-cancel-watch-availability-throws.html
1555                imported/w3c/web-platform-tests/remote-playback/disable-remote-playback-prompt-throws.html
1556                imported/w3c/web-platform-tests/remote-playback/disable-remote-playback-watch-availability-throws.html
1557                imported/w3c/web-platform-tests/remote-playback/idlharness.window.html
1558                imported/w3c/web-platform-tests/remote-playback/watch-availability-initial-callback.html
1559
1560         The Remote Playback API <https://w3c.github.io/remote-playback> allows page authors
1561         to control the presentation of <audio> and <video> elements to remote playback devices
1562         such as the Apple TV or Chromecast. WebKit already exposes a non-standardized API to
1563         initiate remote playback, and the Remote Playback API is largely congruent with the
1564         webkitShowPlaybackTargetPicker() API et. al.
1565
1566         One addition provided by the Remote Playback API is an event in the case the user
1567         dismisses the picker UI without making a choice, so this concept needs to be plumbed
1568         through from the ChromeClient to the PlatformMediaSession.
1569
1570         * DerivedSources.make:
1571         * Modules/mediasession/WebMediaSessionManager.cpp:
1572         (WebCore::WebMediaSessionManager::mockMediaPlaybackTargetPickerDismissPopup):
1573         (WebCore::WebMediaSessionManager::playbackTargetPickerWasDismissed):
1574         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients):
1575         * Modules/mediasession/WebMediaSessionManager.h:
1576         * Modules/mediasession/WebMediaSessionManagerClient.h:
1577         * Modules/remoteplayback/HTMLMediaElementRemotePlayback.h: Added.
1578         (WebCore::HTMLMediaElementRemotePlayback::remote):
1579         (WebCore::HTMLMediaElementRemotePlayback::hasAttributeWithoutSynchronization):
1580         (WebCore::HTMLMediaElementRemotePlayback::setBooleanAttribute):
1581         * Modules/remoteplayback/HTMLMediaElementRemotePlayback.idl: Added.
1582         * Modules/remoteplayback/RemotePlayback.cpp: Added.
1583         (WebCore::RemotePlayback::create):
1584         (WebCore::RemotePlayback::RemotePlayback):
1585         (WebCore::RemotePlayback::~RemotePlayback):
1586         (WebCore::RemotePlayback::watchAvailability):
1587         (WebCore::RemotePlayback::cancelWatchAvailability):
1588         (WebCore::RemotePlayback::prompt):
1589         (WebCore::RemotePlayback::shouldPlayToRemoteTargetChanged):
1590         (WebCore::RemotePlayback::setState):
1591         (WebCore::RemotePlayback::establishConnection):
1592         (WebCore::RemotePlayback::disconnect):
1593         (WebCore::RemotePlayback::updateAvailability):
1594         (WebCore::RemotePlayback::playbackTargetPickerWasDismissed):
1595         (WebCore::RemotePlayback::isPlayingToRemoteTargetChanged):
1596         (WebCore::RemotePlayback::hasAvailabilityCallbacks):
1597         (WebCore::RemotePlayback::availabilityChanged):
1598         (WebCore::RemotePlayback::invalidate):
1599         (WebCore::RemotePlayback::activeDOMObjectName):
1600         (WebCore::RemotePlayback::canSuspendForDocumentSuspension):
1601         (WebCore::RemotePlayback::stop):
1602         * Modules/remoteplayback/RemotePlayback.h: Added.
1603         (WebCore::RemotePlayback::state):
1604         * Modules/remoteplayback/RemotePlayback.idl: Added.
1605         * Modules/remoteplayback/RemotePlaybackAvailabilityCallback.h: Added.
1606         (WebCore::RemotePlaybackAvailabilityCallback::~RemotePlaybackAvailabilityCallback):
1607         * Modules/remoteplayback/RemotePlaybackAvailabilityCallback.idl: Added.
1608         * WebCore.xcodeproj/project.pbxproj:
1609         * bindings/generic/RuntimeEnabledFeatures.h:
1610         (WebCore::RuntimeEnabledFeatures::setRemotePlaybackEnabled):
1611         (WebCore::RuntimeEnabledFeatures::remotePlaybackEnabled):
1612         * dom/Document.cpp:
1613         (WebCore::Document::playbackTargetPickerWasDismissed):
1614         * dom/Document.h:
1615         * dom/EventNames.h:
1616         * dom/EventTargetFactory.in:
1617         * html/HTMLAttributeNames.in:
1618         * html/HTMLMediaElement.cpp:
1619         (WebCore::HTMLMediaElement::HTMLMediaElement):
1620         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1621         (WebCore::HTMLMediaElement::clearMediaPlayer):
1622         (WebCore::HTMLMediaElement::wirelessRoutesAvailableDidChange):
1623         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged):
1624         (WebCore::HTMLMediaElement::addEventListener):
1625         (WebCore::HTMLMediaElement::removeEventListener):
1626         (WebCore::HTMLMediaElement::setWirelessPlaybackTarget):
1627         (WebCore::HTMLMediaElement::playbackTargetPickerWasDismissed):
1628         (WebCore::HTMLMediaElement::remoteHasAvailabilityCallbacksChanged):
1629         (WebCore::HTMLMediaElement::createMediaPlayer):
1630         * html/HTMLMediaElement.h:
1631         (WebCore::HTMLMediaElement::remote):
1632         * html/MediaElementSession.cpp:
1633         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled):
1634         (WebCore::MediaElementSession::playbackTargetPickerWasDismissed):
1635         * html/MediaElementSession.h:
1636         * page/Page.cpp:
1637         (WebCore::Page::mockMediaPlaybackTargetPickerDismissPopup):
1638         (WebCore::Page::playbackTargetPickerWasDismissed):
1639         * page/Page.h:
1640         * page/Settings.in:
1641         * platform/audio/PlatformMediaSession.h:
1642         (WebCore::PlatformMediaSessionClient::playbackTargetPickerWasDismissed):
1643         * platform/graphics/MediaPlaybackTargetClient.h:
1644         * platform/graphics/MediaPlaybackTargetPicker.h:
1645         (WebCore::MediaPlaybackTargetPicker::playbackTargetPickerWasDismissed):
1646         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1647         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker):
1648         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
1649         (WebCore::MediaPlaybackTargetPickerMock::dismissPopup):
1650         * platform/mock/MediaPlaybackTargetPickerMock.h:
1651         * testing/Internals.cpp:
1652         (WebCore::Internals::mockMediaPlaybackTargetPickerDismissPopup):
1653         * testing/Internals.h:
1654         * testing/Internals.idl:
1655
1656 2019-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1657
1658         Add enterkeyhint support
1659         https://bugs.webkit.org/show_bug.cgi?id=189546
1660         <rdar://problem/51021148>
1661
1662         Reviewed by Tim Horton.
1663
1664         * Headers.cmake: Add EnterKeyHint.h.
1665
1666 2019-10-29  Chris Dumez  <cdumez@apple.com>
1667
1668         <input type="range">.setAttribute("value") does not update the value
1669         https://bugs.webkit.org/show_bug.cgi?id=202859
1670         <rdar://problem/56204271>
1671
1672         Reviewed by Frédéric Wang.
1673
1674         Make sure the position of the range input element's slider gets updated whenever
1675         the element's 'value' attribute changes.
1676
1677         No new tests, unskipped existing test.
1678
1679         * html/RangeInputType.cpp:
1680         (WebCore::RangeInputType::attributeChanged):
1681
1682 2019-10-29  Truitt Savell  <tsavell@apple.com>
1683
1684         Unreviewed, rolling out r251639.
1685
1686         Caused flakey API failures for GetDisplayMediaTest.Constraints
1687
1688         Reverted changeset:
1689
1690         "Enforce user gesture for getUserMedia in case a previous
1691         getUserMedia call was denied"
1692         https://bugs.webkit.org/show_bug.cgi?id=203362
1693         https://trac.webkit.org/changeset/251639
1694
1695 2019-10-29  Chris Dumez  <cdumez@apple.com>
1696
1697         Unreviewed, rolling out r251594.
1698
1699         Caused an API test failure
1700
1701         Reverted changeset:
1702
1703         "mp4 video element broken with service worker"
1704         https://bugs.webkit.org/show_bug.cgi?id=184447
1705         https://trac.webkit.org/changeset/251594
1706
1707 2019-10-29  Chris Dumez  <cdumez@apple.com>
1708
1709         Unreviewed, revert r251637 as it caused http/tests/lazyload/scroll-element-removed-from-document.html to crash
1710         https://bugs.webkit.org/show_bug.cgi?id=203566
1711
1712         * Sources.txt:
1713         * WebCore.xcodeproj/project.pbxproj:
1714         * dom/Document.cpp:
1715         * dom/Document.h:
1716         * html/HTMLImageElement.cpp:
1717         (WebCore::HTMLImageElement::parseAttribute):
1718         (WebCore::HTMLImageElement::didMoveToNewDocument):
1719         * html/HTMLImageElement.h:
1720         * html/HTMLImageElement.idl:
1721         * html/LazyLoadImageObserver.cpp: Removed.
1722         * html/LazyLoadImageObserver.h: Removed.
1723         * html/parser/HTMLPreloadScanner.cpp:
1724         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
1725         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1726         * loader/ImageLoader.cpp:
1727         (WebCore::ImageLoader::updateFromElement):
1728         (WebCore::ImageLoader::notifyFinished):
1729         * loader/ImageLoader.h:
1730         * loader/cache/CachedImage.h:
1731         * loader/cache/CachedResourceLoader.cpp:
1732         (WebCore::CachedResourceLoader::requestImage):
1733         (WebCore::CachedResourceLoader::requestResource):
1734         (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
1735         (WebCore::CachedResourceLoader::clientDefersImage const):
1736         (WebCore::CachedResourceLoader::shouldDeferImageLoad const):
1737         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
1738         * loader/cache/CachedResourceLoader.h:
1739         * rendering/RenderImage.cpp:
1740         (WebCore::RenderImage::paintReplaced):
1741
1742 2019-10-29  Antoine Quint  <graouts@apple.com>
1743
1744         [Web Animations] Optimize blending for CSS Transitions
1745         https://bugs.webkit.org/show_bug.cgi?id=203561
1746
1747         Reviewed by Simon Fraser.
1748
1749         The work performed in KeyframeEffect::setAnimatedPropertiesInStyle() has a level of complexity warranted by the
1750         flexibility of how keyframes can be specified via the Web Animations JS API. However, in the case of CSS Transitions,
1751         we already know that there are only two keyframes, one where offset=0 and one where offset=1, and that only a single
1752         CSS property is specified so we can simplify the process greatly.
1753
1754         To ensure we only perform this quicker blending operation for keyframes computed for a CSS Transition and that no
1755         modification to the keyframes have been applied via the Web Animations JS API after the fact, we now keep track
1756         of whether the blending keyframes (KeyframeList) were generated for a CSS Transition or a CSS Animation and only
1757         use this information to decide whether we're blending for declarative animations.
1758
1759         * animation/KeyframeEffect.cpp:
1760         (WebCore::KeyframeEffect::processKeyframes):
1761         (WebCore::KeyframeEffect::clearBlendingKeyframes):
1762         (WebCore::KeyframeEffect::computeCSSAnimationBlendingKeyframes):
1763         (WebCore::KeyframeEffect::computeCSSTransitionBlendingKeyframes):
1764         (WebCore::KeyframeEffect::setTarget):
1765         (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
1766         * animation/KeyframeEffect.h:
1767
1768 2019-10-29  Adrian Perez de Castro  <aperez@igalia.com>
1769
1770         [GTK][WPE] Fix non-unified build after r251691
1771         https://bugs.webkit.org/show_bug.cgi?id=203556
1772
1773         Reviewed by Žan Doberšek.
1774
1775         No new tests needed.
1776
1777         * bindings/js/ScriptModuleLoader.cpp:
1778         (WebCore::rejectPromise): Add missing namespace in call to JSC::JSInternalPromise::create().
1779
1780 2019-10-29  Peng Liu  <peng.liu6@apple.com>
1781
1782         [Picture-in-Picture Web API] Synchronize the attributes and properties of HTMLVideoElementPictureInPicture
1783         https://bugs.webkit.org/show_bug.cgi?id=203518
1784
1785         Reviewed by Eric Carlson.
1786
1787         Test: media/picture-in-picture-api-element-attributes.html
1788
1789         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.idl:
1790         * html/HTMLAttributeNames.in:
1791
1792 2019-10-29  Dirk Schulze  <krit@webkit.org>
1793
1794         [SVG2] fill-opacity, stroke-opacity, stop-opacity and flood-opacity doe not support percentage
1795         https://bugs.webkit.org/show_bug.cgi?id=201731
1796
1797         Reviewed by Simon Fraser.
1798
1799         The CSS properties opacity, fill-opacity, stroke-opacity, stop-opacity, flood-opacity support
1800         percentage in addition to number values.
1801         Add percentage support.
1802
1803         Tests: fast/css/parsing-opacity.html
1804                fast/svg/parsing-fill-opacity.html
1805                fast/svg/parsing-flood-opacity.html
1806                fast/svg/parsing-stop-opacity.html
1807                fast/svg/parsing-stroke-opacity.html
1808
1809         * css/CSSProperties.json: opacity needs to use Opacity converter now.
1810         * css/StyleBuilderConverter.h:
1811         (WebCore::StyleBuilderConverter::convertOpacity): Clamp values to [0,1]
1812         * css/parser/CSSPropertyParser.cpp:
1813         (WebCore::CSSPropertyParser::parseSingleValue): Parse percentage values.
1814
1815 2019-10-29  Dirk Schulze  <krit@webkit.org>
1816
1817         Add CSS Masking and SVG 2 to feature list
1818         https://bugs.webkit.org/show_bug.cgi?id=186155
1819
1820         Reviewed by Simon Fraser.
1821
1822         Add CSS Masking Level 1 and SVG 2 to feature list.
1823
1824         * features.json:
1825
1826 2019-10-28  Daniel Bates  <dabates@apple.com>
1827
1828         Remove unnecessary #include <limits.h> header from Timer.cpp
1829         https://bugs.webkit.org/show_bug.cgi?id=203504
1830
1831         Reviewed by Alex Christensen.
1832
1833         Timer.cpp includes both <limits> and <limits.h>. The latter was added to fix a build issue in r30193 that
1834         effected GCC 4.3 when Timer.cpp referenced UINT_MAX. Timer.cpp no longer references this constant and instead
1835         uses the C++ std::numeric_limits equivalent. So, remove the #include <limits.h>.
1836
1837         * platform/Timer.cpp:
1838
1839 2019-10-28  Yusuke Suzuki  <ysuzuki@apple.com>
1840
1841         [JSC] Remove JSPromiseDeferred
1842         https://bugs.webkit.org/show_bug.cgi?id=203400
1843
1844         Reviewed by Keith Miller.
1845
1846         This patch removes PromiseExecutionScope. This assumed that promise operation cannot fail in main thread. But this is
1847         wrong since any JS call can fail due to stack-overflow error. This patch makes things more robust by handling errors correctly.
1848         And we remove JSPromiseDeferred and use JSPromise instead.
1849
1850         * bindings/js/JSCustomElementRegistryCustom.cpp:
1851         (WebCore::whenDefinedPromise):
1852         (WebCore::JSCustomElementRegistry::whenDefined):
1853         * bindings/js/JSDOMConvertPromise.h:
1854         (WebCore::Converter<IDLPromise<T>>::convert):
1855         * bindings/js/JSDOMGlobalObject.cpp:
1856         * bindings/js/JSDOMOperationReturningPromise.h:
1857         (WebCore::IDLOperationReturningPromise::call):
1858         (WebCore::IDLOperationReturningPromise::callStatic):
1859         * bindings/js/JSDOMPromiseDeferred.cpp:
1860         (WebCore::DeferredPromise::promise const):
1861         (WebCore::DeferredPromise::callFunction):
1862         (WebCore::DeferredPromise::whenSettled):
1863         (WebCore::rejectPromiseWithExceptionIfAny):
1864         (WebCore::createDeferredPromise):
1865         * bindings/js/JSDOMPromiseDeferred.h:
1866         (WebCore::DeferredPromise::create):
1867         (WebCore::DeferredPromise::DeferredPromise):
1868         (WebCore::DeferredPromise::deferred const):
1869         (WebCore::DeferredPromise::resolve):
1870         (WebCore::DeferredPromise::reject):
1871         (WebCore::DOMPromiseDeferredBase::DOMPromiseDeferredBase):
1872         (WebCore::DOMPromiseDeferredBase::operator=):
1873         (WebCore::DOMPromiseDeferredBase::reject):
1874         (WebCore::DOMPromiseDeferredBase::rejectType):
1875         (WebCore::DOMPromiseDeferredBase::promise const):
1876         (WebCore::DOMPromiseDeferredBase::whenSettled):
1877         (WebCore::DOMPromiseDeferred::resolve):
1878         (WebCore::DOMPromiseDeferred<void>::resolve):
1879         (WebCore::callPromiseFunction):
1880         * bindings/js/JSDOMWindowBase.cpp:
1881         (WebCore::JSDOMWindowBase::moduleLoaderFetch):
1882         (WebCore::JSDOMWindowBase::moduleLoaderImportModule):
1883         (WebCore::tryAllocate):
1884         (WebCore::isResponseCorrect):
1885         (WebCore::handleResponseOnStreamingAction):
1886         (WebCore::JSDOMWindowBase::compileStreaming):
1887         (WebCore::JSDOMWindowBase::instantiateStreaming):
1888         * bindings/js/JSDOMWindowBase.h:
1889         * bindings/js/ScriptModuleLoader.cpp:
1890         (WebCore::ScriptModuleLoader::fetch):
1891         (WebCore::rejectPromise):
1892         * bindings/js/WorkerScriptController.cpp:
1893         (WebCore::WorkerScriptController::addTimerSetNotification):
1894         (WebCore::WorkerScriptController::removeTimerSetNotification):
1895         * bindings/scripts/CodeGeneratorJS.pm:
1896         (GenerateOperationTrampolineDefinition):
1897         * bindings/scripts/test/JS/JSTestGlobalObject.cpp:
1898         (WebCore::jsTestGlobalObjectInstanceFunctionCalculateSecretResult):
1899         * bindings/scripts/test/JS/JSTestNode.cpp:
1900         (WebCore::jsTestNodePrototypeFunctionTestWorkerPromise):
1901         (WebCore::jsTestNodePrototypeFunctionCalculateSecretResult):
1902         * bindings/scripts/test/JS/JSTestObj.cpp:
1903         (WebCore::jsTestObjPrototypeFunctionCalculateSecretResult):
1904         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
1905         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
1906         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
1907         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithOptionalIntArgument):
1908         (WebCore::jsTestObjPrototypeFunctionTestPromiseOverloadedFunction):
1909         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunction):
1910         (WebCore::jsTestObjConstructorFunctionTestStaticPromiseFunctionWithException):
1911         (WebCore::jsTestObjPrototypeFunctionTestCustomPromiseFunction):
1912         (WebCore::jsTestObjConstructorFunctionTestStaticCustomPromiseFunction):
1913         * workers/WorkerRunLoop.cpp:
1914         * worklets/WorkletScriptController.cpp:
1915
1916 2019-10-28  Adrian Perez de Castro  <aperez@igalia.com>
1917
1918         [GTK][WPE] Fix various non-unified build issues introduced since r251436
1919         https://bugs.webkit.org/show_bug.cgi?id=203492
1920
1921         Reviewed by Alex Christensen and Mark Lam.
1922
1923         No new tests needed.
1924
1925         * Modules/entriesapi/FileSystemEntry.cpp: Add missing inclusion of Document.h
1926         * Modules/entriesapi/FileSystemFileEntry.cpp: Add missing inclusion of File.h
1927         * Modules/fetch/FetchBodyOwner.cpp: Add missing inclusion of Document.h
1928         * bindings/js/ExceptionDetails.h: Add missing inclusion of wtf/text/WTFString.h; remove
1929         unneeded inclusion of wtf/Forward.h.
1930         * css/ElementRuleCollector.cpp: Add missing inclusion of DocumentRuleSets.h and
1931         styleResolver.h
1932         * inspector/agents/page/PageDebuggerAgent.h: Add forward declaration for Frame.
1933         * style/StyleInvalidator.cpp: Add missing inclusion of RuleSet.h
1934         * style/StyleSharingResolver.cpp: Add missing inclusion of StyleResolver.h
1935
1936 2019-10-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1937
1938         Add bindings support for the enterkeyhint HTML attribute
1939         https://bugs.webkit.org/show_bug.cgi?id=203440
1940
1941         Reviewed by Ryosuke Niwa.
1942
1943         Work towards support for the enterkeyhint attribute. This patch introduces the new attribute to HTMLElement's
1944         IDL; see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-enterkeyhint-attribute
1945         for more information. This version of the spec was last updated October 25, 2019 (at time of writing).
1946
1947         Test: fast/forms/enterkeyhint-attribute-values.html
1948
1949         * Sources.txt:
1950         * WebCore.xcodeproj/project.pbxproj:
1951         * html/EnterKeyHint.cpp: Added.
1952
1953         Add a new helper file that declares a new EnterKeyHint enum type, as well as helper functions to map between
1954         attribute values and EnterKeyHint values.
1955
1956         (WebCore::enterKeyHintForAttributeValue):
1957         (WebCore::attributeValueForEnterKeyHint):
1958         * html/EnterKeyHint.h: Added.
1959         * html/HTMLAttributeNames.in:
1960         * html/HTMLElement.cpp:
1961         (WebCore::HTMLElement::canonicalEnterKeyHint const):
1962
1963         Returns the canonical EnterKeyHint enum value, by inspecting the "enterkeyhint" attribute value.
1964
1965         (WebCore::HTMLElement::enterKeyHint const):
1966         (WebCore::HTMLElement::setEnterKeyHint):
1967
1968         Implement enterKeyHint. Since enterkeyhint is a reflected HTML attribute with enumerated values, the setter sets
1969         the attribute value and the getter returns the "canonicalized" attribute value.
1970
1971         * html/HTMLElement.h:
1972         * html/HTMLElement.idl:
1973
1974         Add the new attribute. Note that this isn't marked as [Reflect] in IDL, since doing so would generate incorrect
1975         bindings code. This is because we don't support reflection for enumerated attributes in our bindings generator
1976         yet, so for now, we just match `HTMLInputElement.type` and `HTMLElement.inputMode`.
1977
1978         * page/Settings.yaml:
1979
1980         Add a new runtime switch to guard the enterkeyhint attribute.
1981
1982 2019-10-28  Chris Dumez  <cdumez@apple.com>
1983
1984         editing/firstPositionInNode-crash.html in crashing in Debug
1985         https://bugs.webkit.org/show_bug.cgi?id=203520
1986
1987         Reviewed by Ryosuke Niwa.
1988
1989         If positionInParentBeforeNode / positionInParentAfterNode on a node and editingIgnoresContent()
1990         returns true for this node's parent, keep traversing ancestors until we find one for which
1991         editingIgnoresContent() returns false.
1992
1993         No new tests, covered by editing/firstPositionInNode-crash.html.
1994
1995         * dom/Position.cpp:
1996         (WebCore::positionInParentBeforeNode):
1997         (WebCore::positionInParentAfterNode):
1998         * dom/Position.h:
1999
2000 2019-10-28  Zalan Bujtas  <zalan@apple.com>
2001
2002         Hidden framesets should provide default edgeInfo value
2003         https://bugs.webkit.org/show_bug.cgi?id=203506
2004         <rdar://problem/56233726>
2005
2006         Reviewed by Simon Fraser.
2007
2008         The grid information (and certain associated structures e.g. edegeInfo) for a frameset is updated through the layout() call.
2009         When the used height/width computes to zero on a frameset child (frame or nested frameset), we don't run layout on the renderer thus
2010         hidden nested framesets can only provide the default edge info.
2011         This patch changes this behaviour and we now call layout on those hidden renderers the same way we do it on iOS.
2012
2013         Test: fast/frames/hidden-frameset.html
2014
2015         * rendering/RenderFrameSet.cpp:
2016         (WebCore::RenderFrameSet::edgeInfo const):
2017
2018 2019-10-28  Chris Dumez  <cdumez@apple.com>
2019
2020         Drop code for X-Temp-Tablet HTTP header experiment
2021         https://bugs.webkit.org/show_bug.cgi?id=203524
2022         <rdar://problem/55791195>
2023
2024         Reviewed by Ryosuke Niwa.
2025
2026         * loader/cache/CachedResourceLoader.cpp:
2027         (WebCore::CachedResourceLoader::CachedResourceLoader):
2028         (WebCore::CachedResourceLoader::requestResource):
2029         * loader/cache/CachedResourceLoader.h:
2030
2031 2019-10-28  Simon Fraser  <simon.fraser@apple.com>
2032
2033         Properties that take <position> should not accept 3 values
2034         https://bugs.webkit.org/show_bug.cgi?id=189142
2035
2036         Reviewed by Antti Koivisto.
2037         
2038         The resolution in https://github.com/w3c/csswg-drafts/issues/2140 changed the syntax for <position>,
2039         disallowing the 3-value syntax. This is used in object-position, gradients and shapes. background-position
2040         continues to use the old syntax.
2041         
2042         Fix CSS parsing accordingly.
2043
2044         Tested by css-images WPT, by shapes tests, and object-position tests.
2045
2046         * css/parser/CSSPropertyParser.cpp:
2047         (WebCore::CSSPropertyParser::consumePerspectiveOrigin):
2048         (WebCore::consumeBasicShapeCircle):
2049         (WebCore::consumeBasicShapeEllipse):
2050         (WebCore::CSSPropertyParser::parseSingleValue):
2051         (WebCore::consumeBackgroundPosition):
2052         (WebCore::CSSPropertyParser::consumeBackgroundShorthand):
2053         * css/parser/CSSPropertyParserHelpers.cpp:
2054         (WebCore::CSSPropertyParserHelpers::backgroundPositionFromThreeValues):
2055         (WebCore::CSSPropertyParserHelpers::positionFromFourValues):
2056         (WebCore::CSSPropertyParserHelpers::consumePosition):
2057         (WebCore::CSSPropertyParserHelpers::consumeRadialGradient):
2058         (WebCore::CSSPropertyParserHelpers::consumeConicGradient):
2059         (WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues): Deleted.
2060         * css/parser/CSSPropertyParserHelpers.h:
2061
2062 2019-10-28  Alex Christensen  <achristensen@webkit.org>
2063
2064         Remove unused NetworkProcessCreationParameters.urlSchemesRegisteredAsCanDisplayOnlyIfCanRequest
2065         https://bugs.webkit.org/show_bug.cgi?id=203393
2066
2067         Reviewed by Chris Dumez.
2068
2069         * platform/LegacySchemeRegistry.cpp:
2070         (WebCore::canDisplayOnlyIfCanRequestSchemes):
2071         (WebCore::LegacySchemeRegistry::canDisplayOnlyIfCanRequest):
2072         (WebCore::LegacySchemeRegistry::registerAsCanDisplayOnlyIfCanRequest):
2073
2074 2019-10-28  Simon Fraser  <simon.fraser@apple.com>
2075
2076         Add support for the Q unit
2077         https://bugs.webkit.org/show_bug.cgi?id=203469
2078
2079         Reviewed by Antti Koivisto.
2080         
2081         Add support for the CSS "Q" unit (quater-millimeter):
2082         <https://drafts.csswg.org/css-values-4/#Q>
2083
2084         Tested by web platform tests.
2085
2086         * css/CSSCalculationValue.cpp:
2087         (WebCore::unitCategory):
2088         (WebCore::hasDoubleValue):
2089         * css/CSSPrimitiveValue.cpp:
2090         (WebCore::isValidCSSUnitTypeForDoubleConversion):
2091         (WebCore::isStringType):
2092         (WebCore::CSSPrimitiveValue::unitCategory):
2093         (WebCore::CSSPrimitiveValue::cleanup):
2094         (WebCore::CSSPrimitiveValue::computeNonCalcLengthDouble):
2095         (WebCore::CSSPrimitiveValue::conversionToCanonicalUnitsScaleFactor):
2096         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText const):
2097         (WebCore::CSSPrimitiveValue::equals const):
2098         * css/CSSPrimitiveValue.h:
2099         (WebCore::CSSPrimitiveValue::isLength):
2100         * css/parser/CSSParserToken.cpp:
2101         (WebCore::cssPrimitiveValueUnitFromTrie):
2102         * css/parser/CSSPropertyParserHelpers.cpp:
2103         (WebCore::CSSPropertyParserHelpers::consumeLength):
2104         * editing/cocoa/HTMLConverter.mm:
2105         (floatValueFromPrimitiveValue):
2106
2107 2019-10-28  Antoine Quint  <graouts@apple.com>
2108
2109         CSS Transitions and CSS Animations properties should treat unitless 0 as an invalid value for times
2110         https://bugs.webkit.org/show_bug.cgi?id=203484
2111
2112         Reviewed by Antti Koivisto.
2113
2114         The CSS specification does not allow for "0" as a valid time (https://drafts.csswg.org/css-values-3/#time).
2115         We change the way we parse time values to only allow for "0" if the UnitlessQuirk is set to Allow, which is
2116         only the case for the -webkit-marquee-speed property.
2117
2118         * css/parser/CSSPropertyParserHelpers.cpp:
2119         (WebCore::CSSPropertyParserHelpers::consumeTime):
2120
2121 2019-10-27  Antoine Quint  <graouts@apple.com>
2122
2123         [Web Animations] The easing property for a CSSTransition effect is always "linear"
2124         https://bugs.webkit.org/show_bug.cgi?id=203476
2125
2126         Reviewed by Dean Jackson.
2127
2128         While we correctly used the timing function set on the Animation object created while parsing a CSS Transition
2129         for blending, we wouldn't set the timing function on the CSSTransition's AnimationEffect and it would not be
2130         reflected correctly through the JS API. This also means that we shouldn't perform per-keyframe blending for CSS
2131         Transitions.
2132
2133         * animation/CSSTransition.cpp:
2134         (WebCore::CSSTransition::setTimingProperties):
2135         * animation/KeyframeEffect.cpp:
2136         (WebCore::KeyframeEffect::setAnimatedPropertiesInStyle):
2137
2138 2019-10-28  Simon Fraser  <simon.fraser@apple.com>
2139
2140         Can't change @font-face descriptors from fontFaceRule.style.setProperty()
2141         https://bugs.webkit.org/show_bug.cgi?id=177975
2142         <rdar://problem/56648761>
2143
2144         Reviewed by Antti Koivisto.
2145
2146         When parsing properties via PropertySetCSSStyleDeclaration::setProperty() (called from
2147         script as rule.style.setProperty()), CSSPropertyParser::parseValue() needs to know if
2148         we're parsing properties in a @font-face or @viewport rule, since some properties are
2149         only allowed in these contexts.
2150
2151         Achieve this by adding to CSSParserContext an Optional<enclosingRuleType>, which gets set
2152         for font-face and viewport rules. This gets set by StyleRuleCSSStyleDeclaration::cssParserContext()
2153         based on the type of the parent rule.
2154
2155         Moved StyleRule::Type to its own header so CSSParserContext can use it. Added compile-time asserts
2156         that the values match CSSRule::Type (fixing one of them).
2157
2158         Also fix <urange> serialization when start and end values are the same.
2159
2160         Test: web-platform-tests/css/css-syntax/urange-parsing.html
2161
2162         * Headers.cmake:
2163         * WebCore.xcodeproj/project.pbxproj:
2164         * css/CSSKeyframeRule.cpp:
2165         (WebCore::StyleRuleKeyframe::StyleRuleKeyframe):
2166         * css/CSSKeyframesRule.cpp:
2167         (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
2168         * css/CSSPropertySourceData.h:
2169         (WebCore::CSSRuleSourceData::create):
2170         (WebCore::CSSRuleSourceData::createUnknown):
2171         (WebCore::CSSRuleSourceData::CSSRuleSourceData):
2172         * css/CSSRule.cpp:
2173         * css/CSSUnicodeRangeValue.cpp:
2174         (WebCore::CSSUnicodeRangeValue::customCSSText const):
2175         * css/PropertySetCSSStyleDeclaration.cpp:
2176         (WebCore::StyleRuleCSSStyleDeclaration::cssParserContext const):
2177         * css/StyleRule.cpp:
2178         (WebCore::StyleRuleBase::destroy):
2179         (WebCore::StyleRuleBase::copy const):
2180         (WebCore::StyleRuleBase::createCSSOMWrapper const):
2181         (WebCore::StyleRule::StyleRule):
2182         (WebCore::StyleRulePage::StyleRulePage):
2183         (WebCore::StyleRuleFontFace::StyleRuleFontFace):
2184         (WebCore::StyleRuleGroup::StyleRuleGroup):
2185         (WebCore::StyleRuleMedia::StyleRuleMedia):
2186         (WebCore::StyleRuleSupports::StyleRuleSupports):
2187         (WebCore::StyleRuleViewport::StyleRuleViewport):
2188         (WebCore::StyleRuleCharset::StyleRuleCharset):
2189         (WebCore::StyleRuleNamespace::StyleRuleNamespace):
2190         * css/StyleRule.h:
2191         (WebCore::StyleRuleBase::type const):
2192         (WebCore::StyleRuleBase::isCharsetRule const):
2193         (WebCore::StyleRuleBase::isFontFaceRule const):
2194         (WebCore::StyleRuleBase::isKeyframesRule const):
2195         (WebCore::StyleRuleBase::isKeyframeRule const):
2196         (WebCore::StyleRuleBase::isNamespaceRule const):
2197         (WebCore::StyleRuleBase::isMediaRule const):
2198         (WebCore::StyleRuleBase::isPageRule const):
2199         (WebCore::StyleRuleBase::isStyleRule const):
2200         (WebCore::StyleRuleBase::isSupportsRule const):
2201         (WebCore::StyleRuleBase::isViewportRule const):
2202         (WebCore::StyleRuleBase::isImportRule const):
2203         (WebCore::StyleRuleBase::StyleRuleBase):
2204         * css/StyleRuleImport.cpp:
2205         (WebCore::StyleRuleImport::StyleRuleImport):
2206         * css/StyleRuleImport.h:
2207         * css/StyleRuleType.h: Copied from Source/WebCore/css/CSSUnicodeRangeValue.cpp.
2208         * css/StyleSheetContents.cpp:
2209         (WebCore::traverseRulesInVector):
2210         (WebCore::StyleSheetContents::traverseSubresources const):
2211         * css/parser/CSSParser.cpp:
2212         (WebCore::CSSParser::parseValueWithVariableReferences):
2213         * css/parser/CSSParserContext.h:
2214         * css/parser/CSSParserImpl.cpp:
2215         (WebCore::CSSParserImpl::parseValue):
2216         (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
2217         (WebCore::CSSParserImpl::parseDeferredDeclaration):
2218         (WebCore::CSSParserImpl::parseDeclarationList):
2219         (WebCore::CSSParserImpl::supportsDeclaration):
2220         (WebCore::CSSParserImpl::parseDeclarationListForInspector):
2221         (WebCore::CSSParserImpl::consumeImportRule):
2222         (WebCore::CSSParserImpl::consumeMediaRule):
2223         (WebCore::CSSParserImpl::consumeSupportsRule):
2224         (WebCore::CSSParserImpl::consumeViewportRule):
2225         (WebCore::CSSParserImpl::consumeFontFaceRule):
2226         (WebCore::CSSParserImpl::consumeKeyframesRule):
2227         (WebCore::CSSParserImpl::consumePageRule):
2228         (WebCore::CSSParserImpl::consumeKeyframeStyleRule):
2229         (WebCore::observeSelectors):
2230         (WebCore::CSSParserImpl::consumeStyleRule):
2231         (WebCore::CSSParserImpl::consumeDeclarationList):
2232         (WebCore::CSSParserImpl::consumeDeclaration):
2233         (WebCore::CSSParserImpl::consumeDeclarationValue):
2234         * css/parser/CSSParserImpl.h:
2235         * css/parser/CSSParserObserver.h:
2236         * css/parser/CSSPropertyParser.cpp:
2237         (WebCore::CSSPropertyParser::parseValue):
2238         * css/parser/CSSPropertyParser.h:
2239         * css/parser/CSSTokenizer.cpp:
2240         (WebCore::CSSTokenizer::letterU):
2241         * inspector/InspectorStyleSheet.cpp:
2242         (flattenSourceData):
2243         (WebCore::StyleSheetHandler::startRuleHeader):
2244         (WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData const):
2245
2246 2019-10-28  Commit Queue  <commit-queue@webkit.org>
2247
2248         Unreviewed, rolling out r251651.
2249         https://bugs.webkit.org/show_bug.cgi?id=203488
2250
2251         It's causing crashes in several tests (Requested by KaL on
2252         #webkit).
2253
2254         Reverted changeset:
2255
2256         "ImageDecoders: use a thread safe data buffer for Cairo
2257         backing store"
2258         https://bugs.webkit.org/show_bug.cgi?id=201727
2259         https://trac.webkit.org/changeset/251651
2260
2261 2019-10-28  Charlie Turner  <cturner@igalia.com>
2262
2263         ImageDecoders: use a thread safe data buffer for Cairo backing store
2264         https://bugs.webkit.org/show_bug.cgi?id=201727
2265
2266         Reviewed by Carlos Garcia Campos.
2267
2268         When an image resource gets cached and replaces an existing image,
2269         CachedImage::didReplaceSharedBufferContents is called, which
2270         destroys the decoder in the BitmapImage class. This decoder can be
2271         initialized from any thread via
2272         ImageSource::ensureDecoderAvailable. On GTK/WPE, this dispatches
2273         to a ScalableImageDecoder, which contains a vector of
2274         ScalableImageDecoderFrame's, which contain ImageBackingStore's,
2275         which for reasons related to Cairo, contain a RefCounted
2276         SharedBuffer of pixel data.
2277
2278         The problem is that the CachedImage's decoders can be
2279         created/destroyed on different threads, so a thread-safe buffer
2280         class is required to hold these data, and pass them safely into
2281         cairo_image_surface_create_for_data rather than a SharedBuffer
2282         which must be created/destroyed on the main-thread.
2283
2284         Covered by existing tests.
2285
2286         * platform/graphics/ImageBackingStore.h: Create a small
2287         thread-safe utility class to hold the RGBA pixel data.
2288         (WebCore::ImageBackingStore::setSize):
2289         (WebCore::ImageBackingStore::clear):
2290         (WebCore::ImageBackingStore::pixelAt const):
2291         (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::create):
2292         (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::zeroPixelData):
2293         (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::pixelAt const):
2294         (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::data const):
2295         (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::isValid const):
2296         (WebCore::ImageBackingStore::ThreadSafeRGBAPixelBuffer::RGBAPixelBufferThreadSafeRefCounted):
2297         (WebCore::ImageBackingStore::ImageBackingStore):
2298         * platform/image-decoders/cairo/ImageBackingStoreCairo.cpp:
2299         (WebCore::ImageBackingStore::image const):
2300
2301 2019-10-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2302
2303         [GTK] Simplify the Input Method implementation
2304         https://bugs.webkit.org/show_bug.cgi?id=203149
2305
2306         Reviewed by Adrian Perez de Castro.
2307
2308         Remove CompositionResults and remove dead code in PlatformKeyboardEventGtk.
2309
2310         * PlatformGTK.cmake:
2311         * platform/PlatformKeyboardEvent.h:
2312         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
2313         * platform/gtk/CompositionResults.h: Removed.
2314         * platform/gtk/PlatformKeyboardEventGtk.cpp:
2315         (WebCore::PlatformKeyboardEvent::disambiguateKeyDownEvent):
2316
2317 2019-10-27  Antoine Quint  <graouts@apple.com>
2318
2319         [Web Animations] getKeyframes() doesn't return the right timing function for declarative animations
2320         https://bugs.webkit.org/show_bug.cgi?id=203475
2321
2322         Reviewed by Dean Jackson.
2323
2324         We had two bugs for declarative animations and the "easing" property for keyframes returned by KeyframeEffect::getKeyframes().
2325         First, we should return "linear" for all keyframes for CSS Transitions since the transition-timing-function is set as the "easing"
2326         property of the effect itself, not any indvidual keyframe. Then, we would always return the "easing" of the first keyframe while
2327         iterating over keyframes, which was an oversight.
2328
2329         * animation/KeyframeEffect.cpp:
2330         (WebCore::KeyframeEffect::getKeyframes):
2331
2332 2019-10-27  Simon Fraser  <simon.fraser@apple.com>
2333
2334         Fix nth-child An+B serialization to match the spec
2335         https://bugs.webkit.org/show_bug.cgi?id=203464
2336
2337         Reviewed by Antti Koivisto.
2338
2339         The spec says to expand "odd" and "even" to "2n+1" and "2n", and to simplify
2340         things like "1n+1" and "0n"
2341
2342         Tested by existing tests.
2343
2344         * css/CSSSelector.cpp:
2345         (WebCore::outputNthChildAnPlusB):
2346         (WebCore::CSSSelector::selectorText const):
2347
2348 2019-10-21  Jiewen Tan  <jiewen_tan@apple.com>
2349
2350         [WebAuthn] Warn users when multiple NFC tags present
2351         https://bugs.webkit.org/show_bug.cgi?id=200932
2352         <rdar://problem/54890736>
2353
2354         Reviewed by Brent Fulgham.
2355
2356         Covered by new tests in existing test file.
2357
2358         * testing/MockWebAuthenticationConfiguration.h:
2359         (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::encode const):
2360         (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):
2361         * testing/MockWebAuthenticationConfiguration.idl:
2362         Adds a new test option.
2363
2364 2019-10-27  Antti Koivisto  <antti@apple.com>
2365
2366         Move resolving direction and writing mode to PropertyCascade
2367         https://bugs.webkit.org/show_bug.cgi?id=203471
2368         Reviewed by Zalan Bujtas.
2369
2370         Simplify PropertyCascade call sites.
2371
2372         * css/StyleResolver.cpp:
2373         (WebCore::StyleResolver::styleForKeyframe):
2374         (WebCore::StyleResolver::styleForPage):
2375         (WebCore::StyleResolver::applyMatchedProperties):
2376         (WebCore::StyleResolver::applyPropertyToCurrentStyle):
2377         (WebCore::extractDirectionAndWritingMode): Deleted.
2378         * style/PropertyCascade.cpp:
2379         (WebCore::Style::PropertyCascade::PropertyCascade):
2380
2381         Add copying constructor that avoids re-resolving directions.
2382
2383         (WebCore::Style::PropertyCascade::buildCascade):
2384
2385         Factor into a function.
2386
2387         (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
2388         (WebCore::Style::PropertyCascade::resolveDirectionAndWritingMode):
2389
2390         The code moves here.
2391
2392         * style/PropertyCascade.h:
2393
2394 2019-10-27  Claudio Saavedra  <csaavedra@igalia.com>
2395
2396         [GTK][WPE] Test PublicSuffix.TopPrivatelyControlledDomain is failing since r250589
2397         https://bugs.webkit.org/show_bug.cgi?id=203193
2398
2399         Reviewed by Carlos Garcia Campos.
2400
2401         * platform/soup/PublicSuffixSoup.cpp:
2402         (WebCore::topPrivatelyControlledDomain): Skip any leading dots before using libsoup TLD API.
2403
2404 2019-10-27  Zalan Bujtas  <zalan@apple.com>
2405
2406         [LFC][IFC] Do not expand runs with collapsed trailing whitespace
2407         https://bugs.webkit.org/show_bug.cgi?id=203468
2408         <rdar://problem/56653689>
2409
2410         Reviewed by Antti Koivisto.
2411
2412         Runs are supposed to be a continuous chunk of content. Runs with trailing
2413         collapsed whitespace can't accommodate additional trailing content.
2414
2415         * layout/inlineformatting/InlineLine.cpp:
2416         (WebCore::Layout::Line::close):
2417         (WebCore::Layout::Line::Run::isWhitespace const): Deleted.
2418         (WebCore::Layout::Line::Run::canBeExtended const): Deleted.
2419         * layout/inlineformatting/InlineLine.h:
2420         (WebCore::Layout::Line::Run::expand):
2421         (WebCore::Layout::Line::Run::isWhitespace const):
2422         (WebCore::Layout::Line::Run::setIsCollapsed):
2423         (WebCore::Layout::Line::Run::canBeExtended const):
2424         (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):
2425
2426 2019-10-27  Zalan Bujtas  <zalan@apple.com>
2427
2428         [LFC][Painting] Use the dirty rect to decide what to paint
2429         https://bugs.webkit.org/show_bug.cgi?id=203467
2430         <rdar://problem/56653229>
2431
2432         Reviewed by Antti Koivisto.
2433
2434         This is a very basic dirty rect instersect check since we don't yet have layout overflow.
2435         It enables us to not paint the entire content on every paint frame. 
2436
2437         * layout/LayoutContext.cpp:
2438         (WebCore::Layout::LayoutContext::paint):
2439         * layout/LayoutContext.h:
2440         * layout/displaytree/DisplayPainter.cpp:
2441         (WebCore::Display::paintBoxDecorationAndChildren):
2442         (WebCore::Display::Painter::paint):
2443         * layout/displaytree/DisplayPainter.h:
2444         * page/FrameView.cpp:
2445         (WebCore::FrameView::paintContents):
2446
2447 2019-10-26  youenn fablet  <youenn@apple.com>
2448
2449         Enforce user gesture for getUserMedia in case a previous getUserMedia call was denied
2450         https://bugs.webkit.org/show_bug.cgi?id=203362
2451
2452         Reviewed by Eric Carlson.
2453
2454         Compute whether a media request is user priviledged or not.
2455         It is priviledged if it is created as part of a user gesture and no request of the same type
2456         has been previously created for the same user gesture. 
2457         If getDisplayMedia is called twice as part of a single user gesture, getDisplaMedia will reject for the second call.
2458
2459         Test: fast/mediastream/getUserMedia-deny-persistency5.html and updated test.
2460
2461         * Modules/mediastream/MediaDevices.cpp:
2462         (WebCore::MediaDevices::computeUserGesturePriviledge):
2463         (WebCore::MediaDevices::getUserMedia):
2464         (WebCore::MediaDevices::getDisplayMedia):
2465         (WebCore::MediaDevices::getUserMedia const): Deleted.
2466         (WebCore::MediaDevices::getDisplayMedia const): Deleted.
2467         * Modules/mediastream/MediaDevices.h:
2468         * platform/mediastream/MediaStreamRequest.h:
2469         (WebCore::MediaStreamRequest::encode const):
2470         (WebCore::MediaStreamRequest::decode):
2471
2472 2019-10-26  Zalan Bujtas  <zalan@apple.com>
2473
2474         [LFC] Do not layout on every paint frame.
2475         https://bugs.webkit.org/show_bug.cgi?id=203462
2476         <rdar://problem/56646779>
2477
2478         Reviewed by Antti Koivisto.
2479
2480         This is in preparation for being able to run layout benchmarks.
2481
2482         * layout/LayoutContext.cpp:
2483         (WebCore::Layout::LayoutContext::runLayoutAndVerify):
2484         (WebCore::Layout::LayoutContext::paint):
2485         (WebCore::Layout::LayoutContext::runLayoutAndPaint): Deleted.
2486         * layout/LayoutContext.h:
2487         * layout/LayoutState.cpp:
2488         (WebCore::Layout::LayoutState::LayoutState):
2489         * layout/LayoutState.h:
2490         * layout/layouttree/LayoutTreeBuilder.cpp:
2491         (WebCore::Layout::printLayoutTreeForLiveDocuments):
2492         * page/FrameView.cpp:
2493         (WebCore::FrameView::paintContents):
2494         * page/FrameViewLayoutContext.cpp:
2495         (WebCore::FrameViewLayoutContext::layoutUsingFormattingContext):
2496         (WebCore::FrameViewLayoutContext::layout):
2497         (WebCore::layoutUsingFormattingContext): Deleted.
2498         * page/FrameViewLayoutContext.h:
2499         (WebCore::FrameViewLayoutContext::initialLayoutState const):
2500
2501 2019-10-26  Rob Buis  <rbuis@igalia.com>
2502
2503         Main implementation for lazy image loading
2504         https://bugs.webkit.org/show_bug.cgi?id=200764
2505
2506         Reviewed by Simon Fraser.
2507
2508         Implement lazy image loading as specified here [1]. Lazy image loading
2509         is controlled by the loading attribute on <img>. When the loading attribute is
2510         auto or not specified, the behavior is like before this patch, i.e. loading is
2511         eager.
2512
2513         Not all loading=lazy requests will turn into actual lazy image loads, when
2514         scripting is turned off or images are not http(s), they will not be deferred.
2515
2516         This implementation relies on Intersection Observer and hence works on WK2 only.
2517
2518         Deferred images are painted using a simple outline until fully loaded.
2519
2520         [1] https://github.com/whatwg/html/pull/3752/files
2521
2522         Tests: http/tests/lazyload/attribute.html
2523                http/tests/lazyload/invisible-image.html
2524                http/tests/lazyload/js-image.html
2525                http/tests/lazyload/lazy-image-load-in-iframes-scripting-disabled.html
2526                http/tests/lazyload/lazy-image-load-in-iframes-scripting-enabled.html
2527                http/tests/lazyload/lazy.html
2528                http/tests/lazyload/scroll-element-moved-from-document.html
2529                http/tests/lazyload/scroll-element-removed-from-document.html
2530                http/tests/lazyload/scroll.html
2531
2532         * Sources.txt:
2533         * WebCore.xcodeproj/project.pbxproj:
2534         * dom/Document.cpp:
2535         (WebCore::Document::lazyLoadImageObserver):
2536         * dom/Document.h:
2537         * html/HTMLImageElement.cpp:
2538         (WebCore::HTMLImageElement::parseAttribute):
2539         (WebCore::HTMLImageElement::loadDeferredImage):
2540         (WebCore::HTMLImageElement::didMoveToNewDocument):
2541         (WebCore::HTMLImageElement::loadingForBindings const):
2542         (WebCore::HTMLImageElement::setLoadingForBindings):
2543         (WebCore::HTMLImageElement::isDeferred const):
2544         (WebCore::HTMLImageElement::isLazyLoadable const):
2545         * html/HTMLImageElement.h:
2546         * html/HTMLImageElement.idl:
2547         * html/LazyLoadImageObserver.cpp: Added.
2548         (WebCore::LazyLoadImageObserver::observe):
2549         (WebCore::LazyLoadImageObserver::unobserve):
2550         (WebCore::LazyLoadImageObserver::intersectionObserver):
2551         (WebCore::LazyLoadImageObserver::isObserved const):
2552         * html/LazyLoadImageObserver.h: Added.
2553         * html/parser/HTMLPreloadScanner.cpp:
2554         (WebCore::TokenPreloadScanner::StartTagScanner::createPreloadRequest):
2555         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
2556         * loader/ImageLoader.cpp:
2557         (WebCore::ImageLoader::updateFromElement):
2558         (WebCore::ImageLoader::notifyFinished):
2559         (WebCore::ImageLoader::loadDeferredImage):
2560         * loader/ImageLoader.h:
2561         (WebCore::ImageLoader::isDeferred const):
2562         * loader/cache/CachedImage.h:
2563         * loader/cache/CachedResourceLoader.cpp:
2564         (WebCore::CachedResourceLoader::requestImage):
2565         (WebCore::CachedResourceLoader::requestResource):
2566         (WebCore::CachedResourceLoader::determineRevalidationPolicy const):
2567         (WebCore::CachedResourceLoader::clientDefersImage const):
2568         (WebCore::CachedResourceLoader::shouldDeferImageLoad const):
2569         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
2570         * loader/cache/CachedResourceLoader.h:
2571         * rendering/RenderImage.cpp:
2572         (WebCore::isDeferredImage):
2573         (WebCore::RenderImage::paintReplaced):
2574
2575 2019-10-26  Antti Koivisto  <antti@apple.com>
2576
2577         Move StyleResolver::applyProperty to PropertyCascade
2578         https://bugs.webkit.org/show_bug.cgi?id=203458
2579
2580         Reviewed by Zalan Bujtas.
2581
2582         Move the more of the property applying code out of StyleResolver.
2583
2584         * css/StyleResolver.cpp:
2585         (WebCore::StyleResolver::applyPropertyToCurrentStyle):
2586         (WebCore::isValidVisitedLinkProperty): Deleted.
2587         (WebCore::StyleResolver::applyProperty): Deleted.
2588         (WebCore::StyleResolver::resolvedVariableValue const): Deleted.
2589         * css/StyleResolver.h:
2590         * style/PropertyCascade.cpp:
2591         (WebCore::Style::isValidVisitedLinkProperty):
2592         (WebCore::Style::PropertyCascade::applyCustomProperty):
2593         (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
2594         (WebCore::Style::PropertyCascade::applyProperty):
2595         (WebCore::Style::PropertyCascade::resolveValue):
2596         (WebCore::Style::PropertyCascade::resolvedVariableValue):
2597         * style/PropertyCascade.h:
2598         (WebCore::Style::PropertyCascade::property const):
2599         (WebCore::Style::PropertyCascade::property): Deleted.
2600         (WebCore::Style::PropertyCascade::hasAppliedProperty const): Deleted.
2601
2602 2019-10-26  Zalan Bujtas  <zalan@apple.com>
2603
2604         [LFC][IFC] Completely collapsed runs should not have advance width
2605         https://bugs.webkit.org/show_bug.cgi?id=203457
2606         <rdar://problem/56645024>
2607
2608         Reviewed by Antti Koivisto.
2609
2610         Let's reset the advance width for completely collapsed runs (any a collapsible space immediatelly following another
2611         collapsible space).
2612         https://drafts.csswg.org/css-text-3/#white-space-phase-1
2613
2614         * layout/inlineformatting/InlineFormattingContext.cpp:
2615         (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
2616         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
2617         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
2618         * layout/inlineformatting/InlineLine.cpp:
2619         (WebCore::Layout::Line::Run::canBeExtended const):
2620         (WebCore::Layout::Line::isVisuallyEmpty const):
2621         (WebCore::Layout::Line::removeTrailingTrimmableContent):
2622         (WebCore::Layout::Line::trailingTrimmableWidth const):
2623         (WebCore::Layout::Line::appendTextContent):
2624         * layout/inlineformatting/InlineLine.h:
2625         (WebCore::Layout::Line::Run::expand):
2626         (WebCore::Layout::Line::Run::isCollapsedToZeroAdvanceWidth const):
2627         (WebCore::Layout::Line::Run::setCollapsesToZeroAdvanceWidth):
2628         (WebCore::Layout::Line::Run::isVisuallyEmpty const): Deleted.
2629         (WebCore::Layout::Line::Run::setVisuallyIsEmpty): Deleted.
2630
2631 2019-10-26  Antti Koivisto  <antti@apple.com>
2632
2633         Build cascade in PropertyCascade constructor
2634         https://bugs.webkit.org/show_bug.cgi?id=203455
2635
2636         Reviewed by Zalan Bujtas.
2637
2638         Instead of calling addNormalMatches/addImportantMatches several times, clients now simply
2639         pass the desired cascade levels to the constructor.
2640
2641         * css/StyleResolver.cpp:
2642         (WebCore::StyleResolver::styleForKeyframe):
2643         (WebCore::StyleResolver::styleForPage):
2644         (WebCore::StyleResolver::applyMatchedProperties):
2645         (WebCore::StyleResolver::applyPropertyToCurrentStyle):
2646         * style/PropertyCascade.cpp:
2647         (WebCore::Style::PropertyCascade::PropertyCascade):
2648         (WebCore::Style::PropertyCascade::addMatch):
2649         (WebCore::Style::PropertyCascade::addNormalMatches):
2650
2651         Return if there were any important matches so we may skip the step later.
2652
2653         (WebCore::Style::PropertyCascade::addImportantMatches):
2654         (WebCore::Style::PropertyCascade::applyDeferredProperties):
2655         (WebCore::Style::PropertyCascade::applyPropertiesImpl):
2656         (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
2657         (WebCore::Style::PropertyCascade::applyProperty):
2658         (WebCore::Style::PropertyCascade::Property::apply): Deleted.
2659
2660         Also make this PropertyCascade::applyProperty
2661
2662         * style/PropertyCascade.h:
2663
2664 2019-10-26  Chris Lord  <clord@igalia.com>
2665
2666         Put OffscreenCanvas behind a build flag
2667         https://bugs.webkit.org/show_bug.cgi?id=203146
2668
2669         Reviewed by Ryosuke Niwa.
2670
2671         No new tests. No behavior changes.
2672
2673         * Configurations/FeatureDefines.xcconfig:
2674         * bindings/js/JSEventTargetCustom.cpp:
2675         * bindings/js/JSOffscreenCanvasRenderingContext2DCustom.cpp:
2676         * dom/EventTargetFactory.in:
2677         * html/ImageBitmap.idl:
2678         * html/OffscreenCanvas.cpp:
2679         * html/OffscreenCanvas.h:
2680         * html/OffscreenCanvas.idl:
2681         * html/canvas/CanvasRenderingContext.cpp:
2682         * html/canvas/ImageBitmapRenderingContext.idl:
2683         * html/canvas/OffscreenCanvasRenderingContext2D.cpp:
2684         * html/canvas/OffscreenCanvasRenderingContext2D.h:
2685         * html/canvas/OffscreenCanvasRenderingContext2D.idl:
2686         * html/canvas/WebGLRenderingContextBase.cpp:
2687         (WebCore::WebGLRenderingContextBase::canvas):
2688         * html/canvas/WebGLRenderingContextBase.h:
2689         * html/canvas/WebGLRenderingContextBase.idl:
2690         * inspector/agents/InspectorCanvasAgent.cpp:
2691         * page/PageConsoleClient.cpp:
2692         (WebCore::canvasRenderingContext):
2693         * page/RuntimeEnabledFeatures.h:
2694         (WebCore::RuntimeEnabledFeatures::setImageBitmapEnabled):
2695         (WebCore::RuntimeEnabledFeatures::imageBitmapEnabled const):
2696         (WebCore::RuntimeEnabledFeatures::setOffscreenCanvasEnabled):
2697         (WebCore::RuntimeEnabledFeatures::offscreenCanvasEnabled const):
2698         * page/WindowOrWorkerGlobalScope.idl:
2699
2700 2019-10-25  Eric Carlson  <eric.carlson@apple.com>
2701
2702         Support for callbacks for manifest events
2703         https://bugs.webkit.org/show_bug.cgi?id=202101
2704         <rdar://problem/54277362>
2705
2706         Reviewed by Jer Noble.
2707         
2708         Use AVPlayerItemMetadataCollector to get manifest based time metadata. Use 
2709         AVPlayerItemMetadataOutput to get time metadata instead of listening for a "timedMetadata"
2710         KVO on AVPlayer.
2711
2712         No new tests, existing test updated.
2713
2714         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2715         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2716         (WebCore::globalMetadataProcessingQueue):
2717         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
2718         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
2719         (WebCore::metadataType):
2720         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataGroupDidArrive):
2721         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2722         (WebCore::itemKVOProperties):
2723         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
2724         (-[WebCoreAVFMovieObserver metadataOutput:didOutputTimedMetadataGroups:fromPlayerItemTrack:]):
2725         (-[WebCoreAVFMovieObserver metadataCollector:didCollectDateRangeMetadataGroups:indexesOfNewGroups:indexesOfModifiedGroups:]):
2726
2727 2019-10-25  Andy Estes  <aestes@apple.com>
2728
2729         [Quick Look] Move the QLPreviewConverter delegate into PreviewConverter and vend a C++ client interface
2730         https://bugs.webkit.org/show_bug.cgi?id=203396
2731
2732         Reviewed by Alex Christensen.
2733
2734         PreviewConverter existed as a thin wrapper around QLPreviewConverter for use by
2735         LegacyPreviewLoader and Quick Look NSData loading in WebKitLegacy. This patch makes two
2736         changes to this arrangement:
2737
2738         1. The QLPreviewConverter delegate and the bulk of the conversion state machine was moved
2739         into PreviewConverter, which now vends a C++ client interface. LegacyPreviewLoader is now a
2740         client of its PreviewConverter, retaining the responsiility of interacting with the
2741         ResourceLoader and LegacyPreviewLoaderClient.
2742
2743         2. The Quick Look NSData loading code for WebKitLegacy now uses QLPreviewConverter API
2744         directly rather than creating a PreviewConverter. This code path does not require a delegate
2745         nor any of the other logic in PreviewConverter.
2746
2747         This change also organizes PreviewConverter into a cross-platform .cpp file and an
2748         iOS-specific .mm file for the direct usage of QLPreviewConverter API. LegacyPreviewConverter
2749         was also organized such that it can be changed from .mm to .cpp in a future patch.
2750
2751         No change in behavior. Covered by existing API and layout tests.
2752
2753         * Sources.txt:
2754         * WebCore.xcodeproj/project.pbxproj:
2755
2756         * loader/DocumentLoader.cpp:
2757         (WebCore::DocumentLoader::setPreviewConverter):
2758         * loader/DocumentLoader.h: Changed m_previewConverter from std::unique_ptr to RefPtr.
2759
2760         * loader/SubresourceLoader.cpp:
2761         (WebCore::SubresourceLoader::didReceiveResponse): Used makeUnique directly instead of
2762         LegacyPreviewLoader::create().
2763
2764         * loader/ios/LegacyPreviewLoader.h: Privately inherited from PreviewConverterClient and
2765         PreviewConverterProvider and migrated WebPreviewLoader ivars to member variables.
2766
2767         * loader/ios/LegacyPreviewLoader.mm:
2768         (WebCore::makeClient):
2769         (WebCore::LegacyPreviewLoader::didReceiveBuffer):
2770         (WebCore::LegacyPreviewLoader::didFinishLoading):
2771         (WebCore::LegacyPreviewLoader::didFail):
2772         (WebCore::LegacyPreviewLoader::previewConverterDidStartConverting):
2773         (WebCore::LegacyPreviewLoader::previewConverterDidReceiveData):
2774         (WebCore::LegacyPreviewLoader::previewConverterDidFinishConverting):
2775         (WebCore::LegacyPreviewLoader::previewConverterDidFailUpdating):
2776         (WebCore::LegacyPreviewLoader::previewConverterDidFailConverting):
2777         (WebCore::LegacyPreviewLoader::providePasswordForPreviewConverter):
2778         (WebCore::LegacyPreviewLoader::provideMainResourceForPreviewConverter):
2779         (WebCore::LegacyPreviewLoader::LegacyPreviewLoader):
2780         (WebCore::LegacyPreviewLoader::didReceiveData):
2781         (WebCore::LegacyPreviewLoader::didReceiveResponse):
2782         (testingClient): Deleted.
2783         (emptyClient): Deleted.
2784         (-[WebPreviewLoader initWithResourceLoader:resourceResponse:]): Deleted.
2785         (-[WebPreviewLoader appendDataArray:]): Deleted.
2786         (-[WebPreviewLoader finishedAppending]): Deleted.
2787         (-[WebPreviewLoader failed]): Deleted.
2788         (-[WebPreviewLoader _loadPreviewIfNeeded]): Deleted.
2789         (-[WebPreviewLoader connection:didReceiveData:lengthReceived:]): Deleted.
2790         (-[WebPreviewLoader connectionDidFinishLoading:]): Deleted.
2791         (isQuickLookPasswordError): Deleted.
2792         (-[WebPreviewLoader connection:didFailWithError:]): Deleted.
2793         (WebCore::LegacyPreviewLoader::~LegacyPreviewLoader): Deleted.
2794         (WebCore::LegacyPreviewLoader::create): Deleted.
2795
2796         * platform/PreviewConverter.cpp: Added.
2797         (WebCore::PreviewConverter::supportsMIMEType):
2798         (WebCore::PreviewConverter::previewResponse const):
2799         (WebCore::PreviewConverter::previewError const):
2800         (WebCore::PreviewConverter::previewData const):
2801         (WebCore::PreviewConverter::updateMainResource):
2802         (WebCore::PreviewConverter::appendFromBuffer):
2803         (WebCore::PreviewConverter::finishUpdating):
2804         (WebCore::PreviewConverter::failedUpdating):
2805         (WebCore::PreviewConverter::hasClient const):
2806         (WebCore::PreviewConverter::addClient):
2807         (WebCore::PreviewConverter::removeClient):
2808         (WebCore::sharedPasswordForTesting):
2809         (WebCore::PreviewConverter::passwordForTesting):
2810         (WebCore::PreviewConverter::setPasswordForTesting):
2811         (WebCore::PreviewConverter::iterateClients):
2812         (WebCore::PreviewConverter::didAddClient):
2813         (WebCore::PreviewConverter::didFailConvertingWithError):
2814         (WebCore::PreviewConverter::didFailUpdating):
2815         (WebCore::PreviewConverter::replayToClient):
2816         (WebCore::PreviewConverter::delegateDidReceiveData):
2817         (WebCore::PreviewConverter::delegateDidFinishLoading):
2818         (WebCore::PreviewConverter::delegateDidFailWithError):
2819         * platform/PreviewConverter.h:
2820         (WebCore::PreviewConverter::PreviewConverter): Deleted.
2821         (WebCore::PreviewConverter::platformConverter const): Deleted.
2822         * platform/PreviewConverterClient.h: Copied from Source/WebCore/platform/PreviewConverter.h.
2823         * platform/PreviewConverterProvider.h: Copied from Source/WebCore/platform/PreviewConverter.h.
2824         * platform/ios/PreviewConverterIOS.mm:
2825         (-[WebPreviewConverterDelegate initWithDelegate:]):
2826         (-[WebPreviewConverterDelegate connection:didReceiveData:lengthReceived:]):
2827         (-[WebPreviewConverterDelegate connectionDidFinishLoading:]):
2828         (-[WebPreviewConverterDelegate connection:didFailWithError:]):
2829         (WebCore::PreviewConverter::PreviewConverter):
2830         (WebCore::PreviewConverter::platformSupportedMIMETypes):
2831         (WebCore::PreviewConverter::safeRequest const):
2832         (WebCore::PreviewConverter::platformPreviewResponse const):
2833         (WebCore::PreviewConverter::platformAppend):
2834         (WebCore::PreviewConverter::platformFinishedAppending):
2835         (WebCore::PreviewConverter::platformFailedAppending):
2836         (WebCore::PreviewConverter::isPlatformPasswordError const):
2837         (WebCore::optionsWithPassword):
2838         (WebCore::PreviewConverter::platformUnlockWithPassword):
2839         (WebCore::PreviewConverter::supportsMIMEType): Deleted.
2840         (WebCore::PreviewConverter::previewRequest const): Deleted.
2841         (WebCore::PreviewConverter::previewResponse const): Deleted.
2842
2843         * platform/ios/QuickLook.mm:
2844         (WebCore::registerQLPreviewConverterIfNeeded): Used QLPreviewConverter directly.
2845
2846 2019-10-25  Yury Semikhatsky  <yurys@chromium.org>
2847
2848         Web Inspector: support emulateUserGesture parameter in Runtime.callFunctionOn
2849         https://bugs.webkit.org/show_bug.cgi?id=200262
2850
2851         Reviewed by Devin Rousso.
2852
2853         Support emulateUserGesture in Runtime.callFunctionOn
2854
2855         Tests: inspector/runtime/callFunctionOn-emulateUserGesture-userIsInteracting.html
2856                inspector/runtime/callFunctionOn-emulateUserGesture.html
2857
2858         * Sources.txt:
2859         * WebCore.xcodeproj/project.pbxproj:
2860         * inspector/agents/page/PageDebuggerAgent.cpp:
2861         (WebCore::PageDebuggerAgent::evaluateOnCallFrame):
2862         * inspector/agents/page/PageRuntimeAgent.cpp:
2863         (WebCore::asBool):
2864         (WebCore::PageRuntimeAgent::evaluate):
2865         (WebCore::PageRuntimeAgent::callFunctionOn):
2866         * inspector/agents/page/PageRuntimeAgent.h:
2867         * inspector/agents/page/UserGestureEmulationScope.cpp: Added.
2868         (WebCore::UserGestureEmulationScope::UserGestureEmulationScope): Extracted logic
2869         of overriding user gesture into the scope object to share it between evaluate and
2870         callFunctionOn as well as PageDebuggerAgent::evaluateOnCallFrame.
2871         (WebCore::UserGestureEmulationScope::~UserGestureEmulationScope):
2872         * inspector/agents/page/UserGestureEmulationScope.h: Added.
2873
2874 2019-10-25  Zalan Bujtas  <zalan@apple.com>
2875
2876         [LFC][IFC] Remove redundant LineLayout::LineInput c'tor
2877         https://bugs.webkit.org/show_bug.cgi?id=203425
2878         <rdar://problem/56624666>
2879
2880         Reviewed by Antti Koivisto.
2881
2882         Move the SkipAligment paramenter to the LineLayout from LineLayout::LineInput, because it's the property of the layout and not an input to the actual line.
2883
2884         * layout/inlineformatting/InlineFormattingContext.cpp:
2885         (WebCore::Layout::InlineFormattingContext::lineLayout):
2886         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
2887         * layout/inlineformatting/InlineLineLayout.cpp:
2888         (WebCore::Layout::LineLayout::LineInput::LineInput):
2889         (WebCore::Layout::LineLayout::LineLayout):
2890         * layout/inlineformatting/InlineLineLayout.h:
2891
2892 2019-10-25  Tim Horton  <timothy_horton@apple.com>
2893
2894         macCatalyst: Build failures in projects that have both AppKit and WAK headers
2895         https://bugs.webkit.org/show_bug.cgi?id=203429
2896         <rdar://problem/56598370>
2897
2898         Reviewed by Sam Weinig.
2899
2900         * platform/ios/wak/WAKAppKitStubs.h:
2901         Slightly abuse the preprocessor to avoid errors due to redefining AppKit symbols.
2902
2903 2019-10-25  Antti Koivisto  <antti@apple.com>
2904
2905         Move more cascade related code from StyleResolver to PropertyCascade
2906         https://bugs.webkit.org/show_bug.cgi?id=203409
2907
2908         Reviewed by Zalan Bujtas.
2909
2910         - Move a bunch of StyleResolver member functions to PropertyCascade.
2911         - Make ApplyCascadedPropertyState part of the PropertyCascade internal state.
2912         - Pass around a reference to the PropertyCascade itself instead of the state object
2913           The state contained PropertyCascade member already so this is equivalent but simpler.
2914
2915         * css/CSSVariableReferenceValue.cpp:
2916         (WebCore::resolveVariableFallback):
2917         (WebCore::resolveVariableReference):
2918         (WebCore::resolveTokenRange):
2919         (WebCore::CSSVariableReferenceValue::resolveVariableReferences const):
2920         * css/CSSVariableReferenceValue.h:
2921         * css/ElementRuleCollector.h:
2922         * css/StyleResolver.cpp:
2923         (WebCore::StyleResolver::styleForKeyframe):
2924         (WebCore::StyleResolver::styleForPage):
2925         (WebCore::StyleResolver::applyMatchedProperties):
2926         (WebCore::StyleResolver::applyPropertyToCurrentStyle):
2927         (WebCore::StyleResolver::applyProperty):
2928         (WebCore::StyleResolver::resolvedVariableValue const):
2929         (WebCore::StyleResolver::cascadedPropertiesForRollback): Deleted.
2930         (WebCore::StyleResolver::applyCascadedCustomProperty): Deleted.
2931         (WebCore::StyleResolver::applyCascadedProperties): Deleted.
2932         (WebCore::StyleResolver::applyCascadedPropertiesImpl): Deleted.
2933
2934         These become PropertyCascade members.
2935
2936         * css/StyleResolver.h:
2937         (WebCore::StyleResolver::State::authorRollback const): Deleted.
2938         (WebCore::StyleResolver::State::userRollback const): Deleted.
2939         (WebCore::StyleResolver::State::setAuthorRollback): Deleted.
2940         (WebCore::StyleResolver::State::setUserRollback): Deleted.
2941
2942         Rollbacks are now owned by PropertyCascade.
2943
2944         * css/parser/CSSParser.cpp:
2945         (WebCore::CSSParser::parseValueWithVariableReferences):
2946         * css/parser/CSSParser.h:
2947         * style/PropertyCascade.cpp:
2948         (WebCore::Style::PropertyCascade::PropertyCascade):
2949         (WebCore::Style::PropertyCascade::set):
2950         (WebCore::Style::PropertyCascade::addNormalMatches):
2951         (WebCore::Style::PropertyCascade::addImportantMatches):
2952         (WebCore::Style::PropertyCascade::applyDeferredProperties):
2953         (WebCore::Style::PropertyCascade::applyProperties):
2954         (WebCore::Style::PropertyCascade::applyPropertiesImpl):
2955         (WebCore::Style::PropertyCascade::applyCustomProperties):
2956         (WebCore::Style::PropertyCascade::applyCustomProperty):
2957         (WebCore::Style::PropertyCascade::propertyCascadeForRollback):
2958         (WebCore::Style::PropertyCascade::Property::apply):
2959         * style/PropertyCascade.h:
2960         (WebCore::Style::PropertyCascade::styleResolver):
2961         (WebCore::Style::PropertyCascade::hasAppliedProperty const):
2962         (WebCore::Style::PropertyCascade::customProperties): Deleted.
2963
2964 2019-10-25  Zalan Bujtas  <zalan@apple.com>
2965
2966         [LFC][IFC] Add support for no-wrap
2967         https://bugs.webkit.org/show_bug.cgi?id=203424
2968         <rdar://problem/56624136>
2969
2970         Reviewed by Antti Koivisto.
2971
2972         Consult the white-space style property about line wrapping when the content overflows and can't be split.
2973
2974         * layout/inlineformatting/InlineLineBreaker.cpp:
2975         (WebCore::Layout::isContentWrappingAllowed):
2976         (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
2977         (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
2978         * layout/inlineformatting/InlineLineBreaker.h:
2979
2980 2019-10-25  Commit Queue  <commit-queue@webkit.org>
2981
2982         Unreviewed, rolling out r251322.
2983         https://bugs.webkit.org/show_bug.cgi?id=203430
2984
2985         Causing more test failures after the rollout of resize event
2986         patch (Requested by rniwa on #webkit).
2987
2988         Reverted changeset:
2989
2990         "Integrate media query evaluation into HTML5 event loop"
2991         https://bugs.webkit.org/show_bug.cgi?id=203134
2992         https://trac.webkit.org/changeset/251322
2993
2994 2019-10-25  youenn fablet  <youenn@apple.com>
2995
2996         Introduce AudioTrackPrivateMediaStreamCocoa::clear()
2997         https://bugs.webkit.org/show_bug.cgi?id=203369
2998         <rdar://problem/49017262>
2999
3000         Reviewed by Jer Noble.
3001
3002         Introduce the clear method to make sure the AudioTrackPrivteMediaStreamCocoa is in a clean state.
3003         This will help further simplifications.
3004
3005         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3006         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
3007         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::updateTracks):
3008         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.cpp:
3009         (WebCore::AudioTrackPrivateMediaStreamCocoa::~AudioTrackPrivateMediaStreamCocoa):
3010         (WebCore::AudioTrackPrivateMediaStreamCocoa::clear):
3011         * platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
3012
3013 2019-10-25  Matt Lewis  <jlewis3@apple.com>
3014
3015         Rolling out r251579,r251162,r251512,r251500, and r251498 for build failures
3016         and test failures
3017
3018         Unreviewed rollout.
3019
3020         * Modules/webauthn/AuthenticatorCoordinator.cpp:
3021         * Modules/webauthn/WebAuthenticationConstants.h:
3022         * testing/MockWebAuthenticationConfiguration.h:
3023         (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::encode const):
3024         (WebCore::MockWebAuthenticationConfiguration::NfcConfiguration::decode):
3025         * testing/MockWebAuthenticationConfiguration.idl:
3026
3027 2019-10-24  Ryosuke Niwa  <rniwa@webkit.org>
3028
3029         Add exclusion rules to text manipulation SPI
3030         https://bugs.webkit.org/show_bug.cgi?id=203398
3031         <rdar://problem/56567256>
3032
3033         Reviewed by Wenson Hsieh.
3034
3035         This patch adds the ability to define a ordered set of rules to exclude or include content an element of
3036         a certain name or one with a certain attribute value.
3037
3038         Also made completeManipulation return more detailed errors for debugging purposes.
3039
3040         Tests: TextManipulation.StartTextManipulationApplySingleExcluionRuleForElement
3041                TextManipulation.StartTextManipulationApplyInclusionExclusionRulesForAttributes
3042                TextManipulation.CompleteTextManipulationFailWhenExclusionIsViolated
3043
3044         * editing/TextManipulationController.cpp:
3045         (WebCore::TextManipulationController::ExclusionRule::match const): Added.
3046         (WebCore::ExclusionRuleMatcher): Added. This class is responsible for figuring out whether a given node
3047         is excluded or included in the text manipulation.
3048         (WebCore::ExclusionRuleMatcher::ExclusionRuleMatcher): Added.
3049         (WebCore::ExclusionRuleMatcher::isExcluded): Added.
3050         (WebCore::ExclusionRuleMatcher::typeForElement): Added.
3051         (WebCore::TextManipulationController::startObservingParagraphs): Added a Vector of ExclusionRule as
3052         an argument.
3053         (WebCore::TextManipulationController::completeManipulation):
3054         (WebCore::TextManipulationController::replace):
3055         * editing/TextManipulationController.h:
3056         (WebCore::TextManipulationController::ExclusionRule): Added.
3057         (WebCore::TextManipulationController::ManipulationResult): Added.
3058         (WebCore::TextManipulationController::ManipulationToken::encode const): Include isExcluded boolean.
3059         (WebCore::TextManipulationController::ManipulationToken::decode): Ditto.
3060         (WebCore::TextManipulationController::ExclusionRule::encode const): Added.
3061         (WebCore::TextManipulationController::ExclusionRule::decode): Added.
3062         (WebCore::TextManipulationController::ExclusionRule::ElementRule::encode const): Added.
3063         (WebCore::TextManipulationController::ExclusionRule::ElementRule::decode): Added.
3064         (WebCore::TextManipulationController::ExclusionRule::AttributeRule::encode const): Added.
3065         (WebCore::TextManipulationController::ExclusionRule::AttributeRule::decode): Added.
3066
3067 2019-10-25  Simon Fraser  <simon.fraser@apple.com>
3068
3069         Move code around in CSSCalculationValue.cpp
3070         https://bugs.webkit.org/show_bug.cgi?id=203397
3071
3072         Reviewed by Zalan Bujtas.
3073
3074         Large amounts of code were in inline (but virtual) functions in CSSCalcPrimitiveValue, CSSCalcOperation
3075         and CSSCalcExpressionNodeParser, making it hard to navigate around this file. Move code into
3076         out-of-line functions. No behavior changes.
3077
3078         * css/CSSCalculationValue.cpp:
3079         (WebCore::CSSCalcPrimitiveValue::createCalcExpression const):
3080         (WebCore::CSSCalcPrimitiveValue::doubleValue const):
3081         (WebCore::CSSCalcPrimitiveValue::computeLengthPx const):
3082         (WebCore::CSSCalcPrimitiveValue::collectDirectComputationalDependencies const):
3083         (WebCore::CSSCalcPrimitiveValue::collectDirectRootComputationalDependencies const):
3084         (WebCore::CSSCalcPrimitiveValue::equals const):
3085         (WebCore::CSSCalcOperation::create):
3086         (WebCore::CSSCalcOperation::createMinOrMax):
3087         (WebCore::CSSCalcOperation::createSimplified):
3088         (WebCore::CSSCalcOperation::primitiveType const):
3089         (WebCore::CSSCalcOperation::createCalcExpression const):
3090         (WebCore::CSSCalcOperation::doubleValue const):
3091         (WebCore::CSSCalcOperation::computeLengthPx const):
3092         (WebCore::CSSCalcOperation::collectDirectComputationalDependencies const):
3093         (WebCore::CSSCalcOperation::collectDirectRootComputationalDependencies const):
3094         (WebCore::CSSCalcOperation::buildCssText):
3095         (WebCore::CSSCalcOperation::customCSSText const):
3096         (WebCore::CSSCalcOperation::equals const):
3097         (WebCore::CSSCalcOperation::evaluateOperator):
3098         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
3099         (WebCore::CSSCalcExpressionNodeParser::parseValue):
3100         (WebCore::checkDepthAndIndex):
3101         (WebCore::CSSCalcExpressionNodeParser::parseValueTerm):
3102         (WebCore::CSSCalcExpressionNodeParser::parseValueMultiplicativeExpression):
3103         (WebCore::CSSCalcExpressionNodeParser::parseAdditiveValueExpression):
3104         (WebCore::CSSCalcExpressionNodeParser::parseMinMaxExpression):
3105         (WebCore::CSSCalcExpressionNodeParser::parseValueExpression):
3106         (WebCore::CSSCalcValue::customCSSText const):
3107         (WebCore::CSSCalcValue::equals const):
3108         (WebCore::CSSCalcValue::clampToPermittedRange const):
3109         (WebCore::CSSCalcValue::doubleValue const):
3110         (WebCore::CSSCalcValue::computeLengthPx const):
3111
3112 2019-10-25  youenn fablet  <youenn@apple.com>
3113
3114         mp4 video element broken with service worker
3115         https://bugs.webkit.org/show_bug.cgi?id=184447
3116         <rdar://problem/39313155>
3117
3118         Reviewed by Chris Dumez.
3119
3120         Update fetch header handling to properly handle range header as per https://fetch.spec.whatwg.org/#headers-class.
3121         In particular, remove thre range header from a Request/Headers object whenever modified.
3122         Add checks so that range responses are not reused for non range requests.
3123         For that purpose, add a range-requested flag to ResourceResponse.
3124         Ass helper routines implementing part of fetch spec.
3125         Covered by enabled test.
3126
3127         * Modules/fetch/FetchHeaders.cpp:
3128         (WebCore::removePrivilegedNoCORSRequestHeaders):
3129         (WebCore::appendToHeaderMap):
3130         (WebCore::FetchHeaders::remove):
3131         (WebCore::FetchHeaders::set):
3132         * Modules/fetch/FetchHeaders.h:
3133         (WebCore::FetchHeaders::setInternalHeaders):
3134         * Modules/fetch/FetchRequest.cpp:
3135         (WebCore::FetchRequest::initializeWith):
3136         * loader/SubresourceLoader.cpp:
3137         (WebCore::SubresourceLoader::didReceiveResponse):
3138         * loader/cache/CachedResourceLoader.cpp:
3139         (WebCore::CachedResourceLoader::requestResource):
3140         * platform/network/HTTPParsers.cpp:
3141         (WebCore::isNoCORSSafelistedRequestHeaderName):
3142         (WebCore::isPriviledgedNoCORSRequestHeaderName):
3143         * platform/network/HTTPParsers.h:
3144         * platform/network/ResourceResponseBase.cpp:
3145         (WebCore::ResourceResponseBase::crossThreadData const):
3146         (WebCore::ResourceResponseBase::fromCrossThreadData):
3147         * platform/network/ResourceResponseBase.h:
3148         (WebCore::ResourceResponseBase::isRangeRequested const):
3149         (WebCore::ResourceResponseBase::setAsRangeRequested):
3150         (WebCore::ResourceResponseBase::encode const):
3151         (WebCore::ResourceResponseBase::decode):
3152
3153 2019-10-25  Chris Dumez  <cdumez@apple.com>
3154
3155         Unreviewed, rolling out r251586.
3156
3157         New test is flaky
3158
3159         Reverted changeset:
3160
3161         "DatabaseContext should not prevent entering the back/forward
3162         cache"
3163         https://bugs.webkit.org/show_bug.cgi?id=203103
3164         https://trac.webkit.org/changeset/251586
3165
3166 2019-10-25  Zalan Bujtas  <zalan@apple.com>
3167
3168         [LFC][IFC] Add support for preserved new line (pre, pre-wrap, break-spaces, pre-line)
3169         https://bugs.webkit.org/show_bug.cgi?id=203395
3170         <rdar://problem/56606243>
3171
3172         Reviewed by Antti Koivisto.
3173
3174         <pre>Let's wrap the line
3175         when the inline item's type is forced line break.</pre>
3176
3177         * Sources.txt:
3178         * WebCore.xcodeproj/project.pbxproj:
3179         * layout/LayoutContext.h:
3180         * layout/inlineformatting/InlineFormattingContext.cpp:
3181         (WebCore::Layout::InlineFormattingContext::collectInlineContent):
3182         (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine):
3183         * layout/inlineformatting/InlineFormattingContextQuirks.cpp:
3184         (WebCore::Layout::InlineFormattingContext::Quirks::lineDescentNeedsCollapsing const):
3185         * layout/inlineformatting/InlineItem.cpp: Copied from Source/WebCore/layout/tableformatting/TableInvalidation.cpp.
3186         (WebCore::Layout::InlineItem::isForcedLineBreak const):
3187         (WebCore::Layout::InlineItem::isText const):
3188         * layout/inlineformatting/InlineItem.h:
3189         (WebCore::Layout::InlineItem::isBox const):
3190         (WebCore::Layout::InlineItem::isText const): Deleted.
3191         (WebCore::Layout::InlineItem::isHardLineBreak const): Deleted.
3192         (WebCore::Layout::InlineItem::isLineBreak const): Deleted.
3193         * layout/inlineformatting/InlineLine.cpp:
3194         (WebCore::Layout::Line::close):
3195         (WebCore::Layout::Line::alignContentVertically):
3196         (WebCore::Layout::Line::append):
3197         (WebCore::Layout::Line::appendLineBreak):
3198         (WebCore::Layout::Line::adjustBaselineAndLineHeight):
3199         (WebCore::Layout::Line::inlineItemContentHeight const):
3200         (WebCore::Layout::Line::appendHardLineBreak): Deleted.
3201         * layout/inlineformatting/InlineLine.h:
3202         (WebCore::Layout::Line::Run::isText const):
3203         (WebCore::Layout::Line::Run::isForcedLineBreak const):
3204         (WebCore::Layout::Line::Run::isLineBreak const): Deleted.
3205         * layout/inlineformatting/InlineLineLayout.cpp:
3206         (WebCore::Layout::inlineItemWidth):
3207         (WebCore::Layout::LineLayout::placeInlineItem):
3208         (WebCore::Layout::LineLayout::shouldProcessUncommittedContent const):
3209         * layout/inlineformatting/InlineTextItem.h:
3210         (WebCore::Layout::InlineTextItem::isSegmentBreak const):
3211         * layout/tableformatting/TableInvalidation.cpp:
3212
3213 2019-10-25  Chris Dumez  <cdumez@apple.com>
3214
3215         DatabaseContext should not prevent entering the back/forward cache
3216         https://bugs.webkit.org/show_bug.cgi?id=203103
3217
3218         Reviewed by Geoffrey Garen.
3219
3220         Let pages with active webdatabase transactions into the back/forward cache. We make sure
3221         to queue tasks that run script to the Window event loop, so that they get delayed when
3222         the document is suspended.
3223
3224         No new tests, updated existing test.
3225
3226         * Modules/webdatabase/Database.cpp:
3227         (WebCore::Database::runTransaction):
3228         * Modules/webdatabase/DatabaseContext.cpp:
3229         (WebCore::DatabaseContext::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
3230         * Modules/webdatabase/DatabaseContext.h:
3231         * Modules/webdatabase/DatabaseManager.cpp:
3232         (WebCore::DatabaseManager::openDatabase):
3233         * Modules/webdatabase/SQLTransaction.cpp:
3234         (WebCore::SQLTransaction::performPendingCallback):
3235
3236 2019-10-24  Mark Lam  <mark.lam@apple.com>
3237
3238         Move JSC::Register inline methods into RegisterInlines.h.
3239         https://bugs.webkit.org/show_bug.cgi?id=203391
3240
3241         Reviewed by Yusuke Suzuki and Keith Miller.
3242
3243         No new tests needed because there is no behavior change.
3244
3245         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
3246
3247 2019-10-24  Alex Christensen  <achristensen@webkit.org>
3248
3249         Add more information to SRI failure console messages
3250         https://bugs.webkit.org/show_bug.cgi?id=203383
3251
3252         Reviewed by Geoff Garen.
3253
3254         * bindings/js/ScriptModuleLoader.cpp:
3255         (WebCore::ScriptModuleLoader::notifyFinished):
3256         * dom/LoadableClassicScript.cpp:
3257         (WebCore::LoadableClassicScript::notifyFinished):
3258         * html/HTMLLinkElement.cpp:
3259         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3260         * loader/DocumentThreadableLoader.cpp:
3261         (WebCore::DocumentThreadableLoader::didFinishLoading):
3262         (WebCore::DocumentThreadableLoader::reportIntegrityMetadataError):
3263         * loader/DocumentThreadableLoader.h:
3264         * loader/SubresourceIntegrity.cpp:
3265         (WebCore::integrityMismatchDescription):
3266         * loader/SubresourceIntegrity.h:
3267
3268 2019-10-24  Devin Rousso  <drousso@apple.com>
3269
3270         Automate generation of computedProperties
3271         https://bugs.webkit.org/show_bug.cgi?id=198680
3272         <rdar://problem/51507834>
3273
3274         Reviewed by Simon Fraser.
3275
3276         A property should be listed as part of a `CSSStyleDeclaration` if:
3277          - it will not be skipped (`skip-builder`) when generating/building properties
3278          - it's not `internal-only`
3279          - it has more than one non-`skip-builder`/non-`internal-only` property in `longhands`
3280             - if all the `longhands` are `skip-builder`/`internal-only` then the property doesn't
3281               really "have" any longhand properties
3282             - if there's only one property in `longhands`, then it's more of an alias than a longhand
3283
3284         * css/makeprop.pl:
3285         (sortWithPrefixedPropertiesLast): Added.
3286
3287         * css/CSSComputedStyleDeclaration.cpp:
3288         (WebCore::CSSComputedStyleDeclaration::cssText const):
3289         (WebCore::CSSComputedStyleDeclaration::length const):
3290         (WebCore::CSSComputedStyleDeclaration::item const):
3291         (WebCore::ComputedStyleExtractor::copyPropertiesInSet):
3292         (WebCore::ComputedStyleExtractor::copyProperties):
3293
3294         * css/StyleProperties.h:
3295         * css/StyleProperties.cpp:
3296         (WebCore::MutableStyleProperties::MutableStyleProperties):
3297         (WebCore::StyleProperties::copyPropertiesInSet):
3298         (WebCore::MutableStyleProperties::create):
3299
3300 2019-10-24  Simon Fraser  <simon.fraser@apple.com>
3301
3302         imported/w3c/web-platform-tests/css/css-values/calc-positive-fraction-001.html fails
3303         https://bugs.webkit.org/show_bug.cgi?id=203332
3304
3305         Reviewed by Dean Jackson.
3306         
3307         The calc() spec <https://drafts.csswg.org/css-values-4/#calc-range> says that you clamp
3308         and round the result of the clamp computation. Do that, instead of treating non-integral
3309         calc results as invalid for CSS properties that only take integers.
3310
3311         Tests: imported/w3c/web-platform-tests/css/css-values/calc-positive-fraction-001.html
3312
3313         * css/parser/CSSPropertyParserHelpers.cpp:
3314         (WebCore::CSSPropertyParserHelpers::CalcParser::consumeInteger):
3315         (WebCore::CSSPropertyParserHelpers::consumeInteger):
3316
3317 2019-10-23  Ryosuke Niwa  <rniwa@webkit.org>
3318
3319         Add a mechanism to find and manipulate text by paragraphs
3320         https://bugs.webkit.org/show_bug.cgi?id=203286
3321
3322         Reviewed by Wenson Hsieh.
3323
3324         This patch introduces TextManipulationController which allows WebKit clients to find and replace
3325         text content in a given document by paragraph boundary. For now, TextManipulationController finds
3326         all paragraphs in the document and invokes the callback for each paragraph. In the future, this
3327         controller will support detecting removal and insertion of new content to the document.
3328
3329         Tests: TextManipulation.StartTextManipulationFindSimpleParagraphs
3330                TextManipulation.StartTextManipulationFindParagraphsWithMultileTokens
3331                TextManipulation.CompleteTextManipulationShouldReplaceSimpleParagraphContent
3332                TextManipulation.CompleteTextManipulationShouldFailWhenContentIsChanged
3333                TextManipulation.CompleteTextManipulationShouldFailWhenDocumentHasBeenNavigatedAway
3334
3335         * Headers.cmake:
3336         * Sources.txt:
3337         * WebCore.xcodeproj/project.pbxproj:
3338         * dom/Document.cpp:
3339         (WebCore::Document::prepareForDestruction): Clear TextManipulationController. Otherwise m_items
3340         in TextManipulationController may keep a bunch of nodes alive and not let this document destructed.
3341         (WebCore::Document::textManipulationController): Added.
3342         * dom/Document.h:
3343         (WebCore::Document::textManipulationControllerIfExists): Added.
3344         * editing/TextManipulationController.cpp: Added.
3345         (WebCore::TextManipulationController::TextManipulationController): Added.
3346         (WebCore::TextManipulationController::startObservingParagraphs): Finds all pargraphs and invoke
3347         the callback.
3348         (WebCore::TextManipulationController::addItem): Added. A helper for startObservingParagraphs.
3349         (WebCore::TextManipulationController::completeManipulation): Added.
3350         (WebCore::TextManipulationController::replace): Added. A helper for completeManipulation.
3351         * editing/TextManipulationController.h: Added.
3352         (WebCore::TextManipulationController::ManipulationToken::encode const): Added.
3353         (WebCore::TextManipulationController::ManipulationToken::decode): Added.
3354
3355 2019-10-24  Ryosuke Niwa  <rniwa@webkit.org>
3356
3357         Build fix after r251567.
3358
3359         * page/Page.cpp:
3360         (WebCore::Page::collectDocuments):
3361         * page/Page.h:
3362
3363 2019-10-24  Matt Lewis  <jlewis3@apple.com>
3364
3365         Unreviewed, rolling out r251558.
3366
3367         This broke internal builds
3368
3369         Reverted changeset:
3370
3371         "Add a mechanism to find and manipulate text by paragraphs"
3372         https://bugs.webkit.org/show_bug.cgi?id=203286
3373         https://trac.webkit.org/changeset/251558
3374
3375 2019-10-24  Commit Queue  <commit-queue@webkit.org>
3376
3377         Unreviewed, rolling out r251269, r251294, and r251328.
3378         https://bugs.webkit.org/show_bug.cgi?id=203384
3379
3380         Probably made many animation tests flaky (Requested by rniwa
3381         on #webkit).
3382
3383         Reverted changesets:
3384
3385         "Integrate resize event with HTML5 event loop"
3386         https://bugs.webkit.org/show_bug.cgi?id=202964
3387         https://trac.webkit.org/changeset/251269
3388
3389         "Flaky Test: fast/events/resize-subframe-in-rendering-
3390         update.html"
3391         https://bugs.webkit.org/show_bug.cgi?id=203140
3392         https://trac.webkit.org/changeset/251294
3393
3394         "Flaky Test: fast/events/resize-subframe-in-rendering-
3395         update.html"
3396         https://bugs.webkit.org/show_bug.cgi?id=203140
3397         https://trac.webkit.org/changeset/251328
3398
3399 2019-10-23  Ryosuke Niwa  <rniwa@webkit.org>
3400
3401         Add a mechanism to find and manipulate text by paragraphs
3402         https://bugs.webkit.org/show_bug.cgi?id=203286
3403
3404         Reviewed by Wenson Hsieh.
3405
3406         This patch introduces TextManipulationController which allows WebKit clients to find and replace
3407         text content in a given document by paragraph boundary. For now, TextManipulationController finds
3408         all paragraphs in the document and invokes the callback for each paragraph. In the future, this
3409         controller will support detecting removal and insertion of new content to the document.
3410
3411         Tests: TextManipulation.StartTextManipulationFindSimpleParagraphs
3412                TextManipulation.StartTextManipulationFindParagraphsWithMultileTokens
3413                TextManipulation.CompleteTextManipulationShouldReplaceSimpleParagraphContent
3414                TextManipulation.CompleteTextManipulationShouldFailWhenContentIsChanged
3415                TextManipulation.CompleteTextManipulationShouldFailWhenDocumentHasBeenNavigatedAway
3416
3417         * Headers.cmake:
3418         * Sources.txt:
3419         * WebCore.xcodeproj/project.pbxproj:
3420         * dom/Document.cpp:
3421         (WebCore::Document::prepareForDestruction): Clear TextManipulationController. Otherwise m_items
3422         in TextManipulationController may keep a bunch of nodes alive and not let this document destructed.
3423         (WebCore::Document::textManipulationController): Added.
3424         * dom/Document.h:
3425         (WebCore::Document::textManipulationControllerIfExists): Added.
3426         * editing/TextManipulationController.cpp: Added.
3427         (WebCore::TextManipulationController::TextManipulationController): Added.
3428         (WebCore::TextManipulationController::startObservingParagraphs): Finds all pargraphs and invoke
3429         the callback.
3430         (WebCore::TextManipulationController::addItem): Added. A helper for startObservingParagraphs.
3431         (WebCore::TextManipulationController::completeManipulation): Added.
3432         (WebCore::TextManipulationController::replace): Added. A helper for completeManipulation.
3433         * editing/TextManipulationController.h: Added.
3434         (WebCore::TextManipulationController::ManipulationToken::encode const): Added.
3435         (WebCore::TextManipulationController::ManipulationToken::decode): Added.
3436
3437 2019-10-24  Zalan Bujtas  <zalan@apple.com>
3438
3439         [LFC][IFC] Add support for partial leading and trailing content
3440         https://bugs.webkit.org/show_bug.cgi?id=203375
3441
3442         Reviewed by Antti Koivisto.
3443
3444         This patch adds support for splitting text content across multiple lines when needed.
3445         It also supports complex cases when the text content spreads across multiple inline level boxes with different word-break values e.g.
3446         <span style="word-break: keep-all">donotsplitthiscontent</span><span style="word-break: break-all">splitthiscontent</span>
3447         would produce something like this with certain constraints.
3448                                 -> | <- available width
3449         "donotsplitthiscontentsplit
3450         thiscontent"
3451
3452         * layout/inlineformatting/InlineFormattingContext.cpp:
3453         (WebCore::Layout::InlineFormattingContext::lineLayout):
3454         (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthForConstraint const):
3455         * layout/inlineformatting/InlineLineBreaker.cpp:
3456         (WebCore::Layout::LineBreaker::breakingContextForInlineContent):
3457         (WebCore::Layout::LineBreaker::shouldWrapFloatBox):
3458         (WebCore::Layout::LineBreaker::wordBreakingBehavior const):
3459         (WebCore::Layout::LineBreaker::tryBreakingTextRun const):
3460         (WebCore::Layout::LineBreaker::breakingContext): Deleted.
3461         (WebCore::Layout::LineBreaker::breakingContextForFloat): Deleted.
3462         * layout/inlineformatting/InlineLineBreaker.h:
3463         * layout/inlineformatting/InlineLineLayout.cpp:
3464         (WebCore::Layout::LineLayout::LineInput::LineInput):
3465         (WebCore::Layout::LineLayout::layout):
3466         (WebCore::Layout::LineLayout::close):
3467         (WebCore::Layout::LineLayout::placeInlineItem):
3468         (WebCore::Layout::LineLayout::processUncommittedContent):
3469         (WebCore::Layout::LineLayout::shouldProcessUncommittedContent const):
3470         (WebCore::Layout::LineLayout::UncommittedContent::trim):
3471         * layout/inlineformatting/InlineLineLayout.h:
3472         * layout/inlineformatting/InlineTextItem.cpp:
3473         (WebCore::Layout::InlineTextItem::left const):
3474         (WebCore::Layout::InlineTextItem::right const):
3475         (WebCore::Layout::InlineTextItem::split const): Deleted.
3476         * layout/inlineformatting/InlineTextItem.h:
3477
3478 2019-10-24  Alex Christensen  <achristensen@webkit.org>
3479
3480         Pass CORS-enabled schemes through WebProcess instead of having them NetworkProcess-global
3481         https://bugs.webkit.org/show_bug.cgi?id=202891
3482
3483         Reviewed by Youenn Fablet.
3484
3485         * platform/LegacySchemeRegistry.cpp:
3486         (WebCore::LegacySchemeRegistry::registerURLSchemeAsCORSEnabled):
3487         (WebCore::LegacySchemeRegistry::shouldTreatURLSchemeAsCORSEnabled):
3488         (WebCore::LegacySchemeRegistry::allURLSchemesRegisteredAsCORSEnabled):
3489         * platform/LegacySchemeRegistry.h:
3490
3491 2019-10-24  Andy Estes  <aestes@apple.com>
3492
3493         [Cocoa] Make it possible to convert SharedBuffer segments and data views to NSData without copying
3494         https://bugs.webkit.org/show_bug.cgi?id=203348
3495
3496         Reviewed by Alex Christensen.
3497
3498         Added an API test.
3499
3500         * platform/SharedBuffer.h:
3501         * platform/cocoa/SharedBufferCocoa.mm:
3502         (-[WebCoreSharedBufferData initWithDataSegment:position:]):
3503         (-[WebCoreSharedBufferData length]):
3504         (-[WebCoreSharedBufferData bytes]):
3505         (WebCore::SharedBuffer::createCFData const):
3506         (WebCore::SharedBuffer::createNSDataArray const):
3507         (WebCore::SharedBuffer::DataSegment::createNSData const):
3508         (WebCore::SharedBufferDataView::createNSData const):
3509         (-[WebCoreSharedBufferData initWithSharedBufferDataSegment:]): Deleted.
3510
3511 2019-10-24  Chris Dumez  <cdumez@apple.com>
3512
3513         FetchResponse should not prevent entering the back/forward cache
3514         https://bugs.webkit.org/show_bug.cgi?id=203092
3515         <rdar://problem/56554677>
3516
3517         Reviewed by Alex Christensen.
3518
3519         Drop shouldPreventEnteringBackForwardCache_DEPRECATED() in FetchResponse to allow pages to
3520         enter the back/forward cache, even when the fetch response has a blob loader. r251495
3521         already made this safe by updating the FetchBodyOwner parent class to not resolve promises
3522         while in the back/forward cache.
3523
3524         Test: fast/history/page-cache-active-fetch-response-blobReadAsBlob.html
3525
3526         * Modules/fetch/FetchResponse.cpp:
3527         (WebCore::FetchResponse::shouldPreventEnteringBackForwardCache_DEPRECATED const): Deleted.
3528         * Modules/fetch/FetchResponse.h:
3529
3530 2019-10-24  Alicia Boya García  <aboya@igalia.com>
3531
3532         [MSE][GStreamer] Reintroduce ensureGLVideoSinkContext() fix
3533         https://bugs.webkit.org/show_bug.cgi?id=201401
3534
3535         Reviewed by Philippe Normand.
3536
3537         That patch was almost mechanically reverted temporarily along the rest
3538         of the WebKitMediaSrc rework. In theory that should have been OK since
3539         it was supposed to fix a regression of that patch... But actually
3540         the bug was already causing problems before, the WebKitMediaSrc rework
3541         just exposed a more common case.
3542
3543         It has been reported that the same bug arises when adding some CSS
3544         styles to the <video> element, and the patch fixes the issue.
3545
3546         And the patch actually makes sense in any case... since without it
3547         some perfectly valid state transitions are not covered!
3548
3549         So I'm reintroducing it.
3550
3551         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3552         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
3553
3554 2019-10-24  Antoine Quint  <graouts@apple.com>
3555
3556         [Web Animations] Only process CSS properties affected by a given CSS transition
3557         https://bugs.webkit.org/show_bug.cgi?id=203238
3558
3559         Reviewed by Simon Fraser.
3560
3561         When the "transition" property, or one of its longhands, would change we would iterate over every known CSS property to identify whether the before and after
3562         styles showed reasons to create, modify or cancel a backing CSSTransition object. However, we only need to do this in the case where "transition-property" is
3563         "all", ie. where the Animation object has its animationMode() set to Animation::AnimateAll. In all other cases, we only need to iterate over the CSS properties
3564         specified by "transition-property".
3565
3566         We now compile a list of CSS properties to iterate over by looking at all properties listed in the "transition-property" for the before and after styles.
3567
3568         * animation/AnimationTimeline.cpp:
3569         (WebCore::compileTransitionPropertiesInStyle):
3570         (WebCore::AnimationTimeline::updateCSSTransitionsForElementAndProperty):
3571         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
3572         * animation/AnimationTimeline.h:
3573
3574 2019-10-24  youenn fablet  <youenn@apple.com>
3575
3576         XMLHttpRequest.responseXML url should be the HTTP response URL
3577         https://bugs.webkit.org/show_bug.cgi?id=203289
3578
3579         Reviewed by Chris Dumez.
3580
3581         Follow https://xhr.spec.whatwg.org/#document-response step 9.
3582         Covered by rebased tests.
3583
3584         * xml/XMLHttpRequest.cpp:
3585
3586 2019-10-24  Antti Koivisto  <antti@apple.com>
3587
3588         Move property cascade out of StyleResolver
3589         https://bugs.webkit.org/show_bug.cgi?id=203361
3590
3591         Reviewed by Zalan Bujtas.
3592
3593         Rename StyleResolver::CascadedProperties -> Style::PropertyCascade and move it into a file of its own.
3594
3595         * Sources.txt:
3596         * WebCore.xcodeproj/project.pbxproj:
3597         * css/StyleResolver.cpp:
3598         (WebCore::StyleResolver::styleForKeyframe):
3599         (WebCore::StyleResolver::styleForPage):
3600         (WebCore::StyleResolver::applyMatchedProperties):
3601         (WebCore::StyleResolver::cascadedPropertiesForRollback):
3602         (WebCore::StyleResolver::applyProperty):
3603         (WebCore::StyleResolver::applyCascadedPropertiesImpl):
3604         (WebCore::shouldApplyPropertyInParseOrder): Deleted.
3605         (WebCore::isValidMarkerStyleProperty): Deleted.
3606         (WebCore::isValidCueStyleProperty): Deleted.
3607         (WebCore::StyleResolver::CascadedProperties::CascadedProperties): Deleted.
3608         (WebCore::StyleResolver::CascadedProperties::hasProperty const): Deleted.
3609         (WebCore::StyleResolver::CascadedProperties::property): Deleted.
3610         (WebCore::StyleResolver::CascadedProperties::hasCustomProperty const): Deleted.
3611         (WebCore::StyleResolver::CascadedProperties::customProperty const): Deleted.
3612         (WebCore::StyleResolver::CascadedProperties::setPropertyInternal): Deleted.
3613         (WebCore::StyleResolver::CascadedProperties::set): Deleted.
3614         (WebCore::StyleResolver::CascadedProperties::setDeferred): Deleted.
3615         (WebCore::StyleResolver::CascadedProperties::addMatch): Deleted.
3616         (WebCore::declarationsForCascadeLevel): Deleted.
3617         (WebCore::StyleResolver::CascadedProperties::addNormalMatches): Deleted.
3618         (WebCore::hasImportantProperties): Deleted.
3619         (WebCore::StyleResolver::CascadedProperties::addImportantMatches): Deleted.
3620         (WebCore::StyleResolver::CascadedProperties::applyDeferredProperties): Deleted.
3621         (WebCore::StyleResolver::CascadedProperties::Property::apply): Deleted.
3622         * css/StyleResolver.h:
3623         (WebCore::StyleResolver::State::authorRollback const):
3624         (WebCore::StyleResolver::State::userRollback const):
3625         (WebCore::StyleResolver::State::setAuthorRollback):
3626         (WebCore::StyleResolver::State::setUserRollback):
3627         (WebCore::StyleResolver::CascadedProperties::customProperties): Deleted.
3628         (WebCore::StyleResolver::cascadeLevel const): Deleted.
3629         (WebCore::StyleResolver::setCascadeLevel): Deleted.
3630         * style/PropertyCascade.cpp: Added.
3631         (WebCore::Style::shouldApplyPropertyInParseOrder):
3632         (WebCore::Style::isValidMarkerStyleProperty):
3633         (WebCore::Style::isValidCueStyleProperty):
3634         (WebCore::Style::PropertyCascade::PropertyCascade):
3635         (WebCore::Style::PropertyCascade::setPropertyInternal):
3636         (WebCore::Style::PropertyCascade::set):
3637         (WebCore::Style::PropertyCascade::setDeferred):
3638         (WebCore::Style::PropertyCascade::addMatch):
3639         (WebCore::Style::declarationsForCascadeLevel):
3640         (WebCore::Style::PropertyCascade::addNormalMatches):
3641         (WebCore::Style::hasImportantProperties):
3642         (WebCore::Style::PropertyCascade::addImportantMatches):
3643         (WebCore::Style::PropertyCascade::applyDeferredProperties):
3644         (WebCore::Style::PropertyCascade::Property::apply):
3645         * style/PropertyCascade.h: Added.
3646         (WebCore::Style::PropertyCascade::customProperties):
3647         (WebCore::Style::PropertyCascade::hasProperty const):
3648         (WebCore::Style::PropertyCascade::property):
3649         (WebCore::Style::PropertyCascade::hasCustomProperty const):
3650         (WebCore::Style::PropertyCascade::customProperty const):
3651
3652 2019-10-24  Chris Dumez  <cdumez@apple.com>
3653
3654         AudioContext should not prevent entering the back/forward cache
3655         https://bugs.webkit.org/show_bug.cgi?id=203102
3656
3657         Reviewed by Geoffrey Garen.
3658
3659         Allow pages with AudioContexts that are rendering in the back/forward cache.
3660         Upon entering the back/forward cache, we suspend rendering and update IsPlaying
3661         state so that the browser no longer shows the "Audio Playing" icon. Upon restoring
3662         from the back/forward cache, we resume rendering and update IsPlaying state again
3663         so that the browser shows the "Audio Playing" icon again. I tested it on:
3664         - http://webaudioplayground.appspot.com
3665
3666         With regards to events dispatching, the AudioContext class is already using a
3667         GenericEventQueue that properly delays event dispatching while in the back/forward
3668         cache.
3669
3670         No new tests, updated existing test.
3671
3672         * Modules/webaudio/AudioContext.cpp:
3673         (WebCore::AudioContext::suspend):
3674         (WebCore::AudioContext::resume):
3675         (WebCore::AudioContext::suspendRendering):
3676         (WebCore::AudioContext::resumeRendering):
3677         * Modules/webaudio/AudioContext.h:
3678         * Modules/webaudio/AudioContext.idl:
3679
3680 2019-10-24  Antti Koivisto  <antti@apple.com>
3681
3682         Move MatchResult and related types out of StyleResolver
3683         https://bugs.webkit.org/show_bug.cgi?id=203252
3684
3685         Reviewed by Zalan Bujtas.
3686
3687         Reverse the dependency between StyleResolver and ElementRuleCollector so that the former depends on the latter.
3688         This makes the code easier to understand and enables further cleanups.
3689
3690         The patch also gets rid of the confusing RuleRange objects in fovor of splitting declarations from different cascade levels to separate vectors.
3691         The desired cascade level is indicated with an enum instead of a range.
3692
3693         There is also some general modernization.
3694
3695         * css/ElementRuleCollector.cpp:
3696         (WebCore::ElementRuleCollector::matchResult const):
3697         (WebCore::ElementRuleCollector::addElementStyleProperties):
3698         (WebCore::ElementRuleCollector::transferMatchedRules):
3699         (WebCore::ElementRuleCollector::matchAllRules):
3700         (WebCore::ElementRuleCollector::addMatchedProperties):
3701         (WebCore::ElementRuleCollector::matchedResult): Deleted.
3702         * css/ElementRuleCollector.h:
3703         (WebCore::PseudoStyleRequest::PseudoStyleRequest):
3704         (WebCore::MatchResult::isEmpty const):
3705         (WebCore::operator==):
3706         (WebCore::operator!=):
3707         * css/PageRuleCollector.cpp:
3708         (WebCore::PageRuleCollector::matchPageRules):
3709         * css/PageRuleCollector.h:
3710         (WebCore::PageRuleCollector::matchResult const):
3711         (WebCore::PageRuleCollector::matchedResult): Deleted.
3712         * css/StyleResolver.cpp:
3713         (WebCore::StyleResolver::sweepMatchedPropertiesCache):
3714         (WebCore::StyleResolver::styleForElement):
3715         (WebCore::StyleResolver::styleForKeyframe):
3716         (WebCore::StyleResolver::pseudoStyleForElement):
3717         (WebCore::StyleResolver::styleForPage):
3718         (WebCore::StyleResolver::computeMatchedPropertiesHash):
3719         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
3720         (WebCore::extractDirectionAndWritingMode):
3721         (WebCore::StyleResolver::applyMatchedProperties):
3722         (WebCore::StyleResolver::cascadedPropertiesForRollback):
3723         (WebCore::StyleResolver::CascadedProperties::addMatch):
3724         (WebCore::declarationsForCascadeLevel):
3725         (WebCore::StyleResolver::CascadedProperties::addNormalMatches):
3726         (WebCore::StyleResolver::CascadedProperties::addImportantMatches):
3727         (WebCore::StyleResolver::MatchResult::addMatchedProperties): Deleted.
3728         (WebCore::operator==): Deleted.
3729         (WebCore::operator!=): Deleted.
3730         (WebCore::cascadeLevelForIndex): Deleted.
3731         * css/StyleResolver.h:
3732         (WebCore::StyleResolver::MatchedPropertiesCacheItem::MatchedPropertiesCacheItem):
3733         (WebCore::PseudoStyleRequest::PseudoStyleRequest): Deleted.
3734         (WebCore::StyleResolver::RuleRange::RuleRange): Deleted.
3735         (WebCore::StyleResolver::MatchRanges::MatchRanges): Deleted.
3736         (WebCore::StyleResolver::MatchRanges::UARuleRange): Deleted.
3737         (WebCore::StyleResolver::MatchRanges::authorRuleRange): Deleted.
3738         (WebCore::StyleResolver::MatchRanges::userRuleRange): Deleted.
3739         (WebCore::StyleResolver::MatchResult::MatchResult): Deleted.
3740         (WebCore::StyleResolver::MatchResult::matchedProperties const): Deleted.
3741         (WebCore::StyleResolver::isRightPage const): Deleted.
3742
3743 2019-10-23  Devin Rousso  <drousso@apple.com>
3744
3745         Web Inspector: provide a way to inject "bootstrap" JavaScript into the page as the first script executed
3746         https://bugs.webkit.org/show_bug.cgi?id=195847
3747         <rdar://problem/48950551>
3748
3749         Reviewed by Joseph Pecoraro.
3750
3751         When debugging webpages, it's often useful to be able to swizzle various functions in order
3752         to add extra logs for when they're called (e.g. `Event.prototype.preventDefault`). Sometimes
3753         this can be difficult, such as if the page saves a copy of the function and references that
3754         instead, in which case it would be helpful to have a way to guarantee that the swizzled code
3755         is the first thing evaluated after the context is created.
3756
3757         This change adds support for that concept, which has been named Inspector Bootstrap Script.
3758         Once created, it will be injected as the first user script to every new global object that
3759         is created afterwards. Modifications to the Inspector Bootstrap Script take effect for all
3760         new global objects created _after_ the modification happened.
3761
3762         Tests: inspector/page/setBootstrapScript-main-frame.html
3763                inspector/page/setBootstrapScript-sub-frame.html
3764
3765         * inspector/agents/InspectorPageAgent.h:
3766         * inspector/agents/InspectorPageAgent.cpp:
3767         (WebCore::InspectorPageAgent::setBootstrapScript): Added.
3768         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld): Added.
3769
3770         * inspector/InspectorInstrumentation.cpp:
3771         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
3772         * inspector/agents/page/PageDebuggerAgent.h:
3773         * inspector/agents/page/PageDebuggerAgent.cpp:
3774         (WebCore::PageDebuggerAgent::didClearWindowObjectInWorld): Added.
3775         (WebCore::PageDebuggerAgent::didClearMainFrameWindowObject): Deleted.
3776         * inspector/agents/page/PageRuntimeAgent.h:
3777         * inspector/agents/page/PageRuntimeAgent.cpp:
3778         (WebCore::PageRuntimeAgent::didClearWindowObjectInWorld): Added.
3779         (WebCore::PageRuntimeAgent::didCreateMainWorldContext): Deleted.
3780         Rename existing global object creation "notifications" for more consistency between agents.
3781
3782 2019-10-23  Peng Liu  <peng.liu6@apple.com>
3783
3784         [Picture-in-Picture Web API] Implement EnterPictureInPictureEvent support
3785         https://bugs.webkit.org/show_bug.cgi?id=202616
3786
3787         Reviewed by Eric Carlson.
3788
3789         Implement the support for enterpictureinpicture and leavepictureinpicture events.
3790         - Add a public method schduleEvent() to HTMLMediaElement in order to fire enterpictureinpicture
3791         event which includes properties.
3792         - In order to notify the observer (HTMLVideoElementPictureInPicture) after entering picture-in-picture
3793         transition is completed and the picture-in-picture window size information is available,
3794         we have to change setVideoFullscreenFrame() to virtual in HTMLMediaElement and implement it in
3795         HTMLVideoElement to track the transition state.
3796         - The PictureInPictureWindow does not need to ba an ActiveDOMObject, so it is updated accordingly.
3797
3798         With manual tests, the implementation passes LayoutTests/imported/w3c/web-platform-tests/picture-in-picture/enter-picture-in-picture.html
3799         and LayoutTests/imported/w3c/web-platform-tests/picture-in-picture/leave-picture-in-picture.html.
3800
3801         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.cpp:
3802         (WebCore::HTMLVideoElementPictureInPicture::didEnterPictureInPicture):
3803         (WebCore::HTMLVideoElementPictureInPicture::didExitPictureInPicture):
3804         (WebCore::HTMLVideoElementPictureInPicture::pictureInPictureWindowResized):
3805         * Modules/pictureinpicture/HTMLVideoElementPictureInPicture.h:
3806         * Modules/pictureinpicture/PictureInPictureWindow.cpp:
3807         (WebCore::PictureInPictureWindow::PictureInPictureWindow):
3808         (WebCore::PictureInPictureWindow::activeDOMObjectName const): Deleted.
3809         (WebCore::PictureInPictureWindow::eventTargetInterface const): Deleted.
3810         (WebCore::PictureInPictureWindow::scriptExecutionContext const): Deleted.
3811         * Modules/pictureinpicture/PictureInPictureWindow.h:
3812         * Modules/pictureinpicture/PictureInPictureWindow.idl:
3813         * html/HTMLMediaElement.cpp:
3814         (WebCore::HTMLMediaElement::scheduleEvent):
3815         * html/HTMLMediaElement.h:
3816         * html/HTMLVideoElement.cpp:
3817         (WebCore::HTMLVideoElement::fullscreenModeChanged):
3818         (WebCore::HTMLVideoElement::didBecomeFullscreenElement):
3819         (WebCore::HTMLVideoElement::setVideoFullscreenFrame):
3820         * html/HTMLVideoElement.h:
3821         * platform/PictureInPictureObserver.h:
3822
3823 2019-10-23  Yusuke Suzuki  <ysuzuki@apple.com>
3824
3825         [JSC] Remove wasmAwareLexicalGlobalObject
3826         https://bugs.webkit.org/show_bug.cgi?id=203351
3827
3828         Reviewed by Mark Lam.
3829
3830         * bindings/js/CommonVM.cpp:
3831         (WebCore::lexicalFrameFromCommonVM):
3832         * bindings/js/JSDOMWindowBase.cpp:
3833         (WebCore::responsibleDocument):
3834         * bindings/js/StructuredClone.cpp:
3835         (WebCore::cloneArrayBufferImpl):
3836         * dom/Document.cpp:
3837         (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy const):
3838         * testing/Internals.cpp:
3839         (WebCore::Internals::parserMetaData):
3840         (WebCore::Internals::isFromCurrentWorld const):
3841
3842 2019-10-23  Chris Dumez  <cdumez@apple.com>
3843
3844         Notification should not prevent entering the back/forward cache
3845         https://bugs.webkit.org/show_bug.cgi?id=203099
3846         <rdar://problem/56557479>
3847
3848         Reviewed by Geoffrey Garen.
3849
3850         Notifications currently displayed were preventing a page from entering the back/forward cache.
3851         Instead, we now make sure to close any visible notification upon suspension. Since closing
3852         a notification will fire events, we also schedule tasks on the window event loop to fire those
3853         events, instead of firing these events synchronously. The Window event loop takes care of delaying
3854         those events if the document is suspended.
3855
3856         Test: fast/history/page-cache-notification-showing.html
3857
3858         * Modules/notifications/Notification.cpp:
3859         (WebCore::Notification::Notification):
3860         (WebCore::Notification::show):
3861         (WebCore::Notification::close):
3862         (WebCore::Notification::document const):
3863         (WebCore::Notification::activeDOMObjectName const):
3864         (WebCore::Notification::stop):
3865         (WebCore::Notification::suspend):
3866         (WebCore::Notification::queueTask):
3867         (WebCore::Notification::dispatchShowEvent):
3868         (WebCore::Notification::dispatchClickEvent):
3869         (WebCore::Notification::dispatchCloseEvent):
3870         (WebCore::Notification::dispatchErrorEvent):
3871         * Modules/notifications/Notification.h:
3872         * dom/AbstractEventLoop.h:
3873
3874 2019-10-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
3875
3876         [SVG2] Fix SVGSVGElement to conform with SVG2
3877         https://bugs.webkit.org/show_bug.cgi?id=203278
3878
3879         Reviewed by Simon Fraser.
3880
3881         The interface of SVGSVGElement is defined here:
3882             https://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSVGElement
3883
3884         -- Delete the viewport attribute.
3885         -- Delete the attributes contentScriptType and contentStyleType.
3886         -- Delete pixelUnitxxx() and screenPixelxxx() functions.
3887         -- Make the SVGElement argument to checkIntersection() and 
3888            checkEnclosure() be non-optional.
3889
3890         * svg/SVGSVGElement.cpp:
3891         (WebCore::SVGSVGElement::checkIntersection):
3892         (WebCore::SVGSVGElement::checkEnclosure):
3893         (WebCore::SVGSVGElement::contentScriptType const): Deleted.
3894         (WebCore::SVGSVGElement::setContentScriptType): Deleted.
3895         (WebCore::SVGSVGElement::contentStyleType const): Deleted.
3896         (WebCore::SVGSVGElement::setContentStyleType): Deleted.
3897         (WebCore::SVGSVGElement::viewport const): Deleted.
3898         (WebCore::SVGSVGElement::pixelUnitToMillimeterX const): Deleted.
3899         (WebCore::SVGSVGElement::pixelUnitToMillimeterY const): Deleted.
3900         (WebCore::SVGSVGElement::screenPixelToMillimeterX const): Deleted.
3901         (WebCore::SVGSVGElement::screenPixelToMillimeterY const): Deleted.
3902         (WebCore::SVGSVGElement::suspendRedraw): Deleted.
3903         (WebCore::SVGSVGElement::unsuspendRedraw): Deleted.
3904         (WebCore::SVGSVGElement::unsuspendRedrawAll): Deleted.
3905         (WebCore::SVGSVGElement::forceRedraw): Deleted.
3906         * svg/SVGSVGElement.h:
3907         * svg/SVGSVGElement.idl:
3908
3909 2019-10-23  Chris Dumez  <cdumez@apple.com>
3910
3911         Unreviewed build fix after r251509.
3912
3913         * Modules/entriesapi/FileSystemDirectoryEntry.cpp:
3914
3915 2019-10-23  Yusuke Suzuki  <ysuzuki@apple.com>
3916
3917         [JSC] Figure out missing prepareCallOperation
3918         https://bugs.webkit.org/show_bug.cgi?id=203285
3919
3920         Reviewed by Mark Lam.
3921
3922         Use JITOperationPrologueCallFrameTracer instead of NativeCallFrameTracer.
3923
3924         * bindings/scripts/CodeGeneratorJS.pm:
3925         (GenerateOperationDefinition):
3926         * bindings/scripts/test/JS/JSTestDOMJIT.cpp:
3927         (WebCore::jsTestDOMJITPrototypeFunctionGetAttributeWithoutTypeCheck):
3928         (WebCore::jsTestDOMJITPrototypeFunctionItemWithoutTypeCheck):
3929         (WebCore::jsTestDOMJITPrototypeFunctionHasAttributeWithoutTypeCheck):
3930         (WebCore::jsTestDOMJITPrototypeFunctionGetElementByIdWithoutTypeCheck):
3931         (WebCore::jsTestDOMJITPrototypeFunctionGetElementsByNameWithoutTypeCheck):
3932         * domjit/DOMJITHelpers.h:
3933         (WebCore::DOMJIT::toWrapperSlow):
3934
3935 2019-10-23  Tim Horton  <timothy_horton@apple.com>
3936
3937         macCatalyst: Should dispatch contextmenu event on right click
3938         https://bugs.webkit.org/show_bug.cgi?id=203316
3939         <rdar://problem/54617376>
3940
3941         Reviewed by Wenson Hsieh.
3942
3943         macCatalyst does not have ENABLE(CONTEXT_MENUS), because it uses the
3944         iOS-style platform-driven context menu API, but should still dispatch
3945         the contextmenu event on right click, for pages that depend on that.
3946
3947         Separate ENABLE(CONTEXT_MENU_EVENT) out from ENABLE(CONTEXT_MENUS).
3948
3949         In the future, calling preventDefault on the contextmenu event should
3950         block the platform context menu from appearing, but currently they
3951         use entirely different gestures.
3952
3953         * page/EventHandler.cpp:
3954         * page/EventHandler.h:
3955         * replay/UserInputBridge.cpp:
3956         * replay/UserInputBridge.h:
3957
3958 2019-10-23  Russell Epstein  <repstein@apple.com>
3959
3960         Unreviewed, rolling out r251469.
3961
3962         Broke accessibility/ios-simulator/link-with-images-text.html
3963         on iOS
3964
3965         Reverted changeset:
3966
3967         "AX: Implement support for new ARIA roles: code, strong,
3968         emphasis, generic"
3969         https://bugs.webkit.org/show_bug.cgi?id=203257
3970         https://trac.webkit.org/changeset/251469
3971
3972 2019-10-23  Chris Dumez  <cdumez@apple.com>
3973
3974         FileSystemDirectoryReader / FileSystemEntry should not prevent entering the back/forward cache
3975         https://bugs.webkit.org/show_bug.cgi?id=203090
3976         <rdar://problem/56550805>
3977
3978         Reviewed by Geoffrey Garen.
3979
3980         FileSystemDirectoryReader / FileSystemEntry no longer prevent entering the back/forward cache.
3981         We now dispatch tasks to the window event loop whenever we need to call a JS callback since the
3982         window event loop takes care of suspending tasks while in the back/forward cache.
3983
3984         Tests: editing/pasteboard/entries-api/DirectoryEntry-getFile-back-forward-cache.html
3985                editing/pasteboard/entries-api/DirectoryReader-readEntries-back-forward-cache.html
3986
3987         * Modules/entriesapi/FileSystemDirectoryEntry.cpp:
3988         (WebCore::FileSystemDirectoryEntry::getEntry):
3989         * Modules/entriesapi/FileSystemDirectoryReader.cpp:
3990         (WebCore::FileSystemDirectoryReader::document const):
3991         (WebCore::FileSystemDirectoryReader::readEntries):
3992         * Modules/entriesapi/FileSystemDirectoryReader.h:
3993         * Modules/entriesapi/FileSystemEntry.cpp:
3994         (WebCore::FileSystemEntry::document const):
3995         (WebCore::FileSystemEntry::getParent):
3996         * Modules/entriesapi/FileSystemEntry.h:
3997         * Modules/entriesapi/FileSystemFileEntry.cpp:
3998         (WebCore::FileSystemFileEntry::file):
3999
4000 2019-10-23  Myles C. Maxfield  <mmaxfield@apple.com>
4001
4002         [iOS] Remove Hiragino Sans site-specific quirk for Yahoo Japan
4003         https://bugs.webkit.org/show_bug.cgi?id=203345
4004
4005         Reviewed by Simon Fraser.
4006
4007         This iOS-specific quirk made Yahoo Japan stop using the 800-weight
4008         version of Hiragino Sans because it's too heavy. We were using the
4009         800-weight because the site requests 700 but we didn't have a 700-
4010         weight of Hiragino Sans. However, now in iOS 13 we do have a 700-
4011         weight of Hiragino Sans, so we can just delete this quirk.
4012
4013         Also, it turns out that Yahoo Japan modified their content to no
4014         longer hit this quirk anyway, so this patch has 0 behavior change.
4015
4016         Site specific quirks are untestable.
4017
4018         * css/CSSFontSelector.cpp:
4019         (WebCore::CSSFontSelector::fontRangesForFamily):
4020         * page/Quirks.cpp:
4021         (WebCore::Quirks::shouldLightenJapaneseBoldSansSerif const): Deleted.
4022         * page/Quirks.h:
4023
4024 2019-10-23  Chris Dumez  <cdumez@apple.com>
4025
4026         Ignore document.open/write after the active parser has been aborted
4027         https://bugs.webkit.org/show_bug.cgi?id=203028
4028
4029         Reviewed by Geoffrey Garen.
4030
4031         Ignore document.open/write after the active parser has been aborted, as per:
4032         - https://github.com/whatwg/html/pull/4907
4033
4034         Test: imported/blink/fast/loader/document-write-after-location-change.html
4035
4036         * dom/Document.cpp:
4037         (WebCore::Document::open):
4038         (WebCore::Document::cancelParsing):
4039         (WebCore::Document::implicitOpen):
4040         (WebCore::Document::write):
4041         * dom/Document.h:
4042
4043 2019-10-23  Andy Estes &